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 |
---|---|---|---|---|---|---|
DO NOT MODIFY THIS METHOD Prints the total number of requests and the number of requests that resulted in a cache hit. | public void reportStats() {
System.out.println("Number of requests: " + (requestCount - warmUpRequests));
System.out.println("Number of hits: " + hitCount);
System.out.println("hit ratio: " + (double) hitCount / (requestCount - warmUpRequests));
System.out.println("Average hit cost: " + (double) hitCost / hitCount);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"long getCacheHits();",
"public Long get_cachetotrequests() throws Exception {\n\t\treturn this.cachetotrequests;\n\t}",
"public int getNumCacheHit() {\n return cacheHandler.getCountCacheHit();\n }",
"int getCachedCount();",
"long getRequestsCount();",
"public Long get_cachetotpetrequests() throws Exception {\n\t\treturn this.cachetotpetrequests;\n\t}",
"int getRequestsCount();",
"int getRequestsCount();",
"@Override\n\tpublic void printCacheEntries() {\n\t\tSystem.out.println(\"********* Fast Cache Entries *********\");\n\t\tSet<Map.Entry<K, V>> entrySet = cache.entrySet();\n\t\tfor (Map.Entry<K, V> entry : entrySet) {\n\t\t\tSystem.out.println(entry.getKey() + \", \" + entry.getValue());\n\t\t}\n\t\tSystem.out.println(\"*******************************\");\n\t}",
"public Long get_cachetotparameterizedrequests() throws Exception {\n\t\treturn this.cachetotparameterizedrequests;\n\t}",
"public Long get_cachepercenthit() throws Exception {\n\t\treturn this.cachepercenthit;\n\t}",
"public Long get_cachetotflashcachehits() throws Exception {\n\t\treturn this.cachetotflashcachehits;\n\t}",
"public int getCachedCount() {\n return cached_.size();\n }",
"public Long get_cachecurhits() throws Exception {\n\t\treturn this.cachecurhits;\n\t}",
"public static long getRequests() {\n return requests;\n }",
"public Long get_cachetot304hits() throws Exception {\n\t\treturn this.cachetot304hits;\n\t}",
"public int getCachedCount() {\n return cached_.size();\n }",
"public int getRequestsCount() {\n return requests_.size();\n }",
"public Long get_cachetotnon304hits() throws Exception {\n\t\treturn this.cachetotnon304hits;\n\t}",
"long getCacheMisses();",
"public Long get_cachetotpethits() throws Exception {\n\t\treturn this.cachetotpethits;\n\t}",
"public int getRequestsCount() {\n return requests_.size();\n }",
"public void echo() {\n\tSystem.out.printf(\"cache name: %s\\n\", myCache.getName());\n\tSystem.out.printf(\"cache size: %s\\n\", myCache.size());\n\tSystem.out.printf(\"cache entry[%s]: %s\\n\", \"bean1\", myCache.get(\"bean1\").toString());\n\tSystem.out.printf(\"cache entry[%s]: %s\\n\", \"bean2\", myCache.get(\"bean2\").toString());\n }",
"private static void printStats()\r\n\t{\r\n\t\tSystem.out.println(\"Keywords found: \" + keywordHits);\r\n\t\tSystem.out.println(\"Links found: \" + SharedLink.getLinksFound());\r\n\t\tSystem.out.println(\"Pages found: \" + SharedPage.getPagesDownloaded());\r\n\t\tSystem.out.println(\"Failed downloads: \" + SharedPage.getFailedDownloads());\r\n\t\tSystem.out.println(\"Producers: \" + fetchers);\r\n\t\tSystem.out.println(\"Consumers: \" + parsers);\r\n\t}",
"private void logCacheStatus() {\n if (!LOGGER.canLogAtLevel(LogLevel.VERBOSE)) {\n return;\n }\n\n final int size = cache.size();\n final int length = cache.getTotalLength();\n\n LOGGER.atVerbose()\n .addKeyValue(SIZE_KEY, size)\n .addKeyValue(TOTAL_LENGTH_KEY, length)\n .log(\"Cache entry added or updated. Total number of entries: {}; Total schema length: {}\",\n size, length);\n }",
"public Long get_cachetotresponsebytes() throws Exception {\n\t\treturn this.cachetotresponsebytes;\n\t}",
"long getHits();",
"public int getRequestsCount() {\n return instance.getRequestsCount();\n }",
"public void incrMetaCacheHit() {\n metaCacheHits.inc();\n }",
"int getRequestCount();",
"public Long get_cachetotmisses() throws Exception {\n\t\treturn this.cachetotmisses;\n\t}",
"public int getTotalHits() { return totalHits; }",
"public Long get_cachetotparameterizedhits() throws Exception {\n\t\treturn this.cachetotparameterizedhits;\n\t}",
"public int getCacheCount() {\n DiskCacheManager diskCacheManager = getDiskCacheManager();\n if (diskCacheManager == null) return 0;\n return diskCacheManager.getCacheCount();\n }",
"public Long get_cachepercentpethits() throws Exception {\n\t\treturn this.cachepercentpethits;\n\t}",
"public int size() {\n return cache.size();\n }",
"public Long get_cachepercentbytehit() throws Exception {\n\t\treturn this.cachepercentbytehit;\n\t}",
"public Long get_cachetotparameterized304hits() throws Exception {\n\t\treturn this.cachetotparameterized304hits;\n\t}",
"public int getNumCacheMiss() {\n return cacheHandler.getCountCacheMiss();\n }",
"public static void main(String[] args)\n {\n\tScanner sc = new Scanner(System.in);\n\tSystem.out.println(\"enter cache size in KB among (1, 2, 4, 8, 16, 32)\");\n\tint cacheSize = sc.nextInt();\n\tSystem.out.println(\"enter way associative value among(1,2,4,8)\");\n\tint wayAssociative = sc.nextInt();\n\tSystem.out.println(\"enter cache line size in bytes among(2,4,8,16,32,64)\");\n\tint cacheLineSize = sc.nextInt();\n\tsc.close();\n\n\tlong count_hit = 0, count_miss = 0;\n\tlong count_hit_2 = 0, count_miss_2 = 0, clockCycle_2 = 0;\n\tlong count_hit_4 = 0, count_miss_4 = 0, clockCycle_4 = 0;\n\tlong count_hit_8 = 0, count_miss_8 = 0, clockCycle_8 = 0;\n\n\tint numberOfCacheLines = (int) ((cacheSize * 1024) / cacheLineSize);\n\n\tArrayList<String> cacheKeys = new ArrayList<String>(numberOfCacheLines);\n\tArrayList<String> cacheValues = new ArrayList<String>(numberOfCacheLines);\n\tArrayList<String> cacheKeys_0 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheValues_0 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheKeys_1 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheValues_1 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheKeys_2 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheValues_2 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheKeys_3 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheValues_3 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheKeys_4 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheValues_4 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheKeys_5 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheValues_5 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheKeys_6 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheValues_6 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheKeys_7 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheValues_7 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\n\tlong clockCycle = 0;\n\n\tStringBuilder y = new StringBuilder(\"\");\n\n\t// creating main memory array to store all addresses in a 2d\n\t// array..mapping one\n\t// letter into one width length only..1 to 1 mapping.\n\t// so 2 width is one byte..to get value do block offset*2\n\tString[][] mainMemory = new String[1743][32];\n\tfor (int i = 0; i < 1743; i++)\n\t{\n\t for (int j = 0; j < 32; j++)\n\t {\n\t\tmainMemory[i][j] = \"\";\n\t }\n\t}\n\ttry\n\t{\n\t // read all input files\n\t\tString instructionAddresses = new String(\n\t\t\t\tFiles.readAllBytes(Paths\n\t\t\t\t\t\t.get(\"/Users/akashmalla/Documents/COEN210_Computer_Architecture/project1/inst_addr_trace_hex_project_1.txt\")));\n\t\tString dataSizes = new String(\n\t\t\t\tFiles.readAllBytes(Paths\n\t\t\t\t\t\t.get(\"/Users/akashmalla/Documents/COEN210_Computer_Architecture/project1/inst_data_size_project_1.txt\")));\n\t\tString memoryAddresses = new String(\n\t\t\t\tFiles.readAllBytes(Paths\n\t\t\t\t\t\t.get(\"/Users/akashmalla/Documents/COEN210_Computer_Architecture/project1/inst_mem_hex_16byte_wide.txt\")));\n\t\t// copy all memory addresses into the 2d mainMemory array\n\t\t// split into each line of address\n\n\t String[] memoryAddress = memoryAddresses.split(\"\\\\s+\");\n\t for (int i = 0; i < 1743; i++)\n\t {\n\t\t// split address into each letter\n\t\tString[] oneBit = memoryAddress[i].split(\"\");\n\n\t\tint z = -1;\n\n\t\tfor (int q = oneBit.length - 1; q >= 0; q--)\n\t\t{\n\t\t z++;\n\t\t // store each letter into the array as hex\n\t\t mainMemory[i][q] = oneBit[z];\n\t\t}\n\t }\n\n\t // splitting the instruction addresses into lines\n\t String[] instructionAddress = instructionAddresses.split(\"\\\\s+\");\n\n\t // splitting dataSizes to get length of each data\n\t String[] dataSize = dataSizes.split(\"\\\\s+\");\n\t for (int i = 0; i < instructionAddress.length; i++)\n\t {\n\t\ttry\n\t\t{\n\t\t String binaryIs = \"\";\n\t\t String binaryOffset = \"\";\n\t\t String blockNumber = \"\";\n\t\t if (Integer.parseInt(instructionAddress[i], 16) > 15)\n\t\t {\n\t\t\tbinaryIs = Integer.toBinaryString(Integer.parseInt(instructionAddress[i], 16));\n\t\t\tbinaryOffset = binaryIs.substring(binaryIs.length() - 4);\n\t\t\tblockNumber = binaryIs.substring(0, binaryIs.length() - 4);\n\t\t } else\n\t\t {\n\n\t\t\tblockNumber = \"0\";\n\t\t\tbinaryOffset = Integer.toBinaryString(Integer.parseInt(instructionAddress[i], 16));\n\t\t }\n\n\t\t // check if hit or miss for 1 way\n\t\t if (wayAssociative == 1)\n\t\t {\n\n\t\t\tif (cacheKeys.contains(blockNumber + \",\" + binaryOffset))\n\t\t\t{\n\t\t\t // cache hit situation\n\t\t\t count_hit++;\n\t\t\t clockCycle++;\n\n\t\t\t}\n\n\t\t\telse\n\t\t\t{\n\t\t\t // cache miss\n\t\t\t count_miss++;\n\t\t\t clockCycle += 15;\n\n\t\t\t // replacement for direct mapping.\n\n\t\t\t int newBlockNumber_Value = Integer.parseInt(blockNumber, 2);\n\t\t\t int newOffset_StartingPosition = (Integer.parseInt(binaryOffset, 2) * 2);\n\t\t\t int length = Integer.parseInt(dataSize[i]);\n\n\t\t\t y.append(mainMemory[newBlockNumber_Value][newOffset_StartingPosition]);\n\n\t\t\t int p = -1, beta = 0;\n\t\t\t for (int alpha = 1; alpha < length; alpha++)\n\t\t\t {\n\n\t\t\t\tif ((alpha + newOffset_StartingPosition) % 31 == 0)\n\t\t\t\t{\n\n\t\t\t\t newBlockNumber_Value++;\n\t\t\t\t newOffset_StartingPosition = 0;\n\t\t\t\t beta = length - alpha;\n\n\t\t\t\t if (p < beta)\n\t\t\t\t {\n\t\t\t\t\tp++;\n\t\t\t\t\ty.append(mainMemory[newBlockNumber_Value][p + newOffset_StartingPosition]);\n\t\t\t\t }\n\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t y.append(mainMemory[newBlockNumber_Value][alpha + newOffset_StartingPosition]);\n\t\t\t\t}\n\t\t\t }\n\n\t\t\t y = y.reverse();\n\n\t\t\t // if y is more than one byte then put it in next cache line\n\t\t\t if (y.length() > 4)\n\t\t\t {\n\n\t\t\t\tfor (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t{\n\t\t\t\t String yy = y.substring(o, o + 4);\n\n\t\t\t\t cacheKeys.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t cacheValues.add(yy);\n\n\t\t\t\t}\n\t\t\t } else\n\t\t\t {\n\n\t\t\t\tif (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t{\n\t\t\t\t cacheKeys.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t cacheValues.add(y.toString());\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t // System.out.println(\"cache is full...\");\n\n\t\t\t\t}\n\n\t\t\t }\n\n\t\t\t}\n\n\t\t\ty.delete(0, y.length());\n\n\t\t }\n\n\t\t else if (wayAssociative > 1)\n\t\t {\n\n\t\t\tif (wayAssociative == 2)\n\t\t\t{\n\n\t\t\t if (cacheKeys_0.contains(blockNumber + \",\" + binaryOffset)\n\t\t\t\t || (cacheKeys_1.contains(blockNumber + \",\" + binaryOffset)))\n\t\t\t {\n\t\t\t\t// cache hit situation\n\t\t\t\tcount_hit_2++;\n\t\t\t\tclockCycle_2++;\n\n\t\t\t }\n\n\t\t\t else\n\t\t\t {\n\t\t\t\t// cache miss\n\t\t\t\tcount_miss_2++;\n\t\t\t\tclockCycle_2 += 15;\n\n\t\t\t\t// replacement\n\t\t\t\tint newBlockNumber_Value = Integer.parseInt(blockNumber, 2);\n\t\t\t\tint newOffset_StartingPosition = (Integer.parseInt(binaryOffset, 2) * 2);\n\t\t\t\tint length = Integer.parseInt(dataSize[i]);\n\n\t\t\t\ty.append(mainMemory[newBlockNumber_Value][newOffset_StartingPosition]);\n\n\t\t\t\tint p = -1, beta = 0;\n\t\t\t\tfor (int alpha = 1; alpha < length; alpha++)\n\t\t\t\t{\n\n\t\t\t\t if ((alpha + newOffset_StartingPosition) % 31 == 0)\n\t\t\t\t {\n\n\t\t\t\t\tnewBlockNumber_Value++;\n\t\t\t\t\tnewOffset_StartingPosition = 0;\n\t\t\t\t\tbeta = length - alpha;\n\n\t\t\t\t\tif (p < beta)\n\t\t\t\t\t{\n\t\t\t\t\t p++;\n\t\t\t\t\t y.append(mainMemory[newBlockNumber_Value][p + newOffset_StartingPosition]);\n\t\t\t\t\t}\n\n\t\t\t\t } else\n\t\t\t\t {\n\t\t\t\t\ty.append(mainMemory[newBlockNumber_Value][alpha + newOffset_StartingPosition]);\n\t\t\t\t }\n\t\t\t\t}\n\n\t\t\t\ty = y.reverse();\n\n\t\t\t\tif (i % wayAssociative == 0)\n\t\t\t\t{\n\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tif (cacheKeys.size() <= numberOfCacheLines)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t cacheKeys_0.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\t cacheValues_0.add(yy);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t cacheKeys_0.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t cacheValues_0.add(y.toString());\n\t\t\t\t\t}\n\t\t\t\t } else\n\t\t\t\t {\n\t\t\t\t\t// System.out.println(\"cache is full...\");\n\n\t\t\t\t }\n\n\t\t\t\t}\n\n\t\t\t\telse if (i % wayAssociative == 1)\n\t\t\t\t{\n\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_1.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_1.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t\t{\n\n\t\t\t\t\t cacheKeys_1.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t cacheValues_1.add(y.toString());\n\n\t\t\t\t\t}\n\t\t\t\t }\n\n\t\t\t\t else\n\t\t\t\t {\n\t\t\t\t\t// System.out.println(\"cache is full...\");\n\n\t\t\t\t }\n\n\t\t\t\t}\n\n\t\t\t }\n\n\t\t\t y.delete(0, y.length());\n\n\t\t\t}\n\n\t\t\t// way =4\n\t\t\tif (wayAssociative == 4)\n\t\t\t{\n\n\t\t\t if (cacheKeys_0.contains(blockNumber + \",\" + binaryOffset)\n\t\t\t\t || cacheKeys_1.contains(blockNumber + \",\" + binaryOffset)\n\t\t\t\t || cacheKeys_2.contains(blockNumber + \",\" + binaryOffset)\n\t\t\t\t || cacheKeys_3.contains(blockNumber + \",\" + binaryOffset))\n\t\t\t {\n\t\t\t\t// cache hit situation\n\t\t\t\tcount_hit_4++;\n\t\t\t\tclockCycle_4++;\n\n\t\t\t }\n\n\t\t\t else\n\t\t\t {\n\t\t\t\t// cache miss\n\t\t\t\tcount_miss_4++;\n\t\t\t\tclockCycle_4 += 15;\n\n\t\t\t\t// replacement\n\t\t\t\tint newBlockNumber_Value = Integer.parseInt(blockNumber, 2);\n\t\t\t\tint newOffset_StartingPosition = (Integer.parseInt(binaryOffset, 2) * 2);\n\t\t\t\tint length = Integer.parseInt(dataSize[i]);\n\n\t\t\t\ty.append(mainMemory[newBlockNumber_Value][newOffset_StartingPosition]);\n\n\t\t\t\tint p = -1, beta = 0;\n\t\t\t\tfor (int alpha = 1; alpha < length; alpha++)\n\t\t\t\t{\n\n\t\t\t\t if ((alpha + newOffset_StartingPosition) % 31 == 0)\n\t\t\t\t {\n\n\t\t\t\t\tnewBlockNumber_Value++;\n\t\t\t\t\tnewOffset_StartingPosition = 0;\n\t\t\t\t\tbeta = length - alpha;\n\n\t\t\t\t\tif (p < beta)\n\t\t\t\t\t{\n\t\t\t\t\t p++;\n\t\t\t\t\t y.append(mainMemory[newBlockNumber_Value][p + newOffset_StartingPosition]);\n\t\t\t\t\t}\n\n\t\t\t\t } else\n\t\t\t\t {\n\t\t\t\t\ty.append(mainMemory[newBlockNumber_Value][alpha + newOffset_StartingPosition]);\n\t\t\t\t }\n\t\t\t\t}\n\n\t\t\t\ty = y.reverse();\n\n\t\t\t\tif (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t{\n\n\t\t\t\t if (i % wayAssociative == 0)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_0.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_0.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t cacheKeys_0.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t cacheValues_0.add(y.toString());\n\n\t\t\t\t\t}\n\t\t\t\t }\n\n\t\t\t\t // mod 1\n\t\t\t\t else if (i % wayAssociative == 1)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_1.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_1.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t cacheKeys_1.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t cacheValues_1.add(y.toString());\n\t\t\t\t\t}\n\t\t\t\t }\n\n\t\t\t\t // mod 2\n\t\t\t\t else if (i % wayAssociative == 2)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_2.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_2.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t\t {\n\t\t\t\t\t\tcacheKeys_2.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_2.add(y.toString());\n\t\t\t\t\t } else\n\t\t\t\t\t {\n\t\t\t\t\t\t// System.out.println(\"cache is full...\");\n\n\t\t\t\t\t }\n\n\t\t\t\t\t}\n\n\t\t\t\t }\n\n\t\t\t\t // mmod 3\n\t\t\t\t else if (i % wayAssociative == 3)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_3.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_3.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t\t {\n\t\t\t\t\t\tcacheKeys_3.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_3.add(y.toString());\n\t\t\t\t\t }\n\n\t\t\t\t\t}\n\n\t\t\t\t }\n\n\t\t\t\t}\n\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t // System.out.println(\"cache is full...\");\n\n\t\t\t\t}\n\n\t\t\t }\n\n\t\t\t y.delete(0, y.length());\n\n\t\t\t}\n\n\t\t\telse if (wayAssociative == 8)\n\t\t\t{\n\n\t\t\t if (cacheKeys_0.contains(blockNumber + \",\" + binaryOffset)\n\t\t\t\t || (cacheKeys_1.contains(blockNumber + \",\" + binaryOffset))\n\t\t\t\t || (cacheKeys_3.contains(blockNumber + \",\" + binaryOffset))\n\t\t\t\t || (cacheKeys_3.contains(blockNumber + \",\" + binaryOffset))\n\t\t\t\t || cacheKeys_4.contains(blockNumber + \",\" + binaryOffset)\n\t\t\t\t || (cacheKeys_5.contains(blockNumber + \",\" + binaryOffset))\n\t\t\t\t || (cacheKeys_7.contains(blockNumber + \",\" + binaryOffset))\n\t\t\t\t || (cacheKeys_6.contains(blockNumber + \",\" + binaryOffset)))\n\t\t\t {\n\t\t\t\t// cache hit situation\n\t\t\t\tcount_hit_8++;\n\t\t\t\tclockCycle_8++;\n\n\t\t\t }\n\n\t\t\t else\n\t\t\t {\n\t\t\t\t// cache miss\n\t\t\t\tcount_miss_8++;\n\t\t\t\tclockCycle_8 += 15;\n\n\t\t\t\t// replacement\n\n\t\t\t\tint newBlockNumber_Value = Integer.parseInt(blockNumber, 2);\n\t\t\t\tint newOffset_StartingPosition = (Integer.parseInt(binaryOffset, 2) * 2);\n\t\t\t\tint length = Integer.parseInt(dataSize[i]);\n\n\t\t\t\ty.append(mainMemory[newBlockNumber_Value][newOffset_StartingPosition]);\n\n\t\t\t\tint p = -1, beta = 0;\n\t\t\t\tfor (int alpha = 1; alpha < length; alpha++)\n\t\t\t\t{\n\n\t\t\t\t if ((alpha + newOffset_StartingPosition) % 31 == 0)\n\t\t\t\t {\n\n\t\t\t\t\tnewBlockNumber_Value++;\n\t\t\t\t\tnewOffset_StartingPosition = 0;\n\t\t\t\t\tbeta = length - alpha;\n\n\t\t\t\t\tif (p < beta)\n\t\t\t\t\t{\n\t\t\t\t\t p++;\n\t\t\t\t\t y.append(mainMemory[newBlockNumber_Value][p + newOffset_StartingPosition]);\n\t\t\t\t\t}\n\n\t\t\t\t } else\n\t\t\t\t {\n\t\t\t\t\ty.append(mainMemory[newBlockNumber_Value][alpha + newOffset_StartingPosition]);\n\t\t\t\t }\n\t\t\t\t}\n\n\t\t\t\ty = y.reverse();\n\n\t\t\t\tif (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t{\n\n\t\t\t\t if (i % wayAssociative == 0)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_0.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_0.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t cacheKeys_0.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t cacheValues_0.add(y.toString());\n\n\t\t\t\t\t}\n\t\t\t\t }\n\n\t\t\t\t // mod 1\n\t\t\t\t else if (i % wayAssociative == 1)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_1.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_1.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t cacheKeys_1.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t cacheValues_1.add(y.toString());\n\t\t\t\t\t}\n\t\t\t\t }\n\n\t\t\t\t // mod 2\n\t\t\t\t else if (i % wayAssociative == 2)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_2.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_2.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t\t {\n\t\t\t\t\t\tcacheKeys_2.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_2.add(y.toString());\n\t\t\t\t\t } else\n\t\t\t\t\t {\n\t\t\t\t\t\t// System.out.println(\"cache is full...\");\n\n\t\t\t\t\t }\n\n\t\t\t\t\t}\n\n\t\t\t\t }\n\n\t\t\t\t // mmod 3\n\t\t\t\t else if (i % wayAssociative == 3)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_3.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_3.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t\t {\n\t\t\t\t\t\tcacheKeys_3.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_3.add(y.toString());\n\t\t\t\t\t }\n\n\t\t\t\t\t}\n\n\t\t\t\t }\n\n\t\t\t\t // 4\n\t\t\t\t else if (i % wayAssociative == 4)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_4.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_4.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t\t {\n\t\t\t\t\t\tcacheKeys_4.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_4.add(y.toString());\n\t\t\t\t\t }\n\n\t\t\t\t\t}\n\n\t\t\t\t }\n\n\t\t\t\t // 5\n\t\t\t\t else if (i % wayAssociative == 5)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_5.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_5.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t\t {\n\t\t\t\t\t\tcacheKeys_5.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_5.add(y.toString());\n\t\t\t\t\t }\n\n\t\t\t\t\t}\n\n\t\t\t\t }\n\n\t\t\t\t // 6\n\t\t\t\t else if (i % wayAssociative == 6)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_6.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_6.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t\t {\n\t\t\t\t\t\tcacheKeys_6.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_6.add(y.toString());\n\t\t\t\t\t }\n\n\t\t\t\t\t}\n\n\t\t\t\t }\n\n\t\t\t\t // 7\n\n\t\t\t\t else if (i % wayAssociative == 7)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_7.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_7.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t\t {\n\t\t\t\t\t\tcacheKeys_7.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_7.add(y.toString());\n\t\t\t\t\t }\n\n\t\t\t\t\t}\n\n\t\t\t\t }\n\n\t\t\t\t //\n\t\t\t\t}\n\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t // System.out.println(\"cache is full...\");\n\n\t\t\t\t}\n\n\t\t\t }\n\n\t\t\t y.delete(0, y.length());\n\n\t\t\t}\n\n\t\t }\n\n\t\t // 3\n\n\t\t} catch (Exception e)\n\t\t{\n\t\t e.printStackTrace();\n\t\t}\n\n\t }\n\n\t // to print outputs\n\n\t if (wayAssociative == 1)\n\t {\n\t\tlong cache_access = count_hit + count_miss;\n\n\t\tSystem.out.println(\"Total number of cache accesses is \" + cache_access);\n\t\tSystem.out.println(\"Total number of clock cycles is \" + clockCycle);\n\t\tSystem.out.println(\"Total number of hits \" + count_hit);\n\n\t\tdouble hit_ratio = ((double) count_hit) / (count_hit + count_miss) * 100;\n\n\t\tSystem.out.println(\"cache hit ratio is \" + hit_ratio + \"%\");\n\n\t\tdouble ipc = ((double) instructionAddress.length) / clockCycle;\n\t\tSystem.out.println(\"IPC is \" + ipc);\n\t }\n\n\t else if (wayAssociative == 2)\n\t {\n\t\tlong cache_access = count_hit_2 + count_miss_2;\n\n\t\tSystem.out.println(\"Total number of cache accesses is \" + cache_access);\n\t\tSystem.out.println(\"Total number of clock cycles is \" + clockCycle_2);\n\t\tSystem.out.println(\"Total number of hits \" + count_hit_2);\n\n\t\tdouble hit_ratio = ((double) count_hit_2) / (count_hit_2 + count_miss_2) * 100;\n\n\t\tSystem.out.println(\"cache hit ratio is \" + hit_ratio + \"%\");\n\n\t\tdouble ipc = ((double) instructionAddress.length) / clockCycle_2;\n\t\tSystem.out.println(\"IPC is \" + ipc);\n\t }\n\n\t else if (wayAssociative == 4)\n\t {\n\t\tlong cache_access = count_hit_4 + count_miss_4;\n\n\t\tSystem.out.println(\"Total number of cache accesses is \" + cache_access);\n\t\tSystem.out.println(\"Total number of clock cycles is \" + clockCycle_4);\n\t\tSystem.out.println(\"Total number of hits \" + count_hit_4);\n\n\t\tdouble hit_ratio = ((double) count_hit_4) / (count_hit_4 + count_miss_4) * 100;\n\n\t\tSystem.out.println(\"cache hit ratio is \" + hit_ratio + \"%\");\n\n\t\tdouble ipc = ((double) instructionAddress.length) / clockCycle_4;\n\t\tSystem.out.println(\"IPC is \" + ipc);\n\n\t } else if (wayAssociative == 8)\n\t {\n\t\tlong cache_access = count_hit_8 + count_miss_8;\n\n\t\tSystem.out.println(\"Total number of cache accesses is \" + cache_access);\n\t\tSystem.out.println(\"Total number of clock cycles is \" + clockCycle_8);\n\t\tSystem.out.println(\"Total number of hits \" + count_hit_8);\n\n\t\tdouble hit_ratio = ((double) count_hit_8) / (count_hit_8 + count_miss_8) * 100;\n\n\t\tSystem.out.println(\"cache hit ratio is \" + hit_ratio + \"%\");\n\n\t\tdouble ipc = ((double) instructionAddress.length) / clockCycle_8;\n\t\tSystem.out.println(\"IPC is \" + ipc);\n\t }\n\n\t} catch (Exception e)\n\t{\n\t e.printStackTrace();\n\t}\n\n }",
"public int getCountRequests() {\n/* 415 */ return this.countRequests;\n/* */ }",
"public int size() {\r\n\t\treturn cache.size();\r\n\t}",
"public Long get_cachehitsrate() throws Exception {\n\t\treturn this.cachehitsrate;\n\t}",
"public Long get_cachetotparameterizednon304hits() throws Exception {\n\t\treturn this.cachetotparameterizednon304hits;\n\t}",
"@Override\n public abstract long getRequestCount();",
"public Long get_cachetotinvalidationrequests() throws Exception {\n\t\treturn this.cachetotinvalidationrequests;\n\t}",
"public Long get_cachepercent304hits() throws Exception {\n\t\treturn this.cachepercent304hits;\n\t}",
"public int getCacheSize() {\n return cache.size();\n }",
"public final long incrementNearCacheHitCount() {\n\t\tm_nearLastAccess = System.currentTimeMillis();\n\t\treturn ++m_nearCacheHits;\n\t}",
"@Override\n public String toString() {\n if (filterConfig == null) {\n return (\"SiteHitCounter()\");\n }\n StringBuffer sb = new StringBuffer(\"SiteHitCounter(\");\n sb.append(filterConfig);\n sb.append(\")\");\n return (sb.toString());\n }",
"int getCacheConcurrency();",
"public int getCacheSize() {\n\t\treturn _cacheSize;\n\t}",
"public static int getPageHits() {\r\n return _count;\r\n }",
"public Long get_cachetotflashcachemisses() throws Exception {\n\t\treturn this.cachetotflashcachemisses;\n\t}",
"private void getNodesCount(HttpServletRequest request, HttpServletResponse response) throws IOException {\n int countNodes = SimApi.getNodesCount();\n response.getWriter().write(Integer.toString(countNodes));\n }",
"public static void printResults() {\n System.out.println(\" Results: \");\n Crawler.getKeyWordsHits().forEach((keyWord, hitsNumber) -> System.out.println(keyWord + \" : \" + hitsNumber + \";\"));\n System.out.println(\" Total hits: \" + Crawler.getTotalHits());\n\n }",
"public int getAccessCount() {\n return discAccesses;\n }",
"public static int getControllerCacheCount() {\r\n if (!_cacheControllers)\r\n return 0;\r\n return _controllerCache.size();\r\n }",
"public Long get_cachetothits() throws Exception {\n\t\treturn this.cachetothits;\n\t}",
"public void dataCachePrint()\n\t{\n\t\tSystem.out.println(\"DiffApp \" + nid + \": Printing the data cache: \" + dataCache.size() + \" entries.\");\n\t\tfor(DataCacheEntry entry: dataCache.values()){\n\t\t\tentry.printDataEntry() ;\n\t\t}\n\t}",
"public void interestCachePrint(){\n\t\tlog(Level.INFO,\"Printing the interest cache.\");\n\t\tfor(InterestCacheEntry entry: interestCache.values()){ \n\t\t\tentry.printInterestEntry() ;\n\t\t}\n\t}",
"public int getRequestsCount() {\n if (requestsBuilder_ == null) {\n return requests_.size();\n } else {\n return requestsBuilder_.getCount();\n }\n }",
"int getSize() {\n synchronized (lock) {\n return cache.size();\n }\n }",
"public Long get_cachetotfulltoconditionalrequest() throws Exception {\n\t\treturn this.cachetotfulltoconditionalrequest;\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException\n\t{\n\t\tfor (int i = 0; i < NUM_LOOPS; i++)\n\t\t{\n\t\t\tTuple tuple = Tuple.defaultTuple();\n\t\t\tCounterWorkCallable task = new CounterWorkCallable(\"counter\" + i, shardedCounterService, tuple);\n\t\t\ttry\n\t\t\t{\n\t\t\t\ttask.call();\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\tint actualIncrements = 0;\n\t\tlogger.info(\"Expected \" + (NUM_INCREMENTS_PER_LOOPS * NUM_LOOPS) + \" Increments. Actual Increments: \"\n\t\t\t+ actualIncrements);\n\n\t}",
"public long lookups() {\r\n\t\treturn _lookups;\r\n\t\t\r\n//\t\tlong size = 0;\r\n//\t\tfor (Integer status : _status.keySet()) {\r\n//\t\t\tif (status != CrawlerConstants.SKIP_SUFFIX && status != CrawlerConstants.SKIP_ROBOTS) {\r\n//\t\t\t\tsize += _status.get(status);\r\n//\t\t\t}\r\n//\t\t}\r\n//\r\n//\t\treturn size;\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic void printCacheContents() {\n\t\tsynchronized (mInetAddressList) {\n\t\t\tIterator<?> cacheIterator = mInetAddressList.entrySet().iterator();\n\t\t\twhile (cacheIterator.hasNext()) {\n\t\t\t\tMap.Entry<String, CacheElement> cacheEntry = (Map.Entry<String, CacheElement>) cacheIterator.next();\n\t\t\t\tSystem.out.println(\"Key: \" + cacheEntry.getKey());\n\t\t\t\tSystem.out.println(\"Value: \" + cacheEntry.getValue());\n\t\t\t}\n\t\t}\n\t}",
"int getReqCount();",
"@Override\n\tpublic int size() {\n\t\treadLock.lock();\n\t\ttry {\n\t\t\treturn cache.size();\n\t\t} finally {\n\t\t\treadLock.unlock();\n\t\t}\n\t}",
"public int size() {\n synchronized (cacheMap) {\n return cacheMap.size();\n }\n }",
"@Override\n public void filter(ContainerRequestContext requestContext) throws IOException {\n String requestPath = requestContext.getUriInfo().getPath();\n\n Result cachedResult = cache.get(requestPath);\n if (cachedResult != null) {\n log.info(\"{} - responding with cached result: {}\", requestPath, cachedResult);\n\n requestContext.setProperty(CACHE_USED, Boolean.TRUE);\n\n requestContext.abortWith(\n Response.ok(cachedResult).type(MediaType.APPLICATION_JSON).build());\n } else {\n log.info(\"{} - no result in cache\", requestPath);\n }\n }",
"public Long get_cachetotstoreablemisses() throws Exception {\n\t\treturn this.cachetotstoreablemisses;\n\t}",
"public void incrementActiveRequests() \n {\n ++requests;\n }",
"int getResponseCount();",
"String getLoginapihitcount();",
"public static cache_stats get(nitro_service service) throws Exception{\n\t\tcache_stats obj = new cache_stats();\n\t\tcache_stats[] response = (cache_stats[])obj.stat_resources(service);\n\t\treturn response[0];\n\t}",
"void dumpStats() {\n long wallTimeNanos = totalStopwatch.elapsed(TimeUnit.NANOSECONDS);\n long dbtime = 0;\n for (String name : methodCalls.keySet()) {\n long calls = methodCalls.get(name);\n long time = methodTotalTime.get(name);\n dbtime += time;\n long average = time / calls;\n double proportion = (time + 0.0) / (wallTimeNanos + 0.0);\n log.info(name + \" c:\" + calls + \" r:\" + time + \" a:\" + average + \" p:\" + String.format(\"%.2f\", proportion));\n }\n double dbproportion = (dbtime + 0.0) / (wallTimeNanos + 0.0);\n double hitrate = (hit + 0.0) / (hit + miss + 0.0);\n log.info(\"Cache size:\" + utxoCache.size() + \" hit:\" + hit + \" miss:\" + miss + \" rate:\"\n + String.format(\"%.2f\", hitrate));\n bloom.printStat();\n log.info(\"hasTxOut call:\" + hasCall + \" True:\" + hasTrue + \" False:\" + hasFalse);\n log.info(\"Wall:\" + totalStopwatch + \" percent:\" + String.format(\"%.2f\", dbproportion));\n String stats = db.getProperty(\"leveldb.stats\");\n System.out.println(stats);\n\n }",
"private void displayAll()\n {\n for (int i = 0; i < cache.size(); ++i)\n {\n Record r = cache.get(i); \n System.out.println(r.key() + \" \" + r.value());\n }\n }",
"int getCurrentCacheSize();",
"public Long get_cachepercentparameterized304hits() throws Exception {\n\t\treturn this.cachepercentparameterized304hits;\n\t}",
"public void findCacheHitMissRates(String fileName) throws IOException {\n\t\tthis.fileName = fileName;\n\t\tBufferedReader reader = new BufferedReader(new FileReader(fileName));\n\t\tString line;\n\t\toffsetBits = (int) (Math.log(blockSize)/Math.log(2));\n\t\tindexBits = (int) (Math.log(numSets)/Math.log(2));\n\t\ttagBits = ADDRESS_BITS - offsetBits - indexBits;\n\t\twhile((line = reader.readLine()) != null) {\n\t\t\tnumAccesses++;\n\t\t\tString[] tokens = line.split(\" \");\n\t\t\tString address = tokens[2];\n\t\t\t\t\t\n\t\t\t//address given is 44 bits so take 32 bits by truncating 12 MSB and add offset to the address. \n\t\t\t\n\t\t\tBigInteger addr = new BigInteger(address, 16);// BigInteger read address in hex format and converts it to an integer into BigInteger object.\n\t\t\taddress= addr.toString(2); // converted to binary\n\t\t\t\n\t\t\taddress = (address.length() == ADDRESS_BITS ? address : getValidAddress(address)); //truncated --32 \n\t\t\t\n\t\t\taddr=new BigInteger(address, 2); \n\t\t\t\n\t\t\t\n\t\t\tBigInteger offset = new BigInteger(Integer.toString(Integer.parseInt(tokens[1])));\n\t\t\taddr = addr.add(offset);\n\t\t\t\n\t\t\taddress = addr.toString(2);// BigIntger's toString(2) is used to return the binary string \n\t\t\t// representation of it.\n\t\t\t\n\t\t\taddress = (address.length() == ADDRESS_BITS ? address : getValidAddress(address));\n\t\t\t\n\t\t\t// Calculate offset, index and tag bits.\n\t\t\n\t\t\n\t\t\tString tag = address.substring(0, tagBits);\n\t\t\tString index = address.substring(tagBits, indexBits + tagBits);\n\t\t\tint setNum;\n\t\t\tif(index.isEmpty()) setNum = 0; \n\t\t\telse { \n\t\t\t\tsetNum = Integer.parseInt(index, 2);\n\t\t\t\t//System.out.println(\"setnum in else\"+(setNum%numSets));\n\t\t\t}\n\t\t\tcheckTagInSet(tag, setNum, (vCache != null));\n\t\t}\n\t\thitRate = (double) numHits / numAccesses;\n\t\t//missRate = (double) numMiss / numAccesses;\n\t\tmissRate = 1 - hitRate;\n\t\treader.close();\n\t}",
"public final long getNearCacheHitCount() {\n\t\treturn m_nearCacheHits;\n\t}",
"public Long get_cachetotnonstoreablemisses() throws Exception {\n\t\treturn this.cachetotnonstoreablemisses;\n\t}",
"public int getCacheSize(){ return Integer.parseInt(cacheSize.getText()); }",
"public int getCacheSize();",
"public void increaseNumHits() {\n\t\tthis.numHits += 1;\n\t}",
"public long getTotalHits()\r\n\t{\r\n\t\treturn this.totalHits;\r\n\t}",
"@Override\n public int getCacheSize() {\n return 4 + 20 * (4 + 4 + 8);\n }",
"public Long get_cacherecentpercenthit() throws Exception {\n\t\treturn this.cacherecentpercenthit;\n\t}",
"public String getHits() {\n\t\treturn hits;\n\t}",
"public static long getCacheSize() {\n return sDiskLruCache.size();\n }",
"protected int hit() {\r\n\t\treturn hits;\r\n\t}",
"public void incrementNumCompareRequests() {\n this.numCompareRequests.incrementAndGet();\n }",
"public Long get_cachecurmisses() throws Exception {\n\t\treturn this.cachecurmisses;\n\t}",
"@Override\n public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext) throws IOException {\n if (requestContext.getProperty(CACHE_USED) == null && responseContext.getEntity() instanceof Result) {\n Result result = (Result) responseContext.getEntity();\n String requestPath = requestContext.getUriInfo().getPath();\n\n log.info(\"{} - caching result: {}\", requestPath, result);\n\n cache.putIfAbsent(requestPath, result);\n }\n }",
"@Override\n\tpublic long getCacheSize() {\n\t\treturn 0;\n\t}",
"public void incrementNumSearchRequests() {\n this.numSearchRequests.incrementAndGet();\n }",
"public HashMap<String,Double> getCurrentRemoteAccessCountNew(CacheObjectReplicationCandidate cor)\n\t{\n\t\tdouble totalRemoteAccess=0;\t\n\t\t//analyser.log.info(\"sm.globalRequestMap=\"+sm.globalRequestMap.size());\n\t\tHashMap<String,Double> toReturn= new HashMap<String, Double>();\n\t\t\n\t\tfor (String req:cor.distributedRequests.keySet())\n\t\t{\n\t\t\tif (!sm.globalRequestMap.containsKey(req))\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\tString serv=cor.distributedRequests.get(req);\n\t\t\tif (toReturn.containsKey(serv))\n\t\t\t{\n\t\t\tDouble curReplicaAccess= toReturn.get(serv);\n\t\t\tcurReplicaAccess+=sm.globalRequestMap.get(req).counter;\n\t\t\ttoReturn.put(serv, curReplicaAccess);\n\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\ttoReturn.put(serv, (double) sm.globalRequestMap.get(req).counter);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\ttotalRemoteAccess+=sm.globalRequestMap.get(req).counter;\n\t\t}\n\t\t\n\t\treturn toReturn;\n\t}",
"private void printNumVisited()\r\n\t{\r\n\t\tSystem.out.println(\"\");\r\n\t\tfor (int i = 0; i < siteVisited; i++)\r\n\t\t\tSystem.out.println(webVisited[0][i] + \" visited \" + webVisited[1][i] + \" time(s)\");\r\n\t}",
"public static cache_stats get(nitro_service service, options option) throws Exception{\n\t\tcache_stats obj = new cache_stats();\n\t\tcache_stats[] response = (cache_stats[])obj.stat_resources(service,option);\n\t\treturn response[0];\n\t}"
]
| [
"0.7077922",
"0.70141554",
"0.6890434",
"0.6886961",
"0.68494445",
"0.6743316",
"0.6612681",
"0.6612681",
"0.64935076",
"0.64545107",
"0.6434418",
"0.6341745",
"0.62825596",
"0.62542623",
"0.62269527",
"0.6220494",
"0.6196726",
"0.61812",
"0.617868",
"0.61730534",
"0.61344236",
"0.6093702",
"0.6084503",
"0.60796106",
"0.60362685",
"0.60239524",
"0.60182893",
"0.6009045",
"0.5991165",
"0.598565",
"0.5976393",
"0.59735584",
"0.59730375",
"0.59659934",
"0.59575516",
"0.5939152",
"0.59301245",
"0.592958",
"0.58763665",
"0.58573234",
"0.5835335",
"0.58092886",
"0.5803125",
"0.5802996",
"0.5776272",
"0.57736",
"0.5764026",
"0.57626027",
"0.57599384",
"0.5735316",
"0.5720069",
"0.5708321",
"0.5703342",
"0.56976724",
"0.568485",
"0.56785077",
"0.56717134",
"0.5665206",
"0.5664084",
"0.5654614",
"0.5634372",
"0.5631341",
"0.5630931",
"0.56263185",
"0.56222767",
"0.562045",
"0.5619353",
"0.5617397",
"0.56134176",
"0.56041944",
"0.55779725",
"0.5571021",
"0.5552701",
"0.5552406",
"0.5550361",
"0.55497646",
"0.5548788",
"0.55335176",
"0.55313605",
"0.5516066",
"0.55145806",
"0.5511581",
"0.55010957",
"0.5494117",
"0.54922986",
"0.54767954",
"0.54514676",
"0.5450407",
"0.5449726",
"0.54436344",
"0.5442224",
"0.5437435",
"0.5434391",
"0.5426913",
"0.5423937",
"0.54199386",
"0.5418375",
"0.5411537",
"0.53986204",
"0.5385207"
]
| 0.6761465 | 5 |
DO NOT MODIFY THIS METHOD Returns the word that begins at the specified memory address. This is the public version of readWord. It calls the private version of readWord with the recordStats parameter set to true so that the cache statistics information will be recorded. | public boolean[] readWord(boolean[] address) {
return readWord(address, true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean[] readWord(boolean[] address, boolean recordStats) {\n if (address.length > 32) {\n throw new IllegalArgumentException(\"address parameter must be 32 bits\");\n }\n // Programming Assignment 5: Complete this method\n // The comments provide a guide for this method.\n\n\n /*\n * Where does the address map in the cache? --> Determine the cache set that corresponds with\n * the requested memory address\n */\n\n // Get set bits from the address that was passed in\n boolean[] setBits = new boolean[numSetBits];\n for (int i = numByteBits; i < numByteBits + numSetBits; i++) {\n setBits[i - numByteBits] = address[i];\n System.out.println(\"setBits[\" + Integer.toString(i - numByteBits) + \"] is \"\n + String.valueOf(setBits[i - numByteBits]));\n }\n\n long cacheSet = Binary.binToUDec(setBits);\n System.out.println(\"Cache set is \" + Long.toString(cacheSet));\n\n boolean[] tagBits = new boolean[numTagBits];\n // Get tag from the address that was passed in\n for (int i = numByteBits + numSetBits; i < numByteBits + numSetBits + numTagBits; i++) {\n tagBits[i - numByteBits - numSetBits] = address[i];\n System.out.println(\"tagbits[\" + Integer.toString(i - numByteBits - numSetBits) + \"] is \"\n + String.valueOf(tagBits[i - numByteBits - numSetBits]));\n }\n\n /*\n * Determine whether or not the line that corresponds with the requested memory address is\n * currently in the cache\n */\n int lineCount=0;\n boolean inCache = false;\n // Iterate through the correct Cache Set\n for (int i = 0; i < cache[toIntExact(cacheSet)].size(); i++) {\n System.out.println(\"\\n Line \" + Integer.toString(i) + \":\");\n lineCount++;\n // Get the tag the line\n boolean[] lineTag = cache[toIntExact(cacheSet)].getLine(i).getTag();\n // If the tag from the line equals the tag from the parameter, then the line that corresponds\n // to the memory address is currently in the cache\n if (Arrays.equals(lineTag, tagBits)) {\n System.out.println(\"Line sorresponding to the memory address is currently in the cache\");\n inCache = true;\n // System.exit(0);\n }\n }\n //if it is in the cache the hit count increases\n \n // If the line corresponding to the memory address is not in the cache, call readLineFromMemory \n if (inCache==false) {\n readLineFromMemory(address, toIntExact(cacheSet), tagBits);\n }\n //System.out.println(Binary.toString(toIntExact(cacheSet)));\n\n System.exit(0);\n\n // TODO:\n // Update CacheMemory data members (requestCount, hitCount, hitCost)\n // and CacheLine data members (using the various set methods)\n // as needed for tracking cache hit rate and implementing the\n // least recently used replacement algorithm in the cache set.\n if(inCache==false) {\n \thitCount++;\n \thitCost=lineCount-1;\n }\n requestCount++;\n \n \n // replace this placeholder return with the data copied from the cache line\n return new boolean[32];\n }",
"public final Word getWord(int offset) {\n return words[offset == 0 ? offset : offset - 1];\n }",
"int getWord( int pos){\n\t\treturn data[pos] + (data[pos+1] << 8);\n\t}",
"public void loadWord(int address, BitString word) {\n\t\tif (address < 0 || address >= MAX_MEMORY) {\n\t\t\tthrow new IllegalArgumentException(\"Invalid address\");\n\t\t}\n\t\tmMemory[address] = word;\n\t}",
"public String findWord(int offset) {\r\n \t\tIRegion wordRegion = findWordRegion(offset);\r\n \t\tString word = null;\r\n \t\ttry {\r\n \t\t\tword = this.get(wordRegion.getOffset(), wordRegion.getLength());\r\n \t\t} catch (BadLocationException e) {\r\n \t\t\te.printStackTrace();\r\n \t\t}\r\n \t\treturn word;\r\n \t}",
"java.lang.String getWord();",
"com.google.protobuf.ByteString\n getWordBytes();",
"private String read(int address)\n {\n return MMU.read(VMA.get( address/RAM.getPageSize()) * RAM.getPageSize() + (address % RAM.getPageSize()));\n }",
"public int getWordOffset() {\n\t\treturn wordOffset;\n\t}",
"protected java.lang.String readWord() throws java.io.IOException {\n char c = readCharWord();\n java.lang.StringBuilder result = new java.lang.StringBuilder();\n do {\n result.append(c);\n c = next();\n } while (!java.lang.Character.isWhitespace(c));\n return result.toString();\n }",
"private String wordToFind() {\n\t\t\n\t\t//It actually just gets the incomplete version of the word, with underscores.\n\t\t//By the point this method is called, the server will have created a thread for\n\t\t//this client and generated a random word for this client to aim for. \n\t\t//The underscore variant will be just as long as the real word, so it can be used\n\t\t//for array lengths and, since it'll be all underscores, even if a hacker went to\n\t\t//print out the value of temp, they wouldn't get anywhere.\n\t\tout.println(\"GetWord\");\n\t\tString temp = null;\n\t\twhile(true) {\n\t\t\ttry {\n\t\t\t\ttemp = in.readLine();\n\t\t\t\tif(temp!=null) {\n\t\t\t\t\tcurrentWordLabel = new Label(temp);\n\t\t\t\t\treturn temp;\n\t\t\t\t}\n\t\t\t}catch(IOException ioe) {\n\t\t\t}\n\t\t}\n\t}",
"public String readWord() throws IOException\n {\n byte[] buf = new byte[64]; // line length\n int cnt = 0, c;\n while ((c = read()) != -1)\n {\n if (Character.isWhitespace(c)) //care ADD ANY WHITESPACE CHAR??\n break;\n buf[cnt++] = (byte) c;\n }\n return new String(buf, 0, cnt);\n }",
"public String getLexEntry(String word)\n {\n boolean found = false;\n String buff = \"\";\n String rtn = \"\";\n\n lastCount = 0.0;\n if(word.length() > 0)\n {\n buff = compactNumbers(word);\n rtn = searchLexDb(buff, true);\n if(rtn.length() > 0)\n found = true;\n\n else // try the lowercase version\n {\n buff = buff.toLowerCase();\n rtn = searchLexDb(buff, true);\n if(rtn.length() > 0)\n found = true;\n } // else\n } // fi\n\n // If not found, get the search string corresponding to the word.\n\n if(!found)\n {\n buff = searchString(word);\n\n while(!found && (buff.length() > 0))\n {\n rtn = searchLexDb(buff, false);\n if(rtn.length() > 0)\n found = true;\n else\n buff = buff.substring(1);\n } // while\n } // fi\n\n if(!found)\n System.out.println(\"word: #\" + word + \"# lex entry not found\");\n\n return(rtn.toString());\n }",
"public void getWord() {\n\t\t\n\t}",
"public static String readDiskMemory(String address){\n\t\treturn memory.get(address);\n\t}",
"protected byte direct_read(int address) {\n return segment_data[address];\n }",
"WordBean getWord(String word);",
"public List<Word> getWordsStartingAt(int start);",
"private WordRecord lookUp(String word)\n {\n int contains = 0;\n boolean check = false;\n //loops through concordance\n for(int i = 0; i < this.concordance.size();i++)\n {\n //checks to see if the words are equal\n if(word.equalsIgnoreCase(this.concordance.get(i).getWord()))\n {\n //gets location of what position the word is true\n contains = i;\n check = true;\n }\n \n }\n //checks to see if it was found in concordance\n if(check)\n return this.concordance.get(contains);\n \n return null;\n }",
"public WordPtBR getWord(String w) throws WordNotFoundExceptionPtBR {\n\t\tInteger offset = index.get(w);\n\t\tif (offset == null) {\n\t\t\t// the word does not exist in the thesaurus\n\t\t\t// throw new WordNotFoundException(w);\n\t\t\tMeaningPtBR meaningPtBR = new MeaningPtBR();\n\t\t\treturn null;\n\t\t}\n\n\t\t// find the word in the data\n\t\ttry {\n\t\t\tdata.seek(offset);\n\t\t\tString line = data.readLine();\n\t\t\tString[] segments = line.split(\"\\\\|\");\n\t\t\tint meaningCount = Integer.parseInt(segments[1]);\n\t\t\tWordPtBR word = new WordPtBR(segments[0], meaningCount);\n\n\t\t\t// read in all the meanings\n\t\t\tfor (int i = 0; i < meaningCount; i++) {\n\n\t\t\t\tword.addMeaning(data.readLine());\n\n\t\t\t}\n\t\t\tdata.close();\n\t\t\treturn word;\n\t\t} catch (IOException e) {\n\t\t\te.getMessage();\n\t\t}\n\n\t\t// something fucked up... this should never happen\n\t\treturn null;\n\t}",
"@Override\n\tpublic int read() {\n\t\tint lowByte = getFirstArg();\n\t\tint highByte = getSecondArg();\n\t\tint address = highByte;\n\t\taddress = address << 8;\n\t\taddress |= lowByte;\n\t\treturn CpuMem.getInstance().readMem(address);\n\t}",
"public java.lang.String getWord() {\n java.lang.Object ref = word_;\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 word_ = s;\n }\n return s;\n }\n }",
"public com.google.protobuf.ByteString\n getWordBytes() {\n java.lang.Object ref = word_;\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 word_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public Word getStatic(int idx) {\n\t\tint ival=heap.arrayLoad(cref,idx);\r\n\t\treturn new Word(ival);\r\n\t}",
"public com.google.protobuf.ByteString\n getWordBytes() {\n java.lang.Object ref = word_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n word_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public java.lang.String getWord() {\n java.lang.Object ref = word_;\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 word_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public Word getWord(int id);",
"public String getWord()\r\n\t\t{\r\n\t\t\treturn word;\r\n\t\t}",
"@Override\r\n\tpublic Number getWight(int docID, int wordID, CategorizingDataManager CDM) {\n\t\tMap<Integer, Map<Integer, Integer>> cp=CDM.getMap();\r\n\t\treturn cp.get(wordID).containsKey(docID)?cp.get(wordID).get(docID):0;\r\n\t}",
"public String getWord()\n\t{\n\t\treturn word;\n\t}",
"@Override\n public WordCountTask read_impl(AutoBuffer ab) {\n _vocabHM = VOCABHM;\n int len, off = 0;\n if (ab.get1() == 1) return this; // killed\n\n len = ab.get4();\n byte[] buf = new byte[len];\n while ((len = ab.get2()) != 65535) { // Read until end-of-map marker\n ValueStringCount vsc1 = new ValueStringCount();\n System.arraycopy(ab.getA1(len), 0, buf, off, len);\n vsc1.set(buf, off, len, ab.get8());\n off += len;\n ValueStringCount vsc2 = VOCABHM.putIfAbsent(vsc1, vsc1);\n if (vsc2 != null) vsc2.inc(vsc1._cnt); // Inc count on added word\n }\n return this;\n }",
"public String getWord() {\n return this.word;\n }",
"public String find(String word) {\n int preferedHashVal = hashFunc1(word);\n int stepSize = hashFunc2(word);\n\n while (hashArray[preferedHashVal] != null) {\n // Here is difference from insert()\n if (hashArray[preferedHashVal].equals(word)) { // ! .equals() for comparing Objects and strings and.. (non primitives)\n return hashArray[preferedHashVal];\n }\n\n preferedHashVal = preferedHashVal + stepSize;\n preferedHashVal = preferedHashVal % arraySize;\n }\n\n // Just return where left off, should be null\n return hashArray[preferedHashVal];\n }",
"public char[] nextToken() {\n\t\t// read and return the next word of the document\n\t\tif(loc<words.length){\n\n\t\t\tString res=words[loc];\n\t\t\tloc++;\n\t\t\treturn res.toCharArray();\n\t\t}\n\n\t\t// or return null if it reaches the end of the document\n\t\treturn null;\n\t}",
"public String getWord()\n\t{\n\t\treturn word.get(matcher());\n\t}",
"public String getWord() {\n\t\treturn word;\r\n\t}",
"public static void load() {\r\n\t\tString mar = new String(readMAR().getStr());\r\n\t\tTraceINF.write(\"Read memory \"+mar);\r\n\t\tFormatstr content = new Formatstr();\r\n//\t\tSystem.out.println(\"index\"+Integer.parseInt(mar.substring(0, mar.length() - 2), 2));\r\n\t\tcontent.setStr(getBank(mar)[Integer.parseInt(mar.substring(0, mar.length() - 2), 2)]);\r\n\t\t\r\n\t\twriteMBR(content);\r\n\t\tTraceINF.write(\"Read finished.\");\r\n\t}",
"public String getWord(){\r\n\t\treturn word;\r\n\t}",
"private String getWord(final int index) {\n int start = 0;\n int length = 0;\n String result = null;\n try {\n start = TextUtils.getWordStart(textKit, index);\n length = TextUtils.getWordEnd(textKit, index) - start;\n result = document.getText(start, length);\n } catch (final BadLocationException e) {\n }\n\n return result;\n }",
"public int getWord(int n) {\r\n\t\treturn words.get(n);\r\n\t}",
"public String getWord(){\n\t\treturn word;\n\t}",
"public Word getWord() {\n return word;\n }",
"public int getWordPosition() {\n return wordPosition;\n }",
"public String read_from_mem(ChunkName n) {\n\tfor (ChunkName key : this.my_data.keySet()) {\n\t if (n.to_String().equals(key.to_String())) {\n\t\treturn this.my_data.get(key);\n\t }\n\t}\n\treturn null;\n }",
"public DictionaryData lookup(String word) {\r\n\r\n return dictionaryMap.get(word.toUpperCase());\r\n }",
"public Verbum getWord(){\r\n\t\t// Pick random starting point in the linked list\r\n\t\tint start = (int)(Math.random() * words.size());\r\n\t\tDSElement<Verbum> w = words.first;\r\n\t\tfor(int i = 0; i < start; i++)\r\n\t\t\tw = w.getNext();\r\n\t\treturn w.getItem();\r\n\t}",
"public String getWord() {\n if(words[index] != null) {\n return words[index];\n } else {\n return \"\";\n }\n }",
"private int BinarySearchBytePage(String wordToBeSearched, byte[] bytePage, ArrayList<Integer> matchingPositions, String filename, int middleLine)\n {\n //If the wordToBeSearched's length is less than MinWordSize or greater than MaxWordSize, then the search fails automatically\n if(wordToBeSearched.length() > SizeConstants.getMaxWordSize() || wordToBeSearched.length() < SizeConstants.getMinWordSize())\n {\n return -1;\n }\n\n //Get the index entry size in ASCII characters\n int indexEntrySize = (SizeConstants.getMaxWordSize() + 4);\n\n //Record per data page\n int entriesPerPage = bytePage.length / indexEntrySize;\n\n //Initialize the String representation of the word in the data page entry\n String dataPageEntryWord = \"\";\n\n //Initialize the String representation of the last non blank(space filled) word in the page\n String lastNonBlankWord = \"\";\n\n //Flag, true if the word to be searched is matched to the first entry of the data page\n boolean foundAtFirstEntry = false;\n\n //Flag, true if the word to be searched is matched to the first entry of the data page\n boolean foundAtLastEntry = false;\n\n //Search for every entry in the byte page\n for(int index = 0; index < entriesPerPage; index++)\n {\n int entryStartingPosition = index * indexEntrySize;\n //Get only the word from the data page and convert the bytes to ASCII characters\n dataPageEntryWord = new String(Arrays.copyOfRange(bytePage, entryStartingPosition, entryStartingPosition + SizeConstants.getMaxWordSize())).replaceAll(\"\\\\s+\",\"\");\n\n //Compare the index entry word and the word to be searched\n if(dataPageEntryWord.equals(wordToBeSearched))\n {\n //Get the line number from the index entry and add it to the ArrayList\n matchingPositions.add(ByteBuffer.wrap(Arrays.copyOfRange(bytePage, entryStartingPosition + SizeConstants.getMaxWordSize(), entryStartingPosition + indexEntrySize)).getInt());\n if(index == 0)\n {\n //Mark that the word to be searched is matched to the first entry of the data page\n foundAtFirstEntry = true;\n }\n }\n\n //Check if the word in the data page entry is not blank\n if(!dataPageEntryWord.trim().isBlank())\n {\n //Store the last non blank data page entry word\n lastNonBlankWord = dataPageEntryWord;\n }\n }\n\n //Compare the last index entry word and the word to be searched\n if(dataPageEntryWord.equals(wordToBeSearched))\n {\n //Mark that the word to be searched is matched to the last entry of the data page\n foundAtLastEntry = true;\n }\n\n //If the ArrayList is empty, the word to be searched wasn't found in the data page\n if(matchingPositions.isEmpty())\n {\n //Check if the word to be searched is alphabetically before or after the last non blank word\n if(wordToBeSearched.compareTo(lastNonBlankWord) < 0)\n {\n //Search the bottom part of the search area\n return -4;\n }\n else if(wordToBeSearched.compareTo(lastNonBlankWord) > 0)\n {\n //Search the top part of the search area\n return -3;\n }\n }\n else\n {\n //Count the new data page accesses\n int dataPageAccesses = 0;\n\n //Search for other occurrences of the word to be searched in the bottom part\n if(foundAtFirstEntry)\n {\n //Search the bottom part of the search area\n dataPageAccesses += LinearSearchAfterBinary(filename, matchingPositions, wordToBeSearched, middleLine, true);\n }\n\n //Search for other occurrences of the word to be searched, in the top part\n if(foundAtLastEntry)\n {\n //Search the top part of the search area\n dataPageAccesses += LinearSearchAfterBinary(filename, matchingPositions, wordToBeSearched, middleLine, false);\n }\n return dataPageAccesses;\n }\n //Continue the binary search normally\n return -2;\n }",
"private int parseWord(Token token, char[] buffer, int offset, int type){\nfromStart:\n for(int i=offset; i<buffer.length; ++i){\n for(int x=0; x < characters[type].length; ++x){\n if(buffer[i] == characters[type][x]){\n token.identifier += buffer[i];\n continue fromStart;\n }\n }\n // If it gets here, the character currently parsed isn't of the same type \n return i;\n }\n // Found end of file\n return offset+buffer.length;\n }",
"@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 String getWord() {\n return word;\n }",
"public int memoryBitOffset ( TypeSpec baseType, int bitOffset, int bitWidth )\n{\n if (LITTLE_ENDIAN)\n return bitOffset;\n else // big endian\n return baseType.width - bitOffset - bitWidth;\n}",
"public int calWord() {\n for(int i = 0; i < newWord.length(); i++) {\n for (String c : keySetPoint) {\n if(String.valueOf(newWord.charAt(i)).equals(c)) {\n point += mapPoint.get(c);\n }\n }\n }\n\n return point;\n }",
"protected void getRndWord(String fileName) {\n\t\t// create the dict in the DictReader\n\t\tdr.readInFile(fileName);\n\t\t// get a random word and save it to this.word from the DictReader\n\t\tthis.word = new Word(dr.getRandomWord());\n\t}",
"public static int offset_reading() {\n return (32 / 8);\n }",
"Optional<MemoryAddress> lookup(String name);",
"public int addMemoryRestoreRawWord(int address, int value) {\r\n\t\tbackSteps.push(MEMORY_RESTORE_RAW_WORD, pc(), address, value);\r\n\t\treturn value;\r\n\t}",
"private static HashMap<String, Integer> getWordIndex()\n\t{\n\t\treturn aWordIndex;\n\t}",
"@Nonnull\n public Memory read(@Nonnegative long offset, @Nonnegative int length) {\n return this.read(this.resolvePointer(offset), length);\n }",
"static int findraslot(Memory mem, int addr) {\r\n\t\t// afbf0020 sw [sp +32] = ra\r\n\t\tfor (int n = 0; n < 8; n++) {\r\n\t\t\tint isn = mem.load_word(addr + (n * 4));\r\n\t\t\tif ((isn & 0xffff0000) == 0xafbf0000) {\r\n\t\t\t\tshort imm = (short) isn;\r\n\t\t\t\treturn imm;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\t}",
"public boolean hasWord() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public HashMap<String, int[]> documentsContaining(String word) {\n return index.get(word);\n }",
"private static int searchStandardDictionary(String word) {\n if (word.length() < 4) {\n return Arrays.binarySearch(STANDARD_DICTIONARY, 0, FOUR_LETTER_WORDS_OFFSET, word.toUpperCase(Locale.ENGLISH));\n } else {\n return Arrays.binarySearch(STANDARD_DICTIONARY, FOUR_LETTER_WORDS_OFFSET, STANDARD_DICTIONARY.length, word.toUpperCase(Locale.ENGLISH));\n }\n }",
"private TrieNode searchPrefix(String word) {\n\t\tTrieNode node = root;\n\t\tfor (char c: word.toCharArray()) {\n\t\t\tif (node.containsKey(c)) {\n\t\t\t\tnode = node.get(c);\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\treturn node;\n\t}",
"int getOffset();",
"int getOffset();",
"int getOffset();",
"public String getWord(){\r\n\t\t return word;\r\n\t }",
"public long readMem(int index) throws Exception{\n\t\tif(index >= 0 && index < Constants.MEM_SIZE)\n\t\t\treturn memory[index];\n\t\telse\n\t\t\tthrow new Exception(\"Illegal memory location, trying to access MEM[\"+index+\"]\");\n\t}",
"public byte get(int addr) {\n return data[addr - start];\n }",
"public String getWord(){\n return this.word;\n }",
"public static String getWord(BaseDocument doc, int offset)\n throws BadLocationException {\n int wordEnd = getWordEnd(doc, offset);\n if (wordEnd != -1) {\n return new String(doc.getChars(offset, wordEnd - offset), 0,\n wordEnd - offset);\n }\n return null;\n }",
"private static String readWord(String word, int l){\n\t\tint index = l;\n\t\twhile(index < word.length()){\n\t\t\tif(word.charAt(index) != ':')\n\t\t\t\tindex++;\n\t\t\telse{\n\t\t\t\tif(index < word.length()-1 && word.charAt(index+1) != ':')\n\t\t\t\t\tindex++;\n\t\t\t\telse{\n\t\t\t\t\tif(index != word.length()-1){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn word.substring(l, index);\n\t}",
"public void load (Word word, int distance, int lookahead)\n\t\tthrows PersistenceException\n\t{\n\t\tInfo info = (Info)map.get(word);\n\t\tif (info == null || info.loaded) return;\n\t\tList list = info.list;\n\t\tint listSize = list.size();\n\t\tint pos = info.pos;\n\t\tint lastPos = Math.min(listSize, pos + lookahead + 1);\n\t\tArrayList words = new ArrayList();\n\t\tfor (int i = pos; i < lastPos; i++) {\n\t\t\tword = (Word)list.get(i);\n\t\t\tinfo = (Info)map.get(word);\n\t\t\tif (!info.loaded) {\n\t\t\t\twords.add(word);\n\t\t\t\tinfo.loaded = true;\n\t\t\t}\n\t\t}\n\t\tpm.getColocates(words, distance);\n//\t\tCollocateUtils.getColocates(pm, words, distance);\n\t}",
"public long getValue(long location) {\n\t\t// we want to access the memory on a word boundary\n\t\tlong memoryAddress = location >> 2;\n\t\t\n\t\t// error if we're out of bounds\n\t\tif (memoryAddress >= memory.size()) {\n\t\t\tthrow new IllegalArgumentException(\"Memory address out of bounds\");\n\t\t}\n\t\t\n\t\t// Return the word we want. Note that it should be safe to\n\t\t// cast memoryAddress to the int required by ArrayList.get because\n\t\t// we know that the given location is at most 32 bits long, so shifting\n\t\t// right two bits should give us a non-negative number every time we\n\t\t// go to cast it.\n\t\treturn memory.get((int)memoryAddress);\n\t}",
"public String peekWord(boolean includeLetters, boolean includeDigits,\n\t\t\tboolean includeOtherNonWhitespace) {\n\t\tStringBuffer sb = new StringBuffer();\n\t\tboolean done = false;\n\t\twhile (!done) {\n\t\t\tchar ch = peek(sb.length());\n\t\t\tif (ch == CharacterIterator.DONE) {\n\t\t\t\tdone = true;\n\t\t\t} else if (Character.isLetter(ch)) {\n\t\t\t\tif (includeLetters) {\n\t\t\t\t\tsb.append(ch);\n\t\t\t\t} else {\n\t\t\t\t\tdone = true;\n\t\t\t\t}\n\t\t\t} else if (Character.isDigit(ch)) {\n\t\t\t\tif (includeDigits) {\n\t\t\t\t\tsb.append(ch);\n\t\t\t\t} else {\n\t\t\t\t\tdone = true;\n\t\t\t\t}\n\t\t\t} else if (!Character.isWhitespace(ch)) {\n\t\t\t\tif (includeOtherNonWhitespace) {\n\t\t\t\t\tsb.append(ch);\n\t\t\t\t} else {\n\t\t\t\t\tdone = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// it's whitespace:\n\t\t\t\tdone = true;\n\t\t\t}\n\t\t}\n\t\treturn sb.toString();\n\t}",
"public WordInfo searchWord(String word) {\n\t\tSystem.out.println(\"Dic:SearchWord: \"+word);\n\n\t\tDocument doc;\n\t\ttry {\n\t\t\tdoc = Jsoup.connect(\"https://dictionary.cambridge.org/dictionary/english-vietnamese/\" + word).get();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\n\t\tElements elements = doc.select(\".dpos-h.di-head.normal-entry\");\n\t\tif (elements.isEmpty()) {\n\t\t\tSystem.out.println(\" not found\");\n\t\t\treturn null;\n\t\t}\n\n\t\tWordInfo wordInfo = new WordInfo(word);\n\n\t\t// Word\n\t\telements = doc.select(\".tw-bw.dhw.dpos-h_hw.di-title\");\n\n\t\tif (elements.size() == 0) {\n\t\t\tSystem.out.println(\" word not found in doc!\");\n\t\t\treturn null;\n\t\t}\n\n\t\twordInfo.setWordDictionary(elements.get(0).html());\n\n\t\t// Type\n\t\telements = doc.select(\".pos.dpos\");\n\n\t\tif(elements.size() > 0) {\n\t\t\twordInfo.setType(WordInfo.getTypeShort(elements.get(0).html()));\n//\t\t\tif (wordInfo.getTypeShort().equals(\"\"))\n//\t\t\t\tSystem.out.println(\" typemis: \"+wordInfo.getType());\n\t\t}\n\n\t\t// Pronoun\n\t\telements = doc.select(\".ipa.dipa\");\n\n\t\tif (elements.size() > 0)\n\t\t\twordInfo.setAPI(\"/\"+elements.get(0).html()+\"/\");\n\n\t\t// Trans\n\t\telements = doc.select(\".trans.dtrans\");\n\n\t\tif (elements.size() > 0)\n\t\t\twordInfo.setTrans(elements.get(0).html());\n\n\t\tSystem.out.println(\" found\");\n\t\treturn wordInfo;\n\t}",
"public boolean hasWord() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public int IncrementOffset() {\n int oldOffset = offset;\n offset += MachineDependent.WORDSIZE;\n return oldOffset;\n }",
"public Word getWord(String wordName){\n Word word = words.get(wordName);\n if (word == null){\n word = new Word(wordName);\n words.put(wordName, word);\n }\n return word;\n }",
"private int readPage(String loc) throws SAXException\r\n\t{\r\n\t\tif(loc.startsWith(\"page\"))\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tint page = Integer.parseInt(loc.substring(4));\r\n\t\t\t\tif(page < 0 || page > 15) throw new SAXException(\"RAM page \" + page + \" is not valid.\");\r\n\t\t\t\treturn page;\r\n\t\t\t}\r\n\t\t\tcatch(NumberFormatException e)\r\n\t\t\t{\r\n\t\t\t\tthrow new SAXException(\"Cannot decode RAM page \" + loc + \".\", e);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn Variable.ACCESS_BANK;\r\n\t}",
"public int getWordStart (int wordIndex) {\n int wordCount = -1;\n int i = 0;\n int start = 0;\n int end = 0;\n while (i < tags.length() && wordCount < wordIndex) {\n start = indexOfNextWordStart (tags, i, slashToSeparate);\n end = indexOfNextSeparator (tags, start, true, true, slashToSeparate);\n wordCount++;\n if (wordCount < wordIndex) {\n i = end + 1;\n }\n }\n return start;\n }",
"public int accessMemory(int id, int pageNumber)\n\t{ \n\t\treturn 0;\n\t}",
"public static FeatureNode getFirstWord(FeatureNode word)\n\t{\n\t\tFeatureNode fn = word.get(\"phr-head\");\n\t\twhile (fn != null)\n\t\t{\n\t\t\tFeatureNode wd = fn.get(\"phr-word\");\n\t\t\tif (wd != null) return wd;\n\n\t\t\tFeatureNode subf = fn.get(\"phr-head\");\n\t\t\tif (subf != null)\n\t\t\t{\n\t\t\t\twd = getFirstWord(fn);\n\t\t\t\tif (wd != null) return wd;\n\t\t\t}\n\t\t\tfn = fn.get(\"phr-next\");\n\t\t}\n\t\treturn null;\n\t}",
"public int read(long addr) {\n\t\treturn findBlock(addr);\n\t}",
"private String randWord() {\r\n List<String> wordList = new ArrayList<>();\r\n\r\n try {\r\n InputStream input = getClass().getResourceAsStream(\"res/hangmanWords.txt\");\r\n DataInputStream data_input = new DataInputStream(input);\r\n BufferedReader buffer = new BufferedReader(new InputStreamReader(data_input));\r\n String str_line;\r\n\r\n while ((str_line = buffer.readLine()) != null) {\r\n str_line = str_line.trim();\r\n if ((str_line.length() != 0)) {\r\n wordList.add(str_line);\r\n }\r\n }\r\n } catch (Exception e) {\r\n System.err.println(\"Error: \" + e.getMessage());\r\n }\r\n int rand = new Random().nextInt(wordList.size());\r\n return wordList.get(rand);\r\n }",
"public int searchWord(File filePath, String s1) throws IOException, NullPointerException\r\n\t{\r\n\t\tint counter = 0;\r\n\t\tString data = \"\";\r\n\t\tBufferedReader bufferReader = new BufferedReader(new FileReader(filePath));\r\n\t\tString line = null;\r\n\t\twhile ((line = bufferReader.readLine()) != null)\r\n\t\t{\r\n\t\t\tdata = data + line;\r\n\t\t}\r\n\t\tbufferReader.close();\r\n\t\tString txt = data;\r\n\t\tBoyerMoore bm = new BoyerMoore(s1);\r\n\t\tint offset = 0;\r\n\t\tfor (int loc = 0; loc <= txt.length(); loc += offset + s1.length())\r\n\t\t{\r\n\t\t\t offset = bm.search(s1, txt.substring(loc));\r\n\t\t\t if ((offset + loc) < txt.length())\r\n\t\t\t { \r\n\t\t\t\t counter++; \r\n\t\t\t\t System.out.printf(\"The word '\"+s1 +\"' is present at the position \" + (offset + loc)+\"\\n\"); //printing position of word \r\n\t\t\t } \r\n\t\t}\r\n\t\tif(counter!=0)\r\n\t\t{ \r\n\t\t\t System.out.println(\" In the FILE: \"+filePath.getName()+\"\\n\");\r\n\t\t}\r\n\t\treturn counter; \r\n\t}",
"public int read(int address){\n switch (address){\r\n /*\r\n case 0: {\r\n return registers_w[CONTROL_REGISTER_1];\r\n }\r\n\r\n case 3: {\r\n return spriteMemoryCounter;\r\n }\r\n case 5:{\r\n return registers_w[SCROLL_OFFSET];\r\n }\r\n case 6:{\r\n return horizontalTileCounter | (verticalTileCounter << 5) | (horizontalNameCounter << 10) | (verticalNameCounter << 11);\r\n }\r\n */\r\n\t\t\tcase 0: {\r\n\t\t\t\t\t\treturn scanLine;\r\n\t\t\t\t\t\t// hack\r\n\t\t\t}\r\n case 1: {\r\n return registers_w[CONTROL_REGISTER_2];\r\n }\r\n case STATUS_REGISTER:{ // 2\r\n int returnVal = registers_r[STATUS_REGISTER];\r\n registers_r[STATUS_REGISTER] = getBitsUnset(registers_r[STATUS_REGISTER], STATUS_VBLANK); //| STATUS_SPRITE0_HIT);\r\n isFirstWriteToScroll = true;\r\n lastPPUAddressWasHigh = false;\r\n //logger.info(\"Status is: \" + Integer.toHexString(returnVal));\r\n return returnVal;\r\n }\r\n case SPRITE_MEMORY_DATA:{ // 4\r\n return readFromSpriteMemory();\r\n }\r\n case PPU_MEMORY_DATA:{ // 7\r\n int returnVal = 0xFF & registers_r[PPU_MEMORY_DATA]; // buffered read\r\n \r\n //int returnVal = 0xFF & memory.read(ppuMemoryAddress);\r\n\t\t\tint readAddress = horizontalTileCounter \r\n\t\t\t\t\t\t\t\t| (verticalTileCounter << 5)\r\n\t\t\t\t\t\t\t\t| (horizontalNameCounter << 10)\r\n\t\t\t\t\t\t\t\t| (verticalNameCounter << 11)\r\n\t\t\t\t\t\t\t\t| ((fineVerticalCounter & 0x3) << 12);\r\n\r\n\t\t\tif (readAddress == 0x3F10 || readAddress == 0x3F14 || readAddress == 0x3F18 || readAddress == 0x3F1C) {\r\n\t\t\t\treadAddress = readAddress & 0x3F0F;\r\n\t\t\t}\r\n registers_r[PPU_MEMORY_DATA] = 0xFF & memory.read(readAddress);\r\n // registers_r[PPU_MEMORY_DATA] = 0xFF & memory.read(ppuMemoryAddress);\r\n incrementCounters();\r\n /*\r\n if ((registers_w[CONTROL_REGISTER_1] & CR1_VERTICAL_WRITE) == 0){\r\n ppuMemoryAddress++;\r\n }\r\n else {\r\n ppuMemoryAddress = (ppuMemoryAddress + 32);\r\n }\r\n */\r\n return returnVal;\r\n }\r\n\r\n default: throw new RuntimeException(\"Invalid read attempt: \" + Integer.toHexString(address));\r\n }\r\n }",
"public Cursor getWord(String word) {\n\n\t\tString query = String.format(_select, getDate()) +\n\t\t\t\t\t\t\" WHERE \" + DBConstants.WordTable.WORD_KEY + \" = '\" + word + \"'\";\n\t\t\n\t\treturn _db.rawQuery(query, null);\t\t\n }",
"public StringNode locate(String word) {\n StringNode current = first;\n while (true) {\n if (current == null) {\n return null;\n }\n if (current.getWord().equalsIgnoreCase(word)) {\n return current;\n }\n else {\n if (current.hasNext()) {\n current = current.getNext();\n }\n else {\n return null;\n }\n }\n }\n }",
"public String getWord(int index){\n\t\treturn (String)list.get(index);\n\t}",
"public int read() throws IOException {\n int codeWord = 0;\n for (int i = 0; i < this.codewordLength; i++) {\n int buffer = this.input.read();\n if (buffer == -1) {\n throw new IOException();\n }\n codeWord = (codeWord << 1);\n codeWord = codeWord | buffer;\n }\n return codeWord;\n }",
"public WordMap generateWordMap(String filePath) {\n\n WordMap wm = new WordMap();\n Scanner sc;\n\n try {\n sc = new Scanner(new File(filePath));\n\n while (sc.hasNextLine()) {\n\n String line = sc.nextLine();\n String[] lineData = line.split(\" \");\n\n //Gets a string of the word we are currently parsing\n String word = lineData[colWord].split(\"=\")[1];\n\n wm.put(word, getWordFromLine(line));\n }\n\n } catch (Exception e) {\n System.err.println(\"Error in generateWordMap\");\n System.err.println(e.getMessage());\n e.printStackTrace();\n return null;\n }\n\n sc.close();\n return wm;\n }",
"public static int getWordStart(JTextComponent c, int offset)\n throws BadLocationException {\n return getWordStart((BaseDocument)c.getDocument(), offset);\n }",
"public abstract long getStartOffset();",
"private int BinaryReadIndexFile(String filename, ArrayList<Integer> matchingPositions, String wordToBeSearched)\n {\n try\n {\n //Initialize the file object\n File LocalInputFile = new File(filename + \".ndx\");\n\n //Try to open the index file using a Scanner\n Scanner indexFileFileScanner = new Scanner(LocalInputFile);\n\n //Get the files lines number\n int mMaxFileLines = 0;\n while(indexFileFileScanner.hasNext())\n {\n //Read every line in the file\n indexFileFileScanner.nextLine();\n mMaxFileLines++;\n }\n\n //Index to the bottom part of the search area of the file\n int bottomFilePageIndex = 0;\n \n //Index to the top part of the search area of the file\n int topFilePageIndex = mMaxFileLines;\n\n //Index to the middle data page of the search area of the file\n int middleFilePageIndex;\n \n //Counter for the data page accesses\n int dataPageAccessesCounter = 0;\n \n //Status of the search process\n int searchStatus;\n\n //Search while there are data pages to access, if topFilePageIndex is greater than bottomFilePageIndex, the search fails automatically\n while (bottomFilePageIndex <= topFilePageIndex)\n {\n //Reinitialize the FileScanner object\n indexFileFileScanner = new Scanner(LocalInputFile);\n \n //Find the middle data page index\n middleFilePageIndex = (bottomFilePageIndex + topFilePageIndex)/2;\n\n //Skip the lines until the middle point\n SkipLines(indexFileFileScanner, middleFilePageIndex);\n\n //Fetch the data page from the file\n ByteBuffer bytePageBuffer = ByteBuffer.wrap(StringToByteArrayTranslator(indexFileFileScanner.nextLine(), SizeConstants.getBufferSize()));\n\n //Execute the binary search in the page\n searchStatus = BinarySearchBytePage(wordToBeSearched,bytePageBuffer.array(), matchingPositions, filename, middleFilePageIndex);\n\n //Count the data page access\n dataPageAccessesCounter++;\n\n //If the word's to be searched length is invalid or the word is found in the page, but is neither the first or the last word in the page\n if (searchStatus == -2 || searchStatus == -1)\n {\n //Complete the binary search\n break;\n }\n else if (searchStatus == -3)\n {\n //If the search must be continued in the top part of the search area of the file\n bottomFilePageIndex = middleFilePageIndex + 1;\n }\n else if (searchStatus == -4)\n {\n //If the search must be continued in the bottom part of the search area of the file\n topFilePageIndex = middleFilePageIndex - 1;\n }\n else\n {\n //Add the new data page accesses\n dataPageAccessesCounter += searchStatus;\n\n //Complete the binary search\n break;\n }\n }\n //Close the FileScanner object\n indexFileFileScanner.close();\n\n //Return the number of the data page file accesses\n return dataPageAccessesCounter;\n }\n catch (FileNotFoundException e)\n {\n //Catch the FileNotFoundException and inform the user\n System.out.println(\"File: \" + this.Filename + \" cannot be opened.\");\n e.printStackTrace();\n return 0;\n }\n }",
"private String readPrefixPart()\n // { return readWordSub(false, false) ; }\n {\n return readSegment(false);\n }",
"protected char readCharWord() throws java.io.IOException {\n char c = currentChar;\n while (java.lang.Character.isWhitespace(c)) {\n c = next();\n }\n return c;\n }",
"public int addMemoryRestoreWord(int address, int value) {\r\n\t\tbackSteps.push(MEMORY_RESTORE_WORD, pc(), address, value);\r\n\t\treturn value;\r\n\t}",
"public long getWordId()\n\t{\n\t\tassert this.cursor != null;\n\t\treturn this.cursor.getLong(1);\n\t}"
]
| [
"0.6172908",
"0.5878186",
"0.56578225",
"0.5647184",
"0.5564177",
"0.5448923",
"0.5439259",
"0.54272",
"0.540661",
"0.5389773",
"0.5369616",
"0.528764",
"0.5266021",
"0.51500016",
"0.5149517",
"0.51347613",
"0.5077663",
"0.50666386",
"0.5061828",
"0.5052653",
"0.5042333",
"0.49981484",
"0.4990225",
"0.49725378",
"0.49699253",
"0.49505967",
"0.4939017",
"0.49385557",
"0.49352267",
"0.4871044",
"0.48705888",
"0.4864297",
"0.48363712",
"0.48048732",
"0.47980464",
"0.47771895",
"0.4763701",
"0.47626048",
"0.47572443",
"0.47469604",
"0.47350705",
"0.4733051",
"0.47251016",
"0.4723041",
"0.47175455",
"0.47160843",
"0.47133768",
"0.47064543",
"0.47",
"0.46992275",
"0.46884713",
"0.468451",
"0.4661781",
"0.46510324",
"0.46246395",
"0.46102148",
"0.46015298",
"0.45970893",
"0.45967183",
"0.45934254",
"0.45864967",
"0.45793942",
"0.4571619",
"0.45616943",
"0.4560949",
"0.4560949",
"0.4560949",
"0.4559651",
"0.45536366",
"0.4552298",
"0.45462012",
"0.4545914",
"0.45391497",
"0.45384163",
"0.45268577",
"0.4525698",
"0.4523737",
"0.45138308",
"0.44903538",
"0.44781515",
"0.44780877",
"0.4477575",
"0.44675547",
"0.44645554",
"0.44644815",
"0.44613352",
"0.4454932",
"0.4454678",
"0.44506907",
"0.44433078",
"0.44419733",
"0.4437665",
"0.44303015",
"0.4427755",
"0.44265118",
"0.4426025",
"0.44224337",
"0.44167644",
"0.44132102",
"0.43952382"
]
| 0.5325232 | 11 |
STUDENT MUST COMPLETE THIS METHOD Returns the word that begins at the specified memory address. This is the private version of readWord that includes the cache statistic tracking parameter. When recordStats is false, this method should not update the cache statistics data members (hitCount and hitCost). | private boolean[] readWord(boolean[] address, boolean recordStats) {
if (address.length > 32) {
throw new IllegalArgumentException("address parameter must be 32 bits");
}
// Programming Assignment 5: Complete this method
// The comments provide a guide for this method.
/*
* Where does the address map in the cache? --> Determine the cache set that corresponds with
* the requested memory address
*/
// Get set bits from the address that was passed in
boolean[] setBits = new boolean[numSetBits];
for (int i = numByteBits; i < numByteBits + numSetBits; i++) {
setBits[i - numByteBits] = address[i];
System.out.println("setBits[" + Integer.toString(i - numByteBits) + "] is "
+ String.valueOf(setBits[i - numByteBits]));
}
long cacheSet = Binary.binToUDec(setBits);
System.out.println("Cache set is " + Long.toString(cacheSet));
boolean[] tagBits = new boolean[numTagBits];
// Get tag from the address that was passed in
for (int i = numByteBits + numSetBits; i < numByteBits + numSetBits + numTagBits; i++) {
tagBits[i - numByteBits - numSetBits] = address[i];
System.out.println("tagbits[" + Integer.toString(i - numByteBits - numSetBits) + "] is "
+ String.valueOf(tagBits[i - numByteBits - numSetBits]));
}
/*
* Determine whether or not the line that corresponds with the requested memory address is
* currently in the cache
*/
int lineCount=0;
boolean inCache = false;
// Iterate through the correct Cache Set
for (int i = 0; i < cache[toIntExact(cacheSet)].size(); i++) {
System.out.println("\n Line " + Integer.toString(i) + ":");
lineCount++;
// Get the tag the line
boolean[] lineTag = cache[toIntExact(cacheSet)].getLine(i).getTag();
// If the tag from the line equals the tag from the parameter, then the line that corresponds
// to the memory address is currently in the cache
if (Arrays.equals(lineTag, tagBits)) {
System.out.println("Line sorresponding to the memory address is currently in the cache");
inCache = true;
// System.exit(0);
}
}
//if it is in the cache the hit count increases
// If the line corresponding to the memory address is not in the cache, call readLineFromMemory
if (inCache==false) {
readLineFromMemory(address, toIntExact(cacheSet), tagBits);
}
//System.out.println(Binary.toString(toIntExact(cacheSet)));
System.exit(0);
// TODO:
// Update CacheMemory data members (requestCount, hitCount, hitCost)
// and CacheLine data members (using the various set methods)
// as needed for tracking cache hit rate and implementing the
// least recently used replacement algorithm in the cache set.
if(inCache==false) {
hitCount++;
hitCost=lineCount-1;
}
requestCount++;
// replace this placeholder return with the data copied from the cache line
return new boolean[32];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String read(int address)\n {\n return MMU.read(VMA.get( address/RAM.getPageSize()) * RAM.getPageSize() + (address % RAM.getPageSize()));\n }",
"public String getLexEntry(String word)\n {\n boolean found = false;\n String buff = \"\";\n String rtn = \"\";\n\n lastCount = 0.0;\n if(word.length() > 0)\n {\n buff = compactNumbers(word);\n rtn = searchLexDb(buff, true);\n if(rtn.length() > 0)\n found = true;\n\n else // try the lowercase version\n {\n buff = buff.toLowerCase();\n rtn = searchLexDb(buff, true);\n if(rtn.length() > 0)\n found = true;\n } // else\n } // fi\n\n // If not found, get the search string corresponding to the word.\n\n if(!found)\n {\n buff = searchString(word);\n\n while(!found && (buff.length() > 0))\n {\n rtn = searchLexDb(buff, false);\n if(rtn.length() > 0)\n found = true;\n else\n buff = buff.substring(1);\n } // while\n } // fi\n\n if(!found)\n System.out.println(\"word: #\" + word + \"# lex entry not found\");\n\n return(rtn.toString());\n }",
"int getWord( int pos){\n\t\treturn data[pos] + (data[pos+1] << 8);\n\t}",
"public String findWord(int offset) {\r\n \t\tIRegion wordRegion = findWordRegion(offset);\r\n \t\tString word = null;\r\n \t\ttry {\r\n \t\t\tword = this.get(wordRegion.getOffset(), wordRegion.getLength());\r\n \t\t} catch (BadLocationException e) {\r\n \t\t\te.printStackTrace();\r\n \t\t}\r\n \t\treturn word;\r\n \t}",
"public final Word getWord(int offset) {\n return words[offset == 0 ? offset : offset - 1];\n }",
"private String wordToFind() {\n\t\t\n\t\t//It actually just gets the incomplete version of the word, with underscores.\n\t\t//By the point this method is called, the server will have created a thread for\n\t\t//this client and generated a random word for this client to aim for. \n\t\t//The underscore variant will be just as long as the real word, so it can be used\n\t\t//for array lengths and, since it'll be all underscores, even if a hacker went to\n\t\t//print out the value of temp, they wouldn't get anywhere.\n\t\tout.println(\"GetWord\");\n\t\tString temp = null;\n\t\twhile(true) {\n\t\t\ttry {\n\t\t\t\ttemp = in.readLine();\n\t\t\t\tif(temp!=null) {\n\t\t\t\t\tcurrentWordLabel = new Label(temp);\n\t\t\t\t\treturn temp;\n\t\t\t\t}\n\t\t\t}catch(IOException ioe) {\n\t\t\t}\n\t\t}\n\t}",
"protected byte direct_read(int address) {\n return segment_data[address];\n }",
"java.lang.String getWord();",
"public void loadWord(int address, BitString word) {\n\t\tif (address < 0 || address >= MAX_MEMORY) {\n\t\t\tthrow new IllegalArgumentException(\"Invalid address\");\n\t\t}\n\t\tmMemory[address] = word;\n\t}",
"public static String readDiskMemory(String address){\n\t\treturn memory.get(address);\n\t}",
"private WordRecord lookUp(String word)\n {\n int contains = 0;\n boolean check = false;\n //loops through concordance\n for(int i = 0; i < this.concordance.size();i++)\n {\n //checks to see if the words are equal\n if(word.equalsIgnoreCase(this.concordance.get(i).getWord()))\n {\n //gets location of what position the word is true\n contains = i;\n check = true;\n }\n \n }\n //checks to see if it was found in concordance\n if(check)\n return this.concordance.get(contains);\n \n return null;\n }",
"@Override\n public WordCountTask read_impl(AutoBuffer ab) {\n _vocabHM = VOCABHM;\n int len, off = 0;\n if (ab.get1() == 1) return this; // killed\n\n len = ab.get4();\n byte[] buf = new byte[len];\n while ((len = ab.get2()) != 65535) { // Read until end-of-map marker\n ValueStringCount vsc1 = new ValueStringCount();\n System.arraycopy(ab.getA1(len), 0, buf, off, len);\n vsc1.set(buf, off, len, ab.get8());\n off += len;\n ValueStringCount vsc2 = VOCABHM.putIfAbsent(vsc1, vsc1);\n if (vsc2 != null) vsc2.inc(vsc1._cnt); // Inc count on added word\n }\n return this;\n }",
"public boolean inCache(String word){\n\t//\tSystem.out.println(\"checking word is: \"+\"-\"+word+\"-\");\n\t//\tSystem.out.println(source.containsValue(word));\n\t\tif(source.get(word) != null){\n\t//\t\tSystem.out.println(\"This word is in the cache dictionary \");\n\t\t\treturn true;\n\t\t}\n\t//\tSystem.out.println(\"this word is not in the cache dictionary \");\n\t\treturn false;\n\t}",
"public String find(String word) {\n int preferedHashVal = hashFunc1(word);\n int stepSize = hashFunc2(word);\n\n while (hashArray[preferedHashVal] != null) {\n // Here is difference from insert()\n if (hashArray[preferedHashVal].equals(word)) { // ! .equals() for comparing Objects and strings and.. (non primitives)\n return hashArray[preferedHashVal];\n }\n\n preferedHashVal = preferedHashVal + stepSize;\n preferedHashVal = preferedHashVal % arraySize;\n }\n\n // Just return where left off, should be null\n return hashArray[preferedHashVal];\n }",
"public int getWordOffset() {\n\t\treturn wordOffset;\n\t}",
"public void getWord() {\n\t\t\n\t}",
"public List<Word> getWordsStartingAt(int start);",
"public String read_from_mem(ChunkName n) {\n\tfor (ChunkName key : this.my_data.keySet()) {\n\t if (n.to_String().equals(key.to_String())) {\n\t\treturn this.my_data.get(key);\n\t }\n\t}\n\treturn null;\n }",
"public Word getStatic(int idx) {\n\t\tint ival=heap.arrayLoad(cref,idx);\r\n\t\treturn new Word(ival);\r\n\t}",
"public boolean[] readWord(boolean[] address) {\n return readWord(address, true);\n }",
"com.google.protobuf.ByteString\n getWordBytes();",
"private int BinarySearchBytePage(String wordToBeSearched, byte[] bytePage, ArrayList<Integer> matchingPositions, String filename, int middleLine)\n {\n //If the wordToBeSearched's length is less than MinWordSize or greater than MaxWordSize, then the search fails automatically\n if(wordToBeSearched.length() > SizeConstants.getMaxWordSize() || wordToBeSearched.length() < SizeConstants.getMinWordSize())\n {\n return -1;\n }\n\n //Get the index entry size in ASCII characters\n int indexEntrySize = (SizeConstants.getMaxWordSize() + 4);\n\n //Record per data page\n int entriesPerPage = bytePage.length / indexEntrySize;\n\n //Initialize the String representation of the word in the data page entry\n String dataPageEntryWord = \"\";\n\n //Initialize the String representation of the last non blank(space filled) word in the page\n String lastNonBlankWord = \"\";\n\n //Flag, true if the word to be searched is matched to the first entry of the data page\n boolean foundAtFirstEntry = false;\n\n //Flag, true if the word to be searched is matched to the first entry of the data page\n boolean foundAtLastEntry = false;\n\n //Search for every entry in the byte page\n for(int index = 0; index < entriesPerPage; index++)\n {\n int entryStartingPosition = index * indexEntrySize;\n //Get only the word from the data page and convert the bytes to ASCII characters\n dataPageEntryWord = new String(Arrays.copyOfRange(bytePage, entryStartingPosition, entryStartingPosition + SizeConstants.getMaxWordSize())).replaceAll(\"\\\\s+\",\"\");\n\n //Compare the index entry word and the word to be searched\n if(dataPageEntryWord.equals(wordToBeSearched))\n {\n //Get the line number from the index entry and add it to the ArrayList\n matchingPositions.add(ByteBuffer.wrap(Arrays.copyOfRange(bytePage, entryStartingPosition + SizeConstants.getMaxWordSize(), entryStartingPosition + indexEntrySize)).getInt());\n if(index == 0)\n {\n //Mark that the word to be searched is matched to the first entry of the data page\n foundAtFirstEntry = true;\n }\n }\n\n //Check if the word in the data page entry is not blank\n if(!dataPageEntryWord.trim().isBlank())\n {\n //Store the last non blank data page entry word\n lastNonBlankWord = dataPageEntryWord;\n }\n }\n\n //Compare the last index entry word and the word to be searched\n if(dataPageEntryWord.equals(wordToBeSearched))\n {\n //Mark that the word to be searched is matched to the last entry of the data page\n foundAtLastEntry = true;\n }\n\n //If the ArrayList is empty, the word to be searched wasn't found in the data page\n if(matchingPositions.isEmpty())\n {\n //Check if the word to be searched is alphabetically before or after the last non blank word\n if(wordToBeSearched.compareTo(lastNonBlankWord) < 0)\n {\n //Search the bottom part of the search area\n return -4;\n }\n else if(wordToBeSearched.compareTo(lastNonBlankWord) > 0)\n {\n //Search the top part of the search area\n return -3;\n }\n }\n else\n {\n //Count the new data page accesses\n int dataPageAccesses = 0;\n\n //Search for other occurrences of the word to be searched in the bottom part\n if(foundAtFirstEntry)\n {\n //Search the bottom part of the search area\n dataPageAccesses += LinearSearchAfterBinary(filename, matchingPositions, wordToBeSearched, middleLine, true);\n }\n\n //Search for other occurrences of the word to be searched, in the top part\n if(foundAtLastEntry)\n {\n //Search the top part of the search area\n dataPageAccesses += LinearSearchAfterBinary(filename, matchingPositions, wordToBeSearched, middleLine, false);\n }\n return dataPageAccesses;\n }\n //Continue the binary search normally\n return -2;\n }",
"@Override\r\n\tpublic Number getWight(int docID, int wordID, CategorizingDataManager CDM) {\n\t\tMap<Integer, Map<Integer, Integer>> cp=CDM.getMap();\r\n\t\treturn cp.get(wordID).containsKey(docID)?cp.get(wordID).get(docID):0;\r\n\t}",
"private int parseWord(Token token, char[] buffer, int offset, int type){\nfromStart:\n for(int i=offset; i<buffer.length; ++i){\n for(int x=0; x < characters[type].length; ++x){\n if(buffer[i] == characters[type][x]){\n token.identifier += buffer[i];\n continue fromStart;\n }\n }\n // If it gets here, the character currently parsed isn't of the same type \n return i;\n }\n // Found end of file\n return offset+buffer.length;\n }",
"private CacheLine readLineFromMemory(boolean[] address, int setNum, boolean[] tagBits) {\n\n // Use the LRU (least recently used) replacement scheme to select a line\n // within the set.\n\n // Read the line from memory. The memory address to read is the\n // first memory address of the line that contains the requested address.\n // The MainMemory read method should be called.\n\n // Copy the line read from memory into the cache\n\n // replace this placeholder return with the correct line to return\n\t\n \n\t/*COMMENT FOR NICK: The least recently used I don't now how to change. The code below\n\t * sets the first line in the cache set to the LRU but I don't know how to update it \n\t * to the next line over once address is put into the LRU line \n\t */\n\t \n\t int lastUsed=0;\n\t int isFullCheck=0;\n\t int count=0;\n\t int addressToInt []=new int[address.length];\n\t\n\t \n\t System.out.println(\"Cache Set: \"+setNum);\n\t //loops through the cache set to see if there is a open line if so the address is set into the data\n\t for(int i=0;i<cache[setNum].size();i++) {\n\t\t if (cache[setNum].getLine(i).getData()==null) {\n\t\t\t cache[setNum].getLine(i).setData(mainMemory.read(address,address.length));\n\t\t\t if(count==0) {\n\t\t\t\t cache[setNum].getLine(i).setLastUsed(i);\n\t\t\t\t isFullCheck++;\n\t\t\t }\n\t\t\t count++;\n\t\t\t System.out.println(\"Line read into \"+ i +\" line: \"+ Binary.toString(address));\n\t\t\t \n\t\t }\n\t\t \n\t\t \n\t\t isFullCheck++;\n\t\t //if the cache set is full the new data takes the place of the LRU line\n\t\t if(isFullCheck==cache[setNum].size()) {\n\t\t\t cache[setNum].getLine(lastUsed).setData(mainMemory.read(address,address.length));\n\t\t\t lastUsed++;\n\t\t\t System.out.println(\"Line read into \"+lastUsed);\n\t\t }\n\t }\n\t \n\t return new cacheSet.getLine();\n\n }",
"public int calWord() {\n for(int i = 0; i < newWord.length(); i++) {\n for (String c : keySetPoint) {\n if(String.valueOf(newWord.charAt(i)).equals(c)) {\n point += mapPoint.get(c);\n }\n }\n }\n\n return point;\n }",
"public long getCachedData(int memLoc) {\n\t\tfor (Integer memoryCheck : cacheMap.keySet()) {\n\t\t\tif(memoryCheck == memLoc){\n\t\t\t\treturn cacheMap.get(memoryCheck);\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}",
"WordBean getWord(String word);",
"static int findraslot(Memory mem, int addr) {\r\n\t\t// afbf0020 sw [sp +32] = ra\r\n\t\tfor (int n = 0; n < 8; n++) {\r\n\t\t\tint isn = mem.load_word(addr + (n * 4));\r\n\t\t\tif ((isn & 0xffff0000) == 0xafbf0000) {\r\n\t\t\t\tshort imm = (short) isn;\r\n\t\t\t\treturn imm;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\t}",
"@Override\n\tpublic int read() {\n\t\tint lowByte = getFirstArg();\n\t\tint highByte = getSecondArg();\n\t\tint address = highByte;\n\t\taddress = address << 8;\n\t\taddress |= lowByte;\n\t\treturn CpuMem.getInstance().readMem(address);\n\t}",
"public String readWord() throws IOException\n {\n byte[] buf = new byte[64]; // line length\n int cnt = 0, c;\n while ((c = read()) != -1)\n {\n if (Character.isWhitespace(c)) //care ADD ANY WHITESPACE CHAR??\n break;\n buf[cnt++] = (byte) c;\n }\n return new String(buf, 0, cnt);\n }",
"public int searchWord(File filePath, String s1) throws IOException, NullPointerException\r\n\t{\r\n\t\tint counter = 0;\r\n\t\tString data = \"\";\r\n\t\tBufferedReader bufferReader = new BufferedReader(new FileReader(filePath));\r\n\t\tString line = null;\r\n\t\twhile ((line = bufferReader.readLine()) != null)\r\n\t\t{\r\n\t\t\tdata = data + line;\r\n\t\t}\r\n\t\tbufferReader.close();\r\n\t\tString txt = data;\r\n\t\tBoyerMoore bm = new BoyerMoore(s1);\r\n\t\tint offset = 0;\r\n\t\tfor (int loc = 0; loc <= txt.length(); loc += offset + s1.length())\r\n\t\t{\r\n\t\t\t offset = bm.search(s1, txt.substring(loc));\r\n\t\t\t if ((offset + loc) < txt.length())\r\n\t\t\t { \r\n\t\t\t\t counter++; \r\n\t\t\t\t System.out.printf(\"The word '\"+s1 +\"' is present at the position \" + (offset + loc)+\"\\n\"); //printing position of word \r\n\t\t\t } \r\n\t\t}\r\n\t\tif(counter!=0)\r\n\t\t{ \r\n\t\t\t System.out.println(\" In the FILE: \"+filePath.getName()+\"\\n\");\r\n\t\t}\r\n\t\treturn counter; \r\n\t}",
"private String getWord(final int index) {\n int start = 0;\n int length = 0;\n String result = null;\n try {\n start = TextUtils.getWordStart(textKit, index);\n length = TextUtils.getWordEnd(textKit, index) - start;\n result = document.getText(start, length);\n } catch (final BadLocationException e) {\n }\n\n return result;\n }",
"protected java.lang.String readWord() throws java.io.IOException {\n char c = readCharWord();\n java.lang.StringBuilder result = new java.lang.StringBuilder();\n do {\n result.append(c);\n c = next();\n } while (!java.lang.Character.isWhitespace(c));\n return result.toString();\n }",
"public boolean hasWord(String word) {\n return cache.indexOf(word) >= 0;\n }",
"public DictionaryData lookup(String word) {\r\n\r\n return dictionaryMap.get(word.toUpperCase());\r\n }",
"public WordPtBR getWord(String w) throws WordNotFoundExceptionPtBR {\n\t\tInteger offset = index.get(w);\n\t\tif (offset == null) {\n\t\t\t// the word does not exist in the thesaurus\n\t\t\t// throw new WordNotFoundException(w);\n\t\t\tMeaningPtBR meaningPtBR = new MeaningPtBR();\n\t\t\treturn null;\n\t\t}\n\n\t\t// find the word in the data\n\t\ttry {\n\t\t\tdata.seek(offset);\n\t\t\tString line = data.readLine();\n\t\t\tString[] segments = line.split(\"\\\\|\");\n\t\t\tint meaningCount = Integer.parseInt(segments[1]);\n\t\t\tWordPtBR word = new WordPtBR(segments[0], meaningCount);\n\n\t\t\t// read in all the meanings\n\t\t\tfor (int i = 0; i < meaningCount; i++) {\n\n\t\t\t\tword.addMeaning(data.readLine());\n\n\t\t\t}\n\t\t\tdata.close();\n\t\t\treturn word;\n\t\t} catch (IOException e) {\n\t\t\te.getMessage();\n\t\t}\n\n\t\t// something fucked up... this should never happen\n\t\treturn null;\n\t}",
"int sampleOffset();",
"public abstract long getStartOffset();",
"long getEmbeddingTokenLow();",
"long getEmbeddingTokenLow();",
"Optional<MemoryAddress> lookup(String name);",
"public int accessMemory(int id, int pageNumber)\n\t{ \n\t\treturn 0;\n\t}",
"private int loadData() {\n if (position >= numRecords * 2)\n return -1;\n int bufferPos = 0;\n int capacity = byteBuffer.capacity();\n while (bufferPos < capacity && position < numRecords * 2) {\n long curRecordAddress = sortedArray.get(position);\n int recordLen = Platform.getInt(null, curRecordAddress);\n // length + keyprefix + record length\n int length = Integer.BYTES + Long.BYTES + recordLen;\n if (length > capacity) {\n logger.error(\"single record size exceeds PMem read buffer. Please increase buffer size.\");\n }\n if (bufferPos + length <= capacity) {\n long curKeyPrefix = sortedArray.get(position + 1);\n if (length > bytes.length) {\n bytes = new byte[length];\n }\n Platform.putLong(bytes, Platform.BYTE_ARRAY_OFFSET, curKeyPrefix);\n Platform.copyMemory(null, curRecordAddress, bytes, Platform.BYTE_ARRAY_OFFSET + Long.BYTES, length - Long.BYTES);\n byteBuffer.put(bytes, 0, length);\n bufferPos += length;\n position += 2;\n } else {\n break;\n }\n }\n return bufferPos;\n }",
"private String readString(ByteBuffer buf, int size) {\n byte[] bytes = new byte[size];\n\n buf.get(bytes);\n\n String str = new String(bytes);\n\n knownStrs.putIfAbsent(str.hashCode(), str);\n\n if (forwardRead != null && forwardRead.hash == str.hashCode())\n forwardRead.found = true;\n\n return str;\n }",
"public int read(long addr) {\n\t\treturn findBlock(addr);\n\t}",
"public java.lang.String getWord() {\n java.lang.Object ref = word_;\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 word_ = s;\n }\n return s;\n }\n }",
"private static HashMap<String, Integer> getWordIndex()\n\t{\n\t\treturn aWordIndex;\n\t}",
"int getOffset();",
"int getOffset();",
"int getOffset();",
"public int read(int address){\n switch (address){\r\n /*\r\n case 0: {\r\n return registers_w[CONTROL_REGISTER_1];\r\n }\r\n\r\n case 3: {\r\n return spriteMemoryCounter;\r\n }\r\n case 5:{\r\n return registers_w[SCROLL_OFFSET];\r\n }\r\n case 6:{\r\n return horizontalTileCounter | (verticalTileCounter << 5) | (horizontalNameCounter << 10) | (verticalNameCounter << 11);\r\n }\r\n */\r\n\t\t\tcase 0: {\r\n\t\t\t\t\t\treturn scanLine;\r\n\t\t\t\t\t\t// hack\r\n\t\t\t}\r\n case 1: {\r\n return registers_w[CONTROL_REGISTER_2];\r\n }\r\n case STATUS_REGISTER:{ // 2\r\n int returnVal = registers_r[STATUS_REGISTER];\r\n registers_r[STATUS_REGISTER] = getBitsUnset(registers_r[STATUS_REGISTER], STATUS_VBLANK); //| STATUS_SPRITE0_HIT);\r\n isFirstWriteToScroll = true;\r\n lastPPUAddressWasHigh = false;\r\n //logger.info(\"Status is: \" + Integer.toHexString(returnVal));\r\n return returnVal;\r\n }\r\n case SPRITE_MEMORY_DATA:{ // 4\r\n return readFromSpriteMemory();\r\n }\r\n case PPU_MEMORY_DATA:{ // 7\r\n int returnVal = 0xFF & registers_r[PPU_MEMORY_DATA]; // buffered read\r\n \r\n //int returnVal = 0xFF & memory.read(ppuMemoryAddress);\r\n\t\t\tint readAddress = horizontalTileCounter \r\n\t\t\t\t\t\t\t\t| (verticalTileCounter << 5)\r\n\t\t\t\t\t\t\t\t| (horizontalNameCounter << 10)\r\n\t\t\t\t\t\t\t\t| (verticalNameCounter << 11)\r\n\t\t\t\t\t\t\t\t| ((fineVerticalCounter & 0x3) << 12);\r\n\r\n\t\t\tif (readAddress == 0x3F10 || readAddress == 0x3F14 || readAddress == 0x3F18 || readAddress == 0x3F1C) {\r\n\t\t\t\treadAddress = readAddress & 0x3F0F;\r\n\t\t\t}\r\n registers_r[PPU_MEMORY_DATA] = 0xFF & memory.read(readAddress);\r\n // registers_r[PPU_MEMORY_DATA] = 0xFF & memory.read(ppuMemoryAddress);\r\n incrementCounters();\r\n /*\r\n if ((registers_w[CONTROL_REGISTER_1] & CR1_VERTICAL_WRITE) == 0){\r\n ppuMemoryAddress++;\r\n }\r\n else {\r\n ppuMemoryAddress = (ppuMemoryAddress + 32);\r\n }\r\n */\r\n return returnVal;\r\n }\r\n\r\n default: throw new RuntimeException(\"Invalid read attempt: \" + Integer.toHexString(address));\r\n }\r\n }",
"double getOffset();",
"public long retrieve(long record) {\n return (record & MASK) >>> OFFSET;\n }",
"public byte get(int addr) {\n return data[addr - start];\n }",
"public Data getDefinedDataBefore(Address addr);",
"public int getFoundOffset() { return _foundoffset; }",
"private int LinearSearchAfterBinary(String filename, ArrayList<Integer> matchingPositions, String wordToBeSearched, int linesToSkip, boolean reverseFile)\n {\n try\n {\n //Try to open the index file using a Scanner\n Scanner indexFileFileScanner = new Scanner(new File(filename + \".ndx\"));\n\n //Counter for the data page accesses\n int dataPageCounter = 0;\n\n //Flag for the search process status\n boolean searchStatus = true;\n\n //Counter of the word matching\n int wordOccurrences = matchingPositions.size();\n\n //Check whether to search the top or the bottom part of the file\n if(reverseFile)\n {\n //Create an ArrayList object to store the part of the file to continue the search\n ArrayList<String> fileLines = new ArrayList<>();\n\n //Get the necessary lines from the file\n for(int index = 0; index < linesToSkip; index++)\n {\n fileLines.add(indexFileFileScanner.nextLine());\n }\n\n //If the word to be searched length is valid, scan every data page in the ArrayList, in reverse order\n while(fileLines.size() != dataPageCounter && searchStatus)\n {\n //Fetch the data page into the ByteBuffer\n ByteBuffer bytePageBuffer = ByteBuffer.wrap(StringToByteArrayTranslator(fileLines.get(fileLines.size() - dataPageCounter - 1), SizeConstants.getBufferSize()));\n\n //Search for the word to be searched in the data page\n searchStatus = LinearSearchBytePage(wordToBeSearched,bytePageBuffer.array(), matchingPositions);\n\n //Count the data page access\n dataPageCounter++;\n\n //Check if there no more occurrences of the word to be searched\n if(!matchingPositions.isEmpty())\n {\n //If there are continue the search\n if(wordOccurrences != matchingPositions.size())\n {\n wordOccurrences = matchingPositions.size();\n }\n else\n {\n //Stop the search\n searchStatus = false;\n }\n }\n }\n }\n else\n {\n //Skip lines of the file\n SkipLines(indexFileFileScanner, linesToSkip);\n\n //If the word to be searched length is valid, scan every data page in the file\n while(indexFileFileScanner.hasNext() && searchStatus)\n {\n //Fetch the data page into the ByteBuffer\n ByteBuffer bytePageBuffer = ByteBuffer.wrap(StringToByteArrayTranslator(indexFileFileScanner.nextLine(), SizeConstants.getBufferSize()));\n\n //Search for the word to be searched in the data page\n searchStatus = LinearSearchBytePage(wordToBeSearched,bytePageBuffer.array(), matchingPositions);\n\n //Count the data page access\n dataPageCounter++;\n\n //Check if there no more occurrences of the word to be searched\n if(!matchingPositions.isEmpty())\n {\n //If there are continue the search\n if(wordOccurrences != matchingPositions.size())\n {\n wordOccurrences = matchingPositions.size();\n }\n else\n {\n //Stop the search\n searchStatus = false;\n }\n }\n }\n }\n\n //Close the FileScanner\n indexFileFileScanner.close();\n\n //Return the number of data page accesses\n return dataPageCounter;\n }\n catch (FileNotFoundException e)\n {\n //Catch the FileNotFoundException and inform the user\n System.out.println(\"File: \" + this.Filename + \" cannot be opened.\");\n e.printStackTrace();\n return 0;\n }\n }",
"public java.lang.String getWord() {\n java.lang.Object ref = word_;\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 word_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"private int readPage(String loc) throws SAXException\r\n\t{\r\n\t\tif(loc.startsWith(\"page\"))\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tint page = Integer.parseInt(loc.substring(4));\r\n\t\t\t\tif(page < 0 || page > 15) throw new SAXException(\"RAM page \" + page + \" is not valid.\");\r\n\t\t\t\treturn page;\r\n\t\t\t}\r\n\t\t\tcatch(NumberFormatException e)\r\n\t\t\t{\r\n\t\t\t\tthrow new SAXException(\"Cannot decode RAM page \" + loc + \".\", e);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn Variable.ACCESS_BANK;\r\n\t}",
"private int getUseOfLetter(String word) {\n int result = 0;\n for (int i = 0; i < word.length(); i++) {\n result |= tables[word.charAt(i)];\n }\n return result;\n }",
"private String scan() {\n line = line.trim();\n if (line.length() == 0)\n return \"\";\n\n int i = 0;\n while (i < line.length() && line.charAt(i) != ' ' && line.charAt(i) != '\\t') {\n i = i + 1;\n }\n String word = line.substring(0, i);\n line = line.substring(i);\n return word;\n }",
"public void load (Word word, int distance, int lookahead)\n\t\tthrows PersistenceException\n\t{\n\t\tInfo info = (Info)map.get(word);\n\t\tif (info == null || info.loaded) return;\n\t\tList list = info.list;\n\t\tint listSize = list.size();\n\t\tint pos = info.pos;\n\t\tint lastPos = Math.min(listSize, pos + lookahead + 1);\n\t\tArrayList words = new ArrayList();\n\t\tfor (int i = pos; i < lastPos; i++) {\n\t\t\tword = (Word)list.get(i);\n\t\t\tinfo = (Info)map.get(word);\n\t\t\tif (!info.loaded) {\n\t\t\t\twords.add(word);\n\t\t\t\tinfo.loaded = true;\n\t\t\t}\n\t\t}\n\t\tpm.getColocates(words, distance);\n//\t\tCollocateUtils.getColocates(pm, words, distance);\n\t}",
"private static int searchStandardDictionary(String word) {\n if (word.length() < 4) {\n return Arrays.binarySearch(STANDARD_DICTIONARY, 0, FOUR_LETTER_WORDS_OFFSET, word.toUpperCase(Locale.ENGLISH));\n } else {\n return Arrays.binarySearch(STANDARD_DICTIONARY, FOUR_LETTER_WORDS_OFFSET, STANDARD_DICTIONARY.length, word.toUpperCase(Locale.ENGLISH));\n }\n }",
"Constant getStartOffsetConstant();",
"public String getWord()\r\n\t\t{\r\n\t\t\treturn word;\r\n\t\t}",
"public HashMap<String, int[]> documentsContaining(String word) {\n return index.get(word);\n }",
"public String getWord()\n\t{\n\t\treturn word.get(matcher());\n\t}",
"public int getWordPosition() {\n return wordPosition;\n }",
"private int binarySearchReference(String searchForThisWord2, String[] x)\n\t{\n\t\tint wordCounter = Arrays.binarySearch(x, searchForThisWord2);\t//creates an int called wordCounter that will look throu\n\t\twordCounter = wordCounter > 0 ? wordCounter : 1;\t//Gives properties to wordCounter. The first element (a) will be represented as 1\n\t\tSystem.out.println(\"The word \" + searchForThisWord2 + \"'s position in the English Dictionary is \" + wordCounter);\t//print statement\n\t\treturn wordCounter;\t//return the method\n\t}",
"private int BinaryReadIndexFile(String filename, ArrayList<Integer> matchingPositions, String wordToBeSearched)\n {\n try\n {\n //Initialize the file object\n File LocalInputFile = new File(filename + \".ndx\");\n\n //Try to open the index file using a Scanner\n Scanner indexFileFileScanner = new Scanner(LocalInputFile);\n\n //Get the files lines number\n int mMaxFileLines = 0;\n while(indexFileFileScanner.hasNext())\n {\n //Read every line in the file\n indexFileFileScanner.nextLine();\n mMaxFileLines++;\n }\n\n //Index to the bottom part of the search area of the file\n int bottomFilePageIndex = 0;\n \n //Index to the top part of the search area of the file\n int topFilePageIndex = mMaxFileLines;\n\n //Index to the middle data page of the search area of the file\n int middleFilePageIndex;\n \n //Counter for the data page accesses\n int dataPageAccessesCounter = 0;\n \n //Status of the search process\n int searchStatus;\n\n //Search while there are data pages to access, if topFilePageIndex is greater than bottomFilePageIndex, the search fails automatically\n while (bottomFilePageIndex <= topFilePageIndex)\n {\n //Reinitialize the FileScanner object\n indexFileFileScanner = new Scanner(LocalInputFile);\n \n //Find the middle data page index\n middleFilePageIndex = (bottomFilePageIndex + topFilePageIndex)/2;\n\n //Skip the lines until the middle point\n SkipLines(indexFileFileScanner, middleFilePageIndex);\n\n //Fetch the data page from the file\n ByteBuffer bytePageBuffer = ByteBuffer.wrap(StringToByteArrayTranslator(indexFileFileScanner.nextLine(), SizeConstants.getBufferSize()));\n\n //Execute the binary search in the page\n searchStatus = BinarySearchBytePage(wordToBeSearched,bytePageBuffer.array(), matchingPositions, filename, middleFilePageIndex);\n\n //Count the data page access\n dataPageAccessesCounter++;\n\n //If the word's to be searched length is invalid or the word is found in the page, but is neither the first or the last word in the page\n if (searchStatus == -2 || searchStatus == -1)\n {\n //Complete the binary search\n break;\n }\n else if (searchStatus == -3)\n {\n //If the search must be continued in the top part of the search area of the file\n bottomFilePageIndex = middleFilePageIndex + 1;\n }\n else if (searchStatus == -4)\n {\n //If the search must be continued in the bottom part of the search area of the file\n topFilePageIndex = middleFilePageIndex - 1;\n }\n else\n {\n //Add the new data page accesses\n dataPageAccessesCounter += searchStatus;\n\n //Complete the binary search\n break;\n }\n }\n //Close the FileScanner object\n indexFileFileScanner.close();\n\n //Return the number of the data page file accesses\n return dataPageAccessesCounter;\n }\n catch (FileNotFoundException e)\n {\n //Catch the FileNotFoundException and inform the user\n System.out.println(\"File: \" + this.Filename + \" cannot be opened.\");\n e.printStackTrace();\n return 0;\n }\n }",
"public int read(int addressCode) {\n Integer cacheValue = codes.get(addressCode);\n if(cacheValue != null) return cacheValue.intValue();\n\n int value = current.search(addressCode);\n if(value > -1) return value;\n\n// System.out.println(\"===== > \"+databases.size());\n for(int i = 0; i < databases.size(); i++) {\n// System.out.println(\" doc den database thu i \"+ databases.get(i).getName() + \" : \"+ i);\n if(databases.get(i) == current) continue;\n value = databases.get(i).search(addressCode);\n if(value < 0) continue;\n codes.put(addressCode, value);\n tempSize++;\n return value;\n }\n\n return -1;\n }",
"public int getWordStart (int wordIndex) {\n int wordCount = -1;\n int i = 0;\n int start = 0;\n int end = 0;\n while (i < tags.length() && wordCount < wordIndex) {\n start = indexOfNextWordStart (tags, i, slashToSeparate);\n end = indexOfNextSeparator (tags, start, true, true, slashToSeparate);\n wordCount++;\n if (wordCount < wordIndex) {\n i = end + 1;\n }\n }\n return start;\n }",
"public String getRecord(long offset) throws IOException {\n\t\tdataBase.seek(offset);\n\t\treturn dataBase.readLine();\n\t}",
"private String keywordFound(){\r\n\t\tString rtn = \"\";\r\n\t\tString tmp = \"\";\r\n\t\tint carr_pos = getCaretPosition();\r\n\t\t//estract part of text for keyword search\r\n\t\ttry { \r\n\t\tif(carr_pos>50)\r\n\t\t\ttmp = doc.getText(carr_pos-50,50);\r\n\t\telse\r\n\t\t\ttmp = doc.getText(0,carr_pos);\r\n\t\t}catch(BadLocationException a){\r\n\t\t\tSystem.out.println(\"exception\");\r\n\t\t\treturn rtn;\r\n\t\t};\r\n\t\t//Start check\r\n\t\tint i = 0;\r\n\t\tif(tmp.length() >= 2)i = tmp.length()-2;\t\r\n\t\twhile(checkOperator(tmp.charAt(i)) && i > 0){\r\n\t\t\trtn += tmp.charAt(i);\r\n\t\t\ti--;\r\n\t\t}\r\n\t\tif(i == 0)rtn += tmp.charAt(i);\t\t\r\n\t\treturn mirrorString(rtn);\r\n\t}",
"public static int offset_reading() {\n return (32 / 8);\n }",
"@Override\n public void evaluate(Word word, ResultStore<WordWithKey> resultStore) {\n findAlphabeticalSequences(word, resultStore, FORWARDS);\n findAlphabeticalSequences(word, resultStore, BACKWARDS);\n }",
"GlobalVariable getStartOffsetCounterVariable();",
"public String getWord() {\n return this.word;\n }",
"public String getWord()\n\t{\n\t\treturn word;\n\t}",
"short getPageStart();",
"String get(int offset, int length) throws BadLocationException;",
"public Data getDefinedDataContaining(Address addr);",
"public String getWord() {\n if(words[index] != null) {\n return words[index];\n } else {\n return \"\";\n }\n }",
"long getAddress(ByteBuffer buffer);",
"public int startOffset();",
"public int IncrementOffset() {\n int oldOffset = offset;\n offset += MachineDependent.WORDSIZE;\n return oldOffset;\n }",
"public int getWord(int n) {\r\n\t\treturn words.get(n);\r\n\t}",
"public Word getWord(int id);",
"public void computeWords(){\n\n loadDictionary();\n\n CharacterGrid characterGrid = readCharacterGrid();\n\n Set<String> wordSet = characterGrid.findWordMatchingDictionary(dictionary);\n\n System.out.println(wordSet.size());\n for (String word : wordSet) {\n\t System.out.println(word);\n }\n\n // System.out.println(\"Finish scanning character grid in \" + (System.currentTimeMillis() - startTime) + \" ms\");\n }",
"public abstract long getStreamSegmentOffset();",
"public int fromBeginning(String str) {\n if(str == null || str.length() == 0)\n return 0;\n char[] ca = str.toCharArray();\n int res = 0, pre = 0;\n for(char c : ca) {\n res += map.get(c);\n if(pre != 0 && pre < map.get(c))\n res -= 2 * pre;\n pre = map.get(c);\n }\n return res;\n }",
"private int LinearReadIndexFile(String filename, ArrayList<Integer> matchingPositions, String wordToBeSearched)\n {\n try\n { \n //Try to open the index file using a Scanner\n Scanner indexFileFileScanner = new Scanner(new File(filename + \".ndx\"));\n\n //Counter for the data page accesses\n int dataPageCounter = 0;\n \n //Flag for the search process status\n boolean searchStatus = true;\n\n //\n int wordOccurrences = matchingPositions.size();\n \n //If the word to be searched length is valid, scan every data page in the file\n while(indexFileFileScanner.hasNext() && searchStatus)\n {\n //Fetch the data page into the ByteBuffer\n ByteBuffer bytePageBuffer = ByteBuffer.wrap(StringToByteArrayTranslator(indexFileFileScanner.nextLine(), SizeConstants.getBufferSize()));\n\n //Search for the word to be searched in the data page\n searchStatus = LinearSearchBytePage(wordToBeSearched,bytePageBuffer.array(), matchingPositions);\n\n //Count the data page access\n dataPageCounter++;\n\n //Check if there no more occurrences of the word to be searched\n if(!matchingPositions.isEmpty())\n {\n //If there are continue the search\n if(wordOccurrences != matchingPositions.size())\n {\n wordOccurrences = matchingPositions.size();\n }\n else\n {\n //Stop the search\n searchStatus = false;\n }\n }\n }\n \n //Close the FileScanner\n indexFileFileScanner.close();\n \n //Return the number of data page accesses\n return dataPageCounter;\n }\n catch (FileNotFoundException e)\n {\n //Catch the FileNotFoundException and inform the user\n System.out.println(\"File: \" + this.Filename + \" cannot be opened.\");\n e.printStackTrace();\n return 0;\n }\n }",
"String getBegin();",
"public Data getDataBefore(Address addr);",
"public char[] nextToken() {\n\t\t// read and return the next word of the document\n\t\tif(loc<words.length){\n\n\t\t\tString res=words[loc];\n\t\t\tloc++;\n\t\t\treturn res.toCharArray();\n\t\t}\n\n\t\t// or return null if it reaches the end of the document\n\t\treturn null;\n\t}",
"public static void load() {\r\n\t\tString mar = new String(readMAR().getStr());\r\n\t\tTraceINF.write(\"Read memory \"+mar);\r\n\t\tFormatstr content = new Formatstr();\r\n//\t\tSystem.out.println(\"index\"+Integer.parseInt(mar.substring(0, mar.length() - 2), 2));\r\n\t\tcontent.setStr(getBank(mar)[Integer.parseInt(mar.substring(0, mar.length() - 2), 2)]);\r\n\t\t\r\n\t\twriteMBR(content);\r\n\t\tTraceINF.write(\"Read finished.\");\r\n\t}",
"private String getPlace(String[] tokens, int start_index) {\n\t\t\n\t\tint i = start_index + 1;\n\t\tboolean found = false;\n\t\tString ret = \"\";\n\t\t\n\t\twhile(!found && i < tokens.length)\n\t\t{\n\t\t\tif(isWordPlace(tokens[i]))\n\t\t\t{\n\t\t\t\tfound = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(found)\n\t\t{\n\t\t\tret = tokens[i];\n\t\t}\n\t\t\n\t\treturn ret;\n\t}",
"public long memoryAddress()\r\n/* 143: */ {\r\n/* 144:172 */ throw new UnsupportedOperationException();\r\n/* 145: */ }",
"public void onReadShortBegin(ICPU cpu, int addr) {\n\t}"
]
| [
"0.548021",
"0.5315231",
"0.52091146",
"0.5205988",
"0.51705873",
"0.51574206",
"0.5112618",
"0.5082624",
"0.50620013",
"0.5030367",
"0.49533403",
"0.48454723",
"0.4831646",
"0.482565",
"0.4811732",
"0.4803879",
"0.47768116",
"0.47764447",
"0.4764033",
"0.47536018",
"0.4731423",
"0.47093326",
"0.47081822",
"0.46998203",
"0.46978286",
"0.46144795",
"0.46134356",
"0.46049705",
"0.45986104",
"0.45968646",
"0.45864108",
"0.45789126",
"0.4571303",
"0.45412704",
"0.45312747",
"0.45125997",
"0.44933712",
"0.44912934",
"0.44895",
"0.44876912",
"0.44876912",
"0.44861698",
"0.44822145",
"0.44809553",
"0.44630063",
"0.44594786",
"0.4444142",
"0.4441768",
"0.443976",
"0.443976",
"0.443976",
"0.44270548",
"0.44220304",
"0.44204667",
"0.44178596",
"0.44167298",
"0.44146723",
"0.44093215",
"0.44085148",
"0.4406767",
"0.44028744",
"0.43934608",
"0.43931857",
"0.43890795",
"0.43847322",
"0.4383888",
"0.43785432",
"0.4367658",
"0.43667468",
"0.43666875",
"0.43664944",
"0.43659908",
"0.43564904",
"0.4353385",
"0.4342584",
"0.4338087",
"0.433199",
"0.43319276",
"0.431783",
"0.43168756",
"0.43131915",
"0.43108472",
"0.4305374",
"0.43039763",
"0.4303648",
"0.43013614",
"0.43004677",
"0.42959648",
"0.42929065",
"0.42921382",
"0.42919886",
"0.42859077",
"0.42832246",
"0.42806214",
"0.4276091",
"0.42720672",
"0.42717654",
"0.4269699",
"0.42665845",
"0.4266407"
]
| 0.6384056 | 0 |
STUDENT MUST COMPLETE THIS METHOD Copies a line of data from memory into cache. Selects the cache line to replace. Uses the Least Recently Used (LRU) algorithm when a choice must be made between multiple cache lines that could be replaced. | private CacheLine readLineFromMemory(boolean[] address, int setNum, boolean[] tagBits) {
// Use the LRU (least recently used) replacement scheme to select a line
// within the set.
// Read the line from memory. The memory address to read is the
// first memory address of the line that contains the requested address.
// The MainMemory read method should be called.
// Copy the line read from memory into the cache
// replace this placeholder return with the correct line to return
/*COMMENT FOR NICK: The least recently used I don't now how to change. The code below
* sets the first line in the cache set to the LRU but I don't know how to update it
* to the next line over once address is put into the LRU line
*/
int lastUsed=0;
int isFullCheck=0;
int count=0;
int addressToInt []=new int[address.length];
System.out.println("Cache Set: "+setNum);
//loops through the cache set to see if there is a open line if so the address is set into the data
for(int i=0;i<cache[setNum].size();i++) {
if (cache[setNum].getLine(i).getData()==null) {
cache[setNum].getLine(i).setData(mainMemory.read(address,address.length));
if(count==0) {
cache[setNum].getLine(i).setLastUsed(i);
isFullCheck++;
}
count++;
System.out.println("Line read into "+ i +" line: "+ Binary.toString(address));
}
isFullCheck++;
//if the cache set is full the new data takes the place of the LRU line
if(isFullCheck==cache[setNum].size()) {
cache[setNum].getLine(lastUsed).setData(mainMemory.read(address,address.length));
lastUsed++;
System.out.println("Line read into "+lastUsed);
}
}
return new cacheSet.getLine();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void whenReadFileAndAddNewLineToFileThenSecondReadFromHashWithoutLine() {\n Cache cache = new Cache(\"c:/temp\");\n String before = cache.readFile(\"names2.txt\");\n String result = cache.select(\"names2.txt\");\n String path = \"c:/temp/names2.txt\";\n try (FileWriter writer = new FileWriter(path, true);\n BufferedWriter bufferWriter = new BufferedWriter(writer)) {\n bufferWriter.write(\"test\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n result = cache.select(\"names2.txt\");\n assertThat(result, is(before));\n }",
"public void cache(){\n\t\t\n\t\t/*\n\t\t * second, check if there is a cache file\n\t\t * if yes, then check date\n\t\t * if no, then create a cache file \n\t\t*/\n\t\tif(cacheExist()){\n\t\t\t//check date and decide which file to update\n\t\t\tSystem.out.println(\" hahahaha, cache already there! \");\n\t\t\t\n\t\t\tFile cache = new File(\"./cache.txt\");\n\t\t\tsource = readFile(\"./cache.txt\",source);\n\t\t\tSystem.out.println(\"the size of source hashmap : \"+ source.size());\n\t\t\t\n\t\t\tfor(int i = 1; i < fileList.length;i++){\n\t\t\t\t//if this file need to be updated, write the data to source array\n\t\t\t\tif(needToUpdate(fileList[i], cache)){\n\t\t\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"MM/dd/yyyy HH:mm:ss\");\n\t\t\t\t\tSystem.out.println(\"S: \"+ sdf.format(fileList[i].lastModified()) + \" c: \"+ sdf.format(cache.lastModified()));\n\t\t\t\t\tsource = readFile(fileList[i].getPath(), source);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//after checking the whole source file and add the new data to source array\n\t\t\t//then sort the source array and write it to cache\n\t\t\tsort(source);\n\t\t\ttry\n\t\t\t{\n\t\t\t String filename= \"./cache.txt\";\n\t\t\t FileWriter fw = new FileWriter(filename,true); //the true will append the new data\n\t\t\t for(int j = 0; j < writeList.size(); j++){\n\t\t\t\t\tfw.write(writeList.get(j));\n\t\t\t\t}\n\t\t\t fw.close();\n\t\t\t}\n\t\t\tcatch(IOException ioe)\n\t\t\t{\n\t\t\t System.err.println(\"IOException: \" + ioe.getMessage());\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t//there are is no cache, need to create a cache file\n\t\telse{\n\t\t\tSystem.out.println(\" create new cache file !\");\n\t\t\t//create cache file and copy sort the data from source file\n\t\t\t//1. read all the source file and store the data to an arrayList\n\t\t\tfor(int i = 1; i < fileList.length; i++){\n\t\t\t\tsource = readFile(fileList[i].getPath(), source);\t\t\t\n\t\t\t}\n\t\t\tsort(source);\n//\t\t\tSystem.out.println(source);\n\t\t\t\n\t\t\t//2.write the data to the cache file\n\t\t\tPrintWriter writer;\n\t\t\ttry {\n\t\t\t\twriter = new PrintWriter(\"cache.txt\", \"UTF-8\");\t\t\t\n\t\t\t\twriter.println(writeList.size());\n\t\t\t\tfor(int j = 0; j < writeList.size(); j++){\n\t\t\t\t\twriter.println(writeList.get(j));\n\t\t\t\t}\n\t\t\t\twriter.close();\n\t\t\t\t\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t \n\t\t\n\t}",
"private void replaceCache(Entry<V> e) {\n if (sizeT1 + sizeT2 < sizeCache) {\n return;\n }\n\n if (sizeT1 > 0 && (sizeT1 > p || (sizeT1 == p && e.posType == Entry.IN_B2))) {\n Entry<V> m = mid1;\n m.value = null;\n mid1 = mid1.prev;\n\n sizeAdjust(m.posType, Entry.IN_B1);\n m.posType = Entry.IN_B1;\n } else {\n Entry<V> m = mid2;\n m.value = null;\n mid2.value = null;\n mid2 = mid2.prev;\n\n sizeAdjust(m.posType, Entry.IN_B2);\n m.posType = Entry.IN_B2;\n }\n }",
"interface Cache {\n\n /** @return A cache entry for given path string or <code>null</code> (if file cannot be read or too large to cache).\n * This method increments CacheEntry reference counter, caller must call {@link #checkIn(CacheEntry)} to release returned entry (when not null). */\n CacheEntry checkOut(CacheEntryLoader cacheEntryLoader);\n\n /**\n * Method to release cache entry previously obtained from {@link #checkOut(CacheEntryLoader)} call.\n * This method decrements CacheEntry reference counter.\n */\n void checkIn(CacheEntry key);\n\n /** Invalidates cached entry for given path string (if it is cached) */\n void invalidate(String pathString);\n\n void rename(String fromPathString, String toPathString);\n\n// /** Preload given file path in cache (if cache has vacant spot). Preloading happens in background. Preloaded pages initially have zero reference counter. */\n// void preload (String pathString);\n\n /** Clears the cache of all entries (even if some entries are checked out) */\n void clear();\n\n /** Allocates entry of given size for writing.\n * It will not be visible to others until caller calls {@link #update(String, CacheEntry)}.*/\n CacheEntry alloc(long size);\n\n /** Registers recently writtien cache entry as available for reading */\n void update(String pathString, CacheEntry cacheEntry);\n}",
"private synchronized void flushCache() {\n /*\n r6 = this;\n monitor-enter(r6)\n r0 = 0\n java.util.Map<java.lang.String, java.lang.String> r1 = r6.cdY // Catch:{ all -> 0x005a }\n boolean r1 = r1.isEmpty() // Catch:{ all -> 0x005a }\n if (r1 == 0) goto L_0x000c\n monitor-exit(r6)\n return\n L_0x000c:\n r1 = 4\n if (r0 >= r1) goto L_0x0058\n int r1 = r6.cdS // Catch:{ all -> 0x005a }\n r2 = 64\n if (r1 > r2) goto L_0x001e\n int r1 = r6.cdT // Catch:{ all -> 0x005a }\n long r1 = (long) r1 // Catch:{ all -> 0x005a }\n long r3 = r6.cdV // Catch:{ all -> 0x005a }\n int r1 = (r1 > r3 ? 1 : (r1 == r3 ? 0 : -1))\n if (r1 <= 0) goto L_0x0058\n L_0x001e:\n java.util.Map<java.lang.String, java.lang.String> r1 = r6.cdY // Catch:{ all -> 0x005a }\n java.util.Set r1 = r1.entrySet() // Catch:{ all -> 0x005a }\n java.util.Iterator r1 = r1.iterator() // Catch:{ all -> 0x005a }\n java.lang.Object r1 = r1.next() // Catch:{ all -> 0x005a }\n java.util.Map$Entry r1 = (java.util.Map.Entry) r1 // Catch:{ all -> 0x005a }\n java.io.File r2 = new java.io.File // Catch:{ all -> 0x005a }\n java.lang.Object r3 = r1.getValue() // Catch:{ all -> 0x005a }\n java.lang.String r3 = (java.lang.String) r3 // Catch:{ all -> 0x005a }\n r2.<init>(r3) // Catch:{ all -> 0x005a }\n long r2 = r2.length() // Catch:{ all -> 0x005a }\n java.util.Map<java.lang.String, java.lang.String> r4 = r6.cdY // Catch:{ all -> 0x005a }\n java.lang.Object r1 = r1.getKey() // Catch:{ all -> 0x005a }\n r4.remove(r1) // Catch:{ all -> 0x005a }\n java.util.Map<java.lang.String, java.lang.String> r1 = r6.cdY // Catch:{ all -> 0x005a }\n int r1 = r1.size() // Catch:{ all -> 0x005a }\n r6.cdS = r1 // Catch:{ all -> 0x005a }\n int r1 = r6.cdT // Catch:{ all -> 0x005a }\n long r4 = (long) r1 // Catch:{ all -> 0x005a }\n long r4 = r4 - r2\n int r1 = (int) r4 // Catch:{ all -> 0x005a }\n r6.cdT = r1 // Catch:{ all -> 0x005a }\n int r0 = r0 + 1\n goto L_0x000c\n L_0x0058:\n monitor-exit(r6)\n return\n L_0x005a:\n r0 = move-exception\n monitor-exit(r6)\n throw r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.introvd.template.common.bitmapfun.util.DiskLruCache.flushCache():void\");\n }",
"void update(String pathString, CacheEntry cacheEntry);",
"public void loadCachedData(FeatureSequenceData sequence, ArrayList<DataSegment> segments, String trackName, int organism, String genomebuild) throws SystemError {\n String chromosome=sequence.getChromosome(); \n int start=sequence.getRegionStart();\n int end=sequence.getRegionEnd(); \n ArrayList<int[]> overlaps=lookupRegion(trackName, organism, genomebuild, chromosome, start, end); // find all cache files that overlap with the region\n if (overlaps!=null){ \n final String subdir=getCacheDirectory(trackName, organism, genomebuild, chromosome);\n //engine.logMessage(\"Found overlap in cache\");\n for (int i=0;i<segments.size();i++) { // process segments one by one\n //engine.logMessage(\"Cache:[\"+i+\"] Processing segment \"+(i+1)+\" of \"+segments.size()+\": \"+segments.get(i).toString());\n DataSegment segment=segments.get(i);\n if (segment.containsData()) continue;\n ArrayList<int[]> overlapsSegment=getOverlapping(overlaps, segment.getSegmentStart(), segment.getSegmentEnd());\n if (!overlapsSegment.isEmpty()) {\n // split up this segment based on which segments are available in the cache\n ArrayList<DataSegment> splits=splitSegment(segment, overlapsSegment);\n if (splits==null) {\n engine.logMessage(\"SYSTEM WARNING: Detected problems while processing cached data (error code:19431)\");\n return;\n } \n // now fill in the (exact) segments that are in the cache\n for (int[] sub:overlapsSegment) {\n DataSegment subsegment=findMatchingSegment(splits, sub);\n if (subsegment!=null) {\n boolean ok=fillSegmentWithDataFromCache(subsegment, sub, subdir);\n if (ok) subsegment.setSaveToCache(true); // save back to cache (but only if the new sequence region covers a greater region than currently cached segments)\n } else engine.logMessage(\"SYSTEM WARNING: Detected potential problems while processing cached data (error code:19432)\");\n }\n // replace the old segments with the new and adjust loop-pointer\n segments.remove(i);\n segments.addAll(i, splits);\n //engine.logMessage(\"Replacing segment [\"+i+\"] with \"+splits.size()+\" new segments\");\n i+=(splits.size()-1); // i will increased by +1 more when the loop restarts\n }\n } // end for each segment\n }\n String error=checkSegments(segments, start, end);\n if (error!=null) {\n engine.logMessage(\"SYSTEM WARNING: Detected problems while processing cached data (error code:\"+error+\")\");\n // DataLoader.debugSegments(segments);\n } \n }",
"private String DoFindReplace(String line)\n {\n String newLine = line;\n\n for (String findKey : lineFindReplace.keySet())\n {\n String repValue = lineFindReplace.get(findKey).toString();\n\n Pattern findPattern = Pattern.compile(findKey);\n Matcher repMatcher = findPattern.matcher(newLine);\n\n newLine = repMatcher.replaceAll(repValue);\n }\n return(newLine);\n }",
"public static void main(String[] args) {\n LRUCache cach = new LRUCache(2);\r\n cach.set(2, 1);\r\n cach.set(1, 1);\r\n cach.set(2, 3);\r\n cach.set(4,1);\r\n cach.doubly.display();\r\n System.out.println (cach.get(1));\r\n //cach.doubly.display();\r\n //cach.set(1,1);\r\n \r\n cach.doubly.display();\r\n System.out.println (cach.get(2));\r\n // cach.doubly.display();\r\n // System.out.println (cach.get(2));\r\n // cach.doubly.display();\r\n\t}",
"void cache(String key, T value) throws IOException;",
"public void filterLine(String line){\n linesToFilter.put(line, line);\n }",
"public void cacheResult(DataEntry dataEntry);",
"public void cacheBusRouteData()\n\t{\t\n\t\tdataMap = BusRouteDataFileReader.readAndCacheBusRouteData(this.pathname);\n\t}",
"public void cacheResult(ua.org.gostroy.guestbook.model.Entry3 entry3);",
"@Override\n public void cacheProgram(Program program) {\n Uri uri = ContentUris.withAppendedId(ProgramTable.TABLE_URI, program.getId());\n\n // delete the cached program if it exists\n contentResolver.delete(uri, null, null);\n\n ContentValues values = Programs.toContentValues(program);\n Uri id = contentResolver.insert(uri, values);\n assert(uri.equals(id));\n }",
"public static void alloc_cache_rp(int request, int index_set, Cache[] cache_rp, Memory[] memory_rp, MCT[] mct_rp){\n\t\tint num=0,min=0,random_in_set=0,replace_index=0;\n\t\tint[][] tmp = new int[4][2];\n\t\t\n\t\tfor(int i=0;i<4;i++){\n\t\t\ttmp[i][0]=index_set*4+i;\n\t\t\ttmp[i][1]=cache_rp[index_set*4+i].priority;\n\t\t}\n\t\tmin=tmp[0][1];\n\t\tfor(int j=0;j<4;j++){ //find the minimum in all priorities\n\t\t\tif(min>tmp[j][1]){\n\t\t\t\tmin=tmp[j][1];\n\t\t\t}\n\t\t}\n\t\tfor(int k=0;k<4;k++){\n\t\t\tif(min==tmp[k][1]){\n\t\t\t\tnum++;\n\t\t\t}\n\t\t}\n\t\t\n\t\trandom_in_set=random_seed(num)+1;\n\t\tfor(int m=0;m<4;m++){\t\t//randomly choose the one in all cache lines with same minimal priority\n\t\t\tif(min==cache_rp[index_set*4+m].priority){\n\t\t\t\tif(random_in_set==1){\n\t\t\t\t\treplace_index=index_set*4+m;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\trandom_in_set--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tmct_rp[index_set].tag=cache_rp[replace_index].address;\n\t\tcache_rp[replace_index].address=memory_rp[request].address;\n\t\tcache_rp[replace_index].content=memory_rp[request].content;\n\t\tcache_rp[replace_index].priority=memory_rp[request].priority;\t\t\n\t}",
"public cache_lines init_cache_lines(int set) {\n this.set = set;\n this.tag = -99;\n this.valid = 0;\n for(int i=0;i< this.data.length;i++)\n {\n this.data[0] = 0;\n }\n return this;\n }",
"public static void main(String args[]){\n LRUCache cache = new LRUCache(2);\n\n cache.put(1, 1);\n cache.put(2, 2);\n System.out.println(cache.get(1)); // returns 1\n cache.put(3, 3); // evicts key 2\n System.out.println(cache.get(2)); // returns -1 (not found)\n cache.put(4, 4); // evicts key 1\n System.out.println(cache.get(1)); // returns -1 (not found)\n System.out.println(cache.get(3)); // returns 3\n System.out.println(cache.get(4)); // returns 4\n }",
"private synchronized void checkCache(java.lang.Object r8) {\r\n /*\r\n r7 = this;\r\n monitor-enter(r7);\r\n r0 = \"RendererCoreCache\";\r\n r1 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00aa }\r\n r1.<init>();\t Catch:{ all -> 0x00aa }\r\n r2 = \"checkCache: \";\r\n r1.append(r2);\t Catch:{ all -> 0x00aa }\r\n r1.append(r8);\t Catch:{ all -> 0x00aa }\r\n r1 = r1.toString();\t Catch:{ all -> 0x00aa }\r\n android.util.Log.d(r0, r1);\t Catch:{ all -> 0x00aa }\r\n r0 = r7.mCaches;\t Catch:{ all -> 0x00aa }\r\n r0 = r0.get(r8);\t Catch:{ all -> 0x00aa }\r\n r0 = (miui.maml.util.RendererCoreCache.RendererCoreInfo) r0;\t Catch:{ all -> 0x00aa }\r\n if (r0 != 0) goto L_0x0039;\r\n L_0x0021:\r\n r1 = \"RendererCoreCache\";\r\n r2 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00aa }\r\n r2.<init>();\t Catch:{ all -> 0x00aa }\r\n r3 = \"checkCache: the key does not exist, \";\r\n r2.append(r3);\t Catch:{ all -> 0x00aa }\r\n r2.append(r8);\t Catch:{ all -> 0x00aa }\r\n r2 = r2.toString();\t Catch:{ all -> 0x00aa }\r\n android.util.Log.d(r1, r2);\t Catch:{ all -> 0x00aa }\r\n monitor-exit(r7);\r\n return;\r\n L_0x0039:\r\n r1 = r0.accessTime;\t Catch:{ all -> 0x00aa }\r\n r3 = 9223372036854775807; // 0x7fffffffffffffff float:NaN double:NaN;\r\n r1 = (r1 > r3 ? 1 : (r1 == r3 ? 0 : -1));\r\n if (r1 != 0) goto L_0x0046;\r\n L_0x0044:\r\n monitor-exit(r7);\r\n return;\r\n L_0x0046:\r\n r1 = java.lang.System.currentTimeMillis();\t Catch:{ all -> 0x00aa }\r\n r3 = r0.accessTime;\t Catch:{ all -> 0x00aa }\r\n r1 = r1 - r3;\r\n r3 = r0.cacheTime;\t Catch:{ all -> 0x00aa }\r\n r3 = (r1 > r3 ? 1 : (r1 == r3 ? 0 : -1));\r\n if (r3 < 0) goto L_0x006f;\r\n L_0x0053:\r\n r3 = r7.mCaches;\t Catch:{ all -> 0x00aa }\r\n r3.remove(r8);\t Catch:{ all -> 0x00aa }\r\n r3 = \"RendererCoreCache\";\r\n r4 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00aa }\r\n r4.<init>();\t Catch:{ all -> 0x00aa }\r\n r5 = \"checkCache removed: \";\r\n r4.append(r5);\t Catch:{ all -> 0x00aa }\r\n r4.append(r8);\t Catch:{ all -> 0x00aa }\r\n r4 = r4.toString();\t Catch:{ all -> 0x00aa }\r\n android.util.Log.d(r3, r4);\t Catch:{ all -> 0x00aa }\r\n goto L_0x00a8;\r\n L_0x006f:\r\n r3 = 0;\r\n r3 = (r1 > r3 ? 1 : (r1 == r3 ? 0 : -1));\r\n if (r3 >= 0) goto L_0x007d;\r\n L_0x0075:\r\n r3 = java.lang.System.currentTimeMillis();\t Catch:{ all -> 0x00aa }\r\n r0.accessTime = r3;\t Catch:{ all -> 0x00aa }\r\n r1 = 0;\r\n L_0x007d:\r\n r3 = r7.mHandler;\t Catch:{ all -> 0x00aa }\r\n r4 = r0.checkCache;\t Catch:{ all -> 0x00aa }\r\n r5 = r0.cacheTime;\t Catch:{ all -> 0x00aa }\r\n r5 = r5 - r1;\r\n r3.postDelayed(r4, r5);\t Catch:{ all -> 0x00aa }\r\n r3 = \"RendererCoreCache\";\r\n r4 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00aa }\r\n r4.<init>();\t Catch:{ all -> 0x00aa }\r\n r5 = \"checkCache resheduled: \";\r\n r4.append(r5);\t Catch:{ all -> 0x00aa }\r\n r4.append(r8);\t Catch:{ all -> 0x00aa }\r\n r5 = \" after \";\r\n r4.append(r5);\t Catch:{ all -> 0x00aa }\r\n r5 = r0.cacheTime;\t Catch:{ all -> 0x00aa }\r\n r5 = r5 - r1;\r\n r4.append(r5);\t Catch:{ all -> 0x00aa }\r\n r4 = r4.toString();\t Catch:{ all -> 0x00aa }\r\n android.util.Log.d(r3, r4);\t Catch:{ all -> 0x00aa }\r\n L_0x00a8:\r\n monitor-exit(r7);\r\n return;\r\n L_0x00aa:\r\n r8 = move-exception;\r\n monitor-exit(r7);\r\n throw r8;\r\n */\r\n throw new UnsupportedOperationException(\"Method not decompiled: miui.maml.util.RendererCoreCache.checkCache(java.lang.Object):void\");\r\n }",
"public static void setLineChartMapInCache(Map<String,String> dataMap,String orderId, boolean isNoise, double threshold){\n \tString key=LINE_CHART_KEY+\"_\"+orderId+isNoise+threshold;\n \tif(memcache !=null && memcache.contains(key)){\n \t\tmemcache.delete(key);\n \t}\n \tmemcache.put(key, dataMap,Expiration.byDeltaSeconds(3600));\n\t}",
"@SuppressWarnings(\"unused\")\n\t@Override\n\tpublic void run() {\n\t\tList<LineageCacheEntry> lockedOrLiveEntries = new ArrayList<>();\n\t\tint count = 0;\n\n\t\t// Stop if 1) Evicted the request number of entries, 2) The parallel\n\t\t// CPU instruction is ended, and 3) No non-live entries left in the cache.\n\t\tlong t0 = DMLScript.STATISTICS ? System.nanoTime() : 0;\n\t\t/*while (!LineageGPUCacheEviction.isGPUCacheEmpty())\n\t\t{\n\t\t\tif (LineageCacheConfig.STOPBACKGROUNDEVICTION)\n\t\t\t\t// This logic reduces #evictions if the cpu instructions is so small\n\t\t\t\t// that it ends before the background thread reaches this condition.\n\t\t\t\t// However, this check decreases race conditions.\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tif (numEvicts > 0 && count > numEvicts)\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tLineageCacheEntry le = LineageGPUCacheEviction.pollFirstEntry();\n\t\t\tGPUObject cachedGpuObj = le.getGPUObject();\n\t\t\tGPUObject headGpuObj = cachedGpuObj.lineageCachedChainHead != null\n\t\t\t\t\t? cachedGpuObj.lineageCachedChainHead : cachedGpuObj;\n\t\t\t// Check and continue if any object in the linked list is locked\n\t\t\tboolean lockedOrLive = false;\n\t\t\tGPUObject nextgpuObj = headGpuObj;\n\t\t\twhile (nextgpuObj!= null) {\n\t\t\t\tif (!nextgpuObj.isrmVarPending() || nextgpuObj.isLocked()) // live or locked\n\t\t\t\t\tlockedOrLive = true;\n\t\t\t\tnextgpuObj = nextgpuObj.nextLineageCachedEntry;\n\t\t\t}\n\t\t\tif (lockedOrLive) {\n\t\t\t\tlockedOrLiveEntries.add(le);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// TODO: First remove the gobj chains that don't contain any live and dirty objects.\n\t\t\t//currentAvailableMemory += headGpuObj.getSizeOnDevice();\n\n\t\t\t// Copy from device to host for all live and dirty objects\n\t\t\tboolean copied = false;\n\t\t\tnextgpuObj = headGpuObj;\n\t\t\twhile (nextgpuObj!= null) {\n\t\t\t\t// Keeping isLinCached as True here will save data deletion by copyFromDeviceToHost\n\t\t\t\tif (!nextgpuObj.isrmVarPending() && nextgpuObj.isDirty()) { //live and dirty\n\t\t\t\t\tnextgpuObj.copyFromDeviceToHost(null, true, true);\n\t\t\t\t\tcopied = true;\n\t\t\t\t}\n\t\t\t\tnextgpuObj.setIsLinCached(false);\n\t\t\t\tnextgpuObj = nextgpuObj.nextLineageCachedEntry;\n\t\t\t}\n\n\t\t\t// Copy from device cache to CPU lineage cache if not already copied\n\t\t\tLineageGPUCacheEviction.copyToHostCache(le, null, copied);\n\n\t\t\t// For all the other objects, remove and clear data (only once)\n\t\t\tnextgpuObj = headGpuObj;\n\t\t\tboolean freed = false;\n\t\t\tsynchronized (nextgpuObj.getGPUContext().getMemoryManager().getGPUMatrixMemoryManager().gpuObjects) {\n\t\t\t\twhile (nextgpuObj!= null) {\n\t\t\t\t\t// If not live or live but not dirty\n\t\t\t\t\tif (nextgpuObj.isrmVarPending() || !nextgpuObj.isDirty()) {\n\t\t\t\t\t\tif (!freed) {\n\t\t\t\t\t\t\tnextgpuObj.clearData(null, true);\n\t\t\t\t\t\t\t//FIXME: adding to rmVar cache causes multiple failures due to concurrent\n\t\t\t\t\t\t\t//access to the rmVar cache and other data structures. VariableCP instruction\n\t\t\t\t\t\t\t//and other instruction free memory and add to rmVar cache in parallel to\n\t\t\t\t\t\t\t//the background eviction task, which needs to be synchronized.\n\t\t\t\t\t\t\tfreed = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tnextgpuObj.clearGPUObject();\n\t\t\t\t\t}\n\t\t\t\t\tnextgpuObj = nextgpuObj.nextLineageCachedEntry;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Clear the GPUOjects chain\n\t\t\tGPUObject currgpuObj = headGpuObj;\n\t\t\twhile (currgpuObj.nextLineageCachedEntry != null) {\n\t\t\t\tnextgpuObj = currgpuObj.nextLineageCachedEntry;\n\t\t\t\tcurrgpuObj.lineageCachedChainHead = null;\n\t\t\t\tcurrgpuObj.nextLineageCachedEntry = null;\n\t\t\t\tnextgpuObj.lineageCachedChainHead = null;\n\t\t\t\tcurrgpuObj = nextgpuObj;\n\t\t\t}\n\n\t\t\t//if(currentAvailableMemory >= size)\n\t\t\t\t// This doesn't guarantee allocation due to fragmented freed memory\n\t\t\t//\tA = cudaMallocNoWarn(tmpA, size, null); \n\t\t\tif (DMLScript.STATISTICS) {\n\t\t\t\tLineageCacheStatistics.incrementGpuAsyncEvicts();\n\t\t\t}\n\t\t\tcount++;\n\t\t}\n\n\t\t// Add the locked entries back to the eviction queue\n\t\tif (!lockedOrLiveEntries.isEmpty())\n\t\t\tLineageGPUCacheEviction.addEntryList(lockedOrLiveEntries);\n\t\t\n\t\tif (DMLScript.STATISTICS) //TODO: dedicated statistics for lineage\n\t\t\tGPUStatistics.cudaEvictTime.add(System.nanoTime() - t0); */\n\t}",
"public void updateCache() {\n\n log.info(\"Updating solar flare cache\");\n Date fallbackStartDate = DateHelper.getFallbackDate();\n solarFlareRepository.count()\n .map(total -> {\n if (total > 0) {\n solarFlareRepository.findTopByBeginTimeIsNotNullOrderByBeginTimeDesc()\n .map(solarFlare -> {\n log.info(\"Entries exist, performing incremental update\");\n log.info(\n \"Last entry found at {}\",\n DateHelper.getPrintableString(solarFlare.getBeginTime())\n );\n collectForRange(solarFlare.getBeginTime(), null);\n return solarFlare;\n })\n .subscribe();\n } else {\n log.info(\"No entries found, performing a full import\");\n collectForRange(fallbackStartDate, null);\n }\n return total;\n })\n .subscribe();\n }",
"@Override\n\tpublic CacheData updateByTimestamp(String timestamp) {\n\t\treturn null;\n\t}",
"public interface ICache {\n\t\n\t/**\n\t * <p>\n\t * get the Cached Object from cache pool by the cache String key\n\t * @param key\n\t * @return\n\t */\n\tpublic Object get(String key);\n\t\n\t\n\t\n\t/**\n\t * <p>\n\t * \n\t * @param key\n\t * @return old cache object \n\t */\n\tpublic Object put(String key,Object value);\n\t\n\t/**\n\t * <p>\n\t * get the Cached Object from cache pool by the cache String key quietly,\n\t * without update the statistic data\n\t * @param key\n\t * @return\n\t */\n\tpublic Object getQuiet(String key);\n\t\n\t\n\t/**\n\t * <p>\n\t * remove the cached object from cache pool by the cache String key\n\t * @param key\n\t * @return\n\t */\n\tpublic Object remove(String key);\n\t\n\t/**\n\t * <p>\n\t * free specied size mem\n\t * @param size unit in Byte\n\t * @return\n\t */\n\tpublic long free(long size);\n\t\n\t\n\t/**\n\t * <p>\n\t * flush to the underly resource\n\t */\n\tpublic void flush();\n\t\n}",
"StoreResponse replace(CACHE_ELEMENT e);",
"@Override\n\t\t\tpublic void updateClientCacheInfo(RowIdentifier firstRow,\n\t\t\t\t\tint numberOfRows) {\n\n\t\t\t}",
"protected void addShiftToCache () {\n if (digitalShift == null)\n for (int j = 0; j < dimS; j++)\n cachedCurPoint[j] = 0;\n else\n for (int j = 0; j < dimS; j++)\n cachedCurPoint[j] = digitalShift[j];\n }",
"void resetCache();",
"private boolean updateCache(String type) {\n\t\treturn false;\n\t}",
"private SmallAttributeSet\n cacheAttributeSet(final AttributeSet aSet) {\n\n collectGarbageInCache();\n\n Reference r = (Reference)cache.get(aSet);\n SmallAttributeSet as = null;\n if (r != null) {\n as = (SmallAttributeSet)r.get();\n }\n\n if (as == null) {\n as = createSmallAttributeSet(aSet);\n cache.put(as, new WeakReference(as));\n }\n\n return as;\n }",
"protected void addShiftToCache () {\n if (digitalShift == null)\n for (int j = 0; j <= dim; j++)\n cachedCurPoint[j] = 0;\n else\n for (int j = 0; j <= dim; j++)\n cachedCurPoint[j] = digitalShift[j];\n }",
"private void ensureRowCached(int rowIndex) {\n if(!isRowCached(rowIndex)) {\n //HAVE TO FETCH DATA FROM THE REMOTE STORE\n \n //SET THE toIndex AND fromIndex VARIABLES\n \n //TEST IF THE USER IS DESCENDING THE TABLE\n if (rowIndex >= lastRequiredFetchRowIndex) {\n fromIndex = rowIndex;\n toIndex = rowIndex+chunkSize;\n\t\n\t\t\t\ttry {\n if(toIndex > tableDescription.getRowCount()) {\n toIndex = tableDescription.getRowCount();\n }\n\t\t\t\t}\n\t\t\t\tcatch(Exception ex) {\n\t\t\t\t\tex.printStackTrace();\t\n\t\t\t\t}\n }\n \n //USER IS ASCENDING THE TABLE\n else {\n fromIndex = rowIndex-chunkSize;\n if(fromIndex < 0) {\n fromIndex = 0;\n }\n toIndex = rowIndex+1;\n }\n \n Object[][] rows = null;\n //RETRIEVE THE DATA\n try {\n rows = tableDataSource.retrieveRows(fromIndex, toIndex);\n }\n catch(Exception ex) {\n ex.printStackTrace();\n throw new RuntimeException(\"Problem occurred retrieving table data \\n\");\n }\n \n //ADD THE DATA TO THE CACHE\n for(int i = 0; i < rows.length; i++) {\n //SET THE VALUE IN THE DATA ARRAY\n data[writePositionIndex] = rows[i];\n \n //CREATE AN INDEX TO THE NEW CACHED DATA\n tableIndex = fromIndex+i;\n rowIndexLookup[writePositionIndex] = tableIndex;\n \n //CLOCK UP writePositionIndex AND REZERO IF NECESSARY\n if(writePositionIndex == (maximumCacheSize-1)) {\n writePositionIndex = 0;\n }\n else {\n writePositionIndex++;\n }\n lastRequiredFetchRowIndex = rowIndex;\n }\n }\n }",
"public void entryTouched(OldOldCache.Entry entry);",
"private void addProfileDataToCache(String userId, Document content) {\n \t\n \t\tlruCache.put(userId, content);\n \t}",
"Cache(){\n // If the files exist, load the contents into memory as matrices.\n if(distanceFile.exists() && validMoveFile.exists()){\n try{\n FileInputStream in = new FileInputStream(distanceFile);\n byte[] tempDist = new byte[200 * 200 * 12 * 9 * 5];\n // Reads the file as a byte array, then stores it as a byte matrix.\n in.read(tempDist);\n int i = 0;\n for(int start = 1; start < 200; start++)\n for(int to = 1; to < 200; to++)\n for(int taxi = 0; taxi < 12; taxi++)\n for(int bus = 0; bus < 9; bus++)\n for(int underground = 0; underground < 5; underground++)\n distance[start][to][taxi][bus][underground] = tempDist[i++];\n\n in = new FileInputStream(validMoveFile);\n byte[] tempMoves = new byte[4 * 200 * 162];\n // Reads the file as a byte array, then stores it as an int matrix.\n in.read(tempMoves);\n i = 0;\n\n for(int node = 1; node < 200; node++)\n for(int taxi = 0; taxi < 3; taxi++)\n for(int bus = 0; bus < 3; bus++)\n for(int underground = 0; underground < 3; underground++)\n for(int doublet = 0; doublet < 2; doublet++)\n for(int secret = 0; secret < 3; secret++){\n // Compute the int from 4 consecutive bytes in the byte array\n for(int b = 0; b < 4; b++)\n validMoves[node][taxi][bus][underground][doublet][secret] =\n (validMoves[node][taxi][bus][underground][doublet][secret] << 8) | (tempMoves[b + i] & 0xFF);\n i += 4;\n }\n }\n catch(Exception e){\n System.out.println(\"Exception: \" + e);\n }\n }\n }",
"public void cacheResult(PlanoSaude planoSaude);",
"private void addProfileDataToCache(String userId, Document content) {\n\t\t// If caching is disabled , no action\n\t\tif (this.cacheSize == 0) {\n\t\t\treturn;\n\t\t}\n\t\t// Limit the cache size as per options\n\t\t// to check if cache is full , remove if full using LRU algorithm\n\t\t// for now remove first entry in the cache\n\t\tif (cache.size() == this.cacheSize) {\n\t\t\tIterator<String> iterator = cache.keySet().iterator();\n\t\t\tif (iterator.hasNext()) {\n\t\t\t\tString firstEntry = iterator.next();\n\t\t\t\tcache.remove(firstEntry);\n\t\t\t}\n\t\t}\n\t\tcache.put(userId, content);\n\t}",
"private void reloadData() throws IOException\n {\n /* Reload data from file, if it is modified after last scan */\n long mtime = loader.getModificationTime();\n if (mtime < lastKnownMtime) {\n return;\n }\n lastKnownMtime = mtime;\n\n InputStream in = loader.getInputStream();\n BufferedReader bin = new BufferedReader(new InputStreamReader(in));\n cache.clear();\n String line;\n while ((line = bin.readLine()) != null) {\n try {\n Map<String, Object> tuple = reader.readValue(line);\n updateLookupCache(tuple);\n } catch (JsonProcessingException parseExp) {\n logger.info(\"Unable to parse line {}\", line);\n }\n }\n IOUtils.closeQuietly(bin);\n IOUtils.closeQuietly(in);\n }",
"public void setCached() {\n }",
"public static void alloc_cache_r(int request, int index_set,Memory[] memory_r, Cache[] cache_r, MCT[] mct_r){\n\t\tint replace_index=index_set*4+random_in_set_alloc_producer();\n\t\tmct_r[index_set].tag=cache_r[replace_index].address;\n\t\t\n\t\tcache_r[replace_index].address=memory_r[request].address;\n\t\tcache_r[replace_index].content=memory_r[request].content;\n\t\tcache_r[replace_index].priority=memory_r[request].priority;\n\t}",
"public void resetCache() {\n logger.info(\"resetCache(): refilling clinical attribute cache\");\n\n Date dateOfCurrentCacheRefresh = new Date();\n ArrayList<ClinicalAttributeMetadata> latestClinicalAttributeMetadata = null;\n // latestOverrides is a map of study-id to list of overridden ClinicalAttributeMetadata objects\n Map<String, ArrayList<ClinicalAttributeMetadata>> latestOverrides = null;\n\n // attempt to refresh ehcache stores seperately and store success status\n boolean failedClinicalAttributeMetadataCacheRefresh = false;\n boolean failedOverridesCacheRefresh = false;\n try {\n clinicalAttributeMetadataPersistentCache.updateClinicalAttributeMetadataInPersistentCache();\n } catch (RuntimeException e) {\n logger.error(\"resetCache(): failed to pull clinical attributes from repository. Error message returned: \" + e.getMessage());\n failedClinicalAttributeMetadataCacheRefresh = true;\n }\n\n try {\n clinicalAttributeMetadataPersistentCache.updateClinicalAttributeMetadataOverridesInPersistentCache();\n } catch (RuntimeException e) {\n logger.error(\"resetCache(): failed to pull overrides from repository. Error message returned: \" + e.getMessage());\n failedOverridesCacheRefresh = true;\n }\n\n // regardless of whether ehcache was updated with new data - use that data to populate modeled object caches\n // ensures app starts up (between tomcat restarts) if TopBraid is down\n logger.info(\"Loading modeled object cache from EHCache\");\n try {\n // this will throw an exception if we cannot connect to TopBraid AND cache is corrupt\n latestClinicalAttributeMetadata = clinicalAttributeMetadataPersistentCache.getClinicalAttributeMetadataFromPersistentCache();\n latestOverrides = clinicalAttributeMetadataPersistentCache.getClinicalAttributeMetadataOverridesFromPersistentCache();\n } catch (Exception e) {\n try {\n // this will throw an exception if backup is unavailable\n logger.error(\"Unable to load modeled object cache from default EHCache... attempting to read from backup\");\n latestClinicalAttributeMetadata = clinicalAttributeMetadataPersistentCache.getClinicalAttributeMetadataFromPersistentCacheBackup();\n latestOverrides = clinicalAttributeMetadataPersistentCache.getClinicalAttributeMetadataOverridesFromPersistentCacheBackup();\n if (latestClinicalAttributeMetadata == null || latestOverrides == null) {\n throw new FailedCacheRefreshException(\"No data found in specified backup cache location...\", new Exception());\n }\n } catch (Exception e2) {\n logger.error(\"Unable to load modeled object cache from backup EHCache...\");\n throw new FailedCacheRefreshException(\"Unable to load data from all backup caches...\", new Exception());\n }\n }\n\n // backup cache at this point (maybe backup after each successful update above?)\n if (!failedClinicalAttributeMetadataCacheRefresh && !failedOverridesCacheRefresh) {\n logger.info(\"resetCache(): cache update succeeded, backing up cache...\");\n try {\n clinicalAttributeMetadataPersistentCache.backupClinicalAttributeMetadataPersistentCache(latestClinicalAttributeMetadata);\n clinicalAttributeMetadataPersistentCache.backupClinicalAttributeMetadataOverridesPersistentCache(latestOverrides);\n logger.info(\"resetCache(): succesfully backed up cache\");\n } catch (Exception e) {\n logger.error(\"resetCache(): failed to backup cache: \" + e.getMessage());\n }\n }\n\n HashMap<String, ClinicalAttributeMetadata> latestClinicalAttributeMetadataCache = new HashMap<String, ClinicalAttributeMetadata>();\n for (ClinicalAttributeMetadata clinicalAttributeMetadata : latestClinicalAttributeMetadata) {\n latestClinicalAttributeMetadataCache.put(clinicalAttributeMetadata.getColumnHeader(), clinicalAttributeMetadata);\n }\n\n // latestOverridesCache is a map of study-id to map of clinical attribute name to overridden ClinicalAttributeMetadata object\n HashMap<String, Map<String,ClinicalAttributeMetadata>> latestOverridesCache = new HashMap<String, Map<String, ClinicalAttributeMetadata>>();\n for (Map.Entry<String, ArrayList<ClinicalAttributeMetadata>> entry : latestOverrides.entrySet()) {\n HashMap<String, ClinicalAttributeMetadata> clinicalAttributesMetadataMapping = new HashMap<String, ClinicalAttributeMetadata>();\n for (ClinicalAttributeMetadata clinicalAttributeMetadata : entry.getValue()) {\n fillOverrideAttributeWithDefaultValues(clinicalAttributeMetadata, latestClinicalAttributeMetadataCache.get(clinicalAttributeMetadata.getColumnHeader()));\n clinicalAttributesMetadataMapping.put(clinicalAttributeMetadata.getColumnHeader(), clinicalAttributeMetadata);\n }\n latestOverridesCache.put(entry.getKey(), clinicalAttributesMetadataMapping);\n }\n\n clinicalAttributeCache = latestClinicalAttributeMetadataCache;\n logger.info(\"resetCache(): refilled cache with \" + latestClinicalAttributeMetadata.size() + \" clinical attributes\");\n overridesCache = latestOverridesCache;\n logger.info(\"resetCache(): refilled overrides cache with \" + latestOverrides.size() + \" overrides\");\n\n if (failedClinicalAttributeMetadataCacheRefresh || failedOverridesCacheRefresh) {\n logger.info(\"Unable to update cache with latest data from TopBraid... falling back on EHCache store.\");\n throw new FailedCacheRefreshException(\"Failed to refresh cache\", new Exception());\n } else {\n dateOfLastCacheRefresh = dateOfCurrentCacheRefresh;\n logger.info(\"resetCache(): cache last refreshed on: \" + dateOfLastCacheRefresh.toString());\n }\n }",
"public void put(String param1, Cache.Entry param2) {\n }",
"void invalidateCache();",
"protected void createLookupCache()\n/* */ {\n/* 1260 */ this.lookup = new SimpleCache(1, Math.max(getSize() * 2, 64));\n/* */ }",
"public void cache(int variableId, int value) {\n localCache.put(variableId, value);\n }",
"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 }",
"public static void putCacheValue(int distanceLeft, long valueToCache, int cacheNumber){\n SuperSavvyTrieHelper2 internalCache = cache.get(cacheNumber).get(distanceLeft);\n if (internalCache != null){\n internalCache.put(valueToCache);\n } else {\n internalCache = new SuperSavvyTrieHelper2(distanceLeft);\n internalCache.put(valueToCache);\n cache.get(cacheNumber).put(distanceLeft, internalCache);\n }\n //statCollector.stopTime(cacheNumber + \": putCacheValue\");\n }",
"static int[] implement_LRU_cache(int capacity, int[] query_type, int[] key, int[] value) {\n // Stores the key as key of map and value as position of this provided value in linkedlist\n Map<Integer, Node> cacheMap = new HashMap<Integer, Node>();\n LinkedList keyList = new LinkedList();\n List<Integer> returnedValues = new ArrayList<Integer>();\n for(int i=0;i<query_type.length;i++){\n if(query_type[i]==0){\n // Add the linked list node to head if its accessed\n if(cacheMap.containsKey(key[i])){\n Node valueNode = cacheMap.get(key[i]);\n returnedValues.add(valueNode.value);\n // refresh the position of this element in the list\n keyList.replaceNode(valueNode);\n }else{\n returnedValues.add(-1);\n }\n\n }else{\n Node node = new Node(key[i], value[i]);\n if(cacheMap.containsKey(key[i])) {\n node = cacheMap.get(key[i]);\n node.value = value[i];\n keyList.replaceNode(node);\n }\n else {\n if (capacity > cacheMap.size()) {\n keyList.addFirst(node);\n cacheMap.put(key[i], node);\n\n }else{\n cacheMap.remove(keyList.tail.key);\n keyList.deleteNode();\n\n keyList.addFirst(node);\n cacheMap.put(node.key, node);\n }\n\n }\n }\n }\n int[] returnArray = new int[returnedValues.size()];\n for(int i=0;i<returnedValues.size();i++){\n returnArray[i] = returnedValues.get(i);\n }\n return returnArray;\n }",
"@Override\r\n\tprotected String processLine(String line) {\n\t\treturn null;\r\n\t}",
"public void loadToCache(int dataType, int id) {\r\n\t\tsynchronized (queue) {\r\n\t\t\tfor (OnDemandData onDemandData = (OnDemandData) queue\r\n\t\t\t\t\t.getFront(); onDemandData != null; onDemandData = (OnDemandData) queue.getNext())\r\n\t\t\t\tif (onDemandData.dataType == dataType && onDemandData.ID == id)\r\n\t\t\t\t\treturn;\r\n\r\n\t\t\tOnDemandData onDemandData_1 = new OnDemandData();\r\n\t\t\tonDemandData_1.dataType = dataType;\r\n\t\t\tonDemandData_1.ID = id;\r\n\t\t\tonDemandData_1.incomplete = true;\r\n\t\t\tsynchronized (aClass19_1370) {\r\n\t\t\t\taClass19_1370.insertBack(onDemandData_1);\r\n\t\t\t}\r\n\t\t\tqueue.insertBack(onDemandData_1);\r\n\t\t}\r\n\t}",
"void clearCache();",
"void clearCache();",
"@Override\n public void removeFromCache(String sensorID) {\n }",
"public void limpaCache()\n\t{\n\t\tpoolMensagens.clear();\n\t}",
"public void reset() {\n\t\tfor (int i=0; i < this.WAYS; i++) {\n\t\t\tthis.cache[i] = new Line(this.alpha[i], REPL_VAL);\n\t\t}\n\t\t// set mru\n\t\tthis.cache[this.WAYS-1].state = INSERT_VAL;\n\t}",
"void evictFromCache( Long id );",
"public static void loadCache() {\n\t\t // it is the temporary replacement to database. We should use DB instead\n\t Circle circle = new Circle();\n\t circle.setId(\"1\");\n\t shapeMap.put(circle.getId(),circle);\n\n\t Square square = new Square();\n\t square.setId(\"2\");\n\t shapeMap.put(square.getId(),square);\n\n\t Rectangle rectangle = new Rectangle();\n\t rectangle.setId(\"3\");\n\t \n\t Circle circle2 = new Circle();\n\t circle2.setId(\"4\");\n\t circle2.setType(\"Big Circle\");\n\t shapeMap.put(circle2.getId(),circle2);\n\t shapeMap.put(rectangle.getId(), rectangle);\n\t }",
"public static void fetch(String [] programCache, String jobId, int [] registers, int CPUNumber)\n {\n int StartingLine = pcb.getStartIndex(jobId);\n int EndingLine = pcb.getEndIndex(jobId);\n String StartingLinestring;\n StartingLinestring = Integer.toString(StartingLine);\n pcb.setProgramCounter(jobId,StartingLinestring);\n String [] programCacheClone = new String [pcb.getEndIndex(jobId) - pcb.getStartIndex(jobId)];\n\n for(int i = 0; i < programCache.length; i++)\n {\n programCache[i] = RAM[pcb.getStartIndex(jobId) + i];\n programCacheClone[i] = RAM[pcb.getStartIndex(jobId) + i];\n }\n\n //Fetches until ProgramCounter goes passed the last line of code.\n while ( EndingLine > pcb.getProgramCounter(jobId))\n {\n decode(programCache,programCache[programLines[CPUNumber]], jobId, registers, CPUNumber);\n }\n\n // Amends the changes made in the Cache to RAM once program running is complete\n for(int i = 0; i < programCache.length; i++)\n {\n if(!programCache[i].equals(programCacheClone[i]))\n {\n RAM[pcb.getStartIndex(jobId) + i] = programCache[i];\n }\n }\n\n if( EndingLine < pcb.getProgramCounter(jobId))\n {\n for(int i= StartingLine; i < EndingLine+1; i++)\n {\n RAM[i] = null;\n }\n programLines[CPUNumber] = 0;\n CPUs[CPUNumber] = -1;\n System.out.println(\"Deleting....\");\n pcb.deleteProcess(jobId);\n System.out.println(\"Process deleted.\\n\");\n }\n }",
"@Override\n\tprotected String processLine(String line) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic int updateCacheData(String paramString1, String paramString2,\n\t\t\tString paramString3)\n\t{\n\t\treturn 0;\n\t}",
"private void m20202a(boolean checkCache) throws IOException {\n C8469e nextSpan;\n C8489j nextDataSpec;\n C8469e nextSpan2;\n C8487i nextDataSource;\n long length;\n long length2;\n if (this.f18665u) {\n nextSpan = null;\n } else if (this.f18651g) {\n try {\n nextSpan = this.f18645a.mo25946c(this.f18660p, this.f18661q);\n } catch (InterruptedException e) {\n Thread.currentThread().interrupt();\n throw new InterruptedIOException();\n }\n } else {\n nextSpan = this.f18645a.mo25944b(this.f18660p, this.f18661q);\n }\n if (nextSpan == null) {\n nextDataSource = this.f18648d;\n Uri uri = this.f18656l;\n int i = this.f18658n;\n long j = this.f18661q;\n C8489j jVar = new C8489j(uri, i, null, j, j, this.f18662r, this.f18660p, this.f18659o);\n nextDataSpec = jVar;\n nextSpan2 = nextSpan;\n } else if (nextSpan.f18671d) {\n Uri fileUri = Uri.fromFile(nextSpan.f18672e);\n long filePosition = this.f18661q - nextSpan.f18669b;\n long length3 = nextSpan.f18670c - filePosition;\n long j2 = this.f18662r;\n if (j2 != -1) {\n length2 = Math.min(length3, j2);\n } else {\n length2 = length3;\n }\n C8489j nextDataSpec2 = new C8489j(fileUri, this.f18661q, filePosition, length2, this.f18660p, this.f18659o);\n nextDataSource = this.f18646b;\n nextDataSpec = nextDataSpec2;\n nextSpan2 = nextSpan;\n } else {\n if (nextSpan.mo25963f()) {\n length = this.f18662r;\n } else {\n length = nextSpan.f18670c;\n long j3 = this.f18662r;\n if (j3 != -1) {\n length = Math.min(length, j3);\n }\n }\n Uri uri2 = this.f18656l;\n int i2 = this.f18658n;\n long j4 = this.f18661q;\n nextDataSpec = new C8489j(uri2, i2, null, j4, j4, length, this.f18660p, this.f18659o);\n if (this.f18647c != null) {\n nextSpan2 = nextSpan;\n nextDataSource = this.f18647c;\n } else {\n C8487i nextDataSource2 = this.f18648d;\n this.f18645a.mo25939a(nextSpan);\n nextSpan2 = null;\n nextDataSource = nextDataSource2;\n }\n }\n this.f18667w = (this.f18665u || nextDataSource != this.f18648d) ? Long.MAX_VALUE : this.f18661q + 102400;\n if (checkCache) {\n C8514e.m20490b(m20206c());\n if (nextDataSource != this.f18648d) {\n try {\n m20204b();\n } catch (Throwable th) {\n Throwable e2 = th;\n if (nextSpan2.mo25962e()) {\n this.f18645a.mo25939a(nextSpan2);\n }\n throw e2;\n }\n } else {\n return;\n }\n }\n if (nextSpan2 != null && nextSpan2.mo25962e()) {\n this.f18663s = nextSpan2;\n }\n this.f18654j = nextDataSource;\n this.f18655k = nextDataSpec.f18720g == -1;\n long resolvedLength = nextDataSource.mo25917a(nextDataSpec);\n C8475k mutations = new C8475k();\n if (this.f18655k && resolvedLength != -1) {\n this.f18662r = resolvedLength;\n C8474j.m20259a(mutations, this.f18661q + this.f18662r);\n }\n if (m20208e()) {\n this.f18657m = this.f18654j.getUri();\n if (true ^ this.f18656l.equals(this.f18657m)) {\n C8474j.m20260a(mutations, this.f18657m);\n } else {\n C8474j.m20258a(mutations);\n }\n }\n if (m20209f()) {\n this.f18645a.mo25942a(this.f18660p, mutations);\n }\n }",
"private void initializeCache(int cacheSize){\n \t\tlruCache = new LRUCache(cacheSize);\n \t}",
"protected void updateCachedRecipe(@Nonnull CachedRecipe<RECIPE> newCache, int cacheIndex) {\n cachedRecipes[cacheIndex] = newCache;\n }",
"public interface LookAheadCache {\r\n\tboolean isEmpty();\r\n\r\n\tboolean isFull();\r\n\r\n\tLong nextOffset();\r\n\r\n\tvoid add(Long lsnOffset, LNInfo info);\r\n\r\n\tLNInfo remove(Long offset);\r\n}",
"private void invalidateCache() {\n\t}",
"public static void ReplacesEntry(int index){\n int cont = 0;\n String[] thingstowrite = ManageCommissionerList.ReturnsCommissionerListInString(index);\n try{\n Path path = Paths.get(\"logscommission.txt\");\n List<String> lines = Files.readAllLines(path, StandardCharsets.UTF_8);\n for(int i = index*19;i<(index*19)+19;i++){\n lines.set(i, thingstowrite[cont]);\n cont++;\n }\n Files.write(path, lines, StandardCharsets.UTF_8);\n }catch(Exception e){\n e.printStackTrace();\n System.out.printf(\"Not possible to replace entry!\\n\");\n }\n }",
"void cachePositions(Collection<Position> positions);",
"public void loadCache() {\r\n\t\tint rango = getEmpleadoActual().getRango();\r\n\t\tArrayList<String> idsDptos = getEmpleadoActual().getDepartamentosId();\r\n\t\t\r\n\t\t// Para todos los departamentos a los que pertenezca el empleado\r\n\t\tfor (int nd=0; nd<idsDptos.size(); nd++){\r\n\t\t\tString dep = idsDptos.get(nd);\r\n\t\t\tint numvendedor = getEmpleadoActual().getEmplId();\r\n\r\n\t\t\tif (!alive) return;\r\n\t\t\tsetProgreso(\"Cargando contratos dpto \"+dep, 50);\r\n\t\t\tcontratos = controlador.getListaContratosDpto(dep);\r\n\t\t\tsetProgreso(\"Cargando contratos dpto \"+dep, 100);\r\n\r\n\t\t\tif (!alive) return;\r\n\t\t\tsetProgreso(\"Cargando empleados dpto \"+dep, 25);\r\n\t\t\templeados = controlador.getEmpleadosDepartamento(getEmpleadoActual().getEmplId(),dep);\r\n\t\t\tsetProgreso(\"Cargando empleados dpto \"+dep, 100);\r\n\t\t\t\r\n\t\t\t//Prueba ordenación empleados\r\n//\t\t\tfor (int i = 0; i < empleados.size(); i++) {\r\n//\t\t\t\tSystem.out.println(empleados.get(i).getPosicion());\r\n//\t\t\t}\r\n\t\t\tordenaEmpleados();\r\n//\t\t\tfor (int i = 0; i < empleados.size(); i++) {\r\n//\t\t\t\tSystem.out.println(empleados.get(i).getPosicion());\r\n//\t\t\t}\r\n\t\t\t//Fin PRueba\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif (!alive) return;\r\n\t\t\tif (rango == 1) { // Si es un empleado, coger turnos de su departamento\r\n\t\t\t\tsetProgreso(\"Cargando turnos dpto \"+dep, 70);\r\n\t\t\t\tturnos = controlador.getListaTurnosEmpleadosDpto(dep);\r\n\t\t\t\tsetProgreso(\"Cargando turnos dpto \"+dep, 100);\r\n\t\t\t} else if (rango == 2) { // Si es un jefe, coger turnos de todos los departamentos\r\n\t\t\t\tArrayList<String> temp = new ArrayList<String>();\r\n\t\t\t\ttemp = controlador.getDepartamentosJefe(numvendedor);\r\n\t\t\t\tfor (int i=0; i<temp.size(); i++)\r\n\t\t\t\t\tdepartamentosJefe.add(controlador.getDepartamento(temp.get(i)));\r\n\t\t\t\t//TODO borrar si al final no se usa\r\n\t//\t\t\tsetProgreso(\"Cargando jefes de departamento\", 60);\r\n\t//\t\t\tnumeroJefesDepartamento = controlador.getNumVendedorTodosJefes();\r\n\t//\t\t\tnombreJefesDepartamento = controlador.getNombreTodosJefes();\r\n\t\t\t\tsetProgreso(\"Cargando turnos dpto \"+dep, 70);\r\n\t\t\t\tArrayList<Turno> turnosDep = new ArrayList<Turno>();\r\n\t\t\t\tfor (int i=0; i<departamentosJefe.size(); i++) {\r\n\t\t\t\t\tturnosDep = controlador.getListaTurnosEmpleadosDpto(departamentosJefe.get(i).getNombreDepartamento());\r\n\t\t\t\t\tfor (int j=0; j<turnosDep.size(); j++) {\r\n\t\t\t\t\t\tturnos.add(turnosDep.get(j));\r\n\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tsetProgreso(\"Cargando turnos dpto \"+dep, 100);\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tSystem.err.println(\"Vista\\t:: Tipo de empleado inválido para cargar la cache.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(rango==1){//si es un empleado guardamos las ventas que éste ha hecho en un año\r\n\t\t\tjava.util.Date fecha = new java.util.Date();//cogemos la fecha del sistema\r\n\t\t\tvector_ventas=controlador.getVentas(this.getEmpleadoActual().getEmplId(),fecha.getYear()+1900);\r\n\t\t}else if(rango==2){//si es un jefe almacenamos la suma de las ventas de todos los empleados de este departamento durante un año\r\n\t\t\tjava.util.Date fecha = new java.util.Date();//cogemos la fecha del sistema\r\n\t\t\tvector_ventas=controlador.getVentasJefe(this.empleados,fecha.getYear()+1900);\r\n\t\t}\r\n\t\tSystem.out.println(\"Cache cargada\");\r\n\t}",
"private boolean fillSegmentWithDataFromCache(DataSegment segment, int[] cachePos, String basedir) {\n String filename=basedir+File.separator+(cachePos[0]+\"_\"+cachePos[1]);\n Object saved=loadObjectFromFile(filename);\n if (saved==null || !(saved instanceof DataSegment)) return false; \n String error=segment.importData((DataSegment)saved);\n if (error!=null) {\n engine.logMessage(\"SYSTEM WARNING: Detected problems while processing cached data (error code:\"+error+\")\");\n segment.setSegmentData(null); // this will clear the data\n return false;\n } // else engine.logMessage(\"DEBUG: imported data with no error from: \"+filename);\n return true;\n }",
"private void cleanBuffersFromCache()\n {\n synchronized (myUsedKeys)\n {\n CacheProvider cache = getCache();\n for (PolylineModelData key : myPreviouslyUsedKeys)\n {\n if (!myUsedKeys.contains(key))\n {\n cache.clearCacheAssociation(key, PolylineDataBuffered.class);\n }\n }\n\n myPreviouslyUsedKeys.clear();\n myPreviouslyUsedKeys.addAll(myUsedKeys);\n }\n }",
"public void updateCacheFor(CanopyCrum canopyCrum) {\n\tif ((myCachedCrum) == canopyCrum) {\n\t\tclearCache();\n\t}\n/*\nudanax-top.st:13159:CanopyCache methodsFor: 'operations'!\n{void} updateCacheFor: canopyCrum {CanopyCrum} \n\t\"If the cache contains canopyCrum, it must be updated \n\tbecause canopyCrum has new parents. For now, just \n\tinvalidate the cache.\" \n\t(myCachedCrum basicCast: Heaper star) == canopyCrum\n\t\tifTrue: [self clearCache]!\n*/\n}",
"public static SDCache get(Font paramFont, FontRenderContext paramFontRenderContext)\n/* */ {\n/* 310 */ if (paramFontRenderContext.isTransformed()) {\n/* 311 */ localObject = paramFontRenderContext.getTransform();\n/* 312 */ if ((((AffineTransform)localObject).getTranslateX() != 0.0D) || \n/* 313 */ (((AffineTransform)localObject).getTranslateY() != 0.0D))\n/* */ {\n/* */ \n/* */ \n/* 317 */ localObject = new AffineTransform(((AffineTransform)localObject).getScaleX(), ((AffineTransform)localObject).getShearY(), ((AffineTransform)localObject).getShearX(), ((AffineTransform)localObject).getScaleY(), 0.0D, 0.0D);\n/* */ \n/* */ \n/* */ \n/* 321 */ paramFontRenderContext = new FontRenderContext((AffineTransform)localObject, paramFontRenderContext.getAntiAliasingHint(), paramFontRenderContext.getFractionalMetricsHint());\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* 326 */ Object localObject = new SDKey(paramFont, paramFontRenderContext);\n/* 327 */ ConcurrentHashMap localConcurrentHashMap = null;\n/* 328 */ SDCache localSDCache = null;\n/* 329 */ if (cacheRef != null) {\n/* 330 */ localConcurrentHashMap = (ConcurrentHashMap)cacheRef.get();\n/* 331 */ if (localConcurrentHashMap != null) {\n/* 332 */ localSDCache = (SDCache)localConcurrentHashMap.get(localObject);\n/* */ }\n/* */ }\n/* 335 */ if (localSDCache == null) {\n/* 336 */ localSDCache = new SDCache(paramFont, paramFontRenderContext);\n/* 337 */ if (localConcurrentHashMap == null) {\n/* 338 */ localConcurrentHashMap = new ConcurrentHashMap(10);\n/* 339 */ cacheRef = new SoftReference(localConcurrentHashMap);\n/* */ }\n/* 341 */ else if (localConcurrentHashMap.size() >= 512) {\n/* 342 */ localConcurrentHashMap.clear();\n/* */ }\n/* 344 */ localConcurrentHashMap.put(localObject, localSDCache);\n/* */ }\n/* 346 */ return localSDCache;\n/* */ }",
"@Test\n\tpublic void test3() throws InterruptedException {\n\t\tDeadElementCallBack<String, Integer> callback = new DeadElementCallBack<String, Integer>() {\n\n\t\t\t@Override\n\t\t\tpublic void notify(String key, Integer elements) {\n\t\t\t}\n\t\t}; \n\t\tLRUCache<String, Integer> cache = new LRUCache<String, Integer>(2000, 2, callback);\n\t\tcache.put(\"hello\", 1);\n\t\tcache.put(\"yo\", 2);\n\t\tcache.put(\"hola\", 4);\n\t\tThread.sleep(1500);\n\t\tcache.get(\"yo\"); // Using a value.\n\t\tThread.sleep(1000);\n\t\tcache.put(\"sup\", 3);\n\t\tassertTrue(cache.size() == 3);\n\t\tassertTrue(cache.get(\"sup\") != null);\n\t\tassertTrue(cache.get(\"yo\") != null);\n\t}",
"public void set(int key, int value) {\n if (m_cache.containsKey(key)) {\n m_cache.put(key, value);\n m_visitedKeys.remove(new Integer(key)); // remove the current key because it is visited\n // add this element to head: shows that this is been visited recently\n m_visitedKeys.add(key);\n } // if not:\n else if (m_cache.size() + 1 <= m_maxCapacity) {\n // 1) in capacity do not need to remove it from visitedList.\n m_cache.put(key, value);\n m_visitedKeys.add(key);\n } else { // 2) out of capacity\n // Get the oldest key from list\n int lastUnUsedKey = m_visitedKeys.get(0);\n // Remove this key from list\n m_visitedKeys.remove(0);\n\n // Get the oldest key's corresponding value in cache\n int lastUnUsedVal = m_cache.get(lastUnUsedKey);\n // Remove this value from cache\n /*\n * PAY ATTENTION !!!!1 Must use remove (key, value) at the same time,\n *\n * remove(new Integer(key)): can not remove the existed Object key in cache.\n *\n * */\n m_cache.remove(lastUnUsedKey, lastUnUsedVal);\n\n // Finally, insert the new element to cache\n m_cache.put(key, value);\n // Finally, insert the new element to head of list.\n m_visitedKeys.add(key);\n }\n }",
"public void apply(String cacheKey) {\n }",
"public void clearLocalCache()\n/* */ {\n/* 345 */ super.clearCache();\n/* */ }",
"void cacheAuthorizationHeader(String callId,\n AuthorizationHeader authorization, int cacheTime) {\n String user = authorization.getUsername();\n if ( callId == null) throw new NullPointerException(\"Call ID is null!\");\n if ( authorization == null) throw new NullPointerException(\"Null authorization domain\");\n\n List<AuthorizationHeader> authHeaders = authorizationHeaders.get(callId);\n if (authHeaders == null) {\n authHeaders = new LinkedList<AuthorizationHeader>();\n authorizationHeaders.put(callId, authHeaders);\n } else {\n String realm = authorization.getRealm();\n for (ListIterator<AuthorizationHeader> li = authHeaders.listIterator(); li.hasNext();) {\n AuthorizationHeader authHeader = (AuthorizationHeader) li.next();\n if ( realm.equals(authHeader.getRealm()) ) {\n li.remove();\n }\n }\n }\n\n authHeaders.add(authorization);\n\n TimeoutTask timeoutTask = new TimeoutTask( callId,user);\n if ( cacheTime != -1)\n this.timer.schedule(timeoutTask, cacheTime*1000);\n\n\n }",
"public TileSet(String path, int TILE_SIZE) {\n // A tile set requires only a relative path and the tileSize (32 fixed for now)\n // See if tileSet already exists\n boolean sameFound = false;\n int sameIndex = 0;\n for(int i=0; i<tileSetCache.size(); i++) {\n if(tileSetCache.get(i).getTileSetPath().equals(path)) {\n sameFound = true;\n sameIndex = i;\n break;\n }\n }\n if(sameFound) {\n // If it exists we will copy already existing info over.\n tileSetPath = path;\n tileSetSrc = tileSetCache.get(sameIndex).getTileSetSrc();\n tiles = tileSetCache.get(sameIndex).getTiles();\n blank = tileSetCache.get(sameIndex).getBlank();\n Integer[] boxedArray = Arrays.stream(tileSetCache.get(sameIndex).getRemovedTileID()).boxed().toArray(Integer[]::new);\n Collections.addAll(removedTileIDList, boxedArray);\n totalTiles = tileSetCache.get(sameIndex).getTotalTiles();\n } else {\n // If it doesn't already exist in cache then attempt to load from disk\n tileSetPath = path;\n tileSetSrc = new Image(\"file:\"+ Run.GAME_DATA_PATH + \"/Art/\" + path);\n tiles = makeTiles(tileSetSrc, TILE_SIZE);\n // The last tile of a tileset should be the 'blank' tile for the set\n // To compare other tiles with for reducing Image[] size\n if (tiles.length == 0) {\n // Something has gone horribly wrong.\n System.err.println(\"NO TILES DETECTED\");\n } else {\n // If nothing bad happened from makeTiles() then we should be good\n blank = tiles[tiles.length - 1];\n int sizeOriginal = tiles.length;\n for (int step = 0; step < tiles.length; step++) {\n if (areImagesSame(tiles[step], blank)) {\n removedTileIDList.add(step);\n }\n }\n tiles = removeSameElements(tiles, blank);\n int removedTilesCount = sizeOriginal - tiles.length;\n totalTiles = tiles.length;\n if(Run.DEBUG_OUTPUT) {\n System.out.println(String.format(\"Tiles Removed: %d\", removedTilesCount));\n }\n }\n TileSet.tileSetCache.add(this); // After finishing the tileSet we add to master cache\n tileSetCache.trimToSize();\n }\n }",
"public void put(Object key, Object value) {\n Entry entry = this.cache.get(key);\n\n if (entry == null) {\n // cache is fully used\n if (currentSize >= cacheSize) {\n cache.remove(tail.key);\n removeLast();\n }\n else {\n currentSize++;\n }\n\n entry = new Entry();\n }\n\n // update the K/V in the Entry object\n entry.key = key;\n entry.value = value;\n cache.put(key, entry);\n\n // move to the head of list\n moveToHead(entry);\n }",
"int saveCached(String fileName) throws IOException\n\t {\n\t\t File f = new File (fileName);\n\t\t \n\t\t\t\tif (f.exists())\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"ATTENTION!!! File \" +fileName+ \" already exists. Adding new records to it.\");\n\t\t\t\t\tFileWriter fw = new FileWriter (f, true);\n\t\t\t\t\tPrintWriter pwx = new PrintWriter (fw);\n\t\t\t\t\tBufferedReader brx = new BufferedReader(new FileReader (\".cache\"));\n\t\t\t\t\t \n\t\t\t\t\t String lineX = brx.readLine();\n\t\t\t\t\t \n\t\t\t\t\t while (lineX != null)\n\t\t\t\t\t {\n\t\t\t\t\t\t pwx.println(lineX);\n\t\t\t\t\t\t lineX=brx.readLine();\n\t\t\t\t\t }\n\t\t\t\t\t brx.close();\n\t\t\t\t\t pwx.flush();\n\t\t\t\t\t pwx.close();\n\t\t\t\t\t \n\t\t\t\t\t return 0;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tf.createNewFile();\n\t\t\t\t}\n\t\t \n\t\t \n\t\t PrintWriter pn = new PrintWriter (fileName);\n\t\t BufferedReader br = new BufferedReader(new FileReader (\".cache\"));\n\t\t \n\t\t String line = br.readLine();\n\t\t \n\t\t while (line != null)\n\t\t {\n\t\t\t pn.println(line);\n\t\t\t line=br.readLine();\n\t\t }\n\t\t pn.flush();\n\t\t br.close();\n\t\t pn.close();\n\t\t System.out.println(\"Your file was saved as follows\");\n\t\t FileManager fm = new FileManager();\n\t\t fm.show(fileName);\n\t\treturn 1;\n\t }",
"public static void main(String[] args)\n {\n\tScanner sc = new Scanner(System.in);\n\tSystem.out.println(\"enter cache size in KB among (1, 2, 4, 8, 16, 32)\");\n\tint cacheSize = sc.nextInt();\n\tSystem.out.println(\"enter way associative value among(1,2,4,8)\");\n\tint wayAssociative = sc.nextInt();\n\tSystem.out.println(\"enter cache line size in bytes among(2,4,8,16,32,64)\");\n\tint cacheLineSize = sc.nextInt();\n\tsc.close();\n\n\tlong count_hit = 0, count_miss = 0;\n\tlong count_hit_2 = 0, count_miss_2 = 0, clockCycle_2 = 0;\n\tlong count_hit_4 = 0, count_miss_4 = 0, clockCycle_4 = 0;\n\tlong count_hit_8 = 0, count_miss_8 = 0, clockCycle_8 = 0;\n\n\tint numberOfCacheLines = (int) ((cacheSize * 1024) / cacheLineSize);\n\n\tArrayList<String> cacheKeys = new ArrayList<String>(numberOfCacheLines);\n\tArrayList<String> cacheValues = new ArrayList<String>(numberOfCacheLines);\n\tArrayList<String> cacheKeys_0 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheValues_0 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheKeys_1 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheValues_1 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheKeys_2 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheValues_2 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheKeys_3 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheValues_3 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheKeys_4 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheValues_4 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheKeys_5 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheValues_5 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheKeys_6 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheValues_6 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheKeys_7 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheValues_7 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\n\tlong clockCycle = 0;\n\n\tStringBuilder y = new StringBuilder(\"\");\n\n\t// creating main memory array to store all addresses in a 2d\n\t// array..mapping one\n\t// letter into one width length only..1 to 1 mapping.\n\t// so 2 width is one byte..to get value do block offset*2\n\tString[][] mainMemory = new String[1743][32];\n\tfor (int i = 0; i < 1743; i++)\n\t{\n\t for (int j = 0; j < 32; j++)\n\t {\n\t\tmainMemory[i][j] = \"\";\n\t }\n\t}\n\ttry\n\t{\n\t // read all input files\n\t\tString instructionAddresses = new String(\n\t\t\t\tFiles.readAllBytes(Paths\n\t\t\t\t\t\t.get(\"/Users/akashmalla/Documents/COEN210_Computer_Architecture/project1/inst_addr_trace_hex_project_1.txt\")));\n\t\tString dataSizes = new String(\n\t\t\t\tFiles.readAllBytes(Paths\n\t\t\t\t\t\t.get(\"/Users/akashmalla/Documents/COEN210_Computer_Architecture/project1/inst_data_size_project_1.txt\")));\n\t\tString memoryAddresses = new String(\n\t\t\t\tFiles.readAllBytes(Paths\n\t\t\t\t\t\t.get(\"/Users/akashmalla/Documents/COEN210_Computer_Architecture/project1/inst_mem_hex_16byte_wide.txt\")));\n\t\t// copy all memory addresses into the 2d mainMemory array\n\t\t// split into each line of address\n\n\t String[] memoryAddress = memoryAddresses.split(\"\\\\s+\");\n\t for (int i = 0; i < 1743; i++)\n\t {\n\t\t// split address into each letter\n\t\tString[] oneBit = memoryAddress[i].split(\"\");\n\n\t\tint z = -1;\n\n\t\tfor (int q = oneBit.length - 1; q >= 0; q--)\n\t\t{\n\t\t z++;\n\t\t // store each letter into the array as hex\n\t\t mainMemory[i][q] = oneBit[z];\n\t\t}\n\t }\n\n\t // splitting the instruction addresses into lines\n\t String[] instructionAddress = instructionAddresses.split(\"\\\\s+\");\n\n\t // splitting dataSizes to get length of each data\n\t String[] dataSize = dataSizes.split(\"\\\\s+\");\n\t for (int i = 0; i < instructionAddress.length; i++)\n\t {\n\t\ttry\n\t\t{\n\t\t String binaryIs = \"\";\n\t\t String binaryOffset = \"\";\n\t\t String blockNumber = \"\";\n\t\t if (Integer.parseInt(instructionAddress[i], 16) > 15)\n\t\t {\n\t\t\tbinaryIs = Integer.toBinaryString(Integer.parseInt(instructionAddress[i], 16));\n\t\t\tbinaryOffset = binaryIs.substring(binaryIs.length() - 4);\n\t\t\tblockNumber = binaryIs.substring(0, binaryIs.length() - 4);\n\t\t } else\n\t\t {\n\n\t\t\tblockNumber = \"0\";\n\t\t\tbinaryOffset = Integer.toBinaryString(Integer.parseInt(instructionAddress[i], 16));\n\t\t }\n\n\t\t // check if hit or miss for 1 way\n\t\t if (wayAssociative == 1)\n\t\t {\n\n\t\t\tif (cacheKeys.contains(blockNumber + \",\" + binaryOffset))\n\t\t\t{\n\t\t\t // cache hit situation\n\t\t\t count_hit++;\n\t\t\t clockCycle++;\n\n\t\t\t}\n\n\t\t\telse\n\t\t\t{\n\t\t\t // cache miss\n\t\t\t count_miss++;\n\t\t\t clockCycle += 15;\n\n\t\t\t // replacement for direct mapping.\n\n\t\t\t int newBlockNumber_Value = Integer.parseInt(blockNumber, 2);\n\t\t\t int newOffset_StartingPosition = (Integer.parseInt(binaryOffset, 2) * 2);\n\t\t\t int length = Integer.parseInt(dataSize[i]);\n\n\t\t\t y.append(mainMemory[newBlockNumber_Value][newOffset_StartingPosition]);\n\n\t\t\t int p = -1, beta = 0;\n\t\t\t for (int alpha = 1; alpha < length; alpha++)\n\t\t\t {\n\n\t\t\t\tif ((alpha + newOffset_StartingPosition) % 31 == 0)\n\t\t\t\t{\n\n\t\t\t\t newBlockNumber_Value++;\n\t\t\t\t newOffset_StartingPosition = 0;\n\t\t\t\t beta = length - alpha;\n\n\t\t\t\t if (p < beta)\n\t\t\t\t {\n\t\t\t\t\tp++;\n\t\t\t\t\ty.append(mainMemory[newBlockNumber_Value][p + newOffset_StartingPosition]);\n\t\t\t\t }\n\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t y.append(mainMemory[newBlockNumber_Value][alpha + newOffset_StartingPosition]);\n\t\t\t\t}\n\t\t\t }\n\n\t\t\t y = y.reverse();\n\n\t\t\t // if y is more than one byte then put it in next cache line\n\t\t\t if (y.length() > 4)\n\t\t\t {\n\n\t\t\t\tfor (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t{\n\t\t\t\t String yy = y.substring(o, o + 4);\n\n\t\t\t\t cacheKeys.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t cacheValues.add(yy);\n\n\t\t\t\t}\n\t\t\t } else\n\t\t\t {\n\n\t\t\t\tif (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t{\n\t\t\t\t cacheKeys.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t cacheValues.add(y.toString());\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t // System.out.println(\"cache is full...\");\n\n\t\t\t\t}\n\n\t\t\t }\n\n\t\t\t}\n\n\t\t\ty.delete(0, y.length());\n\n\t\t }\n\n\t\t else if (wayAssociative > 1)\n\t\t {\n\n\t\t\tif (wayAssociative == 2)\n\t\t\t{\n\n\t\t\t if (cacheKeys_0.contains(blockNumber + \",\" + binaryOffset)\n\t\t\t\t || (cacheKeys_1.contains(blockNumber + \",\" + binaryOffset)))\n\t\t\t {\n\t\t\t\t// cache hit situation\n\t\t\t\tcount_hit_2++;\n\t\t\t\tclockCycle_2++;\n\n\t\t\t }\n\n\t\t\t else\n\t\t\t {\n\t\t\t\t// cache miss\n\t\t\t\tcount_miss_2++;\n\t\t\t\tclockCycle_2 += 15;\n\n\t\t\t\t// replacement\n\t\t\t\tint newBlockNumber_Value = Integer.parseInt(blockNumber, 2);\n\t\t\t\tint newOffset_StartingPosition = (Integer.parseInt(binaryOffset, 2) * 2);\n\t\t\t\tint length = Integer.parseInt(dataSize[i]);\n\n\t\t\t\ty.append(mainMemory[newBlockNumber_Value][newOffset_StartingPosition]);\n\n\t\t\t\tint p = -1, beta = 0;\n\t\t\t\tfor (int alpha = 1; alpha < length; alpha++)\n\t\t\t\t{\n\n\t\t\t\t if ((alpha + newOffset_StartingPosition) % 31 == 0)\n\t\t\t\t {\n\n\t\t\t\t\tnewBlockNumber_Value++;\n\t\t\t\t\tnewOffset_StartingPosition = 0;\n\t\t\t\t\tbeta = length - alpha;\n\n\t\t\t\t\tif (p < beta)\n\t\t\t\t\t{\n\t\t\t\t\t p++;\n\t\t\t\t\t y.append(mainMemory[newBlockNumber_Value][p + newOffset_StartingPosition]);\n\t\t\t\t\t}\n\n\t\t\t\t } else\n\t\t\t\t {\n\t\t\t\t\ty.append(mainMemory[newBlockNumber_Value][alpha + newOffset_StartingPosition]);\n\t\t\t\t }\n\t\t\t\t}\n\n\t\t\t\ty = y.reverse();\n\n\t\t\t\tif (i % wayAssociative == 0)\n\t\t\t\t{\n\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tif (cacheKeys.size() <= numberOfCacheLines)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t cacheKeys_0.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\t cacheValues_0.add(yy);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t cacheKeys_0.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t cacheValues_0.add(y.toString());\n\t\t\t\t\t}\n\t\t\t\t } else\n\t\t\t\t {\n\t\t\t\t\t// System.out.println(\"cache is full...\");\n\n\t\t\t\t }\n\n\t\t\t\t}\n\n\t\t\t\telse if (i % wayAssociative == 1)\n\t\t\t\t{\n\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_1.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_1.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t\t{\n\n\t\t\t\t\t cacheKeys_1.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t cacheValues_1.add(y.toString());\n\n\t\t\t\t\t}\n\t\t\t\t }\n\n\t\t\t\t else\n\t\t\t\t {\n\t\t\t\t\t// System.out.println(\"cache is full...\");\n\n\t\t\t\t }\n\n\t\t\t\t}\n\n\t\t\t }\n\n\t\t\t y.delete(0, y.length());\n\n\t\t\t}\n\n\t\t\t// way =4\n\t\t\tif (wayAssociative == 4)\n\t\t\t{\n\n\t\t\t if (cacheKeys_0.contains(blockNumber + \",\" + binaryOffset)\n\t\t\t\t || cacheKeys_1.contains(blockNumber + \",\" + binaryOffset)\n\t\t\t\t || cacheKeys_2.contains(blockNumber + \",\" + binaryOffset)\n\t\t\t\t || cacheKeys_3.contains(blockNumber + \",\" + binaryOffset))\n\t\t\t {\n\t\t\t\t// cache hit situation\n\t\t\t\tcount_hit_4++;\n\t\t\t\tclockCycle_4++;\n\n\t\t\t }\n\n\t\t\t else\n\t\t\t {\n\t\t\t\t// cache miss\n\t\t\t\tcount_miss_4++;\n\t\t\t\tclockCycle_4 += 15;\n\n\t\t\t\t// replacement\n\t\t\t\tint newBlockNumber_Value = Integer.parseInt(blockNumber, 2);\n\t\t\t\tint newOffset_StartingPosition = (Integer.parseInt(binaryOffset, 2) * 2);\n\t\t\t\tint length = Integer.parseInt(dataSize[i]);\n\n\t\t\t\ty.append(mainMemory[newBlockNumber_Value][newOffset_StartingPosition]);\n\n\t\t\t\tint p = -1, beta = 0;\n\t\t\t\tfor (int alpha = 1; alpha < length; alpha++)\n\t\t\t\t{\n\n\t\t\t\t if ((alpha + newOffset_StartingPosition) % 31 == 0)\n\t\t\t\t {\n\n\t\t\t\t\tnewBlockNumber_Value++;\n\t\t\t\t\tnewOffset_StartingPosition = 0;\n\t\t\t\t\tbeta = length - alpha;\n\n\t\t\t\t\tif (p < beta)\n\t\t\t\t\t{\n\t\t\t\t\t p++;\n\t\t\t\t\t y.append(mainMemory[newBlockNumber_Value][p + newOffset_StartingPosition]);\n\t\t\t\t\t}\n\n\t\t\t\t } else\n\t\t\t\t {\n\t\t\t\t\ty.append(mainMemory[newBlockNumber_Value][alpha + newOffset_StartingPosition]);\n\t\t\t\t }\n\t\t\t\t}\n\n\t\t\t\ty = y.reverse();\n\n\t\t\t\tif (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t{\n\n\t\t\t\t if (i % wayAssociative == 0)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_0.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_0.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t cacheKeys_0.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t cacheValues_0.add(y.toString());\n\n\t\t\t\t\t}\n\t\t\t\t }\n\n\t\t\t\t // mod 1\n\t\t\t\t else if (i % wayAssociative == 1)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_1.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_1.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t cacheKeys_1.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t cacheValues_1.add(y.toString());\n\t\t\t\t\t}\n\t\t\t\t }\n\n\t\t\t\t // mod 2\n\t\t\t\t else if (i % wayAssociative == 2)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_2.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_2.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t\t {\n\t\t\t\t\t\tcacheKeys_2.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_2.add(y.toString());\n\t\t\t\t\t } else\n\t\t\t\t\t {\n\t\t\t\t\t\t// System.out.println(\"cache is full...\");\n\n\t\t\t\t\t }\n\n\t\t\t\t\t}\n\n\t\t\t\t }\n\n\t\t\t\t // mmod 3\n\t\t\t\t else if (i % wayAssociative == 3)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_3.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_3.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t\t {\n\t\t\t\t\t\tcacheKeys_3.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_3.add(y.toString());\n\t\t\t\t\t }\n\n\t\t\t\t\t}\n\n\t\t\t\t }\n\n\t\t\t\t}\n\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t // System.out.println(\"cache is full...\");\n\n\t\t\t\t}\n\n\t\t\t }\n\n\t\t\t y.delete(0, y.length());\n\n\t\t\t}\n\n\t\t\telse if (wayAssociative == 8)\n\t\t\t{\n\n\t\t\t if (cacheKeys_0.contains(blockNumber + \",\" + binaryOffset)\n\t\t\t\t || (cacheKeys_1.contains(blockNumber + \",\" + binaryOffset))\n\t\t\t\t || (cacheKeys_3.contains(blockNumber + \",\" + binaryOffset))\n\t\t\t\t || (cacheKeys_3.contains(blockNumber + \",\" + binaryOffset))\n\t\t\t\t || cacheKeys_4.contains(blockNumber + \",\" + binaryOffset)\n\t\t\t\t || (cacheKeys_5.contains(blockNumber + \",\" + binaryOffset))\n\t\t\t\t || (cacheKeys_7.contains(blockNumber + \",\" + binaryOffset))\n\t\t\t\t || (cacheKeys_6.contains(blockNumber + \",\" + binaryOffset)))\n\t\t\t {\n\t\t\t\t// cache hit situation\n\t\t\t\tcount_hit_8++;\n\t\t\t\tclockCycle_8++;\n\n\t\t\t }\n\n\t\t\t else\n\t\t\t {\n\t\t\t\t// cache miss\n\t\t\t\tcount_miss_8++;\n\t\t\t\tclockCycle_8 += 15;\n\n\t\t\t\t// replacement\n\n\t\t\t\tint newBlockNumber_Value = Integer.parseInt(blockNumber, 2);\n\t\t\t\tint newOffset_StartingPosition = (Integer.parseInt(binaryOffset, 2) * 2);\n\t\t\t\tint length = Integer.parseInt(dataSize[i]);\n\n\t\t\t\ty.append(mainMemory[newBlockNumber_Value][newOffset_StartingPosition]);\n\n\t\t\t\tint p = -1, beta = 0;\n\t\t\t\tfor (int alpha = 1; alpha < length; alpha++)\n\t\t\t\t{\n\n\t\t\t\t if ((alpha + newOffset_StartingPosition) % 31 == 0)\n\t\t\t\t {\n\n\t\t\t\t\tnewBlockNumber_Value++;\n\t\t\t\t\tnewOffset_StartingPosition = 0;\n\t\t\t\t\tbeta = length - alpha;\n\n\t\t\t\t\tif (p < beta)\n\t\t\t\t\t{\n\t\t\t\t\t p++;\n\t\t\t\t\t y.append(mainMemory[newBlockNumber_Value][p + newOffset_StartingPosition]);\n\t\t\t\t\t}\n\n\t\t\t\t } else\n\t\t\t\t {\n\t\t\t\t\ty.append(mainMemory[newBlockNumber_Value][alpha + newOffset_StartingPosition]);\n\t\t\t\t }\n\t\t\t\t}\n\n\t\t\t\ty = y.reverse();\n\n\t\t\t\tif (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t{\n\n\t\t\t\t if (i % wayAssociative == 0)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_0.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_0.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t cacheKeys_0.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t cacheValues_0.add(y.toString());\n\n\t\t\t\t\t}\n\t\t\t\t }\n\n\t\t\t\t // mod 1\n\t\t\t\t else if (i % wayAssociative == 1)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_1.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_1.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t cacheKeys_1.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t cacheValues_1.add(y.toString());\n\t\t\t\t\t}\n\t\t\t\t }\n\n\t\t\t\t // mod 2\n\t\t\t\t else if (i % wayAssociative == 2)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_2.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_2.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t\t {\n\t\t\t\t\t\tcacheKeys_2.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_2.add(y.toString());\n\t\t\t\t\t } else\n\t\t\t\t\t {\n\t\t\t\t\t\t// System.out.println(\"cache is full...\");\n\n\t\t\t\t\t }\n\n\t\t\t\t\t}\n\n\t\t\t\t }\n\n\t\t\t\t // mmod 3\n\t\t\t\t else if (i % wayAssociative == 3)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_3.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_3.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t\t {\n\t\t\t\t\t\tcacheKeys_3.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_3.add(y.toString());\n\t\t\t\t\t }\n\n\t\t\t\t\t}\n\n\t\t\t\t }\n\n\t\t\t\t // 4\n\t\t\t\t else if (i % wayAssociative == 4)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_4.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_4.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t\t {\n\t\t\t\t\t\tcacheKeys_4.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_4.add(y.toString());\n\t\t\t\t\t }\n\n\t\t\t\t\t}\n\n\t\t\t\t }\n\n\t\t\t\t // 5\n\t\t\t\t else if (i % wayAssociative == 5)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_5.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_5.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t\t {\n\t\t\t\t\t\tcacheKeys_5.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_5.add(y.toString());\n\t\t\t\t\t }\n\n\t\t\t\t\t}\n\n\t\t\t\t }\n\n\t\t\t\t // 6\n\t\t\t\t else if (i % wayAssociative == 6)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_6.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_6.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t\t {\n\t\t\t\t\t\tcacheKeys_6.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_6.add(y.toString());\n\t\t\t\t\t }\n\n\t\t\t\t\t}\n\n\t\t\t\t }\n\n\t\t\t\t // 7\n\n\t\t\t\t else if (i % wayAssociative == 7)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_7.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_7.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t\t {\n\t\t\t\t\t\tcacheKeys_7.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_7.add(y.toString());\n\t\t\t\t\t }\n\n\t\t\t\t\t}\n\n\t\t\t\t }\n\n\t\t\t\t //\n\t\t\t\t}\n\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t // System.out.println(\"cache is full...\");\n\n\t\t\t\t}\n\n\t\t\t }\n\n\t\t\t y.delete(0, y.length());\n\n\t\t\t}\n\n\t\t }\n\n\t\t // 3\n\n\t\t} catch (Exception e)\n\t\t{\n\t\t e.printStackTrace();\n\t\t}\n\n\t }\n\n\t // to print outputs\n\n\t if (wayAssociative == 1)\n\t {\n\t\tlong cache_access = count_hit + count_miss;\n\n\t\tSystem.out.println(\"Total number of cache accesses is \" + cache_access);\n\t\tSystem.out.println(\"Total number of clock cycles is \" + clockCycle);\n\t\tSystem.out.println(\"Total number of hits \" + count_hit);\n\n\t\tdouble hit_ratio = ((double) count_hit) / (count_hit + count_miss) * 100;\n\n\t\tSystem.out.println(\"cache hit ratio is \" + hit_ratio + \"%\");\n\n\t\tdouble ipc = ((double) instructionAddress.length) / clockCycle;\n\t\tSystem.out.println(\"IPC is \" + ipc);\n\t }\n\n\t else if (wayAssociative == 2)\n\t {\n\t\tlong cache_access = count_hit_2 + count_miss_2;\n\n\t\tSystem.out.println(\"Total number of cache accesses is \" + cache_access);\n\t\tSystem.out.println(\"Total number of clock cycles is \" + clockCycle_2);\n\t\tSystem.out.println(\"Total number of hits \" + count_hit_2);\n\n\t\tdouble hit_ratio = ((double) count_hit_2) / (count_hit_2 + count_miss_2) * 100;\n\n\t\tSystem.out.println(\"cache hit ratio is \" + hit_ratio + \"%\");\n\n\t\tdouble ipc = ((double) instructionAddress.length) / clockCycle_2;\n\t\tSystem.out.println(\"IPC is \" + ipc);\n\t }\n\n\t else if (wayAssociative == 4)\n\t {\n\t\tlong cache_access = count_hit_4 + count_miss_4;\n\n\t\tSystem.out.println(\"Total number of cache accesses is \" + cache_access);\n\t\tSystem.out.println(\"Total number of clock cycles is \" + clockCycle_4);\n\t\tSystem.out.println(\"Total number of hits \" + count_hit_4);\n\n\t\tdouble hit_ratio = ((double) count_hit_4) / (count_hit_4 + count_miss_4) * 100;\n\n\t\tSystem.out.println(\"cache hit ratio is \" + hit_ratio + \"%\");\n\n\t\tdouble ipc = ((double) instructionAddress.length) / clockCycle_4;\n\t\tSystem.out.println(\"IPC is \" + ipc);\n\n\t } else if (wayAssociative == 8)\n\t {\n\t\tlong cache_access = count_hit_8 + count_miss_8;\n\n\t\tSystem.out.println(\"Total number of cache accesses is \" + cache_access);\n\t\tSystem.out.println(\"Total number of clock cycles is \" + clockCycle_8);\n\t\tSystem.out.println(\"Total number of hits \" + count_hit_8);\n\n\t\tdouble hit_ratio = ((double) count_hit_8) / (count_hit_8 + count_miss_8) * 100;\n\n\t\tSystem.out.println(\"cache hit ratio is \" + hit_ratio + \"%\");\n\n\t\tdouble ipc = ((double) instructionAddress.length) / clockCycle_8;\n\t\tSystem.out.println(\"IPC is \" + ipc);\n\t }\n\n\t} catch (Exception e)\n\t{\n\t e.printStackTrace();\n\t}\n\n }",
"@Override\r\n public void setCacheBlocks(boolean b) {\n\r\n }",
"private void removeFromCache() {\n int i = 0;\n int removeItem = random.nextInt(cache.size());\n for (ScopePath className : cache.keySet()) {\n if (i == removeItem) {\n cache.remove(className);\n break;\n }\n ++i;\n }\n }",
"private void removeFromCache(String moduleId, String ownerId, String copyId){\n\t\tString key = getKey(moduleId,copyId, ownerId);\n\t\tcache.remove(key);\n\t}",
"@Override\n protected boolean removeEldestEntry(Map.Entry<String, Bitmap> eldest) {\n \t// Log.w(\"ImageDownloader\", \"removeEldestEntry() has been invoked: \" + eldest.getKey() + \" size()=\" + size());\n \t// Log.w(\"ImageDownloader\", \"Entries are transferred to soft reference cache\"); \n \tif (size() > HARD_CACHE_CAPACITY) {\n \t\tLog.w(\"ImageDownloader\", \"Entries are transferred to soft reference cache\");\n // Entries push-out of hard reference cache are transferred to soft reference cache\n sSoftBitmapCache.put(eldest.getKey(), new SoftReference<Bitmap>(eldest.getValue()));\n return true;\n } else\n \tLog.w(\"ImageDownloader\", \"Entries are Not transferred to soft reference cache\");\n return false;\n }",
"public void cacheResult(java.util.List<DataEntry> dataEntries);",
"@Override\n\t\t\t\tprotected void setCache(List<E> cache) {\n\t\t\t\t}",
"void updateCacheEntry(CacheKey key, Query query, QueryResultPacket resultPacket) {\n long oldTimestamp;\n if (!activeCache) return;\n\n PacketWrapper wrapper = lookup(key, query);\n if (wrapper == null) return;\n\n // The timestamp is owned by the QueryResultPacket, this is why this\n // update method puts entries into the cache differently from elsewhere\n oldTimestamp = wrapper.getTimestamp();\n wrapper = (PacketWrapper) wrapper.clone();\n wrapper.addResultPacket(resultPacket);\n synchronized (packetCache) {\n packetCache.put(key, wrapper, oldTimestamp);\n }\n }",
"@Override\r\n protected void processUpdate(final ICacheElement<K, V> ce)\r\n {\r\n if (!isAlive())\r\n {\r\n log.error(\"{0}: No longer alive; aborting put of key = {1}\",\r\n () -> logCacheName, ce::getKey);\r\n return;\r\n }\r\n\r\n log.debug(\"{0}: Storing element on disk, key: {1}\",\r\n () -> logCacheName, ce::getKey);\r\n\r\n // old element with same key\r\n IndexedDiskElementDescriptor old = null;\r\n\r\n try\r\n {\r\n IndexedDiskElementDescriptor ded = null;\r\n final byte[] data = getElementSerializer().serialize(ce);\r\n\r\n // make sure this only locks for one particular cache region\r\n storageLock.writeLock().lock();\r\n try\r\n {\r\n old = keyHash.get(ce.getKey());\r\n\r\n // Item with the same key already exists in file.\r\n // Try to reuse the location if possible.\r\n if (old != null && data.length <= old.len)\r\n {\r\n // Reuse the old ded. The defrag relies on ded updates by reference, not\r\n // replacement.\r\n ded = old;\r\n ded.len = data.length;\r\n }\r\n else\r\n {\r\n // we need this to compare in the recycle bin\r\n ded = new IndexedDiskElementDescriptor(dataFile.length(), data.length);\r\n\r\n if (doRecycle)\r\n {\r\n final IndexedDiskElementDescriptor rep = recycle.ceiling(ded);\r\n if (rep != null)\r\n {\r\n // remove element from recycle bin\r\n recycle.remove(rep);\r\n ded = rep;\r\n ded.len = data.length;\r\n recycleCnt++;\r\n this.adjustBytesFree(ded, false);\r\n log.debug(\"{0}: using recycled ded {1} rep.len = {2} ded.len = {3}\",\r\n logCacheName, ded.pos, rep.len, ded.len);\r\n }\r\n }\r\n\r\n // Put it in the map\r\n keyHash.put(ce.getKey(), ded);\r\n\r\n if (queueInput)\r\n {\r\n queuedPutList.add(ded);\r\n log.debug(\"{0}: added to queued put list. {1}\",\r\n () -> logCacheName, queuedPutList::size);\r\n }\r\n\r\n // add the old slot to the recycle bin\r\n if (old != null)\r\n {\r\n addToRecycleBin(old);\r\n }\r\n }\r\n\r\n dataFile.write(ded, data);\r\n }\r\n finally\r\n {\r\n storageLock.writeLock().unlock();\r\n }\r\n\r\n log.debug(\"{0}: Put to file: {1}, key: {2}, position: {3}, size: {4}\",\r\n logCacheName, fileName, ce.getKey(), ded.pos, ded.len);\r\n }\r\n catch (final IOException e)\r\n {\r\n log.error(\"{0}: Failure updating element, key: {1} old: {2}\",\r\n logCacheName, ce.getKey(), old, e);\r\n }\r\n }",
"public CacheMemory(MainMemory m, int size, int lineSize, int linesPerSet) {\n\n if (lineSize % WORD_SIZE != 0) {\n throw new IllegalArgumentException(\"lineSize is not a multiple of \" + WORD_SIZE);\n }\n\n if (size % lineSize != 0) {\n throw new IllegalArgumentException(\"size is not a multiple of lineSize.\");\n }\n\n // number of lines in the cache\n int numLines = size / lineSize;\n\n if (numLines % linesPerSet != 0) {\n throw new IllegalArgumentException(\"number of lines is not a multiple of linesPerSet.\");\n }\n\n // number of sets in the cache\n int numSets = numLines / linesPerSet;\n\n // Set the main memory\n mainMemory = m;\n\n // Initialize the counters to zero\n requestCount = 0;\n warmUpRequests = 0;\n hitCount = 0;\n hitCost = 0;\n\n // Determine the number of bits required for the byte within a line,\n // for the set, and for the tag.\n int value;\n numByteBits = 0; // initialize to zero\n value = 1; // initialize to 2^0\n while (value < lineSize) {\n numByteBits++;\n value *= 2; // increase value by a power of 2\n }\n\n numSetBits = 0;\n value = 1;\n while (value < numSets) {\n numSetBits++;\n value *= 2;\n }\n\n // numTagBits is the remaining memory address bits\n numTagBits = 32 - numSetBits - numByteBits;\n\n System.out.println(\"CacheMemory constructor:\");\n System.out.println(\" numLines = \" + numLines);\n System.out.println(\" numSets = \" + numSets);\n System.out.println(\" numByteBits = \" + numByteBits);\n System.out.println(\" numSetBits = \" + numSetBits);\n System.out.println(\" numTagBits = \" + numTagBits);\n System.out.println();\n\n // Create the array of CacheSet objects and initialize each CacheSet object\n cache = new CacheSet[numSets];\n for (int i = 0; i < cache.length; i++) {\n cache[i] = new CacheSet(lineSize, linesPerSet, numTagBits);\n }\n }",
"public void setDrawcache(CPointer<Object> drawcache) throws IOException\n\t{\n\t\tlong __address = ((drawcache == null) ? 0 : drawcache.getAddress());\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeLong(__io__address + 64, __address);\n\t\t} else {\n\t\t\t__io__block.writeLong(__io__address + 64, __address);\n\t\t}\n\t}",
"public void flush() {\n new Thread() {\n @Override\n public void run() {\n Log.d(TAG, \"Erasing the cache ...\");\n // erase the existing cache\n String where = CachedValue.ITEM + \" = ?\";\n String[] selectionArgs = new String[] {\n String.valueOf(mVehicle.getId())\n };\n mContext.getContentResolver().delete(CacheTable.BASE_URI, where, selectionArgs);\n\n Log.d(TAG, \"Building new values ...\");\n // write the new cache\n ContentValues[] values = new ContentValues[Statistics.STATISTICS.size()];\n final int length = mObjects.size();\n final long vehicleId = mVehicle.getId();\n int num = 0;\n for (int i = 0; i < length; i++) {\n StatisticHolder holder = mObjects.get(i);\n if (holder.type == TYPE_STATISTIC) {\n ContentValues v = new ContentValues();\n v.put(CachedValue.ITEM, vehicleId);\n v.put(CachedValue.VALID, true);\n v.put(CachedValue.VALUE, mValues.get(holder.key));\n v.put(CachedValue.KEY, holder.key);\n values[num++] = v;\n }\n }\n if (num != values.length) {\n Log.d(TAG, \"Not writing to the database because we don't have all the stats\");\n } else {\n Log.d(TAG, \"Writing \" + num + \" records to the database ...\");\n long start = System.currentTimeMillis();\n mContext.getContentResolver().bulkInsert(CacheTable.BASE_URI, values);\n long diff = System.currentTimeMillis() - start;\n double seconds = diff / 1000D;\n Log.d(TAG, \"Caching of \" + num + \" records complete! (\" + seconds + \" seconds)\");\n }\n }\n }.start();\n }",
"void storeline(String linebuffer, fileInfo pinfo) {\n\t\tint linenum = ++pinfo.maxLine; /* note, no line zero */\n\t\tif (linenum > fileInfo.MAXLINECOUNT) {\n\t\t\tSystem.err.println(\"MAXLINECOUNT exceeded, must stop.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tpinfo.symbol[linenum] = node.addSymbol(linebuffer, pinfo == oldinfo,\n\t\t\t\tlinenum);\n\t}",
"@SuppressWarnings(\"unused\")\n public CachedSource(Source<V> source) {\n mCache = new Cache<>();\n mSource = source;\n }",
"protected final void addCache(Cache cache)\r\n/* 33: */ {\r\n/* 34:59 */ this.cacheMap.put(cache.getName(), cache);\r\n/* 35:60 */ this.cacheNames.add(cache.getName());\r\n/* 36: */ }",
"StoreResponse prepend(CACHE_ELEMENT element);",
"public Cache getCache(String name)\r\n/* 39: */ {\r\n/* 40:64 */ return (Cache)this.cacheMap.get(name);\r\n/* 41: */ }",
"public void setCache(final ICache < ICacheKey < String >, Object > theCache) {\r\n this.cache = theCache;\r\n }",
"public static String revertLRU(String lru) {\n if(lru == null) {\n return null;\n }\n lru = lru.trim();\n if(StringUtils.isEmpty(lru)) {\n return null;\n }\n String url = \"\";\n Scanner scanner = new Scanner(lru);\n scanner.useDelimiter(\"\\\\|\");\n boolean tldDone = false;\n boolean removedTrailingDot = false;\n while(scanner.hasNext()) {\n String lruElement = scanner.next();\n if(!lruElement.startsWith(\"s:\")) {\n if(lruElement.startsWith(\"h:\")) {\n if(lruElement.equals(\"h:localhost\")) {\n tldDone = true;\n } else if(!lruElement.equals(\"h:www\")) {\n lruElement = lruElement.substring(lruElement.indexOf(':')+1);\n lruElement = lruElement.trim();\n if(StringUtils.isNotEmpty(lruElement)) {\n if(tldDone) {\n url = url + \".\" + lruElement;\n }\n else {\n url = lruElement + \".\" + url;\n }\n if(!tldDone && lruElement.startsWith(\"h:\")) {\n tldDone = true;\n }\n }\n }\n } else if(lruElement.startsWith(\"t:\") && ! (lruElement.endsWith(\":80\") || lruElement.endsWith(\":443\"))) {\n url += \":\"+lruElement.substring(lruElement.indexOf(':')+1).trim();\n } else {\n if(!removedTrailingDot && url.endsWith(\".\")) {\n url = url.substring(0, url.length() - 1);\n removedTrailingDot = true;\n }\n if(lruElement.startsWith(\"p:\")) {\n lruElement = lruElement.substring(lruElement.indexOf(':')+1);\n lruElement = lruElement.trim();\n url = url + \"/\" + lruElement;\n }\n else if(lruElement.startsWith(\"q:\")) {\n lruElement = lruElement.substring(lruElement.indexOf(':')+1);\n lruElement = lruElement.trim();\n url = url + \"?\" + lruElement;\n }\n else if(lruElement.startsWith(\"f:\")) {\n lruElement = lruElement.substring(lruElement.indexOf(':')+1);\n lruElement = lruElement.trim();\n url = url + \"#\" + lruElement;\n }\n }\n }\n }\n scanner.close();\n if(!removedTrailingDot && url.endsWith(\".\")) {\n url = url.substring(0, url.length() - 1);\n }\n return url;\n }",
"@Override\r\n public void setCaching(int parseInt) {\n\r\n }"
]
| [
"0.59968776",
"0.5948639",
"0.5696248",
"0.544144",
"0.54345304",
"0.5351481",
"0.53237474",
"0.5285688",
"0.52813447",
"0.5260669",
"0.5259765",
"0.52011716",
"0.5183098",
"0.5163565",
"0.515046",
"0.51498294",
"0.51378936",
"0.5119262",
"0.5108102",
"0.50759655",
"0.50721604",
"0.50693583",
"0.5063171",
"0.50569576",
"0.5033046",
"0.50199485",
"0.5017486",
"0.50129944",
"0.49828598",
"0.49795762",
"0.49671873",
"0.4964947",
"0.49643233",
"0.49621814",
"0.49511912",
"0.49506775",
"0.49466556",
"0.49357373",
"0.4930442",
"0.49275422",
"0.49086955",
"0.49049306",
"0.49046624",
"0.48834646",
"0.48720163",
"0.48661336",
"0.486066",
"0.48598975",
"0.48566976",
"0.48483005",
"0.48479176",
"0.48479176",
"0.4847715",
"0.48473468",
"0.48459333",
"0.48334408",
"0.48261857",
"0.48191956",
"0.48173416",
"0.48170805",
"0.48162788",
"0.48156634",
"0.481467",
"0.48057136",
"0.48039886",
"0.4797688",
"0.4797118",
"0.47864047",
"0.47855738",
"0.47823527",
"0.47773048",
"0.47539997",
"0.4753082",
"0.4751587",
"0.4751408",
"0.47513667",
"0.47451597",
"0.47434902",
"0.47285184",
"0.47278574",
"0.47263288",
"0.47245532",
"0.4724492",
"0.47237673",
"0.47124073",
"0.47087556",
"0.47052938",
"0.47042695",
"0.4703027",
"0.47030258",
"0.4697509",
"0.46940765",
"0.4693854",
"0.4690379",
"0.46873355",
"0.46853286",
"0.46815413",
"0.4681494",
"0.46799123",
"0.4675434"
]
| 0.73539954 | 0 |
constructors Takes no arguments and initializes an empty array of size zero | Array() {
array = new int[0];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Array()\n {\n assert DEFAULT_CAPACITY > 0;\n\n array = new Object[DEFAULT_CAPACITY];\n }",
"public CircularArray() {\n\t\tthis(DEFAULT_SIZE);\n\t}",
"public MyArray() {\n\t\tcapacity = DEFAULT_CAPACITY;\n\t\tnumElements = 0;\n\t\telements = (E[]) new Object[capacity];\n\t}",
"public MyArray() {\n this.length = 10;\n this.array = (T[]) Array.newInstance(MyArray.class, length);\n this.size = 0;\n }",
"public WeetArray() {\n count = 0;\n nullCount = 0;\n }",
"public Array(int capacity)\n {\n array = new Object[capacity];\n }",
"public SuperArray() { \n \t_data = new Comparable[10];\n \t_lastPos = -1; //flag to indicate no lastpos yet\n \t_size = 0;\t\n }",
"public ArrayContainer() {\n this(DEFAULT_CAPACITY);\n }",
"Array(int x) {\n\t\tarray = new int[x];\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tarray[i] = 0; // make each index 0\n\t\t}\n\t}",
"public IntArrays()\n\t{\n\t\tthis(10);\n\t}",
"public DynamicArray() {\n this(16);\n }",
"public ArrayAccess()\r\n {\r\n }",
"public ArrayList() {\n //sets an array with no length\n this.array = (E[]) new Object[0];\n }",
"public SpecimenArray()\r\n\t{\r\n\t\tsuper();\r\n\t}",
"ArrayADT() {\n this.size = 10;\n this.base = createArrayInstance(this.size);\n this.length = 0;\n }",
"@SuppressWarnings(\"unchecked\")\n public static <T> Array<T> empty()\n {\n return (Array<T>) EMPTY;\n }",
"public static void main(String[] args) {\n ArrayOfUnInitializedObjects arrayOfUnInitializedObjects[] = new ArrayOfUnInitializedObjects[10];\n }",
"public ZYArraySet(){\n elements = (ElementType[])new Object[DEFAULT_INIT_LENGTH];\n }",
"public ZYArraySet(int initLength){\n if(initLength<0)\n throw new IllegalArgumentException(\"The length cannot be nagative\");\n elements = (ElementType[])new Object[initLength];\n }",
"public ArrayList() {\n arr = (T[]) new Object[10];\n size = 0;\n }",
"@SuppressWarnings(\"unchecked\")\n public ArrBag( int optionalCapacity )\n {\n theArray = (T[]) new Object[optionalCapacity ];\n count = 0; // i.e. logical size, actual number of elems in the array\n }",
"public InputArray() \n\t{\n\t\tinputArray = null;\n\t}",
"public void testCreateEmptyArray() {\n System.out.println(\"createEmptyArray\"); // NOI18N\n \n TypeID componentType = new TypeID(TypeID.Kind.COMPONENT,\"Root\"); // NOI18N\n \n PropertyValue result = PropertyValue.createEmptyArray(componentType);\n List<PropertyValue> expResult = new ArrayList<PropertyValue> (0);\n \n assertEquals(expResult, result.getArray());\n }",
"public MyArrayList()\n\t{\n\t\tmyArray = new Object[StartSize];\n\t}",
"public void initializeArray(){\n if(topOfStack==-1){\n for(int i=0;i<this.arr.length;i++){\n this.arr[i]=Integer.MIN_VALUE;\n }\n }\n }",
"public ArrBag()\n {\n count = 0; // i.e. logical size, actual number of elems in the array\n }",
"@Test\n public void testEmptyArrayCreation() {\n final String[] array = ArrayUtils.<String>toArray();\n assertEquals(0, array.length);\n }",
"public ExpandableArray() {\n\n\t}",
"public ArraySet() {\n\t\tthis(DEFAULT_CAPACITY);\n\t}",
"public SimpleArray(int size)\n\t{\n\t\tarray = new int[size];\n\t}",
"public Matrix() {\n\tmatrix = new Object[DEFAULT_SIZE][DEFAULT_SIZE];\n }",
"void setNullArray()\n/* */ {\n/* 1051 */ this.length = -1;\n/* 1052 */ this.elements = null;\n/* 1053 */ this.datums = null;\n/* 1054 */ this.pickled = null;\n/* 1055 */ this.pickledCorrect = false;\n/* */ }",
"public static int[][] init() {\n int[][] arr={\n {0,1,0,1,0,0,0},\n {0,0,1,0,0,1,0},\n {1,0,0,1,0,1,0},\n {0,0,1,0,0,1,0},\n {0,0,1,1,0,1,0},\n {1,0,0,0,0,0,0}\n };\n return arr;\n }",
"private ArrayOps() {\r\n }",
"public MyArray(int size) {\n this.length = size;\n this.array = (T[]) Array.newInstance(MyArray.class, length);\n this.size = 0;\n }",
"public ByteArray()\n\t{\n\t\t// initialize the byte array\n\t\tbytes = new byte[0];\n\t}",
"public GenericDynamicArray() {this(11);}",
"public CircularQueueUsingArray() {\n\t\tarray = new int[size];\n\t}",
"public BigNum()\r\n { \r\n myArray = new int[SIZE];\r\n for (int i = 0; i < SIZE; i++)\r\n {\r\n myArray[i] = 0;\r\n }\r\n }",
"public CircularArray(int initialSize) {\n\t\tthis.array = new Object[initialSize];\n\t\tthis.index = 0;\n\t\tthis.length = 0;\n\t}",
"public MyVector() {\n\t\tarr = new int[10];\n\t\tend = 0;\n\t}",
"public MyArray(int capacity) {\n\t\tthis.capacity = capacity;\n\t\tnumElements = 0;\n\t\telements = (E[]) new Object[capacity];\n\t}",
"public CircularArrayQueue() {\n\t\tthis(QUEUESIZE);\t// constructs queue with default queue size\n\t}",
"public TLongArray() {\n\t}",
"public MyArrayList() {\n data = new Object[10];\n }",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic ArrayQueue() {\r\n a = (Item[]) new Object[2];\r\n n = 0;\r\n head =0;\r\n tail = 0;\r\n }",
"public NativeIntegerObjectArrayImpl()\n {\n }",
"public IntArrays(int initialCapacity)\n\t{\n\t\tarraySize = 0;\n\t\tif (initialCapacity > 0)\n\t\t{\n\t\t\tarray = new int[initialCapacity];\n\t\t} else\n\t\t{\n\t\t\tSystem.err.println(\"Error: Initial capacity invalid, setting capacity to default of 10...\");\n\t\t\tarray = new int[DEFAULT_ARRAY_SIZE];\n\t\t}\t\t\n\t}",
"public static <T> T[] createArray (T... args) {\n\tif (args == null) { return (T[]) new Object[0]; };\n\treturn args;\n }",
"public BaseArray(int max) // constructor\n {\n a = new long[max]; // create the array\n nElems = 0; // no items yet\n }",
"public HashArray(){\n this(10);\n }",
"public ArrayDeque() {\n size = 0;\n array = (T[]) new Object[8];\n nextFirst = 0;\n nextLast = 1;\n }",
"public MutableArray(int capacity) {\r\n\t\tif(capacity < 1)\r\n\t\t\tcapacity = 1;\r\n\t\tbackingArray = new Object[capacity];\r\n\t}",
"public MyArrayList(int length) {\n data = new Object[length];\n }",
"Array createArray();",
"public ArrayMap() {\n this(DEFAULT_INITIAL_CAPACITY);\n }",
"public ArrayStack() {\n this( DEFAULT_CAPACITY );\n }",
"Object createArray(int capacity);",
"public ArrayQueue() {\n Object[] arr = new Object[INITIAL_CAPACITY];\n backingArray = (T[]) arr;\n size = 0;\n front = 0;\n }",
"public ArrayStack() {\n this(INITIAL_CAPACITY);\n }",
"public Set(){\n setSet(new int[0]);\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic ArrayIndexList() {\n\t\tself.A = ( E[] ) new Object[ self.capacity ];\t\t\t\t\t// compiler may warn but this is okay\n\t}",
"public ArrayStack()\r\n {\r\n top = 0;\r\n stack = (T[])(new Object[DEFAULT_CAPACITY]);\r\n }",
"public MyArrayList ()\r\n {\r\n \tlist = new Object[100];\r\n \tnumElements = 0;\r\n }",
"@Test\n public void canCreateWithEmptyArray() {\n // Arrange\n byte[] byteArray = new byte[0];\n\n // Act\n final EventData eventData = new EventData(byteArray);\n\n // Assert\n final byte[] actual = eventData.getBody();\n Assertions.assertNotNull(actual);\n Assertions.assertEquals(0, actual.length);\n }",
"public ArrayQueue() {\n this(10);\n }",
"private RubyArray(Ruby runtime, RubyClass klass, int length) {\n super(runtime, klass);\n values = new IRubyObject[length];\n }",
"public static void arrayCreation() {\n int[] arr = new int[3];\n // as we are using new operator and that is how we create objects hence arrays\n // are called objects\n // every array in java is an object\n System.out.println(arr.getClass()\n .getSimpleName()); // int[]\n System.out.println(arr.getClass()\n .getName()); // [I\n\n int[] a1 = new int[3];\n int[][] a2 = new int[3][3];\n double[] a3 = new double[3];\n short[] a4 = new short[3];\n byte[] a5 = new byte[3];\n boolean[] a6 = new boolean[3];\n long[] a7 = new long[3];\n float[] a8 = new float[3];\n Integer[] a9 = new Integer[3];\n\n System.out.println(a1.getClass()\n .getName()); // [I\n System.out.println(a2.getClass()\n .getName()); // [[I\n System.out.println(a3.getClass()\n .getName()); // [D\n System.out.println(a4.getClass()\n .getName()); // [S\n System.out.println(a5.getClass()\n .getName()); // [B\n System.out.println(a6.getClass()\n .getName()); // [Z\n System.out.println(a7.getClass()\n .getName()); // [J\n System.out.println(a8.getClass()\n .getName()); // [F\n System.out.println(a9.getClass()\n .getName()); // [Ljava.lang.Integer;\n\n // at the time of the array initialization we should compulsory specify the size\n // new int[3] we should specify the size else it will lead to compilation error\n\n // It is legal to have size zero in java\n int[] a = new int[0];\n System.out.println(a);\n\n }",
"public Matrix() {\n matrix = new double[DEFAULT_SIZE][DEFAULT_SIZE];\n }",
"public ArrayQueue() {\n\t\tthis(Integer.MAX_VALUE);\n\t}",
"public MyArrayList() {\n elements = new Object[DEFAULT_CAPACITY];\n }",
"public Board() {\n\t\tfor(int i = 0; i < board.length; i++){\n\t\t\tfor(int j = 0; j < board[i].length; j++){\n\t\t\t\tboard[i][j] = 0;\n\t\t\t}\n\t\t}\n\t}",
"@SuppressWarnings(value = \"unchecked\") // sem isto, dá warning!\n public DelayArray(int size, E init) {\n assert size >= 0;\n\n\tbuffer = (E[])(new Object[size]);\n\n\tfor (int i = 0; i < size; i++){\n\t\tbuffer[i] = init;\n\t}\n\n // Invariante:\n assert size()==size: String.format(\"Delay line size should be %d\", size);\n // Pós-condição:\n assert get(-size()).equals(init) && get(-1).equals(init): \"All samples should have the initial value\";\n }",
"OrderedIntList ()\r\n\t{\r\n\t\tarray = new int[10];\r\n\t}",
"public ArrayStack(int initialCapacity) {\n size = 0;\n this.backing = (T[]) new Object[initialCapacity];\n }",
"public ArrayIndexedCollection() {\n\t\tthis(defaultCapacity);\n\t}",
"public Stat() {\n\t\tdata = new SuperArray();\n }",
"public S()\n {\n // inizializzazione dell'array\n v = new Object[CAPACITY];\n\n // inizializzazione dei buckets\n for (int i = 0; i < v.length; i++)\n v[i] = new ListNode();\n \n // inizializzazione del numero di elementi\n size = 0;\n }",
"public ArrayDeque() {\n array = (T[]) new Object[8];\n size = 0;\n front = 0;\n rear = 0;\n }",
"public IntArrayList() {\n this(DEFAULT_EXPECTED_ELEMENTS);\n }",
"public static AsonValue CreateRootArray() {\n return CreateRootArray(null);\n }",
"public ArrayList(int initCapacity) {\n elements = new Object[initCapacity];\n }",
"public ArrayDeque() {\n myQ = (T[]) new Object[IDeque.MAX_LENGTH];\n myLength = 0;\n }",
"@SuppressWarnings(\"unchecked\")\n public ArrayQueue(int initialSize) {\n if (initialSize < 1) initialSize = INITIAL_SIZE;\n store = (T[]) new Object[initialSize];\n frontIndex = 0;\n count = 0;\n }",
"private RubyArray(Ruby runtime, long length) {\n super(runtime, runtime.getArray());\n checkLength(length);\n values = new IRubyObject[(int)length];\n }",
"public ArrayADT() \r\n\t{\r\n\t\tbookArray = new String[MAXSIZE];\r\n\t\tnumItems = 0;\r\n\t}",
"public ArrayIndexedCollection() {\n\t\tthis(DEFAULT_INITIAL_CAPACITY);\n\t}",
"public void zero() {\n fill(0);\n }",
"@SuppressWarnings(\"unchecked\") //blcok the force trandfer warning.\n public ArrayStack() {\n arr = (T[]) new Object[INITIAL_CAPACITY];\n size = 0; \n }",
"public ArrayStack (int initialCapacity)\r\n {\r\n top = 0;\r\n stack = (T[]) (new Object[initialCapacity]);\r\n }",
"private static int[] arrayInitializer(int length) {\n int[] myArray = new int[length];\n Random rand = new Random();\n for (int i = 0; i < length; i++) {\n myArray[i] = rand.nextInt(1000);\n }\n return myArray;\n }",
"public SimpleArrayList() {\n this.values = new Object[SimpleArrayList.DEFAULT_SIZE];\n }",
"public void initialize(int size);",
"@SuppressWarnings({\"unchecked\"})\n @Test\n public void emptyArrayToGetInstance() {\n assertTrue(getPredicateInstance(new Predicate[] {}).evaluate(null), \"empty array not true\");\n }",
"public FloatArray(int initialCapacity) {\r\n this.elementData = new float[initialCapacity];\r\n }",
"public ArrayList()\n {\n list = new int[SIZE];\n length = 0;\n }",
"public MyArrayList() {\n mMyArray = new Comparable[10];\n size = 10;\n head = tail = size / 3;\n }",
"public ByteArray(final int length)\n\t{\n\t\t// initialize the byte array\n\t\tbytes = new byte[length];\n\t\t\n\t\t// fill the array with byte 0\n\t\tArrays.fill(bytes, (byte) 0);\n\t}",
"public MyArrayList(int capacity) {\n\t\tarray = new Object[capacity];\n\t}",
"public ArrayList() {\n elements = new Object[DEFAULT_CAPACITY];\n }"
]
| [
"0.7792133",
"0.7171616",
"0.7169117",
"0.7062475",
"0.7007616",
"0.68906355",
"0.68631744",
"0.6837055",
"0.67551225",
"0.6740826",
"0.6648976",
"0.66141737",
"0.6596602",
"0.65797824",
"0.6561889",
"0.6543405",
"0.65428084",
"0.6538317",
"0.6531684",
"0.6531581",
"0.6522489",
"0.6521832",
"0.649451",
"0.647453",
"0.6461482",
"0.6429875",
"0.64291453",
"0.64237857",
"0.64236116",
"0.6413494",
"0.6377909",
"0.63704115",
"0.6352761",
"0.6349381",
"0.6339021",
"0.6337845",
"0.63307756",
"0.6309271",
"0.6296088",
"0.6285916",
"0.62816447",
"0.62757933",
"0.62710094",
"0.62599087",
"0.62596273",
"0.6258961",
"0.6254854",
"0.625249",
"0.6247825",
"0.62213045",
"0.6220791",
"0.6195509",
"0.6184928",
"0.6178877",
"0.6165975",
"0.6156058",
"0.6150798",
"0.61480856",
"0.6147777",
"0.6146971",
"0.6138538",
"0.61199325",
"0.6105279",
"0.61033016",
"0.6101076",
"0.60985774",
"0.6090015",
"0.60796195",
"0.60778475",
"0.60743505",
"0.60618263",
"0.6055443",
"0.6046364",
"0.6022632",
"0.6005968",
"0.600307",
"0.60022455",
"0.59888655",
"0.59803534",
"0.5969523",
"0.5964879",
"0.59617674",
"0.59552574",
"0.5954755",
"0.5947352",
"0.5945513",
"0.59434587",
"0.5933421",
"0.5928487",
"0.5926924",
"0.5918626",
"0.5910059",
"0.590291",
"0.59026885",
"0.58970577",
"0.58931625",
"0.588161",
"0.58755755",
"0.5874289",
"0.5867503"
]
| 0.79130286 | 0 |
Takes an array of integers as the arg | Array(int[] n) {
array = n;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public IntArrayProcessor(int[] array)\n {\n integers = array;\n }",
"void mo12207a(int[] iArr);",
"private List<Integer> toList(int[] array) {\n List<Integer> list = new LinkedList<Integer>();\n for (int item : array) {\n list.add(item);\n }\n return list;\n }",
"public void setArray(int[] paramArrayOfInt)\n/* */ {\n/* 758 */ if (paramArrayOfInt == null) {\n/* 759 */ setNullArray();\n/* */ }\n/* */ else {\n/* 762 */ setArrayGeneric(paramArrayOfInt.length);\n/* */ \n/* 764 */ this.elements = new Object[this.length];\n/* */ \n/* 766 */ for (int i = 0; i < this.length; i++) {\n/* 767 */ this.elements[i] = Integer.valueOf(paramArrayOfInt[i]);\n/* */ }\n/* */ }\n/* */ }",
"static List<Integer> arrayToList(int[] array) {\r\n List<Integer> list = new ArrayList<Integer>();\r\n for(int i : array)\r\n list.add(i);\r\n return list;\r\n }",
"int[] toArray();",
"public void setArr(int[] arr){ this.arr = arr; }",
"public abstract int[] toIntArray();",
"int[] getInts();",
"public static Spliterator.OfInt spliterator(int[] paramArrayOfint, int paramInt1, int paramInt2, int paramInt3) {\n/* 239 */ checkFromToBounds(((int[])Objects.requireNonNull((T)paramArrayOfint)).length, paramInt1, paramInt2);\n/* 240 */ return new IntArraySpliterator(paramArrayOfint, paramInt1, paramInt2, paramInt3);\n/* */ }",
"public static int[] volteaArrayInt(int array[]) {\n int aux[] = new int[array.length];\n int cont = aux.length;\n for (int n : array) {\n aux[--cont] = n;\n }\n return aux;\n }",
"public void set(int[] ai);",
"private void setIntArr(int[] intArr) {\r\n this.intArr = intArr;\r\n\r\n }",
"static public int[] expandArrayInt(int[] f) {\n\t\treturn expandArray(f);\n\t}",
"public IntArraySpliterator(int[] param1ArrayOfint, int param1Int1, int param1Int2, int param1Int3) {\n/* 1011 */ this.array = param1ArrayOfint;\n/* 1012 */ this.index = param1Int1;\n/* 1013 */ this.fence = param1Int2;\n/* 1014 */ this.characteristics = param1Int3 | 0x40 | 0x4000;\n/* */ }",
"public ArrayListOfIntsWritable(int[] arr)\n {\n super(arr);\n }",
"public native int[] __intArrayMethod( long __swiftObject, int[] arg );",
"public int[] numbers();",
"public static void main(String[] args) {\nint[] array; //int array [];\r\narray=new int [4];\r\narray[0]=3;\r\narray[1]=332;\r\narray[2]=37;\r\narray[3]=45;\r\n//array[4]=2;\r\nSystem.out.println(\"2nd element:\"+array[1]);\r\nint [] arr;\r\narr=new int[4];\r\nfor(int i=0;i<array.length;i++)\r\n{\r\narr[i]=Integer.parseInt(args[i]);\r\n\r\n\r\nSystem.out.println(\" element:\"+arr[i]);\r\n}\r\n/*for(int var:arr)// enhanced for loop\r\n{\r\n\tSystem.out.println(var);\r\n}*/\r\n\t}",
"public static Integer[] acceptIntegerArrayFromUser(String[] args) {\n\n\t\tInteger[] array = null;\n\t\tScanner in = null;\n\t\ttry {\n\t\t\tif (args.length > 0) {\n\t\t\t\tarray = readInputArrayFromFile(array, args[0]);\n\t\t\t}\n\t\t\tif (array == null || array.length == 0) {\n\t\t\t\tarray = readInputFromUser(in);\n\t\t\t}\n\t\t} finally {\n\t\t\tif (in != null) {\n\t\t\t\tin.close();\n\t\t\t}\n\t\t}\n\t\treturn array;\n\n\t}",
"private static void printIntArray(int[] arr){\n\t\tSystem.out.print(\"[ \");\n\t\tfor(Integer i : arr){\n\t\t\tSystem.out.print(i + \" \");\n\t\t}\n\t\tSystem.out.println(\" ]\");\n\t}",
"public interface IntegerArray {\n\t\n\tInteger[] convertIntToIntegerArray(int[] array);\t\n\t\n\t/**\n\t * Concatenates array1 and array2\n\t * @param array1 Array of Integers\n\t * @param array2 Array of Integers\n\t * @return Integer[] New array of Integers containing the elements of array1 plus the elements of array2\n\t */\n\tInteger[] concatArrays(Integer[] array1, Integer[] array2);\n\t\n\t/**\n\t * Returns a new array with no null elements\n\t * @param array Array of Integers with null values\n\t * @return Integer[] New array of Integers with no null values. If the original array contains x\n\t * null values, the new array dimension is reference.length-x. If the original array does not contain\n\t * null values, the new array returned contains the same values as the original one.\n\t */\n\tInteger[] removeNullElements(Integer[] array);\n\n}",
"public static int lonelyInteger(int[] array)\n {\n int result = 0;\n \n for (int val : array)\n {\n // because there is only 1, xor will produce the unique result. \n result ^= val;\n }\n \n return result;\n }",
"public static void printIntegerArray(int[] arr) {\n\t\tfor (int i = 0; i < arr.length; i++)\n\t\t\tSystem.out.println(arr[i]);\n\t}",
"public void setArray(int[] array) {\r\n this.array = array;\r\n }",
"private static int[] processArray(int[] numberArray) {\n for (int i : numberArray) {\n for (int j = 0; j < numberArray.length; j++) {\n// some nonsense calculation to make the CPU tick a bit\n numberArray[j] *= i;\n }\n }\n return numberArray;\n }",
"public static int[] volteaArrayInt(int[]array) { \n \n int[] aux = new int [array.length];\n \n for(int i = 0 ; i < array.length; i++){\n aux[array.length - i - 1] = array[i];\n }\n return aux;\n }",
"public static Spliterator.OfInt spliterator(int[] paramArrayOfint, int paramInt) {\n/* 206 */ return new IntArraySpliterator(Objects.<int[]>requireNonNull(paramArrayOfint), paramInt);\n/* */ }",
"public int inputArray(int[] num) {\n\t\treturn sumEvenIndexes(num);\n\t}",
"void dial(int[]numbers) {\n\t\t\n\t}",
"Integer[] concatArrays(Integer[] array1, Integer[] array2);",
"public abstract ArrayList<Object> calculateTransform(ArrayList<Integer> arr);",
"public abstract int[] getInts(int paramInt1, int paramInt2, int paramInt3, int paramInt4);",
"public IntArr_byteArrArr(int[] integers, byte[][] byteArrArr) {\n\t\tsuper();\n\t\tassert integers.length == byteArrArr.length;\n\t\tint byteLength=byteArrArr[0].length;\n\t\tfor(byte[] onebyteArr:byteArrArr){//each element in byteArrArr should be equal length!\n\t\t\tassert byteLength == onebyteArr.length;\n\t\t}\n\t\tthis.integers = integers;\n\t\tthis.byteArrArr = byteArrArr;\n\t}",
"public void setArray(int[] array) {\r\n\t\tthis.array = array;\r\n\t}",
"public static void printIntArray(int[] array){\n for(int i = 0; i < array.length; i++)\n System.out.print(\"[\" + i + \"]\" + \" = \" + array[i] + \" \");\n }",
"public static int[] populateArray(int [] array) {\n int userInput;\n System.out.println(\"Enter 10 integers: \");\n for(int i = 0; i < array.length; i++){\n Scanner input = new Scanner(System.in);\n userInput = CheckInput.getInt();\n array[i] = userInput;\n }\n return array;\n }",
"public int[][][] testIntArray(int[][][] in) throws java.rmi.RemoteException {\n for (int i=0; i < in.length; i++) {\n int[][] array2 = in[i];\n if (array2 != null)\n for (int j=0; j < array2.length; j++) {\n int[] array3 = array2[j];\n if (array3 != null)\n for (int k=0; k <array3.length; k++) {\n if (array3[k] == i + 10*j + 100*k)\n array3[k] += 1000;\n }\n }\n }\n return in;\n }",
"static SortedSet<Integer> getSet(int[] array){\n SortedSet<Integer> result = new TreeSet<Integer>();\n for (int i=0; i<array.length; i++){\n result.add(array[i]);\n }\n return result;\n }",
"@Test\r\n public void testPrimitiveArray()\r\n {\r\n test(int[].class);\r\n }",
"public static IntegerVarArray make(int[] buffer) {\n\t\treturn new IntegerVarArray(buffer);\n\t}",
"public Difference(int[] array) {\n elements = array;\n Arrays.sort(elements);\n}",
"private int toInt(int[] arrValue) {\n // convert int[] to int\n StringBuilder temp = new StringBuilder();\n\n int i = 0;\n while (i < arrValue.length) {\n temp.append(arrValue[i]);\n i++;\n }\n\n return Integer.parseInt(temp.toString());\n }",
"public static void displayValues(int [] array){\n System.out.println(Arrays.toString(array));\n }",
"public void printArrayValues(int[] arr){\n for(int val : arr){\n System.out.println( val );\n }\n }",
"public static List<Integer> asList(int[] array) {\n\t\treturn new IntList(array);\n\t}",
"private static int[] toIntArray(List<Integer> shorts) {\n int[] array = new int[shorts.size()];\n for (int i = 0; i < shorts.size(); i++)\n array[i] = shorts.get(i).shortValue();\n return array;\n }",
"public static int[] convertIntegersToArray(List<Integer> integers){\n \n \tint[] newArray = new int[integers.size()]; \n \tIterator<Integer> iterator = integers.iterator(); // Declare and create iterator on integers arraylist.\n \n for (int i = 0; i < newArray.length; i++){\n newArray[i] = iterator.next().intValue(); // add elements to newArray \n }\n \n return newArray;\n }",
"public static void main(String[] args) {\n\t\t\n\t\tint[]myArray = new int[4];\n\t\t\n\t\tSystem.out.println(myArray[0]);\n\t\t\n\t\tdouble[] dArray = {3.45, 6.78, 8.54, 4.89}; //an array can take ints, bytes and shorts, as they're smaller. \n\t\t\n\t\t//+++++++++++++++++++An array of ints, can take chars (as they're stored as numbers).\n\t\t\n\t\t\n\t\t\n\t}",
"public static void CountEvenOdd(int[] array) {\n\n }",
"@Test\n @IncludeIn(POSTGRESQL)\n public void array() {\n Expression<Integer[]> expr = Expressions.template(Integer[].class, \"'{1,2,3}'::int[]\");\n Integer[] result = firstResult(expr);\n Assert.assertEquals(3, result.length);\n Assert.assertEquals(1, result[0].intValue());\n Assert.assertEquals(2, result[1].intValue());\n Assert.assertEquals(3, result[2].intValue());\n }",
"@ZenCodeType.Caster\n @ZenCodeType.Method\n default int[] asIntArray() {\n \n return notSupportedCast(\"int[]\");\n }",
"public static int[] volteaArray(int array[]){\r\n int array2[] = new int[array.length];\r\n \r\n for (int i = 0; i<array.length; i++){\r\n array2[(9-i)]=array[i];\r\n }\r\n \r\n return array2;\r\n }",
"public static void printArray( int[] a ) {\n System.out.print(\"[\");\n for( int i : a )\n System.out.print( i + \",\");\n System.out.println(\"]\");\n }",
"public static void printArray( int[] a ) {\n System.out.print(\"[\");\n for( int i : a )\n System.out.print( i + \",\");\n System.out.println(\"]\");\n }",
"public static void convert (int arr[])\r\n\t{\n\t\tArrayList l = new ArrayList ();\r\n\t\t//loop and add element \r\n\t\tfor (int i = 0 ;i<arr.length ; i++) \r\n\t\t{\r\n\t\t\t// index element\r\n\t\t\t// | |\r\n\t\t\tl.add( i , arr[i] );\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// ouput l element \r\n\t\tSystem.out.println(l);\r\n\t}",
"static void printArray(int[] arr) {\n for (int item : arr) {\n System.out.print(item+ \" \");\n }\n }",
"public abstract void sort(int[] array);",
"void printArray(Integer arr[])\n {\n int n = arr.length;\n for (int i=0; i<n; ++i)\n System.out.print(arr[i] + \" \");\n System.out.println();\n System.out.println();\n }",
"public static ListUtilities arrayToList(int[] array){\n\t\tListUtilities startNode = new ListUtilities();\n\t\tif (array.length != 0){\n\t\t\tstartNode.setInt(array[0]);\n\t\t\tfor (int i = 1; i < array.length; i++){\n\t\t\t\tstartNode.addNum(array[i]);\n\t\t\t}\n\t\t}\n\t\treturn startNode;\n\t}",
"@Override\n public void sort(int[] input) {\n }",
"public int[] getIntList();",
"private static int[] getSquersArray(int[] nums) {\n\t\tint[] seqNums = new int[nums.length];\n\t\tint i = 0;\n\t\tfor (int num : nums) {\n\t\t\tseqNums[i] = num * num;\n\t\t\ti++;\n\t\t}\n\t\treturn seqNums;\n\t}",
"public static void main(String[] args) {\nint []ar= {2,5,7,9,2};\nSystem.out.println(ar);\n\t}",
"public static int[] toArray(Collection<Integer> a) {\n assert (a != null);\n int[] ret = new int[a.size()];\n int i = 0;\n for (int e : a)\n ret[i++] = e;\n return ret;\n }",
"public int addValue(int[] array) {\n int val = hashCode();\n for (int i : array) {\n val = addValue(i);\n }\n return val;\n }",
"public int[] ArrayInverso1(int[] arr){\r\n\t\tint l=arr.length;\r\n\t\t\r\n\t\tint[] arr_inv = new int[l];\r\n\t\tfor (int i=0;i<l;i++)\r\n\t\tarr_inv[i]=arr[l-1-i];\r\n\t\treturn arr_inv;\r\n\t\t\r\n\t\t\r\n\t\r\n\t}",
"public static int simpleArraySum() { //(List<Integer> ar)\n \n Integer []ar = {1,2,3}; \n\n Integer sum =0;\n for(Integer i : ar){\n sum +=i;\n }\n return sum; \n }",
"public void writeIntArray(int[] array) throws IOException {\n\t\tfor (int a : array) {\n\t\t\tthis.writeInt(a);\n\t\t}\n\t}",
"void sort(int[] sort);",
"public ShallowCopyEx(int[] values) {\n data = values;\n }",
"public static int[] VolteaArrayInt(int[]array) {\n int aux;\n for (int i = 0; i < array.length / 2; i++) {\n aux = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = aux;\n }\n\n return array;\n }",
"private static void printArray(int[] integerArray) \n\t{\n\t\t\n\t\tfor (int i = 0; i < integerArray.length; i++)\n\t\t{\n\t\t\tSystem.out.println(integerArray[i]);\n\t\t}\n\t\t\n\t}",
"int[] parseIntArray(String[] ar)\n {\n int[] int_ar = new int[ar.length];\n for (int i = 0; i < int_ar.length; i++)\n {\n int_ar[i] = Integer.parseInt(ar[i]);\n }\n return int_ar;\n }",
"public static void printArray(int[] array)\n {\n for (int value : array)\n System.out.print(value + \" \");\n System.out.println();\n }",
"public static void rellenarArray(int res, int array[]) {\n\t\tfor(int i=0;i<res;i++) {\n\t\t\tSystem.out.println(\"Escribe el numero del array en el puesto \" + i);\n\t\t\tint num= sc.nextInt();\n\t\t\tarray[i]= num;\n\t\t\t\n\t\t}\n\t}",
"public int sol2(int[] inArr) \n\t{\n\t\tSet<Integer> set= new HashSet<>();\n\t\tfor (int i : inArr) {\n\t\t\tif(set.contains(i)) {\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t}",
"private static void test3(int[] arr) {\r\n\t\tarr[0]=999;\r\n\t\tarr[1]= 998;\r\n\t}",
"void printArray(int arr[]) {\r\n\r\n //enhanced for loop\r\n for (int item:arr) {\r\n System.out.print(item + \" \");\r\n }\r\n System.out.println();\r\n }",
"static void printArray(int arr[]) \n { \n for (int i = 0; i < arr.length; i++) \n System.out.print(arr[i] + \" \"); \n }",
"public static void main(String args[]){\n int Array_List[]= new int[]{1,2,3,4,5,6,7,8,9,10};\n\n }",
"public static void main(String[] args) {\n\tint arr[]= {1,3,4,2,2};\n\tSystem.out.println(arr);\n\n\n}",
"static public int[] toArray(IntArray array){\r\n final int[] result = new int[array.getLength()];\r\n for (int i = 0; i < array.getLength(); i++) {\r\n result[i] = array.getData(i);\r\n }\r\n return result;\r\n }",
"public static List<Integer> asList(int[] a) {\n assert (a != null);\n List<Integer> ret = new ArrayList<>(a.length);\n for (int e : a)\n ret.add(e);\n return ret;\n }",
"public static void fillArray(int[] array)\r\n {\r\n //Create a local scanner object\r\n Scanner sc = new Scanner(System.in);\r\n \r\n //Prompt user to enter the number of values within the array\r\n System.out.println(\"Enter \" + array.length + \" values\");\r\n \r\n //Loop through array and assign a value to each individual element\r\n for (int n=0; n < array.length; ++n) \r\n {\r\n \r\n System.out.println(\"Enter a value for element \" + n + \":\");\r\n \r\n array[n] = sc.nextInt();\r\n \r\n \r\n \r\n }\r\n \r\n \r\n }",
"public static void printArray(int[] array){\n for(int i=0;i<array.length;i++){\n System.out.print(array[i]+\" \");\n }}",
"public static void printArray( int[] a ) {\n\tSystem.out.print(\"[\");\n\tfor( int i : a )\n\t System.out.print( i + \",\");\n\tSystem.out.println(\"]\");\n }",
"public long inversion(int[] arr) {\r\n\t\treturn sortAndCount(arr);\r\n\t}",
"public static void main(String[] args) {\n List<Integer> sourceList = Arrays.asList(0, 1, 2, 3, 4, 5);\n Integer[] targetArray = sourceList.toArray(new Integer[sourceList.size()]);\n Arrays.stream(targetArray).forEach(System.out::println);\n\n // convert array to list\n Integer[] sourceArray = { 0, 1, 2, 3, 4, 5 };\n List<Integer> targetList = Arrays.asList(sourceArray);\n targetList.stream().forEach(System.out::println);\n\n }",
"public static void printArray( int[] a ) {\n\tSystem.out.print(\"[\");\n\tfor( int i : a )\n\t System.out.print( i + \",\");\n\tSystem.out.print(\"]\");\n }",
"public static void showArrayValue(int arrayParameter[]){\r\n\t\t\tfor(int arrayElement:arrayParameter){\r\n\t\t\t\tSystem.out.println(arrayElement);\r\n\t\t\t}\r\n\t\t}",
"public static void main(String[] args) {\n\t\tint arr[] = { 0, 3, 7, 6, 4, 0, 5, 5, 5 };\n\t\tplusOne(arr);\n\t\tplusOne1(new ArrayList<Integer>(Arrays.asList(0, 3, 7, 6, 4, 0, 5, 5, 5)));\n\t}",
"public static void initIntegerArray(int[] arr) {\r\n\t\tRandom ra = new Random();\r\n\t\tfor (int i = 0; i < arr.length; i++) {\r\n\t\t\tarr[i] = ra.nextInt(arr.length); \r\n\t\t}\r\n\t\tfor (int i = 0; i < arr.length; i++) {\r\n\t\t\tif (arr[i] - ra.nextInt(arr.length) <5) {\r\n\t\t\t\tarr[i] = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static int[] converter(String[] a){\n int size = a.length - 1;\n int[] integers = new int[size];\n for (int i = 0; i < size; i++) {\n integers[i] = Integer.parseInt(a[i+1]);\n }\n return integers;\n }",
"public IntegerSetTest (Integer[][] input) { \r\n\t \r\n\t\tthis.list1 = input[0]; \r\n\t\tthis.unique = input[1];\r\n\t\tthis.list2 = input[2];\r\n\t\tthis.unique2 = input[3];\r\n\t\tthis.intersection = input[4];\r\n\t\tthis.union = input[5];\r\n\t\t}",
"void printArray(int[] arr) {\n\t\tfor (int ele : arr) {\n\t\t\tSystem.out.print(ele + \" \");\n\t\t}\n\t}",
"public static void convert(int [] arr) {\n int[] temp = arr.clone();\n Arrays.sort(temp);\n HashMap<Integer, Integer> map = new HashMap<Integer, Integer>();\n\n int value = 1;\n for (int e : temp) {\n map.put(e, value++);\n }\n\n for (int i=0; i<arr.length; ++i) {\n arr[i] = map.get(arr[i]);\n }\n }",
"public static void arrayAlgoritm(List<int[]> ints) {\n int size=1;\n for (int[] array: ints) {\n size *= array.length;\n }\n\n // Creating a list of indexes. Every index corresponds\n // to a single array\n List<Index> indexList = new ArrayList<>( );\n ints.forEach( array -> indexList.add( new Index( array ) ) );\n\n int[] result;\n List<int[]> finalArrays = new ArrayList<>( );\n\n boolean flag = true;\n\n while (flag) {\n // Creating an array by taking one number from each\n result = new int[ints.size()];\n for (int i=0; i<ints.size(); i++) {\n result[i] = ints.get( i )[indexList.get( i ).getCurrentIndex()];\n }\n\n finalArrays.add( result );\n incrementIndexes(indexList);\n\n // If the size has been reached, this means that all\n // the possible combinations have been extracted\n if (finalArrays.size() == size) flag = false;\n }\n System.out.println(\"Final list size = \" + finalArrays.size());\n finalArrays.forEach( array -> {\n for (int i: array) {\n System.out.print(i + \", \");\n }\n System.out.println(\"==============================\");\n } );\n\n\n }",
"@Override\n\tpublic void sort(int[] array) {\n\n\t}",
"public static int[] convertArray(double[] array) {\r\n\t\t int[] intArray = new int[array.length];\r\n\t\t for (int i=0; i<intArray.length; ++i) {\r\n\t\t intArray[i] = (int) Math.round(array[i]);\r\n\t\t }\r\n\t\t return intArray;\r\n\t }"
]
| [
"0.7279242",
"0.69186807",
"0.6890119",
"0.68697953",
"0.67417306",
"0.67296124",
"0.66770285",
"0.66673344",
"0.6637993",
"0.6625925",
"0.6539273",
"0.6530669",
"0.6513836",
"0.64766675",
"0.64761955",
"0.6435487",
"0.6412524",
"0.63812304",
"0.63427055",
"0.6305965",
"0.62842935",
"0.6282948",
"0.6275084",
"0.6262339",
"0.6239975",
"0.62300056",
"0.6217551",
"0.62146556",
"0.6199899",
"0.6170553",
"0.61696",
"0.6135674",
"0.6125406",
"0.6103329",
"0.6097626",
"0.6091877",
"0.6091177",
"0.6085187",
"0.6070128",
"0.60542095",
"0.6031733",
"0.6019434",
"0.6014886",
"0.6012006",
"0.60115767",
"0.6011505",
"0.6010831",
"0.6004933",
"0.5999409",
"0.5988573",
"0.5988493",
"0.59766537",
"0.59560597",
"0.59557915",
"0.59557915",
"0.59543216",
"0.594848",
"0.59434813",
"0.594031",
"0.59358275",
"0.59299135",
"0.59291357",
"0.5924345",
"0.591892",
"0.59169513",
"0.5916376",
"0.590823",
"0.59035355",
"0.59030914",
"0.5892111",
"0.58843666",
"0.5883554",
"0.58715624",
"0.5871045",
"0.5866154",
"0.5863912",
"0.58620596",
"0.586104",
"0.58541965",
"0.58531064",
"0.58413017",
"0.58369184",
"0.58296275",
"0.58272237",
"0.58255786",
"0.58252704",
"0.58228654",
"0.58186764",
"0.5817134",
"0.5816879",
"0.58160764",
"0.58151287",
"0.58144295",
"0.58095205",
"0.58070093",
"0.5806359",
"0.58043694",
"0.580074",
"0.57970697",
"0.5796726"
]
| 0.67200506 | 6 |
Takes an int and creates an array of that size with all values set to zero | Array(int x) {
array = new int[x];
for (int i = 0; i < array.length; i++) {
array[i] = 0; // make each index 0
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void zero(int[] x)\n {\n for (int i = 0; i != x.length; i++)\n {\n x[i] = 0;\n }\n }",
"public int[] ZeroOutNegs(int[] arr) {\r\n for (int x = 0; x < arr.length; x++) {\r\n if (arr[x] < 0) {\r\n arr[x] = 0;\r\n }\r\n }\r\n return arr;\r\n }",
"private Integer[] getNegArray(int size) {\n Integer[] toReturn = new Integer[size];\n for (int i = 0; i < size; i++) {\n toReturn[i] = -1;\n }\n return toReturn;\n }",
"public static int[] createZeroBasedSequence(int length) {\n\t\tint[] sequence = new int[length];\n\t\tfor (int i = 0; i < sequence.length; i++) {\n\t\t\tsequence[i] = i;\n\t\t}\n\t\treturn sequence;\n\t}",
"public static int[] randomPositiveIntArrayWithoutZero(int size,\n int limit) {\n int[] r = new int[size];\n\n for (int i = 0; i < size; ++i) {\n int rand;\n while ((rand = RAND.nextInt(limit)) == 0) ;\n r[i] = rand;\n }\n\n // Verify array contains no zero element\n for (int i : r) {\n if (i == 0) {\n throw new IllegalStateException(\"Array contains zero.\");\n }\n }\n\n return r;\n }",
"public static int[] removeZeros(int[] input)\n {\n int targetIndex = 0;\n for(int sourceIndex = 0; sourceIndex < input.length; sourceIndex++ )\n {\n if( input[sourceIndex] != 0 )\n input[targetIndex++] = input[sourceIndex];\n }\n\n int[] newArray = new int[targetIndex];\n System.arraycopy( input, 0, newArray, 0, targetIndex );\n\n return newArray;\n }",
"static int[] populateArray(int lenght) {\n\t\tint[] A = new int[lenght];\n\t\t\n\t\tfor(int i=0; i < A.length; i++) {\n\t\t\tA[i] = (int)(Integer.MAX_VALUE * Math.random());\n\t\t}\n\t\t\n\t\treturn A;\n\t}",
"public static IntArrayList zero(int size) {\n IntArrayList result = new IntArrayList(size);\n result.elementsCount = size;\n return result;\n }",
"Array() {\n\t\tarray = new int[0];\n\t}",
"public static void clear (int []n) {\n\t\tfor (int i = 0; i < n.length; i++) {\n\t\t\tn[i] = 0;\n\t\t}\n\t}",
"public int[] reset() {\n return Arrays.copyOf(origin, origin.length);\n }",
"private static int[] stripLeadingZeroInts(int val[]) {\n int vlen = val.length;\n int keep;\n\n // Find first nonzero byte\n for (keep = 0; keep < vlen && val[keep] == 0; keep++)\n ;\n return java.util.Arrays.copyOfRange(val, keep, vlen);\n }",
"public void fillArrayWithNeg1(){\n\t\t\n\t\tArrays.fill(this.theArray, \"-1\");\n\t\t\n\t}",
"public Integer[] createArray() {\n Integer[] value = new Integer[defaultLaenge];\n\n for (int i = 0; i < value.length; i++) {\n value[i] = (int)(value.length*Math.random());\n }\n\n return value;\n }",
"public int[] initializingArray(int size) {\n\t\tint [] array = createArrays(size);\n\t\tfor(int i = 0;i < array.length; i++) {\n\t\t\tarray[i] = rand.nextInt(10);\n\t\t}\n\t\treturn array;\n\t}",
"public void initializeArray(){\n if(topOfStack==-1){\n for(int i=0;i<this.arr.length;i++){\n this.arr[i]=Integer.MIN_VALUE;\n }\n }\n }",
"public BigNum()\r\n { \r\n myArray = new int[SIZE];\r\n for (int i = 0; i < SIZE; i++)\r\n {\r\n myArray[i] = 0;\r\n }\r\n }",
"void reset() {\n for (int i = 0; i < array.length; i++) {\n array[i] = -1;\n }\n }",
"public int[] reset() {\n return nums.clone();\n }",
"public int[] reset() {\n\t\t\treturn originalArr;\n\t\t}",
"public void makeEmpty() {\r\n\t\tArrays.fill(list, -1);\r\n\t}",
"public void zero() {\n fill(0);\n }",
"private static int[] trustedStripLeadingZeroInts(int val[]) {\n int vlen = val.length;\n int keep;\n\n // Find first nonzero byte\n for (keep = 0; keep < vlen && val[keep] == 0; keep++)\n ;\n return keep == 0 ? val : java.util.Arrays.copyOfRange(val, keep, vlen);\n }",
"public static int[] reset() {\n nums = Arrays.copyOf(numsBackUp, numsBackUp.length);\n return nums;\n }",
"private static int[] createRandomFilledArrayOfLength(int n) {\n int[] list = new int[n];\n Random rand = new Random();\n for (int i = 0; i < n; i++) {\n list[i] = rand.nextInt(2*MAX_VALUE) - MAX_VALUE;\n }\n return list;\n }",
"public static Integer[] prepareRandomIntegerArray(int size) {\n\t\tInteger[] array = new Integer[size];\n\t\tfor (int j = 0; j < size; j++) {\n\t\t\tarray[j] = (int) ((Math.random() * 1000000));\n\t\t}\n\t\treturn array;\n\t}",
"public void makeArray() {\r\n for (int i = 0; i < A.length; i++) {\r\n A[i] = i;\r\n }\r\n }",
"private static int[] arrayInitializer(int length) {\n int[] myArray = new int[length];\n Random rand = new Random();\n for (int i = 0; i < length; i++) {\n myArray[i] = rand.nextInt(1000);\n }\n return myArray;\n }",
"private int[] reset() {\n return data;\n }",
"public void clear() {\r\n //This for loop assigns every value in the gameBoard array to -1\r\n //Using the Arrays.fill method and the for loop it fills in all sub arrays\r\n for (int i = 0; i < gameBoard.length; i++) {\r\n Arrays.fill(gameBoard[i], -1);\r\n }\r\n }",
"public int[] reset() {\r\n\t\t\treturn this.initNums;\r\n\t\t}",
"public int[] reset() {\r\n return nums;\r\n }",
"public int[] reset() {\n return nums;\n }",
"public int[] reset() {\n return nums;\n }",
"public int[] reset() {\n return nums;\n }",
"public int[] reset() {\n return nums;\n }",
"public int[] reset() {\n return nums;\n }",
"public int[] reset() {\n return nums;\n }",
"public int[] reset() {\n return nums;\n }",
"public static int[] randomIntArrayWithNegatives(int size, int limit) {\n int[] r = new int[size];\n\n for (int i = 0; i < size; ++i) {\n r[i] = RAND.nextInt(limit);\n\n if (RAND.nextBoolean()) {\n r[i] = -r[i];\n }\n }\n\n return r;\n }",
"public int[] reset() {\n\t\treturn memos;\n\t}",
"public static int[][] init() {\n int[][] arr={\n {0,1,0,1,0,0,0},\n {0,0,1,0,0,1,0},\n {1,0,0,1,0,1,0},\n {0,0,1,0,0,1,0},\n {0,0,1,1,0,1,0},\n {1,0,0,0,0,0,0}\n };\n return arr;\n }",
"public static void mess( int[] a ) {\n for( int i = 0 ; i<a.length; i++ )\n a[i] = 0;\n }",
"public static void mess( int[] a ) {\n for( int i = 0 ; i<a.length; i++ )\n a[i] = 0;\n }",
"private static int[] generate_random_array(int max) {\n int size = ThreadLocalRandom.current().nextInt(2, max + 1);\n int[] array = new int[size];\n for (int i = 0; i < size - 1; i++) {\n int distance = size - i > i ? size - i : i;\n array[i] = ThreadLocalRandom.current().nextInt(1, distance);\n }\n array[size - 1] = 0;\n return array;\n }",
"private void setPointsAs0() {\n\n for (int counter = 0; counter < countOfPoints; counter++) {\n points[counter] = new Point(0,0);\n }\n\n }",
"private static void cleanArray() {\n\t\tfor(int i = 0 ; i < n ;i++){\r\n\t\t\tcolTemp[i] = 0;\r\n\t\t\trowTemp[i] = 0;\r\n\t\t}\r\n\t}",
"public static int[] exe1(int[] arr){ // Solution O(n) in time and constant in Memory\n int nzeros=0;\n\n for (int i=0; i<arr.length; i++) {\n arr[i-nzeros] = arr[i];\n if (arr[i] == 0) {\n nzeros++;\n }\n }\n for (int i=arr.length-1; i>arr.length-nzeros-1; i--) {\n arr[i] = 0;\n }\n\n return arr;\n }",
"public void setToZero() {\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++) {\n data[i][j] = 0;\n }\n }\n }",
"private static int[] createArray() {\n\t\trnd = new Random();\r\n\t\trandomArray = new int[8];\r\n\t\tfor (int i = 0; i < 8; i++) {\r\n\t\t\trandomArray[i] = rnd.nextInt(45);\r\n\t\t}\r\n\t\treturn randomArray;\r\n\t}",
"FunWithArrays(int size){\r\n\t\tnumbers = new int[size];\r\n\t}",
"private static ByteBuffer _zeroBuffer( int size, BufferType type )\n {\n ByteBuffer zeroBuf = zeroTL(type).get();\n zeroBuf.clear();\n zeroBuf.limit(size);\n return zeroBuf;\n }",
"public static void initIntegerArray(int[] arr) {\r\n\t\tRandom ra = new Random();\r\n\t\tfor (int i = 0; i < arr.length; i++) {\r\n\t\t\tarr[i] = ra.nextInt(arr.length); \r\n\t\t}\r\n\t\tfor (int i = 0; i < arr.length; i++) {\r\n\t\t\tif (arr[i] - ra.nextInt(arr.length) <5) {\r\n\t\t\t\tarr[i] = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void makeArray(int num)\n {\n \tmakeArray(num,0);\n }",
"void makeZero(){\n nnz = 0;\n for(int i=0; i<this.matrixSize; i++){\n this.rows[i] = new List();\n }\n }",
"@Override\n\tpublic int[] toArray() {\n\t\treturn null;\n\t}",
"public Integer[] createInverseSortedArray() {\n Integer[] value = new Integer[defaultLaenge];\n\n for (int i = 0; i < value.length; i++) {\n value[i] = defaultLaenge - i;\n }\n\n return value;\n }",
"private static int[] buildArray(int num) {\n\t\t// TODO build an array with num elements\n\t\tif(num ==0) return null;\n\t\t\n\t\tint[] array = new int[num];\n\t\tfor(int i=0; i<num; i++){\n\t\t\t\n\t\t\tarray[i] = (int)(Math.random()*15);\n\t\t}\n\t\t\n\t\treturn array;\n\t}",
"@SuppressWarnings(\"unchecked\")\n public static <T> Array<T> empty()\n {\n return (Array<T>) EMPTY;\n }",
"private static int[] makePositive(int a[]) {\n int keep, j;\n\n // Find first non-sign (0xffffffff) int of input\n for (keep=0; keep < a.length && a[keep] == -1; keep++)\n ;\n\n /* Allocate output array. If all non-sign ints are 0x00, we must\n * allocate space for one extra output int. */\n for (j=keep; j < a.length && a[j] == 0; j++)\n ;\n int extraInt = (j == a.length ? 1 : 0);\n int result[] = new int[a.length - keep + extraInt];\n\n /* Copy one's complement of input into output, leaving extra\n * int (if it exists) == 0x00 */\n for (int i = keep; i < a.length; i++)\n result[i - keep + extraInt] = ~a[i];\n\n // Add one to one's complement to generate two's complement\n for (int i=result.length-1; ++result[i] == 0; i--)\n ;\n\n return result;\n }",
"public void clear()\n\t{\n\t\tfor (int i = 0; i < data.length; i++)\n\t\t{\n\t\t\tdata[i] = 0;\n\t\t}\n\t}",
"public static void mess( int[] a ) {\n\tfor( int i = 0 ; i<a.length; i++ )\n\t a[i] = 0;\n }",
"public static void mess( int[] a ) {\n\tfor( int i = 0 ; i<a.length; i++ )\n\t a[i] = 0;\n }",
"public void testCrearArrayEnForNoEspecificado(int size) {\n\t\tfor (int i = 1; i <= size; i++) { \n\t\t\tint[] array = new int[i]; //tempLocal = size : size >=1\t \n\t\t}\n\t}",
"public int[] reset() {\r\n return reset;\r\n }",
"public static int[] generateRandomArray(){\n return new Random().ints(0, 100000)\n .distinct()\n .limit(1000).toArray();\n }",
"public void reset_array() {\r\n\t\tfor(int i=0;i<9;i++) {\r\n\t\t\ts[i]=\"\";\r\n\t\t}\r\n\t}",
"public void clear() {\n\t\tfor (int x = 0; x < counters.length; x++) {\n\t\t\tcounters[x] = 0;\n\t\t\tArrays.fill(counters, (byte)0);\n\t\t}\n\t}",
"private static int[] createArray(int n) {\n\t \tint[] array = new int[n];\n\t \tfor(int i=0; i<n; i++){\n\t \t\tarray[i] = (int)(Math.random()*10);\n\t \t}\n\t\t\treturn array;\n\t\t}",
"public void makeArray(int size) {\n\t\t\n\t}",
"void createArray(int n) {\n numbers = new int[n];\n for ( int i = 0; i < n; i++){\n numbers[i] = random.nextInt(1000);\n }\n }",
"public int[] reset() \n {\n return reset;\n }",
"public static IntegerVarArray make(int[] buffer) {\n\t\treturn new IntegerVarArray(buffer);\n\t}",
"public int[] reduceInit() {\n return null;\n }",
"private static int[] initArray(int N){\n int[] a = new int[N];\n for (int i=0;i<N;i++)\n a[i] = (int)(Math.random()*99999 + 100000);\n return a;\n }",
"public IntArrays(int initialCapacity)\n\t{\n\t\tarraySize = 0;\n\t\tif (initialCapacity > 0)\n\t\t{\n\t\t\tarray = new int[initialCapacity];\n\t\t} else\n\t\t{\n\t\t\tSystem.err.println(\"Error: Initial capacity invalid, setting capacity to default of 10...\");\n\t\t\tarray = new int[DEFAULT_ARRAY_SIZE];\n\t\t}\t\t\n\t}",
"public void testCrearArrayNoEspecificado(int size) {\n\t\tint[] array = new int[size]; //tempLocal = 1\n\t}",
"public static int[] decreasingIntArrBuilder(int length)\n {\n int[] vals = new int[length];\n for (int i = 0; i < length; i++)\n vals[i] = length - i;\n\n return vals;\n }",
"public static int[][] raggedArray(){\n int n=(int)(Math.random()*11);\n n+=10; \n //this randomly assigns n to between 10 and 20\n int[][] ragged=new int[n][];\n //initialize this array with n first components\n //forloop to assign each inner array a length\n for(int i=0; i<n; i++){\n int m=(int)(Math.random()*11);\n m+=10; //m is between 10 and 20\n ragged[i]=new int[m];\n //another for loop to assign values\n for(int k=0; k<m; k++){\n int val=(int)(Math.random()*1001);\n int sign=(int)(Math.random()*2);\n if(sign==0){\n \n }\n else{\n val*=-1;\n //makes it 50/50 to be negative\n }\n ragged[i][k]=val;\n //assigns value to that spot of array\n }\n }\n return ragged;\n }",
"public void testCreateEmptyArray() {\n System.out.println(\"createEmptyArray\"); // NOI18N\n \n TypeID componentType = new TypeID(TypeID.Kind.COMPONENT,\"Root\"); // NOI18N\n \n PropertyValue result = PropertyValue.createEmptyArray(componentType);\n List<PropertyValue> expResult = new ArrayList<PropertyValue> (0);\n \n assertEquals(expResult, result.getArray());\n }",
"private static void PushZerosToEnd(int[] arr, int n) {\n\t\n\t\tint count=0;\n\t\tfor(int i=0;i<n;i++) \n\t\t\tif(arr[i]!=0)\n\t\t\t\tarr[count++]=arr[i];\n\t\t\n\t\twhile(count<n)\n\t\t{\n\t\t\tarr[count++]=0;\n\t\t}\n\t}",
"private static Vector emptyVector (int size)\n\t{\n\t\tVector v = new Vector ();\n\t\tfor (int i=0; i <= size; i++)\n\t\t{\n\t\t\tv.add (i, \"\");\n\t\t}\n\t\treturn v;\n\n\t}",
"public static IntegerVarArray make(int count) {\n\t\treturn new IntegerVarArray(count);\n\t}",
"public static int[] fillArray(int[] array, int size) {\r\n\t\tfor (int x = 0; x < size; x = x + 1) {\r\n\t\t\tarray[x] = ReadUserInput.readInt();\r\n\t\t}\r\n\t\treturn array;\r\n\t}",
"public int[][] createEmptyGrid() {\n int[][] emptyGrid = new int[9][9];\n for (int row = 0; row < 9; row++) {\n for (int col = 0; col < 9; col++) {\n emptyGrid[row][col] = 0;\n }\n }\n return emptyGrid;\n }",
"public int[][] zeroMatrix(int[][] matrix){\n\tboolean[][] zeros = new boolean[matrix.length][matrix[0].length];\n\tfor (int i = 0; i < matrix.length; i++){\n\t\tfor (int j = 0; j < matrix[0].length; j++) {\n\t\t\tif (matrix[i][j] == 0) zeros[i][j] = true;\n\t\t}\n\t}\n\n\tfor (int i = 0; i < matrix.length; i++) {\n\t\tfor (int j = 0; j < matrix[0].length; j++) {\n\t\t\tif (zeros[i][j]){\n\t\t\t\tfor (int k = 0; k < matrix.length; k++){\n\t\t\t\t\tmatrix[k][j] = 0;\n\t\t\t\t}\n\t\t\t\tfor (int k = 0; k < matrix[0].length; k++){\n\t\t\t\t\tmatrix[i][k] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn matrix;\n}",
"public CircularArray(int initialSize) {\n\t\tthis.array = new Object[initialSize];\n\t\tthis.index = 0;\n\t\tthis.length = 0;\n\t}",
"private static void fillArray(int[][] array) {\n for (int i = 0; i < array.length; i++)\n for (int j = 0; j < array[i].length; j++)\n array[i][j] = i + j;\n\n // The following lines do nothing\n array = new int[1][1];\n array[0][0] = 239;\n }",
"public void resetChangeableArrays(int[] reg)\n {\n valList = new LinkedList<Integer>();\n possibilityList = new LinkedList<Point>();\n for(int j = 0; j<accumulator.length; j ++)Arrays.fill(accumulator[j],0);\n //accumulator = zeroAccumulator;\n region = reg;\n \n }",
"public static void sort(int[] arr)\n {\n // count number of 0's\n int count = 0;\n for (int value: arr)\n {\n if (value == 0) {\n count++;\n\n }\n }\n //System.out.println(count);\n // put 0's at the beginning\n int i = 0;\n while (count-- != 0) {\n arr[i] = 0;\n i++;\n }\n //System.out.println(i);\n\n // fill all remaining elements by 1\n while (i < arr.length) {\n arr[i] = 1;\n i++;\n }\n }",
"public static int[] createArray(int n) {\r\n\t\tmyOriginalArray = new int[n];\r\n\t\treturn myOriginalArray;\r\n\t}",
"public void clear()\n\t{\n\t\tarraySize = 0;\n\t}",
"Object createArray(int capacity);",
"public void clearInitialize(){\n index=0;\n for(int i =0; i < list.length;i++){\n list[i]=0;\n }\n hasFilled = false;\n\n }",
"public static int[][] getZeroArray(int rowNum, int colNum) {\r\n\t\tint[][] retA = new int[rowNum][colNum];\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tretA[i][j] = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn retA;\r\n\t}",
"public static int[] makeArray( Random random){\n\t\tint[] arr = new int[10];\n\t\tfor (int i = 0; i < arr.length; i++)\n\t\t\tarr[i] = random.nextInt(200);\n\t\treturn arr;\n\t}",
"public void aendereWertFunktioniert(int[] arr) {\n\t\tif (arr.length > 0)\n\t\t\tarr[0] = 0;\n\t}",
"public static ArrayList<Integer> removeZeros(ArrayList<Integer> p)\n\t{ The best way: Create a new empty integer array list and\n\t // only copy the non-zero numbers of parameter array list p into it. \n\t\t // Use a for loop\n\t\t //-----------Start below here. To do: approximate lines of code = 5\n\t\t //\n\t\t ArrayList<Integer> helo = new ArrayList<Integer>();\n\t\t for (Integer number:p){\n\t\t\t if (number!=0){\n\t\t\t helo.add(number);\n\t\t }\n\t\t}\n\t\t return helo;\n\t\t }",
"public int[] generateArray() {\n return generateArray(5);\n }",
"public static int[][] createArrayForCards(int totalPlayers) {\n int[][] cardValues = new int[totalPlayers][2];\n // this makes the default value zero. redunant yes, but wanted to populate it first\n for (int i = 0; i < cardValues.length; i++) {\n for (int j = 0; j < 2 ; j++) {\n cardValues[i][j] = 0;\n }\n }\n return cardValues;\n }"
]
| [
"0.74063826",
"0.6871385",
"0.6866691",
"0.68285865",
"0.6790089",
"0.6769735",
"0.6743497",
"0.6707091",
"0.6690591",
"0.6626388",
"0.65777886",
"0.6529333",
"0.64746577",
"0.6452671",
"0.64510065",
"0.641133",
"0.63932604",
"0.6381851",
"0.63585",
"0.6296867",
"0.6294426",
"0.6285821",
"0.62664014",
"0.6263729",
"0.62262285",
"0.6124236",
"0.6100503",
"0.6099446",
"0.6097157",
"0.6081527",
"0.6064346",
"0.6054851",
"0.60477394",
"0.60477394",
"0.60477394",
"0.60477394",
"0.60477394",
"0.60477394",
"0.60477394",
"0.60433286",
"0.60293245",
"0.6000783",
"0.5984633",
"0.5984633",
"0.59759444",
"0.59700924",
"0.59696513",
"0.5962846",
"0.5957638",
"0.59541047",
"0.5945335",
"0.59333706",
"0.5924974",
"0.59232736",
"0.59146935",
"0.5900997",
"0.5892689",
"0.5890525",
"0.58751154",
"0.5873049",
"0.5870387",
"0.58690464",
"0.58690464",
"0.5863626",
"0.58595073",
"0.585309",
"0.5852779",
"0.5851841",
"0.5850917",
"0.5840082",
"0.58382154",
"0.58173853",
"0.5810165",
"0.58095795",
"0.5802833",
"0.5797852",
"0.5797768",
"0.57963467",
"0.57822394",
"0.5781911",
"0.57758546",
"0.57680875",
"0.57651",
"0.57635504",
"0.57629",
"0.57605433",
"0.5749708",
"0.5745095",
"0.5741145",
"0.5733156",
"0.571259",
"0.5711951",
"0.57097334",
"0.57075655",
"0.5697965",
"0.56866586",
"0.56858075",
"0.56843066",
"0.5682086",
"0.56790376"
]
| 0.72315305 | 1 |
returns the value at "index" in the array get() method tailored to Concert Population context | int getConcertPopulation(int index) {
return array[index];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int get(int index) {\n return array[index];\n }",
"int get(int index)\n\t{\n\t\treturn inputArray[index];\n\t}",
"public Occ get( int index )\n {\n if ( index < 0 || index >= size ) throw new IndexOutOfBoundsException( \"\"+index+\" >= \"+size );\n return data[index];\n }",
"@Override\n public E get(int index) {\n // todo: Students must code\n checkRange(index); // throws IndexOOB Exception if out of range\n return data[calculate(index)];\n }",
"public int get(int index);",
"public Object getValue(int index);",
"public Object get(int index) {\n\tif(index > arr.length) return null;\n\treturn arr[index];\n}",
"public int get(int index) {\n\t\treturn r[index];\n\t}",
"public int getElementAtIndex(int index){\r\n return mArray[index];\r\n }",
"public Object get( int index )\n {\n\treturn _data[index];\n }",
"@Override\n public E get(final int index) {\n return array[index];\n }",
"public Object get(int index);",
"public Object get(int index);",
"@Override\n public int get(int index) {\n checkIndex(index);\n return getEntry(index).value;\n }",
"public Object get(int index) {\r\n return entry(index).element;\r\n }",
"public synchronized E get(int index) {\n return this.array.get(index);\n }",
"public Object get(int index) {\n\t\tif(index <= arr.length-1) return arr[index];\n\t\treturn null;\n\t}",
"abstract int get(int index);",
"abstract public Object getValue(int index);",
"public int getValueAtIndex(int index) {\n if (index < arraySize)\n return theArray[index];\n\n return 0;\n }",
"public int get(final int index) {\n return mFactorBase[index];\n }",
"Object get(int index);",
"Object get(int index);",
"public int get(int index) {\n\t checkIndex(index);\n\t return elementData[index];\n\t }",
"public RatPoly get(int index) {\n //TODO: Fill in this method, then remove the RuntimeException\n throw new RuntimeException(\"RatPolyStack->get() unimplemented!\\n\");\n }",
"public E get(int index){\n if (index < 0 || index >= size){\n throw new ArrayIndexOutOfBoundsException(index);\n }\n return theData[index];\n }",
"public int getElement(int index){\n if(index <0 || index >= array.length){\n throw new RuntimeException(\"Array index out of bound\");\n }\n return array[index];\n }",
"public T get(int index) throws IndexOutOfBoundsException {\n checkException(index);\n return arr[index];\n }",
"Object getArrayElement(int index);",
"Object getArrayElement(int index);",
"@ZenCodeType.Operator(ZenCodeType.OperatorType.INDEXGET)\n default IData getAt(int index) {\n \n return notSupportedOperator(OperatorType.INDEXGET);\n }",
"public T get(int index){ return this.isUpgraded ? this.linkArray.get(index) : this.nativeArray.get(index); }",
"@Override\n public T get(final int index) {\n this.checkIndex(index);\n return this.data[index];\n }",
"public E get(int index) {\n return this.elements[index];\n }",
"public int get(int index)\n\t{\n\t\tif (index > -1 && index < arraySize)\n\t\t{\n\t\t\treturn array[index];\n\t\t} else \n\t\t{\n\t\t\tSystem.out.println(\"Syntax error.\");\n\t\t}\t\t\n\t\treturn -1;\n\t}",
"public double get(int index) {\n\t\treturn _elements.getOrDefault(index, 0.0);\n\t}",
"public float get(int index) {\r\n RangeCheck(index);\r\n return elementData[index];\r\n }",
"@Override\n\tpublic int get(int index) throws IndexOutOfBoundsException {\n\t\tif(checkIndex(index, size)) { //check if index is valid\n\t\t\treturn values[index]; //return the value at index\n\t\t}else {\n\t\t\tthrow new IndexOutOfBoundsException(\"Highest index: \" + size);\n\t\t}\t\n\t}",
"public T get(int index);",
"public T get(int index);",
"public T get(int index);",
"@Override\n public T get(int index) {\n return (T) array[index];\n }",
"public Object getProperty (String index) ;",
"int get(int idx);",
"public static PositionConfidence valueAt(int index)\n {\n\tif (index < 0 || index >= 16)\n\t throw new IndexOutOfBoundsException();\n\t\n\treturn cNamedNumbers[index];\n }",
"public double get(int index) {\n\t\treturn 0;\n\t}",
"public Comparable get( int index ) {\n \treturn _data[index]; }",
"public GPoint get(int index) {\n\t\treturn points.get(index);\n\t}",
"public Evolvable getIndividual(int index){\n\t\treturn population[index];\n\t}",
"@Override\n public E get(int index) {\n this.rangeCheck(index);\n return (E) this.values[index];\n }",
"public Integer get(int index) {\r\n return dice.get(index);\r\n }",
"@Override\n public T get(int index) {\n if (index < 0 || index >= size) {\n return null;\n }\n int position = index + plusOne(nextFirst);\n if (position >= array.length) {\n position -= array.length;\n return array[position];\n } else {\n return array[position];\n }\n }",
"@Override\n public final Integer get(final int index) {\n if (!checkRange(index)) {\n throw new IndexOutOfBoundsException();\n } else {\n return arrayList[index];\n }\n }",
"float get(int idx);",
"public Integer get(int index){\n return list.get(index);\n }",
"public T get(int index) {\n return v.get(index);\n }",
"public long getElem(int index) {\r\n return a[index];\r\n }",
"public Object get(int index) {\n\t\tif (index < 0 || index > (size - 1)) {\n\t\t\tthrow new IndexOutOfBoundsException(\n\t\t\t\t\t\"Cannot get the element with invalid index from the ArrayIndexedCollection.\");\n\t\t}\n\n\t\treturn elements[index];\n\t}",
"public E get(int index)\n\t{\n\t\treturn contents[index];\n\t}",
"@Override\n\tpublic T get(int index) {\n\t\tif (index >= 0 && index < size) {\n\t\t\treturn data[index];\n\t\t}\n\t\treturn null;\n\t}",
"public Object get(int index)\n {\n return items[index];\n }",
"@Override\n public T get(int index) {\n return indexCheck(index) ? (T) data[index] : null;\n }",
"public T get(int index){\n if(!rangeCheck(index)){\n return null;\n }\n return (T)data[index];\n }",
"public float get(int index) {\n return storage[index];\n }",
"public int getElement(int index) {\r\n\t\t//Defensive\r\n\t\tif (index < 0) {\r\n\t\t\tthrow new IllegalArgumentException(\"Index less than zero\");\r\n\t\t}\r\n\t\tif (index >= getLength()) {\r\n\t\t\tthrow new IllegalArgumentException(\"Index out of upper bound\");\r\n\t\t}\r\n\t\tif (getLength() <= 0) {\r\n\t\t\tthrow new IllegalArgumentException(\"The array does not yet exist\");\r\n\t\t}\r\n\t\t\r\n\t\treturn getNodeAt(index).value;\r\n\t}",
"public T get(int aIndex);",
"@Override\n // worst-case complexity: O(1), it's basically just an array access\n public T get(int index) {\n if (index < size && index >= 0)\n return arr[index];\n // else throw an exception\n throw new IndexOutOfBoundsException();\n }",
"T get(int index);",
"T get(int index);",
"T get(int index);",
"T get(int index);",
"T get(int index);",
"protected int _getInt(int index)\r\n/* 378: */ {\r\n/* 379:392 */ return HeapByteBufUtil.getInt(this.array, index);\r\n/* 380: */ }",
"public E get(int index)\n {\n if (index >= 0 && index < size)\n return data[index];\n else\n throw new NoSuchElementException();\n }",
"@SuppressWarnings(\"unchecked\")\n public <T> T get(int index) {\n return (T)this.values[index];\n }",
"public E get(int idx) {\n assert idx >= 0;\n \n if(v == array[idx]){\n\t\tv = array[idx];\n\t}\n\t\n\tif(array[idx] == null){\n\t\tv = null;\n\t}\n\treturn v;\n }",
"float getIn(int index);",
"public Fraction get(int index)\r\n\t{\r\n\t\tif(index<0 || index >=n)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Invalid index\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn a[index];\r\n\t}",
"public abstract T get(int index);",
"@Override\n @SuppressWarnings(\"unchecked\")\n public T get(int index)\n {\n return (T) array[index];\n }",
"public E get(int index) {\r\n\t\tif (indices.get(index) == null) {\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\t} else {\r\n\t\t\treturn indices.get(index).data;\t\t\r\n\t\t}\r\n\t}",
"public Object get(int index)\n // returns the element at the specified position in this list.\n {\n if (index <= 0)\n return null;\n \n CrunchifyNode crunchifyCurrent = head.getNext();\n for (int i = 1; i < index; i++) {\n if (crunchifyCurrent.getNext() == null)\n return null;\n \n crunchifyCurrent = crunchifyCurrent.getNext();\n }\n return crunchifyCurrent.getData();\n }",
"public BigDecimal get(final int index) {\n ensureCapacity(index + 1); // capacity is one more than index\n return cache[index];\n }",
"public double get(int index) {\n\t\treturn attrs.getQuick(index);\n\t}",
"public T get(int index) {\n return this.list[index];\n }",
"@Override\r\n\tpublic Category getElementAt(int index) {\n\t\treturn cs.get(index);\r\n\t}",
"public E get(int index) {\n //make sure the index is valid\n if (this.array.length - 1 >= index) {\n //encapsulate\n Object element = this.array[index];\n return (E) element;\n } \n \n //if the index is invalid, return -1\n throw new IllegalArgumentException();\n }",
"public Object get(final int index) {\n return super.get(index);\n }",
"public E get(int index);",
"E get( int index );",
"@Override\r\n public Object getElementAt(int index) {\n return vs.get(index);\r\n }",
"public int getElementArray1(int index)\n {\n return array1[index];\n }",
"public T get(int index) {\n return items[(nextFirst + 1 + index) % capacity];\n }",
"public Object getValueAt(int index);",
"public Object get(int index) {\r\n return deref(refs.get(index));\r\n }",
"public E get(int index) {\n\t\tresetIterator();\n\t\tif (index < 0 || index >= size) {\n\t\t\treturn null;\n\t\t}\n\n\t\tfor (int i = 0; i < index; i++) {\n\t\t\tnext();\n\t\t}\n\t\treturn iterator.data;\n\t}",
"@Override\n public Object getElement(int index){\n return gameCollection.elementAt(index);\n }",
"public int getData(int index) {\n return data_.get(index);\n }",
"public String get(int index) {\n\n return solutionVector[index];\n }",
"@Override\n public E get(final int index) {\n ensureValidIndex(size, index);\n return super.get(index + lower);\n }"
]
| [
"0.76855075",
"0.76004404",
"0.7343242",
"0.72840244",
"0.72836524",
"0.7240621",
"0.721842",
"0.71805793",
"0.7080758",
"0.70684123",
"0.7059557",
"0.70078444",
"0.70078444",
"0.7007419",
"0.6990394",
"0.69600487",
"0.69424075",
"0.69390726",
"0.6922515",
"0.69127643",
"0.6904088",
"0.6885845",
"0.6885845",
"0.68581146",
"0.6852564",
"0.6845979",
"0.68245083",
"0.6820435",
"0.6819428",
"0.6819428",
"0.68105304",
"0.67871815",
"0.67817616",
"0.6776777",
"0.6766244",
"0.6766091",
"0.6738416",
"0.6736371",
"0.6721226",
"0.6721226",
"0.6721226",
"0.67116326",
"0.67100596",
"0.6701508",
"0.66910416",
"0.6690469",
"0.6667443",
"0.6659555",
"0.6648037",
"0.66430473",
"0.66423833",
"0.6636401",
"0.6632418",
"0.6625405",
"0.66222024",
"0.6590246",
"0.65890026",
"0.65777934",
"0.6575706",
"0.6567309",
"0.65468025",
"0.6539906",
"0.6529667",
"0.6521413",
"0.65106416",
"0.6509953",
"0.64950347",
"0.6491642",
"0.6491642",
"0.6491642",
"0.6491642",
"0.6491642",
"0.6483071",
"0.6482506",
"0.648162",
"0.647116",
"0.6468423",
"0.6464482",
"0.646382",
"0.64535123",
"0.6441399",
"0.64191806",
"0.6416387",
"0.64118934",
"0.64012897",
"0.64012516",
"0.6401156",
"0.64003766",
"0.63975644",
"0.6387295",
"0.63655925",
"0.633571",
"0.63309306",
"0.6326837",
"0.6325915",
"0.6323",
"0.6317141",
"0.63108176",
"0.6307259",
"0.6301592"
]
| 0.7512753 | 2 |
adds a number at the end of the array and increases its size by 1 | void push(int val) {
int[] temp = new int[array.length + 1]; // temporary place holder
for (int i = 0; i < array.length; i++) {
temp[i] = array[i];
}
temp[array.length] = val;
// the next statement is not really an assignment, it is having array
// point to a different memory location
array = temp;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void addLast(T item) {\n if (size >= array.length) {\n resize(size * 2);\n array[nextLast] = item;\n nextLast = plusOne(nextLast);\n } else {\n array[nextLast] = item;\n nextLast = plusOne(nextLast);\n }\n size += 1;\n }",
"void add(int value) {\n size++;\n\n int[] newItems = new int[size];\n\n System.arraycopy(items, 0, newItems, 0, items.length);\n\n newItems[newItems.length - 1] = value;\n\n items = newItems;\n }",
"public void add(E value){\n if (maxIndex != array.length-1){\n array[++maxIndex] = value;\n }else {\n Object[] tmpArray = new Object[array.length+ capacity];\n for (int i = 0; i < array.length; i++) {\n tmpArray[i] = array[i];\n }\n array = tmpArray;\n array[++maxIndex] = value;\n }\n }",
"void add (int value) {\n array[fillLength] = value;\n fillLength++;\n for (int i = fillLength - 1; i > 0; i--) {\n if (array[i - 1] > array[i]) {\n int tempHolder = array[i];\n array[i] = array[i - 1];\n array[i - 1] = tempHolder;\n } else {\n break;\n }\n }\n }",
"public void add( Object value )\n\t{\n\t\tint n = size();\n\t\tif (addIndex >= n)\n\t\t{\n\t\t\tif (n == 0)\n\t\t\t\tn = 8;\n\t\t\telse\n\t\t\t\tn *= 2;\n\t\t\tObject narray = Array.newInstance( array.getClass().getComponentType(), n );\n\t\t\tSystem.arraycopy( array, 0, narray, 0, addIndex );\n\t\t\tarray = narray;\n\t\t}\n\t\tArray.set( array, addIndex++, value );\n\t}",
"private int plusOne(int index) {\n if (index + 1 >= array.length) {\n return 0;\n } else {\n return index + 1;\n }\n }",
"public void add(int num) {\n // if the array is not large enough, an array of twice\n // the capacity is created\n if (count + 1 > list.length) {\n int[] temp = new int[list.length * 2];\n for (int i = 0; i < list.length; i++) {\n temp[i] = list[i];\n }\n list = temp;\n temp = null;\n }\n \n // add the element to the array and increment the count\n list[count++] = num;\n }",
"public static int[] addElement(int[] a, int e) {\n\t a = Arrays.copyOf(a, a.length + 1);\n\t a[a.length - 1] = e;\n\t return a;\n\t}",
"private static void test() {\n\t\tint i = 0;\n\t\tArrays.fill(arr, -1);\n\t\tarr[++i] = 0;\n\t\tprintArray(arr);\n\t\ti = 0;\n\t\tArrays.fill(arr, -1);\n\t\tarr[i++] = 0;\n\t\tprintArray(arr);\n\t\t\n\t}",
"private byte[] increment(byte[] array) {\n for (int i = array.length - 1; i >= 0; --i) {\n byte elem = array[i];\n ++elem;\n array[i] = elem;\n if (elem != 0) { // Did not overflow: 0xFF -> 0x00\n return array;\n }\n }\n return null;\n }",
"private void grow() {\n int growSize = size + (size<<1);\n array = Arrays.copyOf(array, growSize);\n }",
"public void add(int toBeAdded) {\n\t\tif (this.myCount==this.myValues.length){\n\t\t\tSystem.err.println(\"No more space in array\");\n\t\t\tSystem.exit(1);\n\t\t}\n \tthis.myValues[this.myCount] = toBeAdded;\n this.myCount++;\n }",
"public void add(int value) {\n\t \tensureCapacity(size+ 1);\n\t \telementData[size] = value;\n\t \tsize++;\n\t }",
"public int add(T newData) {\n\t\tint newLength = 1;\n\t\t// If there is more data to add then available space in the array\n\t\tif(newLength > (array.length - length)) {\n\t\t\t// Double the array size\n\t\t\texpandArray(array.length);\n\t\t}\n\n\t\t// If the new data will wrapping around, add the new data and wrap around to fit\n\t\tif((index + length) < array.length && newLength > (array.length - (index + length))) {\n\t\t\t// The number of elements available up to the end of the array before needing to wrap around\n\t\t\tint tailLength = array.length - (index + length);\n\t\t\t// Copy data up to the end of the array\n\t\t\tif(tailLength > 0) {\n\t\t\t\tarray[index+length] = newData;\n\t\t\t}\n\t\t\t// Copy rest of data 'wrapped around' to the beginning of the array\n\t\t\telse {\n\t\t\t\tarray[0] = newData;\n\t\t\t}\n\t\t}\n\t\t// Else if the data fits without wrapping around, add the new data\n\t\telse {\n\t\t\tarray[(index + length) % array.length] = newData;\n\t\t}\n\t\t// Adjust the length\n\t\tlength = length + newLength;\n\t\t// Return the number of elements successfully added\n\t\treturn newLength;\n\t}",
"public void add( Comparable newVal ) {\n \t//if _data is full, expand the array\n \tif (_size == _data.length){\n\t \texpand();\n \t}\n \t\n\tset(_lastPos + 1, newVal);\n \t//increases _lastPos and _size\n \t_lastPos++;\n \t_size++;\n }",
"public void Add(int[] item) {\n Add(item.length * 4);\n\n\n for (int i = 0; i < item.length; i++) {\n AddInt(item[i]);\n }\n mLenght += Integer.SIZE / 8 * item.length;\n mBackOffset = mLenght;\n }",
"@Override\n // worst-case complexity: O(n), since it might need to resize itself\n // amortised average-case complexity: O(1), since resizing happens too\n // too infrequent to affect the actual complexity\n public void add(T item) {\n if (size >= arr.length)\n arr = resize(arr, EXPAND_FACTOR);\n // we add the item to the end and then increment the size\n arr[size++] = item;\n }",
"@Override\n\tpublic boolean add(Object e)\n\t{\n\t\tif (size == myArray.length)\n\t\t\tresizeUp();\n\t\tmyArray[size] = e;\n\t\tsize++;\n\t\treturn false;\n\t}",
"@Override\n public void add(T t) {\n checkIfArrayFull();\n\n arrayList[elementsInArray] = t;\n elementsInArray++;\n }",
"@Override\n public void addFirst(T item) {\n if (size >= array.length) {\n resize(size * 2);\n array[nextFirst] = item;\n nextFirst = minusOne(nextFirst);\n } else {\n array[nextFirst] = item;\n nextFirst = minusOne(nextFirst);\n }\n size += 1;\n }",
"@Override\n public void add(int i, E e) throws IndexOutOfBoundsException {\n checkIndex(i, size + 1);\n if (size == data.length) // not enough capacity\n throw new IllegalStateException(\"Array is full\");\n for (int k = size - 1; k >= i; k--) // start by shifting rightmost\n data[k + 1] = data[k];\n data[i] = e; // ready to place the new element\n size++;\n }",
"public static void plus1(int[]arr)\r\n\t{\r\n\t\tint i=arr.length-1;\r\n\t\twhile(i>=0&&arr[i]==1)\r\n\t\t\tarr[i--]=0;\r\n\t\tif(i>=0)\r\n\t\t\tarr[i]=1;\r\n\t}",
"@Override\n public void addLast(E value) {\n if (value == null) {\n throw new NullPointerException(\"Value can not be null\");\n }\n if (isEmpty()) {\n head = tail = 0;\n dequeue[tail] = value;\n size++;\n return;\n }\n tail = ++tail % dequeue.length;\n dequeue[tail] = value;\n size++;\n if (size == dequeue.length) {\n widen();\n }\n }",
"@Override\n public boolean add(T t) {\n if (size >= 10) {\n data = new Object[(data.length * 3) / 2 + 1];\n data = Arrays.copyOfRange(data, 0, data.length);\n }\n data[size++] = t;\n return true;\n }",
"public void add(int x)\n {\n int arrayLength = list.length; // get size of array\n if (length == arrayLength)\n {\n list = Arrays.copyOf(list, 100 + list.length);\n list[length] = x;\n length++;\n\n } else\n {\n list[length] = x;\n length++;\n }\n }",
"public void addLast(T item) {\n if (size == 0) {\n array[rear] = item;\n size++;\n return;\n }\n\n this.checkReSizeUp();\n rear++;\n this.updatePointer();\n array[rear] = item;\n size++;\n }",
"public void append(int key) {\r\n\t\tif (size != 0 && key <= keys[size - 1]) {\r\n\t\t\tadd(key);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tint pos = size;\r\n\t\tif (pos >= keys.length) {\r\n\t\t\tint n = ArrayUtils.idealArraySize(pos + 1);\r\n\r\n\t\t\tint[] nkeys = new int[n];\r\n\r\n\t\t\tSystem.arraycopy(keys, 0, nkeys, 0, keys.length);\r\n\r\n\t\t\tkeys = nkeys;\r\n\t\t}\r\n\r\n\t\tkeys[pos] = key;\r\n\t\tsize = pos + 1;\r\n\t}",
"@Override\n public void add(E value) {\n if (value == null) {\n throw new NullPointerException();\n }\n if (size == capacity) {\n resize();\n }\n array[size] = value;\n siftUp(size);\n size++;\n\n\n }",
"private static List<Integer> addOnePlus(List<Integer> input) {\n\n\t\tint size = input.size();\n\t\tinput.set(size-1, input.get(size-1)+1);//last element of input is updated/replaced by (original value + 1)\n\n\t\tfor(int i=size-1; i>0 && input.get(i)==10; i--) {\n\t\t\tinput.set(i, 0);\n\t\t\tinput.set(i-1, input.get(i-1)+1);\n\t\t}\n\n\t\tif(input.get(0) == 10) {\n\t\t\tinput.set(0, 0);\n\t\t\tinput.add(0, 1);//add 1 at index0 ,shift all elements after to right\n\t\t}\n\n\t\treturn input;//this modifies the original input\n\t}",
"@Override\n public void add(E work) {\n if(isFull()) {\n throw new IllegalStateException();\n }\n array[end] = work;\n end = (end + 1) % capacity();\n size++;\n }",
"@Override\n public boolean add(T object) {\n T[] newArray;\n if (array[array.length - 1] != null) {\n newArray = (T[]) new Object[array.length * 2];\n } else {\n newArray = (T[]) new Object[array.length];\n }\n for (int i = 0; i < array.length; i++) {\n newArray[i] = array[i];\n }\n newArray[size] = object;\n this.size++;\n this.array = newArray;\n return true;\n }",
"private static void PushZerosToEnd(int[] arr, int n) {\n\t\n\t\tint count=0;\n\t\tfor(int i=0;i<n;i++) \n\t\t\tif(arr[i]!=0)\n\t\t\t\tarr[count++]=arr[i];\n\t\t\n\t\twhile(count<n)\n\t\t{\n\t\t\tarr[count++]=0;\n\t\t}\n\t}",
"static int addOne(int[] a, int offset, int mlen, int carry) {\n offset = a.length-1-mlen-offset;\n long t = (a[offset] & LONG_MASK) + (carry & LONG_MASK);\n\n a[offset] = (int)t;\n if ((t >>> 32) == 0)\n return 0;\n while (--mlen >= 0) {\n if (--offset < 0) { // Carry out of number\n return 1;\n } else {\n a[offset]++;\n if (a[offset] != 0)\n return 0;\n }\n }\n return 1;\n }",
"public void add(int Item) {\n\t\t\tif (nowLength < MAXSIZE) {\n\t\t\t\tray[nowLength] = Item;\n\t\t\t\tnowLength++;\n\t\t\t}\n\t}",
"protected void grow()\r\n\t{\t\r\n\t\tif(debug)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Debug - Starting grow\");\r\n\t\t}\r\n\t\t\r\n\t\tint[] temp = new int[count*2];\r\n\t\t\r\n\t\tfor(int index = 0; index < count; index++)\r\n\t\t{\r\n\t\t\ttemp[index] = numArray[index];\r\n\t\t\t\r\n\t\t\tif(debug)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Debug - temp[index] = \" + temp[index]);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tnumArray = temp;\r\n\t\t\r\n\t\tif(debug)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Debug - Ending grow\");\r\n\t\t}\r\n\t}",
"@Override\n public boolean add(T item) {\n // if the last spot in the array is unoccupied, item is simply added to the first empty spot\n if (arr[arr.length-1]!=null) {\n arr[size + 1] = item;\n size++;\n }\n // if array is full, number of spots is doubled and item is added\n if (arr[arr.length-1]== null){\n grow();\n arr[size+1] = item;\n size++;\n }\n return true;\n }",
"public boolean add(int number)\n\t{\n\t\tif (arraySize >= array.length)\n\t\t{\n\t\t\tthis.ensureCapacity(array.length * 2 + 1);\n\t\t} \n\t\tarray[arraySize] = number;\t\n\t\tarraySize++;\n\t\treturn true;\n\t}",
"private int[] appendArray(int[] array, int x) {\n int[] result = new int[array.length + 1];\n\n for (int i = 0; i < array.length; i++)\n result[i] = array[i];\n\n result[result.length - 1] = x;\n\n return result;\n }",
"public void addLast(T t) {\n if (size == elements.length) // checks potential overflow\n ensureCapacity(); // increase capacity\n elements[size] = t; //store element at last position\n size++; // increment size\n }",
"public boolean add( T element )\n {\n // THIS IS AN APPEND TO THE LOGICAL END OF THE ARRAY AT INDEX count\n if (size() == theArray.length) upSize(); // DOUBLES PHYSICAL CAPACITY\n theArray[ count++] = element; // ADD IS THE \"setter\"\n return true; // success. it was added\n }",
"public int addFixedLengthData(int[] data) {\n // remember where we store the data\n int oldIndex = curIndex;\n addInts(data);\n // after storing, the new index is now moved by the length of the data\n curIndex += data.length;\n return oldIndex;\n }",
"private void arrayIncreaaseSize(MyArrayList myArrayList, Results results) {\r\n int old_size = myArrayList.length();\r\n int value;\r\n Random rand = new Random();\r\n \r\n for(int i=0; i<50; i++) {\r\n value = rand.nextInt(10000);\r\n if(value < 0) {\r\n value = value * -1;\r\n }\r\n myArrayList.insertSorted(value);\r\n }\r\n if(myArrayList.length() == old_size + 25) {\r\n results.storeNewResult(\"ArrayIncrease test case: PASSED\");\r\n }\r\n else {\r\n results.storeNewResult(\"ArrayIncrease test case: FAILED\");\r\n }\r\n }",
"public void add(int kn) {\n\t\tif(this.size > this.N-1) {\n\t\t\tsetNDouble(N);\n\t\t}\n//\t\tSystem.out.println(this.n + \" \" + this.size);\n\t\tarray[this.size] = kn;\n\t\tthis.size++;\n\t}",
"public void addLast(int key)\r\n {\r\n if(numItems < maxSize)\r\n {\r\n mArray[numItems] = key;\r\n numItems++;\r\n }\r\n\r\n }",
"@Override\n\tpublic void add(int n) {\n\t\tvalues[size] = n; //add value to the list\n\t\tsize++; //increment size\n\t\tif (size == values.length){ //if the list is full expand it\n\t\t\tresize();\n\t\t}\n\t}",
"void add(int index, int value) {\n int[] newItems = new int[size++];\n\n System.arraycopy(items, 0, newItems, 0, index);\n\n newItems[index] = value;\n\n System.arraycopy(items, index, newItems, index + 1, items.length - index);\n\n items = newItems;\n }",
"private void addNumberToArrayByIndex(Number[] array, Number number, int index) {\n if (index >= array.length) {\n array = arrayExtension(array);\n }\n array[index] = number;\n }",
"private void addInt(int value) {\n if (LOGGER.isDebugEnabled()) {\n LOGGER.debug(\"Adding int index at \" + intCount + \" value \" + value);\n }\n ensureIntArrayCapacity(intCount + 1);\n intArray[intCount] = value;\n intCount += 1;\n }",
"public void addLength(int num) {\r\n this.length += num;\r\n }",
"final void add(int elt) {\n if (contents == null)\n return;\n if (n == contents.length) {\n int[] new_contents = new int[2*n+1];\n //@ assert n < new_contents.length;\n arraycopy(contents, 0, new_contents, 0, n);\n contents = new_contents;\n }\n if (n < 0 || n >= contents.length) \n return;\n contents[n]=elt;\n n++;\n }",
"public void insertValue(int value) {\n if (arraySize < 50) {\n theArray[arraySize] = value;\n arraySize++;\n }\n }",
"@Override\n public boolean add(int index, T object) {\n T[] newArray;\n if (array[array.length - 1] != null) {\n newArray = (T[]) new Object[array.length * 2];\n } else {\n newArray = (T[]) new Object[array.length];\n }\n for (int i = 0; i < index; i++) {\n newArray[i] = array[i];\n\n }\n newArray[index] = object;\n for (int i = index + 1; i < array.length; i++) {\n newArray[i] = array[i - 1];\n }\n this.size++;\n this.array = newArray;\n return true;\n }",
"public void push(int x) {\n\t\tif (size() == capacity()) {\n\t\t\tdoubleSize();\n\t\t}\n\t\tarr[end] = x;\n\t\t++end;\n\t}",
"public int addData(int[] data) {\n // remember where we store the data\n int oldIndex = curIndex;\n // first store the length of the data\n addInt(data.length);\n addInts(data);\n // after storing, the new index is now moved by the length of the data\n // plus the two chars where we store the length\n curIndex += data.length+1;\n return oldIndex;\n }",
"public void addElement(int element) {\n \tif(element > 0) {\n \tarray[head++] = element;\n \t}else {\n \t\tthrow new RuntimeException(\"Invalid element to add\");\n \t}\n }",
"public void offer(int num){\n if(tail == fixedSize - 1) {\n List<Object> newList = new ArrayList<>();\n newList.add(num);\n //save next new list at tail\n tailList.add(newList);\n tailList = (List<Object>) tailList.get(tail);\n tail = 0;\n }else{ //not in last index,then directly add it;\n tailList.add(num);\n }\n count++;\n tail++;\n }",
"@Override\n public void add(int index, T element) {\n Object[] newArray = new Object[size + 1];\n for (int i = 0; i < index; i++) {\n newArray[i] = data[i];\n }\n newArray[index] = element;\n for (int i = index + 1; i < newArray.length; i++) {\n newArray[i] = data[i - 1];\n }\n data = newArray;\n size++;\n }",
"public void addAll(T[] arr, int from, int length);",
"public void add(Object o){\n if (n<sequence.length){\n// sequence[n]=o;\n// n++;\n sequence[n++]=o;\n }\n }",
"void add(byte[] data, int offset, int length);",
"public void addAtTail(int val) {\n addAtIndex(size, val);\n }",
"public void addAtTail(int val) {\n addAtIndex(size, val);\n }",
"@Override\n public boolean add(E e) {\n head++; //Increment the head by one\n if (head == ringArray.length)\n head = 0; //If we get to the end of the ring set the pointer to be 0 again to loop back round\n ringArray[head] = e; //Get the element\n if (elementCount < ringArray.length) //Increase the element count up until the length because at that point the number of elements cant change.\n elementCount++;\n return true;\n }",
"public boolean insertLast(int value) {\n if (isFull()) {\n return false;\n }\n arr[tail] = value;\n tail = (tail + 1) % k;\n return true;\n\n }",
"private void addSizeArray() {\n int doubleSize = this.container.length * 2;\n Object[] newArray = new Object[doubleSize];\n System.arraycopy(this.container, 0, newArray, 0, this.container.length);\n this.container = new Object[doubleSize];\n System.arraycopy(newArray, 0, this.container, 0, doubleSize);\n }",
"@Override\n public final boolean add(final Integer element) {\n // First, check to see that the array can support another element\n ensureCapacity(size);\n // Add the element to the next available slot\n arrayList[size++] = element;\n return true;\n }",
"public void enqueue(int value) {\n if (tail >= arr.length - 1) {\n return;\n }\n arr[++tail] = value;\n if (head == -1) {\n head = 0;\n }\n }",
"public void add(E element){\n if(size==capacity){\n capacity *=2;\n E[] array2 = (E[]) new Object[capacity];\n if (size >= 0) System.arraycopy(array, 0, array2, 0, size);\n array2[size]=element;\n array=array2;\n }else{\n array[size]=element;\n }\n size++;\n }",
"private static List<Integer> addOne(List<Integer> input) {\n\n\t\tList<Integer> copy = new ArrayList<>();\n\t\tcopy.addAll(input);\n\n\t\tint size = copy.size();\n\t\tcopy.set(size-1, input.get(size-1)+1);//last element of input is updated/replaced by (original value + 1)\n\n\t\tfor(int i=size-1; i>0 && copy.get(i)==10; i--) {\n\t\t\tcopy.set(i, 0);\n\t\t\tcopy.set(i-1, copy.get(i-1)+1);\n\t\t}\n\n\t\tif(copy.get(0) == 10) {\n\t\t\tcopy.set(0, 0);\n\t\t\tcopy.add(0, 1);//add 1 at index0 ,shift all elements after to right\n\t\t}\n\n\t\treturn copy;//this NOT modifies the original input\n\t}",
"public void addFirst(E s) {// 0(1)\r\n\t\t//checks if there is any space left in the array\r\n\t\tif (size>=capacity)\r\n\t\t\tresize(this.capacity*2);\t//increases size of the array\r\n\t\tlist[size]=s;\t//adds element to the array\r\n\t\tsize++;\t//increases size\r\n\t}",
"public boolean add(T value) {\n if (size == arr.length) {\n final int newSize = arr.length * 3 / 2 + 1;\n T[] newArr = (T[]) new Object[newSize];\n System.arraycopy(arr, 0, newArr, 0, arr.length);\n this.arr = newArr;\n }\n arr[size++] = value;\n return true;\n }",
"@Override\n public void enqueue(E e) {\n array.addLast(e);\n }",
"private int plusOne(int i) {\n return (i + 1) % capacity;\n }",
"public static int[] grow(int[] array) {\n\t\treturn grow(array, 1 + array.length);\n\t}",
"public static int[] plusOne(int[] digits) {\n\n int last = digits.length - 1;\n\n // check if last element less than 9, if so add 1 and return array\n if (digits[last] < 9){\n digits[last] = digits[last] + 1;\n return digits;\n }\n\n //declare variable increment\n int increment = 0;\n for (int i = last; i > -1; i--) {\n if (i == last) {\n digits[i] = digits[i] + 1;\n }\n \n digits[i] = digits[i] + increment;\n increment = 0;\n if (digits[i] > 9) {\n increment++;\n digits[i] = digits[i] % 10;\n }\n }\n\n if (increment > 0) {\n int[] moreDigits = new int[digits.length + 1];\n moreDigits[0] = increment;\n for (int j = 1; j < moreDigits.length; j++) {\n moreDigits[j] = digits[j-1];\n }\n return moreDigits;\n }\n\n return digits;\n }",
"private void grow()\n\t{\n\t\tint temp[] = new int[count * 2];\n\t\tfor(int index = 0; index < count; index = index + 1)\n\t\t\ttemp[index] = array1[index];\n\t\tarray1 = temp;\n\t}",
"public void add(T element){\r\n if (element == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n \r\n // If array is full, double the size\r\n if (size == elements.length) {\r\n resize(elements.length * 2);\r\n }\r\n \r\n elements[size] = element;\r\n size++;\r\n }",
"@Override\n public void add(final int index, final T element) {\n this.checkIndexToAdd(index);\n\n if (this.size > this.data.length - 1) {\n this.doubleArraySizeBy(2);\n }\n\n for (int i = this.size; i > index; i--) {\n this.data[i] = this.data[i - 1];\n }\n\n this.data[index] = element;\n this.size++;\n }",
"public int[] increaseBy2(int[] arr) {\n return null;\n }",
"@Override\n public synchronized void add(E element) {\n if (this.pointer == this.capacity) {\n int newCapacity = this.capacity + (this.capacity >> 1);\n Object[] arr = Arrays.copyOf(this.container, newCapacity);\n this.capacity = newCapacity;\n this.container = arr;\n }\n this.container[this.pointer++] = element;\n }",
"@Override\n public void add(int index, E value) {\n // todo: Students must code\n ensureCapacity();\n int pos = calculate(index); // True position in array\n\n // if there are no elements, set head to the position (index 0, position ??)\n // *protects against divide by zero in modulus*\n if(size() == 0) {\n data[pos] = value;\n head = pos;\n tail = pos;\n // tail = (pos+1)%data.length;\n }\n // if the logical position is the head, then insert right before head and reassign head-variable\n // *tail stays the same*\n else if(index == 0) {\n int i = (head-1);\n if (i < 0) i = data.length-1;\n head = i;\n data[head] = value;\n }\n else{\n // shift all array contents after pos right 1\n for(int i = (pos + size() - index); i > pos; i--)\n data[i % data.length] = data[(i-1) % data.length];\n data[pos] = value;\n tail = (tail + 1) % data.length;\n }\n curSize++;\n }",
"public void sizeIncrease1() {\n\t\t _size++;\n\t}",
"private void increaseSize() {\n data = Arrays.copyOf(data, size * 3 / 2);\n }",
"@Override\n public boolean add(E value) {\n if (this.values.length == this.index) {\n this.grow();\n }\n this.modCount++;\n this.values[index++] = value;\n return true;\n }",
"public void enqueue(Integer elem) {\n\t\t // add to end of array\n\t\t // increase size\n\t\t // create a recursive helper, percolateUp,\n\t\t // that allows you puts the inserted val \n\t\t // in the right place\n\t\t if(size == capacity) {\n\t\t\t ensureCapacity(size);\n\t\t }\n\t\t data[size] = elem;\n\t\t size++;\n\t\t percolateUp(size-1); \n\t }",
"@Override\n public void add(int index, E value) {\n this.rangeCheck(index);\n if (this.values.length == this.index) {\n this.grow();\n }\n this.modCount++;\n System.arraycopy(this.values, index, this.values, index + 1, this.size() - index);\n this.values[index] = value;\n this.index++;\n }",
"public void addFirst(T t) {\n if (size == elements.length) // checks potential overflow\n ensureCapacity(); // increase capacity\n for (int j = size; j > 0; j--) // treat elements of list with indexes in range [1, n]\n elements[j] = elements[j - 1]; // element shifts to right\n size++; // increment size\n elements[0] = t; // store element at index 0\n }",
"public void addAtTail(int val) {\n addAtIndex(this.size, val);\n }",
"@Override\n public boolean add(final T element) {\n if (this.size > this.data.length - 1) {\n this.doubleArraySizeBy(2);\n }\n\n this.data[this.size++] = element;\n return true;\n }",
"private void grow()\r\n\t{\r\n\t\tint [] temp = new int[count * 2]; // new array to hold the data\r\n\r\n\t\t// copy old data in new array\r\n\t\tfor (int i = 0; i < count; i++)\r\n\t\t\ttemp[i] = array[i];\r\n\r\n\t\tarray = temp; // update the new array\r\n\t}",
"public void insertRight( long j ) {\n if ( end == max - 1 ) {\n end = -1;\n }\n Array[++end] = j;\n nItems++;\n }",
"public void insert(int newItem){\n itemArray[count] = newItem;\n count++;\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic void add(T value) {\n\t\t// Append an element to the end of the storage.\n\t\t// Double the capacity if no space available.\n\t\t// Amortized O(1)\n\n\t\tif (size == capacity()) {\n\t\t\tT newData[] = (T[]) new Object[2 * capacity()];\n\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\tnewData[i] = data[i];\n\t\t\t}\n\t\t\tdata = newData;\n\t\t}\n\n\t\tdata[size] = value;\n\t\tsize++;\n\t}",
"public int add(T[] newData, int offset, int newLength) {\n\t\tif(newLength < 1 || newData == null || offset+newLength > newData.length) {\n\t\t\treturn 0;\n\t\t}\n\t\t// If there is more data to add then available space in the array\n\t\tif(newLength > (array.length - length)) {\n\t\t\t// Double the array size\n\t\t\texpandArray(array.length);\n\t\t}\n\n\t\t// If the new data will wrapping around, add the new data and wrap around to fit\n\t\tif((index + length) < array.length && newLength > (array.length - (index + length))) {\n\t\t\t// The number of elements available up to the end of the array before needing to wrap around\n\t\t\tint tailLength = array.length - (index + length);\n\t\t\t// Copy data up to the end of the array\n\t\t\tSystem.arraycopy(newData, offset, array, index + length, tailLength);\n\t\t\t// Copy rest of data 'wrapped around' to the beginning of the array\n\t\t\tSystem.arraycopy(newData, offset+tailLength, array, 0, newLength-tailLength);\n\t\t}\n\t\t// Else if the data fits without wrapping around, add the new data\n\t\telse {\n\t\t\tSystem.arraycopy(newData, offset, array, (index + length) % array.length, newLength);\n\t\t}\n\t\t// Adjust the length\n\t\tlength += newLength;\n\t\t// Return the number of elements successfully added\n\t\treturn newLength;\n\t}",
"@Override\n public void addLast(E e) throws IllegalStateException {\n checkSize();\n data[size] = e;\n size++;\n }",
"public void add(E a)\n {\n if (size == data.length) { // if the list is at capacity...\n // create a new, larger array\n E[] newData = (E[])(new Object[2*data.length]);\n \n // copy over all of the old elements\n for (int i = 0; i < size; i++)\n newData[i] = data[i];\n \n // redirect the old data reference\n data = newData;\n }\n\n // insert the new element\n data[size] = a;\n size++;\n }",
"public void addLast(TypeHere x) {\n if (size == items.length) {\n resize(size + 1);\n }\n items[size] = x;\n size += 1;\n }",
"public void add(T val){\n myCustomStack[numElements] = val; // myCustomStack[0] = new value, using numElements as index of next open space\n numElements++; //increase numElements by one each time a value is added to the stack, numElements will always be one more than number of elements in stack\n resize(); //call resize to check if array needs resizing\n }",
"public void add(double n){\n list [index] = n;\n index ++;\n if (index==length){\n if(!hasFilled){\n hasFilled = true;\n }\n index=0;\n }\n }",
"public void addLast(T item) {\n if (isFull()) {\n resize(capacity * 2);\n }\n items[nextLast] = item;\n nextLast = plusOne(nextLast);\n size += 1;\n }",
"public void addLast(Item x) {\n if (size == items.length) {\n resize(size * 2);\n }\n items[size] = x;\n size += 1;\n }"
]
| [
"0.6884718",
"0.6857309",
"0.67910004",
"0.67241096",
"0.67225385",
"0.6662752",
"0.6631659",
"0.65719223",
"0.65082365",
"0.64899594",
"0.6487361",
"0.6487037",
"0.64779085",
"0.6476168",
"0.6470515",
"0.64219916",
"0.6397185",
"0.6377971",
"0.6358615",
"0.6350054",
"0.6345917",
"0.6339014",
"0.633623",
"0.63362074",
"0.631425",
"0.6303504",
"0.6292456",
"0.627639",
"0.62736404",
"0.62730795",
"0.62693655",
"0.62551266",
"0.62511736",
"0.6248589",
"0.62385744",
"0.62286127",
"0.6210617",
"0.6206534",
"0.61885434",
"0.61850244",
"0.6173519",
"0.6167576",
"0.61588234",
"0.6147449",
"0.6141229",
"0.61350214",
"0.61337084",
"0.611412",
"0.6099817",
"0.6091939",
"0.6082538",
"0.6066474",
"0.60632735",
"0.6057613",
"0.6039213",
"0.60321766",
"0.60319024",
"0.60317403",
"0.60304",
"0.6017588",
"0.601542",
"0.601542",
"0.6015172",
"0.60049427",
"0.6003152",
"0.598146",
"0.5975593",
"0.597287",
"0.5961119",
"0.5958857",
"0.59566534",
"0.59560966",
"0.5945971",
"0.59444165",
"0.5937587",
"0.592852",
"0.59234387",
"0.5919397",
"0.59177303",
"0.59159213",
"0.5913805",
"0.59084105",
"0.5908316",
"0.5906215",
"0.5905617",
"0.590011",
"0.58999413",
"0.58952045",
"0.58825463",
"0.5876172",
"0.5870701",
"0.58541954",
"0.5845402",
"0.5835105",
"0.5833017",
"0.5832198",
"0.58116955",
"0.57901794",
"0.57819253",
"0.5778128",
"0.5777803"
]
| 0.0 | -1 |
returns the last item from the array and decreases the size of the array | int pop() {
int[] temp = new int[array.length - 1]; // temporary place holder
for (int i = 0; i < array.length - 1; i++) {
temp[i] = array[i];
}
// returning last value in array
int lastValue = array[array.length - 1];// array.length - 1 bc its the
// last term
array = temp;
return lastValue;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public U getLast(){\r\n\t \tif (getArraySize()==0)\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \t//calls get\r\n\t \treturn get(numElems-1);\r\n\t }",
"@Override\n public T removeLast() {\n if (size == 0) {\n return null;\n }\n\n int position = minusOne(nextLast);\n T itemToReturn = array[position];\n array[position] = null;\n nextLast = position;\n size -= 1;\n\n if ((double)size / array.length < 0.25 && array.length >= 16) {\n resize(array.length / 2);\n }\n return itemToReturn;\n }",
"public T removeLast() {\n if (size == 0) {\n return null;\n }\n if (size == 1) {\n size--;\n return array[rear];\n }\n this.checkReSizeDown();\n size--;\n rear--;\n this.updatePointer();\n return array[Math.floorMod(rear + 1, array.length)];\n }",
"public Item getLast() {\n return items[size - 1];\n }",
"public TypeHere getLast() {\n return items[size - 1];\n }",
"public U removeLast(){\r\n\t \tif (getArraySize()==0)\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \t//calls remove on last\r\n\t \treturn remove(numElems-1);\r\n\t }",
"public Item removeLast() {\n Item last = items[size];\n items[size] = null;\n size -= 1;\n return last;\n }",
"@Override\r\n public T pop() {\r\n if (this.isEmpty()) {\r\n throw new ArrayIndexOutOfBoundsException();\r\n }\r\n final T top = (T) this.array[0];\r\n this.array[0] = this.array[--this.size];\r\n this.bubbleDown();\r\n return top;\r\n }",
"public int lastElement() {\r\n\r\n\t\treturn (usedSize - 1);\r\n\r\n\t}",
"public T deleteLast() {\n Object[] newElements = new Object[elements.length]; // creating new array with size of \"elements\"\n T deletedValue; //\n if (size == 0) { // if list is empty\n throw new IndexOutOfBoundsException(\"Treated index: \" + 0 + \" | Size of the Dynamic Array \" + 0);\n } else if (size == 1) { // if size is 1\n deletedValue = (T) elements[elements.length - 1]; // save value of deleted element\n elements = newElements; // move temporary array to main array \"elements\"\n } else {\n deletedValue = (T) elements[elements.length - 1]; // save value of deleted element\n for (int i = 0; i < size - 1; i++) // treat all elements except the last one\n newElements[i] = elements[i]; // copy elements in temporary array\n elements = newElements; // move temporary array to main array \"elements\"\n }\n size--; // decrement size\n return deletedValue; // return previous value of last element\n }",
"public Item removeLast(){\r\n\t\tif (isEmpty()) throw new NoSuchElementException(\"Queue underflow\");\r\n\t\tItem tmp = list[last--];\r\n\t\tn--;\r\n\t\tlatter=last+1;\r\n\t\tif(last==-1){last=list.length-1;}\r\n\t\tif (n > 0 && n == list.length/4) resize(list.length/2); \r\n\t\treturn tmp;}",
"public TypeHere removeLast() {\n TypeHere x = getLast();\n items[size - 1] = null;\n size -= 1; \n return x;\n }",
"public Item pop(){\n Item t = a[--size];\r\n a[size] = null;\r\n if(size > 0 && size == a.length/4){\r\n resize(a.length/2); //元素个数达到数组的1/4时候,比如原来length是8 当pop弹栈时,size减少到2时候进行缩减至1/2也就是4个\r\n }\r\n return t;\r\n }",
"public long removeRight() {\n long temporary = Array[end--];\n if ( end == -1 ) {\n end = max-1;\n }\n nItems--;\n return temporary;\n }",
"@Override\n public Persona Last() {\n return array.get(tamano - 1);\n }",
"public T removeLast( ){\r\n\t\tif (isEmpty())\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t//last node\r\n\t\tArrayNode<T> node = endMarker.prev;\r\n\t\ttry{\r\n\t \tmodCount++;\r\n\t \tnumAdded--;\r\n\t \t//calls nested method\r\n\t\t\treturn node.removeLast();\r\n\t\t}catch( IndexOutOfBoundsException e){\t//empty node\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t}\r\n\t}",
"public int pop() {\n var tmp = array[dataSize - 1];\n removeAt(dataSize - 1);\n\n if (dataSize < arraySize / 2)\n halveSize();\n\n return tmp;\n }",
"@Override\n public Item removeLast() {\n nextLast = moveBack(nextLast, 1);\n Item output = items[nextLast];\n items[nextLast] = null;\n size -= 1;\n return output;\n }",
"@Override\n public Item getBack() {\n int lastActualItemIndex = size - 1;\n return items[lastActualItemIndex];\n }",
"private E remove(){\n E tmp = array[0];\n swap(0,--lastPosition);\n array[lastPosition] = null;\n trickleDown(0);\n array = Arrays.copyOfRange(array,0,array.length);\n return tmp;\n }",
"@Override\n public void addLast(T item) {\n if (size >= array.length) {\n resize(size * 2);\n array[nextLast] = item;\n nextLast = plusOne(nextLast);\n } else {\n array[nextLast] = item;\n nextLast = plusOne(nextLast);\n }\n size += 1;\n }",
"public Object last() {\r\n\t\treturn elements.get(size() - 1);\r\n\t}",
"public Item getLast() {\n Node nextToLast = findNode(size-1);\n Node removed = nextToLast.next;\n nextToLast.next = head;\n removed.next = null;\n size--;\n return removed.item;\n }",
"public int Rear() {\n if (count == 0) {\n return -1;\n }\n return array[tail];\n }",
"public T getLast( ){\r\n\t\tif (isEmpty())\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t//last node\r\n\t\tArrayNode<T> last = endMarker.prev;\r\n\t\ttry{\r\n\t\t\t//last elem\r\n\t\t\treturn last.getLast();\r\n\t\t}catch( IndexOutOfBoundsException e){\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t}\r\n\t}",
"public Item pop() {\n\t\tif (N < arr.length/4)\n\t\t\tresize (arr.length/2);\n\t\tItem s = arr[--N];\n\t\tarr[N] = null;\n\t\treturn s;\n\t}",
"public E getLast() {\r\n\r\n\t\treturn (E) data.get(data.size() - 1);\r\n\t}",
"protected int removeLast() {\n if (size > 0) {\n return heap[size--];\n }\n return null;\n }",
"public E poll()\n {\n if(size > 0)\n {\n E retElement = arrayList.get(0);\n arrayList.set(0, arrayList.get(size() - 1));\n arrayList.remove(size() - 1);\n size--;\n trickleDown(0);\n return retElement;\n }\n return null;\n }",
"private int dequeue(){\n size--;\n int ret = array[front];\n front = (front+1)%capacity;\n return ret;\n }",
"public Object lastElement();",
"public static native long GetLast(long lpjFbxArrayVector2);",
"@Override\n public T remove() {\n if(numItems == 0)\n return null;\n return this.arr[--numItems];\n }",
"@Override\n public E removeLast() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n E value = dequeue[tail];\n dequeue[tail] = null;\n tail--;\n if (tail == -1) {\n tail = dequeue.length - 1;\n }\n size--;\n if (size < dequeue.length / 2) {\n reduce();\n }\n return value;\n }",
"public T removeLast(){\n\tT ret = _end.getCargo();\n\t_end = _end.getNext();\n\t_end.setPrev(null);\n\t_size--;\n\treturn ret;\n }",
"public Object take() {\r\n\t\tObject result = elements[elements.length - 1];\r\n\t\tObject[] newElements = new Object[elements.length - 1];\r\n\t\tSystem.arraycopy(elements, 0, newElements, 0, newElements.length);\r\n\t\telements = newElements;\r\n\t\treturn result;\r\n\t}",
"public T removeLast() {\n if (_size == 0)\n throw new NoSuchElementException();//If nothing to remove, you cant remove\n T ret = _end.getCargo();\n _end = _end.getBefore();//set end to the thing before end\n _size--;\n return ret;\n }",
"int getEnd()\n {\n // check whether Deque is empty or not \n if(isEmpty() || end < 0)\n {\n System.out.println(\" Underflow\\n\");\n return -1 ;\n }\n return arr[end];\n }",
"public T removeLast() {\n if (size() == 0) {\n return null;\n }\n nextLast = minusOne(nextLast);\n size -= 1;\n T toRemove = items[nextLast];\n items[nextLast] = null;\n if (isSparse()) {\n resize(capacity / 2);\n }\n return toRemove;\n }",
"@Override\n public E getLast() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n return dequeue[tail];\n }",
"public T pop() {\n\t\tT t = this.data[--size];\n\t\tthis.data[size] = null;\n\t\tif(size == data.length / 4){\n\t\t\tresize(data.length / 2);\n\t\t}\n\t\treturn t;\n\t}",
"public Coordinate peek(){\r\n return arr[size - 1];\r\n }",
"public E getLast() {\r\n\t\tif (tail == null) {\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\t} else {\r\n\t\t\treturn indices.get(size - 1).data;\t\r\n\t\t}\r\n\t}",
"public Item getLast();",
"public int getLast() {\n if (size == 0)\n return NO_ELEMENT;\n else\n return endOfBlock[numberOfBlocks - 1] - 1;\n }",
"public Item removeLast() {\n Item val = deck[bFront];\n deck[bFront--] = null;\n return val;\n }",
"public void addLast(T item) {\n if (size == 0) {\n array[rear] = item;\n size++;\n return;\n }\n\n this.checkReSizeUp();\n rear++;\n this.updatePointer();\n array[rear] = item;\n size++;\n }",
"public abstract void endArray();",
"@Override\n public T removeFirst() {\n if (size == 0) {\n return null;\n }\n\n int position = plusOne(nextFirst);\n T itemToReturn = array[position];\n array[position] = null;\n nextFirst = position;\n size -= 1;\n\n if ((double)size / array.length < 0.25 && array.length >= 16) {\n resize(array.length / 2);\n }\n return itemToReturn;\n }",
"public int getRear() {\n if(size == 0) return -1;\n return tail.prev.val;\n}",
"public T getLast() {\n if (this.getSize() > 0) {\n return buffer[index];\n }\n return null;\n }",
"public T pop() { //pop = remove the last element added to the array, in a stack last in, first out (in a queue pop and push from different ends)\n try {\n T getOut = (T) myCustomStack[numElements - 1]; //variable for element to remove (pop off) = last element (if you have 7 elements, the index # is 6)\n myCustomStack[numElements] = null; //remove element by making it null\n numElements--; //remove last element, decrease the numElements\n return getOut; //return popped number\n\n } catch (Exception exc) {\n System.out.println(\"Can't pop from empty stack!\");\n return null;\n }\n }",
"public E pollLast() {\r\n\t\tif (isEmpty()) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tE ret = (E) data.get(data.size() - 1);\r\n\t\tdata.remove(data.size() - 1);\r\n\t\treturn ret;\r\n\t}",
"public Item deleteAtEnd() {\n \tItem returnItem = tail.item; \t\n \ttail = tail.previous;\n \thead.previous = tail;\n \tsize--;\n \treturn returnItem;\n }",
"public E dequeue(){\n if (isEmpty()) return null;\n E answer = arrayQueue[front];\n arrayQueue[front] = null;\n front = (front +1) % arrayQueue.length;\n size--;\n return answer;\n }",
"public Object pop() {\r\n\t\treturn al.removeElementAt(al.listSize - 1);\r\n\t}",
"public T pop() {\r\n T o = get(size() - 1);\r\n remove(size() - 1);\r\n return o;\r\n\t}",
"public Item removeLast() {\r\n if (isEmpty()) {\r\n throw new NoSuchElementException();\r\n }\r\n Item result = items[--lastCursor];\r\n items[lastCursor] = null;\r\n return result;\r\n }",
"public long removeLeft() {\n long temporary = Array[start++];\n if ( start == max ) {\n start = 0;\n }\n nItems--;\n return temporary;\n }",
"public Item removeLastItem() {\n\t\tint lastItemIndex = this.purchaseList.getCurrentPurchases().size() - 1;\n\t\treturn this.removeItem(lastItemIndex);\n\t}",
"public int dequeue() {\r\n\t\tint v = elements[0];\r\n\t\tint[] temp = new int[elements.length];\r\n\t\tSystem.arraycopy(elements, 1, temp, 0, size);\r\n\t\telements = temp;\r\n\t\tsize--;\r\n\t\treturn v;\r\n\t}",
"public T dequeue() throws Exception {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tif(item_count==0)\r\n\t\t\tthrow new Exception(\"Array is empty\");\r\n\t\t--item_count;\r\n\t\treturn arr[front++%arr.length];\r\n\t}",
"public String getLastItem();",
"@Nullable\n public Integer pop() {\n if(mIndex == -1){\n System.out.println(\"Error poping\");\n return null;\n }\n Integer temp = mArray[mIndex--];\n System.out.println(\"Pop \" + String.valueOf(temp) + \" from mArray[\" + String.valueOf((mIndex + 1)) + \"]\");\n return temp;\n }",
"@Override\r\n\tpublic Object last(){\r\n\t\tcheck();\r\n\t\treturn tail.value;\r\n\t}",
"public Item deleteBack() {\n items[size - 1] = null;\n size -= size;\n Item itemToReturn = getBack();\n \n return itemToReturn;\n }",
"public T last() throws EmptyCollectionException;",
"public Object dequeue() {\n\t\tif(isEmpty()) throw new RuntimeException(); \n\t\tObject value = data[0];\n\t\tfor(int i = 0; i < data.length-1; i++) {\n\t\t\tdata[i] = data[i+1];\n\t\t}\n\t\tdata[size()] = null;\n\t\tindx--;\n\t\treturn value;\n\t}",
"public Object last()throws ListExeption;",
"public E getBack() throws IllegalArgumentException {\r\n\t\tE result = null;\r\n\t\tresult = get(size - 1);\r\n\t\treturn result;\r\n\t}",
"public Item removeLast() {\n if (!isEmpty()) {\n Item item = last.item;\n last = last.front;\n size--;\n if (size != 0)\n last.back = null;\n return item;\n } else throw new NoSuchElementException(\"?\");\n\n }",
"public T poll() {\n if (size == 0) {\n return null;\n }\n\n // set returned value to queue[0]\n T value = (T) array[0];\n\n // decrease size - we are removing element\n size--;\n\n // move queue 1 place left\n System.arraycopy(array, 1, array, 0, size);\n\n // clear last element\n array[size] = null;\n\n return value;\n }",
"public Item removeLast() {\n if (size == 0) {\n return null;\n } else if (size == 1) {\n StuffNode i = sentinel.prev;\n sentinel.next = sentinel;\n sentinel.prev = sentinel;\n size -= 1;\n return i.item;\n } else {\n StuffNode i = sentinel.prev;\n i.prev.next = sentinel;\n sentinel.prev = i.prev;\n size -= 1;\n return i.item;\n }\n }",
"public int pop() {\n if (isEmpty()) {\n throw new IllegalStateException(\"Der Stack ist leer.\");\n }\n if((values.length / 2) >= size) {\t\t\t\t// Überprüfen, ob das Array nicht zu groß ist und ob nicht die Hälfte auch reicht\n \tint[] save = this.values;\t\t\t\t\t// sichere altes Array\n \tthis.values = new int[save.length / 2];\t\t// verkleinere values Array\n \tfor (int i = 0; i < values.length; i++) {\t// kopiere die alten Werte in das neue Array\n \t\tvalues[i] = save[i];\n \t}\n }\n int save = values[size-1];\n values[--size] = 0;\n return save;\n }",
"public abstract void notifyArrayEnd();",
"protected int lastIdx() {\n return arrayIndex(currentWindowIndex() - 1);\n }",
"public long remove(){\n\t\t\r\n\t\t\tlong temp = queueArray[front]; //retrieves and stores the front element\r\n\t\t\tfront++;\r\n\t\t\tif(front == maxSize){ //To set front = 0 and use it again\r\n\t\t\t\tfront = 0;\r\n\t\t\t}\r\n\t\t\tnItems--;\r\n\t\t\treturn temp;\r\n\t\t}",
"public void addLast(T t) {\n if (size == elements.length) // checks potential overflow\n ensureCapacity(); // increase capacity\n elements[size] = t; //store element at last position\n size++; // increment size\n }",
"public Object dequeue(){\r\n return super.remove(size()-1);\r\n }",
"public Object todequeue() {\n\t\tif(rear == 0)\n\t\t\treturn null;\n\t\telse {\n\t\t\tObject to_return = arr[front];\n\t\t\tfront++;\n\t\t\tsize--;\n\t\t\treturn to_return;\n\t\t}\n\t}",
"private int minusOne(int index) {\n if (index - 1 < 0) {\n return array.length - 1;\n } else {\n return index - 1;\n }\n }",
"public Item removeLast();",
"public Item dequeue() {\n if(isEmpty()) throw new NoSuchElementException();\n int idx = StdRandom.uniform(size);\n Item item = arr[idx];\n size--;\n arr[idx] = arr[size];\n arr[size] = null;\n if (size > 0 && size == arr.length / 4){\n resize(arr.length / 2);\n }\n return item;\n }",
"public T last() throws EmptyCollectionException{\n if (rear == null){\n throw new EmptyCollectionException(\"list\");\n }\n return rear.getElement();\n }",
"public static native long RemoveLast(long lpjFbxArrayVector2);",
"public Item dequeue()\n {\n checkNotEmpty();\n\n if (items.length / 4 > size)\n {\n resize(items.length / 2);\n }\n\n int last = size - 1;\n swap(items, nextIndex(), last);\n Item toReturn = items[last];\n items[last] = null;\n size--;\n\n return toReturn;\n }",
"public Item removeLast() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"queue is empty\");\n }\n Item a;\n a = last.item;\n if (size() == 1) {\n first = null;\n last = null;\n }\n else {\n last = last.prev;\n last.next = null;\n\n }\n size--;\n return a;\n\n\n }",
"private E dequeue() {\n final Object[] items = this.items;\n @SuppressWarnings(\"unchecked\")\n E x = (E) items[takeIndex];\n items[takeIndex] = null;\n if (++takeIndex == items.length) takeIndex = 0;\n count--;\n notFull.signal();\n return x;\n }",
"public int last() {\n\t\tif (bufferIndex == bufferLast)\n\t\t\treturn -1;\n\t\tsynchronized (buffer) {\n\t\t\tint outgoing = buffer[bufferLast - 1];\n\t\t\tbufferIndex = 0;\n\t\t\tbufferLast = 0;\n\t\t\treturn outgoing;\n\t\t}\n\t}",
"public int deletion() {\r\n\t\tif(isEmpty()) return -1;\r\n\t\treturn arr[cur_index--];\r\n\t}",
"public T removeFirst() {\n if (size == 0) {\n return null;\n }\n if (size == 1) {\n size--;\n return array[front];\n }\n this.checkReSizeDown();\n size--;\n front++;\n this.updatePointer();\n return array[Math.floorMod(front - 1, array.length)];\n }",
"public E removeLast();",
"public int dequeue() {\n if (!isEmpty()){\n int e = data[first];\n count --;\n if(first == data.length-1) {\n first = 0;\n } else {\n first++;\n }\n return e;\n }\n else{\n throw new RuntimeException(\"A fila está vazia\");\n }\n }",
"public T deleteMax()\n\t{\n\t\tint maxIndex = 0;\n\t\tboolean flag = false;\n\t\tboolean flag2 = false;\n\t\tif(size == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\tif(size == 1)\n\t\t{\n\t\t\tT temp = array[0];\n\t\t\tarray[0] = null;\n\t\t\tsize--;\n\t\t\treturn temp;\n\t\t}\n\t\tif(size == 2)\n\t\t{\n\n\t\t\tT wemp = array[1];\n\t\t\tarray[1] = null;\n\t\t\tsize--;\n\t\t\treturn wemp;\n\t\t}\n\t\tif(size == 3)\n\t\t{\n\t\t\tT femp ;\n\t\t\tif(object.compare(array[1], array[2]) >0)\n\t\t\t{\n\t\t\t\tfemp = array[1];\n\t\t\t\tarray[1] = array[2];\n\t\t\t\tarray[2] = null;\n\t\t\t\tsize--;\n\t\t\t\treturn femp;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfemp = array[2];\n\t\t\t\tarray[2] = null;\n\t\t\t\tsize--;\n\t\t\t\treturn femp;\n\t\t\t}\n\n\t\t}\n\t\tint index = 0;\n\t\tif(object.compare(array[1], array[2]) >= 0)\n\t\t{\n\t\t\tindex = 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tindex = 2;\n\t\t}\n\n\t\tT temp = array[index];\n\t\tarray[index] = array[size -1];\n\t\tarray[size-1] = null;\n\t\tsize--;\n\n\t\tint max = max(index).get(0);\n\t\twhile(max != 0)\n\t\t{\n\t\t\tif(object.compare(array[index], array[max]) >= 0)\n\t\t\t{\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif( max(index).size() > 1)\n\t\t\t{\n\t\t\t\tflag2 = true;\n\t\t\t\t\n\t\t\t}\n\n\t\t\tT lemp = array[index];\n\t\t\tarray[index] = array[max];\n\t\t\tarray[max] = lemp;\n\n\n\t\t\tindex = max;\n\t\t\tmax = max(max).get(0);\n\t\t}\n\n\t\tif(flag == true)\n\t\t{\n\n\t\t}\n\t\telse if(flag2 == true)\n\t\t{\n\t\t\tint y = index;\n\t\t\tif(getLevel(index+1) % 2 == 1)\n\t\t\t{\n\t\t\t\twhile(object.compare(array[y], array[(y-3)/4]) > 0 && y > 2)\n\t\t\t\t{\n\t\t\t\t\tT k = array[(y-3)/4];\n\t\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\t\tarray[y] = k;\n\t\t\t\t\ty = (y-3)/4;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\twhile(object.compare(array[y], array[(y-3)/4]) < 0 && y > 2)\n\t\t\t\t{\n\t\t\t\t\tT k = array[(y-3)/4];\n\t\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\t\tarray[y] = k;\n\t\t\t\t\ty = (y-3)/4;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\telse if(object.compare(array[index], array[grandChildMax(2*index+1, 2*index+2)]) < 0 && grandChildMax(2*index+1, 2*index+2) != 0)\n\t\t{\n\t\t\tmaxIndex = grandChildMax(2*index+1, 2*index+2);\n\t\t\tT wemp = array[index];\n\t\t\tarray[index] = array[maxIndex];\n\t\t\tarray[maxIndex] = wemp;\n\t\t\tint y = maxIndex;\n\t\t\twhile(object.compare(array[y], array[(y-3)/4]) < 0 && y > 2)\n\t\t\t{\n\t\t\t\tT demp = array[(y-3)/4];\n\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\tarray[y] = demp;\n\t\t\t\ty = (y-3)/4;\n\t\t\t}\n\t\t}\n\n\t\telse if(object.compare(array[index], array[(index-1)/2]) < 0) \n\t\t{\n\n\t\t\tT femp = array[(index-1)/2];\n\t\t\tarray[(index-1)/2] = array[index];\n\t\t\tarray[index] = femp;\n\n\t\t\tint y = (index-1)/2;\n\t\t\twhile(object.compare(array[y], array[(y-3)/4]) < 0 && y > 2)\n\t\t\t{\n\t\t\t\tT demp = array[(y-3)/4];\n\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\tarray[y] = demp;\n\t\t\t\ty = (y-3)/4;\n\t\t\t}\n\t\t}\n\n\n\t\t\n\t\treturn temp;\n\t}",
"public E remove(){\r\n if(isEmpty())\r\n return null;\r\n \r\n //since the array is ordered, the highest priority will always be at the end of the queue\r\n //--currentSize will find the last index (highest priority) and remove it\r\n return queue[--currentSize];\r\n }",
"public int getRear() {\n if (isEmpty()) {\n return -1;\n }\n return arr[(tail - 1 + k) % k];\n\n\n }",
"public void removeLast( ) {\r\n\t\tremove(size);\r\n\t}",
"public int pop(){\n if (isEmpty()) throw new RuntimeException(\"Stack underflow\");\n int tmp=myarray[top];\n top--;\n return tmp;\n \n \n }",
"public int removeLastElement() {\r\n\t\tNode lastElement = sentinel.previous;\r\n\t\tsentinel.previous = lastElement.previous;\r\n\t\tlastElement.previous.next = sentinel;\r\n\t\tlength--;\r\n\t\treturn lastElement.value;\r\n\t}",
"public Item pop() {\n if (isEmpty()) throw new ArrayIndexOutOfBoundsException(\"Stack underflow\");\n Item item = first.item;\n first = first.next;\n return item;\n }"
]
| [
"0.7831604",
"0.7806745",
"0.7652871",
"0.7545919",
"0.7501373",
"0.74568063",
"0.7057955",
"0.70463884",
"0.7023531",
"0.7017226",
"0.7015563",
"0.6988774",
"0.69718057",
"0.69316345",
"0.6882871",
"0.68722415",
"0.6870081",
"0.68674356",
"0.68559116",
"0.68448335",
"0.681564",
"0.67817533",
"0.67810947",
"0.6780384",
"0.6725438",
"0.6633742",
"0.6631551",
"0.6617771",
"0.6584748",
"0.6576273",
"0.6531575",
"0.65117764",
"0.64840746",
"0.64542544",
"0.6448414",
"0.6438627",
"0.6436867",
"0.6436764",
"0.6415271",
"0.63710517",
"0.6370342",
"0.63632745",
"0.63538",
"0.6351675",
"0.6344282",
"0.63357365",
"0.63159376",
"0.63036156",
"0.6303089",
"0.6291152",
"0.6274964",
"0.62558395",
"0.62551886",
"0.6250417",
"0.6228567",
"0.62125677",
"0.62081224",
"0.6203957",
"0.61980414",
"0.61959356",
"0.6193841",
"0.6175257",
"0.6162403",
"0.6159524",
"0.6154639",
"0.6151308",
"0.614667",
"0.6141851",
"0.61259204",
"0.6106216",
"0.60966986",
"0.6089587",
"0.60873765",
"0.60840154",
"0.6081605",
"0.6081427",
"0.6081055",
"0.60807174",
"0.60787255",
"0.60730815",
"0.607298",
"0.6068274",
"0.6058403",
"0.60428303",
"0.6030227",
"0.6020131",
"0.60144436",
"0.60075337",
"0.6005678",
"0.6003508",
"0.5999651",
"0.59977174",
"0.5988436",
"0.59835577",
"0.5977575",
"0.59704053",
"0.5964685",
"0.5963499",
"0.59633875",
"0.5959966"
]
| 0.7045956 | 8 |
deletes the value from the array and to location specified in 'index' and shrinks the array | void remove(int index) {
for (int i = index; i < array.length - 1; i++) {
array[i] = array[i + 1];
}
int[] temp = new int[array.length - 1];
for (int i = 0; i < array.length - 1; i++) {
temp[i] = array[i];
}
int lastValue = array[array.length - 1];// index starts @ 0, so its the
// array.length - 1 to account
// for the 0
array = temp;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void deleteIndex(int index) {\n if (index < arraySize) {\n for (int i = index; i < arraySize - 1; i++) {\n theArray[i] = theArray[i + 1];\n }\n arraySize--;\n }\n }",
"public void removeAt(int index){\n E[] array2 = (E[]) new Object[capacity*2];\n int j=0;\n for(int i=0;i<size;i++){\n if(i!=index) {\n array2[j] = array[i];\n j++;\n }\n }\n array=array2;\n size--;\n }",
"public void remove( int index ) {\n\tif (index > _lastPos)\n\t System.out.println(\"No meaningful value at index\");\n\telse {for (int i= index; i < _lastPos; i++){\n\t\t_data[i]= _data[i+1];\n\t }\n\t _size--;\n\t _lastPos--;\n\t}\n }",
"@Override\n public T remove(int index) {\n T removed = array[index];\n for (int i = index + 1; i < array.length; i++) {\n array[i] = array[i + 1];\n }\n this.size = size - 1;\n return removed;\n }",
"public E remove(int index){\n if (index < 0 || index >= size){\n throw new ArrayIndexOutOfBoundsException(index);\n }\n E returnValue = theData[index];\n for (int i = index + 1; i < size; i++) {\n theData[i - 1] = theData[i];\n }\n size--;\n return returnValue;\n }",
"@Override\n\tpublic void remove(int index) throws IndexOutOfBoundsException {\n\t\tif(checkIndex(index, size)) { //check if index is valid\n\t\t\tfor (int i=index; i<size; i++) {\n\t\t\t\tvalues[i] = values[i+1]; //move every value one step left until index (which is overwritten)\n\t\t\t}\n\t\t\tsize--; //decrement size\t\t\t\n\t\t}else {\n\t\t\tthrow new IndexOutOfBoundsException(\"Highest index: \" + size);\n\t\t}\t\n\t}",
"private void deleteElement(int index) {\n Object[] first = new Object[index];\n System.arraycopy(this.container, 0, first, 0, index);\n\n Object[] second = new Object[this.container.length - index - 1];\n System.arraycopy(this.container, index + 1, second, 0, second.length);\n\n this.container = new Object[this.container.length];\n System.arraycopy(first, 0, this.container, 0, first.length);\n System.arraycopy(second, 0, this.container, index, second.length);\n\n this.position--;\n }",
"@Override\n public void delete(Integer index) {\n if(index > lastIndex)\n throw new IllegalArgumentException(); // only for tests\n stack.push(arr[index]);\n stack.push(index + arr.length+1);\n for (int i=index+1; i<lastIndex + 1; i++){\n arr[i-1] = arr[i];\n }\n lastIndex = lastIndex - 1;\n }",
"@Override\n // average-case complexity: O(n), since it always needs to shift n-amount\n // of element, where n is propotional to the list/input size\n public void remove(int index) {\n if (arr.length * SHRINK_THRESHOLD > size)\n arr = resize(arr, SHRINK_FACTOR);\n \n // remove the item at the specified index and shift everything right of\n // the given index 1 step to the left\n for (int i = index; i < size-1; i++) {\n arr[i] = arr[i+1];\n }\n // remove the previous last item and then decrement the size\n arr[--size] = null;\n }",
"public void remove(int index) {\r\n\t\t//checks if the index is valid\r\n\t\tif(index>=0 && index<=size) {\r\n\t\t\tfor (int k=index;k<size;k++) {\t//shifting element\r\n\t\t\t\tlist[k]=list[k+1];\r\n\t\t\t}\r\n\t\t\tsize--;\t\t//decreases size\r\n\t\t\t//checks if the size of array is not 0 and less than 25% of the capacity of the array\r\n\t\t\tif (size!=0 && capacity/size >=4)\r\n\t\t\t\tresize(this.capacity/2);\t//decreasing size of array\r\n\t\t} else {\t//index is not valid\r\n\t\t\tSystem.out.println(\"index \"+index+\" is out or range!\");\r\n\t\t}\r\n\t}",
"@Override\n\tpublic Object remove(int index) throws IndexOutOfBoundsException\n\t{\n\t\t\n\t\tif(index < size)\n\t\t{\n Object o = myArray[index];\n if(index < size)\n System.arraycopy(myArray, index + 1, myArray, index, size - index - 1);\n myArray[size - 1] = null;\n size--;\n //to check if need to resize\n\t\t\tif(size==myArray.length/4)\n\t\t\t\tresizeDown();\n return o;\n } \n\t\telse \n throw new ArrayIndexOutOfBoundsException();\n\t}",
"void remove(int index)\n\t{\n\t\t//Create a temporary array\n\t\tint[] temp=new int[inputArray.length-1];\n\t\t\n\t\t//Copy all the elements before the element at position index into the temporary array\n\t\tfor(int i = 0; i < index; i++)\n\t\t{\n\t\t\ttemp[i] = inputArray[i];\n\t\t}\n\t\t\n\t\t//Copy all the elements after the element at position index into the temporary array\n\t\tfor(int i = index+1; i < inputArray.length; i++)\n\t\t{\n\t\t\ttemp[i-1] = inputArray[i];\n\t\t}\n\t\t\n\t\t//Make the temporary array as the new array\n\t\tinputArray = temp;\n\t}",
"public Object remove(int index){\n\t\tif(index < listSize){\n\t\t\tObject o = myArrayList[index];\n\t\t\tmyArrayList[index] = null;\n\t\t\tint temp = index;\n\t\t\twhile(temp < listSize){\n\t\t\t\tmyArrayList[temp] = myArrayList[temp+1];\n\t\t\t\tmyArrayList[temp+1] = 0;\n\t\t\t\ttemp++;\n\t\t\t}\n\t\t\tlistSize --;\n\t\t\treturn o;\n\t\t}else{\n\t\t\tthrow new ArrayIndexOutOfBoundsException();\n\t\t}\n\t}",
"public T remove(int index) {\n\n if (index >= size) {\n throw new IndexOutOfBoundsException(\"Index: \" + index + \", Size: \" + size);\n }\n\n T oldValue = myList[index];\n int value = size - index - 1;\n\n if (value > 0) {\n System.arraycopy(myList, index + 1, myList, index, value);\n }\n System.out.println(\"one \" + size);\n myList[--size] = null;\n System.out.println(\"two \" + size);\n\n return oldValue;\n }",
"private final void fastRemove(final int index) {\r\n\t\tfinal int numMoved = this.size - index - 1;\r\n\t\tif (numMoved > 0) {\r\n\t\t\tSystem.arraycopy( this.elementData, index + 1, this.elementData, index, numMoved );\r\n\t\t}\r\n\t\tthis.elementData[--this.size] = null; // Let gc do its work\r\n\t}",
"@Override\n public E remove(int index) {\n // todo: Students must code\n int pos = calculate(index);\n\n E temp = data[pos];\n data[pos] = null;\n if(pos == head)\n head = (head+1) % data.length;\n else if(pos == tail)\n tail = (tail-1) % data.length;\n else {\n // shift all array contents after pos left 1\n for(int i = pos; i < (pos + curSize-index-1); i++)\n data[calculate(i)] = data[calculate(i+1)];\n tail = (tail-1) % data.length;\n }\n curSize--;\n return temp;\n }",
"public void remove(int index) {\n\t\t// checks range\n\t\tcheckRange(index);\n\t\t// creates new JS array\n\t\tarray.remove(index);\n\t}",
"public E remove(int index){\n if (index > maxIndex || index < 0){\n return null;\n }\n\n E res = (E) array[index];\n\n //deleting element\n array[index] = null;\n\n //shifting other elements\n for (int i = index; i < maxIndex ; i++) {\n array[i] = array[i+1];\n }\n\n --maxIndex;\n\n return res;\n }",
"private void remove(int index){\r\n \tkeys[index] = null;\r\n \tvals[index] = null;\r\n deleteCheck(index);\r\n }",
"public void remove(int index) {\n\t\t\tcheckIndex(index);\n\t\t\tfor(int i = index; i < size - 1; i++) {\n\t\t\t\telementData[i] = elementData[i + 1];\n\t\t\t}\n\t\t}",
"@Override\n public T remove(int index) {\n if (index < 0 || index > size) {\n throw new IndexOutOfBoundsException(\"Index out of bounds exception.\");\n }\n\n T oldValue = (T) data[index];\n int move = index - size - 1;\n if (move > 0) {\n System.arraycopy(data, index + 1, data, index, move);\n }\n\n data[--size] = null;\n return oldValue;\n }",
"public void remove(int index)\r\n\t{\r\n\t\tif(index<0 || index >=n)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Invalid index\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tfor(int i=index;i<n;i++)\r\n\t\t\t{\r\n\t\t\t\ta[i]=a[i+1];\r\n\t\t\t}\r\n\t\t\tn--;\r\n\t\t}\t\t\r\n\t}",
"public void remove(int index) {\n\t\tif (index < 0 || index >= size) {\n\t\t\tthrow new IndexOutOfBoundsException(\"Cannot remove value with invalid index.\");\n\t\t}\n\n\t\tshiftBackArray(index);\n\t\tsize--;\n\t}",
"public void remove(int index)\n {\n numItems--;\n items[index] = null;\n }",
"public T remove(int index) throws IndexOutOfBoundsException {\n checkException(index);\n System.arraycopy(arr, index + 1, arr, index, size - index - 1);\n T elem = arr[--size];\n arr[size] = null;\n return elem;\n }",
"private void removeAtIndex(int index) {\n // save the last item\n FoodItem toMoveBack = this._stock[this._noOfItems-1];\n // make it null\n this._stock[this._noOfItems-1] = null;\n // for each item until the index to remove from:\n for (int i = this._noOfItems-2; i > index-1; i--) {\n // save the last moved back temporarily\n FoodItem tempToMoveBack = toMoveBack;\n // assign to the next iteration item to move back\n toMoveBack = this._stock[i];\n // move back the item for current iteration\n this._stock[i] = tempToMoveBack;\n }\n // we removed an item - so let's decrease the item counter.\n this._noOfItems--;\n }",
"@Override\n public E remove(int index) {\n this.rangeCheck(index);\n this.modCount++;\n E oldValue = (E) this.values[index];\n int numMoved = this.index - index - 1;\n if (numMoved > 0) {\n System.arraycopy(this.values, index + 1, this.values, index, numMoved);\n }\n this.values[--this.index] = null;\n return oldValue;\n }",
"public void remove(int index) {\r\n\t\t//Das Element am Index soll weg:\r\n\t\t//1. Alle Elemente davor sollen erhalten bleiben\r\n\t\t//2. Alle Elemente dahinter sollen erhalten bleiben\r\n\t\t//und der Index 1 kleiner werden\r\n\t\tfor(int i=index+1;i < geheim.length; i++) {\r\n\t\t\tgeheim[i-1] = geheim[i];\r\n\t\t}\r\n\t\t//3. Das Array soll um eins kleiner sein\r\n\t\tresize(-1);\r\n\t}",
"public E remove(int index) {\n //first make a copy of the element we are going to remove later\n //so that it can be returned\n E copy = this.array[index];\n \n /*\n * make an if to find out if there is only one element in the array or not\n * if there is, then simply make the array empty\n */\n if (this.array.length == 1) {\n //only one element in the array, so there is nothing to slide over\n this.array = (E[]) new Object[0];\n } else {\n //make a temp array that has one less index than the current array\n Object[] temp = new Object[this.array.length - 1];\n \n //copy everything up to the desired index\n for (int i = 0; i < index; i++) {\n temp[i] = this.array[i];\n }\n \n //now copy all of the other elements after the index, but skip over the desired element to remove\n for (int i = index; i < temp.length; i++) {\n /*\n * take in the element from the next index over from this.array\n * this will automatically skip over the element that we want to remove\n */\n temp[i] = this.array[i + 1];\n }\n \n //set the array to the temp now that the element is removed\n this.array = (E[]) temp;\n }\n \n //return the copy that we created before we removed the element\n return (E) copy;\n }",
"public void removeAtIndexFor(int index, int size) {\r\n int start = offset + index + size;\r\n int end = offset + count;\r\n ArrayUtils.shiftDown(objects, size, start, end, false);\r\n count -= size;\r\n }",
"private static int[] removeTheElement(int[] arr, \n int index) \n { \n \n // If the array is empty \n // or the index is not in array range \n // return the original array \n if (arr == null\n || index < 0\n || index >= arr.length) { \n \n return arr; \n } \n \n // Create another array of size one less \n int[] anotherArray = new int[arr.length - 1]; \n \n // Copy the elements except the index \n // from original array to the other array \n for (int i = 0, k = 0; i < arr.length; i++) { \n \n // if the index is \n // the removal element index \n if (i == index) { \n continue; \n } \n \n // if the index is not \n // the removal element index \n anotherArray[k++] = arr[i]; \n } \n \n // return the resultant array \n return anotherArray; \n }",
"@Override\n\tpublic T remove(int index) {\n\t\t// TODO check if index is withing the correct range\n\t\t// If not, return null\n\t\t// otherwise , do the same as above\n\t\tif (index >= 0 && index < size) {\n\t\t\tT item = data[index];\n\t \t\tfor(int i=index;i<size-1;i++)\n\t \t\t\tdata[i] = data[i+1];\n\t \t\tsize--;\n\t \t\treturn item;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\n\t}",
"@Override\r\n\tpublic void removeToIndex(int index) {\n\t}",
"public static double[] removeIndexFromArray(double[] array,int index) {\n\t\tif (index==-1) throw new IllegalArgumentException(\"Item not in array!\");\n\t\tdouble[] re = new double[array.length-1];\n\t\tSystem.arraycopy(array, 0, re, 0, index);\n\t\tSystem.arraycopy(array, index+1, re, index, re.length-index);\n\t\treturn re;\n\t}",
"@Override\n public E remove(int index) {\n\t E first = _store[index];\n\t _store[index] = null;\n\t for( int i = index; i< _size-1;i++) {\n\t\t _store[i]=_store[i+1];\n\t }\n\t_store[_size-1]=null;\n\t _size -=1;\n\t \n\t\t \n\treturn first;\n }",
"public void remove(int index) {\n for (int i = index; i < this.list.length-1; i++) {\n this.list[i]=this.list[i+1];\n }\n this.size--;\n }",
"@Override\n public final Integer remove(final int index) {\n // Verify that the specified index is valid\n if (!checkRange(index)) {\n throw new IndexOutOfBoundsException();\n } else {\n final int temp = arrayList[index];\n // Shift all elements after the removed elements down\n for (int i = index; i < (size - 1); i++) {\n arrayList[i] = arrayList[i + 1];\n arrayList[i + 1] = 0;\n }\n size--;\n return temp;\n\n }\n }",
"protected void removeByIndex(int index) {\n int h = head;\n int t = tail;\n size = size - 1;\n int present = dequeue.length - 1;\n int offset = (index - h) & present;\n int finish = (tail - index) & present;\n\n if (offset < finish) {\n if (h <= index) {\n System.arraycopy(dequeue, h, dequeue, h + 1, offset);\n } else {\n System.arraycopy(dequeue, 0, dequeue, 1, index);\n dequeue[0] = dequeue[present];\n System.arraycopy(dequeue, h, dequeue, h + 1, present - h);\n }\n dequeue[h] = null;\n head = (h + 1) & present;\n } else {\n if (index < t) {\n System.arraycopy(dequeue, index + 1, dequeue, index, finish);\n tail = t - 1;\n } else {\n System.arraycopy(dequeue, index + 1, dequeue, index, present - index);\n dequeue[present] = dequeue[0];\n System.arraycopy(dequeue, 1, dequeue, 0, t);\n tail = (t - 1) & present;\n }\n }\n }",
"public Type remove(int index);",
"public void removeElementAt(int index);",
"static String[] removeTheElement(String[] arr, int index)\n {\n if (arr == null || index < 0 || index >= arr.length) {\n\n return arr;\n }\n String[] anotherArray = new String[arr.length - 1];\n for (int i = 0, k = 0; i < arr.length; i++) {\n if (i == index) {\n continue;\n }\n anotherArray[k++] = arr[i];\n }\n return anotherArray;\n }",
"public void removeAt(int index) {\r\n\t\tSystem.arraycopy(keys, index + 1, keys, index, size - (index + 1));\r\n\t\tsize--;\r\n\t}",
"public void deleteAtIndex(int index) {\n if (index < 0 || index >= size) throw new IllegalArgumentException(\"Add filed, index is illegal\");\n Node prev = dummyHead;\n for (int i = 0; i < index; i++) {\n prev = prev.next;\n }\n Node retNode = prev.next;\n prev.next = retNode.next;\n retNode.next = null; //loitering object != memory leak\n size--;\n }",
"public E remove(int index)\n {\n if (index >= 0 && index < size) {\n E temp = data[index]; // element to return\n\n // shift all elements to the right down by 1 index\n for (int i = index; i < size - 1; i++)\n data[i] = data[i+1];\n \n size--;\n return temp;\n } else\n throw new NoSuchElementException();\n }",
"private T[] modifyArray(T[] array) {\n array[index] = null;\n return array;\n }",
"public T removeAt(int index) {\n if (index >= size || index < 0) throw new IndexOutOfBoundsException();\n T tempData = genericArrayList[index];\n T[] tempArrayList = (T[]) new Object[size - 1];\n for (int i = 0, j = 0; i < size; i++, j++) {\n if (i == index) j--; // skip over removeAtIndex by fixing j temporarily\n else tempArrayList[j] = genericArrayList[i];\n }\n genericArrayList = tempArrayList;\n capacity = --size;\n return tempData;\n }",
"public void remove(int index) {\n\n\t}",
"public U remove(int idx){\r\n\t \tif ((idx < 0)|| (idx > numElems-1))\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \tint i = idx;\r\n\t \t@SuppressWarnings(\"unchecked\")\r\n\t\t\tU data = (U) array[i];\r\n\t \t//Same shift algorithm as other remove method\r\n\t \twhile(i<numElems-1){\r\n\t \t\tarray[i]= array[i+1];\r\n\t \t\ti++;\r\n\t \t}\r\n\t \t//Not sure if needed: set last element to null after shift\r\n\t \tarray[numElems-1] = null;\r\n\t \tnumElems--;\r\n\t \treturn data;\r\n\t }",
"public void remove(int index);",
"public static int[] removeTheElement(int[] arr, \r\n int index) \r\n { \r\n \r\n // If the array is empty \r\n // or the index is not in array range \r\n // return the original array \r\n if (arr == null\r\n || index < 0\r\n || index >= arr.length) { \r\n \r\n return arr; \r\n } \r\n \r\n // Create another array of size one less \r\n int[] anotherArray = new int[arr.length - 1]; \r\n \r\n // Copy the elements except the index \r\n // from original array to the other array \r\n for (int i = 0, k = 0; i < arr.length; i++) { \r\n \r\n // if the index is \r\n // the removal element index \r\n if (i == index) { \r\n continue; \r\n } \r\n \r\n // if the index is not \r\n // the removal element index \r\n anotherArray[k++] = arr[i]; \r\n } \r\n \r\n // return the resultant array \r\n return anotherArray; \r\n }",
"private int remove(int index){\n\t\tremovedItem=heap[index];\n\t\theap[index]=INFINITE;\n\t\tshiftUp(index);\n\t\treturn extractMax();\n\t}",
"private void shrink() {\n int shrinkSize = array.length>>1;\n array = Arrays.copyOf(array, shrinkSize);\n }",
"@Override\r\n public Copiable deleteAt(int index) throws IndexRangeException {\r\n if (count == 0) {\r\n throw new IndexRangeException(-1, -1, index);\r\n }\r\n if (index >= 0 && index <= count - 1) {\r\n Copiable temp = list[index];\r\n int shift = 0;\r\n for (int i = index; i < list.length - 1; i++) {\r\n list[i] = list[i + 1];\r\n shift++;\r\n }\r\n list[index + shift] = null;\r\n count--;\r\n return temp;\r\n } else {\r\n throw new IndexRangeException(0, count - 1, index);\r\n }\r\n }",
"public void remove() {\n elements[index] = null;\n size--;\n next();\n }",
"void remove( int index );",
"private void deleteElement(final int idx) {\r\n\t\tserializer.setRandomAccess(idx, null);\r\n\t\tif (idx < firstFree) {\r\n\t\t\tsetNextPointer(idx, firstFree);\r\n\t\t\tsetPrevPointer(idx, 0);\r\n\t\t\tfirstFree = idx;\r\n\t\t} else {\r\n\t\t\tint free = firstFree;\r\n\t\t\tint lastFree = 0;\r\n\t\t\twhile (free < idx) {\r\n\t\t\t\tlastFree = free;\r\n\t\t\t\tfree = getNextPointer(free);\r\n\t\t\t}\r\n\t\t\tsetNextPointer(lastFree, idx);\r\n\t\t\tsetNextPointer(idx, free);\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void removeAt(final int index) {\n\t\tremoveFromInsertionOrder(index);\n\t\tsuper.removeAt(index); // clear key, state, value; adjust size\n\t}",
"@Override\n public synchronized E remove(int index) {\n E result = this.get(index);\n if (index < this.size() - 1) {\n System.arraycopy(this.container, index + 1, this.container, index, this.size() - (index + 1));\n }\n this.container[--this.pointer] = null;\n return result;\n }",
"@Override\n public E remove(int i) throws IndexOutOfBoundsException {\n checkIndex(i, size);\n E temp = data[i];\n for (int k = i; k < size - 1; k++) // shift element to fill hole\n data[k] = data[k + 1];\n data[size - 1] = null; // help garbage collection\n size--;\n return temp;\n }",
"public void clear(long index);",
"private E remove(){\n E tmp = array[0];\n swap(0,--lastPosition);\n array[lastPosition] = null;\n trickleDown(0);\n array = Arrays.copyOfRange(array,0,array.length);\n return tmp;\n }",
"public ReturnObject remove(int index) {\n ReturnObjectImpl rtn = (ReturnObjectImpl) get(index);\n if (size() == 0) {\n rtn.setError(ErrorMessage.EMPTY_STRUCTURE);\n } else if (index < 0 || index >= size()) {\n rtn.setError(ErrorMessage.INDEX_OUT_OF_BOUNDS);\n } else {\n\n Object[] temp = new Object[size() - 1];\n for (int i=0; i < index; i++) {\n temp[i] = AL[i];\n }\n for (int j = index+1; j < size(); j++) {\n temp[j-1] = AL[j];\n }\n AL = temp;\n }\n return rtn;\n\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic static <T> T[] removeIndexFromArray(T[] array,int index) {\n\t\tT[] re = (T[]) Array.newInstance(array.getClass().getComponentType(), Array.getLength(array)-1);\n\t\tSystem.arraycopy(array, 0, re, 0, index);\n\t\tSystem.arraycopy(array, index+1, re, index, re.length-index);\n\t\treturn re;\n\t}",
"void remove(int index);",
"void remove(int index);",
"void remove(int index);",
"void remove(int index);",
"void removeAt(final int removeIndex) {\n final Object[] items = this.items;\n if (removeIndex == takeIndex) {\n items[takeIndex] = null;\n if (++takeIndex == items.length) takeIndex = 0;\n count--;\n } else {\n final int putIndex = this.putIndex;\n for (int i = removeIndex;;) {\n int next = i + 1;\n if (next == items.length) next = 0;\n if (next != putIndex) {\n items[i] = items[next];\n i = next;\n } else {\n items[i] = null;\n this.putIndex = i;\n break;\n }\n }\n count--;\n }\n notFull.signal();\n }",
"@Override\n\tpublic boolean remove(Object o) throws IndexOutOfBoundsException\n\t{\n\t\tint index= 0;\n\t\twhile (myArray[index]!=null && !(myArray[index].equals(o)))\n\t\t\tindex++;\n\t\tif(myArray[index]== null)\n\t\t\treturn false;\n\t\telse\n\t\t{\n\t\t\twhile(index < size)\n\t\t\t{\n\t\t\t\tmyArray[index] = myArray[index+1];\n\t\t\t\tmyArray[index+1] = null;\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t //to check if need to resize\n\t\t\tif(size==myArray.length/4)\n\t\t\t\tresizeDown();\n\t\t\t\n\t\t/*\n\t\tmyArray[index] = null;\n\t\tint temp = index;\n\t\twhile(index < size)\n {\n \tmyArray[index] = myArray[index+1];\n \tmyArray[index+1] = null;\n index++;\n }*/\n size--;\n \n\t\n\t\t\n\t\treturn false;\n\t}",
"public static int[] removeTheElement(int[] arr, int index) {\n if (arr == null || index < 0 || index >= arr.length) {\r\n return arr;\r\n }\r\n // Create another array of size one less\r\n int[] anotherArray = new int[arr.length - 1];\r\n\r\n // Copy the elements except the index\r\n // from original array to the other array\r\n for (int i = 0, k = 0; i < arr.length; i++) {\r\n\r\n // if the index is\r\n // the removal element index\r\n if (i == index) {\r\n continue;\r\n }\r\n // if the index is not\r\n // the removal element index\r\n anotherArray[k++] = arr[i];\r\n }\r\n\r\n // return the resultant array\r\n return anotherArray;\r\n }",
"public abstract T remove(int index);",
"@Override\r\n\tpublic void removeElementAt(int index) {\r\n\r\n try {\r\n VOI voi = VOIAt(index);\r\n super.removeElementAt(index);\r\n fireVOIremoved(voi);\r\n } catch (ArrayIndexOutOfBoundsException badIndex) {\r\n throw badIndex;\r\n }\r\n }",
"abstract void remove(int index);",
"public T remove(int index) {\n\t\tif (index < 0 || index >= size)\n\t\t\tthrow new ArrayIndexOutOfBoundsException();\n\t\tNode<T> curNode = head;\n\t\tif (index == 0) {\n\t\t\thead = head.next;\n\t\t\tsize--;\n\t\t\treturn curNode.value;\n\t\t}\n\t\twhile (index != 1) {\n\t\t\tcurNode = curNode.next;\n\t\t\tindex--;\n\t\t}\n\t\tNode<T> temp = curNode.next;\n\t\tcurNode.next = curNode.next.next;\n\t\tsize--;\n\t\treturn temp.value;\n\t}",
"@Override\n public E remove(int i) throws IndexOutOfBoundsException {\n Object element = get(i);\n size--;\n\n if (size == 0) {\n storage = null;\n } else if (size < 5) {\n for (int cnt = i; cnt < size; cnt++) {\n ((E[]) storage)[cnt] = ((E[]) storage)[cnt + 1];\n }\n\n if (size == 1) {\n storage = ((E[]) storage)[0];\n }\n } else {\n ((ArrayList<E>) storage).remove(i);\n\n if (size == 5) {\n storage = ((ArrayList<E>) storage).toArray();\n }\n }\n\n return (E) element;\n }",
"public AnyType remove( int index ) throws IndexOutOfBoundsException {\n \n return removeNode( index ).getData();\n \n }",
"@Override\n public int delete(int index) {\n if (isEmpty()) {\n throw new IllegalStateException(\"Heap is empty.\");\n }\n\n int keyItem = heap[index];\n heap[index] = heap[heapSize - 1];\n usedSize--;\n heapSize--;\n heapifyDown(index);\n return keyItem;\n }",
"public E remove (int index)\n { E item;\n if (index < 0 || index >= size) {\n throw new\n IndexOutOfBoundsException(Integer.toString(index));\n }\n if (index == 0)\n item = removeFirst( );\n else {\n Node<E> node = getNode(index - 1);\n item = removeAfter(node);\n }\n return item; // return the deleted value\n }",
"public void removeAt(int index) {\n\n // Exceptional case\n if (index >= dataSize)\n throw new IllegalStateException();\n\n moveLeft(index);\n dataSize -= 1;\n }",
"public void removeIndex(int i) {\n // YOUR CODE HERE\n }",
"public E remove(int index) {\n if(index > size) return null;\n E element = null;\n for(int i = index+1; i < size; i++) {\n list[i-1] = list[i];\n }\n list[size-1] = null;\n size--;\n return element;\n }",
"@Test\n public void testRemoveAtIndexNoResize() {\n //No Resize\n for (int i = 0; i < 9; i++) {\n String input = String.format(\"b0%d\", i);\n list.addToBack(input);\n }\n list.removeAtIndex(4);\n int actualCapacity = ((Object[]) (list.getBackingArray())).length;\n Assert.assertEquals(\"The list resized when removing an element from a list while at capacity\",\n ArrayList.INITIAL_CAPACITY, actualCapacity);\n\n //With Resize\n list.addToBack(\"Filler1\");\n list.addToBack(\"Filler2\");\n list.addToBack(\"Filler3\");\n list.removeAtIndex(0);\n list.removeAtIndex(3);\n list.removeAtIndex(8);\n int newActualCapacity = ((Object[]) (list.getBackingArray())).length;\n Assert.assertEquals(\"The list resized when moving from above to below initial capacity.\",\n ArrayList.INITIAL_CAPACITY * 2, newActualCapacity);\n }",
"T remove(int index);",
"T remove(int index);",
"public void deleteAtIndex(int index) {\n if (index < 0 || index >= size) return;\n if (index == 0) {\n deleteHead();\n } else {\n ListNode curr = head;\n for (int i = 0; i < index - 1; i++) {\n curr = curr.next;\n }\n curr.next = curr.next.next;\n size--;\n }\n }",
"public void deleteKey(int index) {\n decreaseKey(index, Integer.MIN_VALUE);\n extractMinimum();\n }",
"public E remove(int index);",
"public T delete(int i) {\n if (i < 0 || i >= size) // if there is no index i in list\n throw new IndexOutOfBoundsException(\"Treated index: \" + i + \" | Size of the Dynamic Array \" + size()); // cause IndexOutOfBoundException\n Object[] newElements = new Object[elements.length]; // creating new array with size of \"elements\"\n T deletedValue = null; // save value of element that will be deleted\n if (size == 0) { // if list is empty\n throw new IndexOutOfBoundsException(\"Treated index: \" + i + \" | Size of the Dynamic Array \" + 0); // cause IndexOutOfBoundException\n } else if (size == 1) { // if size is 1\n deletedValue = (T) elements[i]; // save value of deleted element\n elements = newElements; // move temporary array to main array \"elements\"\n } else {\n deletedValue = (T) elements[i]; // save value of deleted element\n for (int j = 0; j < i; j++) // treat all values with index less than i\n newElements[j] = elements[j]; // copy elements in temporary array\n for (int j = i; j < size - 1; j++) // treat all values with index greater than i\n newElements[j] = elements[j + 1]; // copy elements in temporary array\n size--; // decrement size\n elements = newElements; // move temporary array to main array \"elements\"\n }\n return deletedValue; // return value of element that will be deleted\n }",
"void remove(int idx);",
"int remove(int idx);",
"@ZenCodeType.Method\n default void remove(int index) {\n \n doesNot(\"support removal by index\");\n }",
"private static void remove(int[]data,int size){\n int temp = data[0];\n data[0] = data[size-1];\n data[size-1] = temp;\n pushDown(data, size-1, 0);\n }",
"void delete (int index);",
"public void deleteAtIndex(int index) {\n if (index >= this.size || index < 0) {\n return;\n }\n\n ListNode pred = this.head;\n\n for (int i = 0; i < index; ++i) {\n pred = pred.next;\n }\n pred.next = pred.next.next;\n this.size--;\n }",
"public void compact()\n\t{\n\t\tif (addIndex == size())\n\t\t\treturn;\n\t\t\n\t\tObject narray = Array.newInstance( array.getClass().getComponentType(), addIndex );\n\t\tSystem.arraycopy( array, 0, narray, 0, addIndex );\n\t\tarray = narray;\n\t}",
"public native String removeItem(Number index);",
"public Node<E> removeAtIndex(int index){\n if (index >= size){ return null; }\n Node<E> current;\n // 5 - 1 > 2 go from beginning\n if (size - index > size/2) {\n current = head;\n for (int i = 0; i <= index; i++){\n current = current.getNext();\n }\n } else {\n current = tail;\n for (int i = size; i >= index; i--){\n current = current.getPrevious();\n }\n }\n current.getPrevious().setNext(current.getNext());\n current.getNext().setPrevious(current.getPrevious());\n current.setNext(null);\n current.setPrevious(null);\n size--;\n return current;\n }",
"private int minusOne(int index) {\n if (index - 1 < 0) {\n return array.length - 1;\n } else {\n return index - 1;\n }\n }",
"public Object remove(int index){\r\n return dequeue(); //calls the dequeue method\r\n }",
"@Override\n public int remove(int index) {\n checkIndex(index);\n Entry tmp = getEntry(index);\n int result = tmp.value;\n tmp.previous.next = tmp.next;\n tmp.next.previous = tmp.previous;\n size--;\n return result;\n }"
]
| [
"0.79180956",
"0.7889438",
"0.77380717",
"0.7628673",
"0.7626209",
"0.75745386",
"0.7564171",
"0.74682933",
"0.74201953",
"0.7407433",
"0.7391601",
"0.7286278",
"0.72751826",
"0.7273055",
"0.7262227",
"0.7229586",
"0.72074586",
"0.71867585",
"0.7146469",
"0.71149623",
"0.71071064",
"0.70748204",
"0.70456207",
"0.7021039",
"0.6959847",
"0.6944779",
"0.6877993",
"0.68737936",
"0.6871953",
"0.68676406",
"0.6863929",
"0.6843403",
"0.6822481",
"0.6795728",
"0.6781007",
"0.677934",
"0.6752013",
"0.67337286",
"0.6726855",
"0.67194575",
"0.6711922",
"0.6701376",
"0.6685379",
"0.66640246",
"0.6661019",
"0.66557765",
"0.6647368",
"0.6646643",
"0.659914",
"0.65677124",
"0.6558912",
"0.65477353",
"0.6542089",
"0.6537091",
"0.6525125",
"0.65229326",
"0.65209115",
"0.6518555",
"0.6511704",
"0.65109974",
"0.65026456",
"0.6494348",
"0.64876044",
"0.6485772",
"0.6485772",
"0.6485772",
"0.6485772",
"0.64824104",
"0.64613086",
"0.64562315",
"0.6447278",
"0.6446861",
"0.6415395",
"0.6407899",
"0.63854724",
"0.6366098",
"0.6365841",
"0.63608617",
"0.6358237",
"0.63436294",
"0.6322392",
"0.631498",
"0.6305915",
"0.6305915",
"0.6305187",
"0.62988925",
"0.6295301",
"0.6289177",
"0.6270451",
"0.62629837",
"0.62609226",
"0.6260807",
"0.6260479",
"0.6250066",
"0.62404203",
"0.62273926",
"0.62244284",
"0.62027985",
"0.6197623",
"0.618819"
]
| 0.7659622 | 3 |
returns the length of the array | int size() {
return array.length;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getArrayLength();",
"int getArrayLength();",
"long arrayLength();",
"public int arraySize();",
"public int size() {\n\t\treturn array.length();\n\t}",
"public int size() {\n //encapsulate\n int size = this.array.length;\n return size;\n }",
"int size()\n\t{\n\t\t//If array is null then return -1\n\t\tif(inputArray == null)\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\t\n\t\t//If the array is not null then return the length of the array\n\t\treturn inputArray.length;\n\t}",
"public static int arrayLength(final Object array) {\r\n if (GWT.isProdMode()) {\r\n return jsniLength(array);\r\n } else {\r\n return Array.getLength(array);\r\n }\r\n }",
"public int getLength(){\r\n\t \treturn arraySize;\r\n\t }",
"public int getSize() {\r\n return array.length;\r\n }",
"public int size()\n\t{\n\t\treturn arraySize;\n\t}",
"public int arrayCount()\n\t{\n\t\treturn _arrayCount;\n\t}",
"@Override\n public int size() {\n return array.length;\n }",
"public int getTrueSize() {\n int len = ArrayFuncs.computeSize(dataArray);\n return len;\n }",
"public int length()\n\t{\n\t\tint total_length=0;\n\t\tfor(int iterator=0; iterator<data.length;iterator++)\n\t\t{\n\t\t\tif(data[iterator]!=0)\n\t\t\t{\n\t\t\t\ttotal_length++;\n\t\t\t}\n\t\t}\n\t\treturn total_length;\n\t}",
"public abstract int sizeOf(byte[] array, int offset, int length);",
"public int size() {\n return a.length;\n }",
"int sizeOfTrafficVolumeArray();",
"int sizeOfRoadsideArray();",
"public int sizeOfSubArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(SUB$2);\n }\n }",
"@Override\n public synchronized int getSize() {\n return mArray.size();\n }",
"public int sizeOfValueArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(VALUE$0);\n }\n }",
"int sizeOfFunctionArray();",
"int sizeOfLanesArray();",
"public int sizeOfAxisArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(AXIS$1);\n }\n }",
"int sizeOfBridgeElementArray();",
"int sizeOfDescriptionArray();",
"public int sizeOfDeviceArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(DEVICE$12);\n }\n }",
"public int sizeOfVolumeArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(VOLUME$4);\r\n }\r\n }",
"int sizeOfReferenceRangeArray();",
"public int sizeOfCharacteristicArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(CHARACTERISTIC$12);\n }\n }",
"int sizeOfSpeedsArray();",
"public int sizeOfBrArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(BR$6);\n }\n }",
"int sizeOfGuideArray();",
"public int getLength(){\n\t\treturn data.length;\n\t}",
"public int length() {\n return size();\n }",
"public int sizeOfDataChckArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(DATACHCK$14);\n }\n }",
"public int getLength() {\n\t\treturn boardArray.size();\n\t}",
"int sizeOfPerformerArray();",
"int sizeOfRelatedArray();",
"public int sizeOfMemberArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(MEMBER$14);\n }\n }",
"int sizeOfNoPassingZoneArray();",
"public int size() {\n return AL.length;\n }",
"public int sizeOfDosageArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(DOSAGE$14);\n }\n }",
"public int sizeOfGuardianArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(GUARDIAN$22);\n }\n }",
"public int vecLength();",
"public int size()\n \t{\n \t\treturn getLength();\n \t}",
"public int size() {\r\n return length;\r\n }",
"public int length() {\n return data.length;\n }",
"protected int getArraySize(){\r\n\t \treturn numElems;\r\n\t \t//return arraySize;\r\n\t }",
"public org.python.types.Int __len__();",
"int sizeOfObjectDefinitionArray();",
"public int length() {\n\t\treturn size;\r\n\t}",
"public int length() {\n return data.length;\n }",
"public int size()\n\t{\n\t\treturn data.length;\n\t}",
"public int length()\n\t{\n\t\treturn length;\n\t}",
"int sizeOfControlPersonsArray();",
"int sizeOfFeatureArray();",
"int sizeOfFeatureArray();",
"public int sizeOfSupArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(SUP$4);\n }\n }",
"public int getLength() {\n\t\treturn data.length;\n\t\t\n\t}",
"public int length(){ return this.isUpgraded ? this.linkArray.length() : this.nativeArray.size(); }",
"public int sizeOfNameArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(NAME$8);\n }\n }",
"protected int getLength() {\n int length = super.getLength(); //see if it is defined in the ncml\n if (length < 0) {\n double[] t = getTimes();\n if (t != null) length = t.length;\n else length = 0;\n }\n return length;\n }",
"public int sizeOfErrorArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(ERROR$0);\r\n }\r\n }",
"public static native int Size(long lpjFbxArrayVector2);",
"public int sizeOfErrorArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(ERROR$0);\r\n }\r\n }",
"public int sizeOfTimingArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(TIMING$2);\r\n }\r\n }",
"public int length() {\n\t\treturn value.length;\n\t}",
"int sizeOfStarArray();",
"public int getValuesArrLength() {\n\t\treturn valuesArr.size();\n\t}",
"public int sizeOfParamArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(PARAM$14);\r\n }\r\n }",
"public int sizeOfIndexArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(INDEX$12);\r\n }\r\n }",
"public int length(){\n return pilha.size();\n }",
"public int sizeOfPointArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(POINT$0);\n }\n }",
"public int size() {\n return len;\n }",
"public int size() {\n\t\treturn data.length;\n\t}",
"public int length() {\n \treturn length;\n }",
"public int size() {\n return data.length;\n }",
"public int queueArrayLength(){\n\t\treturn queueArray.length;\n\t}",
"public int getLength()\n\t{\n\t\treturn (int) length;\n\t}",
"int length()\n\t{\n\t\treturn length;\n\t}",
"public static UnaryExpression arrayLength(Expression array) { throw Extensions.todo(); }",
"public int length() {\n\t\treturn this.n;\n\t}",
"public static boolean isArray_estLength() {\n return false;\n }",
"public int sizeOfSimpleTypeArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(SIMPLETYPE$0);\n }\n }",
"public int length() {\n\t\treturn length;\n\t}",
"public int length() {\n\t\treturn length;\n\t}",
"public double getLength() {\n return count;\n }",
"public int size(){\n return length;\n }",
"int sizeOfPathArray();",
"public static boolean isArray_length() {\n return false;\n }",
"public int length() {\n \t \n \t //return the length\n \t return(len);\n }",
"public int sizeOfRParametersArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(RPARAMETERS$20);\n }\n }",
"public int sizeOfParametersArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(PARAMETERS$16);\n }\n }",
"public int sizeOfCurbArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(CURB$10);\r\n }\r\n }",
"private int length() { return length; }",
"public int length();",
"public int length();",
"public int length();"
]
| [
"0.89788306",
"0.89788306",
"0.8844196",
"0.85596704",
"0.84507793",
"0.83279335",
"0.81958014",
"0.81841874",
"0.8173373",
"0.80879647",
"0.79878294",
"0.78640234",
"0.7848461",
"0.75746554",
"0.755585",
"0.74939454",
"0.74722475",
"0.74561286",
"0.74288934",
"0.7397014",
"0.7378417",
"0.73466086",
"0.73458904",
"0.7341557",
"0.73250234",
"0.7316147",
"0.7312835",
"0.7290335",
"0.7284687",
"0.72785914",
"0.7269948",
"0.7269551",
"0.7269502",
"0.72684467",
"0.7261632",
"0.7248512",
"0.72484636",
"0.7241797",
"0.72283995",
"0.720803",
"0.72057146",
"0.72009766",
"0.71679455",
"0.71564436",
"0.71556777",
"0.71441025",
"0.71433264",
"0.71293604",
"0.71201015",
"0.71129113",
"0.71060693",
"0.71025217",
"0.7099973",
"0.70994145",
"0.70931476",
"0.70907575",
"0.7080704",
"0.70797163",
"0.70797163",
"0.7072094",
"0.7070375",
"0.7068309",
"0.7060402",
"0.7049783",
"0.7046032",
"0.70455253",
"0.7039474",
"0.7035397",
"0.703267",
"0.7024297",
"0.701835",
"0.70059025",
"0.69930613",
"0.699078",
"0.69882923",
"0.6984003",
"0.69809043",
"0.6978366",
"0.6976598",
"0.6974488",
"0.6962916",
"0.69618237",
"0.6957609",
"0.69566685",
"0.6953555",
"0.69505847",
"0.6941747",
"0.6941747",
"0.6938097",
"0.6934929",
"0.6929547",
"0.6928814",
"0.6927026",
"0.69245785",
"0.692162",
"0.6918307",
"0.6915675",
"0.69080234",
"0.69080234",
"0.69080234"
]
| 0.83005846 | 6 |
changes the value in the array at position 'index' to 'val' | void update(int index, int val) {
array[index] = val;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void set(int index, Object value) {\n\n\t\t// the right portion of values of the array -> room is not available\n\t\tif(index >= arr.length) {\n\t\t\tObject[] tmpArr = new Object[index+1]; // keep all values of the variable arr\n\t\t\t\n\t\t\t// keep all items of arr\n\t\t\tfor(int i=0; i<arr.length; i++) {\n\t\t\t\ttmpArr[i] = arr[i];\n\t\t\t}\n\t\t\t\n\t\t\tarr = tmpArr; // exchange addresses\n \t\t}\t\n\t\t\n\t\tarr[index] = value;\n\t\t\n\t}",
"public void set(int index, Object value) {\n\tif(arr.length < index){\n\t\tObject arr2[] = new Object[index+1];\n\t\tSystem.arraycopy(arr, 0, arr2, 0, arr.length);\n\t\tarr2[index] = value;\n\t\tarr = arr2;\n\t\t\n\t}\n\telse arr[index] = value;\n}",
"public void set(int index, int val) {\n boolean exists = arr.get(index).get(arr.get(index).size() - 1).id == id;\n if (exists) {\n arr.get(index).get(arr.get(index).size() - 1).val = val;\n } else {\n List<Pair> list = arr.get(index);\n list.add(new Pair(id, val));\n arr.set(index, list);\n } \n }",
"void set(int index, int value) {\n array[index] = value;\n }",
"void setArrayElement(int index, Object value);",
"void setArrayElement(int index, Object value);",
"@Override\n public final void set(int index, E newValue) {\n array[index] = newValue;\n }",
"public void set(int idx, E value) {\n assert idx >= 0;\n \n checkgrow(idx);\n \n\tarray[idx] = value;\n\t\n }",
"public T setVal(int idx, T val) {\n\t\tint index = (idx << 1) + 1;\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tT old = (T) nvPairs.get(index);\n\t\tnvPairs.set(index, val);\n\t\treturn old;\n\t}",
"public void setElem(int index, long value) {\r\n a[index] = value;\r\n }",
"void set(int idx, int val);",
"@Override\n public E set(int index, E value) {\n // todo: Students must code\n checkRange(index);\n int pos = calculate(index);\n E oldVal = data[pos];\n data[pos] = value;\n return oldVal;\n }",
"public boolean set(int index, E value){\n if (index > maxIndex || index < 0){\n System.out.println(\"Error while replacing value. Your index \" + index + \" is out of bound of array\");\n return false;\n }\n\n array[index] = value;\n return true;\n }",
"public void setValueAt(Object val, int row, int col) {\r\n }",
"public void update(int[] bit, int val, int index) {\n index = index + 1;\n while (index < bit.length) {\n bit[index] += val;\n index = getNext(index);\n }\n }",
"public void changeNumberInArray(int index, int value) {\n if (index < 0 || index > array.length || value == 0) {\r\n throw new ArrayIndexOutOfBoundsException(\"Index is incorrect or value = 0\");\r\n }\r\n array[index] = value;\r\n }",
"public void setValue(String val, int idx) {\n lock.lock();\n try {\n binData[idx] = val;\n data[idx].add(val);\n }\n finally {\n lock.unlock();\n }\n }",
"protected void _setInt(int index, int value)\r\n/* 483: */ {\r\n/* 484:497 */ HeapByteBufUtil.setInt(this.array, index, value);\r\n/* 485: */ }",
"@Override\n public boolean set(int index, T element) {\n array[index] = element;\n return true;\n }",
"@Override\n // worst-case complexity: O(1), only assignments and array accesses\n public T set(int index, T item) {\n if (index < size && index >= 0) {\n T prev = arr[index];\n // replace the item\n arr[index] = item;\n // return the previous item at this index\n return prev;\n }\n // else throw an exception\n throw new IndexOutOfBoundsException();\n }",
"public void update(int index, int newVal) {\n\t\tupdateUtil(index, newVal, 0, valArray.length - 1, 0, this.oper);\n\t}",
"public T set(int index, T value) throws IndexOutOfBoundsException {\n checkException(index);\n arr[index] = value;\n return arr[index];\n }",
"private void insertValue(int index, int value) {\n\n\t\tfor (int i = this.array.length - 1; i > index; i--) {\n\t\t\tthis.array[i] = this.array[i - 1];\n\t\t}\n\n\t\tthis.array[index] = value;\n\t\tcount++;\n\t\tSystem.out.println(\"이동 횟수는 : \" + (count - (index + 1)));\n\t\tthis.showArray();\n\n\t}",
"@Override\n public T set(int index, T element) {\n if (indexCheck(index)) {\n T previousValue = (T) data[index];\n data[index] = element;\n return previousValue;\n }\n return null;\n }",
"public abstract <T> void set(int index, T value);",
"@Override\n public E set(int index, E value) {\n this.rangeCheck(index);\n E oldValue = (E) this.values[index];\n this.values[index] = value;\n return oldValue;\n }",
"public synchronized boolean set(int index, E value) {\n return this.array.set(index, value);\n }",
"public void setElementAt(Object obj, int index);",
"public void set(int index, int value) {\n\t\t\tcheckIndex(index);\n\t\t\telementData[index] = value;\n\t\t}",
"@Override\n public T set(final int index, final T element) {\n this.checkIndex(index);\n final T prevElment = get(index);\n this.data[index] = element;\n return prevElment;\n }",
"public void set(int index, int o) {\n\t\tif(index == 0) return;\n\t\tr[index] = o;\n\t}",
"void setArray(int index, Array value) throws SQLException;",
"private void assign(int index, String key, char val){\r\n \tkeys[index] = key;\r\n \tvals[index] = val;\r\n }",
"@Override\n public int set(int index, int element) {\n checkIndex(index);\n int result = getEntry(index).value;\n getEntry(index).value = element;\n return result;\n }",
"private void updateBIT(int []arr, int n, int index, int val) {\n while(index <= n) {\n // Add 'val' to current node of BIT Tree\n arr[index] += val;\n\n // Update index to that of parent in update View\n index += index & (-index);\n }\n }",
"@Override\n\tpublic void setValueIndex(int index) {\n\t\t\n\t}",
"public Object set(int index, Object element) {\r\n Entry e = entry(index);\r\n Object oldVal = e.element;\r\n e.element = element;\r\n return oldVal;\r\n }",
"protected void _setIntLE(int index, int value)\r\n/* 495: */ {\r\n/* 496:509 */ HeapByteBufUtil.setIntLE(this.array, index, value);\r\n/* 497: */ }",
"void set(int index, T data);",
"public static native void SetAt(long lpjFbxArrayVector2, int pIndex, long pElement);",
"public E set(int index, E newValue){\n if (index < 0 || index >= size){\n throw new ArrayIndexOutOfBoundsException(index);\n }\n E oldValue = theData[index];\n theData[index] = newValue;\n\n return oldValue;\n }",
"void set(int index, Object element);",
"public void set(long index);",
"public void setTargetValue(int idx, Object value);",
"public Integer mutate(int index);",
"public void set(int index, E newValue)\n {\n if (index >= 0 && index < size)\n data[index] = newValue;\n else\n throw new NoSuchElementException();\n }",
"public void setRegister(int index, long val){\n \t\tif(index >=1 && index < 32){\n \t\t\tregFile[index].setValue(val);\n \t\t}\n \t\telse throw new Error(\"Cannot access $r\" + index);\n \t}",
"public void set(int index, T element) {\n\t\tif (index < 0 || index >= size)\n\t\t\tthrow new ArrayIndexOutOfBoundsException();\n\t\tNode<T> curNode = head;\n\t\twhile (index != -1) {\n\t\t\tif (index == 0) {\n\t\t\t\tcurNode.value = element;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcurNode = curNode.next;\n\t\t\tindex--;\n\t\t}\n\t\tthrow new ArrayIndexOutOfBoundsException();\n\t}",
"public Comparable set( int index, Comparable newVal ) {\n\tComparable temp= _data[index];\n\t_data[index]= newVal;\n\treturn temp;\n }",
"public void set(int index, Object value) {\n verifyModifiable();\n\n try {\n elements.set(index, value);\n } catch (IndexOutOfBoundsException exception) {\n if (elements.size() != 0)\n throw new RuntimeException(\"failed to set a value beyond the end of the tuple elements array, size: \" + size() + \" , index: \" + index);\n else\n throw new RuntimeException(\"failed to set a value, tuple may not be initialized with values, is zero length\");\n }\n }",
"@Override\r\n\tpublic void setValueAtIndex(final IScope scope, final Object index, final T value) {\r\n\t\tILocation p = buildIndex(scope, index);\r\n\t\tset(scope, (int) p.getX(), (int) p.getY(), value);\r\n\r\n\t}",
"@Override\n\tpublic void setValueAt(Object arg0, int arg1, int arg2) {\n\t\t\n\t}",
"@Override\n\tpublic void setValueAt(Object arg0, int arg1, int arg2) {\n\t\t\n\t}",
"public void storePlayer(int index, int val) {\n\t\tplayerArray[index] = val;\n\t}",
"@Override\n public final Integer set(final int index, final Integer element) {\n if (!checkRange(index)) {\n throw new IndexOutOfBoundsException();\n } else {\n final int temp = arrayList[index];\n arrayList[index] = element;\n return temp;\n }\n }",
"public @Override E set(int index, E element) {\n \tNode n = getNode(index);\n \tE result = n.data;\n \tn.data = element;\n \treturn result;\n }",
"public void set(int i, int value) {\n\t\tassert i < size();\n\t\tarr[i] = value;\n\t}",
"void setIdx(int i);",
"public void set(int i, long v) {\n data[i] = newValue(v);\n }",
"float put(int idx, float val);",
"void changeSetting(int idx) {\n currentIdx = idx;\n }",
"public T set(int i, T t) {\n if (i < 0 || i >= size) // if there is no index i in list\n throw new IndexOutOfBoundsException(\"Treated index: \" + i + \" | Size of the Dynamic Array \" + size()); // cause IndexOutOfBoundException\n T previousValue = (T) elements[i]; // store previous value of element with index i\n elements[i] = t; // set element with index i to t\n return previousValue; // return previous value of element with index i\n }",
"@Override\n public void setValueAt(java.lang.Object arg0, int arg1, int arg2) {\n\n }",
"@Override\n public void setValueAt(java.lang.Object arg0, int arg1, int arg2) {\n\n }",
"private int adjustIndex(int index)\n {\n int max = values.length;\n return ((index % max) + max) % max;\n }",
"public E set(int index, E element);",
"public void insert(int val)\n {\n try\n {\n a[index++] = val;\n n=index;\n }\n catch(Exception e)\n {\n System.out.println(�e.getMessage�);\n }\n }",
"BinaryArrayReadWrite set(int index, byte x);",
"public abstract E set(int index, E e);",
"public void insertValueAtIndex(int value, int index) {\n if (arraySize < 50 && index < arraySize) {\n theArray[index] = value;\n }\n }",
"@ZenCodeType.Method\n @ZenCodeType.Operator(ZenCodeType.OperatorType.INDEXSET)\n default void put(String index, @ZenCodeType.Nullable IData value) {\n \n notSupportedOperator(OperatorType.INDEXSET);\n }",
"public void set(int index, E e) {\r\n if (index < 0 || index > +data.length)\r\n throw new IllegalArgumentException(\"Index is illegal.\");\r\n\r\n set(0, 0, data.length - 1, index, e);\r\n }",
"@Override\n public void setValue(int index, Object value)\n {\n if (index == 1)\n {\n super.setValue(index, value); \n }\n else if (index == 2)\n {\n if (m_Scaler != 0)\n {\n try\n { \n m_Value = ((Number)value).doubleValue() * getScaler();\n }\n catch (Exception ex)\n {\n //Sometimes scaler is set for wrong Object type.\n setValue(value);\n }\n }\n else\n {\n setValue(value);\n }\n }\n else if (index == 3)\n { \n //Set default values.\n if (value == null)\n {\n m_Scaler = m_Unit = 0;\n }\n else\n {\n if (Array.getLength(value) != 2)\n {\n m_Scaler = m_Unit = 0;\n }\n else\n {\n m_Scaler = ((Number)Array.get(value, 0)).intValue();\n m_Unit = (((Number)Array.get(value, 1)).intValue() & 0xFF);\n }\n }\n }\n else\n {\n throw new IllegalArgumentException(\"GetValue failed. Invalid attribute index.\");\n }\n }",
"public void setValueAt(Object aValue, int row, int column)\n {\n\n }",
"private void setStat(int value, int index) {\n setStringStat(String.valueOf(value), index);\n }",
"@Override\n\tpublic E set(int idx, E element) {\n\t\tif (element == null) throw new NullPointerException();\n\t\tif (idx < 0 || idx >= size()) throw new IndexOutOfBoundsException();\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (element.equals(list[i]))\n\t\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tE output = null;\n\t\toutput = list[idx];\n\t\tlist[idx] = element;\n\t\treturn output;\n\t}",
"void set(int i, int val) {\n int numPosition = i / MAX_BITS;\n int intPosition = i % MAX_BITS;\n\n if (val == 1)\n values[numPosition] |= (1 << intPosition);\n else\n values[numPosition] = values[numPosition]&~(1 << intPosition);\n }",
"public void addAtIndex(int index, int val) {\n if(index==0) {\n addAtHead(val);\n return;\n }\n if(index==len) {\n addAtTail(val);\n return;\n }\n if(index>0 && index<len) {\n SingleNode cur = new SingleNode(val,null);\n SingleNode pre = head;\n for(int i=0; i<index-1; i++) {\n pre = pre.next;\n }\n cur.next = pre.next;\n pre.next = cur;\n len++;\n }\n }",
"public void setPos(int index, int value) {\r\n this.pos[index] = value;\r\n }",
"@Override\n public E set(int index, E elem) {\n\t E first = _store[index];\n\t _store[index] =elem;\n\t return first;\n }",
"public void setArray(int i, Array x);",
"public boolean set(int index, int integer)\n\t{\n\t\tif (index >= 0 && index < arraySize)\n\t\t{\n\t\t\tarray[index] = integer;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t\t\t\n\t}",
"public void set(int index,Fraction x)\r\n\t{\r\n\t\tif(index<0 || index >=n)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Invalid index\");\r\n\t\t}\r\n\t\telse\r\n\t\t\ta[index]=x;\r\n\t}",
"void set(int i, E e) {\r\n arr[i] = e;\r\n }",
"public void set(int index, T element) {\n genericArrayList[index] = element;\n }",
"@Override\n public void update(int i, E value) {\n if(!hasWork()) {\n throw new NoSuchElementException();\n }\n if(i < 0 || i >= size()) {\n throw new IndexOutOfBoundsException();\n }\n array[(front + i) % capacity()] = value;\n }",
"protected abstract void writeInternal(int index, int value);",
"public void set(int index, float value) {\n storage[index] = value;\n }",
"public void addAtIndex(int index, int val) {\n if (index < 0 || index > size) {\n return;\n }\n Node prev = dummyHead;\n for (int i = 0; i < index; i++) {\n prev = prev.next;\n }\n prev.next = new Node(val, prev.next);\n size++;\n }",
"public int replaceFixedLengthData(int index, int[] data) {\n for(int i = 0; i<data.length; i++) {\n theList.set(index+i,data[i]);\n }\n return index;\n }",
"final void setIntPropertyValue(int index, int value) {\n if (index >= mProperties.size()) {\n throw new ArrayIndexOutOfBoundsException();\n }\n mValues[index] = value;\n }",
"private void setElement(int index, E element) {\n// if (getElement(index) != null) {\n// setContents.remove(getElement(index));\n// }\n while (index >= contents.size()) {\n contents.add(null);\n }\n contents.set(index, element);\n// contents.put(index, element);\n backwards.put(element, index);\n\n// if (element != null) {\n// setContents.add(getElement(index));\n// }\n }",
"public E set(int index, E element) {\n if(index < 0 || index >= size())\n throw new IndexOutOfBoundsException();\n E currentElement = get(index);\n list[index] = element;\n return currentElement;\n }",
"public void set(int index, float value) {\r\n RangeCheck(index);\r\n elementData[index] = value;\r\n }",
"public void setValueArray(int i, amdocs.iam.pd.webservices.productattrrel.productdetailsoutput.Value value)\n {\n synchronized (monitor())\n {\n check_orphaned();\n amdocs.iam.pd.webservices.productattrrel.productdetailsoutput.Value target = null;\n target = (amdocs.iam.pd.webservices.productattrrel.productdetailsoutput.Value)get_store().find_element_user(VALUE$0, i);\n if (target == null)\n {\n throw new IndexOutOfBoundsException();\n }\n target.set(value);\n }\n }",
"public Vector<T> set(int aIndex, T aValue);",
"public void setIndex(int index)\n/* */ {\n/* 39 */ this.index = index;\n/* */ }",
"public void putValueBeforeArrayAddrIndex() {\n\t\tObj index = Tab.currentScope().findSymbol(\"@@TEMPOBJ\");\n\t\tObj address = Tab.currentScope().findSymbol(\"@@TEMPOBJ2\");\n\t\tObj value = Tab.currentScope().findSymbol(\"@@TEMPOBJ3\");\n\t\t\n\t\tCode.store(index);\n\t\tCode.store(address);\n\t\tCode.store(value);\n\t\t\n\t\tCode.load(address);\n\t\tCode.load(index);\n\t\tCode.load(value);\t\t\n\t}",
"protected void _setByte(int index, int value)\r\n/* 423: */ {\r\n/* 424:437 */ HeapByteBufUtil.setByte(this.array, index, value);\r\n/* 425: */ }",
"@Override\n public E set(int i, E e) throws IndexOutOfBoundsException {\n checkIndex(i, size);\n E temp = data[i];\n data[i] = e;\n return temp;\n }"
]
| [
"0.7644638",
"0.7605554",
"0.7502879",
"0.74870896",
"0.74811447",
"0.74811447",
"0.71277034",
"0.7068088",
"0.70382214",
"0.70105475",
"0.6983889",
"0.69744503",
"0.69024646",
"0.68636334",
"0.680043",
"0.6772033",
"0.66875035",
"0.66815645",
"0.6671623",
"0.6643939",
"0.6634031",
"0.6606432",
"0.65818197",
"0.6560747",
"0.6507844",
"0.64997625",
"0.6498632",
"0.6454017",
"0.6421425",
"0.6416019",
"0.64040554",
"0.6402981",
"0.63973993",
"0.6393491",
"0.6391485",
"0.637834",
"0.63779616",
"0.6376909",
"0.6370539",
"0.6338186",
"0.63333964",
"0.6308167",
"0.62726957",
"0.6249077",
"0.62418216",
"0.62407446",
"0.6233017",
"0.619908",
"0.619643",
"0.616191",
"0.6143345",
"0.61365783",
"0.61365783",
"0.61107427",
"0.6095162",
"0.6090736",
"0.6067513",
"0.6056313",
"0.6043964",
"0.60405684",
"0.60360533",
"0.603285",
"0.5999266",
"0.5999266",
"0.5989715",
"0.59865266",
"0.59718317",
"0.5966042",
"0.5958974",
"0.5953492",
"0.59400195",
"0.59395057",
"0.59289604",
"0.5922652",
"0.5921739",
"0.59062654",
"0.5900067",
"0.58997566",
"0.5886211",
"0.588447",
"0.5871466",
"0.58696544",
"0.586901",
"0.5867894",
"0.58636314",
"0.5863411",
"0.5846859",
"0.58464247",
"0.584438",
"0.5841119",
"0.5836169",
"0.5821889",
"0.5820421",
"0.5819097",
"0.5808976",
"0.58072704",
"0.5806304",
"0.580275",
"0.58007675",
"0.57930565"
]
| 0.81832105 | 0 |
swaps the values in positions 'index1' and 'index2' in the array | void swap(int index1, int index2) {
int temp = array[index1]; // created a temporary variable to store first
// index
array[index1] = array[index2]; // swapped the int in first index for the
// int in second index
array[index2] = temp; // made int in 2nd index into temp variable, which
// holds the previous int in first index
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void swap(int index_1,int index_2){\n int temp=arr[index_1];\n arr[index_1]=arr[index_2];\n arr[index_2]=temp;\n }",
"private static void swap(int[] array, int index1, int index2) {\n int x = array[index1];\n array[index1] = array[index2];\n array[index2] = x;\n }",
"private void swap(int[] a, int index1, int index2) {\n int temp = a[index1];\n a[index1] = a[index2];\n a[index2] = temp;\n }",
"public void swap(int index1, int index2) {\n \n }",
"private static void swap(int[] array, int ind1, int ind2) {\n int temp = array[ind1];\n array[ind1] = array[ind2];\n array[ind2] = temp;\n }",
"public static void swap(int[] arr,int index1,int index2)\n\t{\n\t\tif(arr == null || arr.length == 0) return;\n\t\tif(index1 < 0 || index2 < 0 || index1 >= arr.length || index2 >= arr.length) return;\n\t\t\n\t\tint tmp = arr[index1];\n\t\tarr[index1] = arr[index2];\n\t\tarr[index2] = tmp;\n\t\t\n\t}",
"static void swap(int[] numbers, int index1, int index2) {\n\t\tint var = numbers[index1];\r\n\t\tnumbers[index1] = numbers[index2];\r\n\t\tnumbers[index2] = var;\r\n\t}",
"public void swapValues(int indexOne, int indexTwo){\n int temp = theArray[indexOne];\n theArray[indexOne] = theArray[indexTwo];\n theArray[indexTwo] = temp;\n }",
"public void flipIndexes() {\n int temp = index1;\n index1 = index2;\n index2 = temp;\n }",
"private void swap(int index1, int index2) {\n E element1 = getElement(index1);\n E element2 = getElement(index2);\n setElement(index2, element1);\n setElement(index1, element2);\n }",
"protected void swap(int[] mySortingArray, int index1, int index2) {\r\n\t\tint temp = mySortingArray[index1];\r\n\t\tmySortingArray[index1] = mySortingArray[index2];\r\n\t\tmySortingArray[index2] = temp;\r\n\t}",
"public static <T> void swap(T[] values, int index1, int index2) {\n\t\tT temp = values[index1];\n\t\tvalues[index1] = values[index2];\n\t\tvalues[index2] = temp;\n\t}",
"private void swap(int firstIdx, int secondIdx) {\r\n // TODO\r\n }",
"public void swap(String[] arr, int index0, int index1) {\n String temp = arr[index0];\n arr[index0] = arr[index1];\n arr[index1] = temp;\n }",
"private void swap(Comparable[] array, int pos1, int pos2) {\n\t\tComparable tmp = array[pos1];\n\t\tarray[pos1] = array[pos2];\n\t\tarray[pos2] = tmp;\n\t}",
"public boolean swap(int index1, int index2)\n\t{\n\t\tif (index1 >= 0 && index2 >= 0 && index1 < arraySize && index2 < arraySize)\n\t\t{ \n\t\t\tif (index1 != index2)\n\t\t\t{\n\t\t\t\tint holder = array[index1];\n\t\t\t\tarray[index1] = array[index2];\n\t\t\t\tarray[index2] = holder;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\t\n\t\treturn false;\n\t}",
"public static void swapReferences(Object[] a, int index1, int index2) {\n Object tmp = a[index1];\n a[index1] = a[index2];\n a[index2] = tmp;\n }",
"public static void swapReferences(Object[] a, int index1, int index2) {\n Object[] tmp = (Object[]) a[index1];\n a[index1] = a[index2];\n a[index2] = tmp;\n }",
"@Override\n protected void swap(int i, int j)\n {\n E temp = this.elements[i];\n this.elements[i] = this.elements[j];\n \tthis.elementsToArrayIndex.put(elements[i], i);\n this.elements[j] = temp;\n \tthis.elementsToArrayIndex.put(elements[j], j);\n }",
"private void swap(int idx1, int idx2) {\n int temp = heap[idx1];\n heap[idx1] = heap[idx2];\n heap[idx2] = temp;\n }",
"private static void vecswap(double x[], int[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x,a2, a, b);\n\t}",
"private void swap(int[] nums, int i, int index) {\n if (i < nums.length && index < nums.length) {\n int temp = nums[i];\n nums[i] = nums[index];\n nums[index] = temp;\n }\n }",
"private static <T> void vecswap(int x[], T[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a2, a, b);\n\t}",
"private void swap(int index1, int index2) {\n Node tmp = heap[index1];\n heap[index1] = heap[index2];\n heap[index2] = tmp;\n }",
"private static void vecswap(int x[], int[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a2, a, b);\n\t}",
"public void swap (int index1, int index2)\n {\n if(index1 >= 0 && index2 >= 0\n && index1 < (stocks.size())\n && index2 < (stocks.size()))\n {\n Stock temp = stocks.get(index1);\n Stock second = stocks.set(index1, stocks.get(index2));\n stocks.set(index2, temp);\n }\n }",
"private void swap(int index1, int index2) {\r\n int temp = heap.get(index1);\r\n heap.set(index1, heap.get(index2));\r\n heap.set(index2, temp);\r\n }",
"public void swap(int index1, int index2)\n\t{\n\t\tthis.grid.swap(index1, index2);\n\t}",
"private void swap(int[] a, int i, int j) {\n int tmp = a[i];\n a[i] = a[j];\n a[j] = tmp;\n }",
"private static void vecswap(double x[], double[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x,a2, a, b);\n\t}",
"private static <T> void vecswap(int x[], double[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a2, a, b);\n\t}",
"private static <T,P> void vecswap(T x[], int[] a2,int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x,a2, a, b);\n\t}",
"private static void swap(int x[], int[] a2, int a, int b) {\n\t\tint t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tint t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}",
"private void swap(int index1, int index2) {\n \t\tNode node1 = getNode(index1);\n \t\tNode node2 = getNode(index2);\n \t\tthis.contents.set(index1, node2);\n \t\tthis.contents.set(index2, node1);\n \t}",
"private static <T> void vecswap(short x[], T[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a2, a, b);\n\t}",
"private static <T> void vecswap(float x[],T[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a2, a, b);\n\t}",
"private static <T> void vecswap(byte x[], T[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a2, a, b);\n\t}",
"private void swap(int []a, int i, int j){\n\t\tint temp = a[i];\n\t\ta[i] = a[j];\n\t\ta[j] = temp;\n\t}",
"public void swapAdjacentElements(int[] values)\n {\n // your work here\n\n\n\n\n }",
"private static <T,P> void vecswap(T x[], P[] a2,int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x,a2, a, b);\n\t}",
"private static <T> void vecswap(char x[], T[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a2, a, b);\n\t}",
"private void swap(int i, int j){\n \t\tint temp = a[i];\n \t\ta[i] = a[j];\n \t\ta[j] = temp;\n }",
"private void swap(int[] values, int p1, int p2) {\n int temp = values[p1];\n values[p1] = values[p2];\n values[p2] = temp;\n moves++;\n }",
"private void swapAt(int i, int j) {\n\t\tfloat tmp = sequence[i];\n\t\tsequence[i] = sequence[j];\n\t\tsequence[j] = tmp;\n\t}",
"public void swap(int i, int j) {\n int temp = a[i];\n a[i] = a[j];\n a[j] = temp;\n }",
"private static <T> void vecswap(double x[], T[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x,a2, a, b);\n\t}",
"private void swap(int one, int two)\r\n {\r\n//*** one->two\r\n long temp = a[two];\r\n a[one] = a[two];\r\n a[two] = temp;\r\n }",
"private void swap(int index1, int index2){\r\n ListNode c = head;\r\n ListNode swapNode = head;\r\n \r\n E tmp = null, tmp1 = null;\r\n \r\n for(int i = 0; i < index1; i++) c = c.getLink();\r\n tmp = (E) c.getData();\r\n \r\n for(int i = 0; i < index2; i++) swapNode = swapNode.getLink();\r\n tmp1 = (E) swapNode.getData();\r\n c.setData(tmp1);\r\n swapNode.setData(tmp);\r\n }",
"private void swap(int leftIndex, int rightIndex) {\n\t\tint temp = sortArray[leftIndex];\n\t\tsortArray[leftIndex] = sortArray[rightIndex];\n\t\tsortArray[rightIndex] = temp;\n\t}",
"private static void vecswap(char x[], char[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a2, a, b);\n\t}",
"private static <T> void swap(int x[], T[] a2, int a, int b) {\n\t\tint t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tT t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}",
"public static void swap(int arr[], int position1, int position2) {\n int holder = arr[position1];\n arr[position1] = arr[position2];\n arr[position2] = holder;\n }",
"public void swapArrayElement(int elem1, int elem2) {\n int index1 = 0, index2 = 0, temp;\n for (int i = 1; i < myArray.length; i++) {\n if (myArray[i] == elem1)\n index1 = i;\n if (myArray[i] == elem2)\n index2 = i;\n }\n temp = myArray[index1];\n myArray[index1] = myArray[index2];\n myArray[index2] = temp;\n }",
"private static void swap(int[] A, int i, int j) {\n int temp = A[i];\n A[i] = A[j];\n A[j] = temp;\n }",
"private static void swap(int[] a, int i, int j) {\n int swap = a[i];\n a[i] = a[j];\n a[j] = swap;\n }",
"private void swap(int[] nums, int i, int j) {\n\t\tint tmp=nums[i];\n\t\tnums[i]=nums[j];\n\t\tnums[j]=tmp;\n\t}",
"private int[] swap(int[] a, int i, int j) {\n int tmp;\n tmp = a[i];\n a[i] = a[j];\n a[j] = tmp;\n return a;\n }",
"private static void swap(int[] array, int i, int j) {\n\n int temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n }",
"public synchronized void elementSwapped(Object source, int index1,\n\t\t\tObject other, int index2) {\n\n\t}",
"private static <T> void swap(byte x[],T[] a2, int a, int b) {\n\t\tbyte t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tT t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}",
"private static <T> void swap(int x[], double[] a2, int a, int b) {\n\t\tint t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tdouble t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}",
"private static void swap(double x[], int[] a2, int a, int b) {\n\t\tdouble t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tint t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}",
"private void exchange(int i, int j){\n\t\tString temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n\t}",
"private static void swap(int[] arr, int a, int b) {\n int temp = arr[a];\n arr[a] = arr[b];\n arr[b] = temp;\n }",
"static void swap(int[] array, int i, int j) {\n if (i >= 0 && j >= 0 && i < array.length && j < array.length) {\n int tmp = array[i];\n array[i] = array[j];\n array[j] = tmp;\n }\n }",
"public synchronized void elementSwapped(Object newParam, int index1,\n\t\t\tint index2) {\n\n\t\tif (index1 < index2) {\n\t\t\tswapElements(newParam, index1, index2);\n\t\t} else {\n\t\t\tswapElements(newParam, index2, index1);\n\t\t}\n\n\t}",
"private static void swap(int[] array, int first, int second) {\n int temp = array[first];\n array[first] = array[second];\n array[second] = temp;\n }",
"private void swap(int[] nums, int i, int j) {\n int temp = nums[i];\n nums[i] = nums[j];\n nums[j] = temp;\n }",
"private static void swap(double x[], double[] a2, int a, int b) {\n\t\tdouble t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tdouble t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}",
"public static void swap(int[] arr, int i, int j) {\n System.out.println(\"Swapping index \" + j + \" and index \" + i);\n int temp = arr[i];\n arr[i] = arr[j];\n arr[j] = temp;\n }",
"private static <E extends Comparable<? super E>> void swap(\r\n\t\t\tComparable<E>[] data, int i, int j) {\r\n\t\tComparable<E> temp = data[i];\r\n\t\tdata[i] = data[j];\r\n\t\tdata[j] = temp;\r\n\t}",
"@Override\n \tpublic void swap(int i, int j) {\n \t\tint t=data[i];\n \t\tdata[i]=data[j];\n \t\tdata[j]=t;\n \t}",
"private void swap(T[] arr, int a, int b) {\n T temp = arr[a];\n arr[a] = arr[b];\n arr[b] = temp;\n }",
"public static void swap(int arr[], int i, int j){\n int tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n }",
"private static <T,S> void swap(T x[], int[] a2, int a, int b) {\n\t\tT t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tint t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}",
"private static void swap(Integer[] a, int x, int y) {\n\t\tInteger temp = a[x];\n\t\ta[x] = a[y];\n\t\ta[y] = temp;\n\t}",
"private static void swap(int[] a, int x, int y) {\n\t\tint temp = a[x];\n\t\ta[x] = a[y];\n\t\ta[y] = temp;\n\t}",
"private static <T> void vecswap(long x[], T[] a2,int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x,a2, a, b);\n\t}",
"private static void exch(Object[] a, int i, int j) {\r\n Object swap = a[i];\r\n a[i] = a[j];\r\n a[j] = swap;\r\n }",
"private static void exch(Object[] a, int i, int j) {\n Object swap = a[i];\n a[i] = a[j];\n a[j] = swap;\n }",
"private static void exch(Object[] a, int i, int j) {\n Object swap = a[i];\n a[i] = a[j];\n a[j] = swap;\n }",
"private static void exch(Object[] a, int i, int j) {\n Object swap = a[i];\n a[i] = a[j];\n a[j] = swap;\n }",
"void swap(int[] array, int i, int j) {\n\t\tint t = array[i];\n\t\tarray[i] = array[j];\n\t\tarray[j] = t;\n\t}",
"private static void swap(int[] array, int j, int i) {\r\n\t\tint temp = array[i];\r\n\t\tarray[i] = array[j];\r\n\t\tarray[j] = temp;\r\n\t}",
"private static void vecswap(int x[], int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a, b);\n\t}",
"private static <T> void swap(short x[], T[] a2, int a, int b) {\n\t\tshort t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tT t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}",
"public static void swap(int[] arr,int i,int j){\n int temp=arr[i];\n arr[i]=arr[j];\n arr[j]=temp;\n }",
"private static void swap(int[] A, int a, int b){\n\t\tint temp = A[a];\n\t\tA[a] = A[b];\n\t\tA[b] = temp;\n\t}",
"private static void swap(Object[] x, int a, int b)\n {\n Object t = x[a];\n x[a] = x[b];\n x[b] = t;\n }",
"private void swap(int i, int j) {\n double[] temp = data[i];\n data[i] = data[j];\n data[j] = temp;\n }",
"private static void swap(int[] A, int i , int j){\r\n\t\tint temp = A[i];\r\n\t\tA[i] = A[j];\r\n\t\tA[j] = temp;\r\n\t}",
"private static <T,S> void swap(T x[], S[] a2, int a, int b) {\n\t\tT t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tS t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}",
"public static void swap2DArr(int a[][], int i, int j, int x, int y) {\n\t\tint temp = a[i][j];\n\t\ta[i][j] = a[x][y];\n\t\ta[x][y] = temp;\n\n\t}",
"private static void swap(int[] arry , int a,int b) {\n int temp = arry[a];\n arry[a]=arry[b];\n arry[b]=temp;\n }",
"public static void swap(int[] arr, int i, int j) {\r\n int temp = arr[i];\r\n arr[i] = arr[j];\r\n arr[j] = temp;\r\n }",
"public static void swap(int arr[], int i, int j) {\n int tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n }",
"public static void swap(int i, int j, int[] arr)\n {\n int temp=0;\n temp=arr[i];\n arr[i]=arr[j];\n arr[j]=temp;\n }",
"private void swap(int i, int j) {\n\t\tlong temp = a[i];\n\t\ta[i] = a[j];\n\t\ta[j] = temp;\n\t}",
"private void swap(int i, int j) {\n\t\tint tmp = data.get(i);\n\t\tdata.set(i, data.get(j));\n\t\tdata.set(j, tmp);\n\t}",
"private void swap(byte[] bytes, int pos1, int pos2) {\n \t\tbyte temp = bytes[pos1];\n \t\tbytes[pos1] = bytes[pos2];\n \t\tbytes[pos2] = temp;\n \t}"
]
| [
"0.8309734",
"0.83030576",
"0.8243031",
"0.8098988",
"0.7964072",
"0.7927888",
"0.7916318",
"0.7860293",
"0.77891475",
"0.7728848",
"0.76787645",
"0.761901",
"0.7508387",
"0.7458529",
"0.7355545",
"0.7331181",
"0.7318094",
"0.7301634",
"0.7262635",
"0.72366464",
"0.72340137",
"0.72187465",
"0.7213379",
"0.7209358",
"0.7198856",
"0.7189631",
"0.7188836",
"0.71789306",
"0.71504104",
"0.7144035",
"0.71357083",
"0.7124952",
"0.7124729",
"0.71210045",
"0.71100324",
"0.71044004",
"0.71019614",
"0.70975447",
"0.7095073",
"0.70868516",
"0.70821565",
"0.70784336",
"0.7074548",
"0.7071511",
"0.706785",
"0.7062481",
"0.7059074",
"0.705674",
"0.7055276",
"0.7052663",
"0.7041484",
"0.70384777",
"0.7037051",
"0.7036367",
"0.7033576",
"0.7029447",
"0.70279545",
"0.7010779",
"0.7005453",
"0.6987777",
"0.69784516",
"0.69716424",
"0.6968542",
"0.6960404",
"0.69563717",
"0.69447404",
"0.6937321",
"0.6934975",
"0.6934342",
"0.6933571",
"0.6932674",
"0.69279003",
"0.6917035",
"0.69047576",
"0.6896843",
"0.68940085",
"0.68927836",
"0.6887196",
"0.68811375",
"0.687664",
"0.687664",
"0.687664",
"0.68683654",
"0.68649596",
"0.6853664",
"0.68496776",
"0.683834",
"0.6835388",
"0.6828924",
"0.6826214",
"0.6806217",
"0.678661",
"0.6784395",
"0.6777058",
"0.6770549",
"0.6768801",
"0.6762897",
"0.67620355",
"0.67552495",
"0.67389834"
]
| 0.7975654 | 4 |
sorts the values in the array from least to greatest | void sort() {
int n = array.length;
int temp = 0;
for (int i = 0; i < n; i++) {
for (int j = 1; j < (n - i); j++) {
if (array[j - 1] > array[j]) { // if the first term is larger
// than the last term, then the
// temp holds the previous term
temp = array[j - 1];
array[j - 1] = array[j];// swaps places within the array
array[j] = temp;
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void sorter(int[] array){\r\n\r\n for (int i = 0; i < array.length-1; i++)\r\n for (int j = 0; j < array.length-i-1; j++)\r\n if (array[j] > array[j+1])\r\n {\r\n int temp = array[j];\r\n array[j] = array[j+1];\r\n array[j+1] = temp;\r\n }\r\n }",
"public static void sort(Comparable[] a) {\n for (int i = 0 ; i < a.length ; i++) { // each position scan\n int min = i;\n for (int j = i+1; j < a.length; j++) { // each time we have to scan through remaining entry\n if (HelperFunctions.less(a[j], a[min])) {\n min = j ;\n }\n HelperFunctions.exch(a, i, min);\n }\n }\n }",
"static void sort(int[] array) {\n int len = array.length;\n for (int i = 0; i < len; i++) {\n int minIndex = i;\n for (int j = i + 1; j < len; j++) {\n if (array[j] < array[minIndex])\n minIndex = j;\n }\n SortingUtil.swap(array, i, minIndex);\n }\n }",
"public void sortArray(){\n\t\tfor (int i=0; i<population.length;i++){\n\n\t\t\tfor (int j=0; j<population.length-i-1;j++){\n\n\t\t\t\tif(population[j].computeFitness()>population[j+1].computeFitness()) {\n\t\t\t\t\t//swap their positions in the array\n\t\t\t\t\tChromosome temp1 = population[j];\n\t\t\t\t\tpopulation[j] = population[j+1];\n\t\t\t\t\tpopulation[j+1] = temp1;\n\t\t\t\t}//end if\n\n\t\t\t}//end j for\n\n\t\t}//end i for\n\t}",
"@Override\n \tpublic void sort() {\n \t\tArrays.sort(data);\n \t}",
"private static void sort(int[] arr) {\n\t\tint lesserIndex=-1;\n\t\tint arrLen = arr.length ; \n\t\tfor(int i=0; i<arrLen; i++){\n\t\t\tif(arr[i]<0){\n\t\t\t\tlesserIndex++; \n\t\t\t\tint tmp = arr[lesserIndex]; \n\t\t\t\tarr[lesserIndex] = arr[i];\n\t\t\t\tarr[i] = tmp; \n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tint negBound = lesserIndex+1;\n\t\tint posIndex = negBound;\n\t\t\n\t\tfor(int negIngex = 0;negIngex<negBound && posIndex<arr.length; negIngex+=2, posIndex+=1){\n\t\t\tint tmp = arr[posIndex]; \n\t\t\tarr[posIndex] = arr[negIngex] ; \n\t\t\tarr[negIngex] = tmp ;\n\t\t\tnegBound++;\n\t\t}\n\t\t\n\t\t\n\t\tfor(int a : arr) {\n\t\t\tSystem.out.print(a);\n\t\t}\n\t\t\n\t}",
"public static void sort(int[] ds){\n\t\tfor(int i = 0, maxi = ds.length - 1; i < maxi; i++){\n\t\t\tint min = i;\n\t\t\tfor(int j = i + 1, maxj = ds.length; j < maxj; j++){\n\t\t\t\tif(ds[min] > ds[j]){\n\t\t\t\t\tmin = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tint t = ds[min];\n\t\t\tds[min] = ds[i];\n\t\t\tds[i] = t;\n\t\t}\n\t}",
"static void sort(int[] a)\n {\n for ( int j = 1; j<a.length; j++)\n {\n int i = j - 1;\n while(i>=0 && a[i]>a[i+1])\n {\n int temp = a[i];\n a[i] = a[i+1];\n a[i+1] = temp;\n i--;\n }\n }\n }",
"@Override\r\n\tpublic void sortASC(int[] array) {\n\t\t\r\n\t\tfor (int i = 0; i < array.length; i++) {\r\n\t\t\tfor (int j = i + 1; j < array.length; j++) {\r\n\t\t\t\t\r\n\t\t\t\tif (array[i] > array[j]) {\r\n\t\t\t\t\tint temp = array[i];\r\n\t\t\t\t\tarray[i] = array[j];\r\n\t\t\t\t\tarray[j] = temp;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}",
"@Override\n public void sort(int[] array) {\n for (int i = 0; i < array.length - 1; ++i) {\n for (int j = i + 1; j < array.length; ++j) {\n if (array[i] > array[j]) {\n int tmp = array[i];\n array[i] = array[j];\n array[j] = tmp;\n }\n }\n }\n }",
"@Override\r\n\tpublic void sortDESC(int[] array) {\n\t\tfor (int i = 0; i < array.length; i++) {\r\n\t\t\tfor (int j = i + 1; j < array.length; j++) {\r\n\t\t\t\t\r\n\t\t\t\tif (array[i] < array[j]) {\r\n\t\t\t\t\tint temp = array[i];\r\n\t\t\t\t\tarray[i] = array[j];\r\n\t\t\t\t\tarray[j] = temp;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic void sort() {\r\n\t\tint minpos;\r\n\t\tfor (int i = 0; i < elements.length-1; i++) {\r\n\t\t\tminpos=AuxMethods.minPos(elements, i);\r\n\t\t\telements=AuxMethods.swapElements(elements, i, minpos);\r\n\t\t\t\r\n\t\t}\r\n\t}",
"public static void sort (int[] data)\n {\n \t\n \tfor(int i = 0; i < data.length-1; i++)\n \t{\n \t\tint max = data[i];\n \t\tint indexOfMax = i;\n \t\t\n \t\tfor(int j = i + 1; j < data.length; j++)\n \t\t{\n \t\t\tif(data[j] > max)\n \t\t\t{\n \t\t\t\tmax = data[j];\n \t\t\t\tindexOfMax = j;\n \t\t\t}\n \t\t}\n \t\t\n \t\tdata[indexOfMax] = data[i];\n \t\tdata[i] = max;\n \t}\n \t\n // Your TA will help you write selection sort in lab. \n }",
"void sort(double arr[], long start, long end) \n { \n double biggest = 0, temp;\n int biggestIndex = 0;\n for(int j = 0; j > arr.length+1; j++){\n for(int i = 0; i < arr.length-j; i++){\n if(arr[i] > biggest){\n biggest = arr[i];\n biggestIndex = i;\n }\n }\n temp = arr[arr.length-1];\n arr[arr.length-1] = biggest;\n arr[biggestIndex] = temp;\n biggest = 0;\n biggestIndex = 0;\n }\n }",
"@Override\n public int[] sort(int[] array) {\n\n int n = array.length;\n\n for (int i = 1; i <= n - 1; i++) {\n int j = i - 1;\n\n while (j >= 0 && array[j] > array[j + 1]) {\n swap(array, j, j + 1);\n j--;\n }\n }\n\n return array;\n }",
"private static void sort2(int[] a) {\n for(int i=0; i<a.length; i++){\n //find smallest from i to end \n int minIndex=i;\n for(int j=i ; j<a.length; j++)\n if(a[j]<a[minIndex])\n minIndex=j;\n //swap\n int t = a[i];\n a[i] = a[minIndex];\n a[minIndex] = t;\n }\n }",
"public void sort(int array[]){\n for(int i=1;i < array.length;i++){\n int j=i-1;\n int cur=i;\n while(array[cur] < array[j] && j >=0 ){\n swap(array,cur,j);\n cur--;\n j--;\n }\n\n }\n }",
"public static void sort(int[] arr){\n\t\tint temp;\n\t\tfor(int i=0; i<arr.length; i++){\n\t\t\tfor(int j=1; j<arr.length-i; j++)\n\t\t\tif(arr[j-1] > arr[j]){\n\t\t\t\ttemp = arr[j-1];\n\t\t\t\tarr[j-1] = arr[j];\n\t\t\t\tarr[j] = temp;\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"public void oldSort()\n\t{\n\t\tfor (int index = 0; index < arraySize; index++) {\n\t\t\tfor (int secondIndex = index + 1; secondIndex < arraySize; secondIndex++) {\n\t\t\t\tint temp = 0;\n\t\t\t\tif (array[index] > array[secondIndex]) {\n\t\t\t\t\ttemp = array[index];\n\t\t\t\t\tarray[index] = array[secondIndex];\n\t\t\t\t\tarray[secondIndex] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public void sort(int[] a) {\n\t\tint n = a.length;\n\t\tint temp;\n\t\tfor (int gap = n / 2; gap > 0; gap /= 2) {\n\t\t\tfor (int i = gap; i < n; i++) {\n\t\t\t\tfor (int j = i - gap; j >= 0; j -= gap) {\n\t\t\t\t ++totalValCmp;\n\t\t\t\t if (a[j] > a[j + gap]) {\n\t\t\t\t\t temp = a[j];\n\t\t\t\t\t a[j] = a[j + gap];\n\t\t\t\t\t a[j + gap] = temp;\n\t\t\t\t\t ++totalswaps;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void sort(int[] numbers) {\n\n\t\tfor (int i = 0; i < numbers.length - 1; i++) {\n\t\t\t\n\t\t\tint minimumIndex = i;\n\t\t\tfor (int j = i + 1; j < numbers.length; j++) {\n\t\t\t\t\n\t\t\t\tif (numbers[j] < numbers[minimumIndex]) {\n\t\t\t\t\tminimumIndex = j;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint temp = numbers[i];\n\t\t\tnumbers[i] = numbers[minimumIndex];\n\t\t\tnumbers[minimumIndex] = temp;\n\t\t}\n\t}",
"@Override\n\tpublic T[] sort(T[] input) {\n\t\tfor(int i = 1; i < input.length; i++){\n\t\t\t//compare with the previous one, if smaller, switch with it.\n\t\t\tfor(int j = i; j > 0 && input[j-1].compareTo( input[j]) > 0; j--){\n\t\t\t\t//add the condition input[j-1] > input[j] in the for loop;\n\t\t\t\t//cause if j-1th < jth, j-2th < jth(left part is ordered)\n\t\t\t\tswap(input, j, j-1);\n\t\t\t}\n\t\t}\n\t\treturn input;\n\t}",
"@Override\n public int[] sort(int[] array) {\n\n if (array.length <= 1) return array;\n\n for (int num_sorted = 1; num_sorted < array.length; num_sorted++) {\n\n int check_idx = num_sorted;\n int temp_val;\n\n while (array[check_idx] < array[check_idx - 1]) {\n\n temp_val = array[check_idx];\n array[check_idx] = array[check_idx - 1];\n array[check_idx - 1] = temp_val;\n check_idx --;\n\n if (check_idx == 0) break;\n\n }\n\n }\n\n return array;\n }",
"public static void sort(int [] a) {\n for(int i=0; i<a.length;i++){\n for (int j = i+1; j < a.length; j++) {\n int temp=0;\n if(a[i]>a[j]){\n temp=a[j];\n a[j]=a[i];\n a[i]=temp;\n }\n }\n }\n }",
"public void sortAlternate(int[] nums){\n Arrays.sort(nums);\n }",
"public static void sort(int[] array) {\n\t\tint temp;\n\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tfor (int j = 1; j < array.length - i; j++) {\n\t\t\t\tif (array[j - 1] > array[j]) {\n\t\t\t\t\ttemp = array[j - 1];\n\t\t\t\t\tarray[j - 1] = array[j];\n\t\t\t\t\tarray[j] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}",
"private void sort(Comparable[] array) {\n Comparable[] aux = new Comparable[array.length];\n sort(array, aux, 0, array.length - 1);\n }",
"public void sort() {\n\t\tdivider(0, array.size() - 1);\n\t}",
"public static void sort(int[] array) {\n for (int i = 0; i < array.length - 1; i++) {\n for (int j = i + 1; j < array.length; j++) {\n if (array[j] < array[i]) {\n swap(array, i, j);\n }\n }\n\n }\n\n }",
"public void sort(Element[] array, int low, int high, int digit) {\n for (int i = low; i <= high; i++) {\n for (int j = i; j > low && less(array[j].value, array[j - 1].value, digit); j--) {\n ArrayUtil.exchange(array, j, j - 1);\n }\n }\n }",
"private void sortArray(int[] myArray) {\n\t\t// Selection sort\n\t\tint n = myArray.length;\n\t\tint temp = 0;\n\t\t\n\t\tfor(int i=0; i<n-1; i++) {\n\t\t\t\n\t\t\tint min = i;\n\t\t\t\n\t\t\tfor(int j=n-1; j>i; j--) {\n\t\t\t\tif( myArray[j] < myArray[min] ) {\n\t\t\t\t\tmin = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif( min != i ) {\n\t\t\t\ttemp = myArray[i];\n\t\t\t\tmyArray[i] = myArray[min];\n\t\t\t\tmyArray[min] = temp;\n\t\t\t}\n\t\t}\n\t}",
"public static void sort(int[] vals)\n\t{\n\t\tint sortedIndex = 0;\n\t\twhile (sortedIndex < vals.length - 1)\n\t\t{\n\t\t\tif (vals[sortedIndex] > vals[sortedIndex + 1])\n\t\t\t{\n\t\t\t\tswap(vals, sortedIndex, sortedIndex + 1);\n\t\t\t\tint k = sortedIndex - 1;\n\t\t\t\twhile (vals[k] > vals[k + 1] && k >= 0)\n\t\t\t\t{\n\t\t\t\t\tswap(vals, k, k + 1);\n\t\t\t\t\tk--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsortedIndex++;\n\t\t}\n\t}",
"public static int[] sort(int[] array) {\n\t\tfor(int i = 1; i < array.length; ++i) {\n\t\t\t//swap\n\t\t\tint j = i;\n\t\t\twhile ((j > 0) && (array[j] < array[j - 1])) {\n\t\t\t\tint n = array[j - 1];\n\t\t\t\tarray[j - 1] = array[j];\n\t\t\t\tarray[j] = n;\n\t\t\t\t--j;\n\t\t\t}\n\t\t}\n\t\treturn array;\n\t}",
"private static void sort(int[] seq) {\n\t\tfor (int i = 0; i < seq.length; i++) {\n\n\t\t\tfor (int j = i; j < seq.length; j++) {\n\n\t\t\t\tif (seq[i] > seq[j]) {\n int temp = seq[i];\n seq[i] = seq[j];\n seq[j] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t@Override\n\tpublic void sort() {\n\t\t\n\t\t// create maxHeap\n\t\tHeap<E> maxHeap = new MaxHeap<E>(arr);\n\t\t\n\t\telapsedTime = System.nanoTime(); // get time of start\n\t\t\n\t\tfor (int i = length - 1; i > 0; i--) {\n\n\t\t\tmaxHeap.swap(arr, 0, i);\n\t\t\tmaxHeap.heapSize--;\n\t\t\t((MaxHeap) maxHeap).maxHeapify(arr, 0);\n\n\t\t}\n\t\t\n\t\telapsedTime = System.nanoTime() - elapsedTime; // get elapsed time\n\t\t\n\t\tprint(); // print sorted array\n\t\tprintElapsedTime(); // print elapsed time\n\t\t\n\t\t\n\t}",
"public static void sort(Comparable[] a) {\n int minPos = 0;\n for (int i = 1; i < a.length; i++) {\n if (less(a[i], a[minPos])) minPos = i;\n }\n if (minPos != 0) exch(a, 0, minPos);\n\n // Modify i from 0 to 1, this can avoid index out of bound error\n for (int i = 1; i < a.length; i++) {\n for (int j = i; less(a[j], a[j - 1]); j--) {\n exch(a, j, j - 1);\n }\n }\n }",
"public int[] sort(int[] a) {\n\t\t// Outer loop that will progress the marker one step ahead\n\t\tfor (int i = 1; i < a.length; i++) {\n\t\t\t// Get the current element which we need to compare with the remaining i-1\n\t\t\t// elements of the array\n\t\t\tint key = a[i];\n\t\t\t// Select the j index which checks the 1-1 elements\n\t\t\tint j = i - 1;\n\t\t\t// Loop for these i-1 elements and compare each element with the key in the\n\t\t\t// reverse order\n\t\t\twhile (j >= 0 && a[j] > key) {\n\t\t\t\t// Move the element to the left\n\t\t\t\ta[j + 1] = a[j];\n\t\t\t\t// Decrement counter by 1\n\t\t\t\tj--;\n\t\t\t}\n\t\t\t// Now put the key in its appropriate position\n\t\t\ta[j + 1] = key;\n\t\t}\n\t\treturn a;\n\t}",
"public static void sort(int[] arr){\t\n\t\t\n\t\tPriorityQueue queue = new PriorityQueue(arr.length);\n\t\tfor(int i = 0; i < arr.length; i++) {\n\t\t\t\n\t\t\tqueue.insert(arr[i]);\n\t\t}\n\t\tfor(int i = 0; i < arr.length; i++) {\n\t\t\tarr[i] = queue.removeMin();\n\t\t}\n\t}",
"public static void sort(int[] arr){\n\n for(int i=1;i<arr.length;i++){\n int current=arr[i];\n int j=i-1;\n\n while(j>=0 && arr[j]>current){\n arr[j+1]=arr[j];\n j--;\n }\n\n arr[j+1]=current;\n }\n\n\n\n }",
"public void sort(){\n startTime = System.nanoTime();\n int smallest = array[0]; \n int smallestIndex = 0;\n\n for (int i = 0; i < array.length - 1; i++){\n smallest = array[i];\n smallestIndex = i;\n //find smallest number \n for (int j = i; j < array.length; j++){\n if (array[j] < smallest) {\n smallest = array[j];\n smallestIndex = j;\n }\n }\n //swap smallest to the front\n swap(array, i, smallestIndex);\n }\n endTime = System.nanoTime();\n }",
"@Override\n\tpublic int[] sort(int[] numbers) {\n\t\treturn null;\n\t}",
"protected Individual[] sortIndsArr(Individual[] ar)\n\t\t{\tint num_ar = ar.length;\n\t\t\tIndividual temp;\n\t\t\tfor(int j=0;j<num_ar-1;j++)\n\t\t\t\tfor(int i=0;i<num_ar-1-j;i++)\n\t\t\t\t\tif(ar[i].getFitness()<ar[i+1].getFitness()) {\n\t\t\t\t\t\ttemp\t= ar[i+1];\n\t\t\t\t\t\tar[i+1]\t= ar[i];\n\t\t\t\t\t\tar[i]\t= temp;\n\t\t\t\t\t}\n\t\t\treturn ar;\n\t\t}",
"public static int[] gnomeSort(int[] arr){\n int i = 1, j = 2;\n while (i < arr.length){\n if (arr[i - 1] < arr[i]){\n i = j;\n j++;\n } else {\n int tmp = arr[i - 1];\n arr[i - 1] = arr[i];\n arr[i] = tmp;\n i--;\n if (i == 0){\n i = j;\n j++;\n }\n }\n }\n return arr;\n }",
"public static void sortDesc(long[]arr)\n\t{\n\t\tfor(int i=0;i<arr.length-1;++i)\n\t\t{\n\t\t\tfor(int j=i+1;j<arr.length;++j)\n\t\t\t{\n\t\t\t\tif(arr[j]>arr[i])\n\t\t\t\t{\n\t\t\t\t\tlong temp=arr[i];\n\t\t\t\t\tarr[i]=arr[j];\n\t\t\t\t\tarr[j]=temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private static int[] sortedArray(int[] randomArray) {\n\t\tint temp = 0;\r\n\t\tfor (int i = 0; i < randomArray.length; i++) {\r\n\t\t\tfor (int j = 0; j < i; j++) {\r\n\t\t\t\tif (randomArray[i] > randomArray[j]) {\r\n\t\t\t\t\ttemp = randomArray[i];\r\n\t\t\t\t\trandomArray[i] = randomArray[j];\r\n\t\t\t\t\trandomArray[j] = temp;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn randomArray;\r\n\t}",
"public void sort(int[] arr) {\n if (arr == null || arr.length == 0) return;\n int n = arr.length;\n for (int i = 0; i < n; ++i) {\n int minIdx = i;\n for (int j = i+1; j < n; ++j)\n if (arr[j] < arr[minIdx])\n minIdx = j;\n swap(arr, i, minIdx);\n }\n }",
"public static void sort(int[] arr) {\n // Base Case\n if (arr.length == 1) return;\n\n // Splitting the array\n int midpoint = arr.length / 2;\n int[] left_arr = Arrays.copyOfRange(arr, 0, midpoint);\n int[] right_arr = Arrays.copyOfRange(arr, midpoint, arr.length);\n\n // Sorting the subarrays \n sort(left_arr);\n sort(right_arr);\n\n // Combining the subarrays\n int left_pointer = 0;\n int right_pointer = 0;\n /** \n * Check which array has smaller value then \n * assign it to sorted array\n */ \n while (left_pointer + right_pointer < arr.length) {\n // Left array has been traversed\n if (left_pointer >= left_arr.length) {\n arr[left_pointer + right_pointer] \n = right_arr[right_pointer];\n right_pointer++;\n }\n // Right array has been traversed\n else if (right_pointer >= right_arr.length) {\n arr[left_pointer + right_pointer]\n = left_arr[left_pointer];\n left_pointer++;\n }\n // Both arrays still have values.\n else {\n // Left array has smaller or equal value\n if (left_arr[left_pointer] <= right_arr[right_pointer]) { \n arr[left_pointer + right_pointer]\n = left_arr[left_pointer];\n left_pointer++;\n }\n // Right array has smaller value\n else {\n arr[left_pointer + right_pointer]\n = right_arr[right_pointer];\n right_pointer++;\n }\n }\n }\n // Array is sorted. Replace given array.\n }",
"void sort();",
"void sort();",
"public void sort() {\n\n // Fill in the blank here.\n\tfor(int i = 0; i < size; i++){\n\t\tint currentLowest, cLIndex, temp;\n\t\tcurrentLowest = elements[i];\n\t\tcLIndex = i; \n\t\tfor(int c = i+1; c < size; c++){\n\t\t\tif(currentLowest > elements[c]){\n\t\t\t\tcurrentLowest = elements[c];\n\t\t\t\tcLIndex = c;\n\t\t\t} \n\t\t}\n\t\ttemp = elements[i];\n\t\telements[i] = elements[cLIndex];\n\t\telements[cLIndex] = temp;\n\t\t\n\t}\n System.out.println(\"Sorting...\");\n }",
"private void sort(int[] array, int start, int end){\n //base condition\n if(start >= end)\n return;\n int boundary = partition(array, start, end);\n sort(array, start, boundary - 1);\n sort(array, boundary + 1, end);\n }",
"void sort (int [] items) {\r\n\tint length = items.length;\r\n\tfor (int gap=length/2; gap>0; gap/=2) {\r\n\t\tfor (int i=gap; i<length; i++) {\r\n\t\t\tfor (int j=i-gap; j>=0; j-=gap) {\r\n\t\t \t\tif (items [j] <= items [j + gap]) {\r\n\t\t\t\t\tint swap = items [j];\r\n\t\t\t\t\titems [j] = items [j + gap];\r\n\t\t\t\t\titems [j + gap] = swap;\r\n\t\t \t\t}\r\n\t \t}\r\n\t }\r\n\t}\r\n}",
"private static void generateWorstUnsortArray(int[] array) {\n\n if (array.length == 2) {\n\n int swap = array[0];\n array[0] = array[1];\n array[1] = swap;\n } else if (array.length > 2) {\n\n int i, j;\n int m = (array.length + 1) / 2;\n int left[] = new int[m];\n int right[] = new int[array.length - m];\n\n for (i = 0, j = 0; i < array.length; i = i + 2, j++) {\n\n left[j] = array[i];\n }\n\n for (i = 1, j = 0; i < array.length; i= i + 2, j++) {\n\n right[j] = array[i];\n }\n\n generateWorstUnsortArray(left);\n generateWorstUnsortArray(right);\n merge(array, left, right);\n }\n }",
"public static void main(String[] args) {\r\n\t\tint arr[] = {1,0,5,6,3,2,3,7,9,8,4};\r\n\t\tint temp;\r\n\t\t\r\n\t\tfor(int i = 0; i < 10; i ++) {\r\n\t\t\tfor(int j = 0; j < 10 - i; j ++) {\r\n\t\t\t\tif(arr[j] > arr[j+1]){\r\n\t\t\t\t\ttemp = arr[j+1];\r\n\t\t\t\t\tarr[j+1] = arr[j];\r\n\t\t\t\t\tarr[j] = temp;\r\n\t\t\t\t}\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < 11; i ++) {\r\n\t\t\tSystem.out.println(arr[i]);\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void sort(int[] array) {\n\n\t}",
"public void sort() {\n\tqsort(a,0,a.length-1);\n }",
"public static int[] sort(int[] array) {\n // An empty array or array with only a single value can't be sorted\n if (array.length < 2) {\n return array;\n }\n\n for (int i = 1; i < array.length; i++) {\n int currentValue = array[i];\n int j = i - 1;\n while (j >= 0 && array[j] > currentValue) {\n array[j + 1] = array[j];\n j--;\n }\n array[j + 1] = currentValue;\n }\n\n return array;\n }",
"public static void sort(int[][] array){\n for(int i = 0; i<array.length; i++){\n int[] small = array[i];\n int smallestIndex = i;\n for(int j = i+1; j<array.length; j++){\n small=array[j];\n smallestIndex=j;\n \n }\n array[i]= small;\n array[i]=array[smallestIndex];\n }\n }",
"public int[] sort(int[] data) {\n int[] sorted = new int[data.length];\n int tempstrt, tempend;\n for (int i = 0; i < data.length; i = i + 2) {\n for (int j = i + 2; j < data.length; j = j + 2) {\n if (data[i] > data[j]) {\n //swap start pos\n tempstrt = data[i];\n data[i] = data[j];\n data[j] = tempstrt;\n //swwap end pos\n tempend = data[i + 1];\n data[i + 1] = data[j + 1];\n data[j + 1] = tempend;\n }\n\n }\n }\n\n return data;\n }",
"public void sort() {\n ListNode start = head;\n ListNode position1;\n ListNode position2;\n\n // Going through each element of the array from the second element to the end\n while (start.next != null) {\n start = start.next;\n position1 = start;\n position2 = position1.previous;\n // Checks if previous is null and keeps swapping elements backwards till there\n // is an element that is bigger than the original element\n while (position2 != null && (position1.data < position2.data)) {\n swap(position1, position2);\n numberComparisons++;\n position1 = position2;\n position2 = position1.previous;\n }\n }\n }",
"public void selectionSort(int [] array) {\n\t\t\n\t\t//10,3,6,13,2,1\n\t\t//1,3,6,13,2,10 \n\t\t//1,2,6,13,3,10\n\t\t//1,2,3,13,6,10\n\t\t//1,2,3,6,13,10\n\t\t//1,2,3,6,10,13\n\t\t\n\t\tint minValue = 0;\n\t\tint minIndex = 0; \n\t\t\n\t\tfor(int i=0; i<array.length-1; i++) {\n\t\t\t\n\t\t\tminValue = array[i];\n\t\t\t\n\t\t\tfor(int j=i; j<array.length; j++) {\n\t\t\t\t\n\t\t\t\tif(array[j]<minValue) {\n\t\t\t\t\t\n\t\t\t\t\tminValue = array[j];\n\t\t\t\t\tminIndex = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tint temp = array[i];\n\t\t\tarray[i] = array[minIndex];\n\t\t\tarray[minIndex] = temp;\n\t\t\tSystem.out.println(Arrays.toString(array));\n\t\t}\n\t}",
"public void jsort() {\n\tArrays.sort(data);\n }",
"public static void sort(int[] a) {\n final int length = a.length;\n\n // begin from the first non-leaf node\n for (int i = length / 2 - 1; i >= 0; i--) {\n buildHeap(a, i, length);\n }\n // output: replace the root of max heap with the tail value of list\n // then: build the heap again\n for (int i = length - 1; i > 0; i--) {\n Swapper.swap(a, 0, i);\n buildHeap(a, 0, i - 1);\n }\n }",
"@Override\n\tpublic int[] sort(int[] arr) {\n\t\tif(arr == null) \n\t\t\tthrow new Error(\"################ Array is null ################\");\n\t\tint left = 0;\n\t\tint right = arr.length-1;\n\t\treturn ( right <= 0)? arr : split(left, right, arr);\n\t}",
"public abstract void sort(int[] array);",
"void sort(int arr[])\n {\n int n = arr.length;\n for (int i=1; i<n; i++)\n {\n int key = arr[i];\n int j = i-1;\n \n while (j>=0 && arr[j] > key)\n {\n arr[j+1] = arr[j];\n j--;\n }\n arr[j+1] = key;\n }\n }",
"public static void main (String[] args) {\n \n double[] arr = { 3.4, 2.3, 5.7, 6.7, 9.0, 2.2, 2.1, 5.0, 6.5, 3.7, 4.6, 6.0, 7.0, 7.1, 0.3 };\n System.out.println(Arrays.toString(arr));\n Arrays.sort(arr);\n System.out.println(Arrays.toString(arr));\n }",
"public static void sort(int[] grades){\n for (int i=0; i<=grades.length-1;i++){\n //increase the indexing variable each pass through the array\n int index=i; //define an indexing variable\n for(int j=i+1;j<grades.length;j++){\n //step through all of the remaining elements of the array\n if(grades[j]<grades[index]){\n //determine if the current array value (j) is less than that of the index\n index=j; //if so, this is the smallest array location and replace index with j\n }\n }\n int smallnumber=grades[index];//after looping through the remaining elements, index is the smallest location, put value into temp. variable\n grades[index]=grades[i];//replace whatever is currently in the index spot with whatever is in the lowest element spot (i)\n grades[i]=smallnumber; //put the smallest number into the smallest index spot, effectively sorting this iteration of the array. \n }\n }",
"public static void sortArray(int[] array)\r\n {\r\n //create boolean variable to compare array values\r\n boolean swapped;\r\n //loop through the entire array\r\n for (int n=0; n < array.length; ++n)\r\n {\r\n do\r\n {\r\n //set boolean variable swapped to false\r\n swapped = false;\r\n \r\n //nested loop compares each pair of adjacent elements starting at array[n]\r\n for (int x = n + 1; x < array.length; x++) \r\n {\r\n //if the element in the array is greater than the following element\r\n if (array[n] > array[x]) \r\n {\r\n //initialize a temp variable to hold an array element value\r\n int temp;\r\n \r\n //swap the elements\r\n temp = array[n];\r\n array[n] = array[x];\r\n array[x] = temp;\r\n //set boolean variable swapped to true\r\n swapped = true;\r\n }\r\n }\r\n }while (swapped == true);\r\n }\r\n\r\n \r\n }",
"static int[] Sort(int array[])\n\t{\n\t\t//Check to see if there is one or more numbers in the array.\n\t\tif(array.length > 1)\n\t\t//If there is more than one number, begin the process of splitting the array in half.\n\t\t{\n\t\t\tint sparray1 = array.length/2;\n\t\t\tint sparray2 = sparray1;\n\t\t\t\tif((array.length % 2) == 1)\n\t\t\t\t\tsparray2 += 1;\n\t\t//Initialize the new split sub-arrays and copy for sorting.\n\t\t\tint split1[] = new int[sparray1];\n\t\t\tint split2[] = new int[sparray2];\n\t\t\tfor(int i = 0; i < sparray1; i++)\n\t\t\t\tsplit1[i] = array[i];\n\t\t\tfor(int i = sparray1; i < sparray1 + sparray2; i++)\n\t\t\t\tsplit2[i - sparray1] = array[i];\n\t\t//Send sub-arrays back through the methods to be sorted.\n\t\t\tsplit1 = Sort(split1);\n\t\t\tsplit2 = Sort(split2);\n\t\t//Compare the numbers in the sub-arrays and sort them from small to large.\n\t\t\tint i = 0, j = 0, k = 0;\n\t\t\twhile(split1.length != j && split2.length != k)\n\t\t\t{\n\t\t\t\tif(split1[j] < split2[k])\n\t\t\t\t{\n\t\t\t\t\tarray[i] = split1[j];\n\t\t\t\t\ti++;\n\t\t\t\t\tj++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tarray[i] = split2[k];\n\t\t\t\t\ti++;\n\t\t\t\t\tk++;\n\t\t\t\t}\n\t\t\t}\n\t\t//Recombine the sorted sub-arrays and return the completed sorted array. \n\t\t\twhile(split1.length != j)\n\t\t\t{\n\t\t\t\tarray[i] = split1[j];\n\t\t\t\ti++;\n\t\t\t\tj++;\n\t\t\t}\n\t\t\twhile(split2.length != k)\n\t\t\t{\n\t\t\t\tarray[i] = split2[k];\n\t\t\t\ti++;\n\t\t\t\tk++;\n\t\t\t}\n\t\t}\n\t\treturn array;\n\t}",
"public void sort(int[] values) {\n if (values == null || values.length == 0){\n return;\n }\n // naming this array as \"values\"\n this.numbers = values; \n // integer \"number\" now represents the size of above array\n number = values.length; \n // calling quicksort method and inputting the 0th and last index number\n // these will be inputted into quicksort method a low and high respectively\n quicksort(0, number - 1); \n }",
"public static Comparable[] selectionSort(Comparable[] array) {\n int indexSorted = 0;\r\n //loops once for every array member, although value itself is unused\r\n for (Comparable member : array) {\r\n //remembers the index of the next ,owest member, by default the next index\r\n int low = indexSorted;\r\n \r\n //loops over every array member and comares with current lowest value\r\n for(int j = indexSorted; j < array.length; j++) {\r\n //if a lower value than low is found, set low to index of lower value\r\n if (array[j].compareTo(array[low]) < 0) {\r\n low = j;\r\n }\r\n }\r\n \r\n //if an index other than the next one is the lowest, swap the values of the two indexs\r\n if (low != indexSorted) {\r\n Comparable toShift = array[indexSorted];\r\n array[indexSorted] = array[low];\r\n array[low] = toShift;\r\n }\r\n \r\n //adds one index to the amount of sorted index\r\n indexSorted++;\r\n }\r\n \r\n return array;\r\n }",
"public double[] sort(double[] data) {\r\n for (int pass = 1; pass < data.length; pass++) {\r\n for (int element=0;element<data.length-1;element++) {\r\n if (data[element] > data[element + 1]){\r\n double hold = data[element];\r\n this.countOp();\r\n data[element] = data[element + 1];\r\n this.countOp();\r\n data[element + 1] = hold;\r\n this.countOp();\r\n }\r\n }\r\n }\r\n return data;\r\n }",
"public static void main(String[] args) {\n\t\t\n\t\tint [] arr= {3,43,2,320,143,4};\n\t\t\n\t\tint temp=0;\n\t\tint lenth=arr.length;\n\t\t\n\t\tfor(int i=0;i<lenth;i++) {\n\t\t\t\n\t\t\tfor(int j=1;j<(lenth-i);j++)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tif(arr[j-1]>arr[j]) {\n\t\t\t\t\ttemp=arr[j-1];\n\t\t\t\t\tarr[j-1]=arr[j];\n\t\t\t\t\t\t\tarr[j]=temp;\n\t\t\t\t\tSystem.out.println(arr[j]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t\t\t\n\t\t\n\n\t}",
"public <T extends Comparable<? super T>> void sort (T[] a) {\n int n = a.length;\n for (int i = 0; i< n - 1; i++) {\n for (int j = 0; j < n -1 - i; j++) {\n if (a[j+1].compareTo(a[j]) < 0) \n {\n T tmp = a[j]; \n a[j] = a[j+1];\n a[j+1] = tmp;\n }\n }\n }\n }",
"private void mergesort(int[] array) {\n\t\t\n\t}",
"public void selectionSort(){\n for(int x=0; x < arraySize; x++){\n int minimum = x;\n for(int y = x; y < arraySize; y++){\n // Change to < for descending sort\n if(theArray[minimum] > theArray[y]){\n minimum = y;\n }\n }\n swapValues(x, minimum);\n printHorizontalArray(x, -1);\n }\n }",
"void sortV();",
"public static void main(String[] args) {\n\t\tint temp;\r\n\t\tint[] num= {2,5,4,1,3,6};\r\n\t\t/*Arrays.sort(num);\r\n\t\tSystem.out.println(Arrays.toString(num));*/\r\n\t\tfor(int i=0;i<num.length;i++)\r\n\t\t{\r\n\t\t\tfor(int j=i+1;j<num.length;j++)\r\n\t\t\t{\r\n\t\t\t\tif(num[i] > num[j])\r\n\t\t\t\t{\r\n\t\t\t\t\ttemp=num[i];\r\n\t\t\t\t\tnum[i]=num[j];\r\n\t\t\t\t\tnum[j]=temp;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor(int i=0;i<num.length;i++)\r\n\t\t{\r\n\t\t\tSystem.out.println(num[i]);\r\n\t\t}\r\n\t}",
"public static void sort(Comparable[] a){\n for(int i=1;i<a.length;i++){\n // Insert a[i] among a[i-1],a[i-2],a[i-3]...\n for (int j=i;j>0&&less(a[j],a[j-1]);j--){\n exch(a,j,j-1);\n }\n }\n }",
"int main()\n{\n int i,n;\n float arr [100];\n cin >> n;\n \n for(i=0;i<n;++i)\n {\n cin >> arr[i];\n }\n \n for(i=1;i<n;++i)\n {\n if(arr[0]<arr[i])\n arr[0]=arr[i];\n }\n cout<< arr[0];\n}",
"@Override\n public void sort() {\n for (int i = 0; i < size; i++) {\n for (int j = i + 1; j < size; j++) {\n if (((Comparable) data[i]).compareTo(data[j]) > 0) {\n E c = data[i];\n data[i] = data[j];\n data[j] = c;\n\n }\n }\n }\n }",
"private static void sort(long[] list) {\n\t\tint start = 0, limit = list.length;\n\t\t\n\t\tlong temp;\n\t\tint current;\n\t\tint lowestindex;\n\n\t\twhile (start < limit) {\n\t\t\tlowestindex = start;\n\t\t\tfor (current = start; current < limit; current++)\n\t\t\t\tif (list[current] < list[lowestindex])\n\t\t\t\t\tlowestindex = current;\n\t\t\t//swap\n\t\t\ttemp = list[start];\n\t\t\tlist[start] = list[lowestindex];\n\t\t\tlist[lowestindex] = temp;\n\t\t\tstart++;\n\t\t}\n\t}",
"public static int[] sort( int[] arr ) \n {\n\tif (arr.length <= 1){\n\t return arr;\n\t}\n\n\t int m = arr.length;\n\t int[] a = new int[arr.length/2];\n\t int[] b = new int [arr.length-a.length];\t \n\t for (int i = 0; i < a.length; i++) a[i] = arr[i];\n\t for (int i = 0; i < b.length; i++) b[i] = arr[i+m/2];\n\n\t return merge(sort(a),sort(b));\t\n\n }",
"public void sort(E[] array) {\r\n\t\tif (array == null)\r\n\t\t\treturn;\r\n\r\n\t\tc = array;\r\n\r\n\t\tint left = (c.length / 2) + 1;\r\n\t\tint right = c.length;\r\n\r\n\t\twhile (left > 1) {\r\n\t\t\tleft--;\r\n\t\t\theapify(left, right);\r\n\t\t}\r\n\r\n\t\twhile (right > 1) {\r\n\t\t\tswitchElements(right - 1, left - 1);\r\n\t\t\tright--;\r\n\t\t\theapify(left, right);\r\n\t\t}\r\n\t}",
"public static int[] sort(int[] data, int n) {\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint min = i;\n\t\t\tfor (int j = i + 1; j < n; j++) {\n\t\t\t\tif (data[j] <= data[min]) {\n\t\t\t\t\tmin = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tUtil.swap(data, i, min);\n\n\t\t}\n\t\treturn data;\n\t}",
"private T[] sortArray() {\n \n int middleIndex = elements.length / 2;\n\n T[] sArr1 = Arrays.copyOfRange(elements, 0, middleIndex);\n T[] sArr2 = Arrays.copyOfRange(elements, middleIndex, elements.length);\n\n Arrays.sort(sArr1);\n Arrays.sort(sArr2);\n\n return merge(sArr1, sArr2);\n }",
"public static int[] selectionSort(int[] array){\n\t\tint length=array.length;\n\t\tfor(int i=0;i<length-1;i++){\n\t\t\tint index=i;\n\t\t\tfor(int j=i+1;j<length;j++)\n\t\t\t\tif(array[j]<array[index])\n\t\t\t\t\tindex=j;\n\t\t\tint smallestNumber=array[index];\n\t\t\tarray[index]=array[i];\n\t\t\tarray[i]=smallestNumber;\n\t\t}\n\t\treturn array;\n\t}",
"static void SelectionSort(int[] arr){\n int minIndex;\n for(int i = 0; i<arr.length-1; i++){\n minIndex = i;\n for(int j = i+1; j<arr.length;j++){\n if(arr[minIndex]>arr[j]){\n minIndex = j;\n }\n }\n if(minIndex>i){\n Swap(arr,i,minIndex);\n }\n }\n }",
"private void sort()\n {\n // This implements Shell sort.\n // Unfortunately we cannot use the sorting functions from the library\n // (e.g. java.util.Arrays.sort), since the ones that work on int\n // arrays do not accept a comparison function, but only allow\n // sorting into natural order.\n int jump = length;\n boolean done;\n \n while( jump>1 ){\n jump /= 2;\n \n do {\n done = true;\n \n for( int j = 0; j<(length-jump); j++ ){\n int i = j + jump;\n \n if( !areCorrectlyOrdered( indices[j], indices[i] ) ){\n // Things are in the wrong order, swap them and step back.\n int tmp = indices[i];\n indices[i] = indices[j];\n indices[j] = tmp;\n done = false;\n }\n }\n } while( !done );\n }\n \n // TODO: integrate this with the stuff above.\n for( int i=1; i<length; i++ ){\n commonality[i] = commonLength( indices[i-1], indices[i] );\n }\n commonality[0] = -1;\n }",
"public static void sortAscending(int[] array) {\n int small, temp; \n for (int start = 0; start < array.length; start++) {\n small = start;\n for (int i = start + 1; i < array.length; i++) {\n if (array[i] < array[small])\n small = i;\n }\n temp = array[start];\n array[start] = array[small];\n array[small] = temp;\n }\n }",
"public int [] sort(int [] v) {\n\t\t\n\t\tfor (int i=0; i < v.length; i++) {\n\t\t\tfor(int j=i+1; j < v.length && j > 0; j--) {\n\t\t\t\tif(v[j] < v[j-1]) {\n\t\t\t\t\tint aux = v[j-1];\n\t\t\t\t\tv[j-1] = v[j];\n\t\t\t\t\tv[j] = aux;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn v;\n\t}",
"public void sortHighScores(){\n for(int i=0; i<MAX_SCORES;i++){\n long score = highScores[i];\n String name= names[i];\n int j;\n for(j = i-1; j>= 0 && highScores[j] < score; j--){\n highScores[j+1] = highScores[j];\n names[j+1] = names[j];\n }\n highScores[j+1] = score;\n names[j+1] = name;\n }\n }",
"public void sort(E[] array) {\n\t\t\n Qsort(array,0,array.length-1);\n\t}",
"@Override\r\n\tpublic void sort(int[] demo) {\n\t\tint temp;\r\n\t\tfor(int gap = 5;gap > 0;gap /= 2){\r\n\t\t\tfor(int i = gap;i < demo.length;i++){\r\n\t\t\t\tfor(int j = i - gap;j >= 0;j -= gap){\r\n\t\t\t\t\tif (demo[j] > demo[j + gap]) {\r\n\t\t\t\t\t\ttemp =demo[j];\r\n\t\t\t\t\t\tdemo[j] =demo[j + gap];\r\n\t\t\t\t\t\tdemo[j + gap] = temp;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(Arrays.toString(demo));\r\n\t}",
"public void sort(int[] a) {\n\t\tqs(a, 0, a.length-1);\n\t}",
"public static void LinearSorting(int[] arr) {\n\t\tfor(int i=0;i<arr.length-1;i++) {\r\n\t\t\tfor(int j=i+1;j<arr.length;j++) {\r\n\t\t\t if(arr[i]>arr[j]) {\r\n\t\t\t\t //Swap elements\r\n\t\t\t\t int temp=arr[i];\r\n\t\t\t\t arr[i]=arr[j];\r\n\t\t\t\t arr[j]=temp;\r\n\t\t\t }\t\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n public int[] sort(int[] array) {\n return mergeSort(array);\n }",
"private static void sort(int[] a) {\n shufle(a);\n // we use quicksort here because there's no need for stability\n sort(a, 0, a.length - 1);\n }",
"public static <Key extends Comparable<Key> > void sort (Key [] a){\n int n=a.length;\n //rearrange the array to a max heap\n for (int k=n/2;k>=1;k--) sink(a,k,n);\n for ( int i=0;i<a.length;i++){\n exch(a,1,n--);\n sink(a,1,n);\n }\n\n }"
]
| [
"0.73147416",
"0.7239536",
"0.71738887",
"0.7165909",
"0.71401626",
"0.71135074",
"0.7113247",
"0.70778924",
"0.70570105",
"0.7052694",
"0.70335054",
"0.70237803",
"0.7019866",
"0.70191246",
"0.69994813",
"0.69969785",
"0.6981612",
"0.6969295",
"0.69640994",
"0.6937186",
"0.6922695",
"0.6917242",
"0.6907934",
"0.6900485",
"0.6894674",
"0.6884633",
"0.6876275",
"0.6874236",
"0.68242437",
"0.6809944",
"0.6805779",
"0.6785206",
"0.6771072",
"0.67648256",
"0.67500436",
"0.67483914",
"0.6743657",
"0.6742428",
"0.67307395",
"0.6727562",
"0.67230934",
"0.67083246",
"0.6707093",
"0.6701752",
"0.66864365",
"0.6686003",
"0.66742253",
"0.6670576",
"0.6670576",
"0.66653985",
"0.66643095",
"0.66483396",
"0.6647278",
"0.66445976",
"0.6633967",
"0.6631654",
"0.6628681",
"0.6624611",
"0.6623773",
"0.6622944",
"0.6617962",
"0.6615891",
"0.6615761",
"0.6601318",
"0.66012305",
"0.65927744",
"0.6588183",
"0.65796685",
"0.6571118",
"0.6560687",
"0.6555579",
"0.65458125",
"0.65446764",
"0.65389746",
"0.6533421",
"0.6532165",
"0.6529585",
"0.6528306",
"0.6525312",
"0.6522312",
"0.6517616",
"0.6516888",
"0.6511609",
"0.6511241",
"0.65069014",
"0.65027976",
"0.64976114",
"0.6495325",
"0.649232",
"0.6492071",
"0.6490664",
"0.6481053",
"0.6477214",
"0.6470766",
"0.64683074",
"0.6464099",
"0.6462115",
"0.6455871",
"0.64506125",
"0.6448734"
]
| 0.7516186 | 0 |
returns the minimum value in the array | int min() {
// added my sort method in the beginning to sort our array
int n = array.length;
int temp = 0;
for (int i = 0; i < n; i++) {
for (int j = 1; j < (n - i); j++) {
if (array[j - 1] > array[j]) {
temp = array[j - 1];
array[j - 1] = array[j];
array[j] = temp;
}
}
}
// finds the first term in the array --> first term should be min if
// sorted
int x = array[0];
return x;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public T findLowest(){\n T lowest = array[0]; \n for (int i=0;i<array.length; i++)\n {\n if (array[i].doubleValue()<lowest.doubleValue())\n {\n lowest = array[i]; \n } \n }\n return lowest;\n }",
"public double min(){\r\n\t\t//variable for min val\r\n\t\tdouble min = this.data[0];\r\n\t\t\r\n\t\tfor (int i = 1; i < this.data.length; i++){\r\n\t\t\t//if the minimum is more than the current index, change min to that value\r\n\t\t\tif (min > this.data[i]){\r\n\t\t\t\tmin = this.data[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\t//return the minimum val\r\n\t\treturn min;\r\n\t}",
"public static double min(double[] array) { \r\n \r\n double minNum = array[0];\r\n for(int i = 0; i < array.length; i++) {\r\n if(minNum > array[i]) {\r\n minNum = array[i];\r\n }\r\n }\r\n return minNum;\r\n }",
"public static double getMin(double[] array)\r\n\t{\r\n\t\tdouble min = Double.POSITIVE_INFINITY;\r\n\t\tfor (int i = 0; i < array.length; i++)\r\n\t\t\tif (min > array[i])\r\n\t\t\t\tmin = array[i];\r\n\t\treturn min;\r\n\t}",
"public static double min(double[] array) {\n\t\tif (array.length==0) return Double.POSITIVE_INFINITY;\n\t\tdouble re = array[0];\n\t\tfor (int i=1; i<array.length; i++)\n\t\t\tre = Math.min(re, array[i]);\n\t\treturn re;\n\t}",
"public static int findMin(){\n int min = array[0];\n for(int x = 1; x<array.length; x++ ){\n if(array[x]<min){\n min=array[x];\n }\n }\n return min;\n}",
"public static float min(float [] array)\r\n\t{\r\n\t\tfloat minValue = array[0];\r\n\t\tfor (int i = 1; i < array.length; i++)\r\n\t\t{\r\n\t\t\tif (array[i] < minValue)\r\n\t\t\t{\r\n\t\t\t\tminValue = array[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn minValue;\r\n\t}",
"public static int getMin(int[] inputArray){\n int minValue = inputArray[0];\n for(int i=1; i<inputArray.length;i++){\n if(inputArray[i] < minValue){\n minValue=inputArray[i];\n }\n }\n return minValue;\n }",
"public static int getMin(int[] array) {\n //TODO: write code here\n int min = array[0];\n for(int a : array) {\n min = a < min ? a : min;\n }\n return min;\n }",
"public int min(int[] array) {\n if (array == null || array.length == 0){\n return 0;\n }\n int min = array[0];\n for(int i = 0; i < array.length; i++){\n if (array[i] < min){\n min = array[i];\n }\n }\n return min;\n }",
"public static int Min(int[] array) {\r\n\t\tint minValue = array[0];\r\n\t\tfor (int i = 1; i < array.length; i++) {\r\n\t\t\tif (array[i] < minValue) {\r\n\t\t\t\tminValue = array[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn minValue;\r\n\t}",
"public long min() {\n\t\tif (!this.isEmpty()) {\n\t\t\tlong result = theElements[0];\n\t\t\tfor (int i=1; i<numElements; i++) {\n\t\t\t\tif (theElements[i] < result) {\n\t\t\t\t\tresult = theElements[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\telse {\n\t\t\tthrow new RuntimeException(\"Attempted to find min of empty array\");\n\t\t}\n\t}",
"public static int min(int[] a){\r\n\t\tint m = a[0];\r\n\t\tfor( int i=1; i<a.length; i++ )\r\n if( m > a[i] ) m = a[i];\r\n\t\treturn m;\r\n\t}",
"public int min()\n\t{\n\t\tif (arraySize > 0)\n\t\t{\n\t\t\tint minNumber = array[0];\n\t\t\tfor (int index = 0; index < arraySize; index++) \n\t\t\t{\n\t\t\t\tif (array[index] < minNumber)\n\t\t\t\t{\n\t\t\t\t\tminNumber = array[index];\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\treturn minNumber;\n\t\t}\n\t\tSystem.out.println(\"Syntax error, array is empty.\");\n\t\treturn -1;\n\n\t}",
"private static int getMin(int[] original) {\n int min =original[0];\n for(int i = 1; i < original.length; i++) {\n if(original[i] < min) min = original[i];\n }\n return min;\n }",
"public static int min(int[] array){\n \n if(array == null){\n \n throw new IllegalArgumentException(\"Array cannot be null\");\n }\n else if(array.length==0){\n throw new IllegalArgumentException(\"Array cannot be empty\");\n }\n \n int min = array[0];\n \n for(int i = 1; i < array.length; i++){\n \n \n if(array[i] < min){\n min = array[i];\n }\n }\n return min;\n }",
"public static double min(double[] array, double min) {\n for (int i = 1; i < array.length; i++) {\n if (array[i] <= min) {\n min = array[i];\n }\n }\n return min;\n }",
"public double getMinValue() {\n double min = Double.POSITIVE_INFINITY;\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++) {\n if (data[i][j] < min)\n min = data[i][j];\n }\n }\n return min;\n }",
"public static float min(float[] array){\n \n if(array == null){\n \n throw new IllegalArgumentException(\"Array cannot be null\");\n }\n else if(array.length==0){\n throw new IllegalArgumentException(\"Array cannot be empty\");\n }\n \n float min = array[0];\n \n for(int i = 1; i < array.length; i++){\n \n if(Float.isNaN(array[i])){\n return Float.NaN;\n }\n if(array[i] < min){\n min = array[i];\n }\n }\n return min;\n }",
"int findMin(int[] arr){\n\t\tint minimum=1000;\n\t\tfor (int i=0; i<arr.length; i++) {\n\t\t\tif (arr[i]<minimum) {\n\t\t\t\tminimum=arr[i];\n\t\t\t}\n\t\t}\n\t\treturn minimum;\n\t}",
"private static double min(Double[] darray){\n\t\tdouble min = darray[0];\n\t\tfor ( double dd : darray){\n\t\t\tmin = Math.min(min,dd);\n\t\t}\n\t\treturn min;\n\t}",
"public static double min(double[]array){\n \n if(array == null){\n \n throw new IllegalArgumentException(\"Array cannot be null\");\n }\n else if(array.length==0){\n throw new IllegalArgumentException(\"Array cannot be empty\");\n }\n \n double min = array[0];\n \n for(int i = 1; i < array.length; i++){\n \n if(Double.isNaN(array[i])){\n return Double.NaN;\n }\n if(array[i] < min){\n min = array[i];\n }\n }\n return min;\n }",
"public static int findMinimum(int[] array) {\n\n int min;\n\n if (array == null || array.length == 0) {\n return Integer.MIN_VALUE;\n } else {\n min = array[0];\n for (int i= 0; i<array.length; i++) {\n if (min > array[i]) {\n min = array[i];\n }\n }\n return min;\n }\n \n }",
"public static int findMinimum(int[] array) {\n if (array == null || array.length == 0) {\n return Integer.MIN_VALUE;\n }\n int left = 0;\n int right = array.length -1;\n int element = findPivot(array, left, right);\n return element;\n }",
"public static int min(int[] theArray) {\n\n //sets a starting value is used if use the alternative code.\n int smallest = theArray[0];\n\n //Converts the array to a list\n List<Integer> values = Arrays.stream(theArray).boxed().collect(Collectors.toList());\n\n Collections.min(values);\n\n //get the smallest by streaming the list and using min which gets the min value by using the Integer Comparator.comparing().\n //which means it will loop through the array and compare all the values for the smallest values\n smallest = values.stream().min(Integer::compare).get();\n\n ////Alternative code does the same thing.\n// for (int number : theArray) {\n//\n// if (smallest > number) {\n// smallest = number;\n// }\n// }\n\n return smallest;\n\n }",
"public static int argmin(double[] array) {\n\t\tdouble min = array[0];\n\t\tint re = 0;\n\t\tfor (int i=1; i<array.length; i++) {\n\t\t\tif (array[i]<min) {\n\t\t\t\tmin = array[i];\n\t\t\t\tre = i;\n\t\t\t}\n\t\t}\n\t\treturn re;\n\t}",
"public static int getMinIndex(double[] array)\r\n\t{\r\n\t\tdouble min = Double.POSITIVE_INFINITY;\r\n\t\tint minIndex = 0;\r\n\t\tfor (int i = 0; i < array.length; i++)\r\n\t\t\tif (min > array[i]) {\r\n\t\t\t\tmin = array[i];\r\n\t\t\t\tminIndex = i;\r\n\t\t\t}\r\n\t\treturn minIndex;\r\n\t}",
"public int findMin() {\n\t\tint min = (int)data.get(0);\n\t\tfor (int count = 1; count < data.size(); count++)\n\t\t\tif ((int)data.get(count) < min)\n\t\t\t\tmin = (int)data.get(count);\n\t\treturn min;\n\t}",
"public static int minValue(int[] numArr) {\r\n\t\tint temp = numArr[0] < numArr[1] ? numArr[0] : numArr[1];\r\n\t\tfor (int i = 2; i < numArr.length; i++) {\r\n\t\t\ttemp = temp < numArr[i] ? temp : numArr[i];\r\n\t\t}\r\n\t\treturn temp;\r\n\t}",
"private double getLowest()\n {\n if (currentSize == 0)\n {\n return 0;\n }\n else\n {\n double lowest = scores[0];\n for (int i = 1; i < currentSize; i++)\n {\n if (scores[i] < lowest)\n {\n scores[i] = lowest;\n }\n }\n return lowest;\n }\n }",
"private int getMin(int[] times) {\n\n\t\t//Initially set min to the first value\n\t\tint min = times[0];\n\n\t\t//Loop through all times in the array\n\t\tfor (int i = 0; i < times.length; i++) {\n\n\t\t\t//Set the minimum\n\t\t\tif (times[i]<min) {\n\n\t\t\t\tmin = times[i];\n\t\t\t}\n\t\t}\n\n\t\treturn min;\n\t}",
"private void regularMinDemo() {\n int min = numbers[0];\n for(int i = 1; i < numbers.length; i++) {\n if (numbers[i] < min) min = numbers[i];\n }\n System.out.println(min);\n }",
"private Double getMin(Double[] values) {\n Double ret = null;\n for (Double d: values) {\n if (d != null) ret = (ret == null) ? d : Math.min(d, ret);\n }\n return ret;\n }",
"public int getMin() {\n\t\t\treturn harr[0];\n\t\t}",
"public static int minArray(int[] arr) {\n int min_value = Integer.MAX_VALUE;\n for (int i = 0; i < arr.length; i++) {\n if (min_value > arr[i]) {\n min_value = arr[i];\n }\n }\n return min_value;\n }",
"private static void min(int[] a) {\n int min = a[0];\n for(int i=1; i<a.length; i++){\n if(min > a[i]){\n min = a[i];\n }\n }\n System.out.println(\"Min\" + min);\n\n }",
"public static float min(final float[] data) {\r\n float min = Float.MAX_VALUE;\r\n for (final float element : data) {\r\n if (min > element) {\r\n min = element;\r\n }\r\n }\r\n return min;\r\n }",
"public double[] getMin(){\n double[] min = new double[3];\n for (Triangle i : triangles) {\n double[] tempmin = i.minCor();\n min[0] = Math.min( min[0], tempmin[0]);\n min[1] = Math.min( min[1], tempmin[1]);\n min[2] = Math.min( min[2], tempmin[2]);\n }\n return min;\n }",
"public T getMin()\n\t{\n\t\tif(size == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\treturn array[0];\n\t}",
"public static int min(int[] a) throws IllegalArgumentException {\n if (a == null || a.length == 0) {\n throw new IllegalArgumentException();\n }\n int min = a[0];\n \n if (a.length > 1) {\n for (int i = 1; i < a.length; i++) {\n if (a[i] < min) {\n min = a[i];\n }\n }\n }\n return min;\n }",
"Double getMinimumValue();",
"public void minimum(int[] arr){\n int min = arr[0];\n for(int i = 1; i< arr.length-1; i++){ //why i = 1 means because we have already taken the arr[0] as minimum\n if(arr[i] < min){\n min = arr[i];\n }\n } \n System.out.println(\"The minimum Element in the array is : \"+min);\n }",
"private static int findMinInArr(int[] arr) {\n\t\tint min = arr[0];\n\t\tfor (int elem : arr) {\n\t\t\tif (elem < min) {\n\t\t\t\tmin = elem;\n\t\t\t}\n\t\t}\n\n\t\treturn min;\n\t}",
"private double getMin() {\n return Collections.min(values.values());\n }",
"public double minXp(){\n\t\tmin = xp[0];\n\t\tfor(int i=1;i<xp.length;i++){\n\t\t\tif(xp[i]<min){\n\t\t\t\tmin=xp[i];\n\t\t\t}\n\t\t}\n\t\treturn min;\n\t}",
"public double min() {\n/* 305 */ Preconditions.checkState((this.count != 0L));\n/* 306 */ return this.min;\n/* */ }",
"public static int getMin(int arr[][]) {\n\t\tint minNum;\n\t\t\n\t\tminNum = arr[0][0];\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tfor (int j = 0; j < arr[i].length; j++) {\n\t\t\t\tif (arr[i][j] < minNum) {\n\t\t\t\t\tminNum = arr[i][j];\n\t\t\t\t}\n\t\t\t}\n\t\t} // end of outer for\n\t\treturn minNum;\n\t}",
"public static int getIndexOfMin(double[] x) {\n Objects.requireNonNull(x, \"The supplied array was null\");\n int index = 0;\n double min = Double.MAX_VALUE;\n for (int i = 0; i < x.length; i++) {\n if (x[i] < min) {\n min = x[i];\n index = i;\n }\n }\n return (index);\n }",
"public int findMin(int[] num) {\n \t\n \tif (num.length == 1) {\n \t return num[0];\n \t}\n \t\n \tint up = num.length - 1,\n \t low = 0,\n \t mid = (up + low) / 2;\n \twhile (up > low) {\n \t if (mid + 1 < num.length && mid - 1 >= 0 && num[mid] < num[mid - 1] && num[mid] < num[mid + 1]) {\n \t return num[mid];\n \t }\n \t if (num[mid] > num[up]) {\n \t low = mid + 1;\n \t } else {\n \t up = mid - 1;\n \t }\n \t \n \t mid = (up + low) / 2;\n \t}\n \treturn num[mid];\n\t}",
"private double min(double[] vector){\n if (vector.length == 0)\n throw new IllegalStateException();\n double min = Double.MAX_VALUE;\n for(double e : vector){\n if(!Double.isNaN(e) && e < min)\n min = e;\n }\n return min;\n }",
"public DHeap_Item Get_Min()\n {\n\treturn array[0];\n }",
"int getMin() {\n\t\tif (stack.size() > 0) {\n\t\t\treturn minEle;\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t}",
"E minVal();",
"public double min() {\n\t\tif (count() > 0) {\n\t\t\treturn _min.get();\n\t\t}\n\t\treturn 0.0;\n\t}",
"public static int findMin(int[] A) {\n\t\tint ans = 0;\n\t\tfor(int i=1; i<A.length; i++) {\n\t\t\tif(ans > A[i]) {\n\t\t\t\tans = A[i];\n\t\t\t}\n\t\t}\n\t\treturn ans;\n\t}",
"double getMin();",
"double getMin();",
"public static double findMin(double[] da) {\n\n\t\t// fjern = \"0.0\" når metoden implementeres for ikke få forkert minimum\n\t\tdouble min = da[0];\n\t\t\n\t\t// TODO\n\t\t// OPPGAVE - START\n\t\tfor(double d : da) {\n\t\t\tif(d < min) {\n\t\t\t\tmin = d;\n\t\t\t}\n\t\t}\n\t\t// OPPGAVE - SLUT\n\t\treturn min;\n\t}",
"public Integer getMin() { \n\t\treturn getMinElement().getValue();\n\t}",
"public int cariMinimum(int[] min) {\n\t\tint minimum = min[0];\n\t\tint jumlah = min.length;\n\t\tfor (int i = 0; i < jumlah; i++) {\n\t\t\tif (min[i] < minimum) {\n\t\t\t\tminimum = min[i];\n\t\t\t}\n\t\t}\n\t\treturn minimum;\n\t}",
"static int minValues(int[] x) {\n\t\tint min = 0;\n\n\t\tfor (int y : x) {\n\t\t\tif (y < min) {\n\t\t\t\tmin = y;\n\t\t\t}\n\t\t}\n\t\treturn min;\n\t}",
"private double[] getMin(double[][] res) {\r\n\t\tdouble min[] = new double [3];\r\n\t\t\tmin[0] = res[0][0];\r\n\t\tfor(int i = 0 ; i < res.length ; i ++){\r\n\t\t\tfor(int j = 0 ; j < res.length ; j++)\r\n\t\tif(res[i][j] < min[0] && res[i][j] != -1){\r\n\t\t\tmin[0] = res[i][j];\r\n\t\t\tmin[1] = i;\r\n\t\t\tmin[2] = j;\r\n\t\tSystem.out.println(\"test\" + res[i][j]);\r\n\t\t}\r\n\t\t}\r\n\t\treturn min;\r\n\t}",
"public static double min(double... values) {\n/* 86 */ Objects.requireNonNull(values, \"The specified value array must not be null.\");\n/* 87 */ if (values.length == 0) {\n/* 88 */ throw new IllegalArgumentException(\"The specified value array must contain at least one element.\");\n/* */ }\n/* 90 */ double min = Double.MAX_VALUE;\n/* 91 */ for (double value : values)\n/* 92 */ min = Math.min(value, min); \n/* 93 */ return min;\n/* */ }",
"public T findMin();",
"public static int min(int[] values) throws MathsException {\r\n\t\tif(values.length < Integer.MIN_VALUE || values.length > Integer.MAX_VALUE)\r\n\t\t\tthrow new MathsException(\"Not ok\");\r\n\t\tint minimum = values[0];\r\n\t\tfor(int i=1;i<values.length;i++)\r\n\t\t\tif(minimum > values[i])\r\n\t\t\t\tminimum = values[i];\r\n\t\treturn minimum;\r\n\t}",
"static int findMin0(int[] nums) {\r\n \r\n // **** sanity check ****\r\n if (nums.length == 1)\r\n return nums[0];\r\n\r\n // **** check if there is no rotation ****\r\n if (nums[nums.length - 1] > nums[0])\r\n return nums[0];\r\n\r\n // **** loop looking for the next smallest value ****\r\n for (int i = 0; i < nums.length - 1; i++) {\r\n if (nums[i] > nums[i + 1])\r\n return nums[i + 1];\r\n }\r\n\r\n // **** min not found ****\r\n return -1;\r\n }",
"public Integer findSmallestNumber() {\r\n\t\t// take base index element as smallest number\r\n\t\tInteger smallestNumber = numArray[0];\r\n\t\t// smallest number find logic\r\n\t\tfor (int i = 1; i < numArray.length; i++) {\r\n\t\t\tif (numArray[i] != null && numArray[i] < smallestNumber) {\r\n\t\t\t\tsmallestNumber = numArray[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\t// return smallest number from the given array\r\n\t\treturn smallestNumber;\r\n\t}",
"public int extractMinimum() {\n if (size == 0) {\n return Integer.MIN_VALUE;\n }\n if (size == 1) {\n size--;\n return arr[0];\n }\n\n MathUtil.swap(arr, 0, size - 1);\n size--;\n minHeapify(0);\n return arr[size];\n }",
"int minPriority(){\n if (priorities.length == 0)\n return -1;\n\n int index = 0;\n int min = priorities[index];\n\n for (int i = 1; i < priorities.length; i++){\n if ((priorities[i]!=(-1))&&(priorities[i]<min)){\n min = priorities[i];\n index = i;\n }\n }\n return values[index];\n }",
"int min();",
"public int findMinimum(int[] numbers, int length)\n {\n }",
"public int getMin() {\n\t\treturn getMin(0.0f);\n\t}",
"public static int findMinElement(int[] array) {\n if(array.length < 1) {\n throw new IllegalArgumentException(\"array is empty\");\n }\n int left = 0;\n int right = array.length - 1;\n int mid = (left + right) / 2;\n while(left < right) {\n if(array[(mid - 1) % array.length] > array[mid]) {\n return array[mid];\n } else if (array[mid] < array[right]) {\n right = mid - 1;\n } else {\n left = mid + 1;\n }\n mid = (left + right) / 2;\n }\n return array[mid];\n }",
"public int findMin() {\r\n\t\treturn this.min.value;\r\n\t}",
"public static float min(float [] array, boolean [] isValid)\r\n\t{\r\n\t\tfloat minValude = Float.MAX_VALUE;\r\n\t\tfor (int i = 0; i < isValid.length; i++)\r\n\t\t{\r\n\t\t\tif (isValid[i])\r\n\t\t\t{\r\n\t\t\t\tminValude = array[i];\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (int i = 1; i < array.length; i++)\r\n\t\t{\r\n\t\t\tif (array[i] < minValude && isValid[i])\r\n\t\t\t{\r\n\t\t\t\tminValude = array[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn minValude;\r\n\t}",
"public int getMinimumScore(){\n\n /*\n * creating variable of type int name it lowestScore go in to index 0 and sub 0\n * and lowestScore is refering to instance variable scores\n */\n int lowestScore = scores[0][0]; // assume this value is the smallest score value\n\n /* enhanced for loop with array of type int named gameScores and it will go trough scores array*/\n for (int[] gameScores : scores){\n\n /*\n * and another enhanced for loop inside first for loop\n * int variable, name score and it will iterate(go/repeat) through array gameScores\n *\n */\n for (int score : gameScores){\n if (score < lowestScore){\n lowestScore = score;\n }\n }\n }\n return lowestScore;\n }",
"public int heapMin() {\n return array[0];\n }",
"static int findMin(double[] pq)\n\t{\n\t\tint ind = -1; \n\t\tfor (int i = 0; i < pq.length; ++i)\n\t\t\tif (pq[i] >= 0 && (ind == -1 || pq[i] < pq[ind]))\n\t\t\t\tind = i;\n\t\treturn ind;\n\t}",
"public static int min(int[] mainArray) {\r\n\t\tint min1 = 0;\r\n\t\tfor(int lessThan = 1; lessThan < mainArray.length; lessThan ++) {\r\n\r\n\t\t\tif(mainArray[lessThan]<mainArray[min1]) {\r\n\t\t\t\tmin1 = lessThan;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn min1;\r\n\t}",
"public double getMinValue() {\n\t\tdouble min = Double.POSITIVE_INFINITY;\n\t\tfor (int i = 0; i < dataSheet.getDesignCount(); i++) {\n\t\t\tdouble value = dataSheet.getDesign(i).getDoubleValue(this);\n\t\t\tif (value < min)\n\t\t\t\tmin = value;\n\t\t}\n\t\treturn min;\n\t}",
"public static int CalculateLowest(int[] LowestArray){\n LowestInArray l1 = new LowestInArray();\n l1.LowestNumber = LowestArray[0];\n if (LowestArray.length>1){\n System.out.println(\"Many Elements in Array\");\n for (int i=0; i<LowestArray.length;i++){\n if (LowestArray[i]< l1.LowestNumber){\n l1.LowestNumber = LowestArray[i];\n }\n }\n }\n return l1.LowestNumber;\n }",
"public double getMinimum() {\n return (min);\n }",
"@Override\n\tpublic T findMin(T[] ob) {\n\t\treturn null;\n\t}",
"public E findMin() {\n // TODO: YOUR CODE HERE\n return getElement(1);\n }",
"public static int indexOfSmallestElement(int[] array) {\n\t\tint min = array[0];\n\t\tint minIndex = 0;\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tif (array[i] < min) {\n\t\t\t\tmin = array[i];\n\t\t\t\tminIndex = i;\n\t\t\t}\n\t\t}\n\t\treturn minIndex;\t\n\t}",
"public int findLowestTemp() {\n\t\t\n\t\tint min = 0;\n\t\tint indexLow = 0;\n\t\tfor (int i=0; i<temps.length; i++)\n\t\t\tif (temps[i][1] < min) {\n\t\t\t\tmin = temps[i][1];\n\t\t\t\tindexLow = 0;\n\t\t\t}\n\t\t\n\t\treturn indexLow;\n\t\t\n\t}",
"public double getMinT() {\n return v[0];\n }",
"public static float waveDataGetLowestValue(ArrayList<Float> wave){\r\n float lowestWaveValue = Collections.min(wave);\r\n return lowestWaveValue;\r\n\r\n }",
"public static <T> T getMin(T[] arr, _GetFloat_T<T> getV) {\n\n float min = Float.POSITIVE_INFINITY;\n T res = null;\n\n for (T t : arr) {\n float v = getV.val(t);\n if (v < min) {\n min = v;\n res = t;\n }\n }\n\n return res;\n }",
"int getXMin();",
"public abstract int getMinimumValue();",
"public double min() {\n double resultat = Double.MAX_VALUE;\n double tmp = 0;\n for (int i = 0; i < tab.size(); i++) {\n tmp = CalculatorArray.min(tab.get(i));\n if (tmp < resultat) {\n resultat = tmp;\n }\n }\n\n System.out.println(\"Min colonne:\" + resultat);\n return resultat;\n }",
"public double getMinS() {\n return u[0];\n }",
"public E returnMinElement(){\r\n if (theData.size() <= 0) return null;\r\n\r\n E min = theData.get(0).getData();\r\n\r\n for (int i = 0; i< theData.size() ; i++){\r\n if (min.compareTo(theData.get(i).getData()) > 0 ){\r\n min = theData.get(i).getData();\r\n }\r\n }\r\n return min;\r\n }",
"public T min();",
"int min() {\n return min;\r\n }",
"public double getMinimumValue()\n {\n this.minimumValue = getMinNumber(allValues);\n this.maximumValue = getMaxNumber(allValues);\n return minimumValue;\n }",
"public static int min(int[] values) {\n return min(values, 0, values.length);\n }",
"public Double getMinimumValue () {\r\n\t\treturn (minValue);\r\n\t}",
"int getMin( int min );"
]
| [
"0.8413232",
"0.82534015",
"0.82491153",
"0.823157",
"0.8182065",
"0.8167441",
"0.8162496",
"0.81363183",
"0.8114157",
"0.80814457",
"0.8080127",
"0.8071568",
"0.7979959",
"0.79709196",
"0.7846693",
"0.783978",
"0.78031874",
"0.7788984",
"0.7723619",
"0.77203965",
"0.7708267",
"0.7706678",
"0.76934046",
"0.7681759",
"0.76501715",
"0.76290435",
"0.7599019",
"0.75864697",
"0.7570355",
"0.75404245",
"0.7539121",
"0.75285333",
"0.7493971",
"0.7453072",
"0.74442434",
"0.74329114",
"0.74144655",
"0.740312",
"0.7383566",
"0.73824",
"0.7369758",
"0.7369132",
"0.73578644",
"0.73549306",
"0.7328772",
"0.73052406",
"0.7303738",
"0.7298299",
"0.72955483",
"0.72655946",
"0.725245",
"0.7240601",
"0.7240411",
"0.7238251",
"0.723043",
"0.7224622",
"0.7224622",
"0.72205937",
"0.7205473",
"0.71938515",
"0.7183517",
"0.71810454",
"0.7172444",
"0.7164404",
"0.71496326",
"0.7149468",
"0.7135573",
"0.713402",
"0.71287805",
"0.7126914",
"0.7124389",
"0.7089319",
"0.7087945",
"0.70871115",
"0.7052325",
"0.70514745",
"0.7014228",
"0.7008038",
"0.6986768",
"0.69846135",
"0.69784385",
"0.6975748",
"0.69732785",
"0.69662213",
"0.6962889",
"0.6962655",
"0.695667",
"0.69534004",
"0.69530225",
"0.6950915",
"0.69423366",
"0.6941966",
"0.69417286",
"0.69414455",
"0.6934444",
"0.69172263",
"0.6912927",
"0.6912417",
"0.6911763",
"0.688254"
]
| 0.83561707 | 1 |
returns the maximum value in the array | int max() {
// added my sort method in the beginning to sort out array
int n = array.length;
int temp = 0;
for (int i = 0; i < n; i++) {
for (int j = 1; j < (n - i); j++) {
if (array[j - 1] > array[j]) {
temp = array[j - 1];
array[j - 1] = array[j];
array[j] = temp;
}
}
}
// finds the last term in the array --> if array is sorted then the last
// term should be max
int x = array[array.length - 1];
return x;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double max(){\r\n\t\t//variable for max val\r\n\t\tdouble max = this.data[0];\r\n\t\t\r\n\t\tfor (int i = 1; i < this.data.length; i++){\r\n\t\t\t//if the maximum is less than the current index, change max to that value\r\n\t\t\tif (max < this.data[i]){\r\n\t\t\t\tmax = this.data[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\t//return the maximum val\r\n\t\treturn max;\r\n\t}",
"int max(){\r\n int auxMax = array[0];\r\n for (int i=1;i<array.length;i++){\r\n if(array[i] > auxMax){\r\n auxMax = array[i];\r\n }\r\n }\r\n return auxMax;\r\n }",
"public T findHighest(){\n T highest = array[0];\n for (int i=0;i<array.length; i++)\n {\n if (array[i].doubleValue()>highest.doubleValue())\n {\n highest = array[i];\n } \n }\n return highest;\n }",
"static double getMax(double[] array) {\n\t\tif (array.length < 0) {\n\t\t\tthrow new IndexOutOfBoundsException(\"Arrays start from index 0\");\n\t\t}\n\t\tdouble max = 0;\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tif (max < array[i]) {\n\t\t\t\tmax = array[i];\n\t\t\t}\n\t\t}\n\t\treturn max;\n\t}",
"public static double getMax(double[] arr) \n { \n double max = arr[0]; \n for(int i=1;i<arr.length;i++) \n { \n if(arr[i]>max) \n max = arr[i]; \n } \n return max; \n }",
"public static double max(double[] array) {\n\t\tif (array.length==0) return Double.NEGATIVE_INFINITY;\n\t\tdouble re = array[0];\n\t\tfor (int i=1; i<array.length; i++)\n\t\t\tre = Math.max(re, array[i]);\n\t\treturn re;\n\t}",
"public T getMax()\n\t{\n\t\tif(size == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\telse if(size == 1)\n\t\t{\n\t\t\treturn array[0];\n\t\t}\n\t\telse if(size == 2)\n\t\t{\n\t\t\treturn array[1];\n\t\t}\n\n\t\telse\n\t\t{\n\t\t\tif(object.compare(array[1], array[2]) < 0)\n\t\t\t{\n\t\t\t\treturn array[2];\n\t\t\t}\n\t\t\telse if(object.compare(array[1], array[2]) > 0)\n\t\t\t{\n\t\t\t\treturn array[1];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn array[1];\n\t\t\t}\n\n\t\t}\n\t}",
"private static int max(int[] array) {\n int result = array[0];\n for (int x : array)\n result = Math.max(x, result);\n return result;\n }",
"public long max() {\n\t\tif (!this.isEmpty()) {\n\t\t\tlong result = theElements[0];\n\t\t\tfor (int i=1; i<numElements; i++) {\n\t\t\t\tif (theElements[i] > result) {\n\t\t\t\t\tresult = theElements[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\telse {\n\t\t\tthrow new RuntimeException(\"Attempted to find max of empty array\");\n\t\t}\n\t}",
"public static int get_max(Integer[] a){\n int max = Integer.MIN_VALUE;\n\n for (int i = 0; i < a.length; i++){\n if (a[i] > max);\n max = a[i];\n }\n return max;\n }",
"public static int max(int[] arr){\n return maxInRange(arr, 0, arr.length-1);\n }",
"public static int getMax(int[] inputArray){ \n int maxValue = inputArray[0]; \n for(int i=1;i < inputArray.length;i++){ \n if(inputArray[i] > maxValue){ \n maxValue = inputArray[i]; \n } \n } \n return maxValue; \n }",
"public static int getMaximum(int[] array) {\n int length = array.length;\n int max = array[0];\n for (int i = 1; i < length; i++) {\n if(max < array[i]) {\n max = array[i];\n }\n }\n\n Arrays.sort(array);\n// return array[length - 1];\n return max;\n }",
"public int max()\n\t{\n\t\tif (arraySize > 0)\n\t\t{\n\t\t\tint maxNumber = array[0];\n\t\t\tfor (int index = 0; index < arraySize; index++) \n\t\t\t{\n\t\t\t\tif (array[index] > maxNumber)\n\t\t\t\t{\n\t\t\t\t\tmaxNumber = array[index];\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\treturn maxNumber;\n\t\t}\n\t\treturn -1;\n\t\t\n\t}",
"public static int max(int[] a){\r\n\t\tint m = a[0];\r\n\t\tfor( int i=1; i<a.length; i++ )\r\n\t\t\tif( m < a[i] ) m = a[i];\r\n\t\treturn m;\r\n\t}",
"public static int maxValue(int [] array){\n int hold = array[0];\n for(int i = 1; i < array.length; i++){\n if(array[i] > hold){\n hold = array[i];\n }\n }\n return hold;\n }",
"public static double getMax(double[] array)\r\n\t{\r\n\t\tdouble max = Double.NEGATIVE_INFINITY;\r\n\t\tfor (int i = 0; i < array.length; i++)\r\n\t\t\tif (max < array[i])\r\n\t\t\t\tmax = array[i];\r\n\t\treturn max;\r\n\t}",
"public static float max(float [] array)\r\n\t{\r\n\t\tfloat maxValue = array[0];\r\n\t\tfor (int i = 1; i < array.length; i++)\r\n\t\t{\r\n\t\t\tif (array[i] > maxValue)\r\n\t\t\t{\r\n\t\t\t\tmaxValue = array[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn maxValue;\r\n\t}",
"public static int maximo (int[] array) {\n\t\tint max = array[0], i;\n\t\t\n\t\tfor (i = 1; i < array.length; i++) {\n\t\t\tif (array[i] > max) {\n\t\t\t\tmax = array[i];\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn max;\n\t}",
"public static int max(int[] a) {\n\t\tint b=a[0];\r\n\t\tfor(int i=0;i<a.length;i++) {\r\n\t\t\tif(a[i]>b) {\r\n\t\t\t\tb=a[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn b;\r\n\t}",
"public static int getIndexOfMax(double[] array){\n\n int largest = 0;\n for ( int i = 1; i < array.length; i++ )\n {\n if ( array[i] > array[largest] ) largest = i;\n }\n return largest;\n\n }",
"static public long max(long[] valarray) {\r\n long max = 0;\r\n for (long i : valarray) {\r\n if (i > max)\r\n max = i;\r\n }\r\n return max;\r\n }",
"public int findMax(int[] arr) {\n return 0;\n }",
"public double getMaxValue() {\n double max = Double.NEGATIVE_INFINITY;\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++) {\n if (data[i][j] > max)\n max = data[i][j];\n }\n }\n return max;\n }",
"private static double max(Double[] darray){\n\t\tdouble max = darray[0];\n\t\tfor ( double dd : darray){\n\t\t\tmax = Math.max(max,dd);\n\t\t}\n\t\treturn max;\n\t}",
"public static int getMax(int[] array) {\n //TODO: write code here\n int max = array[0];\n for(int a : array) {\n max = a > max ? a : max;\n }\n return max;\n }",
"public double max()\n\n {\n double max=xyValueArray.get(0).getY();\n\n for (int i = 0; i < xyValueArray.size(); i++) {\n if (xyValueArray.get(i).getY() > max) {\n max = xyValueArray.get(i).getY();\n }\n }\n return max;\n }",
"E maxVal();",
"public void findMax(int[] arr){\n int max = arr[0];\n for(int val : arr){\n if(max < val){\n max = val;\n }\n }\n System.out.println( \"Maximum values: \" + max );\n }",
"public double max() {\n/* 323 */ Preconditions.checkState((this.count != 0L));\n/* 324 */ return this.max;\n/* */ }",
"public int findMax() {\n\t\tint max = (int)data.get(0);\n\t\tfor (int count = 1; count < data.size(); count++)\n\t\t\tif ( (int)data.get(count) > max)\n\t\t\t\tmax = (int)data.get(count);\n\t\treturn max;\n\t}",
"public static int max(int[] theArray) {\n\n int biggest = theArray[0];\n\n //Converts the array to a list\n List<Integer> values = Arrays.stream(theArray).boxed().collect(Collectors.toList());\n\n //get the biggest by streaming the list and using min which gets the min value by using the Integer Comparator.comparing().\n //which means it will loop through the array and compare all the values for the biggest values\n biggest= values.stream().max(Integer::compare).get();\n\n// //Alternative code does the samething\n// for (int number : theArray) {\n//\n// if (biggest < number) {\n// biggest = number;\n// }\n// }\n\n return biggest;\n\n }",
"public static int argmax(float[] array) {\n\t\tfloat max = array[0];\n\t\tint re = 0;\n\t\tfor (int i=1; i<array.length; i++) {\n\t\t\tif (array[i]>max) {\n\t\t\t\tmax = array[i];\n\t\t\t\tre = i;\n\t\t\t}\n\t\t}\n\t\treturn re;\n\t}",
"private static int maxValue(int[] a) {\n\t\tint max_value =0;\r\n\t\tint current_max=0;\r\n\t\t\r\n\t\tfor(int i=0;i<a.length;i++)\r\n\t\t{\r\n\t\t\tcurrent_max += a[i];\r\n\t\t\tmax_value= Math.max(max_value, current_max);\r\n\t\t\tif(a[i]<0)\r\n\t\t\t\tcurrent_max=0;\r\n\t\t}\r\n\t\t\r\n\t\treturn max_value;\r\n\t}",
"public static double max(double[] v) {\n double max = v[0];\n for (int ktr = 0; ktr < v.length; ktr++) {\n if (v[ktr] > max) {\n max = v[ktr];\n }\n }\n return max;\n}",
"Double getMaximumValue();",
"static int getMax(int[] array) {\n\n\t\tif (array.length > 6 && array.length < 0) {\n\t\t\tthrow new IndexOutOfBoundsException(\"There is no that index in this array.\");\n\t\t}\n\t\tint max = 0;\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tif (max < array[i]) {\n\t\t\t\tmax = array[i];\n\t\t\t}\n\t\t}\n\t\treturn max;\n\n\t}",
"public static int argmax(double[] array) {\n\t\tdouble max = array[0];\n\t\tint re = 0;\n\t\tfor (int i=1; i<array.length; i++) {\n\t\t\tif (array[i]>max) {\n\t\t\t\tmax = array[i];\n\t\t\t\tre = i;\n\t\t\t}\n\t\t}\n\t\treturn re;\n\t}",
"public static int maxValue(int[] numArr) {\r\n\t\tint temp = numArr[0] > numArr[1] ? numArr[0] : numArr[1];\r\n\t\tfor (int i = 2; i < numArr.length; i++) {\r\n\t\t\ttemp = temp > numArr[i] ? temp : numArr[i];\r\n\t\t}\r\n\t\treturn temp;\r\n\t}",
"double getMax();",
"double getMax();",
"private double getMax() {\n return Collections.max(values.values());\n }",
"public static int findMax(int[] a) {\r\n int max = a[0];\r\n\r\n //10th error , n = 1\r\n for (int n = 1; n < a.length; n++) {\r\n if (a[n] > max) {\r\n max = a[n];\r\n }\r\n }\r\n return max;\r\n\r\n }",
"public static int getMaxIndex(double[] array)\r\n\t{\r\n\t\tdouble max = Double.NEGATIVE_INFINITY;\r\n\t\tint maxIndex = 0;\r\n\t\tfor (int i = 0; i < array.length; i++)\r\n\t\t\tif (max < array[i]) {\r\n\t\t\t\tmax = array[i];\r\n\t\t\t\tmaxIndex = i;\r\n\t\t\t}\r\n\t\treturn maxIndex;\r\n\t}",
"private Double getMax(Double[] values) {\n Double ret = null;\n for (Double d: values) {\n if (d != null) ret = (ret == null) ? d : Math.max(d, ret);\n }\n return ret;\n }",
"private static Pair<Double, Integer> findMaxEntry(double[] array) {\n int index = 0;\n double max = array[0];\n for (int i = 1; i < array.length; i++) {\n if ( array[i] > max ) {\n max = array[i];\n index = i;\n }\n }\n return new Pair<Double, Integer>(max, index);\n }",
"int getMaximum();",
"public int maxValue( int[ ] n ) {\n int max = Integer.MIN_VALUE;\n for(int each: n){\n if(each > max){\n max = each;\n }\n }\n return max;\n }",
"int max();",
"private void getMaxValue(){\n maxValue = array[0];\n for(int preIndex = -1; preIndex<number; preIndex++){\n for(int sufIndex = preIndex+1; sufIndex<=number;sufIndex++){\n long maxTmp = getPrefixValue(preIndex)^getSuffixCValue(sufIndex);\n if(maxTmp>maxValue){\n maxValue = maxTmp;\n }\n }\n }\n System.out.println(maxValue);\n }",
"@Override\n public int iamax(INDArray x) {\n return NativeBlas.isamax(x.length(), x.data(), x.offset(), x.stride()[0]) - 1;\n }",
"public static int getMaxValue(int[] numberArray)\n\t{\n\t\tint maxValue = numberArray[0];\n\t\tfor (int i = 1; i < numberArray.length; i++)\n\t\t{\n\t\t\tif (numberArray[i] > maxValue)\n\t\t\t\tmaxValue = numberArray[i];\n\t\t}\n\t\treturn maxValue;\n\t}",
"double largestNumber(double[] a) {\n\t\tdouble max = a[0];\n\t\tdouble no = 0;\n\t\tfor (int index = 1; index < a.length; index++) {\n\t\t\tif (max > a[index] && max > a[index + 1]) {\n\t\t\t\tno = max;\n\t\t\t\tbreak;\n\t\t\t} else if (a[index] > max && a[index] > a[index + 1]) {\n\t\t\t\tno = a[index];\n\t\t\t\tbreak;\n\t\t\t} else if (a[index + 1] > max && a[index + 1] > a[index]) {\n\t\t\t\tno = a[index + 1];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn no;\n\t}",
"public double max() {\n\t\tif (count() > 0) {\n\t\t\treturn _max.get();\n\t\t}\n\t\treturn 0.0;\n\t}",
"double getMax() {\n\t\t\treturn value_max;\n\t\t}",
"public static int max(int[] array){\n \n if(array == null){\n \n throw new IllegalArgumentException(\"Array cannot be null\");\n }\n else if(array.length==0){\n throw new IllegalArgumentException(\"Array cannot be empty\");\n }\n \n int max = array[0];\n \n for(int i = 1; i < array.length; i++){\n \n if(array[i] > max){\n max = array[i];\n }\n }\n return max;\n }",
"public double getMaximum() {\n return (max);\n }",
"int findMax(int[] arr){\n\t\tint maximum=0;\n\t\tfor (int i=0; i<arr.length; i++) {\n\t\t\tif (arr[i]>maximum) {\n\t\t\t\tmaximum=arr[i];\n\t\t\t}\n\t\t}\n\t\treturn maximum;\n\t}",
"public static int getMax(float[][] storage) {\n float []arr=new float[WINDOW];\n for (int i = 0;i<WINDOW;i++){\n arr[i]=storage[i][1];\n }\n\n if(arr==null||arr.length==0){\n return 0;//如果数组为空 或者是长度为0 就返回null\n }\n int maxIndex=0;//假设第一个元素为最小值 那么下标设为0\n int[] arrnew=new int[2];//设置一个 长度为2的数组 用作记录 规定第一个元素存储最小值 第二个元素存储下标\n for(int i =0;i<arr.length-1;i++){\n if(arr[maxIndex]<arr[i+1]){\n maxIndex=i+1;\n }\n }\n arrnew[0]=(int)arr[maxIndex];\n arrnew[1]=maxIndex;\n\n return arrnew[0];\n }",
"public static double max(double[]array){\n \n if(array == null){\n \n throw new IllegalArgumentException(\"Array cannot be null\");\n }\n else if(array.length==0){\n throw new IllegalArgumentException(\"Array cannot be empty\");\n }\n \n double max = array[0];\n \n for(int i = 1; i < array.length; i++){\n \n if(Double.isNaN(array[i])){\n return Double.NaN;\n }\n if(array[i] > max){\n max = array[i];\n }\n }\n return max;\n }",
"public static int max() {\r\n\r\n\t\tint[] arr1 = ArrayMethods.get5();\r\n\t\tint[] arr2 = ArrayMethods.get5();\r\n\r\n\t\tint sum1 = 0;\r\n\t\tint sum2 = 0;\r\n\r\n\t\tint max = 0;\r\n\r\n\t\tfor (int num : arr1) {\r\n\t\t\tsum1 += num;\r\n\t\t}\r\n\t\tfor (int num : arr2) {\r\n\t\t\tsum2 += num;\r\n\t\t}\r\n\r\n\t\tif (sum1 > sum2) {\r\n\r\n\t\t\tmax = sum1;\r\n\r\n\t\t} else if (sum1 == sum2) {\r\n\r\n\t\t\tmax = sum1;\r\n\r\n\t\t} else {\r\n\r\n\t\t\tmax = sum2;\r\n\t\t}\r\n\t\treturn max;\r\n\t}",
"public abstract int getMaximumValue();",
"public double getMaximumValue() { return this.maximumValue; }",
"public static int findMax(int arr[]){\n int max =Integer.MIN_VALUE;\n\n //find max\n for(int i =0;i<arr.length;i++){\n if (arr[i]>max){\n max=arr[i];\n }\n }\n return max;\n }",
"public static double max(double[] values) {\n return max(values, 0, values.length);\n }",
"public static int max(int[] m) {\n int x = 1;\n int ret = m[0];\n while (x < m.length) {\n if (m[x] > ret) {\n ret = m[x];\n }\n x = x + 1;\n }\n return ret;\n }",
"public static void main(String[] args) {\n int[] nums = {24, 32, 1, 0, -57, 982, 446, 11, 177, 390, 2923, 7648, 242, 234, 1123, 875};\n int maxValue = nums[0];\n\n for(int i = 0; i < nums.length; i++) {\n if (nums[i] > maxValue) {\n maxValue = nums[i];\n }\n }\n System.out.println(\"Max Value in Array: \" + maxValue);\n }",
"public double[] getMax(){\n double[] max = new double[3];\n for (Triangle i : triangles) {\n double[] tempmax = i.maxCor();\n max[0] = Math.max( max[0], tempmax[0]);\n max[1] = Math.max( max[1], tempmax[1]);\n max[2] = Math.max( max[2], tempmax[2]);\n }\n return max;\n }",
"private static int getMax(int[] original) {\n int max = original[0];\n for(int i = 1; i < original.length; i++) {\n if(original[i] > max) max = original[i];\n }\n return max;\n }",
"public T max();",
"int getMax();",
"private int getMax(int[] times) {\n\n\t\t//Initially set max to the first value\n\t\tint max = times[0];\n\n\t\t//Loop through all times in the array\n\t\tfor (int i = 0; i < times.length; i++) {\n\n\t\t\t//Find max\n\t\t\tif (times[i]>max) {\n\n\t\t\t\t//Update max\n\t\t\t\tmax = times[i];\n\t\t\t}\n\t\t}\n\n\t\treturn max;\n\t\t//Print the max time to the console\n\n\t}",
"private int getYmax(int[] yt){\n\t\tint max = -1;\n\t\tfor(int i = 0;i<=3;i++){\n\t\t\tif(max < yt[i]){\n\t\t\t\tmax = yt[i];\n\t\t\t}\n\t\t}\n\t\treturn max;\n\t}",
"public static void main(String[] args) {\nint arr[]=new int[] {10,20,36,50,30};\nint max=0,i;\nfor(i=0;i<arr.length;i++)\n{\n\tif(arr[i]>max)\n\t{\n\t\tmax=arr[i];\n\t}\n}\nSystem.out.println(max);\n\t}",
"public int getMax()\n {\n int max = data.get(0).getX();\n\n for(int i = 0; i < data.size(); i++)\n {\n if (data.get(i).getX() > max)\n {\n max = data.get(i).getX();\n }\n }\n\n\n return max;\n }",
"public static <T extends Comparable<T>> T findMax(T[] arr) {\n if (arr.length == 0 || arr == null) {\n throw new IllegalArgumentException(\"Array null or empty.\");\n }\n\n T max = arr[0];\n for (int i = 1; i < arr.length; i++) {\n max = MathUtils.max(arr[i], max);\n }\n return max;\n }",
"public static float max(final float[] data) {\r\n float max = Float.MIN_VALUE;\r\n for (final float element : data) {\r\n if (max < element) {\r\n max = element;\r\n }\r\n }\r\n return max;\r\n }",
"public AnyType findMax() {\n\t\treturn elementAt(findMax(root));\n\t}",
"public static float max(float[] array){\n \n if(array == null){\n \n throw new IllegalArgumentException(\"Array cannot be null\");\n }\n else if(array.length==0){\n throw new IllegalArgumentException(\"Array cannot be empty\");\n }\n \n float max = array[0];\n \n for(int i = 1; i < array.length; i++){\n \n if(Float.isNaN(array[i])){\n return Float.NaN;\n }\n if(array[i] > max){\n max = array[i];\n }\n }\n return max;\n }",
"public Double getMaximumValue () {\r\n\t\treturn (maxValue);\r\n\t}",
"@Override\n public int iamax(IComplexNDArray x) {\n return NativeBlas.icamax(x.length(), x.data(), x.offset(), 1) - 1;\n }",
"public int theHighest() {\r\n\t\tint highest = 0;\r\n\t\tfor(int i = 0; i < rows_size; i++) {\r\n\t\t\tfor(int j = 0; j < columns_size; j++) {\r\n\t\t\t\tif(game[i][j].getValue() > highest)\r\n\t\t\t\t\thighest = game[i][j].getValue();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn highest;\r\n\t}",
"public double maxOfAbsoluteValues(double[] arr) {\n return 0;\n }",
"public double getMaximumDouble() {\n/* 255 */ return this.max;\n/* */ }",
"public static void main(String[] args) {\n int[] arr={24,34,56,98,2,59};\r\n int val =arr [0];\r\n for(int i=0;i<arr.length;i++){\r\n \t if(arr[i]>val){\r\n \t\t val=arr[i];\r\n \t }\r\n }\r\n System.out.println(\"largest value\"+ val);\r\n\t}",
"public static void arrayMax(){\n int [] array={12,3,4,5,6,1,0,3};\n //using the for loop to iterate through the numbers in the array\n int max=array[0];\n int size=array.length;\n\n for(int i = 0; i<size; i++){\n if(array[i]>max){\n max=array[i];\n }\n }\n System.out.println(new StringBuilder().append(max).append(\": is the maximum number in the given array.\").toString());\n\n }",
"public static int getMax(int[] arr) {\r\n\r\n\t\tint max = arr[0];\r\n\r\n\t\tfor (int x = 1; x < arr.length; x++) {\r\n\t\t\tif (arr[x] > max)\r\n\t\t\t\tmax = arr[x];\r\n\r\n\t\t}\r\n\t\treturn max;\r\n\r\n\t}",
"public static Object max(Object[] object) {\n // Find max of array object\n Object maxOfA = object[0];\n for(int i = 1; i < object.length; i++) {\n if ((((Comparable) maxOfA).compareTo(object[i])) == -1) {\n maxOfA = object[i];\n }\n }\n\n // Return results.\n return maxOfA;\n }",
"public final double getMax() {\r\n\t\treturn this.m_max;\r\n\t}",
"public double getMaximumValue()\n {\n this.minimumValue = getMinNumber(allValues);\n this.maximumValue = getMaxNumber(allValues);\n return maximumValue;\n }",
"@In Integer max();",
"@In Integer max();",
"public int getMax() {\n\t\treturn getMax(0.0f);\n\t}",
"public static double findMax(double[] da) {\n\n\t\tdouble max = da[0];\n\n\t\tfor (double d : da) {\n\t\t\tif (d > max) {\n\t\t\t\tmax = d;\n\t\t\t}\n\t\t}\n\n\t\treturn max;\n\t}",
"public int calculateMaximumPosition() {\n\t\tdouble[] maxVal = { inputArray[0], 0 };\n\t\tfor (int i = 0; i < inputArray.length; i++) {\n\t\t\tif (inputArray[i] > maxVal[0]) {\n\t\t\t\tmaxVal[0] = inputArray[i];\n\t\t\t\tmaxVal[1] = i;\n\t\t\t}\n\t\t}\n\t\treturn (int) maxVal[1];\n\t}",
"public long findMax(long[] incomes) {\n long current_max_index = 0;\n long current_max = incomes[0];\n for (long income : incomes)\n if (current_max < income)\n current_max = income;\n return current_max;\n }",
"public Object[] argmax(float[] array) {\n int best = -1;\n float best_confidence = 0.0f;\n\n for (int i = 0; i < array.length; i++) {\n\n float value = array[i];\n\n if (value > best_confidence) {\n\n best_confidence = value;\n best = i;\n }\n }\n return new Object[]{best, best_confidence};\n }",
"public int getMax(){\n return tab[rangMax()];\n }",
"protected final int getMax() {\n\treturn(this.max);\n }",
"public int findMaxValue() {\n\t\treturn findMaxValue( this );\n\t}"
]
| [
"0.8512293",
"0.83294886",
"0.82736",
"0.8086462",
"0.8042134",
"0.8026647",
"0.80231476",
"0.80198115",
"0.80060846",
"0.7922985",
"0.7875871",
"0.7857806",
"0.7853968",
"0.7839493",
"0.78325975",
"0.7822",
"0.78173995",
"0.78100723",
"0.78094554",
"0.77722293",
"0.7756908",
"0.775276",
"0.77271193",
"0.7724063",
"0.77063465",
"0.769205",
"0.76566696",
"0.7653195",
"0.76289076",
"0.7612423",
"0.7604104",
"0.75983083",
"0.7594317",
"0.7593874",
"0.7591958",
"0.7583792",
"0.7539991",
"0.75398916",
"0.75366443",
"0.7530099",
"0.7530099",
"0.7502272",
"0.7479258",
"0.7446579",
"0.7443106",
"0.74381447",
"0.7434918",
"0.74212307",
"0.74026346",
"0.7388309",
"0.7386169",
"0.73676866",
"0.7362959",
"0.7361484",
"0.7350662",
"0.7336476",
"0.7336239",
"0.733316",
"0.732993",
"0.73246545",
"0.73156905",
"0.7312736",
"0.72945434",
"0.72907555",
"0.72836286",
"0.72817844",
"0.7265142",
"0.726114",
"0.725756",
"0.72569454",
"0.7240205",
"0.7223218",
"0.721032",
"0.72060585",
"0.7201717",
"0.71972746",
"0.7187911",
"0.71729296",
"0.7166995",
"0.71633077",
"0.71380633",
"0.71290463",
"0.712353",
"0.71090233",
"0.71073437",
"0.71064234",
"0.7104526",
"0.7094323",
"0.7092914",
"0.7091897",
"0.70810694",
"0.70810694",
"0.7077163",
"0.706519",
"0.7061621",
"0.7047978",
"0.7047893",
"0.7046411",
"0.70458704",
"0.7044957"
]
| 0.8237814 | 3 |
returns the average of the array | double average() { // used double b/c I want decimal places
int sum = 0;
for (int i = 0; i < array.length; i++) {
sum = sum + array[i];
}
double average = (double) sum / array.length;
return average;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double average(){\n double avg = 0;\n double sum = 0;\n for (T t : arr) {\n // sum += t.doubleValue();\n }\n\n return sum / arr.length;\n }",
"double avg(){\n\t\tdouble sum = 0.0;\n\t\tfor(int i=0;i<num.length;i++)\n\t\t\tsum+=num[i].doubleValue();\n\t\treturn sum/num.length;\n\t}",
"public double averageOfArray() {\n double sum = 0;\n double average = 0;\n int i;\n for (i = 0; i < sirDeLa1La100.length; i++) {\n sum = sum + sirDeLa1La100[i];\n }\n average = sum / sirDeLa1La100.length;\n return average;\n }",
"public double getAverage(){\n return getTotal()/array.length;\n }",
"public double average(){\r\n\t\t//create variable to hold the values\r\n\t\tdouble average = 0;\r\n\t\t\r\n\t\tfor (int i = 0; i < this.data.length; i++){\r\n\t\t\t//add current index\r\n\t\t\taverage += this.data[i];\r\n\t\t\t}\r\n\t\treturn (average/this.data.length);\r\n\t}",
"public Double computeAverage(){\n\t\tdouble total = 0; //double used to keep total value of elements in arr to determine average\n\t\t\n\t\tfor(int i = 0; i < arr.length; i++)//loop through array and add the total\n\t\t{\n\t\t\ttotal += arr[i].doubleValue(); //add current value of element in arr to total's value\n\t\t}\n\t\t\n\t\tDouble result = total/arr.length; //returns the average as a Double\n\t\t\n\t\treturn result;\n\t}",
"public static double avg(double[] array) {\r\n\t\tdouble ret = sum(array);\r\n\t\treturn ret / array.length;\r\n\t}",
"public static double average(double[] array){\n double sum = 0;\n for (int i = 0; i < array.length; i++) {\n sum += array[i];\n }\n return sum/array.length;\n }",
"static double calculateAverage(int[] array) {\n\n double sum = 0;\n\n for (int i = 0; i < array.length; i++) {\n\n sum = sum + (double) array[i];\n\n\n }\n\n return sum / array.length;//returning average\n\n }",
"public double average()\n\t{\n\t\tif (arraySize > 0)\n\t\t{\n\t\t\tdouble sum = this.sum();\n\t\t\treturn sum / arraySize;\n\t\t}\n\t\tSystem.out.println(\"Syntax error, array is empty.\");\n\t\treturn -1;\n\t}",
"static double average(double[] data){\n\n // Initializing total placeholder \n double total = 0;\n\n // Traversing data array and adding to total sum\n for (double d : data) {\n total += d;\n }\n\n // Computing average\n double average = (double) total / data.length;\n\n return average;\n }",
"public int average()\n {\n int average = 0;\n int sum = 0;\n\n for ( int index = 0; index < data.length; index++ )\n {\n sum = sum + data[index];\n }\n average = sum / data.length;\n\n return average;\n }",
"public static int average(int[] array){\n int sum = 0;\n for (int i = 0; i < array.length; i++) {\n sum += array[i];\n }\n return sum/array.length;\n }",
"public static double getAverage(double[][] array)\r\n\t{\r\n\t\tint count = 0;\r\n\t\tList<Double> lineSumList = new ArrayList<Double>();\r\n\t\tfor( int i = 0; i < array.length; i++ ) {\r\n\t\t\tdouble lineSum = Σ(array[i]);\r\n\t\t\tlineSumList.add(lineSum);\r\n\t\t\tcount += array[i].length;\r\n\t\t}\r\n\t\tdouble sum = Σ(lineSumList);\r\n\t\t\r\n\t\tif (sum == 0 || array.length == 0)\r\n\t\t\treturn 0;\r\n\t\treturn sum / count;\r\n\t}",
"public static double average(int[] arr)\n {\n // your code goes here\n\t\tdouble sum =0;\n int i;\n for(i=0;i< arr.length;i++)\n {\n sum+=arr[i];\n }\n\t\t\n\t\treturn sum/arr.length; \n\t}",
"static double averageDoubleArray(double[] inputArray) {\n\t\tdouble doubleSum = 00.00;\n\t\tfor (double element : inputArray) { \n\t\t\tdoubleSum += element;\n\t\t}\n\t\tdouble average = doubleSum / inputArray.length; \n\t\treturn average;\n\t}",
"public static double average(int[] theArray) {\n\n double answer;\n double sum = IntegerArrays.sum(theArray);\n answer = sum / theArray.length;\n\n return answer;\n\n }",
"public static double getAverage(Number[] array)\r\n\t{\r\n\t\tdouble sum = Σ(array);\r\n\r\n\t\tif (sum == 0 || array.length == 0)\r\n\t\t\treturn 0;\r\n\t\treturn sum / array.length;\r\n\t}",
"public static double getAverage(int[] array) throws IOException {\r\n double arrayAverage = 0;\r\n arrayAverage = arrayTotal(array) / array.length;\r\n\r\n return arrayAverage;\r\n\r\n }",
"public static double avg(int[] arr) {\n double sum = 0.0;\n for (int a : arr) sum += a;\n return sum / arr.length;\n }",
"public double getAverage(){\n double total = 0;\n for(double s : scores)total += s;\n return total/scores.length;\n }",
"public static double getAverage(double[] array)\r\n\t{\r\n\t\tdouble sum = Σ(array);\r\n\r\n\t\tif (sum == 0 || array.length == 0)\r\n\t\t\treturn 0;\r\n\t\treturn sum / array.length;\r\n\t}",
"public static double average(int[] array) {\n\t\tif (array.length == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tdouble avg = 0;\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tavg += array[i];\n\t\t}\n\t\treturn avg / array.length;\n\t}",
"public double arithmeticalMean(double[] arr) {\n return 0;\n }",
"public double calcAvg() {\n\t\treturn (double)calcSum() / data.size();\n }",
"double average();",
"double average(double[] doubles) {\n double total = 0.0;\n //int count = 0;\n for (double d: doubles) {\n total = total + d;\n //count = count + 1;\n }\n //return total / count;\n return total / doubles.length;\n }",
"public static int average(int[]data){\n \n int sum = 0;\n int n = 0;\n for(int i = 0; i < data.length-1; i++) {\n \n n++;\n sum += data[i];\n }\n\n return sum/n;\n }",
"float average(int[] input) {\n\t\tfloat average = 0;\n\t\tint sum = 0;\n\t\tfor (int index = 0; index < input.length; index++) {\t\t//loop to get sum of numbers\n\t\t\tsum = sum + input[index];\n\t\t}\n\t\taverage = (float) sum / (input.length);\t\t//average calculation\n\t\treturn average;\n\t}",
"public void findAverage(int[] arr){\n int sum = 0;\n for(int val : arr){\n sum += val;\n }\n System.out.println( \"Average: \" + sum / arr.length);\n }",
"public void getAvg()\n {\n this.avg = sum/intData.length;\n }",
"public static double avgDoublesArray(double array[])\n\t{\n\t\tdouble avg = 0;\n\t\tfor (int i = 0; i < array.length; i++)\n\t\t\tavg += array[i];\n\t\t\n\t\tavg = avg / array.length;\n\t\treturn avg;\n\t}",
"public Integer average(int[] arr3){\n\t\tSystem.out.println(\"Get Average\");\n\t\tint sum = 0;\n\t\tfor(int d = 0; d < arr3.length; d++){\n\t\t\tsum += arr3[d];\n\t\t}\n\t\tSystem.out.println(sum/arr3.length);\n\t\treturn 0;\n\t}",
"public static double getAverage(double[] dataArray) {\n\t\t\n\t\tdouble average = 0.0;\n\t\t\n\t\tfor (int i = 0; i <dataArray.length; i++) {\n\t\t\taverage += dataArray[i];\n\t\t}\n\t\t\n\t\taverage = average/dataArray.length;\n\t\t\n\t\treturn average;\n\t}",
"public double getAvg(){\n double avg=0;\n for(int x=0; x<max; x++){\n avg=avg+times[x];\n }\n avg=avg/max;\n return avg;\n }",
"public double mean(double data[]) {\r\n\t\tdouble mean = 0;\r\n\t\ttry {\r\n\t\t\tfor(int i=0;i<data.length;i++) {\r\n\t\t\t\tmean =mean+data[i];\r\n\t\t\t}\r\n\t\t\tmean = mean / data.length;\r\n\t\t}\r\n\t\tcatch(Exception e) {\r\n\t\t\tDataMaster.logger.warning(e.toString());\r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t\treturn mean;\r\n\t}",
"@Override\n public Double average() {\n return (sum() / (double) count());\n }",
"@Override\n\tpublic int avg() {\n\t\treturn (this.sum()/3);\n\t}",
"public int average(int[] array_of_notes){\r\n int avg=0;\r\n for (int array_of_note : array_of_notes) {\r\n avg += array_of_note;\r\n }\r\n avg /= array_of_notes.length;\r\n return avg;\r\n }",
"public double getAverage(){\n int total = 0; //inicializa o total\n \n //soma notas de um aluno\n for(int grade: grades){\n total += grade;\n }\n \n return (double) total/grades.length;\n }",
"public double mean()\n {\n double sum = 0.0;\n for(int t = 0; t<size; t++)\n sum += x[t];\n return sum/size;\n }",
"public double average() {\n return average(0.0);\n }",
"public int average() {\n int total = 0;\n\n for (int score : scores) {\n total += score;\n }\n\n return total / scores.length;\n }",
"public double getAverage()\n {\n return getSum() / 2.0;\n }",
"public double getAverage(){\r\n\t\tdouble sum=0;\r\n\t\tfor(Iterator<T> it=this.iterator();it.hasNext();){\r\n\t\t\tsum+=it.next().doubleValue();\r\n\t\t}\r\n\t\treturn sum/this.size();\r\n\t}",
"public static double arrayAverage(double[] array, double arraySize) {\r\n double averages = 0;\r\n for (int x = 0; x < arraySize; x++) {\r\n averages += array[x];\r\n }\r\n averages = (averages / arraySize);\r\n return averages;\r\n }",
"private static double meanVal(double[] arrayOfSamples){\n\t\tdouble total = 0;\n\t\t for (double i :arrayOfSamples){\n\t\t \ttotal += i;\n\t\t }\n\t return total/arrayOfSamples.length;\n\t}",
"public static double average(int[] mainArray) {\r\n\t\tdouble average = 0;\r\n\t\tfor (int counter = 0; counter < mainArray.length; counter ++) {\r\n\t\t\taverage += mainArray[counter];\r\n\t\t}\r\n\t\treturn (average / mainArray.length);\r\n\t}",
"public static double findMean(ArrayList<Integer> arr) {\n\t\tint length = arr.size();\n\t\tint sum = 0;\n\t\tfor(int i : arr) { sum += i; }\n\t\treturn (double)sum/length;\n\t}",
"@Override\n\tpublic double avg() {\n\t\treturn total()/4.0;\n\t}",
"public static double mean(double[] x){\n\n //Declares and intializes mean and total to 0;\n double mean = 0;\n double total = 0;\n\n //Takes the total of all the numbers in every index\n for(int i = 0; i < x.length; i++){\n total += x[i];\n }\n //Divides total by 10\n mean = total / 10;\n\n //returns mean\n return mean;\n\n }",
"public static double Average(int[][] matrix){\n double total = 0;\n double promedio =0;\n double divisor = 0;\n \n for(int i=0; i<matrix.length; i++){\n for (int j=0;j<matrix[i].length;j++ ) {\n \n total += matrix[i][j];\n } \n divisor = matrix[i].length * matrix.length; \n promedio = total / divisor; \n }\n \n return promedio;\n }",
"public static long average(long[] arr) {\n if (arr.length == 0) return 0;\n long divideSum = 0;\n long modSum = 0;\n final long size = arr.length;\n \n for (int i = 0; i < arr.length; i++) {\n divideSum += arr[i] / size;\n modSum += arr[i] % size;\n }\n\n return divideSum - (size - 1) + (modSum + size * (size - 1)) / size;\n }",
"public static void main(String[] args) {\nint[][] array= {{95,86},{83,92,96},{78,83,93,87,88}};\nint sum = 0;\ndouble avg = 0.0;\nint avgnum =0;\n\nfor(int i=0; i<array.length; i++ ) {\n\tfor(int k=0; k<array[i].length; k++) {\n\t\tsum += array[i][k];\n \t\t\t\t\n\t}\n\tavgnum += array[i].length;\n}\nSystem.out.println(\"array �迭�� �� ���� \" + sum);\navg = (double) sum/ avgnum;\nSystem.out.println(\"array �迭�� ��� ���� \" + avg);\n\t}",
"public static double getAverage(int[][] numbers) {\n int totalNumberOfElements = 10; // (2 rows * 5 column)\n return getTotal(numbers) / totalNumberOfElements;\n }",
"public static double getAverage(int arr[][], int row) {\t// 算陣列所有數平均值\n\t\t/* Overloading Method */\n\t\tint sum = 0, count = 0;\n\t\tdouble result;\n\t\t\t\n\t\t\tfor (int j = 0; j < arr[row].length; j++) {\n\t\t\t\tsum += arr[row][j];\n\t\t\t\tcount++;\n\t\t\t}\n\t\tresult = (double) sum / count;\n\t\treturn result;\n\t}",
"public void findAvg()\n {\n for(int i = 0; i <= scores.length-1; i++)\n {\n for (int j = 0; j <= scores[0].length-1; j++)\n {\n total += scores[i][j];\n }\n }\n System.out.println(\"The class average test score is \" + \n total/24 + \".\");\n }",
"public double getAverageGrade(){\n double totalGrade = 0;\n double averageGrade = 0;\n // for loop to iterate over the array\n for(int i = 0; i<students.size(); i++){\n totalGrade += students.get(i).getGrades();\n } // end for\n \n averageGrade = totalGrade / students.size();\n return averageGrade;\n }",
"public double average() {\n double average = 0;\n for (int i = 0; i < studentList.size(); i++) {\n Student student = studentList.get(i);\n average += student.average();\n }\n average /= studentList.size();\n return average;\n }",
"private double getAvg() {\n\n double sum = 0;\n\n for (Map.Entry<Integer, Double> entry : values.entrySet()) {\n sum += entry.getValue();\n }\n\n if (values.size() > 0) {\n return sum / values.size();\n } else {\n throw new IllegalStateException(\"no values\");\n }\n }",
"public static double meanVal(int[] sample){\n double total = 0;\n for (int i = 0; i < sample.length; i++){\n total = total + sample[i];\n }\n double mean = total/sample.length;\n return mean;\n }",
"public synchronized double getAverage() {\n return average;\n }",
"public double getAverage() {\n int total = 0;\n\n // sum grades of the student\n for (int grade : grades)\n total += grade;\n\n // return average of the grade\n return (double) total / grades.length;\n }",
"private float calculateMean()\n { \n int numberEmployees = employees.size();\n float total = 0, meanGrossPay = 0;\n // Create an array of all gross pays\n float[] allGrossPay = new float[numberEmployees];\n \n // Call method to return an array of float containing all gross pays\n allGrossPay = calculateAllGrossPay();\n // Find total gross pay\n for (int i = 0; i < numberEmployees; i++)\n {\n total += allGrossPay[i];\n }\n // Find mean and return it\n if (numberEmployees > 0)\n {\n meanGrossPay = total/numberEmployees;\n \n }\n return meanGrossPay;\n }",
"public static float getMean(float[] weatherArray){\n float mean = getTotal(weatherArray)/weatherArray.length;\n return mean;\n }",
"public float getAverage(){\r\n\t\treturn Average;\r\n\t}",
"public static void calculateAvg(double[] avgPArr, int itemNum) {\n\n for (int i = 0; i < avgPArr.length; i++)\n avgPArr[i] /= itemNum;\n\n }",
"private double calculateAverage(Candle[] cd) {\n double sum = 0; \r\n for(Candle c : cd) {\r\n sum += c.getClose();\r\n }\r\n return sum/cd.length;\r\n \r\n }",
"public double[] getAverages() {\n\t\t\n\t\t// initialize array\n\t\taverages = new double[5];\n\t\t\n\t\t// used with calcAverage for the startIndex\n\t\tint curIndex = 0;\n\t\taverages[ASSIGNMENTS] = calcAverage(curIndex, curIndex += NUM_ASSIGNMENTS);\n\t\taverages[QUIZZES] = calcAverage(curIndex, curIndex += NUM_QUIZZES);\n\t\taverages[TESTS] = calcAverage(curIndex, curIndex += NUM_TESTS);\n\t\taverages[FINAL] = calcAverage(curIndex, curIndex + 1);\n\t\t\n\t\t// get the overall average\n\t\tdouble quizTestAverage = (averages[QUIZZES] + averages[TESTS]) * PERCENT_QUIZ_AND_TESTS / 2;\n\t\tdouble assignmentAverage = averages[ASSIGNMENTS] * PERCENT_ASSIGNMENTS;\n\t\tdouble finalAverage = averages[FINAL] * PERCENT_FINAL;\n\t\taverages[OVERALL] = quizTestAverage + assignmentAverage + finalAverage;\n\t\t\n\t\t// return the array\n\t\treturn averages;\n\t}",
"public static double average (double ... numbers)\r\n\t{",
"public double getAverage() {\n return this.average;\n }",
"public static float[] returnMeanArray (float[] weatherArray){\n float[] meanArray = new float[12];\n for (int i = 0; i < 12; i++){\n meanArray[i] = weatherArray[i]/30;\n }\n return meanArray;\n }",
"public static double average (double ... s4){\n double suma = 0.0;\n for (double value : s4) {\n suma += value;\n }\n return suma / s4.length;\n }",
"public static double getAverage(int start, double[] d) {\n double average = 0;\n for (int i = 0; i < 110; i++) {\n average = average + d[i];\n }\n return average / 110;\n }",
"public double average(int first, int last){\n double final = 0;\n for(int i = first; i < last; i++){\n final += scores[i];\n }\n return final/(last-first+1);\n}",
"public float calcAverage(){\n if(totalReviews > 0)\n return (float) (totalScore*1.0/totalReviews);\n else return 0;\n }",
"private int getMean(int[] times) {\n\n\t\t//Initialise mean and sum to 0\n\t\tint mean = 0;\n\t\tint sum = 0;\n\n\t\t//Loop through all the times\n\t\tfor (int i = 0; i < times.length; i++) {\n\n\t\t\t//Add to the sum\n\t\t\tsum += times[i];\n\t\t}\n\n\t\t//Calculate and return the mean\n\t\tmean = sum/times.length;\n\t\treturn mean;\n\t}",
"public static double average(ArrayList<Double> nums){\n double sum = 0.0;\n for(Double num : nums){\n sum += num;\n }\n return sum / nums.size();\n }",
"public double getAverage(){\r\n\r\n\t\tdouble sum = 0.0;\r\n\t\tdouble average = 0.0;\r\n\r\n\t\tfor (int i = 0; i < grades.length; ++i)\r\n\t\t\tsum += grades[i];\r\n\t\taverage = sum /grades.length;\r\n\t\t\r\n\t\tString num = String.format(\"%.2f\", average);\r\n\t\tdouble formattedNumber = Double.parseDouble(num);\r\n\t\treturn formattedNumber;\r\n\r\n\t}",
"public double average(double alternative) {\n int cnt = 0;\n double sum = 0.0;\n\n // Compute the average of all values\n for (Number number : this) {\n if (number == null) continue;\n if (Double.isNaN(number.doubleValue())) continue;\n\n sum += number.doubleValue();\n cnt++;\n }\n\n // If we haven't had any element, return 0\n if (cnt == 0) return alternative;\n return sum / cnt;\n }",
"public void calcAvg(){\n\t\taverage = hits/atbat;\n\t\t\n\t}",
"@Override\n public double findAverage() {\n double average = 0;\n for (Student key : map.keySet()) {\n average += map.get(key).getValue();\n }\n average /= map.keySet().size();\n return average;\n }",
"public double getQuizAverage() {\r\n \r\n double[] quizScores = getLargestQuizGrades();\r\n double quizSum = 0;\r\n int quizzes = 0;\r\n \r\n for(double score : quizScores) {\r\n quizzes++;\r\n quizSum += score;\r\n }\r\n \r\n quizAverage = quizSum / quizzes; \r\n \r\n return quizAverage;\r\n }",
"double getAvgControl();",
"private double getAbsoluteAverage(double [] inputs){\n double result = 0;\n for (int i = 0; i < inputs.length; i++) {\n result+= Math.abs(inputs[i]);\n }\n result = result/inputs.length;\n return result;\n }",
"double getAvgTreatment();",
"public double getTotal(){\n double total = 0;\n for(int i=0;i<array.length; i++){\n total += array[i].doubleValue();\n }\n return total;\n }",
"public double averageTestScore() {\n double average; // Initialize the variable for the average.\n int sum = 0; // Sum of array.\n \n // Sum all the test scores in the array.\n for (int i = 0; i < testScores.length; i++) {\n if (testScores[i] < 0 || testScores[i] > 100) {\n throw new IllegalArgumentException(\"One of your test scores\" + \n \" is negative or greater than 100!\");\n }\n sum = sum + testScores[i];\n }\n \n // Calculate the average.\n average = sum / testScores.length;\n \n // Return the average.\n return average; \n }",
"public double mean() {\n\t\tif (count() > 0) {\n\t\t\treturn _sum.get() / (double) count();\n\t\t}\n\t\treturn 0.0;\n\t}",
"public static void main(String[] args) {\n\n float d = (float)sum(3.0f, (float)2.0);\n System.out.println(d);\n\n double d2=avg(3.0,2.0);\n System.out.println(d2);\n//\n// int[] list={1,2};\n// list={2,3};\n\n\n\n }",
"public double mean() { \n return StdStats.mean(result);\n\n }",
"public static void main(String[] args) {\n int a[] = { 1, 6, 8, 9, 3, 4 };\n int count = 0;\n float Average;\n int size1 = a.length;\n for (int i = 0; i < size1; i++) {\n count = count + a[i];\n\n }\n Average = count / size1;\n System.out.println(\"Average of number is: \" + Average);\n\n }",
"public static void calculateAverage(double[] inputArray, int limit)\r\n\t{\r\n\t\tIMovingAverage<Double> movingAvg = new MovingAverageImpl<Double>(limit);\r\n\t\tfor(double element : inputArray)\r\n\t\t{\r\n\t\t\tmovingAvg.add(element);\r\n\t\t\tSystem.out.println(\"Moving average is = \" +movingAvg.getAverage());\r\n\t\t}\r\n\t\tSystem.out.println(\"*********************************************************\");\r\n\t}",
"private Double getMean(Double[] values) {\n double sum = 0;\n int count = 0;\n for (Double d: values) {\n if (d != null) {\n sum += d;\n ++count;\n }\n }\n return count == 0 ? null : (sum / count);\n }",
"public double getGradeAverage() {\n int gradesTotal = 0;\n for (int grade : grades) {\n gradesTotal += grade;\n }\n return gradesTotal / grades.size();\n }",
"public static double average_negative(int[] array) {\n\t\tint counter = 0;\n\t\tdouble avg = 0;\n\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tif (array[i] < 0) {\n\t\t\t\tavg += array[i];\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t}\n\t\tif (counter == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn avg / counter;\n\t}",
"public static double average2(double[] mainArray2) {\r\n\t\tdouble average2 = 0;\r\n\t\tfor (int counter = 0; counter < mainArray2.length; counter ++) {\r\n\t\t\taverage2 += mainArray2[counter];\r\n\t\t}\r\n\t\treturn (average2 / mainArray2.length);\r\n\t}",
"public double averagePrice() {\r\n\t\tdouble sum = 0;\r\n\t\tfor(Integer price : ticketPrice) {\r\n\t\t\tsum+=price;\r\n\t\t}\r\n\t\treturn sum/ticketPrice.size();\r\n\t}",
"public double mean() {\n\t\tint n = this.getAttCount();\n\t\tif (n == 0) return Constants.UNUSED;\n\t\t\n\t\tdouble sum = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tdouble v = this.getValueAsReal(i);\n\t\t\tsum += v;\n\t\t}\n\t\t\n\t\treturn sum / (double)n;\n\t}",
"public double getAverageScore() {\n\t return this.totalScore / this.count; \n\t }"
]
| [
"0.8670593",
"0.8656264",
"0.85522115",
"0.849494",
"0.83986765",
"0.83810925",
"0.8337846",
"0.8324621",
"0.83157426",
"0.8265099",
"0.81665564",
"0.8039262",
"0.8009727",
"0.8001502",
"0.79827726",
"0.7976243",
"0.79532844",
"0.793831",
"0.79031634",
"0.7902775",
"0.7887105",
"0.7867417",
"0.7859879",
"0.78546447",
"0.78482187",
"0.78108203",
"0.7737975",
"0.7706998",
"0.76933813",
"0.76887494",
"0.7652348",
"0.76394445",
"0.76105183",
"0.7555858",
"0.7543685",
"0.7542355",
"0.7531522",
"0.74770236",
"0.74452436",
"0.7435384",
"0.7433247",
"0.7377742",
"0.73463035",
"0.7344615",
"0.7318296",
"0.7300123",
"0.72812676",
"0.72407955",
"0.7237954",
"0.7198347",
"0.7165249",
"0.7156924",
"0.7115282",
"0.71149045",
"0.7072605",
"0.70720065",
"0.7039112",
"0.7024655",
"0.701515",
"0.6974209",
"0.6967097",
"0.6872811",
"0.6870848",
"0.68601257",
"0.68470347",
"0.68457603",
"0.6836359",
"0.6824357",
"0.6800112",
"0.67862195",
"0.6780231",
"0.67663956",
"0.67585665",
"0.67142504",
"0.6707653",
"0.6700719",
"0.669059",
"0.6688028",
"0.6662947",
"0.6660791",
"0.66605484",
"0.664534",
"0.6636428",
"0.66272604",
"0.66225255",
"0.6612059",
"0.6610208",
"0.6590888",
"0.65826714",
"0.6554029",
"0.6549995",
"0.6548354",
"0.65439963",
"0.6535532",
"0.65264213",
"0.65197754",
"0.6517289",
"0.65153956",
"0.6504573",
"0.65005463"
]
| 0.85904074 | 2 |
/ Optional for implementation | @Override
public Set<Event> getNextEvents(LocalDateTime to) {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract Optional<A> val();",
"protected abstract Optional<T> getSingleSelection();",
"@Override\n\tpublic Optional<T> get() {\n\t\treturn null;\n\t}",
"default T handleNull() {\n throw new UnsupportedOperationException();\n }",
"public T caseImplementation(Implementation object)\n {\n return null;\n }",
"boolean optional();",
"private Optional() {\r\n\t\tthis.value = null;\r\n\t}",
"public Object getElseValue();",
"default boolean isPresent() {\n return get() != null;\n }",
"default boolean isPresent() {\n return get() != null;\n }",
"public ChannelFuture method_4120() {\n return null;\n }",
"public ChannelFuture method_4126() {\n return null;\n }",
"public class_1562 method_207() {\r\n return null;\r\n }",
"public abstract Any value();",
"public abstract String\n conditional();",
"default String notRequired() {\n return \"Default implementation\";\n }",
"public ChannelPromise method_4109() {\n return null;\n }",
"public ChannelFuture method_4130() {\n return null;\n }",
"public A force_get()\n {\n throw new UnsupportedOperationException();\n }",
"default Optional<T> optional(@NonNull final String key) {\n return Optional.ofNullable(get(key));\n }",
"public interface STipoOptional extends AgroludosService{\n\t/**\n\t * \n\t * @param topto\n\t * @return il tipo di optional inserito\n\t * @throws DatabaseException\n\t * @throws ValidationException\n\t */\n\tTipoOptionalTO inserisciTipoOptional(TipoOptionalTO topto) throws DatabaseException, ValidationException;\n}",
"abstract Function get(Object arg);",
"abstract public E addDefault();",
"@Override\n\t\t\tpublic Integer call() throws Exception {\n\t\t\t\treturn null;\n\t\t\t}",
"default V getOrThrow() {\n return getOrThrow(\"null\");\n }",
"protected boolean isOptional()\n {\n return false;\n }",
"interface Retrieve {}",
"@Override\n public void get() {}",
"Object getIf();",
"public interface Channel {\n\n /**\n * The name of the Channel.\n *\n * @return an optional that may contain the name of a channel.\n */\n Optional<String> getOName();\n\n /**\n * The ID of the Channel.\n *\n * @return an optional that may contain the ID of a channel.\n */\n Optional<String> getOId();\n\n /**\n * If channel ID is available, it will be returned, else the channel name will be returned.\n *\n * This method will always return a value.\n *\n * @return The channel ID if available, otherwise the channel name.\n */\n String getIdentifier();\n}",
"public ChannelFuture method_4097() {\n return null;\n }",
"public abstract O value();",
"public interface SolutionQuery {\n\n Optional<String> getUser();\n\n Optional<String> getTask();\n\n Optional<SolutionStatus> getStatus();\n\n boolean isTest();\n}",
"@Override\r\n\tpublic E poll() {\n\t\treturn null;\r\n\t}",
"@Override\n\tprotected Object doGetValue(Object source) {\n\t\treturn null;\n\t}",
"T getData() {\n return null;\n }",
"@Override\n T getCandidate();",
"public String method_211() {\r\n return null;\r\n }",
"@Override\n\tpublic void some() {\n\t\t\n\t}",
"public ChannelFuture method_4092() {\n return null;\n }",
"Optional<X> elem();",
"@Override\r\n\tpublic <T> T get() {\n\t\treturn null;\r\n\t}",
"@SuppressWarnings(\"null\")\n private ServiceInterface3 getDefaultImplFromReference() throws InvalidSyntaxException {\n Collection<ServiceReference<ServiceInterface3>> references = bundleContext.getServiceReferences(ServiceInterface3.class, \"(!(prop1=abc))\");\n ServiceInterface3 service = bundleContext.getService(references.iterator().next());\n return ((ServiceInterface3ImplSelfReferencing)service).getDefaultImplementation();\n }",
"@Override\n\tpublic ISpecies getDefault() {\n\t\treturn null;\n\t}",
"abstract public T getInfo();",
"public Object _get_interface()\n {\n throw new NO_IMPLEMENT(reason);\n }",
"@Override\n\tpublic T get(S key) throws Exception {\n\t\treturn null;\n\t}",
"public abstract Object mo1771a();",
"@Override\r\n\t\t\tpublic Object getValue() {\n\t\t\t\treturn null;\r\n\t\t\t}",
"@Override\r\n\tpublic Response invoke() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic T get() {\n\t\treturn null;\r\n\t}",
"@ImplementedBy(AWSIPConverter.class)\npublic interface IPConverter {\n Optional<String> getPublicIP(PriamInstance instance);\n}",
"@Override\n\tpublic Value apprise() {\n\t\treturn null;\n\t}",
"public None()\n {\n \n }",
"@Nullable\n public\n Object\n foo () {\n return null;\n }",
"@Override\n\tpublic String monHoc() {\n\t\treturn null;\n\t}",
"protected abstract E get(S spec);",
"Optional<String> getExtractor();",
"@Override\n\tpublic String answer() {\n\t\treturn null;\n\t}",
"private static void optionalOrElseBasic() {\n \n System.out.println(\"name remains = \"+Optional.ofNullable(\"Yassir\").orElse(\"Arafat\"));\n System.out.println(\"name changed = \"+Optional.ofNullable(null).orElse(\"Arafat\"));\n }",
"@Override\n\tpublic boolean isPresent() {\n\t\treturn false;\n\t}",
"public abstract String use();",
"private static void optionalIfPresent() {\n Optional<String> optionalOb = Optional.of(\"Yassir\");\n optionalOb.ifPresent(name -> {System.out.println(\"Name = \"+name);});\n }",
"If createIf();",
"public Channel method_4121() {\n return null;\n }",
"public abstract Any read_any();",
"default boolean isSpecial() { return false; }",
"public abstract String mo9752q();",
"public abstract Object mo26777y();",
"@Override\n\tpublic Object getValue() {\n\t\treturn null;\n\t}",
"@Nullable\n public abstract T response();",
"private Get() {}",
"private Get() {}",
"public void returnDefault();",
"@Override\n\tpublic boolean isImplemented() {\n\t\treturn false;\n\t}",
"HAPartition getHAPartition();",
"public abstract void MussBeDefined();",
"default T getOrCreate() {\n if(!isPresent()) {\n return create();\n }\n else {\n return get();\n }\n }",
"@Override\n protected Integer compute() {\n\n\n return null;\n }",
"@Override\n\tpublic Response construct() {\n\t\treturn null;\n\t}",
"public V call() throws Exception {\n\t\treturn null;\n\t}",
"public V call() throws Exception {\n\t\treturn null;\n\t}",
"@Override\n\tpublic E peek() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic E peek() {\n\t\treturn null;\n\t}",
"abstract public T doSomething();",
"default V getOrElse(V value) {\n return isEmpty() ? value : get();\n }",
"public abstract void comes();",
"private Optional(T value) {\r\n\t\tthis.value = Objects.requireNonNull(value);\r\n\t}",
"protected abstract O getResult();",
"public Object getResult()\n/* */ {\n/* 129 */ Object resultToCheck = this.result;\n/* 130 */ return resultToCheck != RESULT_NONE ? resultToCheck : null;\n/* */ }",
"default V get() {\n V item = orElseNull();\n if ( item == null )\n throw new IllegalArgumentException(\"No item at the targeted position!\");\n return item;\n }",
"public Unsafe method_4123() {\n return null;\n }",
"@Override\r\n\tpublic E pollFirst() {\n\t\treturn null;\r\n\t}",
"Object getIf1();",
"public interface Present {\n}",
"@Override\r\n\tpublic E peek() {\n\t\treturn null;\r\n\t}",
"default Optional<V> toOptional() {\n V item = orElseNull();\n return item == null ? Optional.empty() : Optional.of( item );\n }",
"Optional<T> show();",
"@Override\r\n\tprotected void intializeSpecific() {\n\r\n\t}",
"abstract int pregnancy();",
"@Override\r\n\tpublic Value interpret() {\n\t\treturn null;\r\n\t}"
]
| [
"0.6203069",
"0.62020016",
"0.6031969",
"0.5976546",
"0.59745395",
"0.58462363",
"0.5819129",
"0.57336605",
"0.57300156",
"0.57300156",
"0.5704383",
"0.569989",
"0.5691493",
"0.5666637",
"0.5658484",
"0.56425685",
"0.5633854",
"0.56332445",
"0.5619469",
"0.5607738",
"0.5604601",
"0.5594209",
"0.5592503",
"0.5585994",
"0.5577227",
"0.55517906",
"0.554305",
"0.55356437",
"0.5532489",
"0.55167526",
"0.5516252",
"0.5511754",
"0.54950535",
"0.5493603",
"0.54797864",
"0.54793656",
"0.5473355",
"0.5472315",
"0.5465636",
"0.5458692",
"0.54511446",
"0.5449382",
"0.54466414",
"0.5446636",
"0.5446099",
"0.5438518",
"0.54297143",
"0.5411837",
"0.5409854",
"0.5408628",
"0.5398876",
"0.5395285",
"0.53907716",
"0.5385139",
"0.53773373",
"0.5370325",
"0.53660434",
"0.53653353",
"0.53603464",
"0.53600705",
"0.5358089",
"0.5357337",
"0.5350559",
"0.5350161",
"0.53484416",
"0.5345875",
"0.53378403",
"0.53243935",
"0.53242445",
"0.5312889",
"0.5311101",
"0.5304294",
"0.5304294",
"0.5302887",
"0.52876943",
"0.5280752",
"0.52793056",
"0.5279035",
"0.52752894",
"0.52702016",
"0.5267364",
"0.5267364",
"0.5266563",
"0.5266563",
"0.5264649",
"0.5261904",
"0.52599627",
"0.5258003",
"0.5257281",
"0.5255584",
"0.5253584",
"0.52534443",
"0.52529013",
"0.52512676",
"0.5246454",
"0.5243512",
"0.5243112",
"0.5237393",
"0.5236904",
"0.523615",
"0.52346385"
]
| 0.0 | -1 |
TODO Autogenerated method stub | public Object executeCommand() {
if( this.newUser == null ) {
System.out.println("this.newUser == null");
return NewUserActor.NULL_USER;
}
//User currentUser = new User();
// 要求Utility增加createNewUser(User userToBeAdded),Utility的数据都在DataPool里面
System.out.println(this.newUser.getUserName());
int result=DataPool.getInstance().createNewUser(this.newUser);
// 由于底层没有实现,样例到此为止
// 剩下的事情就是Utility向数据库检查合法性checkExistUser(),和更新数据库 createNewUserData()
// 最后Utility更新DataPool并返回结果即可
if(result==-2)
{
System.out.println("USer Already Exist!!!");
return NewUserActor.USER_EXIST;
}
return NewUserActor.SUCCEED;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
]
| 0.0 | -1 |
Removes selected node by calling Children.Array.remove | public void testRemoveAndAddNodes() {
final Children c = new Array();
Node n = new AbstractNode (c);
final PListView lv = new PListView();
final ExplorerPanel p = new ExplorerPanel();
p.add(lv, BorderLayout.CENTER);
p.getExplorerManager().setRootContext(n);
p.open();
Node[] children = new Node[NO_OF_NODES];
for (int i = 0; i < NO_OF_NODES; i++) {
children[i] = new AbstractNode(Children.LEAF);
children[i].setDisplayName(Integer.toString(i));
children[i].setName(Integer.toString(i));
c.add(new Node[] { children[i] } );
}
//Thread.sleep(2000);
try {
// Waiting for until the view is updated.
// This should not be necessary
try {
SwingUtilities.invokeAndWait( new EmptyRunnable() );
} catch (InterruptedException ie) {
fail ("Caught InterruptedException:" + ie.getMessage ());
} catch (InvocationTargetException ite) {
fail ("Caught InvocationTargetException: " + ite.getMessage ());
}
p.getExplorerManager().setSelectedNodes(new Node[] {children[0]} );
} catch (PropertyVetoException pve) {
fail ("Caught the PropertyVetoException when set selected node " + children[0].getName ()+ ".");
}
for (int i = 0; i < NO_OF_NODES; i++) {
c.remove(new Node [] { children[i] } );
children[i] = new AbstractNode(Children.LEAF);
children[i].setDisplayName(Integer.toString(i));
children[i].setName(Integer.toString(i));
c.add(new Node[] { children[i] } );
//Thread.sleep(350);
}
assertEquals(NO_OF_NODES, c.getNodesCount());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void removeChildAt(int index) {children.removeElementAt(index);}",
"public void remove() {\n removeNode(this);\n }",
"@Override\n public void removeChildren()\n {\n children.clear();\n }",
"public void removeChildren() {\r\n this.children.clear();\r\n childNum = 0;\r\n }",
"public void removeChild(int index)\n/* */ {\n/* 457 */ this.children.removeElementAt(index);\n/* */ }",
"public abstract void removedFromWidgetTree();",
"public void removeChildren(QueryNode childNode);",
"public void removeChild(WSLNode node) {children.removeElement(node);}",
"@Override\n\tpublic TreeNode remove() {\n\t\treturn null;\n\t}",
"public void removeFromParent();",
"public abstract void removeChild(Node node);",
"protected void deleteSelection() {\n Iterator i = getCurrentSelection().iterator();\n while (i.hasNext()) {\n ZNode each = (ZNode) i.next();\n ZNode top = each.editor().getTop();\n ZGroup topParent = top.getParent();\n topParent.removeChild(top);\n\n fireEvent(ZGroupEvent.createNodeRemovedEvent(topParent, each, false));\n }\n }",
"@DISPID(2)\n\t// = 0x2. The runtime will prefer the VTID if present\n\t@VTID(8)\n\tvoid removeChild(@MarshalAs(NativeType.VARIANT) java.lang.Object node);",
"public void deleteSelected() {\r\n \t\tObject cells[] = graph.getSelectionCells();\r\n \t\tGraphModel graphmodel = graph.getModel();\r\n \r\n \t\t// If a cell is a blocking region avoid removing its edges and\r\n \t\t// select its element at the end of the removal process\r\n \t\tSet edges = new HashSet();\r\n \t\tSet<Object> select = new HashSet<Object>();\r\n \r\n \t\t// Set with all regions that can be deleted as its child were removed\r\n \t\tSet<Object> regions = new HashSet<Object>();\r\n \t\t// Set with all JmtCells that we are removing\r\n \t\tSet<Object> jmtCells = new HashSet<Object>();\r\n \r\n \t\t// Giuseppe De Cicco & Fabio Granara\r\n \t\t// for(int k=0; k<cells.length; k++){\r\n \t\t// if(cells[k] instanceof JmtEdge){\r\n \t\t// ((JmtCell)(graphmodel.getParent(graphmodel.getSource((JmtEdge)cells[k])))).SubOut();\r\n \t\t// ((JmtCell)(graphmodel.getParent(graphmodel.getTarget((JmtEdge)cells[k])))).SubIn();\r\n \t\t// }\r\n \t\t//\r\n \t\t// }\r\n \t\tfor (int i = 0; i < cells.length; i++) {\r\n \t\t\tif (!(cells[i] instanceof BlockingRegion)) {\r\n \t\t\t\t// Adds edge for removal\r\n \t\t\t\tedges.addAll(DefaultGraphModel.getEdges(graphmodel, new Object[] { cells[i] }));\r\n \t\t\t\t// Giuseppe De Cicco & Fabio Granara\r\n \t\t\t\t// quando vado a eliminare un nodo, a cui collegato un arco,\r\n \t\t\t\t// vado ad incrementare o diminuire il contatore per il\r\n \t\t\t\t// pulsanteAGGIUSTATUTTO\r\n \t\t\t\t// Iterator iter = edges.iterator();\r\n \t\t\t\t// while (iter.hasNext()) {\r\n \t\t\t\t// Object next = iter.next();\r\n \t\t\t\t// if (next instanceof JmtEdge){\r\n \t\t\t\t// ((JmtCell)(graphmodel.getParent(graphmodel.getSource((JmtEdge)next)))).SubOut();\r\n \t\t\t\t// ((JmtCell)(graphmodel.getParent(graphmodel.getTarget((JmtEdge)next)))).SubIn();\r\n \t\t\t\t// }\r\n \t\t\t\t//\r\n \t\t\t\t// }\r\n \t\t\t\t// Stores parents information and cell\r\n \t\t\t\tif (cells[i] instanceof JmtCell) {\r\n \t\t\t\t\tif (((JmtCell) cells[i]).getParent() instanceof BlockingRegion) {\r\n \t\t\t\t\t\tregions.add(((JmtCell) cells[i]).getParent());\r\n \t\t\t\t\t}\r\n \t\t\t\t\tjmtCells.add(cells[i]);\r\n \t\t\t\t}\r\n \t\t\t} else {\r\n \t\t\t\t// Adds node for selection\r\n \t\t\t\tObject[] nodes = graph.getDescendants(new Object[] { cells[i] });\r\n \t\t\t\tfor (Object node : nodes) {\r\n \t\t\t\t\tif (node instanceof JmtCell || node instanceof JmtEdge) {\r\n \t\t\t\t\t\tselect.add(node);\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t\t// Removes blocking region from data structure\r\n \t\t\t\tmodel.deleteBlockingRegion(((BlockingRegion) cells[i]).getKey());\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\tif (!edges.isEmpty()) {\r\n \t\t\tgraphmodel.remove(edges.toArray());\r\n \t\t}\r\n \t\t// removes cells from graph\r\n \t\tgraphmodel.remove(cells);\r\n \r\n \t\t// Checks if all children of a blocking region have been removed\r\n \t\tIterator<Object> it = regions.iterator();\r\n \t\twhile (it.hasNext()) {\r\n \t\t\tjmtCells.add(null);\r\n \t\t\tBlockingRegion region = (BlockingRegion) it.next();\r\n \t\t\tList child = region.getChildren();\r\n \t\t\tboolean empty = true;\r\n \t\t\tfor (int i = 0; i < child.size(); i++) {\r\n \t\t\t\tif (child.get(i) instanceof JmtCell && !jmtCells.contains(child.get(i))) {\r\n \t\t\t\t\tempty = false;\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tif (empty) {\r\n \t\t\t\tmodel.deleteBlockingRegion(region.getKey());\r\n \t\t\t\tgraphmodel.remove(new Object[] { region });\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\t// Removes cells from data structure\r\n \t\tfor (Object cell : cells) {\r\n \t\t\tif (cell instanceof JmtCell) {\r\n \t\t\t\tmodel.deleteStation(((CellComponent) ((JmtCell) cell).getUserObject()).getKey());\r\n \t\t\t} else if (cell instanceof JmtEdge) {\r\n \t\t\t\tJmtEdge link = (JmtEdge) cell;\r\n \t\t\t\tmodel.setConnected(link.getSourceKey(), link.getTargetKey(), false);\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\t// If no stations remains gray select and link buttons\r\n \t\tif (graph.getModel().getRootCount() == 0) {\r\n \t\t\tcomponentBar.clearButtonGroupSelection(0);\r\n \t\t\tsetConnect.setEnabled(false);\r\n \t\t\tsetSelect.setEnabled(false);\r\n \t\t}\r\n \r\n \t\t// Selects components from removed blocking regions\r\n \t\tif (select.size() > 0) {\r\n \t\t\tgraph.setSelectionCells(select.toArray());\r\n \t\t\t// Resets parent information of cells that changed parent\r\n \t\t\tit = select.iterator();\r\n \t\t\twhile (it.hasNext()) {\r\n \t\t\t\tObject next = it.next();\r\n \t\t\t\tif (next instanceof JmtCell) {\r\n \t\t\t\t\t((JmtCell) next).resetParent();\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t}",
"public void remove () { this.setAsDown(); n.remove(); }",
"public void deleteSelection() {\r\n /* Delete the node */\r\n try {\r\n deleteNode();\r\n } catch (NullPointerException e1) {\r\n }\r\n /* Delete the edge */\r\n try {\r\n deleteEdge();\r\n } catch (NullPointerException e2) {\r\n }\r\n /* Reload the scroll */\r\n scrollPane().doLayout();\r\n }",
"void removeChild(Object child);",
"public @Override E remove(int i) {\n \treturn removeNode(getNode(i));\n }",
"public abstract void remove(SubArea selectedSubArea);",
"public Node removeFromChain();",
"public final void removeFirst() {\n this.size--;\n setFirst((Node) ((Node) get()).get());\n }",
"public void removeNode()\n\t{\n\t\tif (parent != null)\n\t\t\tparent.removeChild(this);\n\t}",
"protected Tree remove(){\n if(noItems<=0){\n System.out.println(\"Q Empty. Cant remove\");\n return null;\n }else{\n return array[--noItems];\n }\n }",
"public void removeSelected()\n {\n for (int i = shapes.size() - 1; i >= 0; i--)\n {\n SceneShape s = shapes.get(i);\n if (s.isSelected()) shapes.remove(i);\n }\n repaint();\n }",
"public void removeChild( ChildType child );",
"public void removeSelection() {\n this.selection = null;\n }",
"public void removeSelectionTreeListener(final SelectionTreeListener listener);",
"public void clear()\n\t\t{ while (!children.isEmpty()) remove(children.get(0)); }",
"@objid (\"808c0839-1dec-11e2-8cad-001ec947c8cc\")\n @Override\n public void delete() {\n // List children from the end to avoid reordering of the other GMs\n for (int i = this.children.size() - 1; i >= 0; i--) {\n GmNodeModel child = this.children.get(i);\n child.delete();\n \n // When several elements have been deleted consecutively, fix the next index\n if (i > this.children.size()) {\n i = this.children.size();\n }\n }\n \n assert (this.children.isEmpty()) : \"All children should have been deleted:\" + this.children;\n \n super.delete();\n }",
"public void remove() {\n btRemove().push();\n }",
"public void remove() {\n btRemove().push();\n }",
"public void removePiece() {\n\t\troot.getChildren().clear();\n\t\tthis.piece = null;\n\t\troot.getChildren().add(rectangle);\n\t}",
"public void deleteNode ()\n {\n ConfigTreeNode node = _tree.getSelectedNode();\n ConfigTreeNode parent = (ConfigTreeNode)node.getParent();\n int index = parent.getIndex(node);\n ((DefaultTreeModel)_tree.getModel()).removeNodeFromParent(node);\n int ccount = parent.getChildCount();\n node = (ccount > 0) ?\n (ConfigTreeNode)parent.getChildAt(Math.min(index, ccount - 1)) : parent;\n if (node != _tree.getModel().getRoot()) {\n _tree.setSelectionPath(new TreePath(node.getPath()));\n }\n DirtyGroupManager.setDirty(group, true);\n }",
"public void remove();",
"public void remove();",
"public void remove();",
"public void remove();",
"public void remove();",
"public void clear()\n\t{\n\t\tthis.getChildren().clear();\n\t}",
"public void remove() {\r\n super.remove();\r\n }",
"public void remove()\n {\n ShapeParent parent = getShapeParent();\n \n if (parent != null)\n {\n parent.remove(this);\n }\n }",
"public void removeChild(int index)\n {\n children.remove(index);\n }",
"public void remove() {\n super.remove();\n }",
"public void remove() {\n super.remove();\n }",
"public void remove() {\n super.remove();\n }",
"public void remove() {\n super.remove();\n }",
"public void remove() {\n super.remove();\n }",
"public void remove() {\n super.remove();\n }",
"public void remove() {\n super.remove();\n }",
"public void remove()\n {\n removed();\n node.shapeRemoved(shape);\n }",
"public Node removeFirst() {\r\n\t\treturn removeNode(0);\r\n\t}",
"private Node removeElement(Object value) {\n if (value.equals(this.value)) {\n return this.removeElement();\n }\n\n if (((Comparable)value).compareTo(this.value) < 0) {\n if (this.leftChild != null) {\n this.leftChild = this.leftChild.removeElement(value);\n return this.balance();\n }\n } else {\n if (this.rightChild != null) {\n this.rightChild = this.rightChild.removeElement(value);\n return this.balance();\n }\n }\n return this;\n }",
"public void remove () {}",
"public void removeSelectedItem() {\r\n\t\tint i = getSelectedIndex();\r\n\t\tif(i != -1)\r\n\t\t\tlistModel.removeElementAt(i);\r\n\t}",
"private Node removeElement() {\n if (this.leftChild != null) {\n if (this.rightChild != null) {\n Node current = this.rightChild;\n\n while (current.leftChild != null) {\n current = current.leftChild;\n }\n\n //swap\n E value = this.value;\n this.value = current.value;\n current.value = value;\n\n this.rightChild = this.rightChild.removeElement(current.value);\n return this.balance();\n } else {\n return this.leftChild;\n }\n } else {\n return this.rightChild;\n }\n }",
"public void onRemoveNode(Node node) {\n\t}",
"public void remove( AnyType x )\r\n\t{\r\n\t\troot = remove( x, root );\r\n\t}",
"public void remove() {\n this.getNext().setPrev(this.getPrev());\n this.getPrev().setNext(this.getNext());\n }",
"public void remove() {\n\n\t\t\tsuprimirNodo(anterior);\n\n\t\t}",
"public void clearChildren() {\r\n this.children = null;\r\n }",
"protected void removeSelf() {\n if (!removed && parentNode != null && componentNode != null) {\n // remove this node from parent node\n parentNode.removeChild(componentNode);\n // Mark as removed\n removed = true;\n }\n }",
"@Override\n public void remove(Component c) {\n children.remove(c);\n }",
"public void cutNode ()\n {\n copyNode();\n deleteNode();\n }",
"public FileNode removeChildAt(int index) {\r\n childNum--;\r\n \treturn children.remove(index);\r\n }",
"public void removeAll() \n { \n header.rightChild = nullNode; \n }",
"public void delete() {\n this.root = null;\n }",
"public void remove() {\n\t }",
"public void remove() {\n\t }",
"public void remove() {\n\t }",
"@Test\r\n public void testSelectedRemoveLast() {\r\n int lastIndex = rawItems.size() - 1;\r\n TreeItem lastChild = (TreeItem) getRootChildren().get(lastIndex);\r\n getSelectionModel().select(lastChild);\r\n getRootChildren().remove(lastChild);\r\n }",
"public void remove() {\n\t}",
"public void remove() {\n\t}",
"public void remove() {\r\n //\r\n }",
"@Override\n\t\t\tpublic void remove() {\n\t\t\t\tthrow new UnsupportedOperationException();\n//\t\t\t\tif (i == begin || removed)\n//\t\t\t\t\tthrow new IllegalStateException();\n//\t\t\t\telements.set(i-1, null);\n//\t\t\t\tremoved = true;\n\t\t\t}",
"public void remove() {\r\n return;\r\n }",
"private void removeObject() {\n\t\tif(this.curr_obj != null) {\n this.canvas.uRemove(this.curr_obj);\n\t\t\tthis.canvas.remove(this.transformPoints);\n this.transformPoints.clear();\n\n this.curr_obj = null;\n }\n\t}",
"final void setRemove(){\n getDocument().removeSpan(this);\n for (T child: this){\n if (child instanceof SpanBranch) ((SpanBranch)child).setRemove();\n }\n }",
"public void removeAllElements();",
"@Override\n\tpublic void remove(DuNode s) {\n\t\t\n\t}",
"public void removeFromParent() { if(_parent!=null) _parent.removeChild(this); }",
"public final void remove () {\r\n }",
"public E remove(int idx) {\n\n\t\tE retVal = remove(getNode(idx));\n\n\t\tmSize--;\n\t\tmodCount++;\n\n\t\treturn retVal;\n\t}",
"private void unSelect() {\n /** if we had some object selected we need to delete it's Transformation Points. */\n if(this.action.isSelect() && this.curr_obj != null) {\n this.canvas.remove(this.transformPoints);\n this.transformPoints.clear();\n this.curr_obj = null;\n\n /** if we were in the middle of a text operation, we have to remove the TextBox and set the text to it's last version*/\n } else if(this.action.isText()) {\n int size = Integer.parseInt(currentFontSize.getItemText(currentFontSize.getSelectedIndex()));\n\n curr_obj = new Text(editor.getText());\n ((Text)curr_obj).setFont(currFont);\n addTextObject(curr_obj, (int)aux_obj.getX() + (int)((1.0/4.0)*size), (int)aux_obj.getY()+ (size) + (int)((1.0/4.0)*size));\n\n aux_obj = null;\n curr_obj = null;\n apanel.remove(editor);\n editor = null;\n action.setAction(Action.TEXTBOX);\n }\n }",
"private void deleteHierarchyData(TreePath[] selRows) {\r\n SponsorHierarchyBean delBean;\r\n CoeusVector delData = new CoeusVector();\r\n TreePath treePath=selRows[selRows.length-1];\r\n DefaultMutableTreeNode selNode = (DefaultMutableTreeNode)treePath.getLastPathComponent();\r\n int selRow=sponsorHierarchyTree.getRowForPath(treePath);\r\n String optionPaneMsg=EMPTY_STRING;\r\n if(selNode.isRoot()) return;\r\n if(!selNode.getAllowsChildren()) {\r\n if(selRows.length > 1) {\r\n optionPaneMsg = coeusMessageResources.parseMessageKey(\"maintainSponsorHierarchy_exceptionCode.1252\");\r\n }else {\r\n optionPaneMsg = \"Do you want to remove the sponsor \"+selNode.toString()+\" from the hierarchy?\";\r\n }\r\n int optionSelected = CoeusOptionPane.showQuestionDialog(optionPaneMsg,CoeusOptionPane.OPTION_YES_NO,CoeusOptionPane.DEFAULT_NO);\r\n if(optionSelected == CoeusOptionPane.SELECTION_YES) {\r\n for (int index=selRows.length-1; index>=0; index--) {\r\n treePath = selRows[index];\r\n selRow = sponsorHierarchyTree.getRowForPath(treePath);\r\n selNode = (DefaultMutableTreeNode)treePath.getLastPathComponent();\r\n int endIndex = selNode.toString().indexOf(\":\");\r\n Equals getRowData = new Equals(\"sponsorCode\",selNode.toString().substring(0,endIndex == -1 ? selNode.toString().length():endIndex));\r\n CoeusVector cvFilteredData = getDeleteData(cvHierarchyData.filter(getRowData));\r\n delBean = (SponsorHierarchyBean)cvFilteredData.get(0);\r\n delBean.setAcType(TypeConstants.DELETE_RECORD);\r\n flushBean(delBean);//Added for bug fix Start #1830\r\n model.removeNodeFromParent(selNode);\r\n delData.addAll(cvFilteredData);\r\n saveRequired = true;\r\n }\r\n }\r\n } else {\r\n \r\n// int optionSelected = CoeusOptionPane.showQuestionDialog(\"Do you want to remove the Group \"+selNode.toString()+\" all its children from the hierarchy.\",CoeusOptionPane.OPTION_YES_NO,CoeusOptionPane.DEFAULT_YES);\r\n int optionSelected = -1;\r\n try{\r\n if(selNode != null && selNode.getLevel() == 1 && isPrintingHierarchy && isFormsExistInGroup(selNode.toString())){\r\n optionSelected = CoeusOptionPane.showQuestionDialog(\"Do you want to remove the group \"+selNode.toString()+\" , all its children and associated sponsor forms from the hierarchy?\",CoeusOptionPane.OPTION_YES_NO,CoeusOptionPane.DEFAULT_NO);\r\n }else{\r\n optionSelected = CoeusOptionPane.showQuestionDialog(\"Do you want to remove the Group \"+selNode.toString()+\" , all its children from the hierarchy.\",CoeusOptionPane.OPTION_YES_NO,CoeusOptionPane.DEFAULT_NO);\r\n }\r\n }catch(CoeusUIException coeusUIException){\r\n CoeusOptionPane.showDialog(coeusUIException);\r\n return ;\r\n }\r\n if(optionSelected == CoeusOptionPane.SELECTION_YES) {\r\n //Case#2445 - proposal development print forms linked to indiv sponsor, should link to sponsor hierarchy - Start\r\n if(isPrintingHierarchy && selectedNode.getLevel() == 1){\r\n TreeNode root = (TreeNode)sponsorHierarchyTree.getModel().getRoot();\r\n TreePath result = findEmptyGroup(sponsorHierarchyTree, new TreePath(root));\r\n if( result == null){\r\n try{\r\n deleteForms(selNode.toString());\r\n }catch(CoeusUIException coeusUIException){\r\n CoeusOptionPane.showDialog(coeusUIException);\r\n return ;\r\n }\r\n }\r\n }\r\n Equals getRowData = new Equals(fieldName[selNode.getLevel()],selNode.toString());\r\n CoeusVector cvFilteredData = getDeleteData(cvHierarchyData.filter(getRowData));//Modified for bug fix Start #1830\r\n model.removeNodeFromParent(selNode);\r\n for (int i=0; i<cvFilteredData.size(); i++) {\r\n delBean = (SponsorHierarchyBean)cvFilteredData.get(i);\r\n delBean.setAcType(TypeConstants.DELETE_RECORD);\r\n flushBean(delBean);//Added for bug fix Start #1830\r\n saveRequired = true;\r\n }\r\n delData.addAll(cvFilteredData);\r\n }\r\n }\r\n if(selRow < sponsorHierarchyTree.getRowCount() && \r\n ((DefaultMutableTreeNode)sponsorHierarchyTree.getPathForRow(selRow).getLastPathComponent()).getAllowsChildren() && !selNode.getAllowsChildren())\r\n sponsorHierarchyTree.setSelectionPath(treePath.getParentPath());\r\n else\r\n if(selRow >= sponsorHierarchyTree.getRowCount())\r\n selRow = 0;\r\n sponsorHierarchyTree.setSelectionRow(selRow);\r\n \r\n groupsController.refreshTableData(delData);\r\n }",
"public void removeVertex();",
"@Override\n\tpublic Node removeNode() {\n\t\tif(isEmpty())\n\t\t\treturn null;\n\t\t// BreadthFirstSearch using a queue, first in first out principle\n\t\treturn frontier.removeFirst();\n\t}",
"void remove();",
"void remove();",
"void remove();",
"void remove();",
"void remove();",
"public void remove() {\n\n }",
"public @Override void removeUpdate(DocumentEvent evt, Shape a, ViewFactory f) {\n if (children == null && getParent() == null) {\n return;\n }\n\n if (useCustomReloadChildren()) {\n customRemoveUpdate(evt, a, f);\n } else {\n super.removeUpdate(evt, a, f); // default element-based update\n }\n }",
"@Override\n\tpublic E remove(int index) {\n\t\trangeCheck(index);\n\t\t\n\t\treturn remove(node(index));\n\t}",
"public void remove(){\n if(!isAfterNext)//flag false so next has not been called\n {\n throw new IllegalStateException();\n \n }\n if(position == first){\n removeFirst();//calls LL method because we re an inner class\n \n }\n else{\n previous.next = position.next;// move ref of previou to node after me \n }\n position = previous; \n isAfterNext= false;\n //first call to remove the current position reverts to the predecessor \n //of remove element thus predecessor is no longer known \n }",
"public Object remove();",
"@Override\n\tpublic void remove() { }",
"public void removeNode (int id)\r\n {\r\n uNodes.remove(id); //hard remove; See undo/redo/History.java\r\n }",
"@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}",
"public void clearRemovalTag() {\n\t levelOfRemoval = 0;\n\t}"
]
| [
"0.72711575",
"0.72448546",
"0.7150731",
"0.71377856",
"0.7011218",
"0.7006864",
"0.7006234",
"0.69475406",
"0.6932894",
"0.6819907",
"0.67705804",
"0.67426264",
"0.6739461",
"0.6690507",
"0.6677841",
"0.66379416",
"0.66002196",
"0.65416574",
"0.6524875",
"0.6524694",
"0.6519772",
"0.64926213",
"0.6479541",
"0.6473788",
"0.6458451",
"0.6457833",
"0.6437216",
"0.642348",
"0.63974535",
"0.6385348",
"0.6385348",
"0.6356871",
"0.6350487",
"0.6344445",
"0.6344445",
"0.6344445",
"0.6344445",
"0.6344445",
"0.63283336",
"0.63246423",
"0.63019633",
"0.629075",
"0.62895024",
"0.62895024",
"0.62895024",
"0.62895024",
"0.62895024",
"0.62895024",
"0.62895024",
"0.62823313",
"0.62808836",
"0.6271313",
"0.62545526",
"0.62453556",
"0.6231405",
"0.6221579",
"0.62193173",
"0.6215695",
"0.62142444",
"0.62049025",
"0.6189447",
"0.61813056",
"0.6154115",
"0.6149306",
"0.6144336",
"0.61402375",
"0.6135566",
"0.6135566",
"0.6135566",
"0.6126163",
"0.610969",
"0.610969",
"0.61084944",
"0.61070824",
"0.6095149",
"0.6087199",
"0.60864806",
"0.6079668",
"0.6075774",
"0.6058794",
"0.6020024",
"0.6016501",
"0.6006325",
"0.60030717",
"0.5996565",
"0.5996225",
"0.59904355",
"0.59904355",
"0.59904355",
"0.59904355",
"0.59904355",
"0.59851056",
"0.5984345",
"0.59789956",
"0.59786135",
"0.59769714",
"0.5974919",
"0.5973068",
"0.59669423",
"0.59669423",
"0.59637725"
]
| 0.0 | -1 |
Creates two nodes. Selects one and tries to remove it and replace with the other one (several times). | public void testNodeAddingAndRemoving() {
final Children c = new Array();
Node n = new AbstractNode (c);
final PListView lv = new PListView();
final ExplorerPanel p = new ExplorerPanel();
p.add(lv, BorderLayout.CENTER);
p.getExplorerManager().setRootContext(n);
p.open();
final Node c1 = new AbstractNode(Children.LEAF);
c1.setDisplayName("First");
c1.setName("First");
c.add(new Node[] { c1 });
Node c2 = new AbstractNode(Children.LEAF);
c2.setDisplayName("Second");
c2.setName("Second");
//Thread.sleep(500);
for (int i = 0; i < 5; i++) {
c.remove(new Node[] { c1 });
c.add(new Node[] { c2 });
// Waiting for until the view is updated.
// This should not be necessary
try {
SwingUtilities.invokeAndWait( new EmptyRunnable() );
} catch (InterruptedException ie) {
fail ("Caught InterruptedException:" + ie.getMessage ());
} catch (InvocationTargetException ite) {
fail ("Caught InvocationTargetException: " + ite.getMessage ());
}
try {
p.getExplorerManager().setSelectedNodes(new Node[] {c2} );
} catch (PropertyVetoException pve) {
fail ("Caught the PropertyVetoException when set selected node " + c2.getName ()+ ".");
}
c.remove(new Node[] { c2 });
c.add(new Node[] { c1 });
//Thread.sleep(350);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Node replaceChild(Node newChild, Node oldChild);",
"private Node delete(Order ord2) {\n\t\treturn null;\n\t}",
"public void union(Node a, Node b) {\n Node set1 = find(a);\n Node set2 = find(b);\n\n if (set1 != set2) {\n // Limits the worst case runtime of a find to O(log N)\n if (set1.getSize() < set2.getSize()) {\n set2.setParent(set1);\n set1.setSize(set1.getSize() + set2.getSize());\n }\n else {\n set1.setParent(set2);\n set2.setSize(set1.getSize() + set2.getSize());\n }\n }\n }",
"private void swapNode(Node node1, Node node2) {\n Node parent1 = node1.parent;\n Node parent2 = node2.parent;\n\n //Optimization: if nodes are siblings, just change their positions\n if (parent1 == parent2) {\n parent1.left = node2;\n parent1.right = node1;\n return;\n }\n\n //If the two nodes have different parent node\n //if node1 is left child of parent1\n if (parent1.left == node1) {\n parent1.left = node2;\n }\n //if node1 is right child of parent1\n else {\n parent1.right = node2;\n }\n\n //if node2 is left child of parent2\n if (parent2.left == node2) {\n parent2.left = node1;\n }\n //if node2 is right child of parent2\n else {\n parent2.right = node1;\n }\n //change parents of both nodes\n node1.parent = parent2;\n node2.parent = parent1;\n }",
"public void cutNode ()\n {\n copyNode();\n deleteNode();\n }",
"public void transferLink(Node one, Node two){ \n\t\t//System.out.println(\" in transferLink\");\n\t\tif (one.parent == nil){\n\t\t\t//System.out.println(\" u is root \" + u.id + \" v is \" + v.id);\n\t root=two;\n\t }else if(one==one.parent.right){\n\t \tone.parent.right = two; \n\t }else{\n\t \tone.parent.left = two;\n\t }\n\t \n\t two.parent = one.parent;\n\t}",
"static void compressTwoNode(ExecutableNodeBase node, ExecutableNodeBase parent) {\n if (!(node instanceof QueryNodeBase) || !(parent instanceof QueryNodeBase)) {\n return;\n }\n QueryNodeBase parentQuery = (QueryNodeBase) parent;\n QueryNodeBase nodeQuery = (QueryNodeBase) node;\n\n // Change the query of parents\n BaseTable placeholderTableinParent =\n ((QueryNodeWithPlaceHolders) parent)\n .getPlaceholderTables()\n .get(parent.getExecutableNodeBaseDependents().indexOf(node));\n ((QueryNodeWithPlaceHolders) parent).getPlaceholderTables().remove(placeholderTableinParent);\n\n // If temp table is in from list of parent, just direct replace with the select query of node\n boolean find = false;\n for (AbstractRelation table : parentQuery.getSelectQuery().getFromList()) {\n if (table instanceof BaseTable && table.equals(placeholderTableinParent)) {\n int index = parentQuery.getSelectQuery().getFromList().indexOf(table);\n nodeQuery\n .getSelectQuery()\n .setAliasName(\n parentQuery.getSelectQuery().getFromList().get(index).getAliasName().get());\n parentQuery.getSelectQuery().getFromList().set(index, nodeQuery.getSelectQuery());\n find = true;\n break;\n } else if (table instanceof JoinTable) {\n for (AbstractRelation joinTable : ((JoinTable) table).getJoinList()) {\n if (joinTable instanceof BaseTable && joinTable.equals(placeholderTableinParent)) {\n int index = ((JoinTable) table).getJoinList().indexOf(joinTable);\n nodeQuery.getSelectQuery().setAliasName(joinTable.getAliasName().get());\n ((JoinTable) table).getJoinList().set(index, nodeQuery.getSelectQuery());\n find = true;\n break;\n }\n }\n if (find) break;\n }\n }\n\n // Otherwise, it need to search filter to find the temp table\n if (!find) {\n List<SubqueryColumn> placeholderTablesinFilter =\n ((QueryNodeWithPlaceHolders) parent).getPlaceholderTablesinFilter();\n for (SubqueryColumn filter : placeholderTablesinFilter) {\n if (filter.getSubquery().getFromList().size() == 1\n && filter.getSubquery().getFromList().get(0).equals(placeholderTableinParent)) {\n filter.setSubquery(nodeQuery.getSelectQuery());\n }\n }\n }\n\n // Move node's placeholderTable to parent's\n ((QueryNodeWithPlaceHolders) parent)\n .placeholderTables.addAll(((QueryNodeWithPlaceHolders) node).placeholderTables);\n\n // Compress the node tree\n parentQuery.cancelSubscriptionTo(nodeQuery);\n for (Pair<ExecutableNodeBase, Integer> s : nodeQuery.getSourcesAndChannels()) {\n parentQuery.subscribeTo(s.getLeft(), s.getRight());\n }\n // parent.getListeningQueues().removeAll(node.broadcastingQueues);\n // parent.getListeningQueues().addAll(node.getListeningQueues());\n // parent.dependents.remove(node);\n // parent.dependents.addAll(node.dependents);\n // for (BaseQueryNode dependent:node.dependents) {\n // dependent.parents.remove(node);\n // dependent.parents.add(parent);\n // }\n }",
"private Node caseTwoChildren(Node deleteThis) {\r\n\r\n Node next = getMin(deleteThis.getRight()),\r\n child, parent;\r\n deleteThis.setKey(next.getKey());\r\n child = next.getRight();\r\n parent = next.getParent();\r\n if (parent.getLeft() == next) {\r\n parent.setLeft(child);\r\n } else {\r\n parent.setRight(child);\r\n }\r\n if (child != null) {\r\n child.setParent(parent);\r\n }\r\n return next;\r\n }",
"private void fxml2Node(ViewsEnum fxml, Node node) {\n navBanner.getChildren().get(selectedMenuOption).getStyleClass().remove(\"selected_option\");\n int newIndex = navBanner.getChildren().indexOf(node);\n selectedMenuOption = (newIndex != -1) ? newIndex : selectedMenuOption;\n navBanner.getChildren().get(selectedMenuOption).getStyleClass().add(\"selected_option\");\n // Clean body\n Node tmp[] = new Node[2];\n tmp[0] = body.getChildren().get(0);\n tmp[1] = body.getChildren().get(1);\n body.getChildren().setAll(tmp[0], tmp[1]);\n // Load new content\n FXMLLoader fxmlLoader = new FXMLLoader();\n Node root = null;\n try {\n root = fxmlLoader.load(sample.Main.class.getResource(\"views/\" +fxmlList.get(fxml)+\".fxml\"));\n } catch (IOException e) {\n e.printStackTrace();\n }\n // Add new node\n body.getChildren().add(root);\n }",
"void arbitraryRemove(Nodefh node){\n\t\n\t\tif(node.Parent.Child == node){\n\t\t\tif(node.Right != null && node.Right != node){\n\t\t\t\tnode.Parent.Child = node.Right;\n\t\t\t\tif(node.Left!=null && node.Left != node){\n\t\t\t\t\tnode.Left.Right = node.Right;\n\t\t\t\t\tnode.Right.Left = node.Left;\n\t\t\t\t\tnode.Parent = null;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tnode.Right.Left = node.Right;\n\t\t\t\t\tnode.Parent = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tnode.Parent.Child = null;\n\t\t\t\tnode.Parent = null;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif(node.Left != null && node.Left != node){\n\t\t\t\tnode.Left.Right = node.Right;\n\t\t\t\tnode.Right.Left = node.Left;\n\t\t\t}\n\t\t\tnode.Parent = null;\n\n\t\t}\n\t\tif(node.Child!=null){\n\t\t\tNodefh temp = node.Child;\n\t\t\tif(node.Child.Right!=null){\n\t\t\t\ttemp = node.Child.Right;\n\t\t\t}\n\t\t\tfhInsert(node.Child);\n\t\t\twhile(temp!=node.Child.Right){\n\t\t\t\tfhInsert(temp);\n\t\t\t\ttemp = temp.Right;\n\t\t\t}\n\n\t\t}\n\n\t}",
"private synchronized void swapElements(Object newParam, int index1,\n\t\t\tint index2) {\n\n\t\t// the two elements to be swapped\n\t\tLinearElement firstElement = root.getVector().get(index1);\n\t\tLinearElement secondElement = root.getVector().get(index2);\n\n\t\t// the two elements after each of the elements to be swapped\n\t\tLinearElement secondElementNext;\n\t\tLinearElement firstElementNext;\n\t\t/*\n\t\t * There is a corner case where secondElement.previousChild is\n\t\t * firstElement\n\t\t */\n\n\t\t// the first element's previous child before it is reassigned\n\t\tLinearElement tempPrevChild = firstElement.getPreviousChild();\n\n\t\tif (index2 != index1 + 1) {// the elements are not adjacent\n\n\t\t\t// set previous elements for the two nodes\n\t\t\tfirstElement.setPreviousChild(secondElement.getPreviousChild());\n\t\t\tsecondElement.setPreviousChild(tempPrevChild);\n\n\t\t\t// set previous elements for the nodes referencing the swapped nodes\n\t\t\tif (index1 + 1 < root.getVector().size()) {\n\t\t\t\tfirstElementNext = root.getVector().get(index1 + 1);\n\t\t\t\tfirstElementNext.setPreviousChild(secondElement);\n\t\t\t}\n\t\t\tif (index2 + 1 < root.getVector().size()) {\n\t\t\t\tsecondElementNext = root.getVector().get(index2 + 1);\n\t\t\t\tsecondElementNext.setPreviousChild(firstElement);\n\t\t\t}\n\n\t\t} else { // the elements are adjacent\n\t\t\tfirstElement.setPreviousChild(secondElement);\n\t\t\tsecondElement.setPreviousChild(tempPrevChild);\n\n\t\t\t// set previous elements for the nodes referencing the second node\n\t\t\tif (index2 + 1 < root.getVector().size()) {\n\t\t\t\tsecondElementNext = root.getVector().get(index2 + 1);\n\t\t\t\tsecondElementNext.setPreviousChild(firstElement);\n\t\t\t}\n\t\t}\n\n\t\t// swap the elements in root\n\t\troot.getVector().swap(index1, index2);\n\n\t\troot.focusPosition();\n\t}",
"private static void simplify (GraphUndirected<NodeCppOSM, EdgeCppOSM> osmGraph) {\n \t\tfinal Iterator<NodeCppOSM> iteratorNodes = osmGraph.getNodes().iterator();\n \t\twhile (iteratorNodes.hasNext()) {\n \t\t\tfinal NodeCppOSM node = iteratorNodes.next();\n \t\t\tif (node.getDegree() == 2) {\n \t\t\t\t// get the ids of the two connected nodes\n \t\t\t\tfinal Long currentNodeId = node.getId();\n \t\t\t\tfinal List<EdgeCppOSM> edges = node.getEdges();\n \t\t\t\tfinal EdgeCppOSM edge1 = edges.get(0);\n \t\t\t\tfinal EdgeCppOSM edge2 = edges.get(1);\n \t\t\t\tfinal Long node1id = edge1.getNode1().getId() == (currentNodeId) ? edge1.getNode2().getId() : edge1.getNode1().getId();\n \t\t\t\tfinal Long node2id = edge2.getNode1().getId() == (currentNodeId) ? edge2.getNode2().getId() : edge2.getNode1().getId();\n \t\t\t\tif (currentNodeId == node1id){\n \t\t\t\t\t// we are in a loop and do not erase ourself\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n \t\t\t\t// concat the list in the right way\n \t\t\t\tList<WayNodeOSM> newMetaNodes = concatMetanodes(edge1.getMetadata().getNodes(), edge2.getMetadata().getNodes(), currentNodeId);\n \t\t\t\t// add a new edge\n \t\t\t\t// TODO: Handle way properly - what would name be in this context?\n \t\t\t\t// TODO: names\n \t\t\t\tosmGraph.getNode(node1id).connectWithNodeWeigthAndMeta(osmGraph.getNode(node2id), edge1.getWeight() + edge2.getWeight(),\n\t\t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, edge1.getMetadata().getName()+edge2.getMetadata().getName(), newMetaNodes));\n \t\t\t\t// remove the old node\n \t\t\t\t// do this manually because we otherwise corrupt the iterator\n \t\t\t\tnode.removeAllEdges();\n \t\t\t\titeratorNodes.remove();\n \t\t\t}\n \t\t}\n \t}",
"public void removeNodeAfter() { cursor = cursor.getNext().getNext(); }",
"private BSTNode<E> replacementSubtreeFromChildren(BSTNode<E> left,\r\n\t\t\tBSTNode<E> right) {\r\n\t\t\r\n\t\tif (left == null && right == null)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\tif (left != null && right == null)\r\n\t\t\treturn left;\r\n\t\tif (left == null && right != null)\r\n\t\t\treturn right;\r\n\t\t\r\n\t\tBSTNode<E> root = null;\r\n\t\t\r\n\t\troot = right;\r\n\t\twhile (root.left != null) {\r\n\t\t\troot = root.left;\r\n\t\t}\r\n\t\tright = right.remove(root.value);\r\n\t\t\r\n\t\t\r\n\t\troot.left = left;\r\n\t\troot.right = right;\r\n\t\t\r\n\t\t// not a simple case => return modified node\r\n\t\treturn root;\r\n\t}",
"public Node2 delete() {\n \tNode2 temp = first;\n\t first = first.nextLink;\n\t first.nextLink.prevLink = null;\n\t return temp;\n }",
"public ListNode swapNodes(ListNode head, int v1, int v2) {\n ListNode start = new ListNode(0);\n start.next = head;\n ListNode preOne = null;\n ListNode preTwo = null;\n\n ListNode search = start;\n\n while (search.next != null) {\n ListNode next = search.next;\n if (next.val == v1) {\n preOne = search;\n }\n if (next.val == v2) {\n preTwo = search;\n }\n search = next;\n }\n if (preOne == null || preTwo == null) {\n return start.next;\n }\n\n\n ListNode one = preOne.next;\n ListNode two = preTwo.next;\n if (two.next == one) {\n preTwo.next = one;\n two.next = one.next;\n one.next = two;\n return start.next;\n } else if (one.next == two) {\n preOne.next = two;\n one.next = two.next;\n two.next = one;\n return start.next;\n }\n ListNode befone = preOne.next.next;\n ListNode beftwo = preTwo.next.next;\n one.next = beftwo;\n two.next = befone;\n preOne.next = two;\n preTwo.next = one;\n return start.next;\n }",
"private void deleteNode(Node<K> p) {\n // If strictly internal, copy successor's element to p and then make p\n // point to successor.\n if (p.left != null && p.right != null) {\n Node<K> s = successor(p); // 节点有 2 个子节点时,找到实际删除的后继节点\n p.key = s.key; // 将后继节点的值复制到原来节点上,原来的节点只是值被删除,节点本身不删除\n p = s; // 将实际要删除的节点位置指向后继节点位置\n } // p has 2 children //\n // //////////////////////////////////////////////////////////////////\n // Start fixup at replacement node, if it exists. //\n Node<K> replacement = (p.left != null ? p.left : p.right); // 实际删除的节点最多只有一个子节点,并且一定是红色子节点\n if (replacement != null) { // 如果有一个红色子节点\n // Link replacement to parent //\n replacement.parent = p.parent; // 将此节点上移\n if (p.parent == null) //\n root = replacement; //\n else if (p == p.parent.left) // 实际被删除的节点 p 为左子\n p.parent.left = replacement; //\n else // 实际被删除的节点 p 为右子\n p.parent.right = replacement; //\n // //\n // Null out links so they are OK to use by fixAfterDeletion. //\n p.left = p.right = p.parent = null; //\n // //\n // Fix replacement //////////////////////////////////////////////////////////////////\n if (p.color == BLACK) // 删除情形 5. 因为 replacement 是红节点,所以这里 p 的颜色一定是黑色的\n fixAfterDeletion(replacement); // 修复只要将此红节点上移并置黑就完成了\n } else if (p.parent == null) { // return if we are the only node. //////////////////////////////////////////////////////////////////\n root = null; // 根节点被删除\n } else { // No children. Use self as phantom replacement and unlink. // 被删除的节点没有子节点时\n if (p.color == BLACK) // 如果是红色的节点,直接删除就完成\n fixAfterDeletion(p); // 如果被删除的是黑色节点,则会破坏红黑树性质 5,需要修复红黑树\n\n if (p.parent != null) {\n if (p == p.parent.left)\n p.parent.left = null;\n else if (p == p.parent.right)\n p.parent.right = null;\n p.parent = null;\n }\n }\n }",
"private void deleteNode(Node n) {\n n.next.pre = n.pre;\n n.pre.next = n.next;\n }",
"private void swap(int index1, int index2) {\n \t\tNode node1 = getNode(index1);\n \t\tNode node2 = getNode(index2);\n \t\tthis.contents.set(index1, node2);\n \t\tthis.contents.set(index2, node1);\n \t}",
"public Node insertAfter(Node node);",
"public void setNode_2(String node_2);",
"private Node insert(Order ord2) {\n\t\treturn null;\n\t}",
"private void CreateTree()\r\n\t{\r\n\r\n\t\t//sample nodes which are not identical\r\n\t\ta = new Node(1);\r\n\t\ta.left = new Node(3);\r\n\t\ta.left.left = new Node(5);\r\n\t\ta.right = new Node(2);\r\n\r\n\r\n\t\tb = new Node(2);\r\n\t\tb.left = new Node(1);\r\n\t\tb.right = new Node(3);\r\n\t\tb.right.right = new Node(7);\r\n\t\tb.left.right = new Node(4);\r\n\r\n\t\t//sample nodes which are identical\r\n\t\ta1 = new Node(1);\r\n\t\ta1.left = new Node(3);\r\n\t\ta1.left.left = new Node(5);\r\n\t\ta1.right = new Node(2);\r\n\r\n\r\n\t\tb1 = new Node(1);\r\n\t\tb1.left = new Node(3);\r\n\t\tb1.right = new Node(2);\r\n\t\tb1.left.left = new Node(5); \r\n\t}",
"public void insertNewNode(int newElement ) \n { \n current = parent = grand = header; //set header value to current, parent, and grand node \n nullNode.element = newElement; //set newElement to the element of the null node \n \n //repeat statements until the element of the current node will not equal to the value of the newElement \n while (current.element != newElement) \n { \n great = grand; \n grand = parent; \n parent = current; \n \n //if the value of the newElement is lesser than the current node element, the current node will point to the current left child else point to the current right child. \n current = newElement < current.element ? current.leftChild : current.rightChild; \n \n // Check whether both the children are RED or NOT. If both the children are RED change them by using handleColors() method \n if (current.leftChild.color == RED && current.rightChild.color == RED) \n handleColors( newElement ); \n } \n \n // insertion of the new node will be fail if will already present in the tree \n if (current != nullNode) \n return; \n \n //create a node having no left and right child and pass it to the current node \n current = new RedBlackNode(newElement, nullNode, nullNode); \n \n //connect the current node with the parent \n if (newElement < parent.element) \n parent.leftChild = current; \n else \n parent.rightChild = current; \n handleColors( newElement ); \n }",
"void transplantNode(TreeNode nodeTodelete, TreeNode replacementNode, TreeNode nullNode) {\n assert nodeTodelete != nullNode;\n if (nodeTodelete.getParent() == nullNode) {\n // root Node\n this.root = replacementNode;\n } else if (nodeTodelete.getParent().getLeft() == nodeTodelete) {\n nodeTodelete.getParent().setLeft(replacementNode);\n } else {\n nodeTodelete.getParent().setRight(replacementNode);\n }\n\n if (replacementNode != nullNode) {\n replacementNode.setParent(nodeTodelete.getParent());\n }\n }",
"private void deleteFixup(Node<K, V> x) {\n\t\t\n\t}",
"private void swapLeaves(int firstLeaf, int secondLeaf) {\r\n\t\tNode temp = this.treeNodes[firstLeaf];\r\n\t\tthis.treeNodes[firstLeaf] = this.treeNodes[secondLeaf];\r\n\t\tthis.treeNodes[secondLeaf] = temp;\r\n\t}",
"public Node getNewNode(){\n for (Node n:nodes) {\n if(n.isNewTag()){\n return n;\n }\n }\n return null;\n }",
"public void createSubs(List<QueryTreeNode> subQueries) {\r\n\t\tif (!isBranchIndexed()) {\r\n\t\t\t//nothing to do, stop searching this branch\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t//If op=OR and if and sub-nodes are indexed, then we split.\r\n\t\tif (LOG_OP.OR.equals(op)) {\r\n\t\t\t//clone both branches (WHY ?)\r\n\t\t\tQueryTreeNode node1;\r\n\t\t\tif (n1 != null) {\r\n\t\t\t\tnode1 = n1;\r\n\t\t\t} else {\r\n\t\t\t\tn1 = node1 = new QueryTreeNode(null, t1, null, null, null, false);\r\n\t\t\t\tt1 = null;\r\n\t\t\t}\r\n\t\t\tQueryTreeNode node2;\r\n\t\t\tif (n2 != null) {\r\n\t\t\t\tnode2 = n2.cloneBranch();\r\n\t\t\t} else {\r\n\t\t\t\tn2 = node2 = new QueryTreeNode(null, t2, null, null, null, false);\r\n\t\t\t\tt2 = null;\r\n\t\t\t}\r\n\t\t\t//we remove the OR from the tree and assign the first clone/branch to any parent\r\n\t\t\tQueryTreeNode newTree;\r\n\t\t\tif (p != null) {\r\n\t\t\t\t//remove local OR and replace with n1\r\n\t\t\t\tif (p.n1 == this) {\r\n\t\t\t\t\tp.n1 = node1;\r\n\t\t\t\t\tp.t1 = null;\r\n\t\t\t\t\tp.relateToChildren();\r\n\t\t\t\t} else if (p.n2 == this) {\r\n\t\t\t\t\tp.n2 = node1;\r\n\t\t\t\t\tp.t2 = null;\r\n\t\t\t\t\tp.relateToChildren();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow new IllegalStateException();\r\n\t\t\t\t}\r\n\t\t\t\t//clone and replace with child number n2/t2\r\n\t\t\t\t//newTree = cloneSingle(n2, t2, null, null);\r\n\t\t\t} else {\r\n\t\t\t\t//no parent.\r\n\t\t\t\t//still remove this one and replace it with the first sub-node\r\n\t\t\t\t//TODO should we use a set for faster removal?\r\n\t\t\t\tsubQueries.remove(this);\r\n\t\t\t\tsubQueries.add(node1);\r\n\t\t\t\tnode1.p = null;\r\n\t\t\t\tif (node2 != null) {\r\n\t\t\t\t\tnode2.p = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//now treat second branch and create a new parent for it, if necessary.\r\n\t\t\tif (p != null) {\r\n\t\t\t\tnewTree = p.cloneTrunk(node1, node2);\r\n\t\t\t} else {\r\n\t\t\t\tnewTree = node2;\r\n\t\t\t}\r\n\t\t\t//subQueriesCandidates.add(newTree.root());\r\n\t\t\tnewTree.createSubs(subQueries);\r\n\t\t\tsubQueries.add(newTree.root());\r\n\t\t}\r\n\t\t\r\n\t\t//go into sub-nodes\r\n\t\tif (n1 != null) {\r\n\t\t\tn1.createSubs(subQueries);\r\n\t\t}\r\n\t\tif (n2 != null) {\r\n\t\t\tn2.createSubs(subQueries);\r\n\t\t}\r\n\t}",
"private void removeNode(DLinkedNode node){\n DLinkedNode pre = node.pre;\n DLinkedNode post = node.post;\n\n pre.post = post;\n post.pre = pre;\n }",
"void forceRemoveNodesAndExit(Collection<Node> nodesToRemove) throws Exception;",
"private TreeNode<K> combine(TreeNode<K> x, TreeNode<K> y) {\n TreeNode<K> z = new TreeNode<K>();\n z.left = x;\n z.right = y;\n z.rank = x.rank + 1;\n sift(z);\n return z;\n }",
"void removeDirectedEdge(final Node first, final Node second)\n {\n if (first.connectedNodes.contains(second))\n first.connectedNodes.remove(second);\n\n }",
"public void mergeDisjoint(UFPartition<T> p2){\r\n\t\tp2 = p2.clone();\r\n\t\tfor(Node<T> n : p2.nodes.values()) {\r\n\t\t\tassert !nodes.containsKey(n.getE());\r\n\t\t\tnodes.put(n.getE(), new Node<T>(n.getE()));\r\n\t\t}\r\n\t\tfor(Node<T> n : p2.nodes.values()) {\r\n\t\t\tNode<T> newNode = getNode(n.getE());\r\n\t\t\tNode<T> newNodeRoot = getNode(n.getRoot().getE());\r\n\t\t\tnewNode.setParent(newNodeRoot);\r\n\t\t\tnodes.put(n.getE(), new Node<T>(n.getE()));\r\n\t\t}\r\n\t\t\r\n\t}",
"private PlainGraph mergeGraphsInternal(PlainGraph g1, PlainGraph g2) {\n // Create all nodes of g2 in g1\n // AddNode does check if the node does exist already, if so it doesn't create a new one\n for (Map.Entry<String, PlainNode> entry: graphNodeMap.get(g2).entrySet()){\n addNode(g1, entry.getKey(), null);\n }\n\n // create all edges of g2 in g1\n for (PlainEdge edge: g2.edgeSet()) {\n // check if the edge exists in g1, if so check if the variable names of the source and the target are also the same and not just the node names\n // Since the node names are numbered in each graph starting with 0, collisions could exists without the 2nd and 3rd check\n // Inverse the whole such that if this edge doesn't exist create it in g1\n if (! (g1.containsEdge(edge) && getVarName(g2, edge.source()).equals(getVarName(g1, edge.source())) && getVarName(g2, edge.target()).equals(getVarName(g1, edge.target())))) {\n addEdge(g1, getVarName(g2, edge.source()), edge.label().text(), getVarName(g2, edge.target()));\n }\n }\n return g1;\n }",
"private void removeNode(DLinkedNode node) {\n\t\t\tDLinkedNode pre = node.pre;\n\t\t\tDLinkedNode post = node.post;\n\n\t\t\tpre.post = post;\n\t\t\tpost.pre = pre;\n\t\t}",
"@FixFor( \"MODE-788\" )\n @Test\n public void shouldCreateSubgraphAndDeletePartOfThatSubgraphInSameOperation() {\n graph.batch()\n .create(\"/a\")\n .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FOLDER)\n .orReplace()\n .and()\n .create(\"/a/b\")\n .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FOLDER)\n .orReplace()\n .and()\n .create(\"/a/b/c\")\n .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FOLDER)\n .orReplace()\n .and()\n .delete(\"/a/b\")\n .and()\n .execute();\n\n // Now look up node A ...\n File newFile = new File(testWorkspaceRoot, \"a\");\n assertTrue(newFile.exists());\n assertTrue(newFile.isDirectory());\n assertTrue(newFile.list().length == 0);\n assertFalse(new File(newFile, \"b\").exists());\n }",
"@Override\r\n\t\tpublic Node replaceChild(Node newChild, Node oldChild) throws DOMException\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}",
"public synchronized void setNode(String path, Node node)\n throws ProcessingException {\n if ( path == null || path.equals(\"/\")) {\n data = DOMUtil.createDocument();\n data.appendChild(data.createElementNS(null, \"context\"));\n data.getFirstChild().appendChild(data.importNode(node, true));\n } else {\n path = this.createPath(path); \n Node removeNode = DOMUtil.selectSingleNode(data, path, this.xpathProcessor);\n removeNode.getParentNode().replaceChild(data.importNode(node, true), removeNode);\n }\n }",
"public Node merge(Node node1, Node node2) {\n\t\tsize--;\r\n\t\t\r\n\t\tNode parent = node1.getParent();\r\n\t\tNode merged = new Node();\r\n\r\n\t\t//add all data/children from node1 into merged\r\n\t\tfor (int i = 0; i < node1.getData().size(); i++) {\r\n\t\t\tmerged.addData(node1.getData(i));\r\n\t\t\tif (!node1.isLeaf())\r\n\t\t\t\tmerged.addChild(node1.getChild(i));\r\n\t\t}\r\n\t\tif (!node1.isLeaf())\r\n\t\t\tmerged.addChild(node1.getChild(node1.getChildren().size() - 1));\r\n\r\n\t\t//add all data/children from node2 into merged\r\n\t\tfor (int i = 0; i < node2.getData().size(); i++) {\r\n\t\t\tmerged.addData(node2.getData(i));\r\n\t\t\tif (!node2.isLeaf())\r\n\t\t\t\tmerged.addChild(node2.getChild(i));\r\n\t\t}\r\n\t\tif (!node2.isLeaf())\r\n\t\t\tmerged.addChild(node2.getChild(node2.getChildren().size() - 1));\r\n\t\t\r\n\t\t//remove node1 and node2 from parent, then add merged\r\n\t\tparent.removeChild(parent.getChildNumber(node1));\r\n\t\tparent.removeChild(parent.getChildNumber(node2));\r\n\t\tparent.addChild(merged);\r\n\t\t\r\n\t\treturn merged;\r\n\t}",
"public Node appendNode(Node node);",
"public static void join(Node a, Node b) {\r\n a.right = b;\r\n b.left = a;\r\n }",
"void coreReplaceWith(CoreChildNode newNode) throws CoreModelException;",
"private static <K, V> void recursiveCloner(Position<Entry<K, V>> v, AVLTree<K, V> original, Position<Entry<K, V>> v2, AVLTree<K, V> NewTree) {\n\n if (original.hasLeft(v)) {\n NewTree.insertLeft(v2, original.left(v).element());\n recursiveCloner(original.left(v), original, NewTree.left(v2), NewTree);\n }\n if (original.hasRight(v)) {\n NewTree.insertRight(v2, original.right(v).element());\n recursiveCloner(original.right(v), original, NewTree.right(v2), NewTree);\n }\n if(v2.element()!=null) {\n \t//assign the height to current parent node\n\t\t\tNewTree.setHeight(v2);\n\t\t}\n }",
"@Test\n\tpublic void test2() {\n\t\tassertEquals(-1,b.removeNode(500));\n\t\t\n\t\t//Borro una hoja\n\t\tassertEquals(0,b.removeNode(3));\n\t\tassertEquals(\"1:FB=0\\t2:FB=0\\t7:FB=0\\t10:FB=1\\t13:FB=1\\t15:FB=0\\t20:FB=-1\\t23:FB=0\\t30:FB=0\\t40:FB=0\\t43:FB=1\\t49:FB=1\\t50:FB=0\\t60:FB=0\\t65:FB=0\\t70:FB=-1\\t90:FB=0\\t100:FB=0\\t110:FB=0\\t230:FB=0\\t\",b.inOrder());\n\n\t\t//Borra un elemento con un hijo\n\t\tassertEquals(0,b.removeNode(110));\n\t\tassertEquals(\"1:FB=0\\t2:FB=0\\t7:FB=0\\t10:FB=1\\t13:FB=1\\t15:FB=0\\t20:FB=-1\\t23:FB=0\\t30:FB=0\\t40:FB=0\\t43:FB=1\\t49:FB=1\\t50:FB=0\\t60:FB=0\\t65:FB=0\\t70:FB=-1\\t90:FB=0\\t100:FB=1\\t230:FB=0\\t\",b.inOrder());\n\t\t//Borra un elemento con dos hijos\n\t\tassertEquals(0,b.removeNode(90));\n\t\tassertEquals(\"1:FB=0\\t2:FB=0\\t7:FB=0\\t10:FB=1\\t13:FB=1\\t15:FB=0\\t20:FB=-1\\t23:FB=0\\t30:FB=0\\t40:FB=0\\t43:FB=1\\t49:FB=1\\t50:FB=0\\t60:FB=0\\t65:FB=0\\t70:FB=1\\t100:FB=1\\t230:FB=0\\t\",b.inOrder());\t\n\t\t\n\t\t//Borra la raiz (30)\n\t\tassertEquals(0,b.removeNode(30));\n\t\tassertEquals(\"1:FB=0\\t2:FB=0\\t7:FB=0\\t10:FB=0\\t13:FB=0\\t15:FB=0\\t20:FB=0\\t23:FB=1\\t40:FB=0\\t43:FB=1\\t49:FB=1\\t50:FB=0\\t60:FB=0\\t65:FB=0\\t70:FB=1\\t100:FB=1\\t230:FB=0\\t\",b.inOrder());\n\t\t\n\t\t//Borro 1\\t7\\t13\n\t\tassertEquals(0,b.removeNode(1));\n\t\tassertEquals(0,b.removeNode(7));\n\t\tassertEquals(0,b.removeNode(13));\n\t\tassertEquals(\"2:FB=0\\t10:FB=1\\t15:FB=1\\t20:FB=0\\t23:FB=1\\t40:FB=0\\t43:FB=1\\t49:FB=1\\t50:FB=0\\t60:FB=0\\t65:FB=0\\t70:FB=1\\t100:FB=1\\t230:FB=0\\t\",b.inOrder());\n\t\t\n\t\t//Borro 20. RSD 2,0\n\t\tassertEquals(0,b.removeNode(20));\n\t\t\n\t\t\n\t\t\n\t\tassertEquals(\"2:FB=0\\t10:FB=0\\t15:FB=0\\t23:FB=1\\t40:FB=0\\t43:FB=1\\t49:FB=1\\t50:FB=0\\t60:FB=-1\\t65:FB=0\\t70:FB=1\\t100:FB=1\\t230:FB=0\\t\",b.inOrder());\n\t\t\n\t\t//Borro el 230. RDI -2, 1\n\t\tassertEquals(0,b.removeNode(230));\n\t\tassertEquals(\"2:FB=0\\t10:FB=0\\t15:FB=0\\t23:FB=-1\\t40:FB=0\\t43:FB=0\\t49:FB=1\\t50:FB=0\\t60:FB=0\\t65:FB=0\\t70:FB=0\\t100:FB=0\\t\",b.inOrder());\n\t\t\n\t\t//Borro 23\n\t\tassertEquals(0,b.removeNode(23));\n\t\tassertEquals(\"2:FB=0\\t10:FB=-1\\t15:FB=-1\\t40:FB=0\\t43:FB=0\\t49:FB=1\\t50:FB=0\\t60:FB=0\\t65:FB=0\\t70:FB=0\\t100:FB=0\\t\",b.inOrder());\n\t\t\n\t\t//Borro 43 (raiz) y RSI sobre el nodo 15\n\t\tassertEquals(0,b.removeNode(43));\n\t\tassertEquals(\"2:FB=0\\t10:FB=0\\t15:FB=0\\t40:FB=1\\t49:FB=1\\t50:FB=0\\t60:FB=0\\t65:FB=0\\t70:FB=0\\t100:FB=0\\t\",b.inOrder());\n\t\t\n\t}",
"private MockTopologyNode createMockNode(MockTopologyNode parent, String nodeName, String typeHint, long freq,\n long timestamp, Boolean isId, Boolean isReplace){\n final MockTopologyNode result = (MockTopologyNode) parent.createNode(nodeName);\n result.setTypeHint(typeHint);\n result.setReplace(isReplace);\n result.setIsIdentity(isId);\n result.setNodeFrequency(freq);\n result.setNodeTimestamp(timestamp);\n\n return result;\n}",
"@org.junit.Test\n public void constrCompelemNodeid2() {\n final XQuery query = new XQuery(\n \"for $x in <a b=\\\"b\\\"/>, $y in element elem {$x/@b} return $y/@b is $x/@b\",\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 assertBoolean(false)\n );\n }",
"private void makeInvalidNode(final Document doc) {\n Element element;\n\n // create INVALID-textnode in DOM tree\n element = doc.createElement(\"mi\");\n element.setAttribute(\"mathcolor\", \"#F00\");\n element.appendChild(doc.createTextNode(\"#\"));\n\n if (this.getNode().getParentNode() == null) {\n doc.replaceChild(element, this.getNode());\n } else {\n this.getNode().getParentNode()\n .replaceChild(element, this.getNode());\n }\n\n // remove bi-subtree\n this.setNode(element);\n this.child = null;\n this.invalid = true;\n }",
"void removeNode(NodeKey key);",
"private void removeHiElement(Element p_element)\n {\n Element parent = p_element.getParent();\n int index = parent.indexOf(p_element);\n\n // We copy the current content, clear out the parent, and then\n // re-add the old content, inserting the <hi>'s content\n // instead of the <hi>.\n\n ArrayList newContent = new ArrayList();\n List content = parent.content();\n\n for (int i = content.size() - 1; i >= 0; --i)\n {\n Node node = (Node)content.get(i);\n\n newContent.add(node.detach());\n }\n\n Collections.reverse(newContent);\n parent.clearContent();\n\n for (int i = 0, max = newContent.size(); i < max; ++i)\n {\n Node node = (Node)newContent.get(i);\n\n if (i == index)\n {\n parent.appendContent(p_element);\n }\n else\n {\n parent.add(node);\n }\n }\n }",
"public abstract Node copy();",
"public void removeRandom() {\n Node[] nodes = getRandomNonterminalNode(false);\n if (nodes == null)\n return;\n \n // Generate random DecisionNode to replace\n DecisionNode replacementNode = DecisionNode.getRandom();\n \n // Update prev reference\n if (nodes[PREV].left == nodes[CURR]){\n nodes[PREV].left = replacementNode;\n } else {\n nodes[PREV].right = replacementNode;\n }\n }",
"public void testRemove() {\r\n tree.insert(\"apple\");\r\n tree.insert(\"act\");\r\n tree.insert(\"bagel\");\r\n\r\n tree.remove(\"apple\");\r\n tree.remove(\"bagel\");\r\n\r\n tree.insert(\"ab\");\r\n tree.remove(\"ab\");\r\n\r\n try {\r\n tree.remove(\"apple\");\r\n }\r\n catch (ItemNotFoundException e) {\r\n assertNotNull(e);\r\n }\r\n }",
"protected XMLElement createAnotherElement() {\n return new XMLElement(this.conversionTable,\n this.skipLeadingWhitespace,\n false,\n this.ignoreCase);\n }",
"boolean replace(int pos, SNode node);",
"private Node updateNode(DocumentBuilder docBuilder, Document doc, Node parentNode, String newNode, Node oldNode) {\r\n try {\r\n Node fragmentNode = docBuilder.parse(new InputSource(new StringReader(newNode))).getDocumentElement();\r\n fragmentNode = doc.importNode(fragmentNode, true);\r\n parentNode.replaceChild(fragmentNode, oldNode);\r\n } catch (SAXException se) {\r\n se.printStackTrace();\r\n } catch (IOException ioe) {\r\n ioe.printStackTrace();\r\n }\r\n return parentNode;\r\n }",
"private static void simplify (GraphDirected<NodeCppOSMDirected, EdgeCppOSMDirected> osmGraph) {\n \t\tfinal Iterator<NodeCppOSMDirected> iteratorNodes = osmGraph.getNodes().iterator();\n \t\twhile (iteratorNodes.hasNext()) {\n \t\t\tfinal NodeCppOSMDirected node = iteratorNodes.next();\n \t\t\t// one in one out\n \t\t\tif (node.getInDegree() == 1 && node.getOutDegree() == 1) {\n \t\t\t\t// get the ids of the two connected nodes\n \t\t\t\tfinal Long currentNodeId = node.getId();\n \t\t\t\tfinal List<EdgeCppOSMDirected> edges = node.getEdges();\n \t\t\t\tfinal EdgeCppOSMDirected edge1 = edges.get(0);\n \t\t\t\tfinal EdgeCppOSMDirected edge2 = edges.get(1);\n \t\t\t\tfinal Long node1id = edge1.getNode1().getId() == (currentNodeId) ? edge2.getNode1().getId() : edge1.getNode1().getId();\n \t\t\t\tfinal Long node2id = edge1.getNode1().getId() == (currentNodeId) ? edge1.getNode2().getId() : edge2.getNode2().getId();\n \t\t\t\tif (node2id == node1id){\n \t\t\t\t\t// we are in a deadend and do not erase ourself\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n \t\t\t\t// concat the list in the right way\n \t\t\t\tList<WayNodeOSM> newMetaNodes = concatMetanodes(edge1.getMetadata().getNodes(), edge2.getMetadata().getNodes(), currentNodeId);\n \t\t\t\t// add a new edge\n \t\t\t\t// TODO: Handle way properly - what would name be in this context?\n \t\t\t\tosmGraph.getNode(node1id).connectWithNodeWeigthAndMeta(osmGraph.getNode(node2id), edge1.getWeight() + edge2.getWeight(),\n \t\t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, \"unknown\", newMetaNodes));\n \t\t\t\t// remove the old node\n \t\t\t\t// do this manually because we otherwise corrupt the iterator\n \t\t\t\tnode.removeAllEdges();\n \t\t\t\titeratorNodes.remove();\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t// two in two out\n \t\t\tif (node.getInDegree() == 2 && node.getOutDegree() == 2) {\n \t\t\t\tfinal long currentNodeId = node.getId();\n \t\t\t\t//check the connections\n \t\t\t\tArrayList<EdgeCppOSMDirected> incomingEdges = new ArrayList<>();\n \t\t\t\tArrayList<EdgeCppOSMDirected> outgoingEdges = new ArrayList<>();\n \t\t\t\tfor(EdgeCppOSMDirected edge : node.getEdges()) {\n \t\t\t\t\tif(edge.getNode1().getId() == currentNodeId){\n \t\t\t\t\t\toutgoingEdges.add(edge);\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\tincomingEdges.add(edge);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\t//TODO make this condition better\n \t\t\t\tif(outgoingEdges.get(0).getNode2().equals(incomingEdges.get(0).getNode1())){\n \t\t\t\t\t//out0 = in0\n \t\t\t\t\tif(!outgoingEdges.get(1).getNode2().equals(incomingEdges.get(1).getNode1())){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(outgoingEdges.get(0).getWeight() != incomingEdges.get(0).getWeight()){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(outgoingEdges.get(1).getWeight() != incomingEdges.get(1).getWeight()){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\t//out0 should be in1\n \t\t\t\t\t//therefore out1 = in0\n \t\t\t\t\tif(!outgoingEdges.get(0).getNode2().equals(incomingEdges.get(1).getNode1())){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(!outgoingEdges.get(1).getNode2().equals(incomingEdges.get(0).getNode1())){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(outgoingEdges.get(0).getWeight() != incomingEdges.get(1).getWeight()){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(outgoingEdges.get(1).getWeight() != incomingEdges.get(0).getWeight()){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t}\n \n \t\t\t\t// get the ids of the two connected nodes\n \t\t\t\tfinal NodeCppOSMDirected node1 = incomingEdges.get(0).getNode1();\n \t\t\t\tfinal NodeCppOSMDirected node2 = incomingEdges.get(1).getNode1();\n \t\t\t\t// \t\t\tif (node1.equals(node2)){\n \t\t\t\t// \t\t\t\t// we are in a loop and do not erase ourself\n \t\t\t\t// \t\t\t\tcontinue;\n \t\t\t\t// \t\t\t}\n \t\t\t\t// concat the list in the right way\n \t\t\t\tList<WayNodeOSM> metaNodes1 = incomingEdges.get(0).getMetadata().getNodes();\n \t\t\t\tList<WayNodeOSM> metaNodes2 = incomingEdges.get(1).getMetadata().getNodes();\n \t\t\t\tdouble weight = incomingEdges.get(0).getWeight() +incomingEdges.get(1).getWeight();\n \t\t\t\tList<WayNodeOSM> newMetaNodes = concatMetanodes(metaNodes1, metaNodes2, currentNodeId);\n \t\t\t\t// add a new edge\n \t\t\t\t// TODO: Handle way properly - what would name be in this context?\n \t\t\t\tnode1.connectWithNodeWeigthAndMeta(node2, weight,\n \t\t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, \"unknown\", newMetaNodes));\n \t\t\t\tnode2.connectWithNodeWeigthAndMeta(node1, weight,\n \t\t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, \"unknown\", newMetaNodes));\n \t\t\t\t// remove the old node\n \t\t\t\t// do this manually because we otherwise corrupt the iterator\n \t\t\t\tnode.removeAllEdges();\n \t\t\t\titeratorNodes.remove();\n \t\t\t}\n \t\t}\n \t}",
"private void removeNode(Node<E> node) {\n node.prev.next = node.next;\n node.next.prev = node.prev;\n }",
"private Node splitNode( Node nodeIn, int w, int h ){\r\n\t\tnodeIn.used = true;\r\n\t\tnodeIn.down = new Node( nodeIn.x, nodeIn.y + h + padding, nodeIn.w, nodeIn.h - h - padding );\r\n\t\tnodeIn.right = new Node( nodeIn.x + w + padding, nodeIn.y, nodeIn.w - w - padding, h );\r\n\t\treturn nodeIn;\r\n\t}",
"@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n @Test(timeout = 5000)\n public void testAddReplaceRemoveLabelsOnNodes() throws Exception {\n boolean caught = false;\n try {\n mgr.replaceLabelsOnNode(ImmutableMap.of(toNodeId(\"node\"), NodeLabelTestBase.toSet(\"label\")));\n } catch (IOException e) {\n caught = true;\n }\n Assert.assertTrue((\"trying to set a label to a node but \" + \"label doesn't exist in repository should fail\"), caught);\n // set a label on a node, but node is null or empty\n try {\n mgr.replaceLabelsOnNode(ImmutableMap.of(toNodeId(NO_LABEL), NodeLabelTestBase.toSet(\"label\")));\n } catch (IOException e) {\n caught = true;\n }\n Assert.assertTrue(\"trying to add a empty node but succeeded\", caught);\n // set node->label one by one\n addToCluserNodeLabelsWithDefaultExclusivity(NodeLabelTestBase.toSet(\"p1\", \"p2\", \"p3\"));\n mgr.replaceLabelsOnNode(ImmutableMap.of(toNodeId(\"n1\"), NodeLabelTestBase.toSet(\"p1\")));\n mgr.replaceLabelsOnNode(ImmutableMap.of(toNodeId(\"n1\"), NodeLabelTestBase.toSet(\"p2\")));\n mgr.replaceLabelsOnNode(ImmutableMap.of(toNodeId(\"n2\"), NodeLabelTestBase.toSet(\"p3\")));\n NodeLabelTestBase.assertMapEquals(getNodeLabels(), ImmutableMap.of(toNodeId(\"n1\"), NodeLabelTestBase.toSet(\"p2\"), toNodeId(\"n2\"), NodeLabelTestBase.toSet(\"p3\")));\n NodeLabelTestBase.assertMapEquals(mgr.lastNodeToLabels, ImmutableMap.of(toNodeId(\"n2\"), NodeLabelTestBase.toSet(\"p3\")));\n // set bunch of node->label\n replaceLabelsOnNode(((Map) (ImmutableMap.of(toNodeId(\"n3\"), NodeLabelTestBase.toSet(\"p3\"), toNodeId(\"n1\"), NodeLabelTestBase.toSet(\"p1\")))));\n NodeLabelTestBase.assertMapEquals(getNodeLabels(), ImmutableMap.of(toNodeId(\"n1\"), NodeLabelTestBase.toSet(\"p1\"), toNodeId(\"n2\"), NodeLabelTestBase.toSet(\"p3\"), toNodeId(\"n3\"), NodeLabelTestBase.toSet(\"p3\")));\n NodeLabelTestBase.assertMapEquals(mgr.lastNodeToLabels, ImmutableMap.of(toNodeId(\"n3\"), NodeLabelTestBase.toSet(\"p3\"), toNodeId(\"n1\"), NodeLabelTestBase.toSet(\"p1\")));\n /* n1: p1 \n n2: p3 \n n3: p3\n */\n // remove label on node\n mgr.removeLabelsFromNode(ImmutableMap.of(toNodeId(\"n1\"), NodeLabelTestBase.toSet(\"p1\")));\n NodeLabelTestBase.assertMapEquals(getNodeLabels(), ImmutableMap.of(toNodeId(\"n2\"), NodeLabelTestBase.toSet(\"p3\"), toNodeId(\"n3\"), NodeLabelTestBase.toSet(\"p3\")));\n NodeLabelTestBase.assertMapEquals(mgr.lastNodeToLabels, ImmutableMap.of(toNodeId(\"n1\"), EMPTY_STRING_SET));\n // add label on node\n mgr.addLabelsToNode(ImmutableMap.of(toNodeId(\"n1\"), NodeLabelTestBase.toSet(\"p1\")));\n NodeLabelTestBase.assertMapEquals(getNodeLabels(), ImmutableMap.of(toNodeId(\"n1\"), NodeLabelTestBase.toSet(\"p1\"), toNodeId(\"n2\"), NodeLabelTestBase.toSet(\"p3\"), toNodeId(\"n3\"), NodeLabelTestBase.toSet(\"p3\")));\n NodeLabelTestBase.assertMapEquals(mgr.lastNodeToLabels, ImmutableMap.of(toNodeId(\"n1\"), NodeLabelTestBase.toSet(\"p1\")));\n // remove labels on node\n mgr.removeLabelsFromNode(ImmutableMap.of(toNodeId(\"n1\"), NodeLabelTestBase.toSet(\"p1\"), toNodeId(\"n2\"), NodeLabelTestBase.toSet(\"p3\"), toNodeId(\"n3\"), NodeLabelTestBase.toSet(\"p3\")));\n Assert.assertEquals(0, getNodeLabels().size());\n NodeLabelTestBase.assertMapEquals(mgr.lastNodeToLabels, ImmutableMap.of(toNodeId(\"n1\"), EMPTY_STRING_SET, toNodeId(\"n2\"), EMPTY_STRING_SET, toNodeId(\"n3\"), EMPTY_STRING_SET));\n }",
"private void swap(Node n1, Node n2) {\r\n Team t = n1.value;\r\n n1.value = n2.value;\r\n n2.value = t;\r\n }",
"void attachToLeft(Node newNode)\n {\n newNode.left = left;\n newNode.right = this;\n newNode.right.left = newNode;\n newNode.left.right = newNode;\n }",
"private final void createAndAddNode(String name) {\n\t}",
"private Node hubInsertNode(HubNode hubNode, Pane canvas , ContextMenu contextMenu) {\n\n\t\tImage image = new Image(\"root/Images/Hub.png\");\n\t\tImagePattern imagePattern = new ImagePattern(image);\n\n\t\tRectangle node = new Rectangle(NODE_LENGTH, NODE_WIDTH);\n\t\tnode.setFill(imagePattern);\n\n\t\tLabel lnodeName = new Label(\"HUB: \" + hubNode.getName()+ \"\\n\" + \"IP: \" + hubNode.getSubnet() + \"\\n\" + \"NetMask: \" + hubNode.getNetmask());\n\n\t\t//lnodeName.setOpacity(0.5);\n\t\tlnodeName.setStyle(\"-fx-background-color: rgba(255,255,255,0.6); -fx-font-size: 8; \");\n\n\n\t\tStackPane nodeContainer = new StackPane();\n\t\tnodeContainer.getChildren().addAll(node, lnodeName);\n\t\tnodeContainer.relocate(hubNode.getPosx(), hubNode.getPosy());\n\t\thubNode.setCanvasNode(nodeContainer); //for removing\n\n\t\tnodeContainer.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {\n\t\t\t@Override\n\t\t\tpublic void handle(MouseEvent event) {\n\t\t\t\tNodeController nodeController = NodeController.getNodeController();\n\t\t\t\tif (event.getButton() == MouseButton.SECONDARY) {\n\t\t\t\t\tcontextMenu.getItems().get(2).setDisable(false);//allows deletion option of the stack pane object 'nodeContainer'\n\t\t\t\t\tcontextMenu.getItems().get(2).setOnAction(new EventHandler<ActionEvent>() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void handle(ActionEvent e) {\n\t\t\t\t\t\t\tString hubName = hubNode.getName();\n\t\t\t\t\t\t\tnodeController.removeHubNode(hubName);\n\t\t\t\t\t\t\trefreshAll();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\tcontextMenu.setOnHidden(new EventHandler<WindowEvent>() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void handle(WindowEvent e) {\n\t\t\t\t\t\t\tcontextMenu.getItems().get(2).setDisable(true);\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\n\t\treturn nodeContainer;\n\t}",
"private void removeNode(DNode node) {\n node.prev.next = node.next;\n node.next.prev = node.prev;\n }",
"public static Node delete (BST bst, String name){\n\t\tNode bstRoot = bst.getRoot();\n\t\tNode deletedNode = findByName(bstRoot, name); // The node to be removed from the bst.\n\t\tNode substituteNode = floorOrCeiling(deletedNode); // The substitute node for the removed one.\n\t\t\n\t\t\n\t\tSystem.out.println(\"\\nThe node to be deleted:\");\n\t\tSystem.out.println(deletedNode);\n\n\t\tSystem.out.println(\"\\nThe substitute for the deleted node:\");\n\t\tSystem.out.println(substituteNode);\n\t\t\n\t\t/* If the node to be removed is an external node, which has no children nodes,\n\t\t then there is no need for the substitute node. Thus, we can simply set the nodes\n\t\t that point to the external nodes to null to remove the node.\n\t\t*/\n\t\tif ((deletedNode.getRight()==null)&&(deletedNode.getLeft()==null)){\n\t\t\tif(deletedNode.getName().compareTo(deletedNode.getParent().getName())<0)\n\t\t\t\tdeletedNode.getParent().setLeft(null);\t\t\t\n\t\t\telse\n\t\t\t\tdeletedNode.getParent().setRight(null);\n\t\t\t\n\t\t\tdeletedNode.setLeft(null);\n\t\t\tdeletedNode.setRight(null);\n\t\t\tdeletedNode.setParent(null);\n\t\t\t\n\t\t\treturn bstRoot;\n\t\t}\n\t\t\n\t\t/* If the node to be removed is not a root node, we'll apply the general approach.\n\t\t*/\n\t\tif (deletedNode.getParent()!=null){\n\n\t\t\t/* If the name of the parent node of the substitute node precedes the one of the substitute,\n\t\t\t * then, set the right child of the parent node to a null unless the substitute node is a child\n\t\t\t * of the deleted node.\n\t\t\t */\n\t\t\tif(substituteNode.getParent().getName().compareTo(substituteNode.getName())<0)\t\t\t\n\t\t\t\tif(substituteNode == deletedNode.getRight())\n\t\t\t\t\tsubstituteNode.getParent().setRight(substituteNode.getRight());\n\t\t\t\telse\t\n\t\t\t\tsubstituteNode.getParent().setRight(null);\n\t\t\t\n\t\t\t/* If the name of the parent node of the substitute node succeeds the one of the substitute,\n\t\t\t * then, set the left child of the parent node to a null unless the substitute node is a child\n\t\t\t * of the deleted node.\n\t\t\t */\n\t\t\telse\n\t\t\t\tif(substituteNode == deletedNode.getLeft())\n\t\t\t\t\tsubstituteNode.getParent().setLeft(substituteNode.getLeft());\n\t\t\t\telse\n\t\t\t\t\tsubstituteNode.getParent().setLeft(null);\n\t\t\t\n\t\t\t\n\t\t\t/* If the name of the parent node of the deleted node succeed the one of the substitute,\n\t\t\t * then, set substitute node as the left child of the parent node of the deleted node.\n\t\t\t * Otherwise, set the substitute to the right child.\n\t\t\t */\n\t\t\tif(deletedNode.getParent().getName().compareTo(substituteNode.getName())>0)\n\t\t\t\tdeletedNode.getParent().setLeft(substituteNode);\n\t\t\t\t\n\t\t\telse\n\t\t\t\tdeletedNode.getParent().setRight(substituteNode);\t\t\t\n\t\t\t\n\n\t\t\t/* Duplicates the binding that the deleted node previously had.\n\t\t\t */\n\t\t\tsubstituteNode.setLeft(deletedNode.getLeft());\n\t\t\tsubstituteNode.setRight(deletedNode.getRight());\n\t\t\tsubstituteNode.setParent(deletedNode.getParent());\n\t\t\t\n\t\t\t\n\t\t\t/* If the deleted node has any child, then set the substitute node as their parent node.\n\t\t\t */\n\t\t\tif (deletedNode.getRight()!=null)\n\t\t\t\tdeletedNode.getRight().setParent(substituteNode);\n\t\t\t\n\t\t\tif (deletedNode.getLeft()!=null)\n\t\t\tdeletedNode.getLeft().setParent(substituteNode);\n\t\t\t\n\t\t\tdeletedNode.setLeft(null);\n\t\t\tdeletedNode.setRight(null);\n\t\t\tdeletedNode.setParent(null);\n\t\t}\t\n\t\t/* If the node to be removed is a root node, we'll approach a bit differently.\n\t\t*/\t\t\t\n\t\telse{\n\t\t\t/* Sets the child node of the parent of the substitute one to null.\n\t\t\t*/\t\t\t\n\t\t\tif(substituteNode.getParent().getName().compareTo(substituteNode.getName())<0)\n\t\t\t\tsubstituteNode.getParent().setRight(null);\n\t\t\telse\n\t\t\t\tsubstituteNode.getParent().setLeft(null);\n\t\t\t\n\t\t\t/* Duplicates the binding that the deleted node previously had without setting the parent node.\n\t\t\t */\n\t\t\tsubstituteNode.setLeft(deletedNode.getLeft());\n\t\t\tsubstituteNode.setRight(deletedNode.getRight());\n\t\t\t\n\t\t\t\n\t\t\t/* If the deleted node has any child, then set the substitute node as their parent node.\n\t\t\t*/\t\t\t\n\t\t\tif (deletedNode.getRight()!=null)\n\t\t\t\tdeletedNode.getRight().setParent(substituteNode);\n\t\t\t\n\t\t\tif (deletedNode.getLeft()!=null)\n\t\t\tdeletedNode.getLeft().setParent(substituteNode);\t\n\t\t\t\n\t\t\t\n\t\t\tdeletedNode.setLeft(null);\n\t\t\tdeletedNode.setRight(null);\n\t\t\tdeletedNode.setParent(null);\n\t\t\t\n\t\t\tSystem.out.println(\"\\nThe node \" + deletedNode + \" is removed from the tree successfully\\n\");\n\t\t\t\n\t\t\treturn substituteNode;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"\\nThe node \" + deletedNode + \" is removed from the tree successfully\\n\");\n\n\n\t\treturn bstRoot;\n\t\t\n\t}",
"private void unhilitNode()\n {\n\tif (hilited==null) return;\n\tGraphics g = getGraphics();\n\tsetRenderColor(g,Color.black);\n\trenderCircle(g,hilited.x,hilited.y,hilited.diameter+4);\n\thilited = null;\n }",
"public Node duplicate() {\r\n Variable alterEgo = new Variable(index);\r\n return alterEgo;\r\n }",
"Node insertBefore(Node newChild, Node refChild);",
"public void remove(Node nodeBeingRemoved) {\n\t\tif (nodeBeingRemoved.getLeftChild() == mSentinel) {\n\t\t\t// if the node that is being remove does not possess a left child\n\t\t\t// then translate the right child of the node that is being removed\n\t\t\t// in the place of the node itself\n\t\t\ttransplant(nodeBeingRemoved, nodeBeingRemoved.getrightChild());\n\t\t} else if (nodeBeingRemoved.getrightChild() == mSentinel) {\n\t\t\t// act on analogy if the node does not possess a right child\n\t\t\ttransplant(nodeBeingRemoved, nodeBeingRemoved.getLeftChild());\n\t\t} else {\n\t\t\t// the tricky part\n\t\t\tNode nextNode = getMinimalNode(nodeBeingRemoved.getrightChild());\n\t\t\t// if the node that is being removed has both right and left\n\t\t\t// children then get the minimal(rightmost child of the node as the\n\t\t\t// next node that is going to replace it)\n\t\t\tif (nextNode.getParent() != nodeBeingRemoved) {\n\t\t\t\t// if the node that we've acquired does not coincide with the\n\t\t\t\t// node that is being removed\n\t\t\t\ttransplant(nextNode, nextNode.getrightChild());// (1)\n\t\t\t\t// replace it with its right child\n\t\t\t\tnextNode.setrightChild(nodeBeingRemoved.getrightChild());\n\t\t\t\t// and set its right child to be the right child of the node\n\t\t\t\t// that is under removal\n\t\t\t\tnextNode.getrightChild().setParent(nextNode);\n\t\t\t\t// last but not least make the right' child's parent the not\n\t\t\t\t// that we have transfered (look 1)\n\t\t\t}\n\n\t\t\ttransplant(nodeBeingRemoved, nextNode);\n\t\t\t// in all cases change the positions of the node that is being\n\t\t\t// removed and the node that will replace it\n\t\t\t// and adjust the children accordingly\n\t\t\tnextNode.setLeftChild(nodeBeingRemoved.getLeftChild());\n\t\t\tnextNode.getLeftChild().setParent(nextNode);\n\t\t}\n\t}",
"public void updateChildNodes() {\n\t\tList<FTNonLeafNode> nodesToRemove = new ArrayList<FTNonLeafNode>();\n\t\tfor (FTNonLeafNode intermediateNode : intermediateNodes.values()) {\n\t\t\tList<FTNode> childNodesToRemove = new ArrayList<FTNode>();\n\t\t\tfor (String childName : intermediateNode.childNodes.keySet()) {\n\t\t\t\tif (intermediateNodes.containsKey(childName)) {\n\t\t\t\t\t// update child node if it has child node\n\t\t\t\t\tFTNonLeafNode childNode = intermediateNodes.get(childName);\n\t\t\t\t\tif ((childNode instanceof FTOrNode) || (childNode instanceof FTAndNode)) {\n\t\t\t\t\t\tintermediateNode.addChildNode(childName, intermediateNodes.get(childName));\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t// if parent node is an OR node\n\t\t\t\t\t\t// remove this child\n\t\t\t\t\t\tif (intermediateNode instanceof FTOrNode) {\n\t\t\t\t\t\t\tchildNodesToRemove.add(childNode);\n\t\t\t\t\t\t\tnodesToRemove.add(childNode);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// if parent node is an AND node\n\t\t\t\t\t\t// remove the parent node and child node\n\t\t\t\t\t\t// and set their values to false in case they are referenced by other nodes\n\t\t\t\t\t\telse if (intermediateNode instanceof FTAndNode) {\n\t\t\t\t\t\t\tnodesToRemove.add(intermediateNode);\n\t\t\t\t\t\t\tnodesToRemove.add(childNode);\n\t\t\t\t\t\t\t// mark the nodes as they are not getting removed till after the loop\n\t\t\t\t\t\t\tintermediateNode.resolved = true;\n\t\t\t\t\t\t\tintermediateNode.nodeValue = false;\n\t\t\t\t\t\t\tchildNode.resolved = true;\n\t\t\t\t\t\t\tchildNode.nodeValue = false;\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\tintermediateNode.removeChildNodes(childNodesToRemove);\n\t\t\t// if no child node left for this intermediate node,\n\t\t\t// then its parent node should remove this intermediate node as well\n\t\t}\n\t\t// remove the no child nodes\n\t\tfor (FTNonLeafNode node : nodesToRemove) {\n\t\t\tintermediateNodes.remove(node.nodeName);\n\t\t}\n\t}",
"public void recoverTree2(TreeNode root) {\n traverse(root);\n\n // Swap the values of the two nodes\n int temp = firstElement.val;\n firstElement.val = secondElement.val;\n secondElement.val = temp;\n }",
"public void removeEdge(int node1, int node2)\n{\n\tif(getNodes().containsKey(node1) && getNodes().containsKey(node2))\n\t{\n\t\tNode n1 = (Node) getNodes().get(node1);\n\t\tNode n2 = (Node) getNodes().get(node2);\n\n\t\tif(n1.getEdgesOf().containsKey(node2))\n\t\t{\n\t\t\tedge_size--;\n\t\t\tmc++;\n\t\t\tn1.getEdgesOf().remove(node2);\n\n\t\t}\n\t\tif(n2.getEdgesOf().containsKey(node1))\n\t\t{\n\t\t\tedge_size--;\n\t\t\tmc++;\n\t\t\tn2.getEdgesOf().remove(node1);\n\n\t\t}\n\t\t\n\t\telse {\n\t\t\t\n\t\t\t//System.out.println(\"Edge doesnt exist\");\n\t\t}\n\t}\n\telse {\n\t\treturn;\n\t\t//System.out.println(\"src or dest doesnt exist\");\n\t}\n}",
"void nodeCreate( long id );",
"private void swap(int index1, int index2){\r\n ListNode c = head;\r\n ListNode swapNode = head;\r\n \r\n E tmp = null, tmp1 = null;\r\n \r\n for(int i = 0; i < index1; i++) c = c.getLink();\r\n tmp = (E) c.getData();\r\n \r\n for(int i = 0; i < index2; i++) swapNode = swapNode.getLink();\r\n tmp1 = (E) swapNode.getData();\r\n c.setData(tmp1);\r\n swapNode.setData(tmp);\r\n }",
"public static Node substitute(final Node node, final String xPath, final Node newNode) throws Exception {\r\n Node result = node;\r\n Node replace = selectSingleNode(result, xPath);\r\n assertNotNull(\"No node selected for substitute. \", replace);\r\n Node parent = replace.getParentNode();\r\n parent.replaceChild(newNode, replace);\r\n return result;\r\n }",
"private void removeSubElement(Element p_element)\n {\n Element parent = p_element.getParent();\n int index = parent.indexOf(p_element);\n\n // We copy the current content, clear out the parent, and then\n // re-add the old content, inserting the <sub>'s textual\n // content instead of the <sub> (this clears any embedded TMX\n // tags in the subflow).\n\n ArrayList newContent = new ArrayList();\n List content = parent.content();\n\n for (int i = content.size() - 1; i >= 0; --i)\n {\n Node node = (Node)content.get(i);\n\n newContent.add(node.detach());\n }\n\n Collections.reverse(newContent);\n parent.clearContent();\n\n for (int i = 0, max = newContent.size(); i < max; ++i)\n {\n Node node = (Node)newContent.get(i);\n\n if (i == index)\n {\n parent.addText(p_element.getText());\n }\n else\n {\n parent.add(node);\n }\n }\n }",
"void tryRemoveNodes(Collection<Node> nodesToRemove) throws Exception;",
"public void insertAfter(Node<T> first, Node<T> second) {\n if (first == null || second == null || First == null) {\n return;\n }\n Node<T> current = First; //at least one element\n while (current != null && current.item != first.item) {\n current = current.next;\n }\n\n if (current == null) { // no\n return;\n } else { //找到了\n second.next = current.next;\n current.next = second;\n }\n }",
"private static void buildDoublesNode(Document document, NodeList childList, Node newHead) {\n Element doublNode = document.createElement(\"item\");\n Element doublID = document.createElement(\"id\");\n Element doublParent = document.createElement(\"parent\");\n doublNode.appendChild(doublID);\n doublNode.appendChild(doublParent);\n for (int i = 0; i < childList.getLength(); i++) {\n if (childList.item(i).getNodeName().equals(\"id\"))\n doublID.setTextContent(childList.item(i).getTextContent());\n if (childList.item(i).getNodeName().equals(\"parent\")) {\n NodeList parentItemList = childList.item(i).getChildNodes();\n for (int j = 0; j < parentItemList.getLength(); j++) {\n if (parentItemList.item(j).getNodeName().equals(\"item\")) {\n Element innerParentItem = document.createElement(\"item\");\n innerParentItem.setTextContent(parentItemList.item(j).getTextContent());\n doublParent.appendChild(innerParentItem);\n }\n }\n }\n }\n newHead.appendChild(doublNode);\n }",
"protected void mutateAddNode() {\n\t\t// Test if genome is fully disabled\n\t\tboolean fullydisabled = true;\n\t\tfor (Gene g : genes.values()) {\n\t\t\tif (g.enabled) {\n\t\t\t\tfullydisabled = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (fullydisabled)\n\t\t\treturn;\n\n\t\t// Select the gene to be split\n\t\tGene mutated;\n\t\tdo {\n\t\t\tmutated = getRandomGene();\n\t\t} while (!mutated.enabled);\n\n\t\t// Create the new structure\n\t\tNNode addition = new NNode(population.getNewNodeID(), NNode.HIDDEN);\n\t\tpopulation.registerNode(addition);\n\n\t\tint earlystart = mutated.start;\n\t\tint earlyend = addition.ID;\n\t\tint earlyinnov = population.getInnovation(earlystart, earlyend);\n\t\tGene early = new Gene(earlyinnov, earlystart, earlyend, 1, true);\n\t\tpopulation.registerGene(early);\n\n\t\tint latestart = addition.ID;\n\t\tint lateend = mutated.end;\n\t\tint lateinnov = population.getInnovation(latestart, lateend);\n\t\tGene late = new Gene(lateinnov, latestart, lateend, mutated.weight,\n\t\t\t\ttrue);\n\t\tpopulation.registerGene(late);\n\n\t\t// Disable old gene\n\t\tmutated.enabled = false;\n\n\t\t// Submit new node\n\t\tsubmitNewNode(addition);\n\n\t\t// Submit new genes\n\t\tsubmitNewGene(early);\n\t\tsubmitNewGene(late);\n\n\t\tif (Braincraft.gatherStats)\n\t\t\tBraincraft.genetics.add(\"node mutation \" + ID + \" \"\n\t\t\t\t\t+ mutated.innovation + \" \" + early.innovation + \" \"\n\t\t\t\t\t+ late.innovation + \" \" + addition.ID);\n\t}",
"private void RemoveRootNode() {\n\t\t\n\t\troot_map.remove(this);\n\t\tis_node_set = false;\n\t\tif(left_ptr == null && right_ptr == null) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tleft_ptr.RemoveRootNode();\n\t\tright_ptr.RemoveRootNode();\n\t}",
"public void swap(int idx1, int idx2) {\r\n\t\tNode<T> p1 = getNode(idx1);\r\n\t\tNode<T> p2 = getNode(idx2);\r\n\t\tNode<T> temp;\r\n\t\tif (Math.abs(idx1 - idx2) == 1) {\r\n\t\t\tp2.prev = p1.prev;\r\n\t\t\tp1.prev.next = p1.prev = p2;\r\n\t\t\tp1.next = p2.next;\r\n\t\t\tp2.next.prev = p2.next = p1;\r\n\t\t} else {\r\n\t\t\tp1.prev.next = p1.next.prev = p2;\r\n\t\t\tp2.prev.next = p2.next.prev = p1;\r\n\t\t\ttemp = p1.next;\r\n\t\t\tp1.next = p2.next;\r\n\t\t\tp2.next = temp;\r\n\t\t\ttemp = p1.prev;\r\n\t\t\tp1.prev = p2.prev;\r\n\t\t\tp2.prev = temp;\r\n\t\t}\r\n\t}",
"private void removeNoMoreExistingOriginalNodes() {\n for (Node mirrorNode : mirrorGraph.nodes()) {\n if (!isPartOfMirrorEdge(mirrorNode) && !originalGraph.has(mirrorNode)) {\n mirrorGraph.remove(mirrorNode);\n }\n }\n }",
"private void updateLruWithNewNode(PageId pid, Page retrievedPage) {\n Node node = new Node(pid, retrievedPage);\n changeHead(node);\n bufferedPages.put(pid, node);\n }",
"private MyBinNode getToReplace(MyBinNode node){\n MyBinNode replc_p = node;\n MyBinNode replace = node;\n MyBinNode aux = node.right;\n while(aux != null){\n replc_p = replace;\n replace = aux;\n aux = aux.left;\n }\n if(replace != node.right){\n replc_p.left = replace.right;\n replace.right = node.right;\n }\n return replace;\n }",
"public Node merge(Node h1, Node h2) {\n\t\tNode dummy = new Node();\r\n\t\tNode temp = dummy;\r\n\t\twhile(true) {\r\n\t\t\t// if it is equal to null basically it is a empty link\r\n\t\t\tif(h1 == null) {\r\n\t\t\t\ttemp.next = h2;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif(h2 == null) {\r\n\t\t\t\ttemp.next = h1;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif(h1.data <= h2.data) { // while if h1 is bigger than h2 than need to store h1 inside\r\n\t\t\t\ttemp.next = h1;\r\n\t\t\t\th1 = h1.next;\r\n\t\t\t}else {\r\n\t\t\t\ttemp.next = h2;\r\n\t\t\t\th2 = h2.next;\r\n\t\t\t}\r\n\t\t\ttemp = temp.next;\r\n\t\t}\r\n\t\treturn dummy.next;\r\n\t}",
"private ListNode deleteReplicateNode(ListNode head) {\n\n if (head == null || head.next == null) {\n System.out.println(\"Head is null or there is only one node\");\n return head;\n }\n\n ListNode preNode = null;\n ListNode node = head;\n while (node != null) {\n\n ListNode nextNode = node.next;\n boolean deleteFlag = false;\n if (nextNode != null && node.val == nextNode.val) {\n deleteFlag = true;\n }\n\n if (!deleteFlag) {\n preNode = node;\n } else {\n int value = node.val;\n ListNode toBeDeleted = node;\n\n while (toBeDeleted != null && toBeDeleted.val == value) {\n nextNode = toBeDeleted.next;\n\n toBeDeleted.next = null;\n\n toBeDeleted = nextNode;\n }\n\n // when old head node is duplicated, we need to assign the new head.\n if (preNode == null) {\n head = nextNode;\n } else {\n // use preNode to connect these non-duplicate nodes.\n preNode.next = nextNode;\n }\n }\n\n node = nextNode;\n }\n\n return head;\n }",
"public void create(int x, int y, int parentx, int parenty, String description, String status) throws SQLException {\n var statement = connection.prepareStatement(\"INSERT INTO nodes (x, y, parentx, parenty, status, owner, description) VALUES (?, ?, ?, ?, ?, ?, ?)\");\n statement.setInt(1, x);\n statement.setInt(2, y);\n statement.setInt(3, parentx);\n statement.setInt(4, parenty);\n statement.setString(5, status);\n statement.setString(6, \"temp\");\n description=swearFilter(description); //METHOD TAKES IN THE DESCRIPTION AND FILTERS FOR SWEAR WORDS\n statement.setString(7, description);\n statement.execute();\n statement.close();\n }",
"private long replace(long r, Node change) throws IOException {\n Node current = new Node(r);\r\n if (current.right != 0) {\r\n current.right = replace(current.right, change);\r\n current.height = getHeight(current);\r\n current.writeNode(r);\r\n int heightDifference = getHeightDifference(r);\r\n if (heightDifference < -1) {\r\n if (getHeightDifference(current.right) > 0) {\r\n current.right = rightRotate(current.right);\r\n current.writeNode(r);\r\n return leftRotate(r);\r\n }\r\n else {\r\n return leftRotate(r);\r\n }\r\n }\r\n else if (heightDifference > 1) {\r\n if (getHeightDifference(current.left) < 0) {\r\n current.left = leftRotate(current.left);\r\n current.writeNode(r);\r\n return rightRotate(r);\r\n }\r\n else {\r\n return rightRotate(r);\r\n }\r\n }\r\n return r;\r\n }\r\n else {\r\n change.key = current.key;\r\n change.fields = current.fields;\r\n addToFree(r);\r\n return current.left;\r\n }\r\n }",
"public Node removeFromChain();",
"public static Node append(Node a, Node b) {\r\n // if either is null, return the other\r\n if (a == null)\r\n return (b);\r\n if (b == null)\r\n return (a);\r\n\r\n // find the last node in each using the .previous pointer\r\n Node aLast = a.left;\r\n Node bLast = b.left;\r\n\r\n // join the two together to make it connected and circular\r\n join(aLast, b);\r\n join(bLast, a);\r\n\r\n return (a);\r\n }",
"public void union(int id1, int id2) {\n\t\tint root_v1 = find(id1); // Find the representative of the first items\n\t\tint root_v2 = find(id2);\t// Find the representative of the second item\n\n\t\tif (root_v1 != root_v2) {\t// If the 2 items are not equal\n\t\t\tG.addEdge(root_v1, root_v2);\t// Add an edge from root1 --> root2 (Union)\n\t\t}\n\t}",
"public static Node copyRandomList2(Node head) {\n\n\t\t//setting up duplicate nodes in between\n\t\tif (head == null) return head;\n\t\tNode curr = head;\n\t\twhile (curr != null) {\n\t\t\tNode node = new Node(curr.val);\n\t\t\tNode next = curr.next;\n\t\t\tcurr.next = node;\n\t\t\tnode.next = next;\n\t\t\tcurr = next;\n\t\t}\n\n\t\t//setting up random for duplicates\n\t\tNode p = head;\n\t\twhile (p != null) {\n\t\t\tcurr = p.next;\n\t\t\tcurr.random = p.random == null ? null : p.random.next;\n\t\t\tp = curr.next;\n\t\t}\n\n\t\t//removing the duplicate list of nodes from the modified\n\t\tNode res = new Node(-1), prev = res;\n\t\tp = head;\n\t\twhile (p != null) {\n\t\t\tcurr = p.next;\n\t\t\tprev.next = curr;\n\t\t\tprev = curr;\n\t\t\tp.next = p.next.next;\n\t\t\tp = p.next;\n\t\t}\n\t\treturn res.next;\n\t}",
"public void swapNodes(int data1, int data2) {\n\t\tif(head == null || size == 1) {\n\t\t\tSystem.out.println(\"List is empty or only one node present!!\");\n\t\t\treturn;\n\t\t}\n\t\tNode node1 = null;\n\t\tNode node1Prev = null;\n\t\tNode node2 = null;\n\t\tNode node2Prev = null;\n\t\tNode start = head;\n\t\tif(start.data == data1) {\n\t\t\tnode1Prev = null;\n\t\t\tnode1 = start;\n\t\t}\n\t\tif(start.data == data2) {\n\t\t\tnode2Prev = null;\n\t\t\tnode2 = start;\n\t\t}\n\t\twhile(start.next != null) {\n\t\t\tif(start.next.data == data1) {\n\t\t\t\tnode1Prev = start;\n\t\t\t\tnode1 = start.next;\n\t\t\t}\n\t\t\tif(start.next.data == data2) {\n\t\t\t\tnode2Prev = start;\n\t\t\t\tnode2 = start.next;\n\t\t\t}\n\t\t\tstart = start.next;\n\t\t}\n\n\t\tif(node1 != null && node2 != null) {\n\t\t\tif(node1Prev == null) {\n\t\t\t\thead = node2;\n\t\t\t}\n\t\t\tif(node2Prev == null) {\n\t\t\t\thead = node1;\n\t\t\t}\n\t\t\tNode tempNext = node2.next;\n\t\t\tif(node1Prev != null)\n\t\t\t\tnode1Prev.next = node2;\n\t\t\tnode2.next = node1.next;\n\n\t\t\tif(node2Prev != null)\n\t\t\t\tnode2Prev.next = node1;\n\t\t\tnode1.next = tempNext;\n\t\t}\n\t}",
"void reorderNode(LinkedEntries.LinkNode insert, LinkedEntries.LinkNode before) {\n removeNode(insert);\n if (before == null) {\n addNode(insert, getHeader());\n } else {\n addNode(insert, before);\n }\n }",
"public void removeDupsMtd2() {\n Node curr = head;\n Node prev = head;\n while (curr != null) {\n Node runner = curr.getNext();\n while(runner != null) {\n if (runner.getValue() == curr.getValue()) {\n curr.setNext(runner.getNext());\n }\n runner = runner.getNext();\n }\n curr = curr.getNext();\n }\n }",
"private int joinSecnodCase(AVLTree t1, IAVLNode x, AVLTree t2) {\r\n\t\t\t\t int returnValue = 0;\r\n\t\t\t\t IAVLNode curr = t1.getRoot(), parent;\r\n\t\t\t\t \r\n\t\t\t\t while(true) {\r\n\t\t\t\t\t if(curr.getHeight() <= t2.getRoot().getHeight())\r\n\t\t\t\t\t\t break;\r\n\t\t\t\t\t if(curr.getRight().getHeight() == -1)\r\n\t\t\t\t\t\t break;\r\n\t\t\t\t\t curr = curr.getRight();\r\n\t\t\t\t }\r\n\t\t\t\t \r\n\t\t\t\t parent = curr.getParent();\r\n\t\t\t\t \r\n\t\t\t\t if(t1.getRoot() == curr) {\r\n\t\t\t\t\t curr.setRight(x);\r\n\t\t\t\t\t x.setParent(curr);\r\n\t\t\t\t\t curr.setHeight(curr.getHeight() + 1 );\r\n\t\t\t\t\t return 0;\r\n\t\t\t\t }\r\n\t\t\t\t \r\n\t\t\t\t returnValue = Math.abs(t2.getRoot().getHeight() - curr.getHeight());\r\n\t\t\t\t \r\n\t\t\t\t //replacing pointers\r\n\t\t\t\t \r\n\t\t\t\t x.setLeft(curr);\r\n\t\t\t\t x.setParent(parent);\r\n\t\t\t\t parent.setRight(x);\r\n\t\t\t\t curr.setParent(x);\r\n\t\t\t\t x.setRight(t2.getRoot());\r\n\t\t\t\t t2.getRoot().setParent(x);\r\n\t\t\t\t t2.setRoot(null);\r\n\t\t\t\t t2.setRoot(t1.getRoot());\r\n\t\t\t\t x.setHeight(Math.max(x.getRight().getHeight(), x.getLeft().getHeight()) + 1);\r\n\t\t\t\t //FIXING NEW TREE CREATED\r\n\t\t\t\t \r\n\t\t\t\t //t2.minimum = t1.minimum;\r\n\t\t\t\t t2.maximum = t1.maximum;\r\n\t\t\t\t \r\n\t\t\t\t //FIXING NEW TREE CREATED\r\n\t\t\t\t HieghtsUpdating(x);\r\n\t\t\t\t SizesUpdate(x);\r\n\t\t\r\n\t\t\t\t return returnValue;\r\n\t\t\t\t}",
"public void refresh()\n\t{\n\t\tNode master = new Node(\"Tyler\");\n\t\t//master.add(new Node(\"Test\"));\n\t\tmaster.addParent(new Node(\"Clinton\"));\n\t\tmaster.addParent(new Node(\"Terry\"));\n\t\t\n\t\tmaster.add(\"Justin\", \"Terry\"); \n\t\tmaster.add(\"Justin\", \"Clinton\"); \n\t\t//this adds directly under Terry\n\t\t//maybe do this differently...\n\t\t\n\t\t\n\t\tmaster.findNode(\"Terry\").addParent(new Node(\"Diana\"));\n\t\tmaster.findNode(\"Terry\").addParent(new Node(\"George\"));\n\t\t\n\t\tmaster.add(new Node(\"Tyler 2.0\"));\n\t\tmaster.add(new Node(\"Tyler 3.0\"));\n\t\tmaster.add(new Node(\"Tyler Jr\"));\n\t\t\n\n\t\tmaster.add(\"Tyler Jr Jr\", \"Tyler 2.0\");\n\t\t\n\t\tmaster.add(\"Tyler 3.0\", \"Tyler Jr 2.0\");\n\t\t\n\t\tmaster.findNode(\"Clinton\").addParent(new Node(\"Eric\"));\n\t\tmaster.findNode(\"Eric\").addParent(new Node(\"Eric's Dad\"));\n\t\t\n\t\t\n\t\tmaster.findNode(\"Tyler Jr Jr\", 6).add(new Node(\"Mini Tyler\"));\n\t\t//master.findNode(\"Clinton\", 2).add(new Node(\"Justin\"));\n\t\t\n\t\t\n\t\tmaster.getParent().get(0).findNode(\"Justin\", 3).add(new Node(\"Mini Justin\"));\n\t\t\n\t\tmaster.add(new Node(\"Laptop\"));\n\t\tmaster.findNode(\"Laptop\").add(new Node(\"Keyboard\"));\n\t\tmaster.findNode(\"Laptop\").add(new Node(\"Mouse\"));\n\t\t\n\t\tmaster.add(\"Touchpad\", \"Laptop\");\n\t\t//master.add(\"Justin\", \"Eric\");\n\t\t\n\t\tmaster.add(\"Hunger\", \"Tyler\");\n\t\t\n\t\tselectedNode = master;\n\t\tselect(selectedNode);\n\t}",
"public void replaceNodes() {\n for (ConstantPropagationInformation information : constantPropagations) {\n information.parent.getChildren().set(information.childIndex, information.replacement);\n }\n }"
]
| [
"0.59648097",
"0.5605231",
"0.5592731",
"0.5592185",
"0.55731785",
"0.55109686",
"0.55034345",
"0.5496515",
"0.54637545",
"0.54002404",
"0.5372137",
"0.5367049",
"0.5364076",
"0.5334419",
"0.5320158",
"0.5291383",
"0.5276633",
"0.5271921",
"0.526746",
"0.52620524",
"0.52226716",
"0.5219401",
"0.52113026",
"0.5201102",
"0.5197051",
"0.5194069",
"0.51882356",
"0.5187442",
"0.5174515",
"0.5171064",
"0.5164804",
"0.51547366",
"0.515462",
"0.5131626",
"0.5123154",
"0.51113546",
"0.5110052",
"0.509348",
"0.50706637",
"0.50646573",
"0.50429004",
"0.5040317",
"0.5034999",
"0.50264406",
"0.5002855",
"0.4999622",
"0.49892846",
"0.4981823",
"0.49709746",
"0.49608576",
"0.49449724",
"0.4944193",
"0.49434537",
"0.49410698",
"0.49403238",
"0.4937873",
"0.4937851",
"0.49287722",
"0.49251136",
"0.49240816",
"0.49197516",
"0.4916415",
"0.4916254",
"0.49157086",
"0.49091515",
"0.49075946",
"0.49075046",
"0.49074963",
"0.49063283",
"0.4901081",
"0.48987046",
"0.48958793",
"0.4895864",
"0.48950732",
"0.48946533",
"0.48924455",
"0.48918885",
"0.48838967",
"0.48826954",
"0.48759636",
"0.4870854",
"0.48686945",
"0.48660943",
"0.48654193",
"0.48598465",
"0.48568037",
"0.48540765",
"0.48506904",
"0.48391497",
"0.48353654",
"0.48349902",
"0.48331678",
"0.4828774",
"0.4828511",
"0.4821343",
"0.4821153",
"0.4818937",
"0.48109424",
"0.48076805",
"0.4794718"
]
| 0.5244745 | 20 |
solution 2: using two hashset | public List<String> findRepeatedDnaSequences2(String s) {
if(s == null || s.length() <= 10){
return new ArrayList<String>();
}
int n = s.length();
Set<String> visited = new HashSet<String>();
Set<String> duplicated = new HashSet<String>();
for(int i = 0; i <= n - 10; ++i){
String subStr = s.substring(i, i + 10);
if(!visited.add(subStr)) {
duplicated.add(subStr);
}
}
return new ArrayList<String>(duplicated);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static Set<String> m23474a(Set<String> set, Set<String> set2) {\n if (set.isEmpty()) {\n return set2;\n }\n if (set2.isEmpty()) {\n return set;\n }\n HashSet hashSet = new HashSet(set.size() + set2.size());\n hashSet.addAll(set);\n hashSet.addAll(set2);\n return hashSet;\n }",
"void mo30185a(HashSet<zzawj> hashSet);",
"private int[] hashSetMethod(int[] nums1, int[] nums2) {\n HashSet<Integer> s = new HashSet<Integer>();\n for (Integer i : nums1) {\n if (!s.contains(i)) s.add(i);\n }\n HashSet<Integer> intersection = new HashSet<Integer>();\n for (Integer i : nums2) {\n if (s.contains(i) && !intersection.contains(i)) {\n \tintersection.add(i);\n }\n }\n int[] res = new int[intersection.size()];\n Iterator<Integer> iter = intersection.iterator();\n for (int i = 0; iter.hasNext(); i++) {\n res[i] = iter.next();\n }\n return res;\n }",
"public static void main(String[] args) {\n HashSet<Person> set = new HashSet<>();\n Person p1 = new Person(\"小妹妹\", 18);\n Person p2 = new Person(\"小妹妹\", 18);\n Person p3 = new Person(\"小妹妹\", 19);\n System.out.println(p1.hashCode());\n System.out.println(p2.hashCode());\n System.out.println(p1 == p2);\n System.out.println(p1.equals(p2));\n set.add(p1);\n set.add(p2);\n set.add(p3);\n System.out.println(set);\n }",
"public void HashsetBasicExanple() {\n\t\t\n\t\tHashSet<String> hs = new HashSet<String>();\n\t\ths.add(\"Sudha\");\n\t\ths.add(\"Yog\");\n\t\ths.add(\"Sathya\");\n\t\ths.add(\"Sadhana\");\n\t\ths.add(null);\n\t\ths.add(\"Aadhav\");\n\t\ths.add(\"Yog\");\n\t\t\n\t\t//Insertion order is not mainted and duplicate value is not allowed.\n\t\tSystem.out.println(hs);//[Yog, null, Sudha, Sathya, Aadhav, Sadhana]\n\t\t\n\t\tSystem.out.println(hs.contains(null));//true\n\t\t\n\t\ths.remove(null);\n\t\tSystem.out.println(hs);//[Yog, Sudha, Sathya, Aadhav, Sadhana]\n\t\t\n\t\tHashSet<String> hs1 = new HashSet<String>();\n\t\ths1.add(\"a\");\n\t\ths1.add(\"b\");\n\t\ths1.add(\"c\");\n\t\ths1.add(\"e\");\n\t\tSystem.out.println(hs1);//[a, b, c, e]\n\t\t\n\t\ths.addAll(hs1);\n\t\tSystem.out.println(hs);//[Yog, a, b, Sudha, c, Sathya, e, Aadhav, Sadhana]\n\t\t\n\t\tSystem.out.println(hs.containsAll(hs1));//true\n\t\t\n\t\t\n\t\t//Iterator using iterator\n\t\t\n\t\tIterator<String> iterator = hs.iterator();\n\t\twhile(iterator.hasNext()) {\n\t\tSystem.out.println(\"Iterate using Iterator \" + iterator.next());\t\n\t\t}\n\t}",
"public static void main(String[] args) {\n Set<Integer> S1 = new TreeSet<>();\r\n // add objects\r\n S1.add(65); S1.add(36); S1.add(24); S1.add(36);\r\n \r\n // show the content and assert they are sorted and no duplications\r\n System.out.println(\"set = \" + S1); \r\n //remove elements\r\n S1.remove(36); S1.remove(24);\r\n System.out.println(S1); //assert set = 65\r\n S1.add(15); S1.add(24); S1.add(80); // add 15, 24, 80\r\n System.out.println(\"set = \" +S1); //assert set = 15, 24, 65, 80\r\n \r\n System.out.println(\"Does S1 contain 10?\"\r\n + S1.contains(10)); // assert false\r\n System.out.println(\"S1 has \" + S1.size() +\" objects\"); // assert 4\r\n\r\n // create another Set object implemented using HashSet\r\n Set<Integer> S2 = new HashSet<>();\r\n // add all objects in S1 to S2\r\n S2.addAll(S1);\r\n System.out.println(\"hashset = \" +S2); //assert they may not be ordered\r\n\r\n // create another Set object implemented using LinkedHashSet\r\n Set<Integer> S3 = new LinkedHashSet<>();\r\n S3.add(150); // add 150\r\n S3.addAll(S1);// add all objects in S1 to S2\r\n System.out.println(\"LinkedHashSet = \" +S3);//assert s3=[150,15,24,65,80]\r\n \r\n S3.removeAll(S3); // remove all items\r\n System.out.println(\"LinkedHashSet = \" +S3);//assert s3=[]\r\n }",
"public static void main(String[] args) {\n\t\tHashSet set1 = new HashSet();\n\n\t\t/*\n\t\t * It creates empty HS object with specified initial capacity and\n\t\t * default fill ratio 0.75. \n\t\t * HashSet set2 = new HashSet(int initialCapacity);\n\t\t */\n\t\tHashSet set2 = new HashSet(20);\n\n\t\t/*\n\t\t * It creates equivalent HS object for given Collection\n\t\t * HashSet set3 = new HashSet(Collection c);\n\t\t */\n\t\tArrayList list = new ArrayList();\n\t\tlist.add(1);\n\t\tlist.add(1);\n\t\tSystem.out.println(\"List is \" + list);\n\t\tHashSet set3 = new HashSet(list);\n\t\tSystem.out.println(\"equivalent HashSet is \" + set3);\n\n\t}",
"public static void main(String[] args) {\n HashSet<String> food = new HashSet<>();\n food.add(\"Sushi\");\n food.add(\"Sashimi\");\n food.add(\"Pizza\");\n food.add(\"Japadog\");\n food.add(\"Sushi\");\n System.out.println(food.size());\n\n HashSet<String> food2 = new HashSet<>();\n food2.add(\"Pizza\");\n food2.add(\"Pasta\");\n food2.add(\"Sushi\");\n food2.add(\"Taco\");\n food2.add(\"Burrito\");\n food2.add(\"Nachos\");\n food2.add(\"Feijoada\");\n food2.add(\"Coxinha\");\n// food.addAll(food2);\n// food.retainAll(food2); // common\n\n System.out.println(food);\n System.out.println(food.contains(\"Sushi\"));\n }",
"HSet keySet();",
"public static void main(String[] args) {\n\t\tInteger [] a= {1,4,7, 9, 2};\n\t\tInteger [] b={1,7,3,4,5};\n\t\tArrayList <Integer> c=new ArrayList<Integer>();\n\t\tfor(int i=0;i<a.length;i++)\n\t\t{\n\t\t\tfor(int j=0;j<b.length;j++)\n\t\t\t{\n\t\t\t\tif(a[i]==b[j])\n\t\t\t\t{\n\t\t\t\t\tif(!c.contains(a[i]))\n\t\t\t\t\t{\n\t\t\t\t\t\tc.add(a[i]);\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\tSystem.out.println(\"First Method : \"+c);\n\t\t//second method\n\t\tList<Integer> arr1=Arrays.asList(a);\n\t\tList<Integer> arr2=Arrays.asList(b);\n\t\tHashSet<Integer> aset=new HashSet<>(arr1);\n\t\taset.retainAll(arr2);\n\t\tSystem.out.println(\"Second Method: \"+aset);\n\t\t\n\t}",
"public static void main(String[] args) {\n HashSet<Person> set = new HashSet<>(10);\n for (int i = 0; i < 10; i++) {\n set.add(new Person(\"person\" + i, i));\n }\n for (int i = 0; i < 10; i++) {\n set.add(new Person(\"person\", 15));\n }\n Person p1 = new Person(\"person\", 15);\n Person p2 = new Person(\"person\", 15);\n System.out.println(p1 + \" hascode: \" + p1.hashCode());\n System.out.println(p2 + \" hascode: \" + p2.hashCode());\n System.out.println(\"person1 equals person2 \" + p1.equals(p2));\n for (Person person : set) {\n System.out.println(person);\n }\n }",
"public static void main(String[] args) {\r\n\t\tHashSet h1=new HashSet();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\th1.add(3);\r\n\t\th1.add(7); //Homogeous \r\n\t\th1.add(9);//hetrogeous\r\n\t\th1.add(10);\r\n\t\t\r\n\t\tTreeSet t1=new TreeSet(h1);\r\n\t\tt1.add(100);\r\n\t\tSystem.out.println(t1);\r\n\t}",
"public static void main(String[] args) {\n\t\tHashSet<Integer> hs = new HashSet<Integer>();// Generics\n\t\ths.add(123);\n\t\ths.add(124);\n\t\ths.add(124);\n\t\ths.add(null);\n\t\ths.add(125);\n\t\ths.add(129);\n\t\ths.add(145);\n\t\tSystem.out.println(hs);\n\t\t// accessing hash set elements/objects in sequence\n\t\tIterator<Integer> itr = hs.iterator();\n\t\tSystem.out.println(\"HashSet values using Iterator\");\n\t\twhile (itr.hasNext()) {\n\t\t\tSystem.out.println(itr.next());\n\t\t\tSystem.out.println();\n\t\t}\n\n\t\tHashSet<String> flowerList = new HashSet<String>(8, 0.60f);\n\t\t// capacity = 8\n\t\t// load factor = 0.6 means if hash set is filled by 60% then the size of hash\n\t\t// set will be doubled\n\t\tflowerList.add(\"Rose\");\n\t\tflowerList.add(\"Jasmine\");\n\t\tflowerList.add(\"Marigold\");\n\n\t\t// adding Student objects in to hash set\n\t\tHashSet<Hash_Student> stdList = new HashSet<Hash_Student>();\n\t\tHash_Student std;\n\t\tScanner sc = new Scanner(System.in);\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tSystem.out.println(\"Enter the details of Student\");\n\t\t\tSystem.out.println(\"Enter the Student id\");\n\t\t\tint id = sc.nextInt();\n\t\t\tSystem.out.println(\"Enter the Student Name\");\n\t\t\tString name = sc.next();\n\t\t\tstdList.add(new Hash_Student(id, name));\n\t\t}\n\n\t\t// displaying the student details\n\t\tIterator<Hash_Student> stuItr = stdList.iterator();\n\t\tSystem.out.println(\"Student HashSet values using Iterator\");\n\t\twhile (stuItr.hasNext()) {\n\t\t\tHash_Student st = stuItr.next();\n\t\t\tSystem.out.println(st.getSname() + \" \\t\\t\\t \" + st.getSid());\n\t\t\tSystem.out.println();\n\t\t}\n\n\t\t// removeing the student\n\t\tSystem.out.println(\"Enter the Student id to remove\");\n\t\tint id = sc.nextInt();\n\t\twhile (stuItr.hasNext()) {\n\t\t\tHash_Student st = stuItr.next();\n\t\t\tif (st.getSid() == id) {\n\t\t\t\tstuItr.remove();\n\t\t\t}\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\tHashSet<String> set1 = new HashSet<String>();\n\t\tset1.add(\"a\");\n\t\tset1.add(\"b\");\n\t\tset1.add(\"z\");\n\t\tset1.add(\"w\");\n\t\tset1.add(\"a\");\n\t\tset1.add(null);\n\t\t\n\t\t\n\t\tIterator itr = set1.iterator();\n\t\t\n\t\twhile(itr.hasNext()) {\n\t\t\tSystem.out.println(itr.next());\n\t\t}\n\t\t\n\t\tSystem.out.println(\"+++++++++++++++++++\");\n\t\t\n\t\tfor(String s:set1){\n\t\t\tSystem.out.println(\"Set1 Elements : \" + s);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"+++++++++++++++++++\");\n\t\t\n\t\tSystem.out.println(\"Print All HashSet Elements \" + set1);\n\t\t\n\t\tEmployeeSet ravi = new EmployeeSet(101, \"Ravi\", 1000.00);\n\t\tEmployeeSet veera = new EmployeeSet(102, \"Veera\", 1001.00);\n\t\tEmployeeSet Sam = new EmployeeSet(103, \"Sam\", 1005.00);\n\t\tEmployeeSet Manju = new EmployeeSet(104, \"Manju\", 1010.00);\n\t\tEmployeeSet Virat = new EmployeeSet(101, \"Ravi\", 1000.00);\n\t\t\n\t\tHashSet<EmployeeSet> emp2 = new HashSet<EmployeeSet>();\n\t\t\n\t\temp2.add(ravi);\n\t\temp2.add(veera);\n\t\temp2.add(Manju);\n\t\temp2.add(Sam);\n\t\temp2.add(Virat);\n\t\t\n\t\tSystem.out.println(\"+++++++++++++++++++++++++++++++++++++++++\");\n\t\t\n\t\t//Collections.sort(emp2);\n\t\t//Set is unordered collection and \n\t\t\n\t\tfor(EmployeeSet h:emp2){\n\t\t\tSystem.out.println(\"HashSet \" + h);\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\" Employee HashSet : \" + emp2);\n\t\t\t\t\t\t\n\t}",
"@Override\n public int hashCode() {\n return (first != null ? 41 * first.hashCode() : 0) + (second != null ? second.hashCode() : 0);\n }",
"public static void main(String[] args) {\nSystem.out.println(\"**********************HashSet********************\");\n\t Set<String> set=new HashSet<String>();\n\t set.add(\"abc\");\n\t set.add(\"abc\");\n\t set.add(\"def\");\n\t print(set);\n\t \n\t System.out.println(\"**********************LinkedHashSet********************\"); \n\t Set<Integer> lset=new LinkedHashSet<Integer>();\n\t lset.add(1);\n\t lset.add(100);\n\t lset.add(100);\n\t print(lset);\n\t \n\t System.out.println(\"**********************TreeSet********************\");\n\t Set<String> ts=new TreeSet<String>();\n\t ts.add(\"aabbcc\");\n\t ts.add(\"ddeeff\");\n\t ts.add(\"awsedr\");\n\t print(ts);\n\t \n\t System.out.println(\"**********************ArrayList********************\");\n\t List<Integer> list=new ArrayList<Integer>();\n\t list.add(1);\n\t list.add(2);\n\t list.add(3);\n\t list.add(3);\n\t list.add(4);\n\t print(list);\n\t \n\t \n\t System.out.println(\"**********************Vector********************\");\n\t List<String> vect=new Vector<String>();\n\t vect.add(\"a\");\n\t vect.add(\"b\");\n\t vect.add(\"c\");\n\t vect.add(\"d\");\n\t vect.add(\"d\");\n\t print(vect);\n\t \n\t System.out.println(\"**********************LinkedList********************\");\n\t List<Integer> linkedList=new LinkedList<Integer>();\n\t linkedList.add(9);\n\t linkedList.add(7);\n\t linkedList.add(1);\n\t linkedList.add(7);\n\t print(linkedList);\n\t \n\t System.out.println(\"**********************HashMap<Integer, Integer>********************\");\n\t Map<Integer, Integer> mp=new HashMap<Integer,Integer>();\n\t mp.put(1, 2);\n\t mp.put(3, 4);\n\t mp.put(5, 6);\n\t mp.put(7, 8);\n\t printMap(mp);\n\t \n\t \n\t System.out.println(\"**********************HashMap<Integer, String>********************\");\n\t Map<Integer, String> mp1=new HashMap<Integer,String>();\n\t mp1.put(1, \"a\");\n\t mp1.put(2, \"b\");\n\t mp1.put(3, \"c\");\n\t mp1.put(4, \"d\");\n\t printMap(mp1);\n\t \n\t System.out.println(\"**********************LinkedHashMap<String, Integer>********************\");\n\t Map<String, Integer> mp2=new HashMap<String, Integer>();\n\t mp2.put(\"a\", 1);\n\t mp2.put(\"a\", 2);\n\t mp2.put(\"b\", 3);\n\t mp2.put(\"d\", 4);\n\t printMap(mp2);\n\t \n\t \n\t System.out.println(\"**********************TreeMap<String, String>********************\");\n\t Map<String, String> mp3=new HashMap<String, String>();\n\t mp3.put(\"a\", \"z\");\n\t mp3.put(\"a\", \"y\");\n\t mp3.put(\"a\", \"y\");\n\t mp3.put(\"b\", \"x\");\n\t mp3.put(\"d\", \"w\");\n\t printMap(mp3);\n\t \n\t \n\t \n\t \n\t}",
"protected <Ty> HashSet<Ty> union(HashSet<Ty> setA, HashSet<Ty> setB) {\n HashSet<Ty> retSet = new HashSet<>();\n retSet.addAll(setA);\n retSet.addAll(setB);\n return retSet;\n }",
"private static Set symmetricSetDifference (Set<Integer> set1, Set<Integer> set2)\n {\n Set<Integer> skæringspunktet = new HashSet<Integer>(set1);\n\n // Holder på set2 også\n skæringspunktet.retainAll(set2);\n\n // Set1 fjerner alt fra Settet\n set1.removeAll(skæringspunktet);\n // Set1 fjerner alt fra Settet\n set2.removeAll(skæringspunktet);\n\n // Tilføjer alt fra set2 til set1\n set1.addAll(set2);\n\n // Returnerer set1\n return set1;\n }",
"public SetSet setDifference(SetSet second){\n\t\tSetSet result = new SetSet();\n\t\tfor(int i=0;i<size();i++){\n\t\t\tif(second.contains(get(i))==-1){\n\t\t\t\tresult.add(get(i));\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"public static void main(String[] args) {\n String s1 = \"ShivaniKashyap\";\n char[] chararray = s1.toCharArray();\n LinkedHashSet set = new LinkedHashSet();\n LinkedHashSet newset = new LinkedHashSet();\n for(int i=0;i<chararray.length;i++)\n {\n if( !set.add(chararray[i]))\n {\n newset.add(chararray[i]);\n\n }\n\n }\n System.out.println(newset);\n }",
"protected <Ty> HashSet<Ty> intersection(HashSet<Ty> setA, HashSet<Ty> setB) {\n HashSet<Ty> retSet = new HashSet<>();\n for (Ty t : setA) {\n if (setB.contains(t)) {\n retSet.add(t);\n }\n }\n return retSet;\n }",
"private static HashSet<Annotation> setDifference(HashSet<Annotation> setA,\r\n\t\t\tHashSet<Annotation> setB) {\r\n\r\n\t\tHashSet<Annotation> tmp = new HashSet<Annotation>(setA);\r\n\t\ttmp.removeAll(setB);\r\n\t\treturn tmp;\r\n\t}",
"public static void main(String[] args) {\n\n Set<String> mySetList = new SetC<>();\n Set<String> hashSetList = new HashSet<>();\n\n\n\n mySetList.add(\"Тест1\"); hashSetList.add(\"Тест1\");\n mySetList.add(\"Тест2\"); hashSetList.add(\"Тест2\");\n mySetList.add(\"Тест3\"); hashSetList.add(\"Тест3\");\n\n\n\n System.out.println(\"mySetList:\"+mySetList+\"\\nhashSetList:\"+hashSetList);\n\n\n\n }",
"HSet entrySet();",
"public MyHashSet() {\n hset = new boolean[bucket][]; //get the second array size only if it is required : space conservation if possible\n }",
"@Test\n\tpublic void testAddHash() {\n\t\t// add a new method for ordering\n\t\tMySet <String> s = loadSet();\n\t\ts.add(\"Alice\");\n\t\ts.add(\"Sue\");\n\t\ts.add(\"Bob\");\n\t\ts.add(\"Cindy\");\n\t\ts.add(\"Joe\");\n\t\t\n\t\tassertEquals(5, ((MyHashSet<String>)s).map.size());\n\t\t\n\t\t\t\n\t}",
"void modusponens(){\n\t\tHashMap<String,HashSet<Hypothesis> > temp_lhs_hypo = new HashMap<String,HashSet<Hypothesis> >();\n\t\tHashSet<Hypothesis> new_hypos = new HashSet<Hypothesis>();\n\t\t\n\t\t//Utils.println(\"hypothesis list\");\n\t\tIterator it = hypothesis.entrySet().iterator();\n\t while (it.hasNext()) {\n\t Map.Entry pairs = (Map.Entry)it.next();\n\t String A = (String)pairs.getKey();\n\t //Utils.println(\"hypothesis A : \"+A);\n\t HashSet<Hypothesis> A_B = new_lhs_hypo.get(A);\n\t if(A_B == null) {\n\t \t//Utils.println(\"No match\");\n\t \tcontinue;\n\t \t}\n\t else{\n\t \t//Utils.println(\"Matched: \"+A_B.size());\n\t \tIterator bit = A_B.iterator();\n\t \twhile (bit.hasNext()) {\n\t \t Hypothesis A_B_hypo = (Hypothesis)bit.next();\n\t\t \tHypothesis mp_hypo = makeHypothesis(A_B_hypo.rhs, 1, -1, A, A_B_hypo.expression);\n\t\t \tif(mp_hypo!=null) {\n\t\t \t\tnew_hypos.add(mp_hypo);\n\t\t\t \tif(hypothesis.containsKey(mp_hypo.expression)) {\n\t\t\t \t\t//Utils.println(\"Existing MP result: \"+A_B_hypo.rhs+\" on \"+A+\" and \"+A_B_hypo.expression);\n\t\t\t \t\t//already existing\n\t\t\t\t }else{// new hypothesis has resulted\n\t\t\t\t \t//Utils.println(\"New MP result: \"+A_B_hypo.rhs+\" on \"+A+\" and \"+A_B_hypo.expression);\n\t\t\t\t }\n\t\t \t}else{\n\t\t \t\t//Utils.println(\"MP Not Valid: \"+A_B_hypo.rhs+\" on \"+A+\" and \"+A_B_hypo.expression);\n\t\t \t}\n\t\t }\n\t }\n\t }\n\t \n\t //Utils.println(\"new hypothesis list\");\n\t it = new_lhs_hypo.entrySet().iterator();\n\t while (it.hasNext()) {\n\t Map.Entry pairs = (Map.Entry)it.next();\n\t HashSet<Hypothesis> hypos = (HashSet<Hypothesis>) pairs.getValue();\n\t Iterator<Hypothesis> Ait = hypos.iterator();\n\t while(Ait.hasNext()){\n\t \tString A = ((Hypothesis)Ait.next()).expression;\n\t \t//Utils.println(\"hypothesis A : \"+A);\n\t \tHashSet<String> B_set = lhs_hypo.get(A);\n\t \tif(B_set == null){\n\t \t\t//Utils.println(\"No match\");\n\t \t\tcontinue;\n\t \t\t}\n\t \telse{\n\t \t\t//Utils.println(\"Matched: \"+B_set.size());\n\t \t\tIterator Bit = B_set.iterator();\n\t\t \twhile(Bit.hasNext()){\n\t\t \t\tString B_str = (String) Bit.next();\n\t\t \t\tString A_B_exp = Utils.expression(A, B_str);\n\t\t \t\tHypothesis mp_hypo = makeHypothesis(B_str, 1, -1, A, A_B_exp);\n\t\t \t\tif(mp_hypo!=null) {\n\t\t\t \t\tnew_hypos.add(mp_hypo);\n\t\t\t\t \tif(hypothesis.containsKey(mp_hypo.expression)) {\n\t\t\t\t \t\t//Utils.println(\"Existing MP result: \"+B_str+\" on \"+A+\" and \"+A_B_exp);\n\t\t\t\t \t\t//already existing\n\t\t\t\t\t }else{// new hypothesis has resulted\n\t\t\t\t\t \t//Utils.println(\"New MP result: \"+B_str+\" on \"+A+\" and \"+A_B_exp);\n\t\t\t\t\t }\n\t\t\t \t}else{\n\t\t\t \t\t//Utils.println(\"MP Not Valid: \"+B_str+\" on \"+A+\" and \"+A_B_exp);\n\t\t\t \t}\n\t\t \t}\n\t \t}\n\t \t\n\t }\n\t }\n\t \n\t //Utils.println(\"Size of new_hypos: \"+new_hypos.size());\n\t \n\t Iterator<Hypothesis> hit = new_hypos.iterator();\n\t while(hit.hasNext()){\n\t \tHypothesis mp_hypo = hit.next();\n\t \tboolean b = insertHypothesis(mp_hypo);\n\t \tif(b){\n\t \t\tHashSet<Hypothesis> temp_hypos = temp_lhs_hypo.get(mp_hypo.lhs);\n\t \tif(temp_hypos == null){\n\t \t\ttemp_hypos = new HashSet<Hypothesis>();\n\t \t\ttemp_hypos.add(mp_hypo);\n\t \t\ttemp_lhs_hypo.put(mp_hypo.lhs, temp_hypos);\n\t \t}else{\n\t \t\ttemp_hypos.add(mp_hypo);\n\t \t}\n\t \t//Utils.printHypothesis(mp_hypo);\n\t \t}\n\t }\n\t \n\n\t //Utils.println(\"Size of temp_lhs_hypo: \"+temp_lhs_hypo.size());\n\t \n\t new_lhs_hypo.clear();\n\t new_lhs_hypo = temp_lhs_hypo;\n\t if(new_lhs_hypo.size()!=0) modusponens();\n\t}",
"public static void main(String[] args) {\n ArrayList<Integer> nums = new ArrayList<>();\n nums.addAll( Arrays.asList(100, 2000, 50, 50, 100, 200, 300, 50));\n nums=new ArrayList<>(new TreeSet<>(nums));\n System.out.println(nums);\n\n String str1 = \"babababC\";\n str1 = new TreeSet<>( Arrays.asList(str1.split(\"\")) ).toString();\n System.out.println(str1);\n\n\n System.out.println(\"=========================================================================================\");\n\n /**\n * - 2. Write a program that can REMOVE THE DUPLICATES from an ArrayList. DO NOT change the ORDER\n * -> LinkedHashSet -> Remove Duplicates and Keeps the Insertion Order\n */\n ArrayList<Integer> list = new ArrayList<>(Arrays.asList(6,6,6,6,5,5,5,4,4,4,4));\n list=new ArrayList<>(new LinkedHashSet<>(list));\n System.out.println(list);\n\n\n /**\n * - 1. Write a program that can remove the duplicated characters from String and store them into variable\n */\n String str = \"ABABABCDEF\";\n String[] arr = str.split(\"\");\n str = new LinkedHashSet<>(Arrays.asList(arr)).toString().replace(\", \", \"\");\n System.out.println(str);\n\n\n System.out.println(\"=========================================================================================\");\n\n /**\n * -> Does not accept duplicates, and sort the objects\n * -> HashSet accepts null\n * -> HashSet is faster than TreeSet\n */\n HashSet<Integer> numbers = new HashSet<>(Arrays.asList(10,9,10, 9, 8, 7, 8, 7, 6, 5, 6, 1));\n System.out.println(numbers ); // -> [1, 5, 6, 7, 8, 9, 10]\n\n\n System.out.println(\"=========================================================================================\");\n\n /**\n * - ITERATOR: -> is the only way to remove duplicates from collection\n * - removeIf -> removes numbers because it is uses the iterator interface internally. Iterator implicitly\n *\n * - hasNext() method only can go forward cant go backward. it stars from next index\n * - when we use it our loop hasNext() iterates from the next index\n * - iterator(); - hasNext(); - next(); - remove();\n */\n ArrayList<Integer> list2 = new ArrayList<>(Arrays.asList(1,1,2,2,3,3,4,4,5,5));\n list2.removeIf( p -> p < 4 );\n System.out.println(list2);\n\n\n ArrayList<Integer> list3 = new ArrayList<>(Arrays.asList(1,1,2,2,3,3,4,4,5,5));\n Iterator<Integer> it =list3.iterator(); // - this method will return iterator\n while( it.hasNext() ){ // - iterator explicitly. While loop only accept boolean\n if( it.next() < 4 ){\n it.remove();\n }\n }\n System.out.println(list3);\n\n\n ArrayList<Integer> list4 = new ArrayList<>(Arrays.asList(1,1,2,3,3,4,4,5,5));\n // - hasNext(); will iterate all the indexes. We do not need extra iterator in the loop\n for(Iterator<Integer> I = list4.iterator(); I.hasNext(); ){\n if( I.next() < 4) {\n I.remove();\n }\n }\n System.out.println(list4);\n\n\n\n LinkedHashSet<String> names = new LinkedHashSet<>();\n names.addAll(Arrays.asList( \"Mehmet\",\"Mohammed\",\"Yucel\",\"Sha\",\"Ozgur\", \"Ahmet\",\"Osmanj\",\"Ozgur\",\"Ozgur\",\"Irina\"));\n System.out.println(names);\n Iterator<String> it3 = names.iterator();\n while( it3.hasNext() ){\n String s = it3.next();\n if(s.contains(\"m\") || s.contains(\"M\")){ // - s.toLowerCase.contains(\"m\")\n it3.remove();\n }\n }\n System.out.println(names);\n\n /*\n ===============================================================\n for(Iterator<String> it3 = names.iterator(); it3.hasNext() ; ){\n String s = it3.next();\n if(s.toLowerCase().contains(\"m\")){\n it3.remove();\n }\n }\n ================================================================\n names.removeIf( s -> s.contains(\"m\") || s.contains(\"M\") );\n ================================================================\n names.removeAll( Arrays.asList( \"Mehmet\", \"Ozgur\", \"Mohammed\" ));\n ================================================================\n names.retainAll( Arrays.asList( \"Yucel\", \"Sha\", \"Ahmet\" ) );\n ================================================================\n boolean result = list.containsAll( Arrays.asList(5, 6, 9, 8, 11 ));\n */\n\n\n\n\n\n\n\n System.out.println(\"=========================================================================================\");\n\n\n\n\n\n }",
"public static void main(String[] args) {\n\t\tHashSet<Integer> st = new HashSet<Integer>();\n\t\t/*The HashSet class is an inherent implementation of the hash table data structure. \n\t\t * The objects that we insert into the HashSet do not guarantee to be inserted in the same order. \n\t\t * The objects are inserted based on their hashcode. \n\t\t * This class also allows the insertion of NULL elements*/\n\t\tst.add(13);\n\t\t//st.get(0); As the values are stored according to hash values we can't access them by indices\n\t\tIterator<Integer> itr = st.iterator();\n\t\twhile(itr.hasNext())\n\t\t\tSystem.out.println(itr.next());\n\t\t/*A linked hashset is similar to that of Hash set but it uses a doubly linked list to store the data\n\t\t and retains the ordering of elements */\n\t\tLinkedHashSet<String> s1 = new LinkedHashSet<String>();\n\t\ts1.add(\"Prashanth\");\n\t\ts1.add(\"Pranavi\");\n\t\tSystem.out.println(s1);\n\t\t/*Tree set class uses tree for storage of elements. The ordering of elements is maintained by using\n\t\t a set using their natural ordering */\n\t\tTreeSet<String> s2 = new TreeSet<String>();\n\t\ts2.add(\"Shobha Rani\");\n\t\ts2.add(\"Raj Kumar\");\n\t\tSystem.out.println(s2);\n\t}",
"public static void main(String[] args) {\n\t\tThread thread1=new Thread(new Runnable(){\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tlong start=System.currentTimeMillis();\r\n\t\t\t\tHashSetAdd hsd=new HashSetAdd();\r\n\t\t\t\tHashSet<String> hs1=hsd.add();\r\n\t\t\t\tSystem.out.println(\"size1=:\"+hs1.size());\r\n\t\t\t\tfor(String result:hs1){\r\n\t\t\t\t\tresult.toString();\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tlong end=System.currentTimeMillis();\r\n\t\t\t\tSystem.out.println(\"time1=: \"+(end-start));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\tThread thread2=new Thread(new Runnable(){\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tlong start=System.currentTimeMillis();\r\n\t\t\t\tHashSetAdd hsd=new HashSetAdd();\r\n\t\t\t\tHashSet<String> hs2=hsd.add();\r\n\t\t\t\tSystem.out.println(\"size2=:\"+hs2.size());\r\n\t\t\t\tIterator<String> iter = hs2.iterator();\r\n\t\t\t\twhile(iter.hasNext()){\r\n\t\t\t\t String result = iter.next();\r\n\t\t\t\t }\r\n\t\t\t\t\r\n\t\t\t\tlong end=System.currentTimeMillis();\r\n\t\t\t\tSystem.out.println(\"time2=: \"+(end-start));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t\tthread1.start();\r\n\t\tthread2.start();\r\n\r\n\t\r\n\t}",
"@Test\n public void testIntersection2()\n {\n final int[] ints1 = {33, 100000};\n final int[] ints2 = {34, 100000};\n List<Integer> expected = Collections.singletonList(100000);\n\n ConciseSet set1 = new ConciseSet();\n for (int i : ints1) {\n set1.add(i);\n }\n ConciseSet set2 = new ConciseSet();\n for (int i : ints2) {\n set2.add(i);\n }\n\n verifyIntersection(expected, set1, set2);\n }",
"public void intersectionOf(IntegerSet set1, IntegerSet set2) {\n get = new int[0];\n for (int i : set1.get)\n if (set2.hasElement(i))\n insertElement(i);\n }",
"private static Set<C3246b> m11181b(Set<C3246b> set) {\n HashSet hashSet = new HashSet();\n for (C3246b next : set) {\n if (next.mo20822f()) {\n hashSet.add(next);\n }\n }\n return hashSet;\n }",
"@Test\n public void testEquals03() {\n System.out.println(\"equals\");\n\n Set<User> users = new HashSet<>();\n users.add(new User(\"nick0\", \"[email protected]\"));\n users.add(new User(\"nick1\", \"[email protected]\"));\n users.add(new User(\"nick2\", \"[email protected]\"));\n users.add(new User(\"nick3\", \"[email protected]\"));\n users.add(new User(\"nick4\", \"[email protected]\"));\n users.add(new User(\"nick5\", \"[email protected]\"));\n users.add(new User(\"nick6\", \"[email protected]\"));\n users.add(new User(\"nick7\", \"[email protected]\"));\n users.add(new User(\"nick8\", \"[email protected]\"));\n users.add(new User(\"nick9\", \"[email protected]\"));\n\n Set<City> cities = new HashSet<>();\n cities.add(new City(new Pair(41.243345, -8.674084), \"city0\", 28));\n cities.add(new City(new Pair(41.237364, -8.846746), \"city1\", 72));\n cities.add(new City(new Pair(40.519841, -8.085113), \"city2\", 81));\n cities.add(new City(new Pair(41.118700, -8.589700), \"city3\", 42));\n cities.add(new City(new Pair(41.467407, -8.964340), \"city4\", 64));\n cities.add(new City(new Pair(41.337408, -8.291943), \"city5\", 74));\n cities.add(new City(new Pair(41.314965, -8.423371), \"city6\", 80));\n cities.add(new City(new Pair(40.822244, -8.794953), \"city7\", 11));\n cities.add(new City(new Pair(40.781886, -8.697502), \"city8\", 7));\n cities.add(new City(new Pair(40.851360, -8.136585), \"city9\", 65));\n\n SocialNetwork otherSN = new SocialNetwork(users, cities);\n boolean result = sn10.equals(otherSN);\n assertTrue(result);\n }",
"public Set Intersection(Set secondSet) {\n\t\t\t\n\t\tArrayList<String> firstArray = noDuplicates(stringArray);\n\t\t// Taking out duplications out of our sets by calling the noDuplicates private function\n\t\tArrayList<String> secondArray = noDuplicates(secondSet.returnArray());\n\t\t\n\t\tArrayList<String> intersectionOfBoth = new ArrayList<String>();\n\t\t// New ArrayList to hold the final values\n\t\t\n\t\tfor (int i=0; i < firstArray.size(); i++) {\n\t\t\tif (secondArray.contains(firstArray.get(i)) && intersectionOfBoth.contains(firstArray.get(i)) == false) {\n\t\t\t\tintersectionOfBoth.add(firstArray.get(i));\n\t\t\t\t// If our second array contains that same element from our first array, and the final ArrayList\n\t\t\t\t// does not already contain that element, then add it to our final ArrayList\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\tSet intersectionReturn = new Set(intersectionOfBoth); // Initiate a Set object from our final ArrayList\n\t\t\n\t\treturn intersectionReturn; // Return our Set Object\n\t}",
"@Override\n public int hashCode() {\n final int prime = 31;\n int result = 1;\n int lowerIndex = Math.min(index1, index2);\n int higherIndex = Math.max(index1, index2);\n result = prime * result + lowerIndex;\n result = prime * result + higherIndex;\n return result;\n }",
"public static void main(String[] args) {\n\t\tSet<Puppy> set = new LinkedHashSet<Puppy>(10);\n\t\t\n\t\t// this DS which can hold other object\n\t\tPuppy puppy1=new Puppy(\"Tommy\",10 );\n\t\tPuppy puppy2=new Puppy(\"AHH\", 12);\n\t\tPuppy puppy3=new Puppy(\"MYY\", 5);\n\t\tPuppy puppy4=new Puppy(\"NANY\", 3);\n\t\tPuppy puppy5=new Puppy(\"NANY\", 3);\n\t\t\n\t\t//dog4 and dog5 are duplicate elements\n\t\tset.add(puppy1);\n\t\tset.add(puppy2);\n\t\tset.add(puppy3);\n\t\tset.add(puppy4);\n\t\tset.add(puppy5);\n\t\t\n\t\tSystem.out.println(\"puppy4 . hashCode () = \"+puppy4.hashCode());\n\t\tSystem.out.println(\"puppy5 . hashCode () = \"+puppy5.hashCode());\n\t\t\n\t\tIterator<Puppy> iterator=set.iterator();\n\t\t\n\t\tSystem.out.println(\"Accessing data using Iterator interface!\");\n\t\twhile(iterator.hasNext()){\n\t\t\tPuppy puppy=iterator.next();\n\t\t\tSystem.out.println(puppy);\n\t\t}\n\t\t\n\t\t\n\t\tSystem.out.println(\"____________-----\");\n\t\tfor(Puppy puppy:set){\n\t\t\tSystem.out.println(puppy);\n\t\t}\n\t\t\n\t\tPuppy puppy6=new Puppy(\"NANY\", 3);\n\t\t\n\t\tboolean b=set.contains(puppy6);\n\t\tif(b){\n\t\t\tSystem.out.println(\"puppy6 found in set!\"+puppy6);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Run it\");\n\t\t /* final Entry<K,V> getEntry(Object key) {\n\t\t int hash = (key == null) ? 0 : hash(key.hashCode());\n\t\t for (Entry<K,V> e = table[indexFor(hash, table.length)];\n\t\t e != null;\n\t\t e = e.next) {\n\t\t Object k;\n\t\t if (e.hash == hash &&\n\t\t ((k = e.key) == key || (key != null && key.equals(k))))\n\t\t return e;\n\t\t }\n\t\t return null;\n\t\t } */\n\t\t b=set.contains(puppy1);\n\t\tif(b){\n\t\t\tSystem.out.println(b+\"is found in set!\");\n\t\t}\n\t\t\n\n\t}",
"public static void main(String[] args) {\nLinkedHashSet<String> name_set=new LinkedHashSet<String>();\nname_set.add(\"John\");\nname_set.add(\"Fletcher\");\nname_set.add(\"Kirill\");\nname_set.add(\"Kowing\");\n//Adding same Record again to Linked Hash Set , will not add duplicate record\nname_set.add(\"John\");\nSystem.out.println(\" Record Set\"+name_set);\nSystem.out.println(\"Size of the Set: \"+name_set.size());\nSystem.out.println(\"Set Contains Kirill: \"+name_set.contains(\"Kirill\"));\nSystem.out.println(\"Set Contains Johncena : \"+name_set.contains(\"Johncena\"));\nname_set.remove(\"Kowing\");\nSystem.out.println(\"-----------------------------------------------\");\n\nSystem.out.println(\"Updated Record Set: \"+name_set);\nSystem.out.println(\"Size of the Set: \"+name_set.size());\nSystem.out.println(\"Set Contains Kirill: \"+name_set.contains(\"Kirill\"));\nSystem.out.println(\"Set Contains Kowing : \"+name_set.contains(\"Kowing\"));\n\n\t}",
"public void unionOf(IntegerSet set1, IntegerSet set2) {\n get = new int[0];\n for (int i : set1.get)\n insertElement(i);\n for (int i : set2.get)\n insertElement(i);\n }",
"private Set<String> getIntersection( Set<String> a, Set<String> b ) {\n\t\tSet<String> intersection = new HashSet<String>(a);\n\t\tintersection.retainAll(b);\n\t\treturn intersection;\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn idx1.hashCode() * 811 + idx2.hashCode();\n\t}",
"@Override\r\n\tpublic int hashCode() {\r\n\t\tint hashCode = 0;\r\n\t\tfor (K key : keySet()) {\r\n\t\t\thashCode += (key.hashCode() ^ get(key).hashCode());\r\n\t\t}\r\n\t\treturn hashCode;\r\n\t}",
"private Set<String> intersection(Set<String> s1, Set<String> s2) {\n Set<String> intersection = new HashSet<>(s1);\n intersection.retainAll(s2);\n return intersection;\n }",
"public static void main(String[] args) {\n\t\t\n\tint[] firstArr =\t{1,2,3,4,5};\n\tint[] secondArr =\t{2,3,4,9,6,10};\n\tSet<Integer> set = new HashSet<Integer>();\n\tfor(int i=0; i<secondArr.length; i++) {\n\t\tset.add(secondArr[i]);\n\t}\n\tfor(int i=0; i<firstArr.length; i++) {\n\t\tboolean status =set.add(firstArr[i]);\n\t\tif(status==false) {\n\t\t\tSystem.out.println(\"Intersection Elements :\"+firstArr[i]);\n\t }\n\t}\n }",
"Boolean same(MultiSet<X> s);",
"@Override\n public int hashCode() {\n int result = table1.hashCode();\n result = 31 * result + table2.hashCode();\n return result;\n }",
"public static void main(String[] args) {\n\t\tclass Person {\n\t\t\tprivate String nome;\n\n\t\t\tpublic Person(String nome) {\n\t\t\t\tthis.nome = nome;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic String toString() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn nome;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic boolean equals(Object obj) {\n\t\t\t\tSystem.out.println(\"Equals\");\n\t\t\t\tPerson person = (Person) obj;\n\t\t\t\treturn this.nome.equals(person.nome) ? true : false;\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic int hashCode() {\n\t\t\t\tSystem.out.println(\"Hashcode!\");\n\t\t\t\treturn nome.charAt(0);\n\t\t\t}\n\t\t}\n\t\tSet<String> setComHashSet = new HashSet<>();\n\t\tsetComHashSet.add(\"Nicholas\");\n\t\tsetComHashSet.add(\"Cabral\");\n\t\tsetComHashSet.add(\"Barbosa\");\n\t\tSystem.out.println(\"I dont care about order! I care about performance to add() \" + setComHashSet);\n\t\tSet<String> setTreeSet = new TreeSet<>(Set.copyOf(setComHashSet));\n\t\tSystem.out.println(\"I care about order, however I dont care about performance to add() \" + setTreeSet);\n\t\tSystem.out.println();\n\t\tSet<Person> setPerson = new HashSet<>();\n\t\tPerson person = new Person(\"Nicholas\");\n\t\tPerson person2 = new Person(\"Nicholas2\");\n\t\tsetPerson.add(person);\n\t\tsetPerson.add(person2);\n\t\tSystem.out.println(setPerson);\n\t\tString[] arr = { \"Nihcolas\" };\n\t\tList<String> lista = Arrays.asList(arr);\n\n\t\tA a = new A();\n\t\tSetCollection b = (SetCollection) a;\n\t\tSystem.out.println(a == b);\n\t}",
"@Override \n int hashCode();",
"public static void main(String[] args){\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.print(\"Enter n1 = \");\n\t\tint n1 = input.nextInt();\n\t\tint[] a1 = new int[n1];\n\t\tint i;\n\t\tSystem.out.println(\"Enter array-1 : \");\n\t\tfor(i=0;i<n1;i++)\n\t\t\ta1[i] = input.nextInt();\n\t\tSystem.out.print(\"Enter n2 = \");\n\t\tint n2 = input.nextInt();\n\t\tint[] a2 = new int[n2];\n\t\tSystem.out.println(\"Enter array-2 : \");\n\t\tfor(i=0;i<n2;i++)\n\t\t\ta2[i] = input.nextInt();\n\t\tHashMap<Integer,Boolean> h = new HashMap<Integer,Boolean>();\n\t\t\n\t\tfor(i=0;i<n1;i++){\n\t\t\tif (!h.containsKey(a1[i]))\n\t\t\t\th.put(a1[i],true);\n\t\t}\n\t\tint f=1;\n\t\tfor(i=0;i<n2;i++){\n\t\t\tif (! h.containsKey(a2[i]) )\n\t\t\t\tf=0;\n\t\t}\n\t\tif (f==1)\n\t\t\tSystem.out.println(\"Yes! It's a subset\");\n\t\telse\n\t\t\tSystem.out.println(\"No! It's NOT a subset\");\n\t\t\t\n\t\t\n\t\n\t}",
"private int[] mergeTwoSet(int[] firstSet, int[] secondSet){\n int threshold = firstSet.length + 1;\n\n int[] candidate = new int[threshold];\n\n int firstIndex = 0;\n int secondIndex = 0;\n int index = 0;\n\n while ((firstIndex < firstSet.length || secondIndex < secondSet.length) && index < threshold){\n if (firstIndex == firstSet.length){\n // The end of first set is reached\n candidate[index] = secondSet[secondIndex++];\n\n } else if (secondIndex == secondSet.length){\n // The end of second set is reached\n candidate[index] = firstSet[firstIndex++];\n } else {\n // Both sets still have candidates\n if (firstSet[firstIndex] == secondSet[secondIndex]){\n candidate[index] = firstSet[firstIndex++];\n secondIndex++;\n } else if (firstSet[firstIndex] < secondSet[secondIndex]){\n candidate[index] = firstSet[firstIndex++];\n } else{\n candidate[index] = secondSet[secondIndex++];\n }\n }\n index++;\n }\n\n if (firstIndex == firstSet.length && secondIndex == secondSet.length){\n // This is a valid candidate (contains all elements from first / second set)\n return candidate;\n }\n\n return null;\n }",
"public static void main(String[] args) {\n\t\tA1 a1=new A1(\"ram\",1,\"ram\");\n\t\tA1 a2=new A1(\"ram\",1,\"ram\");\n\t\tHashSet<A1> set=new HashSet<A1>();\n\t System.out.println(a1.getName());\n\t System.out.println(a2.getName());\n\t set.add(a1);\n\t set.add(a2);\n\t System.out.println(set.size());\n\t}",
"public void hashSet() {\n\n Set<Integer> num = new java.util.HashSet<>();\n\n num.add(3);\n num.add(11);\n num.add(6);\n\n System.out.println(num);\n\n for (int i = 1; i <= 10; i++) {\n\n if (num.contains(i)) {\n\n System.out.println(\"\\n\\t\" + i + \"\\t is found in set\");\n\n }\n\n }\n\n }",
"private Map mergeResults(Map first, Map second) {\n/* 216 */ Iterator verb_enum = second.keySet().iterator();\n/* 217 */ Map clonedHash = new HashMap(first);\n/* */ \n/* */ \n/* 220 */ while (verb_enum.hasNext()) {\n/* 221 */ String verb = verb_enum.next();\n/* 222 */ List cmdVector = (List)clonedHash.get(verb);\n/* 223 */ if (cmdVector == null) {\n/* 224 */ clonedHash.put(verb, second.get(verb));\n/* */ continue;\n/* */ } \n/* 227 */ List oldV = (List)second.get(verb);\n/* 228 */ cmdVector = new ArrayList(cmdVector);\n/* 229 */ cmdVector.addAll(oldV);\n/* 230 */ clonedHash.put(verb, cmdVector);\n/* */ } \n/* */ \n/* 233 */ return clonedHash;\n/* */ }",
"public static void main(String[] args) {\n\r\n\t\tHashSet set = new HashSet();\r\n\t\tset.hashSetImplementation();\r\n\t}",
"public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int N = Integer.parseInt(in.nextLine());\n HashSet<Character> first = new HashSet<Character>();\n HashSet<Character> second = new HashSet<Character>();\n int i=0;\n char temp = 'a';\n for(temp='a';temp<='z';temp++){\n \t first.add(temp);\n }\n int j;\n while(i<N){\n \t second.clear();\n \t char[] stringArray = in.nextLine().toCharArray();\n \t for(j=0;j<stringArray.length;j++){\n \t\t second.add(stringArray[j]); \n \t }\n \t first.retainAll(second);\n \t i++;\n }\n System.out.println(first.size());\n }",
"public static <T> void intersectionToSet1(HashSet<T> set1, HashSet<T> set2) {\n for (T element : set1) {\n if (!set2.contains(element)) {\n set1.remove(element);\n }\n }\n }",
"public static Set<Doc> and(Set<Doc> set1, Set<Doc> set2) {\r\n \t\t\r\n \t\tif((set1 == null) || (set2 == null)) {\r\n\t\t\tSystem.err.println(\"Doc.and() returning null!\");\r\n \t\t\treturn new TreeSet<Doc>();\r\n \t\t}\r\n \t\t//set1.retainAll(set2);\r\n \t\t//return set1;\r\n \t\t\r\n \t\tTreeSet<Doc> result = new TreeSet<Doc>();\r\n \t\tIterator<Doc> op1 = set1.iterator();\r\n \t\tIterator<Doc> op2 = set2.iterator();\r\n \t\t\r\n \t\tDoc current1 = getNext(op1);\r\n \t\tDoc current2 = getNext(op2);\r\n \r\n \t\twhile(current1!=null && current2!=null) {\r\n \t\t\t//If is the same document\r\n \t\t\tif(current1.getID() == current2.getID()) {\r\n \t\t\t\tresult.add(current1);\r\n \t\t\t\tcurrent1 = getNext(op1);\r\n \t\t\t\tcurrent2 = getNext(op2);\r\n \t\t\t}\r\n \t\t\t//If op2 is ahead of op1\r\n \t\t\telse if(current1.getID() < current2.getID()) \r\n \t\t\t\tcurrent1 = getNext(op1);\r\n \t\t\t//If op1 is ahead of op2\r\n \t\t\telse\r\n \t\t\t\tcurrent2 = getNext(op2);\r\n \t\t}\r\n \t\t\r\n \t\treturn result;\r\n \t}",
"@Override\r\n public int hashCode() {\r\n return doc1.hashCode() + doc2.hashCode();\r\n }",
"public static void main(String[] args) {\n\t\tArrayList al=new ArrayList();\r\n\t\tal.add(1);\r\n\t\tal.add(2);\r\n\t\tal.add(3);\r\n\t\tal.add(4);\r\n\t\tal.add(1);\r\n\t\tal.add(2);\r\n\t\tSystem.out.println(\"Elements in ArrayList: \"+al);\r\n\t\t\r\n\t\tLinkedHashSet<Integer> lhs=new LinkedHashSet<Integer>(al);\r\n\t\tSystem.out.println(\"linkedhashset: \"+lhs);\r\n\t}",
"private static List<Integer> getCommonElementsAlgo2(int [] arr1, int [] arr2) {\n\t\t\n\t\tList<Integer> duplicates = new ArrayList<>();\n\t\t\n\t\tHashtable<Integer, Integer> table = new Hashtable<>();\n\t\t\n\t\tfor (int i : arr1) {\n\t\t\tif (table.containsKey(i)) {\n\t\t\t\ttable.put(i, table.get(i) + 1);\n\t\t\t}\n\t\t\ttable.put(i, 1);\n\t\t}\n\t\t\n\t\tfor (int j : arr2) {\n\t\t\tif (table.containsKey(j)) {\n\t\t\t\tduplicates.add(j);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn duplicates;\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"\\n\"+\"===================HashSet======================\");\n\n\t\tHashSet<Integer> set = new HashSet<Integer>();\n\t\t\t\t\n\t\tset.add(1);\n\t\tset.add(1);\n\t\tset.add(2);\n\t\tset.add(30);\n\t\tset.add(2);\n\t\tset.add(4);\n\t\tset.add(5);\n\t\tset.add(3);\n\t\tset.add(7);\n\n\t\tIterator<Integer> it = set.iterator();\n\t\t \n\t\twhile (it.hasNext()) {\n\t\t\tSystem.out.print(it.next()+\" \");\n\t\t}\n\t\tSystem.out.println(\"\\n\"+\"=========================================\");\n\t\t\n\t\tfor (Iterator iterator = set.iterator(); iterator.hasNext();) {\n\t\t\tSystem.out.print(iterator.next()+\" \");\n\t\t}\n\t\tSystem.out.println(\"\\n\"+\"=========================================\");\n\n\t\tfor (Integer integer : set) {\n\t\t\tSystem.out.print(integer+\" \");\n\t\t}\n\t\t\n\t\tSystem.out.println(\"\\n\"+\"==============HashSet添加学生类对象===========================\");\n\n\t\tHashSet<Student> stu = new HashSet<>();\n\t\t\n\t\tstu.add(new Student(\"alice\", 22, 01));\n\t\tstu.add(new Student(\"corrun\", 23, 02));\n\t\tstu.add(new Student(\"bear\", 20, 03));\n\t\tstu.add(new Student(\"bear\", 20, 03));\n\n\t\tfor (Student student : stu) {\n\t\t\tSystem.out.println(student);\n\t\t}\n\t}",
"public ZYSet<ElementType> intersection(ZYSet<ElementType> otherSet){\n ZYSet<ElementType> result = new ZYArraySet<ElementType>();\n for(ElementType e :this){\n if(otherSet.contains(e)){\n result.add(e);\n }\n }\n return result;\n }",
"@Test\n\tpublic void testAddAll() {\n\t Set<Integer> setA = new HashSet<>(Arrays.asList(1, 2, 3, 4, 5));\n\t Set<Integer> setB = new HashSet<>(Arrays.asList(9, 8, 7, 6, 5, 4, 3));\n\t setA.addAll(setB);\n\t Set<Integer> union = new HashSet<>(Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9));\n\t assertEquals(setA, union);\n }",
"public static int hashCodeForSet(Collection set) {\n/* 122 */ if (set == null) {\n/* 123 */ return 0;\n/* */ }\n/* 125 */ int hashCode = 0;\n/* 126 */ Iterator it = set.iterator();\n/* 127 */ Object obj = null;\n/* */ \n/* 129 */ while (it.hasNext()) {\n/* 130 */ obj = it.next();\n/* 131 */ if (obj != null) {\n/* 132 */ hashCode += obj.hashCode();\n/* */ }\n/* */ } \n/* 135 */ return hashCode;\n/* */ }",
"public static void main(String args[]) {\n\t\tSet <String> hs = new HashSet<String>();\n\n\t\t// add elements to the hash set\n\t\ths.add(\"B\");\n\t\ths.add(\"A\");\n\t\ths.add(\"D\");\n\t\ths.add(\"E\");\n\t\ths.add(\"C\");\n\t\ths.add(\"F\");\n\t\ths.add(\"F\");\n\t\t\n\t\tIterator<String> itr = hs.iterator();\n\t\twhile(itr.hasNext()){\n\t\t\tSystem.out.println(itr.next()+ \"--\");\n\t\t}\n\t\tSystem.out.println(hs);\n\t}",
"@Override\n\tpublic int hashCode() {\n\t int result = x;\n\t result = 31 * result * result + y;\n\t return result;\n\t}",
"@Test\n public void testHashCodeAndEquals() {\n Set<Pair<String, String>> pairs = IntStream.rangeClosed(1, 10).mapToObj( i->Pair.of(\"l\"+i, \"r\"+i)).collect( toSet() );\n assertEquals( 10, pairs.size() );\n assertTrue( pairs.contains(Pair.of(\"l1\", \"r1\")));\n assertFalse( pairs.contains(Pair.of(\"l100\", \"r100\")));\n }",
"public static void main(String args[]) {\n Set<String> hashSet = new HashSet<String>();\n \n hashSet.add(\"pratap\");\n hashSet.add(\"java\");\n \n // getting synchronized HashSet\n Set<String> synchronizedSet = Collections.synchronizedSet(hashSet);\n \n \n \n // Iterator on synchronizedSet won't be synchronized, so will have to\n // synchronize set using synchronization block during iteration\n System.out.println(\"------- iterating on synchronized set -------\");\n synchronized (synchronizedSet) {\n Iterator<String> iterator = synchronizedSet.iterator();\n while (iterator.hasNext()) {\n System.out.println(iterator.next());\n }\n }\n }",
"public boolean isSimilar(String[] words1, String[] words2, String[][] pairs) {\n Map<UUID, Set<String>> sets = new HashMap<>();\n\n // create lookup from word to set\n Map<String, UUID> wordToSetId = new HashMap<>();\n\n for (String[] pair: pairs) {\n // case1:\n // no word is associated with any set id : create a new set\n if (!wordToSetId.containsKey(pair[0]) && !wordToSetId.containsKey(pair[1])) {\n UUID setId = createSet(sets);\n mapWordToSet(sets, wordToSetId, pair[0], setId);\n mapWordToSet(sets, wordToSetId, pair[1], setId);\n }\n // case2:\n // one word is associated with a setId and other is not: merge other word to found set\n if ((wordToSetId.containsKey(pair[0]) && !wordToSetId.containsKey(pair[1])) ||\n (!wordToSetId.containsKey(pair[0]) && wordToSetId.containsKey(pair[1]))\n ) {\n UUID setId = wordToSetId.get(pair[0]) != null ? wordToSetId.get(pair[0]) : wordToSetId.get(pair[1]);\n if (wordToSetId.get(pair[0]) == null) {\n mapWordToSet(sets, wordToSetId, pair[0], setId);\n }\n if (wordToSetId.get(pair[1]) == null) {\n mapWordToSet(sets, wordToSetId, pair[1], setId);\n }\n }\n // case3:\n // both words are associated with different setIds : merge sets to a new setId, update mapping from word to setId\n if (wordToSetId.containsKey(pair[0])\n && wordToSetId.containsKey(pair[1])\n && !wordToSetId.get(pair[0]).equals(wordToSetId.containsKey(pair[1]))) {\n UUID setId1 = wordToSetId.get(pair[0]);\n UUID setId2 = wordToSetId.get(pair[1]);\n // create a merged set\n UUID mergedSetId = createSet(sets);\n for (String word: sets.get(setId1)) {\n mapWordToSet(sets, wordToSetId, word, mergedSetId);\n }\n for (String word: sets.get(setId2)) {\n mapWordToSet(sets, wordToSetId, word, mergedSetId);\n }\n sets.remove(setId1);\n sets.remove(setId2);\n }\n\n // case4:\n // both words are associated with same setIds\n }\n\n boolean isSimilar = true;\n for (int i=0; i<words1.length;i++) {\n if (wordToSetId.get(words1[i]).equals(wordToSetId.get(words2[i]))) {\n System.out.println(words1[i] + \" and \"+ words2[i] + \" are similar\");\n } else {\n isSimilar = false;\n System.out.println(words1[i] + \" and \"+ words2[i] + \" are different\");\n }\n }\n return isSimilar;\n }",
"int hashCode();",
"int hashCode();",
"@Override\n public int hashCode() {\n return Short.toUnsignedInt(x) + (Short.toUnsignedInt(y)<<16);\n }",
"@Override\n public SetInterface<T> intersection(SetInterface<T> rhs) {\n //create the return SetInterface\n SetInterface<T> result = new LinkedSet();\n Node n = first;\n //move through the modes\n while(n != null){\n //check if the item is also in rhs\n if(rhs.contains(n.value))\n result.addItem(n.value);\n n = n.next;\n }\n return result;\n }",
"public static void main(String[] args) {\n\t\tSet<String> set = new HashSet<String>();\n\t\t\t\n\t\tset.add(\"BMW\");\n\t\tset.add(\"Audi\");\n\t\tset.add(\"Honda\");\n\t\tset.add(\"Honda\");\n\t\t\n\t\tSystem.out.println(\"Hash Set\");\n\t\t\n\t\tfor (String item: set) {\n\t\t\tSystem.out.println(item);\n\t\t}\n\t\t\n\t\t// LinkedHashSet - Maintains the order in which elements are added\n\t\tSet<String> lHSet = new LinkedHashSet<String>();\n\t\tlHSet.add(\"BMW\");\n\t\tlHSet.add(\"Audi\");\n\t\tlHSet.add(\"Honda\");\n\t\tSystem.out.println(\"Linked Set\");\n\t\tfor (String item: lHSet) {\n\t\t\tSystem.out.println(item);\n\t\t}\n\t\t\n\t\t// TreeSet - Maintains the natural order , ie, 1, 2, 3, 4, \n\t\tSet<String> tSet = new TreeSet<String>();\n\t\ttSet.add(\"BMW\");\n\t\ttSet.add(\"Audi\");\n\t\ttSet.add(\"Honda\");\n\t\tSystem.out.println(\"Tree Set\");\n\t\tfor (String item: tSet) {\n\t\t\tSystem.out.println(item);\n\t\t}\n\t\t\n\t\tList<String> list = new ArrayList<String>();\n\t\t\n\t\tlist.add(\"BMW\");\n\t\tlist.add(\"Audi\");\n\t\tlist.add(\"Honda\");\n\t\t\n\t\tSystem.out.println(list);\n\t}",
"public InternalWorkingOfHashSet() {\r\n map = new HashMap<>();\r\n }",
"public int[] intersection(int[] nums1, int[] nums2) {\n \n HashSet<Integer> set = new HashSet<>();\n ArrayList<Integer> inter = new ArrayList<>();\n if(nums1.length > nums2.length)\n {\n for(int i = 0; i < nums1.length ;i ++)\n set.add(nums1[i]);\n\n for(int i = 0; i < nums2.length ;i ++)\n if(set.contains(nums2[i])&& !inter.contains(nums2[i]))\n inter.add(nums2[i]);\n }\n else {\n for(int i = 0; i < nums2.length ;i ++)\n set.add(nums2[i]);\n\n for(int i = 0; i < nums1.length ;i ++)\n if(set.contains(nums1[i]) && !inter.contains(nums1[i]))\n inter.add(nums1[i]);\n }\n\n int [] arr = new int[inter.size()];\n for(int i = 0; i < arr.length ;i ++)\n arr[i] = inter.get(i);\n return arr;\n\n }",
"public static double jaccardSet(Set s1, Set s2) {\n Set<String> union = new HashSet<>();\n union.addAll(s1);\n union.addAll(s2);\n Set<String> intersection = new HashSet<>(s1);\n intersection.retainAll(s2);\n if (union.size() <= 0) {\n return 0D;\n } else {\n return formatDouble((double) intersection.size() / union.size());\n }\n }",
"public static void main(String[] args) {\n Map<Integer, Integer> map = new HashMap<>();\r\n map.put(1, 1); // first pair\r\n map.put(2, 1); // second pair\r\n map.put(1, 3); // update the value of first pair\r\n\r\n // book - sales\r\n Book b1 = new Book(\"learn js\", 20);\r\n Book b2 = new Book(\"learn java\", 30);\r\n // we want to consider two books with same\r\n // name and same price to be matching\r\n Book b3 = new Book(\"learn css\", 10);\r\n Book b4 = new Book(\"learn css\", 10);\r\n Book b5 = new Book(\"learn csa\", 28);\r\n Map<Book, Integer> bookSales = new HashMap<>();\r\n bookSales.put(b1, 200);\r\n bookSales.put(b2, 400);\r\n bookSales.put(b3, 600);\r\n bookSales.put(b4, 300);\r\n bookSales.put(b5, 900);\r\n // 1. b3 and b4 are consider as different key\r\n // 2. HashMap does not reserve insertion order.(sorted)\r\n System.out.println(bookSales);\r\n\r\n System.out.println(b1.hashCode()); // 1836019240\r\n System.out.println(b2.hashCode()); // 325040804\r\n System.out.println(b3.hashCode() == b4.hashCode()); // false\r\n\r\n System.out.println(calc(b1.hashCode()));\r\n System.out.println(calc(b2.hashCode()));\r\n System.out.println(calc(b3.hashCode()));\r\n System.out.println(calc(b4.hashCode()));\r\n System.out.println(calc(b5.hashCode()));\r\n\r\n System.out.println(hash(b3.hashCode()));\r\n System.out.println(hash(b4.hashCode()));\r\n System.out.println(hash(b5.hashCode()));\r\n\r\n\r\n // keys' hashcode are different, indies may be different or same.\r\n // indies which are calculated are different, keys' hash must be different\r\n\r\n // TreeMap\r\n // sorted map by key\r\n // The key must be Comparable or create map with custom comparator\r\n Comparator<String> comparator = new Comparator<String>() {\r\n @Override\r\n public int compare(String o1, String o2) {\r\n return o2.compareTo(o1);\r\n }\r\n };\r\n Map<String, Integer> scores = new TreeMap<>(comparator);\r\n scores.put(\"bob\", 80);\r\n scores.put(\"alice\", 100);\r\n scores.put(\"zack\", 90);\r\n System.out.println(scores);\r\n\r\n // LinkedHashMap: sorted map by insertion order\r\n\r\n Map<String, Integer> scores1 = new HashMap<>();\r\n scores1.put(\"alice\", 90);\r\n scores1.put(\"bob\", 80);\r\n scores1.put(\"zack\", 100);\r\n // your codes start here\r\n\r\n System.out.println(scores1); // sorted by score1(value)\r\n }",
"@Override\r\n\tpublic MySet intersectSets(MySet[] t) {\r\n\t\tallElements = new ArrayList<Integer>();\r\n\r\n\t\t\r\n\t\tfor(Object element: t[0]) {\r\n\t\t\tallElements.add(element);\r\n\t\t}\r\n\t\r\n\t\tfor(Object e: allElements) {\r\n\t\t\tInteger c = map.getOrDefault(e, 0);\r\n\t\t\tmap.put((E)e, c + 1);\r\n\t\t}\r\n\t\t\r\n\t\tMySet<E> returnSet = (MySet<E>) new Set2<Integer>();\r\n\t\tfor(Map.Entry<E, Integer> entry :map.entrySet())\r\n\t\t\tif(entry.getValue() >= dataSet[0].length) // check\r\n\t\t\t\treturnSet.add(entry.getKey());\r\n\t\t\r\n\t\t\r\n\t\treturn returnSet;\r\n\t}",
"@Test\n public void testIntersection1()\n {\n final int[] ints1 = {33, 100000};\n final int[] ints2 = {33, 100000};\n List<Integer> expected = Arrays.asList(33, 100000);\n\n ConciseSet set1 = new ConciseSet();\n for (int i : ints1) {\n set1.add(i);\n }\n ConciseSet set2 = new ConciseSet();\n for (int i : ints2) {\n set2.add(i);\n }\n\n verifyIntersection(expected, set1, set2);\n }",
"public SetSet setUnion(SetSet second){\n\t\tSetSet result = new SetSet(contents);\n\t\tfor(int i=0;i<second.size();i++){\n\t\t\tresult.add(second.get(i));\n\t\t}\n\t\treturn result;\n\t}",
"public static void main(String[] args) {\n\t\tSet<Character> setA = new HashSet<Character>();\n\t\tchar[] carr = \"abcdef\".toCharArray();\n\t\tfor (char c : carr) {\n\t\t\tsetA.add(c);\n\t\t}\n\t\t\n\t\tSet<Character> setB = new HashSet<Character>();\n\t\tchar[] carr2 = \"chdedf\".toCharArray();\n\t\tfor (char c : carr2) {\n\t\t\tsetB.add(c);\n\t\t}\n\t\tsetB.removeAll(setA);\n\t\tSystem.out.println(setA.containsAll(setB));\n\t\tSystem.out.println(setB.isEmpty());\n\t\t\n\t\tSystem.out.println(contains(\"asdfkhas\", \"dfa\"));\n\t\tSystem.out.println(contains1(\"asdfkhas\", \"defa\"));\n\t}",
"public static void main(String[] args) {\n\t\tHashSet<String> obj = new HashSet<String>();\n\t\t\n\t\tobj.add(\"Apple\");\n\t\tobj.add(\"Mango\");\n\t\tobj.add(\"Grapes\");\n\t\t\n\t\t//adding duplicate elements\n\t\tobj.add(\"Mango\");\n\t\tobj.add(\"Grapes\");\n\t\t\n\t\tobj.add(null);\n\t\tobj.add(null);\n\t\t\n\t\tSystem.out.println(obj);\n\t\t\n\t\t\t\t\n\t}",
"private static void test1() {\n HashSet<Contact> contacts = new HashSet<>();\n\n Contact contact1 = new Contact(123, \"Vasiliy\", \"+380681234136\");\n\n contacts.add(contact1);\n\n\n //------------------------------------------\n\n\n Contact contact2 = new Contact(123, \"Vasiliy\", \"+380689876543\");\n\n contacts.remove(contact2);\n contacts.add(contact2);\n\n printCollection(contacts);\n }",
"public static void main(String[] args)\n {\n // Laver et sæt til set1\n Set<Integer> set1 = new HashSet<Integer>();\n\n // Tilføjer til set1\n set1.add(1);\n set1.add(4);\n set1.add(7);\n set1.add(9);\n\n // Laver et sæt til set2\n Set<Integer> set2 = new HashSet<Integer>();\n\n // Tilføjer til set2\n set2.add(2);\n set2.add(4);\n set2.add(5);\n set2.add(6);\n set2.add(7);\n\n // Printer listerne ud\n System.out.println(\"Første set er: \" + set1);\n System.out.println(\"Andet set er: \" + set2);\n\n // laver et sæt som ligner metoden nedenfor\n Set<Integer> sysmetriskSet = symmetricSetDifference(set1,set2);\n\n // Printer listen ud symetrisk\n System.out.println(\"Sysmetrisk sammen er det således: \" + sysmetriskSet);\n }",
"public static void main(String[] args){\n\t\tTreeSet hs=new TreeSet();\n\t\t\n\t\ths.add(\"d\");\n\t\ths.add(\"c\");\n\t\ths.add(\"b\");\n\t\ths.add(\"a\");\n\t\ths.add(\"c\");\n\t\ths.add(\"i\");\n\t\ths.add(\"l\");\n\t\ths.add(new Integer(2));\n\t\ths.add(new Float(2));\n\t\t\n\t\t\t\t\n\t\tSystem.out.println(\"Hashset is \"+hs);\n\t\tSystem.out.println(\"Size of Hashset is \"+ hs.size());\n\t\t\n\t\tSystem.out.println(\"Does hashset contains this 'u' element \" + hs.contains(\"u\"));\t\t\n\t\tSystem.out.println(\"is hashset empty \" + hs.isEmpty());\n\t\tSystem.out.println(\"remove the element \"+hs.remove(\"i\"));\n\t\t\n\t\t\n\t hs.clear();\n\t System.out.println(\"get class \" +hs.getClass());\n\t\t\n\t System.out.println(\"is hashset empty \" +hs.isEmpty());\n\t \n\t \n\t\t\n\t}",
"public interface ISet<T> {\n\n // Maximum possible size of data structures\n int MAX_SIZE = 100;\n\n /**\n * @pre 0 <= sizeOfSet < max_size\n * @post [this will contain one of each int from both unionWith and this]\n * @param unionWith ISet to find the union from\n */\n default void union(ISet<T> unionWith) {\n T temp;\n int tsize = unionWith.getSize();\n//For every element in unionWith...\n for (int i = 0; i < tsize; i++) {\n //Store value at first position\n //Remove value from unionWith\n temp = unionWith.removePos(0);\n //If this set does not contain value from unionWith...\n if (!this.contains(temp)) {\n //Add value to this set\n this.add(temp);\n }\n }\n }\n\n /**\n * @pre 0 <= sizeOfSet < max_size\n * @post [this will contain ints from this that are not in diffWith]\n * @param diffWith ISet to find the difference from\n */\n default void difference(ISet<T> diffWith){\n T temp;\n int i = 0;\n //For every element in this set...\n while (i < this.getSize()){\n //Store value at first position\n //Remove value from this set\n temp = this.removePos(0);\n //If diffWith does not contain value from this set...\n if(!diffWith.contains(temp)){\n //Add value to this set\n this.add(temp);\n //Increment position\n i++;\n }\n }\n }\n\n /**\n * @pre 0 <= sizeOfSet < max_size\n * @post [this will contain ints from this that are also found in intWith]\n * @param intWith ISet to find the intersection from\n */\n default void intersect(ISet<T> intWith){\n T temp;\n int i = 0;\n //For every element in this set...\n while (i < this.getSize()){\n //Store value at first position\n //Remove value from this set\n temp = this.removePos(0);\n //If intWith does not contain value from this set...\n if(intWith.contains(temp)){\n //Add value to this set\n this.add(temp);\n //Increment position\n i++;\n }\n }\n\n }\n\n\n /**\n * @pre [ISet initialized]\n * @post [ISet contains same elements with a\n * new element - add - placed at the end]\n * @param add T value to be added to ISet\n */\n void add(T add);\n\n /**\n * @pre [ISet contains elements (non-NULL)] and pos >= 0\n * @post [ISet contains same elements as\n * when it was passed, without element at pos] and [T returned]\n * @param pos position in ISet to be removed\n * @return T of position where the element was removed\n */\n T removePos(int pos);\n\n /**\n * @pre [ISet contains elements (non-NULL)] and val != NULL\n * @post [ISet unmodified] and [boolean returned]\n * @param val value to be searched in ISet\n * @return true if ISet contains val, otherwise false\n */\n boolean contains(T val);\n\n /**\n * @pre [ISet initialized with constructor]\n * @post [ISet, size of ISet unmodified] and [int returned]\n * @return int value of the size of the ISet\n */\n int getSize();\n\n}",
"@Override\n public SetI intersection(SetI other) {\n int[] newArr;\n int i = 0;\n SetI shorter, longer;\n\n // Begin with a shorter one.\n if (count > other.size()) {\n shorter = other;\n longer = this;\n newArr = new int[other.size()];\n }\n else {\n shorter = this;\n longer = other;\n newArr = new int[count];\n }\n\n // For each element I have,\n for (Integer e : shorter) {\n // If you also have it...\n if (longer.contains(e)) {\n newArr[i++] = e;\n }\n }\n\n return new Set(newArr, i);\n }",
"@Override\n int hashCode();",
"public static Set<Doc> or(Set<Doc> set1, Set<Doc> set2) {\r\n \t\tif(set1 == null)\r\n \t\t\tset1 = new TreeSet<Doc>();\r\n \t\tif(set2 == null)\r\n \t\t\tset2 = new TreeSet<Doc>();\r\n \t\t\r\n \t\tTreeSet<Doc> result = new TreeSet<Doc>(set1);\r\n \t\tresult.addAll(set2);\r\n \t\treturn result;\r\n \t}",
"@Test\n public void testIntersection3()\n {\n List<Integer> expected = new ArrayList<>();\n ConciseSet set1 = new ConciseSet();\n ConciseSet set2 = new ConciseSet();\n for (int i = 0; i < 1000; i++) {\n set1.add(i);\n set2.add(i);\n expected.add(i);\n }\n\n verifyIntersection(expected, set1, set2);\n }",
"@Test\n\tpublic void testRetainAll() {\n\t Set<Integer> setA = new HashSet<>(Arrays.asList(1, 2, 3, 4, 5));\n\t\tSet<Integer> setB = new HashSet<>(Arrays.asList(9, 8, 7, 6, 5, 4, 3));\n\t setA.retainAll(setB);\n\t Set<Integer> intersection = new HashSet<>(Arrays.asList(3, 4, 5));\n\t assertEquals(setA, intersection);\n }",
"public void sensibleMatches1() \n { \n Map<String, Set<String>> clientMap = new HashMap<>();\n Set<String> interests = new HashSet<>();\n\n interests.add(\"Food\");\n interests.add(\"Wine\");\n interests.add(\"Tandems\");\n clientMap.put(\"Hal\", interests);\n\t \n interests = new HashSet<>();\n interests.add(\"Food\");\n interests.add(\"Walking\");\n interests.add(\"Welding\");\n clientMap.put(\"Gemma\", interests);\n\t \n interests = new HashSet<>();\n interests.add(\"Food\");\n interests.add(\"Cinema\");\n interests.add(\"Wine\");\n clientMap.put(\"Caroline\", interests);\n\n Set<String> halsInterests = clientMap.get(\"Hal\");\n String outputString;\n Set<String> eachClientInterests;\n Set<String> intersection ;\n\n Map<String, Set<String>> mapWithoutHal = new HashMap<>(clientMap);\n mapWithoutHal.remove(\"Hal\");\n for (String eachClient : mapWithoutHal.keySet()) \n {\n eachClientInterests = clientMap.get(eachClient);\n intersection = new HashSet<>(halsInterests);\n intersection.retainAll(eachClientInterests);\n outputString = \"Hal and \" + eachClient \n + \" have common interests: \"\n + intersection;\n System.out.println(outputString);\n }\n }",
"@Test\r\n\tpublic void testMultset() {\n\t\tMultiset<Integer> multiSet = HashMultiset.create();\r\n\t\tmultiSet.add(10);\r\n\t\tmultiSet.add(30);\r\n\t\tmultiSet.add(30);\r\n\t\tmultiSet.add(40);\r\n\r\n\t\tassertEquals(2, multiSet.count(30));\r\n\t\tassertEquals(4, multiSet.size());\r\n\t}",
"@Test\r\n public void testHashSetInsert()\r\n {\r\n Square s0 = new Square(1, -1),\r\n s1 = new Square(1, -1);\r\n HashSet<Square> hs = new HashSet<>();\r\n hs.add(s0);\r\n assertEquals(1, hs.size());\r\n hs.add(s1);\r\n assertEquals(1, hs.size());\r\n assertTrue(hs.contains(s0));\r\n assertTrue(hs.contains(s1));\r\n }",
"private int getCommonUsers(Set<String> setA, Set<String> setB)\n\t{\n\t\tif(setA == null || setB == null || setA.isEmpty() || setB.isEmpty()) {\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tint commonUsers = Sets.intersection(setA, setB).size();\n\t\t//LOG.info(\"Find common users between \" + setA.toString() + \", \" + setB.toString() + \", \" + commonUsers);\n\t\treturn commonUsers;\n\t}",
"public static Pair<LinkedSortedSetList<Integer>, LinkedSortedSetList<Integer>> acceptTwoIntegerLinkedSortedSetsFromUser(\n\t\t\tString[] args) {\n\t\tScanner in = null;\n\t\tLinkedSortedSetList<Integer> l1 = null;\n\t\tLinkedSortedSetList<Integer> l2 = null;\n\t\ttry {\n\t\t\tin = new Scanner(System.in);\n\n\t\t\tif (args.length > 0) {\n\t\t\t\tl1 = new LinkedSortedSetList<Integer>(readInputArrayFromFile(args[0]));\n\t\t\t}\n\t\t\tif (l1 == null || l1.size() == 0) {\n\t\t\t\tSystem.out.println(\"Please enter details of list 1\");\n\t\t\t\tl1 = new LinkedSortedSetList<Integer>(readInputFromUser(in));\n\t\t\t}\n\t\t\tif (args.length > 1) {\n\t\t\t\tl2 = new LinkedSortedSetList<Integer>(readInputArrayFromFile(args[1]));\n\t\t\t}\n\t\t\tif (l2 == null || l2.size() == 0) {\n\t\t\t\tSystem.out.println(\"Please enter details of list 2\");\n\t\t\t\tl2 = new LinkedSortedSetList<Integer>(readInputFromUser(in));\n\t\t\t}\n\t\t} finally {\n\t\t\tin.close();\n\t\t}\n\t\tPair<LinkedSortedSetList<Integer>, LinkedSortedSetList<Integer>> pair = new Pair<LinkedSortedSetList<Integer>, LinkedSortedSetList<Integer>>(\n\t\t\t\tl1, l2);\n\t\treturn pair;\n\t}",
"public static void main(String[] args) {\n HashSet<String> hashSet = new HashSet<>();\n hashSet.add(\"Orange\");\n hashSet.add(\"Red\");\n hashSet.add(\"Pink\");\n hashSet.add(\"Red\");\n hashSet.add(\"White\");\n System.out.println(hashSet);\n TreeSet<String> treeSet = new TreeSet<>(hashSet);\n for (String color : treeSet) {\n System.out.println(color);\n }\n\n }",
"public static void main(String[] args) {\n\t\tinitValues();\n\t\tHashTable sizeSeven = new HashTable(7,2); //Create a hash table with a size of 7, relative prime given is 2\n\t\tHashTable sizeFiftyOne = new HashTable(51,5); //Create a hash table with a size of 51, relative prime given is 5\n\t\tHashTable sizeOneFiftyOne = new HashTable(151,25); //Create a hash table with a size of 151, relative prime given is 25\n\t\t\n\t\t//Populate the Hash Tables\n\t\tfor (int i = 0; i < values.length ; i++){\n\t\t\tsizeSeven.add(new HashableInt(values[i]));\n\t\t\tsizeFiftyOne.add(new HashableInt(values[i]));\n\t\t\tsizeOneFiftyOne.add(new HashableInt(values[i]));\n\t\t}\n\t\t\n\t\t//Print the stored values of the Hash Tables\n\t\tSystem.out.println(sizeSeven);\n\t\tSystem.out.println(sizeFiftyOne);\n\t\tSystem.out.println(sizeOneFiftyOne);\n\t\t\n\t\t//Search for 10 random numbers in each hash table, show weather the table contains the number and how many comparisons it took to find it or not\n\t\tSystem.out.println(\"Table Size:\\tSearch Value:\\tTable Contains?:\\t# Comparisons:\\t\");\n\t\tfor (int i = 0; i < values2.length; i++){\n\t\t\tSystem.out.println(sizeSeven.getSize()+\"\\t\\t\"+values2[i]+\"\\t\\t\"+sizeSeven.contains(new HashableInt(values2[i]))+\"\\t\\t\\t\"+sizeSeven.getNumberCompares());\n\t\t\tSystem.out.println(sizeFiftyOne.getSize()+\"\\t\\t\"+values2[i]+\"\\t\\t\"+sizeFiftyOne.contains(new HashableInt(values2[i]))+\"\\t\\t\\t\"+sizeFiftyOne.getNumberCompares());\n\t\t\tSystem.out.println(sizeOneFiftyOne.getSize()+\"\\t\\t\"+values2[i]+\"\\t\\t\"+sizeOneFiftyOne.contains(new HashableInt(values2[i]))+\"\\t\\t\\t\"+sizeOneFiftyOne.getNumberCompares());\n\t\t}\n\t}",
"public static Set<Integer> find(int[] arr)\r\n\t{\n\t\tSet<Integer> set1=new HashSet<>();\r\n\t\tSet<Integer> set2=new HashSet<>();\r\n\t\t\r\n\t\t//Here Storing the Integers in set1 And set2 so, here set1 And set2 will not allow to store\r\n\t\t//duplicate integers\r\n\t\tfor(Integer i:arr)\r\n\t\t{\r\n\t\t\tset1.add(i);\r\n\t\t\tset2.add(i);\r\n\t\t}\r\n\t\t//Now set1 & set2 contains non duplicate Integers\r\n\t\t// One for every integer in set1 and for every integer in given array And and int counter=0\r\n\t\t //here if Integer in set1 equals to Integer in given array,Then increase the counter.\r\n\t\t\r\n\t\tfor(Integer i:set1)\r\n\t\t{\r\n\t\t\tint count=0;\r\n\t\t\tfor(Integer a:arr)\r\n\t\t\t{\r\n\t\t\t\t//Integer in set1==Integer in array counter will increases by one \r\n\t\t\t\tif(i==a)\r\n\t\t\t\t{\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//If count of that integer greater or equal to 2 then delete that Integer in set2\r\n\t\t\tif(count>=2)\r\n\t\t\t{\r\n\t\t\t\tset2.remove(i);\r\n\t\t\t\t//NOTE:- Here I Took set2 because I can not delete the Integer in set1 because it is already in use(Concurrent Modification Exception)\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Returning the set2 which containing NonRepeated Integers\r\n\t\treturn set2;\r\n\t\t\r\n\t}",
"public int[] intersectionUsingSets(int[] nums1, int[] nums2) {\n Set<Integer> setA = new HashSet<>();\n Set<Integer> intersection = new HashSet<>();\n for (int num : nums1) {\n setA.add(num);\n }\n\n for (int num : nums2) {\n if (setA.contains(num)) {\n intersection.add(num);\n }\n }\n\n return getIntersectionResult(intersection);\n }"
]
| [
"0.78988475",
"0.73468",
"0.7228724",
"0.6613326",
"0.6610609",
"0.656806",
"0.6546545",
"0.650999",
"0.6410643",
"0.6357261",
"0.6263221",
"0.6251809",
"0.6245846",
"0.6242093",
"0.6221799",
"0.61981004",
"0.6172208",
"0.61542207",
"0.6107193",
"0.6053878",
"0.60483223",
"0.6044812",
"0.60420215",
"0.6011057",
"0.5980859",
"0.5971953",
"0.59699833",
"0.5956037",
"0.59485304",
"0.5938536",
"0.5912294",
"0.5911764",
"0.59115875",
"0.5905514",
"0.590498",
"0.5900581",
"0.5888139",
"0.5886309",
"0.5884311",
"0.5877213",
"0.58436084",
"0.5827995",
"0.5822033",
"0.58137673",
"0.58124655",
"0.5803943",
"0.5797106",
"0.5780979",
"0.57751286",
"0.5755597",
"0.57310617",
"0.5727823",
"0.57274604",
"0.5720379",
"0.57124174",
"0.5711923",
"0.5710646",
"0.5705774",
"0.57023764",
"0.5697569",
"0.5696767",
"0.56960815",
"0.5689093",
"0.5679114",
"0.56761146",
"0.56759185",
"0.5671792",
"0.56590605",
"0.5655376",
"0.5644209",
"0.5644209",
"0.564349",
"0.5634807",
"0.5631252",
"0.56257224",
"0.5623247",
"0.56209946",
"0.56151766",
"0.561396",
"0.56064504",
"0.56057096",
"0.560317",
"0.56030625",
"0.56014013",
"0.55911624",
"0.5590285",
"0.5583437",
"0.55767775",
"0.5570582",
"0.5567757",
"0.5567321",
"0.55650365",
"0.5564325",
"0.55624133",
"0.55570257",
"0.55561537",
"0.55560553",
"0.55549645",
"0.5528883",
"0.55250275",
"0.55233955"
]
| 0.0 | -1 |
Created by TangBin on 9/6/16. | public interface GeneratorInterface<T> {
T next();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"public final void mo51373a() {\n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"protected boolean func_70814_o() { return true; }",
"private void m50366E() {\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\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"public void mo38117a() {\n }",
"private stendhal() {\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"private void kk12() {\n\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"private void poetries() {\n\n\t}",
"public void mo4359a() {\n }",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"public void mo12628c() {\n }",
"private void init() {\n\n\t}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n public void init() {\n }",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\r\n\tpublic void init() {}",
"public void method_4270() {}",
"private static void cajas() {\n\t\t\n\t}",
"private void m50367F() {\n }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\n protected void init() {\n }",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"public void m23075a() {\n }",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\n public void init() {}",
"public void mo21779D() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n\tpublic void init() {\n\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"public void skystonePos4() {\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 }",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n public int retroceder() {\n return 0;\n }",
"public final void mo91715d() {\n }",
"@Override\n void init() {\n }",
"public void mo6081a() {\n }",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"@Override\n public int describeContents() { return 0; }",
"public void mo21877s() {\n }",
"public abstract void mo70713b();",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo115190b() {\n }",
"public void mo12930a() {\n }",
"public void skystonePos6() {\n }",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}",
"public void mo21878t() {\n }",
"@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}",
"@Override\n\t\tpublic void init() {\n\t\t}",
"protected void mo6255a() {\n }"
]
| [
"0.5949545",
"0.59431374",
"0.58525574",
"0.5818002",
"0.58163434",
"0.5807098",
"0.5782478",
"0.57433724",
"0.57433724",
"0.5732123",
"0.57246697",
"0.57085156",
"0.5705336",
"0.5703302",
"0.56999207",
"0.56883675",
"0.56883675",
"0.56883675",
"0.56883675",
"0.56883675",
"0.56639814",
"0.5646199",
"0.56247216",
"0.5614316",
"0.5598247",
"0.55952764",
"0.5591944",
"0.5587287",
"0.558085",
"0.55786616",
"0.55768275",
"0.5570475",
"0.5556756",
"0.5546593",
"0.5546593",
"0.5542807",
"0.5525999",
"0.5522467",
"0.55209553",
"0.55005723",
"0.54899544",
"0.54899544",
"0.54899544",
"0.54899114",
"0.54886055",
"0.5488424",
"0.54879177",
"0.5485108",
"0.54833555",
"0.54833555",
"0.54833555",
"0.5475053",
"0.547499",
"0.54742837",
"0.54742837",
"0.54742837",
"0.5470382",
"0.546591",
"0.5465023",
"0.54543275",
"0.5451369",
"0.5446979",
"0.5439387",
"0.54386544",
"0.5434579",
"0.5434579",
"0.543201",
"0.5429301",
"0.5429301",
"0.5429301",
"0.5429301",
"0.5429301",
"0.5429301",
"0.5429301",
"0.54257655",
"0.54251957",
"0.5420505",
"0.5418302",
"0.54133016",
"0.5411101",
"0.54062736",
"0.54038143",
"0.540217",
"0.5400708",
"0.53982687",
"0.5391377",
"0.5386739",
"0.5380866",
"0.5373272",
"0.537269",
"0.53704774",
"0.53704774",
"0.53704774",
"0.53704774",
"0.53704774",
"0.53704774",
"0.5367849",
"0.53639984",
"0.5360635",
"0.53584117",
"0.5349427"
]
| 0.0 | -1 |
selectUrlType gets the URL as a string and sets the correspondent URL as a new value. This value is split at each dot, and the last index contains the type. theUrlType is updated with the correct type value, and if it is RLE, the RLEDecoder is instantiated. | public void selectUrlType(String inURL) {
try {
URL url = new URL(inURL);
String[] fileType = url.getFile().split("[.]");
int itemCount = fileType.length;
if (fileType[itemCount - 1].contains("txt") || fileType[itemCount - 1].contains("cells")) {
theUrlType = "Text Url";
} else if (fileType[itemCount - 1].contains("rle")) {
theUrlType = "RLE Url";
Decoder RLE = new Decoder();
RLE.readAndDecodeURL(inURL);
}
} catch (Exception e) {
dialog.urlError();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setType(URI type) {\n this.type = type;\n }",
"public String getUrlType() {\n return theUrlType;\n }",
"private void setUrl(\n java.lang.String value) {\n value.getClass();\n bitField0_ |= 0x00000002;\n url_ = value;\n }",
"private void setUrl(\n java.lang.String value) {\n value.getClass();\n bitField0_ |= 0x00000001;\n url_ = value;\n }",
"private void setJsonUpdateType(String type) {\n\t\tif(type == null || type.isEmpty()) {\n\t\t\ttype = Strings.jsonDirectDownload;\n\t\t}\n\t\tif(type.equals(Strings.jsonDirectDownload)) {\n\t\t\trdbtnDownloadJson.setSelected(true);\n\t\t} else if(type.equals(Strings.jsonLocalFile)) {\n\t\t\trdbtnJsonLocal.setSelected(true);\n\t\t} else if(type.equals(Strings.jsonUserDownload)) {\n\t\t\trdbtnJsonManualDownload.setSelected(true);\n\t\t} else {\n\t\t\trdbtnDownloadJson.setSelected(true);\n\t\t}\n\t}",
"private void setJarUpdateType(String type) {\n\t\tif(type == null || type.isEmpty()) {\n\t\t\ttype = Strings.jarDirectDownload;\n\t\t}\n\t\tif(type.equals(Strings.jarDirectDownload)) {\n\t\t\trdbtnDownloadJar.setSelected(true);\n\t\t} else if(type.equals(Strings.jarLocalFile)) {\n\t\t\trdbtnJarLocal.setSelected(true);\n\t\t} else if(type.equals(Strings.jarUserDownload)) {\n\t\t\trdbtnJarManualDownload.setSelected(true);\n\t\t} else {\n\t\t\trdbtnDownloadJar.setSelected(true);\n\t\t}\n\t}",
"void setType(java.lang.String type);",
"public static String getURL(String urlType) {\n\t\tswitch (urlType) {\n\t\tcase \"authentication\":\n\t\t\treturn getAuthenticationURL();\n\t\tcase \"isAuthenticated\":\n\t\t\treturn getCheckAuthentication();\n\t\tcase \"testPlan\":\n\t\t\treturn getTestsURL();\n\t\tcase \"getSession\":\n\t\t\treturn getSessionURL();\n\t\tcase \"createTestRun\":\n\t\t\treturn getCreateTestRunURL();\n\t\tcase \"createTestSet\":\n\t\t\treturn createTestSet();\n\t\tcase \"testInstance\":\n\t\t\treturn getTestInstanceURL();\n\t\tcase \"testRun\":\n\t\t\treturn getTestRunURL();\n\t\tcase \"testSetFolder\":\n\t\t\treturn getTestSetFolderURL();\n\t\tcase \"baseProject\":\n\t\t\treturn getProjectURL();\n\t\tdefault:\n\t\t\treturn \"\";\n\t\t}\n\t}",
"public SelectorPart(Class<?> type, String psuedoSelector) {\n this.type = type;\n if (!StringUtils.isEmpty(psuedoSelector)) {\n Matcher matcher = NTH_OF_TYPE_PATTERN.matcher(psuedoSelector);\n if (matcher.matches()) {\n index = Integer.parseInt(matcher.group(1));\n }\n }\n }",
"public StacLink type(String type) {\n this.type = type;\n return this;\n }",
"public void setUrlValue(org.biocatalogue.x2009.xml.rest.TagsParameters.Sort.UrlValue.Enum urlValue)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(URLVALUE$2);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(URLVALUE$2);\r\n }\r\n target.setEnumValue(urlValue);\r\n }\r\n }",
"Builder addAdditionalType(URL value);",
"void setType(String type) {\n this.type = type;\n }",
"private int toPdpType(String type) {\n char c;\n int hashCode = type.hashCode();\n if (hashCode == -2128542875) {\n if (type.equals(\"IPV4V6\")) {\n c = 2;\n switch (c) {\n case 0:\n break;\n case 1:\n break;\n case 2:\n break;\n case 3:\n break;\n }\n }\n } else if (hashCode == 2343) {\n if (type.equals(\"IP\")) {\n c = 0;\n switch (c) {\n case 0:\n break;\n case 1:\n break;\n case 2:\n break;\n case 3:\n break;\n }\n }\n } else if (hashCode == 79440) {\n if (type.equals(\"PPP\")) {\n c = 3;\n switch (c) {\n case 0:\n break;\n case 1:\n break;\n case 2:\n break;\n case 3:\n break;\n }\n }\n } else if (hashCode == 2254343 && type.equals(\"IPV6\")) {\n c = 1;\n switch (c) {\n case 0:\n return 1;\n case 1:\n return 2;\n case 2:\n return 3;\n case 3:\n return 4;\n default:\n Rlog.e(TAG, \"Unknown type: \" + type);\n return 0;\n }\n }\n c = 65535;\n switch (c) {\n case 0:\n break;\n case 1:\n break;\n case 2:\n break;\n case 3:\n break;\n }\n }",
"private int determineQueryType(String url){\n int type = RLI.LRC_QUERY_NORMAL;\n\n if(mLRCRestrictList != null){\n for ( int j = 0; j < mLRCRestrictList.length; j++ ) {\n if ( url.indexOf( mLRCRestrictList[ j ] ) != -1 ) {\n type = RLI.LRC_QUERY_RESTRICT;\n break;\n }\n }\n }\n if(mLRCIgnoreList != null){\n for ( int j = 0; j < mLRCIgnoreList.length; j++ ) {\n if ( url.indexOf( mLRCIgnoreList[ j ] ) != -1 ) {\n type = RLI.LRC_QUERY_IGNORE;\n break;\n }\n }\n }\n\n\n return type;\n }",
"abstract public URIType getURIType();",
"private static TYPE getFtlWebfileType(final String path) {\n if (path.indexOf('.') > -1) {\n final String ext = path.substring(path.lastIndexOf('.'));\n if (BINARY_EXTENSIONS.contains(ext)) {\n return BINARY_WEBFILE;\n }\n }\n return WEBFILE;\n }",
"@JsonIgnore\r\n public void setType(URI type) {\r\n this.type = type == null ? null : new TypeReference<AlternateIdType>(type);\r\n }",
"public void setType(String newtype)\n {\n type = newtype;\n }",
"@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:32:42.016 -0500\", hash_original_method = \"E4793A664EF98A715ED3BAC198AF4EBD\", hash_generated_method = \"B72ADD4A151BC578FAD8448CF7ED8D16\")\n \n public void setNetworkType(String type, String subtype){\n \taddTaint(type.getTaint());\n \taddTaint(subtype.getTaint());\n }",
"public void setType(java.lang.String newType) {\n\ttype = newType;\n}",
"void onURLChosen(String url);",
"public void setType(String type){\n \tthis.type = type;\n }",
"public void setType(String type) {\n this.type = type;\n }",
"public void setType(String type) \n {\n this.type = type;\n }",
"public void set_type(String type)\r\n\t{\r\n\t\tthis.type = type;\r\n\t}",
"public void setType(String type);",
"public void setType(String type);",
"public void setType(String type);",
"public String parseQueryType(String queryType){\n\t\t \tif(\"online\".equals(queryType)){\n\t\t \t\tqueryType=\"1\";\n\t\t \t}else if(\"batch\".equals(queryType)){\n\t\t \t\tqueryType=\"2\";\n\t\t \t}\n\t\t\t\treturn queryType;\n\t\t }",
"private void setType(String type) {\n mType = type;\n }",
"public void set_type(String t)\n {\n type =t;\n }",
"public void setType (String type) {\n this.type = type;\n }",
"public void setType (String type) {\n this.type = type;\n }",
"public void setType (String type) {\n this.type = type;\n }",
"public final String getImageType() {\n String imageType = null;\n\n if (this.url != null) {\n imageType = this.url.substring(this.url.lastIndexOf(\".\") + 1);\n }\n\n return imageType;\n }",
"public SelectorType getType() {\r\n\t\treturn type;\r\n\t}",
"protected String getTypedUrlPrefix(String urlPrefix, String idType) {\r\n if (idType.equals(Types.PROJECT.getTypeName()) || idType.equals(Types.PROJECT.name())) {\r\n return urlPrefix + urlProjectTypePrefix;\r\n } else if (idType.equals(Types.PERSON.getTypeName()) || idType.equals(Types.PERSON.name())) {\r\n return urlPrefix + urlPersonTypePrefix;\r\n } else if (idType.equals(Types.DATA_SET.getTypeName()) || idType.equals(Types.DATA_SET.name())) {\r\n return urlPrefix + urlDataSetTypePrefix;\r\n } else if (idType.equals(Types.DATA_FILE.getTypeName()) || idType.equals(Types.DATA_FILE.name())) {\r\n return urlPrefix + urlDataFileTypePrefix;\r\n } else if (idType.equals(Types.COLLECTION.getTypeName()) || idType.equals(Types.COLLECTION.name())){\r\n return urlPrefix + urlCollectionTypePrefix;\r\n } else if (idType.equals(Types.METADATA_FILE.getTypeName()) || idType.equals(Types.METADATA_FILE.name())){\r\n return urlPrefix + urlMetadataFileTypePrefix;\r\n } else {\r\n return super.getTypedUrlPrefix(urlPrefix, idType);\r\n }\r\n }",
"public void setType(String type){\n this.type = type;\n }",
"@objid (\"186f4f3d-207c-40ea-baf3-eb495e1b88c4\")\n private void selectUrl(UrlEntry selectedUrlEntry) {\n this.viewer.refresh();\n \n // Pack all columns, to avoid them being too small\n for (TableColumn col : this.viewer.getTable().getColumns()) {\n col.pack();\n }\n \n if (selectedUrlEntry != null) {\n this.viewer.setSelection(new StructuredSelection(selectedUrlEntry));\n } else {\n this.viewer.setSelection(new StructuredSelection());\n }\n }",
"public final void setType(String type){\n\t\tthis.type = type;\t\n\t}",
"public void setType(String type) {\r\n this.type = type;\r\n }",
"public void setType(String type) {\r\n this.type = type;\r\n }",
"public void setType(String type) {\r\n this.type = type;\r\n }",
"public void setType(String type) {\r\n this.type = type;\r\n }",
"public void setType(String type) {\r\n this.type = type;\r\n }",
"public void setType(java.lang.String type) {\n this.type = type;\n }",
"public void setType(java.lang.String type) {\n this.type = type;\n }",
"public void setType(String type) {\r\n this.type = type;\r\n }",
"protected void setType(String newType) {\n\t\ttype = newType;\n\t}",
"public void setType( String type )\n {\n this.type = type;\n }",
"public void set_type(String type) throws Exception{\n\t\tthis.type = type;\n\t}",
"public static BlobType parse(final String typeString) {\n if (Utility.isNullOrEmpty(typeString)) {\n return UNSPECIFIED;\n }\n else if (\"blockblob\".equals(typeString.toLowerCase(Locale.US))) {\n return BLOCK_BLOB;\n }\n else if (\"pageblob\".equals(typeString.toLowerCase(Locale.US))) {\n return PAGE_BLOB;\n }\n else {\n return UNSPECIFIED;\n }\n }",
"void setUrl(String url) {\n this.url = Uri.parse(url);\n }",
"public void setType(String val) {\n type = val;\n }",
"public void setType(String type) {\n this.type = type;\n }",
"public void setType(String type) {\n this.type = type;\n }",
"public void setUrlKey(org.biocatalogue.x2009.xml.rest.TagsParameters.Sort.UrlKey.Enum urlKey)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(URLKEY$0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(URLKEY$0);\r\n }\r\n target.setEnumValue(urlKey);\r\n }\r\n }",
"void setClassType(String classType);",
"public void setType(String type) {\n this.type = type;\n }",
"public void setType(String type) {\n this.type = type;\n }",
"private Uri getFileUriAndSetType(Intent intent, String str, String str2, String str3, int i) throws IOException {\n String str4;\n String str5;\n String str6;\n if (str2.endsWith(\"mp4\") || str2.endsWith(\"mov\") || str2.endsWith(\"3gp\")) {\n intent.setType(\"video/*\");\n } else if (str2.endsWith(\"mp3\")) {\n intent.setType(\"audio/x-mpeg\");\n } else {\n intent.setType(\"image/*\");\n }\n if (str2.startsWith(\"http\") || str2.startsWith(\"www/\")) {\n String fileName = getFileName(str2);\n String str7 = \"file://\" + str + \"/\" + fileName.replaceAll(\"[^a-zA-Z0-9._-]\", \"\");\n if (str2.startsWith(\"http\")) {\n URLConnection openConnection = new URL(str2).openConnection();\n String headerField = openConnection.getHeaderField(\"Content-Disposition\");\n if (headerField != null) {\n Matcher matcher = Pattern.compile(\"filename=([^;]+)\").matcher(headerField);\n if (matcher.find()) {\n fileName = matcher.group(1).replaceAll(\"[^a-zA-Z0-9._-]\", \"\");\n if (fileName.length() == 0) {\n fileName = \"file\";\n }\n str7 = \"file://\" + str + \"/\" + fileName;\n }\n }\n saveFile(getBytes(openConnection.getInputStream()), str, fileName);\n str2 = str7;\n } else {\n saveFile(getBytes(this.webView.getContext().getAssets().open(str2)), str, fileName);\n str2 = str7;\n }\n } else if (str2.startsWith(\"data:\")) {\n if (!str2.contains(\";base64,\")) {\n intent.setType(\"text/plain\");\n return null;\n }\n String substring = str2.substring(str2.indexOf(\";base64,\") + 8);\n if (!str2.contains(\"data:image/\")) {\n intent.setType(str2.substring(str2.indexOf(\"data:\") + 5, str2.indexOf(\";base64\")));\n }\n String substring2 = str2.substring(str2.indexOf(\"/\") + 1, str2.indexOf(\";base64\"));\n if (notEmpty(str3)) {\n StringBuilder sb = new StringBuilder();\n sb.append(sanitizeFilename(str3));\n if (i == 0) {\n str6 = \"\";\n } else {\n str6 = \"_\" + i;\n }\n sb.append(str6);\n sb.append(\".\");\n sb.append(substring2);\n str4 = sb.toString();\n } else {\n StringBuilder sb2 = new StringBuilder();\n sb2.append(\"file\");\n if (i == 0) {\n str5 = \"\";\n } else {\n str5 = \"_\" + i;\n }\n sb2.append(str5);\n sb2.append(\".\");\n sb2.append(substring2);\n str4 = sb2.toString();\n }\n saveFile(Base64.decode(substring, 0), str, str4);\n str2 = \"file://\" + str + \"/\" + str4;\n } else if (str2.startsWith(\"df:\")) {\n if (!str2.contains(\";base64,\")) {\n intent.setType(\"text/plain\");\n return null;\n }\n String substring3 = str2.substring(str2.indexOf(\"df:\") + 3, str2.indexOf(\";data:\"));\n String substring4 = str2.substring(str2.indexOf(\";data:\") + 6, str2.indexOf(\";base64,\"));\n String substring5 = str2.substring(str2.indexOf(\";base64,\") + 8);\n intent.setType(substring4);\n saveFile(Base64.decode(substring5, 0), str, sanitizeFilename(substring3));\n str2 = \"file://\" + str + \"/\" + sanitizeFilename(substring3);\n } else if (str2.startsWith(\"file://\")) {\n intent.setType(getMIMEType(str2));\n } else {\n throw new IllegalArgumentException(\"URL_NOT_SUPPORTED\");\n }\n return Uri.parse(str2);\n }",
"public void setType(String type) {\n m_Type = type;\n }",
"public static Type2 getType2(String type) {\n Type2 typeToAdd = null;\n if (type.equals(\"grass\")) typeToAdd = Type2.Grass;\n if (type.equals(\"water\")) typeToAdd = Type2.Water;\n if (type.equals(\"fire\")) typeToAdd = Type2.Fire;\n if (type.equals(\"poison\")) typeToAdd = Type2.Poison;\n if (type.equals(\"rock\")) typeToAdd = Type2.Rock;\n if (type.equals(\"dark\")) typeToAdd = Type2.Dark;\n if (type.equals(\"psychic\")) typeToAdd = Type2.Psychic;\n if (type.equals(\"ghost\")) typeToAdd = Type2.Ghost;\n if (type.equals(\"fairy\")) typeToAdd = Type2.Fairy;\n if (type.equals(\"dragon\")) typeToAdd = Type2.Dragon;\n if (type.equals(\"flying\")) typeToAdd = Type2.Flying;\n if (type.equals(\"ground\")) typeToAdd = Type2.Ground;\n if (type.startsWith(\"fight\")) typeToAdd = Type2.Fighting;\n if (type.equals(\"electric\")) typeToAdd = Type2.Electric;\n if (type.equals(\"steel\")) typeToAdd = Type2.Steel;\n if (type.equals(\"ice\")) typeToAdd = Type2.Ice;\n if (type.equals(\"bug\")) typeToAdd = Type2.Bug;\n if (type.equals(\"normal\")) typeToAdd = Type2.Normal;\n if (type.equals(\"\")) typeToAdd = Type2.None;\n return typeToAdd;\n }",
"public void setType(String type) {\n this.type = type;\n }",
"public void setType(String type) {\n this.type = type;\n }",
"public void setType(String type) {\n this.type = type;\n }",
"public void setType(String type) {\n this.type = type;\n }",
"public void setType(String type) {\n this.type = type;\n }",
"public void setType(String type) {\n this.type = type;\n }",
"public void setType(String type) {\n this.type = type;\n }",
"public void setType(String type) {\n this.type = type;\n }",
"public void setType(String type) {\n this.type = type;\n }",
"public void setType(String type) {\n this.type = type;\n }",
"public void setType(String type) {\n this.type = type;\n }",
"public void setType(String type) {\n this.type = type;\n }",
"public void setType(String type) {\n this.type = type;\n }",
"public void setType(String type) {\n this.type = type;\n }",
"public void setType(String type) {\n this.type = type;\n }",
"public void setType(String type) {\n this.type = type;\n }",
"public void setType(String type) {\n this.type = type;\n }",
"public void setType(String type) {\n this.type = type;\n }",
"public void setType(String type) {\n this.type = type;\n }",
"public void setType(String type) {\n this.type = type;\n }",
"public void setType(String type) {\n this.type = type;\n }",
"public void setType(String type) {\n this.type = type;\n }",
"public void setType(String type) {\n this.type = type;\n }",
"public void setType(String type) {\r\r\n\t\tthis.type = type;\r\r\n\t}",
"public void settype(String cat) { this.type = cat; }",
"public void setType(String type){\n\t\tthis.type = type;\n\t}",
"public void setType( String type ) {\n this.type = type;\n }",
"public final void setType(String type) {\n this.type = type;\n }",
"private TYPE getType(final String type) {\n String temp = type.replaceAll(\"-\", \"_\");\n TYPE answer = Arrays.stream(\n TYPE.values()\n )\n .filter(value -> value.name().equals(temp))\n .findFirst()\n .orElse(TYPE.unknown);\n return answer;\n }",
"public void setType(String inType)\n {\n\ttype = inType;\n }",
"public void setVersionType(java.lang.String versionType) {\r\n this.versionType = versionType;\r\n }",
"private StrategyType getStrategyType(String type) throws Exception {\n switch (type) {\n case \"greedy\":\n return StrategyType.GREEDY;\n case \"careful\":\n return StrategyType.CAREFUL;\n case \"tactical\":\n return StrategyType.TACTICAL;\n default:\n throw new Exception(\"Not supported type: \" + type);\n }\n }",
"public void setType(String type) {\r\n\t\tthis.type=type;\r\n\t}",
"public void loadMapping(final URL url, final String type)\r\n throws IOException, MappingException {\r\n try {\r\n if (_resolver.getBaseURL() == null) {\r\n _resolver.setBaseURL(url);\r\n }\r\n InputSource source = _resolver.resolveEntity(null, url.toExternalForm());\r\n if (source == null) {\r\n source = new InputSource(url.toExternalForm());\r\n source.setByteStream(url.openStream());\r\n } else\r\n source.setSystemId(url.toExternalForm());\r\n LOG.info(Messages.format(\"mapping.loadingFrom\", url.toExternalForm()));\r\n loadMapping(source, type);\r\n } catch (SAXException ex) {\r\n throw new MappingException(ex);\r\n }\r\n }",
"private static Type matchType(String type) {\n if (type == null) {\n return VarcharType.VARCHAR;\n }\n\n switch (type.toLowerCase()) {\n case \"string\":\n return VarcharType.VARCHAR;\n case \"int\":\n return IntegerType.INTEGER;\n case \"bigint\":\n return BigintType.BIGINT;\n case \"double\":\n return DoubleType.DOUBLE;\n case \"boolean\":\n return BooleanType.BOOLEAN;\n case \"array<string>\":\n return new ArrayType(VarcharType.VARCHAR);\n case \"timestamp\":\n return TimestampType.TIMESTAMP;\n case \"datetime\":\n return TimestampType.TIMESTAMP;\n case \"number\":\n return DecimalType.createDecimalType(DECIMAL_DEFAULT_PRECISION, DECIMAL_DEFAULT_SCALE);\n default:\n return VarcharType.VARCHAR;\n }\n }",
"public void setType(String t) {\n\ttype = t;\n }"
]
| [
"0.57176596",
"0.5695864",
"0.5456674",
"0.54372215",
"0.5423494",
"0.5149134",
"0.5117464",
"0.5099809",
"0.49950755",
"0.49803865",
"0.49764457",
"0.4958101",
"0.4947342",
"0.49138418",
"0.48870277",
"0.48800966",
"0.48713458",
"0.4850312",
"0.48354065",
"0.48259625",
"0.4824511",
"0.47864586",
"0.47854358",
"0.47829106",
"0.47748548",
"0.47742465",
"0.4766849",
"0.4766849",
"0.4766849",
"0.47588027",
"0.47522634",
"0.47478616",
"0.47427168",
"0.47427168",
"0.47427168",
"0.4735312",
"0.47344738",
"0.4725707",
"0.47122917",
"0.4692772",
"0.46810818",
"0.46757582",
"0.46757582",
"0.46757582",
"0.46757582",
"0.4672856",
"0.46652597",
"0.46652597",
"0.46610513",
"0.46564627",
"0.46559384",
"0.46497422",
"0.46475407",
"0.46392992",
"0.46358836",
"0.46313652",
"0.46313652",
"0.46213502",
"0.4617138",
"0.46150443",
"0.46150443",
"0.46129242",
"0.46086088",
"0.46025032",
"0.45985073",
"0.45985073",
"0.45985073",
"0.45985073",
"0.45985073",
"0.45985073",
"0.45985073",
"0.45985073",
"0.45985073",
"0.45985073",
"0.45985073",
"0.45985073",
"0.45985073",
"0.45985073",
"0.45985073",
"0.45985073",
"0.45985073",
"0.45985073",
"0.45985073",
"0.45985073",
"0.45985073",
"0.45985073",
"0.4593713",
"0.4592746",
"0.45925403",
"0.45906788",
"0.4588353",
"0.4587094",
"0.45815885",
"0.4580319",
"0.45711526",
"0.45692837",
"0.45546803",
"0.45543167",
"0.4548145",
"0.45429042"
]
| 0.76323026 | 0 |
Getter for the URL type. | public String getUrlType() {
return theUrlType;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public URIType getURIType();",
"@ApiModelProperty(value = \"A URI reference according to IETF RFC 3986 that identifies the problem type\")\n \n public String getType() {\n return type;\n }",
"@XmlTransient\r\n @JsonIgnore\r\n public URI getType() {\r\n return this.type == null ? null : this.type.getType();\r\n }",
"public final String getImageType() {\n String imageType = null;\n\n if (this.url != null) {\n imageType = this.url.substring(this.url.lastIndexOf(\".\") + 1);\n }\n\n return imageType;\n }",
"public static String getURL(String urlType) {\n\t\tswitch (urlType) {\n\t\tcase \"authentication\":\n\t\t\treturn getAuthenticationURL();\n\t\tcase \"isAuthenticated\":\n\t\t\treturn getCheckAuthentication();\n\t\tcase \"testPlan\":\n\t\t\treturn getTestsURL();\n\t\tcase \"getSession\":\n\t\t\treturn getSessionURL();\n\t\tcase \"createTestRun\":\n\t\t\treturn getCreateTestRunURL();\n\t\tcase \"createTestSet\":\n\t\t\treturn createTestSet();\n\t\tcase \"testInstance\":\n\t\t\treturn getTestInstanceURL();\n\t\tcase \"testRun\":\n\t\t\treturn getTestRunURL();\n\t\tcase \"testSetFolder\":\n\t\t\treturn getTestSetFolderURL();\n\t\tcase \"baseProject\":\n\t\t\treturn getProjectURL();\n\t\tdefault:\n\t\t\treturn \"\";\n\t\t}\n\t}",
"@XmlAttribute (namespace = CommonNamespaces.GEDCOMX_COMMON_NAMESPACE)\n @XmlQNameEnumRef (ResourceType.class)\n @XmlSchemaType (name = \"anyURI\", namespace = XMLConstants.W3C_XML_SCHEMA_NS_URI)\n public URI getType() {\n return type;\n }",
"public List<URI> getType();",
"String getType() {\n return type;\n }",
"public static String getType() {\n\t\treturn type;\n\t}",
"public final String type() {\n return type;\n }",
"public final String getType() {\n return this.type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\r\n return type;\r\n }",
"public String getType() {\r\n return type;\r\n }",
"public String getType() {\r\n return type;\r\n }",
"public String getType() {\r\n return type;\r\n }",
"public String getType() {\r\n return type;\r\n }",
"public String getType() {\r\n return type;\r\n }",
"protected String getType() {\n\t\treturn type;\n\t}",
"public String getType()\r\n {\r\n return type;\r\n }",
"public String getType()\n {\n return type;\n }",
"public String getType() { return type; }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\r\n\t\treturn type_;\r\n\t}",
"public String getType() {\r\n return type;\r\n }",
"public String getType() {\n return type; \n }",
"public String getType () {\n return type;\n }",
"public String getType () {\n return type;\n }",
"public String getType () {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\r\r\n\t\treturn type;\r\r\n\t}",
"public String getType()\n {\n return type;\n }",
"public String getType()\n {\n return type;\n }",
"public String getType()\n {\n return type;\n }",
"public String getType()\n {\n return type;\n }",
"public String getType()\n {\n return type;\n }",
"public String getType()\n {\n return type;\n }",
"public String getType(){\r\n return type;\r\n }",
"public synchronized String getType() {\n\t\treturn type;\n\t}",
"public ResourceType type() {\n return type;\n }",
"public String getType() {\n return this.type;\n }",
"public String getType() {\n return this.type;\n }",
"public String getType() {\n return _type;\n }",
"String getType() {\r\n return this.type;\r\n }",
"public String getType() {\r\n\t\treturn type;\r\n\t}",
"public String getType() {\r\n\t\treturn type;\r\n\t}",
"public String getType() {\r\n\t\treturn type;\r\n\t}",
"public String getType() {\n\t\treturn type;\n\t}",
"public String getType() {\n\t\treturn type;\n\t}",
"public String getType() {\n\t\treturn type;\n\t}",
"public String getType() {\n\t\treturn type;\n\t}",
"public String getType() {\n\t\treturn type;\n\t}",
"public String getType() {\n\t\treturn type;\n\t}",
"public String getType() {\n\t\treturn type;\n\t}",
"public String getType() {\n\t\treturn type;\n\t}"
]
| [
"0.73120445",
"0.7013343",
"0.68820727",
"0.67706954",
"0.66741395",
"0.65998614",
"0.6534417",
"0.6477575",
"0.64310527",
"0.6385634",
"0.6378224",
"0.6332816",
"0.633177",
"0.63172114",
"0.63172114",
"0.63172114",
"0.63172114",
"0.63172114",
"0.63003397",
"0.62988764",
"0.629628",
"0.62884074",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.62878513",
"0.6287676",
"0.6277456",
"0.62715375",
"0.6267683",
"0.6267683",
"0.6267683",
"0.626274",
"0.626274",
"0.6253704",
"0.62529665",
"0.6248927",
"0.6248927",
"0.6248927",
"0.6248927",
"0.6248927",
"0.6248927",
"0.6248411",
"0.6244406",
"0.6244243",
"0.6237019",
"0.6237019",
"0.62302226",
"0.6229988",
"0.6229577",
"0.6229577",
"0.6229577",
"0.62268645",
"0.62268645",
"0.62268645",
"0.62268645",
"0.62268645",
"0.62268645",
"0.62268645",
"0.62268645"
]
| 0.8717747 | 0 |
Opinionated methods allow for synchronization where it matters | @SneakyThrows
public void loginSuccessfully(UserData userData) {
login(userData);
try {
synchWait().until((page) -> !isOnPage());
} catch (TimeoutException e) {
throw new TimeoutException("login was unsuccessful; found error message: " + error.getText());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void synchronize(){ \r\n }",
"void contentsSynchronized();",
"@Override\n public void sync(){\n }",
"@Override\n public void callSync() {\n\n }",
"void lock();",
"public void requestExtraSync()\n {\n executor.requestExtraSync();\n }",
"@Override\r\n\tpublic boolean isSynchronized() {\n\t\treturn false;\r\n\t}",
"public boolean synchronize() {\n\t\treturn false;\n\t}",
"Boolean autoSync();",
"public void lock() {\n\n }",
"void synchronizationDone();",
"public static synchronized void foo() {\n\n }",
"public LockSync() {\n lock = new ReentrantLock();\n }",
"protected void synchronizationDone() {\n }",
"void beforeContentsSynchronized();",
"public boolean needsSync() {\n return myNeedsSync;\n }",
"public void synchronize(int change);",
"public boolean isSynchronizing() {\n\t\treturn false;\n\t}",
"@Test\n\tpublic void test_synchronization() throws InterruptedException, ExecutionException {\n\t\t\n\t\tIkanowV1SyncService_LibraryJars s1 = new IkanowV1SyncService_LibraryJars(BeanTemplateUtils.clone(_service_config).with(\"v1_enabled\", true).done(), \n\t\t\t\t_service_context);\n\t\tIkanowV1SyncService_LibraryJars s2 = new IkanowV1SyncService_LibraryJars(BeanTemplateUtils.clone(_service_config).with(\"v1_enabled\", true).done(), \n\t\t\t\t_service_context);\n\t\tIkanowV1SyncService_LibraryJars s3 = new IkanowV1SyncService_LibraryJars(BeanTemplateUtils.clone(_service_config).with(\"v1_enabled\", true).done(), \n\t\t\t\t_service_context);\n\t\t\n\t\tint old = IkanowV1SyncService_LibraryJars._num_leader_changes;\n\t\t\n\t\ts1.start(); s2.start(); s3.start();\n\t\tfor (int i = 0; i < 4; ++i) {\n\t\t\ttry { Thread.sleep(1000); } catch (Exception e) {}\n\t\t}\n\t\ts1.stop(); s2.stop(); s3.stop();\n\t\t\n\t\tassertEquals(old + 1, IkanowV1SyncService_LibraryJars._num_leader_changes);\n\t\t\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tfinal ICrudService<JsonNode> v1_config_db = _service_context.getCoreManagementDbService().getUnderlyingPlatformDriver(ICrudService.class, Optional.of(\"social.share\")).get();\t\t\t\t\n\t\t\n\t\tassertTrue(\"Query optimized\", v1_config_db.deregisterOptimizedQuery(Arrays.asList(\"title\")));\n\t\t\n\t}",
"@Test\r\n\tvoid testReentrant() throws Exception\r\n\t{\r\n\t\tfinal PageAccessSynchronizer sync = new PageAccessSynchronizer(Duration.ofSeconds(5));\r\n\t\tsync.lockPage(0);\r\n\t\tsync.lockPage(0);\r\n\t}",
"T sync() throws IOException, ChallongeException;",
"void sync()throws IOException;",
"@Test\n public void testSynchronizedSync() throws AuthException, IOException {\n presenter.synchronize();\n try {\n presenter.syncingThread.join();\n } catch (InterruptedException e) {}\n assertEquals(SyncStatusEnum.PREAUTHED, presenter.status);\n presenter.synchronize();\n try {\n presenter.syncingThread.join();\n } catch (InterruptedException e) {}\n assertEquals(SyncStatusEnum.AUTHED, presenter.status);\n presenter.synchronize();\n try {\n presenter.syncingThread.join();\n } catch (InterruptedException e) {}\n assertEquals(SyncStatusEnum.SYNCED, presenter.status);\n }",
"Shared shared();",
"public static void synchronize() {\n awaitCompletion(READ_HANDLES);\n awaitCompletion(WRITE_HANDLES);\n }",
"public synchronized void add() {\ncounter += 1;\n}",
"private SingletonSyncBlock() {}",
"public void lock() {\r\n super.lock();\r\n }",
"@Override\n @ReturnsLock(\"N\")\n public Object get(final C a, final C b) {\n return lock;\n }",
"Thread getLocker();",
"@ThreadSafe\r\n\tpublic void method2A() {\n\t\tsynchronized(f2) {\r\n method2B();\r\n\t\t}\r\n\t}",
"@Test\n @Transactional\n public void test_pessimistic_lock__separate_transactions__forUpdate_doesnot_update() throws InterruptedException {\n AtomicLong waited = new AtomicLong(-1);\n AtomicBoolean expectedValueFound = new AtomicBoolean(false);\n URI atomURI = newAtomURI();\n executeInSeparateThreadAndWaitForResult(() -> {\n Atom atom = new Atom();\n atom.setAtomURI(atomURI);\n atom.setState(AtomState.ACTIVE);\n AtomMessageContainer container = new AtomMessageContainer(atom, atom.getAtomURI());\n atom = atomRepository.save(atom);\n });\n Thread parallelThread1 = new Thread(() -> helper.doInSeparateTransaction(() -> {\n Optional<Atom> b = atomRepository.findOneByAtomURIForUpdate(atomURI);\n logger.debug(\"read in other thread: \" + b);\n }));\n parallelThread1.start();\n Thread.sleep(100);\n Thread parallelThread2 = new Thread(() -> helper.doInSeparateTransaction(() -> {\n Optional<Atom> a = atomRepository.findOneByAtomURIForUpdate(atomURI);\n logger.debug(\"read in yet another thread: \" + a);\n logger.debug(\"blocking...\");\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n a.get().setCreationDate(new Date(1));\n atomRepository.save(a.get());\n }));\n parallelThread2.start();\n Thread.sleep(100);\n Thread parallelThread3 = new Thread(() -> helper.doInSeparateTransaction(() -> {\n Optional<Atom> b = atomRepository.findOneByAtomURI(atomURI);\n logger.debug(\"acquiring exclusive lock...\");\n long now = System.currentTimeMillis();\n b = atomRepository.findOneByAtomURIForUpdate(atomURI);\n logger.debug(\"read in the third thread: \" + b);\n logger.debug(\"waited: \" + (System.currentTimeMillis() - now));\n waited.set(System.currentTimeMillis() - now);\n expectedValueFound.set(b.get().getCreationDate().getTime() != 1);\n }));\n parallelThread3.start();\n logger.debug(\"waiting for parallel threads to finish\");\n parallelThread1.join();\n parallelThread2.join();\n parallelThread3.join();\n Assert.assertTrue(\"thread should have been blocked at least 500ms\", waited.get() > 500);\n Assert.assertTrue(\"thread3 did not get update by thread2\", expectedValueFound.get());\n }",
"public void lock() {\n super.lock();\n }",
"public void lock() {\n super.lock();\n }",
"public void lock() {\n super.lock();\n }",
"@Override\n\tpublic void run() {\n\t\tStaticSynchronized.execute();\n\t\tStaticSynchronized.execute2();\n\t\tStaticSynchronized.execute3();\n\t}",
"public interface Lock {\n\n boolean acquire();\n\n boolean release();\n}",
"public void acquire(boolean forMerge) {\r\n return;\r\n }",
"void sync() throws IOException;",
"private SyncState() {}",
"private static void m200a() {\r\n Object obj = AuthTask.f155a;\r\n synchronized (obj) {\r\n try {\r\n obj.notify();\r\n } catch (Exception e) {\r\n }\r\n }\r\n }",
"@Override\n\tpublic void sync() throws IOException {\n\t\t\n\t}",
"@Override\n public void run() {\n super.run();\n notAtomic.naIncreament();\n }",
"public void insertInorderBarrier() {\n\t\t\n\t}",
"public void forceReasonerReSynchronization();",
"@Override\n public boolean isThreadSafe()\n {\n return false;\n }",
"public void acquire() {\r\n return;\r\n }",
"void trySynchronizeHostData(DataBuffer buffer);",
"@Test\n public void testSynchronizedPreAuthed() throws AuthException, IOException {\n presenter.synchronize();\n try {\n presenter.syncingThread.join();\n } catch (InterruptedException e) {}\n presenter.synchronize();\n try {\n presenter.syncingThread.join();\n } catch (InterruptedException e) {}\n assertEquals(SyncStatusEnum.AUTHED, presenter.status);\n }",
"private static void mergingSyncMadeAsync() {\n Observable.merge(getDataSync(1).subscribeOn(Schedulers.io()), getDataSync(2).subscribeOn(Schedulers.io())).blockingForEach(System.out::println);\n }",
"@Override\n @ReturnsLock(\"a:M\")\n public Object get(final C a, final C b) {\n return lock;\n }",
"@Test\n public void testMultipleCallsReturnTheSameObjectInSameThread() {\n // Create several instances in the same calling thread\n S instance1 = this.singletonInstanceMethod.get();\n S instance2 = this.singletonInstanceMethod.get();\n S instance3 = this.singletonInstanceMethod.get();\n // now check they are equal\n assertSame(instance1, instance2);\n assertSame(instance1, instance3);\n assertSame(instance2, instance3);\n }",
"@Override\n @ReturnsLock(\"L\")\n public Object get(final C a, final C b) {\n return lock;\n }",
"@Override\n protected int tryAcquireShared(int ignored) {\n if (isSignalled()) {\n return 1;\n }\n\n return -1;// check in AbstractQueuedSynchronizer.doAcquireSharedInterruptibly() why -1 returned here.\n }",
"public void syncHandle() {\n syncOldStream();\n }",
"public abstract ReentrantLock getLock();",
"@Override\n\tpublic void sync() throws IOException\n\t{\n\n\t}",
"@Override\n @ReturnsLock(\"x:M\")\n public Object get(final C x, final C y) {\n return lock;\n }",
"default EagerFutureStream<U> sync(){\n\t\treturn (EagerFutureStream<U>)FutureStream.super.sync();\n\t}",
"private synchronized void syncData() {\n try {\n // pulling data from server\n pullData();\n\n // pushing local changes to server\n// recordStatus=2\n pushData();\n// recordStatus=1\n// pushData1();\n } catch (Throwable throwable) {\n Log.d(TAG, \"doWork: \" + throwable.getMessage());\n }\n // Toast.makeText(getApplicationContext(), \".\", Toast.LENGTH_SHORT).show();\n }",
"@Override\n @ReturnsLock(\"this:L\")\n public Object get(final C a, final C b) {\n return lock;\n }",
"public ChannelProgressivePromise sync()\r\n/* 93: */ throws InterruptedException\r\n/* 94: */ {\r\n/* 95:126 */ super.sync();\r\n/* 96:127 */ return this;\r\n/* 97: */ }",
"@Override\n public void syncState() {\n scheduledCounter.check();\n }",
"public boolean sync() throws VlException \n\t{\n\t return false; \n\t}",
"@Override\n @SuppressWarnings(\"unchecked\")\n protected void customSync() {\n Exchanger<Void>[] exchangers = (Exchanger<Void>[]) new Exchanger<?>[PRODUCERS_COUNT];\n\n for (int i = 0; i < PRODUCERS_COUNT; i++) {\n exchangers[i] = new Exchanger<>();\n new Producer(params.dataResults, params.postResult, exchangers[i]).start();\n }\n\n new Consumer(params.postFinish, exchangers).start();\n }",
"public <T> T sync(Supplier<? extends T> supplier) {\n lock.lock();\n try {\n return supplier.get();\n } finally {\n lock.unlock();\n } \n }",
"ManagementLockObject.Update update();",
"public void lock() {\n\t\tlocked = true;\n\t}",
"public void setAutoSynchronizationEnabled(boolean b);",
"void syncGroup();",
"@Test\n public void consistencyTest() {\n Boolean isConsistent = instrSetup(new Callable<Boolean>() {\n\n /**\n * A {@link Callable} worker that generates accesses to an object\n * regularly fetching its id to check if it changes.\n *\n * @author Nikolay Pulev <[email protected]>\n */\n class ObjectAccessGenerator implements Callable<Long> {\n\n private Object ref;\n\n public ObjectAccessGenerator(Object ref) {\n this.ref = ref;\n }\n\n /**\n * Generates accesses to passed reference. Obtains id value,\n * checks it for consistency, and returns it as a result.\n *\n * @throws Exception\n */\n @Override\n public Long call() {\n long id0 = InstanceIdentifier.INSTANCE.getId(ref);\n ref.hashCode();\n long id1 = InstanceIdentifier.INSTANCE.getId(ref);\n ref.toString();\n long id2 = InstanceIdentifier.INSTANCE.getId(ref);\n ref.equals(ref);\n long id3 = InstanceIdentifier.INSTANCE.getId(ref);\n if (!(id0 == id1 && id1 == id2 && id2 == id3)) {\n\n return (long) -1;\n }\n\n return Long.valueOf(id0);\n }\n }\n\n @Override\n public Boolean call() throws Exception {\n Object ref = new MickeyMaus(5); /* Create object. */\n long initialId = InstanceIdentifier.INSTANCE.getId(ref);\n ExecutorService pool = Executors.newFixedThreadPool(100);\n ArrayList<Future<Long>> futures = new ArrayList<Future<Long>>();\n\n /* Create several access generators to query the object's id. */\n for (int i = 1; i < 1000; i++) {\n futures.add(pool.submit(new ObjectAccessGenerator(ref)));\n }\n\n /* Check results. */\n for (Future<Long> future : futures) {\n if (initialId != future.get().longValue()) {\n\n return Boolean.valueOf(false); /* Return false if inconsistency found. */\n }\n }\n\n return Boolean.valueOf(true);\n }\n });\n Assert.assertEquals(\"InstanceIdentifier.getId() provides consistent ids for references: \",\n true , isConsistent.booleanValue());\n }",
"public synchronized void save() {\n/* 86 */ this.component.saveToDB();\n/* */ }",
"public interface SynchronizationControl {\n /**\n * Updates the synchronization time.\n * Using this method is preferable to calling {@link #synchronizationDone()} followed by {@link FeedView#synchronizeTime(long)}\n * because it is atomic.\n * @param time new time to synchronize on\n */\n void update(long time);\n\n /**\n * Complete the time synchronization across views. This must be called in order to\n * restart normal feed activity. \n */\n void synchronizationDone();\n }",
"@Test\n void notSafe() throws InterruptedException {\n Queue<String> queue = new LinkedList<>();\n\n CountDownLatch consumer1CountDownLatch = new CountDownLatch(1);\n CountDownLatch consumer2CountDownLatch = new CountDownLatch(1);\n CountDownLatch endCountDown = new CountDownLatch(1);\n\n Thread consumer1 = new Thread(\n () -> {\n try {\n synchronized (queue) {\n System.out.println(\"consumer1 in sync block \");\n\n if (queue.isEmpty()) {\n System.out.println(\"consumer1 waiting \");\n consumer1CountDownLatch.countDown();\n queue.wait();\n System.out.println(\"consumer1 wake up\");\n }\n System.out.println(\"consumer1 remove item\");\n\n assertThatThrownBy(queue::remove)\n .isInstanceOf(NoSuchElementException.class);\n endCountDown.countDown();\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n );\n Thread consumer2 = new Thread(\n () -> {\n try {\n synchronized (queue) {\n System.out.println(\"consumer2 in sync block \");\n if (queue.isEmpty()) {\n System.out.println(\"consumer2 waiting \");\n consumer2CountDownLatch.countDown();\n queue.wait();\n System.out.println(\"consumer2 wake up\");\n }\n System.out.println(\"consumer2 remove item\");\n queue.remove();\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n );\n\n Thread provider = new Thread(\n () -> {\n try {\n synchronized (queue) {\n System.out.println(\"provider in sync block \");\n System.out.println(\"provider add item \");\n queue.add(\"SOME THING\");\n System.out.println(\"provider notifyAll\");\n queue.notifyAll();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n );\n\n consumer1.start();\n consumer1CountDownLatch.await();\n\n consumer2.start();\n consumer2CountDownLatch.await();\n\n provider.start();\n endCountDown.await();\n\n assertThat(endCountDown.getCount()).isEqualTo(0);\n }",
"public void lock() {\n if (!locked) {\n locked = true;\n sortAndTruncate();\n }\n }",
"public Promise<V> sync()\r\n/* 183: */ throws InterruptedException\r\n/* 184: */ {\r\n/* 185:219 */ await();\r\n/* 186:220 */ rethrowIfFailed();\r\n/* 187:221 */ return this;\r\n/* 188: */ }",
"public Lock getLock();",
"public void acquireDeferredLock() {\r\n return;\r\n }",
"private static synchronized int next(){\n next ++;\n return next;\n}",
"@Override\n\tpublic boolean allowMultithreading()\n\t{\n\t\treturn true;\n\t}",
"public ChannelProgressivePromise syncUninterruptibly()\r\n/* 100: */ {\r\n/* 101:132 */ super.syncUninterruptibly();\r\n/* 102:133 */ return this;\r\n/* 103: */ }",
"public interface JedisLockSupport {\r\n\t\r\n\t/**\r\n\t * Acquire the lock on passed key and set its owner\r\n\t * It will try once and will return immediately\r\n\t * @param key the key to set lock against\r\n\t * @param owner lock owner\r\n\t * @return true if lock is acquired\r\n\t */\r\n\tpublic boolean acquire(String key, String owner);\r\n\t\r\n\t\r\n\t/**\r\n\t * Acquire the lock on passed key\r\n\t * It will try to get lock for timeout passed\r\n\t * @param key\r\n\t * @param owner\r\n\t * @param timeout\r\n\t * @param timeUnit\r\n\t * @return true if lock is acquired\r\n\t */\r\n\tpublic boolean tryAcquire(String key, String owner, long timeout, TimeUnit timeUnit);\r\n\t\r\n\t/**\r\n\t * Releases the lock\r\n\t * @param key\r\n\t * @param owner\r\n\t */\r\n\tpublic void release(String key, String owner);\r\n\t\r\n\t/**\r\n\t * Interning the string key. Used internally.\r\n\t * String str1 = new String(\"abc\");\r\n\t * String str2 = new String(\"abc\");\r\n\t * str1 and str2 are two different objects \r\n\t * and we synchronized based on the passed key\r\n\t * \r\n\t * @param key to normalize\r\n\t * @return the normalized key\r\n\t */\r\n\tdefault String normalizeKey(String key) {\r\n\t\treturn key.intern();\r\n\t}\r\n}",
"@Test(timeOut = 30_000)\n public void testValueLoaderWithLocking() throws Exception {\n //given\n final SpringRemoteCacheManager springRemoteCacheManager = new SpringRemoteCacheManager(remoteCacheManager);\n final SpringCache cache = springRemoteCacheManager.getCache(TEST_CACHE_NAME);\n\n CountDownLatch waitUntilThread1LocksValueGetter = new CountDownLatch(1);\n\n //when\n Future<String> thread1 = fork(() -> cache.get(\"test\", () -> {\n waitUntilThread1LocksValueGetter.countDown();\n// /TimeUnit.MILLISECONDS.sleep(10);\n return \"thread1\";\n }));\n\n Future<String> thread2 = fork(() -> {\n waitUntilThread1LocksValueGetter.await();\n return cache.get(\"test\", () -> \"thread2\");\n });\n\n String valueObtainedByThread1 = thread1.get();\n String valueObtainedByThread2 = thread2.get();\n\n Cache.ValueWrapper valueAfterGetterIsDone = cache.get(\"test\");\n\n //then\n assertNotNull(valueAfterGetterIsDone);\n assertEquals(\"thread1\", valueAfterGetterIsDone.get());\n assertEquals(\"thread1\", valueObtainedByThread1);\n assertEquals(\"thread1\", valueObtainedByThread2);\n }",
"protected void lock() {\n semaphore = new Semaphore(0);\n try {\n semaphore.acquire();\n }\n catch(InterruptedException e) {\n System.out.println(\"Trouble for request of semaphore acquirement\");\n e.printStackTrace();\n }\n }",
"public interface Lock {\n\n void lock();\n\n void unlock();\n}",
"public Object getLock() {\n return dataLock;\n }",
"@Override\n public SyncObjectState call() {\n\n SyncObjectState callState = SyncObjectState.STARTED;\n \n \n long remainingSleep = task.getSleepUntil() - System.currentTimeMillis();\n if (remainingSleep > 0) {\n try {\n Thread.sleep(remainingSleep);\n } catch (InterruptedException ex) {\n logger.warn(buildStandardLogMessage(null, \" Interrupted task-remaining-sleep\"));\n }\n }\n\n // TODO: consider replacing Lock with with IMap, for the automatic GC\n // see https://groups.google.com/forum/#!topic/hzProcessingClient/9YFGh3xwe8I\n Lock hzPidLock = hzProcessingClient.getLock(task.getPid());\n \n // this section must be thread-safe otherwise, we may skip unlocking a lock.\n // see http://docs.hazelcast.org/docs/3.5/manual/html/lock.html\n try {\n logger.info(buildStandardLogMessage(null, \" Locking task, attempt \" + task.getLockAttempt()));\n \n if (hzPidLock.tryLock(1, TimeUnit.SECONDS)) {\n // got lock\n try {\n logger.info(buildStandardLogMessage(null, \" Processing SyncObject\"));\n SystemMetadata mnSystemMetadata = retrieveMNSystemMetadata();\n logger.debug(task.taskLabel() + \" MN system metadata retrieved...\");\n\n processTask(mnSystemMetadata);\n callState = SyncObjectState.SUCCESS;\n \n } catch (RetryableException ex) {\n if (task.getAttempt() < 20) {\n callState = SyncObjectState.RETRY;\n \n logger.warn(buildStandardLogMessage(ex, \" RetryableException raised on attempt \"\n + task.getAttempt() + \" of 20. Sleeping and requeueing.\"));\n\n task.setAttempt(task.getAttempt() + 1);\n task.setSleepUntil(System.currentTimeMillis() + 5000L);\n\n hzProcessingClient.getQueue(synchronizationObjectQueue).put(task);\n \n } else {\n logger.error(buildStandardLogMessage(ex,\" Exceeded retry limit.\"\n + \" Unable to process the SyncObject. Converting to UnrecoverableException\"),ex);\n throw new UnrecoverableException(task.getPid() + \": retry limits reached without success.\",\n ex.getCause());\n }\n } finally {\n hzPidLock.unlock();\n logger.info(buildStandardLogMessage(null, \" Unlocked Pid.\"));\n }\n } else {\n // lock-retry handling\n if (task.getLockAttempt() < 100) {\n callState = SyncObjectState.RETRY;\n \n logger.warn(buildStandardLogMessage(null,\n \" Cannot lock Pid! Requeueing the task. Attempt \" + task.getLockAttempt()));\n\n task.setLockAttempt(task.getLockAttempt() + 1);\n task.setSleepUntil(System.currentTimeMillis() + 1000L);\n hzProcessingClient.getQueue(synchronizationObjectQueue).put(task);\n \n } else {\n callState = SyncObjectState.FAILED;\n \n String message = \"Cannot lock Pid! Reached Max attempts (100), abandoning processing of this pid.\";\n logger.error(buildStandardLogMessage(null, message));\n throw new SynchronizationFailed(\"5000\",message);\n }\n }\n } catch (SynchronizationFailed e) {\n callState = SyncObjectState.FAILED;\n \n logger.error(buildStandardLogMessage(e.getCause(),\"SynchronizationFailed: \" + e.getMessage()),e);\n SyncFailedTask syncFailedTask = new SyncFailedTask(nodeCommunications, task);\n syncFailedTask.submitSynchronizationFailed(e);\n\n } catch (UnrecoverableException e) {\n callState = SyncObjectState.FAILED;\n // this is the proper location to decide whether or not to notify the MemberNode\n // (these are exceptions caused by internal problems)\n \n // in all cases, we need to log\n logger.error(buildStandardLogMessage(e.getCause(),\"UnrecoverableException: \" + e.getMessage()),e);\n \n // report to MN, for now\n\n SyncFailedTask syncFailedTask = new SyncFailedTask(nodeCommunications, task);\n if (e.getCause() instanceof BaseException)\n syncFailedTask.submitSynchronizationFailed(task.getPid(), null,(BaseException) e.getCause());\n \n else \n syncFailedTask.submitSynchronizationFailed(task.getPid(), null,\n new ServiceFailure(\"5000\", this.buildStandardLogMessage(e.getCause(), null)));\n\n\n \n } catch (InterruptedException e) {\n callState = SyncObjectState.FAILED;\n // was handled as Exception before I split this out\n // don't know if we need to handle it any differently,\n logger.error(buildStandardLogMessage(e, \"Interrupted: \" + e.getMessage()), e);\n\n } catch (Exception e) {\n callState = SyncObjectState.FAILED;\n logger.error(this.buildStandardLogMessage(e,e.getMessage()),e);\n\n } finally {\n logger.info(buildStandardLogMessage(null, \" exiting with callState: \" + callState));\n// XXX: Hold until 2.4, because it depends on an update to d1_cn_common\n// MetricLogEntry metricLogEntry = new MetricLogEntry(MetricEvent.SYNCHRONIZATION_TASK_EXECUTION);\n// metricLogEntry.setNodeId(TypeFactory.buildNodeReference(task.getNodeId()));\n// metricLogEntry.setPid(TypeFactory.buildIdentifier(task.getPid()));\n// metricLogEntry.setMessage(\"status=\" + callState);\n// MetricLogClientFactory.getMetricLogClient().logMetricEvent(metricLogEntry);\n }\n return callState;\n }",
"public boolean isSynchronized() {\n return (getAccessFlags() & Constants.ACCESS_SYNCHRONIZED) > 0;\n }",
"static void synced () {\n\t\tList<Integer> linkedList = \n\t\t\t\tCollections.synchronizedList(new LinkedList<Integer>());\n\t\tfor (int i = 0; i < 100; i++) {\n\t\t\tlinkedList.add(i);\n\t\t}\n\t\t// launch a thread to add numbers 100 to 200 to the list\n\t\tnew Thread(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tSystem.out.println(\"starting adding numbers\");\n\t\t\t\tfor (int i = 100; i < 200; i++) {\n\t\t\t\t\tlinkedList.add(i);\n\t\t\t\t\ttry { Thread.sleep(1);} \n\t\t\t\t\tcatch (InterruptedException e) {e.printStackTrace();}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"end\");\n\t\t\t}\n\t\t}).start();\n\n\t\t// now run an iterator to go through the linked list that is \n\t\t// synchronized with the linked list object. \n\t\tsynchronized(linkedList) {\n\t\t\tIterator<Integer> iterator = linkedList.iterator();\n\t\t\tSystem.out.println(\"starting iteration\");\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\ttry {Thread.sleep(4);} \n\t\t\t\tcatch (InterruptedException e) {e.printStackTrace();}\n\t\t\t\tSystem.out.println(iterator.next());\n\t\t\t}\t\n\t\t\tSystem.out.println(\"finished iteration\");\n\t\t}\n\t}",
"@Override\n public void synchronize(final boolean authentication) {\n if (terminated) {\n return;\n }\n RP.post(new Runnable() {\n @Override public void run() {\n doSynchronize(authentication, true);\n }\n });\n }",
"private static void mergingSync() {\n Observable.merge(getDataSync(1), getDataSync(2)).blockingForEach(System.out::println);\n }",
"@Override\n @ReturnsLock(\"test.formals.C:N\")\n public Object get(final C a, final C b) {\n return lock;\n }",
"private SingletonThreadSafeExample(){\n this.invoke++;\n }",
"@Test\n public void writeLockIsolationTest() throws InterruptedException {\n final TestUse testUse = new TestUse();\n final ConcurrentHashMap concurrentHashMap = new ConcurrentHashMap();\n int threadNum = 50;\n final CountDownLatch countDownLatch = new CountDownLatch(threadNum);\n for (int i = 0; i < threadNum; i++) {\n new Thread(new Runnable() {\n @Override\n public void run() {\n concurrentHashMap.put(testUse.minusCountInWriteLock(), \"value\");\n countDownLatch.countDown();\n }\n }).start();\n }\n countDownLatch.await();\n Assert.assertEquals(950, testUse.count);\n }",
"@Test\n public void runOutOfOrderConcurrencyTest() {\n ExecutorService tp = Executors.newFixedThreadPool(20);\n List<Throwable> errors = TestHelper.trackPluginErrors();\n try {\n SerializedObserverTest.TestConcurrencySubscriber tw = new SerializedObserverTest.TestConcurrencySubscriber();\n // we need Synchronized + SafeObserver to handle synchronization plus life-cycle\n Observer<String> w = serializedObserver(new SafeObserver<String>(tw));\n Future<?> f1 = tp.submit(new SerializedObserverTest.OnNextThread(w, 12000));\n Future<?> f2 = tp.submit(new SerializedObserverTest.OnNextThread(w, 5000));\n Future<?> f3 = tp.submit(new SerializedObserverTest.OnNextThread(w, 75000));\n Future<?> f4 = tp.submit(new SerializedObserverTest.OnNextThread(w, 13500));\n Future<?> f5 = tp.submit(new SerializedObserverTest.OnNextThread(w, 22000));\n Future<?> f6 = tp.submit(new SerializedObserverTest.OnNextThread(w, 15000));\n Future<?> f7 = tp.submit(new SerializedObserverTest.OnNextThread(w, 7500));\n Future<?> f8 = tp.submit(new SerializedObserverTest.OnNextThread(w, 23500));\n Future<?> f10 = tp.submit(new SerializedObserverTest.CompletionThread(w, SerializedObserverTest.TestConcurrencySubscriberEvent.onComplete, f1, f2, f3, f4));\n try {\n Thread.sleep(1);\n } catch (InterruptedException e) {\n // ignore\n }\n Future<?> f11 = tp.submit(new SerializedObserverTest.CompletionThread(w, SerializedObserverTest.TestConcurrencySubscriberEvent.onComplete, f4, f6, f7));\n Future<?> f12 = tp.submit(new SerializedObserverTest.CompletionThread(w, SerializedObserverTest.TestConcurrencySubscriberEvent.onComplete, f4, f6, f7));\n Future<?> f13 = tp.submit(new SerializedObserverTest.CompletionThread(w, SerializedObserverTest.TestConcurrencySubscriberEvent.onComplete, f4, f6, f7));\n Future<?> f14 = tp.submit(new SerializedObserverTest.CompletionThread(w, SerializedObserverTest.TestConcurrencySubscriberEvent.onComplete, f4, f6, f7));\n // // the next 4 onError events should wait on same as f10\n Future<?> f15 = tp.submit(new SerializedObserverTest.CompletionThread(w, SerializedObserverTest.TestConcurrencySubscriberEvent.onError, f1, f2, f3, f4));\n Future<?> f16 = tp.submit(new SerializedObserverTest.CompletionThread(w, SerializedObserverTest.TestConcurrencySubscriberEvent.onError, f1, f2, f3, f4));\n Future<?> f17 = tp.submit(new SerializedObserverTest.CompletionThread(w, SerializedObserverTest.TestConcurrencySubscriberEvent.onError, f1, f2, f3, f4));\n Future<?> f18 = tp.submit(new SerializedObserverTest.CompletionThread(w, SerializedObserverTest.TestConcurrencySubscriberEvent.onError, f1, f2, f3, f4));\n SerializedObserverTest.waitOnThreads(f1, f2, f3, f4, f5, f6, f7, f8, f10, f11, f12, f13, f14, f15, f16, f17, f18);\n @SuppressWarnings(\"unused\")\n int numNextEvents = tw.assertEvents(null);// no check of type since we don't want to test barging results here, just interleaving behavior\n\n // System.out.println(\"Number of events executed: \" + numNextEvents);\n for (int i = 0; i < (errors.size()); i++) {\n TestHelper.assertUndeliverable(errors, i, RuntimeException.class);\n }\n } catch (Throwable e) {\n Assert.fail((\"Concurrency test failed: \" + (e.getMessage())));\n e.printStackTrace();\n } finally {\n tp.shutdown();\n try {\n tp.awaitTermination(5000, TimeUnit.MILLISECONDS);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n RxJavaPlugins.reset();\n }\n }",
"default <T> EagerFutureStream<T> sync(Function<EagerReact,EagerFutureStream<T>> react){\n\t\t EagerReact r =SequentialElasticPools.eagerReact.nextReactor().withAsync(false);\n\t\t return react.apply( r)\n\t\t\t\t \t.onFail(e->{ SequentialElasticPools.eagerReact.populate(r); throw e;})\n\t\t\t\t \t.peek(i->SequentialElasticPools.eagerReact.populate(r));\n\t\t \t\t\t\t \t\n\t}",
"@Override\n @ReturnsLock(\"Bad4c.this:L\")\n public Object get(final C a, final C b) {\n return lock;\n }",
"public void testCompareAndSetInMultipleThreads() throws Exception {\n final AtomicLong ai = new AtomicLong(1);\n Thread t = new Thread(new CheckedRunnable() {\n public void realRun() {\n while (!ai.compareAndSet(2, 3))\n Thread.yield();\n }});\n\n t.start();\n assertTrue(ai.compareAndSet(1, 2));\n t.join(LONG_DELAY_MS);\n assertFalse(t.isAlive());\n assertEquals(3, ai.get());\n }",
"@Override\n public void run() {\n if(Thread.currentThread().getName().equals(\"t1\")){\n synchronized(obj){\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n System.out.println(\"t1拿到了obj的锁\");\n synchronized(obj2){\n\n }\n }\n }\n //当线程名等于t2 时 进入此方法\n if(Thread.currentThread().getName().equals(\"t2\")){\n // 线程t2 拿到obj2 的锁 然后线程进入休眠一秒状态 \n synchronized(obj2){\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n System.out.println(\"t2拿到了obj2的锁\");\n synchronized(obj){\n\n }\n }\n }\n }",
"public interface SynchronizeContract {\n Cursor getCursorFromMediastore();\n Observable<Cursor> getCursorObservable(Cursor cursor);\n void synchronizeByAddModel(Cursor cursor);\n void synchronizeByDelModel(Cursor delCursor);\n Cursor getDelCursor(Cursor currentMediaCursor);\n Cursor getAddCursor(Cursor currentMediaCurrsor);\n}",
"public abstract boolean isShared();"
]
| [
"0.73348236",
"0.66712105",
"0.6669638",
"0.6626886",
"0.66207343",
"0.64886725",
"0.6473023",
"0.6452982",
"0.64517355",
"0.6420355",
"0.6415937",
"0.62798256",
"0.626004",
"0.62571335",
"0.6246975",
"0.61954445",
"0.6180868",
"0.6175237",
"0.60149556",
"0.59951705",
"0.59619427",
"0.59539425",
"0.5901533",
"0.58905256",
"0.5879027",
"0.5875193",
"0.58529603",
"0.5841983",
"0.58325994",
"0.58102643",
"0.5805867",
"0.5800378",
"0.57919294",
"0.57919294",
"0.57919294",
"0.5789026",
"0.57777184",
"0.57741535",
"0.57627475",
"0.5729932",
"0.57280284",
"0.57214266",
"0.570939",
"0.5701475",
"0.5697747",
"0.5697397",
"0.56934714",
"0.569095",
"0.5683267",
"0.5682945",
"0.567736",
"0.5674849",
"0.5665044",
"0.5654144",
"0.5652235",
"0.56516534",
"0.55996495",
"0.55995363",
"0.55854136",
"0.5566068",
"0.5564537",
"0.5561302",
"0.55569816",
"0.55514467",
"0.55466706",
"0.55400884",
"0.5537814",
"0.5537367",
"0.5534808",
"0.552338",
"0.55210745",
"0.54993224",
"0.5486046",
"0.5467694",
"0.5463492",
"0.54616034",
"0.5452996",
"0.54508245",
"0.54488033",
"0.5444996",
"0.54404",
"0.5440156",
"0.54369044",
"0.54322475",
"0.5430012",
"0.5428367",
"0.54221356",
"0.5414276",
"0.5414069",
"0.5410556",
"0.54061437",
"0.539136",
"0.5389912",
"0.53818125",
"0.53748906",
"0.53737",
"0.53706264",
"0.5368175",
"0.5365607",
"0.53631824",
"0.5350948"
]
| 0.0 | -1 |
Test the methods in the square entity class. | public void testSquare(){
Square s = new Square(false);
s.toggleSquare();
assertTrue(s.isToggle());
s.setToggle(false);
assertFalse(s.isToggle());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testGetSquare() {\n \n }",
"@Test\r\n public void testIsValidSquare()\r\n {\r\n for(int y = 0; y < 8; y++)\r\n for(int x = 0; x < 8; x++)\r\n assertTrue(board.isValidSqr(x, y));\r\n }",
"@Test\n public void testGetTile()\n {\n try\n {\n Square s = new Square();\n\n assertNull(s.getTile()); // Should return null as no tile placed yet.\n\n s.setTile(Tile.E); // Add a tile\n\n assertEquals(Tile.E, s.getTile()); // Check the tile is now on the square\n }\n catch(Exception ex)\n {\n fail(\"No exception should be thrown when getting a Tile from the square.\");\n }\n }",
"@Test\r\n public void testLandOn() {\r\n SnakeSquare instance = new SnakeSquare(33, 21);\r\n assertEquals(21, instance.landOn());\r\n }",
"@Test\r\n public void testGetNumber() {\r\n SnakeSquare instance = new SnakeSquare(33,22);\r\n assertEquals(33, instance.getNumber());\r\n assertEquals(22, instance.getEndSquare());\r\n \r\n }",
"@Test\n public void testIsOccupied()\n {\n try\n {\n Square s = new Square();\n\n assertFalse(s.isOccupied()); // Should be false as no tile on it yet\n\n s.setTile(Tile.A); // Add a tile\n\n assertTrue(s.isOccupied()); // Should now be true\n }\n catch(Exception ex)\n {\n fail(\"No exception should be thrown when adding a tile to a square normally.\");\n }\n }",
"@Test\r\n\tpublic void testBoardSquareArray() {\r\n\t\tBoard board = new Board();\r\n\t\tassertNotNull(board);\r\n\t\tboard.setSquareLocations(validSquareLocations);\r\n\t\tassertArrayEquals(validSquareLocations, board.getSquareLocations());\r\n\r\n\t}",
"@Test\n public void testSquare()\n {\n testSquareConstructor(10, 20);\n testSquareConstructor(30, 40);\n }",
"@Test\n public void testSetTypeOccupiedSquare()\n {\n try\n {\n Square s = new Square();\n\n s.setTile(Tile.T);\n s.setType(Square.squareType.DB_WORD);\n\n fail(\"An occupied square should not have a special type.\");\n }\n catch(Exception ex)\n {\n assertEquals(\"A Square cannot have a tile on it and have a special type.\", ex.getMessage());\n }\n }",
"@Test\n public void testFindAll_Person_TimeSlot() {\n // more or less tested in testFindEntity_Person_TimeSlot()\n }",
"@Test\n public void testSetTile()\n {\n try\n {\n Square s = new Square();\n\n s.setTile(Tile.E); // Add a tile\n\n assertEquals(Tile.E, s.getTile()); // Check the tile is now on the square\n assertTrue(s.isOccupied()); // Check the status is now true\n }\n catch(Exception ex)\n {\n fail(\"No exception should be thrown when setting a Tile onto the square.\");\n }\n }",
"public void testNewBattleStar() {\n\t\tGame game = new Game(5, \"\");\n\t\t\n\t\t//Method being tested\n\t\tgame.newBattleStar();\n\t\t\n\t\t//Check outcome; \n\t\tEnemyShip actual = game.getAllEnemys().iterator().next();\n\t\tBattleStar expected = new BattleStar(game.getTheGrid());\n\t\t\n\t\tassertTrue(actual.getClass() == expected.getClass());\n\t}",
"@Test\n\t public void test002() {\n\t\tFloor newFloor = new Floor(6);\n\t\tShelf newShelf = new Shelf(new Point(0, 5));\n \tRobot newRobot = new Robot(newFloor,newShelf,2,2,100);\n \tinventory newInventory = new inventory(newFloor, newRobot);\n\t\t \n\t\tShelf s = newInventory.finditem(\"pen\");\n\t\tassertTrue(s.Item.contains(\"pen\"));\n\t }",
"@Test\n public void getEspecieTest() {\n EspecieEntity entity = especieData.get(0);\n EspecieEntity resultEntity = especieLogic.getSpecies(entity.getId());\n Assert.assertNotNull(resultEntity);\n Assert.assertEquals(entity.getId(), resultEntity.getId());\n Assert.assertEquals(entity.getNombre(), resultEntity.getNombre());\n }",
"public void testNewBattleShooter() {\n\t\tGame game = new Game(5, \"\");\n\t\t\n\t\t//Method being tested\n\t\tgame.newBattleShooter();\n\t\t\n\t\t//Check outcome; \n\t\tEnemyShip actual = game.getAllEnemys().iterator().next();\n\t\tBattleShooter expected = new BattleShooter(game.getTheGrid());\n\t\t\n\t\tassertTrue(actual.getClass() == expected.getClass());\n\t}",
"@Test\n public void evaluate() {\n Circle circle = new BlueCircle();\n\n Square square = new RedSquare();\n\n assertNotNull(\"Circle object is not created!\", circle);\n\n circle.applyColor();\n\n assertNotNull(\"Square object is not created!\", circle);\n\n square.applyColor();\n }",
"public void testSquareConstructor(int x, int y)\n {\n String fb = \"\";\n Square square = new Square(x, y);\n if (square.getxPosition() != x)\n {\n fb += \"Fail in TestPrelab2.\\n\";\n fb += \"Square parameter constructor improperly set xPosition.\\n\";\n fb += \"Square square = new Square(\" + x + \",\" + y + \");\\n\";\n fb += \"did not set xPosition to \" + x + \".\\n\";\n fail(fb);\n }\n \n if (square.getyPosition() != y)\n {\n fb += \"Fail in TestPrelab2.\\n\";\n fb += \"Square parameter constructor improperly set xPosition.\\n\";\n fb += \"Square square = new Square(\" + x + \",\" + y + \");\\n\";\n fb += \"did not set yPosition to \" + y + \".\\n\";\n fail(fb);\n }\n \n if (!square.getColor().equals(\"black\"))\n {\n fb += \"Fail in TestPrelab2.\\n\";\n fb += \"Square parameter constructor improperly set Color.\\n\";\n fb += \"Check lab documentation for proper color.\\n\";\n fail(fb); \n }\n \n if (square.getSize() != 5)\n {\n fb += \"Fail in TestPrelab2.\\n\";\n fb += \"Square parameter constructor improperly set size.\\n\";\n fb += \"Check lab documentation for proper size.\\n\";\n fail(fb); \n }\n \n if (!square.isIsVisible() || !square.isMvr())\n {\n fb += \"Fail in TestPrelab2.\\n\";\n fb += \"Square parameter constructor did not make the square \" \n + \"visible correctly.\\n\";\n fb += \"Constructor should run makeVisible().\\n\";\n fb += \"Check lab documentation.\\n\";\n fail(fb); \n }\n }",
"@Test\n\tpublic void testIfKingIsOnSpecialSquare()\n\t{\n\t\tData d = new Data();\n\t\tassertTrue(d.isKingOnSpecialSquare(11));\n\t\tassertTrue(d.isKingOnSpecialSquare(1));\n\t\tassertTrue(d.isKingOnSpecialSquare(111));\n\t\tassertTrue(d.isKingOnSpecialSquare(121));\n\t}",
"@Test\n\tpublic void validOutsideSquare() {\n\t\tGameState gameState = new GameState(1, \"assets/maps/map.json\");\n\t\tWalkableSquare square = new WalkableSquare(false, null, null, null, null);\n\t\tLocation location = new Location(0, 0);\n\t\tgameState.setSquare(location, square);\n\t\tassertTrue(gameState.isOutside(location));\n\t}",
"@Test\n\tpublic void ValidSetSquare_1() {\n\t\tGameState gameState = new GameState(1, \"assets/maps/map.json\");\n\t\tSquare square = gameState.setSquare(new Location(0, 0), new BlankSquare());\n\t\tassertNotNull(\"Shouldn't be null\", square);\n\t}",
"@Test\r\n public void Test008MakeLiveCell()\r\n {\r\n\r\n assertTrue(gol.makeLiveCell(3, 4));\r\n\r\n }",
"@Test\n\tpublic void testNormalPuzzleGeneration() {\n\t}",
"@Test\n public void testEffectEntity() {\n // TODO: test EffectEntity\n }",
"@Test\n public void testNewEntity() throws Exception {\n\n }",
"@Test\n public void testRandomPiece() {\n System.out.println(\"randomPiece\");\n Player instance = new Player(PlayerColor.WHITE, \"\");\n Piece result = instance.randomPiece();\n\n assertFalse(instance.getPieces().contains(result));\n\n }",
"@Test\n public void typeTest() {\n assertTrue(red_piece.getType() == Piece.Type.SINGLE);\n red_piece.king();\n assertTrue(red_piece.getType() == Piece.Type.KING);\n assertTrue(white_piece.getType() == Piece.Type.SINGLE);\n }",
"@Override\n public void testGetAllObjects() {\n }",
"public void testCheckPlrSquare() {\n\t\tGame game = new Game(5, \"\");\n\t\t//Will create 3 enemyShips and retrieve test values after each one is added and method run\n\t\tBattleStar b1 = new BattleStar(game.getTheGrid());\n\t\tBattleStar b2 = new BattleStar(game.getTheGrid());\n\t\tBattleStar b3 = new BattleStar(game.getTheGrid());\n\t\t\n\t\t//Case: 2\n\t\tgame.getTheGrid().put(0, 0, b1);\n\t\tgame.getAllEnemys().add(b1);\n\t\tgame.checkPlrSquare();\n\t\tboolean case2expected = game.getAllEnemys().contains(b1);\n\t\t\n\t\t//default: (i.e. more than two enemy ships)\n\t\tgame.getTheGrid().put(0, 0, b2);\n\t\tgame.getTheGrid().put(0, 0, b3);\n\t\tgame.checkPlrSquare();\n\t\tboolean actualDefault = game.isGameOver(); \n\t\t\n\t\t//Check outcome; Ideally more scenarios would be tested\n\t\tassertTrue(actualDefault && !case2expected);\n\t}",
"@Test\n public void testGetLivePointSuper() {\n System.out.println(\"getLivePoint\");\n Enemy instance = new SuperEnemy(new Coordinates(90,90));\n int expResult = 2;\n int result = instance.getLivePoint();\n assertEquals(expResult, result);\n }",
"@Override\r\n public void ontTest( OntModel m ) throws Exception {\r\n Profile prof = m.getProfile();\r\n OntClass A = m.createClass( NS + \"A\" );\r\n Individual x = m.createIndividual( A );\r\n Individual y = m.createIndividual( A );\r\n Individual z = m.createIndividual( A );\r\n\r\n x.addSameAs( y );\r\n assertEquals( \"Cardinality should be 1\", 1, x.getCardinality( prof.SAME_AS() ) );\r\n assertEquals( \"x should be the same as y\", y, x.getSameAs() );\r\n assertTrue( \"x should be the same as y\", x.isSameAs( y ) );\r\n\r\n x.addSameAs( z );\r\n assertEquals( \"Cardinality should be 2\", 2, x.getCardinality( prof.SAME_AS() ) );\r\n iteratorTest( x.listSameAs(), new Object[] {z,y} );\r\n\r\n x.setSameAs( z );\r\n assertEquals( \"Cardinality should be 1\", 1, x.getCardinality( prof.SAME_AS() ) );\r\n assertEquals( \"x should be same indiv. as z\", z, x.getSameAs() );\r\n\r\n x.removeSameAs( y );\r\n assertEquals( \"Cardinality should be 1\", 1, x.getCardinality( prof.SAME_AS() ) );\r\n x.removeSameAs( z );\r\n assertEquals( \"Cardinality should be 0\", 0, x.getCardinality( prof.SAME_AS() ) );\r\n }",
"@Test \r\n\tvoid testGenerateSquadsShouldPass() {\r\n\t\tModel dataModel = new Model();\r\n\t\t\r\n\t\tdataModel.generateSquads();\r\n\t\t\r\n\t\tArrayList<Squad> squads = dataModel.getSquads();\r\n\t\t\r\n\t\tint size = squads.size();\r\n\t\t\r\n\t\tassertNotEquals(0, size);\r\n\t}",
"@Override\r\n\t\t\tpublic void test() {\n\t\t\t}",
"@Test\r\n public void getSalaTest() \r\n {\r\n SalaEntity entity = data.get(0);\r\n SalaEntity resultEntity = salaLogic.getSala(data.get(0).getId());\r\n Assert.assertNotNull(resultEntity);\r\n Assert.assertEquals(entity.getId(), resultEntity.getId());\r\n Assert.assertEquals(resultEntity.getNumero(), entity.getNumero());\r\n }",
"@Test\n public void testEditSuperPower() throws Exception {\n Superpower sp1 = new Superpower();\n sp1.setSuperPowerName(\"Ice Power\");\n sp1.setSuperPowerDescription(\"Control the elements of ice\"); \n \n Superpower sp2 = new Superpower();\n sp2.setSuperPowerName(\"Fire Power\");\n sp2.setSuperPowerDescription(\"Control the elements of fire\");\n \n Superpower sp1fromDao = dao.addSuperpower(sp1);\n Superpower sp2fromDao = dao.addSuperpower(sp2);\n \n assertEquals(sp1,sp1fromDao);\n assertEquals(sp2,sp2fromDao);\n \n sp2.setSuperPowerName(\"Earth Power\");\n sp2fromDao = dao.editSuperPower(sp2);\n \n assertEquals(sp2,sp2fromDao);\n \n }",
"@Test\npublic void testCreateQueryForClazzHql() throws Exception { \n//TODO: Test goes here... \n}",
"@Test\n\tpublic void test() {\n\t\t// CHECKSTYPE:OFF\n\n\t\t// Test the addPlayer(Player player) method\n\t\tPlayer player1 = new Player(\"Iris\");\n\t\tPlayer player2 = new Player(\"Emily\");\n\t\tPlayer player3 = new Player(\"Jason\");\n\t\tPlayer player4 = new Player(\"Rain\");\n\t\tPlayer player5 = new Player(\"Mandy\");\n\t\tscrabbleSystem.addPlayer(player1);\n\t\tscrabbleSystem.addPlayer(player2);\n\t\tscrabbleSystem.addPlayer(player3);\n\t\tscrabbleSystem.addPlayer(player4);\n\t\tscrabbleSystem.addPlayer(player5);\n\t\tList<Player> playersList = scrabbleSystem.getPlayers();\n\t\tassertEquals(4, playersList.size());\n\n\t\t// Test the startNewGame() method\n\t\t/**\n\t\t * The first Turn -- place some tiles on the board\n\t\t */\n\t\tscrabbleSystem.startNewGame();\n\t\tPlayer currentPlayer1 = scrabbleSystem.getCurrentPlayer();\n\t\tSystem.out.println(currentPlayer1.getName());\n\t\tassertEquals(7, currentPlayer1.getTileList().size());\n\t\tList<SpecialTile> specialStore = scrabbleSystem.getSpecialStore();\n\t\tassertEquals(5, specialStore.size());\n\t\tassertEquals(\"Boom\", specialStore.get(0).getName());\n\t\tassertEquals(\"NegativePoint\", specialStore.get(1).getName());\n\t\tassertEquals(\"RetrieveOrder\", specialStore.get(2).getName());\n\t\tassertEquals(\"ReverseOrder\", specialStore.get(3).getName());\n\t\tassertEquals(70, scrabbleSystem.getLetterBag().getNumber());\n\n\t\t// Test the playMove(Move move) method\n\t\tSquare square1 = scrabbleSystem.getBoard().getSquare(7, 7);\n\t\tSquare square2 = scrabbleSystem.getBoard().getSquare(8, 7);\n\t\tSquare square3 = scrabbleSystem.getBoard().getSquare(9, 7);\n\n\t\tTile tile1 = currentPlayer1.getTileList().get(0);\n\t\tTile tile2 = currentPlayer1.getTileList().get(1);\n\t\tTile tile3 = currentPlayer1.getTileList().get(2);\n\n\t\tint scoreSum1 = tile1.getValue() + tile2.getValue() + tile3.getValue();\n\t\t// The first Player\n\t\tMove move = scrabbleSystem.getMove();\n\t\tmove.addTile(square2, tile2);\n\t\tmove.addTile(square3, tile3);\n\n\t\tscrabbleSystem.playMove(move);\n\t\tassertEquals(7, currentPlayer1.getTileList().size());\n\t\tassertEquals(70, scrabbleSystem.getLetterBag().getNumber());\n\n\t\tmove.addTile(square1, tile1);\n\t\tscrabbleSystem.playMove(move);\n\t\tassertEquals(7, currentPlayer1.getTileList().size());\n\t\tassertEquals(67, scrabbleSystem.getLetterBag().getNumber());\n\n\t\tassertTrue(scrabbleSystem.getBoard().getSquare(7, 7).isOccuppied());\n\t\tassertTrue(scrabbleSystem.getBoard().getSquare(8, 7).isOccuppied());\n\t\tassertTrue(scrabbleSystem.getBoard().getSquare(9, 7).isOccuppied());\n\t\tassertFalse(scrabbleSystem.getBoard().getSquare(10, 7).isOccuppied());\n\t\tassertFalse(scrabbleSystem.isGameOver());\n\t\t// check player's score\n\t\tassertEquals(scoreSum1, currentPlayer1.getScore());\n\n\t\tPlayer challengePlayer1 = playersList.get(0);\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tPlayer playerTmp = playersList.get(i);\n\t\t\tif (playerTmp != currentPlayer1) {\n\t\t\t\tchallengePlayer1 = playerTmp;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// if there is no player invoke a challenge\n\t\tscrabbleSystem.updateOrder();\n\n\t\t/**\n\t\t * The secord turn -- place some tiles on the board and challenges by\n\t\t * another player\n\t\t */\n\t\tPlayer currentPlayer2 = scrabbleSystem.getCurrentPlayer();\n\t\tassertNotEquals(currentPlayer1, currentPlayer2);\n\t\tSystem.out.println(currentPlayer1.getName());\n\t\tSystem.out.println(currentPlayer2.getName());\n\n\t\tSquare square4 = scrabbleSystem.getBoard().getSquare(8, 6);\n\t\tSquare square5 = scrabbleSystem.getBoard().getSquare(8, 8);\n\t\tSquare square6 = scrabbleSystem.getBoard().getSquare(8, 9);\n\t\tSquare square7 = scrabbleSystem.getBoard().getSquare(7, 8);\n\n\t\tTile tile4 = currentPlayer2.getTileList().get(0);\n\t\tTile tile5 = currentPlayer2.getTileList().get(1);\n\t\tTile tile6 = currentPlayer2.getTileList().get(2);\n\n\t\tMove move2 = scrabbleSystem.getMove();\n\t\tassertEquals(0, move2.getTileMap().size());\n\t\tmove2.addTile(square4, tile4);\n\t\tmove2.addTile(square5, tile5);\n\t\tmove2.addTile(square7, tile6);\n\t\t// check invalid move\n\t\tscrabbleSystem.playMove(move2);\n\n\t\t// check invalid move\n\t\tmove2.clearMove();\n\t\tmove2.addTile(square4, tile4);\n\t\tmove2.addTile(square6, tile6);\n\t\tscrabbleSystem.playMove(move2);\n\n\t\t// make valid move\n\t\tmove2.clearMove();\n\t\tmove2.addTile(square4, tile4);\n\t\tmove2.addTile(square5, tile5);\n\t\tmove2.addTile(square6, tile6);\n\t\tscrabbleSystem.playMove(move2);\n\n\t\tint scoreSum2 = tile2.getValue() + tile4.getValue() * 2 + tile5.getValue() * 2 + tile6.getValue();\n\t\tassertEquals(scoreSum2, currentPlayer2.getScore());\n\n\t\t// get the challenge player\n\t\tPlayer challengePlayer2 = playersList.get(0);\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tPlayer playerTmp = playersList.get(i);\n\t\t\tif (playerTmp != currentPlayer1) {\n\t\t\t\tchallengePlayer2 = playerTmp;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tassertEquals(64, scrabbleSystem.getLetterBag().getNumber());\n\n\t\tscrabbleSystem.challenge(challengePlayer2);\n\t\tscrabbleSystem.updateOrder();\n\t\tassertEquals(67, scrabbleSystem.getLetterBag().getNumber());\n\t\tassertFalse(square4.isOccuppied());\n\t\tassertFalse(square5.isOccuppied());\n\t\tassertFalse(square6.isOccuppied());\n\n\t\t/**\n\t\t * The third turn -- buy a Boom special tile and pass this turn\n\t\t */\n\n\t\tPlayer currentPlayer3 = scrabbleSystem.getCurrentPlayer();\n\t\tMove move3 = scrabbleSystem.getMove();\n\t\tcurrentPlayer3.addScore(100);\n\t\tscrabbleSystem.buySpecialTile(\"Boom\");\n\t\tassertEquals(80, currentPlayer3.getScore());\n\n\t\tSquare square8 = scrabbleSystem.getBoard().getSquare(8, 8);\n\t\tSquare square9 = scrabbleSystem.getBoard().getSquare(9, 8);\n\t\tSquare square10 = scrabbleSystem.getBoard().getSquare(10, 8);\n\t\tSquare square11 = scrabbleSystem.getBoard().getSquare(10, 7);\n\n\t\tTile tile8 = currentPlayer3.getTileList().get(0);\n\t\tTile tile9 = currentPlayer3.getTileList().get(1);\n\t\tTile tile10 = currentPlayer3.getTileList().get(2);\n\t\tSpecialTile specialTile = currentPlayer3.getSpecialTiles().get(\"Boom\").get(0);\n\t\tmove3.addTile(square8, tile8);\n\t\tmove3.addTile(square9, tile9);\n\t\tmove3.addTile(square10, tile10);\n\t\tmove3.addSpecialTile(specialTile, square11);\n\n\t\tint scoreSum3 = 2 * tile8.getValue() + tile9.getValue() + tile10.getValue() + 2 * tile8.getValue()\n\t\t\t\t+ tile2.getValue() + tile3.getValue() + tile9.getValue() + 80;\n\t\tscrabbleSystem.playMove(move3);\n\t\tassertEquals(scoreSum3, currentPlayer3.getScore());\n\t\tscrabbleSystem.challenge(currentPlayer2);\n\t\tassertEquals(67, scrabbleSystem.getLetterBag().getNumber());\n\t\tassertTrue(square11.hasSpecialTile());\n\n\t\t/**\n\t\t * The fourth turn -- buy a NegativePoint special tile and place it on\n\t\t * the board\n\t\t */\n\t\tPlayer currentPlayer4 = scrabbleSystem.getCurrentPlayer();\n\t\tcurrentPlayer4.addScore(10);\n\t\tscrabbleSystem.buySpecialTile(\"NegativePoint\");\n\t\tassertEquals(1, currentPlayer4.getSpecialTiles().get(\"NegativePoint\").size());\n\n\t\tcurrentPlayer4.addScore(50);\n\t\tSystem.out.println(currentPlayer4.getScore());\n\t\tscrabbleSystem.buySpecialTile(\"NegativePoint\");\n\t\tint scoreSum4 = currentPlayer4.getScore();\n\n\t\tMove move4 = scrabbleSystem.getMove();\n\t\tSpecialTile specialTile2 = currentPlayer4.getSpecialTiles().get(\"NegativePoint\").get(0);\n\n\t\tSquare square12 = scrabbleSystem.getBoard().getSquare(11, 7);\n\t\tmove4.addSpecialTile(specialTile2, square12);\n\n\t\tscrabbleSystem.pass(move4);\n\t\tassertEquals(scoreSum4, currentPlayer4.getScore());\n\t\tassertTrue(square12.hasSpecialTile());\n\t\tassertEquals(1, currentPlayer4.getSpecialTiles().get(\"NegativePoint\").size());\n\n\t\t/**\n\t\t * The fifth turn -- invork the Boom and NegativePoint special tiles at\n\t\t * the same time\n\t\t */\n\t\tPlayer currentPlayer5 = scrabbleSystem.getCurrentPlayer();\n\t\tMove move5 = scrabbleSystem.getMove();\n\t\tSquare square13 = scrabbleSystem.getBoard().getSquare(10, 7);\n\t\tSquare square14 = scrabbleSystem.getBoard().getSquare(11, 7);\n\t\tSquare square15 = scrabbleSystem.getBoard().getSquare(12, 7);\n\t\tSquare square16 = scrabbleSystem.getBoard().getSquare(13, 7);\n\t\tSquare square17 = scrabbleSystem.getBoard().getSquare(14, 7);\n\n\t\tTile tile13 = currentPlayer5.getTileList().get(0);\n\t\tTile tile14 = currentPlayer5.getTileList().get(1);\n\t\tTile tile15 = currentPlayer5.getTileList().get(2);\n\t\tTile tile16 = currentPlayer5.getTileList().get(3);\n\t\tTile tile17 = currentPlayer5.getTileList().get(4);\n\n\t\tmove5.addTile(square13, tile13);\n\t\tmove5.addTile(square14, tile14);\n\t\tmove5.addTile(square15, tile15);\n\t\tmove5.addTile(square16, tile16);\n\t\tmove5.addTile(square17, tile17);\n\t\tscrabbleSystem.playMove(move5);\n\t\tassertFalse(square13.isOccuppied());\n\t\tassertFalse(square14.isOccuppied());\n\t\tassertFalse(square15.isOccuppied());\n\t\tassertFalse(square2.isOccuppied());\n\t\tassertFalse(square3.isOccuppied());\n\t\tassertTrue(square1.isOccuppied());\n\t\tscrabbleSystem.updateOrder();\n\n\t\tint scoreSum5 = scoreSum1 - 3 * (tile13.getValue() + tile14.getValue() + tile1.getValue());\n\t\tSystem.out.println(scoreSum5);\n\n\t\t/**\n\t\t * The sixth turn -- The player exchanges some tiles\n\t\t */\n\t\tPlayer currentPlayer6 = scrabbleSystem.getCurrentPlayer();\n\t\tList<Tile> tiles = new ArrayList<>();\n\t\tTile tile18 = currentPlayer6.getTileList().get(0);\n\t\tTile tile19 = currentPlayer6.getTileList().get(1);\n\t\tTile tile20 = currentPlayer6.getTileList().get(2);\n\t\ttiles.add(tile18);\n\t\ttiles.add(tile19);\n\t\ttiles.add(tile20);\n\t\tscrabbleSystem.exchangeTile(tiles);\n\t\tassertEquals(7, currentPlayer6.getTileList().size());\n\n\t\t/**\n\t\t * Get winner\n\t\t */\n\n\t\tList<Player> playersWinner = scrabbleSystem.getWinner();\n\t\tassertEquals(currentPlayer3.getName(), playersWinner.get(0).getName());\n\t}",
"@Test\n public void testNewEntity_0args() {\n // newEntity() is not implemented!\n }",
"@Test\n public void testMoveToPlayer(){\n \n }",
"@Test\n\tpublic void testSquare() {\n\t\tdouble tmpRndVal = 0.0;\n\t\tdouble expResult = 0.0;\n\t\t\n\t\t//testing with negative numbers\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\ttmpRndVal = doubleRandomNegativeNumbers();\n\t\t\texpResult = Math.sqrt(tmpRndVal);\n\t\t\tassertEquals(ac.square(tmpRndVal), expResult, 0);\n\t\t}\n\t\t\n\t\t//testing with positive numbers\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\ttmpRndVal = doubleRandomPositiveNumbers(); \n\t\t\texpResult = Math.sqrt(tmpRndVal);\n\t\t\tassertEquals(ac.square(tmpRndVal), expResult, 0);\n\t\t}\n\t\t\n\t\t//testing with zero\n\t\tdouble zero = 0.0;\n\t\t\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\texpResult = Math.sqrt(zero);\n\t\t\tassertEquals(ac.square(zero), expResult, 0);\n\t\t}\n\t\t\n\t}",
"@Test\n\tpublic void testIfKingIsNotOnSpecialSquare()\n\t{\n\t\tData d = new Data();\n\t\tassertFalse(d.isKingOnSpecialSquare(61));\n\t\tassertFalse(d.isKingOnSpecialSquare(2));\n\t}",
"@Test void addIngredientBoundary()\n {\n }",
"@Test\r\n public void testBoardPosition() {\r\n BoardPosition testBoardPosition = new BoardPosition(new Point(0, 0));\r\n assertEquals(testBoardPosition.getCoordinates().x, 0);\r\n assertEquals(testBoardPosition.getCoordinates().y, 0);\r\n //\tassertEquals(testBoardPosition.getImage(), ); <-- TODO\r\n }",
"@Test(expected = IllegalArgumentException.class)\n\tpublic void tesInvalidSquare_2() {\n\t\tGameState gameState = new GameState(1, \"assets/maps/map.json\");\n\t\tgameState.getSquare(null);\n\t}",
"@Test\n public void test10() { \n Board board10 = new Board();\n board10.put(1,1,2);\n board10.put(2,2,2);\n board10.put(3,3,2);\n assertTrue(board10.checkWin());\n }",
"@Test\n public void overExample2() {\n MarbleSolitaireModel exampleBoard = new TriangleSolitaireModelImpl(1);\n assertEquals(true, exampleBoard.isGameOver());\n }",
"@Test\n public void test13() { \n Board board13 = new Board();\n board13.put(1,1,1); \n board13.put(1,2,1);\n board13.put(1,3,2);\n board13.put(2,1,2);\n board13.put(2,2,2);\n board13.put(2,3,1);\n board13.put(3,1,1);\n board13.put(3,2,1);\n board13.put(3,3,2);\n assertTrue(board13.checkTie());\n }",
"@Test\n\tpublic void testIfKingIsCaptureBySpecialSquareVert()\n\t{\n\t\tData d=new Data();\n\t\td.set(0,100);\n\t\td.set(29,89);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(89);\n\t\tassertEquals(test_arr.size(),0);\n\t}",
"@Test\n public void cardHasSuit(){\n assertEquals(Suit.CLUBS, this.card.getSuit());\n // Suit.Clubs expected, referencing this.card instance from method getSuit in in Card class\n }",
"@Test\n void area_square_test_1(){\n double area = calc.areaSquare(10);\n assert area == 100;\n }",
"@Test\n public void test11() { \n Board board11 = new Board();\n board11.put(1,3,1);\n board11.put(2,3,1);\n board11.put(3,3,1);\n assertTrue(board11.checkWin());\n }",
"@Test\r\n void testAddPoints() {\r\n AlwaysDefect testStrat = new AlwaysDefect();\r\n testStrat.addPoints(2);\r\n int points = testStrat.getPoints();\r\n assertEquals(points, 2, \"addPoints or getPoints not functioning correctly\");\r\n }",
"@Test\n public void test12() { \n Board board12 = new Board();\n board12.put(1,3,1);\n \n assertFalse(board12.checkWin());\n }",
"@Test\n\tpublic void testInvalidSquare_1() {\n\t\tGameState gameState = new GameState(1, \"assets/maps/map.json\");\n\t\tSquare square = gameState.getSquare(new Location(-1, -1));\n\t\tassertNull(\"Should be null\", square);\n\t}",
"@Test\r\n\tpublic void driverRatioSponsorshipsStatus() {\r\n\r\n\t\tfinal Object testingData[][] = {\r\n\r\n\t\t\t// testingData[i][0] -> usernamed of the logged Actor.\r\n\t\t\t// testingData[i][1] -> expected Exception.\r\n\r\n\t\t\t{\r\n\t\t\t\t// + 1) An administrator displays the statistics\r\n\t\t\t\t\"admin\", null\r\n\t\t\t}, {\r\n\t\t\t\t// - 2) An unauthenticated actor tries to display the statistics\r\n\t\t\t\tnull, IllegalArgumentException.class\r\n\t\t\t}, {\r\n\t\t\t\t// - 3) A visitor displays the statistics\r\n\t\t\t\t\"visitor1\", IllegalArgumentException.class\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfor (int i = 0; i < testingData.length; i++) {\r\n\r\n\t\t\tthis.startTransaction();\r\n\r\n\t\t\tthis.templateRatioSponsorshipsStatus((String) testingData[i][0], (Class<?>) testingData[i][1]);\r\n\r\n\t\t\tthis.rollbackTransaction();\r\n\t\t\tthis.entityManager.clear();\r\n\t\t}\r\n\r\n\t}",
"@Test\n public void testFindAll_Event_Job() {\n // more or less tested in testFindEntity_Event_Job()\n }",
"@Test\n\tpublic void testGetPieces() {\n\t\tPiece[] pieces = Piece.getPieces();\n\n assertTrue(pieces[Piece.S1].equals(s));\n assertTrue(pieces[Piece.L2].equals(l2));\n assertTrue(pieces[Piece.SQUARE].equals(square));\n assertTrue(pieces[Piece.PYRAMID].equals(pyr1));\n \n assertTrue(pieces[Piece.S1].fastRotation().equals(sRotated));\n assertFalse(pieces[Piece.S1].fastRotation().equals(s));\n \n assertTrue(pieces[Piece.L2].fastRotation().equals(l2Rotated));\n assertTrue(pieces[Piece.PYRAMID].fastRotation().equals(pyr2));\n \n\t}",
"@Test\n public void updateEspecieTest() {\n EspecieEntity entity = especieData.get(0);\n EspecieEntity pojoEntity = factory.manufacturePojo(EspecieEntity.class);\n pojoEntity.setId(entity.getId());\n especieLogic.updateSpecies(pojoEntity.getId(), pojoEntity);\n EspecieEntity resp = em.find(EspecieEntity.class, entity.getId());\n Assert.assertEquals(pojoEntity.getId(), resp.getId());\n Assert.assertEquals(pojoEntity.getNombre(), resp.getNombre());\n }",
"@Test\n public void test9() { \n Board board9 = new Board();\n board9.put(1,1,2);\n board9.put(1,2,2);\n board9.put(1,3,2);\n assertTrue(board9.checkWin());\n }",
"public void testAll() {\r\n // Test dao.add\r\n ExtraPart part = new ExtraPart();\r\n part.setAttachPoint(new Coordinate(\"312,94\"));\r\n part.setImage(new ImageInfo(\"images/parts/extrapart1.png\",320,240));\r\n\r\n assertEquals(-1, part.getId());\r\n assertTrue(dao.add(part));\r\n assertTrue(part.getId() >= 0);\r\n\r\n // Test dao.getAll\r\n ArrayList<ExtraPart> parts = dao.getAll();\r\n assertEquals(1, parts.size());\r\n ExtraPart copy = parts.iterator().next();\r\n assertEquals(part.getId(), copy.getId());\r\n assertEquals(part.getAttachPoint(), copy.getAttachPoint());\r\n assertEquals(part.getImage(), copy.getImage());\r\n }",
"@Test\n public void pictureSingleTest() {\n // TODO: test pictureSingle\n }",
"@Test\n public void encodeSquaresXYTest() {\n Square square1 = new BasicSquare(0, 1);\n Square square2 = new BasicSquare(2, 2);\n Square square3 = new SpawnSquare(1, 1);\n ArrayList<Square> squaresList = new ArrayList<>();\n squaresList.add(square1);\n squaresList.add(square2);\n squaresList.add(square3);\n int[] squareX = Encoder.encodeSquareTargetsX(squaresList);\n int[] squareY = Encoder.encodeSquareTargetsY(squaresList);\n int[] expectedSquareX = new int[]{0, 2, 1};\n int[] expectedSquareY = new int[]{1, 2, 1};\n for (int i = 0; i < squareX.length; i++) {\n Assert.assertEquals(expectedSquareX[i], squareX[i]);\n Assert.assertEquals(expectedSquareY[i], squareY[i]);\n }\n }",
"@Test\n public void buttonOne_initiates_game_matching_shapes() {\n\n }",
"@Test\n public void shouldTestBoardStatus(){\n\n }",
"@Test\n\tpublic void invalidOutsideSquare_2() {\n\t\tGameState gameState = new GameState(1, \"assets/maps/map.json\");\n\t\tSquare square = new BlankSquare();\n\t\tLocation location = new Location(0, 0);\n\t\tgameState.setSquare(location, square);\n\t\tassertFalse(gameState.isOutside(location));\n\t}",
"@Test\n public void testRenderWorld(){\n ArrayList<GameObject> gameObjects = new ArrayList<GameObject>();\n Wall wall = new Wall(0, 0);\n Wall spyWall = Mockito.spy(wall);\n gameObjects.add(spyWall);\n Level level2 = new Level(gameObjects);\n Level spyLevel = Mockito.spy(level2);\n renderer.setLevel(spyLevel);\n renderer.renderWorld(spyLevel);\n verify(spyLevel).getObjects();\n// TODO: cant because method is final, remove final?\n// Mockito.verify(spyWall).draw(batch);\n }",
"@Test\n public void fightEnemyBossTest() {\n\n }",
"@Test\n public void shouldTestBoardSetMove(){\n }",
"@Test\n\tpublic void testValidate() throws Exception {\n\t\tSystem.out.println(\"validate\");\n\t\tso.validate(entity);\n\t}",
"Square getSquare(int x, int y);",
"@Test\n public void testLocateManager() {\n System.out.println(\"locateManager\");\n int x = 0;\n int y = 0; \n //instance.locateManager(x, y);\n \n }",
"@Test\n public void testGiantComponent()\n {\n assertEquals(MarkovModel.util.giantComponent(P1), giant1);\n assertEquals(MarkovModel.util.giantComponent(P2), giant2);\n assertEquals(MarkovModel.util.giantComponent(P3), giant3);\n }",
"@Test\n public void winGame() {\n }",
"@Test\n public void drawShouldRenderTextureAtCurrentXposYpos(){\n squadMember.setPosition(2f, 3f);\n squadMember.setSize(5f, 6f);\n\n squadMember.draw(mockBatch, 1f);\n\n verify(mockBatch).draw(mockTexture, 2f, 3f, 5f, 6f);\n }",
"@Test\n public void testGetOneProduct() {\n }",
"@Test\n public void testGetAllSightings() {\n Location l = new Location();\n l.setNameOfResidence(\" Midtown School of Science and Technology\");\n l.setAddress(\"Forest Hills\");\n l.setLatitude(BigDecimal.ONE);\n l.setLongitude(BigDecimal.ONE);\n l.setDescription(\"I got... homework \");\n lDao.addLocation(l);\n\n Organization o = new Organization();\n o.setName(\"Avengers\");\n o.setDescription(\"The Avengers. It's what we call ourselves, \"\n + \"sort of like a team. 'Earth's Mightiest Heroes' type of thing.\");\n o.setAddress(\"890 Fifth Avenue, Manhattan, New York City\");\n o.setContactInfo(\"212-576-4000\");\n oDao.addOrganization(o);\n\n Superperson sp = new Superperson();\n sp.setName(\"Spider-Man\");\n sp.setPower(\"Superhuman strength, reflexes, and balance. Ability to \"\n + \"cling to majority of surfaces. Subconscious ability to sense \"\n + \"everything in his surroundings, AKA- 'spidey-sense'.\");\n sp.setDescription(\"A shy kid\");\n List<Organization> organizations = new ArrayList();\n organizations.add(o);\n sp.setOrganizations(organizations);\n spDao.addSuperperson(sp);\n\n Sighting s = new Sighting();\n s.setDescription(\"It's a bird... It's a plane... It's Superman!\");\n s.setDateSeen(LocalDate.now());\n s.setLocation(l);\n s.setSp(sp);\n s.setFileName(\"ironman\");\n s.setTitle(\"IRON MAN\");\n sDao.addSighting(s);\n\n assertEquals(1, sDao.getAllSightings().size());\n }",
"@Test\n public void testAdding(){\n fakeCoord.add(new Point2D.Double(0.10,0.20));\n VecFile.AddCommand(VecCommandFactory.GetShapeCommand(VecCommandType.RECTANGLE, fakeCoord));\n assertEquals(VecCommandType.RECTANGLE, VecFile.GetLastCommand().GetType());\n }",
"@Test\n\tpublic void invalidOutsideSquare_1() {\n\t\tGameState gameState = new GameState(1, \"assets/maps/map.json\");\n\t\tWalkableSquare square = new WalkableSquare(true, null, null, null, null);\n\t\tLocation location = new Location(0, 0);\n\t\tgameState.setSquare(location, square);\n\t\tassertFalse(gameState.isOutside(location));\n\t}",
"@Test\n\tpublic void testGetters() {\n\t\tEngine engine = new Engine(20);\n\t\tCoordinate point = new Coordinate(5,5);\n\t\tCoordinate playerLocation = engine.getMoveableObject(0).getLocation();\n\t\tint playerX = playerLocation.getX();\n\t\tint playerY = playerLocation.getY();\n\t\tassertEquals(\"failure - didn't create coordinate x-val\", 5, point.getX(), 0.0);\n\t\tassertEquals(\"failure - didn't create coordinate y-val\", 5, point.getY(), 0.0);\n\t\tassertEquals(\"failure - didn't get player's x coordinate correctly\", 3, playerX, 0.0);\n\t\tassertEquals(\"failure - didn't get player's y coordinate correctly\", 3, playerY, 0.0);\n\t\t}",
"@Test\n public void isONGroundTestTrue(){\n TileMap tileMap = new TileMap(24, 24, new byte[][]{{0,0}},new byte[][]{{1,1},{1,1},{1,1},{1,1}}, tilepath);\n Rect cBox = new Rect(2,2,24,22);\n assertEquals(true, tileMap.isOnGround(cBox));\n }",
"@Test\n public void testFindEntity_Person_TimeSlot() throws Exception {\n // check whether the database is set-up as expected.\n Person p = Manager.getPersonCollection().findEntity(1);\n assertNotNull(\"Bad test data?\", p);\n List<Allocation> pa = p.getAllocationList();\n assertFalse(\"Bad test data?\", pa.isEmpty());\n Allocation a = pa.get(0);\n Event e = a.getEvent();\n assertNotNull(\"Bad test data?\", e);\n TimeSlot t = e.getTimeSlot();\n assertNotNull(\"Bad test data?\", t);\n\n // Here is the statement that we want to test:\n Allocation result = Manager.getAllocationCollection().findEntity(p, t);\n assertNotNull(result);\n assertTrue(Objects.equals(result, a));\n\n }",
"@Test\n public void updateContact() {\n }",
"@Test\n public void testGetLugarInteres() {\n LugaresInteresEntity lugar = new LugaresInteresEntity();\n lugar.setId(new Long(23));\n HospedajeLugarEntity hospedajeL = new HospedajeLugarEntity();\n hospedajeL.setLugarInteres(lugar);\n Assert.assertTrue(hospedajeL.getLugarInteres().getId().equals(lugar.getId()));\n }",
"@Test\n void getByIdSuccess() {\n User retrievedUser = (User) dao.getById(1);\n //User retrievedUser = dao.getById(1);\n assertEquals(\"Dave\", retrievedUser.getFirstName());\n assertEquals(\"Queiser\", retrievedUser.getLastName());\n }",
"@Test\n\tpublic void testInsertObj() {\n\t}",
"@Test\n public void testConstructor()\n {\n try\n {\n Square s = new Square();\n\n // Test the properties of s\n assertEquals(Square.squareType.REGULAR, s.getType());\n assertFalse(s.isOccupied());\n }\n catch(Exception ex)\n {\n fail(\"No exception should be thrown when a square is constructed normally.\");\n }\n }",
"@Test\n public void enemySustainMassiveDamage() {\n }",
"@Test\n public void testAddPiece() {\n System.out.println(\"addPiece\");\n\n Piece piece = new Piece(PlayerColor.WHITE, 3);\n Player instance = new Player(PlayerColor.WHITE, \"\");\n\n instance.addPiece(piece);\n\n assertTrue(instance.getBagContent().contains(piece));\n }",
"@Test\n\tpublic void testHardPuzzleGeneration() {\n\t}",
"@Test\n public void testSalaire() {\n Assert.assertTrue(e.calculSalaire() == 15 * 20 + e.getSalaire());\n }",
"@Test\n public void overExample1() {\n MarbleSolitaireModel exampleBoard = new TriangleSolitaireModelImpl();\n assertEquals(false, exampleBoard.isGameOver());\n }",
"@Test\n public void testCurrentSugarLevelAndChangeSugarLevel() {\n System.out.println(\"changeSugarLevel\");\n\n Sugarman instance = new Sugarman();\n instance.getSugarlevel();\n instance.changeSugarLevel(20);\n\n int result = instance.getSugarlevel();\n int expResult = 70;\n assertEquals(result, expResult);\n\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }",
"@Test\n public void singlePicTest() {\n // TODO: test singlePic\n }",
"@Test\n public void testGetSex() {\n System.out.println(\"getSex\");\n Manager instance = new Manager();\n int expResult = 0;\n int result = instance.getSex();\n assertEquals(expResult, result);\n \n fail(\"The test case is a prototype.\");\n }",
"@Test\n\tpublic void testTower()\n\t{\n\t\tassertEquals(1,tower.getNum());\n\t\tassertEquals(22,tower.getPosition().getIntAbscisse());\n\t\tassertEquals(23,tower.getPosition().getIntOrdonne());\n\t}",
"@Test\n public void testGetRoundsByGameID() {\n \n \n }",
"@Test\r\n public void ss(){\r\n playGame.play();\r\n }",
"@Test\r\n\tpublic void testGetSetSquareLocationsValidValue() {\r\n\t\tBoard board = new Board();\r\n\t\tboard.setSquareLocations(validSquareLocations);\r\n\t\tassertArrayEquals(validSquareLocations, board.getSquareLocations());\r\n\t}",
"@Test\n public void testGetHospedaje() {\n HospedajeEntity hospedaje = new HospedajeEntity();\n hospedaje.setId(new Long(23));\n HospedajeLugarEntity hospedajeL = new HospedajeLugarEntity();\n hospedajeL.setHospedaje(hospedaje);\n Assert.assertTrue(hospedajeL.getHospedaje().getId().equals(hospedaje.getId()));\n }",
"public abstract GF2nElement square();",
"@Test\n public void testPawnSide() {\n // initialize the complete chess board\n ChessBoard chessBoard = init(\"CHESS\");\n\n // compare the side of the pawn on the table to the correct side\n for (int i = 0; i < 8; ++i) {\n assertEquals(north, chessBoard.getPiece(1, i).getSide());\n assertEquals(south, chessBoard.getPiece(6, i).getSide());\n }\n }"
]
| [
"0.73239833",
"0.6546336",
"0.6542303",
"0.63555026",
"0.62573284",
"0.62056834",
"0.62026477",
"0.6144857",
"0.61333364",
"0.6126531",
"0.61243266",
"0.61000603",
"0.6087755",
"0.6083503",
"0.60760105",
"0.60610414",
"0.603814",
"0.60347646",
"0.59852964",
"0.5944171",
"0.5936734",
"0.5884303",
"0.5883681",
"0.58747536",
"0.5858643",
"0.58556664",
"0.58449036",
"0.5819255",
"0.5810984",
"0.5808635",
"0.58083904",
"0.58071584",
"0.58056456",
"0.5770426",
"0.5769205",
"0.5760346",
"0.5754305",
"0.5745262",
"0.5739673",
"0.5737149",
"0.571962",
"0.57177246",
"0.5715864",
"0.569111",
"0.56874907",
"0.5684538",
"0.5683972",
"0.56513315",
"0.56496066",
"0.56491935",
"0.564657",
"0.5645708",
"0.56263614",
"0.56226593",
"0.5612632",
"0.56116855",
"0.5598418",
"0.5596905",
"0.55967855",
"0.5594268",
"0.5592185",
"0.5592032",
"0.5589249",
"0.55851513",
"0.5583722",
"0.5580938",
"0.5579349",
"0.55763835",
"0.5560518",
"0.5558079",
"0.5556038",
"0.5554066",
"0.5550423",
"0.5549778",
"0.5546535",
"0.55448383",
"0.55351293",
"0.552667",
"0.55223966",
"0.5522052",
"0.55209386",
"0.55160743",
"0.5515927",
"0.5514182",
"0.5511065",
"0.55086446",
"0.5508156",
"0.55018413",
"0.55001515",
"0.5498669",
"0.5492003",
"0.5487959",
"0.54851586",
"0.54824036",
"0.54804033",
"0.54799294",
"0.54796565",
"0.54784346",
"0.5476385",
"0.5474806"
]
| 0.67488885 | 1 |
Test the shared methods in the level superclass. | public void testLevelShared() {
Level lvl = new Level();
assertEquals("", lvl.getLevelType());
Board brd = new Board();
lvl.setBoard(brd);
assertEquals(brd, lvl.getBoard());
int[] stars = new int[3];
stars[0] = 0;
stars[1] = 1;
stars[2] = 2;
lvl.setStars(stars);
assertEquals(stars, lvl.getStars());
lvl.setStarAt(5, 1);
assertEquals(5, lvl.getStarAt(1));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n\tpublic void testInheritance() throws Exception {\n\t\ttestWith(TestClassSubClass.getInstance());\n\t}",
"@Test\n public void atBaseTypeTest() {\n // TODO: test atBaseType\n }",
"@Override\n void performTest() {\n new Base();\n new Child();\n }",
"@Override\n void performTest() {\n new Base();\n new Child();\n }",
"@Override\n void performTest() {\n new Base();\n new Child();\n }",
"@Test\r\n public void testInheritance() throws Exception {\r\n TestHelper.assertSuperclass(instance.getClass().getSuperclass(), GetDocumentsContestAction.class);\r\n }",
"@Test\n public void test1() throws Exception {\n try {\n tester.testOnInheritanceTree(Story1, testClass);\n Assert.assertTrue(true);\n } catch (StoryTestException | WrongMethodException e) {\n Assert.fail();\n }\n }",
"@Override\r\n\t\t\tpublic void test() {\n\t\t\t}",
"@Override\n public void testTwoRequiredGroups() {\n }",
"@Override\n public void testTwoRequiredGroups() {\n }",
"@Override\n public void test() {\n \n }",
"protected void checkSubclass() {\n }",
"@Test\n public void levelsTest() {\n // TODO: test levels\n }",
"@Override\n\tpublic void test() {\n\t\t\n\t}",
"@Test\n public void whenGetSuperUnitThenReturnResult() {\n MenuUnit expected = underTestSub.getSuperUnit();\n assertThat(expected, is(underTest));\n }",
"protected void checkSubclass() {\n }",
"protected void checkSubclass() {\n }",
"protected void checkSubclass() {\n }",
"@Test\n public void testInheritance() {\n assertTrue(\n \"ClientsPrepopulatingBaseAction does not subclass BaseAction.\",\n ClientsPrepopulatingBaseAction.class.getSuperclass() == BaseAction.class);\n }",
"@Override\r\n\tpublic void method() {\n\t\tsuper.method();\r\n\t\tSystem.out.println(\"Iam in a subclass\");\r\n\t}",
"public void testNormalInheritance()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkValueInheritance(pmf,\r\n HashMap1.class,\r\n ContainerItem.class,\r\n ContainerItemChild.class);\r\n }\r\n finally\r\n {\r\n clean(HashMap1.class);\r\n clean(ContainerItem.class);\r\n }\r\n }",
"@Test\n public void test8() throws Exception {\n try {\n tester.testOnInheritanceTree(Story8, testClass);\n Assert.assertTrue(true);\n } catch (StoryTestException | WrongMethodException e) {\n Assert.fail();\n }\n }",
"@Override\n protected void checkSubclass() {\n }",
"public void testGetSubLearner()\n {\n this.testSetSubLearner();\n }",
"@Test\n public void test3() throws Exception {\n try {\n tester.testOnInheritanceTree(Story3, testClass);\n Assert.assertTrue(true);\n } catch (StoryTestException | WrongMethodException e) {\n Assert.fail();\n }\n }",
"@Override\n\tdefault void testDef() {\n\t\tTest1.super.testDef();\n\t}",
"@Override\r\n\tprotected void checkSubclass() {\n\t}",
"@Override\r\n\tprotected void checkSubclass() {\n\t}",
"@Override\r\n\tprotected void checkSubclass() {\n\t}",
"@Override\r\n\tprotected void checkSubclass() {\n\t}",
"@Override\r\n\tprotected void checkSubclass() {\n\t}",
"@Override\r\n\tprotected void checkSubclass() {\n\t}",
"@Override\r\n\tprotected void checkSubclass() {\n\t}",
"@Override\r\n\tprotected void checkSubclass() {\n\t}",
"@Override\r\n\tprotected void checkSubclass() {\n\t}",
"@Override\r\n\tprotected void checkSubclass() {\n\t}",
"@Override\r\n\tprotected void checkSubclass() {\n\t}",
"@Override\r\n\tprotected void checkSubclass() {\n\t}",
"@Override\r\n\tprotected void checkSubclass() {\n\t}",
"@Override\r\n\tprotected void checkSubclass() {\n\t}",
"private void testInheritance() {\n AbstractVehicle myCar = new Car();\n\n myCar.drive();\n\n //So a super class can be instantiated using instance of its subclass\n //But reverse is not true, so although VolvoCar extends Car,\n //we cannot create instance of VolvoCar from Car instance.\n //VolvoCar volvoCar = new Car();\n VolvoCar volvoCar = new VolvoCar();\n volvoCar.drive();\n\n //However, in such a scenario the super class can only invoke its own methods,\n // and not methods of the sub-class.....\n //So myCar can invoke methods defined in Vehicle class where actual\n //implementation comes from Car instance.\n //so getNoOfDoors will return 4.\n System.out.println(\"Car doors - \" + myCar.getNoOfDoors());\n\n //But myCar cannot invoke isInsured() which is defined only in subclass Car.\n //Below line gives error cannot resolve isInsured() in Vehicle.\n //myCar.isInsured();\n \n Car testCar = new Car();\n testCar.isInsured();\n\n }",
"@Override\n\tprotected void checkSubclass() {\n\t}",
"@Override\n\tprotected void checkSubclass() {\n\t}",
"@Override\n\tprotected void checkSubclass() {\n\t}",
"@Override\n\tprotected void checkSubclass() {\n\t}",
"@Override\n\tprotected void checkSubclass() {\n\t}",
"@Override\n\tprotected void checkSubclass() {\n\t}",
"@Override\n\tprotected void checkSubclass() {\n\t}",
"@Override\n\tprotected void checkSubclass() {\n\t}",
"@Override\n\tprotected void checkSubclass() {\n\t}",
"@Override\n\tprotected void checkSubclass() {\n\t}",
"@Override\n\tprotected void checkSubclass() {\n\t}",
"@Override\n\tprotected void checkSubclass() {\n\t}",
"@Override\n\tprotected void checkSubclass() {\n\t}",
"@Override\n\tprotected void checkSubclass() {\n\t}",
"@Override\n\tprotected void checkSubclass() {\n\t}",
"@Override\n\tprotected void checkSubclass() {\n\t}",
"@Override\n\tprotected void checkSubclass() {\n\t}",
"@Override\r\n protected void checkSubclass() {\n }",
"@Override\r\n protected void checkSubclass() {\n }",
"@Override\r\n protected void checkSubclass() {\n }",
"@Override\n protected void checkSubclass() {\n }",
"@Override\n protected void checkSubclass() {\n }",
"@Override\n protected void checkSubclass() {\n }",
"public void testGetBasedata() {\n }",
"@Test\n public void test7(){\n System.out.println(Parent.parent);\n System.out.println(Son.son);\n }",
"public void doGeneralThings() {\n logger.debug(\"Overrided or implememted method - doGeneralThings!\");\n }",
"@Test\n public void test4() {\n class mini_tests {\n public void test4_1() {\n try {\n tester.testOnInheritanceTree(null, testClass);\n Assert.fail();\n }\n catch (IllegalArgumentException e) {\n Assert.assertTrue(true);\n }\n catch (Throwable e) {\n Assert.fail();\n }\n }\n public void test4_2() {\n try {\n tester.testOnInheritanceTree(Story3, null);\n Assert.fail();\n }\n catch (IllegalArgumentException e) {\n Assert.assertTrue(true);\n }\n catch (Throwable e) {\n Assert.fail();\n }\n }\n public void test4_3() {\n try {\n tester.testOnInheritanceTree(null, null);\n Assert.fail();\n } catch (IllegalArgumentException e) {\n Assert.assertTrue(true);\n } catch (Throwable e) {\n Assert.fail();\n }\n }\n }\n mini_tests t = new mini_tests();\n t.test4_1();\n t.test4_2();\n t.test4_3();\n }",
"@Test\n public void test6() throws Exception {\n try {\n tester.testOnInheritanceTree(Story6, testClass);\n Assert.assertTrue(true);\n } catch (NotShortCircuitException e) {\n Assert.fail();\n }\n }",
"public void test_inheritence() {\n assertTrue(\"invalid inheritence.\", Task.class.getSuperclass() == BaseTaskEntity.class);\n }",
"@Test\n public void test6(){\n System.out.println(Son.son);\n System.out.println(Parent.parent);\n }",
"@Test\n public void test9() {\n class mini_tests {\n public void test9_1() {\n try {\n tester.testOnInheritanceTree(Story9_1, testClass);\n Assert.fail();\n } catch (GivenNotFoundException e) {\n Assert.assertTrue(true);\n }\n catch (Throwable e) {\n Assert.fail();\n }\n }\n public void test9_2() {\n try {\n tester.testOnNestedClasses(Story9_2, testClass);\n Assert.assertTrue(true);\n }\n catch (Throwable e) {\n Assert.fail();\n }\n }\n public void test9_3() {\n try {\n tester.testOnNestedClasses(Story9_3, testClass);\n Assert.fail();\n } catch (WhenNotFoundException e) {\n Assert.assertTrue(true);\n }\n catch (Throwable e) {\n Assert.fail();\n }\n }\n }\n mini_tests t = new mini_tests();\n t.test9_1();\n t.test9_2();\n t.test9_3();\n }",
"@Test\r\n\tpublic void test_takeTurnInParent(){\r\n\t\ttestInterface();\r\n\t\tSmartAI c = new SmartAI(1234);\r\n\t\tc.updateScore(122);\r\n\t\t\r\n\t\tc.takeTurn();\r\n\t\t\r\n\t\tassertEquals(\"Parent should have called (overridden) getMove, which returned 96\", 154, c.getScore());\r\n\t}",
"@Test public void testInheritance () {\n ArrayList<String> point = new ArrayList<String>(\n Arrays.asList(\"qimpp\", \"Point\") );\n GNode pointNode = treeManager.dereference(point);\n\n ArrayList<String> colorPoint = new ArrayList<String>(\n Arrays.asList(\"qimpp\", \"ColorPoint\") );\n GNode colorNode = treeManager.dereference(colorPoint);\n\n assertTrue( colorNode != null );\n assertTrue( pointNode != null );\n GNode g = (GNode)(treeManager.getParent(colorNode).getProperty(\"ClassDeclaration\"));\n \n\n assertTrue( treeManager.getParent(colorNode) == pointNode );\n\n //\n // Test distinction between package names\n //\n\n ArrayList<String> otherColor =\n new ArrayList<String>( Arrays.asList(\"org\", \"fake\",\n \"ColorPoint\"));\n GNode otherColorNode = treeManager.dereference(otherColor);\n\n assertTrue( otherColorNode != null );\n assertTrue( treeManager.getParent( otherColorNode )\n != treeManager.getParent(colorNode) );\n assertTrue( otherColorNode != colorNode );\n }",
"public abstract void test();",
"public abstract void test();",
"boolean hasBase();",
"@Test public void runCommonTests() {\n\t\trunAllTests();\n\t}",
"@Before public void setUp() {\n // Insert some initial values into the inheritance\n // tree\n //\n\n //\n treeManager = new InheritanceTreeManager(\n GNode.create(\"ClassDeclaration\"));\n // Put in some example classes\n GNode newClass = GNode.create(\"ClassDeclaration\", \"Point\");\n\n //\n ArrayList<String> point = new ArrayList<String>();\n point.add(\"qimpp\");\n point.add(\"Point\");\n treeManager.insertClass(point, null, newClass);\n\n //\n //\n\n //\n\n newClass = GNode.create(\"ClassDeclaration\", \"ColorPoint\");\n ArrayList<String> ColorPoint = new ArrayList<String>();\n ColorPoint.add(\"qimpp\");\n ColorPoint.add(\"ColorPoint\");\n treeManager.insertClass(ColorPoint, point, newClass);\n //\n\n //\n // Test that classes with the same name in different\n // packages are distinct\n //\n newClass = GNode.create(\"ClassDeclaration\", \"OtherColorPoint\");\n ColorPoint = new ArrayList<String>( \n Arrays.asList(\"org\", \"fake\", \"ColorPoint\") );\n treeManager.insertClass(ColorPoint, null, newClass);\n\n \n }",
"@Override\n public void runTest() {\n }",
"@Test\n public void test5(){\n //parent\n System.out.println(Son.parent);\n System.out.println(Parent.parent);\n }",
"@Override\n public void testGetAllObjects() {\n }",
"@Test\n public void test4(){\n //parent\n System.out.println(Parent.parent);\n System.out.println(Son.parent);\n }",
"@Override\r\n\tprotected void parentMethod() {\n\t\tsuper.parentMethod();\r\n\t\tSystem.out.println(\"ChildParentMethod\");\r\n\t}",
"public void tests() {\n this.testStartBaseLocationsDraw();\n }",
"public void testAncestry()\n {\n checkClass(HStaticIconTest.class);\n\n TestUtils.testExtends(HStaticIcon.class, HVisible.class);\n TestUtils.testImplements(HStaticIcon.class, HNoInputPreferred.class);\n }",
"@Test\n public void whenGetSubUnitThenReturnResult() {\n MenuUnit expected = underTest.getSubUnit();\n assertThat(expected, is(underTestSub));\n }",
"@Test\r\n\t public void registerBaseCase() {\n\t\t \tthis.admin.createClass(\"ecs60\",2017,\"sean\",50);\r\n\t \tthis.student.registerForClass(\"gurender\", \"ecs60\", 2017);\r\n\t assertTrue(this.student.isRegisteredFor(\"gurender\", \"ecs60\", 2017));\r\n\t //this.student.hasSubmitted(\"gurender\", \"p1\", \"ecs60\", 2017);\r\n\t \r\n\t }",
"@Test(groups ={Slingshot,Regression})\n\tpublic void VerifySuperUserAccessJourneys() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the super user is able to perform journeys\");\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"Switchtopaperlessacctspecificsdata\");\t\t\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.bgbloginDetails(userProfile);\t\t\n\t\tnew MultiUserMultiViewAction()\n\t\t.ManageAccountLink(userProfile)\n\t\t.verifySuperuserAccessjourneyverification();\n\t}",
"@Override\n public void testOneRequiredGroup() {\n }",
"@Override\n public void testOneRequiredGroup() {\n }",
"boolean overrides(MethodDeclaration sub, MethodDeclaration sup);",
"@Override\n\tvoid methodAbstractAndSubclassIsAbstract() {\n\t\t\n\t}",
"public abstract boolean levelUp();",
"@Test\n public void test2() throws Exception {\n try {\n tester.testOnInheritanceTree(Story2, testClass);\n Assert.fail();\n } catch (StoryTestException e) {\n Assert.assertEquals(\"Then A's y is true\", e.getSentence());\n Assert.assertEquals(1, e.getNumFail()); // If this fails, it means your back-up is wrong.\n List<String> expected = new LinkedList<>();\n expected.add(\"true\");\n Assert.assertEquals(expected, e.getStoryExpected());\n List<String> actual = new LinkedList<>();\n actual.add(\"false\");\n Assert.assertEquals(actual, e.getTestResult());\n }\n }",
"protected abstract void _extends( ClassOutlineImpl derived, ClassOutlineImpl base );",
"@Override\n public void tests() {\n System.out.println(\"222222222222222222\"); \n }",
"abstract protected boolean checkMethod();",
"protected void setUp() {\n // set up for test\n instance = new GeneralizationImpl();\n GeneralizableElement mockChild = EasyMock.createMock(GeneralizableElement.class);\n GeneralizableElement mockParent = EasyMock.createMock(GeneralizableElement.class);\n Classifier mockPowertype = EasyMock.createMock(Classifier.class);\n instance.setChild(mockChild);\n instance.setDiscriminator(TEST_DISCRIMINATORS[0]);\n instance.setParent(mockParent);\n instance.setPowertype(mockPowertype);\n\n }",
"public void method_6349() {\r\n super.method_6349();\r\n }"
]
| [
"0.6770369",
"0.65348274",
"0.6448768",
"0.6448768",
"0.6448768",
"0.62627125",
"0.6245224",
"0.62087864",
"0.62008077",
"0.62008077",
"0.61739737",
"0.61149436",
"0.61115116",
"0.60909605",
"0.6082128",
"0.6075678",
"0.6075678",
"0.6075678",
"0.60751563",
"0.60123134",
"0.60057896",
"0.6002945",
"0.59538496",
"0.59277415",
"0.5913959",
"0.59050274",
"0.5901278",
"0.5901278",
"0.5901278",
"0.5901278",
"0.5901278",
"0.5901278",
"0.5901278",
"0.5901278",
"0.5901278",
"0.5901278",
"0.5901278",
"0.5901278",
"0.5901278",
"0.5901278",
"0.5889875",
"0.5882906",
"0.5882906",
"0.5882906",
"0.5882906",
"0.5882906",
"0.5882906",
"0.5882906",
"0.5882906",
"0.5882906",
"0.5882906",
"0.5882906",
"0.5882906",
"0.5882906",
"0.5882906",
"0.5882906",
"0.5882906",
"0.5882906",
"0.58790004",
"0.58790004",
"0.58790004",
"0.586753",
"0.586753",
"0.586753",
"0.58473766",
"0.58362",
"0.5823931",
"0.58200955",
"0.5790098",
"0.5779319",
"0.5734791",
"0.5730202",
"0.5724392",
"0.5716136",
"0.566144",
"0.566144",
"0.56612283",
"0.5651286",
"0.5640091",
"0.5636394",
"0.5636021",
"0.5631774",
"0.5624341",
"0.5615459",
"0.5611711",
"0.5603215",
"0.5594401",
"0.5587913",
"0.5574956",
"0.55547714",
"0.55547714",
"0.55477995",
"0.55041313",
"0.5486016",
"0.54857004",
"0.54815173",
"0.5478421",
"0.5468369",
"0.545873",
"0.54580057"
]
| 0.6208093 | 8 |
Test the PuzzleLevel subclass. | public void testPuzzleLevel() {
Board brd = new Board();
PuzzleLevel lvl = new PuzzleLevel(brd);
assertEquals("Puzzle", lvl.getLevelType());
lvl.assignMaxWords(42);
assertEquals(42, lvl.getMaxWords());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void levelsTest() {\n // TODO: test levels\n }",
"@Test\n\tpublic void testNormalPuzzleGeneration() {\n\t}",
"@Test\r\n\tpublic void testIntialation()\r\n\t{\r\n\t\tPokemon pk = new Vulpix(\"Vulpix\", 100);\r\n\t\r\n\t\tassertEquals(\"Vulpix\", pk.getName());\r\n\t\tassertEquals(100, pk.getMaxLfPts());\r\n\t\tassertEquals(100, pk.getCurrentLifePts());\r\n\t\tassertEquals(100, pk.getCurrentLifePts());\r\n\t\tassertEquals(\"Fire\", pk.getType().getType());\r\n\t}",
"@Test\n public void testIsActionable_ThirdCornerCase() {\n board.getCell(3, 4).addLevel();\n board.getCell(3, 3).addLevel();\n assertTrue(godPower.isActionable(board, player.getWorker1()));\n }",
"public void testEditExistingLevel()\n {\n window.button(\"exitButton\").requireVisible();\n window.button(\"exitButton\").click();\n window.dialog().requireVisible();\n window.dialog().pressAndReleaseKeys(KeyEvent.VK_ENTER);\n window.button(\"Edit Level\").click();\n window.button(\"editLevelButton\").click();\n\n //Verify initial file contents.\n ClassLoader classLoader = getClass().getClassLoader();\n File folder = null;\n try\n {\n folder = new File(classLoader.getResource(\"levels\").toURI().getPath());\n } catch (URISyntaxException e)\n {\n e.printStackTrace();\n }\n File[] listOfFiles = folder.listFiles();\n assertTrue(listOfFiles[0].getPath().contains(\"level1.txt\"));\n\n String content = null;\n Scanner scanner = null;\n try\n {\n scanner = new Scanner(listOfFiles[0]);\n content = scanner.useDelimiter(\"\\\\Z\").next();\n scanner.close();\n } catch (FileNotFoundException e)\n {\n e.printStackTrace();\n }\n\n String initialData = \"TheFirst Puzzle 30 30 200 300 1 20 20 20 20 10 10 80 \" +\n \"25 5 1000 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 \" +\n \"1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 \" +\n \"1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 \";\n assertEquals(initialData, content);\n\n //Change level type and options\n window.comboBox(\"levelTypeSelector\").selectItem(\"Lightning\");\n window.textBox(\"timeLimitSelector\").setText(\"103\");\n window.button(\"setFrequenciesButton\").click();\n window.spinner(\"freq1\").decrement(5);\n window.spinner(\"freq5\").increment(5);\n window.spinner(\"freqx1\").increment(10);\n window.spinner(\"freqx2\").decrement(7);\n window.spinner(\"freqx3\").decrement(3);\n window.button(\"closeOptionsButton\").click();\n window.textBox(\"threeStarScoreSelector\").setText(\"1002\");\n window.radioButton(\"inactiveTileButton\").click();\n window.panel(\"square0\").click();\n window.panel(\"square80\").click();\n window.button(\"saveButton\").click();\n\n String finalData = \"TheFirst Lightning 103 1 200 300 1 15 20 20 20 15 \" +\n \"10 90 18 2 1000 1 0 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2\" +\n \" 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 \" +\n \"1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 \";\n\n scanner = null;\n try\n {\n scanner = new Scanner(listOfFiles[0]);\n content = scanner.useDelimiter(\"\\\\Z\").next();\n scanner.close();\n } catch (FileNotFoundException e)\n {\n e.printStackTrace();\n }\n\n assertEquals(finalData, content);\n PrintWriter writer = null;\n try\n {\n writer = new PrintWriter(listOfFiles[0].getPath(), \"UTF-8\");\n writer.println(initialData);\n writer.close();\n } catch (FileNotFoundException e)\n {\n e.printStackTrace();\n } catch (UnsupportedEncodingException e)\n {\n e.printStackTrace();\n }\n }",
"@Test\n\tpublic void testHardPuzzleGeneration() {\n\t}",
"@Test\n\tpublic void testTotalPuzzleGenerated() {\n\t}",
"@Test\n public void testCheckStartAndGoalPosition()throws Exception{\n GenerateLevel generateLevel = new GenerateLevel(20,\n \"XmlFiles/missingStartGoalPos.xml\");\n generateLevel.loadLevel(1);\n assertFalse(generateLevel.checkStartAndGoalPosition());\n }",
"public void testLightningLevel() {\n\t\tBoard brd = new Board();\n\t\tLightningLevel lvl = new LightningLevel(brd);\n\n\t\tassertEquals(\"Lightning\", lvl.getLevelType());\n\n\t\tlvl.assignTime(42);\n\t\tassertEquals(42, lvl.getTime());\n\t}",
"@Test\n public void typeTest() {\n assertTrue(red_piece.getType() == Piece.Type.SINGLE);\n red_piece.king();\n assertTrue(red_piece.getType() == Piece.Type.KING);\n assertTrue(white_piece.getType() == Piece.Type.SINGLE);\n }",
"@Test\r\n\tpublic void hasScoreTest() \r\n\t{\r\n\t\tassertTrue(scoreBehavior.hasScore());\r\n\t}",
"@Test\r\n\tpublic final void testAddLevel() {\r\n\t\tlevels.add(lostLevel2);\r\n\t\tgameStatisticsLoss.addLevel(lostLevel2);\r\n\t\tassertTrue(gameStatisticsLoss.getLevels().equals(levels));\r\n\t}",
"@Test\r\n\tpublic void test()\r\n\t{\r\n\t\ttry {\r\n\t\t\tpanel=new Panels();\r\n\t\t\tpanel.map=new DrawMap();\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\tpanel.waveLevel=2; \r\n\t\tpanel.map.map=new int [1][1];\r\n\t\tpanel.waveInitial();\r\n\t\tassertEquals(3,panel.waveLevel);\r\n\t}",
"@Test\n public void testIsActionable_FirstCornerCase() {\n board.getCell(3, 4).addLevel();\n board.getCell(3, 3).addLevel();\n board.getCell(4, 3).addLevel();\n assertFalse(godPower.isActionable(board, player.getWorker1()));\n }",
"@Override\r\n\t\t\tpublic void test() {\n\t\t\t}",
"@Test\n\tpublic void testPowerUpView_8()\n\t\tthrows Exception {\n\t\tGameObject gameObject = new Tile(new Point());\n\t\tGfxFactory gfxFactory = new GfxFactory();\n\n\t\tPowerUpView result = new PowerUpView(gameObject, gfxFactory);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.NoClassDefFoundError: Could not initialize class org.apache.log4j.LogManager\n\t\t// at org.apache.log4j.Logger.getLogger(Logger.java:116)\n\t\t// at client.view.GfxFactory.<init>(GfxFactory.java:45)\n\t\tassertNotNull(result);\n\t}",
"@Test\n public void isMyPetPlaying() {\n int isPlaying = underTest.getPlayLevel();\n // Arrange\n assertThat(isPlaying, is(1));\n }",
"@Test\n\tpublic void testEvilPuzzleGeneration() {\n\t}",
"@Test\n public void test8() throws Exception {\n try {\n tester.testOnInheritanceTree(Story8, testClass);\n Assert.assertTrue(true);\n } catch (StoryTestException | WrongMethodException e) {\n Assert.fail();\n }\n }",
"@Test\n public void testRandomPiece() {\n System.out.println(\"randomPiece\");\n Player instance = new Player(PlayerColor.WHITE, \"\");\n Piece result = instance.randomPiece();\n\n assertFalse(instance.getPieces().contains(result));\n\n }",
"@Test\n public void testLevelEqualsContract() {\n EqualsVerifier.forClass(PdfaFlavour.Level.class).verify();\n }",
"public void testLevelShared() {\n\t\tLevel lvl = new Level();\n\t\tassertEquals(\"\", lvl.getLevelType());\n\t\tBoard brd = new Board();\n\t\tlvl.setBoard(brd);\n\t\tassertEquals(brd, lvl.getBoard());\n\n\t\tint[] stars = new int[3];\n\t\tstars[0] = 0;\n\t\tstars[1] = 1;\n\t\tstars[2] = 2;\n\n\t\tlvl.setStars(stars);\n\t\tassertEquals(stars, lvl.getStars());\n\n\t\tlvl.setStarAt(5, 1);\n\t\tassertEquals(5, lvl.getStarAt(1));\n\n\t}",
"@Test\n public void getGameStateTest1() {\n GenericStandardDeckGame g = new GenericStandardDeckGame();\n assertEquals(g.getGameState(), \"Number of players: 0\");\n }",
"@Override\n protected void setUp()\n throws Exception\n {\n cover = new WinCover(GamePiece.X, 0, 0, 5);\n super.setUp();\n }",
"@Test\n public void testIsActionable_FourthCornerCase() {\n board.getCell(3, 3).setDome(true);\n board.getCell(4, 3).setDome(true);\n board.getCell(4, 4).addLevel();\n assertTrue(godPower.isActionable(board, player.getWorker1()));\n }",
"public static Level[] createTestLevel(){\n\t\tLevel[] testLevels = new Level[16];\n\t\tint[] squareNum = new int[144];\n\t\n\t\tColor[] cl = new Color[144];\n\t\t\n\t\t\n\n\t\t\n\t\tfor (int i=0;i<144;i++){\n\t\t\tsquareNum[i] =0;\n\t\t\tcl[i]=null;\n\t\t}\n\t\tint count18=0;\n\t\tfor (int i=1;i<4;i++){\n\t\t\tfor (int j=1;j<7;j++){\n\t\t\t\tsquareNum[count18] =j;\n\t\t\t\tif (i==1){\n\t\t\t\t\tcl[count18]=Color.RED;\n\t\t\t\t}\n\t\t\t\telse if (i==2){\n\t\t\t\t\tcl[count18]=Color.YELLOW;\n\t\t\t\t}\n\t\t\t\telse if (i==3){\n\t\t\t\t\tcl[count18]=Color.GREEN;\n\t\t\t\t}\n\t\t\t\tcount18=count18+5;\n\t\t\t}\n\t\t}\n\n\n\t\tSquare bullPenSquare1[] = new Square[6]; \n\t\tbullPenSquare1[0] = new Square(1,3);\n\t\tbullPenSquare1[1] = new Square(0,1);\n\t\tbullPenSquare1[2] = new Square(0,2);\n\t\tbullPenSquare1[3] = new Square(0,3);\n\t\tbullPenSquare1[4] = new Square(0,4);\n\t\tbullPenSquare1[5] = new Square(0,5);\t\t\n\t\t\n\t\tSquare bullPenSquare2[] = new Square[6]; \n\t\tbullPenSquare2[0] = new Square(0,0);\n\t\tbullPenSquare2[1] = new Square(1,0);\n\t\tbullPenSquare2[2] = new Square(2,0);\n\t\tbullPenSquare2[3] = new Square(2,1);\n\t\tbullPenSquare2[4] = new Square(2,2);\n\t\tbullPenSquare2[5] = new Square(1,2);\t\t\n\n\t\tSquare bullPenSquare3[] = new Square[6]; \n\t\tbullPenSquare3[0] = new Square(1,1);\n\t\tbullPenSquare3[1] = new Square(0,1);\n\t\tbullPenSquare3[2] = new Square(0,2);\n\t\tbullPenSquare3[3] = new Square(0,3);\n\t\tbullPenSquare3[4] = new Square(0,4);\n\t\tbullPenSquare3[5] = new Square(0,5);\t\t\n\t\t\n\t\tSquare bullPenSquare4[] = new Square[6]; \n\t\tbullPenSquare4[0] = new Square(1,1);\n\t\tbullPenSquare4[1] = new Square(2,1);\n\t\tbullPenSquare4[2] = new Square(3,1);\n\t\tbullPenSquare4[3] = new Square(3,2);\n\t\tbullPenSquare4[4] = new Square(3,3);\n\t\tbullPenSquare4[5] = new Square(3,4);\t\t\n\n\t\tSquare bullPenSquare5[] = new Square[6]; \n\t\tbullPenSquare5[0] = new Square(0,2);\n\t\tbullPenSquare5[1] = new Square(1,2);\n\t\tbullPenSquare5[2] = new Square(2,2);\n\t\tbullPenSquare5[3] = new Square(3,2);\n\t\tbullPenSquare5[4] = new Square(4,2);\n\t\tbullPenSquare5[5] = new Square(5,2);\t\n\t\t\n\t\tSquare bullPenSquare6[] = new Square[6]; \n\t\tbullPenSquare6[0] = new Square(0,0);\n\t\tbullPenSquare6[1] = new Square(0,1);\n\t\tbullPenSquare6[2] = new Square(0,2);\n\t\tbullPenSquare6[3] = new Square(0,3);\n\t\tbullPenSquare6[4] = new Square(0,4);\n\t\tbullPenSquare6[5] = new Square(0,5);\t\n\t\t\n\t\tPiece bullPenPiece= new Piece(0,0,bullPenSquare1,bullPenSquare1[0],2);\n\t\tbullPenPiece.setColor(new Color(0,0,0));\n\n\n\t\tArrayList<Piece> bullPenPieceArray=new ArrayList<Piece>();\n\t\tbullPenPieceArray.add(new Piece(0,0,bullPenSquare1,bullPenSquare1[0],2));\n\t\tbullPenPieceArray.get(0).setColor(Color.BLUE);\n\t\tbullPenPieceArray.add(new Piece(0,0,bullPenSquare2,bullPenSquare2[0],2));\n\t\tbullPenPieceArray.get(1).setColor(Color.GREEN);\n\t\tbullPenPieceArray.add(new Piece(0,0,bullPenSquare3,bullPenSquare3[0],2));\n\t\tbullPenPieceArray.get(2).setColor(Color.YELLOW);\n\t\tbullPenPieceArray.add(new Piece(0,0,bullPenSquare4,bullPenSquare4[0],2));\n\t\tbullPenPieceArray.get(3).setColor(Color.ORANGE);\n\t\tbullPenPieceArray.add(new Piece(0,0,bullPenSquare5,bullPenSquare5[0],2));\n\t\tbullPenPieceArray.get(4).setColor(Color.RED);\n\t\tbullPenPieceArray.add(new Piece(0,0,bullPenSquare6,bullPenSquare6[0],2));\n\t\tbullPenPieceArray.get(5).setColor(Color.PINK);\n\n\n\t\tBullpen bp = new Bullpen(bullPenPieceArray);\n\t\t//Bullpen bp = new Bullpen();\n\n\n\n\t\tSquare[] boardSquare = new Square[144]; \n\t\tfor (int i1=0;i1<12;i1++){\n\t\t\tfor (int j=0;j<12;j++){\n\n\t\t\t\tboardSquare[i1*12+j] = new Square(i1,j);\n\t\t\t}\n\t\t}\n\n\t\tSquare hitSquares[] = new Square[6]; \n\t\thitSquares[0] = new Square(6,4);\n\t\thitSquares[1] = new Square(5,2);\n\t\thitSquares[2] = new Square(5,3);\n\t\thitSquares[3] = new Square(5,4);\n\t\thitSquares[4] = new Square(5,5);\n\t\thitSquares[5] = new Square(5,6);\t\n\n\t\tHint hints = new Hint(hitSquares);\n\n\t\tBoard testBoard = new Board(boardSquare);\n\t\ttestBoard.sethint(hints);\n\t\t\n\t\t////// add remove test\n\t\t//bullPenPiece.setColor(Color.PINK);\n\t\t//bp.removepiece(bullPenPieceArray.get(5));\n\t\t//testBoard.addpiece(bullPenPiece);\n\t\t///test over\n\t\t\n\t\tfor (int i=0;i<15;i++){\n\t\t\tif (i%3==0){\n\t\t\t\ttestLevels[i] = new PuzzleLevel(i,GetLevelTpye(i%3),testBoard,bp,20);\n\t\t\t\ttestLevels[i].updateLevelStar(new Achievement(new Random().nextInt(3) + 1));\n\t\t\t}\n\t\t\telse if (i%3==1){\n\t\t\t\ttestLevels[i] = new LightningLevel(i,GetLevelTpye(i%3),testBoard,bp,30);\n\t\t\t\ttestLevels[i].updateLevelStar(new Achievement(new Random().nextInt(3) + 1));\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttestLevels[i] = new ReleaseLevel(i,GetLevelTpye(i%3),testBoard,bp,squareNum,cl);\n\t\t\t\ttestLevels[i].updateLevelStar(new Achievement(new Random().nextInt(3) + 1));\n\t\t\t}\n\n\t\t}\n\t\ttestLevels[13].updateLevelStar(new Achievement(0));\n\t\ttestLevels[14].updateLevelStar(new Achievement(-1));\n\n\t\t\n\t\t\n\t\t\n\t\t//---------------------------------------------- \n\t\tint[] sixNum = new int[36];\n\t\tColor[] sixcolor = new Color[36];\n\t\tfor (int i=0;i<36;i++){\n\t\t\tsixNum[i] =0;\n\t\t\tsixcolor[i]=null;\n\t\t}\n\t\tint count1=0;\n\t\tfor (int i=1;i<4;i++){\n\t\t\tfor (int j=1;j<7;j++){\n\t\t\t\tsquareNum[count1] =j;\n\t\t\t\tif (i==1){\n\t\t\t\t\tcl[count1]=Color.RED;\n\t\t\t\t}\n\t\t\t\telse if (i==2){\n\t\t\t\t\tcl[count1]=Color.YELLOW;\n\t\t\t\t}\n\t\t\t\telse if (i==3){\n\t\t\t\t\tcl[count1]=Color.GREEN;\n\t\t\t\t}\n\t\t\t\tcount1=count1+1;\n\t\t\t}\n\t\t}\n\t\tSquare[] sixBoardSquare = new Square[36]; \n\t\tfor (int i1=0;i1<6;i1++){\n\t\t\tfor (int j=0;j<6;j++){\n\n\t\t\t\tsixBoardSquare[i1*6+j] = new Square(i1,j);\n\t\t\t}\n\t\t}\n\t\tSquare sixhint[] = new Square[6]; \n\t\tsixhint[0] = new Square(0,0);\n\t\tsixhint[1] = new Square(0,1);\n\t\tsixhint[2] = new Square(0,2);\n\t\tsixhint[3] = new Square(0,3);\n\t\tsixhint[4] = new Square(0,4);\n\t\tsixhint[5] = new Square(0,5);\t\n\n\t\tHint sixhints = new Hint(sixhint);\n\n\t\tBoard sixBoard = new Board(sixBoardSquare);\n\t\tsixBoard.sethint(sixhints);\n\t\t\n\t\ttestLevels[15] = new ReleaseLevel(15,GetLevelTpye(14%3),sixBoard,bp,sixNum,sixcolor);\n\t\ttestLevels[15].updateLevelStar(new Achievement(1));\n\t\t//--------------------------------------------\n\t\t\n\t\treturn testLevels;\n\t\t/*\n\t\t\tpublic Level(int LevelNumber, String LevelType, Board b, Bullpen p){\n\t\t\t\tthis.LevelNumber = LevelNumber;\n\t\t\t\tthis.LevelType = LevelType;\n\t\t\t\tthis.b = b;\n\t\t\t\tthis.p = p;\n\t\t\t}\n\n\t\t */\n\t}",
"public void runTest(String level){\n\t\t//sets instance variable to level input\n\t\tthis.level = level;\n\t\t//Switch based on level\n\t\tswitch(this.level){\n\t\t//In the case of test level E\n\t\tcase\"E\":\n\t\t\t// array containing possible grade equivalencies for the Math Computation test\n\t\t\tdouble[] mathCompArrayE = {0.7, 0.7, 0.7, 0.7, 0.7, 1.8, 2.1, 2.3, 2.5, 2.6, 2.6, 2.7, 2.9, 2.9, 3.1, 3.2, 3.4, 3.5, 3.6, 4.0, 4.2, 4.5, 4.8, 5.0, 5.4, 6.9};\n\t\t\t//array containing possible grade equivalencies for the Applied Math test\n\t\t\tdouble[] mathAppliedArrayE = {0, 0, 0, 0, 0, 0, 1.4, 1.9, 2.2, 2.3, 2.7, 2.9, 3.2, 3.4, 3.8, 4.1, 4.5, 4.8, 5.2, 5.6, 5.9, 6.1, 6.7, 6.9, 6.9, 6.9};\n\t\t\t//Multi-Dimensional Array containing possible mathematics grade equivalencies based on math computation score and applied math score\n\t\t\tdouble[][] totalMathematicsE = {\n\t\t\t\t\t{0, 0, 0, 0, 0, 0.9, 1.2, 1.4, 1.4, 1.4, 1.5, 1.7, 1.7, 1.7, 1.8, 1.8, 1.9, 1.9, 1.9, 2.0, 2.0, 2.1, 2.1, 2.2, 2.3, 2.5},\n\t\t\t\t\t{0, 0, 0, 0, 0, 0.9, 1.2, 1.4, 1.4, 1.4, 1.5, 1.7, 1.7, 1.7, 1.8, 1.8, 1.9, 1.9, 1.9, 2.0, 2.0, 2.1, 2.1, 2.2, 2.3, 2.5},\n\t\t\t\t\t{0, 0, 0, 0, 0, 0.9, 1.2, 1.4, 1.4, 1.4, 1.5, 1.7, 1.7, 1.7, 1.8, 1.8, 1.9, 1.9, 1.9, 2.0, 2.0, 2.1, 2.1, 2.2, 2.3, 2.5},\n\t\t\t\t\t{0, 0, 0, 0, 0, 0.9, 1.2, 1.4, 1.4, 1.4, 1.5, 1.7, 1.7, 1.7, 1.8, 1.8, 1.9, 1.9, 1.9, 2.0, 2.0, 2.1, 2.1, 2.2, 2.3, 2.5},\n\t\t\t\t\t{0, 0, 0, 0, 0, 0.9, 1.2, 1.4, 1.4, 1.4, 1.5, 1.7, 1.7, 1.7, 1.8, 1.8, 1.9, 1.9, 1.9, 2.0, 2.0, 2.1, 2.1, 2.2, 2.3, 2.5},\n\t\t\t\t\t{0, 0, 0, 0, 0, 0.9, 1.2, 1.4, 1.4, 1.4, 1.5, 1.7, 1.7, 1.7, 1.8, 1.8, 1.9, 1.9, 1.9, 2.0, 2.0, 2.1, 2.1, 2.2, 2.3, 2.5},\n\t\t\t\t\t{1.4, 1.4, 1.4, 1.4, 1.4, 1.7, 1.9, 2.0, 2.0, 2.1, 2.1, 2.2, 2.3, 2.3, 2.3, 2.4, 2.4, 2.4, 2.5, 2.5, 2.5, 2.6, 2.7, 2.8, 2.9, 3.4},\n\t\t\t\t\t{1.7, 1.7, 1.7, 1.7, 1.7, 2.0, 2.1, 2.2, 2.3, 2.4, 2.4, 2.4, 2.4, 2.5, 2.5, 2.5, 2.6, 2.7, 2.8, 2.8, 2.9, 3.0, 3.1, 3.2, 3.3, 4.1},\n\t\t\t\t\t{1.8, 1.8, 1.8, 1.8, 1.8, 2.1, 2.3, 2.4, 2.4, 2.4, 2.5, 2.5, 2.5, 2.6, 2.7, 2.8, 2.8, 2.9, 2.9, 3.0, 3.1, 3.2, 3.3, 3.3, 3.5, 4.5},\n\t\t\t\t\t{1.9, 1.9, 1.9, 1.9, 1.9, 2.2, 2.3, 2.4, 2.5, 2.5, 2.5, 2.6, 2.7, 2.8, 2.8, 2.9, 2.9, 3.0, 3.1, 3.2, 3.2, 3.3, 3.4, 3.5, 3.9, 4.7},\n\t\t\t\t\t{2.0, 2.0, 2.0, 2.0, 2.0, 2.3, 2.4, 2.5, 2.5, 2.5, 2.6, 2.7, 2.8, 2.9, 2.9, 3.0, 3.1, 3.1, 3.2, 3.3, 3.3, 3.4, 3.5, 3.8, 4.1, 4.9},\n\t\t\t\t\t{2.0, 2.0, 2.0, 2.0, 2.0, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.8, 2.9, 3.0, 3.1, 3.1, 3.2, 3.2, 3.3, 3.4, 3.4, 3.5, 3.8, 4.0, 4.3, 5.1},\n\t\t\t\t\t{2.1, 2.1, 2.1, 2.1, 2.1, 2.4, 2.5, 2.5, 2.7, 2.8, 2.9, 2.9, 3.0, 3.1, 3.1, 3.2, 3.3, 3.3, 3.4, 3.4, 3.5, 3.8, 3.9, 4.2, 4.5, 5.2},\n\t\t\t\t\t{2.1, 2.1, 2.1, 2.1, 2.1, 2.4, 2.5, 2.6, 2.8, 2.9, 2.9, 3.0, 3.1, 3.1, 3.2, 3.3, 3.3, 3.4, 3.4, 3.6, 3.8, 3.9, 4.1, 4.4, 4.6, 5.4},\n\t\t\t\t\t{2.2, 2.2, 2.2, 2.2, 2.2, 2.4, 2.6, 2.7, 2.9, 2.9, 3.0, 3.1, 3.2, 3.2, 3.3, 3.3, 3.4, 3.5, 3.6, 3.8, 3.9, 4.1, 4.3, 4.5, 4.8, 5.5},\n\t\t\t\t\t{2.3, 2.3, 2.3, 2.3, 2.3, 2.5, 2.7, 2.8, 2.9, 3.0, 3.1, 3.2, 3.3, 3.3, 3.4, 3.4, 3.5, 3.7, 3.9, 4.0, 4.1, 4.3, 4.5, 4.7, 4.9, 5.7},\n\t\t\t\t\t{2.3, 2.3, 2.3, 2.3, 2.3, 2.5, 2.8, 2.9, 3.0, 3.1, 3.2, 3.3, 3.3, 3.4, 3.4, 3.5, 3.7, 3.9, 4.0, 4.2, 4.3, 4.5, 4.6, 4.8, 5.1, 5.8},\n\t\t\t\t\t{2.4, 2.4, 2.4, 2.4, 2.4, 2.6, 2.8, 3.0, 3.1, 3.2, 3.3, 3.3, 3.4, 3.4, 3.6, 3.8, 3.9, 4.0, 4.2, 4.4, 4.5, 4.6, 4.7, 4.9, 5.2, 6.0},\n\t\t\t\t\t{2.4, 2.4, 2.4, 2.4, 2.4, 2.7, 2.9, 3.1, 3.2, 3.3, 3.3, 3.4, 3.5, 3.6, 3.8, 3.9, 4.1, 4.2, 4.4, 4.5, 4.6, 4.7, 4.9, 5.1, 5.3, 6.2},\n\t\t\t\t\t{2.4, 2.4, 2.4, 2.4, 2.4, 2.8, 3.0, 3.2, 3.3, 3.4, 3.4, 3.5, 3.7, 3.9, 4.0, 4.1, 4.3, 4.4, 4.5, 4.7, 4.8, 4.9, 5.0, 5.2, 5.5, 6.4},\n\t\t\t\t\t{2.5, 2.5, 2.5, 2.5, 2.5, 2.9, 3.1, 3.3, 3.4, 3.4, 3.6, 3.8, 3.9, 4.0, 4.2, 4.3, 4.4, 4.6, 4.7, 4.8, 4.9, 5.1, 5.2, 5.3, 5.7, 6.7},\n\t\t\t\t\t{2.5, 2.5, 2.5, 2.5, 2.5, 3.0, 3.2, 3.3, 3.4, 3.6, 3.8, 4.0, 4.1, 4.2, 4.4, 4.5, 4.6, 4.7, 4.8, 5.0, 5.1, 5.2, 5.3, 5.5, 5.8, 6.9},\n\t\t\t\t\t{2.6, 2.6, 2.6, 2.6, 2.6, 3.1, 3.3, 3.4, 3.7, 3.9, 4.1, 4.2, 4.4, 4.5, 4.6, 4.7, 4.8, 4.9, 5.1, 5.2, 5.3, 5.5, 5.6, 5.8, 6.1, 6.9},\n\t\t\t\t\t{2.8, 2.8, 2.8, 2.8, 2.8, 3.3, 3.5, 3.8, 4.0, 4.2, 4.4, 4.6, 4.7, 4.8, 4.9, 5.0, 5.1, 5.2, 5.3, 5.5, 5.6, 5.7, 5.9, 6.1, 6.4, 6.9},\n\t\t\t\t\t{3.1, 3.1, 3.1, 3.1, 3.1, 3.5, 4.0, 4.4, 4.6, 4.7, 4.9, 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.7, 5.8, 5.9, 6.0, 6.2, 6.4, 6.7, 6.9, 6.9},\n\t\t\t\t\t{4.0, 4.0, 4.0, 4.0, 4.0, 4.9, 5.2, 5.5, 5.7, 5.9, 6.0, 6.2, 6.4, 6.5, 6.7, 6.9, 6.9, 6.9, 6.9, 6.9, 6.9, 6.9, 6.9, 6.9, 6.9, 6.9},\t\t\n\t\t\t\t};\n\t\t\t//prompts user to input number of correct answers for mathematics computation test\n\t\t\tSystem.out.println(\"Input number correct for Mathematics Computation.\");\n\t\t\t//stores user input as an integer\n\t\t\tint mathCompE = input.nextInt();\n\t\t\t//prompts user to input number of correct answers for applied mathematics test\n\t\t\tSystem.out.println(\"Input number correct for Applied Mathematics.\");\n\t\t\t//stores user input as an integer\n\t\t\tint mathAppliedE = input.nextInt();\n\t\t\t//sets the Grade Equivalency instance variable to the double stored in totalMathematicsE\n\t\t\tgradeEquivalency = totalMathematicsE[mathAppliedE][mathCompE];\n\t\t\t//outputs all grade equivalencies for mathematics computation, applied mathematics and total mathematics\n\t\t\tSystem.out.println(\"Mathematics Computation grade equivalency is: \" + mathCompArrayE[mathCompE]);\n\t\t\tSystem.out.println(\"Applied Mathematics grade equivalency is: \" + mathAppliedArrayE[mathAppliedE]);\n\t\t\tSystem.out.println(\"Total Mathematics grade equivalency is: \" + gradeEquivalency);\n\t\t\tbreak;\n\t\t//In the case of test level m\n\t\tcase\"M\":\n\t\t\tdouble[]mathCompArrayM = {1.1, 1.1, 1.1, 1.1, 1.1, 1.2, 1.8, 2.2, 2.4, 2.6, 2.7, 2.9, 3.2, 3.4, 3.5, 3.9, 4.2, 4.6, 4.9, 5.1, 5.5, 6.1, 7.0, 7.8, 9.2, 9.9};\n\t\t\tdouble[]mathAppliedArrayM = {0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 1.5, 2.0, 2.4, 2.9, 3.5, 4.1, 4.7, 5.4, 5.8, 6.2, 6.7, 7.3, 8.2, 9.4, 9.9, 9.9, 9.9, 9.9, 9.9, 9.9};\n\t\t\tdouble[][]totalMathM = {\n\t\t\t\t\t{0.8, 0.8, 0.8, 0.8, 0.8, 1.1, 1.4, 1.5, 1.7, 1.8, 1.9, 2.0, 2.0, 2.1, 2.1, 2.2, 2.3, 2.3, 2.4, 2.4, 2.5, 2.5, 2.7, 2.9, 3.1, 3.5},\n\t\t\t\t\t{0.8, 0.8, 0.8, 0.8, 0.8, 1.1, 1.4, 1.5, 1.7, 1.8, 1.9, 2.0, 2.0, 2.1, 2.1, 2.2, 2.3, 2.3, 2.4, 2.4, 2.5, 2.5, 2.7, 2.9, 3.1, 3.5},\n\t\t\t\t\t{0.8, 0.8, 0.8, 0.8, 0.8, 1.1, 1.4, 1.5, 1.7, 1.8, 1.9, 2.0, 2.0, 2.1, 2.1, 2.2, 2.3, 2.3, 2.4, 2.4, 2.5, 2.5, 2.7, 2.9, 3.1, 3.5},\n\t\t\t\t\t{0.8, 0.8, 0.8, 0.8, 0.8, 1.1, 1.4, 1.5, 1.7, 1.8, 1.9, 2.0, 2.0, 2.1, 2.1, 2.2, 2.3, 2.3, 2.4, 2.4, 2.5, 2.5, 2.7, 2.9, 3.1, 3.5},\n\t\t\t\t\t{0.8, 0.8, 0.8, 0.8, 0.8, 1.1, 1.4, 1.5, 1.7, 1.8, 1.9, 2.0, 2.0, 2.1, 2.1, 2.2, 2.3, 2.3, 2.4, 2.4, 2.5, 2.5, 2.7, 2.9, 3.1, 3.5},\n\t\t\t\t\t{0.8, 0.8, 0.8, 0.8, 0.8, 1.1, 1.4, 1.5, 1.7, 1.8, 1.9, 2.0, 2.0, 2.1, 2.1, 2.2, 2.3, 2.3, 2.4, 2.4, 2.5, 2.5, 2.7, 2.9, 3.1, 3.5},\n\t\t\t\t\t{1.4, 1.4, 1.4, 1.4, 1.4, 1.5, 1.8, 2.0, 2.1, 2.2, 2.3, 2.3, 2.4, 2.4, 2.5, 2.5, 2.6, 2.7, 2.8, 2.9, 3.0, 3.2, 3.3, 3.5, 4.0, 4.8},\n\t\t\t\t\t{1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 2.1, 2.2, 2.3, 2.4, 2.5, 2.5, 2.6, 2.7, 2.8, 2.9, 3.0, 3.1, 3.2, 3.3, 3.4, 3.6, 3.9, 4.3, 4.8, 5.4},\n\t\t\t\t\t{2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.3, 2.4, 2.5, 2.5, 2.6, 2.8, 2.9, 3.0, 3.1, 3.2, 3.3, 3.3, 3.4, 3.6, 3.9, 4.2, 4.5, 4.8, 5.2, 5.9},\n\t\t\t\t\t{2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.4, 2.5, 2.5, 2.7, 2.9, 3.0, 3.1, 3.2, 3.3, 3.4, 3.4, 3.6, 3.9, 4.1, 4.4, 4.6, 4.9, 5.2, 5.6, 6.3},\n\t\t\t\t\t{2.2, 2.2, 2.2, 2.2, 2.2, 2.3, 2.5, 2.6, 2.8, 2.9, 3.1, 3.2, 3.3, 3.4, 3.4, 3.6, 3.9, 4.0, 4.2, 4.5, 4.7, 4.9, 5.2, 5.5, 5.9, 6.9},\n\t\t\t\t\t{2.3, 2.3, 2.3, 2.3, 2.3, 2.4, 2.5, 2.8, 2.9, 3.1, 3.2, 3.3, 3.4, 3.5, 3.8, 4.0, 4.2, 4.4, 4.6, 4.7, 4.9, 5.2, 5.5, 5.7, 6.3, 7.4},\n\t\t\t\t\t{2.4, 2.4, 2.4, 2.4, 2.4, 2.4, 2.6, 2.9, 3.1, 3.2, 3.3, 3.4, 3.7, 3.9, 4.1, 4.3, 4.4, 4.6, 4.8, 5.0, 5.0, 5.4, 5.7, 6.0, 6.7, 7.7},\n\t\t\t\t\t{2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.8, 3.1, 3.2, 3.3, 3.5, 3.8, 4.0, 4.2, 4.4, 4.6, 4.7, 4.9, 5.0, 5.2, 5.5, 5.7, 5.9, 6.3, 7.1, 8.1},\n\t\t\t\t\t{2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.9, 3.2, 3.3, 3.5, 3.8, 4.0, 4.2, 4.4, 4.6, 4.8, 4.9, 5.1, 5.2, 5.5, 5.7, 5.9, 6.2, 6.7, 7.5, 8.5}, \n\t\t\t\t\t{2.6, 2.6, 2.6, 2.6, 2.6, 2.7, 3.1, 3.3, 3.4, 3.8, 4.0, 4.3, 4.5, 4.7, 4.8, 5.0, 5.1, 5.3, 5.5, 5.7, 5.9, 6.1, 6.5, 7.1, 7.7, 9.2},\n\t\t\t\t\t{2.7, 2.7, 2.7, 2.7, 2.7, 2.8, 3.2, 3.4, 3.7, 4.0, 4.3, 4.5, 4.7, 4.8, 5.0, 5.2, 5.3, 5.5, 5.7, 5.8, 6.1, 6.4, 6.8, 7.4, 8.0, 9.4},\n\t\t\t\t\t{2.8, 2.8, 2.8, 2.8, 2.8, 2.9, 3.3, 3.5, 3.9, 4.2, 4.5, 4.7, 4.9, 5.0, 5.2, 5.3, 5.5, 5.7, 5.8, 6.1, 6.3, 6.7, 7.2, 7.6, 8.3, 9.9},\n\t\t\t\t\t{2.9, 2.9, 2.9, 2.9, 2.9, 3.0, 3.4, 3.8, 4.1, 4.4, 4.7, 4.9, 5.0, 5.2, 5.3, 5.5, 5.7, 5.9, 6.0, 6.3, 6.7, 7.1, 7.5, 7.9, 8.9, 9.9},\n\t\t\t\t\t{3.1, 3.1, 3.1, 3.1, 3.1, 3.1, 3.5, 4.0, 4.4, 4.6, 4.9, 5.1, 5.2, 5.3, 5.6, 5.7, 5.9, 6.1, 6.3, 6.6, 7.1, 7.4, 7.7, 8.2, 9.3, 9.9},\n\t\t\t\t\t{3.2, 3.2, 3.2, 3.2, 3.2, 3.3, 3.8, 4.2, 4.6, 4.8, 5.0, 5.2, 5.4, 5.6, 5.7, 5.9, 6.1, 6.3, 6.6, 7.0, 7.3, 7.6, 8.1, 8.8, 9.7, 9.9},\n\t\t\t\t\t{3.3, 3.3, 3.3, 3.3, 3.3, 3.4, 4.0, 4.5, 4.8, 5.0, 5.2, 5.5, 5.7, 5.8, 6.0, 6.2, 6.4, 6.7, 7.1, 7.3, 7.6, 8.0, 8.4, 9.3, 9.9, 9.9},\n\t\t\t\t\t{3.4, 3.4, 3.4, 3.4, 3.4, 3.5, 4.4, 4.7, 5.0, 5.3, 5.5, 5.7, 5.9, 6.1, 6.3, 6.6, 6.8, 7.1, 7.4, 7.7, 8.0, 8.4, 9.2, 9.8, 9.9, 9.9},\n\t\t\t\t\t{3.9, 3.9, 3.9, 3.9, 3.9, 4.0, 4.7, 5.1, 5.3, 5.7, 5.9, 6.1, 6.3, 6.7, 6.9, 7.2, 7.5, 7.7, 7.9, 8.2, 8.8, 9.3, 9.9, 9.9, 9.9, 9.9},\n\t\t\t\t\t{4.6, 4.6, 4.6, 4.6, 4.6, 4.7, 5.2, 5.7, 6.0, 6.3, 6.7, 7.1, 7.4, 7.6, 7.8, 8.1, 8.2, 8.8, 9.2, 9.5, 9.9, 9.9, 9.9, 9.9, 9.9, 9.9},\n\t\t\t\t\t{5.2, 5.2, 5.2, 5.2, 5.2, 5.3, 6.0, 6.4, 7.1, 7.5, 7.7, 8.1, 8.3, 8.9, 9.2, 9.5, 9.9, 9.9, 9.9, 9.9, 9.9, 9.9, 9.9, 9.9, 9.9, 9.9},\n\t\t\t};\n\t\t\tSystem.out.println(\"Input number correct for Mathematics Computation.\");\n\t\t\tint mathCompM = input.nextInt();\n\t\t\tSystem.out.println(\"Input number correct for Applied Mathematics.\");\n\t\t\tint mathAppliedM = input.nextInt();\n\t\t\tgradeEquivalency = totalMathM[mathAppliedM][mathCompM];\n\t\t\tSystem.out.println(\"Mathematics Computation grade equivalency is: \" + mathCompArrayM[mathCompM]);\n\t\t\tSystem.out.println(\"Applied Mathematics grade equivalency is: \" + mathAppliedArrayM[mathAppliedM]);\n\t\t\tSystem.out.println(\"Total Mathematics grade equivalency is: \" + gradeEquivalency);\n\t\t\tbreak;\n\t\t//In the case of test level D\t\n\t\tcase\"D\":\n\t\t\tdouble[] mathCompArrayD = {1.2, 1.2, 1.2, 1.2, 1.2, 1.9, 2.5, 2.7, 3.1, 3.4, 3.9, 4.4, 4.8, 5.1, 5.4, 6.0, 6.7, 7.4, 7.8, 8.4, 9.1, 10.2, 11.4, 12.9, 12.9, 12.9};\n\t\t\tdouble[] mathAppliedArrayD = {1.7, 1.7, 1.7, 1.7, 1.7, 1.7, 2.3, 3.3, 4.3, 5.0, 5.7, 6.0, 6.4, 7.1, 8.0, 9.0, 10.1, 10.8, 11.3, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9};\n\t\t\tdouble[][] totalMathD = {\n\t\t\t\t\t{1.5, 1.5, 1.5, 1.5, 1.5, 1.9, 2.1, 2.3, 2.4, 2.5, 2.5, 2.7, 2.8, 2.9, 3.1, 3.2, 3.3, 3.4, 3.6, 3.9, 4.2, 4.4, 4.7, 5.0, 5.7, 5.8},\n\t\t\t\t\t{1.5, 1.5, 1.5, 1.5, 1.5, 1.9, 2.1, 2.3, 2.4, 2.5, 2.5, 2.7, 2.8, 2.9, 3.1, 3.2, 3.3, 3.4, 3.6, 3.9, 4.2, 4.4, 4.7, 5.0, 5.7, 5.8},\n\t\t\t\t\t{1.5, 1.5, 1.5, 1.5, 1.5, 1.9, 2.1, 2.3, 2.4, 2.5, 2.5, 2.7, 2.8, 2.9, 3.1, 3.2, 3.3, 3.4, 3.6, 3.9, 4.2, 4.4, 4.7, 5.0, 5.7, 5.8},\n\t\t\t\t\t{1.5, 1.5, 1.5, 1.5, 1.5, 1.9, 2.1, 2.3, 2.4, 2.5, 2.5, 2.7, 2.8, 2.9, 3.1, 3.2, 3.3, 3.4, 3.6, 3.9, 4.2, 4.4, 4.7, 5.0, 5.7, 5.8},\n\t\t\t\t\t{1.5, 1.5, 1.5, 1.5, 1.5, 1.9, 2.1, 2.3, 2.4, 2.5, 2.5, 2.7, 2.8, 2.9, 3.1, 3.2, 3.3, 3.4, 3.6, 3.9, 4.2, 4.4, 4.7, 5.0, 5.7, 5.8},\n\t\t\t\t\t{1.5, 1.5, 1.5, 1.5, 1.5, 1.9, 2.1, 2.3, 2.4, 2.5, 2.5, 2.7, 2.8, 2.9, 3.1, 3.2, 3.3, 3.4, 3.6, 3.9, 4.2, 4.4, 4.7, 5.0, 5.7, 5.8},\n\t\t\t\t\t{2.0, 2.0, 2.0, 2.0, 2.0, 2.2, 2.4, 2.5, 2.8, 2.9, 3.1, 3.2, 3.3, 3.4, 3.7, 4.0, 4.2, 4.5, 4.7, 4.9, 5.1, 5.3, 5.6, 5.9, 6.9, 7.1},\n\t\t\t\t\t{2.3, 2.3, 2.3, 2.3, 2.3, 2.4, 2.8, 3.0, 3.2, 3.4, 3.5, 3.9, 4.1, 4.4, 4.6, 4.8, 5.0, 5.2, 5.4, 5.6, 5.8, 6.1, 6.4, 7.1, 8.1, 8.2},\n\t\t\t\t\t{2.4, 2.4, 2.4, 2.4, 2.4, 2.5, 3.0, 3.3, 3.4, 3.7, 4.0, 4.4, 4.6, 4.8, 5.0, 5.2, 5.4, 5.6, 5.8, 6.0, 6.3, 6.7, 7.1, 7.7, 8.9, 9.3},\n\t\t\t\t\t{2.5, 2.5, 2.5, 2.5, 2.5, 2.8, 3.2, 3.4, 3.8, 4.1, 4.4, 4.7, 4.9, 5.1, 5.3, 5.5, 5.7, 5.9, 6.1, 6.4, 6.8, 7.2, 7.6, 8.2, 9.5, 10.1},\n\t\t\t\t\t{2.5, 2.5, 2.5, 2.5, 2.5, 2.9, 3.3, 3.7, 4.1, 4.4, 4.7, 4.9, 5.1, 5.3, 5.6, 5.8, 6.0, 6.3, 6.5, 6.9, 7.2, 7.6, 8.0, 8.8, 10.3, 10.5},\n\t\t\t\t\t{2.6, 2.6, 2.6, 2.6, 2.6, 3.0, 3.4, 3.9, 4.4, 4.7, 4.9, 5.1, 5.3, 5.6, 5.8, 6.0, 6.3, 6.6, 7.0, 7.3, 7.6, 7.9, 8.3, 9.3, 10.8, 11.0},\n\t\t\t\t\t{2.8, 2.8, 2.8, 2.8, 2.8, 3.1, 3.6, 4.2, 4.6, 4.9, 5.1, 5.3, 5.6, 5.8, 6.0, 6.3, 6.6, 7.0, 7.3, 7.6, 7.9, 8.2, 8.9, 9.7, 11.2, 11.6},\n\t\t\t\t\t{2.9, 2.9, 2.9, 2.9, 2.9, 3.3, 3.9, 4.4, 4.8, 5.1, 5.3, 5.5, 5.8, 6.0, 6.3, 6.6, 7.0, 7.3, 7.6, 7.9, 8.2, 8.8, 9.4, 10.3, 11.8, 12.4},\n\t\t\t\t\t{3.0, 3.0, 3.0, 3.0, 3.0, 3.4, 4.2, 4.7, 5.0, 5.2, 5.5, 5.7, 6.0, 6.3, 6.6, 7.0, 7.3, 7.6, 7.8, 8.2, 8.8, 9.3, 10.0, 10.7, 12.4, 12.9},\n\t\t\t\t\t{3.1, 3.1, 3.1, 3.1, 3.1, 3.5, 4.4, 4.8, 5.2, 5.4, 5.7, 5.9, 6.2, 6.5, 6.9, 7.2, 7.6, 7.8, 8.2, 8.7, 9.2, 9.6, 10.4, 11.0, 12.9, 12.9},\n\t\t\t\t\t{3.2, 3.2, 3.2, 3.2, 3.2, 3.7, 4.6, 5.0, 5.3, 5.6, 5.9, 6.1, 6.4, 6.8, 7.2, 7.5, 7.8, 8.2, 8.7, 9.2, 9.5, 10.2, 10.7, 11.4, 12.9, 12.9},\n\t\t\t\t\t{3.3, 3.3, 3.3, 3.3, 3.3, 3.9, 4.7, 5.2, 5.5, 5.8, 6.1, 6.4, 6.8, 7.1, 7.5, 7.8, 8.1, 8.5, 9.2, 9.5, 10.1, 10.5, 11.0, 12.0, 12.9, 12.9},\n\t\t\t\t\t{3.4, 3.4, 3.4, 3.4, 3.4, 4.2, 4.9, 5.3, 5.7, 6.0, 6.3, 6.7, 7.1, 7.5, 7.7, 8.1, 8.4, 9.0, 9.4, 10.1, 10.5, 10.9, 11.4, 12.8, 12.9, 12.9},\n\t\t\t\t\t{3.6, 3.6, 3.6, 3.6, 3.6, 4.4, 5.1, 5.6, 5.9, 6.2, 6.7, 7.1, 7.4, 7.7, 8.1, 8.4, 9.0, 9.4, 10.0, 10.4, 10.9, 11.3, 12.2, 12.9, 12.9, 12.9},\n\t\t\t\t\t{3.9, 3.9, 3.9, 3.9, 3.9, 4.6, 5.3, 5.7, 6.1, 6.5, 7.0, 7.4, 7.7, 8.0, 8.3, 8.9, 9.4, 10.0, 10.4, 10.9, 11.2, 11.8, 12.8, 12.9, 12.9, 12.9},\n\t\t\t\t\t{4.1, 4.1, 4.1, 4.1, 4.1, 4.8, 5.5, 6.0, 6.4, 6.9, 7.4, 7.7, 8.0, 8.4, 9.0, 9.4, 10.1, 10.5, 10.9, 11.2, 11.8, 12.8, 12.9, 12.9, 12.9, 12.9},\n\t\t\t\t\t{4.4, 4.4, 4.4, 4.4, 4.4, 5.1, 5.8, 6.3, 6.9, 7.4, 7.7, 8.1, 8.5, 9.2, 9.5, 10.2, 10.5, 11.0, 11.4, 12.0, 12.8, 12.9, 12.9, 12.9, 12.9, 12.9},\n\t\t\t\t\t{4.8, 4.8, 4.8, 4.8, 4.8, 5.4, 6.2, 6.9, 7.5, 7.8, 8.2, 8.9, 9.3, 10.0, 10.4, 10.9, 11.2, 11.8, 12.4, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9},\n\t\t\t\t\t{5.2, 5.2, 5.2, 5.2, 5.2, 5.9, 7.1, 7.7, 8.2, 8.9, 9.4, 10.1, 10.5, 11.0, 11.4, 12.2, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9},\n\t\t\t\t\t{6.4, 6.4, 6.4, 6.4, 6.4, 7.5, 8.8, 9.8, 10.6, 11.2, 11.8, 12.8, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9},\n\t\t\t};\n\t\t\tSystem.out.println(\"Input number correct for Mathematics Computation.\");\n\t\t\tint mathCompD = input.nextInt();\n\t\t\tSystem.out.println(\"Input number correct for Applied Mathematics.\");\n\t\t\tint mathAppliedD = input.nextInt();\n\t\t\tgradeEquivalency = totalMathD [mathAppliedD][mathCompD];\n\t\t\tSystem.out.println(\"Mathematics Computation grade equivalency is: \" + mathCompArrayD[mathCompD]);\n\t\t\tSystem.out.println(\"Applied Mathematics grade equivalency is: \" + mathAppliedArrayD[mathAppliedD]);\n\t\t\tSystem.out.println(\"Total Mathematics grade equivalency is: \" + gradeEquivalency);\n\t\t\tbreak;\n\t\t//In the case of test level A\n\t\tcase\"A\":\n\t\t\tdouble[] mathCompArrayA = {1.8, 1.8, 1.8, 1.8, 1.8, 3.1, 4.2, 4.9, 5.3, 5.8, 6.3, 6.9, 7.4, 7.8, 8.1, 8.5, 9.0, 9.8, 10.4, 11.2, 12.1, 12.9, 12.9, 12.9, 12.9, 12.9};\n\t\t\tdouble[] mathAppliedArrayA = {2.3, 2.3, 2.3, 2.3, 2.3, 2.3, 3.9, 5.4, 6.1, 6.7, 7.6, 8.6, 9.8, 10.6, 11.0, 11.7, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9};\n\t\t\tdouble[][] totalMathA = {\n\t\t\t\t\t{2.1, 2.1, 2.1, 2.1, 2.1, 2.8, 3.1, 3.4, 3.5, 3.9, 4.1, 4.3, 4.5, 4.6, 4.8, 4.9, 5.0, 5.2, 5.3, 5.5, 5.7, 5.9, 6.1, 6.7, 7.6, 8.9},\n\t\t\t\t\t{2.1, 2.1, 2.1, 2.1, 2.1, 2.8, 3.1, 3.4, 3.5, 3.9, 4.1, 4.3, 4.5, 4.6, 4.8, 4.9, 5.0, 5.2, 5.3, 5.5, 5.7, 5.9, 6.1, 6.7, 7.6, 8.9},\n\t\t\t\t\t{2.1, 2.1, 2.1, 2.1, 2.1, 2.8, 3.1, 3.4, 3.5, 3.9, 4.1, 4.3, 4.5, 4.6, 4.8, 4.9, 5.0, 5.2, 5.3, 5.5, 5.7, 5.9, 6.1, 6.7, 7.6, 8.9},\n\t\t\t\t\t{2.1, 2.1, 2.1, 2.1, 2.1, 2.8, 3.1, 3.4, 3.5, 3.9, 4.1, 4.3, 4.5, 4.6, 4.8, 4.9, 5.0, 5.2, 5.3, 5.5, 5.7, 5.9, 6.1, 6.7, 7.6, 8.9},\n\t\t\t\t\t{2.1, 2.1, 2.1, 2.1, 2.1, 2.8, 3.1, 3.4, 3.5, 3.9, 4.1, 4.3, 4.5, 4.6, 4.8, 4.9, 5.0, 5.2, 5.3, 5.5, 5.7, 5.9, 6.1, 6.7, 7.6, 8.9},\n\t\t\t\t\t{2.1, 2.1, 2.1, 2.1, 2.1, 2.8, 3.1, 3.4, 3.5, 3.9, 4.1, 4.3, 4.5, 4.6, 4.8, 4.9, 5.0, 5.2, 5.3, 5.5, 5.7, 5.9, 6.1, 6.7, 7.6, 8.9},\n\t\t\t\t\t{2.5, 2.5, 2.5, 2.5, 2.5, 3.3, 4.0, 4.5, 4.7, 5.0, 5.2, 5.3, 5.5, 5.6, 5.8, 5.9, 6.1, 6.3, 6.4, 6.8, 7.1, 7.4, 7.7, 8.2, 9.7, 11.2},\n\t\t\t\t\t{2.8, 2.8, 2.8, 2.8, 2.8, 3.9, 4.7, 5.1, 5.3, 5.6, 5.7, 5.9, 6.1, 6.3, 6.5, 6.7, 7.1, 7.2, 7.5, 7.7, 8.0, 8.2, 8.9, 9.6, 11.0, 12.9},\n\t\t\t\t\t{3.0, 3.0, 3.0, 3.0, 3.0, 4.4, 5.0, 5.4, 5.7, 5.9, 6.2, 6.4, 6.7, 6.9, 7.1, 7.4, 7.6, 7.8, 8.1, 8.2, 8.8, 9.3, 9.8, 10.5, 12.2, 12.9},\n\t\t\t\t\t{3.1, 3.1, 3.1, 3.1, 3.1, 4.7, 5.3, 5.7, 6.0, 6.3, 6.6, 6.9, 7.1, 7.4, 7.6, 7.8, 8.0, 8.2, 8.7, 9.2, 9.4, 10.0, 10.5, 11.1, 12.9, 12.9},\n\t\t\t\t\t{3.3, 3.3, 3.3, 3.3, 3.3, 4.9, 5.6, 6.0, 6.3, 6.7, 7.1, 7.3, 7.5, 7.7, 8.0, 8.2, 8.4, 8.9, 9.2, 9.5, 10.1, 10.5, 11.0, 11.8, 12.9, 12.9},\n\t\t\t\t\t{3.4, 3.4, 3.4, 3.4, 3.4, 5.1, 5.7, 6.2, 6.7, 7.1, 7.4, 7.6, 7.8, 8.0, 8.2, 8.7, 9.0, 9.3, 9.6, 10.1, 10.5, 10.9, 11.4, 12.4, 12.9, 12.9},\n\t\t\t\t\t{3.5, 3.5, 3.5, 3.5, 3.5, 5.2, 6.0, 6.4, 7.0, 7.4, 7.6, 7.8, 8.1, 8.3, 8.8, 9.2, 9.4, 9.7, 10.2, 10.5, 10.9, 11.2, 12.0, 12.9, 12.9, 12.9},\n\t\t\t\t\t{3.7, 3.7, 3.7, 3.7, 3.7, 5.5, 6.2, 6.8, 7.2, 7.6, 7.8, 8.2, 8.4, 8.9, 9.2, 9.4, 9.8, 10.3, 10.5, 10.9, 11.2, 11.8, 12.6, 12.9, 12.9, 12.9},\n\t\t\t\t\t{3.9, 3.9, 3.9, 3.9, 3.9, 5.6, 6.4, 7.1, 7.5, 7.8, 8.2, 8.4, 8.9, 9.2, 9.5, 10.0, 10.3, 10.5, 10.9, 11.2, 11.8, 12.4, 12.9, 12.9, 12.9, 12.9},\n\t\t\t\t\t{4.1, 4.1, 4.1, 4.1, 4.1, 5.8, 6.7, 7.3, 7.7, 8.1, 8.4, 8.9, 9.2, 9.5, 10.0, 10.3, 10.5, 10.9, 11.2, 11.6, 12.2, 12.9, 12.9, 12.9, 12.9, 12.9},\n\t\t\t\t\t{4.3, 4.3, 4.3, 4.3, 4.3, 5.9, 7.0, 7.6, 8.0, 8.3, 8.9, 9.3, 9.5, 10.1, 10.4, 10.5, 10.9, 11.2, 11.6, 12.2, 12.8, 12.9, 12.9, 12.9, 12.9, 12.9},\n\t\t\t\t\t{4.5, 4.5, 4.5, 4.5, 4.5, 6.1, 7.2, 7.8, 8.2, 8.8, 9.3, 9.5, 10.1, 10.4, 10.6, 11.0, 11.2, 11.8, 12.2, 12.8, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9},\n\t\t\t\t\t{4.7, 4.7, 4.7, 4.7, 4.7, 6.4, 7.5, 8.1, 8.8, 9.2, 9.6, 10.1, 10.4, 10.7, 11.0, 11.3, 11.8, 12.4, 12.8, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9},\n\t\t\t\t\t{4.9, 4.9, 4.9, 4.9, 4.9, 6.7, 7.7, 8.3, 9.2, 9.5, 10.2, 10.5, 10.8, 11.0, 11.4, 11.8, 12.4, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9},\n\t\t\t\t\t{5.0, 5.0, 5.0, 5.0, 5.0, 7.1, 8.1, 8.9, 9.5, 10.2, 10.5, 10.9, 11.2, 11.6, 12.0, 12.4, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9},\n\t\t\t\t\t{5.2, 5.2, 5.2, 5.2, 5.2, 7.4, 8.4, 9.4, 10.1, 10.5, 11.0, 11.3, 11.8, 12.4, 12.8, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9},\n\t\t\t\t\t{5.5, 5.5, 5.5, 5.5, 5.5, 7.7, 9.2, 10,1, 10.6, 11.0, 11.6, 12.0, 12.6, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9},\n\t\t\t\t\t{5.8, 5.8, 5.8, 5.8, 5.8, 8.2, 9.7, 10.6, 11.2, 11.8, 12.6, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9},\n\t\t\t\t\t{6.4, 6.4, 6.4, 6.4, 6.4, 9.4, 10.9, 11.8, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9},\n\t\t\t\t\t{7.6, 7.6, 7.6, 7.6, 7.6, 11.0, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9},\n\t\t\t};\n\t\t\tSystem.out.println(\"Input number correct for Mathematics Computation.\");\n\t\t\tint mathCompA = input.nextInt();\n\t\t\tSystem.out.println(\"Input number correct for Applied Mathematics.\");\n\t\t\tint mathAppliedA = input.nextInt();\n\t\t\tgradeEquivalency = totalMathA[mathAppliedA][mathCompA];\n\t\t\tSystem.out.println(\"Mathematics Computation grade equivalency is: \" + mathCompArrayA[mathCompA]);\n\t\t\tSystem.out.println(\"Applied Mathematics grade equivalency is: \" + mathAppliedArrayA[mathAppliedA]);\n\t\t\tSystem.out.println(\"Total Mathematics grade equivalency is: \" + totalMathA[mathAppliedA][mathCompA]);\n\t\t\tbreak;\t\t\t\n\t\t}\n\t}",
"public abstract int levelRequired();",
"@Test\n public void overExample2() {\n MarbleSolitaireModel exampleBoard = new TriangleSolitaireModelImpl(1);\n assertEquals(true, exampleBoard.isGameOver());\n }",
"public void testThemeLevel() {\n\t\tBoard brd = new Board();\n\t\tThemeLevel lvl = new ThemeLevel(brd);\n\n\t\tassertEquals(\"Theme\", lvl.getLevelType());\n\n\n\t\tString name = \"BestTheme\";\n\t\tlvl.setThemeName(name);\n\n\n\t\tassertEquals(name, lvl.getThemeName());\n\n\n\n\t\tDictionary dictionary = new Dictionary();\n\t\tlvl.setDictionary(dictionary);\n\t\tassertEquals(dictionary, lvl.getDictionary());\n\n\n\t}",
"@Test\n public void testGetLivePointSuper() {\n System.out.println(\"getLivePoint\");\n Enemy instance = new SuperEnemy(new Coordinates(90,90));\n int expResult = 2;\n int result = instance.getLivePoint();\n assertEquals(expResult, result);\n }",
"@Test\n public void testTie() {\n Assert.assertTrue(\n new Game(\n new Grid3x3(),\n new PredefinedPlayer(new int[] {0, 2, 4, 5, 7}),\n new PredefinedPlayer(new int[] {1, 3, 6, 8})\n ).play().winner().empty());\n }",
"@Test\n public void overExample1() {\n MarbleSolitaireModel exampleBoard = new TriangleSolitaireModelImpl();\n assertEquals(false, exampleBoard.isGameOver());\n }",
"@Test\n public void testGeneralPos() {\n Game game = new Game(2);\n FaithTrack faith = game.getPlayers().get(0).getFaithTrack();\n faith.increasePos(6);\n assertEquals(faith.getTrackPos(), 6);\n assertTrue(faith.isVatican());\n assertEquals(faith.getVaticanSection(), 1);\n assertFalse(faith.isPopeSpace());\n assertEquals(faith.getPosPoints(), 2);\n faith.increasePos(2);\n assertTrue(faith.isVatican());\n assertEquals(faith.getVaticanSection(), 1);\n assertTrue(faith.isPopeSpace());\n }",
"public abstract boolean levelUp();",
"@Test\n void testPlayerAliveNotRemainingPellets() {\n Mockito.when(level.isAnyPlayerAlive()).thenReturn(true);\n Mockito.when(level.remainingPellets()).thenReturn(0);\n\n game.start();\n\n Assertions.assertThat(game.isInProgress()).isFalse();\n Mockito.verify(level, Mockito.times(0)).addObserver(Mockito.any());\n Mockito.verify(level, Mockito.times(0)).start();\n }",
"@Test\n\tpublic void testGet() {\n\t\tassertTrue(LevelGen.connected(LevelGen.get(100, 100)));\n\t}",
"public void changeLevel(Level level) {\n if (Consts.TEST) {\n this.level = level;\n return;\n }\n\n try {\n level.validate();\n } catch (Exception e) {\n e.printStackTrace();\n level = this.level;\n }\n this.level = level;\n entities.clear();\n pacman.respawn(level.getRandomPacmanSpawn());\n // items spawnen\n for (int y = 0; y < level.getHeight(); y++) {\n for (int x = 0; x < level.getWidth(); x++) {\n if (level.getField(x, y) == MapModule.DOT)\n entities.add(new Dot(x, y));\n else if (level.getField(x, y) == MapModule.POWERUP)\n entities.add(new PowerUp(x, y));\n else if (level.getField(x, y) == MapModule.SPEEDUP)\n entities.add(new SpeedUp(x, y));\n else if (level.getField(x, y) == MapModule.TELEPORT)\n entities.add(new Teleporter(x, y));\n }\n }\n\n // 4 Geister im normalen Spiel, 1 Geist fuer Tests\n for (int i = 0; i < (Consts.TEST ? 1 : Consts.NUM_GHOSTS); i++) {\n Ghost g = new Ghost(i);\n g.respawn(level.getNextGhostSpawn());\n entities.add(g);\n }\n }",
"@Test\n public void runNewGameTest() {\n\tassertNotEquals(-1,score);\n }",
"@Test\n void testPlayerAliveRemainingPellets() {\n Mockito.when(level.isAnyPlayerAlive()).thenReturn(true);\n Mockito.when(level.remainingPellets()).thenReturn(1);\n\n game.start();\n\n Assertions.assertThat(game.isInProgress()).isTrue();\n Mockito.verify(level, Mockito.times(1)).addObserver(Mockito.eq(game));\n Mockito.verify(level, Mockito.times(1)).start();\n }",
"@Test\n public void isMyPetHungry() {\n int isHungry = underTest.getHungerLevel();\n // Assert\n assertThat(isHungry, is(5));\n }",
"@Override\n public void setRunLevel(int level) {\n\n }",
"@Override\n public void runTest() {\n }",
"@Test\n\tpublic void testPowerUpView_6()\n\t\tthrows Exception {\n\t\tGameObject gameObject = new Player(new Point());\n\t\tGfxFactory gfxFactory = new GfxFactory();\n\n\t\tPowerUpView result = new PowerUpView(gameObject, gfxFactory);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.NoClassDefFoundError: common.Actor\n\t\t// at java.lang.Class.getDeclaredConstructors0(Native Method)\n\t\t// at java.lang.Class.privateGetDeclaredConstructors(Class.java:2585)\n\t\t// at java.lang.Class.getConstructor0(Class.java:2885)\n\t\t// at java.lang.Class.getDeclaredConstructor(Class.java:2058)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.InstanceCreationExpression.findConstructor(InstanceCreationExpression.java:572)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.InstanceCreationExpression.execute(InstanceCreationExpression.java:452)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.InstanceCreationExpression.execute(InstanceCreationExpression.java:449)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionRequest.execute(ExecutionRequest.java:286)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.communication.LocalExecutionClient$1.run(LocalExecutionClient.java:158)\n\t\t// at java.lang.Thread.run(Thread.java:745)\n\t\tassertNotNull(result);\n\t}",
"@Test\n public void test9() { \n Board board9 = new Board();\n board9.put(1,1,2);\n board9.put(1,2,2);\n board9.put(1,3,2);\n assertTrue(board9.checkWin());\n }",
"@Test\n public void testHasPieceInBagTrue() {\n System.out.println(\"hasPieceInBagTrue\");\n Player instance = new Player(PlayerColor.WHITE, \"\");\n\n boolean expResult = true;\n boolean result = instance.hasPieceInBag();\n\n assertEquals(expResult, result);\n }",
"@Test\n\tpublic void testPowerUpView_7()\n\t\tthrows Exception {\n\t\tGameObject gameObject = new PowerUp(new Point());\n\t\tGfxFactory gfxFactory = new GfxFactory();\n\n\t\tPowerUpView result = new PowerUpView(gameObject, gfxFactory);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.NoClassDefFoundError: Could not initialize class org.apache.log4j.LogManager\n\t\t// at org.apache.log4j.Logger.getLogger(Logger.java:116)\n\t\t// at client.view.GfxFactory.<init>(GfxFactory.java:45)\n\t\tassertNotNull(result);\n\t}",
"@Test\n public void testCurrentSugarLevelAndChangeSugarLevel() {\n System.out.println(\"changeSugarLevel\");\n\n Sugarman instance = new Sugarman();\n instance.getSugarlevel();\n instance.changeSugarLevel(20);\n\n int result = instance.getSugarlevel();\n int expResult = 70;\n assertEquals(result, expResult);\n\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }",
"@Test\r\n public void testLandOn() {\r\n SnakeSquare instance = new SnakeSquare(33, 21);\r\n assertEquals(21, instance.landOn());\r\n }",
"@Test\n void testPlayerNotAliveRemainingPellets() {\n Mockito.when(level.isAnyPlayerAlive()).thenReturn(false);\n Mockito.when(level.remainingPellets()).thenReturn(1);\n\n game.start();\n\n Assertions.assertThat(game.isInProgress()).isFalse();\n Mockito.verify(level, Mockito.times(0)).addObserver(Mockito.any());\n Mockito.verify(level, Mockito.times(0)).start();\n }",
"@Test\n public void testAccessLevelDoesNotExist(){\n GenerateLevel generateLevel = new GenerateLevel(20,\n \"XmlFiles/missingStartGoalPos.xml\");\n generateLevel.loadLevel(2);\n }",
"@Test\n public void dpsAtStartingLevel_valid_shouldPass(){\n RPGCharacter warrior = CreateCharacter.createChar(4);\n double num = 1 * 1.05;\n assertEquals(num, warrior.getDamage(),0);\n\n }",
"@Test\n public void hasToner(){\n assertEquals(5000, printer.getTonerLevel());\n }",
"@Test\n public void test11() { \n Board board11 = new Board();\n board11.put(1,3,1);\n board11.put(2,3,1);\n board11.put(3,3,1);\n assertTrue(board11.checkWin());\n }",
"@Test\n public void testGetPower() {\n assertEquals(hero.getPower(), 100);\n System.out.println(testName.getMethodName() + \" PASSED.\");\n \n }",
"@Test\n public void buildAgainTrue() {\n nextWorkerCell.setLevel(0);\n workerHephaestus.setCurrentWorkerCell(baseWorkerCell);\n workerHephaestus.build(nextWorkerCell);\n workerHephaestus.specialPower(nextWorkerCell);\n assertEquals(2, nextWorkerCell.getLevel());\n\n }",
"public void testGetSubDimensionality()\n {\n RandomSubVectorThresholdLearner<String> instance = new RandomSubVectorThresholdLearner<String>();\n\n instance.setPercentToSample(0.5);\n assertEquals(5, instance.getSubDimensionality(10));\n\n instance.setPercentToSample(0.25);\n assertEquals(2, instance.getSubDimensionality(9));\n\n instance.setPercentToSample(1.0);\n assertEquals(9, instance.getSubDimensionality(9));\n\n instance.setPercentToSample(0.0);\n assertEquals(1, instance.getSubDimensionality(9));\n }",
"public void testCheckPlrSquare() {\n\t\tGame game = new Game(5, \"\");\n\t\t//Will create 3 enemyShips and retrieve test values after each one is added and method run\n\t\tBattleStar b1 = new BattleStar(game.getTheGrid());\n\t\tBattleStar b2 = new BattleStar(game.getTheGrid());\n\t\tBattleStar b3 = new BattleStar(game.getTheGrid());\n\t\t\n\t\t//Case: 2\n\t\tgame.getTheGrid().put(0, 0, b1);\n\t\tgame.getAllEnemys().add(b1);\n\t\tgame.checkPlrSquare();\n\t\tboolean case2expected = game.getAllEnemys().contains(b1);\n\t\t\n\t\t//default: (i.e. more than two enemy ships)\n\t\tgame.getTheGrid().put(0, 0, b2);\n\t\tgame.getTheGrid().put(0, 0, b3);\n\t\tgame.checkPlrSquare();\n\t\tboolean actualDefault = game.isGameOver(); \n\t\t\n\t\t//Check outcome; Ideally more scenarios would be tested\n\t\tassertTrue(actualDefault && !case2expected);\n\t}",
"@Test\n public void testPawnSide() {\n // initialize the complete chess board\n ChessBoard chessBoard = init(\"CHESS\");\n\n // compare the side of the pawn on the table to the correct side\n for (int i = 0; i < 8; ++i) {\n assertEquals(north, chessBoard.getPiece(1, i).getSide());\n assertEquals(south, chessBoard.getPiece(6, i).getSide());\n }\n }",
"@Test\n public void test10() { \n Board board10 = new Board();\n board10.put(1,1,2);\n board10.put(2,2,2);\n board10.put(3,3,2);\n assertTrue(board10.checkWin());\n }",
"@Test\n\tpublic void testConnected() {\n\t\tLevel level = new Level(100, 100);\n\t\tassertTrue(LevelGen.connected(level.getGrid()));\n\t}",
"public void testSaveNewPuzzleLevel()\n {\n window.comboBox(\"levelTypeSelector\").selectItem(\"Puzzle\");\n\n window.radioButton(\"activeTileButton\").click();\n window.panel(\"square0\").click();\n window.button(\"saveButton\").click();\n ClassLoader classLoader = getClass().getClassLoader();\n File folder = null;\n try\n {\n folder = new File(classLoader.getResource(\"levels\").toURI().getPath());\n } catch (URISyntaxException e)\n {\n e.printStackTrace();\n }\n File[] listOfFiles = folder.listFiles();\n\n Arrays.sort(listOfFiles, new Comparator<File>() {\n public int compare(File f1, File f2) {\n try {\n int i1 = Integer.parseInt(f1.getName().replace(\"level\", \"\").replace(\".txt\", \"\"));\n int i2 = Integer.parseInt(f2.getName().replace(\"level\", \"\").replace(\".txt\", \"\"));\n return i1 - i2;\n } catch (NumberFormatException e) {\n throw new AssertionError(e);\n }\n }\n });\n\n assertTrue(listOfFiles[listOfFiles.length - 1].getPath().contains(\"level\" +\n listOfFiles.length +\".txt\"));\n\n String content = null;\n Scanner scanner = null;\n try\n {\n scanner = new Scanner(listOfFiles[listOfFiles.length - 1]);\n content = scanner.useDelimiter(\"\\\\Z\").next();\n scanner.close();\n } catch (FileNotFoundException e)\n {\n e.printStackTrace();\n }\n String correctContent = \"NewLevel Puzzle 1 0 10 50 0 20 30 20 15 10 5 70 20 \" +\n \"10 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\" +\n \" 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\" +\n \" 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 \";\n assertEquals(correctContent, content);\n }",
"@Test\n public void testIsSolved() {\n setUpCorrect();\n assertTrue(boardManager.puzzleSolved());\n swapFirstTwoTiles();\n assertFalse(boardManager.puzzleSolved());\n }",
"@Test\n public void testGetScore() {\n System.out.println(\"getScore\");\n Player instance = new Player(PlayerColor.WHITE, \"\");\n int expResult = 5;\n instance.setScore(expResult);\n int result = instance.getScore();\n assertEquals(expResult, result);\n }",
"@Test\n void initPosition() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.initPlayer();\n\n assertTrue(p.getPh().getPowerupDeck().getSize() == 2);\n\n Powerup pu = p.getPh().getPowerupDeck().getPowerups().get(0);\n p.initPosition(p.getPh().getPowerupDeck().getPowerups().get(0).getName(), p.getPh().getPowerupDeck().getPowerups().get(0).getColor() );\n\n assertTrue(p.getPh().getPowerupDeck().getSize() == 1 && Board.getSpawnpoint(p.getPlayerPosition().getNum()).getColor() == pu.getColor());\n }",
"@Test\n public void testIsOccupied()\n {\n try\n {\n Square s = new Square();\n\n assertFalse(s.isOccupied()); // Should be false as no tile on it yet\n\n s.setTile(Tile.A); // Add a tile\n\n assertTrue(s.isOccupied()); // Should now be true\n }\n catch(Exception ex)\n {\n fail(\"No exception should be thrown when adding a tile to a square normally.\");\n }\n }",
"boolean hasLevel();",
"boolean hasLevel();",
"boolean hasLevel();",
"boolean hasLevel();",
"@Test\n public void testAddPoints() {\n System.out.println(\"addPoints\");\n int points = ScoreBoard.HARD_DROP_POINTS_PER_ROW * 4 + ScoreBoard.POINTS_PER_LINE;\n instance.addPoints(points);\n int result = instance.getPoints();\n int expResult = 108;\n assertEquals(result, expResult);\n }",
"@Test\n public void testGetTile()\n {\n try\n {\n Square s = new Square();\n\n assertNull(s.getTile()); // Should return null as no tile placed yet.\n\n s.setTile(Tile.E); // Add a tile\n\n assertEquals(Tile.E, s.getTile()); // Check the tile is now on the square\n }\n catch(Exception ex)\n {\n fail(\"No exception should be thrown when getting a Tile from the square.\");\n }\n }",
"public static Level[] createPhaseTwoLevel(){\n\t\tLevel[] testLevels = new Level[1];\n\t\t\n\t\tSquare Level1Piece1[] = new Square[6]; \n\t\tLevel1Piece1[0] = new Square(0,0);\n\t\tLevel1Piece1[1] = new Square(1,0);\n\t\tLevel1Piece1[2] = new Square(2,0);\n\t\tLevel1Piece1[3] = new Square(3,0);\n\t\tLevel1Piece1[4] = new Square(4,0);\n\t\tLevel1Piece1[5] = new Square(5,0);\t\t\n\t\t\n\t\tSquare Level1Piece2[] = new Square[6]; \n\t\tLevel1Piece2[0] = new Square(0,1);\n\t\tLevel1Piece2[1] = new Square(0,0);\n\t\tLevel1Piece2[2] = new Square(1,0);\n\t\tLevel1Piece2[3] = new Square(2,0);\n\t\tLevel1Piece2[4] = new Square(3,0);\n\t\tLevel1Piece2[5] = new Square(4,0);\t\t\n\t\t\n\t\tSquare Level1Piece3[] = new Square[6]; \n\t\tLevel1Piece3[0] = new Square(0,0);\n\t\tLevel1Piece3[1] = new Square(0,1);\n\t\tLevel1Piece3[2] = new Square(0,2);\n\t\tLevel1Piece3[3] = new Square(1,0);\n\t\tLevel1Piece3[4] = new Square(1,1);\n\t\tLevel1Piece3[5] = new Square(1,2);\t\t\n\t\t\n\t\tSquare Level1Piece4[] = new Square[6]; \n\t\tLevel1Piece4[0] = new Square(0,0);\n\t\tLevel1Piece4[1] = new Square(1,0);\n\t\tLevel1Piece4[2] = new Square(1,1);\n\t\tLevel1Piece4[3] = new Square(1,2);\n\t\tLevel1Piece4[4] = new Square(1,3);\n\t\tLevel1Piece4[5] = new Square(2,3);\n\t\t\n\t\tSquare Level1Piece5[] = new Square[6]; \n\t\tLevel1Piece5[0] = new Square(2,0);\n\t\tLevel1Piece5[1] = new Square(2,1);\n\t\tLevel1Piece5[2] = new Square(1,1);\n\t\tLevel1Piece5[3] = new Square(0,1);\n\t\tLevel1Piece5[4] = new Square(0,2);\n\t\tLevel1Piece5[5] = new Square(1,2);\t\n\t\t\n\t\tSquare Level1Piece6[] = new Square[6]; \n\t\tLevel1Piece6[0] = new Square(2,0);\n\t\tLevel1Piece6[1] = new Square(2,1);\n\t\tLevel1Piece6[2] = new Square(1,1);\n\t\tLevel1Piece6[3] = new Square(0,1);\n\t\tLevel1Piece6[4] = new Square(1,2);\n\t\tLevel1Piece6[5] = new Square(2,2);\t\n\t\t\n\t\tArrayList<Piece> bullPenPieceArray=new ArrayList<Piece>();\n\t\tbullPenPieceArray.add(new Piece(0,0,Level1Piece1,Level1Piece1[0],2));\n\t\tbullPenPieceArray.get(0).setColor(Color.BLUE);\n\t\tbullPenPieceArray.add(new Piece(0,0,Level1Piece2,Level1Piece2[0],2));\n\t\tbullPenPieceArray.get(1).setColor(Color.GREEN);\n\t\tbullPenPieceArray.add(new Piece(0,0,Level1Piece3,Level1Piece3[0],2));\n\t\tbullPenPieceArray.get(2).setColor(Color.YELLOW);\n\t\tbullPenPieceArray.add(new Piece(0,0,Level1Piece4,Level1Piece4[0],2));\n\t\tbullPenPieceArray.get(3).setColor(Color.ORANGE);\n\t\tbullPenPieceArray.add(new Piece(0,0,Level1Piece5,Level1Piece5[0],2));\n\t\tbullPenPieceArray.get(4).setColor(Color.RED);\n\t\tbullPenPieceArray.add(new Piece(0,0,Level1Piece6,Level1Piece6[0],2));\n\t\tbullPenPieceArray.get(5).setColor(Color.PINK);\n\t\tBullpen bp = new Bullpen(bullPenPieceArray);\n\t\t\n\t\t\n\t\tSquare[] sq = new Square[36]; \n\t\tfor (int i1=0;i1<6;i1++){\n\t\t\tfor (int j=0;j<6;j++){\n\t\t\t\tsq[i1*6+j] = new Square(i1,j);\n\t\t\t}\n\t\t}\n\t\tSquare hitSquares[] = new Square[6]; \n\t\thitSquares[0] = new Square(0,0);\n\t\thitSquares[1] = new Square(1,0);\n\t\thitSquares[2] = new Square(2,0);\n\t\thitSquares[3] = new Square(3,0);\n\t\thitSquares[4] = new Square(4,0);\n\t\thitSquares[5] = new Square(5,0);\t\n\t\tHint hints = new Hint(hitSquares);\n\t\tBoard bd = new Board(sq);\n\t\tbd.sethint(hints);\n\t\t\n\t\ttestLevels[0] = new PuzzleLevel(0,GetLevelTpye(0%3),bd,bp,8);\n\t\ttestLevels[0].updateLevelStar(new Achievement(0));\n\t\t\n\t\treturn testLevels;\n\t}",
"@Test\n void test() {\n Game g = init(\"gen_2p_02\");\n List<Player> players = g.getData().getPlayers();\n wrappedIllegalCommand(g, players.get(0), \"tool 6\");\n wrappedLegalCommand(g, players.get(0), \"pick 1\");\n assertTrue(g.isUndoAvailable());\n wrappedLegalCommand(g, players.get(0), \"tool 6\");\n assertFalse(g.isUndoAvailable());\n lightestShade(g, players);\n notLightestShade(g, players);\n }",
"@Test\n public void testSetPower() {\n hero.setPower(0);\n assertEquals(hero.getPower(), 0);\n System.out.println(testName.getMethodName() + \" PASSED.\");\n \n }",
"@Test\n public void test6() throws Exception {\n try {\n tester.testOnInheritanceTree(Story6, testClass);\n Assert.assertTrue(true);\n } catch (NotShortCircuitException e) {\n Assert.fail();\n }\n }",
"protected int getLevel(){\r\n return this.level;\r\n }",
"@Test\n\tpublic void test() {\n\t\t// CHECKSTYPE:OFF\n\n\t\t// Test the addPlayer(Player player) method\n\t\tPlayer player1 = new Player(\"Iris\");\n\t\tPlayer player2 = new Player(\"Emily\");\n\t\tPlayer player3 = new Player(\"Jason\");\n\t\tPlayer player4 = new Player(\"Rain\");\n\t\tPlayer player5 = new Player(\"Mandy\");\n\t\tscrabbleSystem.addPlayer(player1);\n\t\tscrabbleSystem.addPlayer(player2);\n\t\tscrabbleSystem.addPlayer(player3);\n\t\tscrabbleSystem.addPlayer(player4);\n\t\tscrabbleSystem.addPlayer(player5);\n\t\tList<Player> playersList = scrabbleSystem.getPlayers();\n\t\tassertEquals(4, playersList.size());\n\n\t\t// Test the startNewGame() method\n\t\t/**\n\t\t * The first Turn -- place some tiles on the board\n\t\t */\n\t\tscrabbleSystem.startNewGame();\n\t\tPlayer currentPlayer1 = scrabbleSystem.getCurrentPlayer();\n\t\tSystem.out.println(currentPlayer1.getName());\n\t\tassertEquals(7, currentPlayer1.getTileList().size());\n\t\tList<SpecialTile> specialStore = scrabbleSystem.getSpecialStore();\n\t\tassertEquals(5, specialStore.size());\n\t\tassertEquals(\"Boom\", specialStore.get(0).getName());\n\t\tassertEquals(\"NegativePoint\", specialStore.get(1).getName());\n\t\tassertEquals(\"RetrieveOrder\", specialStore.get(2).getName());\n\t\tassertEquals(\"ReverseOrder\", specialStore.get(3).getName());\n\t\tassertEquals(70, scrabbleSystem.getLetterBag().getNumber());\n\n\t\t// Test the playMove(Move move) method\n\t\tSquare square1 = scrabbleSystem.getBoard().getSquare(7, 7);\n\t\tSquare square2 = scrabbleSystem.getBoard().getSquare(8, 7);\n\t\tSquare square3 = scrabbleSystem.getBoard().getSquare(9, 7);\n\n\t\tTile tile1 = currentPlayer1.getTileList().get(0);\n\t\tTile tile2 = currentPlayer1.getTileList().get(1);\n\t\tTile tile3 = currentPlayer1.getTileList().get(2);\n\n\t\tint scoreSum1 = tile1.getValue() + tile2.getValue() + tile3.getValue();\n\t\t// The first Player\n\t\tMove move = scrabbleSystem.getMove();\n\t\tmove.addTile(square2, tile2);\n\t\tmove.addTile(square3, tile3);\n\n\t\tscrabbleSystem.playMove(move);\n\t\tassertEquals(7, currentPlayer1.getTileList().size());\n\t\tassertEquals(70, scrabbleSystem.getLetterBag().getNumber());\n\n\t\tmove.addTile(square1, tile1);\n\t\tscrabbleSystem.playMove(move);\n\t\tassertEquals(7, currentPlayer1.getTileList().size());\n\t\tassertEquals(67, scrabbleSystem.getLetterBag().getNumber());\n\n\t\tassertTrue(scrabbleSystem.getBoard().getSquare(7, 7).isOccuppied());\n\t\tassertTrue(scrabbleSystem.getBoard().getSquare(8, 7).isOccuppied());\n\t\tassertTrue(scrabbleSystem.getBoard().getSquare(9, 7).isOccuppied());\n\t\tassertFalse(scrabbleSystem.getBoard().getSquare(10, 7).isOccuppied());\n\t\tassertFalse(scrabbleSystem.isGameOver());\n\t\t// check player's score\n\t\tassertEquals(scoreSum1, currentPlayer1.getScore());\n\n\t\tPlayer challengePlayer1 = playersList.get(0);\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tPlayer playerTmp = playersList.get(i);\n\t\t\tif (playerTmp != currentPlayer1) {\n\t\t\t\tchallengePlayer1 = playerTmp;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// if there is no player invoke a challenge\n\t\tscrabbleSystem.updateOrder();\n\n\t\t/**\n\t\t * The secord turn -- place some tiles on the board and challenges by\n\t\t * another player\n\t\t */\n\t\tPlayer currentPlayer2 = scrabbleSystem.getCurrentPlayer();\n\t\tassertNotEquals(currentPlayer1, currentPlayer2);\n\t\tSystem.out.println(currentPlayer1.getName());\n\t\tSystem.out.println(currentPlayer2.getName());\n\n\t\tSquare square4 = scrabbleSystem.getBoard().getSquare(8, 6);\n\t\tSquare square5 = scrabbleSystem.getBoard().getSquare(8, 8);\n\t\tSquare square6 = scrabbleSystem.getBoard().getSquare(8, 9);\n\t\tSquare square7 = scrabbleSystem.getBoard().getSquare(7, 8);\n\n\t\tTile tile4 = currentPlayer2.getTileList().get(0);\n\t\tTile tile5 = currentPlayer2.getTileList().get(1);\n\t\tTile tile6 = currentPlayer2.getTileList().get(2);\n\n\t\tMove move2 = scrabbleSystem.getMove();\n\t\tassertEquals(0, move2.getTileMap().size());\n\t\tmove2.addTile(square4, tile4);\n\t\tmove2.addTile(square5, tile5);\n\t\tmove2.addTile(square7, tile6);\n\t\t// check invalid move\n\t\tscrabbleSystem.playMove(move2);\n\n\t\t// check invalid move\n\t\tmove2.clearMove();\n\t\tmove2.addTile(square4, tile4);\n\t\tmove2.addTile(square6, tile6);\n\t\tscrabbleSystem.playMove(move2);\n\n\t\t// make valid move\n\t\tmove2.clearMove();\n\t\tmove2.addTile(square4, tile4);\n\t\tmove2.addTile(square5, tile5);\n\t\tmove2.addTile(square6, tile6);\n\t\tscrabbleSystem.playMove(move2);\n\n\t\tint scoreSum2 = tile2.getValue() + tile4.getValue() * 2 + tile5.getValue() * 2 + tile6.getValue();\n\t\tassertEquals(scoreSum2, currentPlayer2.getScore());\n\n\t\t// get the challenge player\n\t\tPlayer challengePlayer2 = playersList.get(0);\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tPlayer playerTmp = playersList.get(i);\n\t\t\tif (playerTmp != currentPlayer1) {\n\t\t\t\tchallengePlayer2 = playerTmp;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tassertEquals(64, scrabbleSystem.getLetterBag().getNumber());\n\n\t\tscrabbleSystem.challenge(challengePlayer2);\n\t\tscrabbleSystem.updateOrder();\n\t\tassertEquals(67, scrabbleSystem.getLetterBag().getNumber());\n\t\tassertFalse(square4.isOccuppied());\n\t\tassertFalse(square5.isOccuppied());\n\t\tassertFalse(square6.isOccuppied());\n\n\t\t/**\n\t\t * The third turn -- buy a Boom special tile and pass this turn\n\t\t */\n\n\t\tPlayer currentPlayer3 = scrabbleSystem.getCurrentPlayer();\n\t\tMove move3 = scrabbleSystem.getMove();\n\t\tcurrentPlayer3.addScore(100);\n\t\tscrabbleSystem.buySpecialTile(\"Boom\");\n\t\tassertEquals(80, currentPlayer3.getScore());\n\n\t\tSquare square8 = scrabbleSystem.getBoard().getSquare(8, 8);\n\t\tSquare square9 = scrabbleSystem.getBoard().getSquare(9, 8);\n\t\tSquare square10 = scrabbleSystem.getBoard().getSquare(10, 8);\n\t\tSquare square11 = scrabbleSystem.getBoard().getSquare(10, 7);\n\n\t\tTile tile8 = currentPlayer3.getTileList().get(0);\n\t\tTile tile9 = currentPlayer3.getTileList().get(1);\n\t\tTile tile10 = currentPlayer3.getTileList().get(2);\n\t\tSpecialTile specialTile = currentPlayer3.getSpecialTiles().get(\"Boom\").get(0);\n\t\tmove3.addTile(square8, tile8);\n\t\tmove3.addTile(square9, tile9);\n\t\tmove3.addTile(square10, tile10);\n\t\tmove3.addSpecialTile(specialTile, square11);\n\n\t\tint scoreSum3 = 2 * tile8.getValue() + tile9.getValue() + tile10.getValue() + 2 * tile8.getValue()\n\t\t\t\t+ tile2.getValue() + tile3.getValue() + tile9.getValue() + 80;\n\t\tscrabbleSystem.playMove(move3);\n\t\tassertEquals(scoreSum3, currentPlayer3.getScore());\n\t\tscrabbleSystem.challenge(currentPlayer2);\n\t\tassertEquals(67, scrabbleSystem.getLetterBag().getNumber());\n\t\tassertTrue(square11.hasSpecialTile());\n\n\t\t/**\n\t\t * The fourth turn -- buy a NegativePoint special tile and place it on\n\t\t * the board\n\t\t */\n\t\tPlayer currentPlayer4 = scrabbleSystem.getCurrentPlayer();\n\t\tcurrentPlayer4.addScore(10);\n\t\tscrabbleSystem.buySpecialTile(\"NegativePoint\");\n\t\tassertEquals(1, currentPlayer4.getSpecialTiles().get(\"NegativePoint\").size());\n\n\t\tcurrentPlayer4.addScore(50);\n\t\tSystem.out.println(currentPlayer4.getScore());\n\t\tscrabbleSystem.buySpecialTile(\"NegativePoint\");\n\t\tint scoreSum4 = currentPlayer4.getScore();\n\n\t\tMove move4 = scrabbleSystem.getMove();\n\t\tSpecialTile specialTile2 = currentPlayer4.getSpecialTiles().get(\"NegativePoint\").get(0);\n\n\t\tSquare square12 = scrabbleSystem.getBoard().getSquare(11, 7);\n\t\tmove4.addSpecialTile(specialTile2, square12);\n\n\t\tscrabbleSystem.pass(move4);\n\t\tassertEquals(scoreSum4, currentPlayer4.getScore());\n\t\tassertTrue(square12.hasSpecialTile());\n\t\tassertEquals(1, currentPlayer4.getSpecialTiles().get(\"NegativePoint\").size());\n\n\t\t/**\n\t\t * The fifth turn -- invork the Boom and NegativePoint special tiles at\n\t\t * the same time\n\t\t */\n\t\tPlayer currentPlayer5 = scrabbleSystem.getCurrentPlayer();\n\t\tMove move5 = scrabbleSystem.getMove();\n\t\tSquare square13 = scrabbleSystem.getBoard().getSquare(10, 7);\n\t\tSquare square14 = scrabbleSystem.getBoard().getSquare(11, 7);\n\t\tSquare square15 = scrabbleSystem.getBoard().getSquare(12, 7);\n\t\tSquare square16 = scrabbleSystem.getBoard().getSquare(13, 7);\n\t\tSquare square17 = scrabbleSystem.getBoard().getSquare(14, 7);\n\n\t\tTile tile13 = currentPlayer5.getTileList().get(0);\n\t\tTile tile14 = currentPlayer5.getTileList().get(1);\n\t\tTile tile15 = currentPlayer5.getTileList().get(2);\n\t\tTile tile16 = currentPlayer5.getTileList().get(3);\n\t\tTile tile17 = currentPlayer5.getTileList().get(4);\n\n\t\tmove5.addTile(square13, tile13);\n\t\tmove5.addTile(square14, tile14);\n\t\tmove5.addTile(square15, tile15);\n\t\tmove5.addTile(square16, tile16);\n\t\tmove5.addTile(square17, tile17);\n\t\tscrabbleSystem.playMove(move5);\n\t\tassertFalse(square13.isOccuppied());\n\t\tassertFalse(square14.isOccuppied());\n\t\tassertFalse(square15.isOccuppied());\n\t\tassertFalse(square2.isOccuppied());\n\t\tassertFalse(square3.isOccuppied());\n\t\tassertTrue(square1.isOccuppied());\n\t\tscrabbleSystem.updateOrder();\n\n\t\tint scoreSum5 = scoreSum1 - 3 * (tile13.getValue() + tile14.getValue() + tile1.getValue());\n\t\tSystem.out.println(scoreSum5);\n\n\t\t/**\n\t\t * The sixth turn -- The player exchanges some tiles\n\t\t */\n\t\tPlayer currentPlayer6 = scrabbleSystem.getCurrentPlayer();\n\t\tList<Tile> tiles = new ArrayList<>();\n\t\tTile tile18 = currentPlayer6.getTileList().get(0);\n\t\tTile tile19 = currentPlayer6.getTileList().get(1);\n\t\tTile tile20 = currentPlayer6.getTileList().get(2);\n\t\ttiles.add(tile18);\n\t\ttiles.add(tile19);\n\t\ttiles.add(tile20);\n\t\tscrabbleSystem.exchangeTile(tiles);\n\t\tassertEquals(7, currentPlayer6.getTileList().size());\n\n\t\t/**\n\t\t * Get winner\n\t\t */\n\n\t\tList<Player> playersWinner = scrabbleSystem.getWinner();\n\t\tassertEquals(currentPlayer3.getName(), playersWinner.get(0).getName());\n\t}",
"@Override\n public void test() {\n \n }",
"public void loadPuzzle(String level) throws Exception\r\n\t{\r\n\t\tthis.level = level;\r\n\t\tString fileName = \"easyPuzzle.txt\";\r\n\t\tif(level.contentEquals(\"medium\"))\r\n\t\t\tfileName = \"mediumPuzzle.txt\";\r\n\t\telse if(level.contentEquals(\"hard\"))\r\n\t\t\tfileName = \"hardPuzzle.txt\";\r\n\t\t\r\n\t\tScanner input = new Scanner (new File(fileName));\r\n\t\t\r\n\t\tfor(int x = 0; x < 9; x++)\r\n\t\t\tfor(int y = 0 ; y < 9; y++)\r\n\t\t\t{\r\n\t\t\t\tint number = input.nextInt();\r\n\t\t\t\tif(number != 0)\r\n\t\t\t\t\tsolve(x, y, number);\r\n\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\tinput.close();\r\n\t\t\r\n\t}",
"@Test\n\tpublic void testPowerUpView_11()\n\t\tthrows Exception {\n\t\tGameObject gameObject = new ServerPlayer(new Point());\n\t\tGfxFactory gfxFactory = new GfxFactory();\n\n\t\tPowerUpView result = new PowerUpView(gameObject, gfxFactory);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.NoClassDefFoundError: common.Actor\n\t\t// at java.lang.Class.getDeclaredConstructors0(Native Method)\n\t\t// at java.lang.Class.privateGetDeclaredConstructors(Class.java:2585)\n\t\t// at java.lang.Class.getConstructor0(Class.java:2885)\n\t\t// at java.lang.Class.getDeclaredConstructor(Class.java:2058)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.InstanceCreationExpression.findConstructor(InstanceCreationExpression.java:572)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.InstanceCreationExpression.execute(InstanceCreationExpression.java:452)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.InstanceCreationExpression.execute(InstanceCreationExpression.java:449)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionRequest.execute(ExecutionRequest.java:286)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.communication.LocalExecutionClient$1.run(LocalExecutionClient.java:158)\n\t\t// at java.lang.Thread.run(Thread.java:745)\n\t\tassertNotNull(result);\n\t}",
"@Test\n void grab() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n\n Square s = new Square(0, 4, false, true, false, true, false, 'b');\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setPlayerPosition(s);\n p.getPh().getPowerupDeck().getPowerups().clear();\n p.setTurn(true);\n AmmoTile a = new AmmoTile();\n PowerupDeck pud = new PowerupDeck();\n int[] cubes = new int[3];\n cubes[0] = 2;\n cubes[2] = 1;\n char[] c1 = {'b', 'b', 'b'};\n char[] c2 = {'r', 'r', 'r'};\n char[] c3 = {'y', 'y', 'y'};\n p.getPb().payAmmo(c1);\n p.getPb().payAmmo(c2);\n p.getPb().payAmmo(c3);\n a.setCubes(cubes);\n a.setPowerup(false);\n s.setAmmo(a);\n try{\n p.grab(p.getPlayerPosition(), pud);\n }catch (WrongSquareException e){}\n }",
"@Test\n public void isMyPetThirsty() {\n int isThirsty = underTest.getThirstLevel();\n // Assert\n assertThat(isThirsty, is(3));\n }",
"public void setLevel(Level level) { this.currentLevel = level; }",
"@Test\n\tpublic void testPlayerHPwithTree() {\n\tEngine engine = new Engine(20);\n\t\tint shouldHit = 1;\n\t\tfor (int i = 0; i < 3; i++ ) {\n\t\t\tengine.update();\n\t\t}\n\t\tassertEquals(\"failure - player's hp is not functioning properly\", shouldHit, engine.getMoveableObject(0).getHP(), 0.0);\t\n\t}",
"@Test\n public void test7() throws Exception {\n try {\n tester.testOnInheritanceTree(Story7, testClass);\n Assert.fail();\n } catch (StoryTestException e) {\n Assert.assertEquals(\"Then A's z is Word or A's z is WORd or A's z is word or A's z is WOrd\", e.getSentence());\n Assert.assertEquals(2, e.getNumFail());\n List<String> expected = new LinkedList<>();\n expected.add(\"Word\");\n expected.add(\"WORd\");\n expected.add(\"word\");\n expected.add(\"WOrd\");\n Assert.assertEquals(expected, e.getStoryExpected());\n List<String> actual = new LinkedList<>();\n actual.add(\"WORD\");\n actual.add(\"WORD\");\n actual.add(\"WORD\");\n actual.add(\"WORD\");\n Assert.assertEquals(actual, e.getTestResult());\n }\n catch (ThenNotFoundException e) {\n Assert.fail();\n }\n }",
"@Test\n public void testSetTile()\n {\n try\n {\n Square s = new Square();\n\n s.setTile(Tile.E); // Add a tile\n\n assertEquals(Tile.E, s.getTile()); // Check the tile is now on the square\n assertTrue(s.isOccupied()); // Check the status is now true\n }\n catch(Exception ex)\n {\n fail(\"No exception should be thrown when setting a Tile onto the square.\");\n }\n }",
"public void testLizard(){\n }",
"@Test\n void win() {\n getGame().start();\n assertThat(getGame().isInProgress()).isTrue();\n getGame().move(getPlayer(), Direction.EAST);\n getGame().move(getPlayer(), Direction.EAST);\n verify(observer).levelWon();\n assertThat(getGame().isInProgress()).isFalse();\n }",
"@Test\n\tpublic void testTower()\n\t{\n\t\tassertEquals(1,tower.getNum());\n\t\tassertEquals(22,tower.getPosition().getIntAbscisse());\n\t\tassertEquals(23,tower.getPosition().getIntOrdonne());\n\t}",
"@Override\n\tpublic void test() {\n\t\t\n\t}",
"@Test\n public void testGetScore() {\n assertEquals(250, board3by3.getScore());\n }",
"@Test\n public void testGetHealth() {\n \n assertEquals(hero.getHealth(), 100);\n System.out.println(testName.getMethodName() + \" PASSED.\");\n }",
"@Test\n public void test3() throws Exception {\n try {\n tester.testOnInheritanceTree(Story3, testClass);\n Assert.assertTrue(true);\n } catch (StoryTestException | WrongMethodException e) {\n Assert.fail();\n }\n }",
"@Test\n public void buildNotDome() {\n nextWorkerCell.setLevel(1);\n workerHephaestus.setCurrentWorkerCell(baseWorkerCell);\n workerHephaestus.build(nextWorkerCell);\n assertEquals(2, nextWorkerCell.getLevel());\n }",
"public Puzzles(String question, int answer, int level) {\n\t\tsuper();\n\t\tthis.question = question;\n\t\tthis.answer = answer;\n\t\tthis.isAsked = false;\n\t}",
"@Test\r\n\tpublic void constructorTest() \r\n\t{\r\n\t\tassertEquals(0, scoreBehavior.score());\r\n\t}",
"@Test\n public void test12() { \n Board board12 = new Board();\n board12.put(1,3,1);\n \n assertFalse(board12.checkWin());\n }",
"@Test\n\tpublic void testTInvader3() {\n\t\ttank.damage(proj);\n\t\tassertEquals(2, tank.getHealth());\n\t}",
"public TestPawn(){\n }"
]
| [
"0.6891675",
"0.630312",
"0.62535405",
"0.61690575",
"0.6163853",
"0.6152795",
"0.6046684",
"0.59784836",
"0.5951269",
"0.59298337",
"0.5929439",
"0.5921286",
"0.5892955",
"0.58843285",
"0.5836635",
"0.5836034",
"0.5831585",
"0.58190155",
"0.58106595",
"0.58097386",
"0.57957715",
"0.57882243",
"0.57770973",
"0.57755196",
"0.5775204",
"0.57750213",
"0.5763071",
"0.57432103",
"0.5741003",
"0.57274806",
"0.57274073",
"0.57251567",
"0.57214695",
"0.57099503",
"0.5691794",
"0.56842566",
"0.56769145",
"0.5668058",
"0.56620395",
"0.56577134",
"0.56543434",
"0.5649869",
"0.5648868",
"0.5646975",
"0.5646262",
"0.56347704",
"0.56346214",
"0.56301075",
"0.5629236",
"0.5628209",
"0.5628096",
"0.56218636",
"0.5609525",
"0.55850023",
"0.5581555",
"0.5580857",
"0.55723697",
"0.55690527",
"0.5567195",
"0.55561984",
"0.55550134",
"0.55508673",
"0.55504835",
"0.5549609",
"0.55475163",
"0.5545159",
"0.5543196",
"0.5543196",
"0.5543196",
"0.5543196",
"0.55409557",
"0.553818",
"0.55377346",
"0.55282396",
"0.5520612",
"0.55114067",
"0.55095655",
"0.5508456",
"0.5502394",
"0.5497585",
"0.54855543",
"0.5485406",
"0.5476167",
"0.547224",
"0.54691786",
"0.5462242",
"0.5456167",
"0.5455543",
"0.5449102",
"0.544092",
"0.5439155",
"0.54373664",
"0.54337806",
"0.54337704",
"0.5427514",
"0.5414095",
"0.54136425",
"0.5410415",
"0.5409532",
"0.54042256"
]
| 0.7732315 | 0 |
Test the LightningLevel subclass. | public void testLightningLevel() {
Board brd = new Board();
LightningLevel lvl = new LightningLevel(brd);
assertEquals("Lightning", lvl.getLevelType());
lvl.assignTime(42);
assertEquals(42, lvl.getTime());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void levelsTest() {\n // TODO: test levels\n }",
"public void testLevelShared() {\n\t\tLevel lvl = new Level();\n\t\tassertEquals(\"\", lvl.getLevelType());\n\t\tBoard brd = new Board();\n\t\tlvl.setBoard(brd);\n\t\tassertEquals(brd, lvl.getBoard());\n\n\t\tint[] stars = new int[3];\n\t\tstars[0] = 0;\n\t\tstars[1] = 1;\n\t\tstars[2] = 2;\n\n\t\tlvl.setStars(stars);\n\t\tassertEquals(stars, lvl.getStars());\n\n\t\tlvl.setStarAt(5, 1);\n\t\tassertEquals(5, lvl.getStarAt(1));\n\n\t}",
"@Test\n public void test2IsCreatable()throws Exception{\n\n Position pos = new Position(0,0);\n generateLevel.landOn(pos,BlockType.PATH.toString());\n NormalDefender nd = new NormalDefender(generateLevel.getZoneList().\n get(0).getPos(),generateLevel.getAttackersList());\n assertTrue(generateLevel.isCreatable(nd));\n }",
"@Test\r\n\tpublic final void testAddLevel() {\r\n\t\tlevels.add(lostLevel2);\r\n\t\tgameStatisticsLoss.addLevel(lostLevel2);\r\n\t\tassertTrue(gameStatisticsLoss.getLevels().equals(levels));\r\n\t}",
"public LightSensorTest(String name) {\n\t\tsuper(name);\n\t}",
"@Test\n\tpublic void testGetLocomotivePower() throws TrainException {\n\t\tInteger validGrossWeight = 1;\n\t\tString validClassification = \"9E\";\n\t\tfinal Integer POWER_BASE = 100;\n\t\tInteger expectedPower = POWER_BASE * Integer.parseInt(validClassification.substring(0,1));\n\t\t\n\t\tasgn2RollingStock.RollingStock locomotiveUnderTest = \n\t\t\tnew asgn2RollingStock.Locomotive(validGrossWeight, validClassification);\n\t\t\n\t\tassertEquals(((asgn2RollingStock.Locomotive)locomotiveUnderTest).power(), expectedPower);\n\t}",
"@Test\n public void testCheckStartAndGoalPosition()throws Exception{\n GenerateLevel generateLevel = new GenerateLevel(20,\n \"XmlFiles/missingStartGoalPos.xml\");\n generateLevel.loadLevel(1);\n assertFalse(generateLevel.checkStartAndGoalPosition());\n }",
"@Test\n public void testCurrentSugarLevelAndChangeSugarLevel() {\n System.out.println(\"changeSugarLevel\");\n\n Sugarman instance = new Sugarman();\n instance.getSugarlevel();\n instance.changeSugarLevel(20);\n\n int result = instance.getSugarlevel();\n int expResult = 70;\n assertEquals(result, expResult);\n\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }",
"public void testThemeLevel() {\n\t\tBoard brd = new Board();\n\t\tThemeLevel lvl = new ThemeLevel(brd);\n\n\t\tassertEquals(\"Theme\", lvl.getLevelType());\n\n\n\t\tString name = \"BestTheme\";\n\t\tlvl.setThemeName(name);\n\n\n\t\tassertEquals(name, lvl.getThemeName());\n\n\n\n\t\tDictionary dictionary = new Dictionary();\n\t\tlvl.setDictionary(dictionary);\n\t\tassertEquals(dictionary, lvl.getDictionary());\n\n\n\t}",
"public Lightning() {\n super(\"Death Lightning\", 2);\n }",
"public abstract int levelRequired();",
"@Test\n public void testLevelEqualsContract() {\n EqualsVerifier.forClass(PdfaFlavour.Level.class).verify();\n }",
"@Test\n\tpublic void testCreateLocomotive() throws TrainException {\n\t\tInteger grossWeight = 1;\n\t\tString classification = \"9E\";\n\t\t\n\t\t@SuppressWarnings(\"unused\")\n\t\tasgn2RollingStock.RollingStock locomotiveUnderTest = \n\t\t\tnew asgn2RollingStock.Locomotive((Integer)grossWeight, (String)classification);\n\t\t\n\t}",
"public LTest(String name) {\r\n\t\tsuper(name);\r\n\t}",
"public LevelLoader(GameStateManager gsm){\n\t\tsuper(gsm);\n\t}",
"public int level();",
"@Test\n public void test1LandOn()throws Exception{\n Position pos = new Position(0,0);\n generateLevel.landOn(pos,BlockType.PATH.toString());\n assertFalse(generateLevel.getBlocks().isEmpty());\n }",
"public Level(TiltMazeGame game) {\n super(game);\n }",
"public void testLizard(){\n }",
"@Test\n public void testIsCreatable()throws Exception{\n\n NormalDefender nd = new NormalDefender(new Position(0,0),\n generateLevel.getAttackersList());\n assertFalse(generateLevel.isCreatable(nd));\n }",
"public LevelInterface generateLevel (GamePlay playerMetrics);",
"boolean hasLevel();",
"boolean hasLevel();",
"boolean hasLevel();",
"boolean hasLevel();",
"protected int getLevel(){\r\n return this.level;\r\n }",
"@Override\n public void setRunLevel(int level) {\n\n }",
"@Test\n\tpublic void testGet() {\n\t\tassertTrue(LevelGen.connected(LevelGen.get(100, 100)));\n\t}",
"@Test\n public void testAccessLevelDoesNotExist(){\n GenerateLevel generateLevel = new GenerateLevel(20,\n \"XmlFiles/missingStartGoalPos.xml\");\n generateLevel.loadLevel(2);\n }",
"@Test\n\tpublic void testLocomotiveGetGrossWeight() throws TrainException {\n\t\tInteger validGrossWeight = 1;\n\t\tString validClassification = \"9E\";\n\t\t\n\t\tasgn2RollingStock.RollingStock locomotiveUnderTest = \n\t\t\tnew asgn2RollingStock.Locomotive(validGrossWeight, validClassification);\n\t\t\n\t\tassertEquals(((asgn2RollingStock.Locomotive)locomotiveUnderTest).getGrossWeight(), validGrossWeight);\n\t}",
"ProbeLevel minimumLevel();",
"int getLevel();",
"int getLevel();",
"int getLevel();",
"int getLevel();",
"int getLevel();",
"public void setLevel(String level);",
"public static Level[] createTestLevel(){\n\t\tLevel[] testLevels = new Level[16];\n\t\tint[] squareNum = new int[144];\n\t\n\t\tColor[] cl = new Color[144];\n\t\t\n\t\t\n\n\t\t\n\t\tfor (int i=0;i<144;i++){\n\t\t\tsquareNum[i] =0;\n\t\t\tcl[i]=null;\n\t\t}\n\t\tint count18=0;\n\t\tfor (int i=1;i<4;i++){\n\t\t\tfor (int j=1;j<7;j++){\n\t\t\t\tsquareNum[count18] =j;\n\t\t\t\tif (i==1){\n\t\t\t\t\tcl[count18]=Color.RED;\n\t\t\t\t}\n\t\t\t\telse if (i==2){\n\t\t\t\t\tcl[count18]=Color.YELLOW;\n\t\t\t\t}\n\t\t\t\telse if (i==3){\n\t\t\t\t\tcl[count18]=Color.GREEN;\n\t\t\t\t}\n\t\t\t\tcount18=count18+5;\n\t\t\t}\n\t\t}\n\n\n\t\tSquare bullPenSquare1[] = new Square[6]; \n\t\tbullPenSquare1[0] = new Square(1,3);\n\t\tbullPenSquare1[1] = new Square(0,1);\n\t\tbullPenSquare1[2] = new Square(0,2);\n\t\tbullPenSquare1[3] = new Square(0,3);\n\t\tbullPenSquare1[4] = new Square(0,4);\n\t\tbullPenSquare1[5] = new Square(0,5);\t\t\n\t\t\n\t\tSquare bullPenSquare2[] = new Square[6]; \n\t\tbullPenSquare2[0] = new Square(0,0);\n\t\tbullPenSquare2[1] = new Square(1,0);\n\t\tbullPenSquare2[2] = new Square(2,0);\n\t\tbullPenSquare2[3] = new Square(2,1);\n\t\tbullPenSquare2[4] = new Square(2,2);\n\t\tbullPenSquare2[5] = new Square(1,2);\t\t\n\n\t\tSquare bullPenSquare3[] = new Square[6]; \n\t\tbullPenSquare3[0] = new Square(1,1);\n\t\tbullPenSquare3[1] = new Square(0,1);\n\t\tbullPenSquare3[2] = new Square(0,2);\n\t\tbullPenSquare3[3] = new Square(0,3);\n\t\tbullPenSquare3[4] = new Square(0,4);\n\t\tbullPenSquare3[5] = new Square(0,5);\t\t\n\t\t\n\t\tSquare bullPenSquare4[] = new Square[6]; \n\t\tbullPenSquare4[0] = new Square(1,1);\n\t\tbullPenSquare4[1] = new Square(2,1);\n\t\tbullPenSquare4[2] = new Square(3,1);\n\t\tbullPenSquare4[3] = new Square(3,2);\n\t\tbullPenSquare4[4] = new Square(3,3);\n\t\tbullPenSquare4[5] = new Square(3,4);\t\t\n\n\t\tSquare bullPenSquare5[] = new Square[6]; \n\t\tbullPenSquare5[0] = new Square(0,2);\n\t\tbullPenSquare5[1] = new Square(1,2);\n\t\tbullPenSquare5[2] = new Square(2,2);\n\t\tbullPenSquare5[3] = new Square(3,2);\n\t\tbullPenSquare5[4] = new Square(4,2);\n\t\tbullPenSquare5[5] = new Square(5,2);\t\n\t\t\n\t\tSquare bullPenSquare6[] = new Square[6]; \n\t\tbullPenSquare6[0] = new Square(0,0);\n\t\tbullPenSquare6[1] = new Square(0,1);\n\t\tbullPenSquare6[2] = new Square(0,2);\n\t\tbullPenSquare6[3] = new Square(0,3);\n\t\tbullPenSquare6[4] = new Square(0,4);\n\t\tbullPenSquare6[5] = new Square(0,5);\t\n\t\t\n\t\tPiece bullPenPiece= new Piece(0,0,bullPenSquare1,bullPenSquare1[0],2);\n\t\tbullPenPiece.setColor(new Color(0,0,0));\n\n\n\t\tArrayList<Piece> bullPenPieceArray=new ArrayList<Piece>();\n\t\tbullPenPieceArray.add(new Piece(0,0,bullPenSquare1,bullPenSquare1[0],2));\n\t\tbullPenPieceArray.get(0).setColor(Color.BLUE);\n\t\tbullPenPieceArray.add(new Piece(0,0,bullPenSquare2,bullPenSquare2[0],2));\n\t\tbullPenPieceArray.get(1).setColor(Color.GREEN);\n\t\tbullPenPieceArray.add(new Piece(0,0,bullPenSquare3,bullPenSquare3[0],2));\n\t\tbullPenPieceArray.get(2).setColor(Color.YELLOW);\n\t\tbullPenPieceArray.add(new Piece(0,0,bullPenSquare4,bullPenSquare4[0],2));\n\t\tbullPenPieceArray.get(3).setColor(Color.ORANGE);\n\t\tbullPenPieceArray.add(new Piece(0,0,bullPenSquare5,bullPenSquare5[0],2));\n\t\tbullPenPieceArray.get(4).setColor(Color.RED);\n\t\tbullPenPieceArray.add(new Piece(0,0,bullPenSquare6,bullPenSquare6[0],2));\n\t\tbullPenPieceArray.get(5).setColor(Color.PINK);\n\n\n\t\tBullpen bp = new Bullpen(bullPenPieceArray);\n\t\t//Bullpen bp = new Bullpen();\n\n\n\n\t\tSquare[] boardSquare = new Square[144]; \n\t\tfor (int i1=0;i1<12;i1++){\n\t\t\tfor (int j=0;j<12;j++){\n\n\t\t\t\tboardSquare[i1*12+j] = new Square(i1,j);\n\t\t\t}\n\t\t}\n\n\t\tSquare hitSquares[] = new Square[6]; \n\t\thitSquares[0] = new Square(6,4);\n\t\thitSquares[1] = new Square(5,2);\n\t\thitSquares[2] = new Square(5,3);\n\t\thitSquares[3] = new Square(5,4);\n\t\thitSquares[4] = new Square(5,5);\n\t\thitSquares[5] = new Square(5,6);\t\n\n\t\tHint hints = new Hint(hitSquares);\n\n\t\tBoard testBoard = new Board(boardSquare);\n\t\ttestBoard.sethint(hints);\n\t\t\n\t\t////// add remove test\n\t\t//bullPenPiece.setColor(Color.PINK);\n\t\t//bp.removepiece(bullPenPieceArray.get(5));\n\t\t//testBoard.addpiece(bullPenPiece);\n\t\t///test over\n\t\t\n\t\tfor (int i=0;i<15;i++){\n\t\t\tif (i%3==0){\n\t\t\t\ttestLevels[i] = new PuzzleLevel(i,GetLevelTpye(i%3),testBoard,bp,20);\n\t\t\t\ttestLevels[i].updateLevelStar(new Achievement(new Random().nextInt(3) + 1));\n\t\t\t}\n\t\t\telse if (i%3==1){\n\t\t\t\ttestLevels[i] = new LightningLevel(i,GetLevelTpye(i%3),testBoard,bp,30);\n\t\t\t\ttestLevels[i].updateLevelStar(new Achievement(new Random().nextInt(3) + 1));\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttestLevels[i] = new ReleaseLevel(i,GetLevelTpye(i%3),testBoard,bp,squareNum,cl);\n\t\t\t\ttestLevels[i].updateLevelStar(new Achievement(new Random().nextInt(3) + 1));\n\t\t\t}\n\n\t\t}\n\t\ttestLevels[13].updateLevelStar(new Achievement(0));\n\t\ttestLevels[14].updateLevelStar(new Achievement(-1));\n\n\t\t\n\t\t\n\t\t\n\t\t//---------------------------------------------- \n\t\tint[] sixNum = new int[36];\n\t\tColor[] sixcolor = new Color[36];\n\t\tfor (int i=0;i<36;i++){\n\t\t\tsixNum[i] =0;\n\t\t\tsixcolor[i]=null;\n\t\t}\n\t\tint count1=0;\n\t\tfor (int i=1;i<4;i++){\n\t\t\tfor (int j=1;j<7;j++){\n\t\t\t\tsquareNum[count1] =j;\n\t\t\t\tif (i==1){\n\t\t\t\t\tcl[count1]=Color.RED;\n\t\t\t\t}\n\t\t\t\telse if (i==2){\n\t\t\t\t\tcl[count1]=Color.YELLOW;\n\t\t\t\t}\n\t\t\t\telse if (i==3){\n\t\t\t\t\tcl[count1]=Color.GREEN;\n\t\t\t\t}\n\t\t\t\tcount1=count1+1;\n\t\t\t}\n\t\t}\n\t\tSquare[] sixBoardSquare = new Square[36]; \n\t\tfor (int i1=0;i1<6;i1++){\n\t\t\tfor (int j=0;j<6;j++){\n\n\t\t\t\tsixBoardSquare[i1*6+j] = new Square(i1,j);\n\t\t\t}\n\t\t}\n\t\tSquare sixhint[] = new Square[6]; \n\t\tsixhint[0] = new Square(0,0);\n\t\tsixhint[1] = new Square(0,1);\n\t\tsixhint[2] = new Square(0,2);\n\t\tsixhint[3] = new Square(0,3);\n\t\tsixhint[4] = new Square(0,4);\n\t\tsixhint[5] = new Square(0,5);\t\n\n\t\tHint sixhints = new Hint(sixhint);\n\n\t\tBoard sixBoard = new Board(sixBoardSquare);\n\t\tsixBoard.sethint(sixhints);\n\t\t\n\t\ttestLevels[15] = new ReleaseLevel(15,GetLevelTpye(14%3),sixBoard,bp,sixNum,sixcolor);\n\t\ttestLevels[15].updateLevelStar(new Achievement(1));\n\t\t//--------------------------------------------\n\t\t\n\t\treturn testLevels;\n\t\t/*\n\t\t\tpublic Level(int LevelNumber, String LevelType, Board b, Bullpen p){\n\t\t\t\tthis.LevelNumber = LevelNumber;\n\t\t\t\tthis.LevelType = LevelType;\n\t\t\t\tthis.b = b;\n\t\t\t\tthis.p = p;\n\t\t\t}\n\n\t\t */\n\t}",
"public void setLevel(Level level) { this.currentLevel = level; }",
"public void testPuzzleLevel() {\n\t\tBoard brd = new Board();\n\t\tPuzzleLevel lvl = new PuzzleLevel(brd);\n\n\t\tassertEquals(\"Puzzle\", lvl.getLevelType());\n\n\t\tlvl.assignMaxWords(42);\n\t\tassertEquals(42, lvl.getMaxWords());\n\t}",
"double getLevel();",
"double getLevel();",
"boolean hasLvl();",
"public boolean levelPassed() {\r\n\t\treturn levelManager.levelPassed();\r\n\t}",
"@Test\n\tpublic void testConnected() {\n\t\tLevel level = new Level(100, 100);\n\t\tassertTrue(LevelGen.connected(level.getGrid()));\n\t}",
"public double Getlevel()\r\n {\r\n return level;\r\n }",
"public void changeLevel(Level level) {\n if (Consts.TEST) {\n this.level = level;\n return;\n }\n\n try {\n level.validate();\n } catch (Exception e) {\n e.printStackTrace();\n level = this.level;\n }\n this.level = level;\n entities.clear();\n pacman.respawn(level.getRandomPacmanSpawn());\n // items spawnen\n for (int y = 0; y < level.getHeight(); y++) {\n for (int x = 0; x < level.getWidth(); x++) {\n if (level.getField(x, y) == MapModule.DOT)\n entities.add(new Dot(x, y));\n else if (level.getField(x, y) == MapModule.POWERUP)\n entities.add(new PowerUp(x, y));\n else if (level.getField(x, y) == MapModule.SPEEDUP)\n entities.add(new SpeedUp(x, y));\n else if (level.getField(x, y) == MapModule.TELEPORT)\n entities.add(new Teleporter(x, y));\n }\n }\n\n // 4 Geister im normalen Spiel, 1 Geist fuer Tests\n for (int i = 0; i < (Consts.TEST ? 1 : Consts.NUM_GHOSTS); i++) {\n Ghost g = new Ghost(i);\n g.respawn(level.getNextGhostSpawn());\n entities.add(g);\n }\n }",
"@Test\n public void test3IsCreatable()throws Exception{\n\n //Zone\n Position pos = new Position(0,0);\n generateLevel.landOn(pos,BlockType.PATH.toString());\n\n NormalDefender nd = new NormalDefender(generateLevel.getZoneList().\n get(0).getPos(),generateLevel.getAttackersList());\n if(generateLevel.isCreatable(nd)){\n generateLevel.getDefendersList().push(nd);\n }\n\n NormalDefender nd2 = new NormalDefender(generateLevel.getZoneList().\n get(0).getPos(),generateLevel.getAttackersList());\n assertFalse(generateLevel.isCreatable(nd2));\n }",
"protected void setLevel(int level){\r\n this.level = level;\r\n }",
"@Test\n public void UnitTest_CalculateLife_DeadLonely() throws Exception{\n short deadLonely = 1;\n PowerMockito.mockStatic(Log.class);\n PowerMockito.mockStatic(android.graphics.Bitmap.class);\n LifeMatrix LittleMatrix = new LifeMatrix(3, 3);\n LifeStatusEnum chkStatus = LittleMatrix.CalculateLife(deadLonely, LifeStatusEnum.AlivePoint);\n assertEquals(chkStatus, LifeStatusEnum.DeadPoint);\n LifeStatusEnum chkStatus2 = LittleMatrix.CalculateLife(deadLonely, LifeStatusEnum.DeadPoint);\n assertEquals(chkStatus, LifeStatusEnum.DeadPoint);\n }",
"@Override\n\t\n\tvoid level_specific_turret_setup(){\n\t}",
"Interface(Level level){\n\t\tthis.level=level;\n\t}",
"@Test(timeout = 4000)\n public void test080() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setAllLevelsVisible(true);\n assertTrue(homeEnvironment0.isAllLevelsVisible());\n \n homeEnvironment0.setAllLevelsVisible(false);\n assertEquals(13684944, homeEnvironment0.getLightColor());\n }",
"@java.lang.Override\n public double getLevel() {\n return level_;\n }",
"@java.lang.Override\n public double getLevel() {\n return level_;\n }",
"public void setLevel(int newlevel)\n {\n level = newlevel; \n }",
"@Test(timeout = 4000)\n public void test115() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.isAllLevelsVisible();\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(13684944, homeEnvironment0.getLightColor());\n assertEquals(11053224, homeEnvironment0.getGroundColor());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(320, homeEnvironment0.getVideoWidth());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(13427964, homeEnvironment0.getSkyColor());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n }",
"public abstract boolean levelUp();",
"public int getLevel()\n {\n return level; \n }",
"public boolean isLevel(){\n return Math.abs(gyro_board.getPitch()) < LEVEL_TOLERANCE && Math.abs(gyro_board.getRoll()) < LEVEL_TOLERANCE;\n }",
"public abstract void levelComplete();",
"public void setLevel(String newLevel) {\n level = newLevel;\n }",
"@Test\r\n public void testLandOn() {\r\n SnakeSquare instance = new SnakeSquare(33, 21);\r\n assertEquals(21, instance.landOn());\r\n }",
"protected void setLevel(int level)\n {\n this.level = level;\n }",
"@Override\r\n public String levelName() {\r\n return \"Green 3\";\r\n }",
"void createNewLevel(int level);",
"public void testJellyCompatibility() {\n try {\n assertTrue(\"SettingChildren class is public\", Modifier.isPublic(SettingChildren.class.getModifiers()));\n assertTrue(\"FileStateProperty class is public\", Modifier.isPublic(FileStateProperty.class.getModifiers()));\n try {\n new FileStateProperty(\"Modules-Layer\").getValue();\n } catch (NullPointerException npe) {}\n } catch (Exception e) {\n throw new AssertionFailedErrorException(\"JellyTools compatibility conflict, please contact QA or any JellyTools developer.\", e);\n }\n }",
"@Test\r\n\tpublic void hasScoreTest() \r\n\t{\r\n\t\tassertTrue(scoreBehavior.hasScore());\r\n\t}",
"@Test\n public void getGameStateTest1() {\n GenericStandardDeckGame g = new GenericStandardDeckGame();\n assertEquals(g.getGameState(), \"Number of players: 0\");\n }",
"public static Level provideLevel(Class<? extends Level> cls) {\n switch (cls.getSimpleName()) {\n case \"LevelRandom\":\n return new LevelRandom(0, Level.Section.EIGHT.getY());\n case \"LevelOne\":\n return new LevelOne(1, Level.Section.EIGHT.getY());\n case \"LevelTwo\":\n return new LevelTwo(2, Level.Section.NINE.getY());\n case \"LevelThree\":\n return new LevelThree(3, Level.Section.SIX.getY());\n case \"LevelFour\":\n return new LevelFour(4, Level.Section.FOUR.getY());\n case \"LevelFive\":\n return new LevelFive(5, Level.Section.FOURTEEN.getY());\n case \"LevelSix\":\n return new LevelSix(6, Level.Section.THREE.getY());\n case \"LevelSeven\":\n return new LevelSeven(7, Level.Section.FOURTEEN.getY());\n case \"LevelEight\":\n return new LevelEight(8, Level.Section.SIX.getY());\n case \"LevelNine\":\n return new LevelNine(9, Level.Section.FOURTEEN.getY());\n default:\n return null;\n }\n }",
"public void initLevel(){\n baseLevel = levelCreator.createStaticGrid(this.levelFile);\n dynamicLevel= levelCreator.createDynamicGrid(levelFile);\n colDetector = new CollisionHandler();\n goalTiles = baseLevel.getTilePositions('x');\n }",
"public interface ILevelDefinition {\n\n /**\n * Get the agents that actually exist in the game\n * @return The currently existing agents\n */\n List<AgentReference> getCurrentAgents();\n void removeAgent(int index);\n void addAgent(String agentName, int x, int y, double direction, List<? extends IPropertyDefinition> instanceProperties);\n\n List<String> getPlaceableAgents();\n void removePlaceableAgent(int index);\n void removePlaceableAgent(String agentName);\n void addPlaceableAgent(String agentName);\n\n Map<String, List<Point2D>> getPaths();\n void removePath(int index);\n void removePath(String name);\n void addPath(String name, List<Point2D> path);\n\n String getBackgroundImageURL();\n void setBackgroundImageURL(String imageURL);\n\n ILevelDefinition clone() throws CloneNotSupportedException;\n\n void defineAttribute(IAttributeDefinition attribute);\n List<? extends IAttributeDefinition> getAttributes();\n}",
"@Test\n public void hasToner(){\n assertEquals(5000, printer.getTonerLevel());\n }",
"@java.lang.Override\n public double getLevel() {\n return level_;\n }",
"@java.lang.Override\n public double getLevel() {\n return level_;\n }",
"public boolean getCanSpawnHere()\n {\n return this.isValidLightLevel() && super.getCanSpawnHere();\n }",
"public void setLevel (String newLevel)\n {\n this.level = newLevel; \n }",
"public Level provideLevel(Class<? extends Level> cls, int levelNumber, double waterBoundary) {\n try {\n return cls.getConstructor(int.class, double.class).newInstance(levelNumber, waterBoundary);\n }\n catch (NoSuchMethodException | InstantiationException | IllegalAccessException | InvocationTargetException e) {\n e.printStackTrace();\n return null;\n }\n }",
"public void checkLevel(){\n if(score<50){\n level = 1;\n asteroidsMaxNumber = 5;\n }\n if(score>50 && level == 1){\n level = 2;\n asteroidsMaxNumber = 7;\n }\n if(score>100 && level == 2){\n level = 3;\n asteroidsMaxNumber = 10;\n }\n if(score>200 && level == 3){\n level = 4;\n asteroidsMaxNumber = 13;\n }\n if(score>350 && level == 4){\n level = 5;\n asteroidsMaxNumber = 15;\n }\n }",
"@Test\n public void UnitTest_CalculateLife_AliveHappy() throws Exception{\n short aliveHappyA = 2;\n short aliveHappyB = 3;\n PowerMockito.mockStatic(Log.class);\n PowerMockito.mockStatic(android.graphics.Bitmap.class);\n LifeMatrix LittleMatrix = new LifeMatrix(3, 3);\n LifeStatusEnum chkStatus = LittleMatrix.CalculateLife(aliveHappyA, LifeStatusEnum.AlivePoint);\n assertEquals(chkStatus, LifeStatusEnum.AlivePoint);\n LifeStatusEnum chkStatus2 = LittleMatrix.CalculateLife(aliveHappyB, LifeStatusEnum.AlivePoint);\n assertEquals(chkStatus2, LifeStatusEnum.AlivePoint);\n LifeStatusEnum chkStatus3 = LittleMatrix.CalculateLife(aliveHappyB, LifeStatusEnum.DeadPoint);\n assertEquals(chkStatus3, LifeStatusEnum.AlivePoint);\n }",
"@Test\n public void classInstantiated() {\n assertNotNull(radar);\n }",
"public int getLevel()\r\n {\r\n return level;\r\n }",
"public void setLevel(String lev) {\n\t\tlevel = lev;\n\t}",
"public void setLevel(String level) {\n this.level = level;\n }",
"public void setLevel(String level) {\n this.level = level;\n }",
"public void setLevel(int level) {\n this.level = level;\n }",
"public void setLevel(int level) {\n this.level = level;\n }",
"@LargeTest\n public void testLevelsVec3Full() {\n TestAction ta = new TestAction(TestName.LEVELS_VEC3_FULL);\n runTest(ta, TestName.LEVELS_VEC3_FULL.name());\n }",
"@Before\n\tpublic void init() {\n\t\tprovider = mock(LoggingProvider.class);\n\t\twhen(provider.getMinimumLevel(null)).thenReturn(level);\n\t\twhen(provider.isEnabled(anyInt(), eq(null), eq(Level.TRACE))).thenReturn(traceEnabled);\n\t\twhen(provider.isEnabled(anyInt(), eq(null), eq(Level.DEBUG))).thenReturn(debugEnabled);\n\t\twhen(provider.isEnabled(anyInt(), eq(null), eq(Level.INFO))).thenReturn(infoEnabled);\n\t\twhen(provider.isEnabled(anyInt(), eq(null), eq(Level.WARN))).thenReturn(warnEnabled);\n\t\twhen(provider.isEnabled(anyInt(), eq(null), eq(Level.ERROR))).thenReturn(errorEnabled);\n\n\t\tlogger = new TinylogLogger(TinylogLoggerTest.class.getName());\n\t\tWhitebox.setInternalState(TinylogLogger.class, \"MINIMUM_LEVEL_COVERS_TRACE\", traceEnabled);\n\t\tWhitebox.setInternalState(TinylogLogger.class, \"MINIMUM_LEVEL_COVERS_DEBUG\", debugEnabled);\n\t\tWhitebox.setInternalState(TinylogLogger.class, \"MINIMUM_LEVEL_COVERS_INFO\", infoEnabled);\n\t\tWhitebox.setInternalState(TinylogLogger.class, \"MINIMUM_LEVEL_COVERS_WARN\", warnEnabled);\n\t\tWhitebox.setInternalState(TinylogLogger.class, \"MINIMUM_LEVEL_COVERS_ERROR\", errorEnabled);\n\t\tWhitebox.setInternalState(TinylogLogger.class, provider);\n\t}",
"public int getLevel()\n {\n return level;\n }",
"@SuppressWarnings({ \"unchecked\" })\n public Void run() {\n if (Jvm.isModular()) {\n return null;\n }\n /* This mysterious-looking hack is designed to trick JDK logging into not leaking classloaders and\n so forth when adding levels, by simply shutting down the craptastic level name \"registry\" that it keeps.\n */\n final Class<java.util.logging.Level> lc = java.util.logging.Level.class;\n try {\n synchronized (lc) {\n final Field knownField = lc.getDeclaredField(\"known\");\n knownField.setAccessible(true);\n final List<java.util.logging.Level> old = (List<java.util.logging.Level>) knownField.get(null);\n if (! (old instanceof ReadOnlyArrayList)) {\n knownField.set(null, new ReadOnlyArrayList<java.util.logging.Level>(Arrays.asList(\n Level.TRACE,\n Level.DEBUG,\n Level.INFO,\n Level.WARN,\n Level.ERROR,\n Level.FATAL,\n java.util.logging.Level.ALL,\n java.util.logging.Level.FINEST,\n java.util.logging.Level.FINER,\n java.util.logging.Level.FINE,\n java.util.logging.Level.INFO,\n java.util.logging.Level.CONFIG,\n java.util.logging.Level.WARNING,\n java.util.logging.Level.SEVERE,\n java.util.logging.Level.OFF\n )));\n }\n }\n } catch (Throwable e) {\n // ignore; just don't install\n }\n\n // OpenJDK uses a KnownLevel inner class with two static maps\n try {\n final Class<?> knownLevelClass = Class.forName(\"java.util.logging.Level$KnownLevel\");\n synchronized (knownLevelClass) {\n final Constructor<?> constructor = knownLevelClass.getDeclaredConstructor(java.util.logging.Level.class);\n constructor.setAccessible(true);\n boolean doBuild = false;\n boolean setNameToLevel = false;\n boolean setIntToLevel = false;\n // namesToLevels\n final Field nameToLevels = knownLevelClass.getDeclaredField(\"nameToLevels\");\n nameToLevels.setAccessible(true);\n // Current\n final Map oldNameToLevels = (Map) nameToLevels.get(null);\n if (! (oldNameToLevels instanceof ReadOnlyHashMap)) {\n doBuild = true;\n setNameToLevel = true;\n }\n\n final Field intToLevels = knownLevelClass.getDeclaredField(\"intToLevels\");\n intToLevels.setAccessible(true);\n final Map oldIntToLevels = (Map) intToLevels.get(null);\n if (! (oldIntToLevels instanceof ReadOnlyHashMap)) {\n doBuild = true;\n setIntToLevel = true;\n }\n\n if (doBuild) {\n final KnownLevelBuilder builder = new KnownLevelBuilder(constructor)\n .add(Level.TRACE)\n .add(Level.DEBUG)\n .add(Level.INFO)\n .add(Level.WARN)\n .add(Level.ERROR)\n .add(Level.FATAL)\n .add(java.util.logging.Level.ALL)\n .add(java.util.logging.Level.FINEST)\n .add(java.util.logging.Level.FINER)\n .add(java.util.logging.Level.FINE)\n .add(java.util.logging.Level.INFO)\n .add(java.util.logging.Level.CONFIG)\n .add(java.util.logging.Level.WARNING)\n .add(java.util.logging.Level.SEVERE)\n .add(java.util.logging.Level.OFF);\n\n if (setNameToLevel) {\n nameToLevels.set(null, builder.toNameMap());\n }\n if (setIntToLevel) {\n intToLevels.set(null, builder.toIntMap());\n }\n }\n }\n } catch (Throwable e) {\n // ignore\n }\n\n /* Next hack: the default Sun JMX implementation has a horribly inefficient log implementation which\n kills performance if a custom logmanager is used. We'll just blot that out.\n */\n try {\n final Class<?> traceManagerClass = Class.forName(\"com.sun.jmx.trace.Trace\");\n final Field outField = traceManagerClass.getDeclaredField(\"out\");\n outField.setAccessible(true);\n outField.set(null, null);\n } catch (Throwable e) {\n // ignore; just skip it\n }\n /* Next hack: Replace the crappy MXBean on the system logmanager, if it's there.\n */\n final Class<java.util.logging.LogManager> lmc = java.util.logging.LogManager.class;\n try {\n synchronized (lmc) {\n final Field loggingMXBean = lmc.getDeclaredField(\"loggingMXBean\");\n loggingMXBean.setAccessible(true);\n loggingMXBean.set(null, LogContext.getSystemLogContext().getLoggingMXBean());\n }\n } catch (Throwable e) {\n // ignore; just skip it\n }\n return null;\n }",
"public Glow(double level) {\n setLevel(level);\n }",
"public void setLevel(int level) { \r\n\t\tthis.level = level; \r\n\t}",
"@Test\n public void testHasSugarmanLost() {\n System.out.println(\"hasSugarmanLost\");\n Sugarman instance = new Sugarman();\n instance.changeSugarLevel(-100);\n boolean expResult = true;\n boolean result = instance.hasSugarmanLost();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }",
"public void setLevel(int level)\r\n {\r\n\tthis.level = level;\r\n }",
"int getOnLevel();",
"public String getLevel ()\n {\n return level;\n }",
"@Test(timeout = 4000)\n public void test007() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setAllLevelsVisible(true);\n boolean boolean0 = homeEnvironment0.isAllLevelsVisible();\n assertTrue(boolean0);\n }",
"public Level getLevel() {\r\n\t\treturn level;\r\n\t}",
"public int getLevel(){\n return level;\n }"
]
| [
"0.6424143",
"0.6148043",
"0.60512835",
"0.59355766",
"0.59307563",
"0.5852701",
"0.5802936",
"0.5795645",
"0.5784444",
"0.57479876",
"0.574767",
"0.57393473",
"0.5703045",
"0.56827724",
"0.56778765",
"0.56676203",
"0.56541544",
"0.5627433",
"0.56156117",
"0.5605909",
"0.5605623",
"0.5598874",
"0.5598874",
"0.5598874",
"0.5598874",
"0.5574409",
"0.5558154",
"0.55562556",
"0.5554815",
"0.5536524",
"0.55280024",
"0.5496567",
"0.5496567",
"0.5496567",
"0.5496567",
"0.5496567",
"0.54954433",
"0.5493756",
"0.5493177",
"0.54864246",
"0.5486145",
"0.5486145",
"0.5475651",
"0.54752904",
"0.546383",
"0.5461506",
"0.5458262",
"0.5445838",
"0.54350567",
"0.5398748",
"0.53981894",
"0.5397164",
"0.5395915",
"0.5392792",
"0.5392792",
"0.53886694",
"0.53879756",
"0.5383724",
"0.53814226",
"0.53730965",
"0.53693664",
"0.5367984",
"0.5349336",
"0.53412354",
"0.53287387",
"0.5317396",
"0.5308941",
"0.53079224",
"0.529982",
"0.529082",
"0.52902967",
"0.52885395",
"0.5285564",
"0.5282969",
"0.5282969",
"0.52748454",
"0.52670896",
"0.5265081",
"0.5262487",
"0.52592087",
"0.5247031",
"0.52391165",
"0.52360713",
"0.5233062",
"0.5233062",
"0.52307135",
"0.52307135",
"0.5229387",
"0.522691",
"0.521985",
"0.52172625",
"0.5215828",
"0.52113795",
"0.5209075",
"0.52087855",
"0.5208444",
"0.5208219",
"0.51945764",
"0.5192227",
"0.5190811"
]
| 0.80435747 | 0 |
Test the ThemeLevel subclass. | public void testThemeLevel() {
Board brd = new Board();
ThemeLevel lvl = new ThemeLevel(brd);
assertEquals("Theme", lvl.getLevelType());
String name = "BestTheme";
lvl.setThemeName(name);
assertEquals(name, lvl.getThemeName());
Dictionary dictionary = new Dictionary();
lvl.setDictionary(dictionary);
assertEquals(dictionary, lvl.getDictionary());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void levelsTest() {\n // TODO: test levels\n }",
"public void testLightningLevel() {\n\t\tBoard brd = new Board();\n\t\tLightningLevel lvl = new LightningLevel(brd);\n\n\t\tassertEquals(\"Lightning\", lvl.getLevelType());\n\n\t\tlvl.assignTime(42);\n\t\tassertEquals(42, lvl.getTime());\n\t}",
"public void testPuzzleLevel() {\n\t\tBoard brd = new Board();\n\t\tPuzzleLevel lvl = new PuzzleLevel(brd);\n\n\t\tassertEquals(\"Puzzle\", lvl.getLevelType());\n\n\t\tlvl.assignMaxWords(42);\n\t\tassertEquals(42, lvl.getMaxWords());\n\t}",
"boolean hasLevel();",
"boolean hasLevel();",
"boolean hasLevel();",
"boolean hasLevel();",
"protected int getLevel(){\r\n return this.level;\r\n }",
"protected abstract void applyLevel(Resources res);",
"public abstract int levelRequired();",
"int getLevel();",
"int getLevel();",
"int getLevel();",
"int getLevel();",
"int getLevel();",
"public void testLevelShared() {\n\t\tLevel lvl = new Level();\n\t\tassertEquals(\"\", lvl.getLevelType());\n\t\tBoard brd = new Board();\n\t\tlvl.setBoard(brd);\n\t\tassertEquals(brd, lvl.getBoard());\n\n\t\tint[] stars = new int[3];\n\t\tstars[0] = 0;\n\t\tstars[1] = 1;\n\t\tstars[2] = 2;\n\n\t\tlvl.setStars(stars);\n\t\tassertEquals(stars, lvl.getStars());\n\n\t\tlvl.setStarAt(5, 1);\n\t\tassertEquals(5, lvl.getStarAt(1));\n\n\t}",
"@Override\r\n public String levelName() {\r\n return \"Green 3\";\r\n }",
"@Test\n\tpublic void test2_changeTheme() throws GeneralLeanFtException {\n\t\t\n\t\t\n\t\ttry\n\t\t{\n\t\t\tSystem.out.println(\"Test 2 - Check Change Theme Started\");\n\t\t\t\n\t\t\t//App should exist \n\t\t\tassertTrue(mySet.appExistsorNot());\t\t\n\t\t\tWindow mainWindow = Desktop.describe(Window.class, new WindowDescription.Builder()\n\t\t\t.title(\"SwingSet2\").index(0).build());\n\n\t\t\t// Set the nativeClass value for the Description object.\n\t\t\tUiObject desktop = mainWindow.describe(UiObject.class, new UiObjectDescription.Builder().nativeClass(\"javax.swing.JDesktopPane\").build());\n\n\t\t\t// Verify that the item is not selected. (When selected, the background color is Aqua, 0x80c0c0 in hexadecimal.)\n\t\t\tassertNotEquals(\"80c0c0\", desktop.getBackgroundColor());\n\n\t\t\t// Create a description for the top-level menu item: Themes\n\t\t\tMenu themesMenu = mainWindow.describe(Menu.class, new MenuDescription.Builder().label(\"Themes\").build());\n\n\t\t\t// Verify that the themesMenu has the expected 9 sub-menus.\n\t\t\tassertEquals(9, themesMenu.getSubMenus().size());\n\n\t\t\t// *** Various ways to select a sub-menu ***\n\t\t\t// 1) Use the SelectSubMenu method to accept the path of the sub-menu and select the item.\n\t\t\t// Separate multi-level path elements with a semicolon (;).\n\t\t\tthemesMenu.selectSubMenu(\"Aqua\");\n\n\t\t\t// 2) Use the GetSubMenu method to return a menu test object representing the sub-menu item, which is then selected.\n\t\t\tthemesMenu.getSubMenu(\"Aqua\").select();\n\n\t\t\t// 3) Use the SubMenus property to return a menu test object representing the sub-menu item, which is then selected.\n\t\t\t// (Applicable only when selecting a direct child of the parent menu.)\n\t\t\tMenu aquaSubMenu = themesMenu.getSubMenus().get(4);\n\t\t\tassertEquals(\"Aqua\", aquaSubMenu.getLabel()); //to verify we have taken the correct menu from the SubMenus collection.\n\t\t\taquaSubMenu.select();\n\n\t\t\t// Check that the item is selected by verifying that the background color is Aqua.\n\t\t\tassertEquals(\"80c0c0\", desktop.getBackgroundColor());\n\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"Unexpected Error Occurred. Message = \" + e.getMessage());\n\t\t\tassertTrue(false);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tSystem.out.println(\"Test 2 - Check Change Theme Finished\");\n\t\t}\n\t\t\n\t\t\n\t}",
"public void setLevel(String level);",
"@Override\n public void setRunLevel(int level) {\n\n }",
"protected void setLevel(int level){\r\n this.level = level;\r\n }",
"@Test\n public void hasToner(){\n assertEquals(5000, printer.getTonerLevel());\n }",
"boolean hasTheme();",
"@java.lang.Override\n public double getLevel() {\n return level_;\n }",
"@java.lang.Override\n public double getLevel() {\n return level_;\n }",
"public void setLevel(Level level) { this.currentLevel = level; }",
"double getLevel();",
"double getLevel();",
"@Test\r\n\tpublic final void testAddLevel() {\r\n\t\tlevels.add(lostLevel2);\r\n\t\tgameStatisticsLoss.addLevel(lostLevel2);\r\n\t\tassertTrue(gameStatisticsLoss.getLevels().equals(levels));\r\n\t}",
"protected void setLevel(int level)\n {\n this.level = level;\n }",
"public int level();",
"@java.lang.Override\n public double getLevel() {\n return level_;\n }",
"@java.lang.Override\n public double getLevel() {\n return level_;\n }",
"public int getLevel()\n {\n return level; \n }",
"@Override\n public String getLevel(){ //this is the toString() method!\n level = \"Platinum\";\n return level;\n }",
"public void testJellyCompatibility() {\n try {\n assertTrue(\"SettingChildren class is public\", Modifier.isPublic(SettingChildren.class.getModifiers()));\n assertTrue(\"FileStateProperty class is public\", Modifier.isPublic(FileStateProperty.class.getModifiers()));\n try {\n new FileStateProperty(\"Modules-Layer\").getValue();\n } catch (NullPointerException npe) {}\n } catch (Exception e) {\n throw new AssertionFailedErrorException(\"JellyTools compatibility conflict, please contact QA or any JellyTools developer.\", e);\n }\n }",
"private VP_Theme() {\n }",
"public void setLevel(int newlevel)\n {\n level = newlevel; \n }",
"private void setLevel(){\n\t\tif(getD(y) <= T)\n\t\t\tlevel = \"lower\";\n\t\telse\n\t\t\tlevel = \"higher\";\n\t}",
"public void setLevel(int level) { \r\n\t\tthis.level = level; \r\n\t}",
"public boolean isTheme( )\n {\n return getType( ) != null && ConstanteUtils.CONSTANTE_TYPE_LUTECE_SITE.equals( getType( ) );\n }",
"@Test(timeout = 4000)\n public void test080() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setAllLevelsVisible(true);\n assertTrue(homeEnvironment0.isAllLevelsVisible());\n \n homeEnvironment0.setAllLevelsVisible(false);\n assertEquals(13684944, homeEnvironment0.getLightColor());\n }",
"@Override\n public boolean test() {\n return parentName.equals(themesComboBox.target().getSelectedItem().toString());\n }",
"@Test\n public void testLevelEqualsContract() {\n EqualsVerifier.forClass(PdfaFlavour.Level.class).verify();\n }",
"public int getLevel()\r\n {\r\n return level;\r\n }",
"public static int getLevel()\r\n\t{\r\n\t\treturn level;\r\n\t}",
"public int getLevel(){\n return level;\n }",
"public int getLevel(){\n return level;\n }",
"@Override\n\t\n\tvoid level_specific_turret_setup(){\n\t}",
"public default int getLevel(){ return 0; }",
"public static int getLevel()\n {\n return level;\n }",
"public int getLevel()\n {\n return level;\n }",
"public abstract boolean levelUp();",
"public void setLevel(int level)\r\n {\r\n\tthis.level = level;\r\n }",
"int getLevel()\n\t{\n\t\treturn this.level;\n\t}",
"void createNewLevel(int level);",
"public int getLevel() { \r\n\t\treturn level; \r\n\t}",
"public int getLevel() {\r\n return level;\r\n }",
"public int getLevel()\n {\n return m_level;\n }",
"public void setLevel(int level) {\n this.level = level;\n }",
"public void setLevel(int level) {\n this.level = level;\n }",
"public void testDefaultFormat() {\n ThemeLayer tl = new ThemeLayer();\n assertTrue(tl.getFormat().equals(\"image/png\"));\n }",
"@Test\n public void testCustomLoggingLevels() {\n LogTestLogger customLogger = new LogTestLogger();\n Database.log.setCustom(customLogger);\n\n for(int i = 5; i >= 1; i--) {\n customLogger.getLines().clear();\n customLogger.setLevel(LogLevel.values()[i]);\n Log.v(LogDomain.DATABASE, \"TEST VERBOSE\");\n Log.i(LogDomain.DATABASE, \"TEST INFO\");\n Log.w(LogDomain.DATABASE, \"TEST WARNING\");\n Log.e(LogDomain.DATABASE, \"TEST ERROR\");\n assertEquals(5 - i, customLogger.getLines().size());\n }\n }",
"public String getLevel ()\n {\n return level;\n }",
"public int getLevel() {\n return level_;\n }",
"public int getLevel() {\n return level_;\n }",
"public static int getLevel() {\n return level;\n }",
"public int getLevel() {\n return level;\n }",
"public int getLevel() {\n return level;\n }",
"public int getLevel() {\n return level;\n }",
"public int getLevel() {\n return level;\n }",
"public int getLevel() {\n return level;\n }",
"public int getLevel() {\n return level;\n }",
"public int getLevel() {\n return level;\n }",
"public int getLevel() {\n return level;\n }",
"public int getLevel() {\n return level;\n }",
"public int getLevel() {\n return level;\n }",
"public int getLevel(){\n return this.level;\n }",
"public int getLevel(){\n return this.level;\n }",
"public double Getlevel()\r\n {\r\n return level;\r\n }",
"public void setLevel(Level level) {\r\n\t\tthis.level = level;\r\n\t}",
"@Override \n public double highlightLevel(GameObject o) {\n if (this.getLevel() < o.getLevel())\n return 1;\n return 0;\n }",
"public int getLevel(){\n\t\treturn level;\n\t}",
"@Override\n protected boolean onLevelChange(int level) {\n boolean patternLevelChange = patternDrawable.setLevel(level);\n return super.onLevelChange(level) | patternLevelChange;\n }",
"public void setLevel(int level){\n\t\tthis.level = level;\n\t}",
"public static Level[] createTestLevel(){\n\t\tLevel[] testLevels = new Level[16];\n\t\tint[] squareNum = new int[144];\n\t\n\t\tColor[] cl = new Color[144];\n\t\t\n\t\t\n\n\t\t\n\t\tfor (int i=0;i<144;i++){\n\t\t\tsquareNum[i] =0;\n\t\t\tcl[i]=null;\n\t\t}\n\t\tint count18=0;\n\t\tfor (int i=1;i<4;i++){\n\t\t\tfor (int j=1;j<7;j++){\n\t\t\t\tsquareNum[count18] =j;\n\t\t\t\tif (i==1){\n\t\t\t\t\tcl[count18]=Color.RED;\n\t\t\t\t}\n\t\t\t\telse if (i==2){\n\t\t\t\t\tcl[count18]=Color.YELLOW;\n\t\t\t\t}\n\t\t\t\telse if (i==3){\n\t\t\t\t\tcl[count18]=Color.GREEN;\n\t\t\t\t}\n\t\t\t\tcount18=count18+5;\n\t\t\t}\n\t\t}\n\n\n\t\tSquare bullPenSquare1[] = new Square[6]; \n\t\tbullPenSquare1[0] = new Square(1,3);\n\t\tbullPenSquare1[1] = new Square(0,1);\n\t\tbullPenSquare1[2] = new Square(0,2);\n\t\tbullPenSquare1[3] = new Square(0,3);\n\t\tbullPenSquare1[4] = new Square(0,4);\n\t\tbullPenSquare1[5] = new Square(0,5);\t\t\n\t\t\n\t\tSquare bullPenSquare2[] = new Square[6]; \n\t\tbullPenSquare2[0] = new Square(0,0);\n\t\tbullPenSquare2[1] = new Square(1,0);\n\t\tbullPenSquare2[2] = new Square(2,0);\n\t\tbullPenSquare2[3] = new Square(2,1);\n\t\tbullPenSquare2[4] = new Square(2,2);\n\t\tbullPenSquare2[5] = new Square(1,2);\t\t\n\n\t\tSquare bullPenSquare3[] = new Square[6]; \n\t\tbullPenSquare3[0] = new Square(1,1);\n\t\tbullPenSquare3[1] = new Square(0,1);\n\t\tbullPenSquare3[2] = new Square(0,2);\n\t\tbullPenSquare3[3] = new Square(0,3);\n\t\tbullPenSquare3[4] = new Square(0,4);\n\t\tbullPenSquare3[5] = new Square(0,5);\t\t\n\t\t\n\t\tSquare bullPenSquare4[] = new Square[6]; \n\t\tbullPenSquare4[0] = new Square(1,1);\n\t\tbullPenSquare4[1] = new Square(2,1);\n\t\tbullPenSquare4[2] = new Square(3,1);\n\t\tbullPenSquare4[3] = new Square(3,2);\n\t\tbullPenSquare4[4] = new Square(3,3);\n\t\tbullPenSquare4[5] = new Square(3,4);\t\t\n\n\t\tSquare bullPenSquare5[] = new Square[6]; \n\t\tbullPenSquare5[0] = new Square(0,2);\n\t\tbullPenSquare5[1] = new Square(1,2);\n\t\tbullPenSquare5[2] = new Square(2,2);\n\t\tbullPenSquare5[3] = new Square(3,2);\n\t\tbullPenSquare5[4] = new Square(4,2);\n\t\tbullPenSquare5[5] = new Square(5,2);\t\n\t\t\n\t\tSquare bullPenSquare6[] = new Square[6]; \n\t\tbullPenSquare6[0] = new Square(0,0);\n\t\tbullPenSquare6[1] = new Square(0,1);\n\t\tbullPenSquare6[2] = new Square(0,2);\n\t\tbullPenSquare6[3] = new Square(0,3);\n\t\tbullPenSquare6[4] = new Square(0,4);\n\t\tbullPenSquare6[5] = new Square(0,5);\t\n\t\t\n\t\tPiece bullPenPiece= new Piece(0,0,bullPenSquare1,bullPenSquare1[0],2);\n\t\tbullPenPiece.setColor(new Color(0,0,0));\n\n\n\t\tArrayList<Piece> bullPenPieceArray=new ArrayList<Piece>();\n\t\tbullPenPieceArray.add(new Piece(0,0,bullPenSquare1,bullPenSquare1[0],2));\n\t\tbullPenPieceArray.get(0).setColor(Color.BLUE);\n\t\tbullPenPieceArray.add(new Piece(0,0,bullPenSquare2,bullPenSquare2[0],2));\n\t\tbullPenPieceArray.get(1).setColor(Color.GREEN);\n\t\tbullPenPieceArray.add(new Piece(0,0,bullPenSquare3,bullPenSquare3[0],2));\n\t\tbullPenPieceArray.get(2).setColor(Color.YELLOW);\n\t\tbullPenPieceArray.add(new Piece(0,0,bullPenSquare4,bullPenSquare4[0],2));\n\t\tbullPenPieceArray.get(3).setColor(Color.ORANGE);\n\t\tbullPenPieceArray.add(new Piece(0,0,bullPenSquare5,bullPenSquare5[0],2));\n\t\tbullPenPieceArray.get(4).setColor(Color.RED);\n\t\tbullPenPieceArray.add(new Piece(0,0,bullPenSquare6,bullPenSquare6[0],2));\n\t\tbullPenPieceArray.get(5).setColor(Color.PINK);\n\n\n\t\tBullpen bp = new Bullpen(bullPenPieceArray);\n\t\t//Bullpen bp = new Bullpen();\n\n\n\n\t\tSquare[] boardSquare = new Square[144]; \n\t\tfor (int i1=0;i1<12;i1++){\n\t\t\tfor (int j=0;j<12;j++){\n\n\t\t\t\tboardSquare[i1*12+j] = new Square(i1,j);\n\t\t\t}\n\t\t}\n\n\t\tSquare hitSquares[] = new Square[6]; \n\t\thitSquares[0] = new Square(6,4);\n\t\thitSquares[1] = new Square(5,2);\n\t\thitSquares[2] = new Square(5,3);\n\t\thitSquares[3] = new Square(5,4);\n\t\thitSquares[4] = new Square(5,5);\n\t\thitSquares[5] = new Square(5,6);\t\n\n\t\tHint hints = new Hint(hitSquares);\n\n\t\tBoard testBoard = new Board(boardSquare);\n\t\ttestBoard.sethint(hints);\n\t\t\n\t\t////// add remove test\n\t\t//bullPenPiece.setColor(Color.PINK);\n\t\t//bp.removepiece(bullPenPieceArray.get(5));\n\t\t//testBoard.addpiece(bullPenPiece);\n\t\t///test over\n\t\t\n\t\tfor (int i=0;i<15;i++){\n\t\t\tif (i%3==0){\n\t\t\t\ttestLevels[i] = new PuzzleLevel(i,GetLevelTpye(i%3),testBoard,bp,20);\n\t\t\t\ttestLevels[i].updateLevelStar(new Achievement(new Random().nextInt(3) + 1));\n\t\t\t}\n\t\t\telse if (i%3==1){\n\t\t\t\ttestLevels[i] = new LightningLevel(i,GetLevelTpye(i%3),testBoard,bp,30);\n\t\t\t\ttestLevels[i].updateLevelStar(new Achievement(new Random().nextInt(3) + 1));\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttestLevels[i] = new ReleaseLevel(i,GetLevelTpye(i%3),testBoard,bp,squareNum,cl);\n\t\t\t\ttestLevels[i].updateLevelStar(new Achievement(new Random().nextInt(3) + 1));\n\t\t\t}\n\n\t\t}\n\t\ttestLevels[13].updateLevelStar(new Achievement(0));\n\t\ttestLevels[14].updateLevelStar(new Achievement(-1));\n\n\t\t\n\t\t\n\t\t\n\t\t//---------------------------------------------- \n\t\tint[] sixNum = new int[36];\n\t\tColor[] sixcolor = new Color[36];\n\t\tfor (int i=0;i<36;i++){\n\t\t\tsixNum[i] =0;\n\t\t\tsixcolor[i]=null;\n\t\t}\n\t\tint count1=0;\n\t\tfor (int i=1;i<4;i++){\n\t\t\tfor (int j=1;j<7;j++){\n\t\t\t\tsquareNum[count1] =j;\n\t\t\t\tif (i==1){\n\t\t\t\t\tcl[count1]=Color.RED;\n\t\t\t\t}\n\t\t\t\telse if (i==2){\n\t\t\t\t\tcl[count1]=Color.YELLOW;\n\t\t\t\t}\n\t\t\t\telse if (i==3){\n\t\t\t\t\tcl[count1]=Color.GREEN;\n\t\t\t\t}\n\t\t\t\tcount1=count1+1;\n\t\t\t}\n\t\t}\n\t\tSquare[] sixBoardSquare = new Square[36]; \n\t\tfor (int i1=0;i1<6;i1++){\n\t\t\tfor (int j=0;j<6;j++){\n\n\t\t\t\tsixBoardSquare[i1*6+j] = new Square(i1,j);\n\t\t\t}\n\t\t}\n\t\tSquare sixhint[] = new Square[6]; \n\t\tsixhint[0] = new Square(0,0);\n\t\tsixhint[1] = new Square(0,1);\n\t\tsixhint[2] = new Square(0,2);\n\t\tsixhint[3] = new Square(0,3);\n\t\tsixhint[4] = new Square(0,4);\n\t\tsixhint[5] = new Square(0,5);\t\n\n\t\tHint sixhints = new Hint(sixhint);\n\n\t\tBoard sixBoard = new Board(sixBoardSquare);\n\t\tsixBoard.sethint(sixhints);\n\t\t\n\t\ttestLevels[15] = new ReleaseLevel(15,GetLevelTpye(14%3),sixBoard,bp,sixNum,sixcolor);\n\t\ttestLevels[15].updateLevelStar(new Achievement(1));\n\t\t//--------------------------------------------\n\t\t\n\t\treturn testLevels;\n\t\t/*\n\t\t\tpublic Level(int LevelNumber, String LevelType, Board b, Bullpen p){\n\t\t\t\tthis.LevelNumber = LevelNumber;\n\t\t\t\tthis.LevelType = LevelType;\n\t\t\t\tthis.b = b;\n\t\t\t\tthis.p = p;\n\t\t\t}\n\n\t\t */\n\t}",
"public void changeLevel(Level level) {\n if (Consts.TEST) {\n this.level = level;\n return;\n }\n\n try {\n level.validate();\n } catch (Exception e) {\n e.printStackTrace();\n level = this.level;\n }\n this.level = level;\n entities.clear();\n pacman.respawn(level.getRandomPacmanSpawn());\n // items spawnen\n for (int y = 0; y < level.getHeight(); y++) {\n for (int x = 0; x < level.getWidth(); x++) {\n if (level.getField(x, y) == MapModule.DOT)\n entities.add(new Dot(x, y));\n else if (level.getField(x, y) == MapModule.POWERUP)\n entities.add(new PowerUp(x, y));\n else if (level.getField(x, y) == MapModule.SPEEDUP)\n entities.add(new SpeedUp(x, y));\n else if (level.getField(x, y) == MapModule.TELEPORT)\n entities.add(new Teleporter(x, y));\n }\n }\n\n // 4 Geister im normalen Spiel, 1 Geist fuer Tests\n for (int i = 0; i < (Consts.TEST ? 1 : Consts.NUM_GHOSTS); i++) {\n Ghost g = new Ghost(i);\n g.respawn(level.getNextGhostSpawn());\n entities.add(g);\n }\n }",
"public Level getLevel() {\r\n\t\treturn level;\r\n\t}",
"public int getLevel() {\n return level_;\n }",
"public int getLevel() {\n return level_;\n }",
"public int getLevel() {\n \t\treturn level;\n \t}",
"protected abstract Level[] getLevelSet();",
"public int getLevel() {\n\t\treturn 0;\n\t}",
"public int getLevel() {\n\t\treturn 0;\n\t}",
"public void setLevel(int level) {\r\n\t\t\r\n\t\tthis.level = level;\r\n\t\t\r\n\t}",
"boolean hasSkin();",
"public void setLevel(String level){\n\t\tthis.level = level;\n\t}",
"public void setLevel (String newLevel)\n {\n this.level = newLevel; \n }",
"@Test\n public void testAccessLevelDoesNotExist(){\n GenerateLevel generateLevel = new GenerateLevel(20,\n \"XmlFiles/missingStartGoalPos.xml\");\n generateLevel.loadLevel(2);\n }",
"@Override\n public int getRunLevel() {\n return 0;\n }"
]
| [
"0.5948332",
"0.58709085",
"0.5799992",
"0.5731315",
"0.5731315",
"0.5731315",
"0.5731315",
"0.55989903",
"0.5574725",
"0.5547378",
"0.55462044",
"0.55462044",
"0.55462044",
"0.55462044",
"0.55462044",
"0.5526788",
"0.5425427",
"0.539329",
"0.5387995",
"0.537464",
"0.5366619",
"0.53627896",
"0.5298725",
"0.52864784",
"0.52864784",
"0.5282961",
"0.5250889",
"0.5250889",
"0.5220871",
"0.5215071",
"0.52140045",
"0.5209577",
"0.5209577",
"0.51940817",
"0.5186157",
"0.5173261",
"0.51681674",
"0.51636815",
"0.51407415",
"0.5135897",
"0.51314896",
"0.5117258",
"0.5111483",
"0.5104262",
"0.5097951",
"0.5088999",
"0.5087665",
"0.5087665",
"0.50863034",
"0.5083161",
"0.50821465",
"0.50799257",
"0.50764096",
"0.50725543",
"0.50648135",
"0.505913",
"0.5058779",
"0.50572914",
"0.5055787",
"0.5055568",
"0.5055568",
"0.50532293",
"0.5048124",
"0.50452334",
"0.5026405",
"0.5026405",
"0.5014562",
"0.50100756",
"0.50100756",
"0.50100756",
"0.50100756",
"0.50100756",
"0.50100756",
"0.50100756",
"0.50100756",
"0.50100756",
"0.50100756",
"0.50082153",
"0.50082153",
"0.5007761",
"0.50019264",
"0.4995814",
"0.4993099",
"0.49896014",
"0.49810544",
"0.49755347",
"0.49720287",
"0.49667457",
"0.49664977",
"0.49664977",
"0.49654025",
"0.49638447",
"0.49537385",
"0.49537385",
"0.49483782",
"0.4939786",
"0.49352494",
"0.4933303",
"0.49328816",
"0.492857"
]
| 0.8094936 | 0 |
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
dateLbl = new javax.swing.JLabel();
date = new javax.swing.JTextField();
pleaseLbl = new javax.swing.JLabel();
hoursLb = new javax.swing.JLabel();
hours = new javax.swing.JTextField();
describeLb = new javax.swing.JLabel();
submitBtn = new javax.swing.JButton();
logoutBtn = new javax.swing.JButton();
jScrollPane1 = new javax.swing.JScrollPane();
description = new javax.swing.JTextArea();
setBackground(new java.awt.Color(170, 212, 212));
dateLbl.setFont(new java.awt.Font("Franklin Gothic Demi", 0, 18)); // NOI18N
dateLbl.setText("Date: ");
pleaseLbl.setFont(new java.awt.Font("Franklin Gothic Demi", 2, 18)); // NOI18N
pleaseLbl.setText("Please Describe Your Meeting with Your Buddy:");
hoursLb.setFont(new java.awt.Font("Franklin Gothic Demi", 0, 18)); // NOI18N
hoursLb.setText("Hours: ");
describeLb.setFont(new java.awt.Font("Franklin Gothic Demi", 0, 18)); // NOI18N
describeLb.setText("Description of Activity: ");
submitBtn.setBackground(new java.awt.Color(255, 255, 255));
submitBtn.setFont(new java.awt.Font("Franklin Gothic Demi", 0, 18)); // NOI18N
submitBtn.setText("Submit");
submitBtn.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
submitBtnMouseClicked(evt);
}
});
logoutBtn.setBackground(new java.awt.Color(255, 255, 255));
logoutBtn.setFont(new java.awt.Font("Franklin Gothic Demi", 0, 18)); // NOI18N
logoutBtn.setText("Log Out");
logoutBtn.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
logoutBtnMouseClicked(evt);
}
});
logoutBtn.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
logoutBtnActionPerformed(evt);
}
});
description.setColumns(20);
description.setRows(5);
jScrollPane1.setViewportView(description);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(pleaseLbl)
.addContainerGap(385, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addGroup(layout.createSequentialGroup()
.addComponent(dateLbl)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(date, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(logoutBtn))
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(hoursLb)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(hours, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addComponent(describeLb)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 526, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addGap(0, 0, Short.MAX_VALUE))))
.addGroup(layout.createSequentialGroup()
.addGap(327, 327, 327)
.addComponent(submitBtn)
.addGap(0, 0, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(logoutBtn))
.addGroup(layout.createSequentialGroup()
.addGap(40, 40, 40)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(dateLbl)
.addComponent(date, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addGap(69, 69, 69)
.addComponent(pleaseLbl)
.addGap(57, 57, 57)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(hoursLb)
.addComponent(hours, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 37, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(describeLb, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addComponent(submitBtn)
.addGap(90, 90, 90))
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Form() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public frmRectangulo() {\n initComponents();\n }",
"public form() {\n initComponents();\n }",
"public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }",
"public FormListRemarking() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n \n }",
"public FormPemilihan() {\n initComponents();\n }",
"public GUIForm() { \n initComponents();\n }",
"public FrameForm() {\n initComponents();\n }",
"public TorneoForm() {\n initComponents();\n }",
"public FormCompra() {\n initComponents();\n }",
"public muveletek() {\n initComponents();\n }",
"public Interfax_D() {\n initComponents();\n }",
"public quanlixe_form() {\n initComponents();\n }",
"public SettingsForm() {\n initComponents();\n }",
"public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }",
"public Soru1() {\n initComponents();\n }",
"public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }",
"public soal2GUI() {\n initComponents();\n }",
"public EindopdrachtGUI() {\n initComponents();\n }",
"public MechanicForm() {\n initComponents();\n }",
"public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }",
"public BloodDonationGUI() {\n initComponents();\n }",
"public quotaGUI() {\n initComponents();\n }",
"public PatientUI() {\n initComponents();\n }",
"public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }",
"public Oddeven() {\n initComponents();\n }",
"public myForm() {\n\t\t\tinitComponents();\n\t\t}",
"public intrebarea() {\n initComponents();\n }",
"public Magasin() {\n initComponents();\n }",
"public RadioUI()\n {\n initComponents();\n }",
"public ZobrazUdalost() {\n initComponents();\n }",
"public NewCustomerGUI() {\n initComponents();\n }",
"public FormUtama() {\n initComponents();\n }",
"public p0() {\n initComponents();\n }",
"public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }",
"public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }",
"public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }",
"public form2() {\n initComponents();\n }",
"public kunde() {\n initComponents();\n }",
"public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}",
"public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }",
"public MusteriEkle() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\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 .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }",
"public frmMain() {\n initComponents();\n }",
"public frmMain() {\n initComponents();\n }",
"public DESHBORDPANAL() {\n initComponents();\n }",
"public frmVenda() {\n initComponents();\n }",
"public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }",
"public Botonera() {\n initComponents();\n }",
"public FrmMenu() {\n initComponents();\n }",
"public OffertoryGUI() {\n initComponents();\n setTypes();\n }",
"public JFFornecedores() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\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, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }",
"public vpemesanan1() {\n initComponents();\n }",
"public EnterDetailsGUI() {\n initComponents();\n }",
"public Kost() {\n initComponents();\n }",
"public FormHorarioSSE() {\n initComponents();\n }",
"public frmacceso() {\n initComponents();\n }",
"public UploadForm() {\n initComponents();\n }",
"public HW3() {\n initComponents();\n }",
"public Managing_Staff_Main_Form() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }",
"public sinavlar2() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\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 .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"public P0405() {\n initComponents();\n }",
"public MiFrame2() {\n initComponents();\n }",
"public IssueBookForm() {\n initComponents();\n }",
"public Choose1() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }",
"public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }",
"public GUI_StudentInfo() {\n initComponents();\n }",
"public JFrmPrincipal() {\n initComponents();\n }",
"public bt526() {\n initComponents();\n }",
"public Pemilihan_Dokter() {\n initComponents();\n }",
"public Ablak() {\n initComponents();\n }",
"@Override\n\tprotected void initUi() {\n\t\t\n\t}",
"@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}",
"public Pregunta23() {\n initComponents();\n }",
"public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }",
"public AvtekOkno() {\n initComponents();\n }",
"public busdet() {\n initComponents();\n }",
"public ViewPrescriptionForm() {\n initComponents();\n }",
"public Ventaform() {\n initComponents();\n }",
"public Kuis2() {\n initComponents();\n }",
"public CreateAccount_GUI() {\n initComponents();\n }",
"public POS1() {\n initComponents();\n }",
"public Carrera() {\n initComponents();\n }",
"public EqGUI() {\n initComponents();\n }",
"public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\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 .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }",
"public nokno() {\n initComponents();\n }",
"public dokter() {\n initComponents();\n }",
"public ConverterGUI() {\n initComponents();\n }",
"public hitungan() {\n initComponents();\n }",
"public Modify() {\n initComponents();\n }",
"public frmAddIncidencias() {\n initComponents();\n }",
"public CovidGUI(){\n initComponents();\n }"
]
| [
"0.73199165",
"0.7291065",
"0.7291065",
"0.7291065",
"0.72868747",
"0.72488254",
"0.7214099",
"0.7209363",
"0.7196111",
"0.7190702",
"0.7184576",
"0.71590984",
"0.71483636",
"0.7093415",
"0.70814407",
"0.70579475",
"0.69872457",
"0.69773155",
"0.6955104",
"0.69544697",
"0.69453543",
"0.6943464",
"0.69364315",
"0.6931576",
"0.6928309",
"0.6925433",
"0.69250214",
"0.69115317",
"0.6911434",
"0.6893781",
"0.6892524",
"0.6891883",
"0.6891585",
"0.68891054",
"0.6883182",
"0.68830794",
"0.6881544",
"0.68788856",
"0.6876481",
"0.6873896",
"0.6871883",
"0.6859969",
"0.6856538",
"0.6855796",
"0.6855392",
"0.68540794",
"0.68534625",
"0.6853007",
"0.6853007",
"0.6844998",
"0.6837484",
"0.68364847",
"0.68297",
"0.6829288",
"0.6827209",
"0.6824552",
"0.6822856",
"0.68174845",
"0.6817476",
"0.68111503",
"0.6809666",
"0.6809588",
"0.6809156",
"0.68081236",
"0.6802404",
"0.6794206",
"0.6793367",
"0.6792882",
"0.6791294",
"0.6789582",
"0.67894405",
"0.6788515",
"0.6782408",
"0.6766765",
"0.6766263",
"0.67650926",
"0.67574364",
"0.6756913",
"0.6753227",
"0.67513406",
"0.6741571",
"0.6740101",
"0.6737476",
"0.6737115",
"0.67346376",
"0.6727922",
"0.6727414",
"0.67207795",
"0.67162555",
"0.67161065",
"0.6715331",
"0.6709024",
"0.67072886",
"0.6703357",
"0.67023003",
"0.6701596",
"0.66995883",
"0.6699478",
"0.6694889",
"0.66919625",
"0.6689987"
]
| 0.0 | -1 |
when mentor clicks submit, save their inputted data as a new column in EVENTS SQL table | private void submitBtnMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_submitBtnMouseClicked
Scanner check = new Scanner(hours.getText());
if (check.hasNextDouble() || check.hasNextInt()) {
Meeting m = new Meeting(date.getText(), hours.getText(), description.getText(), currentID);
database.setInfo(m.getDate(), m.getHours(), m.getDescription(), m.getMentorID());
//input meeting info to EVENTS table under the correct column
Component frame = null;
JOptionPane.showMessageDialog(frame, "Event successfully submitted!");
} else {
Component frame = null;
JOptionPane.showMessageDialog(frame, "Error: Please enter a valid number of hours");
//if bad user input, show error message
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void saveEvent(){\n String event_name = eventName.getText().toString();\r\n String coach = coach_string;\r\n String time = class_time_string;\r\n int nfcID= 4;\r\n\r\n Map<String, Object> data = new HashMap<>();\r\n\r\n data.put(\"event_name\", event_name);\r\n data.put(\"coach\", coach);\r\n data.put(\"class_time\", time);\r\n data.put(\"nfcID\", nfcID);\r\n\r\n Database.writeClassDb(data, time ,date);\r\n startActivity(new Intent(addCalenderEvent.this, CalendarActivity.class));\r\n finish();\r\n }",
"private void onSaveButtonClicked() {\n final String date = dayValue + \".\" + monthValue + \".\" + yearValue;\n final String name = edtEventName.getText().toString();\n final String location = edtEventLocation.getText().toString();\n final String desc = edtEventDesc.getText().toString();\n final EventData eventData = new EventData(name,\n date, location, desc);\n\n // create a new thread to insert or update db\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n // the condition when user click the one of the items in recyclerView (Update existing row)\n if (intent != null && intent.hasExtra(\"id\")) {\n eventData.setId(intent.getIntExtra(\"id\", 0));\n eventDatabase.eventDAO().updateEvent(eventData);\n }\n // the condition when user click plus button from MainActivity.java (Insert a new row)\n else {\n eventDatabase.eventDAO().insertNewEvent(eventData);\n\n }\n finish(); // destroy activity (when u press back key after clicking \"save btn\", this activity won't be called again)\n }\n });\n }",
"@OnClick(R.id.btn_save_event)\n public void saveChanges() {\n if (isNewEvent) {\n createEvent();\n } else {\n updateEvent();\n }\n }",
"public void addEvent(FbEvent event) throws SQLException{\n\t\tSQLiteDatabase db = tableHelper.getWritableDatabase();\n\t\ttry {\n\t\t\tContentValues contents = prepareContentValues(event);\n\t\t\tdb.insert(SQLTablesHelper.MY_EVENT_TABLE_NAME, null, contents);\n\t\t} finally {\n\t\t\tdb.close();\n\t\t}\n\t}",
"public void saveForm(ActionEvent event) throws SQLException, ParseException {\n actionItemClass obj = new actionItemClass();\n obj.saveForm(this);\n }",
"private void storeEvent() throws IOException {\n\t\tMagical.getStorage().create(Storage.EVENTS_INDEX, event);\n\t\tMagical.addDisplayList(Storage.EVENTS_INDEX, event);\n\t}",
"public void storeEvent(Event event) {\n Entity eventEntity = new Entity(\"Event\", event.getEventId().toString());\n eventEntity.setProperty(\"speaker\", event.getSpeaker());\n eventEntity.setProperty(\"organization\", event.getOrganization());\n eventEntity.setProperty(\"eventDate\", event.getEventDate());\n eventEntity.setProperty(\"externalLink\", event.getExternalLink());\n eventEntity.setProperty(\"ownerId\", event.getOwnerId());\n eventEntity.setProperty(\"publicType\", event.getPublicType());\n // eventEntity.setProperty(\"timeStamp\", event.getTimeStamp());\n // This try/catch statement is to prevent null pointer exceptions from fields\n // that might not be defined yet in an event\n // Currently, the events form does not handle these fields so they are in the\n // try catch together\n try {\n eventEntity.setProperty(\"location\", event.getLocation());\n for (String am : event.getAmenities()) {\n storeAmenity(am, event.getEventId());\n }\n for (ThreadComment cm : event.getThread()) {\n storeThreadComment(cm);\n }\n } catch (NullPointerException e) {\n eventEntity.setProperty(\"location\", null);\n }\n\n datastore.put(eventEntity);\n }",
"public void saveButtonPushed(ActionEvent event)\r\n {\r\n try{\r\n user.logHours(datePicker.getValue(), (int) hoursWorkedSpinner.getValue());\r\n errMsgLabel .setText(\"Sales Logged\");\r\n updateLineChart();\r\n }\r\n catch(SQLException e)\r\n {\r\n System.err.println(e.getMessage());\r\n }\r\n catch(IllegalArgumentException e)\r\n {\r\n errMsgLabel.setText(e.getMessage());\r\n }\r\n }",
"private void submit_attendance() {\n }",
"@FXML\n public void save(ActionEvent event) throws SQLException {\n current.parseRole(roleTextBox.getText());\n \n current.setName(comboFkp.getValue());\n current.setTitle(comboFkm.getValue());\n \n if(inserting) {\n System.out.println(\"Inserting \" + current.getTitle() + \" \" + current.getName());\n // Precisa inserir dois booleanos no final, um para ator e um para diretor\n dh.insertPersonMidia(current.getTitle(), current.getName(), current.getActor(), current.getDirector());\n }\n\n closeWindow();\n }",
"@Override\r\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\tString fn = tffname.getText();\r\n\t\t\tString ln = tflname.getText();\r\n\t\t\tString eml= tfemail.getText();\r\n\t\t\tString phn = tfphone.getText();\r\n\t\t\tString user = tfusername.getText();\r\n\t\t\tString pass = tfpasswrd.getText();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tstatement.executeUpdate(\"INSERT INTO register VALUES('\"+fn+\"','\"+ln+\"','\"+eml+\"','\"+phn+\"','\"+user+\"','\"+pass+\"')\");\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n\r\n\t\t}",
"@PostMapping(\"/createevent\")\n public String createEventSubmit(@ModelAttribute Event event, Model model) {\n\n Boolean isValid = true;\n String reasonForFailure = \"\";\n Studio studioLookup = mainDBService.lookupStudioByShortName(event.getStudioShortName());\n if (studioLookup == null) {\n isValid = false;\n reasonForFailure += \"Studio not found\";\n }\n\n String eventType = event.getEventType();\n if (!(eventType.equalsIgnoreCase(\"movie\") || eventType.equalsIgnoreCase(\"ppv\"))) {\n isValid = false;\n reasonForFailure += \"Event type is not movie or ppv\";\n }\n\n Event saved = null;\n if (isValid) {\n System.out.println(\"passed validation steps\");\n saved = mainDBService.saveEvent(event);\n //saved = eventRepository.save(event);\n }\n\n if (saved != null) {\n model.addAttribute(\"successmessage\", \"Event Saved Successfully!\");\n return \"index.xhtml\";\n } else {\n model.addAttribute(\"errormessage\", String.format(\"Event save Failed for the following reasons: %s, Please try again\", reasonForFailure));\n model.addAttribute(\"event\", event);\n return \"createevent.xhtml\";\n }\n }",
"@Override\n public void onClick(View v) {\n if (TextUtils.isEmpty(edt_title.getText().toString()) && !TextUtils.isEmpty(edt_discription.getText().toString())) {\n Toast.makeText(MainActivity.this, \"Enter title!\", Toast.LENGTH_SHORT).show();\n } else if (!TextUtils.isEmpty(edt_title.getText().toString()) && TextUtils.isEmpty(edt_discription.getText().toString())) {\n Toast.makeText(MainActivity.this, \"Enter description!\", Toast.LENGTH_SHORT).show();\n } else if (TextUtils.isEmpty(edt_title.getText().toString()) && TextUtils.isEmpty(edt_discription.getText().toString())) {\n Toast.makeText(MainActivity.this, \"Enter title and description!\", Toast.LENGTH_SHORT).show();\n } else {\n alertDialog.dismiss();\n }\n\n //Update or add data into the database only when both field are filled(i.e title,description)\n if (!TextUtils.isEmpty(edt_title.getText().toString()) && !TextUtils.isEmpty(edt_discription.getText().toString())) {\n\n // check if user updating note\n\n if (shouldUpdate && event != null) {\n // update event\n new DatabaseAsync(eventDatabase).execute(shouldUpdate, position, edt_title.getText().toString(), edt_discription.getText().toString(), date);\n\n\n } else {\n // create new event\n new DatabaseAsync(eventDatabase).execute(shouldUpdate, -1, edt_title.getText().toString(), edt_discription.getText().toString(), date);\n\n\n }\n }\n }",
"public String indertEvent(Event e){\n \n \n String result = \"0\";\n Connection con = null;\n //building the sql\n String SQLCommand = \"INSERT INTO event \" + \n \"(id,name,start_time,end_time,seating_plan_id) \" + \n \"VALUES (seq_event_id.NEXTVAL,?,?,?,1)\"; \n try{\n //obtain the database connection by calling getConn() \n con = getConn();\n \n //create the PreparedStatement from the Connection object by calling prepareCall\n //method, passing it the sql , parameters are represented by ? in the sql\n PreparedStatement ps = con.prepareStatement(SQLCommand); \n \n //setting the parameters values\n ps.setString(1, e.getName()); \n ps.setDate(2, new java.sql.Date(e.getStartTime().getTime()));\n ps.setDate(3, new java.sql.Date(e.getEndTime().getTime())); \n //ps.setLong(4, sp.getSeatingPlanID());\n \n \n //exceuting the insert or update operation \n ps.executeUpdate(); \n }\n catch (SQLException ex){\n ex.printStackTrace();\n result = ex.getMessage();\n }\n return result;\n }",
"@Override\n public void onClick(View v)\n {\n if(Admin.equals(mFirebaseAuth.getCurrentUser().getEmail()))\n {\n Toast.makeText(EventDetailsActivity.this,\"Updating Event...\",Toast.LENGTH_SHORT).show();\n\n UserID = mFirebaseAuth.getCurrentUser().getEmail();\n\n //Retrieves updated data of the event to write in database\n uTitle = editTextTitle.getText().toString().trim();\n uEventDetails = editTextDetails.getText().toString().trim();\n uLocation = editTextLocation.getText().toString().trim();\n uHour=editTextHours.getText().toString().trim();\n uMinute=editTextMinutes.getText().toString().trim();\n uDuration = editTextHours.getText().toString().trim() + \" hours \"+editTextMinutes.getText().toString().trim() + \" minutes\";\n uDate = editTextDate.getText().toString().trim();\n uTime = editTextTime.getText().toString().trim();\n\n //Checks for empty fields and prompts user to fill them\n if(uTitle.isEmpty())\n {\n editTextTitle.setError(\"Please enter Title.\");\n editTextTitle.requestFocus();\n }\n\n else if(uLocation.isEmpty())\n {\n editTextLocation.setError(\"Please enter Location.\");\n editTextLocation.requestFocus();\n }\n\n else if(uEventDetails.isEmpty())\n {\n editTextDetails.setError(\"Please enter Details.\");\n editTextDetails.requestFocus();\n }\n\n else if(editTextHours.getText().toString().trim().isEmpty())\n {\n editTextHours.setError(\"Please fill Duration.\");\n editTextHours.requestFocus();\n }\n\n else if(editTextMinutes.getText().toString().trim().isEmpty())\n {\n editTextMinutes.setError(\"Please fill Duration.\");\n editTextMinutes.requestFocus();\n }\n\n else if(uTime.isEmpty())\n {\n editTextTime.setError(\"Please select Time by pressing clock icon above.\");\n editTextTime.requestFocus();\n }\n\n else if(uDate.isEmpty())\n {\n editTextDate.setError(\"Please select date by pressing calendar icon above.\");\n editTextDate.requestFocus();\n }\n\n else\n {\n //checks if current user is event admin\n if(Admin.equals(UserID))\n {\n progressBar.setVisibility(View.VISIBLE);\n //checks if event has a file\n if(PDFUri!=null)\n {\n StorageReference storageReference=storage.getReference();\n\n //adding file to database if a file is selected\n storageReference.child(\"Uploads\").child(fileName).putFile(PDFUri)\n .addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>()\n {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot)\n {\n Toast.makeText(EventDetailsActivity.this,\"Upload Successful!\",Toast.LENGTH_SHORT).show();\n taskSnapshot.getStorage().getDownloadUrl()\n .addOnSuccessListener(new OnSuccessListener<Uri>()\n {\n @Override\n public void onSuccess(Uri uri)\n {\n pdf_url=uri.toString();\n\n final Event updatedEvent = new Event(UserID,uTitle,uEventDetails,uLocation,uDuration,uDate,uTime,Year,Month,Day,Hour,Minute,members,pdf_url,fileName);\n\n //Updates event for current user\n userRef.document(UserID).collection(\"Events\").document(ID).set(updatedEvent)\n .addOnSuccessListener(new OnSuccessListener<Void>()\n {\n @Override\n public void onSuccess(Void aVoid)\n {\n /*\n for(int i=0;i<eventMembers.size();i++)\n {\n userRef.document(eventMembers.get(i)).collection(\"Events\").add(updatedEvent);\n members.remove(members.indexOf(eventMembers.get(i)));\n }\n eventMembers.clear();\n */\n\n //Adds event to newly selected event members\n if(eventMembers.size()!=0)\n {\n j=0;\n addSharedEvents(eventMembers.get(j),updatedEvent);\n }\n\n //Updates event for shared members\n k=0;\n if ((members.size()>0))\n {\n updateSharedEvents(members.get(k),updatedEvent);\n }\n\n Toast.makeText(EventDetailsActivity.this,\"Event Updated.\",Toast.LENGTH_SHORT).show();\n //Returns to Home page on completion\n Intent i =new Intent(EventDetailsActivity.this,HomeActivity.class);\n startActivity(i);\n }\n })\n .addOnFailureListener(new OnFailureListener()\n {\n @Override\n public void onFailure(@NonNull Exception e)\n {\n Toast.makeText(EventDetailsActivity.this,\"Error: \"+e,Toast.LENGTH_SHORT).show();\n }\n });\n\n }\n });\n\n }\n })\n .addOnFailureListener(new OnFailureListener()\n {\n @Override\n public void onFailure(@NonNull Exception e)\n {\n Toast.makeText(EventDetailsActivity.this,e.getMessage(),Toast.LENGTH_SHORT).show();\n }\n })\n .addOnCompleteListener(new OnCompleteListener<UploadTask.TaskSnapshot>()\n {\n @Override\n public void onComplete(@NonNull Task<UploadTask.TaskSnapshot> task)\n {\n progressBar.setVisibility(View.INVISIBLE);//Sets progress bar to invisible to show that event has been updated\n }\n });\n }\n //if the event does not have a file\n else\n {\n final Event updatedEvent = new Event(UserID,uTitle,uEventDetails,uLocation,uDuration,uDate,uTime,Year,Month,Day,Hour,Minute,members,pdf_url,fileName);\n\n //Updates event for current user\n userRef.document(UserID).collection(\"Events\").document(ID).set(updatedEvent)\n .addOnSuccessListener(new OnSuccessListener<Void>()\n {\n @Override\n public void onSuccess(Void aVoid)\n {\n //Adds event to newly shared mails\n if(eventMembers.size()!=0)\n {\n j=0;\n addSharedEvents(eventMembers.get(j),updatedEvent);\n }\n\n //Updates events for members who the event is already shared with\n k=0;\n if(members.size()>0)\n {\n updateSharedEvents(members.get(k), updatedEvent);\n }\n\n Toast.makeText(EventDetailsActivity.this,\"Event Updated.\",Toast.LENGTH_SHORT).show();\n progressBar.setVisibility(View.INVISIBLE); //Shows updation has been completed\n //Returns to Home page after deletion\n Intent i =new Intent(EventDetailsActivity.this,HomeActivity.class);\n startActivity(i);\n }\n })\n .addOnFailureListener(new OnFailureListener()\n {\n @Override\n public void onFailure(@NonNull Exception e)\n {\n Toast.makeText(EventDetailsActivity.this,\"Error: \"+e,Toast.LENGTH_SHORT).show();\n }\n });\n\n }\n\n }\n else\n {\n AlertDialog alertDialog = new AlertDialog.Builder(EventDetailsActivity.this).create();\n alertDialog.setTitle(\"Cannot Update Event\");\n alertDialog.setMessage(\"User does not have Admin Privileges.\");\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener()\n {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n }\n }\n }\n\n else\n {\n AlertDialog alertDialog = new AlertDialog.Builder(EventDetailsActivity.this).create();\n alertDialog.setTitle(\"CannotUpdate Event\");\n alertDialog.setMessage(\"User does not have Admin Privileges.\");\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n }\n\n\n }",
"@FXML private void YesClicked(ActionEvent actionEvent) throws IOException {\n\n final String DB_NAME = \"testDB\";\n final String REPLY_TABLE =\"REPLY\";\n try (Connection con = ConnectionTest.getConnection(DB_NAME);\n Statement stmt = con.createStatement();) {\n String query = \"INSERT INTO \"+REPLY_TABLE+\" VALUES ('\"+postID+\"','\"+username+\"',1.0)\";\n int r = stmt.executeUpdate(query);\n con.commit();\n System.out.println(\"Insert into table \" + REPLY_TABLE + \" executed successfully \"+r);\n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n //UPDATE THE EVENT ATTENDEE COUNT BY 1\n int newAttend = newAttendCount(postID);\n updateEventAtCount(postID,newAttend);\n capExceed(postID);\n Alert Confirmed = new Alert(Alert.AlertType.INFORMATION);\n Confirmed.setTitle(\"Join Success\");\n Confirmed.setHeaderText(\"Congrats! You successfully Joined\");\n Confirmed.showAndWait();\n backTomain(actionEvent);\n }",
"public static void addReminder(String username)\n {\n System.out.print(\"Event Number: \");\n String eventNo = CheckInput.getString();\n System.out.print(\"Reminder Date (YYYY-MM-DD): \");\n String reminderDate = CheckInput.getString();\n System.out.print(\"Reminder Time (HH:MM:SS): \");\n String reminderTime = CheckInput.getString();\n System.out.print(\"Frequency (daily,weekly,monthly): \");\n String frequency = CheckInput.getString();\n \n try\n {\n String sql = \"INSERT INTO REMINDER (USERNAME,EVENTNUMBER,REMINDERDATE,REMINDERTIME,FREQUENCY) \"\n + \"VALUES (?,?,?,?,?)\";\n PreparedStatement pstmt = conn.prepareStatement(sql);\n \n pstmt.setString(1,username);\n pstmt.setString(2,eventNo);\n pstmt.setString(3,reminderDate);\n pstmt.setString(4,reminderTime);\n pstmt.setString(5,frequency);\n \n pstmt.execute();\n }\n catch(Exception ex)\n {\n ex.printStackTrace();\n }\n }",
"private void saveData() {\n try {\n Student student = new Student(firstName.getText(), lastName.getText(),\n form.getText(), stream.getText(), birth.getText(),\n gender.getText(), Integer.parseInt(admission.getText()),\n Integer.parseInt(age.getText()));\n\n\n if (action.equalsIgnoreCase(\"new\") && !assist.checkIfNull(student)) {\n\n dao.insertNew(student);\n JOptionPane.showMessageDialog(null, \"Student saved !\", \"Success\", JOptionPane.INFORMATION_MESSAGE);\n\n } else if (action.equalsIgnoreCase(\"update\") && !assist.checkIfNull(student)) {\n dao.updateStudent(student, getSelected());\n JOptionPane.showMessageDialog(null, \"Student Updated !\", \"Success\", JOptionPane.INFORMATION_MESSAGE);\n }\n\n prepareTable();\n prepareHistory();\n buttonSave.setVisible(false);\n admission.setEditable(true);\n }catch (Exception e)\n {}\n }",
"public void insertUpdate(DocumentEvent e) \n \t{\n \t\tsend_textbox_text_value = input_box.getText();\n \t\tif(isConnected == false)\n \t\t\treturn;\n \t\tSend_Button.setEnabled(Check_send());\n }",
"public void formEventOccurred(FormEvent e){\n\t\t\t\tcontroller.addPerson(e);\r\n\t\t\t\ttablePanel.refresh();\r\n\t\t\t}",
"private void saveEvent(){\n String eventName = eventNameView.getText().toString().trim();\n String dateString = eventDateView.getText().toString();\n String timeString = eventTimeView.getText().toString();\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd hh:mm a\");\n Calendar cal = Calendar.getInstance();\n try{\n Date date = sdf.parse(dateString+ \" \" + timeString);\n cal.setTime(date);\n }\n catch (Exception e){\n Log.d(\">>>\",e.toString());\n }\n\n if(eventName.length()>=1){\n final Event event = new Event(eventName, dateString, timeString, memberStatus, chat.getChatKey());\n String reminderPreferenceKeyTemp = \"\";\n if(this.event!=null){\n event.setEventKey(this.event.getEventKey());\n final DatabaseReference database = FirebaseDatabase.getInstance().getReference(\"events\");\n database.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n for(DataSnapshot e : dataSnapshot.getChildren()){\n if(e.child(\"eventKey\").getValue().toString().equals(event.getEventKey())){\n database.child(e.getKey()).setValue(event);\n Calendar cal = Calendar.getInstance();\n SimpleDateFormat sdf = new SimpleDateFormat(patternDate);\n try {\n Date date = sdf.parse(eventDateView.getText().toString());\n cal.setTime(date);\n ActivityEventCalendar.dateLong = cal.getTimeInMillis();\n if(ActivityEventCalendar.dateLong == cal.getTimeInMillis()){\n ActivityEventCalendar.displayEventList();\n finish();\n }\n }\n catch(Exception exception){\n\n }\n }\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n reminderPreferenceKeyTemp = event.getEventKey() + \"reminders\";\n }\n else{\n //creating event for the first time\n DatabaseReference database = FirebaseDatabase.getInstance().getReference(\"events\");\n eventFirebase = database.push();\n event.setEventKey(eventFirebase.getKey());\n database.push().setValue(event);\n reminderPreferenceKeyTemp = eventFirebase.getKey() + \"reminders\";\n }\n //write sharedpreferences for reminder\n final String reminderPreferenceKey = reminderPreferenceKeyTemp;\n Spinner spinner = (Spinner) findViewById(R.id.reminder_spinner);\n final SharedPreferences pref = getApplicationContext().getSharedPreferences(\"MyPref\", 0);\n final SharedPreferences.Editor editor = pref.edit();\n spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int position, long id) {\n if(position==0){\n //turn on\n editor.putBoolean(reminderPreferenceKey, true);\n editor.commit();\n }\n else if(position == 1){\n //turn off\n editor.putBoolean(reminderPreferenceKey, false);\n editor.commit();\n }\n }\n @Override\n public void onNothingSelected(AdapterView<?> parentView) { }\n });\n\n //create reminders\n boolean notify = pref.getBoolean(reminderPreferenceKey, false);\n\n if(notify){\n Intent intent = new Intent(Intent.ACTION_EDIT);\n intent.setType(\"vnd.android.cursor.item/event\");\n intent.putExtra(\"beginTime\", cal.getTimeInMillis());\n intent.putExtra(\"allDay\", false);\n intent.putExtra(\"title\", event.getEventName());\n startActivity(intent);\n }\n if(!creatingNewChat){\n statusAdapter.updateFirebase();\n }\n ActivityEventCalendar.dateLong = cal.getTimeInMillis();\n if(ActivityEventCalendar.dateLong == cal.getTimeInMillis()){\n ActivityEventCalendar.displayEventList();\n finish();\n }\n }\n else{\n Toast.makeText(this, \"Event name is invalid\", Toast.LENGTH_SHORT).show();\n }\n }",
"@SuppressWarnings(\"unchecked\")\n\tprivate void saveAndExit() throws IrregularFormatException{\n\t\tJSONObject event;\n\t\ttry{\n\t\t\tevent = new JSONObject();\n\t\t\tevent.put(Event.NAME_STRING, (String)nameText.getText());\n\t\t\tevent.put(Event.DATE_STRING, mDate);\n\t\t\tif(allDay.isSelected())\n\t\t\t{\n\t\t\t\tevent.put(Event.START_STRING, \"-1\");\n\t\t\t\tevent.put(Event.STOP_STRING, \"-1\");\n\t\t\t}else{\n\t\t\t\tevent.put(Event.START_STRING, startTime.getSelectedItem().toString());\n\t\t\t\tevent.put(Event.STOP_STRING, endTime.getSelectedItem().toString());\n\t\t\t}\n\t\t\tevent.put(Event.DESC_STRING, (String)descriptionText.getText());\n\t\t\t\n\t\t\tRandom r = new Random(System.currentTimeMillis());\n\t\t\tlong id = r.nextLong();\n\t\t\tevent.put(Event.ID_STRING, id );\n\t\t}catch(Exception e){\n\t\t\tthrow new IrregularFormatException();\n\t\t}\n\n\t\tEventCache.getInstance().addEvent(event);\n\t\tJOptionPane.showMessageDialog(this, \"Event Saved!\",\"Event Planner\",JOptionPane.INFORMATION_MESSAGE);\n\t\tthis.dispose();\n\t\tLock.getLock().release();\n\t\tCalendarApp.app.updateCurrentView();\n\t}",
"public static void editReminder()\n {\n System.out.print(\"Select event number to edit: \");\n String editEvNum = CheckInput.getString();\n System.out.print(\"New reminder date: \");\n String newDate = CheckInput.getString();\n System.out.print(\"New reminder time: \");\n String newTime = CheckInput.getString();\n System.out.print(\"New frequency: \");\n String newFreq = CheckInput.getString();\n try\n {\n PreparedStatement ps = null;\n String editRem = \"update reminder set reminderdate = ?, remindertime = ?, frequency = ? where eventnumber = ?\";\n ps = conn.prepareStatement(editRem);\n ps.setString(1,newDate);\n ps.setString(2,newTime);\n ps.setString(3,newFreq);\n ps.setString(4,editEvNum);\n ps.executeUpdate();\n }\n catch(Exception ex)\n {\n ex.printStackTrace();\n }\n }",
"private void saveEvent(){\n boolean cancel = false;\n View focusView = null;\n\n // Reset errors.\n eventName.setError(null);\n room.setError(null);\n btnFrom.setError(null);\n btnTo.setError(null);\n btnHourFrom.setError(null);\n btnHourTo.setError(null);\n patient.setError(null);\n\n // Check if user entered an eventname\n String name = this.eventName.getText().toString();\n if(TextUtils.isEmpty(name)){\n eventName.setError(getString(R.string.error_field_required));\n focusView = eventName;\n cancel = true;\n }\n // Check if user entered an room\n String room = this.room.getText().toString();\n if(TextUtils.isEmpty(room)){\n this.room.setError(getString(R.string.error_field_required));\n focusView = this.room;\n cancel = true;\n }\n\n // Check if user entered an valid room\n if(!TextUtils.isEmpty(room)) {\n if (!checkRoom(rooms, Integer.parseInt(room))) {\n this.room.setError(getString(R.string.error_invalid_room));\n focusView = this.room;\n cancel = true;\n }\n }\n\n // Check if user entered a fromDate\n if(fromDate == null){\n this.btnFrom.setError(getString(R.string.error_field_required));\n focusView = this.btnFrom;\n cancel = true;\n if(!wholeDay.isChecked()){\n this.btnHourFrom.setError(getString(R.string.error_field_required));\n }\n }\n\n // Check if user entered a toDate\n if(toDate == null){\n this.btnTo.setError(getString(R.string.error_invalid_dates));\n focusView = this.btnTo;\n cancel = true;\n if(!wholeDay.isChecked()){\n this.btnHourTo.setError(getString(R.string.error_field_required));\n }\n }\n\n // Check if user entered an hour if whole day is unchecked\n if(!wholeDay.isChecked()){\n if(this.btnHourFrom.getText().toString().compareTo(getString(R.string.prompt_hour_from)) == 0){\n this.btnHourFrom.setError(getString(R.string.error_field_required));\n focusView = this.btnHourFrom;\n cancel = true;\n }\n if(this.btnHourTo.getText().toString().compareTo(getString(R.string.prompt_hour_to)) == 0){\n this.btnHourTo.setError(getString(R.string.error_field_required));\n focusView = this.btnHourTo;\n cancel = true;\n }\n }\n\n // Check if user entered right dates\n if(toDate != null && fromDate != null) {\n if (toDate.before(fromDate)) {\n this.btnTo.setError(getString(R.string.error_invalid_dates));\n if (!wholeDay.isChecked())\n this.btnHourTo.setError(getString(R.string.error_invalid_dates));\n focusView = this.btnTo;\n cancel = true;\n }\n }\n\n // Check if user entered a patient\n String patient = this.patient.getText().toString();\n if(TextUtils.isEmpty(patient)){\n this.patient.setError(getString(R.string.error_field_required));\n focusView = this.patient;\n cancel = true;\n }\n\n // Check if user entered an valid patient\n if(!TextUtils.isEmpty(patient)) {\n if (!checkPatient(patients, patient)) {\n this.patient.setError(getString(R.string.error_invalid_patient));\n focusView = this.patient;\n cancel = true;\n }\n }\n\n if (cancel) {\n focusView.requestFocus();\n } else {\n Event e = null;\n if(updating)\n e = ea.getEventById(event_id);\n else\n e = new Event();\n\n // required fields\n e.setEventname(this.eventName.getText().toString().trim());\n e.setRoom(Integer.parseInt(this.room.getText().toString().trim()));\n e.setFromDate(parseDateForDB(fromDate));\n e.setToDate(parseDateForDB(toDate));\n e.setNotificiation(this.notification);\n e.setPatient(checkPatientID(patients, patient));\n e.setDoctor(IdCollection.doctor_id);\n\n // optionals fields\n e.setDescription(this.desc.getText().toString().trim());\n if(!wholeDay.isChecked()){\n e.setFromTime(parseTimeForDB(fromDate));\n e.setToTime(parseTimeForDB(toDate));\n }else {\n e.setFromTime(-1);\n e.setToTime(-1);\n }\n\n if(updating)ea.updateEvent(e);\n else ea.createEvent(e);\n\n\n startAlarm(e,fromDate);\n goBackToCal();\n }\n }",
"public void submit(View view) {\n boolean boolRepeat = false;\n boolean boolReminder = false;\n int repeatOffset = 0;\n int color;\n\n EditText editTitle = findViewById(R.id.editTextName);\n String title;\n try {\n title = editTitle.getText().toString();\n if (title.equals(\"\")) {\n title = \"New Event\";\n }\n } catch (Exception e) {\n title = \"New Event\";\n }\n\n EditText editLocation = findViewById(R.id.editTextLocation);\n String location;\n try {\n location = editLocation.getText().toString();\n } catch (Exception e) {\n location = \"None\";\n }\n\n EditText editNotes = findViewById(R.id.editTextNotes);\n String notes;\n try {\n notes = editNotes.getText().toString();\n } catch (Exception e) {\n notes = \"None\";\n }\n\n final int hour1 = parseInt(startHour);\n final int minute1 = parseInt(startMinute);\n final int hour2 = parseInt(endHour);\n final int minute2 = parseInt(endMinute);\n\n Calendar startCalendar = Calendar.getInstance();\n Calendar endCalendar = Calendar.getInstance();\n\n Button btnDate = findViewById(R.id.editTextDate);\n date = btnDate.getText().toString();\n String[] numbers = date.split(\"/\");\n int year = parseInt(numbers[2]);\n int month = parseInt(numbers[0]) - 1;\n int day = parseInt(numbers[1]);\n\n startCalendar.set(year, month, day, hour1, minute1);\n endCalendar.set(year, month, day, hour2, minute2);\n\n\n if (!(repeat.equals(\"Never\"))) {\n boolRepeat = true;\n switch (repeat) {\n case \"Daily\":\n repeatOffset = 1;\n break;\n case \"Weekly\":\n repeatOffset = 2;\n break;\n case \"Biweekly\":\n repeatOffset = 3;\n break;\n case \"Monthly\":\n repeatOffset = 4;\n break;\n default:\n repeatOffset = 0;\n break;\n }\n }\n\n if (!(reminder.equals(\"Never\"))) {\n boolReminder = true;\n\n }\n\n switch (groupColor) {\n case \"Orange\":\n color = R.color.orange;\n break;\n case \"Yellow\":\n color = R.color.yellow;\n break;\n case \"Green\":\n color = R.color.green;\n break;\n case \"Blue\":\n color = R.color.blue;\n break;\n case \"Purple\":\n color = R.color.purple_200;\n break;\n case \"Red\":\n default:\n color = R.color.red;\n break;\n }\n\n Switch gradedSwitch = findViewById(R.id.gradedSwitch);\n Boolean graded = gradedSwitch.isChecked();\n\n Event event = new Event(title, startCalendar, endCalendar, color,\n location, boolRepeat, repeatOffset, boolReminder, notes, graded, grade);\n /* Toast.makeText(getApplicationContext(),\n event.getEventStart().get(Calendar.MONTH) + \"/\" +\n event.getEventStart().get(Calendar.DATE), Toast.LENGTH_LONG)\n .show(); */\n\n if (!editing) {\n eventId = eventDao.insert(event);\n if (boolRepeat) {\n repeat(eventId);\n }\n event.setId(eventId);\n if (event.getSendReminders()) {\n event.setRemindOffset(getRemindOffset());\n NotificationPublisher.scheduleEventNotification(this, event);\n }\n\n if (event.isGraded()) {\n NotificationPublisher.scheduleGradeEventNotification(this, event);\n }\n\n Intent intent = new Intent(this, DayViewV2.class);\n intent.putExtra(dateMessage, date);\n startActivity(intent);\n } else {\n event.setReviewNote(reviewNote);\n event.setId(eventId);\n eventDao.updateEvent(event);\n Intent intent = new Intent(this, EventView.class);\n intent.putExtra(eventMessage, eventId);\n startActivity(intent);\n }\n finish();\n }",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\ttry{\n\t\t\t\t\tString query =\"insert into message (username, msg) values (?,?)\";\n\t\t\t\t\tPreparedStatement pst = conn.prepareStatement(query);\n\t\t\t\t\tpst.setString(1, touserFeild.getText());\n\t\t\t\t\tpst.setString(2, msgFeild.getText());\n\t\t\t\t\t\n\t\t\t\t\tpst.execute();\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"post message success\");\n\t\t\t\t\t\n\t\t\t\t\tpst.close();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tcatch (Exception e7)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"post message fail\");\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Message Failed to post\");\n\t\t\t\t}\n\t\t\t\t//msgObject.refreshTable();\n\t\t\t\tdispose();\n\t\t\t}",
"public void saveAppointment(ActionEvent event) throws IOException {\n if(!validateInputFields()){\n return;\n }\n if(!validateTime()){\n return;\n }\n LocalDate date = startLDT.toLocalDate();\n int customer = customerCombo.getSelectionModel().getSelectedItem().getId();\n overlaps = getSameDateAppointments(customer, date);\n if(overlaps.size() > 0){\n boolean noOverlap = validateOverlap(overlaps);\n if (!noOverlap){\n showError(true, \"Selected time for customer overlaps with another appointment. Please select another time.\");\n return;\n }\n }\n // update db\n String titleField = titleText.getText();\n String descriptionField = descriptionText.getText();\n String loc = locationCombo.getSelectionModel().getSelectedItem().toString();\n int contact = contactCombo.getSelectionModel().getSelectedItem().getId();\n String ty = typeCombo.getSelectionModel().getSelectedItem().toString();\n int user = userCombo.getSelectionModel().getSelectedItem().getId();\n Timestamp start = convertZDT(startZDT);\n Timestamp end = convertZDT(endZDT);\n updateAppointment(selectedRow.getId(), titleField, descriptionField, loc, start, end, ty, user, contact, customer);\n backToMain(event);\n }",
"private Listener btn_Ok_Clicked() {\n\t\treturn new Listener() {\r\n\t\t\tpublic void handleEvent(Event event) {\r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\tcon = DriverManager.getConnection(conn1.url,\r\n\t\t\t\t\t\t\tconn1.getUsername(), conn1.getPassword());\r\n\t\t\t\t} catch (SQLException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\ttry {\r\n\t\t\t\t\tstmt = con.createStatement();\r\n\t\t\t\t\tString query = \"INSERT INTO SINHVIEN (IDSINHVIEN,TENSINHVIEN,NGAYSINH,DIACHI,STATUS,IDLOP,DATEJOIN,DATEEND) \"\r\n\t\t\t\t\t\t\t+ \"VALUES ('\"\r\n\t\t\t\t\t\t\t+ idsv\r\n\t\t\t\t\t\t\t+ \"','\"\r\n\t\t\t\t\t\t\t+ tensv\r\n\t\t\t\t\t\t\t+ \"',to_date('\"\r\n\t\t\t\t\t\t\t+ ngaysinh\r\n\t\t\t\t\t\t\t+ \"','YYYY/MM/DD'),'\"\r\n\t\t\t\t\t\t\t+ diachi\r\n\t\t\t\t\t\t\t+ \"','\"\r\n\t\t\t\t\t\t\t+ status\r\n\t\t\t\t\t\t\t+ \"','\"\r\n\t\t\t\t\t\t\t+ idLop\r\n\t\t\t\t\t\t\t+ \"','\"\r\n\t\t\t\t\t\t\t+ datejoin + \"','\" + dateend + \"')\";\r\n\t\t\t\t\tstmt.executeUpdate(query);\r\n\t\t\t\t\tMessageBox m = new MessageBox(shell);\r\n\t\t\t\t\tm.open();\r\n\t\t\t\t} catch (SQLException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t} finally {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tstmt.close();\r\n\t\t\t\t\t\tcon.close();\r\n\r\n\t\t\t\t\t} catch (SQLException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t}",
"public void submitInfoButton(View v) {\n //each entry needs a unique ID\n Business newBusiness = new Business();\n String newKey = appState.firebaseReference.push().getKey();\n newBusiness.setName(nameField.getText().toString());\n newBusiness.setPrimaryBusiness(primaryBusinessField.getText().toString());\n newBusiness.setBusinessNumber(numberField.getText().toString());\n newBusiness.setAddress(addressField.getText().toString());\n newBusiness.setProvince(provinceField.getSelectedItem().toString());\n\n appState.firebaseReference.child(newKey).setValue(newBusiness,\n new DatabaseReference.CompletionListener(){\n @Override\n public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference){\n if(databaseError != null){\n Toast toast = Toast.makeText(appState, \"Error: Creation failed!\",\n Toast.LENGTH_LONG);\n toast.show();\n } else {\n finish();\n Toast toast = Toast.makeText(appState, \"Business entry created\",\n Toast.LENGTH_LONG);\n toast.show();\n }\n }\n });\n }",
"public void addEvent()\n throws StringIndexOutOfBoundsException, ArrayIndexOutOfBoundsException {\n System.out.println(LINEBAR);\n try {\n String taskDescription = userIn.split(EVENT_IDENTIFIER)[DESCRIPTION].substring(EVENT_HEADER);\n String timing = userIn.split(EVENT_IDENTIFIER)[TIMING];\n Event event = new Event(taskDescription, timing);\n tasks.add(event);\n storage.writeToFile(event);\n ui.echoUserInput(event, tasks.taskIndex);\n } catch (StringIndexOutOfBoundsException e) {\n ui.printStringIndexOOB();\n } catch (ArrayIndexOutOfBoundsException e) {\n ui.printArrayIndexOOB();\n }\n System.out.println(LINEBAR);\n }",
"public void actionPerformed(ActionEvent sqlEvent) {\n\t\tSystem.out.println(d.sqlcom.getText()+\"from eventlist\");\r\n\t\tc.injectStatement(d.getTextFieldValue());\r\n\t\t//c.afficher();\r\n\t\t\r\n\t}",
"public void editEvent(Connection connection, StoreData data){\n\t\t//Prepares a statement to edit a full event based on the correct name\n\t\tPreparedStatement preStmt=null;\n\t\tStoreData theData = data;\n\t\tString name = theData.getName();\n\t\tString local = theData.getLocation();\n\t\tString startDate = theData.getDate();\n\t\tString endDate = theData.getEndDate();\n\t\tString description = theData.getDescription();\n\t\tString theSTime = theData.getSTime();\n\t\tString theETime = theData.getETime();\n\t\tString id = theData.getID();\n\t\t//This try catch block is used to make the sql call and to edit the correct event\n\t\ttry {\n\t\t\tpreStmt = (PreparedStatement) connection.prepareStatement(\"UPDATE \"\n\t\t\t\t\t+ \"Event SET Name=?, Location=?, Description=?, End_Date=?, Start_Date=?, Start_Time=?, End_Time=? WHERE id=?\"); \n\t\t\tjava.util.Date date1 = new SimpleDateFormat(\"MM-dd-yyyy\").parse(startDate);\n\t\t\tjava.util.Date date2 = new SimpleDateFormat(\"MM-dd-yyyy\").parse(endDate);\n\t\t\tjava.sql.Date sqlDate = new java.sql.Date(date1.getTime());\n\t\t\tjava.sql.Date sqlEndDate = new java.sql.Date(date2.getTime());\n\n\t\t\tpreStmt.setString(1,name);\n\t\t\tpreStmt.setDate(4,sqlEndDate);\n\t\t\tpreStmt.setDate(5, sqlDate);\n\t\t\tpreStmt.setString(2,local);\n\t\t\tpreStmt.setString(3,description);\n\t\t\tpreStmt.setString(6, theSTime);\n\t\t\tpreStmt.setString(7, theETime);\n\t\t\tpreStmt.setString(8, id);\n\t\t\tpreStmt.executeUpdate();\n\t\t} catch (SQLException | ParseException e) {\n\t\t\tSystem.out.println(\"Nothing was added.\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void createEvents() {\n\t\tbtnPushTheButton.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t\n\t\t\tprivate List<String> b;\n\n\t\n\t\t\t//@SuppressWarnings(\"unchecked\")\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tact = true;\n\t\t\t\t\n//\t\t\t\tb = new ArrayList<String>();\n//\t\t\t\t\n//\t\t\t\tthis.b= (List<String>) ((List<Object>) (agent.v.getData())).stream().map(item -> {\n//\t\t\t\t\treturn (String) item;\n//\t\t\t\t});\n//\t\t\t\tString c = String.join(\", \", b);\n//\t\t\t\tclassTextArea.setText(c);\n//\t\t\t\n//\t\t\t\tclassTextArea.setText(b.toString());\n//\t\t\t\t\n//\t\t\t\treturn;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t});\n\t\t\n\t}",
"public void PushEventStatisticsFromDB() {\n\t\tmyDBUtil.open();\n\t\tCursor mCursor = myDBUtil.queryMarkIsZero();\n\t\tmCursor.moveToFirst();\n\t\tdo {\n\t\t\tfinal EventStatisticsData eventStatisticsData = new EventStatisticsData();\n\t\t\tString[] colums = new String[]{\n\t\t\t\t\t\"behavior\", \"appId\", \"appSrc\", \"packageName\", \"client\", \"listenArea\",\n\t\t\t\t\t\"listenContextId\", \"listenContextSrc\", \"clientVersion\", \"referenceId\",\n\t\t\t\t\t\"appName\", \"appVersion\"};\n\t\t\tint index;\n\t\t\tString value;\n\t\t\tfor (int i = 0; i < colums.length; i++) {\n\t\t\t\tindex = mCursor.getColumnIndex(colums[i]);\n\t\t\t\tvalue = mCursor.getString(index);\n\t\t\t\teventStatisticsData.SetParamFromApp(i, value);\n\t\t\t}\n\t\t\tindex = mCursor.getColumnIndex(\"_id\");\n\t\t\tfinal int id = mCursor.getInt(index);\n\t\t\tGetIPFromServer(new GetIpCallback() {\n\t\t\t\t@Override\n\t\t\t\tpublic void solve(String result) {\n\t\t\t\t\tif (result != null && eventStatisticsData != null) {\n\t\t\t\t\t\tpushStatisticsEvent(eventStatisticsData, false, id);\n\t\t\t\t\t\tLog.d(TAG, \"im here don't insert to db,just update\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t} while (mCursor.moveToNext());\n\t\tmCursor.close();\n\t\tmyDBUtil.close();\n\t}",
"@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\tString[] arr= new String[colName.length];\n\t\t\t\t\tfor(int i =0 ; i<colName.length; i++){\n\t\t\t\t\t\tarr[i] =tfInsert[i].getText();\n\t\t\t\t\t}\n\n\t\t\t\t\tboolean insertOrDelete = false; \n\t\t\t\t\tboolean full = checkInput(arr);\n\t\t\t\t\tboolean right = isRightType(arr);\n\t\t\t\t\t\n\t\t\t\t\tif(full && right){\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif(whichAction.getText().equals(\"Insert\")){\n\t\t\t\t\t\t\t\tinsertOrDelete= db.insertData(arr);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tinsertOrDelete = db.deleteData(arr);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t\t\tAlertBox noInsertDelete = new AlertBox();\n\t\t\t\t\t\t\tnoInsertDelete.display(whichAction.getText() + \" Fail\", \"Unable to \" +whichAction.getText() +\". Please try again.\");\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(!full){\n\t\t\t\t\t\t\tAlertBox noInsertDelete = new AlertBox();\n\t\t\t\t\t\t\tnoInsertDelete.display(\"Not enough data\", \"Unable to \" +whichAction.getText() +\". All inputs are required.\");\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tAlertBox notRight= new AlertBox();\n\t\t\t\t\t\t\tnotRight.display(\"Incorrect Data\", \"Unable to \" +whichAction.getText() +\".One of your inputs is not a valid type\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(insertOrDelete){\n\t\t\t\t\t\tAlertBox done = new AlertBox();\n\t\t\t\t\t\tdone.display(whichAction.getText() + \" Successful.\",\n\t\t\t\t\t\t\t\twhichAction.getText()+\" completed.\");\n\t\t\t\t\t}else;\n\n\t\t\t\t}",
"public long insertEntry2(CampusEvent event) {\n\n ContentValues value = new ContentValues();\n\n value.put(KEY_TITLE, event.getTitle());\n\n value.put(KEY_DATE, event.getstrDate());\n value.put(KEY_START, event.getstrStart());\n value.put(KEY_END, event.getstrEnd());\n value.put(KEY_LOCATION, event.getLocation());\n value.put(KEY_DESCRIPTION, event.getDescription());\n value.put(KEY_URL, event.getURL());\n value.put(KEY_LATITUDE, event.getLatitude());\n value.put(KEY_LONGITUDE, event.getLongitude());\n value.put(KEY_FOOD, event.getFood());\n value.put(KEY_EVENT_TYPE, event.getEventType());\n value.put(KEY_PROGRAM_TYPE, event.getProgramType());\n value.put(KEY_YEAR, event.getYear());\n value.put(KEY_MAJOR, event.getMajor());\n value.put(KEY_GENDER, event.getGender());\n value.put(KEY_GREEK_SOCIETY, event.getGreekSociety());\n dbObj = getWritableDatabase();\n long id = dbObj.insert(TABLE_DEVENTS, null, value);\n dbObj.close();\n return id;\n }",
"public boolean insertData(Event event) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues contentValues = new ContentValues();\n contentValues.put(DAY, event.getDay());\n contentValues.put(COLOR, event.getColor());\n contentValues.put(COL_1, event.getStartDate().getTimeInMillis());\n contentValues.put(COL_2, event.getEndDate().getTimeInMillis());\n contentValues.put(COL_3, event.getTitle());\n contentValues.put(COL_4, event.getDescription());\n\n long result = db.insert(TABLE_NAME, null, contentValues);\n Cursor res = db.query(true, TABLE_NAME, new String[]{ID},\n DAY + \" = '\" + event.getDay() + \"' AND \"\n + COL_3 + \" = '\" + event.getTitle() + \"'\",\n null, null, null, null, null);\n res.moveToNext();\n event.setDatabaseID(res.getInt(0));\n db.close();\n return result != -1;\n\n }",
"private void jbtn_addActionPerformed(ActionEvent evt) {\n\t\ttry {\n\t\t\tconn cc=new conn();\n \t\t//String query1=\"SELECT * FROM doctor\";\n \t\t//ResultSet rs=cc.st.executeQuery(query1);\n \t\tpst=cc.c.prepareStatement(\"insert into medicine(medicine_name,brand,mfd_date,expiry_date,price)value(?,?,?,?,?)\");\n \t\t\n \t\tpst.setString(1,jtxt_medname.getText());\n \t\tpst.setString(2,jtxt_brand.getText());\n \t\tpst.setString(3,jtxt_mfd.getText());\n \t\tpst.setString(4,jtxt_exp.getText());\n \t\tpst.setString(5,jtxt_price.getText());\n \t\t\n \t\tpst.executeUpdate();\n \t\tJOptionPane.showMessageDialog(this,\"Record Added\");\n \t\tupDateDB();\n \t\ttxtblank();\n \t\t\n\t\t}\n\t\t \n\t\t\n\t\tcatch (SQLException ex)\n\t\t{\n\t\t\tjava.util.logging.Logger.getLogger(show_doc.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n\t\t}\n\t\t\n\t}",
"private void updateNutritionEvent(Context ctx, ResultSet rs) throws SQLException, ParseException {\r\n Date timestamp = ctx.getTimestamp(\"date\", \"time\");\r\n String description = ctx.getParameter(\"description\");\r\n\r\n if (rs.next()) {\r\n if (ctx.getAppDb().getProtocol().equalsIgnoreCase(\"sqlserver\")) {\r\n rs.moveToCurrentRow();\r\n rs.updateString(\"Description\", description);\r\n rs.updateRow();\r\n } else {\r\n /*\r\n * For MySQL replace above with an update query.\r\n */\r\n SQLUpdateBuilder sql = ctx.getUpdateBuilder(\"NutritionEvent\");\r\n\r\n sql.addField(\"Description\", description);\r\n sql.addAnd(\"Timestamp\", \"=\", timestamp);\r\n executeUpdate(ctx, sql);\r\n }\r\n } else {\r\n rs.moveToInsertRow();\r\n rs.updateString(\"Timestamp\", ctx.getDbTimestamp(timestamp));\r\n rs.updateString(\"Description\", description);\r\n rs.insertRow();\r\n }\r\n }",
"public void addEvents(ArrayList<FbEvent> events) throws SQLException{\n\t\tSQLiteDatabase db = tableHelper.getWritableDatabase();\n\t\ttry {\n\t\t\tfor (FbEvent event : events) {\n\t\t\t\tContentValues contents = prepareContentValues(event);\n\t\t\t\tdb.insert(SQLTablesHelper.MY_EVENT_TABLE_NAME, null, contents);\n\t\t\t}\n\t\t} finally {\n\t\t\tdb.close();\n\t\t}\n\t}",
"public int editData(Event event) {\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues contentValues = new ContentValues();\n contentValues.put(DAY, event.getDay());\n contentValues.put(COLOR, event.getColor());\n contentValues.put(COL_1, event.getStartDate().getTimeInMillis());\n contentValues.put(COL_2, event.getEndDate().getTimeInMillis());\n contentValues.put(COL_3, event.getTitle());\n contentValues.put(COL_4, event.getDescription());\n\n\n return db.update(TABLE_NAME, contentValues, ID + \" = \" + event.getDatabaseID(), null);\n }",
"public void handleAddEvent(ActionEvent event)\n {\n if(eventDate.getValue() == null)\n {\n MessageAlert.showErrorMessage(null, \"Date was not selected!\");\n return;\n }\n if(eventHour.getValue() == null)\n {\n MessageAlert.showErrorMessage(null, \"Hour was not selected!\");\n return;\n }\n if(eventMinute.getValue() == null)\n {\n MessageAlert.showErrorMessage(null, \"Minute was not selected!\");\n return;\n }\n DecimalFormat decimalFormat = new DecimalFormat(\"00\");\n String date = eventDate.getValue().format(DateTimeFormatter.ofPattern(\"yyyy-MM-dd\")) + \" \" + decimalFormat.format(eventHour.getValue()) + \":\" + decimalFormat.format(eventMinute.getValue());\n try\n {\n service.addEvent(new Event(mainPage.getId(), eventName.getText(), date, new ArrayList<Long>()));\n MessageAlert.showMessage(null, Alert.AlertType.CONFIRMATION, \"SUCCESS!\", \"Event added successfully!\");\n\n Node node = (Node) event.getSource();\n Stage thisStage = (Stage) node.getScene().getWindow();\n thisStage.hide();\n }\n catch (ValidationException e)\n {\n MessageAlert.showErrorMessage(null, e.getMessage());\n }\n }",
"@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\r\n\t\t\tMySQLConnect dal = new MySQLConnect();\r\n\t\t\ttry {\r\n\t\t\t\tString name;\r\n\t\t\t\tString date;\r\n\t\t\t\tString desc;\r\n\t\t\t\tString course;\r\n\t\t\t\tString type;\r\n\t\t\t\tString prior;\r\n\t\t\t\tScanner scan = new Scanner(System.in);\r\n\t\t\t\tSystem.out.println(\"Name: \");\r\n\t\t\t\tname = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"Due Date(YYYY-MM-DD): \");\r\n\t\t\t\tdate = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"Description: \");\r\n\t\t\t\tdesc = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"Course: \");\r\n\t\t\t\tcourse = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"Type: \");\r\n\t\t\t\ttype = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"Priority: \");\r\n\t\t\t\tprior = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"The following form was added to the database:\");\r\n\t\t\t\tString[] check = dal.addForm(name.toString(),\"admin\",date.toString(),desc.toString(),course.toString(),type.toString(),prior.toString());\r\n\t\t\t\tfor(int i=0; i<check.length; i++){\r\n\t\t\t\t\tSystem.out.print(check[i] + \" \");\r\n\t\t\t\t}\r\n\t\t\t\t//test confirmation that button works\r\n\t\t\t\ttextArea.append(\"Form Submitted!\\n\");\r\n\t\t\t} catch (SQLException ex) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}",
"public void actionPerformed(ActionEvent e) \n {\n\t\t\t\tWrapper conn = null;\n\t\t\t\ttry //try block\n {\n //declare variables\n\t\t\t\tString username = \"\";\n\t\t\t\tString password = \"\";\n\t\t\t\t\n\t\t\t\t//get values using getText() method\n\t\t\t\tusername = txtUser.getText().trim();\n\t\t\t\tpassword = txtPassword.getText().trim();\n\t\t\t\t\n // check condition it field equals to blank throw error message\n\t\t\t\tif (username.equals(\"\")|| password.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\" name or password or Role is wrong\",\"Error\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t\telse //else insert query is run properly\n {\n\t\t\t\t\tString IQuery = \"INSERT INTO `demo`.`loginaccount`(`username`,`password`,`ts`) VALUES('\"+username+\"', '\"+password+\"',current_timestamp)\";\n\t\t\t\t\tSystem.out.println(IQuery);//print on console\n\t\t\t\t\tSystem.out.println(\"Connecting to a selected database...\");\n\t\t\t\t\n\t\t\t\t//STEP 3: Open a connection\n\t\t\t\tconn = DriverManager.getConnection(DB_URL, USER, PASS);\n\t\t\t\t\tSystem.out.println(\"Connected database successfully...\");\n\t\t\t\t\t \n\t\t\t\t((Connection)conn).createStatement().execute(IQuery);//select the rows\n\t\t\t\t\t// define SMessage variable\n\t\t\t\t\tString SMessage = \"Record added for \"+username;\n\t\t\t\t\t\n // create dialog ox which is print message\n\t JOptionPane.showMessageDialog(null,SMessage,\"Message\",JOptionPane.PLAIN_MESSAGE);\n\t\t\t\t\t//close connection\n\t\t\t\t\t((java.sql.Connection)conn).close();\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\tcatch (SQLException se) \n\t\t\t{\n\t\t\t\t//handle errors for JDBC\n\t\t\t\tse.printStackTrace();\n\t\t\t}\n\t\t\tcatch (Exception a) //catch block\n\t\t\t{\n\t\t\t\ta.printStackTrace();\n\t\t\t}\n\t\t }",
"private void createBtnActionPerformed(java.awt.event.ActionEvent evt) {\n\n staff.setName(regName.getText());\n staff.setID(regID.getText());\n staff.setPassword(regPwd.getText());\n staff.setPosition(regPos.getSelectedItem().toString());\n staff.setGender(regGender.getSelectedItem().toString());\n staff.setEmail(regEmail.getText());\n staff.setPhoneNo(regPhone.getText());\n staff.addStaff();\n if (staff.getPosition().equals(\"Vet\")) {\n Vet vet = new Vet();\n vet.setExpertise(regExp.getSelectedItem().toString());\n vet.setExpertise_2(regExp2.getSelectedItem().toString());\n vet.addExpertise(staff.getID());\n }\n JOptionPane.showMessageDialog(null, \"User added to database\");\n updateJTable();\n }",
"@Override\n public void onClick(View v) {\n TextView txtDate = (TextView)findViewById(R.id.tvDate);\n TextView txtTime = (TextView)findViewById(R.id.tvTime);\n // Log.v(\"Vidushi:update\", userId);\n helper.insertVolunteerDuty(userId,txtDate.getText().toString(),txtTime.getText().toString());\n Toast.makeText(getApplicationContext(),\"Information Saved\", Toast.LENGTH_SHORT).show();\n\n\n }",
"public void insert(Event event) throws DataAccessException {\n //We can structure our string to be similar to a sql command, but if we insert question\n //marks we can change them later with help from the statement\n String sql = \"INSERT INTO Event (EventID, AssociatedUser, PersonID, Latitude, Longitude, \" +\n \"Country, City, EventType, Year) VALUES(?,?,?,?,?,?,?,?,?)\";\n try (PreparedStatement stmt = conn.prepareStatement(sql)) {\n //Using the statements built-in set(type) functions we can pick the question mark we want\n //to fill in and give it a proper value. The first argument corresponds to the first\n //question mark found in our sql String\n stmt.setString(1, event.getEventID());\n stmt.setString(2, event.getAssociatedUser());\n stmt.setString(3, event.getPersonID());\n stmt.setDouble(4, event.getLatitude());\n stmt.setDouble(5, event.getLongitude());\n stmt.setString(6, event.getCountry());\n stmt.setString(7, event.getCity());\n stmt.setString(8, event.getEventType());\n stmt.setInt(9, event.getYear());\n\n stmt.executeUpdate();\n } catch (SQLException e) {\n throw new DataAccessException(\"Error encountered while inserting into the database\");\n }\n }",
"private void onAddToCalendarSuccess() {\r\n database.eventDao().update(event);\r\n updateSpeedDialActionItems();\r\n showToast(getString(R.string.event_calendar_add_event_sucess), Toast.LENGTH_LONG);\r\n }",
"public void saveOnClick(View view) {\n final EditText nameET = (EditText) findViewById(R.id.name_et);\n final EditText titleET = (EditText) findViewById(R.id.title_et);\n final EditText emailET = (EditText) findViewById(R.id.email_et);\n final EditText addressET = (EditText) findViewById(R.id.address_et);\n user.setName(nameET.getText().toString());\n user.setTitle(titleET.getText().toString());\n user.setEmailAddress(emailET.getText().toString());\n user.setHomeAddress(addressET.getText().toString());\n\n RegistrationData.editUserData(db, user);\n finish();\n }",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tString date = AppDateField.getText();\n\t\tString Time = AppTimeField.getText();\t\n\t\tString Name = AppPatNameField.getText();\n\t\tString Surname = AppPatSurnameField.getText();\n\t\tint Id = Integer.parseInt(AppPatIdField.getText());\n\t\tString Doctor = AppDocNameField.getText();\n\t\tString Service = (String) SelectTask.getSelectedItem();\n\t\t\n\t\tDBH db = new DBH();\n\t\t\n\t\tString sql = \"INSERT INTO `Narnia_Hospital`.`Appointments` (`Appointment_Date`, `Appointment_Time`, `AppPat_Name`, `AppPat_Surname`, `AppPatId`, `AppDoctor`, `AppService`) VALUES ('\"+date+\"','\"+Time+\"','\"+Name+\"','\"+Surname+\"','\"+Id+\"','\"+Doctor+\"','\"+Service+\"')\"; \n\t\t\n\t\t\n\t\tResultSet rs = null;\n\t\t\n\t\ttry{\n\t\t rs = db.executeCall(sql);\n \t\t\n\t\t while(rs.next()){\n\t\t\t \n\t\t\t Appointment A1 = new Appointment();\n\t\t\t \n\t\t\t A1.setAppDate (date);\n\t\t\t A1.setAppTime(Time);\n\t\t\t A1.setPatientName(Name);\n\t\t\t A1.setPatientSurname(Surname);\n\t\t\t A1.setPatId(Id);\n\t\t\t A1.setDoctorName(Doctor);\n\t\t\t A1.setServiceRequired(Service);\n\t\t\t \n\t\t\t \n\t\t\t \t\n\t\t\t\t }\n\t\t\t \n\t\t \n\t\t \n\t\t \n\t\t}catch (Exception ex){}\n\t\t\n\t\t//Offers the option to create a new one or leave this screen.\n\t\t\n\t\tJOptionPane.showMessageDialog(this, \"Appointment Registered!\");\n\t\t\n\t\t int n = JOptionPane.showConfirmDialog(this,\"Do you want to add another appointment?\", \"Message Selected\", JOptionPane.YES_NO_OPTION);\n\t\t\t\n\t\t if (n == 0){ \n\t\t\t this.setVisible(false);\n\t\t\t new NewAppointment();\n\t\t\t\n\t\t} else if (n == 1){\n\t\t\t this.setVisible(false);\n\t\t\t new SecretaryScreen();\n\t\t}\n\t\t\n\t}",
"public List<GameEvents> saveGameEvents(List<GameEvents> gameEvents);",
"void saveActivityHistForAddEntity(Record inputRecord);",
"@Override\r\n\tpublic void dataStore(Event event, String flag) {\n\t\tDocument doc = new Document();\r\n\t\tdoc.append(\"test\", new String(event.getBody()));\r\n\t\tmongoCollection.insertOne(doc);\r\n\t}",
"public String editCourseEvent(Events events);",
"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 }",
"public String updateEvent(Event e){\n \n \n String result = \"0\";\n Connection con = null;\n //building the sql command\n String SQLCommand = \"Update event set name=?,start_time=?,end_time=? where id=?\";\n \n try{\n //obtain the database connection by calling getConn() \n con = getConn();\n //create the PreparedStatement from the Connection object by calling prepareCall\n //method, passing it the sql , parameters are represented by ? in the sql\n PreparedStatement ps = con.prepareStatement(SQLCommand); \n \n //setting the parameters values\n ps.setString(1, e.getName()); \n ps.setDate(2, new java.sql.Date(e.getStartTime().getTime()));\n ps.setDate(3, new java.sql.Date(e.getEndTime().getTime())); \n ps.setLong(4,e.getId());\n //ps.setLong(4, sp.getSeatingPlanID());\n \n \n //exceuting the insert or update operation \n ps.executeUpdate(); \n }\n catch (SQLException ex){\n ex.printStackTrace();\n result = ex.getMessage();\n }\n return result;\n }",
"@PostMapping(\"/updateevent\")\n public String updateEvent(@ModelAttribute Event event, Model model) {\n\n Boolean isValid = true;\n String reasonForFailure = \"\";\n\n Event eventLookup = null;\n eventLookup = mainDBService.lookupEventByNameAndYear(event.getName(), event.getYear());\n\n if (eventLookup == null) {\n isValid = false;\n reasonForFailure += \"Event not found\";\n } else if (event != null) {\n\n\n String currentYearMonth = eventLookup.getCurrentMonthYear();\n // if the event has already been viewed in that month, do not proceed with the transaction\n Transaction watchedInThatMonth = mainDBService.checkToSeeIfEventHasBeenWatchedInTheGivenMonth(event.getName(), event.getYear(), eventLookup.getCurrentMonthYear());\n\n if (watchedInThatMonth != null) {\n isValid = false;\n reasonForFailure += \"Event has already been watched in the given month\";\n }\n }\n\n Event saved = null;\n if (isValid) {\n System.out.println(\"Event and dateCheck passed validation steps\");\n // Get the studio from the event and then commit the transaction\n clearModelAttributes(model);\n\n eventLookup.setDuration(event.getDuration());\n eventLookup.setEventLicensingFee(event.getEventLicensingFee());\n\n saved = mainDBService.saveEvent(eventLookup);\n }\n\n if (saved != null) {\n model.addAttribute(\"event\", eventLookup);\n model.addAttribute(\"successmessage\", \"Event Saved Successfully!\");\n return \"index.xhtml\";\n } else {\n model.addAttribute(\"errormessage\", String.format(\"Event save Failed for the following reasons: %s, Please try again\", reasonForFailure));\n model.addAttribute(\"event\", event);\n return \"updateevent.xhtml\";\n }\n }",
"public void persist(Event event) {\n EventAdapter ea = new EventAdapter();\n ea.setFieldsFromEvent(event);\n em.persist(ea);\n }",
"@Override\n public void run() {\n if (intent != null && intent.hasExtra(\"id\")) {\n eventData.setId(intent.getIntExtra(\"id\", 0));\n eventDatabase.eventDAO().updateEvent(eventData);\n }\n // the condition when user click plus button from MainActivity.java (Insert a new row)\n else {\n eventDatabase.eventDAO().insertNewEvent(eventData);\n\n }\n finish(); // destroy activity (when u press back key after clicking \"save btn\", this activity won't be called again)\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tString eventName = edittext_event_name.getText().toString().trim();\n\t\t\t\tString eventLimit = edittext_event_limit.getText().toString().trim();\n\t\t\t\t// Check for server connectivity issues\n\t\t\t\tif (!checkServer(CreateEventActivity.this)) {\n\t\t\t\t\t/*Toast.makeText(CreateEventActivity.this, \"Server issue exists\",\n\t\t\t\t\t\t\tToast.LENGTH_LONG).show();*/\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (chosenGame.equals(\"\")) {\n\t\t\t\t\tToast.makeText(CreateEventActivity.this, \"Please select a game to invite\",\n\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (eventName.equals(\"\")) {\n\t\t\t\t\tToast.makeText(CreateEventActivity.this, \"Please enter an event name\",\n\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (eventLimit.equals(\"\")) {\n\t\t\t\t\tToast.makeText(CreateEventActivity.this, \"Please set the event limit\",\n\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Call the execute method for AsyncTask\n\t\t\t\tnew eventCreation().execute();\n\t\t\t}",
"public void insertInto(final Table table, final String keyValue, final String eiffelevent)\n throws SQLException, ConnectException {\n String sqlInsertStatement = String.format(\"INSERT INTO %s(%s,%s) VALUES(?,?)\", table, EVENT_ID_KEY,\n table.keyName);\n executeUpdate(sqlInsertStatement, keyValue, eiffelevent);\n\n }",
"private void persistEvent(Event event) {\n\t\tAssert.notNull(event, \"Event cannot be null persisting received JMS message\");\n\t\tList<EventAttribute> eventAttributes = event.getEventAttributes();\n\t\tfor (EventAttribute eventAttribute : eventAttributes) {\n\t\t\tlog.debug(\n\t\t\t\t\t\"Recieved new via JMS Broker API an event for account number {} and tx amount of {} . About to persist it to the repository.\",\n\t\t\t\t\teventAttribute.getAccountNum(), eventAttribute.getTxAmount());\n\t\t\tevent.setApiType(JMS_BROKER);\n\t\t}\n\t\teventRepository.save(event);\n\t}",
"@LogExceptions\n @Override\n public void insert(Data data) throws SQLException {\n Event event = (Event)data;\n Connection conn = DatabaseConnection.getConnection();\n \n try(PreparedStatement stmt = \n conn.prepareStatement(getMembers().getInsertFormat())) \n {\n stmt.setString(1, event.getEvent());\n stmt.setString(2, event.getDescription());\n stmt.setString(3, event.getLocation());\n stmt.setString(4, event.getDate());\n stmt.setString(5, event.getYear());\n stmt.setString(6, event.getMonth());\n stmt.setString(7, event.getDay());\n stmt.setString(8, event.getStart());\n stmt.setString(9, event.getEnd());\n stmt.executeUpdate();\n }\n }",
"public void btnInsertColumn() {\n\t\t\n\t\tboolean contains = musicApp.insertNewTimeBlock();\n\t\tif(contains) {\n\t\t\tlblErrorMsg.setText(\"The track contains work you don't currently have. Please refresh before inserting sound.\");\n\t\t} else {\n\t\t\tmusicApp.updateViews();\n\t\t\tupdatePositionChoice();\n\t\t}\n\t}",
"private void save1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_save1ActionPerformed\n\n //Save Button action\n //eid int\n //level int\n //rank int\n String lname = LectName.getText();\n String eid = EmpID.getText();\n String fac = faculty.getSelectedItem().toString();\n String dep = department.getSelectedItem().toString();\n String cent = center.getSelectedItem().toString();\n String build = building.getSelectedItem().toString();\n String lev = level.getSelectedItem().toString();\n String rnk = Rank.getText();\n\n try {\n\n String s = \"INSERT INTO lecturer (eid, lectur_name, faculty, department, center, building, lec_level, lec_rank) values ('\" + eid + \"', '\" + lname + \"', '\" + fac + \"', '\" + dep + \"', '\" + cent + \"', '\" + build + \"', '\" + lev + \"', '\" + rnk + \"')\";\n pst = con.prepareStatement(s);\n pst.execute();\n\n //load tabledetails after adding a new one\n lectureDetails();\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, e);\n System.out.print(e);\n }\n\n }",
"private void addEvent() {\n String name = selectString(\"What is the name of this event?\");\n ReferenceFrame frame = selectFrame(\"Which frame would you like to define the event in?\");\n double time = selectDouble(\"When does the event occur (in seconds)?\");\n double x = selectDouble(\"Where does the event occur (in light-seconds)?\");\n world.addEvent(new Event(name, time, x, frame));\n System.out.println(\"Event added!\");\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 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 jTextField1 = new javax.swing.JTextField();\n jTextField2 = new javax.swing.JTextField();\n jTextField3 = new javax.swing.JTextField();\n jTextField4 = new javax.swing.JTextField();\n jTextField5 = new javax.swing.JTextField();\n jTextField6 = new javax.swing.JTextField();\n jTextField7 = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setFont(new java.awt.Font(\"Ubuntu\", 1, 24)); // NOI18N\n jLabel1.setText(\"Add Events\");\n\n jLabel2.setFont(new java.awt.Font(\"Ubuntu\", 1, 18)); // NOI18N\n jLabel2.setText(\"Event Name :-\");\n\n jLabel3.setFont(new java.awt.Font(\"Ubuntu\", 1, 18)); // NOI18N\n jLabel3.setText(\"Event Id :-\");\n\n jLabel4.setFont(new java.awt.Font(\"Ubuntu\", 1, 18)); // NOI18N\n jLabel4.setText(\"Event Created On :-\");\n\n jLabel5.setFont(new java.awt.Font(\"Ubuntu\", 1, 18)); // NOI18N\n jLabel5.setText(\"Last Date of Registration :-\");\n\n jLabel6.setFont(new java.awt.Font(\"Ubuntu\", 1, 18)); // NOI18N\n jLabel6.setText(\"Event Will Be On :-\");\n\n jLabel7.setFont(new java.awt.Font(\"Ubuntu\", 1, 18)); // NOI18N\n jLabel7.setText(\"Event Description :-\");\n\n jLabel8.setFont(new java.awt.Font(\"Ubuntu\", 1, 18)); // NOI18N\n jLabel8.setText(\"Event Venue :-\");\n jLabel8.setToolTipText(\"\");\n\n jTextField1.setFont(new java.awt.Font(\"Ubuntu\", 0, 18)); // NOI18N\n\n jTextField2.setFont(new java.awt.Font(\"Ubuntu\", 0, 18)); // NOI18N\n\n jTextField3.setFont(new java.awt.Font(\"Ubuntu\", 0, 18)); // NOI18N\n\n jTextField4.setFont(new java.awt.Font(\"Ubuntu\", 0, 18)); // NOI18N\n\n jTextField5.setFont(new java.awt.Font(\"Ubuntu\", 0, 18)); // NOI18N\n\n jTextField6.setFont(new java.awt.Font(\"Ubuntu\", 0, 18)); // NOI18N\n\n jTextField7.setFont(new java.awt.Font(\"Ubuntu\", 0, 18)); // NOI18N\n\n jButton1.setFont(new java.awt.Font(\"Ubuntu\", 0, 18)); // NOI18N\n jButton1.setText(\"Close\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setFont(new java.awt.Font(\"Ubuntu\", 0, 18)); // NOI18N\n jButton2.setText(\"Save \");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(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 .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(70, 70, 70)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5)\n .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel6, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel7, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel8, javax.swing.GroupLayout.Alignment.TRAILING))\n .addGap(51, 51, 51)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, 253, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 186, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jTextField3, javax.swing.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE)\n .addComponent(jTextField4)\n .addComponent(jTextField5))\n .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(244, 244, 244)\n .addComponent(jLabel1)))\n .addContainerGap(146, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(34, 34, 34)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(26, 26, 26))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(54, 54, 54)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.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(17, 17, 17)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(22, 22, 22)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel6)\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(23, 23, 23)\n .addComponent(jLabel7))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel8))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 48, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(jButton2))\n .addGap(38, 38, 38))\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 save(Event event) {\n em.persist(event);\n// em.refresh(event);\n// return event.getIdEvent();\n }",
"public void submit(ActionEvent actionEvent) {\n if(checkFields()) {\n try {\n newStudent = new Student(firstName.getText(), lastName.getText(),birthday.getValue(),selectImage.getImage());\n activities();\n System.out.println(\"new student: \" + newStudent);\n studentList.add(newStudent);\n viewStudent(actionEvent);\n } catch (IllegalArgumentException | IOException e){\n errorDisplay.setText(e.getMessage());\n }\n }\n }",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tString date,time;\n\t\t\t\tdate=et1.getText().toString();\n\t\t\t\ttime=et2.getText().toString();\n\t\t\t\tSQLiteDatabase mydatabase = openOrCreateDatabase(\"mydb.dat\",MODE_PRIVATE,null);\n\t\t\t\t mydatabase.execSQL(\"CREATE TABLE IF NOT EXISTS Pest( Date VARCHAR, Time VARCHAR );\");\n\t\t\t\t mydatabase.execSQL(\"INSERT INTO Pest VALUES('\"+date+\"','\"+time+\"');\");\n\t\t\t\t Toast.makeText(getApplicationContext(), \"booked\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\n\t\t\t}",
"public void saveData(){\n String name = editTextName.getText().toString();\n if(!name.isEmpty()){\n DataManager.getInstance().addName(name);\n }\n\n finish();\n }",
"@Override\n\t\t\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\t\tint eventSelection = eventOptions.getSelectionModel().getSelectedIndex();\n\t\t\t\t\t\tString description = new String(descriptionField.getText());\n\t\t\t\t\t\tdouble priceFactor = Double.parseDouble(priceFactorField.getText());\n\n\t\t\t\t\t\tif (eventSelection == 0) {\n\t\t\t\t\t\t\tConcert selection = new Concert(description, priceFactor);\n\t\t\t\t\t\t\tevents.add(selection);\n\t\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\t\tmessage.setText(\"Concert event created.\\n\");\n\t\t\t\t\t\t} else if (eventSelection == 1) {\n\t\t\t\t\t\t\tPlay selection = new Play(description, priceFactor);\n\t\t\t\t\t\t\tevents.add(selection);\n\t\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\t\tmessage.setText(\"Play event created.\\n\");\n\t\t\t\t\t\t} else if (eventSelection == 2) {\n\t\t\t\t\t\t\tMeeting selection = new Meeting(description, priceFactor);\n\t\t\t\t\t\t\tevents.add(selection);\n\t\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\t\tmessage.setText(\"Meeting event created.\\n\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tmessage.setText(\"Please choose Concert, Play, or Meeting from the Event Options list.\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tprimaryStage.setTitle(\"Events\");\n\t\t\t\t\t\tprimaryStage.setScene(scene);\n\t\t\t\t\t}",
"@Override\n\t\tpublic void actionPerformed(ActionEvent e){\n\t\t\tString name=nameField.getText();\n\t\t\tString occupation=occupationField.getText();\n\t\t\t\n\t\t\tFormEvent eve= new FormEvent(this,name,occupation);\n\t\t\t//lista.add(eve);\n\t\t\t\n\t\t\t//if(formListener!=null){\n\t\t\t\t//formListener.formEventOcurred(eve);\n\t\t\t//}\n\t\t\t\n\t\t\tif(formListener!=null){\n\t\t\t\tformListener.formEventOcurred(eve);\n\t\t\t}\n\t\t\t\n\t\t}",
"public void enterEventName(String eventName) {\n Reporter.addStepLog(\"Enter Event Name \" + eventName + \"On Event Name Field \" + _eventNameField.toString());\n sendTextToElement(_eventNameField, eventName);\n log.info(\"Enter Event Name \" + eventName + \"On Event Name Field \" + _eventNameField.toString());\n }",
"@Override\n\tpublic void createForm(ERForm form) {\n\t\t\tString sql = \"insert into project1.reimbursementInfo (userName, fullName, thedate, eventstartdate, thelocation, description, thecost, gradingformat, passingpercentage, eventtype, filename,status,reason) values (?,?,?,?,?,?,?,?,?,?,?,?,?);\";\n\t\t\ttry {PreparedStatement stmt = conn.prepareCall(sql);\n\t\t\t//RID should auto increment, so this isnt necessary\n\t\t\t\n\t\t\tstmt.setString(1, form.getUserName());\n\t\t\tstmt.setString(2, form.getFullName());\n\t\t\tstmt.setDate(3, Date.valueOf(form.getTheDate()));\n\t\t\tstmt.setDate(4, Date.valueOf(form.getEventStartDate()));\n\t\t\tstmt.setString(5, form.getTheLocation());\n\t\t\tstmt.setString(6, form.getDescription());\n\t\t\tstmt.setDouble(7, form.getTheCost());\n\t\t\tstmt.setString(8, form.getGradingFormat());\n\t\t\tstmt.setString(9, form.getPassingPercentage());\n\t\t\tstmt.setString(10, form.getEventType());\n\t\t\tstmt.setString(11, form.getFileName());\n\t\t\tstmt.setString(12, \"pending\");\n\t\t\tstmt.setString(13, \"\");\n\t\t\tstmt.executeUpdate();\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}",
"@RequestMapping(value = \"/add-event\", method = RequestMethod.POST)\n public String addEvent(@RequestParam(\"event-date\") Date eventDate, @RequestParam(\"event-time\") String time, @RequestParam(\"event-type\") String eventType, @RequestParam(\"event-name\") String eventName) {\n Time eventTime = helper.getTimeToSql(time);\n EventModel eventModel = new EventModel(eventDate, eventTime, eventType, eventName);\n eventService.addEvent(eventModel);\n return \"redirect:home\";\n }",
"public void saveData(){\n reporter.info(\"Save edited form\");\n clickOnElement(LOCATORS.getBy(COMPONENT_NAME,\"SAVE_BUTTON\"));\n }",
"@Override\n public void onCellPreview(CellPreviewEvent<GridRecord> event) {\n boolean isClick = \"click\".equals(event.getNativeEvent().getType());\n if (isClick && event.getColumn()==0) {\n GridRecord record = event.getValue();\n Boolean existing = column.getValue(record);\n column.setValue(!existing, event.getValue());\n }\n }",
"@PostMapping(\"/add-emitent\")\n public String toSearchEmitent(@ModelAttribute(\"emitent\") Emitent emitent, Model model){\n emitentInputProcess.addEmitent(emitent.getEmitentName(),emitent.getEmitentURL());\n return \"management\";\n }",
"@Override\n public void onClick(View v) {\n DocumentReference docRef = fStore.collection(\"user\").document(userID).collection(\"course\").document(\"semester\").collection(semester).document(courseID);\n Map<String, Object> event = new HashMap<>();\n event.put(\"subject\", subject);\n event.put(\"day\", day);\n event.put(\"time\", time);\n event.put(\"timeend\", timeend);\n docRef.set(event).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(EnrollmentDetail.this, subject + \" berhasil ditambahkan!\", Toast.LENGTH_SHORT).show();\n }\n });\n }",
"com.walgreens.rxit.ch.cda.EIVLEvent addNewEvent();",
"public void save(MeetingTable nt) {\n\t\tgetSession().save(nt);\r\n\t\t\r\n\t}",
"public String addCourseEvent(Events events);",
"void handleSaveClicked(ActionEvent event);",
"public void createTeam(ActionEvent actionEvent) throws IOException, SQLException {\n if (validCreateInput()) {\n user = DatabaseManager.createTeam(user, teamNameCreateField.getText(), abbrevationCreateField.getText(), chooseCityBoxCreate.getValue().toString(),\n chooseAgeGroupCreate.getValue(), chooseLeagueBoxCreate.getValue().toString(), chooseLeagueTeamBoxCreate.getValue().toString(), createTeamLogoFile);\n\n createPaneClose(actionEvent);\n displayMessage(messagePane, \"Team created\", false);\n }\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n a = crear.guardarAlumno();\n //en la base de datos envio un alumno a guardar\n basealumno.guardarAlumnoBD(a);\n //envio en la venta a limpiar los campos\n crear.limpiarCampos();\n crear.bloquearCampos();\n \n// System.out.println(\"objeto: \"+vca.getName());\n\n }",
"public void salvar() throws Exception {\t\r\n\t\t\t\t\r\n\t\tDate date = new Date();\r\n\t\tString url = evento.getUrl();\r\n\t\tevento.setNmStatus(EventoService.getStatus(url));\r\n\t\tevento.setDataHora(date);\r\n\t\teventoRepository.save(evento); // COLOCAMOS NO BANCO\r\n\t\tFacesContext.getCurrentInstance().addMessage(null, new FacesMessage(\"Cadastro inserido\"));\r\n\t\tif (!modoEdicao)\r\n\t\t\teventos.add(evento); // COLOCAMOS NA LISTA\r\n\t\tevento = new Evento();\r\n\t\tmodoEdicao = false;\r\n\t}",
"public void saveDetails() {\n\t\tTimelineUpdater timelineUpdater = TimelineUpdater.getCurrentInstance(\":mainForm:timeline\");\n\t\tmodel.update(event, timelineUpdater);\n\n\t\tFacesMessage msg =\n\t\t new FacesMessage(FacesMessage.SEVERITY_INFO, \"The booking details \" + getRoom() + \" have been saved\", null);\n\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\t}",
"public long createEvent(Event event) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(EVENT_NAME, event.getName());\n values.put(EVENT_DATE, event.getDate());\n\n // insert row\n long _id = db.insert(EVENTS_TABLE_NAME, null, values);\n\n return _id;\n }",
"public void savePatientDetails(View view){\r\n\t\tsaveToSQLite();\r\n createCalendarEntry();\r\n\t\tToast.makeText(this, \"Saved. Reminder created.\", Toast.LENGTH_SHORT).show();\r\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_add_user, container, false);\n name = view.findViewById(R.id.name);\n date = view.findViewById(R.id.date);\n time = view.findViewById(R.id.time);\n description = view.findViewById(R.id.description);\n addevent = view.findViewById(R.id.addevent);\n addevent.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n String Name = name.getText().toString();\n String Date = date.getText().toString();\n String Time= time.getText().toString();\n String Description= description.getText().toString();\n\n Event event = new Event();\n event.setName(Name);\n event.setTime(Time);\n event.setDescription(Description);\n event.setDate(Date);\n Main2Activity.eventDatabase.myDao().addEvent(event);\n Toast.makeText(getActivity(), \"Event added\", Toast.LENGTH_SHORT).show();\n event.setName(\"\");\n event.setTime(\"\");\n event.setDate(\"\");\n event.setDescription(\"\");\n\n }\n });\n\n return view;\n }",
"public void setData()\n {\n lbl_f_Name.setText(\"Name: \" + obj_Faculty.getName());\n lbl_f_ID.setText(\"ID: \" + obj_Faculty.getId());\n\n //CODE for fetching data from DB from tbl_Up_Events and show on table\n //Things for DB\n //Connection_to_DB it connects to Access DB\n Connect_to_DB obj_conDB = new Connect_to_DB();\n Connection obj_con = obj_conDB.make_Connection();\n\n //Statement is used for updating, inserting and deleting\n Statement stmt = null;\n ResultSet res = null;\n\n try\n {\n stmt = obj_con.createStatement();\n\n String str_Data = \"select * from tbl_Up_Events\";\n\n res = stmt.executeQuery(str_Data);\n\n while (res.next())\n {\n String Name = res.getString(\"evntName\");\n String Day = res.getString(\"evntDay\");\n String Date = res.getString(\"evntDate\");\n String Venue = res.getString(\"evntVenue\");\n String Budget = res.getString(\"evntBudget\");\n String Descript = res.getString(\"evntDescript\");\n String Club = res.getString(\"evntClub\");\n String Ticket = res.getString(\"evntTicket\");\n\n String table[] =\n {\n Name, Day, Date, Venue, Budget, Descript, Club, Ticket\n };\n\n DefaultTableModel tblModel = (DefaultTableModel) tbl_Event.getModel();\n tblModel.addRow(table);\n }\n\n obj_con.close();\n\n }\n catch (Exception ex)\n {\n JOptionPane.showMessageDialog(null, ex);\n }\n //CODE for tables ENDS\n }",
"@Override\n\tpublic void insertUpdate(DocumentEvent e) {\n\t\tvalidateNameField();\n\t}",
"private static void updateRecordToTable() throws SQLException {\n\n\t\tConnection dbConnection = null;\n\t\tPreparedStatement preparedStatement = null;\n \n Scanner scanner = new Scanner(System.in);\n \n System.out.print(\"Hoeveel punten: \");\n int punten = scanner.nextInt(); \n\n\t\tString updateTableSQL = \"UPDATE spelers SET punten = punten + ? \"\n\t\t\t\t + \" WHERE ID = ?\";\n\n\t\ttry {\n\t\t\tdbConnection = getDBConnection();\n\t\t\tpreparedStatement = dbConnection.prepareStatement(updateTableSQL);\n\n\t\t\t\n preparedStatement.setInt(1, punten);\n\t\t\tpreparedStatement.setInt(2, 1);\n\n\t\t\t// execute update SQL stetement\n\t\t\tpreparedStatement.executeUpdate();\n\n\t\t\tSystem.out.println(\"Record is updated to spelers table!\");\n\n\t\t} catch (SQLException e) {\n\n\t\t\tSystem.out.println(e.getMessage());\n\n\t\t} finally {\n\n\t\t\tif (preparedStatement != null) {\n\t\t\t\tpreparedStatement.close();\n\t\t\t}\n\n\t\t\t\n\n\t\t}\n\n\t}",
"private void sendEventToServer() throws UnknownHostException, IOException {\n \t\t\n \t\tSocket socket = null; \n \t\t\n \t\tsocket = new Socket(Constants.ServerIp, Constants.Port);\n \t\t\n \t\tObjectOutputStream serializer = null;\n \t\t\n \t\tserializer = new ObjectOutputStream(socket.getOutputStream());\n \t\t//TODO: Send a message to server for new Event\n \t\t\n \t\tMessageType t = MessageType.newPubEventMessage;\n \t\tserializer.writeObject(t);\n \t\tserializer.writeObject(event);\n \t\tserializer.flush();\n \t\t//TODO: Send the event\n \t\t//TODO: Send to Pending Screen\n \t}",
"public void openEventsForm(String data);",
"public void onPressEdit() {\r\n Intent intent = new Intent(this, CreateEventActivity.class);\r\n intent.putExtra(CreateEventActivity.EXTRA_EDIT_EVENT_UID, event.uid);\r\n startActivity(intent);\r\n }",
"private UIEvent generateModifyEvent(){\n List<DataAttribut> dataAttributeList = new ArrayList<>();\n for(int i = 0; i< attributModel.size(); i++){\n String attribut = attributModel.elementAt(i);\n dataAttributeList.add(new DataAttribut(attribut));\n }\n //Erstellen des geänderten Produktdatums und des Events\n DataProduktDatum proposal = new DataProduktDatum(name.getText(), new DataId(id.getText()), dataAttributeList, verweise.getText());\n UIModifyProduktDatumEvent modifyEvent = new UIModifyProduktDatumEvent(dataId, proposal);\n return modifyEvent;\n }",
"protected abstract void event(String type, long entity1, long entity2,\n long entity3, boolean added);",
"public void addEntry(ActionEvent event) {\n\t\tif(checkEntryInputs()) {\n\t\t\tBacteroidesSample newBacteroidesSample = new BacteroidesSample(sampleNumberTF.getText(),materialDescriptionTF.getText(),bacteroidesConcentration.getText());\n\t\t\tnewBacteroidesSample.setConclusionCase();\n\t\t\ttable.getItems().add(newBacteroidesSample);\n\t\t\tnewReport2.addSample(newBacteroidesSample);\n\t\t\taddConclusionNumber(newBacteroidesSample);\n\t\t\tsampleNumberTF.clear();\n\t\t\tmaterialDescriptionTF.clear();\n\t\t\tbacteroidesConcentrationTF.clear();\n\t\t}\n\t}"
]
| [
"0.6095981",
"0.5727747",
"0.5712296",
"0.5660623",
"0.56130403",
"0.5506665",
"0.54590005",
"0.54536426",
"0.5436332",
"0.5426217",
"0.54245806",
"0.5416146",
"0.5411977",
"0.5403784",
"0.53960633",
"0.5359805",
"0.5348685",
"0.5345566",
"0.533146",
"0.5330672",
"0.5312",
"0.529798",
"0.5268605",
"0.5264909",
"0.52542675",
"0.5251003",
"0.5238507",
"0.52327704",
"0.52219546",
"0.5219825",
"0.5195852",
"0.51871043",
"0.51653033",
"0.5139006",
"0.51298636",
"0.51278484",
"0.5125534",
"0.51054657",
"0.50893927",
"0.5084448",
"0.5084104",
"0.5076031",
"0.50751907",
"0.5073392",
"0.50712806",
"0.5064364",
"0.5060404",
"0.5059793",
"0.505631",
"0.50511396",
"0.50484407",
"0.50446045",
"0.5039655",
"0.50357485",
"0.50320995",
"0.50253004",
"0.5022189",
"0.5021842",
"0.5021683",
"0.50195146",
"0.5012901",
"0.50087714",
"0.49928147",
"0.4988861",
"0.49700823",
"0.49686053",
"0.4965535",
"0.49626124",
"0.4957656",
"0.4952112",
"0.49512047",
"0.4950606",
"0.49501127",
"0.4948727",
"0.4944039",
"0.4942107",
"0.4936808",
"0.49186692",
"0.4912865",
"0.49050906",
"0.48885366",
"0.48802984",
"0.4880204",
"0.48766473",
"0.48723122",
"0.48710892",
"0.48693582",
"0.48650134",
"0.48617613",
"0.48611528",
"0.48525402",
"0.48519942",
"0.4843135",
"0.48411494",
"0.4839365",
"0.4838884",
"0.48344347",
"0.48324093",
"0.48318696",
"0.482914"
]
| 0.5874722 | 1 |
GENLAST:event_submitBtnMouseClicked when logout, show login screen and clear all saved variables | private void logoutBtnMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_logoutBtnMouseClicked
((AppDraftGUI) this.getRootPane().getParent()).showPanel(0);
frameInstance.p0.username.setText("");
frameInstance.p0.password.setText("");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void logout() {\n\n if (WarehouseHelper.warehouse_reserv_context.getUser().getId() != null) {\n //Save authentication line in HisLogin table\n /*\n HisLogin his_login = new HisLogin(\n WarehouseHelper.warehouse_reserv_context.getUser().getId(),\n WarehouseHelper.warehouse_reserv_context.getUser().getId(),\n String.format(Helper.INFO0012_LOGOUT_SUCCESS,\n WarehouseHelper.warehouse_reserv_context.getUser().getFirstName()\n + \" \" + WarehouseHelper.warehouse_reserv_context.getUser().getLastName()\n + \" / \" + WarehouseHelper.warehouse_reserv_context.getUser().getLogin(),\n GlobalVars.APP_HOSTNAME, GlobalMethods.getStrTimeStamp()));\n his_login.setCreateId(WarehouseHelper.warehouse_reserv_context.getUser().getId());\n his_login.setWriteId(WarehouseHelper.warehouse_reserv_context.getUser().getId());\n \n \n String str = String.format(Helper.INFO0012_LOGOUT_SUCCESS,\n WarehouseHelper.warehouse_reserv_context.getUser().getFirstName() + \" \" + WarehouseHelper.warehouse_reserv_context.getUser().getLastName()\n + \" / \" + PackagingVars.context.getUser().getLogin(), GlobalVars.APP_HOSTNAME,\n GlobalMethods.getStrTimeStamp());\n his_login.setMessage(str);\n\n str = \"\";\n his_login.create(his_login);\n */\n //Reset the state\n state = new S001_ReservPalletNumberScan();\n\n this.clearContextSessionVals();\n\n connectedUserName_label.setText(\"\");\n\n this.setVisible(false);\n }\n\n }",
"public void logout() {\n showLoginScreen();\n }",
"private void logOut() {\n mApi.getSession().unlink();\n\n // Clear our stored keys\n clearKeys();\n // Change UI state to display logged out version\n setLoggedIn(false);\n }",
"public void logout() {\n loggedIn = \"\";\n FacesContext.getCurrentInstance().getExternalContext()\n .getSessionMap().put(\"loggedIn\", \"\");\n }",
"public void logout() {\n\n if (WarehouseHelper.warehouse_reserv_context.getUser().getId() != null) {\n //Save authentication line in HisLogin table\n HisLogin his_login = new HisLogin(\n WarehouseHelper.warehouse_reserv_context.getUser().getId(),\n WarehouseHelper.warehouse_reserv_context.getUser().getId(),\n String.format(Helper.INFO0012_LOGOUT_SUCCESS,\n WarehouseHelper.warehouse_reserv_context.getUser().getFirstName()\n + \" \" + WarehouseHelper.warehouse_reserv_context.getUser().getLastName()\n + \" / \" + WarehouseHelper.warehouse_reserv_context.getUser().getLogin(),\n GlobalVars.APP_HOSTNAME, GlobalMethods.getStrTimeStamp()));\n his_login.setCreateId(WarehouseHelper.warehouse_reserv_context.getUser().getId());\n his_login.setWriteId(WarehouseHelper.warehouse_reserv_context.getUser().getId());\n\n String str = String.format(Helper.INFO0012_LOGOUT_SUCCESS,\n WarehouseHelper.warehouse_reserv_context.getUser().getFirstName() + \" \" + WarehouseHelper.warehouse_reserv_context.getUser().getLastName()\n + \" / \" + PackagingVars.context.getUser().getLogin(), GlobalVars.APP_HOSTNAME,\n GlobalMethods.getStrTimeStamp());\n his_login.setMessage(str);\n\n str = \"\";\n his_login.create(his_login);\n\n //Reset the state\n state = new S001_ReservPalletNumberScan();\n\n this.clearContextSessionVals();\n\n connectedUserName_label.setText(\"\");\n }\n\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n //your actions\n Main.Logout();\n }",
"private void logout() {\n\t\tgetUI().get().navigate(\"login\");\r\n\t\tgetUI().get().getSession().close();\r\n\t}",
"public void logout(){\n\t\t\n\t\tcurrentUser.logout();\n\t\tcurrentUser = null;\n\t\tchangeViewPort(new GUI_Logout(\"\", \"\", this));\n\t}",
"private void formDashboardMainButtonLogoutActionPerformed(java.awt.event.ActionEvent evt) {\n try {\n int action = JOptionPane.showConfirmDialog(null,\n Constanta.Messages.MESSAGE_CONFIRM_LOGOUT,\n Constanta.Messages.BANNER_CONFIRM,\n JOptionPane.YES_NO_OPTION,\n JOptionPane.QUESTION_MESSAGE);\n\n if (action == JOptionPane.YES_OPTION) {\n Login login = new Login();\n login.show();\n this.dispose();\n }\n } catch (HeadlessException e) {\n JOptionPane.showMessageDialog(null, Constanta.Messages.MESSAGE_ERROR + e.getMessage());\n }\n }",
"public void logout() {\n editor.clear();\n editor.commit();\n\n }",
"public static void handleLogoutGUI()\n\t{\n\t\tOp logOp = new Op(Operations.LOGOUT,userLogin);\n\t\tclient.handleMessageFromClientUI(logOp);\n\t}",
"private void logoutButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_logoutButtonActionPerformed\n boolean isLoggedIn = uL.isLoggedIn();\n boolean isLoggedInNew = na.isLoggedIn();\n //boolean found = uL.isFound();\n if (isLoggedIn || isLoggedInNew) {\n na.setIsLoggedIn(false);\n uL.setIsLoggedIn(false);\n uL.setIsFound(false);\n dm.messageUserLoggedOut();\n } else {\n dm.messageUserNotLoggedIn();\n }\n }",
"public void Logout() {\n \t\t\t\n \t\t}",
"public static void Logout(){\n\t\tloginSystem();\r\n\t\t\r\n\t}",
"void logout();",
"void logout();",
"public void doLogout() {\n loggedIn = false;\r\n HttpSession session = (HttpSession) FacesContext.getCurrentInstance()\r\n .getExternalContext().getSession(false);\r\n session.invalidate(); \r\n String pag= \"/login.xhtml\";\r\n redireccionar(pag);\r\n }",
"private void checkToLogout() {\n logout();\n checkToHome();\n drawViewSideMenu();\n }",
"private void onLogoutButtonClick() {\r\n mViewModel.logout();\r\n //Clear input fields\r\n mUsernameInput.setText(\"\");\r\n mTokenInput.setText(\"\");\r\n\r\n //Clear saved credentials\r\n FragmentActivity activity = getActivity();\r\n if (activity == null) {\r\n return;\r\n }\r\n SharedPreferences sharedPreferences = activity.getApplicationContext().getSharedPreferences(getString(R.string.key_pref_file), MODE_PRIVATE);\r\n SharedPreferences.Editor editor = sharedPreferences.edit();\r\n editor.putString(getString(R.string.key_pref_username), \"\");\r\n editor.putString(getString(R.string.key_pref_token), \"\");\r\n editor.apply();\r\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdispose();\n\t\t\t\tUserHandler.logOut();\n\t\t\t}",
"public void logout() {\n \n }",
"private void logout() {\n Utils.showConfirmationDialogCallBack(MainActivity.this, getString(R.string.logout_sure), this);\n }",
"public void logout() {\n\n // Instance, user and token become null\n instance = null;\n user = null;\n authtoken = null;\n\n // Switch all the settings back to true\n isLifeStoryLinesOn = true;\n isFamilyTreeLinesOn = true;\n isSpouseLinesOn = true;\n isFatherSideOn = true;\n isMotherSideOn = true;\n isMaleEventsOn = true;\n isFemaleEventsOn = true;\n\n //Take care of resetting boolean logics use throughout app\n isLoggedIn = false;\n personOrSearch = false;\n startLocation = null;\n eventID = null;\n\n // Clear all lists\n\n people.clear();\n events.clear();\n personEvents.clear();\n currentPersonEvents.clear();\n eventTypes.clear();\n\n childrenMap.clear();\n maleSpouse.clear();\n femaleSpouse.clear();\n paternalAncestorsMales.clear();\n paternalAncestorsFemales.clear();\n maternalAncestorsMales.clear();\n maternalAncestorsFemales.clear();\n }",
"@Override\r\n\tpublic void logout() {\n\t\t\r\n\t}",
"private void logout() {\n\t\tParseUser.logOut();\n\n\t\t// Go to the login view\n\t\tstartLoginActivity();\n\t}",
"void logoutDone();",
"public void return_logout_success() {\r\n\t\tMainClientGUI.loggedIn = false;\r\n\t\tswitchScenes(\"/client/boundry/LoginForm.fxml\", \"/client/boundry/MainCss.css\");\r\n\t}",
"public void logout() {\n\n $(logOutNavigator).click();\n driver = commonMethods.waitForElement(driver, logOffBtn);\n $(logOffBtn).click();\n $(loadingProgressIcon).should(disappear);\n }",
"public static void logout() {\n click(MY_ACCOUNT_DROPDOWN);\n click(LOGOUT_BUTTON);\n }",
"public void logOut() {\n\t\t// Close all opened windows and start up the App again\n\t\tcurrentUser = null;\n\t\tcurrentContact = null;\n\t\tjava.awt.Window win[] = java.awt.Window.getWindows();\n\t\tfor (int i = 0; i < win.length; i++) {\n\t\t\twin[i].dispose();\n\t\t}\n\t\tApp.main(null);\n\t}",
"public void LogoutListener()\n {\n \tLogout.addActionListener(new ActionListener(){\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString sql = \"UPDATE admin_login SET isLogedin = '0' WHERE isLogedin = '1'\";\n\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(card, \"You have logged Out from admin \");\n\n\t\t\t\ttry {\n\t\t\t\t\t\t\tdb.ExecuteStatement(sql);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tLoginName.setText(\"\");\n\t\t\t\t\t\t\tLoginLabel.setForeground(Color.red);//disable logout button on login\n\t\t\t\t\t\t\tLogout.setEnabled(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//enable login button on logout\n\t\t\t\t\t\t\tLogIn.setEnabled(true);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//Reset staff id and password here\n\t\t\t\t\t\t\t UserName.setText(\"\");\n\t\t\t\t\t\t\t Password.setText(\"\");\n\t\t\t\t\t\t\tresetPassword.setEnabled(true);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t UserName.setEnabled(true);\n\t\t\t\t\t\t\t Password.setEnabled(true);\n\t\t\t\t\t} catch (SQLException e1) {}\n\t\t\t\t\n\t\t\t}\n \t\t\n \t});\n }",
"public void logout()\r\n {\r\n loginForForm = \"\";\r\n passwordForForm = \"\";\r\n redirectSession(\"/logout\");\r\n }",
"public void logout() {\n\t\tthis.setCurrentUser(null);\n\t\tthis.setUserLoggedIn(false);\t\t\n\t}",
"@FXML\n private void logout(ActionEvent event) throws IOException {\n if (CurrentUser.getInstance().getUser() != null) {\n CurrentUser.getInstance().init(null); //Logs off\n App.setRoot(\"default\");\n }\n }",
"public void logoutUser() {\n editor.remove(Is_Login).commit();\n editor.remove(Key_Name).commit();\n editor.remove(Key_Email).commit();\n editor.remove(KEY_CUSTOMERGROUP_ID).commit();\n // editor.clear();\n // editor.commit();\n // After logout redirect user to Loing Activity\n\n }",
"@FXML\r\n private void handleButtonLogOut() {\r\n sessionContent.remove(\"activeId\");\r\n user = null;\r\n MobileApplication.getInstance().switchView(LOGIN_VIEW);\r\n }",
"public void logOut() {\r\n\t\tthis.modoAdmin = false;\r\n\t\tthis.usuarioConectado = null;\r\n\t}",
"private void LogoutButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_LogoutButtonActionPerformed\n //Leaves the DeputyCommissionerWindow and open the Login window\n this.dispose();\n lg.setVisible(true);\n }",
"public void attemptLogout() {\n spEditor.clear();\n spEditor.putBoolean(LOGGEDIN_KEY, false);\n spEditor.commit();\n }",
"public void onLogout() {\n ParseUser.logOut();\n\n promptForLogin();\n }",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlogout_click(e);\r\n\t\t\t}",
"public void logout() {\n\t\tsetToViewMode();\n\t\t\n\t\tif(supplierList.getModel().getSize() > 0){\n\t\t\tsupplierList.clearSelection();\n\t\t\tsupplierList.setSelectedValue(supplierList.getModel().getElementAt(0), true);\t\t\n\t\t} else {\n\t\t\tString empty = \"\";\n\t\t\tsetNameTF(empty);\n\t\t\tsetAddressTF(empty);\n\t\t\tseteMailTF(empty);\n\t\t\tsetIDTF(empty);\n\t\t\ttelTF.setText(empty);\n\t\t}\n\t}",
"@FXML\r\n\tvoid logout_btn_clicked(MouseEvent event) {\r\n\t\tString quary = \"UPDATE users SET connection_status = 0 WHERE userID = \" + MainClientGUI.getUserID();\r\n\t\tMessage message = new Message(MessageType.LOGOUT, \"MarketingAgentSalesMainController_logout_clicked\", quary);\r\n\t\tMainClientGUI.client.handleMessageFromClientUI(message);\r\n\t}",
"private void logoutMouseClicked(java.awt.event.MouseEvent evt) {\n try\n {\n con_logout ob=new con_logout(con);\n this.setVisible(false);\n ob.setVisible(true);\n }\n \n catch(Exception e)\n {\n e.printStackTrace();\n } \n }",
"private void loginButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_loginButtonActionPerformed\n uL.setVisible(true);\n boolean isLoggedInNew = uL.isLoggedIn();\n boolean isLoggedIn = na.isLoggedIn();\n if (isLoggedInNew || isLoggedIn) {\n dm.messageMustLogOut();\n uL.dispose();\n }\n }",
"public void logOut() {\n sp.edit().clear().commit();\n }",
"@Override\r\n public void actionPerformed(ActionEvent e) {\n LogoutAbstract.Logout();\r\n }",
"@Override\n public void performLogout(){\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tlogOut();\n\t\t\t}",
"@Step(\"Log out\")\n public void logOut() {\n open();\n sighOutButton.click();\n }",
"public void logoutButtonPushed(ActionEvent event) throws IOException\r\n {\r\n SceneChanger.setLoggedInUser(null);\r\n SceneChanger sc = new SceneChanger();\r\n sc.changeScenes(event, \"LoginView.fxml\",\"Login\");\r\n }",
"@Override\n\tpublic void logout() {\n\t}",
"public void doLogout() {\n mSingleton.getCookieStore().removeUser(mUser);\n mPreferences.setUser(null);\n new ActivityTable().flush();\n\n //update variables\n mUser = null;\n mLogin = false;\n\n //reset drawer\n restartActivity();\n }",
"public void logout() {\n javafx.application.Platform.runLater(clientBar::logOut);\n }",
"protected void userLoggedOut() {\n\t\tRuvego.userLoggedOut();\n\t\tResultsActivityMenu.userLoggedOut();\n\t\tHistory.newItem(\"homePage\");\n\t}",
"public static void logout() {\n userId = -1;\n aisId = -1;\n \n name = \"\";\n role = \"\";\n roleFromDatabase = \"\";\n \n lastAction = LocalDateTime.now().minusYears(100);\n }",
"@Override\n public void loggedOut() {\n timeTables = new Timetables();\n appointments = new Appointments();\n tasks = new Tasks();\n messages = new Messages();\n substitutions = new Substitutions();\n files = new Files();\n announcements = new Announcements();\n excuseNotes = new ExcuseNotes();\n }",
"public void logout() {\n // Mengambil method clear untuk menghapus data Shared Preference\n editor.clear();\n // Mengeksekusi perintah clear\n editor.commit();\n // Membuat intent untuk berpindah halaman\n Intent intent = new Intent(context, LoginActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n context.startActivity(intent);\n }",
"public void logoutpackged() {\n\n editor.remove(IS_LOGIN);\n editor.remove(KEY_NAME);\n editor.remove(KEY_EMAIL);\n editor.remove(KEY_ID);\n// editor.remove(KEY_IMAGEURI);\n editor.remove(PROFILE_IMG_URL);\n editor.remove(PROFILE_IMG_PATH);\n// editor.remove(KEY_LANGUAGE);\n editor.commit();\n\n /* Intent i = new Intent(context, SelectLanguage.class);\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n context.startActivity(i);\n ((Activity) context).finish();*/\n\n }",
"public String logout(){\r\n this.user = null;\r\n loggedIn = false;\r\n return \"/index?faces-redirect=true\";\r\n }",
"public void logoutbutton(ActionEvent event) throws Exception{\n\t\tMain log = new Main();\n\t\tlog.start(Main.getPrimarystage());\n\t}",
"public String logout()\n\t{\n\t\tsession.remove(\"user_name\");\n\t\tsession.remove(\"password\");\n\t\tsession.clear();\n\t\tsession.invalidate();\t\n\t\taddActionMessage(\"You Have Been Successfully Logged Out\");\n\t\treturn SUCCESS;\n\t}",
"public void logout(){\n logger.debug(\"logout from the application\");\n driver.findElement(oLogout).click();\n new WebDriverWait(driver,10).until(\n ExpectedConditions.titleIs(\"Sign-on: Mercury Tours\"));\n\n }",
"public void logout() {\n updateToken(\"\");\n startActivity(new Intent(GarageListActivity.this, LoginScreenActivity.class));\n updateToken(\"\");\n finish();\n }",
"public void logout() {\n \n FacesContext.getCurrentInstance().getExternalContext().invalidateSession();\n try {\n FacesContext.getCurrentInstance().getExternalContext()\n .redirect(\"/BookStorePelikSangat/faces/admin/loginadmin.xhtml\");\n } \n catch (IOException e) {}\n\t}",
"public void logout() {\n\t\ttry {\n\t\t\tStage mainStage = (Stage) HomePagePane.getScene().getWindow();\n\t\t\tmainStage.close();\n\t\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"/application/Main.FXML\"));\n\t\t\tAnchorPane pane = loader.load();\n\t\t\tScene scene = new Scene(pane, 700, 400);\n\t\t\tStage stage = new Stage();\n\t\t\tstage.setScene(scene);\n\t\t\tstage.show();\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}",
"public void actionPerformed(ActionEvent e) {\r\n\t\t\t\tint selection=JOptionPane.showConfirmDialog(mainWin,\"Are you sure you want to log out\",\"Choose\",JOptionPane.YES_NO_OPTION);\r\n\t\t\t\tif( selection==JOptionPane.YES_OPTION) {\r\n\t\t\t\t\tmainWin.dispose();\r\n\t\t\t\t\tMainLoginPage returntologin=new MainLoginPage();\r\n\t\t\t\t\treturntologin.display();\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}",
"@Override\n public void Logout() {\n\t \n }",
"public void logout(View v){\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor editor = preferences.edit();\n editor.clear();\n editor.apply();\n Button view = findViewById(R.id.buttonView);\n view.setVisibility(View.INVISIBLE);\n Button logout = findViewById(R.id.buttonLogout);\n logout.setVisibility(View.INVISIBLE);\n EditText username = findViewById(R.id.username);\n username.setText(\"\");\n username.setHint(\"Username\");\n username.setVisibility(View.VISIBLE);\n EditText pass = findViewById(R.id.password);\n pass.setText(\"\");\n pass.setHint(\"Password\");\n pass.setVisibility(View.VISIBLE);\n Button login = findViewById(R.id.buttonLogin);\n login.setVisibility(View.VISIBLE);\n Button createAcc = findViewById(R.id.buttonCreateAccount);\n createAcc.setVisibility(View.VISIBLE);\n TextView accountName = findViewById(R.id.accountName);\n accountName.setVisibility(View.INVISIBLE);\n notification(this.getWindow().getDecorView(),\"You have been logged out!\");\n }",
"public void logOut() {\n\t\tToken.getIstance().setHashPassword(null);\n\t}",
"private void logout(){\n showLoadingDialog();\n TwitterController.getInstance().logout(logoutCallback);\n }",
"public void setlogUserOut() {\n\t\tcontroller.logoutUser();\n\t\tuserMenuButton.setText(\"\");\n\t\tuserMenuButton.setStyle(\"\");\n\t\tuserMenuButton.getItems().removeAll(menu1, menu2);\n\t\tloggedinuser.setVisible(false);\n\t\tuserSettings.setVisible(false);\n\t\tloginoption.setVisible(true);\n\n\t}",
"public void logout() {\n SharedPreferences sharedPreferences = mCtx.getSharedPreferences(AppConfig.SHARED_PREF_NAME, Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.clear();\n editor.apply();\n mCtx.startActivity(new Intent(mCtx, LoginActivity.class));\n }",
"private void logout() {\n userModel.setLoggedInUser(null);\n final Intent intent = new Intent(this, LoginActivity.class);\n startActivity(intent);\n finish();\n }",
"private void logoutUser() {\n\t\tsession.setLogin(false);\n\n\n\t\t// Launching the login activity\n\t\tIntent intent = new Intent(EnterActivity.this, LoginActivity.class);\n\t\tstartActivity(intent);\n\t\tfinish();\n\t}",
"static void logout() {\n\t\tserver.clearSharedFiles(username);\n\t\tserver.clearNotSharedFiles(username);\n\t}",
"public void logOut() {\n try {\n // getGlobalNavigation().clickSignOut();\n } catch (TimeoutException e) {\n Log.log(\"logOut\", \"page loads for more than 30 seconds\", true);\n }\n }",
"public void logOut() {\n Logger.d(TAG,\"login#logOut\");\n Logger.d(TAG,\"login#stop reconnecting\");\n //\t\teverlogined is enough to stop reconnecting\n everLogined = false;\n isLocalLogin = false;\n reqLoginOut();\n }",
"private void logoutHandler() {\n AlertDialog.Builder builder = new AlertDialog.Builder(context, android.R.style.Theme_DeviceDefault_Dialog);\n builder.setTitle(\"Logout?\");\n builder.setMessage(\"Are you sure you want to logout?\");\n builder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n Util.setLoggedInFlag(false);\n\n HPIApp.getAppContext().stopService(new Intent(HPIApp.getAppContext(), StepService.class));\n\n Intent intent = new Intent(HomeActivity.this, SplashActivity.class);\n startActivity(intent);\n HomeActivity.this.finish();\n }\n });\n\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n\n builder.show();\n }",
"@Override\n\tpublic String logout() {\n\t\treturn null;\n\t}",
"public void logout() {\r\n SharedPreferences sharedPreferences = ctx.getSharedPreferences(SHARED_PREF_NAME, Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = sharedPreferences.edit();\r\n editor.clear();\r\n editor.apply();\r\n ctx.startActivity(new Intent(ctx, MainActivity.class));\r\n }",
"public void logOut(ActionEvent actionEvent) {\n\t\tLOGGER.info(\"Cerrando sesión de usuario\");\n\n\t\tchangeScene(getClass().getResource(\"/view/Login.fxml\"));\n\t}",
"public abstract void logout();",
"@Override\r\n\tpublic void userLogout(String login) {\n\r\n\t}",
"@Override\n public void onLogoutClick() {\n session.doLogout();\n addFragment();\n }",
"private void logout() {\n getSharedPreferences(HELP_CATEGORIES, MODE_PRIVATE).edit().clear().apply();\n getSharedPreferences(LOGIN, MODE_PRIVATE).edit().putBoolean(IS_LOGGED_IN, false).apply();\n\n OkHttpClient client = new OkHttpClient();\n Request request = new Request.Builder()\n .url(URL + \"/nuh/logout\")\n .build();\n AsyncTask.execute(() -> {\n try {\n client.newCall(request).execute();\n } catch (IOException e) {\n e.printStackTrace();\n }\n });\n }",
"private void menu_lable_4MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_menu_lable_4MouseClicked\n // TODO add your handling code here:\n int x = JOptionPane.showConfirmDialog(this, \"You are not yet log out to current account, are yousure want to exit without logout!! and exit the system. Yes exit, No logout !\", \"Not logged out!!\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);\n switch (x) {\n case JOptionPane.YES_OPTION:\n this.dispose();\n System.exit(0);\n break;\n case JOptionPane.CANCEL_OPTION:\n break;\n default:\n this.log_out();\n new SubInterface_Login_Staff().setVisible(true);\n this.dispose();\n break;\n }\n }",
"@Override\r\n public void onSign(SignEvent event){\n if (event.getAction().equals(SignEvent.Action.SIGNED_IN)) {\r\n //write cookies if keep signed in\r\n if (event.getAccountKey() != null && !event.getAccountKey().isEmpty()) {\r\n cookie.setAccountKey(Shared.MY_SESSION, event.getAccountKey());\r\n }\r\n //already signed in, load workspace\r\n RootPanel.get().clear();\r\n Widget workspace = new Workspace().asWidget();\r\n RootPanel.get().add(workspace); \r\n Info.display(\"Welcome\", \"Signed in as \" + Shared.MY_SESSION.getAccount().getFullName());\r\n }\r\n //process sign_out\r\n if (event.getAction().equals(SignEvent.Action.SIGN_OUT)){\r\n String accountKey = cookie.getAccountKey(Shared.MY_SESSION);\r\n Shared.RPC.signOutAndDetachSession(Shared.MY_SESSION, accountKey, new AsyncCallback<Session>() {\r\n @Override\r\n public void onSuccess(Session s) {\r\n if (s != null) {\r\n Shared.MY_SESSION = s;\r\n //sign out seems OK on server side, dispatch SIGNED_OUT event\r\n Shared.EVENT_BUS.fireEvent(new SignEvent(SignEvent.Action.SIGNED_OUT)); //WARN: don't dispatch SIGN_OUT avoiding deadlock call\r\n } else {\r\n Info.display(\"Error\", \"Account is already signed out or database error\");\r\n }\r\n }\r\n\r\n @Override\r\n public void onFailure(Throwable caught) {\r\n Info.display(\"Error\", caught.getMessage());\r\n }\r\n });\r\n }\r\n //process signed_out\r\n if (event.getAction().equals(SignEvent.Action.SIGNED_OUT)){\r\n //delete cookies\r\n cookie.discardCookie(Shared.MY_SESSION); \r\n //return UI to welcome status\r\n RootPanel.get().clear();\r\n RootPanel.get().add(new LoginPage()); \r\n Info.display(\"See you\", \"You are now signed out!\");\r\n }\r\n }",
"private void logout() {\n ((MyApplication)this.getApplication()).setLoggedIn(false);\n// Intent intent = new Intent(this, StartupActivity.class);\n// startActivity(intent);\n }",
"public void signOut() {\n ReusableActionsPageObjects.clickOnElement(driver, signOut, logger, \"log out.\");\n }",
"@FXML\n\tprivate void logoutPressed(ActionEvent event) {\n\t\tclient.goOffline();\n\t\tSystem.exit(0);\n\t}",
"@FXML\n\tvoid logoutBTNE(MouseEvent event) throws IOException {\n\t\tMainAllControllers.setWindowVar(\"login\");\n\t\tMainAllControllers.changeWin();\n\t\tMainAllControllers.logOutUser();\n\t}",
"private void doLogout() {\r\n\t\tdoctor.setOnline(0);\r\n\t\t// Set doctor as logged out\r\n\t\tdbAdapter.updateDoctor(doctor);\r\n\t\t// Release objects and notify observers\r\n\t\tloggedIn = false;\r\n\t\tnotifyObservers();\r\n\t\tdoctors = null;\r\n\t\tdoctor = null;\r\n\t}",
"private void logout(){\n player.setName(\"(bot) \" + player.getName());\n botMode = true;\n System.out.println(\"bot made\");\n login = false;\n }",
"@Override\n\t\t\t\tpublic void mouseClicked(java.awt.event.MouseEvent e) {\n\t\t\t\t\tsuper.mouseClicked(e);\n\t\t\t\t\tframe.dispose();\n\t\t\t\t\tnew LoginWindow();\t\n\t\t\t\t}",
"private void LoginOwner() {\n Transaksi.setEnabled(false);\n Transaksi.setVisible(false);\n }",
"private void signOut() {\n mAuth.signOut();\n updateUI(null);\n }",
"@FXML\n private void logOut() throws IOException {\n App.clearManagerStatus();\n App.setRoot(\"/tom/sros/login/logInScreen\");\n }",
"public void backToLoginWindow(ActionEvent event) {\n loadLogin();\n // hides current stage (window)\n ((Node) (event.getSource())).getScene().getWindow().hide();\n\n }",
"public void clearLoginInfo(){\n ProfileSharedPreferencesRepository.getInstance(application).clearLoginInfo();\n }"
]
| [
"0.7645315",
"0.76439464",
"0.7546413",
"0.748836",
"0.7411636",
"0.73215187",
"0.73212475",
"0.7318632",
"0.73167306",
"0.73132074",
"0.7238707",
"0.72367704",
"0.72072566",
"0.71875685",
"0.71123314",
"0.71123314",
"0.7110835",
"0.71066046",
"0.70779043",
"0.7074853",
"0.70649976",
"0.70486814",
"0.7029517",
"0.7021626",
"0.70171547",
"0.7010406",
"0.70048666",
"0.7002564",
"0.69991106",
"0.69983035",
"0.6981474",
"0.6980773",
"0.69752455",
"0.6970005",
"0.6961106",
"0.6950046",
"0.69438326",
"0.69231164",
"0.691406",
"0.6911501",
"0.69080174",
"0.6905127",
"0.69019824",
"0.6891093",
"0.6880377",
"0.6872799",
"0.6871358",
"0.68678415",
"0.6865399",
"0.68645656",
"0.68424207",
"0.68409216",
"0.68102217",
"0.6801905",
"0.6801411",
"0.67933434",
"0.67815435",
"0.67715937",
"0.67616296",
"0.67608446",
"0.67554474",
"0.67483974",
"0.6703513",
"0.6691294",
"0.66833586",
"0.6678567",
"0.66750026",
"0.6673092",
"0.6664305",
"0.66617054",
"0.6648018",
"0.6644738",
"0.6637842",
"0.66299474",
"0.6622444",
"0.6622116",
"0.66149276",
"0.6614772",
"0.65811116",
"0.65686893",
"0.65671504",
"0.6549179",
"0.654365",
"0.65421116",
"0.65418804",
"0.6537045",
"0.65328395",
"0.652761",
"0.65176904",
"0.6517443",
"0.6509713",
"0.650344",
"0.64945585",
"0.64904106",
"0.64895463",
"0.6489458",
"0.6479324",
"0.6471919",
"0.64679325",
"0.6465156"
]
| 0.7767499 | 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 Etablissement)) {
return false;
}
Etablissement other = (Etablissement) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
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 }",
"protected abstract String getId();",
"@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}",
"@Override\n\tpublic int getId(){\n\t\treturn id;\n\t}",
"public String getId() { return id; }",
"public String getId() { return id; }",
"public String getId() { return id; }",
"public int getID() {return id;}",
"public int 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 int getId(){\r\n return localId;\r\n }",
"public void setId(Long id)\n/* */ {\n/* 66 */ this.id = id;\n/* */ }",
"@Override\n public Integer getId() {\n return id;\n }",
"void setId(int id) {\n this.id = id;\n }",
"@Override\n\tpublic Object selectById(Object id) {\n\t\treturn null;\n\t}",
"@Override\n public int getId() {\n return id;\n }",
"@Override\n public int getId() {\n return id;\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 }",
"private void clearId() {\n \n id_ = 0;\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 }",
"@java.lang.Override\n public int getId() {\n return id_;\n }",
"@java.lang.Override\n public int getId() {\n return id_;\n }",
"public void setId(Long id){\n this.id = id;\n }",
"public abstract Long getId();",
"final protected int getId() {\n\t\treturn id;\n\t}",
"private void clearId() {\n \n id_ = 0;\n }",
"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(); }",
"public void setId(long id){\n this.id = id;\n }",
"public void setId(long id){\n this.id = id;\n }",
"@SuppressWarnings ( \"unused\" )\n private void setId ( final Long id ) {\n this.id = id;\n }",
"public Long getId() \n {\n return id;\n }",
"public void setId(Integer id)\r\n/* */ {\r\n/* 122 */ this.id = id;\r\n/* */ }",
"@Override\n\tpublic void setId(int id) {\n\n\t}",
"@Override\r\n\tpublic Object getId() {\n\t\treturn null;\r\n\t}",
"public void test_getId() {\n assertEquals(\"'id' value should be properly retrieved.\", id, instance.getId());\n }",
"public int getId()\n {\n return id;\n }",
"public int getID(){\n return id;\n }",
"public String getID(){\n return Id;\n }"
]
| [
"0.6896072",
"0.6839122",
"0.6705258",
"0.66412854",
"0.66412854",
"0.65923095",
"0.65785074",
"0.65785074",
"0.65752834",
"0.65752834",
"0.65752834",
"0.65752834",
"0.65752834",
"0.65752834",
"0.6561566",
"0.6561566",
"0.6545169",
"0.6525343",
"0.65168375",
"0.64885366",
"0.6477314",
"0.64274967",
"0.6420125",
"0.6417802",
"0.640265",
"0.6367859",
"0.6355473",
"0.6352689",
"0.6348769",
"0.63258827",
"0.63203555",
"0.6302521",
"0.62946665",
"0.62946665",
"0.62845194",
"0.62724674",
"0.62673867",
"0.62664896",
"0.62628543",
"0.62604827",
"0.6256597",
"0.62518793",
"0.6248176",
"0.6248176",
"0.62445766",
"0.6240227",
"0.6240227",
"0.62322026",
"0.6223806",
"0.62218046",
"0.6220317",
"0.6212928",
"0.62090635",
"0.6203066",
"0.6201325",
"0.61939746",
"0.6190498",
"0.6190498",
"0.6190498",
"0.6189811",
"0.6189811",
"0.6185415",
"0.618307",
"0.6175355",
"0.6174499",
"0.6167348",
"0.6167341",
"0.61617935",
"0.61569077",
"0.61569077",
"0.61567014",
"0.61567014",
"0.61567014",
"0.61567014",
"0.61567014",
"0.61567014",
"0.61567014",
"0.61423147",
"0.6134403",
"0.6129919",
"0.61289775",
"0.6105535",
"0.6105535",
"0.61055124",
"0.6103899",
"0.6103877",
"0.61027",
"0.61002946",
"0.61002403",
"0.609533",
"0.609243",
"0.609243",
"0.60917705",
"0.6090932",
"0.60905474",
"0.60762745",
"0.6072683",
"0.6072517",
"0.6071208",
"0.60706896",
"0.6070472"
]
| 0.0 | -1 |
exceptionHandler is take care of exception thrown by services or controller. | @ExceptionHandler(RecipeNotFoundException.class)
public ResponseEntity<ErrorResponse> exceptionHandler(RecipeNotFoundException ex) {
ErrorResponse response =
new ErrorResponse("Error_CODE-0001",
"No recipe found with Id " + ex.getId());
return new ResponseEntity<>(response, HttpStatus.NOT_FOUND);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void exceptionHandler(Handler<Exception> handler) {\n\t\t\n\t}",
"@ExceptionHandler(Exception.class)\n public String handleAllException(Exception ex) {\n logger.info(\"Error in dashboard.\");\n return \"error\";\n }",
"@ExceptionHandler(Exception.class)\r\n\tpublic ResponseEntity<ErrorResponse> exceptionHandler(Exception ex) {\r\n\t\tErrorResponse error = new ErrorResponse();\r\n\t\terror.setErrorCode(HttpStatus.INTERNAL_SERVER_ERROR.value());\r\n\t\terror.setErrorMessage(ex.getMessage());\r\n\t\tlogger.error(\"Exception while api execution:\", ex);\r\n\t\treturn new ResponseEntity<ErrorResponse>(error, HttpStatus.OK);\r\n\r\n\t}",
"public interface ExceptionHandler\n{\n //TODO not sure how to handle this\n}",
"@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)\n @ExceptionHandler(Exception.class)\n public String handleAllException() {\n\n return \"server_error\";\n }",
"@ExceptionHandler({CSHRServiceException.class})\n @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)\n @ResponseBody\n public CSHRServiceStatus handleException(CSHRServiceException ex) {\n log.error(ex.getCshrServiceStatus().getSummary(), ex);\n\n return ex.getCshrServiceStatus();\n }",
"@ExceptionHandler(Exception.class)\n public ResponseEntity<Object> handle(Exception ex) {\n log.error(ex.toString());\n return buildResponseEntity(\n HttpStatus.INTERNAL_SERVER_ERROR,\n new ApiError(ex.getMessage(), ex.toString()));\n }",
"void handleError(Exception ex);",
"@ExceptionHandler(Exception.class)\n protected ResponseEntity<Object> handleAllOtherErrors(Exception ex, WebRequest request) {\n AppExceptionBean exceptionBean = new AppExceptionBean(String.format(\"Something unexpected happened! \" +\n \"We'll be looking into it, but if you want to further discuss this specific problem, \" +\n \"please use the following identifier when contacting support: %s.\", UUID.randomUUID()));\n log.error(exceptionBean.getMessage(), ex);\n return handleExceptionInternal(ex, exceptionBean, new HttpHeaders(), HttpStatus.BAD_REQUEST, request);\n }",
"@ExceptionHandler(value = { Exception.class})\n public ResponseEntity<Object> handleAllException(Exception ex, final WebRequest request) {\n\n final String bodyOfResponse = \"Something went wrong.Please contact support\";\n return handleExceptionInternal(ex, bodyOfResponse, new HttpHeaders(), HttpStatus.INTERNAL_SERVER_ERROR, request);\n }",
"public interface ExceptionHandler {\n public void onException(Exception e);\n}",
"@ExceptionHandler(value = Exception.class)\n public Object errorHandler(HttpServletRequest request, HttpServletResponse response,\n Exception e) throws Exception {\n\n e.printStackTrace();\n if (isAjax(request)) {\n // return response;// 返回response跟进源码瞅瞅\n return JsonResult.errorException(e.getMessage());\n } else {\n ModelAndView modelAndView = new ModelAndView();\n modelAndView.addObject(\"exception\", e);\n modelAndView.addObject(\"url\", request.getRequestURL());\n modelAndView.setViewName(ERROR_VIEW);\n return modelAndView;\n }\n }",
"public void handleInvokerException(HttpRequest request, HttpResponse response, Exception e)\n {\n handleException(request, response, e);\n }",
"@ExceptionHandler(Exception.class)\n public void logErrors(Exception e) {\n errorLogger.logError(e.getMessage(), e);\n }",
"private void handleServiceException(PortletRequest request,\n PortletResponse response, Application application, Throwable e)\n throws IOException, PortletException {\n if (getRequestType(request) == RequestType.UIDL) {\n Application.SystemMessages ci = getSystemMessages();\n criticalNotification(request, (ResourceResponse) response,\n ci.getInternalErrorCaption(), ci.getInternalErrorMessage(),\n null, ci.getInternalErrorURL());\n if (application != null) {\n application.getErrorHandler()\n .terminalError(new RequestError(e));\n } else {\n throw new PortletException(e);\n }\n } else {\n // Re-throw other exceptions\n throw new PortletException(e);\n }\n \n }",
"@ExceptionHandler\r\n\tpublic ModelAndView exception(Exception exception) {\r\n\t\tlogger.error(exception.getMessage(), exception);\r\n\t\r\n\t\tModelAndView modelAndView = new ModelAndView(\"error\");\r\n\t\tmodelAndView.addObject(\"exception\", exception.getMessage());\r\n\t\treturn modelAndView;\r\n\t}",
"@ExceptionHandler(Exception.class)\n\tpublic ModelAndView handleAllExceptions(Exception ex) {\n\t\tex.printStackTrace();\n\t\tModelAndView model = new ModelAndView(\"genericError\");\n\t\tmodel.addObject(\"errCode\", \"500\");\n\t\tmodel.addObject(\"errMsg\", \"Internal server error - omlouvame se za nami zpusobene potize.\");\n\t\treturn model;\n\t}",
"@ResponseBody\n @ExceptionHandler(Exception.class)\n @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)\n ErrorResponse<String> unexpectedExceptionHandler(Exception exception) {\n // todo : it would be wise to log the exception information here as well\n\n return new ErrorResponse<>(ErrorCodes.UNEXPECTED_EXCEPTION.getCode());\n }",
"@ExceptionHandler({NotFoundException.class})\n\tpublic ResponseEntity<ErrorDto> handleNotFoundException(Exception ex, WebRequest request){\n//\t\tstatistic.error(\"requestException\", ex);\n\n\t\tlogger.error(ex.getLocalizedMessage(), ex);\n\t\tString path = request.getContextPath();\n\t\tErrorDto error = new ErrorDto();\n\t\terror.timestamp = new Date().getTime();\n\t\terror.exception = ex.getClass().getCanonicalName();\n\t\terror.error = HttpStatus.NOT_FOUND.getReasonPhrase();\n\t\terror.message = ex.getMessage();\n\t\terror.path = path;\n\t\terror.status = HttpStatus.NOT_FOUND.value();\n\t\treturn new ResponseEntity<ErrorDto>(error, HttpStatus.NOT_FOUND);\n\t}",
"@ExceptionHandler(Exception.class)\n\t@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)\n\tpublic VndError onException(Exception e) {\n\t\treturn new VndError(e.getClass().getSimpleName(), StringUtils.hasText(e\n\t\t\t\t.getMessage()) ? e.getMessage() : e.getClass().getSimpleName());\n\t}",
"@ExceptionHandler(Exception.class)\n @ResponseStatus(HttpStatus.NOT_FOUND)\n public @ResponseBody String handleException(Exception ex) {\n LOGGER.debug(\"Exception: \" + ex);\n return \"Exception: \" + ex.getMessage();\n }",
"ResponseEntity<Object> handleException(HttpServletRequest request,\n HttpServletResponse response,\n Exception exception);",
"@ExceptionHandler(Exception.class)\n @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)\n public ExceptionResponse exception(final Exception exception) {\n return processError(exception, HttpStatus.INTERNAL_SERVER_ERROR);\n }",
"@ExceptionHandler(value = {NullPointerException.class, \n \t\t\t\t\t\t RuntimeException.class, \n \t\t\t\t\t\t IOException.class})\n public ResponseEntity<Object> handleInternalServerErr(RuntimeException exception, WebRequest request) {\n return handleExceptionInternal(exception, \n \t\t\t\t\t\t\t \"Error interno en el servidor\", \n \t\t\t\t\t\t\t new HttpHeaders(), \n \t\t\t\t\t\t\t HttpStatus.INTERNAL_SERVER_ERROR, \n \t\t\t\t\t\t\t request);\n }",
"@ExceptionHandler(value = {NotFoundException.class})\n public ResponseEntity<Object> handlerApiNotFoundException(\n NotFoundException e)\n {\n HttpStatus notFound = HttpStatus.NOT_FOUND;\n ApiException apiException = new ApiException(\n e.getMessage(),\n notFound,\n ZonedDateTime.now(ZoneId.of(\"Z\"))\n );\n //2. return response entity\n return new ResponseEntity<>(apiException,notFound);\n }",
"private void logException(java.lang.Exception e) {\n }",
"public void onException(Exception ex) {\n \t\t\t}",
"public interface ExceptionHandler {\n\n /**\n * 处理OkException异常\n *\n * @param okCode 错误码\n * @param userMsg 用户信息\n * @param ex 错误完整信息\n * @param mark 业务标识\n * @return 是否继续进行默认处理\n */\n boolean handleOkException(@Nullable String okCode,\n @Nullable String userMsg,\n @Nullable OkException ex,\n @Nullable String mark);\n\n /**\n * OkException的默认处理方法\n *\n * @param code 错误码\n * @param userMsg 用户信息\n * @param ex 错误完整信息\n * @param mark 业务标识\n */\n void defaultOkException(@Nullable String code,\n @Nullable String userMsg,\n @Nullable OkException ex,\n @Nullable String mark);\n\n /**\n * 处理Throwable错误\n *\n * @param throwable Throwable对象\n * @param mark 业务标识\n * @return 是否继续进行默认处理\n */\n boolean handlerThrowable(@Nullable Throwable throwable,@Nullable String mark);\n\n /**\n * 处理Throwable错误\n *\n * @param throwable Throwable对象\n * @param mark 业务标识\n */\n void defaultThrowable(@Nullable Throwable throwable,@Nullable String mark);\n\n}",
"@ExceptionHandler({IllegalArgumentException.class})\n public R handleException(IllegalArgumentException e, HttpServletRequest request) {\n return R.error(400, e.getMessage());\n }",
"@ExceptionHandler({ HttpMessageNotReadableException.class})\n\tpublic final ResponseEntity<ApiError> handleException(Exception ex, WebRequest request) {\n\t\tHttpHeaders headers = new HttpHeaders();\n\n\t\t /*else if (ex instanceof InvalidArgument) {\n\t\t\tHttpStatus status = HttpStatus.BAD_REQUEST;\n\t\t\tInvalidArgument cnae = (InvalidArgument) ex;\n\n\t\t\treturn handleContentNotAllowedException(cnae, headers, status, request);\n\t\t} */ if(ex instanceof HttpMessageNotReadableException) {\n\n\t\t\tHttpStatus status = HttpStatus.BAD_REQUEST;\n\t\t\tHttpMessageNotReadableException cnae = (HttpMessageNotReadableException) ex;\n\n\t\t\treturn HttpMessageNotReadableException(cnae, headers, status, request);\n\t\t}\n\t\t/*else if(ex instanceof MethodArgumentNotValidException) {\n\t\t\tHttpStatus status = HttpStatus.BAD_REQUEST;\n\t\t\tMethodArgumentNotValidException cnae = (MethodArgumentNotValidException) ex;\n\n\t\t\treturn MethodArgumentNotValidException(cnae, headers, status, request);\t\t\n\t\t}*/\n\t\telse {\n\t\t\tHttpStatus status = HttpStatus.INTERNAL_SERVER_ERROR;\n\t\t\treturn handleExceptionInternal(ex, null, headers, status, request);\n\t\t}\n\t}",
"void onException(Exception e);",
"@ExceptionHandler(ReservationNotFoundException.class)\n protected ResponseEntity<Object> handleReservationNotFoundException(ReservationNotFoundException ex, WebRequest request) {\n AppExceptionBean exceptionBean = exceptionMapper.toBean(ex);\n return handleExceptionInternal(ex, exceptionBean, new HttpHeaders(), HttpStatus.NOT_FOUND, request);\n }",
"@ExceptionHandler(Exception.class)\n\t@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)\n\t@ResponseBody\n\tpublic ErrorModel handleInternal(final Exception ex, final WebRequest request) {\n\t\tlogger.error(ex);\n\t\treturn new ErrorModel(\"server_error\", ex.getMessage());\n\t}",
"ResponseEntity<Object> handleException(HttpServletRequest request,\n HttpServletResponse response,\n Exception exception,\n List<String> errorMessages);",
"@ExceptionHandler(Exception.class)\n public ResponseEntity<String> exception(Exception e) {\n return new ResponseEntity<String>(\"General exception has occured: \" + e.getMessage(), httpHeaders, HttpStatus.INTERNAL_SERVER_ERROR);\n }",
"protected void handleException(java.lang.Throwable exception) {\n\tsuper.handleException(exception);\n}",
"@ExceptionHandler(ServiceException.class)\n @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)\n public ExceptionResponse serviceException(final ServiceException serviceException) {\n return processError(serviceException, HttpStatus.INTERNAL_SERVER_ERROR);\n }",
"@ExceptionHandler({BusinessException.class, InvalidDataException.class, PersistenDataException.class,GeneralException.class})\r\n\tpublic ResponseEntity<DefaultErrorList> handlerRestException (ModelException ex, HttpServletRequest request){\r\n\t\treturn new ResponseEntity<DefaultErrorList>(new DefaultErrorList\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t(new DefaultError\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(ex.getCode(), \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ex.getMessage(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ex.getLevel(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ex.getDescription(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t request.getRequestURL().toString())\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),ex.getHttpStatus());\r\n\t}",
"public interface OnGlobalExceptionListener {\n boolean handleException(AppException e);\n}",
"@Override\n\tpublic void onException(Exception e) {\n\n\t}",
"public void handleWriteResponseException(HttpRequest request, HttpResponse response, Exception e)\n {\n handleException(request, response, e);\n }",
"ResponseEntity<Object> handleException(HttpServletRequest request,\n HttpServletResponse response,\n Exception exception,\n String errorMessage);",
"public void onException(RequestException e);",
"@Override\n\tpublic ModelAndView resolveException(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler, Exception ex) {\n\t\tSystem.out.println(\"错误页面被拦截\");\n\t\treturn new ModelAndView(\"myError\"); \n\t}",
"public HttpClient exceptionHandler(final Env env, final Callback handler) {\n client.exceptionHandler(new Handler<Throwable>(env, handler));\n return this;\n }",
"@Override\n public void exception(NHttpServerConnection conn, Exception ex) {\n this.handler.exception(conn, ex);\n }",
"@Override\r\n public void onException(Exception arg0) {\n\r\n }",
"@Override\n\tpublic void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {\n\t\tLog.i(\"exceptionCaught\", cause.getMessage());\n\t\tsuper.exceptionCaught(ctx, cause);\n\t}",
"@ExceptionHandler(ResourceNotFoundException.class)\n public void logResourceNotFoundException(ResourceNotFoundException e) throws ResourceNotFoundException {\n errorLogger.logError(e.getMessage(), e);\n throw e;\n }",
"private void handleException(java.lang.Throwable exception) {\n\n\t/* Uncomment the following lines to print uncaught exceptions to stdout */\n\t// System.out.println(\"--------- UNCAUGHT EXCEPTION ---------\");\n\t// exception.printStackTrace(System.out);\n}",
"@Override\n\tpublic ModelAndView resolveException(HttpServletRequest request, HttpServletResponse response, Object handler,\n\t\t\tException exception) {\n\t\tif(exception instanceof BusinessException){\n\t\t\treturn new ModelAndView(\"errors/business\").addObject(\"exception\",exception);\n\t\t}\n\t\treturn new ModelAndView(\"errors/error\").addObject(\"exception\",exception);\n\t}",
"@Bean\n\tpublic ReconnectFilter apiExceptionHandler() {\n\t\treturn new ReconnectFilter(usersConnectionRepository, userIdSource());\n\t}",
"public void handleException(Throwable e) {\r\n handleException(e, mReportingInteractionMode);\r\n }",
"@ExceptionHandler({AppointmentIdNotFoundException.class, DoctorIdNotFoundException.class, InvalidAppointmentException.class,PatientIdFoundNotException.class,ReportIdNotFoundException.class,TestIdNotFoundException.class})\r\n\tpublic ResponseEntity<String> onlineeyecare(Exception e)\r\n\t{\r\n\t\treturn new ResponseEntity<String>(e.getMessage(), HttpStatus.NOT_FOUND);\r\n\t}",
"@ExceptionHandler({Exception.class})\n protected ResponseEntity<Object> handleUnknownException(Exception ex, WebRequest request) {\n \tlogger.error(\"Exception Stack\",ex);\n \t\n \tExceptionMessages emsg =new ExceptionMessages();\n \t emsg.setExceptionMsg(ex.getMessage());\n \t return new ResponseEntity<Object>(emsg, HttpStatus.BAD_REQUEST);\n\t }",
"public final ANTLRv3Parser.exceptionHandler_return exceptionHandler() throws RecognitionException {\r\n ANTLRv3Parser.exceptionHandler_return retval = new ANTLRv3Parser.exceptionHandler_return();\r\n retval.start = input.LT(1);\r\n\r\n\r\n CommonTree root_0 = null;\r\n\r\n Token string_literal89=null;\r\n Token ARG_ACTION90=null;\r\n Token ACTION91=null;\r\n\r\n CommonTree string_literal89_tree=null;\r\n CommonTree ARG_ACTION90_tree=null;\r\n CommonTree ACTION91_tree=null;\r\n RewriteRuleTokenStream stream_81=new RewriteRuleTokenStream(adaptor,\"token 81\");\r\n RewriteRuleTokenStream stream_ACTION=new RewriteRuleTokenStream(adaptor,\"token ACTION\");\r\n RewriteRuleTokenStream stream_ARG_ACTION=new RewriteRuleTokenStream(adaptor,\"token ARG_ACTION\");\r\n\r\n try {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:226:5: ( 'catch' ARG_ACTION ACTION -> ^( 'catch' ARG_ACTION ACTION ) )\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:226:10: 'catch' ARG_ACTION ACTION\r\n {\r\n string_literal89=(Token)match(input,81,FOLLOW_81_in_exceptionHandler1438); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_81.add(string_literal89);\r\n\r\n\r\n ARG_ACTION90=(Token)match(input,ARG_ACTION,FOLLOW_ARG_ACTION_in_exceptionHandler1440); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_ARG_ACTION.add(ARG_ACTION90);\r\n\r\n\r\n ACTION91=(Token)match(input,ACTION,FOLLOW_ACTION_in_exceptionHandler1442); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_ACTION.add(ACTION91);\r\n\r\n\r\n // AST REWRITE\r\n // elements: ARG_ACTION, 81, ACTION\r\n // token labels: \r\n // rule labels: retval\r\n // token list labels: \r\n // rule list labels: \r\n // wildcard labels: \r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = root_0;\r\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\r\n\r\n root_0 = (CommonTree)adaptor.nil();\r\n // 226:36: -> ^( 'catch' ARG_ACTION ACTION )\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:226:39: ^( 'catch' ARG_ACTION ACTION )\r\n {\r\n CommonTree root_1 = (CommonTree)adaptor.nil();\r\n root_1 = (CommonTree)adaptor.becomeRoot(\r\n stream_81.nextNode()\r\n , root_1);\r\n\r\n adaptor.addChild(root_1, \r\n stream_ARG_ACTION.nextNode()\r\n );\r\n\r\n adaptor.addChild(root_1, \r\n stream_ACTION.nextNode()\r\n );\r\n\r\n adaptor.addChild(root_0, root_1);\r\n }\r\n\r\n }\r\n\r\n\r\n retval.tree = root_0;\r\n }\r\n\r\n }\r\n\r\n retval.stop = input.LT(-1);\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r\n\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return retval;\r\n }",
"@ResponseBody\n @ExceptionHandler(UserNotFoundException.class)\n @ResponseStatus(HttpStatus.NOT_FOUND)\n String userNotFoundHandler(UserNotFoundException ex) {\n return ex.getMessage();\n }",
"@ResponseStatus(value = HttpStatus.NOT_FOUND, reason = \"IOException occured\")\n\t@ExceptionHandler(value=MyCustomException.class)\n\tpublic void myException(HttpServletResponse response) throws IOException {\n\t\t response.sendError(HttpStatus.NOT_FOUND.value());\n\t}",
"void handleException(Context context, Throwable exc, String description);",
"@Override\n\tpublic void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {\n\t\tLOGGER.error(\"server caught exception\", cause);\n\t\tctx.close();\n\t}",
"@ExceptionHandler\n public ModelAndView handleDefault(NotFoundException e)\n {\n log.info(\"From @ExceptionHandler in \" + this.getClass().getName());\n\n ModelAndView model = new ModelAndView(\"error/exception\"); // View name\n model.addObject(\"exception\", e);\n return model;\n }",
"private void handleException(java.lang.Throwable exception) {\r\n\r\n\t/* Uncomment the following lines to print uncaught exceptions to stdout */\r\n\t// System.out.println(\"--------- UNCAUGHT EXCEPTION ---------\");\r\n\t// exception.printStackTrace(System.out);\r\n}",
"public void handleException(Throwable th) {\n ExceptionController.handleException(th, dialogPane, reportIssueButton,\n textArea, contentLabel.textProperty());\n }",
"@ExceptionHandler(value = Exception.class)\n @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)\n public ResponseEntity<?> exception(Exception exception, WebRequest request) {\n\n RestExceptionResponse response = new RestExceptionResponse();\n response.setSuccess(Boolean.FALSE);\n\n if (exception instanceof HttpMessageNotReadableException) {\n\n // Request body is not present or readable.\n LOGGER.warn(\"Request body not readable\", exception);\n response.setMessage(\"Required request body content\"\n + \" is missing or is not readable\");\n\n } else if (exception instanceof HttpMediaTypeNotAcceptableException) {\n\n // Request is not having acceptable media type representation.\n LOGGER.warn(\"Request mediatype not accetable\", exception);\n response.setMessage(\"Required acceptable mediatype representation\");\n\n } else if (exception instanceof NotFoundException) {\n\n LOGGER.warn(\"Requested resource does not exist\", exception);\n // Requested resource does not exist. NotFound means 404 and no respsonse body\n return ResponseEntity.notFound().build();\n\n } else if (exception instanceof TypeMismatchException) {\n\n // Type Mismatch Error for the request properties/attributes\n TypeMismatchException ex = (TypeMismatchException) exception;\n response.setSuccess(Boolean.FALSE);\n response.setMessage(ex.getMessage());\n response.addError(ex.getErrorCode(), ex.getInvalidReason());\n return ResponseEntity.badRequest().body(response);\n\n } else if (exception instanceof ConstraintViolationException) {\n\n // Bean validation erros are found. These errors normally violate the \n // validation annotations of the JSR-303 specification used in models.\n response.setMessage(\"Some values are missing or invalid\");\n ConstraintViolationException ex = (ConstraintViolationException) exception;\n ex.getConstraintViolations().stream().forEach(violation -> {\n response.addError(violation.getPropertyPath().toString(),\n violation.getMessage());\n });\n\n } else if (exception instanceof ValidationException) {\n\n // A ValidationException is thrown when a logical error is found.\n // Alternatively when the request conflicts with the requirements \n // of the business logic, such an exception is important.\n response.setMessage(\"Invalid request\");\n ValidationException ex = (ValidationException) exception;\n response.setMessage(ex.getMessage());\n\n } else {\n // Any other exceptions thrown\n LOGGER.error(\"Unexpected error\", exception);\n response.setMessage(\"Request couldn't be processed\");\n }\n\n return ResponseEntity.badRequest().body(response);\n }",
"Redis exceptionHandler(Handler<Throwable> handler);",
"protected void handleException(Exception ex) {\n\t\tOCSRuntimeException r = extractRuntimeException(ex);\n\t\tif (r != null) {\n\t\t\tshowNotification(r.getMessage());\n\t\t} else {\n\t\t\tshowNotification(ex.getMessage());\n\t\t}\n\t}",
"private Function<RejectedExecutionException, Throwable> handleRejectedExecution() {\n return ex -> {\n log.error(\"The executor cannot handle this request\");\n return new OutOfEmployeeException(ex);\n };\n }",
"@ExceptionHandler(Exception.class)\r\n public ResponseEntity<DefaultErrorList> handleGenericException(Exception ex, HttpServletRequest request) {\r\n\t\tLOGGER.error(\"Error en la ejecucion\", ex.getMessage());\r\n\t\treturn new ResponseEntity<DefaultErrorList>(new DefaultErrorList(new DefaultError\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(GeneralCatalog.GRAL001.getCode(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGeneralCatalog.GRAL001.getMessage(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGeneralCatalog.GRAL001.getLevelException().toString(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trequest.getRequestURL().toString()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)), HttpStatus.INTERNAL_SERVER_ERROR);\r\n }",
"@ExceptionHandler(value = AccRunTimeException.class)\n public ModelAndView myErrorHandler(AccRunTimeException ex) {\n ModelAndView modelAndView = new ModelAndView();\n //指定错误页面的模板页\n modelAndView.setViewName(\"error\");\n modelAndView.addObject(\"code\", ex.getCode());\n modelAndView.addObject(\"message\", ex.getMessage());\n return modelAndView;\n }",
"@ExceptionHandler(value=FileNotFound.class)\n\tpublic void resolveException(String ex,HttpServletResponse response) {\n\t\ttry {\n\t\t\tresponse.getOutputStream().println(\"Warning: File vuoto\\nException message: \"+ex);\n\t\t} catch (IOException e) {\n\t\t\t\n\t\t}\n\t}",
"@Override\n public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {\n LogUtils.e(mTag, \"exceptionCaught, case\" + cause.toString());\n\n StackTraceElement[] stackElements = cause.getStackTrace();\n if (stackElements != null) {\n for (int i = 0; i < stackElements.length; i++) {\n LogUtils.e(mTag, \" \" + stackElements[i]);\n }\n }\n }",
"@ExceptionHandler\n\tpublic ModelAndView resolveException(final HttpServletRequest request,\n\t\t\tfinal HttpServletResponse response, final Object handler,\n\t\t\tfinal Exception ex) {\n\n\t\tLookAndFeel lobjLyFBean = (LookAndFeel) request.getSession()\n\t\t\t\t.getAttribute(PARAMETRO_LOOK_AND_FIELD);\n\n\t\tthis.debug(\"°°Sucedio un error inesperado...\");\n\t\tthis.debug(\"°°Origen :\" + request.getRequestURL());\n\t\tthis.debug(\"°°HandlerError:\" + handler.getClass().getName());\n\t\tshowException(ex);\n\n\t\tString lstrPaginaException = \"\";\n\t\tString lstrContextPath = \"\";\n\t\tHashMap<String, String> lhsmParametros = new HashMap<String, String>();\n\n\t\tlhsmParametros.put(\"paginaError\", request.getRequestURL().toString());\n\t\tif (lobjLyFBean != null) {\n\t\t\tif (handler instanceof BusinessException) {\n\t\t\t\t// Pagina de error a mostrar cuando ocirre un error en los BO\n\t\t\t\tlstrPaginaException = lobjLyFBean.getPaginaExceptionArq();\n\t\t\t\tlhsmParametros.put(\"codeError\",\n\t\t\t\t\t\t((BusinessException) handler).getCode());\n\t\t\t} else {\n\t\t\t\t// Pagina de error a mostrar cuando ocirre un error en los\n\t\t\t\t// Controllers\n\t\t\t\tlstrPaginaException = lobjLyFBean.getPaginaExceptionGral();\n\t\t\t}\n\t\t}\n\t\tlstrContextPath = request.getContextPath();\n\t\tthis.debug(\"ContextPath :\" + lstrContextPath);\n\t\tthis.debug(\"Paginadestino :\" + lstrPaginaException);\n\t\tthis.debug(\"Se dirige a :\" + lstrContextPath + lstrPaginaException);\n\t\tthis.debug(\"Redirect :\" + \"redirect:/\" + lstrPaginaException);\n\n\t\treturn new ModelAndView(INSTRUCCION_REDIRECT + lstrPaginaException,\n\t\t\t\tlhsmParametros);\n\t}",
"@ExceptionHandler(InvalidTokenException.class)\n public void logInvalidTokenException(InvalidTokenException e) throws InvalidTokenException {\n securityLogger.logFatal(e.getMessage(), e);\n throw e;\n }",
"@Override\n public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {\n if (isQuiteException(cause)) {\n if (logger.isDebugEnabled()) {\n logger.debug(String.format(\"Channel:%s Error\", ctx.channel()), cause);\n }\n } else {\n logger.warn(PROTOCOL_FAILED_RESPONSE, \"\", \"\", String.format(\"Channel:%s Error\", ctx.channel()), cause);\n }\n ctx.close();\n }",
"private void configureRoutesAndExceptions() {\n\n }",
"IExceptionHandler createHandlerFor(java.lang.Class typeOfExceptionToHandle);",
"void innerError(@Nonnull Throwable ex) {\r\n\t\t\t\t\t\terror(ex);\r\n\t\t\t\t\t}",
"void innerError(@Nonnull Throwable ex) {\r\n\t\t\t\t\t\terror(ex);\r\n\t\t\t\t\t}",
"private static void logException(Throwable t\r\n ,String user\r\n ,HttpSession session\r\n ,Hashtable parameters\r\n ,PrintWriter out\r\n ,HttpServletRequest request\r\n ,HttpServletResponse response )\r\n {\n \tAppObjects.error(\"GlobalExceptionHandler\", \"\\n********************\");\r\n \tAppObjects.error(\"GlobalExceptionHandler\", \"Serving URL:%s\",ServletCompatibility.getRequestURL(request));\r\n \tAppObjects.error(\"GlobalExceptionHandler\", \"User is: %s\",user);\r\n \tAppObjects.error(\"GlobalExceptionHandler\", \"Parameters are: %s\",parameters);\r\n \tAppObjects.log(AppObjects.LOG_ERROR,t);\r\n }",
"@Override\n\t\tpublic void onException(Exception arg0) {\n\t\t\t\n\t\t}",
"private void handleException(java.lang.Throwable exception) {\n\t\tSystem.out.println(\"--------- UNCAUGHT EXCEPTION ---------\");\n\t\texception.printStackTrace(System.out);\n\t}",
"public static void handleException(final Exception ex)\n\t{\n\t\tSystem.out.println(ex.toString());\n\t\tex.printStackTrace();\n\t}",
"public abstract void onException(Exception e);",
"@ExceptionHandler(Exception.class)\n\tpublic ResponseEntity<Exception> batchException(Exception e) {\n\n\t\treturn new ResponseEntity<Exception>(e, HttpStatus.CONFLICT);\n\t}",
"public interface ExceptionHandler\n{\n \n /**\n * Process an Exception.\n */\n void handleException(Context context, Throwable exc);\n \n /**\n * Process an Exception with a descriptive String.\n */\n void handleException(Context context, Throwable exc, String description);\n\n}",
"public void onError(Request request, Throwable exception) {\n\t\t\t logger.severe(\"HTTP error occurred\");\n\t\t\t \tdeliveryPoint.onDeliveryProblem(letterBox, 0);\n\t\t\t }",
"@AfterThrowing(pointcut = \"controllerClassMethods()\", throwing = \"exception\")\n\tpublic void logAfterThrowingCall(JoinPoint joinPoint, SPFException exception) throws Throwable {\n\t\tSystem.out.println(\"--------------------------------------------------\");\n\t\tSystem.out.println(\"Esto es el @AfterThrowing de aspect\");\n\t\tSystem.out.println(\"--------------------------------------------------\");\n\t\tlog.error(\"Error [{}] Calling [{}]:[{}] returned error message : , [{}]\", exception.getHttpStatus(),\n\t\t\t\tjoinPoint.getSignature().getDeclaringTypeName(), joinPoint.getSignature().getName(),\n\t\t\t\texception.getMessage());\n\t}",
"@AfterThrowing(pointcut = \"execution(* com..*Service.*(..)) || execution(* com..*Controller.*(..)) || execution(* com..*Processor.*(..)) || execution(* com..*Reader.*(..)) || execution(* com..*Writer.*(..))\", throwing = \"e\")\n public void errorLoggingMethod(JoinPoint joinPoint, Throwable e) {\n logger.error(\"error did occur in : \" + joinPoint.getSignature().getName() + \" exception was \" + e.getMessage());\n }",
"@ExceptionHandler({IllegalArgumentException.class, NullPointerException.class, NumberFormatException.class, JSONException.class})\r\n\tpublic void handleBaseException(HttpServletResponse response) throws IOException {\r\n\t\tresponse.sendError(HttpStatus.BAD_REQUEST.value());\r\n\t}",
"public interface ExceptionHandler<T> {\n T handleException(Throwable e);\n}",
"public static void handleException(Exception e) {\n System.err.println(e.toString());\n }",
"@ExceptionHandler\n\tpublic final ResponseEntity<Object> handleTourIdException(TourIdException ex, WebRequest request){\n\t\tTourIdExceptionRes exceptionResponse = new TourIdExceptionRes(ex.getMessage());\n\t\t\treturn new ResponseEntity(exceptionResponse,HttpStatus.BAD_REQUEST);\n\t}",
"@ExceptionHandler(ResourceDoesNotExistException.class)\n\tpublic ResponseEntity<Object> handleResouceDoesNotExistException(Exception ex, WebRequest request){\n//\t\tString body = \"The resource does not exist. Please try with other parameter\";\n\t\tResponseError body = createResponseError(ex, HttpStatus.NOT_FOUND, HttpStatus.NOT_FOUND.toString(), \"ERROR_BUSINESS_EXCEPTION\");\n\t\treturn new ResponseEntity<Object>(body,HttpStatus.NOT_FOUND);\n\t}",
"@Override\n public void onException(Exception arg0) {\n }",
"public ExceptionControllerAdvice() {\n httpHeaders = getHeaders(WebConstants.TEXT_PLAIN_UTF8);\n }",
"protected abstract void onException(final Exception exception);",
"@Override\n\tpublic void exceptionCaught(ChannelHandlerContext ctx, Throwable cause)\n\t\t\tthrows Exception {\n\t\tsuper.exceptionCaught(ctx, cause);\n\t}",
"@ExceptionHandler(UserNotFoundException.class)\n public ResponseEntity<ErrorModel> handleUserNotFoundException(UserNotFoundException ex) {\n return new ResponseEntity<>(new ErrorModel(ex.getMessage()), HttpStatus.NOT_FOUND);\n }",
"@ExceptionHandler(UserException.class)\n\tpublic ResponseEntity<Problem> handleUserNotFoundException(UserException ex ,NativeWebRequest request) {\n\t\tlog.error(\"Cause : {} \", ex.getCause());\n\t\tProblemBuilder problemBuilder = Problem.builder()\n\t\t\t\t.withType(ex.getType())\n\t\t\t\t.withStatus(ex.getStatus())\n\t\t\t\t.withTitle(\"User not found\")\n\t\t\t\t.withDetail(ex.getLocalizedMessage())\n\t\t\t\t.withStatus(Status.NOT_FOUND);\n\t\treturn create(ex, problemBuilder.build(), request);\n\t}",
"@ExceptionHandler(IllegalArgumentException.class) //Tratando os paths/status que nao forem os que selecioanmos no porStauts.\n public String onError(){\n return \"redirect:/disciplina\";\n }"
]
| [
"0.6883083",
"0.6830526",
"0.64892614",
"0.6318724",
"0.61728543",
"0.61191356",
"0.61134034",
"0.60756654",
"0.6053579",
"0.6041973",
"0.60293627",
"0.6021848",
"0.5964343",
"0.59445316",
"0.59413356",
"0.5928739",
"0.5928462",
"0.59271884",
"0.591436",
"0.5912305",
"0.58935046",
"0.5843386",
"0.5786707",
"0.57534283",
"0.57461274",
"0.57295746",
"0.572727",
"0.5703529",
"0.5660289",
"0.565896",
"0.56470793",
"0.56424147",
"0.56389135",
"0.5634448",
"0.5633416",
"0.56175566",
"0.5606959",
"0.56001854",
"0.5590134",
"0.55863637",
"0.55833507",
"0.5562487",
"0.5560746",
"0.5555565",
"0.55491835",
"0.55454046",
"0.5528495",
"0.552817",
"0.5526553",
"0.5522766",
"0.5518384",
"0.55039626",
"0.55019736",
"0.5496668",
"0.5492548",
"0.54866964",
"0.54842085",
"0.5482494",
"0.5481869",
"0.5481001",
"0.54805726",
"0.54675895",
"0.54669243",
"0.5454566",
"0.54471797",
"0.5447035",
"0.54455894",
"0.544484",
"0.543716",
"0.5406391",
"0.5405639",
"0.54040056",
"0.53948146",
"0.53880197",
"0.5383757",
"0.53794074",
"0.53792316",
"0.53792316",
"0.5368477",
"0.5366881",
"0.5365739",
"0.5363954",
"0.5362938",
"0.53583366",
"0.535354",
"0.5348415",
"0.5341807",
"0.533938",
"0.5337603",
"0.53355706",
"0.5328288",
"0.5326036",
"0.53246045",
"0.5324475",
"0.53188765",
"0.53173864",
"0.53058434",
"0.52969486",
"0.52948505",
"0.52867126"
]
| 0.5957413 | 13 |
Make this a wrapping function Max f360.0 | min f0.0 | public void setDirection(double direction) {
if (direction <= MAX_DIRECTION && direction >= MIN_DIRECTION) {
this.direction = direction;
} else if (direction > MAX_DIRECTION) {
//this.direction = MIN_DIRECTION + (MAX_DIRECTION - direction);
this.direction %= MIN_DIRECTION ;
if (Double.isNaN(this.direction)) {
this.direction = MIN_DIRECTION;
}
} else if (direction < MIN_DIRECTION) {
//this.direction = MAX_DIRECTION - (MIN_DIRECTION + direction);
this.direction %= MAX_DIRECTION;
if (Double.isNaN(this.direction)) {
this.direction = MAX_DIRECTION;
}
} //else if (direction)
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public float maxSpeed();",
"public abstract float getMaxValue();",
"public float getMaximumFloat() {\n/* 266 */ return (float)this.max;\n/* */ }",
"public float getMaxValue();",
"float yMax();",
"float xMax();",
"int getMaxRotation();",
"public float maxTorque();",
"public float getMaxCY5();",
"private void m7218a(float f) {\n int[] g = m7231g();\n float max = Math.max((float) g[0], Math.min((float) g[1], f));\n if (Math.abs(((float) this.f5586f) - max) >= 2.0f) {\n int a = m7217a(this.f5587g, max, g, this.f5601w.computeVerticalScrollRange(), this.f5601w.computeVerticalScrollOffset(), this.f5600v);\n if (a != 0) {\n this.f5601w.scrollBy(0, a);\n }\n this.f5587g = max;\n }\n }",
"private static float m6542a(float f, float f2, float f3) {\n return Math.min(f2, Math.max(f, f3));\n }",
"float zMax();",
"public DynamicPart minMax(float min, float max) {\n return this.min(min).max(max);\n }",
"@Override\n\tpublic void playFunction(final GeoFunction f, final double min,\n\t\t\tfinal double max) {\n\t\ttry {\n\t\t\tstopCurrentSound();\n\t\t\tcurrentSoundType = SOUNDTYPE_FUNCTION;\n\t\t\tgetFunctionSound().playFunction(f, min, max);\n\t\t} catch (Exception e) {\n\t\t\tLog.error(\"Problem in playFunction(): \" + e.getMessage());\n\t\t}\n\t}",
"public void setMinAlturaCM(float max);",
"public float _getMax()\r\n {\r\n if (valueClass.equals(Float.class))\r\n {\r\n return (getMaximum() / max);\r\n } else\r\n {\r\n return getMaximum();\r\n }\r\n }",
"float getXStepMax();",
"private ChangeListener createMaxListener()\r\n\t\t{\r\n\t\treturn new ChangeListener()\r\n\t\t\t{\r\n\r\n\t\t\t//called when the max spinner value is changed\r\n\t\t\t@Override\r\n\t\t\tpublic void stateChanged(ChangeEvent e)\r\n\t\t\t\t{\r\n\t\t\t\tint spinMinValue = (int)spinMin.getValue();\r\n\t\t\t\tint spinMaxValue = (int)spinMax.getValue();\r\n\r\n\t\t\t\tif (spinMaxValue <= spinMinValue) { // verify if the max spin goes under the min limit and adjust the value if necessary\r\n\t\t\t\t\tif (--spinMinValue < min)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tspinMax.setValue(spinMaxValue = (spinMinValue=min)+1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\tspinMin.setValue(spinMinValue);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (spinMaxValue > spinMinValue) // verify intervals are correct\r\n\t\t\t\t\t{\r\n\t\t\t\t\tdiceBuilder.setInterval(spinMinValue, spinMaxValue);\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}",
"public ReversedLinearValueFunction(double min, double max) {\n if (min == max) {\n LOGGER.error(\n \"The upper bound is equal to the lower bound in the constructor of the\"\n + \" LinearValueFunction.\");\n throw new IllegalArgumentException(\"The upper bound can't be equal to the lower bound.\");\n }\n interval = Range.closed(min, max);\n LOGGER.info(\n \"The interval [{}, {}] has been set with success in the LinearValueFunction class.\",\n min,\n max);\n }",
"public static float clamp(float min, float max, float val) {\n return (val < min) ? min : (val > max) ? max : val;\n }",
"public float getMaxCY3();",
"private double clamp(double v, double min, double max) { return (v < min ? min : (v > max ? max : v)); }",
"public float nextFloat(float min, float max){\r\n\t\treturn (max-min)*nextFloat()+min;\r\n\t}",
"@Test\n\tpublic void float1() {\n\t\tfloat actualValue = Maximum.getmaximum1(12f,14f,15f);\n\t\tAssert.assertEquals(15,actualValue ,0);\n\t}",
"public E max() {\n\n }",
"private void setMaxWin(float maxwin)\n\t{\n\t\tif (Math.abs(maxwin) < 1.0f)\n\t\t{\n\t\t\tif (maxwin > _minwin)\n\t\t\t{\n\t\t\t\t_maxwin = Math.abs(maxwin);\t\n\t\t\t}\n\t\t}\n\t}",
"public void param_value_max_SET(float src)\n { set_bytes(Float.floatToIntBits(src) & -1L, 4, data, 17); }",
"public int getMaxFloor();",
"private static float fromSlider(int v){ return (float)((v-50)/50.0*Utils.MAXI_VALUE); }",
"public void clamp(double min, double max) {\n\n\t\tr = Math.max(Math.min(r, max), min);\n\t\tg = Math.max(Math.min(g, max), min);\n\t\tb = Math.max(Math.min(b, max), min);\n\n\t}",
"public static float max(float... fValues) {\n float result = Float.NEGATIVE_INFINITY;\n for (float value : fValues) {\n if (value > result) {\n result = value;\n }\n }\n\n return result;\n }",
"double getMax();",
"double getMax();",
"public DynamicPart max(float max) {\n this.max = max;\n return this;\n }",
"public void camera360() {\n\n }",
"float limit(float powerValue, double currentPos, double lowerLimit, double upperLimit)\n {\n if (currentPos > upperLimit)\n {\n if (powerValue > 0)\n {\n powerValue = 0;\n }\n }\n\n if (currentPos < lowerLimit)\n {\n if (powerValue < 0)\n {\n powerValue = 0;\n }\n }\n\n return powerValue;\n }",
"public float getMinimumFloat() {\n/* 212 */ return (float)this.min;\n/* */ }",
"public void _setMax(float max)\r\n {\r\n if (valueClass.equals(Float.class))\r\n {\r\n setMaximum((int) (max * 100));\r\n } else\r\n {\r\n setMaximum((int) max);\r\n }\r\n }",
"void mo56155a(float f);",
"int getMinRotation();",
"protected void calcMinMax() {\n }",
"public void setMaximumAir ( int ticks ) {\n\t\texecute ( handle -> handle.setMaximumAir ( ticks ) );\n\t}",
"private void m23260f() {\n Shimmer aVar;\n Shader shader;\n Rect bounds = getBounds();\n int width = bounds.width();\n int height = bounds.height();\n if (width != 0 && height != 0 && (aVar = this.f19138f) != null) {\n int a = aVar.mo28981a(width);\n int b = this.f19138f.mo28983b(height);\n boolean z = true;\n if (this.f19138f.f19117g != 1) {\n if (!(this.f19138f.f19114d == 1 || this.f19138f.f19114d == 3)) {\n z = false;\n }\n if (z) {\n a = 0;\n }\n if (!z) {\n b = 0;\n }\n shader = new LinearGradient(0.0f, 0.0f, (float) a, (float) b, this.f19138f.f19112b, this.f19138f.f19111a, Shader.TileMode.CLAMP);\n } else {\n shader = new RadialGradient(((float) a) / 2.0f, ((float) b) / 2.0f, (float) (((double) Math.max(a, b)) / Math.sqrt(2.0d)), this.f19138f.f19112b, this.f19138f.f19111a, Shader.TileMode.CLAMP);\n }\n this.f19134b.setShader(shader);\n }\n }",
"public static float clamp(float fValue, float maxMagnitude) {\n assert Validate.nonNegative(maxMagnitude, \"limit\");\n float result = FastMath.clamp(fValue, -maxMagnitude, maxMagnitude);\n\n assert result >= -maxMagnitude : result;\n assert result <= maxMagnitude : result;\n return result;\n }",
"private float m87313a(float f) {\n float max = Math.max(0.0f, Math.min(this.f61212e + f, (float) (this.f61213f + this.f61214g)));\n float f2 = this.f61212e;\n if (max == f2) {\n return 0.0f;\n }\n float f3 = max - f2;\n int childCount = getChildCount();\n for (int i = 0; i < childCount; i++) {\n View childAt = getChildAt(i);\n if (!((C17366a) childAt.getLayoutParams()).f61235b) {\n childAt.offsetTopAndBottom((int) f3);\n }\n }\n int i2 = (this.f61212e > 0.0f ? 1 : (this.f61212e == 0.0f ? 0 : -1));\n this.f61212e = max;\n this.f61215h = (int) (((float) this.f61215h) + f3);\n int i3 = (max > 0.0f ? 1 : (max == 0.0f ? 0 : -1));\n ViewCompat.postInvalidateOnAnimation(this);\n AbstractC17368c cVar = this.f61224q;\n if (cVar != null) {\n cVar.mo84656a(max);\n }\n return f3;\n }",
"public void setMaxAlturaCM(float max);",
"public abstract Vector4fc max(IVector4f v);",
"public T max();",
"Double getMaximumValue();",
"float zMin();",
"public AdornmentTypeRange(final float min, final float max) {\n\t\tthis.maxFloat = max;\n\t\tthis.minFloat = min;\n\t}",
"long mo30295f();",
"float yMin();",
"@Raw\n private void setMaxVelocity(double max){\n \tif (!isValidMaxVelocity(max)) this.maxVelocity = SPEED_OF_LIGHT;\n \telse this.maxVelocity = max;\n }",
"public float getMinValue();",
"float xMin();",
"@Override\n public boolean isMaximum(){\n return super.isMaximum() || speciallyMaximized;\n }",
"private void m7223b(float f) {\n int[] h = m7232h();\n float max = Math.max((float) h[0], Math.min((float) h[1], f));\n if (Math.abs(((float) this.f5589i) - max) >= 2.0f) {\n int a = m7217a(this.f5590j, max, h, this.f5601w.computeHorizontalScrollRange(), this.f5601w.computeHorizontalScrollOffset(), this.f5599u);\n if (a != 0) {\n this.f5601w.scrollBy(a, 0);\n }\n this.f5590j = max;\n }\n }",
"void mo9695a(float f, float f2, float f3, float f4, float f5);",
"@Override public void setMinMax(float minValue, float maxValue) {\n this.valueTrack.min = minValue; this.valueTrack.max = maxValue;\n }",
"private <T extends TType> void createAdamaxSlot(Output<T> v) {\n Operand<T> firstMomentInitializer =\n tf.fill(tf.shape(v), tf.dtypes.cast(tf.constant(0.0f), v.type()));\n createSlot(v.asOutput(), FIRST_MOMENT, firstMomentInitializer);\n Operand<T> secondMomentInitializer =\n tf.fill(tf.shape(v), tf.dtypes.cast(tf.constant(0.0f), v.type()));\n createSlot(v.asOutput(), SECOND_MOMENT, secondMomentInitializer);\n }",
"ReadOnlyDoubleProperty maximumProperty();",
"public float getMax() {\n/* 3085 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public void setMaxRotationVel(float maxVel, int xform) {\n\t\tm_xforms[xform].m_maxRotationVel = maxVel;\n\t}",
"private static final float enforceBounds( float f ) {\n if ( f >= 0f ) {\n if ( f <= 1f ) {\n return f;\n }\n else {\n return 1f;\n }\n }\n else {\n return 0f;\n }\n }",
"@Override\n public void getLocalBounds(Vector3 min, Vector3 max) {\n\n // Maximum bounds\n max.setX(radius + margin);\n max.setY(halfHeight + margin);\n max.setZ(max.getX());\n\n // Minimum bounds\n min.setX(-max.getX());\n min.setY(-max.getY());\n min.setZ(min.getX());\n }",
"public void mo30757a(float f, int i, int i2, int i3) {\n float max = (float) Math.max(i, 0);\n float f2 = (((float) this.f20583s) - (this.f20591B * 2.0f)) - ((float) this.f20606Q);\n if (max > f2) {\n max = f2;\n }\n this.f20605P = max;\n postInvalidate();\n }",
"public static float createRandomf(float min, float max){\n\t\tif (min == max){\n\t\t\treturn min;\n\t\t}\n\t\telse{\n\t\t\t//get new random generator (with new seed)\n\t\t\tRandom rand = new Random();\n\t\t\t//get random number.\n\t\t\treturn rand.nextFloat() * (max -min) + min;\n\t\t}\n\t}",
"@JSProperty(\"max\")\n void setMax(double value);",
"void mo34547J(float f, float f2);",
"@Test\r\n\tpublic void calculLostPointsByOneRuleBetweenMaxMinTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculLostPointsByOneRule(new ModelValue(1f, 0.5f, 4f), new Integer(3)),\r\n\t\t\t\tnew Float(1.5));\r\n\t}",
"E maxVal();",
"public static float gh_set_max_speed(float max_speed) {\n\t\t gh_max_speed = Math.min(Math.abs(max_speed), 100.0f);\n\t\t gh_max_speed_int = BFP_OF_REAL(gh_max_speed, GH_MAX_SPEED_REF_FRAC);\n\t\t return gh_max_speed;\n\t }",
"public static void main(String[] args) {\n RotateFunction a = new RotateFunction();\n System.out.println(\"Expected output: 26 Output: \" + a.maxRotationMultiplier(new int[]{4, 3, 2, 6}));\n System.out.println(\"Expected output: 0 Output: \" + a.maxRotationMultiplier(new int[]{}));\n System.out.println(\"Expected output: -1 Output: \" + a.maxRotationMultiplier(null));\n }",
"public int GetMaxVal();",
"public JTensor clamp(JType minValue, JType maxValue) {\n JTensor r = new JTensor();\n TH.THTensor_(clamp)(r, this, minValue, maxValue);\n return r;\n }",
"void mo84656a(float f);",
"public void initMaxMin(){\n\t\tmax = dja.max();\n\t\tmin = dja.min();\n\t}",
"void mo9694a(float f, float f2);",
"public float minTorque();",
"@JSProperty(\"maxRange\")\n void setMaxRange(double value);",
"public Float getT1B11Fmax() {\r\n return t1B11Fmax;\r\n }",
"AngleSmaller createAngleSmaller();",
"public double clamp(double num, double max, double min){\n \t\tif(num < min){return min;}else if(num > max){return max;}else{return num;}\n \t}",
"static double transform(int f) {\n return (5.0 / 9.0 * (f - 32));\n\n }",
"Limits limits();",
"private float m80085a() {\n ViewConfiguration mViewConfiguration = this.f64325a.getMViewConfiguration();\n C7573i.m23582a((Object) mViewConfiguration, \"mViewConfiguration\");\n return (float) mViewConfiguration.getScaledMaximumFlingVelocity();\n }",
"private ChangeListener createMinListener()\r\n\t\t{\r\n\t\treturn new ChangeListener()\r\n\t\t\t{\r\n\r\n\t\t\t//called when the min spinner value is changed\r\n\t\t\t@Override\r\n\t\t\tpublic void stateChanged(ChangeEvent e)\r\n\t\t\t\t{\r\n\t\t\t\tint spinMinValue = (int)spinMin.getValue();\r\n\t\t\t\tint spinMaxValue = (int)spinMax.getValue();\r\n\r\n\t\t\t\tif (spinMinValue >= spinMaxValue) { // verify if the min spin goes upper the max limit and adjust the value if necessary\r\n\t\t\t\t\tif (++spinMaxValue > max)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tspinMin.setValue(spinMinValue = (spinMaxValue=max)-1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\tspinMax.setValue(spinMaxValue);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (spinMaxValue > spinMinValue) // verify intervals are correct\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdiceBuilder.setInterval(spinMinValue, spinMaxValue);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t};\r\n\t\t}",
"public int getMaxFlyingSpeed() {\r\n\t\treturn this.maxFlyingSpeed;\r\n\t}",
"private void setMax(int max) { this.max = new SimplePosition(false,false,max); }",
"public RangeRandom(final float min, final float max) {\n this.max = max;\n this.min = min;\n this.random = new Random(System.nanoTime());\n }",
"private JSlider erstelleSchieberegler(int minimum, int maximum) {\r\n\t\tJSlider schieberegler = new JSlider(minimum, maximum);\r\n\t\tschieberegler.setPaintLabels(true);\r\n\t\tschieberegler.setPaintTicks(true);\r\n\t\tschieberegler.setMajorTickSpacing(1);\r\n\t\treturn schieberegler;\r\n\t}",
"@JSProperty(\"max\")\n double getMax();",
"public double getLimitingMag ( ) {\r\n\t\treturn limiting_mag;\r\n\t}",
"public void setMaxFloat(final float maxFloat) {\n\t\tthis.maxFloat = maxFloat;\n\t}",
"AngleGreater createAngleGreater();",
"public Flt(float f) {this.f = new Float(f);}",
"private void m3937a(float f, int i) {\n m3945n(Math.max(Math.round(f * ((float) this.f3120I)), i));\n }",
"public double getRotMax() {\n\t\treturn rotMax;\n\t}",
"public abstract int mo64140f();",
"private int clamp(int val, int min, int max){\n\t\tif(val > max){\n\t\t\tval = max;\n\t\t}\n\t\telse if(val < min){\n\t\t\tval = min;\n\t\t}\n\t\treturn val;\n\t}"
]
| [
"0.59487325",
"0.58498496",
"0.58296716",
"0.57771164",
"0.55537283",
"0.5551983",
"0.55275095",
"0.5501941",
"0.5466339",
"0.5441588",
"0.54292846",
"0.5404494",
"0.5376246",
"0.5333804",
"0.53057724",
"0.525963",
"0.52530676",
"0.52474874",
"0.5233472",
"0.52286804",
"0.5178211",
"0.51354665",
"0.51187205",
"0.5113965",
"0.511054",
"0.511015",
"0.50945866",
"0.508093",
"0.5080411",
"0.50739825",
"0.50735337",
"0.5071615",
"0.5071615",
"0.504675",
"0.50396055",
"0.5023285",
"0.5017345",
"0.5015966",
"0.50156134",
"0.5014532",
"0.5010718",
"0.50098157",
"0.5004747",
"0.49957475",
"0.49936432",
"0.4986256",
"0.49795324",
"0.49783158",
"0.49765107",
"0.49698478",
"0.49627873",
"0.49433392",
"0.4939072",
"0.4936083",
"0.49290693",
"0.49252063",
"0.49251443",
"0.49248618",
"0.4924536",
"0.49214625",
"0.49211088",
"0.49204302",
"0.49198395",
"0.4907727",
"0.49063492",
"0.48985985",
"0.48945063",
"0.4888987",
"0.48850217",
"0.48825946",
"0.48792323",
"0.4878856",
"0.48783022",
"0.48761684",
"0.4861185",
"0.48571",
"0.48518872",
"0.48459005",
"0.48447964",
"0.48433173",
"0.4839662",
"0.48354915",
"0.48354685",
"0.4832566",
"0.48321053",
"0.48288047",
"0.4827212",
"0.4826659",
"0.48256278",
"0.4813381",
"0.48081633",
"0.48040357",
"0.48002937",
"0.47987467",
"0.4796544",
"0.47949225",
"0.47941554",
"0.47941443",
"0.4787941",
"0.4786436",
"0.4785513"
]
| 0.0 | -1 |
metoda za dohvacanje poruke i spremanje u listu | public void dohvatiJMSPorukuISpremiUListu(JMSPoruka poruka){
listaJMSPoruka.add(poruka);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void obrniListu() {\n if (prvi != null && prvi.veza != null) {\n Element preth = null;\n Element tek = prvi;\n \n while (tek != null) {\n Element sled = tek.veza;\n \n tek.veza = preth;\n preth = tek;\n tek = sled;\n }\n prvi = preth;\n }\n }",
"public void skratiListu() {\n if (!jePrazna()) {\n int n = Svetovid.in.readInt(\"Unesite broj elemenata za skracivanje: \");\n obrniListu(); //Zato sto se trazi odsecanje poslednjih n elemenata\n while (prvi != null && n > 0) {\n prvi = prvi.veza;\n n--;\n }\n obrniListu(); //Vraca listu u prvobitni redosled\n }\n }",
"public ListaPracownikow() {\n generujPracownikow();\n //dodajPracownika();\n }",
"public void listar() {\n\t\t\n\t}",
"@Override\n\tpublic ArrayList<Lista> listaListeElettorali() {\n\t\t\t\n\t\t\t\n\t\t\tDB db = getDB();\n\t\t\tMap<Integer, Lista> map = db.getTreeMap(\"liste\");\n\t\t\tArrayList<Lista> liste = new ArrayList<Lista>();\n\t\t\tSet<Integer> keys = map.keySet();\n\t\t\tfor (int key : keys) {\n\t\t\t\tliste.add(map.get(key));\n\t\t\t}\n\t\n\t\t\treturn liste;\n\t\t\t\n\t\t}",
"public void ouvrirListe(){\n\t\n}",
"private void ucitajPodatke() {\n \n DefaultListModel<Voznja> m = new DefaultListModel<>();\n obrada.getPodaci().forEach(s->m.addElement(s));\n lstPodaci.setModel(m);\n\n }",
"private void listViewPendentes(List<Compra> listAll) {\n\t\t\n\t}",
"List<ParqueaderoEntidad> listar();",
"public ListaDuplamenteEncadeada(){\r\n\t\t\r\n\t}",
"public List<Vendedor> listarVendedor();",
"private void caricaLista() {\n /** variabili e costanti locali di lavoro */\n ArrayList unaLista = null;\n CampoDati unCampoDati = null;\n CDBLinkato unCampoDBLinkato = null;\n //@todo da cancellare\n try { // prova ad eseguire il codice\n /* recupera il campo DB specializzato */\n unCampoDBLinkato = (CDBLinkato)unCampoParente.getCampoDB();\n\n /* recupera la lista dal campo DB */\n unaLista = unCampoDBLinkato.caricaLista();\n\n /* recupera il campo dati */\n unCampoDati = unCampoParente.getCampoDati();\n\n /* registra i valori nel modello dei dati del campo */\n if (unaLista != null) {\n unCampoDati.setValoriInterni(unaLista);\n// unCampoDatiElenco.regolaElementiAggiuntivi();\n } /* fine del blocco if */\n\n } catch (Exception unErrore) { // intercetta l'errore\n /* mostra il messaggio di errore */\n Errore.crea(unErrore);\n } /* fine del blocco try-catch */\n\n }",
"void listarDadosNaTelaAutor(ArrayList<Autor> lista, DefaultTableModel model) {\n model.setNumRows(0);\n //Correr o ArrayList\n for (int pos = 0; pos < lista.size(); pos++) {\n String[] linha = new String[2];\n Autor aux = lista.get(pos);\n linha[0] = \"\"+aux.getId();\n linha[1] = aux.getNome();\n model.addRow(linha);\n }\n }",
"public void listar(){\r\n // Verifica si la lista contiene elementoa.\r\n if (!esVacia()) {\r\n // Crea una copia de la lista.\r\n Nodo aux = inicio;\r\n // Posicion de los elementos de la lista.\r\n int i = 0;\r\n // Recorre la lista hasta el final.\r\n while(aux != null){\r\n // Imprime en pantalla el valor del nodo.\r\n System.out.print(i + \".[ \" + aux.getValor() + \" ]\" + \" -> \");\r\n // Avanza al siguiente nodo.\r\n aux = aux.getSiguiente();\r\n // Incrementa el contador de la posión.\r\n i++;\r\n }\r\n }\r\n }",
"private void listar() throws Exception{\n int resId=1;\n List<PlatoDia> lista = this.servicioRestaurante.listarMenuDia(resId);\n this.modelListEspecial.clear();\n lista.forEach(lse -> {\n this.modelListEspecial.addElement(\"ID: \" + lse.getId() \n + \" NOMBRE: \" + lse.getNombre()\n + \" DESCRIPCION: \" + lse.getDescripcion()\n + \" PRECIO: \" + lse.getPrecio()\n + \" ENTRADA: \"+lse.getEntrada() \n + \" PRINCIPIO: \"+lse.getPrincipio()\n + \" CARNE: \"+lse.getCarne()\n + \" BEBIDA: \"+lse.getBebida()\n + \" DIA: \"+lse.getDiaSemana());\n });\n }",
"private void listarItems() {\r\n // Cabecera\r\n System.out.println(\"Listado de Items\");\r\n System.out.println(\"================\");\r\n\r\n // Criterio de Ordenación/Filtrado\r\n System.out.printf(\"Criterio de Ordenación .: %S%n\", criOrd.getNombre());\r\n System.out.printf(\"Criterio de Filtrado ...: %S%n\", criFil.getNombre());\r\n\r\n // Separados\r\n System.out.println(\"---\");\r\n\r\n // Filtrado > Selección Colección\r\n List<Item> lista = criFil.equals(Criterio.NINGUNO) ? CARRITO : FILTRO;\r\n\r\n // Recorrido Colección\r\n for (Item item : lista) {\r\n System.out.println(item.toString());\r\n }\r\n\r\n // Pausai\r\n UtilesEntrada.hacerPausa();\r\n }",
"public void listar() {\n\n if (!vacia()) {\n\n NodoEnteroSimple temp = head;\n\n int i = 0;\n\n while (temp != null) {\n\n System.out.print(i + \".[ \" + temp.getValor() + \" ]\" + \" -> \");\n\n temp = temp.getSiguiente();\n\n i++;\n }\n }\n \n }",
"List<Vehiculo>listar();",
"public List<Mobibus> darMobibus();",
"Object getTolist();",
"public void GetVehiculos() {\n String A = \"&LOCATION=POR_ENTREGAR\";\n String Pahtxml = \"\";\n \n try {\n \n DefaultListModel L1 = new DefaultListModel();\n Pahtxml = Aso.SendGetPlacas(A);\n Lsvehiculo = Aso.Leerxmlpapa(Pahtxml);\n Lsvehiculo.forEach((veh) -> {\n System.out.println(\"Placa : \" + veh.Placa);\n L1.addElement(veh.Placa);\n });\n \n Lista.setModel(L1);\n \n } catch (Exception ex) {\n Logger.getLogger(Entrega.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }",
"public String listViaje() {\n\t\t\t//resetForm();\n\t\t\treturn \"/boleta/list.xhtml\";\t\n\t\t}",
"public void listarProvincia() {\n provincias = JPAFactoryDAO.getFactory().getProvinciaDAO().find();\n// for(int i=0;i<provincias.size();i++ ){\n// System.out.println(\"lista:\"+provincias.get(i).getNombreprovincia());\n// }\n }",
"@Override\n public void HienThiDanhSach(List<DienTu> listdienTu) {\n\n }",
"void listarDadosNaTelaLivro(ArrayList<Livro> lista,DefaultTableModel model ) throws Exception {\n \n model.setNumRows(0);\n //Correr o ArrayList\n for (int pos = 0; pos < lista.size(); pos++) {\n String[] linha = new String[7];\n Livro aux = lista.get(pos);\n linha[0] = \"\"+aux.getId();\n linha[1] = \"\"+editora.recuperar(aux.getIdEditora());\n linha[2] = \"\"+autor.recuperar(aux.getIdAutor());\n linha[3] = \"\"+areaDeConhecimento.recuperar(aux.getIdAreaDeConhecimento());\n linha[4] = aux.getTituloDoLivro();\n linha[5] = \"\"+aux.getIsbn();\n model.addRow(linha);\n }\n }",
"public void listar(){\n if (!esVacia()) {\n // Crea una copia de la lista.\n NodoEmpleado aux = inicio;\n // Posicion de los elementos de la lista.\n int i = 0;\n System.out.print(\"-> \");\n // Recorre la lista hasta llegar nuevamente al incio de la lista.\n do{\n // Imprime en pantalla el valor del nodo.\n System.out.print(i + \".[ \" + aux.getEmpleado() + \" ]\" + \" -> \");\n // Avanza al siguiente nodo.\n aux = aux.getSiguiente();\n // Incrementa el contador de la posi�n.\n i++;\n }while(aux != inicio);\n }\n }",
"void listarDadosNaTelaColaborador(ArrayList<Colaborador> lista,DefaultTableModel model ) {\n model.setNumRows(0);\n //Correr o ArrayList\n for (int pos = 0; pos < lista.size(); pos++) {\n String[] linha = new String[9];\n Colaborador aux = lista.get(pos);\n linha[0] = \"\"+aux.getId();\n linha[1] = \"\"+aux.getMatricula();\n linha[2] = aux.getNome();\n linha[3] = \"\"+aux.getNumeroOAB();\n linha[4] = \"\"+aux.getCpf();\n linha[5] = aux.getEmail();\n linha[6] = \"\"+aux.getTelefone();\n linha[7] = aux.getTipo().toString();\n linha[8] = aux.getStatus().toString();\n model.addRow(linha);\n }\n }",
"private void carregaLista() {\n listagem = (ListView) findViewById(R.id.lst_cadastrados);\n dbhelper = new DBHelper(this);\n UsuarioDAO dao = new UsuarioDAO(dbhelper);\n //Preenche a lista com os dados do banco\n List<Usuarios> usuarios = dao.buscaUsuarios();\n dbhelper.close();\n UsuarioAdapter adapter = new UsuarioAdapter(this, usuarios);\n listagem.setAdapter(adapter);\n }",
"public void obtenerLista(){\n listaInformacion = new ArrayList<>();\n for (int i = 0; i < listaPersonales.size(); i++){\n listaInformacion.add(listaPersonales.get(i).getId() + \" - \" + listaPersonales.get(i).getNombre());\n }\n }",
"public void MostrarListas (){\n Nodo recorrer=inicio; // esto sirve para que el elemento de la lista vaya recorriendo conforme se inserta un elemento\r\n System.out.println(); // esto nos sirve para dar espacio a la codificacion de la lista al imprimir \r\n while (recorrer!=null){ // esta secuencia iterativa nos sirve para repetir las opciones del menu\r\n System.out.print(\"[\" + recorrer.dato +\"]--->\");\r\n recorrer=recorrer.siguiente;\r\n }\r\n }",
"public List<Fortaleza> listarFortalezas(){\r\n return cVista.listarFortalezas();\r\n }",
"private void listarDadosNaTelaEditora(ArrayList<Editora> lista) {\n DefaultTableModel modelEditoras = (DefaultTableModel) jTable_tabelaEditoras.getModel();\n jTable_tabelaEditoras.setRowSorter(new TableRowSorter(modelEditoras));\n //Limpando a tela\n modelEditoras.setNumRows(0);\n //Correr o ArrayList\n for (int pos = 0; pos < lista.size(); pos++) {\n String[] linha = new String[2];\n Editora aux = lista.get(pos);\n linha[0] = \"\"+aux.getId();\n linha[1] = aux.getNome();\n modelEditoras.addRow(linha);\n }\n }",
"public void mostrarLista() {\n\n Nodo recorrer = temp;\n while (recorrer != null) {\n\n System.out.println(\"[ \" + recorrer.getDato() + \"]\");\n recorrer = recorrer.getSiguiente();\n\n }\n\n }",
"public String prikaziListu() {\r\n\t\treturn SOPrikazListe.izvrsi(lista.vratiRangListu(), lista.brRezultata);\r\n\t}",
"@Override\n\tpublic List<Estadoitem> listar() {\n\t\treturn estaitemdao.listar();\n\t}",
"private void getUserList() {\n // GET ENTRIES FROM DB AND TURN THEM INTO LIST \n DefaultListModel listModel = new DefaultListModel();\n Iterator itr = DBHandler.getListOfObjects(\"FROM DBUser ORDER BY xname\");\n while (itr.hasNext()) {\n DBUser user = (DBUser) itr.next();\n listModel.addElement(user.getUserLogin());\n }\n // SET THIS LIST FOR INDEX OF ENTRIES\n userList.setModel(listModel);\n }",
"public void Lista(){\n\t\tcabeza = null;\n\t\ttamanio = 0;\n\t}",
"List<Plaza> consultarPlazas();",
"public void afficherListe(){\n StringBuilder liste = new StringBuilder(\"\\n\");\n logger.info(\"OUTPUT\",\"\\nLes produits en vente sont:\");\n for (Aliment aliment : this.productList) { liste.append(\"\\t\").append(aliment).append(\"\\n\"); }\n logger.info(\"OUTPUT\", liste+\"\\n\");\n }",
"public void listarEquipamentos() {\n \n \n List<Equipamento> formandos =new EquipamentoJpaController().findEquipamentoEntities();\n \n DefaultTableModel tbm=(DefaultTableModel) listadeEquipamento.getModel();\n \n for (int i = tbm.getRowCount()-1; i >= 0; i--) {\n tbm.removeRow(i);\n }\n int i=0;\n for (Equipamento f : formandos) {\n tbm.addRow(new String[1]);\n \n listadeEquipamento.setValueAt(f.getIdequipamento(), i, 0);\n listadeEquipamento.setValueAt(f.getEquipamento(), i, 1);\n \n i++;\n }\n \n \n \n }",
"public void Listar() {\n try {\n ApelacionesDao apelacionesDao = new ApelacionesDao();\n this.listaApelaciones.clear();\n setListaApelaciones(apelacionesDao.cargaApelaciones());\n } catch (ExceptionConnection ex) {\n Logger.getLogger(ApelacionController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"private List<Pelicula> getLista() {\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"dd-MM-yyyy\");\n\t\tList<Pelicula> lista = null;\n\t\ttry {\n\t\t\tlista = new LinkedList<>();\n\n\t\t\tPelicula pelicula1 = new Pelicula();\n\t\t\tpelicula1.setId(1);\n\t\t\tpelicula1.setTitulo(\"Power Rangers\");\n\t\t\tpelicula1.setDuracion(120);\n\t\t\tpelicula1.setClasificacion(\"B\");\n\t\t\tpelicula1.setGenero(\"Aventura\");\n\t\t\tpelicula1.setFechaEstreno(formatter.parse(\"02-05-2017\"));\n\t\t\t// imagen=\"cinema.png\"\n\t\t\t// estatus=\"Activa\"\n\n\t\t\tPelicula pelicula2 = new Pelicula();\n\t\t\tpelicula2.setId(2);\n\t\t\tpelicula2.setTitulo(\"La bella y la bestia\");\n\t\t\tpelicula2.setDuracion(132);\n\t\t\tpelicula2.setClasificacion(\"A\");\n\t\t\tpelicula2.setGenero(\"Infantil\");\n\t\t\tpelicula2.setFechaEstreno(formatter.parse(\"20-05-2017\"));\n\t\t\tpelicula2.setImagen(\"bella.png\"); // Nombre del archivo de imagen\n\n\t\t\tPelicula pelicula3 = new Pelicula();\n\t\t\tpelicula3.setId(3);\n\t\t\tpelicula3.setTitulo(\"Contratiempo\");\n\t\t\tpelicula3.setDuracion(106);\n\t\t\tpelicula3.setClasificacion(\"B\");\n\t\t\tpelicula3.setGenero(\"Thriller\");\n\t\t\tpelicula3.setFechaEstreno(formatter.parse(\"28-05-2017\"));\n\t\t\tpelicula3.setImagen(\"contratiempo.png\"); // Nombre del archivo de imagen\n\n\t\t\tPelicula pelicula4 = new Pelicula();\n\t\t\tpelicula4.setId(4);\n\t\t\tpelicula4.setTitulo(\"Kong La Isla Calavera\");\n\t\t\tpelicula4.setDuracion(118);\n\t\t\tpelicula4.setClasificacion(\"B\");\n\t\t\tpelicula4.setGenero(\"Accion y Aventura\");\n\t\t\tpelicula4.setFechaEstreno(formatter.parse(\"06-06-2017\"));\n\t\t\tpelicula4.setImagen(\"kong.png\"); // Nombre del archivo de imagen\n\t\t\tpelicula4.setEstatus(\"Inactiva\"); // Esta pelicula estara inactiva\n\t\t\t\n\t\t\t// Agregamos los objetos Pelicula a la lista\n\t\t\tlista.add(pelicula1);\n\t\t\tlista.add(pelicula2);\n\t\t\tlista.add(pelicula3);\n\t\t\tlista.add(pelicula4);\n\n\t\t\treturn lista;\n\t\t} catch (ParseException e) {\n\t\t\tSystem.out.println(\"Error: \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}",
"public void listarDadosNaTelaAreaDeConhecimento(ArrayList<AreaDeConhecimento> lista, DefaultTableModel model) {\n model.setNumRows(0);\n //Correr o ArrayList\n for (int pos = 0; pos < lista.size(); pos++) {\n String[] linha = new String[3];\n AreaDeConhecimento aux = lista.get(pos);\n linha[0] = \"\" + aux.getId();\n linha[1]=aux.getClassificacaoDecimalDireito();\n linha[2] = aux.getDescricao();\n model.addRow(linha);\n }\n }",
"@SuppressWarnings(\"unchecked\")\t\r\n\t@Override\r\n\tpublic List<Distrito> listar() {\n\t\tList<Distrito> lista = new ArrayList<Distrito>();\r\n\t\tQuery q = em.createQuery(\"select m from Distrito m\");\r\n\t\tlista = (List<Distrito>) q.getResultList();\r\n\t\treturn lista;\r\n\t}",
"public List<New> list();",
"public List<Lv1p2> listar()\n {\n \n List<Lv1p2> lista = new ArrayList<Lv1p2>();\n String sql = \"SELECT * FROM lv1p2\";\n PreparedStatement pst = Conexao.getPreparedStatement(sql);\n \n try {\n //Executo o aql e jogo em um resultSet\n ResultSet res = pst.executeQuery();\n //Eqaunto tiver REGISTRO eu vou relacionar\n //com a minha classe Jogador e adicionar na lista \n while(res.next())\n {\n Lv1p2 lv1p2 = new Lv1p2();\n lv1p2.setLota_pro(res.getDouble(\"lota_pro\"));\n lv1p2.setUsuario_id(res.getInt(\"usuario_id\"));\n lv1p2.setVacadecria(res.getInt(\"vaca_de_cria\"));\n lv1p2.setVacadedescarte(res.getInt(\"vaca_de_descarte\"));\n lv1p2.setTerneiro(res.getInt(\"terneiro\"));\n lv1p2.setTerneira(res.getInt(\"terneira\"));\n lv1p2.setNovilho1324(res.getInt(\"novilho_13a24\"));\n lv1p2.setNovilha1324(res.getInt(\"novilha_13a24\"));\n lv1p2.setNovilho2536(res.getInt(\"novilho_25a36\"));\n lv1p2.setNovilha2536(res.getInt(\"novilha_25a36\"));\n lv1p2.setNovilho36(res.getInt(\"novilho_36\"));\n lv1p2.setTouro(res.getInt(\"touro\"));\n lv1p2.setRebanhodecria(res.getInt(\"rebanho_de_cria\"));\n lista.add(lv1p2);\n }\n } catch(SQLException ex){\n \n ex.printStackTrace();\n }\n return lista;\n }",
"public ArrayList<DanhMuc> getListDanhMucCha();",
"@Override\n\tpublic List<Cozinha> listar() { /* Cria uma Lista para buscar elementos da tabela Cozinha no banco */\n\t\treturn manager.createQuery(\"from Cozinha\", Cozinha.class) /*\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * Esta criando uma consulta com todo os elementos\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * que tem dentro de Cozinha\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t */\n\t\t\t\t.getResultList(); /* Está me retornando os Resultados da Lista Cozinha */\n\t}",
"private void genererListeView() {\n\n displayToast(\"Antall treff: \" + spisestedListe.size());\n\n //sorterer alfabetisk på navn\n Collections.sort(spisestedListe);\n\n spisestedAdapter = new SpisestedAdapter(this, spisestedListe);\n recyclerView.setAdapter(spisestedAdapter);\n\n //henter inn antall kolonner fra values, verdi 2 i landscape\n // https://stackoverflow.com/questions/29579811/changing-number-of-columns-with-gridlayoutmanager-and-recyclerview\n int columns = getResources().getInteger(R.integer.list_columns);\n recyclerView.setLayoutManager(new GridLayoutManager(this, columns));\n }",
"@Override\n\tpublic List selectList() {\n\t\t\n\t\t\n\t\t\n\t\treturn null;\n\t}",
"public ArrayList<KelasDicoding> getListKelas(){ return listKelas; }",
"public void getList() {\n\n\t\tFile opFile = new File(\"/home/bridgeit/Desktop/newfile.txt\");\n\t\ttry {\n\t\t\topFile.createNewFile();\n\t\t\tFileWriter fwriter = new FileWriter(opFile);\n\n\t\t\tfor (int i = 0; i < slist.size(); i++) {\n\n\t\t\t\tfwriter.append(slist.returnItem(i) + \" \");\n\n\t\t\t}\n\t\t\tfwriter.close();\n\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"@Override\n\tpublic List<Marca> listaporitem() {\n\t\treturn marcadao.listaporitem();\n\t}",
"public void updateList() \n { \n model.clear();\n for(int i = ScholarshipTask.repository.data.size() - 1; i >= 0; i--) \n {\n model.addElement(ScholarshipTask.repository.data.get(i));\n }\n }",
"private void loadLists() {\n }",
"List<Persona> obtenerTodasLasPersona();",
"public static List<ViajeEntidad> getListaViajesEntidad(){\n List<ViajeEntidad> viajes = new ArrayList<>();\n Date date = new Date();\n ViajeEntidadPK viajePK = new ViajeEntidadPK();\n TaxiEntidad taxiByPkPlacaTaxi = new TaxiEntidad();\n ClienteEntidad clienteByPkCorreoCliente = new ClienteEntidad();\n clienteByPkCorreoCliente.setPkCorreoUsuario(\"[email protected]\");\n TaxistaEntidad taxistaByCorreoTaxi = new TaxistaEntidad();\n taxistaByCorreoTaxi.setPkCorreoUsuario(\"[email protected]\");\n OperadorEntidad agendaOperador = new OperadorEntidad();\n agendaOperador.setPkCorreoUsuario(\"[email protected]\");\n\n viajePK.setPkPlacaTaxi(\"CCC11\");\n viajePK.setPkFechaInicio(\"2019-01-01 01:01:01\");\n viajes.add(new ViajeEntidad(viajePK, \"2019-01-01 02:01:01\",\"5000\", 2, \"origen\",\"destino\", \"agenda\", \"agenda2\", taxiByPkPlacaTaxi, clienteByPkCorreoCliente, taxistaByCorreoTaxi, agendaOperador));\n viajePK.setPkPlacaTaxi(\"DDD11\");\n viajes.add(new ViajeEntidad(viajePK, \"2019-01-01 02:01:01\",\"5000\", 2, \"origen\",\"destino\", \"agenda\", \"agenda2\", taxiByPkPlacaTaxi, clienteByPkCorreoCliente, taxistaByCorreoTaxi, agendaOperador));\n viajePK.setPkPlacaTaxi(\"EEE11\");\n viajes.add(new ViajeEntidad(viajePK, \"2019-01-01 02:01:01\",\"5000\", 2, \"origen\",\"destino\", \"agenda\", \"agenda2\", taxiByPkPlacaTaxi, clienteByPkCorreoCliente, taxistaByCorreoTaxi, agendaOperador));\n\n return viajes;\n }",
"@Override\n public void mostrarListadoEquipos(List<Equipo> equipos) {\n\n }",
"public void populerListView() {\n Turnering valgtTurnering;\n valgtTurnering = fp_kombo_turnering.getSelectionModel().getSelectedItem();\n valgtTurnering.hentParti();\n for (Parti p: valgtTurnering.hentParti()) {\n fp_liste_parti.getItems().add(p);\n }\n this.partierLastet = true;\n this.fp_knapp_velg_parti.setDisable(false);\n this.fp_knapp_søk_parti.setDisable(false);\n }",
"public void getAllItem (ArrayList<itemTodo> list){\n Cursor cursor = this.getReadableDatabase().rawQuery(\"select judul, deskripsi, priority from \"+nama_table,null);\n while (cursor.moveToNext()){\n list.add(new itemTodo(cursor.getString(0), cursor.getString(1), cursor.getString(2)));\n }\n }",
"public List getTrabajadores();",
"@Override\n public ArrayList<Zona> list(String description) {\n ArrayList<Zona> res = new ArrayList<>();\n conn = new Connector();\n conn.conectar();\n con = conn.getConexion();\n String list = \"SELECT id, name \"\n + \"FROM zone \"\n + \"WHERE concat(id,' ',name) like '%\"\n + description + \"%' \"\n + \"ORDER BY id DESC\";\n try {\n st = con.createStatement();\n \n rt = st.executeQuery(list);\n //mientras rt tenga datos se iterara\n while (rt.next()) {\n //accedes en el orden q espesificaste en el select rt.getInt(1) = id_user;\n res.add(new Zona(rt.getInt(1), rt.getString(2)));\n }\n System.out.println(\"Lista de zonas recuperadas correctamente\");\n conn.desconectar();\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, ex);\n }\n return res;\n }",
"private void AfficherListDesLivre(List<Livre> liv) {\n ListLivre.removeAll();\n\n while (model.getRowCount() > 0)\n model.removeRow(0);\n\n if(model.getColumnCount() == 0){\n model.addColumn(\"ID\");\n model.addColumn(\"Titre\");\n model.addColumn(\"Auteur\");\n }\n\n for(Livre L : liv){\n model.addRow(new Object[] { L.getIdLivre(),L.getNomLivre(),L.getAuteur() });\n }\n ListLivre.setModel(model); \n }",
"private void initList() {\n\n }",
"public void listarutilizador() {\n \n \n List<Utilizador> cs =new UtilizadorJpaController().findUtilizadorEntities();\n \n DefaultTableModel tbm=(DefaultTableModel) listadeutilizador.getModel();\n \n for (int i = tbm.getRowCount()-1; i >= 0; i--) {\n tbm.removeRow(i);\n }\n int i=0;\n for (Utilizador c : cs) {\n tbm.addRow(new String[1]);\n listadeutilizador.setValueAt(c.getIdutilizador(), i, 0);\n listadeutilizador.setValueAt(c.getNome(), i, 1);\n listadeutilizador.setValueAt(c.getUtilizador(), i, 2);\n listadeutilizador.setValueAt(c.getIdprevilegio().getPrevilegio(), i, 3);\n// listaderelatorio.setValueAt(f.getTotal(), i, 4);\n// Distrito di = new DistritoJpaController().getDistritoByLoc(f.getIdlocalidade());\n// Localidade lo = new LocalidadeJpaController().findLocalidade(f.getIdlocalidade());\n// listaderelatorio.setValueAt(di.getDistrito(), i, 0);//lo.getIdposto().getIddistrito().getDistrito(), i, 0);\n// listaderelatorio.setValueAt(lo.getLocalidade(), i, 1);\n \n//// listadeformando.setValueAt(f.getSexo(), i, 2);\n// listaderelatorio.setValueAt(f.getQhomem(), i, 2);\n// listaderelatorio.setValueAt(f.getQmulher(), i, 3);\n// listaderelatorio.setValueAt(f.getTotal(), i, 4);\n// \n// \n i++;\n }\n \n \n \n }",
"List<TipoHuella> listarTipoHuellas();",
"public abstract ObjectId[] prenota(List<T> listToAdd, ObjectId idVolo) throws FlightNotFoundException, SeatsSoldOutException;",
"public DaftarMhs_list(ArrayList<NamaMhs_Obj> list_data) {\n\n this.list_data = list_data;\n\n\n }",
"protected ProvinciaList() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}",
"public void mostrarLista(){\n Nodo recorrer = inicio;\n while(recorrer!=null){\n System.out.print(\"[\"+recorrer.edad+\"]-->\");\n recorrer=recorrer.siguiente;\n }\n System.out.println(recorrer);\n }",
"@Override\n public String toString() {\n return list.toString();\n }",
"@Override\n\tpublic List<Baidu> savaList(List<Baidu> bl) {\n\t\tbaiduDao.save(bl);\n\t\treturn bl;\n\t}",
"private void listarEntidades() {\r\n\t\tsetListEntidades(new ArrayList<EntidadDTO>());\r\n\t\tgetListEntidades().addAll(entidadController.encontrarTodos());\r\n\t\tif (!getListEntidades().isEmpty()) {\r\n\t\t\tfor (EntidadDTO entidadDTO : getListEntidades()) {\r\n\t\t\t\t// Conversión de decimales.\r\n\t\t\t\tDouble porcentaje = entidadDTO.getPorcentajeValorAsegurable() * 100;\r\n\t\t\t\tdouble por = Math.round(porcentaje * Math.pow(10, 2)) / Math.pow(10, 2);\r\n\t\t\t\tentidadDTO.setPorcentajeValorAsegurable(por);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public UserList list();",
"public List<DocumentoVinculadoDTO> getListaNoEspecifico() {\n System.out.println(\"entrei getListaNoEspecifico \");\n listar1Produto();\n return listaNoEspecifico;\n }",
"public abstract List<Usuario> seleccionarTodos();",
"public ArrayList<DataUsuario> listarUsaurios();",
"@Override\n\tprotected void doListado() throws Exception {\n\t\tList<Department> deptos = new DepartmentDAO().getAllWithManager();\n//\t\tList<Department> deptos = new DepartmentDAO().getAll();\n\t\tthis.addColumn(\"Codigo\").addColumn(\"Nombre\").addColumn(\"Manager\").newLine();\n\t\t\n\t\tfor(Department d: deptos){\n\t\t\taddColumn(d.getNumber());\n\t\t\taddColumn(d.getName());\n\t\t\taddColumn(d.getManager().getFullName());\n\t\t\tnewLine();\n\t\t}\n\t}",
"private void cargarLista(ArrayList<CarritoDTO> arrayList)\n {\n DefaultListModel modelo = new DefaultListModel();\n //Recorrer el contenido del ArrayList\n for(int i=0; i<arrayList.size(); i++) \n {\n CarritoDTO item =(CarritoDTO) arrayList.get(i);\n //Añadir cada elemento del ArrayList en el modelo de la lista\n modelo.add(i, item.toString());\n }\n //Asociar el modelo de lista al JList\n jList1.setModel(modelo);\n }",
"@Override\n\tpublic void acheter(List<Object> la) {\n\t\t\n\t}",
"@Override\n\tpublic List<BeanDistrito> listar() {\n\t\tList<BeanDistrito> lista = new ArrayList<BeanDistrito>();\n\t\tBeanDistrito distrito = null;\n\t\tConnection con = MySQLDaoFactory.obtenerConexion();\n\t\ttry {\n\t\t\n\t\t\tString sql=\"SELECT * FROM t_distrito ORDER BY codDistrito\";\n\t\t\tStatement stmt = con.createStatement();\n\t\t\tResultSet rs = stmt.executeQuery(sql);\n\t\t\t\n\t\t\twhile(rs.next()){\n\t\t\t\tdistrito = new BeanDistrito();\n\t\t\t\tdistrito.setCodDistrito(rs.getInt(1));\n\t\t\t\tdistrito.setNombre(rs.getString(2));\n\t\t\t\t\n\t\t\t\tlista.add(distrito);\n\t\t\t}\n\t\t\tcon.close();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\ttry {\n\t\t\t\tcon.close();\n\t\t\t} catch (SQLException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn lista;\n\t}",
"public void getOrderedList() {\n\n\t\tFile opFile = new File(\"/home/bridgeit/Desktop/newfile.txt\");\n\t\ttry {\n\t\t\topFile.createNewFile();\n\t\t\tFileWriter fwriter = new FileWriter(opFile);\n\n\t\t\tfor (int i = 0; i < olist.size(); i++) {\n\n\t\t\t\tfwriter.append(olist.returnItem(i) + \" \");\n\n\t\t\t}\n\t\t\tfwriter.close();\n\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}",
"private void setUpList() {\n\n\n Contents s1 = new Contents(R.drawable.bishist,\"Bishisht Bhatta\",\"+977-9849849525\", Color.parseColor(\"#074e87\"));\n list.add(s1);\n Contents s2 = new Contents(R.drawable.sagar,\"Sagar Pant\",\"+977-9865616888\",Color.parseColor(\"#074e87\"));\n list.add(s2);\n Contents s3 = new Contents(R.drawable.rabins,\"Rabin Nath\",\"+977-9848781007\",Color.parseColor(\"#074e87\"));\n list.add(s3);\n\n\n }",
"@Override\n public List<Venda> listar() {\n String sql = \"SELECT v FROM venda v\";\n TypedQuery<Venda> query = em.createQuery(sql, Venda.class);\n List<Venda> resultList = query.getResultList();\n\n return resultList;\n }",
"public void chargeListe(){\n jCbListeEtablissement.removeAllItems();\n String sReq = \"From Etablissement\";\n Query q = jfPrincipal.getSession().createQuery(sReq);\n Iterator eta = q.iterate();\n while(eta.hasNext())\n {\n Etablissement unEtablissement = (Etablissement) eta.next();\n jCbListeEtablissement.addItem(unEtablissement.getEtaNom());\n }\n bChargeListe = true;\n }",
"private static void getListTest() {\n\t\tList<CartVo> list=new CartDao().getList();\r\n\t\t\r\n\t\tfor(CartVo cartVo : list) {\r\n\t\t\tSystem.out.println(cartVo);\r\n\t\t}\r\n\t}",
"public void createListData()\n {\n List<SinhVien> listSinhvien=new ArrayList<>();\n for(int i=0;i<10;i++){\n SinhVien sv=new SinhVien(i+\"\",\"123\",\"0123\",i+1.0f);\n listSinhvien.add(sv);\n }\n PresenterImplDangXuat.onLoadSucess(listSinhvien);\n }",
"public void setListaPartidas() {\r\n\t\tDefaultListModel<String> modelo = new DefaultListModel<String>();\r\n\t\t\r\n\t\tfor(int i = 0; i < this.listadoPartidas.size(); i++) {\r\n\t\t\tmodelo.add(i, this.listadoPartidas.get(i).getNombre());\r\n\t\t}\r\n\t\tthis.partidasList.setModel(modelo);\r\n\t\tif(!this.partidaSelecionada.equals(\"\")) {\r\n\t\t\tfor (Partida partida : this.listadoPartidas) {\r\n\t\t\t\tif(partida.getNombre().equals(this.partidaSelecionada)){\r\n\t\t\t\t\tlblInfoEspera.setText(Integer.toString(partida.getConectados()));\r\n\t\t\t\t\tlblInfoEstado.setText(partida.getEstado());\r\n\t\t\t\t\tlblInfoJugadoresReq.setText(Integer.toString(partida.getJugadoresReq()));\r\n\t\t\t\t\tif(principal.getVentanaEspera() != null)\r\n\t\t\t\t\t\tprincipal.getVentanaEspera().setValoresEspera(this.partidaMaxJugadores, partida.getJugadoresReq(), partida.getConectados());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void listarUsuarios() {\r\n \t\r\n \tfor(String usuario : ConfigureSetup.getUsers()) {\r\n \t\tif(!usuario.equals(ConfigureSetup.getUserName()))\r\n \t\t\tlista_usuarios.getItems().add(usuario);\r\n \t}\r\n \t\r\n \t//lista_usuarios.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);\t\r\n }",
"public ArreiList() {\n koko = 0;\n }",
"public void populateListaObjetos() {\n listaObjetos.clear();\n Session session = HibernateUtil.getSessionFactory().openSession();\n try {\n String tipo = null;\n if (selectedTipo.equals(\"submenu\")) {\n tipo = \"menu\";\n } else if (selectedTipo.equals(\"accion\")) {\n tipo = \"submenu\";\n }\n\n Criteria cObjetos = session.createCriteria(Tblobjeto.class);\n cObjetos.add(Restrictions.eq(\"tipoObjeto\", tipo));\n Iterator iteObjetos = cObjetos.list().iterator();\n while (iteObjetos.hasNext()) {\n Tblobjeto o = (Tblobjeto) iteObjetos.next();\n listaObjetos.add(new SelectItem(new Short(o.getIdObjeto()).toString(), o.getNombreObjeto(), \"\"));\n }\n } catch (HibernateException e) {\n //logger.throwing(getClass().getName(), \"populateListaObjetos\", e);\n } finally {\n session.close();\n }\n }",
"public List getList();",
"public List<Tripulante> obtenerTripulantes();",
"@Override\n\tpublic List<Veiculo> listar() {\n\t\treturn null;\n\t}",
"@Override\n public String getName() {\n return \"list\";\n }",
"private void initList() {\n tempShopList=wdh.getTempShopList();\n final String[] listIndex=new String[tempShopList.size()];\n \n // System.out.println(tempShopList.size());\n \n for(int i=0;i<tempShopList.size();i++)\n listIndex[i]=String.valueOf(i+1); \n \n// jList1=new JList(listIndex);\n// jScrollPane1=new JScrollPane(jList1);\n// jScrollPane1.setViewportView(jList1);\n \n \n jList1.setModel(new javax.swing.AbstractListModel() {\n String[] strings1 = listIndex;\n public int getSize() { return strings1.length; }\n public Object getElementAt(int i) { return strings1[i]; }\n });\n jScrollPane1.setViewportView(jList1);\n \n }",
"public void imprimirLista() {\n NodoListaDoble<T> tmp = raiz;\n\n if (this.raiz == null) {\n System.out.println(\"Lista vacia\");\n } else {\n System.out.println(\"--------------------------\");\n while (tmp != null) {\n System.out.println(tmp.toString());\n tmp = tmp.getSiguiente();\n }\n System.out.println(\"--------------------------\");\n }\n }",
"@Override\r\n\tpublic List<BoardVO> list() throws Exception {\n\t\tlog.info(\"list() - 게시판 리스트 데이터 가져오기 +++++++++++++++\");\r\n\t\treturn null;\r\n\t}",
"public Jahresrangliste() {\r\n\t\tLaeufe = new ArrayList<Lauf>();\r\n\t\tRennfahrer = new ArrayList<Fahrer>();\r\n\t}",
"protected List getList() {\n/* 88 */ return (List)getCollection();\n/* */ }",
"public RecyclerViewProductos( List<Producto> lista) {\n this.productoList=lista;\n }"
]
| [
"0.74063414",
"0.716235",
"0.70920783",
"0.70532376",
"0.697592",
"0.69475067",
"0.69038594",
"0.68955034",
"0.6872977",
"0.6717648",
"0.6607841",
"0.66000426",
"0.6577121",
"0.65440845",
"0.6529056",
"0.65249014",
"0.6500293",
"0.64697593",
"0.6463904",
"0.64504105",
"0.64464533",
"0.6439702",
"0.64381737",
"0.6437434",
"0.6422408",
"0.6388262",
"0.637402",
"0.6363937",
"0.6350807",
"0.63506114",
"0.63489234",
"0.63282406",
"0.63022846",
"0.6296435",
"0.62953764",
"0.62856",
"0.62576497",
"0.62516123",
"0.6250673",
"0.62421477",
"0.6241443",
"0.62243426",
"0.62077636",
"0.62052256",
"0.6200216",
"0.619876",
"0.61967707",
"0.61913186",
"0.61815554",
"0.6178122",
"0.6162524",
"0.61583185",
"0.6158304",
"0.6142763",
"0.6141223",
"0.6141072",
"0.61398786",
"0.6137122",
"0.61338335",
"0.6133188",
"0.61260176",
"0.61095893",
"0.6102295",
"0.6092833",
"0.6091369",
"0.6088927",
"0.6088052",
"0.607856",
"0.60782635",
"0.6074938",
"0.60739166",
"0.60735303",
"0.606553",
"0.60540706",
"0.60523266",
"0.60506505",
"0.6042357",
"0.60402876",
"0.60374165",
"0.6034765",
"0.60238373",
"0.6022657",
"0.60149187",
"0.601386",
"0.6009164",
"0.6008633",
"0.60081005",
"0.6001072",
"0.59997195",
"0.5993118",
"0.5989014",
"0.5987515",
"0.5983209",
"0.5980087",
"0.5976889",
"0.5976681",
"0.5973626",
"0.59700525",
"0.59655714",
"0.5965372",
"0.59617734"
]
| 0.0 | -1 |
registrazione completata. mostra schermata con informazioni sulla conferma account | private void subscriptionComplete(String username, String email){
//preparo la schermata da mostrare
TextView name = (TextView) findViewById(R.id.user_name_confirm);
if(name!=null) name.setText(username);
TextView description = (TextView) findViewById(R.id.new_user_description);
String desc = getString(R.string.registration_confirmed_description);
desc = desc.replace("FUCKINGMAIL",email);
if(description!=null) description.setText(desc);
//eseguo lo scambio dei layout mostrati
View first = findViewById(R.id.subscribe_first);
View second = findViewById(R.id.subscribe_second);
if(first!=null && second != null) {
first.setVisibility(View.INVISIBLE);
second.setVisibility(View.VISIBLE);
}
//nascondo pulsanti da toolbar
menu.findItem(R.id.next).setVisible(false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void registrar() {\n try {\r\n do {\r\n //totalUsuarios = this.registraUnUsuario(totalUsuarios);\r\n this.registraUnUsuario();\r\n } while (!this.salir());\r\n } catch (IOException e) {\r\n flujoSalida.println(\"Error de entrada/salida, finalizará la aplicación.\");\r\n }\r\n flujoSalida.println(\"Total usuarios registrados: \"+totalUsuarios);\r\n }",
"private void caricaRegistrazione() {\n\t\tfor(MovimentoEP movimentoEP : primaNota.getListaMovimentiEP()){\n\t\t\t\n\t\t\tif(movimentoEP.getRegistrazioneMovFin() == null) { //caso di prime note libere.\n\t\t\t\tthrow new BusinessException(ErroreCore.OPERAZIONE_NON_CONSENTITA.getErrore(\"La prima nota non e' associata ad una registrazione.\"));\n\t\t\t}\n\t\t\t\n\t\t\tthis.registrazioneMovFinDiPartenza = registrazioneMovFinDad.findRegistrazioneMovFinById(movimentoEP.getRegistrazioneMovFin().getUid());\n\t\t\t\n\t\t}\n\t\t\n\t\tif(this.registrazioneMovFinDiPartenza.getMovimento() == null){\n\t\t\tthrow new BusinessException(\"Movimento non caricato.\");\n\t\t}\n\t\t\n\t}",
"private void charge_up() throws GB_Exception {\n try{\n if(PersonalDataController.getInstance().existRegistry(username)){\n putPersonalInformation();\n }else{\n putDefaultInformation();\n }\n } catch (SQLException | IOException ex) {\n LOG.error(ex);\n throw new GB_Exception(\"Error al carga informacion de usuario. Comuniquese con su administrador.\");\n }\n }",
"@Override\n\tpublic void registrarSalida() {\n\n\t}",
"@Override\n\tpublic void registrarSalida() {\n\t\t\n\t}",
"@Override\n\tpublic void registrarSalida() {\n\t\t\n\t}",
"public static void registrazione(String givenemail, String nome, String conome, String provincia, String orari, String password, String materie) {\n\n String email = mailtoDB(givenemail);\n String materieLC = materie.toLowerCase();\n final String percorsoReg = \"insegnanti\"; //Percorso registrazione account.\n final String percorsoDati = \"province\"; //Percorso registrazione dati.\n\n //Creazione arraylist materie da stringa.\n ArrayList<String> listamaterie = new ArrayList<String>(Arrays.asList(materieLC.split(\"[,\\n]\")));\n int index=0;\n for (String s : listamaterie) {\n listamaterie.set(index,s.trim());\n index++;\n }\n\n //Creazione oggetti \"rins\" e \"ins\" rispettivamente per registrazione password account e dati.\n RegTeacher rins = new RegTeacher(password, provincia);\n Teacher ins = new Teacher(givenemail, nome, conome, provincia, orari, \"0000\", listamaterie);\n\n //Registrazione rins, usando percorso Reg.\n DatabaseReference regRef = FirebaseDatabase.getInstance().getReference(percorsoReg);\n regRef.child(email).setValue(rins);\n\n //Registrazione ins, serve creare nuovo percorso.\n DatabaseReference dataRef = FirebaseDatabase.getInstance().getReference(percorsoDati).child(provincia.toLowerCase());\n dataRef.child(email).setValue(ins);\n }",
"@Override\n\tpublic void registrarEntrada() {\n\n\t}",
"public void registrarPersona() {\n\t\ttry {\n\t\t\tif (validaNumDocumento(getNumDocumentPersona())) {\n\t\t\t\t\tif (validaDireccion()) {\n\t\t\t\t\t\tif (validaApellidosNombres()) {\n\t\t\t\t\t\t\tPaPersona persona = new PaPersona();\n\t\t\t\t\t\t\tif (getActualizaPersona() != null && getActualizaPersona().equals(\"N\")) {\n\t\t\t\t\t\t\t\tpersona.setPersonaId(Constante.RESULT_PENDING);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tpersona.setPersonaId(getPersonaId() == null ? Constante.RESULT_PENDING: getPersonaId());\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tpersona.setTipoDocumentoId(Integer.valueOf(mapTipoDocumento.get(getTipoDocumento())));\n\t\t\t\t\t\t\tpersona.setNroDocIdentidad(getNumDocumentPersona());\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\tif (persona.getTipoDocumentoId() == Constante.TIPO_DOCUMENTO_RUC_ID) {\n\t\t\t\t\t\t\t\tpersona.setRazonSocial(getRazonSocial());\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tpersona.setPrimerNombre(getPrimerNombre());\n\t\t\t\t\t\t\t\tpersona.setSegundoNombre(getSegundoNombre());\n\t\t\t\t\t\t\t\tpersona.setApePaterno(getApellidoPaterno());\n\t\t\t\t\t\t\t\tpersona.setApeMaterno(getApellidoMaterno());\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tPaDireccion direccion = new PaDireccion();\n\t\t\t\t\t\t\tdireccion.setDireccionId(getDireccionId() == null ? Constante.RESULT_PENDING: getDireccionId());\n\t\t\t\t\t\t\tif (getSelectedOptBusc().intValue() == 1) {\n\t\t\t\t\t\t\t\tdireccion.setTipoViaId(mapGnTipoVia.get(getCmbtipovia().getValue()));\n\t\t\t\t\t\t\t\tdireccion.setViaId(mapGnVia.get(getCmbvia().getValue()));\n\t\t\t\t\t\t\t\tdireccion.setLugarId(null);\n\t\t\t\t\t\t\t\tdireccion.setSectorId(null);\n\t\t\t\t\t\t\t\tdireccion.setNumero(numero);\n\t\t\t\t\t\t\t\tdireccion.setPersonaId(persona.getPersonaId());\n\n\t\t\t\t\t\t\t\tString direccionCompleta = papeletaBo.getDireccionCompleta(direccion,mapIGnTipoVia, mapIGnVia);\n\t\t\t\t\t\t\t\tif (direccionCompleta != null && direccionCompleta.trim().length() > 0) {\n\t\t\t\t\t\t\t\t\tdireccion.setDireccionCompleta(direccionCompleta);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tdireccion.setDireccionCompleta(getDireccionCompleta());\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tBuscarPersonaDTO personaDto = getPersonaDto(persona, direccion);\n\t\t\t\t\t\t\tString personaPapeleta = (String) getSessionMap().get(\"personaPapeleta\");\n\t\t\t\t\t\t\tif (personaPapeleta != null\n\t\t\t\t\t\t\t\t\t&& personaPapeleta.equals(\"I\")) {\n\t\t\t\t\t\t\t\tRegistroPapeletasManaged registro = (RegistroPapeletasManaged) getManaged(\"registroPapeletasManaged\");\n\t\t\t\t\t\t\t\tregistro.setDatosInfractor(personaDto);\n\t\t\t\t\t\t\t} else if (personaPapeleta != null\n\t\t\t\t\t\t\t\t\t&& personaPapeleta.equals(\"P\")) {\n\t\t\t\t\t\t\t\tRegistroPapeletasManaged registro = (RegistroPapeletasManaged) getManaged(\"registroPapeletasManaged\");\n\t\t\t\t\t\t\t\tregistro.setDatosPropietario(personaDto);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlimpiar();\n\t\t\t\t\t\t\tesContribuyente = (Boolean) getSessionMap().get(\"esContribuyente\");\n\t\t\t\t\t\t\tif (esContribuyente == true) {\t\n\t\t\t\t\t\t\t\tWebMessages.messageError(\"Es un Contribeyente s�lo se Actualiz� la Direcci�n para Papeletas, los otros datos es por DJ\");\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tWebMessages\n\t\t\t\t\t\t\t\t\t.messageError(\"Apellidos y nombres no valido\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tWebMessages\n\t\t\t\t\t\t\t\t.messageError(\"Especifique la direccion de la persona\");\n\t\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tWebMessages\n\t\t\t\t\t\t.messageError(\"Número de documento de identidad no valido\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void registrarDatosBD(String nombre, String apellido, String usuario, String clave, String fnacim) {\n\t\tUsuario u = new Usuario(0, nombre, apellido, usuario, clave, fnacim, 0, 0);\n\t\t// 02. Registrar el obj usando la clase de gestion y guardando\n\t\tint ok = new GestionUsuarios().registrar(u);\n\n\t\t// salidas\n\t\tif (ok == 0) {\n\t\t\tJOptionPane.showMessageDialog(this, \"Error al registrar\");\n\t\t} else {\n\t\t\tJOptionPane.showMessageDialog(this, \"Registro OK\");\n\t\t}\n\t}",
"private void registration() {\n\t\tif (ur_name.getText().length() > 0 && email.getText().length() > 0\r\n\t\t\t\t&& pass.getText().length() > 0\r\n\t\t\t\t&& re_pass.getText().length() > 0) {\r\n\t\t\tif (pass.getText().toString()\r\n\t\t\t\t\t.equalsIgnoreCase(re_pass.getText().toString())) {\r\n\t\t\t\tString postEntity = \"user_name=\" + ur_name.getText().toString()\r\n\t\t\t\t\t\t+ \"&email=\" + email.getText().toString() + \"&password=\"\r\n\t\t\t\t\t\t+ pass.getText().toString() + \"&gcm_id=\"\r\n\t\t\t\t\t\t+ GlobalDeclares.getGcmId();\r\n\t\t\t\tnew ServerUtilities(getApplicationContext(),\r\n\t\t\t\t\t\tGlobalDeclares.NEW_REGISTRATION, postEntity, delegate);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tToast.makeText(getApplicationContext(),\r\n\t\t\t\t\t\t\"Password does not match!\", Toast.LENGTH_LONG).show();\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tToast.makeText(getApplicationContext(),\r\n\t\t\t\t\t\"You need to fill all the fields!\", Toast.LENGTH_LONG)\r\n\t\t\t\t\t.show();\r\n\t\t}\r\n\r\n\t}",
"@WebMethod public Pertsona register(String izena, String abizena1, String abizena2, String erabiltzaileIzena, String pasahitza, String telefonoa, String emaila, LocalDate jaiotzeData, String mota) throws UserAlreadyExist;",
"private void registrarRecibo_() throws Exception {\t\n\t\t\n\t\tif (CajaUtil.CAJAS_ABIERTAS.get(this.selectedItem.getPos6()) != null) {\n\t\t\tString msg = \"CAJA BLOQUEADA POR USUARIO: \" + CajaUtil.CAJAS_ABIERTAS.get(this.selectedItem.getPos6());\n\t\t\tClients.showNotification(msg, Clients.NOTIFICATION_TYPE_ERROR, null, null, 0);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tthis.nvoRecibo.setPos1(\"\");\n\t\tthis.nvoRecibo.setPos2(new Date());\n\t\tWindowPopup wp = new WindowPopup();\n\t\twp.setDato(this);\n\t\twp.setModo(WindowPopup.NUEVO);\n\t\twp.setHigth(\"300px\");\n\t\twp.setWidth(\"400px\");\n\t\twp.setCheckAC(new ValidadorRegistrarRecibo());\n\t\twp.setTitulo(\"Registrar Recibo de Pago\");\n\t\twp.show(ZUL_REGISTRAR_RECIBO);\n\t\tif (wp.isClickAceptar()) {\n\t\t\t\n\t\t\tif (CajaUtil.CAJAS_ABIERTAS.get(this.selectedItem.getPos6()) != null) {\n\t\t\t\tString msg = \"CAJA BLOQUEADA POR USUARIO: \" + CajaUtil.CAJAS_ABIERTAS.get(this.selectedItem.getPos6());\n\t\t\t\tClients.showNotification(msg, Clients.NOTIFICATION_TYPE_ERROR, null, null, 0);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tString numeroRecibo = ((String) this.nvoRecibo.getPos1()).toUpperCase();\n\t\t\tDate fechaRecibo = (Date) this.nvoRecibo.getPos2();\n\t\t\tlong idOrdenPago = this.selectedItem.getId();\n\t\t\tString user = this.getLoginNombre();\n\t\t\tAssemblerRecibo.registrarReciboPago(numeroRecibo, fechaRecibo, idOrdenPago, user, false, false);\t\t\t\n\t\t\tthis.selectedItem = null;\n\t\t\tthis.mensajePopupTemporal(\"Recibo Registrado..\", 5000);\n\t\t}\t\n\t}",
"@Override\n\tpublic void registrarAtencion(TramiteUsuario tramite) {\n\t\ttramite.setSecUsuario1( Usuario.getUsuarioBean() );\n\t\ttramite.setSecUsuario2( Usuario.getUsuarioBean() );\n\t\ttramite.setEstado(1);\n\t\ttramite.setEstadoTramiteFinal( ParametroUtil.EstadoTramite.ATENDIDO.value );\n\t\ttramite.setFechaRegistro( new Date() );\n\t\ttramiteDAO.registrarMovimiento( tramite );\n\t\t\n\t\ttramite.getTramite().setEstado( ParametroUtil.EstadoTramite.ATENDIDO.value );\n\t\ttramiteDAO.registrar( tramite.getTramite() );\n\t\t\n\t}",
"public void registrarUsuarioFinal(){\r\n Usuario nuevoUsuario= new Usuario();\r\n nuevoUsuario.setNombreUsuario(nuevoNombreUsuario);\r\n nuevoUsuario.setPassword(nuevoPasswordUsuario);\r\n nuevoUsuario.setTipoUsuario(\"final\");\r\n \r\n IUsuarioDAO iusuarioDAO = new UsuarioDAOImp();\r\n iusuarioDAO.agregarUsuario(nuevoUsuario);\r\n FacesMessage facesMessage = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Usuario registrado\", \"Usuario registrado exitosamente\");\r\n FacesContext.getCurrentInstance().addMessage(null, facesMessage);\r\n\r\n }",
"@Override\n\tpublic void registrarLlegada() {\n\t\t\n\t}",
"public void registrarPagoFacturaCredito(){\n if(facturaCredito != null){\n try{\n //NUEVA TRANSACCION\n Transaccion transac = new Transaccion();\n transac.setFechaTransac(new funciones().getTime());\n transac.setHoraTransac(new funciones().getTime());\n transac.setResponsableTransac(new JsfUtil().getEmpleado());\n transac.setTipoTransac(4); //REGISTRO DE PAGO\n transac.setIdtransac(ejbFacadeTransac.getNextIdTransac());\n ejbFacadeTransac.create(transac);\n //REGISTRAR PAGO\n PagoCompra pagoCompra = new PagoCompra();\n pagoCompra.setFacturaIngreso(facturaCredito);\n pagoCompra.setIdtransac(transac);\n pagoCompra.setInteresPagoCompra(new BigDecimal(intereses));\n pagoCompra.setMoraPagoCompra(new BigDecimal(mora));\n pagoCompra.setAbonoPagoCompra(new BigDecimal(pago));\n BigDecimal total = pagoCompra.getAbonoPagoCompra().add(pagoCompra.getInteresPagoCompra()).add(pagoCompra.getMoraPagoCompra());\n pagoCompra.setTotalPagoCompra(new BigDecimal(new funciones().redondearMas(total.floatValue(), 2)));\n pagoCompra.setIdpagoCompra(ejbFacadePagoCompra.getNextIdPagoCompra());\n ejbFacadePagoCompra.create(pagoCompra); // Registrar Pago en la BD\n //Actualizar Factura\n facturaCredito.getPagoCompraCollection().add(pagoCompra); //Actualizar Contexto\n BigDecimal saldo = facturaCredito.getSaldoCreditoCompra().subtract(pagoCompra.getAbonoPagoCompra());\n facturaCredito.setSaldoCreditoCompra(new BigDecimal(new funciones().redondearMas(saldo.floatValue(), 2)));\n if(facturaCredito.getSaldoCreditoCompra().compareTo(BigDecimal.ZERO)==0){\n facturaCredito.setEstadoCreditoCompra(\"CANCELADO\");\n facturaCredito.setFechaCancelado(transac.getFechaTransac());\n }\n facturaCredito.setUltimopagoCreditoCompra(transac.getFechaTransac());\n ejbFacadeFacturaIngreso.edit(facturaCredito);\n new funciones().setMsj(1, \"PAGO REGISTRADO CORRECTAMENTE\");\n if(facturaCredito.getEstadoCreditoCompra().equals(\"CANCELADO\")){\n RequestContext context = RequestContext.getCurrentInstance(); \n context.execute(\"alert('FACTURA CANCELADA POR COMPLETO');\");\n }\n prepararPago();\n }catch(Exception e){\n new funciones().setMsj(3, \"ERROR AL REGISTRAR PAGO\");\n }\n }\n }",
"private void registrationView() {\n String login;\n String email;\n String password;\n\n try {\n while (true) {\n printLine();\n print(\"\\tВведите логин\\n\");\n print(\"\\t>>>>> \");\n login = readStringFromConsole();\n\n print(\"\\tВведите email\\n\");\n print(\"\\t>>>>> \");\n try {\n email = valid.emailValidation(readStringFromConsole());\n } catch (NotValidDataException e) {\n printErr(\"\\tнекорректный email\");\n continue;\n }\n\n print(\"\\tВведите пароль\\n\");\n print(\"\\t>>>>> \");\n try {\n password = valid.passwordValidation(readStringFromConsole());\n } catch (NotValidDataException e) {\n printErr(\"\\tнекорректный password\");\n continue;\n }\n break;\n }\n\n try {\n\n serviceAuthorizationService.registration(new UserDto()\n .withUsername(login)\n .withEmail(email)\n .withPassword(password));\n setStatus(REGISTERED);\n printLine();\n print(\"\\tВы успешно зарегистрировались\");\n } catch (AlreadyExistsException e) {\n e.showMessage();\n registrationView();\n }\n } catch (IOException e) {\n registrationView();\n }\n }",
"public UsuarioRegistrado(String nombre, String contrasena, Date fechanac) {\n\t\tsuper(nombre, contrasena);\n\t\tthis.fechanac = fechanac;\n\n\t\tbloqueado = false;\n\t\tpremium = false;\n\t\treproducciones = 0;\n\t\tcanciones = new ArrayList<>();\n\t\talbumes = new ArrayList<>();\n\t\tlistas = new ArrayList<>();\n\t\tseguidos = new ArrayList<>();\n\t}",
"public void createAccount(){\n System.out.println(\"vi skal starte \");\n }",
"public static void registrarAuditoria(Connexion connexion,Long idUsuario,TarjetaCredito tarjetacredito,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(TarjetaCreditoConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tif(tarjetacredito.getIsNew()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,TarjetaCreditoDataAccess.TABLENAME, tarjetacredito.getId(), Constantes.SAUDITORIAINSERTAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(TarjetaCreditoConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////TarjetaCreditoLogic.registrarAuditoriaDetallesTarjetaCredito(connexion,tarjetacredito,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(tarjetacredito.getIsDeleted()) {\r\n\t\t\t\t\t/*if(!tarjetacredito.getIsExpired()) {\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.RegistrarNuevaAuditoria(Constantes.getLOidSistemaActual(),idUsuario,TarjetaCreditoDataAccess.TABLENAME, tarjetacredito.getId(), Constantes.getSAuditoriaEliminarLogicamente(),\"\",sUsuarioPC,sNamePC,sIPPC,Timestamp.valueOf(Funciones.getStringMySqlCurrentDateTime()),\"\");\r\n\t\t\t\t\t\t////TarjetaCreditoLogic.registrarAuditoriaDetallesTarjetaCredito(connexion,tarjetacredito,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t} else {*/\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,TarjetaCreditoDataAccess.TABLENAME, tarjetacredito.getId(), Constantes.SAUDITORIAELIMINARFISICAMENTE,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t//}\r\n\t\t\t\t} else if(tarjetacredito.getIsChanged()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,TarjetaCreditoDataAccess.TABLENAME, tarjetacredito.getId(), Constantes.SAUDITORIAACTUALIZAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(TarjetaCreditoConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////TarjetaCreditoLogic.registrarAuditoriaDetallesTarjetaCredito(connexion,tarjetacredito,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}",
"protected void createRegistrationInfo() {\n registrationInfo.put(\"email\", email.getText().toString());\n registrationInfo.put(\"password\", password.getText().toString());\n }",
"@Override\n\tpublic void registrarLlegada() {\n\t}",
"public void register(String form /* should be a Form from GUI */){\n String email = \"email\";\n String nome_completo = \"full_name\";\n Date data_nascimento = new Date(1996-10-21);\n String password = getMd5(\"password\");\n String nif = \"nif\";\n String morada = \"morada\";\n String telemovel = \"telemovel\";\n User user = new User(email);\n if (!user.exists()){\n user.setNome_completo(nome_completo);\n user.setData_nascimento(data_nascimento);\n user.setPassword(password);\n user.setNif(nif);\n user.setMorada(morada);\n user.setTelemovel(telemovel);\n user.setAdmin(FALSE);\n //System registers person\n //db.register(user)\n }\n }",
"public static void registrarAuditoria(Connexion connexion,Long idUsuario,PlantillaFactura plantillafactura,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(PlantillaFacturaConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tif(plantillafactura.getIsNew()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,PlantillaFacturaDataAccess.TABLENAME, plantillafactura.getId(), Constantes.SAUDITORIAINSERTAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(PlantillaFacturaConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////PlantillaFacturaLogic.registrarAuditoriaDetallesPlantillaFactura(connexion,plantillafactura,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(plantillafactura.getIsDeleted()) {\r\n\t\t\t\t\t/*if(!plantillafactura.getIsExpired()) {\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.RegistrarNuevaAuditoria(Constantes.getLOidSistemaActual(),idUsuario,PlantillaFacturaDataAccess.TABLENAME, plantillafactura.getId(), Constantes.getSAuditoriaEliminarLogicamente(),\"\",sUsuarioPC,sNamePC,sIPPC,Timestamp.valueOf(Funciones.getStringMySqlCurrentDateTime()),\"\");\r\n\t\t\t\t\t\t////PlantillaFacturaLogic.registrarAuditoriaDetallesPlantillaFactura(connexion,plantillafactura,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t} else {*/\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,PlantillaFacturaDataAccess.TABLENAME, plantillafactura.getId(), Constantes.SAUDITORIAELIMINARFISICAMENTE,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t//}\r\n\t\t\t\t} else if(plantillafactura.getIsChanged()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,PlantillaFacturaDataAccess.TABLENAME, plantillafactura.getId(), Constantes.SAUDITORIAACTUALIZAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(PlantillaFacturaConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////PlantillaFacturaLogic.registrarAuditoriaDetallesPlantillaFactura(connexion,plantillafactura,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}",
"public void registrarAdministrador() throws IOException {\n\n //asignamos al usuario la imagen de perfil default\n usuarioView.setUsuarioFotoRuta(getPathDefaultUsuario());\n usuarioView.setUsuarioFotoNombre(getNameDefaultUsuario());\n\n //Se genera un login y un pass aleatorio que se le envia al proveedor\n MD5 md = new MD5();\n GenerarPassword pass = new GenerarPassword();\n SendEmail email = new SendEmail();\n\n password = pass.generarPass(6);//Generamos pass aleatorio\n\n //Encriptamos las contraseñas\n usuarioView.setUsuarioPassword(md.getMD5(password));//Se encripta la contreseña\n usuarioView.setUsuarioRememberToken(md.getMD5(password));\n\n //el metodo recibe los atributos, agrega al atributo ciudad del objeto usuario un objeto correspondiente, \n //de la misma forma comprueba el rol y lo asocia, por ultimo persiste el usuario en la base de datos\n usuarioView.setSmsCiudad(ciudadDao.consultarCiudad(usuarioView.getSmsCiudad()));//Asociamos una ciudad a un usuario\n usuarioView.setSmsRol(rolDao.consultarRol(usuarioView.getSmsRol()));//Asociamos un rol a un usuario\n usuarioView.setUsuarioEstadoUsuario(1);//Asignamos un estado de cuenta\n usuarioView.setSmsNacionalidad(nacionalidadDao.consultarNacionalidad(usuarioView.getSmsNacionalidad()));\n\n //registramos el usuario y recargamos la lista de clientes\n usuarioDao.registrarUsuario(usuarioView);\n usuariosListView = adminDao.consultarUsuariosAdministradores();\n\n //Enviar correo\n email.sendEmailAdministradorBienvenida(usuarioView, password);\n\n //limpiamos objetos\n usuarioView = new SmsUsuario();\n password = \"\";\n }",
"public static void registrarAuditoria(Connexion connexion,Long idUsuario,DatoGeneralEmpleado datogeneralempleado,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(DatoGeneralEmpleadoConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tif(datogeneralempleado.getIsNew()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,DatoGeneralEmpleadoDataAccess.TABLENAME, datogeneralempleado.getId(), Constantes.SAUDITORIAINSERTAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(DatoGeneralEmpleadoConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////DatoGeneralEmpleadoLogic.registrarAuditoriaDetallesDatoGeneralEmpleado(connexion,datogeneralempleado,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(datogeneralempleado.getIsDeleted()) {\r\n\t\t\t\t\t/*if(!datogeneralempleado.getIsExpired()) {\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.RegistrarNuevaAuditoria(Constantes.getLOidSistemaActual(),idUsuario,DatoGeneralEmpleadoDataAccess.TABLENAME, datogeneralempleado.getId(), Constantes.getSAuditoriaEliminarLogicamente(),\"\",sUsuarioPC,sNamePC,sIPPC,Timestamp.valueOf(Funciones.getStringMySqlCurrentDateTime()),\"\");\r\n\t\t\t\t\t\t////DatoGeneralEmpleadoLogic.registrarAuditoriaDetallesDatoGeneralEmpleado(connexion,datogeneralempleado,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t} else {*/\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,DatoGeneralEmpleadoDataAccess.TABLENAME, datogeneralempleado.getId(), Constantes.SAUDITORIAELIMINARFISICAMENTE,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t//}\r\n\t\t\t\t} else if(datogeneralempleado.getIsChanged()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,DatoGeneralEmpleadoDataAccess.TABLENAME, datogeneralempleado.getId(), Constantes.SAUDITORIAACTUALIZAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(DatoGeneralEmpleadoConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////DatoGeneralEmpleadoLogic.registrarAuditoriaDetallesDatoGeneralEmpleado(connexion,datogeneralempleado,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}",
"public static void registrarAuditoria(Connexion connexion,Long idUsuario,PresuTipoProyecto presutipoproyecto,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(PresuTipoProyectoConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tif(presutipoproyecto.getIsNew()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,PresuTipoProyectoDataAccess.TABLENAME, presutipoproyecto.getId(), Constantes.SAUDITORIAINSERTAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(PresuTipoProyectoConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////PresuTipoProyectoLogic.registrarAuditoriaDetallesPresuTipoProyecto(connexion,presutipoproyecto,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(presutipoproyecto.getIsDeleted()) {\r\n\t\t\t\t\t/*if(!presutipoproyecto.getIsExpired()) {\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.RegistrarNuevaAuditoria(Constantes.getLOidSistemaActual(),idUsuario,PresuTipoProyectoDataAccess.TABLENAME, presutipoproyecto.getId(), Constantes.getSAuditoriaEliminarLogicamente(),\"\",sUsuarioPC,sNamePC,sIPPC,Timestamp.valueOf(Funciones.getStringMySqlCurrentDateTime()),\"\");\r\n\t\t\t\t\t\t////PresuTipoProyectoLogic.registrarAuditoriaDetallesPresuTipoProyecto(connexion,presutipoproyecto,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t} else {*/\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,PresuTipoProyectoDataAccess.TABLENAME, presutipoproyecto.getId(), Constantes.SAUDITORIAELIMINARFISICAMENTE,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t//}\r\n\t\t\t\t} else if(presutipoproyecto.getIsChanged()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,PresuTipoProyectoDataAccess.TABLENAME, presutipoproyecto.getId(), Constantes.SAUDITORIAACTUALIZAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(PresuTipoProyectoConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////PresuTipoProyectoLogic.registrarAuditoriaDetallesPresuTipoProyecto(connexion,presutipoproyecto,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}",
"public static void regPerson(){\n\t\tSystem.out.println(\"Skriv inn navnet, trykk enter, skriv så inn alder, trykk enter, og til slutt skriv inn bosted og trykk enter!\");\n\t}",
"public void registrarVenta(String fruta, String proteina, String grano, String almidon) {\n if(!this.sePuedePreparar(fruta, proteina, grano, almidon)) {\n throw new RuntimeException(\"Ingredientes insuficientes\");\n }\n \n Almuerzo almuerzo = new Almuerzo(this, fruta, proteina, grano, almidon);\n almuerzo.registrarVenta();\n }",
"public static void registrarAuditoria(Connexion connexion,Long idUsuario,ValorPorUnidad valorporunidad,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(ValorPorUnidadConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tif(valorporunidad.getIsNew()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,ValorPorUnidadDataAccess.TABLENAME, valorporunidad.getId(), Constantes.SAUDITORIAINSERTAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(ValorPorUnidadConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////ValorPorUnidadLogic.registrarAuditoriaDetallesValorPorUnidad(connexion,valorporunidad,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(valorporunidad.getIsDeleted()) {\r\n\t\t\t\t\t/*if(!valorporunidad.getIsExpired()) {\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.RegistrarNuevaAuditoria(Constantes.getLOidSistemaActual(),idUsuario,ValorPorUnidadDataAccess.TABLENAME, valorporunidad.getId(), Constantes.getSAuditoriaEliminarLogicamente(),\"\",sUsuarioPC,sNamePC,sIPPC,Timestamp.valueOf(Funciones.getStringMySqlCurrentDateTime()),\"\");\r\n\t\t\t\t\t\t////ValorPorUnidadLogic.registrarAuditoriaDetallesValorPorUnidad(connexion,valorporunidad,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t} else {*/\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,ValorPorUnidadDataAccess.TABLENAME, valorporunidad.getId(), Constantes.SAUDITORIAELIMINARFISICAMENTE,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t//}\r\n\t\t\t\t} else if(valorporunidad.getIsChanged()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,ValorPorUnidadDataAccess.TABLENAME, valorporunidad.getId(), Constantes.SAUDITORIAACTUALIZAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(ValorPorUnidadConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////ValorPorUnidadLogic.registrarAuditoriaDetallesValorPorUnidad(connexion,valorporunidad,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}",
"public static void registrarAuditoria(Connexion connexion,Long idUsuario,GrupoBodega grupobodega,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(GrupoBodegaConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tif(grupobodega.getIsNew()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,GrupoBodegaDataAccess.TABLENAME, grupobodega.getId(), Constantes.SAUDITORIAINSERTAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(GrupoBodegaConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////GrupoBodegaLogic.registrarAuditoriaDetallesGrupoBodega(connexion,grupobodega,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(grupobodega.getIsDeleted()) {\r\n\t\t\t\t\t/*if(!grupobodega.getIsExpired()) {\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.RegistrarNuevaAuditoria(Constantes.getLOidSistemaActual(),idUsuario,GrupoBodegaDataAccess.TABLENAME, grupobodega.getId(), Constantes.getSAuditoriaEliminarLogicamente(),\"\",sUsuarioPC,sNamePC,sIPPC,Timestamp.valueOf(Funciones.getStringMySqlCurrentDateTime()),\"\");\r\n\t\t\t\t\t\t////GrupoBodegaLogic.registrarAuditoriaDetallesGrupoBodega(connexion,grupobodega,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t} else {*/\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,GrupoBodegaDataAccess.TABLENAME, grupobodega.getId(), Constantes.SAUDITORIAELIMINARFISICAMENTE,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t//}\r\n\t\t\t\t} else if(grupobodega.getIsChanged()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,GrupoBodegaDataAccess.TABLENAME, grupobodega.getId(), Constantes.SAUDITORIAACTUALIZAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(GrupoBodegaConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////GrupoBodegaLogic.registrarAuditoriaDetallesGrupoBodega(connexion,grupobodega,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}",
"public static void registrarOperacionPrestamo(Usuario autor, long idPrestamo, Operacion operacion) throws DaoException {\r\n String msg = null;\r\n Prestamo prestamo = PrestamoDao.findPrestamoById(idPrestamo, null);\r\n Conexion con = null;\r\n try {\r\n HashMap<String, String> infoPrestamo;\r\n HashMap<String, Object> infoOperacion = new HashMap<String, Object>();\r\n infoOperacion.put(\"ID\", Consultas.darNumFilas(Operacion.NOMBRE_TABLA)+1);\r\n infoOperacion.put(\"FECHA\", Consultas.getCurrentDate());\r\n infoOperacion.put(\"TIPO\", operacion.getTipo());\r\n infoOperacion.put(\"ID_AUTOR\", autor.getId());\r\n\r\n \r\n con=new Conexion();\r\n switch (operacion.getTipo()) {\r\n case Operacion.PAGAR_CUOTA:\r\n PrestamoDao.registrarPagoCuota(prestamo,con);\r\n infoOperacion.put(\"MONTO\", prestamo.getValorCuota());\r\n infoOperacion.put(\"DESTINO\", \"0\");\r\n infoOperacion.put(\"METODO\", operacion.getMetodo());\r\n infoOperacion.put(\"ID_PRESTAMO\", prestamo.getId()); \r\n \r\n break;\r\n case Operacion.PAGAR_CUOTA_EXTRAORDINARIA:\r\n \r\n //solo gasta lo necesario par apagar el prestamo\r\n if (operacion.getMonto()>prestamo.getCantidadRestante())\r\n {\r\n throw new DaoException(\"La cuota supera lo que debe\");\r\n }\r\n \r\n infoOperacion.put(\"MONTO\", operacion.getMonto());\r\n infoOperacion.put(\"DESTINO\",\"0\" );\r\n infoOperacion.put(\"METODO\", operacion.getMetodo());\r\n infoOperacion.put(\"ID_PRESTAMO\", prestamo.getId()); \r\n PrestamoDao.registrarPagoCuotaExtraordinaria(prestamo,operacion,con);\r\n break;\r\n case Operacion.CERRAR:\r\n if (prestamo.getCantidadRestante() != 0) {\r\n throw new DaoException( \"El prestamo no se ha pagado completamente\");\r\n } else {\r\n \r\n Consultas.insertar(null, infoOperacion, Operacion.infoColumnas, Operacion.NOMBRE_TABLA);\r\n String sentenciaCerrar = \"UPDATE PRESTAMOS SET ESTADO='CERRADO' WHERE ID=\" + prestamo.getId();\r\n con.getConexion().prepareStatement(sentenciaCerrar).executeUpdate();\r\n \r\n }\r\n \r\n }\r\n \r\n Consultas.insertar(con, infoOperacion, Operacion.infoColumnas, Operacion.NOMBRE_TABLA);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(OperacionDao.class.getName()).log(Level.SEVERE, null, ex); \r\n con.rollback();\r\n throw new DaoException();\r\n }\r\n\r\n \r\n }",
"private void addInstituicao() {\n\n if (txtNome.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Campo Nome Invalido\");\n txtNome.grabFocus();\n return;\n } else if (txtNatureza.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Campo Natureza Invalido\");\n txtNatureza.grabFocus();\n return;\n }\n if ((instituicao == null) || (instituicaoController == null)) {\n instituicao = new Instituicao();\n instituicaoController = new InstituicaoController();\n }\n instituicao.setNome(txtNome.getText());\n instituicao.setNatureza_administrativa(txtNatureza.getText());\n if (instituicaoController.insereInstituicao(instituicao)) {\n limpaCampos();\n JOptionPane.showMessageDialog(null, \"Instituicao Cadastrada com Sucesso\");\n }\n }",
"public void confirmRegistration(RegistrationData d) {}",
"private void registerUser(){\n mAuth.createUserWithEmailAndPassword(correo, password).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n //mapa de valores\n Map<String, Object> map = new HashMap<>();\n map.put(\"name\",name);\n map.put(\"email\",correo);\n map.put(\"password\",password);\n map.put(\"birthday\",cumple);\n map.put(\"genre\",genre);\n map.put(\"size\",size);\n //obtenemos el id asignado por la firebase\n String id= mAuth.getCurrentUser().getUid();\n //pasamos el mapa de valores\n mDatabase.child(\"Users\").child(id).setValue(map).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task2) {\n //validams que la tarea sea exitosa\n if(task2.isSuccessful()){\n startActivity(new Intent(DatosIniciales.this, MainActivity.class));\n //evitamos que vuelva a la pantalla con finsh cuando ya se ha registrado\n finish();\n }else{\n Toast.makeText(DatosIniciales.this, \"Algo fallo ups!!\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }else{\n Toast.makeText(DatosIniciales.this, \"No pudimos completar su registro\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }",
"public boolean registerToServer() throws Exception{\n \t\n\t\t// On crée un objet container pour contenir nos donnée\n\t\t// On y ajoute un AdminStream de type Registration avec comme params le login et le mot de pass\n \tRegistrationRequest regRequest = new RegistrationRequest(login, pass);\n\t\ttry {\n\t\t\t// On tente d'envoyer les données\n\t\t\toos_active.writeObject(regRequest);\n\t\t\t// On tente de recevoir les données\n\t\t\tRegistrationResponse regResponse = (RegistrationResponse)ois_active.readObject();\n\n\t\t\t// On switch sur le type de retour que nous renvoie le serveur\n\t\t\t// !!!Le type enum \"Value\" est sujet à modification et va grandir en fonction de l'avance du projet!!!\n\t\t\tswitch(regResponse.getResponseType()){\n\t\t\tcase REG_ALREADY_EXISTS:\n\t\t\t\topResult = \"Error : User already exist!\";\n\t\t\t\treturn false;\n\t\t\tcase REG_LOGIN_BAD_FORMAT:\n\t\t\t\topResult = \"Error : login bad format!\";\n\t\t\t\treturn false;\n\t\t\tcase REG_PASS_BAD_FORMAT:\n\t\t\t\topResult = \"Error : password bad format!\";\n\t\t\t\treturn false;\n\t\t\tcase REG_SUCCESS:\n\t\t\t\topResult = \"Account registration succeed!\";\n\t\t\t\treturn true;\n\t\t\tcase REG_UNKNOW_ERROR:\n\t\t\t\topResult = \"Error : Unknown error!\";\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tthrow new ClientChatException (ClientChatException.IO_ERREUR, \"ERROR: Communication Error\");\n\t\t}\n\t\treturn false;\n }",
"private void registerUser() {\n\n // Get register name\n EditText mRegisterNameField = (EditText) findViewById(R.id.register_name_field);\n String nickname = mRegisterNameField.getText().toString();\n\n // Get register email\n EditText mRegisterEmailField = (EditText) findViewById(R.id.register_email_field);\n String email = mRegisterEmailField.getText().toString();\n\n // Get register password\n EditText mRegisterPasswordField = (EditText) findViewById(R.id.register_password_field);\n String password = mRegisterPasswordField.getText().toString();\n\n AccountCredentials credentials = new AccountCredentials(email, password);\n credentials.setNickname(nickname);\n\n if (DataHolder.getInstance().isAnonymous()) {\n credentials.setOldUsername(DataHolder.getInstance().getUser().getUsername());\n }\n\n sendRegistrationRequest(credentials);\n }",
"private void registerUser()\n {\n /*AuthService.createAccount takes a Consumer<Boolean> where the result will be true if the user successfully logged in, or false otherwise*/\n authService.createAccount(entryService.extractText(namedFields), result -> {\n if (result.isEmpty()) {\n startActivity(new Intent(this, DashboardActivity.class));\n } else {\n makeToast(result);\n formContainer.setAlpha(1f);\n progressContainer.setVisibility(View.GONE);\n progressContainer.setOnClickListener(null);\n }\n });\n }",
"private static void registrarAuditoriaDetallesTarjetaCredito(Connexion connexion,TarjetaCredito tarjetacredito)throws Exception {\n\t\t\r\n\t\tString strValorActual=null;\r\n\t\tString strValorNuevo=null;\r\n\t\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_empresa().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_empresa()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_empresa().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_empresa().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDEMPRESA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_sucursal().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_sucursal()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_sucursal()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_sucursal().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_sucursal()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_sucursal().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDSUCURSAL,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_banco().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_banco()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_banco()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_banco().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_banco()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_banco().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDBANCO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getcodigo().equals(tarjetacredito.getTarjetaCreditoOriginal().getcodigo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getcodigo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getcodigo();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getcodigo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getcodigo() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.CODIGO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getnombre().equals(tarjetacredito.getTarjetaCreditoOriginal().getnombre()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getnombre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getnombre();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getnombre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getnombre() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.NOMBRE,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getnombre_corto().equals(tarjetacredito.getTarjetaCreditoOriginal().getnombre_corto()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getnombre_corto()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getnombre_corto();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getnombre_corto()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getnombre_corto() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.NOMBRECORTO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getdigito_valido().equals(tarjetacredito.getTarjetaCreditoOriginal().getdigito_valido()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getdigito_valido()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getdigito_valido().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getdigito_valido()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getdigito_valido().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.DIGITOVALIDO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getdigito_tarjeta().equals(tarjetacredito.getTarjetaCreditoOriginal().getdigito_tarjeta()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getdigito_tarjeta()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getdigito_tarjeta().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getdigito_tarjeta()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getdigito_tarjeta().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.DIGITOTARJETA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getcomision().equals(tarjetacredito.getTarjetaCreditoOriginal().getcomision()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getcomision()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getcomision().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getcomision()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getcomision().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.COMISION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getinteres().equals(tarjetacredito.getTarjetaCreditoOriginal().getinteres()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getinteres()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getinteres().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getinteres()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getinteres().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.INTERES,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getmonto_minimo().equals(tarjetacredito.getTarjetaCreditoOriginal().getmonto_minimo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getmonto_minimo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getmonto_minimo().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getmonto_minimo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getmonto_minimo().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.MONTOMINIMO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getporcentaje_retencion().equals(tarjetacredito.getTarjetaCreditoOriginal().getporcentaje_retencion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getporcentaje_retencion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getporcentaje_retencion().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getporcentaje_retencion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getporcentaje_retencion().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.PORCENTAJERETENCION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getcomision_retencion().equals(tarjetacredito.getTarjetaCreditoOriginal().getcomision_retencion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getcomision_retencion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getcomision_retencion().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getcomision_retencion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getcomision_retencion().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.COMISIONRETENCION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getes_retencion_redondeo().equals(tarjetacredito.getTarjetaCreditoOriginal().getes_retencion_redondeo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getes_retencion_redondeo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getes_retencion_redondeo().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getes_retencion_redondeo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getes_retencion_redondeo().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.ESRETENCIONREDONDEO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getes_pago_banco_redondeo().equals(tarjetacredito.getTarjetaCreditoOriginal().getes_pago_banco_redondeo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getes_pago_banco_redondeo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getes_pago_banco_redondeo().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getes_pago_banco_redondeo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getes_pago_banco_redondeo().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.ESPAGOBANCOREDONDEO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getes_comision_redondeo().equals(tarjetacredito.getTarjetaCreditoOriginal().getes_comision_redondeo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getes_comision_redondeo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getes_comision_redondeo().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getes_comision_redondeo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getes_comision_redondeo().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.ESCOMISIONREDONDEO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_tipo_retencion().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_tipo_retencion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_tipo_retencion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_tipo_retencion().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_tipo_retencion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_tipo_retencion().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDTIPORETENCION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_cuenta_contable().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_cuenta_contable()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_cuenta_contable()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_cuenta_contable().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_cuenta_contable()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_cuenta_contable().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDCUENTACONTABLE,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_tipo_retencion_iva().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_tipo_retencion_iva()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_tipo_retencion_iva()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_tipo_retencion_iva().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_tipo_retencion_iva()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_tipo_retencion_iva().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDTIPORETENCIONIVA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_cuenta_contable_comision().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_cuenta_contable_comision()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_cuenta_contable_comision()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_cuenta_contable_comision().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_cuenta_contable_comision()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_cuenta_contable_comision().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDCUENTACONTABLECOMISION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_formula_pago_banco().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_formula_pago_banco()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_formula_pago_banco()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_formula_pago_banco().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_formula_pago_banco()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_formula_pago_banco().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDFORMULAPAGOBANCO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_cuenta_contable_diferencia().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_cuenta_contable_diferencia()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_cuenta_contable_diferencia()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_cuenta_contable_diferencia().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_cuenta_contable_diferencia()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_cuenta_contable_diferencia().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDCUENTACONTABLEDIFERENCIA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_formula_retencion().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_formula_retencion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_formula_retencion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_formula_retencion().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_formula_retencion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_formula_retencion().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDFORMULARETENCION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_formula_comision().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_formula_comision()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_formula_comision()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_formula_comision().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_formula_comision()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_formula_comision().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDFORMULACOMISION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t}",
"public void registraBitacoraFactura(Factura f) {\n if (f.getEsPagada()) {\n bitacoraPago.insertar(f);\n }\n }",
"private void sendRegisterMessage() {\n Message initMessage = new Message(\"register\");\n initMessage.name = name;\n sendMessage(initMessage);\n\n log(\"sent init. message:\" + initMessage);\n }",
"void register() {\n if (registerView.getFirstName().length() == 0 || registerView.getLastName().length() == 0 || registerView.getUsername().length() == 0 || registerView.getPassword().length() == 0) {\n IDialog invalidRegistrationDialog\n = dialogFactory.createDialog(DialogFactoryOptions.dialogNames.MESSAGE, new HashMap<String, Object>() {\n {\n put(\"message\", \"Unable to register: Fields must be non-empty!\");\n put(\"title\", \"Authentication Error\");\n put(\"messageType\", DialogFactoryOptions.dialogType.ERROR);\n }\n });\n\n invalidRegistrationDialog.run();\n } else {\n if (userController.registerUser(registerView.getFirstName(), registerView.getLastName(), registerView.getUsername(), registerView.getPassword()) != null) {\n mainFrame.setPanel(panelFactory.createPanel(PanelFactoryOptions.panelNames.MAIN_MENU));\n } else {\n IDialog invalidRegistrationDialog = dialogFactory.createDialog(DialogFactoryOptions.dialogNames.MESSAGE, new HashMap<String, Object>() {\n {\n put(\"message\", \"Unable to register: Username is already taken\");\n put(\"title\", \"Authentication Error\");\n put(\"messageType\", DialogFactoryOptions.dialogType.ERROR);\n }\n });\n\n invalidRegistrationDialog.run();\n }\n }\n }",
"@Override\n\t/*Método que va a ser utilizado en el momento en el que se vaya a registrar un usuario*/\n\tpublic String registrarusuario(String nombreusuario, String clave, String nombre, String apellidos, String email, float saldo, Boolean premium) {\n\t\tDBConnection con = new DBConnection();\n\t\tString mensaje=\"\"; //mensaje que se va a devolver al final de la funcion\n\t\tString sqlcomprobacionusuario=\"SELECT * from usuarios\"; //Se cojen todos los datos de los usuarios\n\t\tBoolean valido=true; //para ver si el usuario es válido\n\t\ttry {\n\t\t\tStatement st = con.getConnection().createStatement(); \n\t\t\tResultSet rscomprobacionusuario = st.executeQuery(sqlcomprobacionusuario);\n\t\t\twhile(rscomprobacionusuario.next()) {\n\t\t\t\tString nombre_usu= rscomprobacionusuario.getString(\"nombreusuario\");\n\t\t\t\tString correo= rscomprobacionusuario.getString(\"email\");\n\t\t\t\tif(nombre_usu.equals(nombreusuario) || correo.equals(email)) {\n\t\t\t\t\tvalido=false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*En caso de que el usuario sea válido se procederá a insertarlo en la BD como un nuevo usuario de la aplicación*/\n\t\t\tif(valido) {\n\t\t\t\tString sql =\"Insert into usuarios(nombreusuario,clave,nombre,apellidos,email,saldo,premium) VALUES('\" +nombreusuario+\"','\" +clave+\"','\" +nombre+\"','\"+apellidos+\"','\"+email+\"',\"+saldo+\",'\"+premium+\"')\";\n\t\t\t\tst.executeQuery(sql);\n\t\t\t\tst.close();\n\t\t\t\tmensaje=\"ok\"; //se establece el mensaje que se va a devolver como ok\n\t\t\t}else{\n\t\t\t\tmensaje=\"not ok\"; //mensaje pasa a ser not ok ya que el usuario no era valido\n\t\t\t\t}\n\t\t\t\n\t\t\treturn mensaje;\n\t\t\t}\n\t\t\tcatch(Exception e) {\n\t\t\t\treturn e.getMessage();\n\t\t\t}finally {\n\t\t\t\tcon.desconectar();\n\t\t\t}\n\t }",
"public void cadastrarUsuario(final Usuario usuario){\n mAuth = ConfiguracaoFirebase.getFirebaseAuth();\n mAuth.createUserWithEmailAndPassword(\n usuario.getEmail(),usuario.getSenha()\n ).addOnCompleteListener(\n this, new OnCompleteListener<AuthResult>() {\n //Verifica exceções e se o usuário se cadastrou\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n Toast.makeText(getApplicationContext(),\"Usuário cadastrado com sucesso!\",Toast.LENGTH_SHORT).show();\n finish();\n //Convertendo email em base 64 para ser usado como uidPessoa\n try {\n String identificadorUsuario = Base64Custom.codificarBase64(FirebaseAuth.getInstance().getCurrentUser().getEmail());\n usuario.setUidPessoa(identificadorUsuario);\n usuario.setNome(FirebaseAuth.getInstance().getCurrentUser().getDisplayName());\n usuario.setEmail(FirebaseAuth.getInstance().getCurrentUser().getEmail());\n usuario.setPontos(1);\n usuario.salvar();\n cadastrarUsuario(usuario);\n logarUsuario(usuario);\n abrirTelaPrincipal();\n }catch (Exception e){\n e.printStackTrace();\n }\n }else {String excecao = \"\";\n try{\n throw task.getException();\n\n }catch (FirebaseAuthWeakPasswordException e){\n excecao = \"Digite uma senha forte!\";\n }catch (FirebaseAuthInvalidCredentialsException e){\n excecao = \"Por favor, digite um e-mail válido\";\n }catch (FirebaseAuthUserCollisionException e){\n excecao = \"esta conta já está cadastrada\";\n }catch (Exception e){\n excecao = \"Erro ao cadastrar usuário\" + e.getMessage();\n e.printStackTrace();\n }\n Toast.makeText(getApplicationContext(),excecao,Toast.LENGTH_SHORT).show();\n }\n }\n });\n }",
"protected void agregarUbicacion(){\n\n\n\n }",
"public void register(RegistrationDTO p) throws UserExistException {\n userLogic.register((Person) p);\n }",
"private static void registrarAuditoriaDetallesPlantillaFactura(Connexion connexion,PlantillaFactura plantillafactura)throws Exception {\n\t\t\r\n\t\tString strValorActual=null;\r\n\t\tString strValorNuevo=null;\r\n\t\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_empresa().equals(plantillafactura.getPlantillaFacturaOriginal().getid_empresa()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_empresa().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_empresa().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDEMPRESA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getcodigo().equals(plantillafactura.getPlantillaFacturaOriginal().getcodigo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getcodigo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getcodigo();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getcodigo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getcodigo() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.CODIGO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getnombre().equals(plantillafactura.getPlantillaFacturaOriginal().getnombre()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getnombre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getnombre();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getnombre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getnombre() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.NOMBRE,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getdescripcion().equals(plantillafactura.getPlantillaFacturaOriginal().getdescripcion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getdescripcion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getdescripcion();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getdescripcion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getdescripcion() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.DESCRIPCION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getes_proveedor().equals(plantillafactura.getPlantillaFacturaOriginal().getes_proveedor()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getes_proveedor()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getes_proveedor().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getes_proveedor()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getes_proveedor().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.ESPROVEEDOR,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_cuenta_contable_aplicada().equals(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_aplicada()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_aplicada()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_aplicada().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_cuenta_contable_aplicada()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_cuenta_contable_aplicada().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDCUENTACONTABLEAPLICADA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_cuenta_contable_credito_bien().equals(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_credito_bien()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_credito_bien()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_credito_bien().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_cuenta_contable_credito_bien()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_cuenta_contable_credito_bien().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDCUENTACONTABLECREDITOBIEN,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_cuenta_contable_credito_servicio().equals(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_credito_servicio()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_credito_servicio()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_credito_servicio().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_cuenta_contable_credito_servicio()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_cuenta_contable_credito_servicio().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDCUENTACONTABLECREDITOSERVICIO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_tipo_retencion_fuente_bien().equals(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_fuente_bien()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_fuente_bien()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_fuente_bien().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_tipo_retencion_fuente_bien()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_tipo_retencion_fuente_bien().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDTIPORETENCIONFUENTEBIEN,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_tipo_retencion_fuente_servicio().equals(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_fuente_servicio()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_fuente_servicio()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_fuente_servicio().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_tipo_retencion_fuente_servicio()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_tipo_retencion_fuente_servicio().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDTIPORETENCIONFUENTESERVICIO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_tipo_retencion_iva_bien().equals(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_iva_bien()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_iva_bien()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_iva_bien().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_tipo_retencion_iva_bien()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_tipo_retencion_iva_bien().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDTIPORETENCIONIVABIEN,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_tipo_retencion_iva_servicio().equals(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_iva_servicio()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_iva_servicio()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_iva_servicio().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_tipo_retencion_iva_servicio()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_tipo_retencion_iva_servicio().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDTIPORETENCIONIVASERVICIO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_cuenta_contable_gasto().equals(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_gasto()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_gasto()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_gasto().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_cuenta_contable_gasto()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_cuenta_contable_gasto().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDCUENTACONTABLEGASTO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t}",
"private void registrarSolicitudOficioBien(SolicitudOficioBienDTO solicitudOficioBienDTO) {\n\n // Fecha solicitud\n solicitudOficioBienDTO.setFechaSolicitud(Calendar.getInstance().getTime());\n SolicitudOficioBien solicitudOficioBien = SolicitudOficioBienHelper.toLevel1Entity(solicitudOficioBienDTO,\n null);\n em.persist(solicitudOficioBien);\n solicitudOficioBienDTO.setId(solicitudOficioBien.getId());\n // Solicitud bien entidad\n for (SolicitudBienEntidadDTO solicitudBienEntidadDTO : solicitudOficioBienDTO.getSolicitudBienEntidadDTOs()) {\n solicitudBienEntidadDTO.setSolicitudOficioBienDTO(solicitudOficioBienDTO);\n registrarSolicitudBienEntidad(solicitudBienEntidadDTO);\n }\n }",
"@SuppressWarnings(\"static-access\")\n\t@Test\n\tpublic void testRegistraEmpleado() throws Exception {\n\t\tString guid = uid.generateGUID(altaEmpleado);\n\t\ttry {\n\t\t\tdataEmpleado.registraEmpleado(altaEmpleado);\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\tLogHandler.debug(guid, this.getClass(), \"Error\");\n\t\t}\n\t}",
"@Override\n\tpublic String createAccount() {\n\t\treturn \"Created Saving Account Sucessfully\";\n\t}",
"public void processRegistration() {\n try {\n System.out.println(\"Processing Registration\");\n FacesContext c = FacesContext.getCurrentInstance();\n c.getApplication().getNavigationHandler().handleNavigation(c, null, \"register.xhtml\");\n } catch (Exception ex) {\n System.out.println(ex.getMessage());\n }\n }",
"public void premutoRegistrati()\n\t{\n\t\tnew _FINITO_funzione_registrazioneGUI();\n\t}",
"boolean registrarUsuario(Usuario usuario) throws Exception;",
"private void registrar(HttpServletRequest request, HttpServletResponse response) throws ServletException {\n\t\ttry {\n\t\t\t//leo lo que nos envia el formulario de la vista nuevoCliente.jsp y los almaceno en un objeto tipo Cliente\n\t\t\tCliente miCliente = new Cliente();\n\t\t\t\t\n\t\t\t//agregamos al objeto lo que proviene del formulario usando el constructor de clase Cliente\n\t\t\tmiCliente.setNombre(request.getParameter(\"nombre\"));\n\t\t\tmiCliente.setEmail(request.getParameter(\"email\"));\n\t\t\tmiCliente.setPass(request.getParameter(\"password\"));\n\t\t\tmiCliente.setEdad(Integer.parseInt(request.getParameter(\"edad\")));\n\t\t\tmiCliente.setDomicilioCalle(request.getParameter(\"domicilioCalle\"));\n\t\t\tmiCliente.setDomicilioNumero(Integer.parseInt(request.getParameter(\"domicilioNumero\")));\n\t\t\tmiCliente.setLocalidad(request.getParameter(\"localidad\"));\n\t\t\t\n\t\t\t//seteamos la fecha/hora de sesion\n\t\t\tDate d=new Date();\n\t\t\tSimpleDateFormat sdf=new SimpleDateFormat(\"yy-MM-dd hh:mm:ss\");//objeto tipo formato de fecha. Le pasamos el formato de la fecha\n\t\t\tString ultimaSesion=sdf.format(d);\n\t\t\tmiCliente.setUltimaSesion(ultimaSesion);\n\t\t\t\n\t\t\tmiCliente.setIdUsuario(Integer.parseInt(request.getParameter(\"idUsuario\")));//seteo el valor 2 que viene oculto desde el form\n\t\t\t\n\t\t\t//llamo al modelo para hacer el INSERT verfico si pudo insertar\n\t\t\tif(modelo.crearCliente(miCliente)) {\n\t\t\t\tresponse.getWriter().println(\"Usted se ha registrado Correctamente\");\n\t\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\tresponse.getWriter().println(\"No se pudo efectuar registrar\");\n\t\t\t\t}\n\t\t} catch (NumberFormatException | NoSuchAlgorithmException | SQLException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void registrarCompraIngrediente(String nombre, int cantidad, int precioCompra, int tipo) {\n //Complete\n }",
"public void registrarTema() {\n\t\ttemaEJB.crearTema(tema);\n\t\tlimpiarCampos();\n\t\tlistaTemas();\n\t}",
"@Override\r\n\tpublic void guardar() {\n\t\ttab_cuenta.guardar();\r\n\t\tguardarPantalla();\r\n\t\t\r\n\t}",
"@RequestMapping(value={\"/register\"}, method = RequestMethod.POST)\n public String registeraccount(@Valid User user,\n \t\tBindingResult result,\n \t\tModel model,\n \t\tHttpServletRequest request) {\n\n \t//titulo de la ventana\n \tmodel.addAttribute(\"title\", messages.getMessage(\"text.register.tittle\", null, LocaleContextHolder.getLocale()));\n \t\n \t//si hay un error al validar\n if (result.hasErrors()) {\n\t return \"aplication/register\";\n\t \n //si la cuenta ya existe\n } else if (userDao.findByUserName(user.getUsername()) != null){\n\t model.addAttribute(\"error\", messages.getMessage(\"text.register.error.accountexists\", null, LocaleContextHolder.getLocale()));\n\t return \"aplication/register\";\n \n //si el correo ya existe\n } else if (userDao.findEmail(user.getEmail()) != null) {\n model.addAttribute(\"error\", messages.getMessage(\"text.register.error.emailexists\", null, LocaleContextHolder.getLocale()));\n return \"aplication/register\";\n \n //si el correo no es valido\n } else if (!esEmailCorrecto(user.getEmail())) {\n model.addAttribute(\"error\", messages.getMessage(\"text.register.error.emailinvalid\", null, LocaleContextHolder.getLocale()));\n return \"aplication/register\";\n \n //si tiene mas de x caracteres la contraseña\n } else if (user.getPassword().length() > User.passwordmax) {\n \tmodel.addAttribute(\"error\", messages.getMessage(\"text.register.error.passwordmaxone\", null, LocaleContextHolder.getLocale()) + \" \" + User.passwordmax + \" \" + messages.getMessage(\"text.register.error.passwordmaxtwo\", null, LocaleContextHolder.getLocale()));\n \treturn \"aplication/register\";\n \t\n //si todo es valido\n }else {\n \t\n \t//codificamos la contraseña\n PasswordEncoder encode = paswordncoder();\n user.setPassword(encode.encode(user.getPassword()));\n \n //configuramos la cuenta\n user.setEnabled(false);\n user.setNotLocker(true);\n user.setSystenBan(false);\n \n try {\n //enviamos el correo de activar cuenta\n eventPublisher.publishEvent(new OnRegistrationCompleteEvent(user, \n \t\tLocaleContextHolder.getLocale(), request.getContextPath()));\n } catch (Exception e) {\n user.setEnabled(true);\n }\n \n userDao.save(user);\n \n \n \n //hacemos que se siga a si mismo\n followDao.save(new Follow(user, user));\n \n \n \n \n //le añadimos su rol\n UserAuthority au = new UserAuthority();\n au.setUser(user);\n au.setAuthority(authorityDao.findByName(\"user\"));\n userAuthorityDao.save(au);\n \n \n return \"redirect:/login?register\"; \n }\n }",
"@Test(priority = 1, alwaysRun = true)\n\n\tpublic void usercanregistersuccessfully() {\n\t\thomeobject = new HomePage(driver);\n\t\thomeobject.openregisterpage();\n\t\t// take object mn el method elmowgoda fy home page\n\t\tregistrationobject = new UserRegisteration(driver);\n\t\tregistrationobject.userregisteration( firstname, lastname, email, password);\n\n\t\t// validate the scenario\n\t\tAssert.assertTrue(registrationobject.successmessage.getText().contains(\"Your registration completed\"));\n\t}",
"private void registrarResidencia(Residencias residencia) {\n\t\t\t\t\t\t\t\t\n\t\tResidenciasobservaciones observacion = residencia.getResidenciasobservaciones();\t\n\t\t\t\t\n\t\tif(observacion==null) {\t\t\t\n\t\t\thibernateController.insertResidencia(residencia);\n\t\t\t\n\t\t}else {\t\t\t\n\t\t\thibernateController.insertResidenciaObservacion(residencia, observacion);\t\t\n\t\t}\n\t\t\n\t\tupdateContent();\t\n\t\t\n\t}",
"@Override\n public void makatizenDataSuccess(final MakatizenAccount makatizenAccount) {\n MakahanapAccount newAccount = new MakahanapAccount();\n newAccount.setPassword(mRegisterPasswordEt.getText().toString());\n newAccount.setMakatizenNumber(makatizenAccount.getMakatizenNumber());\n newAccount.setFirstName(makatizenAccount.getFirstName());\n newAccount.setMiddleName(makatizenAccount.getMiddleName());\n newAccount.setLastName(makatizenAccount.getLastName());\n newAccount.setAge(makatizenAccount.getAge());\n newAccount.setAddress(makatizenAccount.getAddress());\n newAccount.setGender(makatizenAccount.getGender());\n newAccount.setCivilStatus(makatizenAccount.getCivilStatus());\n newAccount.setContactNumber(makatizenAccount.getContactNumber());\n newAccount.setEmailAddress(makatizenAccount.getEmailAddress());\n newAccount.setProfileImageUrl(makatizenAccount.getProfileImageUrl());\n\n //Continue Register to Makahanap\n mPresenter.registerAccount(newAccount);\n }",
"public void registrar(JugadorXJugadorVO fila, DbConnection connection)\n\t\t\tthrows SQLException, ClassNotFoundException {\n\t\ttry {\n\t\t\tStatement statement = connection.getConnection().createStatement();\n\t\t\tstatement.executeUpdate(\"INSERT INTO jugadorxjugador VALUES ('\"\n\t\t\t\t\t+ fila.getId() + \"', '\" + fila.getId2() + \"')\");\n\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\"Se ha registrado Exitosamente\", \"Información\",\n\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\n\t\t\tstatement.close();\n//\t\t\tconnection.close();\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\"No se pudo registrar al jugador\");\n\t\t}\n\t}",
"public void guardarSolicitud() {\n Map<String, String> paramMap = getParametrosSesion();\n String cadenaFirmada;\n try {\n if (paramMap != null) {\n cadenaFirmada = paramMap.get(firmaFormHelper.FIRMA_DIGITAL);\n firmaFormHelper.setSelloDigital(paramMap.get(FirmaFormHelper.FIRMA_DIGITAL));\n\n SimpleDateFormat formato = new SimpleDateFormat(\"dd/MM/yyyy\");\n produccion.setFechProduccion(new Date());\n desperdiciosHelper.setFechaAcuse(formato.format(produccion.getFechProduccion()));\n\n if (cadenaFirmada.length() > 0) {\n guardarRangosFolios();\n Acuse acuse = new Acuse();\n acuse.setSerieAcuse(TipoAcuse.DESPERDICIO);\n acuse.setIdProveedor(produccionCigarrosHelper.getProveedor().getIdProveedor());\n acuse.setSelloDigital(firmaFormHelper.getSelloDigital());\n acuse.setCadenaOriginal(firmaFormHelper.getCadenaOriginal());\n acuse.setFecCaptura(new Date());\n desperdiciosHelper.setIdAcuseRecibo(commonService.crearAcuse(acuse));\n habilitarPnlAcuse();\n registroMovimientoBitacora(getSession(), IdentificadorProcesoEnum.CONTRIBUYENTE_TRAMITES, new Date(), new Date(), MovimientosBitacoraEnum.DESPERDICIOS_DESTRUCCION);\n } else {\n habilitarPnlPrincipal();\n }\n }\n } catch (CommonServiceException e) {\n LOGGER.error(e.getMessage(), e);\n addErrorMessage(ERROR, \"No se pudo generar el acuse\");\n } catch (Exception ex) {\n LOGGER.error(ex.getMessage());\n }\n }",
"@Override\n\tpublic SipProtecciones registrarProteccion(ParamRegistroProtecciones param) {\n\t\tthrow new RuntimeExceptionSipas(\"Metodo no implementado\");\n\t}",
"public String registrarActividad(){\n\t\tFacesContext context = FacesContext.getCurrentInstance();\n\t\tBloque bloque = context.getApplication().evaluateExpressionGet(context, \"#{bloque}\", Bloque.class);\n\t\tActividad actividad = context.getApplication().evaluateExpressionGet(context, \"#{actividad}\", Actividad.class);\n\t\tEncargado encargado = context.getApplication().evaluateExpressionGet(context, \"#{encargado}\", Encargado.class);\n\t\t\n\t\ttry {\n\t\t\tactividad.registrarActividad();\n\t\t\tactividad.registrarActividad_Bloque(bloque.getTematica());\n\t\t\tactividad.registrarActividad_Encargado(encargado.getCedula());\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\t\t\t\t\n\t\t// put the user object into the POST request \n\t\tFacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"actividad\", actividad);\n\t\t\n\t\treturn \"principalAdministrador.xhtml\";\n\t}",
"private void attemptRegister() {\n\n // Reinicia los errores de los EditText\n mEditEmail.setError(null);\n mEditFirstName.setError(null);\n mEditLastName.setError(null);\n mEditPassword.setError(null);\n mEditPasswordConfirm.setError(null);\n\n // Obtiene los valores ingresados por el usuario\n String email = Utils.checkEditTextForEmpty(getContext(),mEditEmail);\n String firstName = Utils.checkEditTextForEmpty(getContext(),mEditFirstName);\n String lastName = Utils.checkEditTextForEmpty(getContext(),mEditLastName);\n String password = Utils.checkEditTextForEmpty(getContext(),mEditPassword);\n String passwordConfirm = Utils.checkEditTextForEmpty(getContext(),mEditPasswordConfirm);\n\n //Revisa si hay valor vacío\n if (email == null || firstName == null || lastName == null || password == null || passwordConfirm == null) {\n return;\n }\n\n // Valida el correo\n if (!email.contains(\"@\")) {\n mEditEmail.setError(getString(R.string.error_invalid_email));\n mEditEmail.requestFocus();\n return;\n }\n\n // Valida la contraseña\n if (password.length() < 3) {\n mEditPassword.setError(getString(R.string.error_invalid_password));\n mEditPassword.requestFocus();\n return;\n }\n\n //Valida que las contraseñas hagan match\n if (!password.equals(passwordConfirm)) {\n mEditPasswordConfirm.setError(getString(R.string.error_invalid_password_confirmation));\n mEditPasswordConfirm.requestFocus();\n return;\n }\n\n // Intenta crear la cuenta\n Toast.makeText(getContext(), \"Bienvenido\", Toast.LENGTH_LONG).show();\n }",
"@Override\n\tpublic RegistroHuellasDigitalesDto registrarHuellaDigitalSistemaContribuyente(RegistroHuellasDigitalesDto pSolicitud) {\n\t\tLOG.info(\"Ingresando registrarHuellaDigitalSistemaContribuyente\"+pSolicitud.getCrc()+\" \"+pSolicitud.getArchivo()+ \" \");\n\t\tRegistroHuellasDigitalesDto vRespuesta = new RegistroHuellasDigitalesDto();\n\t\tvRespuesta.setOk(false);\n\t\ttry {\t\t\t\t\n\t\t\tValRegistroHuellaServiceImpl vValRegistroArchivo = new ValRegistroHuellaServiceImpl(mensajesDomain);\n\t\t\tvValRegistroArchivo.validarSolicitudRegistroHuellaDigital(pSolicitud);\t\n\t\t\tif (vValRegistroArchivo.isValido()) {\t\t\t\n\t\t\t\tSreArchivosTmp vResultadoArchivo = iArchivoTmpDomain.registrarArchivos(pSolicitud.getArchivo());\n\t\t\t\tSystem.out.println(\"Archivo registrado\"+vResultadoArchivo.getArchivoId());\n\t\t\t\tif (vResultadoArchivo.getArchivoId() !=null && vResultadoArchivo.getArchivoId() != null) {\n\t\t\t\t\tSreComponentesArchivosTmp vResultadoComponenteArchivo = iComponentesArchivosTmpDomain.registrarComponentesArchivos(pSolicitud.getUsuarioId(),vResultadoArchivo.getArchivoId(), pSolicitud.getMd5(),pSolicitud.getSha2(), pSolicitud.getCrc(),pSolicitud.getRutaArchivo(),pSolicitud.getNombre(),\"\");\n\t\t\t\t\tSystem.out.println(\"Datos recuperados \"+vResultadoComponenteArchivo.getComponenteArchivoTmpId());\n\t\t\t\tif (vResultadoComponenteArchivo.getComponenteArchivoTmpId() > 0 && vResultadoComponenteArchivo.getComponenteArchivoTmpId() != null) {\t\t\t\t\t\t\n\t\t\t\t\tboolean vResultadoCertificado = iComponentesCertificadosTmpDomain.registrarComponentesCertificados(pSolicitud.getTipoComponenteId(), vResultadoComponenteArchivo.getComponenteArchivoTmpId(), pSolicitud.getUsuarioId(),pSolicitud.getSistemaId());\n\t\t\t\t\tif (vResultadoCertificado) {\n\t\t\t\t\t\t\tLOG.info(\"Registro exitoso\");\n\t\t\t\t\t\t\tvRespuesta.setOk(true);\n\t\t\t\t\t\t\tvRespuesta.addMensaje(mensajesDomain.getMensaje(EnumSubsistema.RECAUDACIONES,EnumFacturacionTipoMensaje.RECUPERACION_SOLICITUD_CERTIFICACION_EXITOSO));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tLOG.info(\"Registro NO exitoso\");\n\t\t\t\t\t\t\tvRespuesta.addMensaje(mensajesDomain.getMensaje(EnumSubsistema.RECAUDACIONES,EnumFacturacionTipoMensaje.REGISTRO_SOLICITUD_CERTIFICACION_ERROR));\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvRespuesta.addMensaje(mensajesDomain.getMensaje(EnumSubsistema.RECAUDACIONES,EnumFacturacionTipoMensaje.REGISTRO_SOLICITUD_CERTIFICACION_ERROR));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tvRespuesta.addMensaje(mensajesDomain.getMensaje(EnumSubsistema.RECAUDACIONES,EnumFacturacionTipoMensaje.REGISTRO_SOLICITUD_CERTIFICACION_ERROR));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tvRespuesta.setMensajes(vValRegistroArchivo.getMensajes());\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLogExcepcion.registrar(e, LOG, MethodSign.build(vRespuesta));\n\t\t\tLOG.info(\"Error al realizar el guardado de datos\");\n\t\t\tvRespuesta.addMensaje(mensajesDomain.getMensaje(EnumSubsistema.RECAUDACIONES,EnumFacturacionTipoMensaje.REGISTRO_SOLICITUD_CERTIFICACION_ERROR));\n\t\t}\n\t\tLOG.info(\"Saliendo registrarHuellaDigitalSistemaContribuyente vRespuesta={}\", vRespuesta);\n\t\treturn vRespuesta;\n\t}",
"public static void registrarAuditoria(Connexion connexion,Long idUsuario,Caja caja,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(CajaConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tif(caja.getIsNew()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,CajaDataAccess.TABLENAME, caja.getId(), Constantes.SAUDITORIAINSERTAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(CajaConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////CajaLogic.registrarAuditoriaDetallesCaja(connexion,caja,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(caja.getIsDeleted()) {\r\n\t\t\t\t\t/*if(!caja.getIsExpired()) {\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.RegistrarNuevaAuditoria(Constantes.getLOidSistemaActual(),idUsuario,CajaDataAccess.TABLENAME, caja.getId(), Constantes.getSAuditoriaEliminarLogicamente(),\"\",sUsuarioPC,sNamePC,sIPPC,Timestamp.valueOf(Funciones.getStringMySqlCurrentDateTime()),\"\");\r\n\t\t\t\t\t\t////CajaLogic.registrarAuditoriaDetallesCaja(connexion,caja,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t} else {*/\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,CajaDataAccess.TABLENAME, caja.getId(), Constantes.SAUDITORIAELIMINARFISICAMENTE,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t//}\r\n\t\t\t\t} else if(caja.getIsChanged()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,CajaDataAccess.TABLENAME, caja.getId(), Constantes.SAUDITORIAACTUALIZAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(CajaConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////CajaLogic.registrarAuditoriaDetallesCaja(connexion,caja,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}",
"public void register()\n {\n String n = nameProperty.getValue();\n if (n == null || n.isEmpty())\n {\n throw new IllegalArgumentException(\"Field cannot be empty\");\n }\n String p = passwordProperty.getValue();\n if (p == null || p.isEmpty())\n {\n throw new IllegalArgumentException(\"Field cannot be empty\");\n }\n String e = emailProperty.getValue();\n if (e == null || e.isEmpty())\n {\n throw new IllegalArgumentException(\"Field cannot be empty\");\n }\n String ph = phoneProperty.getValue();\n if (ph == null || ph.isEmpty())\n {\n throw new IllegalArgumentException(\"Field cannot be empty\");\n }\n if (ph.length() != 8)\n {\n throw new IllegalArgumentException(\"Invalid phone number\");\n }\n try\n {\n Integer.parseInt(ph);\n }\n catch (NumberFormatException ex)\n {\n throw new IllegalArgumentException(\"Invalid phone number\", ex);\n }\n String t = titleProperty.getValue();\n if (t == null || t.isEmpty())\n {\n throw new IllegalArgumentException(\"Field cannot be empty\");\n }\n String a = authorProperty.getValue();\n if (a == null || a.isEmpty())\n {\n throw new IllegalArgumentException(\"Field cannot be empty\");\n }\n String y = yearProperty.getValue();\n if (y == null || y.isEmpty())\n {\n throw new IllegalArgumentException(\"Field cannot be empty\");\n }\n if (y.length() != 4)\n {\n throw new IllegalArgumentException(\"Invalid year\");\n }\n try\n {\n Integer.parseInt(y);\n }\n catch (NumberFormatException ex)\n {\n throw new IllegalArgumentException(\"Invalid year\", ex);\n }\n\n try\n {\n\n model.registerUser(n, p, e, ph, t, a, y);\n\n }\n catch (Exception e1)\n {\n\n e1.printStackTrace();\n }\n\n }",
"public static void registrarAuditoria(Connexion connexion,Long idUsuario,ClienteArchivo clientearchivo,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(ClienteArchivoConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tif(clientearchivo.getIsNew()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,ClienteArchivoDataAccess.TABLENAME, clientearchivo.getId(), Constantes.SAUDITORIAINSERTAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(ClienteArchivoConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////ClienteArchivoLogic.registrarAuditoriaDetallesClienteArchivo(connexion,clientearchivo,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(clientearchivo.getIsDeleted()) {\r\n\t\t\t\t\t/*if(!clientearchivo.getIsExpired()) {\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.RegistrarNuevaAuditoria(Constantes.getLOidSistemaActual(),idUsuario,ClienteArchivoDataAccess.TABLENAME, clientearchivo.getId(), Constantes.getSAuditoriaEliminarLogicamente(),\"\",sUsuarioPC,sNamePC,sIPPC,Timestamp.valueOf(Funciones.getStringMySqlCurrentDateTime()),\"\");\r\n\t\t\t\t\t\t////ClienteArchivoLogic.registrarAuditoriaDetallesClienteArchivo(connexion,clientearchivo,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t} else {*/\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,ClienteArchivoDataAccess.TABLENAME, clientearchivo.getId(), Constantes.SAUDITORIAELIMINARFISICAMENTE,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t//}\r\n\t\t\t\t} else if(clientearchivo.getIsChanged()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,ClienteArchivoDataAccess.TABLENAME, clientearchivo.getId(), Constantes.SAUDITORIAACTUALIZAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(ClienteArchivoConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////ClienteArchivoLogic.registrarAuditoriaDetallesClienteArchivo(connexion,clientearchivo,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}",
"public String gravar(){\n\t\tSystem.out.println(\"\\n*** Gravando Registro\\n\");\n\t\ttry{\n\t\t\tpacienteService.gravar(getPaciente());\n\t\t\tatualizarTela();\n\t\t\tFacesContext facesContext = FacesContext.getCurrentInstance();\n\t\t\tfacesContext.addMessage(null, new FacesMessage(\"Registro Cadastrado com Sucesso!!\")); //Mensagem de validacao \n\t\t\t\n\t\t}catch(Exception e){\n\t\t\tatualizarTela();\n\t\t\tFacesContext facesContext = FacesContext.getCurrentInstance();\n\t\t\tfacesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, \"Erro ao registrar o paciente: \"+e.getMessage(), \"\")); //Mensagem de erro \n\t\t}\n\t\treturn null;\n\t}",
"public void registrarPreguntaRespuesta() throws SolrServerException, IOException{\n \tregistrarBaseDatosRedis(); //Registra en la base de datos.\n \tregistrarEnWatson(); // Entrena el servicio de watson.\n }",
"@Test(priority=1, dataProvider=\"User Details\")\n\t\tpublic void registration(String firstname,String lastname,String emailAddress,\n\t\t\t\tString telephoneNum,String address1,String cityName,String postcodeNum,\n\t\t\t\tString country,String zone,String pwd,String confirm_pwd) throws Exception{\n\t\t\t\n\t\t\thomePage = new HomePage(driver);\n//'**********************************************************\t\t\t\n//Calling method to click on 'Create Account' link\n\t\t\tregistraionPageOC = homePage.clickCreateAccount();\n//'**********************************************************\t\t\t\n//Calling method to fill user details in Registration page and verify account is created\n\t\t\tregistraionPageOC.inputDetails(firstname,lastname,emailAddress,telephoneNum,address1,cityName,postcodeNum,country,zone,pwd,confirm_pwd);\n\t\t\ttry{\n\t\t\tAssert.assertEquals(\"Your Account Has Been Created!\", driver.getTitle(),\"Titles Not Matched: New Account Not Created\");\n\t\t\textentTest.log(LogStatus.PASS, \"Registration: New User Account is created\");\n\t\t\t}catch(Exception e){\n\t\t\t\textentTest.log(LogStatus.FAIL, \"Registration is not successful\");\n\t\t\t}\n\t\t}",
"@Override\n protected void onSubmit()\n {\n final ApplicationUser appUser = (ApplicationUser) getModelObject();\n UserRegistration userRegistration = new UserRegistration(appUser.getBusinessUser());\n paramUserId = userRegistration.getUserId();\n //paramDateTime = userRegistration.getRequestTimeAsString();\n //paramToken = userRegistration.getMailToken();\n\n // Note: Dccd does not use a validation Page!\n\n\t\t\t// Construct the url for the activation of member and/or organisation\n\t\t\tMap<String, String> parameterMap = new HashMap<String, String>();\n\t\t\tparameterMap.put(\"userId\", paramUserId);\n\t\t\tparameterMap.put(\"inEditMode\", \"0\"); // activation button is placed on non-edit page!\n\t\t\tparameterMap.put(\"enableModeSwitch\", \"1\");\n\t\t\tfinal String activationUrl = createPageURL(MemberPage.class, parameterMap);\n\t\t\tuserRegistration.setActivationUrl(activationUrl);\n\t\t\tlogger.debug(\"activationUrl: \" + activationUrl);\n\n if (isOrganisationEdit())\n {\n \tlogger.debug(\"new Organisation must now be registered\");\n \tassert(null != newOrganisation);\n \t// Also register the new organisation\n \tlogger.debug(\"New organistation: \" + newOrganisation.getId());\n \tOrganisationRegistration organisationRegistration =\n \t\tnew OrganisationRegistration(newOrganisation);\n\n \tuserRegistration.setOrganisation(newOrganisation);\n \tDccdUserService.getService().handleRegistrationRequest(userRegistration, organisationRegistration);\n\n \tif (!organisationRegistration.isCompleted())\n \t{\n \t\t// something went wrong!\n \tlogger.debug(\"Could not complete organisation registration\");\n for (String stateKey : organisationRegistration.getAccumulatedStateKeys())\n {\n //error(getString(stateKey));\n \t// allow for substitution\n error(getString(stateKey, new Model(organisationRegistration)));\n }\n \t}\n }\n else\n {\n \tuserRegistration.setOrganisation(selectedOrganisation);\n \tuserRegistration = DccdUserService.getService().handleRegistrationRequest(userRegistration);\n }\n\n if (userRegistration.isCompleted())\n {\n disableForm(new String[] {});\n info(getString(\"missionAccomplished\", new Model(appUser)));\n //setResponsePage(new InfoPage(getString(\"registrationpage.header\")));\n // use specific page for the confirmation\n setResponsePage(new RegistrationConfirmPage(appUser));\n }\n else\n {\n \tlogger.debug(\"Could not complete user registration\");\n for (String stateKey : userRegistration.getAccumulatedStateKeys())\n {\n error(getString(stateKey));\n }\n }\n logger.debug(\"End onSubmit: \" + userRegistration.toString());\n }",
"public String registrarExtra(){\n\t\tFacesContext context = FacesContext.getCurrentInstance();\n\t\tActividad actividad = context.getApplication().evaluateExpressionGet(context, \"#{actividad}\", Actividad.class);\n\t\tEncargado encargado = context.getApplication().evaluateExpressionGet(context, \"#{encargado}\", Encargado.class);\n\t\t\n\t\ttry {\n\t\t\tactividad.registrarActividad_Encargado(encargado.getCedula());\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\t\t\t\t\n\t\t// put the user object into the POST request \n\t\tFacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"actividad\", actividad);\n\t\t\n\t\treturn \"principalAdministrador.xhtml\";\n\t}",
"protected void proccesValues() {\n Users user = new Users();\n user.setName(bean.getName());\n user.setSurname(bean.getSurname());\n user.setUsername(bean.getUsername());\n StrongPasswordEncryptor passwordEncryptor = new StrongPasswordEncryptor();\n String encryptedPassword = passwordEncryptor.encryptPassword(bean.getPassword());\n user.setPassword(encryptedPassword);\n \n usersService.persist(user);\n Notification.show(msgs.getMessage(INFO_REGISTERED), Notification.Type.ERROR_MESSAGE);\n resetValues();\n UI.getCurrent().getNavigator().navigateTo(ViewLogin.NAME);\n }",
"protected abstract void registerUser(Map<String, String> registrationInfo);",
"private final static void onRegister(TextField username, TextField email, PasswordField password, PasswordField passwordAgain)\n\t{\n\t\t// TODO no password = passwordAgain check\n\t\t// TODO check if username exists\n\t\t// TODO check if email exists\n\n\t\tint id = ProfileManipulation.getHighestId(\"Profile\", true);\n\t\tProfileManipulation.registerUser(id, username.getText(), email.getText(),\n\t\t\t\tpassword.getText());\n\t\tPartylize.setUsername(username.getText());\n\t\tPartylize.showMainScene();\n\t}",
"public RegistrationInfo getRegistrationInfo();",
"private void Register(String mailSTR, String passwordSTR, String fNameSTR, String lNameSTR, String citySTR, String phoneNumberSTR) throws Exception {\n mAuth.createUserWithEmailAndPassword(mailSTR, passwordSTR)\n .addOnCompleteListener(task -> {\n if (task.isSuccessful()) {\n final Map<String, Object>[] dataToSave = new Map[]{new HashMap<String, Object>()};\n dataToSave[0].put(constants.FIRST_NAME, fNameSTR);\n dataToSave[0].put(constants.SEC_NAME, lNameSTR);\n dataToSave[0].put(constants.CITY, citySTR);\n dataToSave[0].put(constants.EMAIL, mailSTR);\n dataToSave[0].put(constants.PHONE, phoneNumberSTR);\n dataToSave[0].put(constants.VOLUNTEER, \"false\");\n\n\n FirebaseDatabase.getInstance().getReference(constants.DOC_REF_USERS)\n //here we creating users folder in real time data baes , getting uid from user and storing the data in folder named by id\n .child(Objects.requireNonNull(FirebaseAuth.getInstance().getCurrentUser()).getUid())\n .setValue(dataToSave[0]).addOnCompleteListener(task1 -> {\n if (task1.isSuccessful()) {\n Toast.makeText(register2.this,\n R.string.register_toast_success, Toast.LENGTH_LONG).show();\n {//adds all new data for newely registered clients\n dayTime dtDEF = new dayTime(0, 0, 23, 59);//default for first time\n Gson gson = new Gson();\n SharedPreferences sp = getSharedPreferences(constants.SHARED_PREFS,\n Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sp.edit();\n String dayDEF = gson.toJson(dtDEF);\n Map<String, String> docData = new HashMap<>();\n for (String day : constants.daysNames) {\n docData.put(day, dayDEF);\n editor.putString(day, dayDEF);\n }\n docData.put(constants.rangeChoice, \"\" + 10.0);\n editor.putFloat(constants.rangeChoice, (float) 10.0);\n\n docData.put(constants.SHARED_PREFS_LOCATION, constants.SET_CITY);\n editor.putString(constants.SHARED_PREFS_LOCATION, constants.SET_CITY);\n\n FirebaseAuth userIdentifier = FirebaseAuth.getInstance();\n String UID = userIdentifier.getCurrentUser().getUid();\n DocumentReference DRF = FirebaseFirestore.getInstance()\n .document(constants.DOC_REF_USERS+\"/\" + UID);\n final boolean[] success = {true};\n final Exception[] failToRet = new Exception[1];\n DRF.set(docData).addOnFailureListener(e -> {\n success[0] = false;\n failToRet[0] = e;\n });\n if (!success[0]) {\n // show/make log for case of failure\n }\n editor.apply();\n\n }\n }\n });\n\n\n }\n\n }).addOnFailureListener(e -> {\n try {\n throw new Exception(constants.FAILED_REGISTER);\n } catch (Exception exception) {\n exception.printStackTrace();\n }\n });\n\n\n }",
"public void registrarMateria() {\n materia.setIdDepartamento(departamento);\n ejbFacade.create(materia);\n RequestContext requestContext = RequestContext.getCurrentInstance();\n requestContext.execute(\"PF('MateriaCreateDialog').hide()\");\n items = ejbFacade.findAll();\n departamento = new Departamento();\n materia = new Materia();\n\n FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Información\", \"La materia se registró con éxito\");\n FacesContext.getCurrentInstance().addMessage(null, msg);\n requestContext.update(\"msg\");//Actualiza la etiqueta growl para que el mensaje pueda ser mostrado\n\n requestContext.update(\"MateriaListForm\");\n requestContext.update(\"MateriaCreateForm\");\n }",
"public void salvarFornecedor()\r\n {\r\n /*\r\n * Implementação da lógica de salvar um fornecedor. Tratando as\r\n * mensagens conforme solicitado no desafio 1\r\n */\r\n try\r\n {\r\n fornecedorBusiness.salvarFornecedor(fornecedorResource);\r\n FacesContext.getCurrentInstance().addMessage(\"formFornecedor:messages\",\r\n new FacesMessage(FacesMessage.SEVERITY_INFO, \"Fornecedor Adicionado com Sucesso!\", \"\"));\r\n } catch (RuntimeException e)\r\n {\r\n FacesContext.getCurrentInstance().addMessage(\"formFornecedor:messages\",\r\n new FacesMessage(FacesMessage.SEVERITY_ERROR, e.getMessage(), \"\"));\r\n }\r\n }",
"public void saveRegistrationInfo(RegistrationDTO registrationDTO)\r\n\t\t\tthrows Exception {\n\t}",
"@Override\r\n public void registrarUsuario(User u) {\r\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\r\n }",
"@Override\n\tpublic void cargarInformacion_paciente() {\n\t\tinfoPacientes.cargarInformacion(admision, this,\n\t\t\t\tnew InformacionPacienteIMG() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void ejecutarProceso() {\n\t\t\t\t\t\tif (tbxAccion.getValue().equalsIgnoreCase(\"registrar\")) {\n\n\t\t\t\t\t\t\t// Map<String, Object> parametros = new\n\t\t\t\t\t\t\t// HashMap<String, Object>();\n\t\t\t\t\t\t\t// parametros.put(\"codigo_empresa\", codigo_empresa);\n\t\t\t\t\t\t\t// parametros.put(\"codigo_sucursal\",\n\t\t\t\t\t\t\t// codigo_sucursal);\n\t\t\t\t\t\t\t// parametros.put(\"identificacion\",\n\t\t\t\t\t\t\t// admision.getNro_identificacion());\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\ttoolbarbuttonTipo_historia\n\t\t\t\t\t\t\t\t\t.setLabel(\"Creando historia de Urgencia Odontologica\");\n\t\t\t\t\t\t\tadmision.setPrimera_vez(\"S\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t}",
"public VentanaDialogRegister(ListadoUsuarios listadoUsuarios) {\n\t\tgetContentPane().setLayout(null);\n\t\t\n\t\tthis.listadoUsuarios = listadoUsuarios;\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setBackground(new Color(0, 139, 139));\n\t\tpanel.setBounds(0, 0, 444, 271);\n\t\tgetContentPane().add(panel);\n\t\tpanel.setLayout(null);\n\t\t\n\t\ttxtContrasea = new JPasswordField();\n\t\ttxtContrasea.setHorizontalAlignment(SwingConstants.CENTER);\n\t\ttxtContrasea.setBounds(183, 114, 113, 23);\n\t\tpanel.add(txtContrasea);\n\t\ttxtContrasea.setColumns(10);\n\t\t\n\t\ttxtNombreDeUsuario = new JTextField();\n\t\ttxtNombreDeUsuario.setHorizontalAlignment(SwingConstants.CENTER);\n\t\ttxtNombreDeUsuario.setBounds(183, 73, 113, 30);\n\t\tpanel.add(txtNombreDeUsuario);\n\t\ttxtNombreDeUsuario.setColumns(10);\n\t\t\n\t\t\n\t\tJButton btnNewButton = new JButton(\"Registrar\");\n\t\t\n\t\tbtnNewButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\n\t\t\t\t\tauxUsuario = listadoUsuarios.buscarUnUsuario(txtNombreDeUsuario.getText());\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(auxUsuario==null){\n\t\t\t\t\tauxUsuario= new Usuario();\n\t\t\t\t\tauxUsuario.setAdmin(false);\n\t\t\t\t\tauxUsuario.setNombreU(txtNombreDeUsuario.getText());\n\t\t\t\t\tauxUsuario.setClave(txtContrasea.getText());\n\t\t\t\t\tlistadoUsuarios.agregarUsuario(auxUsuario);\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\"USUARIO REGISTRADO\");\n\t\t\t\t\tdispose();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\"ERROR! ESE NOMBRE DE USUARIO YA EXISTE\");\n\t\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setBounds(172, 205, 124, 30);\n\t\tpanel.add(btnNewButton);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"REGISTRO DE USUARIOS\");\n\t\tlblNewLabel.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tlblNewLabel.setBounds(134, 11, 196, 37);\n\t\tpanel.add(lblNewLabel);\n\t\t\n\t\tJLabel lblNewLabel_1 = new JLabel(\"Nombre de Usuario:\");\n\t\tlblNewLabel_1.setFont(new Font(\"Trebuchet MS\", Font.BOLD, 14));\n\t\tlblNewLabel_1.setBounds(54, 76, 128, 23);\n\t\tpanel.add(lblNewLabel_1);\n\t\t\n\t\tJLabel lblNewLabel_1_1 = new JLabel(\"Clave:\");\n\t\tlblNewLabel_1_1.setFont(new Font(\"Trebuchet MS\", Font.BOLD, 14));\n\t\tlblNewLabel_1_1.setBounds(119, 113, 79, 23);\n\t\tpanel.add(lblNewLabel_1_1);\n\t}",
"@Override\r\n\tpublic void NroAccount() {\n\t\t\r\n\t}",
"private void register() {\r\n if (mName.getText().length() == 0) {\r\n mName.setError(\"please fill this field\");\r\n return;\r\n }\r\n if (mEmail.getText().length() == 0) {\r\n mEmail.setError(\"please fill this field\");\r\n return;\r\n }\r\n if (mPassword.getText().length() == 0) {\r\n mPassword.setError(\"please fill this field\");\r\n return;\r\n }\r\n if (mPassword.getText().length() < 6) {\r\n mPassword.setError(\"password must have at least 6 characters\");\r\n return;\r\n }\r\n\r\n\r\n final String email = mEmail.getText().toString();\r\n final String password = mPassword.getText().toString();\r\n final String name = mName.getText().toString();\r\n\r\n FirebaseAuth.getInstance().createUserWithEmailAndPassword(email, password).addOnCompleteListener(getActivity(), new OnCompleteListener<AuthResult>() {\r\n @Override\r\n public void onComplete(@NonNull Task<AuthResult> task) {\r\n if (!task.isSuccessful()) {\r\n Snackbar.make(view.findViewById(R.id.layout), \"sign up error\", Snackbar.LENGTH_SHORT).show();\r\n } else {\r\n String uid = FirebaseAuth.getInstance().getCurrentUser().getUid();\r\n\r\n //Saves the user's info in the database\r\n Map<String, Object> mNewUserMap = new HashMap<>();\r\n mNewUserMap.put(\"email\", email);\r\n mNewUserMap.put(\"name\", name);\r\n\r\n FirebaseDatabase.getInstance().getReference().child(\"users\").child(uid).updateChildren(mNewUserMap);\r\n }\r\n }\r\n });\r\n\r\n }",
"private void RegisterUser(final User user) {\n AlertDialog.Builder builder;\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n builder = new AlertDialog.Builder(this, android.R.style.Theme_Material_Dialog_Alert);\n } else {\n builder = new AlertDialog.Builder(this);\n }\n\n View view = LayoutInflater.from(MainActivity.this).inflate(R.layout.alert_dialog_input,null);\n\n builder.setTitle(\"Faltan informacion requerida\")\n .setMessage(\"Completa los siguentes campos\")\n .setView(view);\n\n final EditText editTxtEmailDialog = view.findViewById(R.id.editTxtEmailAlertDialog);\n final EditText editTxtNicknameDialog = view.findViewById(R.id.editTxtNicknameAlertDialog);\n final EditText editTxtPasswordDialog = view.findViewById(R.id.editTxtPasswordAlertDialog);\n\n if(user.getEmail() != null)\n editTxtEmailDialog.setVisibility(View.GONE);\n\n builder.setPositiveButton(\"Registar\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n String email = user.getEmail() != null ? user.getEmail() : editTxtEmailDialog.getText().toString();\n String nickname = editTxtNicknameDialog.getText().toString();\n String password = editTxtPasswordDialog.getText().toString();\n if(!isValidateRegisterProvider(email,nickname,password))\n return;\n user.setEmail(email);\n user.setNickname(nickname);\n user.setPassword(password);\n\n\n\n //User aux = new User(user.getName(), user.getLastName(),nickname,email,password,\"\", user.getProvider());\n if(!Networking.isNetworkAvailable(MainActivity.this)) {\n Toast.makeText(MainActivity.this,\"No hay internet\",Toast.LENGTH_SHORT).show();\n return;\n }\n new Networking(MainActivity.this).execute(Networking.SIGNUP_PROVIDER, user,new NetCallback() {\n @Override\n public void onWorkFinish(Object... objects) {\n\n final User user_temp = (User) objects[0];\n if(user_temp.getId() != -1) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(MainActivity.this,\"Bienvenido\",Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(MainActivity.this, InitActivity.class);\n Grua grua = new Grua(\"\",\"\", \"\");\n grua.setId(-1);\n intent.putExtra(Register.JSON_USER, user_temp.toJSON());\n intent.putExtra(Register.JSON_GRUA,grua.toJSON());\n SharedUtil.setUserNickname(MainActivity.this,user_temp.getNickname());\n SharedUtil.setUserPassword(MainActivity.this, user_temp.getPassword());\n SharedUtil.setUserProvider(MainActivity.this, user_temp.getProvider());\n startActivity(intent);\n }\n });\n }\n\n }\n\n @Override\n public void onMessageThreadMain(Object data) {\n final String message = (String) data;\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(MainActivity.this, message, Toast.LENGTH_SHORT).show();\n }\n });\n\n }\n });\n\n }\n }).setNegativeButton(\"Cancelar\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //... Remover instancia iniciar con ...\n Toast.makeText(MainActivity.this,\"Su registro se ha cancelado\", Toast.LENGTH_SHORT).show();\n }\n })\n .setIcon(android.R.drawable.ic_dialog_info)\n .show();\n\n }",
"@Override\n\tpublic void guardar() {\n\t\tLOG.info(\"El usuario fue guardado \"+ usuario.getApellido()+\", \"+ usuario.getNombre());\n\t}",
"public void registrarUsuario(String cedula, String nombre, String apellido, String correo, String contrasena) {\n\n usuario = new Usuario(cedula, nombre, apellido, correo, contrasena);\n usuarioDAO.create(usuario);\n\n }",
"private void register_user() {\n\n\t\tHttpRegister post = new HttpRegister();\n\t\tpost.execute(Config.URL + \"/api/newuser\");\n\n\t}",
"private void Register(String mailSTR, String passwordSTR, String fNameSTR, String lNameSTR, String citySTR, String phoneNumberSTR) throws Exception {\n mAuth.createUserWithEmailAndPassword(mailSTR, passwordSTR)\n .addOnCompleteListener(task -> {\n if (task.isSuccessful()) {\n final Map<String, Object>[] dataToSave = new Map[]{new HashMap<String, Object>()};\n dataToSave[0].put(constants.FIRST_NAME, fNameSTR);\n dataToSave[0].put(constants.SEC_NAME, lNameSTR);\n dataToSave[0].put(constants.CITY, citySTR);\n dataToSave[0].put(constants.EMAIL, mailSTR);\n dataToSave[0].put(constants.PHONE, phoneNumberSTR);\n\n\n\n FirebaseDatabase.getInstance().getReference(constants.DOC_REF_USERS)\n //here we creating users folder in real time data baes , getting uid from user and storing the data in folder named by id\n .child(Objects.requireNonNull(FirebaseAuth.getInstance().getCurrentUser()).getUid())\n .setValue(dataToSave[0]).addOnCompleteListener(task1 -> {\n if (task1.isSuccessful()) {\n Toast.makeText(register3.this,\n R.string.register_toast_success, Toast.LENGTH_LONG).show();\n {//adds all new data for newely registered clients\n dayTime dtDEF = new dayTime(0, 0, 23, 59);//default for first time\n Gson gson = new Gson();\n SharedPreferences sp = getSharedPreferences(constants.SHARED_PREFS,\n Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sp.edit();\n String dayDEF = gson.toJson(dtDEF);\n Map<String, String> docData = new HashMap<>();\n for (String day : constants.daysNames) {\n docData.put(day, dayDEF);\n editor.putString(day, dayDEF);\n }\n docData.put(constants.rangeChoice, \"\" + 10.0);\n editor.putFloat(constants.rangeChoice, (float) 10.0);\n\n docData.put(constants.SHARED_PREFS_LOCATION, constants.CITY);\n editor.putString(constants.SHARED_PREFS_LOCATION, constants.CITY);\n editor.putBoolean(\"sync\",true);\n FirebaseAuth userIdentifier = FirebaseAuth.getInstance();\n String UID = userIdentifier.getCurrentUser().getUid();\n DocumentReference DRF = FirebaseFirestore.getInstance()\n .document(constants.DOC_REF_USERS+\"/\" + UID);\n final boolean[] success = {true};\n final Exception[] failToRet = new Exception[1];\n DRF.set(docData).addOnFailureListener(e -> {\n success[0] = false;\n failToRet[0] = e;\n });\n if (!success[0]) {\n // show/make log for case of failure\n }\n editor.apply();\n\n }\n }\n });\n\n\n }\n\n }).addOnFailureListener(e -> {\n try {\n throw new Exception(constants.FAILED_REGISTER);\n } catch (Exception exception) {\n exception.printStackTrace();\n }\n });\n\n\n }",
"public void bienvenida(){\n System.out.println(\"Bienvenid@ a nuestro programa de administracion de parqueos\");\n }",
"private void confirmarGuardarUsr() {\n String pregunta = \"Esto seguro de realizar el registro?\";\n new AlertDialog.Builder(this)\n .setTitle(getResources().getString(R.string.msj_confirmacion))\n .setMessage(pregunta)\n .setNegativeButton(android.R.string.cancel, null)//sin listener\n .setPositiveButton(getResources().getString(R.string.lbl_aceptar),\n new DialogInterface.OnClickListener() {//un listener que al pulsar, solicite el WS de Transsaccion\n @Override\n public void onClick(DialogInterface dialog, int which){\n guardarUsr();\n }\n })\n .show();\n }",
"private void registrarVehiculo(String placa, String tipo, String color, String numdoc) {\n miVehiculo = new Vehiculo(placa,tipo,color, numdoc);\n\n showProgressDialog();\n\n //empresavehiculo\n //1. actualizar el reference, empresavehiculo\n //2. mDatabase.child(\"ruc\").child(\"placa\").setValue\n\n mDatabase.child(placa).setValue(miVehiculo).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n hideProgressDialog();\n if (task.isSuccessful()) {\n Toast.makeText(getApplicationContext(),\"Se registro Correctamente...!\",Toast.LENGTH_LONG).show();\n //\n setmDatabase(getDatabase().getReference(\"empresasvehiculos\"));\n //\n mDatabase.child(GestorDatabase.getInstance(getApplicationContext()).obtenerValorUsuario(\"ruc\")).setValue(miVehiculo).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n hideProgressDialog();\n if (task.isSuccessful()) {\n Toast.makeText(getApplicationContext(),\"Se registro Correctamente...!\",Toast.LENGTH_LONG).show();\n\n } else {\n Toast.makeText(getApplicationContext(), \"Error intente en otro momento...!\", Toast.LENGTH_LONG).show();\n }\n }\n });\n\n } else {\n Toast.makeText(getApplicationContext(), \"Error intente en otro momento...!\", Toast.LENGTH_LONG).show();\n }\n }\n });\n }",
"public void domicilioAgregar() {\r\n\t\tlog.info(\"Domicilio agregar \" + nuevoDomici.getDomicilio());\r\n\t\tboolean verifica = false;\r\n\t\tmensaje = null;\r\n\t\tnuevoDomici.setTbTipoCasa(objTipoCasaService.findTipoCasa(Tipocasanuevo));\r\n\t\tnuevoDomici.setDomicilio(domicilio);\r\n\t\tnuevoDomici.setReferencia(referencia);\r\n\t\tnuevoDomici.setTbUbigeo(objUbigeoService.findUbigeo(idUbigeo));\r\n\t\tlog.info(\"TIPO-CASA-NUEVO--->\"+nuevoDomici.getTbTipoCasa().getIdtipocasa());\r\n\t\tnuevoDomici.setNuevoD(1);\r\n\t\t//aqui ponfo el ID-Domicilio a la lista Domicilio temporalmente.\r\n\t\tnuevoDomici.setIddomiciliopersona(0);\r\n\t\tnuevoDomici.setTbEstadoGeneral(objEstadoGeneralService.findEstadogeneral(15));\r\n\t\t\r\n\t\tfor (int i = 0; i < DomicilioPersonaList.size(); i++) {\r\n\t\t\tlog.info(\" \"+ DomicilioPersonaList.get(i).getDomicilio() + \" \" + nuevoDomici.getDomicilio());\r\n\t\t\tif (DomicilioPersonaList.get(i).getDomicilio().equals(nuevoDomici.getDomicilio())) {\r\n\t\t\t\tverifica = false;\r\n\t\t\t\tmensaje = \"el Domicilio ya se encuentra registrado en la lista de domiclio cliente\";\r\n\t\t\t\tbreak;\r\n\t\t\t}else {\r\n\t\t\t\tverifica = true;\r\n\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\tif (DomicilioPersonaList.size() == 0) {\r\n\t\t\t\tverifica = true;\r\n\t\t\t\t}\r\n\t\t\tif (verifica) {\r\n\t\t\t\tnuevoDomici.setItem(\"Por Agregar\");\r\n\t\t\t\tDomicilioPersonaList.add(nuevoDomici);\r\n\t\t\t\tlog.info(\"se agrego \"+ nuevoDomici.getDomicilio());\r\n\t\t\t\t}\r\n\t\t\tif (mensaje != null) {\r\n\t\t\t\tmsg = new FacesMessage(FacesMessage.SEVERITY_FATAL,\r\n\t\t\t\tConstants.MESSAGE_ERROR_FATAL_TITULO, mensaje);\r\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\r\n\t\t\t\t}\r\n\t\t\tnuevoDomici = new DomicilioPersonaSie();\r\n\t\t}",
"private void metodoSalvarUsuarioFirebase(final Usuarios variavelClasseUsuarios) {\n\n refAutenticacaofb = ConfiguracaoFirebase.metodoAutenticacaoFirebase();\n refAutenticacaofb.createUserWithEmailAndPassword(variavelClasseUsuarios.getEmail(),\n variavelClasseUsuarios.getSenha()).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n if(task.isSuccessful()){\n\n idUsuario = task.getResult().getUser().getUid();\n variavelClasseUsuarios.setId(idUsuario);\n variavelClasseUsuarios.salvarUsuario();\n\n if(pegarTipoUsuarioSwitch() == \"Cliente\"){\n\n startActivity(new Intent(CadastroUsuario.this, Home.class));\n finish();\n Toast.makeText(CadastroUsuario.this, \"Usuário salvo com sucesso\", Toast.LENGTH_LONG).show();\n }else{\n\n startActivity(new Intent(CadastroUsuario.this, PainelEmpresa.class));\n finish();\n Toast.makeText(CadastroUsuario.this, \"Empresa inserida com sucesso!\", Toast.LENGTH_LONG).show();\n }\n\n\n }\n\n\n\n }\n });\n\n }",
"public void verRegistrarCandidato()\r\n\t{\r\n\t\tdatos = new RegistrarCandidato(this);\r\n\t\tdatos.setVisible(true);\r\n\t}",
"public RegistrarPagoCXC() {\n initComponents();\n HoraFecha ob2 = new HoraFecha();\n jdfecha.setDate(ob2.obtenerFechamascienanos());\n Buscar_cxc.restropagocxcCxpexitoso = false;\n Buscar_cxp.restropagocxpCxpexitoso = false;\n\n//// spinerDiasCredito.setValue(30);\n//// HoraFecha ob2 = new HoraFecha();\n//// fecha = ob2.obtenerFecha();\n//// jDateChooser1.setDate(fecha);\n//// \n//// jDateChooser1.setDate(sumarRestarDiasFecha(fecha, Integer.valueOf(spinerDiasCredito.getValue().toString())));\n//// txt_entrada.grabFocus(); \n//// txt_entrada.selectAll();\n//// \n ////formas de pago\n fp = OperacionesForms.FormasPagoCXC_seExceptualaformadePago_Credito(jComboBox1);\n\n//OperacionesForms.getAllComponents(this)\n// jComboBox1.setSelectedItem(Principal.formadepagopredeterminada);\n /// HoraFecha.fecha(fecha)\n }"
]
| [
"0.73508435",
"0.73093593",
"0.70756966",
"0.705261",
"0.70510674",
"0.70510674",
"0.69955117",
"0.6841777",
"0.68332076",
"0.67439395",
"0.6700139",
"0.6690932",
"0.6546939",
"0.65378135",
"0.65325564",
"0.64860046",
"0.6477317",
"0.6470195",
"0.6467129",
"0.6447834",
"0.64251935",
"0.64189994",
"0.64060515",
"0.63888913",
"0.6387183",
"0.6375202",
"0.62880766",
"0.626682",
"0.6252105",
"0.6250621",
"0.62298405",
"0.6204895",
"0.6201829",
"0.6198843",
"0.61841613",
"0.61837965",
"0.6148765",
"0.61293924",
"0.61107856",
"0.61086345",
"0.6097192",
"0.6091328",
"0.6076644",
"0.60617834",
"0.6058668",
"0.60576725",
"0.604035",
"0.60403293",
"0.6032963",
"0.60323673",
"0.60283536",
"0.6027978",
"0.602787",
"0.60271823",
"0.60233915",
"0.6021909",
"0.6016332",
"0.6005289",
"0.5995021",
"0.59945905",
"0.5994301",
"0.59880847",
"0.59865075",
"0.597048",
"0.5968453",
"0.59658635",
"0.59568554",
"0.595632",
"0.59457994",
"0.59454525",
"0.5942944",
"0.59289086",
"0.5926526",
"0.5917938",
"0.5909866",
"0.5906168",
"0.589728",
"0.5887655",
"0.5885061",
"0.5883684",
"0.58833176",
"0.5882914",
"0.58814496",
"0.5873111",
"0.5869775",
"0.586821",
"0.58626294",
"0.5862505",
"0.58563656",
"0.58522624",
"0.5850705",
"0.5848436",
"0.5846101",
"0.584429",
"0.58374506",
"0.5832899",
"0.582533",
"0.5820025",
"0.5817968",
"0.5815388",
"0.581382"
]
| 0.0 | -1 |
ottiene i dati da un campo della form | private String getFormValue(EditText edit){
if(edit!=null) return edit.getText().toString();
else return "";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void limpiarCamposFormBusqueda() {\n\t}",
"protected RespostaFormularioPreenchido() {\n // for ORM\n }",
"public void setar_campos() {\n int setar = tblEmpresas.getSelectedRow();\n txtEmpId.setText(tblEmpresas.getModel().getValueAt(setar, 0).toString());\n txtEmpNome.setText(tblEmpresas.getModel().getValueAt(setar, 1).toString());\n txtEmpCNPJ.setText(tblEmpresas.getModel().getValueAt(setar, 2).toString());\n txtEmpEnd.setText(tblEmpresas.getModel().getValueAt(setar, 3).toString());\n txtEmpTel.setText(tblEmpresas.getModel().getValueAt(setar, 4).toString());\n txtEmpEmail.setText(tblEmpresas.getModel().getValueAt(setar, 5).toString());\n\n // a linha abaixo desabilita o botao add\n btnAdicionar.setEnabled(false);\n }",
"@Override\n protected void carregaObjeto() throws ViolacaoRegraNegocioException {\n entidade.setNome( txtNome.getText() );\n entidade.setDescricao(txtDescricao.getText());\n entidade.setTipo( txtTipo.getText() );\n entidade.setValorCusto(new BigDecimal((String) txtCusto.getValue()));\n entidade.setValorVenda(new BigDecimal((String) txtVenda.getValue()));\n \n \n }",
"private void recogerDatos() {\n\t\ttry {\n\t\t\tusuSelecc.setId(etId.getText().toString());\n\t\t\tusuSelecc.setName(etNombre.getText().toString());\n\t\t\tusuSelecc.setFirstName(etPApellido.getText().toString());\n\t\t\tusuSelecc.setLastName(etSApellido.getText().toString());\n\t\t\tusuSelecc.setEmail(etCorreo.getText().toString());\n\t\t\tusuSelecc.setCustomFields(etAuth.getText().toString());\n\t\t} catch (Exception e) {\n\t\t\t// Auto-generated catch block\n\t\t\tmostrarException(e.getMessage());\n\t\t}\n\t}",
"private void azzeraInsertForm() {\n\t\tviewInserimento.getCmbbxTipologia().setSelectedIndex(-1);\n\t\tviewInserimento.getTxtFieldDataI().setText(\"\");\n\t\tviewInserimento.getTxtFieldValore().setText(\"\");\n\t\tviewInserimento.getTxtFieldDataI().setBackground(Color.white);\n\t\tviewInserimento.getTxtFieldValore().setBackground(Color.white);\n\t}",
"public Form_reporte_comuna_y_tipo(Controlador cont) {\n initComponents();\n this.controlador = cont;\n cargarSelect();\n\n }",
"public void limpiarCampos(){\n\n\t\tcampoInicio.setText(\"yyyy-mm-dd\");\n\t\tcampoInicio.setForeground(new Color(111,111,111));\n\t\tcampoFinal.setText(\"yyyy-mm-dd\");\n\t\tcampoFinal.setForeground(new Color(111,111,111));\n\n\t}",
"public void praticien_zone(){\n\n JLabel lbl_Praticien = new JLabel(\"Praticien :\");\n lbl_Praticien.setBounds(40, 50, 119, 16);\n add(lbl_Praticien);\n\n\n\n JTextField praticien = new JTextField();\n praticien.setBounds(200, 50, 200, 22);\n praticien.setEditable(false);\n try {\n praticien.setText((DAO_Praticien.nomPraticien(rapport_visite.elementAt(DAO_Rapport.indice)[1])));\n } catch (SQLException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n add(praticien);\n\n }",
"private void datos() {\n int row;\n row = vista.tblClientes.getSelectedRow();\n cvo.setId_cliente(Integer.parseInt(vista.tblClientes.getValueAt(row, 0).toString()));\n vista.txtNombre.setText(String.valueOf(vista.tblClientes.getValueAt(row, 1)));\n vista.txtApellido.setText(String.valueOf(vista.tblClientes.getValueAt(row, 2)));\n vista.txtDireccion.setText(String.valueOf(vista.tblClientes.getValueAt(row, 3)));\n vista.txtCorreo.setText(String.valueOf(vista.tblClientes.getValueAt(row, 4)));\n vista.txtClave.setText(String.valueOf(vista.tblClientes.getValueAt(row, 5)));\n }",
"public void dataSelect(){\n //deklarasi variabel\n int i = tblKembali.getSelectedRow();\n \n //uji adakah data di tabel?\n if(i == -1){\n //tidak ada yang terpilih atau dipilih.\n return;\n }\n txtNama.setText(\"\"+model.getValueAt(i,0));\n txtAlamat.setText(\"\"+model.getValueAt(i,1));\n txtNo.setText(\"\"+model.getValueAt(i,2));\n txtKamera.setText(\"\"+model.getValueAt(i,3));\n txtKode.setText(\"\"+model.getValueAt(i,4));\n txtdisewa.setText(\"\"+model.getValueAt(i,5));\n txtLama.setText(\"\"+model.getValueAt(i,6));\n txtLambat.setText(\"\"+model.getValueAt(i,7));\n \n }",
"private void PreencherFormulario(int acao) throws SQLException {\n \n Funcionario_id.setText(String.valueOf(acao)); \n obj_Funcionario = bd_Funcionario.getFuncionarioID(acao);\n campo_nome.setText(obj_Funcionario.getNome());\n campo_endereco.setText(obj_Funcionario.getEndereco());\n campo_bairro.setText(obj_Funcionario.getBairro());\n campo_estado.setText(obj_Funcionario.getUf());\n campo_cpf.setText(obj_Funcionario.getCpf());\n campo_idt.setText(obj_Funcionario.getIdt()); \n campo_login.setText(obj_Funcionario.getLogin());\n campo_senha.setText(obj_Funcionario.getSenha());\n campo_cidade.setText(obj_Funcionario.getCidade()); \n campo_numero.setText(obj_Funcionario.getNumero()); \n campo_cep.setText(String.valueOf((obj_Funcionario.getCep()==0)?\"\":obj_Funcionario.getCep()));\n campo_ddd.setText(String.valueOf((obj_Funcionario.getDdd()==0)?\"\":obj_Funcionario.getDdd()));\n campo_telefone.setText(String.valueOf((obj_Funcionario.getTelefone()==0)?\"\":obj_Funcionario.getTelefone()));\n \n Nivel_id.setText(String.valueOf(obj_Funcionario.getNivel().getNivel_id()));\n combo_nivel.setSelectedItem(obj_Funcionario.getNivel().getNome().toUpperCase());\n \n if(obj_Funcionario.getData_admissao()!=null){\n String strdata1 = new SimpleDateFormat(\"dd/MM/yyyy\").format(obj_Funcionario.getData_admissao());\n String vet1[] = strdata1.split(\"/\");\n campo_adm_dia.setText(vet1[0]);\n campo_adm_mes.setText(vet1[1]);\n campo_adm_ano.setText(vet1[2]);\n }\n /*\n if(!obj_Funcionario.getData_demissao().equals(\"0000-00-00\")){\n String strdata2 = new SimpleDateFormat(\"dd/MM/yyyy\").format(obj_Funcionario.getData_demissao());\n String vet2[] = strdata2.split(\"/\");\n campo_dm_dia.setText(vet2[0]);\n campo_dm_mes.setText(vet2[1]);\n campo_dm_ano.setText(vet2[2]);\n }\n * \n */ \n }",
"public void limparCampos() {\n\t\tcodigoField.setText(\"\");\n\t\tdescricaoField.setText(\"\");\n\t\tcodigoField.setEditable(true);\n\t\tBorder border = BorderFactory.createLineBorder(Color.RED);\n\t\tcodigoField.setBorder(border);\n\t\tcodigoField.requestFocus();\n\t\tBorder border1 = BorderFactory.createLineBorder(Color.BLACK);\n\t\tdescricaoField.setBorder(border1);\n\t\t\n\t\t\n\t}",
"public void setar_campos()\n {\n int setar = tblCliNome.getSelectedRow();\n txtCliId.setText(tblCliNome.getModel().getValueAt(setar, 0).toString());\n txtCliNome.setText(tblCliNome.getModel().getValueAt(setar, 1).toString());\n txtCliRua.setText(tblCliNome.getModel().getValueAt(setar, 2).toString());\n txtCliNumero.setText(tblCliNome.getModel().getValueAt(setar, 3).toString());\n txtCliComplemento.setText(tblCliNome.getModel().getValueAt(setar, 4).toString());\n txtCliBairro.setText(tblCliNome.getModel().getValueAt(setar, 5).toString());\n txtCliCidade.setText(tblCliNome.getModel().getValueAt(setar, 6).toString());\n txtCliUf.setText(tblCliNome.getModel().getValueAt(setar, 7).toString());\n txtCliFixo.setText(tblCliNome.getModel().getValueAt(setar, 8).toString());\n txtCliCel.setText(tblCliNome.getModel().getValueAt(setar, 9).toString());\n txtCliMail.setText(tblCliNome.getModel().getValueAt(setar, 10).toString());\n txtCliCep.setText(tblCliNome.getModel().getValueAt(setar, 11).toString());\n \n // A LINHA ABAIXO DESABILITA O BOTÃO ADICIONAR PARA QUE O CADASTRO NÃO SEJA DUPLICADO\n btnAdicionar.setEnabled(true);\n \n }",
"public void validar_campos(){\r\n\t\tfor(int i=0;i<fieldNames.length-1;++i) {\r\n\t\t\tif (jtxt[i].getText().length() > 0){\r\n\t\t\t}else{\r\n\t\t\t\tpermetir_alta = 1;\r\n\t\t\t}\t\r\n\t\t}\r\n\t\tif((CmbPar.getSelectedItem() != null) && (Cmbwp.getSelectedItem() != null) && (CmbComp.getSelectedItem() != null) && (jdc1.getDate() != null) && (textdescripcion.getText().length() > 1) && (textjustificacion.getText().length() > 1)){\t\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tpermetir_alta = 1;\r\n\t\t}\r\n\t\t\r\n\t}",
"public TelaEntradaProduto() {\n initComponents();\n data = new Date(System.currentTimeMillis());\n SimpleDateFormat formatador = new SimpleDateFormat(\"dd/MM/yyyy\");\n JTFdata.setText(formatador.format(data));\n }",
"public void limparCampos() {\n\n // Limpa todos formularios.\n textoNome.setText(\"\");\n textoCPF.setText(\"\");\n comboGenero.setSelectedIndex(0);\n textoDataDeNascimento.setText(\"\");\n textoEnderecoLogradouro.setText(\"\");\n textoBairro.setText(\"\");\n textoComplemento.setText(\"\");\n textoNumero.setText(\"\");\n textoEmail.setText(\"\");\n textoTelefone.setText(\"\");\n textoCelular.setText(\"\");\n textoCEP.setText(\"\");\n textoDD_Celular.setText(\"\");\n textoDD_Telefone.setText(\"\");\n Icon imagemPerfil = new ImageIcon(\"src\\\\br\\\\com\\\\Grupo07\\\\Imagens\\\\perfil.jpg\");\n imagemCliente.setIcon(imagemPerfil);\n\n }",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"public GestaoFormando() {\n \n initComponents();\n listarEquipamentos();\n listarmapainscritos();\n }",
"private void limpaCampos() {\n txtNome.setText(\"\");\n txtRG.setText(\"\");\n txtFCpf.setText(\"\");\n txtFNascimento.setText(\"\");\n txtEmail.setText(\"\");\n txtFCelular.setText(\"\");\n txtFTelefone.setText(\"\");\n txtRua.setText(\"\");\n txtComplemento.setText(\"\");\n txtFCep.setText(\"\");\n txtBairro.setText(\"\");\n txtCidade.setText(\"\");\n }",
"public ingresarDatos() {\n initComponents();\n Validacion();\n \n }",
"private void limpaCampos() {\r\n\t\tnome.setText(\"\");\r\n\t\tsituacao.setSelectedIndex(0);\r\n\t\tidade.setText(\"\");\r\n\t\terroNome.setText(\"\");\r\n\t\terroIdade.setText(\"\");\r\n\t}",
"public MostraVenta(String idtrasp, Object[][] clienteM1, Object[][] vendedorM1, String idmarc, String responsable,ListaTraspaso panel)\n{\n this.padre = panel;\n this.clienteM = clienteM1;\n this.vendedorM = vendedorM1;\n this.idtraspaso= idtrasp;\n this.idmarca=idmarc;\n//this.tipoenvioM = new String[]{\"INGRESO\", \"TRASPASO\"};\n String tituloTabla =\"Detalle Venta\";\n // padre=panel;\n String nombreBoton1 = \"Registrar\";\n String nombreBoton2 = \"Cancelar\";\n // String nombreBoton3 = \"Eliminar Empresa\";\n\n setId(\"win-NuevaEmpresaForm1\");\n setTitle(tituloTabla);\n setWidth(400);\n setMinWidth(ANCHO);\n setHeight(250);\n setLayout(new FitLayout());\n setPaddings(WINDOW_PADDING);\n setButtonAlign(Position.CENTER);\n setCloseAction(Window.CLOSE);\n setPlain(true);\n\n but_aceptar = new Button(nombreBoton1);\n but_cancelar = new Button(nombreBoton2);\n // addButton(but_aceptarv);\n addButton(but_aceptar);\n addButton(but_cancelar);\n\n formPanelCliente = new FormPanel();\n formPanelCliente.setBaseCls(\"x-plain\");\n //formPanelCliente.setLabelWidth(130);\n formPanelCliente.setUrl(\"save-form.php\");\n formPanelCliente.setWidth(ANCHO);\n formPanelCliente.setHeight(ALTO);\n formPanelCliente.setLabelAlign(Position.LEFT);\n\n formPanelCliente.setAutoWidth(true);\n\n\ndat_fecha1 = new DateField(\"Fecha\", \"d-m-Y\");\n fechahoy = new Date();\n dat_fecha1.setValue(fechahoy);\n dat_fecha1.setReadOnly(true);\n\ncom_vendedor = new ComboBox(\"Vendedor al que enviamos\", \"idempleado\");\ncom_cliente = new ComboBox(\"Clientes\", \"idcliente\");\n//com_tipo = new ComboBox(\"Tipo Envio\", \"idtipo\");\n initValues1();\n\n\n\n formPanelCliente.add(dat_fecha1);\n// formPanelCliente.add(com_tipo);\n// formPanelCliente.add(tex_nombreC);\n// formPanelCliente.add(tex_codigoBarra);\n // formPanelCliente.add(tex_codigoC);\nformPanelCliente.add(com_vendedor);\n formPanelCliente.add(com_cliente);\n add(formPanelCliente);\nanadirListenersTexfield();\n addListeners();\n\n }",
"public ViewCreatePagamento() {\n initComponents();\n clientesDAO cDAO = DaoFactory.createClientesDao(); \n matriculaDAO mDAO = DaoFactory.createMatriculaDao();\n \n cmbIDClientes.addItem(null);\n cDAO.findAll().forEach((p) -> {\n cmbIDClientes.addItem(p.getNome());\n });\n \n \n txtDataAtual.setText(DateFormat.getDateInstance().format(new Date()));\n }",
"public void mostrarDados() {\n txtId.setText(\"\" + lista.get(indice).getId());\n txtNome.setText(lista.get(indice).getNome());\n txtEmail.setText(lista.get(indice).getEmail());\n txtSenha.setText(lista.get(indice).getSenha());\n preencheTabela();\n }",
"private void limparCampos() {\n\t\ttxtCidade.setText(\"\");\n\t\tlblId.setText(\"0\");\n\t\tcboEstado.getSelectionModel().select(0);\n\t}",
"public void limpiarCampos() {\n jtCargo.setText(\"\");\n jtCiudadNacimiento.setText(\"\");\n jtCorreo.setText(\"\");\n jtDepartamento.setText(\"\");\n jtDireccion.setText(\"\");\n jtDocumento.setText(\"\");\n jtMovil.setText(\"\");\n jtPrimerApellido.setText(\"\");\n jtPrimerNombre.setText(\"\");\n jtProfesion.setText(\"\");\n jtSegundoApellido.setText(\"\");\n jtSegundoNombre.setText(\"\");\n jtTelefono.setText(\"\");\n jtDocumento.setEnabled(true);\n jdFechaContratacion.setEnabled(true);\n jcTipoDocumento.setSelectedIndex(0);\n jcTipoSangre.setSelectedIndex(0);\n jcTipoContrato.setSelectedIndex(0);\n cjFactorRH.setSelectedIndex(0);\n jdFechaNacimiento.setDate(null);\n jdFechaTitulacion.setDate(null);\n jdFechaContratacion.setDate(null);\n\n repaint();\n }",
"private void setDataInFields() \n {\n quantityTxtFld.setText(farmer.getCropQuantity()+\"\");\n quantityTxtFld.setEnabled(false);\n }",
"private void procurarData() {\n if (jDateIni.getDate() != null && jDateFim.getDate() != null) {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n String data = sdf.format(jDateIni.getDate());\n String data2 = sdf.format(jDateFim.getDate());\n carregaTable(id, data, data2);\n JBreg.setEnabled(false);\n }\n }",
"private void naolopkhachhangtrvaotextfield() {\n\t\t\n\t\tint row=table.getSelectedRow();\n\t\ttry {\n\t\t\ttxtmakhhm.setText(table.getValueAt(row, 0).toString());\n\t\t\tjava.util.Date date=new SimpleDateFormat(\"yyyy-MM-dd\").parse((String) table.getValueAt(row, 5).toString());\n\t\t\tjdcNgaytra.setDate(date);\n\t\t\t\n\t\t\ttxtTinhtrang.setText(table.getValueAt(row, 6).toString());\n\t\t\tif(txtTinhtrang.getText().equalsIgnoreCase(\"\"))\n\t\t\t\ttxtTinhtrang.setText(\"\");\n\t\t\t\n\t\t\ttxtGhichu.setText(table.getValueAt(row, 7).toString());\n\t\t\tif(txtGhichu.getText().equalsIgnoreCase(\"\"))\n\t\t\t\ttxtGhichu.setText(\"\");\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\t//JOptionPane.showMessageDialog(this,\"bạn cần chọn dòng cần sửa !\");\n\t\t\treturn ;\n\t\t}\n\t}",
"private void limpiarCampos() {\n campoNombre.setText(\"\");\n campoNumLibro.setText(\"\");\n campoNumPagina.setText(\"\");\n }",
"public void loadDataProduk(){\n kode_barang = txtKodeBarang.getText();\n nama_barang = txtNamaBarang.getText();\n merk_barang = txtMerkBarang.getText();\n jumlah_stok = Integer.parseInt(txtJumlahStok.getText());\n harga = Integer.parseInt(txtHarga.getText());\n \n }",
"public JTextField[] camposCliente(){\n JTextField campos [] = new JTextField[]{txtCliCNPJ, txtCliDDD, \n txtCliDDDTel2, txtCliNFant, txtCliResp,\n txtCliRz, txtCliTel, txtCliTel2};\n \n return campos;\n }",
"public crud_empleados() {\n initComponents();\n txt_usuario1.setEditable(false);\n Mostrar();\n \n\n\n }",
"public ModificarVenta() {\n initComponents();\n txt_boletas.setValue((long)0);\n txt_transbank.setValue((long)0);\n txt_total.setValue((long)0);\n \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 }",
"private void modi() { \n try {\n cvo.getId_cliente();\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.actualizar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Modificado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para Modificar registro!\");\n }\n }",
"public void limpiarCampos()\n {\n jtfNumero.setText(\"\");\n jtfNombre.setText(\"\");\n jtfSaldo.setText(\"\");\n this.jbEliminar.setEnabled(false);\n }",
"public void limpiarDatos() {\r\n FormularioUtil.limpiarComponentes(groupboxEditar, idsExcluyentes);\r\n tbxNro_identificacion.setValue(\"\");\r\n tbxNro_identificacion.setDisabled(false);\r\n deshabilitarCampos(true);\r\n\r\n }",
"public void getDadosDosCampos2() {\n EditText campoModeloCelular = findViewById(R.id.CampoModeloCelular);\n RadioButton campoNumeroChip1 = findViewById(R.id.radioButtonNumChip1);\n RadioButton campoNumeroChip2 = findViewById(R.id.radioButtonNumChip2);\n EditText numeroDoChip1 = findViewById(R.id.EditTextNumChip1);\n EditText numeroDoChip2 = findViewById(R.id.EditTextNumChip2);\n EditText campoIMEI1 = findViewById(R.id.campoIMEI1);\n EditText campoIMEI2 = findViewById(R.id.campoIMEI2);\n\n //instanciando o celular\n Celular novoCelular = new Celular();\n\n novoCelular.setModelo(campoModeloCelular.getText().toString());\n novoCelular.setChip1(campoNumeroChip1.getText().toString());\n novoCelular.setChip2(campoNumeroChip2.getText().toString());\n novoCelular.setImei1(campoIMEI1.getText().toString());\n novoCelular.setImei2(campoIMEI2.getText().toString());\n\n CelularDAO daoC = new CelularDAO();\n\n CelularDAO.Cel_cadastrado = novoCelular;\n\n UsuarioDAO.user_cadastrado.setCelularP(novoCelular);\n\n UsuarioDAO.dao.inserir(UsuarioDAO.user_cadastrado);\n\n\n\n }",
"public FormCadastroAutomovel() {\n initComponents();\n }",
"public Form_soal() {\n initComponents();\n tampil_soal();\n }",
"public FrmCadastro() {\n initComponents();\n \n lblNumeroConta.setText(\"Número da conta: \" + Agencia.getProximaConta());\n \n List<Integer> agencias = Principal.banco.retornarNumeroAgencias();\n for(int i : agencias){\n cmbAgencias.addItem(\"Agência \" + i);\n }\n }",
"public void tabla_campos() {\n int rec = AgendarA.tblAgricultor.getSelectedRow();// devuelve un entero con la posicion de la seleccion en la tabla\n ccAgricultor = AgendarA.tblAgricultor.getValueAt(rec, 1).toString();\n crearModeloAgenda();\n }",
"public SalidaCajaForm() {\n\t\tinicializarComponentes();\n }",
"private void populateForm() {\n Part selectedPart = (Part) PassableData.getPartData();\n partPrice.setText(String.valueOf(selectedPart.getPrice()));\n partName.setText(selectedPart.getName());\n inventoryCount.setText(String.valueOf(selectedPart.getStock()));\n partId.setText(String.valueOf(selectedPart.getId()));\n maximumInventory.setText(String.valueOf(selectedPart.getMax()));\n minimumInventory.setText(String.valueOf(selectedPart.getMin()));\n\n if (PassableData.isOutsourced()) {\n Outsourced part = (Outsourced) selectedPart;\n variableTextField.setText(part.getCompanyName());\n outsourced.setSelected(true);\n\n } else if (!PassableData.isOutsourced()) {\n InHouse part = (InHouse) selectedPart;\n variableTextField.setText(String.valueOf(part.getMachineId()));\n inHouse.setSelected(true);\n }\n\n\n }",
"public FormInserir() {\n initComponents();\n }",
"private void fillData() {\n jTextField1.setEnabled(false);\n jTextField11.setEnabled(false);\n\n if (owners != null && owners.get(\"editedOwner\") != null) {\n this.jTextField1.setText(owners.get(\"editedOwner\").getAsJsonObject().get(\"rc\").getAsString());\n this.jTextField11.setText(owners.get(\"editedOwner\").getAsJsonObject().get(\"share\").getAsString());\n }\n String[] header = new String[]{\"Rodné čislo\", \"Podiel v %\"};\n dtm.setColumnIdentifiers(header);\n jTableOwnerships.setModel(dtm);\n if (owners != null && owners.get(\"ownerships\") != null) {\n for (JsonElement jsonElement : owners.get(\"ownerships\").getAsJsonArray()) {\n JsonObject owner = (JsonObject) jsonElement;\n dtm.addRow(new Object[]{owner.get(\"rc\").getAsString(), owner.get(\"share\").getAsString()});\n }\n }\n }",
"public static JTextField gettxtIDFormaPago() {\n return txtIDFormaPago;\n }",
"public void myFunction(Vendeur v) {\n \n \n \n String dateFromDB = v.getDate_naissance();\n int year=Integer.parseInt(dateFromDB.split(\"-\")[0]); \n int mounth=Integer.parseInt(dateFromDB.split(\"-\")[1]); \n int day=Integer.parseInt(dateFromDB.split(\"-\")[2]); \n \n id.setText(String.valueOf(v.getId()));\n nom.setText(v.getNom());\n prenom.setText(v.getPrenom());\n datedenaissance.setValue(LocalDate.of(year, mounth, mounth));\n sexe.getSelectionModel().select(v.getSexe());\n adresse.setText(v.getAdresse());\n ville.setText(v.getVille());\n zip.setText(String.valueOf(v.getZip()));\n email.setText(v.getEmail());\n cemail.setText(v.getEmail());\n password.setText(v.getMdp());\n cpassword.setText(v.getMdp());\n numerodetelephone.setText(v.getNt());\n situationfiscal.getSelectionModel().select(v.getSexe());\n rib.setText(v.getNumero_bancaire());\n eemail=v.getEmail();\n \n \n \n \n }",
"private boolean validarDatos() {\r\n\t\tboolean _esValido = true;\r\n\r\n\t\tif (txField_lugar.getText() == null || txField_lugar.getText().isEmpty())\r\n\t\t\t_esValido = false;\r\n\t\treturn _esValido;\r\n\t}",
"public Form_Barang() {\n initComponents();\n model = new DefaultTableModel();\n \n barang.setModel(model);\n model.addColumn(\"KODE PRODUK\");\n model.addColumn(\"NAMA PRODUK\");\n model.addColumn(\"MERK BARANG\");\n model.addColumn(\"JUMLAH STOK\");\n model.addColumn(\"HARGA\");\n getDataProduk();\n \n }",
"public void agregarDatosClienteText(){\n try{\n \n if(codigoCliente== null){\n return; //para que nos mantenga siempre en el imput\n } \n \n ClienteDao clienteDao = new ClienteDaoImp();\n //obtenemos la instancia de Cliente en Base a su codigo\n this.cliente = clienteDao.obtenerClientePorCodigo(codigoCliente);\n \n if(cliente != null){\n codigoCliente = null;\n RequestContext.getCurrentInstance().update(\"frmFactura:inputCodCliente\");\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 }else{\n codigoCliente = null;\n RequestContext.getCurrentInstance().update(\"frmFactura:inputCodCliente\");\n FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR,\"Error\", \"Cliente No encontrado con ese codigo\");\n FacesContext.getCurrentInstance().addMessage(null, message); \n }\n \n //codigoCliente = null; \n }catch(Exception e){\n e.printStackTrace();\n } \n }",
"public JFrmCadDeclaAcompanhante1() {\n initComponents();\n int diaSelecionado;\n }",
"public void editarProyecto(Connection conn) {\n\t\t\t\tArrayList<APair<String,String>> compulsoryVars = new ArrayList<>();\n\t\t\t\tcompulsoryVars.add(new APair<String,String> (\"txtIdProyecto\", \"Id del proyecto\"));\n\t\t\t\tcompulsoryVars.add(new APair<String,String> (\"txtIdGrupo\",\"Id del grupo\"));\n\t\t\t\tcompulsoryVars.add(new APair<String,String> (\"txtNombre\",\"Nombre del proyecto\"));\n\t\t\t\tcompulsoryVars.add(new APair<String,String>(\"txtDescripcion\", \"Descripcion del proyecto\"));\n\t\t\t\t\n\t\t\t\tint nError = 0;\n\t\t\t\tfor (APair<String, String> i : compulsoryVars) {\n\t\t\t\t\tJTextField tempC = (JTextField) ObjectMapper.getComponentByName(i.getIndex(), componentMap);\n\t\t\t\t\tif(tempC != null) {\n\t\t\t\t\tif(tempC.getText().isEmpty()) {\n\t\t\t\t\t\tSystem.err.println(\"Error \" + String.valueOf(++nError) + \": No ha indicado ninguna respuesta en \" + i.getValue());\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\t//Comproba si el formato usado es el correcto\n\t\t\t\tArrayList<APair<String,ConcreteText>> formatVars = new ArrayList<>();\n\t\t\t\tformatVars.add(new APair<String,ConcreteText>(\"txtIdProyecto\",new ConcreteText(\"Id del proyecto\",TextTypes.ID)));\n\t\t\t\tformatVars.add(new APair<String,ConcreteText>(\"txtIdGrupo\",new ConcreteText(\"Id del grupo\",TextTypes.ID)));\n\t\t\t\tformatVars.add(new APair<String,ConcreteText>(\"txtNombre\",new ConcreteText(\"Nombre del grupo\",TextTypes.NAME)));\n\t\t\t\tformatVars.add(new APair<String,ConcreteText>(\"txtDescripcion\",new ConcreteText(\"Descripcion del proyecto\",TextTypes.DESCRIPTION)));\n\n\t\t\t\tfor (APair<String, ConcreteText> i : formatVars) {\n\t\t\t\t\tJTextField tempC = (JTextField) ObjectMapper.getComponentByName(i.getIndex(), componentMap);\n\t\t\t\t\tif(tempC!=null) {\n\t\t\t\t\tif(tempC.getText().isEmpty() && !ConcreteText.isValid(tempC.getText(), i.getValue().getTextType())) {\n\t\t\t\t\t\tSystem.err.println(\"Error \" + String.valueOf(++nError) + \": No ha indicado ninguna respuesta en \" + i.getValue());\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//Si no hay errores lo enviamos\n\t\t\t\t\tString proyectoID = txtIdProyecto.getText();\n\t\t\t\t\tString grupoID = txtIdGrupo.getText();\n\t\t\t\t\tString nombreProyecto = txtNombre.getText();\n\t\t\t\t\n\t\t\t\t\tif(nError==0) {\n\t\t\t\t\t\tServerUserFunctionality.updateProyect(conn, proyectoID, new String[] {grupoID, nombreProyecto});\n\t\t\t\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Proyecto actualizado con exito\", \"ACTUALIZADO\", 1);\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\n\t}",
"public Dolar() {\n initComponents();\n //txt_compra.setText(con.getCompra());\n //txt_venta.setText(con.getVenta());\n }",
"private void limpiarCampos(){\n\ntxtId.setText(\"\");\ntxtCosto.setText(\"\");\ntxtDestino.setText(\"\");\ntxtKilom.setText(\"\");\ntxtMatricula.setText(\"\");\n\n\n\n}",
"public ConsultasRecibos() {\n initComponents();\n cargar_todos_recibos();//LLAMADA A MOSTRAR TODOS LOS RECIBOS\n jDateChooser1.setEnabled(false);//OPCION DE FECHA BLOQUEADA \n }",
"public View(String frmWel) {\n super(\"View Data\");\n initComponents();\n con=javaconnect.ConnecrDb();\n nameField.setText(frmWel);\n updateTable();\n \n }",
"public void limpaTextFields() {\n tfMatricula.setText(\"\");\n tfNome.setText(\"\");\n tfDataNascimento.setText(\"\");\n tfTelefone.setText(\"\");\n tfSalario.setText(\"\");\n }",
"public frmClienteIncobrable() {\n initComponents();\n \n //CARGAR PROVINCIAS\n ArrayList<clsComboBox> dataProvincia = objProvincia.consultarTipoIncobrable(); \n for(int i=0;i<dataProvincia.size();i=i+1)\n {\n clsComboBox oItem = new clsComboBox(dataProvincia.get(i).getCodigo(), dataProvincia.get(i).getDescripcion());\n cmbTipoIncobrable.addItem(oItem); \n } \n \n \n //CARGAR AUTOCOMPLETAR\n List<String> dataCedula = objCliente.consultarCedulas(); \n SelectAllUtils.install(txtCedula);\n ListDataIntelliHints intellihints = new ListDataIntelliHints(txtCedula, dataCedula); \n intellihints.setCaseSensitive(false);\n \n Date fechaActual = new Date();\n txtFecha.setDate(fechaActual);\n }",
"private void limpiarCampos() {\n\t\tthis.campoClave.setText(\"\");\n\t\tthis.campoClaveNueva.setText(\"\");\n\t\tthis.campoClaveRepita.setText(\"\");\n\t}",
"public void recuperarDatosMedidor(String codigo){\n\t\ttry{\n\t\t\tList<Medidor> listaMedidor = new ArrayList<Medidor>();\n\t\t\tlistaMedidor = medidorDao.getRecuperaMedidor(codigo);\n\t\t\tfor(int i = 0 ; i < listaMedidor.size() ; i ++) {\n\t\t\t\ttxtIdMedidor.setText(String.valueOf(listaMedidor.get(i).getIdMedidor()));\n\t\t\t\ttxtCodigo.setText(listaMedidor.get(i).getCodigo());\n\t\t\t\tcboEstadoMed.setValue(listaMedidor.get(i).getEstadoMedidor());\n\t\t\t\ttxtMarca.setText(listaMedidor.get(i).getMarca());\n\t\t\t\ttxtModelo.setText(listaMedidor.get(i).getModelo());\n\t\t\t\ttxtPrecio.setText(String.valueOf(listaMedidor.get(i).getPrecio()));\n\t\t\t\t\n\t\t\t\tmedidorSeleccionado = listaMedidor.get(i);\n\t\t\t}\n\t\t\tif (listaMedidor.size() == 0)\n\t\t\t\tmedidorSeleccionado = new Medidor();\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void limparCamposInput(){\n txtDisciplina.setText(\"\");\n txtAssunto.setText(\"\");\n txtDescricao.setText(\"\");\n imagemEnunciado.setImage(imageDefault);\n imagemResposta.setImage(imageDefault);\n }",
"public FrmIntPasienLama() {\n initComponents();\n\n /* Memberi nilai isian pasien dari form penambahan pasien (FormInternal) */\n txtNoRm.setText(FrmIntPasienBaru.ID);\n txtNamaPasien.setText(FrmIntPasienBaru.nama);\n txtAlamat.setText(FrmIntPasienBaru.alamat);\n txtJenkel.setText(FrmIntPasienBaru.jk);\n txtTglLahir.setText(FrmIntPasienBaru.tglLahir);\n\n /* Mengisi comboBox pilihPoliTujuan dari database */\n tms.setData(ss.serviceGetAllSpesialis());\n int a = tms.getRowCount();\n pilihPoliTujuan.setModel(new javax.swing.DefaultComboBoxModel(ss.serviceGetAllNamaSpesialis(a)));\n\n /* Mengisi comboBox pilihJaminan dari database */\n tmj.setData(js.serviceGetAllJaminan());\n int b = tmj.getRowCount();\n pilihJaminan.setModel(new javax.swing.DefaultComboBoxModel(js.serviceGetAllIdJaminan(b)));\n\n tmsf.setData(sfs.serviceGetAllStaf());\n int c = tmsf.getRowCount();\n pilihStaf.setModel(new javax.swing.DefaultComboBoxModel(sfs.serviceGetAllNamaStaf(c)));\n\n Date dt = new Date();\n tglPendaftaran.setDate(dt);\n\n /* Mengisi pilihan dokter berdasarkan pilihan spesialis */\n //isiPilihanDokter();\n\n /* Menampilkan konfirmasi apabila form pendaftaran ini di-close */\n this.addInternalFrameListener(new InternalFrameAdapter() {\n\n @Override\n public void internalFrameClosing(InternalFrameEvent e) {\n if (txtNamaPasien.getText() == null ? \"\" == null : txtNamaPasien.getText().equals(\"\")) {\n dispose();\n } else {\n int pilih = JOptionPane.showConfirmDialog(rootPane,\n \"Yakin ingin membatalkan pendaftaran ke Poliklinik?\",\n \"Konfirmasi\",\n JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n if (pilih == JOptionPane.OK_OPTION) {\n dispose();\n /* Menghilangan nilai dari form penambahan pasien (internal) */\n FrmIntPasienBaru.ID = \"\";\n FrmIntPasienBaru.nama = \"\";\n FrmIntPasienBaru.alamat = \"\";\n FrmIntPasienBaru.jk = \"\";\n FrmIntPasienBaru.tglLahir = \"\";\n }\n }\n }\n });\n\n /* Apabila pilihan poli tujuan berubah, maka pilihan dokter akan ikut berubah */\n pilihPoliTujuan.addItemListener(new ItemListener() {\n\n public void itemStateChanged(ItemEvent e) {\n try {\n isiPilihanDokter();\n } catch (Throwable t) {\n }\n }\n });\n\n\n }",
"private boolean campiVuoti(){\n return nomeVarTextField.getText().equals(\"\") || tipoVarComboBox.getSelectedIndex() == -1;\n }"
]
| [
"0.70058686",
"0.6358181",
"0.6191259",
"0.6135596",
"0.6124709",
"0.6118707",
"0.6102391",
"0.6095444",
"0.6090672",
"0.6075624",
"0.60573685",
"0.6043742",
"0.60417175",
"0.60409766",
"0.5969874",
"0.59688365",
"0.59648645",
"0.59462714",
"0.59462714",
"0.59462714",
"0.59462714",
"0.59462714",
"0.59462714",
"0.59462714",
"0.59462714",
"0.59462714",
"0.59462714",
"0.59462714",
"0.59462714",
"0.59462714",
"0.59462714",
"0.59462714",
"0.59462714",
"0.59462714",
"0.59462714",
"0.59462714",
"0.59462714",
"0.59462714",
"0.59462714",
"0.59462714",
"0.59462714",
"0.59462714",
"0.59462714",
"0.59462714",
"0.59462714",
"0.59462714",
"0.59462714",
"0.59462714",
"0.59462714",
"0.59462714",
"0.59462714",
"0.59462714",
"0.59462714",
"0.5938845",
"0.59244",
"0.5917678",
"0.5881379",
"0.58684325",
"0.5868288",
"0.58678997",
"0.5858678",
"0.5842943",
"0.58403635",
"0.58373415",
"0.58327323",
"0.58247346",
"0.5810232",
"0.5807529",
"0.58045584",
"0.58004594",
"0.5797122",
"0.5796218",
"0.57824224",
"0.57753175",
"0.5769685",
"0.57644767",
"0.57582474",
"0.5757479",
"0.57420963",
"0.573742",
"0.57305837",
"0.5725228",
"0.57173854",
"0.570493",
"0.5691681",
"0.5687942",
"0.56806314",
"0.56785285",
"0.56682616",
"0.5659709",
"0.5654041",
"0.5651709",
"0.5650252",
"0.56498665",
"0.5642163",
"0.5615373",
"0.56128186",
"0.5609152",
"0.56081957",
"0.55990666",
"0.55953"
]
| 0.0 | -1 |
Starts this service to perform action Baz with the given parameters. If the service is already performing a task this action will be queued. | public static void startUpdate(Context context, String url, String fileName, OnProgressListener progressListener) {
mProgressListener = progressListener;
Intent intent = new Intent(context, AppUpdateService.class);
intent.setAction(ACTION_UPDATE);
intent.putExtra(EXTRA_URL, url);
intent.putExtra(EXTRA_FILE_NAME, fileName);
context.startService(intent);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void doStart() {\n if (this.mActive == null) {\n a();\n } else {\n com.alipay.mobile.common.task.Log.v(TAG, \"StandardPipeline.start(a task is running, so don't call scheduleNext())\");\n }\n }",
"public void startTask() {\n\t}",
"public static void startActionBaz(Context context, String param1, String param2) {\n Intent intent = new Intent(context, GcmIntentService.class);\n intent.setAction(ACTION_BAZ);\n intent.putExtra(EXTRA_PARAM1, param1);\n intent.putExtra(EXTRA_PARAM2, param2);\n context.startService(intent);\n }",
"public static void startActionBaz(Context context, String param1, String param2) {\n Intent intent = new Intent(context, AlarmIntentService.class);\n intent.setAction(ACTION_BAZ);\n intent.putExtra(EXTRA_PARAM1, param1);\n intent.putExtra(EXTRA_PARAM2, param2);\n context.startService(intent);\n }",
"public static void startActionBaz(Context context, String param1, String param2) {\n Intent intent = new Intent(context, EasyAdsService.class);\n intent.setAction(ACTION_BAZ);\n intent.putExtra(EXTRA_PARAM1, param1);\n intent.putExtra(EXTRA_PARAM2, param2);\n context.startService(intent);\n }",
"public static void startActionBaz(Context context, String param1, String param2){\n\tIntent intent = new Intent(context, MyIntentService.class);\n\tintent.setAction(ACTION_BAZ);\n\tintent.putExtra(EXTRA_PARAM1, param1);\n\tintent.putExtra(EXTRA_PARAM2, param2);\n\tcontext.startService(intent);\n }",
"public static void startActionBaz(Context context, String param1, String param2) {\n Intent intent = new Intent(context, ServerIntentService.class);\n intent.setAction(ACTION_BAZ);\n intent.putExtra(EXTRA_PARAM1, param1);\n intent.putExtra(EXTRA_PARAM2, param2);\n context.startService(intent);\n }",
"public final void activate(){\n waitingToExecute = true;\n }",
"public final void execute() {\n\t\tLogUtils.i(TAG, \"execute\");\n\t\tpurelySetState(TaskState.Preparing);\n\t\tTaskQueue.addTask(this);\n\t}",
"public void startExecuting() {}",
"@Override\n\t\tpublic void beginTask(String arg0, int arg1) {\n\n\t\t}",
"public void execute(){\n\t\tnew PayCarOrderTask().execute();\n\t}",
"@Override\n public void execute() {\n Time.sleep(3000);\n Starting.execute();\n }",
"public void execute() {\n\t\tlaunch();\n\t}",
"public void startExecuting() {\n this.taskOwner.setAttackTarget(this.target);\n super.startExecuting();\n }",
"public void execute(){\n if (pipeline != null){\n pipeline.addTask(this);\n } else {\n run();\n }\n }",
"public synchronized void start() {\n\t\tstartSuspended();\r\n\t\tsetRunnable(true);\r\n\t}",
"@Override\n\tpublic void run() {\n\t\tlong starttime = System.currentTimeMillis();\n\n\t\tboolean started = statusMap.get(type);\n\t\tif (!started) {\n\n\t\t\tstatusMap.put(type, true);\n\t\t\tlogger.info(\n\t\t\t\t\t\"task of id add to queue of busType : {} started,current milestone : {}\",\n\t\t\t\t\tAptConstants.BUS_NAME_MAP.get(type), milestone);\n\t\t\ttry {\n\t\t\t\tIdGeneratorQueue queue = QueueUtil\n\t\t\t\t\t\t.getIdGeneratorQueue(AptConstants.BUS_NAME_MAP.get(type));\n\n\t\t\t\tif (null == queue) {\n\t\t\t\t\tlogger.error(\n\t\t\t\t\t\t\t\"task of add id to queue faile , no queue of name: {} finded\",\n\t\t\t\t\t\t\tAptConstants.BUS_NAME_MAP.get(type));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tlogger.info(\"queue : {} has {} id not uesed.\", queue.getSize());\n\t\t\t\tlong nextMilestone = generatorService.nextMilestone(type);\n\t\t\t\tlogger.info(\"task of add id to queue,nextMilestone is {}\", nextMilestone);\n\n\t\t\t\tif (nextMilestone <= milestone) {\n\t\t\t\t\tlogger.error(\n\t\t\t\t\t\t\t\"task of get next milestone error,nextMileStone is smaller, busType: {},miletone : {}\",\n\t\t\t\t\t\t\tAptConstants.BUS_NAME_MAP.get(type), milestone);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tlong start = milestone + 1;\n\t\t\t\tlong end = nextMilestone + 1;\n\n\t\t\t\tlogger.info(\"start add id to queue : {},start : {},end : {}\",\n\t\t\t\t\t\tAptConstants.BUS_NAME_MAP.get(type), start, end);\n\t\t\t\tqueue.setMileStone(nextMilestone);\n\t\t\t\t//填充数据 满等待\n\t\t\t\tfor (long i = start; i <= end; i++) {\n\t\t\t\t\tqueue.putId(i);\n\t\t\t\t}\n\t\t\t\tlogger.info(\"success add id to queue! busType : {}\",\n\t\t\t\t\t\tAptConstants.BUS_NAME_MAP.get(type));\n\t\t\t\tstatusMap.put(type, false);\n\n\t\t\t} catch (Exception e) {\n\t\t\t\tlogger.error(\"task of id add to queue of busType : {} failed \",\n\t\t\t\t\t\tAptConstants.BUS_NAME_MAP.get(type));\n\t\t\t\tlogger.error(\"\", e);\n\t\t\t}\n\t\t}\n\t\tlong endtime = System.currentTimeMillis();\n\n\t\tlogger.info(\"task off add to queue ended,busType : {},usetime : {}\",\n\t\t\t\tAptConstants.BUS_NAME_MAP.get(type), endtime - starttime);\n\t}",
"public void runBlocking() {\n if (!this.stopAction.isDone()) {\n this.tryPerformBeforeAction();\n this.tryCreateTaskAssignment();\n this.startLoadGeneration();\n }\n this.stopAction.join();\n this.stopLoadGeneration();\n this.stopFinished.complete(null);\n }",
"@Override\n\t\t\tpublic void beginTask(String name, int totalWork) {\n\t\t\t\t\n\t\t\t}",
"public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t}",
"public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t}",
"public void start() {\n\t\tthis.controller.run();\n\t}",
"@Override\n public void startExecuting() {\n getActiveRoutine().startExecutingRoutine();\n }",
"@Override\n public void activateFlower(@NonNull String taskId) {\n }",
"public void execute() {\n setExecuted(true);\n }",
"protected void execute() {\n command.start();\n }",
"public void scheduleJobs();",
"public static void startActionAddData(Context context, String param1, String param2) {\n Intent intent = new Intent(context, DbIntentService.class);\n intent.setAction(ACTION_BAZ);\n intent.putExtra(EXTRA_PARAM1, param1);\n intent.putExtra(EXTRA_PARAM2, param2);\n context.startService(intent);\n }",
"@Override\n public void run() {\n started.set(!canceled.get());\n if (started.get()) {\n runBuildOperation();\n }\n }",
"private void execStartAction(String action){\n\n if (action.length() == 0) { return; }\n\n if (startTask != null ){\n startTask.interrupt();\n startTask = null;\n }\n\n RunningTask rt = new RunningTask(this,action.split(\" \"),true);\n startTask = new Thread(rt);\n startTask.start();\n }",
"static public void queueOperation(Context context, OperationInfo args) {\n // Set the schedule time for execution based on the desired delay.\n args.calculateScheduledTime();\n\n synchronized (sWorkQueue) {\n sWorkQueue.add(args);\n sWorkQueue.notify();\n }\n\n context.startService(new Intent(context, AsyncQueryServiceHelper.class));\n }",
"void startTask( org.openxdata.server.admin.model.TaskDef task, AsyncCallback<java.lang.Boolean> callback );",
"@Override\n\tpublic void start()\n\t{\n\t\tarena = \"scenarios/boxpushing/arena/pioneer.controller.arena.txt\"; \n\n\t\t\n\t\tschedule.reset();\n\n\t\tsuper.start();\n\n\t\tresetBehavior();\n\n\t}",
"public void beginTask(String tr) {\n\t\t\n\t}",
"public void startExecuting()\n {\n super.startExecuting();\n }",
"@Override\n protected void onStart() {\n super.onStart();\n\n if (mBangingTunesItent == null) {\n mBangingTunesItent = new Intent(this, BangingTunes.class);\n final boolean bindIndicator = bindService(mBangingTunesItent, mServiceConnection, Context.BIND_AUTO_CREATE);\n final ComponentName componentName = startService(mBangingTunesItent);\n }\n }",
"@Override\n public void start(int totalTasks) {\n }",
"public void start() {\n\t\tSystem.out.println(\"BMW start method\");\n\t}",
"protected abstract void doStart();",
"private void scheduleJob() {\n\n }",
"@Override\n\tpublic void preExecuteTask(Task t,Map context) {\n\t\tlog.info(\"Task Id:\"+t.getTaskId()+\"--Task Name:\"+t.getTaskName()+\"--Task begin execute!\");\n\t}",
"@Transactional \n public void start(){\n\t \n System.out.println(repositoryService.createDeployment().addClasspathResource(\"diagrams/taskProcess.bpmn\").deploy().getName());\n Map<String, Object> vars1 = new HashMap<String, Object>();\n\t \n\tString procId = runtimeService.startProcessInstanceByKey(\"myProcess\", vars1).getId();\n \n System.out.println(\"启动流程流程id=\"+procId);\n \n // 获得第一个任务\n List<Task> tasks = taskService.createTaskQuery().taskCandidateGroup(\"bin\").list();\n //List<Task> tasks = taskService.createTaskQuery().taskCandidateUser(\"test\").list();\n for (Task task : tasks) {\n System.out.println(\"要分配的任名称 \" + task.getName());\n //分配的用户\n taskService.claim(task.getId(), \"bin\");\n }\n \n tasks = taskService.createTaskQuery().taskAssignee(\"bin\").list();\n for (Task task : tasks) {\n System.out.println(\"接收到的任务 \" + task.getName());\n // 执行(完成)任务\n taskService.complete(task.getId());\n } \n \n tasks = taskService.createTaskQuery().taskCandidateGroup(\"management\").list();\n for (Task task : tasks) {\n System.out.println(\"分配任务\" + task.getName());\n // 分配给的人\n taskService.claim(task.getId(), \"bin\");\n \n }\n \n \n tasks = taskService.createTaskQuery().taskAssignee(\"bin\").list();\n \n for (Task task : tasks) {\n \t System.out.println(\"收到的任务\" + task.getName());\n taskService.complete(task.getId());\n }\n \n \n }",
"public void start() {\n mStateMachine.sendMessage(SoftApStateMachine.CMD_START, mApConfig);\n }",
"public void start() { \t\n try {\n \tTask task = new FileTask(fileScanner);\n \tTaskDescription taskDescription = new TaskDescription();\n \ttaskDescription.setName(name + \"-FILE-EP\");\n \ttaskDescription.setTaskGroup(\"FILE-EP\");\n \ttaskDescription.setInterval(interval);\n \ttaskDescription.setIntervalInMs(true);\n \ttaskDescription.addResource(TaskDescription.INSTANCE, task);\n \ttaskDescription.addResource(TaskDescription.CLASSNAME, task.getClass().getName());\n \tstartUpController = new StartUpController();\n \tstartUpController.setTaskDescription(taskDescription);\n \tstartUpController.init(synapseEnvironment);\n\n } catch (Exception e) {\n log.error(\"Could not start File Processor. Error starting up scheduler. Error: \" + e.getLocalizedMessage());\n }\n }",
"public void begin() {\n\t\t\tGeneralThreadPool.getInstance().schedule(this, 3000);\n\t\t}",
"public void begin() {\n\t\t\tGeneralThreadPool.getInstance().schedule(this, 3000);\n\t\t}",
"public void start() {\n\n }",
"public void start() {\n }",
"public void start() {\n process(0);\n }",
"@Override\n public StartFuotaTaskResult startFuotaTask(StartFuotaTaskRequest request) {\n request = beforeClientExecution(request);\n return executeStartFuotaTask(request);\n }",
"public CallCenter(double t0time, DispMeth param, int numstaffA, int numstaffB, Seeds sd)\n\t\t{\t\t\n\t\t // all entity attributes initialised in constructors \n\t\t dispMeth = param;\n\t\t numStaffA=numstaffA;\n\t\t numStaffB=numstaffB;\n\t\t rStaff=new Staff[numStaffA+numStaffB]; \n\t\t\t// Setup Random Variate Procedures\n\t\t rvp = new RVPs(this, sd);\n\t\t dvp = new DVPs(this);\n\t\t\t// Initialise the simulation model\n\t\t\tinitAOSimulModel(t0time); \n\t\t\t\n\t\t\t// Schedule Initialise action\n\t\t\tInitialise init = new Initialise(this);\n\t\t\tscheduleAction(init); // Should always be first one scheduled.\n\n\t\t\t\n\t\t\t// Schedule the first arrivals \n\t\t\t// Create action actionName\n\t\t\tCallArrival arr = new CallArrival(this);\n\t\t scheduleAction(arr);\n\t\t \n\t\t //Schedule BizStateChange\n\t\t BizStateChange bsc=new BizStateChange(this);\n\t\t scheduleAction(bsc);\n\t\t \n\t\t //Schedule StartBiz\n\t\t StartBiz stb=new StartBiz(this);\n\t\t scheduleAction(stb);\n\t\t \n\t\t}",
"public void start(){\n CoffeeMakerHelper coffeeMakerHelper = new CoffeeMakerHelper(inputArgs[0]);\n coffeeMakerService = coffeeMakerHelper.parseJsonFile();\n computeCoffeeMaker();\n }",
"public void start();",
"public void start();",
"public void start();",
"public void start();",
"public void start();",
"public void start();",
"public void start();",
"public void start();",
"public void start();",
"public void start();",
"public void start();",
"public void start();",
"public void start()\n {\n }",
"@Override\n\tpublic void startRequest(int taskId) {\n\n\t}",
"private void doActivation() {\n OnFieldActivated activateEvent = new OnFieldActivated(this::finishReset);\n activateEvent.beginTask();\n DefenceField.getShrineEntity().send(activateEvent);\n activateEvent.finishTask();\n }",
"@Override\n\tpublic void run() {\n\t\tif (this.isRunning == true) {\n\t\t\treturn;\n\t\t}\n\t\tthis.isRunning = true;\n\t\t// 写入一条日志\n\t\t\n\t\t// 详细运行参数\n\t\ttry {\n\t\t\tthis.taskRun();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tthis.isRunning = false;\n\t\tthis.addHistory(new Date());\n\t\tif(this.once) {\n\t\t\tthis.cancel();\n\t\t}\n\t}",
"@Override\r\n\tpublic void start() {\n\t\tthis.controller.start();\r\n\t}",
"protected void beginExecution() {\r\n\t\tframeAdvancer = provideFrameAdvancer();\r\n\t\tanimation = provideAnimation();\r\n\t\tcontinuation = provideContinuationPredicate();\r\n\t\tObjects.requireNonNull(frameAdvancer);\r\n\t\tObjects.requireNonNull(animation);\r\n\t\tObjects.requireNonNull(continuation);\r\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 }",
"public void start() {\n retainQueue();\n mRequestHandle = mRequestQueue.queueRequest(mUrl, \"GET\", null, this, null, 0);\n }",
"@Override\n public <T> void onCreate(Task<T> task) {\n\n final String taskId = task.getTaskId();\n\n if (!StringUtils.isEmpty(taskId)) {\n if (inProgressQueue.containsKey(taskId)) {\n// task.setSkipExecution(true);\n } else {\n inProgressQueue.put(taskId, task);\n// task.setSkipExecution(false);\n }\n } else {\n logger.warn(\"Task Id can not be null for qnqueing task\");\n }\n }",
"@Override\n\t\tpublic void run() {\n\t\t\ttask();\n\t\t}",
"public void start() {}",
"public void start() {}",
"public void start(){\n }",
"public void start() {\r\n\t\trunning = true;\r\n\t\trun();\r\n\t}",
"public void Start();",
"public CallCenter(double t0time, double tftime, DispMeth param, int numstaffA, int numstaffB, Seeds sd)\n\t\t{\t\t\n\t\t // all entity attributes initialised in constructors \n\t\t dispMeth = param;\n\t\t numStaffA=numstaffA;\n\t\t numStaffB=numstaffB;\n\t\t rStaff=new Staff[numStaffA+numStaffB]; \n\t\t\t// Setup Random Variate Procedures\n\t\t rvp = new RVPs(this, sd);\n\t\t dvp = new DVPs(this);\n\t\t\t// Initialise the simulation model\n\t\t\tinitAOSimulModel(t0time,tftime); \n\t\t\t\n\t\t\t// Schedule Initialise action\n\t\t\tInitialise init = new Initialise(this);\n\t\t\tscheduleAction(init); // Should always be first one scheduled.\n\n\t\t\t\n\t\t\t// Schedule the first arrivals \n\t\t\t// Create action actionName\n\t\t\tCallArrival arr = new CallArrival(this);\n\t\t scheduleAction(arr);\n\t\t \n\t\t //Schedule BizStateChange\n\t\t BizStateChange bsc=new BizStateChange(this);\n\t\t scheduleAction(bsc);\n\t\t \n\t\t //Schedule StartBiz\n\t\t StartBiz stb=new StartBiz(this);\n\t\t scheduleAction(stb);\n\t\t \n\t\t}",
"void onServiceBegin(int taskCode);",
"public void start() {\n \t\tLog.info(\"Starting service of repository requests\");\n \t\ttry {\n \t\t\tresetNameSpace();\n \t\t} catch (Exception e) {\n \t\t\tLog.logStackTrace(Level.WARNING, e);\n \t\t\te.printStackTrace();\n \t\t}\n \t\t\n \t\tbyte[][]markerOmissions = new byte[2][];\n \t\tmarkerOmissions[0] = CommandMarkers.COMMAND_MARKER_REPO_START_WRITE;\n \t\tmarkerOmissions[1] = CommandMarkers.COMMAND_MARKER_BASIC_ENUMERATION;\n \t\t_markerFilter = new Exclude(markerOmissions);\n \t\t\n \t\t_periodicTimer = new Timer(true);\n \t\t_periodicTimer.scheduleAtFixedRate(new InterestTimer(), PERIOD, PERIOD);\n \n \t}",
"public void activate(){\n callback.action();\n }",
"public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tif(e.getMessage()!=null) Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}",
"public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tif(e.getMessage()!=null) Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}",
"public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tif(e.getMessage()!=null) Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}",
"@Override\n\tpublic void start() {\n\t\tSystem.out.println(\"BMW -- start\");\n\t}",
"public void startExecuting()\n {\n super.startExecuting();\n this.breakingTime = 0;\n }",
"public static void startActionGetAllBiers(Context context/*, String param1, String param2*/) {\n Intent intent = new Intent(context, GetBiersServices.class);\n intent.setAction(ACTION_GET_ALL_BIERS);\n //intent.putExtra(EXTRA_PARAM1, param1);\n //intent.putExtra(EXTRA_PARAM2, param2);\n context.startService(intent);\n }",
"private void start()\n {\n _taskThread.start();\n _state = ActivityState.RUNNING;\n }",
"public String call() throws Exception {\n LOG.info(\"Starting to process task\");\n Thread.sleep(5000);\n LOG.info(\"Task is now done\");\n return \"Camel rocks\";\n }",
"public String call() throws Exception {\n LOG.info(\"Starting to process task\");\n Thread.sleep(5000);\n LOG.info(\"Task is now done\");\n return \"Camel rocks\";\n }",
"public void start()\n {}",
"public abstract void started();",
"@Override\n public boolean onStartJob(JobParameters params) {\n Log.d(TAG, \"Job started\");\n doBackgroundWork(params);\n\n return true;\n }",
"@Override\n\tpublic void execute() {\n\t\t// TODO Auto-generated method stub\n\t\tstate.setTimeForLastEvent(state.getCurrentTime());\n\t\tstate.setCurrentEvent(this);\n\t\tstate.setCurrentTime(startTime);\n\t\tstate.updateIdleTime();\n\t\tstate.updateQueueTime();\n\t\t\n\t\tstate.setCurrentCustomer(cust);\n\t\tstate.callChanged();\n\t\t\n\t\t\n\t\t\n\t\tif (state.isQueueEmpty()) {\n\t\t\tstate.increaseIdleChairs();\n\t\t}else {\n\t\t\tdouble timeForNext = state.getHairdresserFinishTime();\n\t\t\tHairSalonEvent finished = new HaircutFinishedEvent(timeForNext,state,store, state.getFirst());\n\t\t\tstore.add(finished);\n\t\t\tstate.removeFirst();\n\t\t\tstate.increaseCuttinTime(timeForNext);\n\t\t\tstate.setLatestCustomerFinishTime(timeForNext);\n\t\t\t\n\n\t\t}\n\t\tif (state.checkHaircut(cust)){\n\t\t\t\n\t\t\tdouble timeForNext = state.getUnsatisfiedCustomerArrivalTime();\n\t\t\tHairSalonEvent returning = new PriorityCustomerEntersEvent(timeForNext,state,store,cust);\n\t\t\tstore.add(returning);\n\t\t\t\n\t\t\t\n\t\t}else {\n\t\t\tstate.increaseNumberOfCust();\n\t\t}\n\t\t\n\t}",
"public start() {\n\t\tsuper();\n\t}",
"public static void launchTask(Task tsk)\n {\n getInstance().doExecute(tsk);\n }",
"public void start() {\n\n\t}",
"static void enqueueWork(Context context, Intent work) {\n enqueueWork(context, ParkSensorBackgroundService.class, JOB_ID, work);\n if (spiFileHandler == -1) {\n spiFileHandler = initSPIDevice();\n }\n if (spiFileHandler != -1) {\n Log.i(\"BackgroundService\", \"Initialized. \" + spiFileHandler);\n }\n }"
]
| [
"0.6057723",
"0.5958753",
"0.5890844",
"0.5878268",
"0.58370185",
"0.581168",
"0.57984596",
"0.5721728",
"0.57189745",
"0.56157047",
"0.55744123",
"0.5502057",
"0.54835826",
"0.54614526",
"0.54060847",
"0.5400008",
"0.5205406",
"0.51963204",
"0.519342",
"0.51924205",
"0.51877666",
"0.51877666",
"0.5178673",
"0.5175942",
"0.51689106",
"0.51604235",
"0.5150757",
"0.51493895",
"0.51372904",
"0.5102253",
"0.50878745",
"0.50687385",
"0.5050905",
"0.5040474",
"0.5038564",
"0.5029205",
"0.5027628",
"0.5018367",
"0.5018291",
"0.5011378",
"0.5011331",
"0.5010309",
"0.50074434",
"0.50065684",
"0.50056726",
"0.50053227",
"0.50053227",
"0.49931958",
"0.499285",
"0.4992621",
"0.49903318",
"0.49841347",
"0.49786985",
"0.49781194",
"0.49781194",
"0.49781194",
"0.49781194",
"0.49781194",
"0.49781194",
"0.49781194",
"0.49781194",
"0.49781194",
"0.49781194",
"0.49781194",
"0.49781194",
"0.49736282",
"0.49721774",
"0.49681494",
"0.496688",
"0.4965589",
"0.4945159",
"0.49442372",
"0.4940898",
"0.49309558",
"0.49289855",
"0.4928525",
"0.4928525",
"0.4922727",
"0.492247",
"0.49205983",
"0.4909238",
"0.4905566",
"0.490307",
"0.48976275",
"0.4893094",
"0.4893094",
"0.4893094",
"0.48929793",
"0.48912784",
"0.48905742",
"0.4889779",
"0.48861593",
"0.48861593",
"0.48852736",
"0.48759645",
"0.4871263",
"0.48689002",
"0.48685157",
"0.48636246",
"0.48624152",
"0.4854227"
]
| 0.0 | -1 |
/ Following methods deal with topic related queries Stores a topic, and associated keywords. | public static final String getTopicTableCreationSQL(String shortname) {
String crTopicTableSQL = "CREATE TABLE IF NOT EXISTS dblp_topic_" +shortname +
"(tid varchar(50) NOT NULL, " +
" keyword varchar(255) NOT NULL, " +
" istop tinyint UNSIGNED ZEROFILL, " + // Is this keyword a top keyword for this topic
" PRIMARY KEY (tid,keyword)) ";
return crTopicTableSQL;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void updateTopic(String topic);",
"public interface TopicService {\n\nboolean topicsave(Topic topic, HttpServletRequest request);\n List<Topic> getTopicList(String query);\n Topic findByname(String name);\n}",
"private void convertTopics() throws Exception {\r\n final File file = new File(TOPICS);\r\n if(!file.exists()) {\r\n Main.outln(\"Could not read \\\"\" + file.getAbsolutePath() + \"\\\"\");\r\n return;\r\n }\r\n \r\n // scan all queries\r\n final FileInputStream fis = new FileInputStream(file);\r\n final InputStreamReader isr = new InputStreamReader(fis, \"UTF8\");\r\n final BufferedReader br = new BufferedReader(isr);\r\n String line = null;\r\n String t = \"\";\r\n String ty = \"\";\r\n \r\n final PrintOutput out = new PrintOutput(QUERIES);\r\n while((line = br.readLine()) != null) {\r\n if(line.indexOf(\"topic ct_no\") > -1) {\r\n // extract topic id\r\n int s0 = line.indexOf('\"');\r\n int s1 = line.indexOf('\"', s0 + 1);\r\n t = line.substring(s0 + 1, s1);\r\n // extract content id\r\n s0 = line.indexOf('\"', s1 + 1);\r\n s1 = line.indexOf('\"', s0 + 1);\r\n //ca = line.substring(s0 + 1, s1);\r\n // extract type\r\n s0 = line.indexOf('\"', s1 + 1);\r\n s1 = line.indexOf('\"', s0 + 1);\r\n ty = line.substring(s0 + 1, s1);\r\n } else if(line.indexOf(\"xpath_title\") > -1) {\r\n // extract query\r\n final int s0 = line.indexOf('/');\r\n final String q = line.substring(s0, line.lastIndexOf('<'));\r\n out.println(t + \";\" + c + \";\" + ty + \";\" + q);\r\n }\r\n }\r\n br.close();\r\n }",
"public void setTopic(Topic topic) {\n this.topic = topic;\n }",
"public void setTopic( String topic ) {\n this.topic = topic;\n }",
"public void setTopic(String topic) {\n this.topic = topic;\n }",
"public interface TopicService {\n Topic saveNew(Topic topic);\n Topic findOne(int id);\n Topic update(int id, int parentId, Stream<Integer> relatedTopicIds);\n Topic update(int id, int parentId, List<Integer> relatedTopicIds);\n Topic findByName(String name);\n Stream<Topic> getLatestTopics(int authorId);\n}",
"int insert(UserTopic record);",
"int insert(UserTopic record);",
"void setTopic(String topic);",
"@Override\n\tpublic int topicAdd(QuestionBean q) {\n\t\tString sql = \"insert into topic(title,result,subjectName,difficulty,type,score) values('\"+q.getTitle()+\"','\"+q.getResult()+\"',\"+q.getSubjectName()+\",'\"+q.getDifficulty()+\"',\"+q.getType()+\",\"+q.getScore()+\")\";\n\t\t//int result = jt.update(sql, q.getTitle(),q.getResult(),q.getSubjectName(),q.getDifficulty(),q.getType(),q.getScore());\n\t\tKeyHolder keyHolder = new GeneratedKeyHolder();\n\t\tjt.update(new PreparedStatementCreator() {\n\t\t\t@Override\n\t\t\tpublic java.sql.PreparedStatement createPreparedStatement(java.sql.Connection arg0) throws SQLException {\n\t\t\t\tPreparedStatement ps = arg0.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);\n\t\t\t\treturn ps;\n\t\t\t}\n\t\t}, keyHolder);\n\t\tSystem.out.println(\"新增加的primarykey:\"+keyHolder.getKey().intValue());\n\t\treturn keyHolder.getKey().intValue();\n\t}",
"public AdTopicQuery(String indexField, TopicInfo[] tis) {\n\t\tthis.topicField = indexField;\n\t\tthis.tis = tis;\n\t}",
"@Override\n\tpublic List<TopicSummary> discoverTopics(String query) {\n\t\treturn null;\n\t}",
"public void execute(final String inputText, final String title, CTopicsMap topicsMap) {\n\t\tif(inputText == null) {\n\t\t\tthrow new IllegalArgumentException(\"Cannot extract semantics data from an undefined document\");\n\t\t}\n\t\t\n\n\n\t\tCText document = getTaxonomyList(inputText, title, false);\n\t\tif( document.getState() == CText.E_STATES.TAXONOMY) {\n\t\t\t\n\t\t\tCTopicsExtractor topicsExtractor = new CTopicsExtractor();\n\t\t\tif( topicsExtractor.extract(document, topicsMap, _textIndex) ) {\n\t\t\t\t\n\t\t\t\tdocument.setState(CText.E_STATES.TOPICS);\n\t\t\t\ttopicsMap.addSentences(document.getSentences());\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\t\t\t\tpublic void addTopic(String topic) {\n\t\t\t\t\t\tsendData(\"<new><name>\" + topic +\"</name></new>\");\n\t\t\t\t}",
"public void createTopic(String topic) {\n\n\t}",
"@Override\r\n\tpublic int addTopic(String name) throws SQLException {\n\t\tString sql = \"insert into topic(tname) values(?) \";\r\n\t\t\r\n\t\tint excuteUpdate = excuteUpdate(sql, name);\r\n\t\t\r\n\t\treturn excuteUpdate;\r\n\t\t\r\n\t\t\r\n\t}",
"public void addTopic(Topic topic) {\n\t\tString sql = \"insert into \"\n\t\t\t\t+ Constant.schema\n\t\t\t\t+ \".topic (topic_name, start_time, end_time, speaker_name, speaker_des, attachment, speaker_img, rating) values (?,?,?,?,?,?,?,?)\";\n\t\tList<String> paramList = new ArrayList<String>();\n\t\tparamList.add(topic.getTopicName());\n\t\tparamList.add(topic.getStartTime());\n\t\tparamList.add(topic.getEndTime());\n\t\tparamList.add(topic.getSpeakerName());\n\t\tparamList.add(topic.getSpeakerDesc());\n\t\tparamList.add(topic.getAttachment());\n\t\tparamList.add(topic.getSpeakerimg());\n\t\tparamList.add(String.valueOf(0));\n\n\t\tConnection conn = null;\n\t\tPreparedStatement pstmt = null;\n\t\ttry {\n\t\t\tconn = DBConUtil.getConn();\n\t\t\tpstmt = conn.prepareStatement(sql);\n\t\t\tconn.setAutoCommit(true);\n\t\t\tDBConUtil.executeUpdate(paramList, conn, pstmt);\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t} finally {\n\t\t\t// close connections.\n\t\t\tDBConUtil.close(conn, pstmt);\n\t\t}\n\t}",
"int insertSelective(UserTopic record);",
"int insertSelective(UserTopic record);",
"@Override\r\n\tpublic int updateTopic(Topic topic) throws SQLException {\n\t\treturn 0;\r\n\t}",
"public void setTopic(String topic) {\n\t\tthis.topic = topic;\n\t}",
"public void setTopic(String topic) {\n\t\tthis.topic = topic;\n\t}",
"UserTopic selectByPrimaryKey(Integer userid);",
"TopicMessageStore createTopicMessageStore(ActiveMQTopic destination) throws IOException;",
"public void storeFeed(GetTopicFeedRequest request, TopicsListResponse response) throws SQLException {\n storeFeed(request, response, request.getTopicFeedType().ordinal(), request.getQuery());\n }",
"int updateByPrimaryKey(UserTopic record);",
"int updateByPrimaryKey(UserTopic record);",
"public void putTopic(Topic topic) {\n\t\ttopics.add(topic) ;\n\t}",
"public interface TopicDao {\r\n public boolean create(Topic topic);\r\n}",
"public void AddKeywords()\n\t{\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t\t\tString query; \n\t\t\t\n\t\t\tfor(int i = 0; i < keywords.size(); i++)\n\t\t\t{\n\t\t\t\tString keyword = keywords.get(i); \n\t\t\t\t\n\t\t\t\tint kid = GetKIDFromWord(keyword); \n\t\t\t\t\n\t\t\t\t//word is not already in table\n\t\t\t\tif(kid == -1)\n\t\t\t\t{\n\t\t\t\t\t//insert word into Keywords \n\t\t\t\t\tSystem.out.println(\"test\"); \n\t\t\t\t\tquery = \"INSERT INTO Keywords(word) VALUE ('\"+keyword+\"')\"; \n\t\t\t \tint intoTable = con.stmt.executeUpdate(query); \n\t\t\t \t\n\t\t\t \t//able to put it in the table\n\t\t\t \tif(intoTable > 0)\n\t\t\t \t{\n\t\t\t \t\t//insert into HasKeywords\n\t\t\t\t \tkid = GetKIDFromWord(keyword); \n\t\t\t\t\t\tquery = \"INSERT INTO HasKeywords(keyword_hid, keyword_kid) VALUE('\"+hid+\"', '\"+kid+\"')\";\n\t\t\t\t \tint hasKey = con.stmt.executeUpdate(query); \n\t\t\t \t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//word is already in table\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tList<Integer> hkCheck = GetHIDSFromKID(kid);\n\t\t\t\t\t\n\t\t\t\t\tboolean inHKTable = false; \n\t\t\t\t\tfor(int j = 0; j < hkCheck.size(); j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(hkCheck.get(j) == hid)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinHKTable = true; \n\t\t\t\t\t\t\tbreak; \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(inHKTable == false)\n\t\t\t\t\t{\n\t\t\t\t\t\tquery = \"INSERT INTO HasKeywords(keyword_hid, keyword_kid) VALUE('\"+hid+\"', '\"+kid+\"')\";\n\t\t\t\t \tint hasKey = con.stmt.executeUpdate(query); \n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tcon.closeConnection();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}",
"public interface Topic {\n int getId();\n String getTitle();\n User getAdmin();\n List<Comment> getComments();\n}",
"List<Topic> searchTopicBySTag(String[] keywords);",
"protected void onTopic(String channel, String topic, String setBy, long date, boolean changed) {}",
"public void addTopic(Topic topic) {\n\t\ttopicRepository.save(topic);\n\t}",
"public List<Pair<Integer>> analyzeTopic(String collectionId, String[] keywords, List<Pair<String>> keywordTopicPairs) {\r\n List<Pair<Integer>> toReturn = new ArrayList<Pair<Integer>>();\r\n if (null == collectionId || null == keywords || 0 == collectionId.length() || 0 == keywords.length) {\r\n setError(\"APIL_0100\", \"argument's not valid.\");\r\n return toReturn;\r\n }\r\n\r\n if (null != keywordTopicPairs)\r\n keywordTopicPairs.clear();\r\n\r\n String[] paramFields = {\"collection_id\", \"keywords\", \"item_delimiter\", \"weight_delimiter\", \"value_delimiter\",\r\n \"kw_topic_map\"};\r\n SocketMessage request = new SocketMessage(\"roaster\", \"topic_ext_doc\", SocketMessage.PriorityType.EMERGENCY, SocketMessage.TransferType.BI_WAY, \"\",\r\n paramFields);\r\n request.setValue(\"collection_id\", collectionId);\r\n String keywordsStr = StringTool.arrayToString(keywords, ITEM_DELIMITER);\r\n request.setValue(\"keywords\", keywordsStr);\r\n request.setValue(\"item_delimiter\", ITEM_DELIMITER);\r\n request.setValue(\"weight_delimiter\", WEIGHT_DELIMITER);\r\n request.setValue(\"value_delimiter\", VALUE_DELIMITER);\r\n request.setValue(\"kw_topic_map\", null == keywordTopicPairs ? \"n\" : \"y\");\r\n\r\n SocketMessage response = handleMessage(request);\r\n if (!isSuccessful(response)) {\r\n if (\"\".equals(response.getErrorCode())) {\r\n setError(\"APIL_0341\", \"topic analysis (realtime) wasn't successful: coll_id=\" + collectionId);\r\n } else {\r\n wrapError(\"APIL_0341\", \"topic analysis (realtime) wasn't successful: coll_id=\" + collectionId);\r\n }\r\n } else {\r\n String topicsString = response.getValue(\"topics\").trim();\r\n toReturn = Tools.getPairListInt(topicsString, ITEM_DELIMITER, WEIGHT_DELIMITER);\r\n\r\n if (null != keywordTopicPairs) {\r\n String kwTopicsString = response.getValue(\"keyword_topics\").trim();\r\n Tools.setPairListStr(kwTopicsString, ITEM_DELIMITER, VALUE_DELIMITER, keywordTopicPairs);\r\n }\r\n }\r\n return toReturn;\r\n }",
"KTable<K, V> through(String topic);",
"UserTopic selectByPrimaryKey(Integer id);",
"public Topic getTopic() {\n return topic;\n }",
"public String getTopic() {\n return topic;\n }",
"void to(String topic);",
"private void addTopic(TopicMapIF tm, TMObjectMatcherIF matcher,\n Collection topics) {\n if (matcher instanceof TypeSpecification) {\n TypeSpecification m = (TypeSpecification) matcher;\n TopicIF type = getTopic(tm, m.getClassMatcher());\n if (type != null) {\n ClassInstanceIndexIF typeIndex = (ClassInstanceIndexIF)\n tm.getIndex(\"net.ontopia.topicmaps.core.index.ClassInstanceIndexIF\");\n topics.addAll(typeIndex.getTopics(type));\n }\n \n } else {\n TopicIF topic = getTopic(tm, matcher);\n if (topic != null)\n topics.add(topic);\n }\n }",
"private void _writeTopic(final Topic topic) throws IOException {\n // Ignore the topic if it is the default name type and it has no further\n // characteristics\n if (topic.equals(_defaultNameType)) {\n return;\n }\n _out.startObject();\n _writeItemIdentifiers(topic);\n _writeLocators(\"subject_identifiers\", topic.getSubjectIdentifiers());\n _writeLocators(\"subject_locators\", topic.getSubjectLocators());\n Set<Name> names = topic.getNames();\n if (!names.isEmpty()) {\n _out.key(\"names\");\n _out.startArray();\n for (Name name: names) {\n _writeName(name);\n }\n _out.endArray();\n }\n Set<Occurrence> occs = topic.getOccurrences();\n if (!occs.isEmpty()) {\n _out.key(\"occurrences\");\n _out.startArray();\n for (Occurrence occ: occs) {\n _writeOccurrence(occ);\n }\n _out.endArray();\n }\n _out.endObject();\n }",
"public abstract FeedbackDocuments getFeedbackDocuments(String topicId);",
"public interface STagTopicDAO extends BaseDAO<STagTopic> {\n /**\n * Retrieves semantic tags of topics with given id from table \"STAGTopic\"\n * @param id the id of topic\n * @return list of Semantic Tags\n */\n List<SemanticTag> getSTagByTopicId(long id);\n\n /**\n * Retrieves result set by checking semantic tags related to query\n * @param keywords search query\n * @return list of topics\n */\n List<Topic> searchTopicBySTag(String[] keywords);\n}",
"public void createTopics(String[] topics) {\n\n\t}",
"public Topic retrieveTopic(String topic) //from hashmap\r\n\t{\r\n\t\treturn topics.get(topic);\r\n\t}",
"@RequestMapping(method=RequestMethod.POST, value = \"/topics\")\r\n\t\r\n\t// '@RequestBody' will convert content of the incoming \r\n\t// Request (POST) body to your parameter object on the fly \r\n\t// 'POST'/request should contain the object itself that's being sent \r\n\t// After object is sent, it is passed as an instance of class 'Topic'\r\n\tpublic void addTopic(@RequestBody Topic topic) {\r\n\t\ttopicService.addTopic(topic);\r\n\t\t\r\n\t}",
"int updateByPrimaryKeySelective(UserTopic record);",
"int updateByPrimaryKeySelective(UserTopic record);",
"@Override\n public void updateTopicAccess(String userId, String topicId) {\n\n\t}",
"public String getTopic() {\n return topic;\n }",
"public String getTopic() {\n return this.topic;\n }",
"public void search(Indexer indexer, CityIndexer cityIndexer, Ranker ranker, String query, boolean withSemantic, ArrayList<String> chosenCities, ObservableList<String> citiesByTag, boolean withStemming, String saveInPath, String queryId, String queryDescription) {\n String[] originalQueryTerms = query.split(\" \");\n String originQuery = query;\n docsResults = new HashMap<>();\n parser = new Parse(withStemming, saveInPath, saveInPath);\n HashSet<String> docsOfChosenCities = new HashSet<>();\n query = \"\" + query + queryDescription;\n HashMap<String, Integer> queryTerms = parser.parseQuery(query);\n HashMap<String, ArrayList<Integer>> dictionary = indexer.getDictionary();\n if (!withStemming){\n setDocsInfo(saveInPath + \"\\\\docsInformation.txt\");\n }\n else{\n setDocsInfo(saveInPath + \"\\\\docsInformation_stemming.txt\");\n }\n\n\n //add semantic words of each term in query to 'queryTerms'\n if(withSemantic) {\n HashMap<String,ArrayList<String>> semanticWords = ws.connectToApi(originQuery);\n }\n\n //give an ID to query if it's a regular query (not queries file)\n if(queryId.equals(\"\")){\n queryId = \"\" + Searcher.queryID;\n Searcher.queryID++;\n }\n\n String postingDir;\n if (!withStemming) {\n postingDir = \"\\\\indexResults\\\\postingFiles\";\n } else {\n postingDir = \"\\\\indexResults\\\\postingFiles_Stemming\";\n }\n int pointer = 0;\n\n //find docs that contain the terms in the query in their text\n HashMap<String, Integer> queryTermsIgnoreCase = new HashMap<>();\n for (String term : queryTerms.keySet()) {\n String originTerm = term;\n if (!dictionary.containsKey(term.toUpperCase()) && !dictionary.containsKey(term.toLowerCase())) {\n continue;\n }\n if(dictionary.containsKey(term.toLowerCase())){\n term = term.toLowerCase();\n }\n else {\n term = term.toUpperCase();\n }\n queryTermsIgnoreCase.put(term,queryTerms.get(originTerm));\n pointer = dictionary.get(term).get(2);\n String chunk = (\"\" + term.charAt(0)).toUpperCase();\n\n //get the relevant line from posting file\n BufferedReader br = null;\n try {\n br = new BufferedReader(new FileReader(new File(saveInPath + postingDir + \"\\\\posting_\" + chunk + \".txt\")));\n String line = \"\";\n int i = 1;\n while ((line = (br.readLine())) != null) {\n if (i == pointer) {\n break;\n }\n i++;\n }\n br.close();\n\n //get docs from posting line and add them to the data structure 'docsResults'\n if(line != null) {\n findDocsFromLine(line, term);\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n //find docs that contain the chosen cities in their text\n for (String cityTerm : chosenCities) {\n if (!dictionary.containsKey(cityTerm) && !dictionary.containsKey(cityTerm.toLowerCase())) {\n continue;\n }\n if(dictionary.containsKey(cityTerm.toLowerCase())){\n cityTerm = cityTerm.toLowerCase();\n }\n pointer = dictionary.get(cityTerm).get(2);\n // char chunk = indexer.classifyToPosting(term).charAt(0);\n String chunk = (\"\" + cityTerm.charAt(0)).toUpperCase();\n\n //get the relevant line from posting file\n BufferedReader br = null;\n try {\n br = new BufferedReader(new FileReader(new File(saveInPath + postingDir + \"\\\\posting_\" + chunk + \".txt\")));\n String line = \"\";\n int i = 1;\n while ((line = (br.readLine())) != null) {\n if (i == pointer) {\n break;\n }\n i++;\n }\n br.close();\n\n //get docs from posting line and add them to the data structure 'docsOfChosenCities'\n String docs = line.substring(0, line.indexOf(\"[\") - 1); //get 'docsListStr'\n String[] docsArr = docs.split(\";\");\n for (String docInfo : docsArr) {\n String doc = docInfo.substring(0, docInfo.indexOf(\": \"));\n while(doc.charAt(0) == ' '){\n doc = doc.substring(1);\n }\n docsOfChosenCities.add(doc);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n //find docs that contain the chosen cities in their city tag\n if(!chosenCities.isEmpty()){\n for (String cityDicRec: chosenCities) {\n //get pointer to posting from cityDictionary\n try {\n pointer = cityIndexer.getCitiesDictionary().get(cityDicRec);\n } catch (NumberFormatException e) {\n e.printStackTrace();\n }\n //get the relevant line from posting file\n BufferedReader br = null;\n try {\n br = new BufferedReader(new FileReader(new File(saveInPath + \"\\\\cityIndexResults\" + \"\\\\posting_city\" + \".txt\")));\n String line = \"\";\n int i = 1;\n while ((line = (br.readLine())) != null) {\n if (i == pointer) {\n break;\n }\n i++;\n }\n br.close();\n\n //get docs from posting line and add them to the data structure 'docsOfChosenCities'\n String docs = line.substring(line.indexOf(\"[\") + 1, line.indexOf(\"]\")); //get 'docsListStr'\n String[] docsArr = docs.split(\"; \");\n for (String doc : docsArr) {\n docsOfChosenCities.add(doc);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n\n\n ranker.rank(docsResults, docsOfChosenCities, queryTermsIgnoreCase, dictionary, docsInfo,entities, queryId);\n }",
"public TopicDto(String topic) {\n String[] fields = topic.split(\"=\");\n key = fields[0];\n value = fields[1];\n }",
"@Override\n\tpublic void saveTopicType(TopicType topicType) throws Exception {\n\n\t}",
"public void execute(final String inputText, CTopicsMap topicsMap) {\n\t\tthis.execute(inputText, null, topicsMap);\n\t}",
"public interface Topic {\n\n //注册观察者\n void registerObserver(Observer observer);\n\n //移除观察者\n void removeObserver(Observer observer);\n\n //通知观察者\n void notifyObservers(List<Observer> observerList);\n\n //发布消息\n void publish(String topic, Date publishDate, String publishContext);\n\n}",
"@Override\n\tpublic void saveTopic(String categoryId, String forumId, Topic topic,\n\t\t\tboolean isNew, boolean isMove, MessageBuilder messageBuilder)\n\t\t\tthrows Exception {\n\n\t}",
"int updateByPrimaryKey(TopicFragment record);",
"private void subscribeSent(AsyncResult<Integer> result, LinkedHashMap<String, RequestedQoS> topics) {\n if (result.failed() || result.result() == null) {\n // failed\n for (String topic : topics.keySet()) {\n notifySubscriptionState(topic, SubscriptionState.UNSUBSCRIBED, null);\n }\n } else {\n // record request\n for (String topic : topics.keySet()) {\n notifySubscriptionState(topic, SubscriptionState.SUBSCRIBING, null);\n }\n this.pendingSubscribes.put(result.result(), topics);\n }\n }",
"public void addExamTopic(int id, int eId, int tId){\r\n SQLiteDatabase db = this.getWritableDatabase();\r\n\r\n ContentValues values = new ContentValues();\r\n values.put(KEY_ID, id);\r\n values.put(KEY_EID, eId);\r\n values.put(KEY_TID, tId);\r\n\r\n db.insert(TABLE_EXAMS_TOPICS, null, values);\r\n\r\n db.close();\r\n }",
"@Override\n public synchronized Future<RpcResult<Void>> readTopic(ReadTopicInput input) {\n String topicId = input.getTopicId().getValue();\n // if requested TopicId has not been requested before then it is added into to register\n if (registeredTopic.contains(topicId) == false) {\n registeredTopic.add(topicId);\n LOG.info(\"UserAgent start read notification with TopicId {}\", topicId);\n }\n return immediateFuture(RpcResultBuilder.success((Void) null).build());\n }",
"public void setTopic(String channel, String topic);",
"@Override\r\n\t\t\t\t\tpublic void messageArrived(String topic, MqttMessage message) throws Exception {\n\t\t\t\t\t\t try { \r\n//\t\t\t\t\t\t\t SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\"); \r\n//\t\t\t\t\t\t\t String date = sdf.format(new Date());\r\n\t\t\t\t\t System.out.println(\" From:\"+message.toString()); \r\n\t\t\t\t\t \r\n\t\t\t\t\t Connection conn = null;\r\n\t\t\t\t\t Class.forName(\"com.mysql.jdbc.Driver\"); \r\n\t\t\t\t\t conn = DriverManager.getConnection(\r\n\t\t\t\t\t \t\t\"jdbc:mysql://localhost:3306/mqtt?useUnicode=true&characterEncoding=UTF-8\",\r\n\t\t\t\t\t \t\t\"root\",\r\n\t\t\t\t\t \t\t\"tmu2012\");\r\n\t\t\t\t\t System.out.println(\"connected to the database\");\r\n\r\n\t\t\t\t\t Statement stmt = conn.createStatement();\r\n\t\t\t\t\t System.out.println(\"Inserting records\");\r\n\t\t\t\t\t \r\n\t\t\t\t\t String qry1 = \"INSERT INTO mymqtts (mqtt) VALUES('\"+message.toString()+\"')\";\r\n\t\t\t\t\t stmt.executeUpdate(qry1);\r\n\t\t\t\t\t System.out.println(\"ok\");\r\n\t\t\t\t\t\t }catch (Exception e) { \r\n\t\t\t\t\t e.printStackTrace(); \r\n\t\t\t\t\t System.out.println(\"error\"); \r\n\t\t\t\t\t } \r\n\t\t\t\t\t}",
"Topic getTopic();",
"@Override\n public boolean onQueryTextSubmit(final String query) {\n Log.i(TAG, \"onQueryTextSubmit '\" + query + \"'\");\n mArtistSearch.clearFocus();\n mLatestQuery = query;\n\n mMusicServiceConnection.whenConnected(new Runnable() {\n @Override\n public void run() {\n mMusicServiceConnection.getService().findArtists(query);\n }\n });\n return true;\n }",
"VoteTopic createVoteTopic(VoteTopic topic, String userId);",
"String getNewTopic();",
"int updateByExample(@Param(\"record\") UserTopic record, @Param(\"example\") UserTopicExample example);",
"int updateByExample(@Param(\"record\") UserTopic record, @Param(\"example\") UserTopicExample example);",
"protected boolean isTopicSupported(String topic)\n {\n return true;\n }",
"@Override\n public boolean onQueryTextSubmit(String query) {\n queryMain = query;\n consultarDb();\n return true;\n }",
"public Topic readTopic(int topicId);",
"public Boolean checkTopic(String topic) {\n for (String topics2 : topics) {\n if (topics2.toLowerCase().equals(topic.toLowerCase())) {\n return true;\n }\n }\n return false;\n }",
"void start() {\n\t\t\n\t\ttts = new TextToSpeech(getApplicationContext(), new TextToSpeech.OnInitListener() {\n\t\t\t@Override\n\t\t\tpublic void onInit(int status) {\n\t\t\t\tif (status != TextToSpeech.ERROR) {\n\t\t\t\t\ttts.setLanguage(Locale.KOREAN);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\trecognizerIntent = new Intent(RecognizerIntent.ACTION_VOICE_SEARCH_HANDS_FREE);\n\t\trecognizerIntent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE, getPackageName());\n\t\trecognizerIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, \"ko-KR\");\n\t\t\n\t\tmRecognizer = SpeechRecognizer.createSpeechRecognizer(this);\n\t\tmRecognizer.setRecognitionListener(recognitionListener);\n\t\t\n\t\t\n\t\tV_button.setOnClickListener(new View.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View view) {\n\t\t\t\tif (AL_keywordSelected.size() == 0)\n\t\t\t\t\tstartVoice();\n\t\t\t\telse {\n\t\t\t\t\tString str = \"\";\n\t\t\t\t\t\n\t\t\t\t\tfor (String s : AL_keywordSelected)\n\t\t\t\t\t\tstr += s + \" \";\n\t\t\t\t\t\n\t\t\t\t\tsendMsg(str);\n\t\t\t\t\tinitKeyword();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tfirestore.collection(\"command\")\n\t\t\t.addSnapshotListener(new EventListener<QuerySnapshot>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onEvent(@Nullable QuerySnapshot snapshots, @Nullable FirebaseFirestoreException e) {\n\t\t\t\t\tif (e != null) {\n\t\t\t\t\t\tlog(\"listen:error\" + e);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfor (DocumentChange dc : snapshots.getDocumentChanges()) {\n\t\t\t\t\t\tQueryDocumentSnapshot document = dc.getDocument();\n\t\t\t\t\t\t\n\t\t\t\t\t\tString key = document.getId();\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tCommand command;\n\t\t\t\t\t\t\tswitch (dc.getType()) {\n\t\t\t\t\t\t\t\tcase ADDED:\n\t\t\t\t\t\t\t\t\tcommand = new Command(key, document);\n\t\t\t\t\t\t\t\t\tlog(\"New: \" + key);\n\t\t\t\t\t\t\t\t\tlog(command.toString());\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tmapData.put(key, command);\n\t\t\t\t\t\t\t\t\tupdateKeyword();\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase MODIFIED:\n\t\t\t\t\t\t\t\t\tcommand = new Command(key, document);\n\t\t\t\t\t\t\t\t\tlog(\"Modified: \" + key);\n\t\t\t\t\t\t\t\t\tlog(command.toString());\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tCommand oldCommand = mapData.get(key);\n\t\t\t\t\t\t\t\t\tif (command.responseTimestamp.getSeconds() != oldCommand.responseTimestamp.getSeconds()) {\n\t\t\t\t\t\t\t\t\t\tfor (String waitingKey : waitingKeys) {\n\t\t\t\t\t\t\t\t\t\t\tif (waitingKey.equals(key)) {\n\t\t\t\t\t\t\t\t\t\t\t\taddOutputMessage(command.response);\n\t\t\t\t\t\t\t\t\t\t\t\twaitingKeys.remove(key);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tmapData.put(key, command);\n\t\t\t\t\t\t\t\t\tupdateKeyword();\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase REMOVED:\n\t\t\t\t\t\t\t\t\tcommand = new Command(key, document);\n\t\t\t\t\t\t\t\t\tlog(\"Removed: \" + key);\n\t\t\t\t\t\t\t\t\tlog(command.toString());\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tmapData.remove(key);\n\t\t\t\t\t\t\t\t\tupdateKeyword();\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t\t\tlog(\"error: \" + key);\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\t\t\n\t}",
"public interface ITopicListener {\n\n void onTopicSelected(HelpTopic topic);\n }",
"public void createNewTopic() {\n try {\n forumService.createNewTopic(\n newTopicName.trim(),\n TopicCategory.OTHER,\n currentUser,\n cloudOfTopic);\n } catch (Exception e) {\n logger.error(ExceptionUtils.getStackTrace(e));\n }\n newTopicName = \"\";\n refreshForumState();\n }",
"public void addTopicQuestion(int id, int tId, int qId){\r\n SQLiteDatabase db = this.getWritableDatabase();\r\n\r\n ContentValues values = new ContentValues();\r\n values.put(KEY_ID, id);\r\n values.put(KEY_TID, tId);\r\n values.put(KEY_QID, qId);\r\n\r\n db.insert(TABLE_TOPICS_QUESTIONS, null, values);\r\n\r\n db.close();\r\n }",
"@Override\n public boolean onQueryTextSubmit(String query) {\n prepareBooks(engine.search(query.toLowerCase(),filter));\n return false;\n }",
"int insert(TopicFragmentWithBLOBs record);",
"public static void insertDiscussion(String type, String topic, String[] tags, String content,String subject_id,String user){\n\n String ID = DBOperate.getRandomString(1);\n\n String replyid = DBDiscussion.getReplyID(tags);\n\n String sql=\"\";\n\n if(replyid.equals(\"\")){\n sql = \"insert into discussion values('\"+ID+\"',NULL,'\"+user+\"','\"\n +DBOperate.getCurrentDate()+\"','\"+subject_id+\"','\"+type+\"','\"+topic+\"','\"+content+\"')\";\n }\n else{\n sql = \"insert into discussion values('\"+ID+\"','\"+replyid+\"','\"+user+\"','\"\n +DBOperate.getCurrentDate()+\"','\"+subject_id+\"','\"+type+\"','\"+topic+\"','\"+content+\"')\";\n }\n\n DBOperate.Insert(sql);\n\n for(String s: tags){\n sql = \"insert into discussion_tag values('\"+s+\"','\"+ID+\"')\";\n DBOperate.Insert(sql);\n }\n\n }",
"protected boolean pushToZanata(final DataProviderFactory providerFactory, final CollectionWrapper<TopicWrapper> topics,\n final ContentSpecWrapper contentSpecEntity) {\n final Map<TopicWrapper, Document> topicToDoc = new HashMap<TopicWrapper, Document>();\n boolean error = false;\n final ZanataInterface zanataInterface = new ZanataInterface(0.2);\n \n // Convert all the topics to DOM Documents first so we know if any are invalid\n final List<TopicWrapper> topicItems = topics.getItems();\n for (final TopicWrapper topic : topicItems) { /*\n * make sure the section title is the same as the\n * topic title\n */\n Document doc = null;\n try {\n doc = XMLUtilities.convertStringToDocument(topic.getXml());\n } catch (Exception e) {\n // Do Nothing as we handle the error below.\n }\n \n if (doc == null) {\n JCommander.getConsole().println(\n \"ERROR: Topic ID \" + topic.getId() + \", Revision \" + topic.getRevision() + \" does not have valid XML\");\n error = true;\n } else {\n topicToDoc.put(topic, doc);\n }\n \n // Good point to check for a shutdown\n allowShutdownToContinueIfRequested();\n }\n \n // Return if creating the documents failed\n if (error) {\n return false;\n }\n \n // Good point to check for a shutdown\n allowShutdownToContinueIfRequested();\n \n final float total = topics.getItems().size() + (topicsOnly ? 0 : 1);\n float current = 0;\n final int showPercent = 5;\n int lastPercent = 0;\n \n JCommander.getConsole().println(\"You are about to push \" + ((int) total) + \" topics to zanata. Continue? (Yes/No)\");\n String answer = JCommander.getConsole().readLine();\n \n final List<String> messages = new ArrayList<String>();\n \n if (answer.equalsIgnoreCase(\"yes\") || answer.equalsIgnoreCase(\"y\")) {\n JCommander.getConsole().println(\"Starting to push topics to zanata...\");\n \n // Loop through each topic and upload it to zanata\n for (final Entry<TopicWrapper, Document> topicEntry : topicToDoc.entrySet()) {\n ++current;\n final int percent = Math.round(current / total * 100);\n if (percent - lastPercent >= showPercent) {\n lastPercent = percent;\n JCommander.getConsole().println(\"\\tPushing topics to zanata \" + percent + \"% Done\");\n }\n \n final TopicWrapper topic = topicEntry.getKey();\n final Document doc = topicEntry.getValue();\n \n if (!pushTopicToZanata(providerFactory, topic, doc, zanataInterface, messages)) {\n error = true;\n }\n }\n \n // Upload the content specification to zanata\n if (!topicsOnly) {\n if (!pushContentSpecToZanata(providerFactory, contentSpecEntity, zanataInterface, messages)) {\n error = true;\n }\n }\n }\n \n // Print the info/error messages\n if (messages.size() > 0) {\n JCommander.getConsole().println(\"Output:\");\n for (final String message : messages) {\n JCommander.getConsole().println(\"\\t\" + message);\n }\n }\n \n return !error;\n }",
"public Builder setTopic(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n topic_ = value;\n onChanged();\n return this;\n }",
"@Override\n\t\t\t\tpublic void selectTopic(String topic) {\n\t\t\t\t\t\tsendData(\"<select><username>\" + username +\"</username><topic>\" + topic + \"</topic></select>\");\n\t\t\t\t}",
"protected void sequence_Topic(ISerializationContext context, Topic semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, TdlPackage.Literals.TOPIC__NAME) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, TdlPackage.Literals.TOPIC__NAME));\n\t\t\tif (transientValues.isValueTransient(semanticObject, TdlPackage.Literals.TOPIC__TOPIC) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, TdlPackage.Literals.TOPIC__TOPIC));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getTopicAccess().getNameIDTerminalRuleCall_0_0(), semanticObject.getName());\n\t\tfeeder.accept(grammarAccess.getTopicAccess().getTopicSTRINGTerminalRuleCall_2_0(), semanticObject.getTopic());\n\t\tfeeder.finish();\n\t}",
"private void subscribeToTopic(String topic) {\n try {\n mqttAndroidClient.subscribe(topic, 0, null, new IMqttActionListener() {\n @Override\n public void onSuccess(IMqttToken asyncActionToken) {\n Log.w(\"MQTT\",\"Subscribed!\");\n }\n\n @Override\n public void onFailure(IMqttToken asyncActionToken, Throwable exception) {\n Log.w(\"MQTT\", \"Subscribe fail!\");\n }\n });\n } catch (MqttException ex) {\n System.err.println(\"Exception whilst subscribing\");\n ex.printStackTrace();\n }\n }",
"public void mo110582a(Topic topic) {\n m125716j();\n this.f88305c.setText(C25382r.m123889a(new C25382r.AbstractC25387e() {\n /* class com.zhihu.android.topic.platfrom.$$Lambda$TopicFragment$pYgrdsywRofB9NlDjKoUu5Rm4cY */\n\n @Override // com.zhihu.android.topic.p1945h.C25382r.AbstractC25387e\n public final String get() {\n return TopicFragment.m125707d(Topic.this);\n }\n }));\n TopicCommonUtil.m123935a(this.f88309g, this.f90231x.mo109391a(this.f88309g, topic));\n m125701b(topic);\n m125725t();\n m125717l();\n this.f90231x.mo109394a(topic);\n m125726u();\n TopicApmUtil.m123915d();\n TopicApmUtil.m123911a(true);\n }",
"int insertSelective(TopicFragmentWithBLOBs record);",
"public String getTopic() {\n\t\treturn topic;\n\t}",
"public void add(HelpTopic topic) {\n if (topic != null && topic.getURL() != null && !sameTopic(topic, getCurrentItem())) {\n removeRange(position + 1, history.size());\n removeRange(0, history.size() - maxsize);\n position = history.size();\n history.add(topic);\n }\n\n notifyListeners(topic);\n }",
"public interface Query {\n\n\t/**\n\t * @return ID of the given query\n\t */\n\tint queryID();\n\t\n\t/**\n\t * @return given query\n\t */\n\tString query();\n\t\n\t/**\n\t * @return list of relevant documents to the corresponding query\n\t */\n\tList<RelevanceInfo> listOfRelevantDocuments();\n\t\n\t/**\n\t * @return list of results to the corresponding query after running one of the retrieval models\n\t */\n\tList<Result> resultList();\n\t\n\t/**\n\t * @param resultList\n\t * @Effects adds results to the result list of the corresponding query\n\t */\n\tvoid putResultList(List<Result> resultList);\n}",
"public Subscriber(){\n\t\tString topic;\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\ttry{\n\t\t\tSystem.out.println(\"Enter the message topic u want to search\");\n\t\t\ttopic=br.readLine();\n\t\t\tMsgRepository repo=new MsgRepository();\n\t\t\trepo.search(topic);\n\t\t}catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void promoteResult(String docId, String query);",
"private void pTopicGivenTerm(List<Integer> terms, List<Integer> topicLabels, Matrix termTopicDist) {\n int modelTermSize = topicTermCounts.columnSize();\n double Vbeta = eta * numTerms;\n for (Integer topicIndex : topicLabels) {\n Vector termTopicRow = termTopicDist.viewRow(topicIndex);\n Vector topicTermRow = topicTermCounts.viewRow(topicIndex);\n double topicSum = topicSums.getQuick(topicIndex);\n double docTopicSum = 0.0;\n for (Integer termIndex : terms) {\n if (termIndex >= modelTermSize)\n continue;\n docTopicSum += topicTermRow.getQuick(termIndex);\n }\n for (Integer termIndex : terms) {\n if (termIndex >= modelTermSize)\n continue;\n double topicTermCount = topicTermRow.getQuick(termIndex);\n double topicWeight = docTopicSum - topicTermCount;\n double termTopicLikelihood = (topicTermCount + eta) * (topicWeight + alpha) / (topicSum + Vbeta);\n termTopicRow.setQuick(termIndex, termTopicLikelihood);\n }\n }\n }",
"public void queryRecommended(Query query, float score, String original);",
"@Override\n public void modifyTopic(List<Topic> topics, int type) {\n\n\t}",
"int insert(Terms record);",
"public TopicObject(boolean deleted) {\n this.deleted = deleted;\n }",
"public HashMap<String, ArrayList<String>> queryRecommendedLearningObjects(StudentAnnotationsBean studentAnnotationsBean, String keywords) throws Exception{\r\n\t\r\n\tString LOG_METHOD_NAME = \"void queryLearningObject(StudentAnnotationsBean studentAnnotationsBean, ArrayList<String> orSearchTerms)\";\r\n\tlog.debug(this.getClass() + TripleStoreConstants.LOG_BEGIN + LOG_METHOD_NAME);\r\n\tArrayList<String> imagesList = new ArrayList<String>();\r\n\tArrayList<String> audioList = new ArrayList<String>();\r\n\tArrayList<String> videoList = new ArrayList<String>();\r\n\tArrayList<String> textList = new ArrayList<String>();\r\n\tHashMap<String, ArrayList<String>> returnMap = new HashMap<String, ArrayList<String>>();\r\n\ttry{\r\n\t\t\r\n\t\tStringBuffer sparqlQueryString = new StringBuffer();\r\n\t\tsparqlQueryString.append(TripleStoreConstants.PREFIX_TEN_ONTOLOGY);\r\n\t\tsparqlQueryString.append(TripleStoreConstants.PREFIX_TEN_IMAGE);\r\n\t\tsparqlQueryString.append(TripleStoreConstants.PREFIX_TEN_AUDIO);\r\n\t\tsparqlQueryString.append(TripleStoreConstants.PREFIX_TEN_VIDEO);\r\n\t\tsparqlQueryString.append(TripleStoreConstants.PREFIX_TEN_TEXT);\r\n\t\tsparqlQueryString.append(TripleStoreConstants.PREFIX_RDF);\r\n\t\tsparqlQueryString.append(TripleStoreConstants.PREFIX_DUBLIN_CORE);\t\t\r\n\t\tsparqlQueryString.append(\" SELECT DISTINCT ?learning_object ?learningObjectType \");\r\n\t\tsparqlQueryString.append(\" WHERE { \");\r\n\t\t\t\r\n\t\t//base query with basic keywords conditions\r\n\t\tStringBuffer baseQuery = new StringBuffer();\t\t\r\n\t\tbaseQuery.append(\" ?learning_object a ?learningObjectType\");\r\n\t\tbaseQuery.append(\" ;?predicate ?object\");\t\r\n\t\t\r\n\t\t//exclude type predicate\r\n\t\tbaseQuery.append(\" . FILTER (\");\r\n\t\tbaseQuery.append(\" (?predicate != rdf:type)\"); \r\n\t\t\r\n\t\t//add filter for keywords\r\n if(!Utils.isEmptyOrNull(keywords)){\r\n \tArrayList<String> orSearchTerms = new ArrayList<String>();\r\n\t\t\tStringTokenizer st = new StringTokenizer(keywords);\r\n\t\t\twhile (st.hasMoreTokens()) {\r\n\t\t\t\torSearchTerms.add(st.nextToken().trim());\r\n\t\t\t}\r\n\t\t\t\r\n \tint i = 0;\r\n \tif((orSearchTerms != null) && (orSearchTerms.size()>0)){\r\n\t \ti=0;\r\n\t \tbaseQuery.append(\" && \");\r\n\t\t for(String searchTerm:orSearchTerms){\r\n\t\t \tbaseQuery.append(\"(regex(?object, \\\"\");\r\n\t\t \tbaseQuery.append(searchTerm);\r\n\t\t \tbaseQuery.append(\"\\\", \\\"i\\\"))\");\r\n\t\t \t//if this is not the last element add ||\r\n\t\t \tif(i != (orSearchTerms.size()-1)){\r\n\t\t \t\tbaseQuery.append(\" || \");\r\n\t\t \t}\r\n\t\t \ti++;\r\n\t\t }\t\r\n \t}\r\n }\r\n baseQuery.append(\" )\");\r\n \r\n //add learning object type preference\r\n\t\tif(!Utils.isEmptyOrNull(studentAnnotationsBean.getPreferredLearningObjectType())){\r\n\t\t\tbaseQuery.append(\"FILTER ( ?learningObjectType = TenOntology:\" + studentAnnotationsBean.getPreferredLearningObjectType() + \" )\");\r\n\t\t}else{\r\n\t\t\tbaseQuery.append(\"FILTER ((?learningObjectType = TenOntology:\" + TripleStoreConstants.LEARNING_OBJECT_TYPE_IMAGE + \" )\");\r\n\t\t\tbaseQuery.append(\"|| (?learningObjectType = TenOntology:\" + TripleStoreConstants.LEARNING_OBJECT_TYPE_TEXT + \" )\");\r\n\t\t\tbaseQuery.append(\"|| (?learningObjectType = TenOntology:\" + TripleStoreConstants.LEARNING_OBJECT_TYPE_AUDIO + \" )\");\r\n\t\t\tbaseQuery.append(\"|| (?learningObjectType = TenOntology:\" + TripleStoreConstants.LEARNING_OBJECT_TYPE_VIDEO + \" )\");\r\n\t\t\tbaseQuery.append(\" )\");\r\n\t\t}\r\n\t\t\t\r\n\t\tboolean upperCondition = false;\r\n\t\t//Add tribe\r\n\t\tif(!Utils.isEmptyOrNull(studentAnnotationsBean.getTribe())){\r\n\t\t\tif(upperCondition){\r\n\t\t\t\tsparqlQueryString.append( \" UNION \" );\r\n\t\t\t}\r\n\t\t\tsparqlQueryString.append(\" { \");\r\n\t\t\tsparqlQueryString.append(baseQuery.toString());\t\t\t\r\n\t\t\tsparqlQueryString.append(\" ?learning_object <\" + TripleStoreConstants.URI_PREDICATE_TEN_LO_TRIBE + \"> ?tribe . \");\r\n\t\t\tsparqlQueryString.append(\" FILTER (regex(?tribe, \\\"\" + studentAnnotationsBean.getTribe() + \"\\\", \\\"i\\\" ))\" );\r\n\t\t\tsparqlQueryString.append(\" } \");\r\n\t\t\tupperCondition = true;\r\n\t\t}\r\n\t\t\r\n\t\t//Add language preference\r\n\t\tif(!Utils.isEmptyOrNull(studentAnnotationsBean.getPreferredLanguage())){\r\n\t\t\tif(upperCondition){\r\n\t\t\t\tsparqlQueryString.append( \" UNION \" );\r\n\t\t\t}\r\n\t\t\tsparqlQueryString.append(\" { \");\r\n\t\t\tsparqlQueryString.append(baseQuery.toString());\r\n\t\t\tsparqlQueryString.append(\" ?learning_object <\" + TripleStoreConstants.URI_PREDICATE_DC_LANGUAGE + \"> ?language . \");\r\n\t\t\tsparqlQueryString.append(\" FILTER (regex(?language, \\\"\" + studentAnnotationsBean.getPreferredLanguage() + \"\\\", \\\"i\\\" ))\" );\r\n\t\t\tsparqlQueryString.append(\" } \");\r\n\t\t\tupperCondition = true;\r\n\t\t}\r\n\t\t\r\n\t\t//Add preferred text type\r\n\t\tif(!Utils.isEmptyOrNull(studentAnnotationsBean.getPreferredTextContent())){\r\n\t\t\tif(upperCondition){\r\n\t\t\t\tsparqlQueryString.append( \" UNION \" );\r\n\t\t\t}\r\n\t\t\tsparqlQueryString.append(\" { \");\r\n\t\t\tsparqlQueryString.append(baseQuery.toString());\r\n\t\t\tsparqlQueryString.append(\" ?learning_object <\" + TripleStoreConstants.URI_PREDICATE_TEN_TEXT_TYPE + \"> ?textType . \");\r\n\t\t\tsparqlQueryString.append(\" FILTER (regex(?textType, \\\"\" + studentAnnotationsBean.getPreferredTextContent() + \"\\\", \\\"i\\\" ))\" );\r\n\t\t\tsparqlQueryString.append(\" } \");\r\n\t\t\tupperCondition = true;\r\n\t\t}\r\n\t\t\r\n\t\t//Add preferred image type\r\n\t\tif(!Utils.isEmptyOrNull(studentAnnotationsBean.getPreferredImageContent())){\r\n\t\t\tif(upperCondition){\r\n\t\t\t\tsparqlQueryString.append( \" UNION \" );\r\n\t\t\t}\r\n\t\t\tsparqlQueryString.append(\" { \");\r\n\t\t\tsparqlQueryString.append(baseQuery.toString());\r\n\t\t\tsparqlQueryString.append(\" { ?learning_object <\" + TripleStoreConstants.URI_PREDICATE_TEN_IMAGE_TYPE + \"> ?imageType . \");\r\n\t\t\tsparqlQueryString.append(\" FILTER (regex(?imageType, \\\"\" + studentAnnotationsBean.getPreferredImageContent() + \"\\\", \\\"i\\\" )) \" );\r\n\t\t\tsparqlQueryString.append(\" } \");\r\n\t\t\tupperCondition = true;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//display learning objects of type as recommeded\r\n\t\tif((upperCondition == false) && (!Utils.isEmptyOrNull(studentAnnotationsBean.getPreferredLearningObjectType()))){\r\n\t\t\tsparqlQueryString.append(baseQuery.toString());\r\n\t\t\tupperCondition = true;\r\n\t\t}\r\n\t\t\r\n\t\tsparqlQueryString.append(\" }\");\r\n\t\t\r\n\t\tlog.debug(\"SEARCH QUERY: \" + sparqlQueryString.toString());\r\n\t\t\r\n\t\tif(upperCondition == true){\r\n\t\t\t//STEP 1 - Connect to virtuoso database\r\n\t\t\tVirtGraph graph = new VirtGraph (TripleStoreConstants.VIRTUOSO_GRAPH_URI, m_ds);\r\n\t\t\t\r\n\t\t\tQuery sparql = QueryFactory.create(sparqlQueryString.toString());\r\n\t\t\t\r\n\t\t\tVirtuosoQueryExecution vqe = VirtuosoQueryExecutionFactory.create(sparql.toString(), graph);\r\n\t\r\n\t\t\t//STEP 3 - Execute\r\n\t\t\tResultSet results = vqe.execSelect();\r\n\t\t\twhile (results.hasNext()) {\r\n\t\t\t\tQuerySolution result = results.nextSolution();\r\n\t\t\t RDFNode rdfNodeSubject = result.get(\"learning_object\");\r\n\t\t\t RDFNode rdfNodeObject = result.get(\"learningObjectType\");\r\n\t\t\t if((TripleStoreConstants.URI_TEN_ONTOLOGY + TripleStoreConstants.LEARNING_OBJECT_TYPE_IMAGE).equals(rdfNodeObject.toString())){\r\n\t\t\t \timagesList.add(rdfNodeSubject.toString());\r\n\t\t\t }else if((TripleStoreConstants.URI_TEN_ONTOLOGY + TripleStoreConstants.LEARNING_OBJECT_TYPE_AUDIO).equals(rdfNodeObject.toString())){\r\n\t\t\t \taudioList.add(rdfNodeSubject.toString());\r\n\t\t\t }else if((TripleStoreConstants.URI_TEN_ONTOLOGY + TripleStoreConstants.LEARNING_OBJECT_TYPE_VIDEO).equals(rdfNodeObject.toString())){\r\n\t\t\t \tvideoList.add(rdfNodeSubject.toString());\r\n\t\t\t }else if((TripleStoreConstants.URI_TEN_ONTOLOGY + TripleStoreConstants.LEARNING_OBJECT_TYPE_TEXT).equals(rdfNodeObject.toString())){\r\n\t\t\t \ttextList.add(rdfNodeSubject.toString());\r\n\t\t\t }\r\n\t\t\t }\r\n\t\t}\t\t\r\n\t\treturnMap.put(TripleStoreConstants.LEARNING_OBJECT_TYPE_IMAGE, imagesList);\r\n\t\treturnMap.put(TripleStoreConstants.LEARNING_OBJECT_TYPE_AUDIO, audioList);\r\n\t\treturnMap.put(TripleStoreConstants.LEARNING_OBJECT_TYPE_VIDEO, videoList);\r\n\t\treturnMap.put(TripleStoreConstants.LEARNING_OBJECT_TYPE_TEXT, textList);\r\n\t\t\r\n\t}catch (Exception ex) {\r\n\t\tlog.error(ex);\r\n\t\tthrow ex;\r\n\t}finally{\t\t\t\r\n\t\tlog.debug(this.getClass() + TripleStoreConstants.LOG_END + LOG_METHOD_NAME);\r\n\t}\r\n\treturn returnMap;\r\n}",
"String getTopic();"
]
| [
"0.5936286",
"0.58774793",
"0.5849406",
"0.57866657",
"0.57691735",
"0.57612085",
"0.5754397",
"0.57253265",
"0.57253265",
"0.5690541",
"0.5602298",
"0.5601407",
"0.5578064",
"0.5556182",
"0.55047995",
"0.54718536",
"0.5468277",
"0.54523",
"0.542335",
"0.542335",
"0.5420108",
"0.5397375",
"0.5397375",
"0.5323002",
"0.53008854",
"0.5293317",
"0.52897507",
"0.52897507",
"0.5276349",
"0.5240264",
"0.5224115",
"0.52231234",
"0.5219551",
"0.5186294",
"0.5161138",
"0.51596826",
"0.5157611",
"0.5155816",
"0.5149902",
"0.51053077",
"0.50898415",
"0.5083152",
"0.50744677",
"0.50743353",
"0.50548893",
"0.50546885",
"0.50368345",
"0.5032922",
"0.5015372",
"0.5015372",
"0.5014527",
"0.50129485",
"0.5011241",
"0.50087535",
"0.5007876",
"0.4992713",
"0.49863914",
"0.4982158",
"0.49812075",
"0.49267182",
"0.4923182",
"0.49079683",
"0.49055672",
"0.4876377",
"0.48698875",
"0.4862919",
"0.48590913",
"0.48404583",
"0.48356155",
"0.48354322",
"0.48354322",
"0.48331034",
"0.4826833",
"0.48223725",
"0.48181757",
"0.48129976",
"0.48040092",
"0.48008406",
"0.47836107",
"0.47816184",
"0.47773117",
"0.4769391",
"0.47616267",
"0.47543988",
"0.47317162",
"0.47312868",
"0.47282842",
"0.47264546",
"0.4721057",
"0.47136638",
"0.4712366",
"0.47069982",
"0.4697156",
"0.46914914",
"0.46887267",
"0.4684017",
"0.4683362",
"0.46826896",
"0.4680337",
"0.46673402",
"0.4657744"
]
| 0.0 | -1 |
/ Stores a grouping between a keyword and an author. If a topic contains a keyword w, and if this topic is linked to a paper p, written by a coauthor a, we insert a record . Keywords are finegrained, one can do the same with topic also. | public static final String getAuthKWRelTableCreationSQL(String shortname) {
String crTopicTableSQL = "CREATE TABLE IF NOT EXISTS dblp_authkw_" +shortname +
"(author varchar(70) NOT NULL, " +
" keyword varchar(255) NOT NULL, " +
" PRIMARY KEY (keyword,author)) ";
return crTopicTableSQL;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int insert(GrpTagKey record);",
"int insert(UserTopic record);",
"int insert(UserTopic record);",
"public ContentModelInsertion(String name, KeyStroke keyStroke, String group)\n {\n super(name,name,keyStroke,group);\n \n }",
"private void insertKeyword(String keyword, String adId) {\n\n // If the target keyword is not in the DB, then insert the keyword\n UpdateOptions option = new UpdateOptions();\n option.upsert(true);\n keywordCollection.updateOne(new BasicDBObject(\"keyword\", keyword),\n new BasicDBObject(\"$push\", new BasicDBObject(\"adId\", adId)), option);\n }",
"int insertSelective(UserTopic record);",
"int insertSelective(UserTopic record);",
"public void searchWordToGroup(String title, String word, String groupIns) throws IOException {\r\n\t\tString line;\r\n\t\tBufferedReader in;\r\n\t\tint paragraphs = 1;\r\n\t\tint sentences = 1;\r\n\t\tfound = 0;\r\n\t\ttry {\r\n\t\t\tstatementP = SqlCon.getConnection().prepareStatement(SqlCon.PATH_ACORDING_TITLE);\r\n\t\t\tstatementP.setString(1, title);\r\n\t\t\trs = statementP.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tString path = rs.getString(\"filePath\");\r\n\t\t\t\tin = new BufferedReader(new FileReader(path));\r\n\t\t\t\tline = in.readLine();\r\n\t\t\t\twhile (line != null) {\r\n\t\t\t\t\tif (line.equals(\"\")) {\r\n\t\t\t\t\t\tparagraphs++;\r\n\t\t\t\t\t\tsentences = 1;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tString[] sentenceList = line.split(\"[!?.:]+\");\r\n\t\t\t\t\t\tfor (int i = 0; i < sentenceList.length; i++) {\r\n\t\t\t\t\t\t\tif (sentenceList[i].contains(word)) {\r\n\t\t\t\t\t\t\t\tint p = paragraphs;\r\n\t\t\t\t\t\t\t\tint s = sentences;\r\n\t\t\t\t\t\t\t\tint is =0;\r\n\t\t\t\t\t\t\t\tinsertTable.insertwordFunc(groupIns, word, title, p, s, is);\r\n\t\t\t\t\t\t\t\tfound = 1;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tsentences++;\r\n\t\t\t\t\tline = in.readLine();\r\n\t\t\t\t}\r\n\t\t\t\tparagraphs = 1;\r\n\t\t\t\tsentences = 1;\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"int insert(SeGroup record);",
"int insert(PolicyGroup record);",
"Long insert(MessageGroup record);",
"int insert(KnowledgeComment record);",
"int insert(AuthorDO record);",
"void insert(MnMscQos record);",
"int insert(CmGroupRelIndustry record);",
"int insert(TSubjectInfo record);",
"int insert(SbGroupDetail record);",
"int insertSelective(AuthorDO record);",
"int insert(Discuss record);",
"public int insertAuthor(Author author);",
"int insertSelective(GrpTagKey record);",
"int insert(Terms record);",
"int insert(ArticleTag record);",
"int insert(Subject record);",
"@Override\n public void groupBy(StructuredRecord record, Emitter<StructuredRecord> emitter) throws Exception {\n StructuredRecord.Builder builder = StructuredRecord.builder(getGroupKeySchema(record.getSchema()));\n for (String groupByField : conf.getGroupByFields()) {\n builder.set(groupByField, record.get(groupByField));\n }\n emitter.emit(builder.build());\n }",
"int insertSelective(SeGroup record);",
"int insert(LikedKey record);",
"int insert(TopicFragmentWithBLOBs record);",
"private void addGroup(StreamTokenizer st) throws IOException {\n\t\tcurrentGroups.clear();\n\t\tst.nextToken();\n\t\tString gName = \"default\";\n\t\tif (st.ttype == StreamTokenizer.TT_EOL) {\n\t\t\tLoggingSystem.getLogger(this).fine(\"Warning: empty group name\");\n\t\t\tst.pushBack();\n\t\t} else\n\t\t\tgName = st.sval;\n\t\t// System.out.println(\"adding \"+gName+\" to current groups. [\"+st.nval+\",\"+st.sval+\",\"+st.ttype+\"]\");\n\t\tcurrentGroups.add(gName);\n\t\tif (groups.get(gName) == null) {\n\t\t\tGroup g = new Group(gName);\n\t\t\tgroups.put(gName, g);\n\t\t}\n\t\twhile (st.nextToken() != StreamTokenizer.TT_EOL) {\n\t\t}\n\t}",
"int insertSelective(PolicyGroup record);",
"int insert(ProjGroup record);",
"int insert(MemberAdvisoryComment record);",
"int insert(WdWordDict record);",
"int insert(WordSchool record);",
"@Test\n\tpublic void testAddKeyword01() {\n\t\tKeywordSet result = new KeywordSet()\n\t\t\t.withKeyword(new Keyword().withContent(\"keyword1\"))\n\t\t\t.withKeyword(new Keyword().withContent(\"keywordTwo\"), \n\t\t\t\t\tnew Keyword().withContent(\"keywordIII\"));\n\t\tassertThat(((String)result.getKeyword().get(0).getContent().get(0)), is(\"keyword1\"));\n\t\tassertThat(((String)result.getKeyword().get(1).getContent().get(0)), is(\"keywordTwo\"));\n\t\tassertThat(((String)result.getKeyword().get(2).getContent().get(0)), is(\"keywordIII\"));\n\t}",
"void insertSelective(MnMscQos record);",
"int insertSelective(CmGroupRelIndustry record);",
"public RecordObject addGroup(String token, Object record) throws RestResponseException;",
"int insertSelective(TopicFragmentWithBLOBs record);",
"public TravelGroup insertTravelGroup(TravelGroup travelGroup);",
"private static void insertOneGroupEntry(Cursor groupCursor, ArrayList<GroupInfo> groupList, Context context) {\n String title = groupCursor.getString(COL_TITLE);\n String titleDisplay = \"\";\n titleDisplay = title;\n\n GroupInfo pinfo = new GroupInfo();\n pinfo.groupId = -1;\n pinfo.title = title;\n pinfo.titleDisplay = titleDisplay;\n groupList.add(pinfo);\n }",
"int insert(CommentLike record);",
"void insert(TResearchTeach record);",
"int insertSelective(SbGroupDetail record);",
"public void addGroupSubject(Object chatWindowTag, String subject) {\n\n Pair<View, ChatsStruct> findPair = getChatPairWithTag(chatWindowTag);\n if (null == findPair) {\n Logger.e(TAG,\n \"addMessage() not find the chatWindowTag, findPair is null\");\n return;\n }\n View view = findPair.first;\n ChatsStruct chatStruct = findPair.second;\n Logger.d(TAG, \"addGroupSubject() findPair is \" + findPair);\n chatStruct.setmSubject(subject);\n Logger.d(TAG, \"addGroupSubject Subject is \" + subject);\n updateChats(view, chatStruct);\n }",
"int insertSelective(WordSchool record);",
"int insert(UserCorporateComment record);",
"int insertSelective(TSubjectInfo record);",
"void setGroupInfo(String groupName, int groupNumber, char insertionCode,\n\t\t\tString groupType, int atomCount, int bondCount, char singleLetterCode, \n\t\t\tint sequenceIndex, int secondaryStructureType);",
"int insert(Article record);",
"int insert(PrivateMessage record);",
"int insert(FeiWenComment record);",
"int insert(ArticleDo record);",
"public void AddKeywords()\n\t{\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t\t\tString query; \n\t\t\t\n\t\t\tfor(int i = 0; i < keywords.size(); i++)\n\t\t\t{\n\t\t\t\tString keyword = keywords.get(i); \n\t\t\t\t\n\t\t\t\tint kid = GetKIDFromWord(keyword); \n\t\t\t\t\n\t\t\t\t//word is not already in table\n\t\t\t\tif(kid == -1)\n\t\t\t\t{\n\t\t\t\t\t//insert word into Keywords \n\t\t\t\t\tSystem.out.println(\"test\"); \n\t\t\t\t\tquery = \"INSERT INTO Keywords(word) VALUE ('\"+keyword+\"')\"; \n\t\t\t \tint intoTable = con.stmt.executeUpdate(query); \n\t\t\t \t\n\t\t\t \t//able to put it in the table\n\t\t\t \tif(intoTable > 0)\n\t\t\t \t{\n\t\t\t \t\t//insert into HasKeywords\n\t\t\t\t \tkid = GetKIDFromWord(keyword); \n\t\t\t\t\t\tquery = \"INSERT INTO HasKeywords(keyword_hid, keyword_kid) VALUE('\"+hid+\"', '\"+kid+\"')\";\n\t\t\t\t \tint hasKey = con.stmt.executeUpdate(query); \n\t\t\t \t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//word is already in table\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tList<Integer> hkCheck = GetHIDSFromKID(kid);\n\t\t\t\t\t\n\t\t\t\t\tboolean inHKTable = false; \n\t\t\t\t\tfor(int j = 0; j < hkCheck.size(); j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(hkCheck.get(j) == hid)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinHKTable = true; \n\t\t\t\t\t\t\tbreak; \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(inHKTable == false)\n\t\t\t\t\t{\n\t\t\t\t\t\tquery = \"INSERT INTO HasKeywords(keyword_hid, keyword_kid) VALUE('\"+hid+\"', '\"+kid+\"')\";\n\t\t\t\t \tint hasKey = con.stmt.executeUpdate(query); \n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tcon.closeConnection();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}",
"@Override\n\tpublic int topicAdd(QuestionBean q) {\n\t\tString sql = \"insert into topic(title,result,subjectName,difficulty,type,score) values('\"+q.getTitle()+\"','\"+q.getResult()+\"',\"+q.getSubjectName()+\",'\"+q.getDifficulty()+\"',\"+q.getType()+\",\"+q.getScore()+\")\";\n\t\t//int result = jt.update(sql, q.getTitle(),q.getResult(),q.getSubjectName(),q.getDifficulty(),q.getType(),q.getScore());\n\t\tKeyHolder keyHolder = new GeneratedKeyHolder();\n\t\tjt.update(new PreparedStatementCreator() {\n\t\t\t@Override\n\t\t\tpublic java.sql.PreparedStatement createPreparedStatement(java.sql.Connection arg0) throws SQLException {\n\t\t\t\tPreparedStatement ps = arg0.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);\n\t\t\t\treturn ps;\n\t\t\t}\n\t\t}, keyHolder);\n\t\tSystem.out.println(\"新增加的primarykey:\"+keyHolder.getKey().intValue());\n\t\treturn keyHolder.getKey().intValue();\n\t}",
"@Override\r\n public void insertTripleDistributedBySubject(Triple triple) {\n\r\n }",
"int insert(AnnouncementDO record);",
"public final void rule__InsertSQL__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:625:1: ( rule__InsertSQL__Group__3__Impl )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:626:2: rule__InsertSQL__Group__3__Impl\n {\n pushFollow(FOLLOW_rule__InsertSQL__Group__3__Impl_in_rule__InsertSQL__Group__31260);\n rule__InsertSQL__Group__3__Impl();\n\n state._fsp--;\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 }",
"int insert(ComplainNoteDO record);",
"public void putTopic(Topic topic) {\n\t\ttopics.add(topic) ;\n\t}",
"@Override\n\tpublic void insert(Article article) throws Exception {\n\t\tSystem.out.println(\"Insert Start\");\n\t\tStringBuffer sql = new StringBuffer();\n\t\t\n\t\tsql.append(\"insert into article \");\n\t\tsql.append(\"(group_id,sequence_no,posting_date,read_count,writer_name, \");\n\t\tsql.append(\"password,title,content) \");\n\t\tsql.append(\"values(?,?,?,0,?,?,?,?)\");\n\t\t\n\t\tint groupId = article.getGroupId();\n\t\tif(groupId == 0 ){ //글이 리플이 아닌 경우에는 ID Generator를 생성 해주자.\n\t\t\tgroupId = IdGenerator.getInstance().generateNextId(\"article\",jdbcTemplate);\n\t\t\tarticle.setGroupId(groupId);\n\t\t\t//그리고 해당 글에 대한 레벨 역시 초기화를 필요로 한다.\n\t\t\tDecimalFormat decimalFormat = new DecimalFormat(\"0000000000\");\n\t\t\tarticle.setSequenceNumber(decimalFormat.format(groupId)+\"999999\");\n\t\t}\n\t\t\n\t\tarticle.setPostingDate(new Date());\n\t\t\n\t\t\n\t\tjdbcTemplate.update(sql.toString(),article.getGroupId(),article.getSequenceNumber()\n\t\t\t\t,new Timestamp(article.getPostingDate().getTime())\n\t\t\t\t,article.getWriterName()\n\t\t\t\t,article.getPassword()\n\t\t\t\t,article.getTitle()\n\t\t\t\t,article.getContent());\n\t\t\n\t\t\n\n\t}",
"void insert(HrMscChaAssig record);",
"int insertSelective(ProjGroup record);",
"int insertSelective(AnnouncementDO record);",
"GroupQueryBuilder addAssociatedGroup(String key, boolean parent);",
"int insertSelective(MemberAdvisoryComment record);",
"void insert(CmsChannel record);",
"private static void addToPublisherTable(String publisher, String bookTitle) {\n\t\tif(ALL_PUBLISHERS.containsKey(publisher))\n\t\t\tALL_PUBLISHERS.get(publisher).add(bookTitle);\n\t\t/*put publisher as a new key in ALL_AUTHORS*/\n\t\telse{\n\t\t\tHashSet<String> bookTitles_list = new HashSet<String>();\n\t\t\tbookTitles_list.add(bookTitle);\n\t\t\tALL_PUBLISHERS.put(publisher, bookTitles_list);\n\t\t}\n\t\t\n\t}",
"int insertSelective(Discuss record);",
"public static void insertDiscussion(String type, String topic, String[] tags, String content,String subject_id,String user){\n\n String ID = DBOperate.getRandomString(1);\n\n String replyid = DBDiscussion.getReplyID(tags);\n\n String sql=\"\";\n\n if(replyid.equals(\"\")){\n sql = \"insert into discussion values('\"+ID+\"',NULL,'\"+user+\"','\"\n +DBOperate.getCurrentDate()+\"','\"+subject_id+\"','\"+type+\"','\"+topic+\"','\"+content+\"')\";\n }\n else{\n sql = \"insert into discussion values('\"+ID+\"','\"+replyid+\"','\"+user+\"','\"\n +DBOperate.getCurrentDate()+\"','\"+subject_id+\"','\"+type+\"','\"+topic+\"','\"+content+\"')\";\n }\n\n DBOperate.Insert(sql);\n\n for(String s: tags){\n sql = \"insert into discussion_tag values('\"+s+\"','\"+ID+\"')\";\n DBOperate.Insert(sql);\n }\n\n }",
"int insertSelective(ArticleTag record);",
"int insertSelective(CommentLike record);",
"private void addTopic(TopicMapIF tm, TMObjectMatcherIF matcher,\n Collection topics) {\n if (matcher instanceof TypeSpecification) {\n TypeSpecification m = (TypeSpecification) matcher;\n TopicIF type = getTopic(tm, m.getClassMatcher());\n if (type != null) {\n ClassInstanceIndexIF typeIndex = (ClassInstanceIndexIF)\n tm.getIndex(\"net.ontopia.topicmaps.core.index.ClassInstanceIndexIF\");\n topics.addAll(typeIndex.getTopics(type));\n }\n \n } else {\n TopicIF topic = getTopic(tm, matcher);\n if (topic != null)\n topics.add(topic);\n }\n }",
"int insertSelective(Subject record);",
"int insert(trackcomment record);",
"Builder addKeywords(Text value);",
"public void insert(Category record) throws SQLException {\r\n sqlMapClient.insert(\"CATEGORY.abatorgenerated_insert\", record);\r\n }",
"int insertSelective(Terms record);",
"int insertSelective(WdWordDict record);",
"@Override\r\n\tpublic int addTopic(String name) throws SQLException {\n\t\tString sql = \"insert into topic(tname) values(?) \";\r\n\t\t\r\n\t\tint excuteUpdate = excuteUpdate(sql, name);\r\n\t\t\r\n\t\treturn excuteUpdate;\r\n\t\t\r\n\t\t\r\n\t}",
"int insert(Mallscroerule record);",
"int insertSelective(UserCorporateComment record);",
"int insert(PublicDoctorNotice record);",
"public void createTopic(String topic) {\n\n\t}",
"int insertSelective(LikedKey record);",
"Builder addAuthor(String value);",
"void insert(organize_infoBean record);",
"int insertSelective(FeiWenComment record);",
"public IDiscussionTopic attachDiscussionTopic()\n throws OculusException;",
"int insert(Comment record);",
"public TemplateGroupSignature saveGroupSingTemplate(Template template, TemplateGroupSignature group)\n\t{\n\t\tTemplateGroupSignatureDAO dao = new TemplateGroupSignatureDAO();\n\t\tgroup = dao.saveNew(group);\t\n\t\treturn group; \n\t}",
"public void addTopic(Topic topic) {\n\t\tString sql = \"insert into \"\n\t\t\t\t+ Constant.schema\n\t\t\t\t+ \".topic (topic_name, start_time, end_time, speaker_name, speaker_des, attachment, speaker_img, rating) values (?,?,?,?,?,?,?,?)\";\n\t\tList<String> paramList = new ArrayList<String>();\n\t\tparamList.add(topic.getTopicName());\n\t\tparamList.add(topic.getStartTime());\n\t\tparamList.add(topic.getEndTime());\n\t\tparamList.add(topic.getSpeakerName());\n\t\tparamList.add(topic.getSpeakerDesc());\n\t\tparamList.add(topic.getAttachment());\n\t\tparamList.add(topic.getSpeakerimg());\n\t\tparamList.add(String.valueOf(0));\n\n\t\tConnection conn = null;\n\t\tPreparedStatement pstmt = null;\n\t\ttry {\n\t\t\tconn = DBConUtil.getConn();\n\t\t\tpstmt = conn.prepareStatement(sql);\n\t\t\tconn.setAutoCommit(true);\n\t\t\tDBConUtil.executeUpdate(paramList, conn, pstmt);\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t} finally {\n\t\t\t// close connections.\n\t\t\tDBConUtil.close(conn, pstmt);\n\t\t}\n\t}",
"int insertSelective(ArticleDo record);",
"void insert(Providers record);",
"private void findGroup(int mainDoc)\n {\n // This document will be its own group, but hopefully we can add more\n // documents to that group.\n //\n docGroups.set(mainDoc, nGroups++);\n \n // Our starting point is the title(s) of the current document.\n for (int pos = data.docTags.firstPos(mainDoc); pos >= 0; pos = data.docTags.nextPos(pos))\n {\n int mainTitle = data.docTags.getValue(pos);\n if (data.tags.getType(mainTitle) != FRBRData.TYPE_TITLE)\n continue;\n \n // Scan forward looking for matching titles. Do compare the main title,\n // since other documents may match that title exactly.\n //\n int compTitle = mainTitle;\n while (compTitle >= 0) {\n if (!matchOnTitle(mainDoc, mainTitle, compTitle))\n break;\n compTitle = data.tags.next(compTitle);\n }\n \n // Scan backward through the titles in like manner.\n compTitle = data.tags.prev(mainTitle);\n while (compTitle >= 0) {\n if (!matchOnTitle(mainDoc, mainTitle, compTitle))\n break;\n compTitle = data.tags.prev(compTitle);\n }\n } // for title\n }",
"int insert(CaseLinkman record);",
"int insert(Comments record);",
"int insert(NewsFile record);",
"private void insertPartitionEntry(String file, String word, String partition) {\n\t\tArrayList<String> fileList = new ArrayList<String>();\n\t\tfileList.add(file);\n\t\tMap<String, ArrayList<String>> wordMap = new HashMap<String, ArrayList<String>>();\n\t\twordMap.put(word, fileList);\n\n\t\tindexedDir.put(partition, wordMap);\n\t}",
"int insert(HostSummaryByStatementType record);",
"public final void rule__InsertSQL__Group_2__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:750:1: ( rule__InsertSQL__Group_2__3__Impl rule__InsertSQL__Group_2__4 )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:751:2: rule__InsertSQL__Group_2__3__Impl rule__InsertSQL__Group_2__4\n {\n pushFollow(FOLLOW_rule__InsertSQL__Group_2__3__Impl_in_rule__InsertSQL__Group_2__31508);\n rule__InsertSQL__Group_2__3__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__InsertSQL__Group_2__4_in_rule__InsertSQL__Group_2__31511);\n rule__InsertSQL__Group_2__4();\n\n state._fsp--;\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 }"
]
| [
"0.5637315",
"0.55528677",
"0.55528677",
"0.5485346",
"0.5445385",
"0.5438342",
"0.5438342",
"0.5438311",
"0.5400132",
"0.5388424",
"0.53398526",
"0.52980494",
"0.52664757",
"0.52636224",
"0.5158123",
"0.5127883",
"0.5121449",
"0.51107043",
"0.50797576",
"0.5066378",
"0.504974",
"0.5044244",
"0.5035236",
"0.4984212",
"0.49813643",
"0.49806824",
"0.49700847",
"0.49684423",
"0.49555045",
"0.49447855",
"0.49398693",
"0.49269837",
"0.49093264",
"0.49089417",
"0.48994103",
"0.4897042",
"0.48933128",
"0.4891869",
"0.48900974",
"0.48808783",
"0.4873721",
"0.48490214",
"0.48450667",
"0.4827587",
"0.48221126",
"0.48110932",
"0.48003098",
"0.47912908",
"0.4767204",
"0.47643623",
"0.47636613",
"0.4746123",
"0.4735862",
"0.4732556",
"0.47324646",
"0.47228634",
"0.4720797",
"0.4699458",
"0.46903864",
"0.46901754",
"0.46873134",
"0.4687124",
"0.46870977",
"0.4679165",
"0.4678639",
"0.46743262",
"0.46697557",
"0.46661657",
"0.4659047",
"0.46587625",
"0.46538",
"0.4649513",
"0.46461213",
"0.46368468",
"0.4630903",
"0.46281835",
"0.46273118",
"0.4621075",
"0.46077877",
"0.4604621",
"0.46034187",
"0.459502",
"0.45898226",
"0.45880258",
"0.45846322",
"0.45828453",
"0.45779946",
"0.4575751",
"0.4574947",
"0.45704192",
"0.45692065",
"0.45602342",
"0.45587468",
"0.45525354",
"0.4550629",
"0.45499343",
"0.45445722",
"0.45413655",
"0.45382646",
"0.45360485",
"0.45359543"
]
| 0.0 | -1 |
/ In the previous table, you can get a set of authors Aw who have written papers that contain a keyword w. But how many of them have really collaborated? This is captured in this table. A record means that for a keyword w, there exists a paper which is coauthored by a and coa. This table is created by joining dblp_collab table with dblp_authkw table. | public static final String getAuthCollabOverKWTableCreationSQL(String shortname) {
String crTopicTableSQL = "CREATE TABLE IF NOT EXISTS dblp_authcollabkw_" +shortname +
"(keyword varchar(255) NOT NULL, " +
"author varchar(70) NOT NULL, " +
" collabauth varchar(70) NOT NULL, " +
"collabcnt int NOT NULL" +
" ) ";
return crTopicTableSQL;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getAuthorsQuery(String wkhuskagraph, String num, Boolean mode);",
"private void extractNumberOfCoauthors() {\r\n try {\r\n List<String> coAuthor = new ArrayList<String>();\r\n // gets all matched objects for extracting coauthor names.\r\n Matcher matcherObject = matcher.patternMatcher(\"Coauthors\");\r\n\r\n String authorName;\r\n // check if name already exists in data structure.\r\n while (matcherObject.find()) {\r\n authorName = matcherObject.group(2).toString();\r\n coAuthor.add(authorName);\r\n if (!CoAuthors.contains(authorName)) {\r\n CoAuthors.add(authorName);\r\n }\r\n }\r\n if (isValidFile) {\r\n format.Formatter(6, coAuthor.size());\r\n }\r\n \r\n\r\n } catch (Exception e) {\r\n System.out.println(\"Error has occured in extractNumberOfCoauthors\");\r\n }\r\n }",
"public Map<String, Long> findAuthors() {\n SearchResponse searchResponse = client.prepareSearch(INDEX_BASE)\n .addAggregation(terms(\"authors\").field(\"author\"))\n .setSize(0)\n .get();\n\n Terms issues = searchResponse.getAggregations().get(\"authors\");\n Map<String, Long> foundAuthors = new LinkedHashMap<>();\n\n issues.getBuckets().forEach(bucket -> {\n foundAuthors.put(bucket.getKeyAsString(), bucket.getDocCount());\n });\n\n return foundAuthors;\n }",
"public long getDisambiguatedAuthorsInCollection()\n\tthrows DataAccessException;",
"public boolean findAmbiguousSubjectsByPaperId( Integer paperId ) throws DAOException;",
"public int findTotalDisplaySubjectsByPaperId( Integer paperId ) throws DAOException;",
"int countByExample(WdWordDictExample example);",
"public static void main(String[] args) throws Exception \n\t{\n\t\tList<String> stopWords = new ArrayList<String>();\n\t\tstopWords = stopWordsCreation();\n\n\n\t\t\n\t\tHashMap<Integer, String> hmap = new HashMap<Integer, String>();\t//Used in tittle, all terms are unique, and any dups become \" \"\n\t\n\t\t\n\t\tList<String> uniqueTerms = new ArrayList<String>();\n\t\tList<String> allTerms = new ArrayList<String>();\n\t\t\t\t\n\t\t\n\t\tHashMap<Integer, String> hmap2 = new HashMap<Integer, String>();\n\t\tHashMap<Integer, String> allValues = new HashMap<Integer, String>();\n\t\tHashMap<Integer, Double> docNorms = new HashMap<Integer, Double>();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tMap<Integer, List<String>> postingsFileListAllWords = new HashMap<>();\t\t\n\t\tMap<Integer, List<String>> postingsFileList = new HashMap<>();\n\t\t\n\t\tMap<Integer, List<StringBuilder>> docAndTitles = new HashMap<>();\n\t\tMap<Integer, List<StringBuilder>> docAndAbstract = new HashMap<>();\n\t\tMap<Integer, List<StringBuilder>> docAndAuthors = new HashMap<>();\n\t\t\n\t\t\n\t\tMap<Integer, List<Double>> termWeights = new HashMap<>();\n\t\t\n\t\tList<Integer> docTermCountList = new ArrayList<Integer>();\n\t\t\n\t\tBufferedReader br = null;\n\t\tFileReader fr = null;\n\t\tString sCurrentLine;\n\n\t\tint documentCount = 0;\n\t\tint documentFound = 0;\n\t\tint articleNew = 0;\n\t\tint docTermCount = 0;\n\t\t\n\t\t\n\t\tboolean abstractReached = false;\n\n\t\ttry {\n\t\t\tfr = new FileReader(FILENAME);\n\t\t\tbr = new BufferedReader(fr);\n\n\t\t\t// Continues to get 1 line from document until it reaches the end of EVERY doc\n\t\t\twhile ((sCurrentLine = br.readLine()) != null) \n\t\t\t{\n\t\t\t\t// sCurrentLine now contains the 1 line from the document\n\n\t\t\t\t// Take line and split each word and place them into array\n\t\t\t\tString[] arr = sCurrentLine.split(\" \");\n\n\n\t\t\t\t//Go through the entire array\n\t\t\t\tfor (String ss : arr) \n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t/*\n\t\t\t\t\t * This section takes the array and checks to see if it has reached a new\n\t\t\t\t\t * document or not. If the current line begins with an .I, then it knows that a\n\t\t\t\t\t * document has just started. If it incounters another .I, then it knows that a\n\t\t\t\t\t * new document has started.\n\t\t\t\t\t */\n\t\t\t\t\t//System.out.println(\"Before anything: \"+sCurrentLine);\n\t\t\t\t\tif (arr[0].equals(\".I\")) \n\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\tif (articleNew == 0) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tarticleNew = 1;\n\t\t\t\t\t\t\tdocumentFound = Integer.parseInt(arr[1]);\n\t\t\t\t\t\t} \n\t\t\t\t\t\telse if (articleNew == 1) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tarticleNew = 0;\n\t\t\t\t\t\t\tdocumentFound = Integer.parseInt(arr[1]);\n\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t//System.out.println(documentFound);\n\t\t\t\t\t\t//count++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t/* This section detects that after a document has entered,\n\t\t\t\t\t * it has to gather all the words contained in the title \n\t\t\t\t\t * section.\n\t\t\t\t\t */\n\t\t\t\t\tif (arr[0].equals(\".T\") ) \n\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t// Go to line UNDER .T since that is where tittle is located\n\t\t\t\t\t\t//sCurrentLine = br.readLine();\n\t\t\t\t\t\tdocAndTitles.put(documentFound, new ArrayList<StringBuilder>());\n\t\t\t\t\t\t//System.out.println(\"docAndTitles.get(documentCount+1): \" +docAndTitles.get(documentFound));\n\t\t\t\t\t\t//System.out.println(\"Docs and titles: \"+docAndTitles);\n\t\t\t\t\t\tStringBuilder title = new StringBuilder();\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile ( !(sCurrentLine = br.readLine()).matches(\".B|.A|.N|.X|.K|.C\") )\n\t\t\t\t\t\t{\t\t\t\t\n\t\t\t\t\t\t\t/* In this section, there are 2 lists being made. One list\n\t\t\t\t\t\t\t * is for all the unique words in every title in the document (hmap).\n\t\t\t\t\t\t\t * Hmap contains all unique words, and anytime a duplicate word is \n\t\t\t\t\t\t\t * found, it is replaced with an empty space in the map.\n\t\t\t\t\t\t\t * All Values \n\t\t\t\t\t\t\t * \n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//postingsFileList.put(documentFound - 1, new ArrayList<String>());\n\t\t\t\t\t\t\t//postingsFileList.get(documentFound - 1).add(term2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"current line: \"+sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString[] tittle = sCurrentLine.split(\" \");\n\t\t\t\t\t\t\tif (tittle[0].equals(\".W\") )\n\t\t\t\t\t\t\t{\t\t\n\t\t\t\t\t\t\t\tabstractReached = true;\n\t\t\t\t\t\t\t\tbreak;\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\ttitle.append(sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor (String tittleWords : tittle)\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\t\ttittleWords = tittleWords.toLowerCase();\n\t\t\t\t\t\t\t\ttittleWords = tittleWords.replaceAll(\"[-&^%'{}*|$+\\\\/\\\\?!<>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\n\t\t\t\t\t\t\t\ttittleWords = tittleWords.replaceAll(\"[-&^%'*{}|$+\\\\/\\\\?!<>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\n\t\t\t\t\t\t\t\ttittleWords = tittleWords.replaceAll(\"[-&^%'{}*|$+\\\\/\\\\?!<>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\n\t\t\t\t\t\t\t\t//System.out.println(tittleWords);\n\t\t\t\t\t\t\t\tif (hmap.containsValue(tittleWords)) \n\t\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\thmap.put(documentCount, \" \");\n\t\t\t\t\t\t\t\t\tallValues.put(documentCount, tittleWords);\n\t\t\t\t\t\t\t\t\tallTerms.add(tittleWords);\n\t\t\t\t\t\t\t\t\tdocumentCount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tallTerms.add(tittleWords);\n\t\t\t\t\t\t\t\t\tallValues.put(documentCount, tittleWords);\n\t\t\t\t\t\t\t\t\thmap.put(documentCount, tittleWords);\n\t\t\t\t\t\t\t\t\tif (!(uniqueTerms.contains(tittleWords)))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif ((stopWordsSetting && !(stopWords.contains(tittleWords))))\n\t\t\t\t\t\t\t\t\t\t\tuniqueTerms.add(tittleWords);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tdocumentCount++;\n\t\t\t\t\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//docAndTitles.get(documentCount).add(\" \");\n\t\t\t\t\t\t\ttitle.append(\"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//System.out.println(\"Title: \"+title);\n\t\t\t\t\t\t//System.out.println(\"docAndTitles.get(documentCount+1): \" +docAndTitles.get(documentFound));\n\t\t\t\t\t\tdocAndTitles.get(documentFound).add(title);\n\t\t\t\t\t\t//System.out.println(\"Done!: \"+ docAndTitles);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif (arr[0].equals(\".A\") ) \n\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t// Go to line UNDER .T since that is where tittle is located\n\t\t\t\t\t\t//sCurrentLine = br.readLine();\n\t\t\t\t\t\tdocAndAuthors.put(documentFound, new ArrayList<StringBuilder>());\n\t\t\t\t\t\t//System.out.println(\"docAndTitles.get(documentCount+1): \" +docAndTitles.get(documentFound));\n\t\t\t\t\t\t//System.out.println(\"Docs and titles: \"+docAndTitles);\n\t\t\t\t\t\tStringBuilder author = new StringBuilder();\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile ( !(sCurrentLine = br.readLine()).matches(\".N|.X|.K|.C\") )\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/* In this section, there are 2 lists being made. One list\n\t\t\t\t\t\t\t * is for all the unique words in every title in the document (hmap).\n\t\t\t\t\t\t\t * Hmap contains all unique words, and anytime a duplicate word is \n\t\t\t\t\t\t\t * found, it is replaced with an empty space in the map.\n\t\t\t\t\t\t\t * All Values \n\t\t\t\t\t\t\t * \n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//postingsFileList.put(documentFound - 1, new ArrayList<String>());\n\t\t\t\t\t\t\t//postingsFileList.get(documentFound - 1).add(term2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"current line: \"+sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString[] tittle = sCurrentLine.split(\" \");\n\t\t\t\t\t\t\tif (tittle[0].equals(\".W\") )\n\t\t\t\t\t\t\t{\t\t\n\t\t\t\t\t\t\t\tabstractReached = true;\n\t\t\t\t\t\t\t\tbreak;\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\tauthor.append(sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//docAndTitles.get(documentCount).add(\" \");\n\t\t\t\t\t\t\tauthor.append(\"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//System.out.println(\"Title: \"+title);\n\t\t\t\t\t\t//System.out.println(\"docAndTitles.get(documentCount+1): \" +docAndTitles.get(documentFound));\n\t\t\t\t\t\tdocAndAuthors.get(documentFound).add(author);\n\t\t\t\t\t\t//System.out.println(\"Done!: \"+ docAndTitles);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t/* Since there may or may not be an asbtract after\n\t\t\t\t\t * the title, we need to check what the next section\n\t\t\t\t\t * is. We know that every doc has a publication date,\n\t\t\t\t\t * so it can end there, but if there is no abstract,\n\t\t\t\t\t * then it will keep scanning until it reaches the publication\n\t\t\t\t\t * date. If abstract is empty (in tests), it will also finish instantly\n\t\t\t\t\t * since it's blank and goes straight to .B (the publishing date).\n\t\t\t\t\t * Works EXACTLY like Title \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\tif (abstractReached) \n\t\t\t\t\t{\t\n\t\t\t\t\t\t//System.out.println(\"\\n\");\n\t\t\t\t\t\t//System.out.println(\"REACHED ABSTRACT and current line is: \" +sCurrentLine);\n\t\t\t\t\t\tdocAndAbstract.put(documentFound, new ArrayList<StringBuilder>());\n\t\t\t\t\t\tStringBuilder totalAbstract = new StringBuilder();\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile ( !(sCurrentLine = br.readLine()).matches(\".T|.I|.A|.N|.X|.K|.C\") )\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\tString[] abstaract = sCurrentLine.split(\" \");\n\t\t\t\t\t\t\tif (abstaract[0].equals(\".B\") )\n\t\t\t\t\t\t\t{\t\t\t\n\t\t\t\t\t\t\t\tabstractReached = false;\n\t\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttotalAbstract.append(sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString[] misc = sCurrentLine.split(\" \");\n\t\t\t\t\t\t\tfor (String miscWords : misc) \n\t\t\t\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tmiscWords = miscWords.toLowerCase(); \n\t\t\t\t\t\t\t\tmiscWords = miscWords.replaceAll(\"[-&^%'*$+|{}?!\\\\/<\\\\>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\n\t\t\t\t\t\t\t\tmiscWords = miscWords.replaceAll(\"[-&^%'*$+|?{}!\\\\/<\\\\>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\t\t\n\t\t\t\t\t\t\t\tmiscWords = miscWords.replaceAll(\"[-&^%'*$+|{}?!\\\\/<\\\\>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\t\t\n\t\t\t\t\t\t\t\t//System.out.println(miscWords);\n\t\t\t\t\t\t\t\tif (hmap.containsValue(miscWords)) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\thmap.put(documentCount, \" \");\n\t\t\t\t\t\t\t\t\tallValues.put(documentCount, miscWords);\n\t\t\t\t\t\t\t\t\tallTerms.add(miscWords);\n\t\t\t\t\t\t\t\t\tdocumentCount++;\n\t\n\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\telse \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tallTerms.add(miscWords);\n\t\t\t\t\t\t\t\t\thmap.put(documentCount, miscWords);\n\t\t\t\t\t\t\t\t\tallValues.put(documentCount, miscWords);\n\t\t\t\t\t\t\t\t\tif (!(uniqueTerms.contains(miscWords)))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif ((stopWordsSetting && !(stopWords.contains(miscWords))))\n\t\t\t\t\t\t\t\t\t\t\tuniqueTerms.add(miscWords);\n\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\tdocumentCount++;\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\ttotalAbstract.append(\"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdocAndAbstract.get(documentFound).add(totalAbstract);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\t//Once article is found, we enter all of of it's title and abstract terms \n\t\t\t\tif (articleNew == 0) \n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tdocumentFound = documentFound - 1;\n\t\t\t\t\t//System.out.println(\"Words found in Doc: \" + documentFound);\n\t\t\t\t\t//System.out.println(\"Map is\" +allValues);\n\t\t\t\t\tSet set = hmap.entrySet();\n\t\t\t\t\tIterator iterator = set.iterator();\n\n\t\t\t\t\tSet set2 = allValues.entrySet();\n\t\t\t\t\tIterator iterator2 = set2.iterator();\n\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tpostingsFileList.put(documentFound - 1, new ArrayList<String>());\n\t\t\t\t\tpostingsFileListAllWords.put(documentFound - 1, new ArrayList<String>());\n\t\t\t\t\twhile (iterator.hasNext()) {\n\t\t\t\t\t\tMap.Entry mentry = (Map.Entry) iterator.next();\n\t\t\t\t\t\t// (\"key is: \"+ mentry.getKey() + \" & Value is: \" + mentry.getValue());\n\t\t\t\t\t\t// (\"Value is: \" + mentry.getValue());\n\t\t\t\t\t\t// );\n\t\t\t\t\t\tString term = mentry.getValue().toString();\n\t\t\t\t\t\t// //\"This is going to be put in doc3: \"+ (documentFound-1));\n\t\t\t\t\t\tpostingsFileList.get(documentFound - 1).add(term);\n\t\t\t\t\t\t// if ( !((mentry.getValue()).equals(\" \")) )\n\t\t\t\t\t\tdocTermCount++;\n\t\t\t\t\t}\n\t\t\t\t\t// \"BEFORE its put in, this is what it looks like\" + hmap);\n\t\t\t\t\thmap2.putAll(hmap);\n\t\t\t\t\thmap.clear();\n\t\t\t\t\tarticleNew = 1;\n\n\t\t\t\t\tdocTermCountList.add(docTermCount);\n\t\t\t\t\tdocTermCount = 0;\n\n\t\t\t\t\twhile (iterator2.hasNext()) {\n\t\t\t\t\t\tMap.Entry mentry2 = (Map.Entry) iterator2.next();\n\t\t\t\t\t\t// (\"key is: \"+ mentry.getKey() + \" & Value is: \" + mentry.getValue());\n\t\t\t\t\t\t// (\"Value2 is: \" + mentry2.getValue());\n\t\t\t\t\t\t// );\n\t\t\t\t\t\tString term = mentry2.getValue().toString();\n\t\t\t\t\t\t// //\"This is going to be put in doc3: \"+ (documentFound-1));\n\t\t\t\t\t\tpostingsFileListAllWords.get(documentFound - 1).add(term);\n\t\t\t\t\t\t// if ( !((mentry.getValue()).equals(\" \")) )\n\t\t\t\t\t\t// docTermCount++;\n\t\t\t\t\t}\n\n\t\t\t\t\tallValues.clear();\t\t\t\t\t\n\t\t\t\t\tdocumentFound = Integer.parseInt(arr[1]);\n\n\t\t\t\t\t// \"MEANWHILE THESE ARE ALL VALUES\" + postingsFileListAllWords);\n\n\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"Looking at final doc!\");\n\t\t\t//Final loop for last sets\n\t\t\tSet set = hmap.entrySet();\n\t\t\tIterator iterator = set.iterator();\n\n\t\t\tSet setA = allValues.entrySet();\n\t\t\tIterator iteratorA = setA.iterator();\n\t\t\tpostingsFileList.put(documentFound - 1, new ArrayList<String>());\n\t\t\tpostingsFileListAllWords.put(documentFound - 1, new ArrayList<String>());\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tMap.Entry mentry = (Map.Entry) iterator.next();\n\t\t\t\t// (\"key is: \"+ mentry.getKey() + \" & Value is: \" + mentry.getValue());\n\t\t\t\t// (\"Value is: \" + mentry.getValue());\n\t\t\t\t// //);\n\t\t\t\t// if ( !((mentry.getValue()).equals(\" \")) )\n\t\t\t\tString term2 = mentry.getValue().toString();\n\t\t\t\tpostingsFileList.get(documentFound - 1).add(term2);\n\n\t\t\t\tdocTermCount++;\n\t\t\t}\n\t\t\t//System.out.println(\"Done looking at final doc!\");\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"Sorting time!\");\n\t\t\twhile (iteratorA.hasNext()) {\n\t\t\t\tMap.Entry mentry2 = (Map.Entry) iteratorA.next();\n\t\t\t\t// (\"key is: \"+ mentry.getKey() + \" & Value is: \" + mentry.getValue());\n\t\t\t\t// (\"Value2 is: \" + mentry2.getValue());\n\t\t\t\t// //);\n\t\t\t\tString term = mentry2.getValue().toString();\n\t\t\t\t// //\"This is going to be put in doc3: \"+ (documentFound-1));\n\t\t\t\tpostingsFileListAllWords.get(documentFound - 1).add(term);\n\t\t\t\t// if ( !((mentry.getValue()).equals(\" \")) )\n\t\t\t\t// docTermCount++;\n\t\t\t}\n\n\t\t\thmap2.putAll(hmap);\n\t\t\thmap.clear();\n\t\t\tdocTermCountList.add(docTermCount);\n\t\t\tdocTermCount = 0;\n\n\n\t\t\t\n\t\t\n\t\t\t// END OF LOOKING AT ALL DOCS\n\t\t\t\n\t\t\t//System.out.println(\"Docs and titles: \"+docAndTitles);\n\t\t\t\n\t\t\t//System.out.println(\"All terms\" +allTerms);\n\t\t\tString[] sortedArray = allTerms.toArray(new String[0]);\n\t\t\tString[] sortedArrayUnique = uniqueTerms.toArray(new String[0]);\n\t\t\t//System.out.println(Arrays.toString(sortedArray));\n\t\t\t\n\t\t\tArrays.sort(sortedArray);\n\t\t\tArrays.sort(sortedArrayUnique);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//Sortings \n\t\t\tSet set3 = hmap2.entrySet();\n\t\t\tIterator iterator3 = set3.iterator();\n\n\t\t\t// Sorting the map\n\t\t\t//System.out.println(\"Before sorting \" +hmap2);\t\t\t\n\t\t\tMap<Integer, String> map = sortByValues(hmap2);\n\t\t\t//System.out.println(\"after sorting \" +map);\n\t\t\t// //\"After Sorting:\");\n\t\t\tSet set2 = map.entrySet();\n\t\t\tIterator iterator2 = set2.iterator();\n\t\t\tint docCount = 1;\n\t\t\twhile (iterator2.hasNext()) {\n\t\t\t\tMap.Entry me2 = (Map.Entry) iterator2.next();\n\t\t\t\t// (me2.getKey() + \": \");\n\t\t\t\t// //me2.getValue());\n\t\t\t}\n\t\t\t\n\t\t\t//System.out.println(\"Done sorting!\");\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"Posting starts \");\n\t\t\t//\"THIS IS START OF DICTIONARTY\" \n\t\t\tBufferedWriter bw = null;\n\t\t\tFileWriter fw = null;\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"Start making an array thats big as every doc total \");\n\t\t\tfor (int z = 1; z < documentFound+1; z++)\n\t\t\t{\n\t\t\t\ttermWeights.put(z, new ArrayList<Double>());\n\t\t\t}\n\t\t\t//System.out.println(\"Done making that large array Doc \");\n\t\t\t\n\t\t\t//System.out.println(\"Current Weights: \"+termWeights);\n\t\t\t\n\t\t\t//System.out.println(\"All terms\" +allTerms)\n\t\t\t//System.out.println(Arrays.toString(sortedArray));\n\t\t\t//System.out.println(Arrays.toString(sortedArrayUnique));\n\t\t\t//System.out.println(uniqueTerms);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//\tSystem.out.println(\"Posting starts \");\n\t\t\t// \tPOSTING FILE STARTS \n\t\t\ttry {\n\t\t\t\t// Posting File\n\t\t\t\t//System.out.println(\"postingsFileListAllWords: \"+postingsFileListAllWords); //Contains every word including Dups, seperated per doc\n\t\t\t\t//System.out.println(\"postingsFileList: \"+postingsFileList); \t\t //Contains unique words, dups are \" \", seperated per doc\n\t\t\t\t//System.out.println(\"postingsFileListAllWords.size(): \" +postingsFileListAllWords.size()); //Total # of docs \n\t\t\t\t//System.out.println(\"Array size: \"+sortedArrayUnique.length);\n\n\t\t\t\tfw = new FileWriter(POSTING);\n\t\t\t\tbw = new BufferedWriter(fw);\n\t\t\t\tString temp = \" \";\n\t\t\t\tDouble termFreq = 0.0;\n\t\t\t\t// //postingsFileListAllWords);\n\t\t\t\tList<String> finalTermList = new ArrayList<String>();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\t\t// //postingsFileList.get(i).size());\n\t\t\t\t\tfor (int j = 0; j < sortedArrayUnique.length; ++j)\t\t\t\t\t // go thru each word, CURRENT TERM\n\t\t\t\t\t{\n\t\t\t\t\t\t//System.out.println(\"Term is: \" + sortedArrayUnique[j]);\n\t\t\t\t\t\ttemp = sortedArrayUnique[j];\t\t\t\t\t\n\t\t\t\t\t\tif ((stopWordsSetting && stopWords.contains(temp))) \n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!(finalTermList.contains(temp))) \n\t\t\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\n\t\t\t\t\t\t\t//PART TO FIND DOCUMENT FREQ\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tint docCountIDF = 0;\n\t\t\t\t\t\t\t//Start here for dictionary \n\t\t\t\t\t\t\tfor (int totalWords = 0; totalWords < sortedArray.length; totalWords++) \t\t\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\tif (temp.compareTo(\" \") == 0 || (stopWordsSetting && stopWords.contains(temp))) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//EITHER BLANK OR STOPWORD \n\t\t\t\t\t\t\t\t\t//System.out.println(\"fOUND STOP WORD\");\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tString temp2 = sortedArray[totalWords];\n\t\t\t\t\t\t\t\t\t//System.out.println(\"Compare: \"+temp+ \" with \" +temp2);\n\t\t\t\t\t\t\t\t\tif (temp.compareTo(temp2) == 0) {\n\t\t\t\t\t\t\t\t\t\t// (temp2+\" \");\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tdocCountIDF++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//System.out.println(\"Total Number: \" +docCountIDF);\n\t\t\t\t\t\t\t//System.out.println(\"documentFound: \" +documentFound);\n\t\t\t\t\t\t\t//System.out.println(\"So its \" + documentFound + \" dividied by \" +docCountIDF);\n\t\t\t\t\t\t\t//docCountIDF = 1;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdouble idf = (Math.log10(((double)documentFound/(double)docCountIDF)));\n\t\t\t\t\t\t\t//System.out.println(\"Calculated IDF: \"+idf);\n\t\t\t\t\t\t\tif (idf < 0.0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tidf = 0.0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//System.out.println(\"IDF is: \" +idf);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"Size of doc words: \" + postingsFileListAllWords.size());\n\t\t\t\t\t\t\tfor (int k = 0; k < postingsFileListAllWords.size(); k++) \t\t//Go thru each doc. Since only looking at 1 term, it does it once per doc\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//System.out.println(\"Current Doc: \" +(k+1));\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\ttermFreq = 1 + (Math.log10(Collections.frequency(postingsFileListAllWords.get(k), temp)));\t\t\t\n\t\t\t\t\t\t\t\t\t//System.out.println(\"Freq is: \" +Collections.frequency(postingsFileListAllWords.get(k), temp));\n\t\t\t\t\t\t\t\t\t//System.out.println(termFreq + \": \" + termFreq.isInfinite());\n\t\t\t\t\t\t\t\t\tif (termFreq.isInfinite() || termFreq <= 0)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttermFreq = 0.0;\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t\t\t\t\t//System.out.println(\"termFreq :\" +termFreq); \n\t\t\t\t\t\t\t\t\t//System.out.println(\"idf: \" +idf);\n\t\t\t\t\t\t\t\t\ttermWeights.get(k+1).add( (idf*termFreq) );\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}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"\");\n\t\t\t\t\t\t\tfinalTermList.add(temp);\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t//System.out.println(\"Current Weights: \"+termWeights);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//FINALCOUNTER\n\t\t\t\t\t\t//System.out.println(\"Done looking at word: \" +j);\n\t\t\t\t\t\t//System.out.println(\"\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"Current Weights: \"+termWeights);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\twhile (true)\n\t\t\t\t {\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"Enter a query: \");\n\t\t\t\t\t\n\t \tScanner scanner = new Scanner(System.in);\n\t \tString enterQuery = scanner.nextLine();\n\t \t\n\t \t\n\t\t\t\t\tList<Double> queryWeights = new ArrayList<Double>();\n\t\t\t\t\t\n\t\t\t\t\t// Query turn\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tenterQuery = enterQuery.toLowerCase();\t\t\n\t\t\t\t\tenterQuery = enterQuery.replaceAll(\"[-&^%'*$+|{}?!\\\\/<\\\\>=.,;_:()\\\\[\\\\]\\\"]\", \"\");\n\t\t\t\t\t//System.out.println(\"Query is: \" + enterQuery);\n\t\t\t\t\t\n\t\t\t\t\tif (enterQuery.equals(\"exit\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tString[] queryArray = enterQuery.split(\" \");\n\t\t\t\t\tArrays.sort(queryArray);\n\t\t\t\t\t\n\t\t\t\t\t//Find the query weights for each term in vocab\n\t\t\t\t\tfor (int j = 0; j < sortedArrayUnique.length; ++j)\t\t\t\t\t // go thru each word, CURRENT TERM\n\t\t\t\t\t{\n\t\t\t\t\t\t//System.out.println(\"Term is: \" + sortedArrayUnique[j]);\n\t\t\t\t\t\ttemp = sortedArrayUnique[j];\t\t\t\t\t\n\t\t\t\t\t\tif ((stopWordsSetting && stopWords.contains(temp))) \n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\tint docCountDF = 0;\n\t\t\t\t\t\t//Start here for dictionary \n\t\t\t\t\t\tfor (int totalWords = 0; totalWords < queryArray.length; totalWords++) \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\tif (temp.compareTo(\" \") == 0 || (stopWordsSetting && stopWords.contains(temp))) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//EITHER BLANK OR STOPWORD\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tString temp2 = queryArray[totalWords];\n\t\t\t\t\t\t\t\t//System.out.println(\"Compare: \"+temp+ \" with \" +temp2);\n\t\t\t\t\t\t\t\tif (temp.compareTo(temp2) == 0) {\n\t\t\t\t\t\t\t\t\t// (temp2+\" \");\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tdocCountDF++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tDouble queryWeight = 1 + (Math.log10(docCountDF));\n\t\t\t\t\t\tif (queryWeight.isInfinite())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tqueryWeight = 0.0;\n\t\t\t\t\t\t}\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tqueryWeights.add(queryWeight);\n\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"Query WEights is: \"+queryWeights);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// Finding the norms for DOCS\t\t\t\t\t\n\t\t\t\t\tfor (int norms = 1; norms < documentFound+1; norms++)\n\t\t\t\t\t{\n\t\t\t\t\t\tdouble currentTotal = 0.0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (int weightsPerDoc = 0; weightsPerDoc < termWeights.get(norms).size(); weightsPerDoc++)\n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\tdouble square = Math.pow(termWeights.get(norms).get(weightsPerDoc), 2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"Current square: \" + termWeights.get(norms).get(weightsPerDoc));\n\t\t\t\t\t\t\tcurrentTotal = currentTotal + square;\n\t\t\t\t\t\t\t//System.out.println(\"Current total: \" + currentTotal);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//System.out.println(\"About to square root this: \" +currentTotal);\n\t\t\t\t\t\tdouble root = Math.sqrt(currentTotal);\n\t\t\t\t\t\tdocNorms.put(norms, root);\n\t\t\t\t\t}\n\t\t\t\t\t//System.out.println(\"All of the docs norms: \"+docNorms);\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//Finding the norm for the query\n\t\t\t\t\tdouble currentTotal = 0.0;\t\t\t\t\t\n\t\t\t\t\tfor (int weightsPerDoc = 0; weightsPerDoc < queryWeights.size(); weightsPerDoc++)\n\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tdouble square = Math.pow(queryWeights.get(weightsPerDoc), 2);\n\t\t\t\t\t\tcurrentTotal = currentTotal + square;\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tdouble root = Math.sqrt(currentTotal);\n\t\t\t\t\tdouble queryNorm = root; \t\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"Query norm \" + queryNorm);\n\t\t\t\t\t\n\t\t\t\t\t//Finding the cosine sim\n\t\t\t\t\t//System.out.println(\"Term Weights \" + termWeights);\n\t\t\t\t\tHashMap<Integer, Double> cosineScore = new HashMap<Integer, Double>();\n\t\t\t\t\tfor (int cosineSim = 1; cosineSim < documentFound+1; cosineSim++)\n\t\t\t\t\t{\n\t\t\t\t\t\tdouble total = 0.0;\n\t\t\t\t\t\tfor (int docTerms = 0; docTerms < termWeights.get(cosineSim).size(); docTerms++)\n\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\tdouble docTermWeight = termWeights.get(cosineSim).get(docTerms);\n\t\t\t\t\t\t\tdouble queryTermWeight = queryWeights.get(docTerms);\n\t\t\t\t\t\t\t//System.out.println(\"queryTermWeight \" + queryTermWeight);\n\t\t\t\t\t\t\t//System.out.println(\"docTermWeight \" + docTermWeight);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttotal = total + (docTermWeight*queryTermWeight);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdouble cosineSimScore = 0.0;\n\t\t\t\t\t\tif (!(total == 0.0 || (docNorms.get(cosineSim) * queryNorm) == 0))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcosineSimScore = total / (docNorms.get(cosineSim) * queryNorm);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcosineSimScore = 0.0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tcosineScore.put(cosineSim, cosineSimScore);\n\t\t\t\t\t}\n\t\t\t\t\tcosineScore = sortByValues2(cosineScore);\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"This is the cosineScores: \" +cosineScore);\n\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"docAndTitles: \"+ docAndTitles);\n\t\t\t\t\tint topK = 0;\n\t\t\t\t\tint noValue = 0;\n\t\t\t\t\tfor (Integer name: cosineScore.keySet())\n\t\t\t\t\t{\n\t\t\t\t\t\tif (topK < 50)\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\n\t\t\t\t String key =name.toString();\n\t\t\t\t //String value = cosineScore.get(name).toString(); \n\t\t\t\t if (!(cosineScore.get(name) <= 0))\n\t\t\t\t {\n\t\t\t\t \tSystem.out.println(\"Doc: \"+key);\t\t\t\t \t\t\t\t\t \t\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \tStringBuilder builder = new StringBuilder();\n\t\t\t\t \tfor (StringBuilder value : docAndTitles.get(name)) {\n\t\t\t\t \t builder.append(value);\n\t\t\t\t \t}\n\t\t\t\t \tString text = builder.toString();\t\t\t\t \t\n\t\t\t\t \t//System.out.println(\"Title:\\n\" +docAndTitles.get(name));\n\t\t\t\t \tSystem.out.println(\"Title: \" +text);\n\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \t//System.out.println(\"Authors:\\n\" +docAndAuthors.get(name));\n\t\t\t\t \t\n\t\t\t\t \tif (docAndAuthors.get(name) == null || docAndAuthors.get(name).toString().equals(\"\"))\n\t\t\t\t \t{\n\t\t\t\t \t\tSystem.out.println(\"Authors: N\\\\A\\n\");\n\t\t\t\t \t}\n\t\t\t\t \telse \n\t\t\t\t \t{\t\t\t\t \t\t\t\t\t\t \t\n\t\t\t\t\t \tStringBuilder builder2 = new StringBuilder();\n\t\t\t\t\t \tfor (StringBuilder value : docAndAuthors.get(name)) {\n\t\t\t\t\t \t builder2.append(value);\n\t\t\t\t\t \t}\n\t\t\t\t\t \tString text2 = builder2.toString();\t\t\t\t \t\n\t\t\t\t\t \t\n\t\t\t\t\t \tSystem.out.println(\"Authors found: \" +text2);\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/* ABSTRACT \n\t\t\t\t \tif (docAndAbstract.get(name) == null)\n\t\t\t\t \t{\n\t\t\t\t \t\tSystem.out.println(\"Abstract: N\\\\A\\n\");\n\t\t\t\t \t}\n\t\t\t\t \telse \n\t\t\t\t \t{\t\t\t\t \t\t\t\t\t\t \t\n\t\t\t\t\t \tStringBuilder builder2 = new StringBuilder();\n\t\t\t\t\t \tfor (StringBuilder value : docAndAbstract.get(name)) {\n\t\t\t\t\t \t builder2.append(value);\n\t\t\t\t\t \t}\n\t\t\t\t\t \tString text2 = builder2.toString();\t\t\t\t \t\n\t\t\t\t\t \t\n\t\t\t\t\t \tSystem.out.println(\"Abstract: \" +text2);\n\t\t\t\t \t}\t\n\t\t\t\t \t*/\n\t\t\t\t \t\n\t\t\t\t \tSystem.out.println(\"\");\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t \tnoValue++;\n\t\t\t\t }\n\t\t\t\t topK++;\n\t\t\t\t \n\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (noValue == documentFound)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(\"No documents contain query!\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t\ttopK=0;\n\t\t\t\t\tnoValue = 0;\n\t\t\t\t }\n\t\t\t\t\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (bw != null)\n\t\t\t\t\t\tbw.close();\n\n\t\t\t\t\tif (fw != null)\n\t\t\t\t\t\tfw.close();\n\n\t\t\t\t} catch (IOException ex) {\n\n\t\t\t\t\tex.printStackTrace();\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (br != null)\n\t\t\t\t\tbr.close();\n\n\t\t\t\tif (fr != null)\n\t\t\t\t\tfr.close();\n\n\t\t\t} catch (IOException ex) {\n\n\t\t\t\tex.printStackTrace();\n\n\t\t\t}\n\n\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\tint itemCount = uniqueTerms.size();\n\t\t\t//System.out.println(allValues);\n\t\t\tSystem.out.println(\"Total Terms BEFORE STEMING: \" +itemCount);\n\t\t\tSystem.out.println(\"Total Documents \" + documentFound);\n\t\t\t\t\t\t\n\t\t \n\t\t\t \n\t\t\t \n\t\t\t//END OF MAIN\n\t\t}",
"public boolean extractKeywordsAbstract (String firstPage, int paperID);",
"private void normByTopicAndMultiByCount(Vector doc, List<Integer> terms, Matrix perTopicSparseDistributions) {\n for (Integer termIndex : terms) {\n double sum = 0;\n for (int x = 0; x < numTopics; x++) {\n sum += perTopicSparseDistributions.viewRow(x).getQuick(termIndex);\n }\n double count = doc.getQuick(termIndex);\n for (int x = 0; x < numTopics; x++) {\n perTopicSparseDistributions.viewRow(x).setQuick(termIndex,\n perTopicSparseDistributions.viewRow(x).getQuick(termIndex) * count / sum);\n }\n }\n }",
"public static Map<String, AuthorMod> indexEmails(String fileName)\n\t{\n\t\tMap<String, AuthorMod> authBank= new HashMap<String, AuthorMod>();\t\t \n\t\tAuthorMod curAuth;\n\t\t//vars for for loop - one loop per email\n\t\tString curTok;\n\t\tString lastTok;\n\t\t\n\t\ttry \n\t\t{\n\t\t\tScanner scanner = new Scanner(new FileInputStream(fileName));\n\t\t try \n\t\t {\n\t\t while (scanner.hasNextLine())\n\t\t {\n\t\t \n\t\t \t String[] emailToks= SimpleTokenizer.INSTANCE.tokenize(scanner.nextLine());\n\t\t \t\n\t\t \t lastTok = \"<s>\";\n\t\t \t curTok = emailToks[3]; //maybe 2, check output\n\t\t \t Pair<String, String> firstBg = new Pair<String, String>(lastTok, curTok);\t\t \t \n\t\t \t //author check, possible set\n\t\t \t String authID = emailToks[0] + emailToks[1] + emailToks[2]; //check output from the tokenizer\t \t\n\t\t \t if (authBank.containsKey(authID)){\n\t\t \t\t curAuth = authBank.get(authID);\n\t\t \t\t curAuth.trainSize = curAuth.trainSize + (emailToks.length-2);\n\t\t \t\t curAuth.ug.updateSeen(lastTok);\n\t\t \t } else {\n\t\t \t\t curAuth = new AuthorMod();\n\t\t \t\t curAuth.id = authID;\n\t\t \t\t curAuth.trainSize = emailToks.length - 2;\n\t\t\t \t curAuth.ug.addNew(lastTok);\n\t\t \t }\n\t\t \t \n\t\t \t //initalize loop\n\t\t \t if(curAuth.ug.contains(curTok)) {\n\t\t \t\t curAuth.ug.updateSeen(curTok);\n\t\t \t } \n\t\t \t else {\t\t \n\t\t \t\t curAuth.ug.addNew(curTok);\n\t\t \t }\n\n\t\t \t if(curAuth.bg.containsBg(firstBg)) {\n\t\t \t\t curAuth.bg.updateSeen(firstBg);\n\t\t \t } else {\n\t\t \t\t curAuth.bg.addNew(firstBg);\n\t\t \t }\n\t\t \t \t \n\t\t \t //index for that author, code very similar to bigram/unigram\n\t\t \t for(int i = 4; i < emailToks.length; i++)\t\t \n\t\t \t\t {\n\t\t \t\t\t curTok= emailToks[i];\n\t\t \t\t\t Pair<String, String> loopBg = new Pair<String, String>(lastTok, curTok);\n\t\t \t\t\t \n\t\t \t\t\t //three cases. \n\t\t \t\t\t //1) bigram has been seen\n\t\t \t\t\t if (curAuth.bg.containsBg(loopBg))\n\t\t \t\t\t {\n\t\t \t\t\t\t curAuth.bg.updateSeen(loopBg);\n\t\t \t\t\t\t curAuth.ug.updateSeen(curTok);\n\t\t \t\t\t } \n\t\t \t\t\t //2) word seen, but not bigram\n\t\t \t\t\t else\n\t\t \t\t\t { \n\t\t \t\t\t\t if (curAuth.ug.contains(curTok))\n\t\t \t\t\t \t\t{\n\t\t \t\t\t\t\t curAuth.bg.addNew(loopBg);\n\t\t \t\t\t\t\t curAuth.ug.updateSeen(curTok);\n\t\t \t\t\t\t\t} \n\t\t \t\t\t\t //3) new word entirely\n\t\t \t\t\t\t else\n\t\t \t\t\t\t {\n\t\t \t\t\t\t\t curAuth.ug.addNew(curTok);\n\t\t \t\t\t\t\t curAuth.bg.addNew(loopBg); \n\t\t \t\t\t\t } \n\t\t \t\t\t }\t \n\t\t \t\t\t lastTok = curTok;\n\t\t \t\t\t} //end inner loop\n\t\t \tauthBank.put(curAuth.id, curAuth); \n\t\t \t\t} //end outer loop \n\t\t }\t\n\t\t finally\n\t\t {\n\t\t scanner.close();\n\t\t }\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.err.println(\"Error: \" + e.getMessage());\n\t\t}\n\t\treturn authBank;\n\t}",
"int getAuthoritiesCount();",
"long countByExample(WordSchoolExample example);",
"public static void main(String[] args)\n\t{\n\t\tMap<String, AuthorMod> map = indexEmails(\"email_small.txt\");\n\t\tsetAuthFreq(map); //currently using a static variable to test-- this makes me nervous\n\t\t\n\t\tfor(AuthorMod auth: map.values()) {\n\t\t\t\n\t\t\tSystem.out.println(auth.id);\n\t\t\t\n\t\t\tfor(Pair<String, String> bGram: auth.bg.getAll()) {\n\t\t\t\tSystem.out.println(bGram.toString() + \" freq: \" + auth.bg.getBgFreq(bGram));\n\t\t\t}\n\t\t\tSystem.out.println(\"unigrams\");\n\t\t\t\n\t\t\tdouble ugFSum= 0;\n\t\t\t\n\t\t\tfor(String uGram :auth.ug.getAll()){\n\t\t\t\tSystem.out.println(uGram.toString() + \" count: \" + auth.ug.getCount(uGram) + \"and freq: \" + auth.ug.unigramHT.get(uGram).getSec());\n\t\t\t\tugFSum= ugFSum+ auth.ug.unigramHT.get(uGram).getSec();\n\t\t\t}\n\t\t\tSystem.out.println(\"Sum of probs of UGs: \" + ugFSum);\n\t\t}\n\t\t\n\t\tBigrams rick= map.get(\"rick-e\").bg;\n\t\tPair<String, String> rickbG = new Pair<String, String>(\"<s>\", \"conservative\");\n\t\tSystem.out.println(rick.getBgCount(rickbG) + \" and freq: \" + rick.getBgFreq(rickbG) + \" ug count for <s>: \" + map.get(\"slicks-h\").ug.getCount(\"<s>\"));\n\t}",
"public long getAuthorsInCollection()\n\tthrows DataAccessException;",
"int countByExample(OrgMemberRecordExample example);",
"private double compareExp(ArrayList<ParsedObject> workExp, ArrayList<ExpObject> cvExp, ArrayList<ExpObject> cvProj, ArrayList<ExpObject> cvPublication, String position) {\n\t\tdouble expNum = 0.0, expScore = 0.0, totalNumOfYears = 0.0;\n\t\tdouble numOfYears = 0.0; \n\t\tString year = \"\", temp =\"\";\n\t\tint count = 0;\n\t\t String[] word;\n\t\t\n\t\tcvExp.addAll(cvProj);\n\t\tcvExp.addAll(cvPublication);\n\t\tPattern patternForSimilar = Pattern.compile(\"\\\\bsimilar\\\\b|\\\\bequivalent\\\\b|\\\\brelevant\\\\b|\\\\brelated\\\\b|\\\\binterrelated\\\\b|\\\\bsame\\\\b\");\n\t\t\n\t\tfor(int i = 0; i < workExp.size(); i++) {\n\n\t\t\ttemp = workExp.get(i).getWords().get(0).replaceAll(\"\\\\d+(.|)\\\\d+\",\"\");\n\t\t\tyear = workExp.get(i).getWords().get(0).replace(temp, \"\");\n\t\t\tnumOfYears = Double.parseDouble(year);\n\t\t\t\n\t\t\tworkExp.get(i).getWords().add(1, workExp.get(i).getWords().get(0).replaceAll(\"\\\\d+(.|)\\\\d+ year(s|)\",\"\"));\n\t\t\tif(workExp.get(i).getType().equals(\"or\")){\n\t\t\t\ttotalNumOfYears = numOfYears;\n\t\t\t} else {\n\t\t\t\ttotalNumOfYears = workExp.get(i).getWords().size() * numOfYears;\n\t\t\t}\n\t\t\tfor(int k = 1; k < workExp.get(i).getWords().size(); k++){\n\t\t Matcher matcher = patternForSimilar.matcher(workExp.get(i).getWords().get(k));\n\t\t String[] tempForComma = workExp.get(i).getWords().get(k).split(\",\");\n\t\t workExp.get(i).getWords().set(k, tempForComma[0]);\n\t\t for(int o = 1; o < tempForComma.length; o++) {\n\t\t \t workExp.get(i).getWords().add(o+k,tempForComma[o]);\n\t\t }\n\t\t workExp.get(i).getWords().set(k, workExp.get(i).getWords().get(k).replaceAll(\"\\\\s+\", \" \"));\n\t\t workExp.get(i).getWords().set(k, workExp.get(i).getWords().get(k).trim());\n\t\t \n\t\t \n\t\t for(int j = 0; j < cvExp.size(); j++) {\n\t\t \n\t\t \t for(int y = 0; y < cvExp.get(j).getDescription().size(); y++) {\n\t\t \t\t word = workExp.get(i).getWords().get(k).split(\"\\\\s\");\n\t\t \t\t\n\t\t \t\t for(int p = 0; p < word.length; p++){\n\t\t \t\t\n\t\t \t\t\t if(!word[p].equals(\"\") && Pattern.compile(\"\\\\b\"+word[p]+\"\\\\b\").matcher(cvExp.get(j).getDescription().get(y)).find()){\n\t\t \t\t\n\t\t \t\t\t\t count++;\n\t\t \t\t\t\n\t\t \t\t\t\t } \n\t\t \t\t\t\n\t\t \t\t\t \n\t\t \t\t }\n\t\t \t\n\t\t \t\t if(count == word.length){\n\t\t \t\t\t if(cvExp.get(j).getDuration() == 0) {\n\t \t\t\t\t\t expNum += 1;\n\t \t\t\t\t}else if(cvExp.get(j).getDuration() < 0.0) {\n\t \t\t\t\t\t expNum = expNum + (cvExp.get(j).getDuration()*-1);\n\t \t\t\t\t} else {\n\t\t \t\t\t expNum += cvExp.get(j).getDuration();\n\t \t\t\t\t}\n\t\t \t\t\n\t\t \t\t }\n\t\t \t\t count = 0;\n\t\t \t\t \n\t\t \t\t if(matcher.find()) {\n\t\t \t\t\t String[] wordForPosition = position.split(\"\\\\s\");\n\t\t \t\t\t for(int u = 0; u < wordForPosition.length; u++){\n\t\t \t\t\t\t\n\t\t \t\t\t\t if(!wordForPosition[u].equals(\"\") && Pattern.compile(\"\\\\b\"+wordForPosition[u] +\"\\\\b\").matcher(cvExp.get(j).getDescription().get(y)).find()){\n\t\t \t\t\t\t\t count++;\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\tif(count == wordForPosition.length){\n\t\t \t\t\t\tif(cvExp.get(j).getDuration() == 0) {\n\t\t \t\t\t\t\t expNum += 1;\n\t\t \t\t\t\t} else if(cvExp.get(j).getDuration() < 0.0) {\n\t\t \t\t\t\t\texpNum = expNum + (cvExp.get(j).getDuration() * -1);\n\t\t \t\t\t\t} else {\n\t\t \t\t\t expNum += cvExp.get(j).getDuration();\n\t\t \t\t\t\t}\n\t\t \t\t\n\t\t \t\t }\n\t\t \t\t count = 0;\n\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\n\t\t\t\texpScore += expNum / totalNumOfYears;\n\t \n\t\t\t\n\t\t\texpNum = 0.0;\n\t\t\ttotalNumOfYears = 0.0;\n\t\t}\n\t\n\t\treturn expScore;\n\t}",
"public static boolean processAuthor(String dcCreator){\n\t\tlong maxTopic = bl.getMaxTopicToAuthor(dcCreator);\n\t\tdouble TF = 0;\n\t\tif (maxTopic > 0)\n\t\t{\n\t\t\t\n\t\t}\n\t\tdouble IDF = 0;\n\t\tArrayList<TopicWeight> topicVec = bl.getTopicWeightVecForAuthor(dcCreator);\n//\t\tSystem.out.println(topicVec);\n\t\tfor(int i = 0; i < topicVec.size(); i++){\n\t\t\tTF = (double)topicVec.get(i).getTopicWeight()/(double)maxTopic;\n\t\t\tlong NumOfAuthorsWithTopic = bl.getNumOfAuthorsWithTopic(topicVec.get(i).getTopicName());\n\t\t\t//\t\t\tSystem.err.println(NumOfAuthorsWithTopic);\n\t\t\tif (NumOfAuthorsWithTopic>0){\n\t\t\t\tIDF = (double)java.lang.Math.log10((double)numOfAuthors/(double)NumOfAuthorsWithTopic);\n\t\t\t}\n\t\t\tdouble tfidf = (double)TF*(double)IDF;\n//\t\t\tSystem.out.println(dcCreator + \" -- \" + topicVec.get(i).getTopicName()+\" -- \" + tfidf);\n\t\t\tjena.InsertTriple(new RDFTripleModel(dcCreator,\"TF-IDF-TopicWithWeight\",topicVec.get(i).getTopicName()+\" -- \" + tfidf ));\n\t\t\tCOUNTER++;\n\t\t}\n\t\treturn true;\n\t}",
"private void doBayesianClassification() {\n\t\tList<MutualInformation> mutualInformationList = new ArrayList<MutualInformation>();\r\n\t\tint k = 5;\r\n\t\tSystem.out.println(\"k = \" + k);\r\n\t\tdouble N = fileNames.size();\r\n\t\t\r\n\t\tList<Set<String>> classifiedDocsList = new ArrayList<Set<String>>();\r\n\t\tclassifiedDocsList.add(setOfHamiltonDocs);\r\n\t\tclassifiedDocsList.add(setOfMadisonDocs);\r\n\t\tclassifiedDocsList.add(setOfJayDocs);\r\n\t\t\r\n\t\tfor (String term : corpusVocab) {\r\n\r\n\t\t\t// All docs containing this term\r\n\t\t\tSet<String> matchingDocs = new HashSet<String>();\r\n\t\t\t\r\n\t\t\tfor (PositionalPosting posting : pInvertedIndex.getPostings(term)) {\r\n\t\t\t\tmatchingDocs.add(fileNames.get(posting.getDocumentId()));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// iterate through all classes (Hamilton, Madison, Jay)\r\n\t\t\tfor (int i = 0; i < classifiedDocsList.size(); i++) {\r\n\t\t\t\t\r\n\t\t\t\tSet<String> classifiedDocs = classifiedDocsList.get(i);\r\n\t\t\t\t\r\n\t\t\t\tSet<String> intersection = new HashSet<String>(matchingDocs);\r\n\t\t\t\tintersection.retainAll(classifiedDocs);\r\n\t\t\t\tdouble N11 = intersection.size();\r\n\t\t\t\t\r\n\t\t\t\tSet<String> difference = new HashSet<String>(matchingDocs);\r\n\t\t\t\tdifference.removeAll(classifiedDocs);\r\n\t\t\t\tdouble N10 = difference.size();\r\n\t\t\t\t\r\n\t\t\t\tdouble N01 = classifiedDocs.size() - N11;\r\n\t\t\t\tdouble N00 = fileNames.size() - classifiedDocs.size() - N10;\r\n\r\n\t\t\t\t// Calculate I(t,c)\r\n\t\t\t\tdouble Itc = (N11 / N) * log2((N * N11) / ((N11 + N10) * (N11 + N01)))\r\n\t\t\t\t\t\t+ (N01 / N) * log2((N * N01) / ((N01 + N00) * (N11 + N01)))\r\n\t\t\t\t\t\t+ (N10 / N) * log2((N * N10) / ((N11 + N10) * (N10 + N00)))\r\n\t\t\t\t\t\t+ (N00 / N) * log2((N * N00) / ((N01 + N00) * (N10 + N00)));\r\n\t\t\t\tif (!Double.isNaN(Itc)) {\r\n\t\t\t\t\tmutualInformationList.add(new MutualInformation(term, Itc));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Build Discriminating Set of vocab terms by sorting mutual information\r\n\t\t// list and keep the first k values\r\n\t\tSet<String> terms = new HashSet<String>();\r\n\t\tCollections.sort(mutualInformationList, Collections.reverseOrder());\r\n\t\tfor (int i = 0; i < k; i++) {\r\n\t\t\tterms.add(mutualInformationList.get(i).getTerm());\r\n\t\t}\r\n\t\t\r\n\t\t// get term counts in classified (trainer) docs\t\t\r\n\t\tint[] classifiedDocsTermFreq = new int[classifiedDocsList.size()];\r\n\t\t\r\n\t\tclassifiedDocsTermFreq[0] = getTermFreq(hamiltonDocs, terms);\r\n\t\tclassifiedDocsTermFreq[1] = getTermFreq(madisonDocs, terms);\r\n\t\tclassifiedDocsTermFreq[2] = getTermFreq(jayDocs, terms);\r\n\t\t\r\n\t\t// Calculate p(t|c)\r\n\t\t// maps term to list of p(t|c) for each class\r\n\t\tMap<String, List<Double>> ptc = new HashMap<String, List<Double>>();\r\n\t\t\r\n\t\tfor (String term : terms) {\r\n\t\t\tptc.put(term, new ArrayList<Double>());\r\n\t\t\tfor (int i = 0; i < classifiedDocsList.size(); i++) {\r\n\t\t\t\t\r\n\t\t\t\tint ftc = 0;\r\n\t\t\t\tfor (PositionalPosting posting : pInvertedIndex.getPostings(term)) {\r\n\t\t\t\t\tif (classifiedDocsList.get(i).contains(fileNames.get(posting.getDocumentId()))) {\r\n\t\t\t\t\t\tftc += posting.getPositions().size();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tptc.get(term).add((double) (ftc + 1) / (double) (classifiedDocsTermFreq[i] + terms.size()));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// visit each unclassified document\r\n\t\ttry {\r\n\t\t\tPath currentWorkingPath = Paths.get(toBeClassified).toAbsolutePath();\r\n\t\t\t// This is our standard \"walk through all .txt files\" code.\r\n\t\t\tFiles.walkFileTree(currentWorkingPath, new SimpleFileVisitor<Path>() {\r\n\r\n\t\t\t\tpublic FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) {\r\n\t\t\t\t\t// make sure we only process the current working directory\r\n\t\t\t\t\tif (currentWorkingPath.equals(dir)) {\r\n\t\t\t\t\t\treturn FileVisitResult.CONTINUE;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn FileVisitResult.SKIP_SUBTREE;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tpublic FileVisitResult visitFile(Path file, BasicFileAttributes attrs) {\r\n\r\n\t\t\t\t\tif (file.toString().endsWith(\".txt\")) {\r\n\r\n\t\t\t\t\t\tTokenStream tokenStream = null;\r\n\t\t\t\t\t\t// terms in this document\r\n\t\t\t\t\t\tSet<String> docTerms = new HashSet<String>();\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\ttokenStream = Utils.getTokenStreams(file.toFile());\r\n\t\t\t\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\twhile (tokenStream.hasNextToken()) {\r\n\t\t\t\t\t\t\tString token = Utils.processWord(tokenStream.nextToken().trim(), false);\r\n\t\t\t\t\t\t\tdocTerms.add(token);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// only keep terms in discriminating set\r\n\t\t\t\t\t\tdocTerms.retainAll(terms);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// calculate log(p(c) + sum(log(p(ti|c))) for each class\r\n\t\t\t\t\t\tdouble[] pce = new double[classifiedDocsList.size()];\r\n\t\t\t\t\t\tfor (int i = 0; i < classifiedDocsList.size(); i++) {\r\n\t\t\t\t\t\t\tdouble sum = 0;\r\n\t\t\t\t\t\t\tfor (String term : docTerms) {\r\n\t\t\t\t\t\t\t\tsum += Math.log(ptc.get(term).get(i));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tpce[i] = Math.log(classifiedDocsTermFreq[i] / terms.size()) + sum;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (pce[0] > pce[1] && pce[0] > pce[2]) {\r\n\t\t\t\t\t\t\tSystem.out.println(\"Document : \" + file.getFileName().toString() + \" : belongs to Hamilton\");\r\n\t\t\t\t\t\t} else if (pce[1] > pce[0] && pce[1] > pce[2]) {\r\n\t\t\t\t\t\t\tSystem.out.println(\"Document : \" + file.getFileName().toString() + \" : belongs to Madison\");\r\n\t\t\t\t\t\t} else if (pce[2] > pce[0] && pce[2] > pce[1]) {\r\n\t\t\t\t\t\t\tSystem.out.println(\"Document : \" + file.getFileName().toString() + \" : belongs to Jay\");\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tSystem.out.println(\"I don't know whom document : \" + file.getFileName().toString() + \" : belongs to.\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn FileVisitResult.CONTINUE;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// don't throw exceptions if files are locked/other errors occur\r\n\t\t\t\tpublic FileVisitResult visitFileFailed(Path file, IOException e) {\r\n\t\t\t\t\treturn FileVisitResult.CONTINUE;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public abstract long countAllClinicalDocuments();",
"private int countMatchingCorpBody(final ExpressionJpa expression) {\n\n int matchCount = 0;\n\n for (MarcDataField field710 : this.marcRecord.getDataFields(\"710\")) {\n for (String relatorSubfield : field710.getValueList('4')) {\n if (\"prf\".equals(relatorSubfield)) {\n final String corpAuthIdent =\n CorporateBodyMapper.getAuthIdent(field710);\n // have a corpIdent from the MarcRecord\n // is there a matching persisted corpIdent\n // under the expression.realizedBy relationship\n for (ExpressionToResponsibleParty realizedBy :\n expression.getHasRealizers()) {\n // just want the CorporateBodyJpa ones\n // TODO a better way to screen ResponsiblePartyJpa subclasses?\n try {\n final CorporateBodyJpa corpPers =\n (CorporateBodyJpa) realizedBy.\n getTargetResponsibleParty();\n if (corpAuthIdent.equals(corpPers.getAuthIdent())) {\n matchCount++;\n }\n } catch (ClassCastException notCorpBody) {\n // not a CorporateBodyJpa\n }\n }\n }\n }\n }\n\n return matchCount;\n }",
"public List<AuthorPaper> getAuthorPapers(int authorId) throws SQLException;",
"int countSelective(MemberAdvisoryComment record);",
"public static void setAuthFreq(Map<String, AuthorMod> models)\n\t{\n\t\tfor (AuthorMod curAuth: models.values()) \n\t\t{\n\t\t\tfor(String uGram: curAuth.ug.getAll()) \n\t\t\t{\n\t\t\t\tint ucount = curAuth.ug.getCount(uGram);\n/*>>>>\t \t\tif (ucount<2) {curAuth.unks++;\t\t\t\t*** unkown word handling\n \t\t\t\tif (curAuth.ug.contains(\"<unk>\")) \n\t\t\t\t\t{ curAuth.ug.updateSeen(\"<unk>\");}\n\t\t\t\t\telse{ curAuth.ug.addNew(\"<unk>\");}\n*/\n\t\t\t\tdouble ufreq= ((double)ucount/curAuth.trainSize);\n\t\t\t\tcurAuth.ug.setFreq(uGram, ufreq);\n\t\t\t}\n\n\t\t//set bigram HT entries for frequency, \n\t\t//calculated by normalizing BG count by prefix count\n\t\t\tfor(Pair<String, String> bGram: curAuth.bg.getAll())\n\t\t\t{\n/*\t>>>\t\t\t\t-first, need a test to see if the unigram count for either word in bigram is less than 2. If yes, we will replace with <unk> tag\n\t\t\t\t\t\t\t- code to get counts for each word in bigram would look like curAuth.ug.getCount(bgram.getFirst()) \n\t\t\t\t\t-make new bg, with the count 1 word replaced with <Unk> tag. Use the parametered Pair<String, String> constructor with arguements (word, <unk>) depending on which is unk (or both)\n\t\t\t\t\t-do an updateSeen(bigram) or addNew(bigram) on curAuth.bg depending on if this new bigram has been seen (use curAuth.bg.contains(**this new bigram**)) \n\t\t\t\t\t-use data structure to remember what still needs updating (some type of set. we want something with no duplicates) \n\t\t\t\t\t-remove original bigram, put updated bigram in set\n\t\t\t\t\t-skip rest of loop for this bigram, and update the freq for the set after the loop */\n\t\t\t\t\t\n\t\t\t\t\tint bcount = curAuth.bg.getBgCount(bGram);\n\t\t\t\t\tint pcount = curAuth.ug.getCount(bGram.getFirst()); //sets p count to count of prefix from unigram table\n\t\t\t\t\tdouble bfreq = ((double)bcount)/pcount;\n\t\t\t\t\tcurAuth.bg.setFreq(bGram, bfreq);\n\t\t\t}\n\t\t\t//set frequncies for items we placed in set of bigrams containing the <unk> tag\n\t\t}\n\t}",
"public static void docWtgArray() {\n int docCount = 0;\n\n while(docCount<totaldocument) {\n List<Double> pass = new ArrayList();\n for(Entry<String,List<Double>> entry : wtgMap.entrySet()) {\n List<Double> docList = new ArrayList();\n docList = entry.getValue();\n double temp = docList.get(docCount);\n pass.add(temp);\n }\n\n double answer = CosineSimilarity(pass,query);\n if(answer >= alpha) {\n DocID.put(docCount,answer);\n }\n docCount++;\n }\n }",
"int countByExample(ComplainNoteDOExample example);",
"String getAuthorPublicationsQuery(String... varargs);",
"int countByExample(LawPersonExample example);",
"abstract public int numDocs();",
"@Test\n public void test_containsKeywords_returnsTrue() {\n ContainsKeywordsPredicate predicate = new ContainsKeywordsPredicate(Collections.singletonList(\"wallet\"));\n assertTrue(predicate.test(new ArticleBuilder().withName(\"Nike wallet\").build()));\n\n // One keyword in finder field\n predicate = new ContainsKeywordsPredicate(Collections.singletonList(\"Alice\"));\n assertTrue(predicate.test(new ArticleBuilder().withFinder(\"Alice Bob\").build()));\n\n // One keyword in description field\n predicate = new ContainsKeywordsPredicate(Collections.singletonList(\"12pm\"));\n assertTrue(predicate.test(new ArticleBuilder().withDescription(\"12pm Library\").build()));\n\n // One keyword in phone field\n predicate = new ContainsKeywordsPredicate(Collections.singletonList(\"88888888\"));\n assertTrue(predicate.test(new ArticleBuilder().withPhone(\"88888888\").build()));\n\n // One keyword in email field\n predicate = new ContainsKeywordsPredicate(Collections.singletonList(\"[email protected]\"));\n assertTrue(predicate.test(new ArticleBuilder().withEmail(\"[email protected]\").build()));\n\n // One keyword in tag field\n predicate = new ContainsKeywordsPredicate(Collections.singletonList(\"black\"));\n assertTrue(predicate.test(new ArticleBuilder().withTags(\"black\", \"blue\").build()));\n\n // Multiple keywords in name field\n predicate = new ContainsKeywordsPredicate(Arrays.asList(\"Alice\", \"Bob\"));\n assertTrue(predicate.test(new ArticleBuilder().withName(\"Alice Bob\").build()));\n\n // Multiple keywords in finder field\n predicate = new ContainsKeywordsPredicate(Arrays.asList(\"Alice\", \"Bob\"));\n assertTrue(predicate.test(new ArticleBuilder().withFinder(\"Alice Bob\").build()));\n\n // Multiple keywords in description field\n predicate = new ContainsKeywordsPredicate(Arrays.asList(\"12pm\", \"Bob\"));\n assertTrue(predicate.test(new ArticleBuilder().withDescription(\"12pm Bob\").build()));\n\n // Multiple keywords in tag field\n predicate = new ContainsKeywordsPredicate(Arrays.asList(\"black\", \"Blue\"));\n assertTrue(predicate.test(new ArticleBuilder().withTags(\"black\", \"Blue\").build()));\n\n // Multiple keywords in different fields\n predicate = new ContainsKeywordsPredicate(Arrays.asList(\"waLLet\", \"bOB\"));\n assertTrue(predicate.test(new ArticleBuilder().withName(\"wallet\").withFinder(\"Bob\").build()));\n predicate = new ContainsKeywordsPredicate(Arrays.asList(\"waLLet\", \"bOB\", \"raining\"));\n assertTrue(predicate.test(new ArticleBuilder().withName(\"wallet\").withFinder(\"Bob\")\n .withDescription(\"Raining heavily\").build()));\n predicate = new ContainsKeywordsPredicate(Arrays.asList(\"[email protected]\", \"bOB\", \"blue\"));\n assertTrue(predicate.test(new ArticleBuilder().withEmail(\"[email protected]\")\n .withTags(\"blue\", \"sticker\").withFinder(\"Bob\").build()));\n predicate = new ContainsKeywordsPredicate(Arrays.asList(\"66666666\", \"blue\"));\n assertTrue(predicate.test(new ArticleBuilder().withPhone(\"66666666\")\n .withTags(\"blue\", \"sticker\").withDescription(\"blue wallet\").build()));\n }",
"private void writeAuthEdges(PrintWriter authEdgesWriter) {\n\t\tint numNonZero;\n\t\tint matIndex;\n\t\tboolean found;\n\t\tAuthor tempAuthor1;\n\t\tAuthor tempAuthor2;\n\t\tAuthorGroup tempAuthorGroup;\n\t\tIterator iterator;\n\t\tIterator iterator1;\n\t\tIterator iterator2;\n\t\tint[] collaborationRow;\n\t\tint[] collaborationCol;\n\t\tint[] collaborationVal;\n\n\t\tfinal int MAX_NNZ = 1000000;\n\n\t\tcollaborationRow = new int[MAX_NNZ];\n\t\tcollaborationCol = new int[MAX_NNZ];\n\t\tcollaborationVal = new int[MAX_NNZ];\n\n\t\tnumNonZero = 0;\n\t\titerator = publications.getIterator();\n\n\t\twhile (iterator.hasNext()) {\n\t\t\ttempAuthorGroup =\n\t\t\t\t((DefaultPublication)iterator.next()).getAuthors();\n\t\t\titerator1 = tempAuthorGroup.getIterator();\n\n\t\t\twhile (iterator1.hasNext()) {\n\t\t\t\ttempAuthor1 = ((DefaultAuthor)iterator1.next());\n\t\t\t\titerator2 = tempAuthorGroup.getIterator();\n\n\t\t\t\twhile (iterator2.hasNext()) {\n\t\t\t\t\ttempAuthor2 = ((DefaultAuthor)iterator2.next());\n\n\t\t\t\t\tif (tempAuthor1.getId() < tempAuthor2.getId()) {\n\t\t\t\t\t\t// Search Sparse Matrix\n\t\t\t\t\t\tfor (matIndex = 0, found = false;\n\t\t\t\t\t\t\t ((matIndex < numNonZero) && (!found));\n\t\t\t\t\t\t\t matIndex++)\n\t\t\t\t\t\t\tif (((collaborationRow[matIndex] == tempAuthor1\n\t\t\t\t\t\t\t\t .getId())\n\t\t\t\t\t\t\t\t && (collaborationCol[matIndex] == tempAuthor2\n\t\t\t\t\t\t\t\t .getId()))\n\t\t\t\t\t\t\t\t || ((collaborationRow[matIndex] == tempAuthor2\n\t\t\t\t\t\t\t\t .getId())\n\t\t\t\t\t\t\t\t && (collaborationCol[matIndex] == tempAuthor1\n\t\t\t\t\t\t\t\t .getId()))) {\n\t\t\t\t\t\t\t\tcollaborationVal[matIndex]++;\n\t\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!found) {\n\t\t\t\t\t\t\tcollaborationRow[numNonZero] = tempAuthor1.getId();\n\t\t\t\t\t\t\tcollaborationCol[numNonZero] = tempAuthor2.getId();\n\t\t\t\t\t\t\tcollaborationVal[numNonZero] = 1;\n\t\t\t\t\t\t\tnumNonZero++;\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\tfor (matIndex = 0; matIndex < numNonZero; matIndex++)\n\t\t\tauthEdgesWriter.println(\" \"\n\t\t\t + (authorMap[collaborationRow[matIndex]] + authorOffset + 1)\n\t\t\t + \" \"\n\t\t\t + (authorMap[collaborationCol[matIndex]] + authorOffset + 1)\n\t\t\t + \" \" + collaborationVal[matIndex] + \" c Violet \");\n\t}",
"public long getUniqueAuthorsInCollection()\n\tthrows DataAccessException;",
"public void build(DatabaseConsumer s) {\n // define an Iterator over the collection of documents\n Iterator<Integer> e = s.getDocumentList();\n\n // temporary variables\n HashMap currentFL;\n DocConsumer current;\n Iterator f;\n String word;\n\n // for performance stats\n long totalKeywords = 0;\n int documents = 0;\n\n // BUILD THE INDEX\n\n // while there are more documents\n while (e.hasNext()) {\n // load the unique identifier\n int docid = e.next();\n\n // load doc stats\n current = s.getDocumentStatistics(docid);\n\n // decide how to pull out the terms for this document\n\n {\n\t\t\t\t/*if (BuildSettings.useProbCutoff)\n\t\t\t\t\tcurrentFL = current\n\t\t\t\t\t\t\t.mostOccurring(BuildSettings.probabilityCutoff);\n\t\t\t\telse*/\n currentFL = current\n .destructiveMostOccurring(mostSignificantTerms);\n }\n\n // get an Iterator over the terms\n f = currentFL.keySet().iterator();\n\n // while there are more terms\n while (f.hasNext()) {\n word = (String) f.next();\n\n // count the occurrance of this word in the internal data\n // structure\n register(docid, word, ((int[]) currentFL.get(word))[0]);\n totalKeywords++;\n }\n documents++;\n }\n\n // print statistics\n // if (BuildSettings.printAverageKeywords)\n {\n System.out.println(\"Average number of keywords: \"\n + (totalKeywords / (double) documents));\n }\n }",
"@Override\n\tpublic List<ClusteredMention> runCoreference(Document doc) {\n\t\t//(variables)\n\t\t//Put all in one hash, then build at the end....\n\t\tMap<Mention,Mention> corefs = new HashMap<Mention,Mention>();\n\t\t//if mention isnt in corefs, add it as a singleton cluster\n\t\t//Otherwise markcoref, and add to clusters\n\t\t\n\t\tMap<String,Mention> stringMatches = new HashMap<String,Mention>();\n\t\t//Map of string to mention...\n\t\t\n\t\t//Map<Mention,Entity> pronounClusters = new HashMap<Mention,Entity>();\n\t\tboolean clustered;\n\t\t//Evaluate all non pronoun mentions\n\t\tfor(Mention m : doc.getMentions()){\n\t\t\tclustered = false;\n\t\t\t//(...get its text)\n\t\t\tString mentionString = m.gloss();\n\t\t\t//If its not a pronoun\n\t\t\tif (!checkPronoun(m.headWord(),m.headToken())) {\n\t\t\t\t//(...if we've seen this text before...)\n\t\t\t\tif(stringMatches.containsKey(mentionString)){\n\t\t\t\t\t//Mark coreferent\n\t\t\t\t\tcorefs.put(m,stringMatches.get(mentionString));\n\t\t\t\t\tclustered=true;\n\t\t\t\t} else {\n\t\t\t\t\t//try to find a head word match to m's head word\n\t\t\t\t\t//(for each previous mention...)\n\t\t\t\t\tfor (int i=doc.indexOfMention(m)-1; i>=0 && !clustered;i--) {\n\t\t\t\t\t\tMention h = doc.getMentions().get(i);\n\t\t\t\t\t\tString otherMention = h.gloss();\n\t\t\t\t\t\t//If head words are identical, or head words are coreferent\n\t\t\t\t\t\tif (m.headWord().equalsIgnoreCase(h.headWord()) || \n\t\t\t\t\t\t\t\t(coreferentHeads.containsKey(m.headWord()) && \n\t\t\t\t\t\t\t\t\t\tcoreferentHeads.get(m.headWord()).contains(h.headWord()))) {\n\t\t\t\t\t\t\t//Mark as coreferent\n\t\t\t\t\t\t\tstringMatches.put(mentionString, m);\n\t\t\t\t\t\t\tcorefs.put(m,stringMatches.get(otherMention));\n\t\t\t\t\t\t\tclustered=true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!clustered){\n\t\t\t\t\t//(...else create a new singleton cluster)\n\t\t\t\t\tstringMatches.put(mentionString, m);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(Mention m : doc.getMentions()){\n\t\t\t//If it is a pronoun of interest\n\t\t\tif (checkPronoun(m.headWord(),m.headToken())) {\n\t\t\t\tMention hco = hobbsCoreferent(m);\n\t\t\t\tif (hco!=null && !hco.equals(m)){\n\t\t\t\t\tString hcoString = hco.gloss();\n\t\t\t\t\t//System.out.printf(\"Found coreference %s\\n\", hcoString);\n\t\t\t\t\tif (stringMatches.containsKey(hcoString)){\n\t\t\t\t\t\t//mentions.add(m.markCoreferent(stringClusters.get(hcoString)));\n\t\t\t\t\t\tcorefs.put(m,stringMatches.get(hcoString));\n\t\t\t\t\t} else{\n\t\t\t\t\t\t//Add as coreferent\n\t\t\t\t\t\tcorefs.put(m, hco);\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t}\n\t\t}\n\n\t\t//Build list of mentions\n\t\tList<ClusteredMention> cMentions = new ArrayList<ClusteredMention>();\n\t\tMap<Mention,ClusteredMention> clusters = new HashMap<Mention,ClusteredMention>();\n\t\tList<Mention> mentions = new ArrayList<Mention>(doc.getMentions());\n\t\twhile (!mentions.isEmpty()){\n\t\t\tMention m = mentions.get(0);\n\t\t\tif (corefs.containsKey(m) && corefs.get(m)!=null){\n\t\t\t\tMention h = corefs.get(m);\n\t\t\t\tif(!clusters.containsKey(h)) {\n\t\t\t\t\tint hIndex = mentions.indexOf(h);\n\t\t\t\t\tmentions.set(0, h);\n\t\t\t\t\tmentions.set(hIndex,m);\n\t\t\t\t\tif (hIndex > 0){\n\t\t\t\t\t\tClusteredMention newCluster = h.markSingleton();\n\t\t\t\t\t\tcMentions.add(newCluster);\n\t\t\t\t\t\tmentions.remove(hIndex);\n\t\t\t\t\t\tclusters.put(h,newCluster);\n\t\t\t\t\t\tcMentions.add(m.markCoreferent(clusters.get(h)));\n\t\t\t\t\t\tmentions.remove(0);\n\t\t\t\t\t\tclusters.put(m,clusters.get(h));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\tcMentions.add(m.markCoreferent(clusters.get(h)));\n\t\t\t\tmentions.remove(0);\n\t\t\t\tclusters.put(m,clusters.get(h));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tClusteredMention newCluster = m.markSingleton();\n\t\t\t\tcMentions.add(newCluster);\n\t\t\t\tmentions.remove(0);\n\t\t\t\tclusters.put(m,newCluster);\n\t\t\t}\n\t\t}\n\t\treturn cMentions;\n\t}",
"private void getWordCounts() {\n Map<String, List<String>> uniqueWordsInClass = new HashMap<>();\n List<String> uniqueWords = new ArrayList<>();\n\n for (ClassificationClass classificationClass : classificationClasses) {\n uniqueWordsInClass.put(classificationClass.getName(), new ArrayList<>());\n }\n\n for (Document document : documents) {\n String[] terms = document.getContent().split(\" \");\n\n for (String term : terms) {\n if (term.isEmpty()) {\n continue;\n }\n if (!uniqueWords.contains(term)) {\n uniqueWords.add(term);\n }\n\n for (ClassificationClass docClass : document.getClassificationClasses()) {\n if (!uniqueWordsInClass.get(docClass.getName()).contains(term)) {\n uniqueWordsInClass.get(docClass.getName()).add(term);\n }\n if (totalWordsInClass.containsKey(docClass.getName())) {\n this.totalWordsInClass.put(docClass.getName(), this.totalWordsInClass.get(docClass.getName()) + document.getFeatures().get(term));\n } else {\n this.totalWordsInClass.put(docClass.getName(), document.getFeatures().get(term));\n }\n }\n }\n }\n\n this.totalUniqueWords = uniqueWords.size();\n }",
"@Test\n public void testCombineRankHighPageRankWeight() {\n Iterator<Pair<Document, Double>> resultIterator = icsSearchEngine.searchQuery(Arrays.asList(\"anteater\"),\n 10, 1000000000.0);\n ImmutableList<Pair<Document, Double>> resultList = ImmutableList.copyOf(resultIterator);\n Assert.assertEquals(10, resultList.size());\n Assert.assertTrue(resultList.stream().limit(3).map(p -> p.getLeft())\n .anyMatch(doc -> doc.getText().contains(\"wics.ics.uci.edu\")));\n }",
"int countByExample(PmKeyDbObjExample example);",
"long countByExample(DiscussExample example);",
"long countByExample(CmGroupRelIndustryExample example);",
"@Override\n\tpublic List<DisplayCriterion> displayDoc(List<Paragraph> ps) {\n\t\tList<DisplayCriterion> displaycriteria = new ArrayList<DisplayCriterion>();\n\t\tint i = 1;\n\t\tfor (Paragraph p : ps) {\n\t\t\tboolean ehrstatus = false;\n\t\t\tDisplayCriterion d = new DisplayCriterion();\n\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\tfor (Sentence s : p.getSents()) {\n\t\t\t\tsb.append(s.getDisplay());\n\t\t\t\tfor (Term t : s.getTerms()) {\n\t\t\t\t\tif (Arrays.asList(GlobalSetting.primaryEntities).contains(t.getCategorey())) {\n\t\t\t\t\t\tehrstatus = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\td.setCriterion(sb.toString());\n\t\t\td.setId(i++);\n\t\t\td.setEhrstatus(ehrstatus);\n\t\t\tdisplaycriteria.add(d);\n\t\t}\n\t\treturn displaycriteria;\n\t}",
"public boolean checkIfAuthor(int paperId, HashMap<Integer,Integer> authorsOrder) throws DLException {\n\t\tboolean isAuthor=false;\n\t\tfor(int order: authorsOrder.keySet()) {\n\t\t\tif(currentUser.getUserId()==authorsOrder.get(order)) {\n\t\t\t\tisAuthor=true;\n\t\t\t}\n\t\t}\n\t\treturn isAuthor;\n\t}",
"public static void KeywordIndexBuildingDO(String pubfile,String userfile,\n\t\t\tString keywordfile,String[] W) throws Exception{\n\t\tbyte[] pub_byte;\n\t\tBswabePub pub;\n\t\tpub_byte = Common.suckFile(pubfile);\n\t\tpub = SerializeUtils.unserializeBswabePub(pub_byte);\n\t\t\n\t\t/* get UserTuple from userfile */\n\t\tbyte[] user_byte;\n\t\tUserTuple user;\n\t\tuser_byte = Common.suckFile(userfile);\n\t\tuser = SerializeUtils.unserializeUserTuple(pub, user_byte);\n\t\t\n\t\tPairing pairing = pub.pairing;\n\t\t\n\t\tint l = W.length;\n\t\tElement[] Ti = new Element[l];\n\t\tElement[] ri = new Element[l];\n\t\tfor(int i=0; i<Ti.length; i++){\n\t\t\tTi[i] = pairing.getG1().newElement();\n\t\t\tri[i] = pairing.getZr().newRandomElement();\n\t\t\tbyte[] w = W[i].getBytes();\n\t\t\tTi[i] = pairing.getG1().newElement().setFromHash(w, 0, w.length); \n\t\t\tTi[i].powZn(ri[i]);\n\t\t}\n\t\tElement[] Vi = ProxyServer.KeywordIndexBuildingPS(pubfile, user.Uid, Ti);\n\t\tElement[] ki = new Element[l];\n\t\tElement[] expo = new Element[l];\n\t\tfor(int i=0; i<l; i++){\n\t\t\texpo[i] = pairing.getZr().newElement();\n\t\t\texpo[i] = user.A_Uid.duplicate();\n\t\t\texpo[i].div(ri[i]);\n\t\t\tVi[i].powZn(expo[i]);\n\t\t\tbyte[] w = Vi[i].toBytes();\n\t\t\tki[i] = pairing.getGT().newElement();\n\t\t\tki[i] = pairing.getGT().newElement().setFromHash(w, 0, w.length); \n\t\t}\n\t\tKeywordIndex keyword = new KeywordIndex();\n\t\tkeyword.RandomNumber = new Element[l];\n\t\tkeyword.RandomNumberLength = l;\n\t\tkeyword.Riki = new byte[l][];\n\t\tfor(int i=0; i<l; i++){\n\t\t\tkeyword.RandomNumber[i] = pairing.getZr().newRandomElement();\n\t\t\tkeyword.Riki[i] = AESCoder.encrypt(ki[i].toBytes(), keyword.RandomNumber[i].toBytes());\n\t\t}\n\t\t\n\t\t/* store KeywordIndex into keywordfile */\n\t\tbyte[] keyword_byte;\n\t\tkeyword_byte = SerializeUtils.serializeKeywordIndex(pub, keyword);\n\t\tCommon.spitFile(keywordfile, keyword_byte);\n\t}",
"abstract public int docFreq(Term t) throws IOException;",
"private Criteria buildFindExtDocCriteria(int idCase, String cdExtDocSort, List<String> docTypeList,\r\n String txtExtDocLocation, Date dtScrSearchDateFrom, Date dtScrSearchDateTo,\r\n List<Integer> personIds, List<Integer> sealedPersonIds,String sortBy, String indICPCDocument) {\r\n Criteria criteria = getSession().createCriteria(ExtDocumentation.class, \"e\");\r\n // Do a left outer Join only when the Person ID's are passed.\r\n if (personIds != null && personIds.size() > 0) {\r\n criteria.createAlias(\"e.extDocPerLinks\", \"edpl\", Criteria.FULL_JOIN);\r\n criteria.add(Restrictions.in(\"edpl.personByIdPerson.idPerson\", personIds));\r\n }\r\n if (sealedPersonIds != null && sealedPersonIds.size() > 0) {\r\n if (personIds == null || personIds.size() == 0) {\r\n criteria.createAlias(\"e.extDocPerLinks\", \"edpl\", Criteria.FULL_JOIN);\r\n }\r\n criteria.add(Restrictions.or(Restrictions.isNull(\"edpl.personByIdPerson.idPerson\"),Restrictions.not(Restrictions.in(\"edpl.personByIdPerson.idPerson\", sealedPersonIds))));\r\n }\r\n\r\n ProjectionList projectionList = Projections.projectionList();\r\n projectionList.add(Projections.property(\"e.idExtDocumentation\"));\r\n projectionList.add(Projections.property(\"e.dtLastUpdate\"));\r\n projectionList.add(Projections.property(\"e.capsCase\"));\r\n projectionList.add(Projections.property(\"e.dtExtDocObtained\"));\r\n projectionList.add(Projections.property(\"e.txtExtDocDetails\"));\r\n projectionList.add(Projections.property(\"e.cdExtDocType\"));\r\n projectionList.add(Projections.property(\"e.txtExtDocLocation\"));\r\n projectionList.add(Projections.property(\"e.cdExtDocSort\"));\r\n projectionList.add(Projections.property(\"e.indExtDocSigned\"));\r\n projectionList.add(Projections.property(\"e.dtExtDocUploaded\"));\r\n projectionList.add(Projections.property(\"e.txtFileName\"));\r\n projectionList.add(Projections.property(\"e.txtFormatType\"));\r\n projectionList.add(Projections.property(\"e.cdDocClass\"));\r\n projectionList.add(Projections.property(\"e.dtExtDocAdded\"));\r\n projectionList.add(Projections.property(\"e.indNaChecked\"));\r\n projectionList.add(Projections.property(\"e.indICPCDoc\"));\r\n projectionList.add(Projections.property(\"e.ucmDId\"));\r\n\r\n criteria.setProjection(Projections.distinct(projectionList));\r\n\r\n criteria.add(Restrictions.eq(\"e.capsCase.idCase\", idCase));\r\n\r\n if (dtScrSearchDateFrom != null) {\r\n criteria.add(Restrictions.ge(\"e.dtExtDocObtained\", dtScrSearchDateFrom));\r\n }\r\n if (dtScrSearchDateTo != null && dtScrSearchDateFrom != null && dtScrSearchDateTo.equals(dtScrSearchDateFrom)) {\r\n gov.georgia.dhr.dfcs.sacwis.core.utility.Date idate = new gov.georgia.dhr.dfcs.sacwis.core.utility.Date();\r\n idate.setTime(dtScrSearchDateFrom);\r\n idate.addHours(23);\r\n idate.addMinutes(59);\r\n idate.addSeconds(59);\r\n dtScrSearchDateTo = idate.getTime();\r\n criteria.add(Restrictions.le(\"e.dtExtDocObtained\", dtScrSearchDateTo));\r\n } else if (dtScrSearchDateTo != null) {\r\n // R1 defect 952 fix to make the search to include the To date\r\n // criteria given\r\n gov.georgia.dhr.dfcs.sacwis.core.utility.Date tdate = new gov.georgia.dhr.dfcs.sacwis.core.utility.Date();\r\n tdate.setTime(dtScrSearchDateTo);\r\n tdate.addHours(23);\r\n tdate.addMinutes(59);\r\n tdate.addSeconds(59);\r\n dtScrSearchDateTo = tdate.getTime();\r\n criteria.add(Restrictions.le(\"e.dtExtDocObtained\", dtScrSearchDateTo));\r\n }\r\n\r\n if (docTypeList != null && docTypeList.size() > 0) {\r\n criteria.add(Restrictions.in(\"e.cdExtDocType\", docTypeList));\r\n }\r\n if (StringHelper.isValid(cdExtDocSort)) {\r\n criteria.add(Restrictions.eq(\"e.cdExtDocSort\", cdExtDocSort));\r\n }\r\n if (StringHelper.isValid(txtExtDocLocation)) {\r\n criteria.add(Restrictions.eq(\"e.txtExtDocLocation\", txtExtDocLocation));\r\n }\r\n //STGAP00017827: Filter for ICPC documents if corresponding checkbox is checked.\r\n if (StringHelper.isValid(indICPCDocument)\r\n \t\t&& \"Y\".equalsIgnoreCase(indICPCDocument)) {\r\n criteria.add(Restrictions.eq(\"e.indICPCDoc\", indICPCDocument));\r\n }\r\n\r\n if (SORT_BY_DOC_TYPE.equals(sortBy)){\r\n criteria.addOrder(Order.asc(\"e.cdExtDocType\"));\r\n }else if (SORT_BY_DATE_OBTAINED.equals(sortBy)){\r\n criteria.addOrder(Order.desc(\"e.dtExtDocObtained\"));\r\n } else if (SORT_BY_DOC_CLASS.equals(sortBy)){\r\n criteria.addOrder(Order.asc(\"e.cdDocClass\"));\r\n } else {\r\n criteria.addOrder(Order.asc(\"e.cdExtDocSort\"));\r\n }\r\n \r\n return criteria;\r\n }",
"int countByExample(TResearchTeachExample example);",
"long countByExample(PrefecturesMtExample example);",
"public static void explain(boolean[][] docThetaCoeff){\n \t\n System.out.println(\"\\n\\n Document--Topic Associations, Theta[k][d]\\n\\n\");\n \n \tint docLen = docThetaCoeff.length; \n \tint topicNum = docThetaCoeff[0].length;\n \t\n \tfor(int i = 0; i < docLen; i++){\n \t\tSystem.out.print(\"No [\" + i + \"] topic high coefficiency docs are : \");\n \t\tfor(int j = 0; j < topicNum; j++){\n \t\t\tSystem.out.print(docThetaCoeff[i][j] + \" \");\n \t\t}\n \t\tSystem.out.println();\n \t}\n \t\n \tSystem.out.println();\n }",
"int countByExample(Lbm83ChohyokanriPkeyExample example);",
"public Iterable<DBObject> topLinker(DBCollection collection) {\n Iterable<DBObject> ai = collection.aggregate(Arrays.asList(\n new BasicDBObject(\"$match\", new BasicDBObject(\"text\", new BasicDBObject(\"$regex\", rege))),\n new BasicDBObject(\"$group\", new BasicDBObject(\"_id\", \"$user\").append(\"count\", new BasicDBObject(\"$sum\", 1))),\n new BasicDBObject(\"$sort\", new BasicDBObject(\"count\", -1)),\n new BasicDBObject(\"$limit\", 10)\n )).results();\n return ai;\n }",
"static double calculateJaccardSimilarity(Set<String> queryTermIdSet, Set<String> documentTermIdSet) {\n if (queryTermIdSet.isEmpty() || documentTermIdSet.isEmpty()) {\n return 0;\n }\n\n // Intersection between QUERY termId set and DOCUMENT termId set\n Set<String> intersect = new HashSet<>(queryTermIdSet);\n intersect.retainAll(documentTermIdSet);\n\n // Union of DOCUMENT termId set and QUERY term Id set\n Set<String> union = new HashSet<>(documentTermIdSet);\n union.addAll(queryTermIdSet);\n\n // System.out.println();\n // System.out.println(\"Query:\" + queryTermIdSet);\n // System.out.println(\"Doc:\" + documentTermIdSet);\n // System.out.println(\"Intersect: \" + intersect.size() + \"\\tUnion: \" + union.size());\n return (double) intersect.size() / (double) union.size();\n }",
"private boolean isReviewerAnAuthor(Manuscript theManuscript) {\r\n\t\tboolean isAuthor = false;\r\n\t\tTreeMap<UUID, Account> acctList = new AccountDatabase().deserializeAccountList();\r\n\t\tArrayList<Account> validAccountList = new ArrayList<Account>();\r\n\t\t\r\n\t\tList<UUID> authorlist = theManuscript.getAuthors();\r\n\t\t\r\n\t\tfor(Account anAcct : acctList.values()) {\r\n\t\t\tif (anAcct.getMyReviewer() != null) {\r\n\t\t\t\tif(anAcct.getMyReviewer().getMyID().equals(this.getMyID())) {\r\n\t\t\t\t\tvalidAccountList.add(anAcct);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor(Account anAcct : validAccountList) {\r\n\t\t\tif(theManuscript.doesAuthorBelongToManuscript(anAcct.getMyAuthor())) {\r\n\t\t\t\tisAuthor = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\treturn isAuthor;\r\n\t\t\r\n\t}",
"long countByExample(ArticleDoExample example);",
"public Iterable<DBObject> mostMentioned(DBCollection collection) {\n Iterable<DBObject> ai = collection.aggregate(Arrays.asList(\n new BasicDBObject(\"$match\", new BasicDBObject(\"text\", new BasicDBObject(\"$regex\", rege))),\n new BasicDBObject(\"$project\", new BasicDBObject(\"user\", \"$user\").append(\"texts\", new BasicDBObject(\"$split\", Arrays.asList(\"$text\", \" \")))),\n new BasicDBObject(\"$unwind\", \"$texts\"),\n new BasicDBObject(\"$match\", new BasicDBObject(\"texts\", new BasicDBObject(\"$regex\", rege))),\n new BasicDBObject(\"$group\", new BasicDBObject(\"_id\", \"$texts\").append(\"count\", new BasicDBObject(\"$sum\", 1))),\n new BasicDBObject(\"$sort\", new BasicDBObject(\"count\", -1)),\n new BasicDBObject(\"$limit\", 5)\n )).results();\n return ai;\n }",
"public int numberAuthors() {\n return authors.size();\n }",
"public /*TreeMap<String, Float>*/void getTopnTermsOverlapWithQuery() throws IOException, ParseException{\n\t\tString outputfile = \"./output/score/test3.txt\";\n\n\t\tFileOutputStream out = new FileOutputStream(outputfile);\n\t\tPrintStream ps = new PrintStream(out);\n\t\t/*-------------------------------------------------------------------------------*/\n\n\t\tTreeMap<String,Float> termsscoressorted = null;\n\t\tCollectionReader reader = new CollectionReader(indexDir); \n\t\tIndexReader ir = reader.getIndexReader();\t\t\n\n\t\tTopicsInMemory topics = new TopicsInMemory(\"data/CLEF-IP-2010/PAC_test/topics/PAC_topics-test2.xml\"/*omit-PAC-1094.xml\"*/);\n\t\tfor(Map.Entry<String, PatentDocument> topic : topics.getTopics().entrySet()){\n\t\t\tString qUcid = topic.getValue().getUcid();\n\t\t\tString queryid = topic.getKey();\n\t\t\tString queryName = topic.getKey() + \"_\" + topic.getValue().getUcid();\n\t\t\tString queryfile = topic.getKey() + \"_\" + topic.getValue().getUcid() + \".xml\";\n\n\t\t\t/*System.out.println(\"=========================================\");\n\t\t\tSystem.out.println(queryName);\n\t\t\tSystem.out.println(\"=========================================\");*/\n\t\t\t/*int docid = reader.getDocId(\"UN-EP-0663270\", PatentDocument.FileName);\n\t\t\tir.getTermVector(docid, field) getTermVectors(b);*/\n\n\t\t\tEvaluateResults er = new EvaluateResults();\n\t\t\tArrayList<String> tps = er.evaluatePatents(queryid, \"TP\");\n\t\t\tArrayList<String> fps = er.evaluatePatents(queryid, \"FP\");\n\t\t\tHashMap<String, Float> /*TFreqs*/ termsscores = new HashMap<>();\n\n\n\t\t\t/*--------------------------------- Query Words -------------------------------*/\n\t\t\t//\t\t\tHashMap<String, Integer> query_termsfreqspair = reader.gettermfreqpair(qUcid, PatentDocument.Description);\n\t\t\tHashSet<String> query_terms = reader.getDocTerms(qUcid, PatentDocument.Description);\n\t\t\t//\t\t\tSystem.out.println(query_termsfreqspair.size() +\"\\t\"+ query_termsfreqspair);\n//\t\t\tSystem.out.println(query_terms.size() + \"\\t\" + query_terms);\n\t\t\t/*-----------------------------------------------------------------------------*/\t\t\t\n\n\n\t\t\t//\t\t\tSystem.out.println(\"-----TPs----\");\n\t\t\tfor (String tp : tps) {\n\t\t\t\t/*System.out.println(\"---------\");\n\t\t\t\tSystem.out.println(tp);*/\n\t\t\t\tHashMap<String, Integer> termsfreqsTP = reader.gettermfreqpairAllsecs(\"UN-\" + tp);\n\n\t\t\t\tfor(Entry<String, Integer> tfTP:termsfreqsTP.entrySet()){\n\t\t\t\t\tif(termsscores.containsKey(tfTP.getKey())){\n\t\t\t\t\t\ttermsscores.put(tfTP.getKey(), termsscores.get(tfTP.getKey()) + (float)tfTP.getValue()/tps.size());\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//\t\t\t\t\t\tfloat test = (float)t.getValue()/tps.size();\n\t\t\t\t\t\t//\t\t\t\t\t\tSystem.out.println(test);\n\t\t\t\t\t\ttermsscores.put(tfTP.getKey(), (float)tfTP.getValue()/tps.size());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//\t\t\t\tSystem.out.println(termsscores.size() + \" \" + termsscores);\t\t\t\t\t\n\t\t\t}\n\n\t\t\t/*System.out.println();\n\t\t\tSystem.out.println(\"-----FNs----\");*/\n\t\t\tfor (String fp : fps) {\n\t\t\t\t/*System.out.println(\"---------\");\n\t\t\t\tSystem.out.println(fp);*/\n\t\t\t\tHashMap<String, Integer> termsfreqsFP = reader.gettermfreqpairAllsecs(\"UN-\" + fp);\n\n\t\t\t\tfor(Entry<String, Integer> t:termsfreqsFP.entrySet()){\n\t\t\t\t\tif(termsscores.containsKey(t.getKey())){\n\t\t\t\t\t\ttermsscores.put(t.getKey(), termsscores.get(t.getKey()) - (float)t.getValue()/fps.size());\n\t\t\t\t\t}else{\t\t\t\t\t\t\n\t\t\t\t\t\ttermsscores.put(t.getKey(), -(float)t.getValue()/fps.size());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//\t\t\t\tSystem.out.println(TFreqs.size() + \" \" + TFreqs);\n\t\t\t}\n\t\t\t//\t\t\tSystem.out.println(termsscores.size() + \" \" + termsscores);\n\t\t\tValueComparator bvc = new ValueComparator(termsscores);\n\t\t\ttermsscoressorted = new TreeMap<String,Float>(bvc);\t\t\t\n\t\t\ttermsscoressorted.putAll(termsscores);\n\t\t\tSystem.out.println(queryid + \"\\t\"+ termsscoressorted.size() + \"\\t\" + termsscoressorted/*.keySet()*/);\n\t\t\tint overlap = 0;\n\t\t\tint i = 0;\n\t\t\tfor(Entry<String, Float> scoresorted:termsscoressorted.entrySet()){\n\t\t\t\ti++;\n\t\t\t\tif(i<=100){\n\t\t\t\t\tif(query_terms.contains(scoresorted.getKey())){\n\t\t\t\t\t\toverlap++;\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t\tSystem.out.println(queryName + \"\\t\"+overlap);\n//\t\t\tps.println(queryName + \"\\t\"+overlap);\n\t\t}\n\t}",
"int countByExample(PcQualificationInfoExample example);",
"int countByExample(TSubjectInfoExample example);",
"static int size_of_lda(String passed){\n\t\treturn 3;\n\t}",
"int countByExample(ReEducationExample example);",
"private void handleDocument(String name,InputStream ins)\n{\n Map<String,Integer> words = new HashMap<>();\n Map<String,Integer> kgrams = new HashMap<>();\n \n try {\n String cnts = IvyFile.loadFile(ins);\n CompilationUnit cu = JcompAst.parseSourceFile(cnts);\n words = handleDocumentText(cnts);\n kgrams = buildKgramCounts(cnts,cu);\n }\n catch (IOException e) {\n IvyLog.logI(\"Problem reading document file \" + name + \": \" + e);\n }\n \n if (words.size() > 0) {\n ++total_documents;\n for (String s : words.keySet()) {\n Integer v = document_counts.get(s);\n if (v == null) document_counts.put(s,1);\n else document_counts.put(s,v+1);\n }\n }\n if (kgrams.size() > 0) {\n ++total_kdocuments;\n for (String s : kgrams.keySet()) {\n Integer v = kgram_counts.get(s);\n if (v == null) kgram_counts.put(s,1);\n else kgram_counts.put(s,v+1);\n }\n }\n}",
"int countByExample(ProjGroupExample example);",
"long countByExample(DictDoseUnitExample example);",
"int countByExample(RepStuLearningExample example);",
"public static final String getAuthKWRelTableCreationSQL(String shortname) {\r\n\t\tString crTopicTableSQL = \"CREATE TABLE IF NOT EXISTS dblp_authkw_\" +shortname +\r\n\t\t\"(author varchar(70) NOT NULL, \" +\r\n\t\t\" keyword varchar(255) NOT NULL, \" + \r\n\t\t\" PRIMARY KEY (keyword,author)) \";\r\n\t\treturn crTopicTableSQL;\r\n\t}",
"int countByExample(Assist_tableExample example);",
"private String idsConstrain(ArrayList <String> uids){\n String query = \"\";\n if(uids.size() > 0){\n query = \" ( \" \n // If uids used are PMC ids, remove PMC part - not recognized by Entrez utilites! \n + uids.get(0).replace(\"PMC\", \"\") \n + \"[UID] \";\n\n for(int i = 1; i < uids.size() ; i++){\n query += \"OR \" \n // If uids used are PMC ids, remove PMC part - not recognized by Entrez utilites! \n + uids.get(i).replace(\"PMC\", \"\") \n + \"[UID] \";\n }\n query += \") \"; \n }\n return query; \n }",
"int countByExample(UserTopicExample example);",
"int countByExample(UserTopicExample example);",
"long countByExample(DeptExample example);",
"public double perplexity(Vector document, Vector docTopics) {\n double perplexity = 0;\n double norm = docTopics.norm(1) + (docTopics.size() * alpha);\n Iterator<Vector.Element> docElementIter = document.iterateNonZero();\n while (docElementIter.hasNext()) {\n Vector.Element e = docElementIter.next();\n int term = e.index();\n double prob = 0;\n for (int x = 0; x < numTopics; x++) {\n double d = (docTopics.get(x) + alpha) / norm;\n double p = d * (topicTermCounts.viewRow(x).get(term) + eta)\n / (topicSums.get(x) + eta * numTerms);\n prob += p;\n }\n perplexity += e.get() * Math.log(prob);\n }\n return -perplexity;\n }",
"public boolean docIteratorHasMatch (RetrievalModel r) {\n // For Indri model, calc #WAND scores for documents that have at least 1 query term\n if ( r instanceof RetrievalModelIndri )\n return this.docIteratorHasMatchMin(r);\n else\n throw new IllegalArgumentException\n (r.getClass().getName() + \" doesn't support the WAND operator.\");\n }",
"@Test\n public void test_employmentTypeContainsKeywords_returnsTrue() {\n EmploymentTypeContainsKeywordsPredicate predicate =\n new EmploymentTypeContainsKeywordsPredicate(Collections.singletonList(\"F\"));\n assertTrue(predicate.test(new PersonBuilder().withEmploymentType(\"Full time\").build()));\n\n // One keyword\n predicate = new EmploymentTypeContainsKeywordsPredicate(Collections.singletonList(\"Internship\"));\n assertTrue(predicate.test(new PersonBuilder().withEmploymentType(\"Internship\").build()));\n\n // First word of a two word category\n predicate = new EmploymentTypeContainsKeywordsPredicate(Collections.singletonList(\"Part\"));\n assertTrue(predicate.test(new PersonBuilder().withEmploymentType(\"Part time\").build()));\n\n // Both parts of a two word category\n predicate = new EmploymentTypeContainsKeywordsPredicate(Collections.singletonList(\"Part time\"));\n assertTrue(predicate.test(new PersonBuilder().withEmploymentType(\"Part time\").build()));\n\n // Mixed-case keywords\n predicate = new EmploymentTypeContainsKeywordsPredicate(Collections.singletonList(\"iNteRnShiP\"));\n assertTrue(predicate.test(new PersonBuilder().withEmploymentType(\"Internship\").build()));\n }",
"int countByExample(PublicDoctorNoticeExample example);",
"public int countByTodoDocumentLibrary(String todoDocumentLibrary);",
"long countByExample(TLinkmanExample example);",
"long countByExample(Question27Example example);",
"long countByExample(LoginRecordDOExample example);",
"int countByExample(WstatTeachingClasshourTeacherExample example);",
"@Override\n\tpublic int countPapersByKeys(int uid, String key) {\n\t\treturn paperRepository.countPapersByKeys(uid,key);\n\t}",
"String findAllPublicationsFromAuthor(final Author author) {\n\n List<Publication> publications = Stream.concat(mBooks.stream(), mMagazines.stream()).collect(Collectors.toList());\n Set<Publication> foundPublications = publications.stream()\n .filter(publication -> publication.getAuthors().contains(author.getEmail()))\n .collect(Collectors.toSet());\n\n PrintModelVisitor printVisitor = new PrintModelVisitor();\n visitPublications(foundPublications, printVisitor);\n return printVisitor.getPublications();\n }",
"int countByExample(GrpTagExample example);",
"Set<AttributeDef> getAttributeDefsWhereSubjectDoesHavePrivilege(GrouperSession grouperSession,\r\n String stemId, Scope scope, Subject subject, Privilege privilege, boolean considerAllSubject, \r\n String sqlLikeString);",
"long countByExample(GroupRightDAOExample example);",
"int countByExample(CptDataStoreExample example);",
"PdfKeywordIterator() {\n\t\t\ttry {\n\t\t\t\tmReadStmt = getConnection()\n\t\t\t\t\t\t.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);\n\t\t\t\tmReadSet = mReadStmt.executeQuery(\"SELECT * FROM PdfKeyword\");\n\t\t\t\tmReadSet.beforeFirst();\n\n\t\t\t\t// wie viele columns\n\t\t\t\tResultSetMetaData rsmd = mReadSet.getMetaData();\n\t\t\t\tmAnzahlCols = rsmd.getColumnCount();\n\n\t\t\t} catch (SQLException ex) {\n\t\t\t}\n\t\t}",
"long countByExample(IntegralBookExample example);",
"public boolean setPaperAuthors(int paperId, HashMap<Integer,Integer> authorIds) throws DLException {\n\t\tboolean isSet=false;\n\t\ttry {\t\t\t\n\t\t\tif(currentUser.getIsAdmin()==1 || checkIfAuthor(paperId,authorIds)) {\t\t \n\t\t\t\tboolean isConnected = dbObj.connect();\n\t\t\t\tif(isConnected) {\n\t\t\t\t\tArrayList<String> args = new ArrayList<String>();\n\t\t\t\t\tString sqlStr = \"INSERT INTO PaperAuthors(paperId, userId, displayOrder) VALUES\";\n\t\t\t\t\tint count=0;\n\t\t\t\t\tfor(int key: authorIds.keySet()) {\t\t\t\t\t\t\n\t\t\t\t\t\tif(count==0) {\n\t\t\t\t\t\t\tsqlStr+=\"(?,?,?)\";\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tsqlStr+=\",(?,?,?) \";\n\t\t\t\t\t\t}\n\t\t\t\t\t args.add(String.valueOf(paperId));\n\t\t\t\t\t args.add(String.valueOf(authorIds.get(key)));\n\t\t\t\t\t args.add(String.valueOf(key));\n\t\t\t\t\t count++;\n\t\t\t\t\t}\n\t\t\t\t\tsqlStr+=\"ON DUPLICATE KEY UPDATE displayOrder=VALUES(displayOrder)\";\n\t\t\t\t\tint rc = dbObj.setData(sqlStr, args);\n\t\t\t\t\tif(rc>0) {\n\t\t\t\t\t\tisSet=true;\n\t\t\t\t\t}\n\t\t\t\t\tdbObj.close();\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t}\n\t\tcatch(Exception ex) {\n\t \t\tthrow new DLException(ex, ex.getMessage());\n\t }\t\t\t\t \t \n\t\treturn isSet;\n\t}",
"int getCurrentTermQualifiedActivityCount(long studentId, long universityId);",
"String getDocumentsAuthors(String repository, String graph);",
"@SuppressWarnings(\"unchecked\")\r\npublic static void ruleResolvePronouns(AnnotationSet basenp, Document doc)\r\n{\n Annotation[] basenpArray = basenp.toArray();\r\n\r\n // Initialize coreference clusters\r\n int maxID = basenpArray.length;\r\n\r\n // Create an array of pointers\r\n // clust = new UnionFind(maxID);\r\n fvm = new RuleResolvers.FeatureVectorMap();\r\n ptrs = new int[maxID];\r\n clusters = new HashSet[maxID];\r\n for (int i = 0; i < clusters.length; i++) {\r\n ptrs[i] = i;\r\n HashSet<Annotation> cluster = new HashSet<Annotation>();\r\n cluster.add(basenpArray[i]);\r\n clusters[i] = cluster;\r\n }\r\n Annotation zero = new Annotation(-1, -1, -1, \"zero\");\r\n\r\n for (int i = 1; i < basenpArray.length; i++) {\r\n Annotation np2 = basenpArray[i];\r\n if (FeatureUtils.isPronoun(np2, doc)) {\r\n Annotation ant = ruleResolvePronoun(basenpArray, i, doc);\r\n if (ant != null) {\r\n np2.setProperty(Property.PRO_ANTES, ant);\r\n }\r\n else {\r\n np2.setProperty(Property.PRO_ANTES, zero);\r\n }\r\n }\r\n }\r\n}",
"int countByExample(PdfCodeTemporaryExample example);",
"public static boolean isReviewer(Connection conn,String campus,String alpha,String num,String user) throws Exception {\n\n\t\t//Logger logger = Logger.getLogger(\"test\");\n\n\t\tboolean reviewer = false;\n\t\tboolean debug = false;\n\n\t\tint counter = 0;\n\n\t\ttry {\n\n\t\t\tdebug = DebugDB.getDebug(conn,\"FndDB\");\n\n\t\t\tif (debug){\n\t\t\t\tlogger.info(\"--------->\");\n\t\t\t\tlogger.info(\"isReviewer\");\n\t\t\t\tlogger.info(\"--------->\");\n\t\t\t}\n\n\t\t\tString table = \"tblReviewers tbr INNER JOIN tblfnd tc ON \"\n\t\t\t\t\t+ \"(tbr.campus = tc.campus) AND \"\n\t\t\t\t\t+ \"(tbr.coursenum = tc.CourseNum) AND \"\n\t\t\t\t\t+ \"(tbr.coursealpha = tc.CourseAlpha) \";\n\n\t\t\tString where = \"GROUP BY tbr.coursealpha,tbr.coursenum,tc.type,tbr.userid,tc.reviewdate \"\n\t\t\t\t\t+ \"HAVING (tbr.coursealpha='\"\n\t\t\t\t\t+ alpha\n\t\t\t\t\t+ \"' AND \"\n\t\t\t\t\t+ \"tbr.coursenum='\"\n\t\t\t\t\t+ num\n\t\t\t\t\t+ \"' AND \"\n\t\t\t\t\t+ \"tc.type='PRE' AND \"\n\t\t\t\t\t+ \"tbr.userid='\"\n\t\t\t\t\t+ user\n\t\t\t\t\t+ \"' AND \"\n\t\t\t\t\t+ \"tc.reviewdate >= \" + DateUtility.getSystemDateSQL(\"yyyy-MM-dd\") + \")\";\n\n\t\t\tcounter = (int) AseUtil.countRecords(conn,table,where);\n\n\t\t\tif (debug) logger.info(\"counter: \" + counter);\n\n\t\t\tif (counter > 0)\n\t\t\t\treviewer = true;\n\n\t\t\tif (debug){\n\t\t\t\tlogger.info(\"<---------\");\n\t\t\t\tlogger.info(\"isReviewer\");\n\t\t\t\tlogger.info(\"<---------\");\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\tlogger.fatal(\"CourseDB: isReviewer - \" + e.toString());\n\t\t}\n\n\t\treturn reviewer;\n\t}",
"long countByExample(WbUserExample example);",
"public static void main(String[] args) throws IOException{\n\t\tint termIndex = 1;\n\t\t\n\t\t// startOffset holds the start offset for each term in\n\t\t// the corpus.\n\t\tlong startOffset = 0;\n\t\t\t\n\t\t// unique_terms is true if there are atleast one more\n\t\t// unique term in corpus.\n\t\tboolean unique_terms = true;\n\t\t\n\t\t\n\t\t//load the stopwords from the HDD\n\t\tString stopwords = getStopWords();\n\t\t\n\t\t// allTokenHash contains all the terms and its termid\n\t\tHashMap<String, Integer> allTermHash = new HashMap<String, Integer>();\n\t\t\n\t\t// catalogHash contains the term and its position in\n\t\t// the inverted list present in the HDD.\n\t\tHashMap<Integer, Multimap> catalogHash = new HashMap<Integer, Multimap>();\n\t\t\n\t\t// finalCatalogHash contains the catalogHash for the invertedIndexHash\n\t\t// present in the HDD.\n\t\tHashMap<Integer, String> finalCatalogHash = new HashMap<Integer, String>();\n\t\t\n\t\t// token1000Hash contains the term and Dblocks for the first 1000\n\t\tHashMap<Integer, Multimap> token1000DocHash = new HashMap<Integer, Multimap>();\n\t\t\n\t\t// documentHash contains the doclength of all the documents in the corpus\n\t\tHashMap<String, String> documentHash = new HashMap<String, String>();\t\n\t\t\n\t\t// id holds the document id corresponding to the docNumber.\n\t\tint id = 1;\n\t\t\n\t\t// until all unique terms are exhausted\n\t\t// pass through the documents and index the terms.\n\t\t//while(unique_terms){\n\t\t\t\n\t\t\tFile folder = new File(\"C:/Naveen/CCS/IR/AP89_DATA/AP_DATA/ap89_collection\");\n\t\t\t//File folder = new File(\"C:/Users/Naveen/Desktop/TestFolder\");\n\t\t\tFile[] listOfFiles = folder.listFiles();\n\t\t\t\n\t\t\t//for each file in the folder \n\t\t\tfor (File file : listOfFiles) {\n\t\t\t if (file.isFile()) {\n\t\t\t \t\n\t\t\t \tString str = file.getPath().replace(\"\\\\\",\"//\");\n\t\t\t \t\n\t\t\t \t\n\t\t\t\t\t//Document doc = new Document();\n\t\t\t //System.out.println(\"\"+str);\n\t\t\t\t\t//variables to keep parse document.\n\t\t\t\t\tint docCount = 0;\n\t\t\t\t\tint docNumber = 0;\n\t\t\t\t\tint endDoc = 0;\n\t\t\t\t\tint textCount = 0;\n\t\t\t\t\tint noText = 0;\n\t\t\t\t\tPath path = Paths.get(str);\n\t\t\t\t\t\n\t\t\t\t\t//Document id and text\n\t\t\t\t\tString docID = null;\n\t\t\t\t\tString docTEXT = null;\n\t\t\t\t\t\n\t\t\t\t\t//Stringbuffer to hold the text of each document\n\t\t\t\t\tStringBuffer text = new StringBuffer();\n\t\t\t\t\t\n\t\t\t\t\tScanner scanner = new Scanner(path);\n\t\t\t\t\twhile(scanner.hasNext()){\n\t\t\t\t\t\tString line = scanner.nextLine();\n\t\t\t\t\t\tif(line.contains(\"<DOC>\")){\n\t\t\t\t\t\t\t++docCount;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(line.contains(\"</DOC>\")){\n\t\t\t\t\t\t\t++endDoc;\n\t\t\t\t\t\t\tdocTEXT = text.toString();\n\t\t\t\t\t\t\t//docTEXT = docTEXT.replaceAll(\"[\\\\n]\",\" \");\n\t\t\t\t\t\t\tSystem.out.println(\"ID: \"+id);\n\t\t\t\t\t\t\t//System.out.println(\"TEXT: \"+docTEXT);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// text with stop words removed\n\t\t\t\t\t\t\tPattern pattern1 = Pattern.compile(\"\\\\b(?:\"+stopwords+\")\\\\b\\\\s*\", Pattern.CASE_INSENSITIVE);\n\t\t\t\t\t\t\tMatcher matcher1 = pattern1.matcher(docTEXT);\n\t\t\t\t\t\t\tdocTEXT = matcher1.replaceAll(\"\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// text with stemming\n\t\t\t\t\t\t\t//docTEXT = stemmer(docTEXT);\n\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\tint docLength = 1;\n\t\t\t\t\t\t\t// regex to build the tokens from the document text\n\t\t\t\t\t\t\tPattern pattern = Pattern.compile(\"\\\\w+(\\\\.?\\\\w+)*\");\n\t\t\t\t\t\t\tMatcher matcher = pattern.matcher(docTEXT.toLowerCase());\n\t\t\t\t\t\t\twhile (matcher.find()) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfor (int i = 0; i < matcher.groupCount(); i++) {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// alltermHash contains term and term id\n\t\t\t\t\t\t\t\t\t// if term is present in the alltermHash\n\t\t\t\t\t\t\t\t\tif(allTermHash.containsKey(matcher.group(i))){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tint termId = allTermHash.get(matcher.group(i));\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t//if term is present in the token1000Hash\n\t\t\t\t\t\t\t\t\t\t//then update the dblock of the term.\n\t\t\t\t\t\t\t\t\t\tif(token1000DocHash.containsKey(termId)){\n\t\t\t\t\t\t\t\t\t\t\tMultimap<String, String> dBlockUpdate = token1000DocHash.get(termId);\n\t\t\t\t\t\t\t\t\t\t\t//Multimap<Integer, Integer> dBlockUpdate = token1000DocHash.get(matcher.group(i));\n\t\t\t\t\t\t\t\t\t\t\tif(dBlockUpdate.containsKey(id)){\n\t\t\t\t\t\t\t\t\t\t\t\tdBlockUpdate.put(String.valueOf(id), String.valueOf(matcher.start()));\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\tdBlockUpdate.put(String.valueOf(id), String.valueOf(matcher.start()));\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//if term is not present in the token1000hash\n\t\t\t\t\t\t\t\t\t\t//then add the token with its dBlock\n\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\tMultimap<String, String> dBlockInsert = ArrayListMultimap.create();\n\t\t\t\t\t\t\t\t\t\t\tdBlockInsert.put(String.valueOf(id), String.valueOf(matcher.start()));\n\t\t\t\t\t\t\t\t\t\t\ttoken1000DocHash.put(termId, dBlockInsert);\t\n\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// if the term is not present I will put the term into allTermHash\n\t\t\t\t\t\t\t\t\t// put corresponding value into the token1000DocHash and increment\n\t\t\t\t\t\t\t\t\t// termIndex\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\tallTermHash.put(matcher.group(i),termIndex);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tMultimap<String, String> dBlockInsert = ArrayListMultimap.create();\n\t\t\t\t\t\t\t\t\t\tdBlockInsert.put(String.valueOf(id), String.valueOf(matcher.start()));\n\t\t\t\t\t\t\t\t\t\ttoken1000DocHash.put(termIndex, dBlockInsert);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\ttermIndex++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tdocLength++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(id%1000 == 0){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// then dump index file to HDD\n\t\t\t\t\t\t\t\t\twriteInvertedIndex(token1000DocHash,\"token1000DocHash\");\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// update catalog file\n\t\t\t\t\t\t\t\t\t// to populate catalogHash with the offset\n\t\t\t\t\t\t\t\t\tfor(Entry<Integer, Multimap> entry : token1000DocHash.entrySet()){\n\t\t\t\t\t\t\t\t\t\tif(catalogHash.containsKey(entry.getKey())){\n\t\t\t\t\t\t\t\t\t\t\tint len = (entry.getKey()+\":\"+entry.getValue()).length();\n\t\t\t\t\t\t\t\t\t\t\t//String offset = String.valueOf(startOffset)+\":\"+String.valueOf(len);\n\t\t\t\t\t\t\t\t\t\t\tMultimap<String, String> catUpdate = catalogHash.get(entry.getKey());\n\t\t\t\t\t\t\t\t\t\t\tcatUpdate.put(String.valueOf(startOffset), String.valueOf(len));\n\t\t\t\t\t\t\t\t\t\t\tcatalogHash.put(entry.getKey(), catUpdate);\n\t\t\t\t\t\t\t\t\t\t\tstartOffset += len+2;\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\tint len = (entry.getKey()+\":\"+entry.getValue()).length();\n\t\t\t\t\t\t\t\t\t\t\t//String offset = String.valueOf(startOffset)+\":\"+String.valueOf(len);\n\t\t\t\t\t\t\t\t\t\t\tMultimap<String, String> catInsert = ArrayListMultimap.create();\n\t\t\t\t\t\t\t\t\t\t\tcatInsert.put(String.valueOf(startOffset), String.valueOf(len));\n\t\t\t\t\t\t\t\t\t\t\tcatalogHash.put(entry.getKey(), catInsert);//entry.getValue());\n\t\t\t\t\t\t\t\t\t\t\tstartOffset += len+2;\n\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\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//clear the token1000DocHash\n\t\t\t\t\t\t\t\t\ttoken1000DocHash.clear();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdocumentHash.put(docID, \"\"+id+\":\"+docLength);\n\t\t\t\t\t\t\tid++;\n\t\t\t\t\t\t\ttext = new StringBuffer();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(line.contains(\"<DOCNO>\")){\n\t\t\t\t\t\t\t++docNumber;\n\t\t\t\t\t\t\tdocID = line.substring(8, 21);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(line.contains(\"<TEXT>\")){\n\t\t\t\t\t\t\t++textCount;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if((line.contains(\"<DOC>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"</DOC>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<DOCNO>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<FILEID>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<FIRST>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<SECOND>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<HEAD>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"</HEAD>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<BYLINE>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"</BYLINE>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<UNK>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"</UNK>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<DATELINE>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<NOTE>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"</NOTE>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"</TEXT>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<TEXT>\"))){\n\t\t\t\t\t\t\t ++noText;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(endDoc == docCount - 1){\n\t\t\t\t\t\t\ttext.append(line);\n\t\t\t\t\t\t\ttext.append(\" \");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t \t\n\t\t\t }//end of if - to check if this is a file and parse.\n\t\t\t \n\t\t\t}//end of for loop to load each file\n\t\t\t\n\t\t//}//end of while loop \n\t\t\n\t// write catalogfile to the hdd to check.\n\t\t\t\n\t\t\t// then dump index file to HDD\n\t\t\twriteInvertedIndex(token1000DocHash,\"token1000DocHash\");\n\t\t\t\n\t\t\t// update catalog file\n\t\t\t// to populate catalogHash with the offset\n\t\t\tfor(Entry<Integer, Multimap> entry : token1000DocHash.entrySet()){\n\t\t\t\tif(catalogHash.containsKey(entry.getKey())){\n\t\t\t\t\tint len = (entry.getKey()+\":\"+entry.getValue()).length();\n\t\t\t\t\t//String offset = String.valueOf(startOffset)+\":\"+String.valueOf(len);\n\t\t\t\t\tMultimap<String, String> catUpdate = catalogHash.get(entry.getKey());\n\t\t\t\t\tcatUpdate.put(String.valueOf(startOffset), String.valueOf(len));\n\t\t\t\t\tcatalogHash.put(entry.getKey(), catUpdate);\n\t\t\t\t\tstartOffset += len+2;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tint len = (entry.getKey()+\":\"+entry.getValue()).length();\n\t\t\t\t\t//String offset = String.valueOf(startOffset)+\":\"+String.valueOf(len);\n\t\t\t\t\tMultimap<String, String> catInsert = ArrayListMultimap.create();\n\t\t\t\t\tcatInsert.put(String.valueOf(startOffset), String.valueOf(len));\n\t\t\t\t\tcatalogHash.put(entry.getKey(), catInsert);//entry.getValue());\n\t\t\t\t\tstartOffset += len+2;\n\t\t\t\t\t\n\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\twriteInvertedIndex(catalogHash,\"catalogHash\");\n\t\t\tprintHashMapSI(allTermHash);\n\t\t\tprintHashMapSS(documentHash);\n\t\t\t\n\t\t\tlong InvIndstartOffset = 0;\n\t\t\t\n\t\t\t//write it to file\n \n\t\t\t//change the finalcatalogHash to the form termid:startoffset:length\n\t\t\tfor (Integer name: catalogHash.keySet()){\n\t String key = name.toString();\n\t String value = catalogHash.get(name).toString(); \n\t //System.out.println(key + \" \" + value); \n\t String finalTermIndex = genInvertedIndex(key, value);\n\t finalTermIndex = key+\":\"+finalTermIndex;\n\t int indexLength = finalTermIndex.length();\n\t \n\t \n\t PrintWriter writer = new PrintWriter(new BufferedWriter\n\t \t\t(new FileWriter(\"C:/Users/Naveen/Desktop/TestRuns/LastRun/InvertedIndex\", true)));\n\t writer.println(finalTermIndex);\n\t writer.close();\n\t \n\t //update the finalcatalogHash\n\t //Multimap<String, String> catInsert = ArrayListMultimap.create();\n\t\t\t\t//catInsert.put(String.valueOf(InvIndstartOffset), String.valueOf(indexLength));\n\t\t\t\tfinalCatalogHash.put(name, String.valueOf(InvIndstartOffset)+\":\"+String.valueOf(indexLength));//entry.getValue());\n\t\t\t\tInvIndstartOffset += indexLength+2;\n\t \n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tprintHashMapIS(finalCatalogHash);\n\t\t\t\n\t}",
"public boolean deleteAuthorsByPaper(ArrayList<Integer> paperIds) throws DLException {\n\t\t boolean isDeleted=false;\n\t\t try {\n\t\t\t if(currentUser.getIsAdmin()==1) {\n\t\t\t\t boolean isConnected = dbObj.connect();\n\t\t\t\t if(isConnected && paperIds!=null && !paperIds.isEmpty()) {\n\t\t\t //get users with paperIds\t\t\t\n\t\t\t String sqlStr=\"DELETE FROM PaperAuthors WHERE paperId IN(\";\n\t\t\t ArrayList<String> args = new ArrayList<String>();\n\t\t\t for(int i=0;i<paperIds.size();i++){\n\t\t\t if(i==0){\n\t\t\t sqlStr+=\"?\";\n\t\t\t }\n\t\t\t else{\n\t\t\t sqlStr+=\",?\";\n\t\t\t }\n\t\t\t args.add(String.valueOf(paperIds.get(i)));\n\t\t\t }\n\t\t\t sqlStr+=\");\"; \n\t\t\t int rc = dbObj.setData(sqlStr,args);\n\t\t\t if(rc>0) {\n\t\t\t \t isDeleted=true;\n\t\t\t }\n\t\t\t dbObj.close();\t \n\t\t\t }\n\t\t\t } \n\t\t }\t\t \n\t\t catch(Exception ex) {\n\t\t\t throw new DLException(ex, ex.getMessage());\n\t\t }\n\t\t return isDeleted;\n }",
"private static void printTable(int numberOfDocs) {\n \n Gson gs = new Gson();\n String json = gs.toJson(wor);\n // System.out.println(json);\n \n List<String> queryWords = new ArrayList();\n //to test it for other query word you can change the following two words\n //queryWords.add(\"carpet\");\n //queryWords.add(\"hous\");\n queryWords.add(\"the\");\n queryWords.add(\"crystallin\");\n queryWords.add(\"len\");\n queryWords.add(\"vertebr\");\n queryWords.add(\"includ\");\n \n \n FrequencySummary frequencySummary = new FrequencySummary();\n frequencySummary.getSummary(json,docName, queryWords);\n \n System.exit(0);\n \n Hashtable<Integer,Integer> g = new Hashtable<>();\n \n /* wor.entrySet().forEach((wordToDocument) -> {\n String currentWord = wordToDocument.getKey();\n Map<String, Integer> documentToWordCount = wordToDocument.getValue();\n freq.set(0);\n df.set(0);\n documentToWordCount.entrySet().forEach((documentToFrequency) -> {\n String document = documentToFrequency.getKey();\n Integer wordCount = documentToFrequency.getValue();\n freq.addAndGet(wordCount);\n System.out.println(\"Word \" + currentWord + \" found \" + wordCount +\n \" times in document \" + document);\n \n if(g.getOrDefault(currentWord.hashCode(), null)==null){\n g.put(currentWord.hashCode(),1);\n \n }else {\n System.out.println(\"Hello\");\n \n int i = g.get(currentWord.hashCode());\n System.out.println(\"i \"+i);\n g.put(currentWord.hashCode(), i++);\n }\n // System.out.println(currentWord+\" \"+ g.get(currentWord.hashCode()));\n // g.put(currentWord.hashCode(), g.getOrDefault(currentWord.hashCode(), 0)+wordCount);\n \n });\n // System.out.println(freq.doubleValue());\n \n // System.out.println(\"IDF for this word: \"+Math.log10( (double)(counter/freq.doubleValue())));\n });\n // System.out.println(g.get(\"plai\".hashCode()));\n //System.out.println(\"IDF for this word: \"+Math.log10( (double)(counter/(double)g.get(\"plai\".hashCode()))));\n */\n }",
"long countByExample(KaiwaExample example);",
"int countByExample(BasicinfoCriteria example);",
"long countByExample(IymDefAssignmentExample example);",
"@Override\n public void processCas(CAS aCas) throws ResourceProcessException {\nSystem.out.println(\"Retrival evaluator...\");\n JCas jcas;\n try {\n jcas = aCas.getJCas();\n } catch (CASException e) {\n throw new ResourceProcessException(e);\n }\n\n FSIterator it = jcas.getAnnotationIndex(Document.type).iterator();\n \n// if (it.hasNext()) {\n// Document doc = (Document) it.next();\n// cnt++;\n// }\n// log(cnt);\n it = jcas.getAnnotationIndex(Document.type).iterator();\n\n if (it.hasNext()) {\n Document doc = (Document) it.next();\n int queryid = doc.getQueryID();\n int rel = doc.getRelevanceValue();\n // Make sure that your previous annotators have populated this in CAS\n FSList fsTokenList = doc.getTokenList();\n ArrayList<Token> tokenList = Utils.fromFSListToCollection(fsTokenList, Token.class);\n Map<String, Integer> queryVector = new HashMap<String, Integer>();\n Map<String, Integer> docVector = new HashMap<String, Integer>();\n if (rel == 99) {\n for (Token t : tokenList) {\n queryVector.put(t.getText(), t.getFrequency());\n }\n queryVectorlist.add(queryVector);\n } else {\n for (Token t : tokenList) {\n docVector.put(t.getText(), t.getFrequency());\n }\n double cos = computeCosineSimilarity(queryVectorlist.get(queryid - 1), docVector);\n coslist.add(cos);\n\n if (rel == 1) {\n gold = lines;\n goldcos = cos;\n System.out.println(\"goldcos\"+goldcos);\n }\n }\n \n if (qIdList.size() >= 1 && qIdList.get(qIdList.size() - 1) != queryid) {\n// System.out.println(\"lines:\"+lines);\n sortSimilarity(coslist);\n log(coslist);\n int rank=findRank(coslist,goldcos);\n rankList.add(rank);\n coslist = new ArrayList<Double>();\n }\n\n qIdList.add(doc.getQueryID());// 有啥用???\n relList.add(doc.getRelevanceValue());\n\n // Do something useful here\n lines++;\n }\n //log(coslist);\n\n }"
]
| [
"0.51980937",
"0.49987164",
"0.49797308",
"0.4963504",
"0.49596944",
"0.48843208",
"0.48680657",
"0.48390236",
"0.4781578",
"0.47685254",
"0.47311854",
"0.47225037",
"0.467512",
"0.46730292",
"0.46519548",
"0.46477216",
"0.45855433",
"0.45727384",
"0.4552139",
"0.45465764",
"0.4543482",
"0.45428973",
"0.45398608",
"0.4531568",
"0.45095518",
"0.45011944",
"0.44900128",
"0.44448513",
"0.44362816",
"0.44325793",
"0.44164068",
"0.43963078",
"0.43891296",
"0.43872178",
"0.43848124",
"0.43752807",
"0.43556958",
"0.43405822",
"0.4340114",
"0.43393448",
"0.43354136",
"0.4317573",
"0.43139437",
"0.43060246",
"0.4302938",
"0.43011197",
"0.43007067",
"0.42947605",
"0.42902473",
"0.42847854",
"0.42754686",
"0.42754132",
"0.42713",
"0.42516598",
"0.42493525",
"0.42492458",
"0.4241169",
"0.42381814",
"0.4227785",
"0.42199215",
"0.42154357",
"0.4209276",
"0.42085335",
"0.42042485",
"0.41958416",
"0.4191069",
"0.4166284",
"0.4166284",
"0.4161191",
"0.4159152",
"0.41520756",
"0.41480613",
"0.41471303",
"0.41378537",
"0.41339874",
"0.41339257",
"0.41217092",
"0.41168374",
"0.41155052",
"0.41052032",
"0.4104315",
"0.40997142",
"0.4091373",
"0.40898487",
"0.4089674",
"0.40863028",
"0.4083589",
"0.4081434",
"0.4080686",
"0.40758267",
"0.40736964",
"0.40734863",
"0.40720636",
"0.40670073",
"0.40580335",
"0.40576932",
"0.40567946",
"0.40565988",
"0.40519288",
"0.4049288"
]
| 0.49083528 | 5 |
Creates new form FrameForm | public FrameForm() {
initComponents();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"FORM createFORM();",
"private void buildFrame() {\n String title = \"\";\n switch (formType) {\n case \"Add\":\n title = \"Add a new event\";\n break;\n case \"Edit\":\n title = \"Edit an existing event\";\n break;\n default:\n }\n frame.setTitle(title);\n frame.setResizable(false);\n frame.setPreferredSize(new Dimension(300, 350));\n frame.pack();\n frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n\n frame.addWindowListener(new WindowAdapter() {\n @Override\n public void windowClosing(WindowEvent e) {\n // sets the main form to be visible if the event form was exited\n // and not completed.\n mainForm.getFrame().setEnabled(true);\n mainForm.getFrame().setVisible(true);\n }\n });\n }",
"Frame createFrame();",
"public NewJFrame() {\n initComponents();\n IniciarTabla();\n \n \n // ingreso al githup \n \n }",
"public NewFrame() {\n initComponents();\n }",
"FRAME createFRAME();",
"public NewJFrame() {\n initComponents();\n \n }",
"public FrameInsert() {\n initComponents();\n }",
"public NewJFrame() {\r\n initComponents();\r\n }",
"public NewJFrame() {\n initComponents();\n }",
"public NewJFrame() {\n initComponents();\n }",
"public NewJFrame() {\n initComponents();\n }",
"public NewJFrame() {\n initComponents();\n }",
"public NewJFrame() {\n initComponents();\n }",
"public NewJFrame() {\n initComponents();\n }",
"public NewJFrame() {\n initComponents();\n }",
"public NewJFrame() {\n Connect();\n initComponents();\n }",
"public NewJFrame()\r\n {\r\n initComponents();\r\n }",
"public void buildFrame();",
"public static void createMainframe()\n\t{\n\t\t//Creates the frame\n\t\tJFrame foodFrame = new JFrame(\"USDA Food Database\");\n\t\t//Sets up the frame\n\t\tfoodFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tfoodFrame.setSize(1000,750);\n\t\tfoodFrame.setResizable(false);\n\t\tfoodFrame.setIconImage(icon.getImage());\n\t\t\n\t\tGui gui = new Gui();\n\t\t\n\t\tgui.setOpaque(true);\n\t\tfoodFrame.setContentPane(gui);\n\t\t\n\t\tfoodFrame.setVisible(true);\n\t}",
"private void setFrame() {\r\n this.getContentPane().setLayout(null);\r\n this.addWindowListener(new WindowAdapter() {\r\n public void windowClosing(WindowEvent evt) {\r\n close();\r\n }\r\n });\r\n MainClass.frameTool.startup(this, FORM_TITLE, FORM_WIDTH, FORM_HEIGHT, \r\n false, true, false, false, FORM_BACKGROUND_COLOR,\r\n SNAKE_ICON);\r\n }",
"public NewJFrame() {\n initComponents();\n\n }",
"public void createAndShowGUI(JFrame frame) {\n providerSideBar(frame.getContentPane(), pat);\n topBarPatientInformation(frame.getContentPane(), pat);\n patientReferralPanel(frame.getContentPane());\n\n }",
"public FrameControl() {\n initComponents();\n }",
"public NewJFrame17() {\n initComponents();\n }",
"private void createFrame(){\n JPanel jPanelID = new JPanel();\n jPanelID.setLayout(new GridBagLayout());\n JLabel labelText = new JLabel(this.dialogName);\n labelText.setHorizontalAlignment(JLabel.CENTER);\n AddComponent.add(jPanelID,labelText, 0, 0, 2, 1);\n for (int field = 0; field < labelString.length; field++) {\n labelText = new JLabel(labelString[field]);\n AddComponent.add(jPanelID, labelText, 0, field + 1, 1, 1);\n AddComponent.add(jPanelID, fieldID.get(labelString[field]), 1, field + 1, 1, 1);\n }\n int offset = labelString.length + 1;\n labelText = new JLabel(DATE_OF_BIRTH);\n AddComponent.add(jPanelID, labelText, 0, offset, 1, 1);\n AddComponent.add(jPanelID, jDateChooser, 1, offset, 1, 1);\n offset++;\n labelText = new JLabel(GROUP);\n AddComponent.add(jPanelID, labelText, 0, offset, 1, 1);\n AddComponent.add(jPanelID, group, 1, offset, 1, 1);\n dialog.add(jPanelID, BorderLayout.NORTH);\n JButton okButton = new JButton(dialogName);\n okButton.addActionListener(actionEvent -> checkAndSave());\n dialog.add(okButton, BorderLayout.SOUTH);\n }",
"public NewJFrame1() {\n initComponents();\n }",
"public FrameDesign() {\n initComponents();\n }",
"private static void createAndShowGUI() {\n JFrame frame = new JFrame(\"Firma digital\");\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n frame.setLocationRelativeTo(null);\r\n\r\n //Create and set up the content pane.\r\n final FirmaDigital newContentPane = new FirmaDigital(frame);\r\n newContentPane.setOpaque(true); //content panes must be opaque\r\n frame.setContentPane(newContentPane);\r\n\r\n //Make sure the focus goes to the right component\r\n //whenever the frame is initially given the focus.\r\n frame.addWindowListener(new WindowAdapter() {\r\n public void windowActivated(WindowEvent e) {\r\n newContentPane.resetFocus();\r\n }\r\n });\r\n\r\n //Display the window.\r\n frame.pack();\r\n frame.setVisible(true);\r\n }",
"private void makeContent(JFrame frame){\n Container content = frame.getContentPane();\n content.setSize(700,700);\n\n makeButtons();\n makeRooms();\n makeLabels();\n\n content.add(inputPanel,BorderLayout.SOUTH);\n content.add(roomPanel, BorderLayout.CENTER);\n content.add(infoPanel, BorderLayout.EAST);\n\n }",
"protected void createInternalFrame() {\n\t\tJInternalFrame frame = new JInternalFrame();\n\t\tframe.setVisible(true);\n\t\tframe.setClosable(true);\n\t\tframe.setResizable(true);\n\t\tframe.setFocusable(true);\n\t\tframe.setSize(new Dimension(300, 200));\n\t\tframe.setLocation(100, 100);\n\t\tdesktop.add(frame);\n\t\ttry {\n\t\t\tframe.setSelected(true);\n\t\t} catch (java.beans.PropertyVetoException e) {\n\t\t}\n\t}",
"public static void buildFrame() {\r\n\t\t// Make sure we have nice window decorations\r\n\t\tJFrame.setDefaultLookAndFeelDecorated(true);\r\n\t\t\r\n\t\t// Create and set up the window.\r\n\t\t//ParentFrame frame = new ParentFrame();\r\n\t\tMediator frame = new Mediator();\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\r\n\t\t// Display the window\r\n\t\tframe.setVisible(true);\r\n\t}",
"public Frame() {\n initComponents();\n }",
"public Frame() {\n initComponents();\n }",
"public AddFrame(MainFrame parent) {\n this.parent = parent;\n initComponents();\n }",
"public form() {\n initComponents();\n }",
"public Mainframe() {\n initComponents();\n }",
"protected AbstractForm(JFrame previousJFrame) {\n this.previousJFrame = previousJFrame;\n this.currentJFrame = this;\n this.initComponents();\n this.postInit();\n }",
"public ControlFrame addControlFrame(String theName, int theWidth, int theHeight) {\n Frame f = new Frame(theName);\n ControlFrame p = new ControlFrame(this, theWidth, theHeight);\n f.add(p);\n p.init();\n f.setTitle(theName);\n f.setSize(p.w, p.h);\n f.setLocation(50, 250);\n f.setResizable(false);\n f.setVisible(true);\n return p;\n}",
"public FrameOpcoesAgenda() {\n initComponents();\n }",
"public NewJFrame() {\n initComponents();\n // HidenLable.setVisible(false);\n }",
"private void makeFrame(){\n frame = new JFrame(\"Rebellion\");\n\n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n frame.setSize(800,800);\n\n makeContent(frame);\n\n frame.setBackground(Color.getHSBColor(10,99,35));\n frame.pack();\n frame.setVisible(true);\n }",
"private JInternalFrame createInternalFrame() {\n\n initializeChartPanel();\n\n chartPanel.setPreferredSize(new Dimension(200, 100));\n final JInternalFrame frame = new JInternalFrame(\"Frame 1\", true);\n frame.getContentPane().add(chartPanel);\n frame.setClosable(true);\n frame.setIconifiable(true);\n frame.setMaximizable(true);\n frame.setResizable(true);\n return frame;\n\n }",
"@Override\n\tpublic void create() {\n\t\twithdrawFrame = new JFrame();\n\t\tthis.constructContent();\n\t\twithdrawFrame.setSize(800,500);\n\t\twithdrawFrame.show();\n\t\twithdrawFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t}",
"public frame() {\r\n\t\tadd(createMainPanel());\r\n\t\tsetTitle(\"Lunch Date\");\r\n\t\tsetSize(FRAME_WIDTH, FRAME_HEIGHT);\r\n\r\n\t}",
"public void createButtonFrame()\n {\n JFrame createFrame = new JFrame();\n createFrame.setSize(560,200);\n Container pane2;\n pane2 = createFrame.getContentPane();\n JPanel createPanel = new JPanel(null);\n createEvent = new JTextArea(\"MM/DD/YYYY\");\n timeField1 = new JTextArea(\"00:00\");\n timeField2 = new JTextArea(\"00:00\");\n EventNameField = new JTextArea(\"UNTILED NAME\");\n JLabel EnterEventLabel = new JLabel(\"Enter Event Name:\");\n JLabel EnterDateLabel = new JLabel(\"Date:\");\n JLabel EnterStartLabel = new JLabel(\"Start:\");\n JLabel EnterEndLabel = new JLabel(\"End:\");\n JLabel toLabel = new JLabel(\"to\");\n pane2.add(createPanel);\n createPanel.add(createEvent);\n createPanel.add(timeField1);\n createPanel.add(EventNameField);\n createPanel.add(timeField2);\n createPanel.add(create);\n createPanel.add(EnterEventLabel);\n createPanel.add(EnterDateLabel);\n createPanel.add(EnterStartLabel);\n createPanel.add(EnterEndLabel);\n createPanel.add(toLabel);\n\n createPanel.setBounds(0, 0, 400, 200); //panel\n createEvent.setBounds(20, 90, 100, 25); //Date field\n timeField1.setBounds(150, 90, 80, 25); //Time field\n timeField2.setBounds(280, 90, 80, 25); //Time field 2\n create.setBounds(380, 100, 150, 50); //Create Button\n\n EnterStartLabel.setBounds(150, 65, 80, 25);\n EnterEndLabel.setBounds(280, 65, 80, 25);\n toLabel.setBounds(250, 90, 80, 25);\n EnterDateLabel.setBounds(20, 65, 80, 25);\n EventNameField.setBounds(20, 30, 300, 25); //Event Name Field\n EnterEventLabel.setBounds(20, 5, 150, 25);\n\n\n\n\n createFrame.setVisible(true);\n createFrame.setResizable(false);\n }",
"public form_for_bd() {\n initComponents();\n }",
"@Override\n\tprotected Fragment createFragment() {\n\t\treturn new FormFragment();\n\t}",
"public Form(){ \n\t\tsuper(tag(Form.class)); \n\t}",
"public static MainFrame createNewFrame(Display display, Document doc)\n {\n Shell shell = new Shell(display);\n\n MainFrame frame = new MainFrame(shell, doc);\n frame.initComponents(null);\n\n shell.open();\n\n return frame;\n }",
"public BaseFrame() {\n initComponents();\n }",
"public void buildEditFrame() {\n\n\tframe.addWindowListener(new WindowAdapter() {\n\t public void windowClosing(WindowEvent e) {\n\t\t//System.exit(0);\n\t }\n\t});\n\n\t// show the frame\n frame.setSize(Width, Height);\n\tframe.setLocation(screenSize.width/2 - Width/2,\n\t\t\t screenSize.height/2 - Height/2);\n\tframe.getContentPane().setLayout(new BorderLayout());\n\tframe.getContentPane().add(jp, BorderLayout.CENTER);\n\n\tframe.pack();\n//\t((CDFEdit)getFrame()).getDialog().setVisible(false);\n\tframe.setVisible(true);\n\n\t// Deprecated API - jp.requestDefaultFocus(); \n\tjp.requestFocus();\n\tframe.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));\n }",
"public NewJFrame1() {\n initComponents();\n\n dip();\n sh();\n }",
"public mainframe() {\n initComponents();\n }",
"public addStFrame() {\n initComponents();\n }",
"public Jframe() {\n initComponents();\n setIndice();\n loadTextBoxs();\n }",
"public FichaDeContactoJFrame() {\n initComponents();\n }",
"public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }",
"public Form() {\n initComponents();\n }",
"private Frame buildFrame() {\n return new Frame(command, headers, body);\n }",
"public MainForm() {\n initComponents();\n \n }",
"public FramePrincipal() {\n initComponents();\n }",
"public NewRoomFrame() {\n initComponents();\n }",
"public FrameCadastro(String tipo[]){\r\n\t\tsuper(\"ApartManager-Cadastro\");\r\n\t\t\r\n\t\tPanelCadastro panelC = new PanelCadastro(tipo);\r\n\t\t\r\n\t\tsetDefaultCloseOperation(DISPOSE_ON_CLOSE);\r\n\t\tsetSize(700, 700);\r\n\t\tsetLocationRelativeTo(null);\r\n\t\tsetVisible(true);\r\n\t\tsetResizable(false);\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tsetContentPane(panel);\r\n\t\tpanel.setLayout(null);\r\n\t\tpanelC.setBounds(0, 0, 700, 700);\r\n\t\tpanel.add(panelC);\r\n\t\tpanel.setVisible(true);\r\n\t}",
"public void rebuildFrame(){\n \n // Re-initialize frame with default attributes\n controlFrame.dispose();\n controlFrame = buildDefaultFrame(\"CSCI 446 - A.I. - Montana State University\");\n \n // Initialize header with default attributes\n header = buildDefaultHeader();\n \n // Initialize control panel frame with default attributes\n controlPanel = buildDefaultPanel(BoxLayout.Y_AXIS);\n \n // Combine objects\n controlPanel.add(header, BorderLayout.NORTH);\n controlFrame.add(controlPanel);\n \n }",
"public frmAfiliado() {\n initComponents();\n \n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"private void buildFrame(){\n this.setVisible(true);\n this.getContentPane();\n this.setSize(backgrondP.getIconWidth(),backgrondP.getIconHeight());\n this.setDefaultCloseOperation(EXIT_ON_CLOSE);\t \n\t }",
"public xinxiNewJFrame() {\n initComponents();\n }",
"public MiFrame2() {\n initComponents();\n }",
"public Frame1() {\n initComponents();\n }",
"public MercadoFrame() {\n initComponents();\n }",
"public WhereIsAppCreator(JFrame frame) {\n this.frame = frame;\n initComponents();\n }",
"public NewJFrame() {\n initComponents();\n \n \n //combo box\n comboCompet.addItem(\"Séléction officielle\");\n comboCompet.addItem(\"Un certain regard\");\n comboCompet.addItem(\"Cannes Courts métrages\");\n comboCompet.addItem(\"Hors compétitions\");\n comboCompet.addItem(\"Cannes Classics\");\n \n \n //redimension\n this.setResizable(false);\n \n planning = new Planning();\n \n \n }",
"private FrmMainForm() {\n }",
"public MechanicForm() {\n initComponents();\n }",
"public NewDialog() {\n\t\t\t// super((java.awt.Frame)null, \"New Document\");\n\t\t\tsuper(\"JFLAP 7.0\");\n\t\t\tgetContentPane().setLayout(new GridLayout(0, 1));\n\t\t\tinitMenu();\n\t\t\tinitComponents();\n\t\t\tsetResizable(false);\n\t\t\tpack();\n\t\t\tthis.setLocation(50, 50);\n\n\t\t\taddWindowListener(new WindowAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void windowClosing(final WindowEvent event) {\n\t\t\t\t\tif (Universe.numberOfFrames() > 0) {\n\t\t\t\t\t\tNewDialog.this.setVisible(false);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tQuitAction.beginQuit();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}",
"public frmNewArtist() {\n initComponents();\n lblID.setText(Controller.Agent.ManageController.getNewArtistID());\n lblGreeting.setText(\"Dear \"+iMuzaMusic.getLoggedUser().getFirstName()+\", please use the form below to add an artist to your ranks.\");\n \n }",
"private void initializeFields() {\r\n myFrame = new JFrame();\r\n myFrame.setSize(DEFAULT_SIZE);\r\n }",
"public holdersframe() {\n initComponents();\n }",
"public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }",
"private JFrame getJFrame() {\n\t\tif (jFrame == null) {\n\t\t\tjFrame = new JFrame();\n\t\t\tjFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\tjFrame.setJMenuBar(getJJMenuBar());\n\t\t\tjFrame.setSize(400, 200);\n\t\t\tjFrame.setContentPane(getJContentPane());\n\t\t\tjFrame.setTitle(\"Mancala\");\n\t\t}\n\t\treturn jFrame;\n\t}",
"public JFrameFormularioProducto() {\n initComponents();\n }",
"private void customizeFrame(JFrame frame) {\r\n frame.setTitle(getTitle());\r\n frame.setResizable(false);\r\n frame.setPreferredSize(new Dimension(width + 15, height + 36));\r\n frame.setVisible(true);\r\n\r\n frame.setLayout(new BorderLayout());\r\n frame.add(panel, BorderLayout.CENTER);\r\n frame.setLocationRelativeTo(null);\r\n\r\n frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n frame.pack();\r\n }",
"public static Result newForm() {\n return ok(newForm.render(palletForm, setOfArticleForm));\n }",
"public Frame2() {\n initComponents();\n }",
"public Frame2() {\n initComponents();\n }",
"public NewJFrame() {\n initComponents();\n mcam.setLineWrap(true);\n\n }",
"public JexlEngine.Frame createFrame(Object... values) {\r\n return scope != null? scope.createFrame(values) : null;\r\n }",
"public DisplayStaffMemberFrame() {\n initComponents();\n }",
"public NewConnectionFrame() {\n initComponents();\n }",
"private HorizontalPanel createContent() {\n\t\tfinal HorizontalPanel panel = new HorizontalPanel();\n\t\tfinal VerticalPanel form = new VerticalPanel();\n\t\tpanel.add(form);\n\t\t\n\t\tfinal Label titleLabel = new Label(CONSTANTS.actorLabel());\n\t\ttitleLabel.addStyleName(AbstractField.CSS.cbtAbstractPopupLabel());\n\t\tform.add(titleLabel);\n\t\t\n\t\tfinal Label closeButton = new Label();\n\t\tcloseButton.addClickHandler(new ClickHandler() {\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tActorPopup.this.hide();\n\t\t\t}\n\t\t});\n\t\tcloseButton.addStyleName(AbstractField.CSS.cbtAbstractPopupClose());\n\t\tform.add(closeButton);\n\t\t\n\t\t//-----------------------------------------------\n\t\t// Party field\n\t\t//-----------------------------------------------\n\t\tpartyField = new SuggestField(this, null,\n\t\t\t\tnew NameIdAction(Service.PARTY),\n\t\t\t\tCONSTANTS.partynameLabel(),\n\t\t\t\t20,\n\t\t\t\ttab++);\n\t\tpartyField.setReadOption(Party.CREATED, true);\n\t\tpartyField.setDoubleclickable(true);\n\t\tpartyField.setHelpText(CONSTANTS.partynameHelp());\n\t\tform.add(partyField);\n\n\t\t//-----------------------------------------------\n\t\t// Email Address field\n\t\t//-----------------------------------------------\n\t\temailaddressField = new TextField(this, null,\n\t\t\t\tCONSTANTS.emailaddressLabel(),\n\t\t\t\ttab++);\n\t\temailaddressField.setMaxLength(100);\n\t\temailaddressField.setHelpText(CONSTANTS.emailaddressHelp());\n\t\tform.add(emailaddressField);\n\n\t\t//-----------------------------------------------\n\t\t// Password field\n\t\t//-----------------------------------------------\n\t\tpasswordField = new PasswordField(this, null,\n\t\t\t\tCONSTANTS.passwordLabel(),\n\t\t\t\ttab++);\n\t\tpasswordField.setSecure(true);\n\t\tpasswordField.setHelpText(CONSTANTS.passwordHelp());\n\t\tform.add(passwordField);\n\n\t\t//-----------------------------------------------\n\t\t// Check Password field\n\t\t//-----------------------------------------------\n\t\tcheckpasswordField = new PasswordField(this, null,\n\t\t\t\tCONSTANTS.checkpasswordLabel(),\n\t\t\t\ttab++);\n\t\tcheckpasswordField.setSecure(true);\n\t\tcheckpasswordField.setHelpText(CONSTANTS.checkpasswordHelp());\n\t\tform.add(checkpasswordField);\n\n\t\t//-----------------------------------------------\n\t\t// Date Format field\n\t\t//-----------------------------------------------\n\t\tformatdateField = new ListField(this, null,\n\t\t\t\tNameId.getList(Party.DATE_FORMATS, Party.DATE_FORMATS),\n\t\t\t\tCONSTANTS.formatdateLabel(),\n\t\t\t\tfalse,\n\t\t\t\ttab++);\n\t\tformatdateField.setDefaultValue(Party.MM_DD_YYYY);\n\t\tformatdateField.setFieldHalf();\n\t\tformatdateField.setHelpText(CONSTANTS.formatdateHelp());\n\t\t\n\t\t//-----------------------------------------------\n\t\t// Phone Format field\n\t\t//-----------------------------------------------\n\t\tformatphoneField = new TextField(this, null,\n\t\t\t\tCONSTANTS.formatphoneLabel(),\n\t\t\t\ttab++);\n\t\tformatphoneField.setMaxLength(25);\n\t\tformatphoneField.setFieldHalf();\n\t\tformatphoneField.setHelpText(CONSTANTS.formatphoneHelp());\n\n\t\tHorizontalPanel ff = new HorizontalPanel();\n\t\tff.add(formatdateField);\n\t\tff.add(formatphoneField);\n\t\tform.add(ff);\n\t\t\n\t\t//-----------------------------------------------\n\t\t// Roles option selector\n\t\t//-----------------------------------------------\n\t\trolesField = new OptionField(this, null,\n\t\t\t\tAbstractRoot.hasPermission(AccessControl.AGENCY) ? getAgentroles() : getOrganizationroles(),\n\t\t\t\tCONSTANTS.roleLabel(),\n\t\t\t\ttab++);\n\t\trolesField.setHelpText(CONSTANTS.roleHelp());\n\t\tform.add(rolesField);\n\n\t\tform.add(createCommands());\n\t\t\n\t\tonRefresh();\n\t\tonReset(Party.CREATED);\n\t\treturn panel;\n\t}",
"public void addChildFrame(JFrame frame);",
"public FormInserir() {\n initComponents();\n }",
"public ContainerForm(java.awt.Frame parent, boolean modal) {\n super(parent, modal);\n initComponents();\n// setSize(JMKHome.getPanelHome().getSize());\n// setLocationRelativeTo(JMKHome.getPanelHome());\n }",
"@AutoGenerated\n\tprivate FormLayout buildFormLayout() {\n\t\tformLayout = new FormLayout();\n\t\tformLayout.setImmediate(false);\n\t\tformLayout.setWidth(\"400px\");\n\t\tformLayout.setHeight(\"-1px\");\n\t\tformLayout.setMargin(false);\n\t\tformLayout.setSpacing(true);\n\t\t\n\t\t// fieldArtist\n\t\tfieldArtist = new TextField();\n\t\tfieldArtist.setCaption(\"Artist\");\n\t\tfieldArtist.setImmediate(true);\n\t\tfieldArtist.setWidth(\"100.0%\");\n\t\tfieldArtist.setHeight(\"-1px\");\n\t\tformLayout.addComponent(fieldArtist);\n\t\t\n\t\t// fieldTitle\n\t\tfieldTitle = new TextField();\n\t\tfieldTitle.setCaption(\"Title\");\n\t\tfieldTitle.setImmediate(true);\n\t\tfieldTitle.setWidth(\"100.0%\");\n\t\tfieldTitle.setHeight(\"-1px\");\n\t\tformLayout.addComponent(fieldTitle);\n\t\t\n\t\treturn formLayout;\n\t}",
"public myForm() {\n\t\t\tinitComponents();\n\t\t}",
"public GUIForm() { \n initComponents();\n }"
]
| [
"0.74792886",
"0.711587",
"0.70565695",
"0.66592795",
"0.6638166",
"0.66352046",
"0.65881175",
"0.65822816",
"0.6575019",
"0.653866",
"0.653866",
"0.653866",
"0.653866",
"0.653866",
"0.653866",
"0.653866",
"0.64747995",
"0.64592814",
"0.6390889",
"0.6375957",
"0.635798",
"0.6355013",
"0.63351196",
"0.6322375",
"0.6313155",
"0.6263738",
"0.62557834",
"0.6238236",
"0.62138015",
"0.6197914",
"0.61883587",
"0.6178546",
"0.61729574",
"0.61729574",
"0.6163235",
"0.61357015",
"0.6132096",
"0.6127103",
"0.61253166",
"0.6121471",
"0.61185193",
"0.6115513",
"0.61143696",
"0.6101914",
"0.608115",
"0.6077912",
"0.60774976",
"0.6076598",
"0.6073309",
"0.60522115",
"0.60517824",
"0.604418",
"0.6042026",
"0.60412854",
"0.6035103",
"0.6033485",
"0.6032236",
"0.6028392",
"0.60214704",
"0.60160536",
"0.60107005",
"0.59982073",
"0.5997626",
"0.59970784",
"0.599497",
"0.5993666",
"0.59901786",
"0.59901786",
"0.59901786",
"0.5972639",
"0.5972518",
"0.59679854",
"0.5966431",
"0.5957931",
"0.59570944",
"0.59433913",
"0.5936964",
"0.59345907",
"0.5933028",
"0.5932042",
"0.5927259",
"0.59267515",
"0.59259236",
"0.59239405",
"0.5921932",
"0.59174645",
"0.59156084",
"0.5909636",
"0.5909636",
"0.59076977",
"0.5907531",
"0.5903839",
"0.59019446",
"0.5892542",
"0.5890196",
"0.5888909",
"0.58866835",
"0.58861977",
"0.5882322",
"0.5872793"
]
| 0.76138604 | 0 |
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
buttonGroup = new javax.swing.ButtonGroup();
jPanel1 = new javax.swing.JPanel();
allCheck = new javax.swing.JCheckBox();
blueCheck = new javax.swing.JCheckBox();
redCheck = new javax.swing.JCheckBox();
greenCheck = new javax.swing.JCheckBox();
jLabel1 = new javax.swing.JLabel();
supIzqRadio = new javax.swing.JRadioButton();
supDchaRadio = new javax.swing.JRadioButton();
infIzqRadio = new javax.swing.JRadioButton();
infDchaRadio = new javax.swing.JRadioButton();
jLabel2 = new javax.swing.JLabel();
jPanel2 = new javax.swing.JPanel();
try {
lienzo = new filtrarimagen.Lienzo();
} catch (java.net.MalformedURLException e1) {
e1.printStackTrace();
}
jLabel3 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED, null, null, new java.awt.Color(0, 0, 0), new java.awt.Color(0, 0, 0)), "Configuración", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 10))); // NOI18N
allCheck.setSelected(true);
allCheck.setText("Todos");
allCheck.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
allCheckActionPerformed(evt);
}
});
blueCheck.setSelected(true);
blueCheck.setText("Azul");
blueCheck.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
blueCheckActionPerformed(evt);
}
});
redCheck.setSelected(true);
redCheck.setText("Rojo");
redCheck.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
redCheckActionPerformed(evt);
}
});
greenCheck.setSelected(true);
greenCheck.setText("Verde");
greenCheck.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
greenCheckActionPerformed(evt);
}
});
jLabel1.setText("Canales de color:");
buttonGroup.add(supIzqRadio);
supIzqRadio.setText("Superior izquierda");
supIzqRadio.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent evt) {
supIzqRadioItemStateChanged(evt);
}
});
buttonGroup.add(supDchaRadio);
supDchaRadio.setSelected(true);
supDchaRadio.setText("Superior derecha");
supDchaRadio.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent evt) {
supDchaRadioItemStateChanged(evt);
}
});
buttonGroup.add(infIzqRadio);
infIzqRadio.setText("Inferior izquierda");
infIzqRadio.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent evt) {
infIzqRadioItemStateChanged(evt);
}
});
buttonGroup.add(infDchaRadio);
infDchaRadio.setText("Inferior derecha");
infDchaRadio.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent evt) {
infDchaRadioItemStateChanged(evt);
}
});
jLabel2.setText("Posición del logo (Esquina):");
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addGap(45, 45, 45)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(supIzqRadio)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(supDchaRadio))
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(infIzqRadio)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(infDchaRadio))
.addComponent(jLabel2))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(blueCheck, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(greenCheck, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(allCheck, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(redCheck, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jLabel1)
.addGap(81, 81, 81)))
.addGap(31, 31, 31))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel1)
.addComponent(jLabel2))
.addGap(8, 8, 8)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(allCheck)
.addComponent(redCheck)
.addComponent(supIzqRadio)
.addComponent(supDchaRadio))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(blueCheck)
.addComponent(greenCheck)
.addComponent(infIzqRadio)
.addComponent(infDchaRadio))
.addContainerGap(44, Short.MAX_VALUE))
);
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 1200, Short.MAX_VALUE)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(lienzo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE)))
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 652, Short.MAX_VALUE)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(lienzo, javax.swing.GroupLayout.PREFERRED_SIZE, 652, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE)))
);
jLabel3.setText("Jorge Santana Lorenzo");
jLabel4.setText("Francisco Javier Sánchez González");
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(layout.createSequentialGroup()
.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel3)
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addContainerGap())))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel3)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel4)))
.addContainerGap(52, Short.MAX_VALUE))
);
pack();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Form() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public frmRectangulo() {\n initComponents();\n }",
"public form() {\n initComponents();\n }",
"public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }",
"public FormListRemarking() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n \n }",
"public FormPemilihan() {\n initComponents();\n }",
"public GUIForm() { \n initComponents();\n }",
"public FrameForm() {\n initComponents();\n }",
"public TorneoForm() {\n initComponents();\n }",
"public FormCompra() {\n initComponents();\n }",
"public muveletek() {\n initComponents();\n }",
"public Interfax_D() {\n initComponents();\n }",
"public quanlixe_form() {\n initComponents();\n }",
"public SettingsForm() {\n initComponents();\n }",
"public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }",
"public Soru1() {\n initComponents();\n }",
"public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }",
"public soal2GUI() {\n initComponents();\n }",
"public EindopdrachtGUI() {\n initComponents();\n }",
"public MechanicForm() {\n initComponents();\n }",
"public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }",
"public BloodDonationGUI() {\n initComponents();\n }",
"public quotaGUI() {\n initComponents();\n }",
"public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }",
"public PatientUI() {\n initComponents();\n }",
"public myForm() {\n\t\t\tinitComponents();\n\t\t}",
"public Oddeven() {\n initComponents();\n }",
"public intrebarea() {\n initComponents();\n }",
"public Magasin() {\n initComponents();\n }",
"public RadioUI()\n {\n initComponents();\n }",
"public NewCustomerGUI() {\n initComponents();\n }",
"public ZobrazUdalost() {\n initComponents();\n }",
"public FormUtama() {\n initComponents();\n }",
"public p0() {\n initComponents();\n }",
"public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }",
"public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }",
"public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }",
"public form2() {\n initComponents();\n }",
"public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}",
"public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }",
"public kunde() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\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 .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }",
"public MusteriEkle() {\n initComponents();\n }",
"public frmMain() {\n initComponents();\n }",
"public frmMain() {\n initComponents();\n }",
"public DESHBORDPANAL() {\n initComponents();\n }",
"public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }",
"public frmVenda() {\n initComponents();\n }",
"public Botonera() {\n initComponents();\n }",
"public FrmMenu() {\n initComponents();\n }",
"public OffertoryGUI() {\n initComponents();\n setTypes();\n }",
"public JFFornecedores() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\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, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }",
"public EnterDetailsGUI() {\n initComponents();\n }",
"public vpemesanan1() {\n initComponents();\n }",
"public Kost() {\n initComponents();\n }",
"public FormHorarioSSE() {\n initComponents();\n }",
"public UploadForm() {\n initComponents();\n }",
"public frmacceso() {\n initComponents();\n }",
"public HW3() {\n initComponents();\n }",
"public Managing_Staff_Main_Form() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\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 .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"public sinavlar2() {\n initComponents();\n }",
"public P0405() {\n initComponents();\n }",
"public IssueBookForm() {\n initComponents();\n }",
"public MiFrame2() {\n initComponents();\n }",
"public Choose1() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }",
"public GUI_StudentInfo() {\n initComponents();\n }",
"public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }",
"public JFrmPrincipal() {\n initComponents();\n }",
"public bt526() {\n initComponents();\n }",
"public Pemilihan_Dokter() {\n initComponents();\n }",
"public Ablak() {\n initComponents();\n }",
"@Override\n\tprotected void initUi() {\n\t\t\n\t}",
"@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}",
"public Pregunta23() {\n initComponents();\n }",
"public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }",
"public AvtekOkno() {\n initComponents();\n }",
"public busdet() {\n initComponents();\n }",
"public ViewPrescriptionForm() {\n initComponents();\n }",
"public Ventaform() {\n initComponents();\n }",
"public Kuis2() {\n initComponents();\n }",
"public CreateAccount_GUI() {\n initComponents();\n }",
"public POS1() {\n initComponents();\n }",
"public Carrera() {\n initComponents();\n }",
"public EqGUI() {\n initComponents();\n }",
"public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\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 .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }",
"public nokno() {\n initComponents();\n }",
"public dokter() {\n initComponents();\n }",
"public ConverterGUI() {\n initComponents();\n }",
"public hitungan() {\n initComponents();\n }",
"public Modify() {\n initComponents();\n }",
"public frmAddIncidencias() {\n initComponents();\n }",
"public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }"
]
| [
"0.73191476",
"0.72906625",
"0.72906625",
"0.72906625",
"0.72860986",
"0.7248112",
"0.7213479",
"0.72078276",
"0.7195841",
"0.71899796",
"0.71840525",
"0.7158498",
"0.71477973",
"0.7092748",
"0.70800966",
"0.70558053",
"0.69871384",
"0.69773406",
"0.69548076",
"0.69533914",
"0.6944929",
"0.6942576",
"0.69355655",
"0.6931378",
"0.6927896",
"0.69248974",
"0.6924723",
"0.69116884",
"0.6910487",
"0.6892381",
"0.68921053",
"0.6890637",
"0.68896896",
"0.68881863",
"0.68826133",
"0.68815064",
"0.6881078",
"0.68771756",
"0.6875212",
"0.68744373",
"0.68711984",
"0.6858978",
"0.68558776",
"0.6855172",
"0.6854685",
"0.685434",
"0.68525875",
"0.6851834",
"0.6851834",
"0.684266",
"0.6836586",
"0.6836431",
"0.6828333",
"0.68276715",
"0.68262815",
"0.6823921",
"0.682295",
"0.68167603",
"0.68164384",
"0.6809564",
"0.68086857",
"0.6807804",
"0.6807734",
"0.68067646",
"0.6802192",
"0.67943805",
"0.67934304",
"0.6791657",
"0.6789546",
"0.6789006",
"0.67878324",
"0.67877173",
"0.6781847",
"0.6765398",
"0.6765197",
"0.6764246",
"0.6756036",
"0.6755023",
"0.6751404",
"0.67508715",
"0.6743043",
"0.67387456",
"0.6736752",
"0.67356426",
"0.6732893",
"0.6726715",
"0.6726464",
"0.67196447",
"0.67157453",
"0.6714399",
"0.67140275",
"0.6708251",
"0.6707117",
"0.670393",
"0.6700697",
"0.66995865",
"0.66989213",
"0.6697588",
"0.66939527",
"0.66908985",
"0.668935"
]
| 0.0 | -1 |
Close the socket first to prevent new messages. | @Override
public void stop() {
try {
serverSocket.close();
}
catch (IOException e) {
getExceptionHandler().receivedException(e);
}
// Close all open connections.
synchronized (listConnections) {
for (TcpConnectionHandler tch : listConnections)
tch.kill();
listConnections.clear();
}
// Now close the executor service.
executorService.shutdown();
try {
executorService.awaitTermination(3, TimeUnit.SECONDS);
}
catch (InterruptedException e) {
getExceptionHandler().receivedException(e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void closeSocket() { //gracefully close the socket connection\n\t\ttry {\n\t\t\tthis.os.close();\n\t\t\tthis.is.close();\n\t\t\tthis.clientSocket.close();\n\t\t} \n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"XX. \" + e.getStackTrace());\n\t\t}\n\t}",
"public void closeSocket() { //gracefully close the socket connection\r\n try {\r\n this.os.close();\r\n this.is.close();\r\n this.clientSocket.close();\r\n } \r\n catch (Exception e) {\r\n System.out.println(\"XX. \" + e.getStackTrace());\r\n }\r\n }",
"public void closeSocket() {\n\t\t\ttry {\n\t\t\t\tsocket.close();\n\t\t\t} catch (java.io.IOException e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t}",
"@Override\r\n\tpublic void close() {\r\n\t\tthis.socket.close();\r\n\t}",
"public void close(){\n\t\tlog.debug(\"[SC] Close called\", 5);\n\t\tif(socket!=null){\n\t\t\tlog.debug(\"[SC] Closing socket\", 4);\n\t\t\ttry {\n\t\t\t\tThread.sleep(10);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t//Silly impatient thread\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tout.close();\n\t\t\t\tin.close();\n\t\t\t\tsocket.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t//we're going to close it anyway\n\t\t\t}\n\t\t\tsocket = null;\n\t\t\trun = false;\n\t\t}\n\t}",
"public void close() {\n\t\tmainSocket.close();\n\t}",
"public void close() {\r\n\t\tif (socket != null)\r\n\t\t\tsocket.close();\r\n\t}",
"public void close() {\n try {\n closeConnection(socket);\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }",
"public void close()\n {\n \tSystem.out.println(\"close\");\n \tsend(\"<message> <disconnect/></message>\");\n \ttry {\n\t\t\tsocket.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n }",
"@Override\n public void close() throws IOException {\n opened = false;\n if (socket != null) {\n Utils.closeSilent(dis);\n Utils.closeSilent(dos);\n socket.close();\n }\n }",
"public void closeSocket () \n {\n try {\n // close the open server socket\n server.close();\n // send it a message to make it stop waiting immediately\n // (not really necessary)\n /*Socket s = new Socket(\"localhost\", thisPort);\n OutputStream os = s.getOutputStream();\n os.write((byte)0);\n os.close();\n s.close();*/\n } catch(Exception ex) { \n LOG.warn(\"Exception while shutting down \"+ this.getClass(), ex);\n }\n \n server = null;\n }",
"@Override\r\n public void close() {\r\n sock.close();\r\n }",
"private void closeInternal() {\n try {\n synchronized (internalLock) {\n if (!isClosed) {\n isClosed = true;\n if (socket != null) {\n socket.close();\n pendingMessages = true;\n internalLock.notify();\n }\n }\n }\n } catch (IOException e) {\n // This should never happen\n }\n }",
"void closeSocket() {\n try {\n if (outputStream != null && clientSocket != null) {\n outputStream.close();\n clientSocket.close();\n }\n } catch (IOException e) {\n getLog().error(\"Error while closing TCP client socket connection\", e);\n }\n }",
"void closeSocket() {\n\t\tint size = threads.size();\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (threads.get(i) == this) {\n\t\t\t\tthreads.remove(i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\n\t\tprintActiveClients();\n\n\t\ttry {\n\t\t\tmessageBuffer.add(name + \" has just left the chatroom...\");\n\t\t\tinputStream.close();\n\t\t\toutputStream.close();\n\t\t\tclientSocket.close();\n\t\t\treturn;\n\t\t} catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t} catch (InterruptedException ine) {\n\t\t\treturn;\n\t\t}\n\t}",
"public void terminate() {\n\t\tif (socket == null)\n\t\t\tthrow new IllegalStateException();\n\t\ttry {\n\t\t\tsocket.close();\n\t\t} catch (IOException e) {}\n\t}",
"private void closeConnection() {\r\n try {\r\n socket.close();\r\n } catch (IOException ex) {\r\n // Ex on close\r\n }\r\n }",
"public int closeSocket() \n\t{\n\t\t\n\t}",
"public void close() {\n try {\n inputStream.close();\n } catch(IOException e) {\n GenericIO.writelnString(Thread.currentThread().getName()\n + \" - could not close the socket's input stream!\");\n e.printStackTrace();\n System.exit(1);\n }\n\n try {\n outputStream.close();\n } catch(IOException e) {\n GenericIO.writelnString(Thread.currentThread().getName()\n + \" - could not close the socket's output stream!\");\n e.printStackTrace();\n System.exit(1);\n }\n\n try {\n commSocket.close();\n } catch(IOException e) {\n GenericIO.writelnString(Thread.currentThread().getName()\n + \" - could not close the communication socket!\");\n e.printStackTrace();\n System.exit(1);\n }\n }",
"public void closeSocket()\n\t{\n\t\ttry\n\t\t{\n\t\t\tfor (CharData chs : replyList)\n\t\t\t{\n\t\t\t\tchs.conn.replyList.remove(ch);\n\t\t\t\tchs.sendln(\"Your reply list has changed.\");\n\t\t\t}\n\t\t\t\n\t\t\tif (saveable)\n\t\t\t{\n\t\t\t\tif (realCh != null)\n\t\t\t\t\tStaffCommands.doReturn(this, \"\");\n\t\t\t\t\n\t\t\t\tch.save();\n\t\t\t\tDatabase.saveAccount(this);\n\t\t\t}\n\t\t\t\n\t\t\tconnSocket.close();\n\t\t} catch (Exception e) {\n\t\t\tsysLog(\"bugs\", \"Error in closeSocket: \"+e.getMessage());\n\t\t\tlogException(e);\n\t\t}\n\t}",
"public void dispose() {\n\t\tsocket.close();\n\t}",
"private static void closeSocket(Socket socket) {\n try {\n if(!socket.isClosed()) {\n socket.close();\n }\n } catch(IOException ex) {}\n }",
"public void close() {\n try {\n socket.close();\n } catch (IOException e) {\n renderablePublisher.submit(new ServerOfflineUpdate());\n }\n }",
"@Override\n\tpublic void close() {\n\t\tfinal Socket input = getSocket();\n\n\t\tif (input != null) {\n\t\t\tif (!input.isClosed()) {\n\t\t\t\ttry {\n\t\t\t\t\tinput.close();\n\t\t\t\t} catch (final IOException e) {\n\t\t\t\t\t// we cannot do anything\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void close() throws IOException {\n if (socket != null) {\n socket.close();\n }\n\n }",
"public void stop() {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tif (socket != null) {\n\t\t\t\tsocket.close();\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"Socket closed.\");\n\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n\t\n\t\t}\n\t}",
"@Override\n public void close() throws IOException\n {\n if(socket != null)\n {\n socket.close();\n }\n }",
"public void close()\n {\n try\n {\n System.out.println(\"CLIENT chiude connessione\");\n receiverThread.interrupt();\n socket.close();\n System.exit(0);\n }\n catch (IOException e)\n {\n System.out.println(e.getMessage());\n System.exit(1);\n }\n }",
"public void close() {\n try {\n socket.close();\n outputStream.close();\n inputStream.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void cancel() {\r\n\t\t\ttry {\r\n\t\t\t\tsocket.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t//pass\r\n\t\t\t}\r\n\t\t}",
"public void close() {\n try {\n socket.close();\n sInput.close();\n sOutput.close();\n sInput = null;\n socket = null;\n } catch (IOException e) {\n System.out.println(\"Logged Out.\");\n }\n }",
"@Override\r\n public synchronized void close()\r\n {\r\n if (!isRunning)\r\n {\r\n throw new IllegalStateException(\"already stopped!\");\r\n }\r\n threadPool.shutdownNow();\r\n socket.close();\r\n isRunning = false;\r\n }",
"void close() {\n try {\n socketInput.close();\n socketOutput.close();\n this.connected = false;\n } catch (IOException e) {\n throw new UnexpectedBehaviourException();\n }\n }",
"public void close(){\r\n\t\ttry {\r\n\t\t\tif(mServerSocket != null) mServerSocket.close();\r\n\t\t\tif(clientSocket != null) clientSocket.close();\r\n\t\t} catch (IOException e) { e.printStackTrace(); }\r\n\t}",
"public synchronized void close(){\n if(connected){\n try{\n socket.close();\n streamIn.close();\n streamOut.close();\n System.out.println(clientID+\": close: socket\"); \n }catch(IOException ioe){\n System.out.println(clientID+\": close: IOException:\"+ioe);\n }\n }else if(isHost){\n try{\n hostSocket.close();\n System.out.println(clientID+\": close: hostSocket\"); \n }catch(IOException ioe){\n System.out.println(clientID+\": close: IOException:\"+ioe);\n }\n }\n }",
"private void close() {\n\t\ttry {\n\t\t\tsendCommand(\"end\\n\");\n\t\t\tout.close();\n\t\t\tin.close();\n\t\t\tsocket.close();\n\t\t} catch (MossException e) {\n\t\t} catch (IOException e2) {\n\t\t} finally {\n\t\t\tcurrentStage = Stage.DISCONNECTED;\n\t\t}\n\n\t}",
"public void cancel() {\r\n\t\t\ttry {\r\n\t\t\t\tsocket.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}",
"public void close() {\n // close socket\n if (socket != null) {\n try {\n socket.close();\n } catch (IOException e) {\n // ignore\n }\n }\n\n socket = null;\n in = null;\n out = null;\n\n // try to stop dispather\n if (dispatcher != null) {\n dispatcher.setStopped(true);\n dispatcher.interrupt();\n }\n\n // notify all blocked thread\n if (requests != null) {\n for (Element element : requests.values()) {\n if (element.lock != null) {\n synchronized (element.lock) {\n element.lock.notify();\n }\n } else {\n // TODO notify persistent search listeners\n }\n }\n requests.clear();\n requests = null;\n }\n\n }",
"@Override\n public void close() throws IOException {\n inputMessageStream.close();\n outputMessageStream.close();\n socket.close();\n }",
"public void cancel() {\n try {\n mSocket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void close() {\n socket.close();\n game.close();\n this.running = false;\n }",
"public void close()\r\n {\r\n datagramSocket.close();\r\n datagramSocket=null;\r\n }",
"public void cancel() {\n\t\t\ttry {\n\t\t\t\tmmSocket.close();\n\t\t\t} catch (IOException e) { }\n\t\t}",
"public void cancel() {\n\t\t\ttry {\n\t\t\t\tmmSocket.close();\n\t\t\t} catch (IOException e) { }\n\t\t}",
"public void exit() {\r\n\t\tsendReceiveSocket.close();\r\n\t}",
"@Override\n public void close() throws IOException {\n if (clientSocket != null) {\n clientSocket.close();\n }\n }",
"public void disconnect() {\n try {\n if (socket != null)\n socket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n isConnected = false;\n }",
"public synchronized void closeConnection() {\n try {\n connected = false;\n socket.close();\n System.out.println(\"[SERVER] Connection closed with client\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void cancel() {\n try {\n mmSocket.close();\n } catch (IOException e) { }\n }",
"public void cancel() {\n try {\n mmSocket.close();\n } catch (IOException e) { }\n }",
"public void cancel() {\n try {\n mmSocket.close();\n } catch (IOException e) { }\n }",
"private void closeConnection() throws IOException {\n\t\tclientSocket.close();\n\t}",
"public void closeConnection() {\n try {\n socket.close();\n oStream.close();\n } catch (Exception e) { }\n }",
"public static void closeServerSocket(){\r\n\r\n try{\r\n serverObjectInputStream.close();\r\n //serverInputStream.close();\r\n serverObjectOutputStream.close();\r\n //serverOutputStream.close();\r\n socket.close();\r\n }catch (IOException ioe){\r\n ioe.printStackTrace();\r\n //TODO - log error with good error code and stuff\r\n }\r\n }",
"public void cancel() {\n try {\n mmSocket.close();\n } catch (IOException e) {\n\n }\n }",
"private void closeFedSockets() {\r\n try {\r\n cSocket.close();\r\n } catch (Exception e) {\r\n if (!FLAG) {\r\n System.err.println(\"Error closing Client Socket\");\r\n }\r\n FedLog.writeLog(this.getPeerIP().split(\":\")[1], \"masterLog%g-\" + this.getPeerIP().substring(2) + \".log\", FedLog.getExceptionStack(e), \"severe\");\r\n }\r\n try {\r\n sSocket.close();\r\n } catch (Exception e) {\r\n if (!FLAG) {\r\n System.err.println(\"Error closing Server Socket\");\r\n }\r\n FedLog.writeLog(this.getPeerIP().split(\":\")[1], \"masterLog%g-\" + this.getPeerIP().substring(2) + \".log\", FedLog.getExceptionStack(e), \"severe\");\r\n }\r\n }",
"private void closeConnection(){\n report(\"Close connection\");\n try{\n if(socket != null && !socket.isClosed()) {\n report(\"Client: Close socket\");\n socket.close();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n report(\"End\");\n }",
"public static void closeSocketClient(){\r\n\r\n try{\r\n clientObjectInputStream.close();\r\n clientObjectOutputStream.close();\r\n socket.close();\r\n\r\n System.out.println(\"Client: Socket and all streams were closed successfully!\");\r\n\r\n }catch (java.io.IOException ioe){\r\n ioe.printStackTrace();\r\n //TODO - send error message to server, we won't handle it here\r\n }\r\n }",
"public synchronized void close() {\n\n String userInput ;\n String fromServer ;\n try {\n userInput = \"QUIT\";\n out.println(\"Client: \" + userInput);\n output.println(userInput); // send QUIT command\n fromServer = input.readLine();\n //out.println(\"Server: \" + fromServer);\n\n if (fromServer.substring(0, 3).equals(\"221\")){ // 221: connection is closed successfully\n socket.close();\n System.exit(0);\n }\n } catch (IOException e) {\n // ignore any exception\n }\n }",
"public void shutdown() {\n try {\n \t\n \tserverSocket.close();\n \t\n } catch (Exception e) {\n System.err.println(e.getMessage());\n e.printStackTrace();\n }\n }",
"public void cancel() {\r\n try {\r\n blueSocket.close();\r\n } catch (IOException e) { }\r\n }",
"private void closeStreams() {\n try {\n windowForCommunication.append(\"Closing connection now.\" + \"\\n\");\n sendMessageToClient(\"ENDING CHAT: Closing connection now\");\n input.close();\n output.close();\n serverSocket.close();\n }\n catch(IOException e) {\n System.out.println(e);\n windowForCommunication.append(\"Uh oh. Seems like there was a communication error....!\");\n }\n }",
"public synchronized void close() throws IOException {\r\n\t\tif (closed) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tclosed = true;\r\n\t\tdatagramSocket.close();\r\n\t\tif (Log.isDebug()) {\r\n\t\t\tLog.debug(\"UDP listener shutdown for interface \" + getIface() + (getLocalAddress().isAnyLocalAddress() ? \"\" : \" on \" + getLocalAddress().toString()) + \" and port \" + getLocalPort() + \".\", Log.DEBUG_LAYER_COMMUNICATION);\r\n\t\t}\r\n\r\n\t\tdatagramSocket = null;\r\n\t}",
"public void shutDown()\n {\n stunStack.removeSocket(serverAddress);\n messageSequence.removeAllElements();\n localSocket.close();\n }",
"public void close() {\n\t\ttry {\n\t\t\t_inputStream.close();\n\t\t\t_outputStream.close();\n\t\t\t_socket.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"public void cancel() {\n try {\n mSocket.close();\n } catch (IOException e) {\n Log.e(TAG, \" failed to close socket\" + e.getMessage());\n }\n }",
"@SuppressWarnings(\"unused\")\n\t\t\tpublic void cancel() {\n\t try {\n\t mmSocket.close();\n\t } catch (IOException e) { }\n\t }",
"public void close() {\n this.consoleListenerAndSender.shutdownNow();\n this.serverListenerAndConsoleWriter.shutdownNow();\n try {\n this.getter.close();\n this.sender.close();\n this.socket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public synchronized void shutdown() {\n // mark this as no longer running\n active = false;\n\n // close the socket\n try {\n if (socketNode != null) {\n socketNode.close();\n socketNode = null;\n }\n } catch (Exception e) {\n getLogger().info(\"Excpetion closing socket\", e);\n // ignore for now\n }\n\n // stop the connector\n if (connector != null) {\n connector.interrupted = true;\n connector = null; // allow gc\n }\n if (advertiseViaMulticastDNS) {\n zeroConf.unadvertise();\n }\n }",
"private void close() {\n\t\tif (socketChannel != null) {\n\t\t\ttry {\n\t\t\t\tif (in != null) {\n\t\t\t\t\tin.close();\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\tlog.log(Level.SEVERE, \"Close in stream \", e);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (out != null) {\n\t\t\t\t\tout.close();\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\tlog.log(Level.SEVERE, \"Close out stream \", e);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tsocketChannel.close();\n\t\t\t} catch (IOException ex) {\n\t\t\t\tlog.log(Level.SEVERE, \"Can't close socket channel\", ex);\n\t\t\t}\n\n\t\t}\n\t\t//Defender.stopConnection();\n\t}",
"public void stopClient() {\n if (sendToSocket != null) {\n try {\n sendToSocket.flush();\n sendToSocket.close();\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n readFromSocket = null;\n sendToSocket = null;\n }",
"public void closeUDPServer()\n\t{\n\t\t//System.out.println(\"******Closing UDP socket*******\");\n\t\tdataSocket.close();\n\t\tUDPRunning = false;\n\t}",
"private void close()\r\n {\r\n try \r\n {\r\n if(out != null) out.close();\r\n }\r\n catch(Exception e) {\r\n \r\n }\r\n try \r\n {\r\n if(in != null) in.close();\r\n }\r\n\r\n catch(Exception e) {\r\n \r\n };\r\n try \r\n {\r\n if(socket != null) socket.close();\r\n }\r\n catch (Exception e) {\r\n \r\n }\r\n }",
"public void disconnect() throws IOException {\n socket.close();\n socket = null;\n socketIn = null;\n socketOut = null;\n state = State.READY;\n }",
"public synchronized void closeAllSocket()\n {\n \ttry {\n \t\toutput.close();\n \t}\n \tcatch(Exception e)\n \t{\n \t\terror(e);\n \t}\t\n }",
"public static void close(Socket socket) {\r\n if (socket != null) {\r\n try {\r\n socket.close();\r\n }\r\n catch (IOException e) {}\r\n }\r\n }",
"public void cancel() {\n try {\n mmServerSocket.close();\n } catch (IOException ignored) { }\n }",
"private void closeConnection(Socket socket) throws IOException {\n reader.close();\n dataWriter.close();\n socket.close();\n }",
"public void closeConnection() {\n try {\n stdIn.close();\n socketIn.close();\n socketOut.close();\n }\n catch(IOException e) {\n e.printStackTrace();\n }\n }",
"public static void closeSocket(Socket socket) {\n\n try {\n\n if (socket != null) {\n socket.close();\n }\n\n } catch (Exception e) {\n logger.error(e);\n } finally {\n socket = null;\n }\n\n }",
"public void cancel() {\n try {\n mmServerSocket.close();\n } catch (IOException e) { }\n }",
"public void cancel() {\n try {\n mmServerSocket.close();\n } catch (IOException e) { }\n }",
"public void close() throws IOException {\n if (!serverSocket.isClosed()) {\n log.info(\"Closing listener on {}\", serverSocket.getLocalSocketAddress());\n runningThread.interrupt();\n serverSocket.close();\n }\n }",
"@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\ttry {\n\t\t\tif(socket!=null)\n\t\t\tsocket.close();\n\t\t}\n\t\tcatch(IOException e){\n\t\t\tLog.d(\"IOException\", \"Exception closing socket\");\n\t\t}\n\t}",
"public void disconnect() {\n\t\tif (sock != null) {\n\t\t\ttry {\n\t\t\t\tsock.close();\n\t\t\t} catch (IOException ioe) {\n\t\t\t} finally {\n\t\t\t\tsock = null;\n\t\t\t}\n\t\t}\n\t\toutStream.reset();\n\t\tdisconnected();\n\t}",
"private void shutdown() {\n\t\ttry {\n\t\t\tsock.close();\n\t\t\tgame.handleExit(this);\n\t\t\tstopped = true;\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t}",
"public void cancel() {\n try {\n mmServerSocket.close();\n } catch (IOException e) { }\n }",
"public void closeSocket(String socketId){\n userToSocket.remove(socketIdToUser.get(socketId));\n // un-assign socketId\n socketIdToUser.remove(socketId);\n }",
"public void close() throws IOException {\n /*\n * Set m_iport to 0, in order to quit out of the while loop\n * in the receiver thread.\n */\n\tint save_iport = m_iport;\n\n\tm_iport = 0;\n\n synchronized (closeLock) {\n if (open) {\n /*\n * Reset open flag early to prevent receive0 executed by\n * concurrent thread to operate on partially closed\n * connection\n */\n open = false;\n\n close0(save_iport, connHandle, 1);\n\n setMessageListener(null);\n\n /*\n * Reset handle and other params to default\n * values. Multiple calls to close() are allowed\n * by the spec and the resetting would prevent any\n * strange behaviour.\n */\n connHandle = 0;\n host = null;\n m_mode = 0;\n\n /*\n * Remove this connection from the list of open\n * connections.\n */\n int len = openconnections.size();\n for (int i = 0; i < len; i++) {\n if (openconnections.elementAt(i) == this) {\n openconnections.removeElementAt(i);\n break;\n }\n }\n\n open_count--;\n }\n }\n }",
"private void disconnect()\r\n\t{\r\n\t\tif (theSocket != null)\r\n\t\t{\r\n\t\t\ttheSocket.transmit(\"Disconnecting\");\r\n\t\t\twriteLine(\"Disconnecting...\", 0);\r\n\t\t\twriteLine(\"Closing socket\", 0);\r\n\t\t\ttheSocket.close();\r\n\t\t\ttheSocket = null;\r\n\t\t}\r\n\t\tif (theSocket == null)\r\n\t\t{\r\n\t\t\twriteLine(\"The Socket is null\", 0);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\twriteLine(\"We have now disconnected\", 0);\r\n\t\t}\r\n\t\trunning = false;\r\n\t}",
"public void disconnect() {\n\t\ttry {\n\t\t\tif(sInput != null) sInput.close();\n\t\t}\n\t\tcatch(Exception e) {} // not much else I can do\n\t\ttry {\n\t\t\tif(sOutput != null) sOutput.close();\n\t\t}\n\t\tcatch(Exception e) {} // not much else I can do\n try{\n\t\t\tif(socket != null) socket.close();\n\t\t}\n\t\tcatch(Exception e) {} // not much else I can do\n\n\n\t}",
"public void stop() {\n\t\ttry {\n\t\t\tif (serverSocket != null)\n\t\t\t\tserverSocket.close();\n\t\t} catch (IOException ioe) {\n\t\t\t// shouldn't happen\n\t\t}\n\t}",
"public void close() {\n synchronized(this) {\n for(Enumeration e = connections.elements();e.hasMoreElements();) {\n try {\n ((Socket)e.nextElement()).close();\n } catch(InterruptedIOException ex) {\n Thread.currentThread().interrupt();\n } catch(IOException ex) {\n } catch(RuntimeException ex) {\n }\n }\n }\n\n try {\n serverSocket.close();\n } catch(InterruptedIOException ex) {\n Thread.currentThread().interrupt();\n } catch(IOException ex) {\n } catch(RuntimeException ex) {\n }\n }",
"@Override\n public void closeConnection() {\n\n System.out.println(\"[CLIENT] Closing socket connection...\");\n try {\n socket.close();\n in.close();\n out.close();\n System.out.println(\"[CLIENT] Closed socket connection.\");\n } catch (IOException e) {\n System.out.println(\"[CLIENT] Error occurred when closing socket\");\n }\n System.exit(0);\n\n }",
"public void cancel() {\r\n mStopped = true;\r\n try {\r\n mSocket.close();\r\n } catch (IOException ioe) {\r\n Log.e(Common.TAG, \"Error closing the socket: \" + ioe.getMessage());\r\n }\r\n }",
"public void cancel() {\n try {\n mmServerSocket.close();\n } catch (IOException e) {\n Log.e(\"TEST\", \"Could not close the connect socket\", e);\n }\n\n }",
"public void close(){\r\n\t\tif(managedOutputSocket != null) managedOutputSocket.close();\r\n\t\tmanagedOutputSocket = null;\r\n\t\tsuper.close();\r\n\t}",
"public void cancel() {\n try {\n\n mServerSocket.close();\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void cancel() {\r\n\t\t\ttry {\r\n\t\t\t\tmmServerSocket.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}",
"public void closeConnection() {\n\t\ttry {\n\t\t\tsocket.close();\n\t\t} catch (IOException e) {\n\t\t\tlogger.warning(\"problem closing socket connection with JSON-RPC server at \" + serverIP + \":\" + serverPort);\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void cancel() {\n try {\n mmServerSocket.close();\n } catch (IOException e) {\n Log.e(TAG, \"Could not close the connect socket\", e);\n }\n }"
]
| [
"0.8066156",
"0.8031883",
"0.797965",
"0.79319096",
"0.7868047",
"0.7801767",
"0.7729246",
"0.7713242",
"0.7684017",
"0.76756805",
"0.76739955",
"0.76644987",
"0.75914353",
"0.757805",
"0.7562244",
"0.75353134",
"0.7489918",
"0.74020296",
"0.73753524",
"0.7357996",
"0.7353639",
"0.7333293",
"0.73329",
"0.7314025",
"0.73126",
"0.7300513",
"0.72825676",
"0.72781783",
"0.7270026",
"0.723448",
"0.7229088",
"0.72270375",
"0.72208965",
"0.7190955",
"0.7182981",
"0.7161582",
"0.7102661",
"0.7094219",
"0.7088918",
"0.70635414",
"0.7033667",
"0.70320886",
"0.7018148",
"0.7018148",
"0.6989014",
"0.69618523",
"0.69585043",
"0.69573766",
"0.69459695",
"0.69459695",
"0.69459695",
"0.6943155",
"0.6938241",
"0.69373524",
"0.69302666",
"0.69118196",
"0.69063026",
"0.6900389",
"0.6898616",
"0.6889395",
"0.68823737",
"0.68805176",
"0.68762493",
"0.6868692",
"0.68639696",
"0.686068",
"0.6859281",
"0.6856461",
"0.6844813",
"0.6841775",
"0.68325764",
"0.6832397",
"0.6824594",
"0.6815265",
"0.680836",
"0.68071705",
"0.67879236",
"0.6787075",
"0.6783079",
"0.6771371",
"0.6768251",
"0.6768251",
"0.6758058",
"0.67574435",
"0.6754754",
"0.67540616",
"0.67474616",
"0.6745846",
"0.67277056",
"0.672408",
"0.6721356",
"0.67180604",
"0.6702751",
"0.6697301",
"0.6689296",
"0.66834134",
"0.6674188",
"0.6673227",
"0.6670191",
"0.66682845",
"0.6659514"
]
| 0.0 | -1 |
A debugging utility that prints to stdout the component's minimum, preferred, and maximum sizes. | public static void printSizes(Component c) {
System.out.println("minimumSize = " + c.getMinimumSize());
System.out.println("preferredSize = " + c.getPreferredSize());
System.out.println("maximumSize = " + c.getMaximumSize());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void printMetrics() {\n System.out.println(\"\\nPROG_SIZE = \" + Metrics.getProgSize() + '\\n' + \"EXEC_TIME = \" + Metrics.getExecTime() + \" ms\" + '\\n' + \"EXEC_MOVE = \" + Metrics.getExecMove() + '\\n' + \"DATA_MOVE = \" + Metrics.getDataMove() + '\\n' + \"DATA_READ = \" + Metrics.getDataRead() + '\\n' + \"DATA_WRITE = \" + Metrics.getDataWrite() + '\\n');\n }",
"public void debug()\r\n\t{\r\n\t\tfloat entriesPerSlot = (float) numEntries / (float) numFilledSlots;\r\n\r\n\t\tString result = \"Format of display is\\n\";\r\n\t\tresult += \"Slot number: data record\\n\\n\";\r\n\t\tresult += \"Current table size:\\t\\t\\t\\t\\t\\t\" + table.length + \"\\n\";\r\n\t\tresult += \"Number of elements in table:\\t\\t\\t\" + numEntries + \"\\n\";\r\n\t\tresult += \"Number of filled slots in table:\\t\\t\" + numFilledSlots + \"\\n\";\r\n\t\tresult += \"Average number of entries per slot is:\\t\" + entriesPerSlot + \"\\n\";\r\n\t\tSystem.out.println(result);\r\n\r\n\t\tfor (int i = 0; i < table.length; i++)\r\n\t\t{\r\n\t\t\t// If the current slot has a value in it\r\n\t\t\tif (table[i] != null && !table[i].isTombstone)\r\n\t\t\t{\r\n\t\t\t\t// Store the key that it stores\r\n\t\t\t\tresult = \"\\n\" + i + \":\\t\" + ((i < 100) ? \"\\t\" : \"\") + \"[\" + table[i].key.toString() + \", \";\r\n\r\n\t\t\t\t// Loop through all of the entries at that key\r\n\t\t\t\tfor (V entry : table[i].value)\r\n\t\t\t\t{\r\n\t\t\t\t\t// Store the next value at that key\r\n\t\t\t\t\tresult += \"(\" + entry.toString() + \"), \";\r\n\t\t\t\t}\r\n\r\n\t\t\t\tresult = result.substring(0, result.length() - 2) + \"]\";\r\n\t\t\t\tSystem.out.println(result);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void print_dev() {\n\t\tSystem.out.println(\r\n\t\t\t\t\t\t\t\t\t\"[System] 펫 정보입니다.\\n 이름 : \"+TMGCSYS.tmgcName\r\n\t\t\t\t\t\t\t\t+\t\", 레벨 : \"+TMGCSYS.tmgcLV+\", 경험치 : \"+TMGCSYS.tmgcEXP+\"/\"+(100*TMGCSYS.tmgcLV)\r\n\t\t\t\t\t\t\t\t+\t\", 체력 : \"+TMGCSYS.tmgcHP+\", 스트레스 : \"+TMGCSYS.tmgcStress+\"\\n\\n\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Function Limit Count\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Eat : \"+TMGCSYS.tmgcLimitEat+\", Sleep : \"+TMGCSYS.tmgcLimitSleep\r\n\t\t\t\t\t\t\t\t+\t\", Walk : \"+TMGCSYS.tmgcLimitWalk+\", Study : \"+TMGCSYS.tmgcLimitStudy+\"\\n\\n\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Character Ability\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" STR : \"+TMGCSYS.tmgcSTR+\", INT : \"+TMGCSYS.tmgcINT\r\n\t\t\t\t\t\t\t\t+\t\", DEB : \"+TMGCSYS.tmgcDEB+\", HET : \"+TMGCSYS.tmgcHET+\"\\n\\n\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Character Job : \"+TMGCSYS.tmgc2ndJob\r\n\t\t\t\t\t\t\t\t);\r\n\t}",
"public void printDimensions() {\n System.out.println(\"[rows = \" + numRows() + \" , cols = \" + numCols() + \" ]\");\n }",
"public static void showMemoryInfo()\r\n\t{ \r\n\t\tRuntime rt = Runtime.getRuntime(); \r\n\t\tpf(\"Maxx : \\t %d Kb\\n\", rt.maxMemory() / 1024); \r\n\t\tpf(\"Free : \\t %d Kb\\n\", rt.freeMemory() / 1024); \r\n\t\tpf(\"Totl : \\t %d Kb\\n\", rt.totalMemory() / 1024); \r\n\t\tpf(\"Used : \\t %d Kb\\n\", (rt.totalMemory()-rt.freeMemory()) / 1024); \r\n\t}",
"public void display() {\r\n System.out.println(firstPrompt + \"[\" + minScale + \"-\" + maxScale + \"]\");\r\n }",
"public void showDetails(){\r\n\t\tSystem.out.println(\"Length is : \"+getLength());\r\n\t\tSystem.out.println(\"Width is : \"+getWidth());\r\n\t\tSystem.out.println(\"Area Of Rectangle is : \"+area());\r\n\t}",
"public void printSize() {\n\t\tSystem.out.println(\" S1->\" + s1.size() + \" S2->\" + s2.size());\n\t}",
"ReadOnlyDoubleProperty displayMinimumProperty();",
"protected void dumpStats() {\n\t\t// Print the header.\n\t\tSystem.out.println(\"\\n\"+phCode+\" \"+minDelta+\" \"+maxDelta);\n\t\t\n\t\t// Print the data.\n\t\tSystem.out.println(\"Bias:\");\n\t\tfor(int j=0; j<bias.size(); j++) {\n\t\t\tSystem.out.format(\" %3d range = %6.2f, %6.2f fit = %11.4e, \"+\n\t\t\t\t\t\"%11.4e\\n\",j,bias.get(j).minDelta,bias.get(j).maxDelta,\n\t\t\t\t\tbias.get(j).slope,bias.get(j).offset);\n\t\t}\n\t\tSystem.out.println(\"Spread:\");\n\t\tfor(int j=0; j<spread.size(); j++) {\n\t\t\tSystem.out.format(\" %3d range = %6.2f, %6.2f fit = %11.4e, \"+\n\t\t\t\t\t\"%11.4e\\n\",j,spread.get(j).minDelta,spread.get(j).maxDelta,\n\t\t\t\t\tspread.get(j).slope,spread.get(j).offset);\n\t\t}\n\t\tSystem.out.println(\"Observability:\");\n\t\tfor(int j=0; j<observ.size(); j++) {\n\t\t\tSystem.out.format(\" %3d range = %6.2f, %6.2f fit = %11.4e, \"+\n\t\t\t\t\t\"%11.4e\\n\",j,observ.get(j).minDelta,observ.get(j).maxDelta,\n\t\t\t\t\tobserv.get(j).slope,observ.get(j).offset);\n\t\t}\n\t}",
"public void printComputerSummary() {\n\t\tfor (Component comp: configuration.values())\n\t\t{\n\t\t\tSystem.out.println(comp.getDescription());\n\t\t}\n\t}",
"public void displayMinValues() {\n if (deltaX < deltaXMin) {\n deltaXMin = deltaX;\n minX.setText(_DF.format(deltaXMin));\n }\n if (deltaY < deltaYMin) {\n deltaYMin = deltaY;\n minY.setText(_DF.format(deltaYMin));\n }\n if (deltaZ < deltaZMin) {\n deltaZMin = deltaZ;\n minZ.setText(_DF.format(deltaZMin));\n }\n }",
"@Override\n public String toString() {\n // Determine the width required for the maximum element,\n // and check for fractional display requirement.\n double maxval = 0;\n boolean fractional = false;\n for (int i = 0; i < getRowDimension(); i++) {\n for (int j = 0; j < getColumnDimension(); j++) {\n double current = get(i, j);\n if (current < 0)\n current *= -11;\n if (current > maxval)\n maxval = current;\n double fract = Math.abs(current - Math.rint(current));\n if (!fractional\n && ((Math.log(fract) / Math.log(10)) >= -2)) {\n fractional = true;\n }\n }\n }\n int width = (int)(Math.log(maxval) / Math.log(10)\n + (fractional ? 4 : 1));\n\n StringBuffer text = new StringBuffer();\n for (int i = 0; i < getRowDimension(); i++) {\n for (int j = 0; j < getColumnDimension(); j++)\n text.append(\" \").append(Functions.doubleToString(get(i, j),\n width, (fractional ? 2 : 0)));\n text.append(\"\\n\");\n }\n\n return text.toString();\n }",
"@Override\n\tpublic void showSize() {\n\t\tSystem.out.print(\"This pen is small.\");\n\t}",
"public void Display() {\n\t\tSystem.out.println(Integer.toHexString(PID) + \"\\t\" + Integer.toString(CreationTime) + \"\\t\"+ Integer.toHexString(CommandCounter) + \"\\t\" + ProcessStatus.toString() \n\t\t+ \"\\t\" + Integer.toString(MemoryVolume) + \"\\t\" + Integer.toHexString(Priority) + \"\\t\" + ((MemorySegments != null)? MemorySegments.toString() : \"null\"));\n\t}",
"public String toString()\n {\n return \"The tesseract's dimensions are \" + getLength() + \" X \" + getWidth() + \" X \" + getHeight() + \" X \" + getwDimension();\n }",
"private static void showValues(Derived derived) {\n\t\tSystem.out.println(\"\\n\\tX = \" + derived.getX()\n\t\t+ \";\\tY = \" + derived.getY() + \";\\tZ = \"\n\t\t+ derived.getZ() + \";\\tThe Largest Value Is : \"\n\t\t+ derived.getLargestValue());\n\t}",
"@Override\n public String toString()\n {\n\treturn getClass().getSimpleName() + \" (\" + getLength() + \"x\" + getWidth() + \")\";\n }",
"public static String debugString()\n {\n return\n \"ECSDefaults:\" + '\\n'\n + '\\t' + \"DefaultFilterState=\" + getDefaultFilterState() +'\\n'\n + '\\t' + \"DefaultFilterAttributeState=\" + getDefaultFilterAttributeState() +'\\n'\n + '\\t' + \"DefaultAttributeEqualitySign='\" + getDefaultAttributeEqualitySign() +\"'\\n\"\n + '\\t' + \"DefaultBeginStartModifier='\" + getDefaultBeginStartModifier() + \"'\\n\"\n + '\\t' + \"DefaultEndStartModifier='\" + getDefaultEndStartModifier() + \"'\\n\"\n + '\\t' + \"DefaultBeginEndModifier='\" + getDefaultBeginEndModifier() + \"'\\n\"\n + '\\t' + \"DefaultEndEndModifier='\" + getDefaultEndEndModifier() + \"'\\n\"\n + '\\t' + \"DefaultAttributeQuoteChar=\" + getDefaultAttributeQuoteChar() + '\\n'\n + '\\t' + \"DefaultAttributeQuote=\" + getDefaultAttributeQuote() +'\\n'\n + '\\t' + \"DefaultEndElement=\" + getDefaultEndElement() +'\\n'\n + '\\t' + \"DefaultCodeset='\" + getDefaultCodeset() + \"'\\n\"\n + '\\t' + \"DefaultPosition=\" + getDefaultPosition() +'\\n'\n + '\\t' + \"DefaultCaseType=\" + getDefaultCaseType() +'\\n'\n + '\\t' + \"DefaultStartTag='\" + getDefaultStartTag() + \"'\\n\"\n + '\\t' + \"DefaultEndTag='\" + getDefaultEndTag() + \"'\\n\"\n + '\\t' + \"DefaultPrettyPrint=\" + getDefaultPrettyPrint();\n }",
"private String getTestMinVerticalExtentName() {\r\n\t\treturn (DDMSVersion.getCurrentVersion().isAtLeast(\"4.0.1\") ? \"minVerticalExtent\" : \"MinVerticalExtent\");\r\n\t}",
"public abstract void display(@NotNull InventoryComponent inventoryComponent, int paneOffsetX, int paneOffsetY,\r\n int maxLength, int maxHeight);",
"public void dump()\n\t{\n\n\t\tSystem.out.println(\"--- min-max heap dump --- \");\n\t\tSystem.out.println(\" Size = \" + size);\n\t\tSystem.out.println(\" Minimum = \" + getMin());\n\t\tSystem.out.println(\" Maximum = \" + getMax());\n\t\tif(getLevel(size)% 2 == 0 )\n\t\t{\n\t\t\tSystem.out.println(\"Last Level is Even\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"Last Level is Odd\");\n\t\t}\n\t\tSystem.out.println(\"--- heap data items --- \");\n\t\tfor(int i = 0; i < array.length; i++)\n\t\t{\n\t\t\tif(array[i] == null)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println(\"H[\" + (i+1) + \"] = \" + array[i]);\n\t\t}\n\n\t}",
"@Test\n public void printAdaptiveSizePolicy() throws Exception {\n TestLogHandler handler = new TestLogHandler();\n handler.setLevel(Level.WARNING);\n GCResource gcResource = new GcResourceFile(\"SampleSun1_7_0_12PrintAdaptiveSizePolicy.txt\");\n gcResource.getLogger().addHandler(handler);\n DataReader reader = getDataReader(gcResource);\n GCModel model = reader.read();\n Assert.assertEquals(\"gc pause\", 0.158757, model.getPause().getMax(), 1.0E-9);\n GCEvent heap = ((GCEvent) (model.getEvents().next()));\n Assert.assertEquals(\"heap\", ((65 * 1024) * 1024), heap.getPreUsed());\n // test parsing of decimal values\n Assert.assertEquals(\"heap\", ((64.3 * 1024) * 1024), heap.getPostUsed(), 100.0);\n Assert.assertEquals(\"heap\", ((92.0 * 1024) * 1024), heap.getTotal(), 100.0);\n Assert.assertEquals(\"number of errors\", 0, handler.getCount());\n }",
"static private void showSolution() {\n\t\tfor (int x = 1; x <= 6; ++x) {\n\t\t\tfor (int y = 1; y <= 6; ++y) {\n\t\t\t\tSystem.out.print(color[x - 1][y - 1]\n\t\t\t\t\t\t+ Messages.getString(\"dddcube.stringkey.0\")); //$NON-NLS-1$\n\t\t\t}\n\t\t\tSystem.out.print(Messages.getString(\"dddcube.stringkey.1\")); //$NON-NLS-1$\n\t\t\tfor (int y = 1; y <= 6; ++y) {\n\t\t\t\tSystem.out.print(offset[x - 1][y - 1]\n\t\t\t\t\t\t+ Messages.getString(\"dddcube.stringkey.0\")); //$NON-NLS-1$\n\t\t\t}\n\t\t\tSystem.out.print(Messages.getString(\"dddcube.stringkey.1\")); //$NON-NLS-1$\n\t\t\tbricks.showColorBricks(x);\n\n\t\t\tSystem.out.println(Messages.getString(\"dddcube.stringkey.2\")); //$NON-NLS-1$\n\t\t}\n\t}",
"public void print() {\n\t\tSystem.out.println(\"[System] 펫 정보입니다.\\n 이름 : \"+TMGCSYS.tmgcName+\", 레벨 : \"+TMGCSYS.tmgcLV+\", 경험치 : \"+TMGCSYS.tmgcEXP+\"/\"+(100*TMGCSYS.tmgcLV)+\", 체력 : \"+TMGCSYS.tmgcHP+\", 스트레스 : \"+TMGCSYS.tmgcStress);\r\n\t}",
"private void printOptionsMessage() {\n System.out.println(\"\\n\");\n System.out.print(\"Visible arrays: \");\n if (showArray == true) {\n System.out.println(\"On\");\n } else {\n System.out.println(\"Off\");\n }\n\n System.out.println(\"Selected Algorithms: \");\n if (selected[0] == true) {\n System.out.print(\" MergeSort\");\n }\n if (selected[1] == true) {\n System.out.print(\" QuickSort\");\n }\n if (selected[2] == true) {\n System.out.print(\" HeapSort\");\n }\n\n System.out.println();\n }",
"public void print()\n\t{\n\t\tminGenes = Integer.MAX_VALUE;\n\t\tmaxGenes = 0;\n\t\tcreatureGenesQty = 0;\n\t\tfor (Creature creature : creatures)\n\t\t{\n\t\t\tminGenes = (minGenes > creature.getGenotype().size()) ? creature\n\t\t\t\t\t.getGenotype().size() : minGenes;\n\t\t\tmaxGenes = (maxGenes < creature.getGenotype().size()) ? creature\n\t\t\t\t\t.getGenotype().size() : maxGenes;\n\t\t\tcreatureGenesQty += creature.getGenotype().size();\n\t\t\t//creature.print();\n\t\t\tSystem.out.println(\"--------------------------\");\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"--------------------------\");\n\t\t}\n\t\tavgGenes = creatureGenesQty / ((float) size());\n\n\t\t// add some statistics\n\t\tSystem.out.println(\"Population size: \" + size());\n\t\tSystem.out.println(\"Minimum number of genes: \" + minGenes);\n\t\tSystem.out.println(\"Average number of genes: \" + avgGenes);\n\t\tSystem.out.println(\"Maximum number of genes: \" + maxGenes);\n\t\tCreatureLog.info(String.valueOf(size()) + \"\\t\" + avgGenes + \"\\t\" + minGenes + \"\\t\" +maxGenes);\n\n\t}",
"private static void Display()\n\t{\n\t\tStringBuilder memoryValues = new StringBuilder();\n\t\tSystem.out.println(\"\\nPipleline Stages: \");\n\t\tif (stages.get(\"F\") != null)\n\t\t\tSystem.out.println(\"--------Fetch-----------> \" + stages.get(\"F\").getContent());\n\t\tif (stages.get(\"D\") != null)\n\t\t\tSystem.out.println(\"--------Decode----------> \" + stages.get(\"D\").getContent());\n\t\tif (stages.get(\"E\") != null)\n\t\t\tSystem.out.println(\"--------Execution1------> \" + stages.get(\"E\").getContent());\n\t\tif (stages.get(\"E2\") != null)\n\t\t\tSystem.out.println(\"--------Execution2------> \" + stages.get(\"E2\").getContent());\n\t\tif (stages.get(\"B1\") != null)\n\t\t\tSystem.out.println(\"--------Branch----------> \" + stages.get(\"B1\").getContent());\n\t\tif (stages.get(\"Dly\") != null)\n\t\t\tSystem.out.println(\"--------Delay-----------> \" + stages.get(\"Dly\").getContent());\n\t\tif (stages.get(\"M\") != null)\n\t\t\tSystem.out.println(\"--------Memory----------> \" + stages.get(\"M\").getContent());\n\t\tif (stages.get(\"W\") != null)\n\t\t\tSystem.out.println(\"--------Writeback-------> \" + stages.get(\"W\").getContent());\n\n\t\tSystem.out.println(\"\\nRegister File Details: \\n\");\n\t\tfor (Entry<String, Integer> register : registerFile.entrySet())\n\t\t{\n\t\t\tSystem.out.print(register.getKey() + \" : \" + register.getValue() + \"|\\t|\");\n\t\t}\n\t\tSystem.out.println(\"Special Register X:\" + specialRegister);\n\t\tSystem.out.println(\"\\n0 to 99 Memory Address Details: \");\n\t\tfor (int i = 0; i < 100; i++)\n\t\t{\n\t\t\tmemoryValues.append(\" [\" + i + \" - \" + memoryBlocks[i] + \"] \");\n\t\t\tif (i > 0 && i % 10 == 0)\n\t\t\t\tmemoryValues.append(\"\\n\");\n\t\t}\n\t\tSystem.out.println(memoryValues);\n\n\t}",
"public void printAllComponentsOnStdOut() {\r\n System.out.println(\"PackageComponent: \" + this.getName());\r\n System.out.println(\"Contains these ClassDiagramComponents: \");\r\n int counter = 1;\r\n for (ComponentBase component : classDiagramComponents) {\r\n System.out.println(\"Component no.\" + counter + \": \\t\" + component.getName());\r\n counter++;\r\n }\r\n }",
"protected String sizeString()\n {\n return (\" (\" + map.getSizeX() + \" x \" + map.getSizeY() + \")\");\n }",
"public int getMinSize() {\n return minSize;\n }",
"public void print() {\n\t\t\n\t\tfor (int j = 0; j < height(); j++) {\n\t\t\tfor (int i = 0; i < width(); i++) {\n\t\t\t\tSystem.out.printf(\"%3d \", valueAt(i, j));\n\t\t\t}\n\t\t\tSystem.out.printf(\"\\n\");\n\t\t}\n\t\tSystem.out.printf(\"\\n\");\t\n\t}",
"public String toString() {\n\t\treturn getClass().getName() + \"[mode=\" + mode + \",size=\" + size\n\t\t\t + \",hgap=\" + hgap + \",vgap=\" + vgap + \"]\";\n\t}",
"private void debug()\n {\n if (!checkTestNeeded())\n {\n String resolution = width + \"x\" + height + \"-\";\n\n boolean success = preferences.getBoolean(PREF_PREFIX + resolution + \"success\",false);\n if (!success)\n {\n throw new RuntimeException(\"Phone not supported with this resolution (\" + width + \"x\" + height + \")\");\n }\n\n nv21Convertor.setSize(width, height);\n nv21Convertor.setSliceHeigth(preferences.getInt(PREF_PREFIX + resolution + \"sliceHeight\", 0));\n nv21Convertor.setStride(preferences.getInt(PREF_PREFIX + resolution + \"stride\", 0));\n nv21Convertor.setYPadding(preferences.getInt(PREF_PREFIX + resolution + \"padding\", 0));\n nv21Convertor.setPlanar(preferences.getBoolean(PREF_PREFIX + resolution + \"planar\", false));\n nv21Convertor.setColorPanesReversed(preferences.getBoolean(PREF_PREFIX + resolution + \"reversed\", false));\n encoderName = preferences.getString(PREF_PREFIX + resolution + \"encoderName\", \"\");\n encoderColorFormat = preferences.getInt(PREF_PREFIX + resolution + \"colorFormat\", 0);\n base64PPS = preferences.getString(PREF_PREFIX + resolution + \"pps\", \"\");\n base64SPS = preferences.getString(PREF_PREFIX + resolution + \"sps\", \"\");\n\n return;\n }\n\n Log.d(TAG, \">>>> Testing the phone for resolution \" + width + \"x\" + height);\n\n // Builds a list of available encoders and decoders we may be able to use\n // because they support some nice color formats\n Codec[] encoders = CodecManager.findEncodersForMimeType(MIME_TYPE);\n Codec[] decoders = CodecManager.findDecodersForMimeType(MIME_TYPE);\n\n int count = 0;\n int n = 1;\n for (Codec encoder1 : encoders)\n {\n count += encoder1.formats.length;\n }\n\n // Tries available encoders\n for (Codec encoder1 : encoders)\n {\n for (int j = 0; j < encoder1.formats.length; j++)\n {\n reset();\n\n encoderName = encoder1.name;\n encoderColorFormat = encoder1.formats[j];\n\n Log.v(TAG, \">> Test \" + (n++) + \"/\" + count + \": \" + encoderName + \" with color format \" + encoderColorFormat + \" at \" + width + \"x\" + height);\n\n // Converts from NV21 to YUV420 with the specified parameters\n nv21Convertor.setSize(width, height);\n nv21Convertor.setSliceHeigth(height);\n nv21Convertor.setStride(width);\n nv21Convertor.setYPadding(0);\n nv21Convertor.setEncoderColorFormat(encoderColorFormat);\n\n // /!\\ NV21Convertor can directly modify the input\n createTestImage();\n data = nv21Convertor.convert(initialImage);\n\n try\n {\n // Starts the encoder\n configureEncoder();\n searchSPSandPPS();\n\n Log.v(TAG, \"SPS and PPS in b64: SPS=\" + base64SPS + \", PPS=\" + base64PPS);\n\n // Feeds the encoder with an image repeatedly to produce some NAL units\n encode();\n\n // We now try to decode the NALs with decoders available on the phone\n boolean decoded = false;\n for (int k = 0; k < decoders.length && !decoded; k++)\n {\n for (int l = 0; l < decoders[k].formats.length && !decoded; l++)\n {\n decoderName = decoders[k].name;\n decoderColorFormat = decoders[k].formats[l];\n try\n {\n configureDecoder();\n } catch (Exception e)\n {\n Log.d(TAG, decoderName + \" can't be used with \" + decoderColorFormat + \" at \" + width + \"x\" + height, e);\n\n releaseDecoder();\n break;\n }\n\n try\n {\n decode(true);\n Log.d(TAG, decoderName + \" successfully decoded the NALs (color format \" + decoderColorFormat + \")\");\n\n decoded = true;\n }\n catch (Exception e)\n {\n Log.e(TAG, decoderName + \" failed to decode the NALs\", e);\n }\n finally\n {\n releaseDecoder();\n }\n }\n }\n\n if (!decoded)\n {\n throw new RuntimeException(\"Failed to decode NALs from the encoder.\");\n }\n\n // Compares the image before and after\n if (!compareLumaPanes())\n {\n // TODO: try again with a different stride\n // TODO: try again with the \"stride\" param\n throw new RuntimeException(\"It is likely that stride != width\");\n }\n\n int padding;\n if ((padding = checkPaddingNeeded()) > 0)\n {\n if (padding < 4096)\n {\n Log.d(TAG, \"Some padding is needed: \" + padding);\n\n nv21Convertor.setYPadding(padding);\n createTestImage();\n data = nv21Convertor.convert(initialImage);\n encodeDecode();\n }\n else\n {\n // TODO: try again with a different sliceHeight\n // TODO: try again with the \"slice-height\" param\n throw new RuntimeException(\"It is likely that sliceHeight != height\");\n }\n }\n\n createTestImage();\n if (!compareChromaPanes(false))\n {\n if (compareChromaPanes(true))\n {\n nv21Convertor.setColorPanesReversed(true);\n Log.d(TAG, \"U and V pane are reversed\");\n }\n else\n {\n throw new RuntimeException(\"Incorrect U or V pane...\");\n }\n }\n\n saveTestResult(true);\n Log.v(TAG, \"The encoder \" + encoderName + \" is usable with resolution \" + width + \"x\" + height);\n return;\n }\n catch (Exception e)\n {\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n e.printStackTrace(pw);\n String stack = sw.toString();\n String str = \"Encoder \" + encoderName + \" cannot be used with color format \" + encoderColorFormat;\n Log.e(TAG, str, e);\n errorLog += str + \"\\n\" + stack;\n }\n finally\n {\n releaseEncoder();\n }\n }\n }\n\n saveTestResult(false);\n Log.e(TAG,\"No usable encoder were found on the phone for resolution \" + width + \"x\" + height);\n throw new RuntimeException(\"No usable encoder were found on the phone for resolution \" + width + \"x\" + height);\n }",
"public static void prtProperties() {\n prop.list(System.out);\n }",
"public void printSummary() {\n\t\tSystem.out.println(MessageFormat.format(\"\\nSummary:\\n Name: {0}\\n Range: 1 to {1}\\n\", this.name, this.numSides));\n\t}",
"public void printForDebug() {\n\t\tif(Globalconstantable.DEBUG)\n\t\t{\n\t\t\tSystem.out.println(this.getSID());\n\t\t\tSystem.out.println(this.getScores());\n\t\t}\n\t}",
"public void debugPrint() {\n System.out.println(\"### Image Handler ###\");\n System.out.println(\"Handling: \" + images.size());\n }",
"@Override\n\tpublic int getMinSizeX()\n\t{\n\t\treturn 50;\n\t}",
"public String getParameters() {\r\n\t\t\r\n\t\tString strLength = String.valueOf(length);\r\n\t\tString strWidth = String.valueOf(width);\r\n\t\tString strHeight = String.valueOf(height);\r\n\t\t\r\n\t\treturn \"Length: \" + strLength + \"\\nWidth: \" + strWidth + \"\\nHeight: \" + strHeight;\r\n\t}",
"public void printDebugMaze() {\n\t\tSystem.out.println(width);\n\t\tSystem.out.println(height);\n\n\t\tfor (int y = 0; y < height; y++) {\n\t\t\tfor (int x = 0; x < width; x++) {\n\t\t\t\tSystem.out.print(maze[x][y]);\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t}",
"public String toDebugString();",
"public void printConfig();",
"@Override\n public String toString() {\n return name + \"Min Dist: \" + minDistance;\n }",
"public void printPackagePowerUsage() {\n }",
"public Printable getPrintableComponent();",
"public void print(){\r\n\t\tSystem.out.println(\"Size of each block:\\t\\t\" + this.blockSize);\r\n\t\tSystem.out.println(\"Total Number of Inodes:\\t\\t\" + this.inodeCount);\r\n\t\tSystem.out.println(\"Total Number of Blocks:\\t\\t\" + this.blocksCount);\r\n\t\tSystem.out.println(\"Number of Free Blocks:\\t\\t\" + this.freeBlocksCount);\r\n\t\tSystem.out.println(\"Number of Free Inodes:\\t\\t\" + this.freeInodesCount);\r\n\t\tSystem.out.println(\"First Data Block:\\t\\t\" + this.firstDataBlock);\r\n\t\tSystem.out.println(\"Last Written Date and Time:\\t\" + GeneralUtils.getDateFromLong(this.wTime));\r\n\t\tSystem.out.println(\"First Inode:\\t\\t\\t\" + this.firstInode);\r\n\t\tSystem.out.println(\"Inode Size:\\t\\t\\t\" + this.inodeSize);\r\n\t}",
"public void logDebugData() {\n SmartDashboard.putNumber(\"Ele Pos\", getPosition());\n SmartDashboard.putBoolean(\"Ele Switch\", bottomSwitchValue());\n SmartDashboard.putNumber(\"Ele Current\", getCurrent());\n SmartDashboard.putNumber(\"Ele Out %\", elevatorSpark.getAppliedOutput());\n }",
"public void printOptions() {\n\t\t\n\t}",
"@Override\r\n public final String toString() {\r\n return String.format(\"%s[position=%d, limit=%d, capacity=%d]\",\r\n getClass().getName(),\r\n position(),\r\n limit(),\r\n capacity());\r\n }",
"void debug() {\n\t\tfor( int i = 0; i < N; i++ ) {\t\n\t\t\tSystem.out.print(i+\" \");\n\t\t\tfor( int j = 0; j < N; j++ )\n\t\t\t\tSystem.out.print(j+\":\"+(defined[i][j]?\"T\":\"F\")+\" \"+\n\t\t\t\t\t\tc[i][j]+\" p=\"+path[i][j]+\" f=\"+f[i][j]+\"; \");\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"void printSpecification(PrintStream ps);",
"public static void dumpMem() {\n\t\tRuntime runtime = Runtime.getRuntime();\n\n\t\t// Print used memory\n\t\tSystem.out.println(\"Used Memory:\" + (runtime.totalMemory() - runtime.freeMemory()) / mb);\n\n\t\t// Print free memory\n\t\tSystem.out.println(\"Free Memory:\" + runtime.freeMemory() / mb);\n\n\t\t// Print total available memory\n\t\tSystem.out.println(\"Total Memory:\" + runtime.totalMemory() / mb);\n\n\t\t// Print Maximum available memory\n\t\tSystem.out.println(\"Max Memory:\" + runtime.maxMemory() / mb);\n\n\t}",
"public static void main(String[] args) {\n\t\tbyte num1 = 100;\n\t\tshort num2 = 123;\n\t\tint num3 = 1200;\n\t\tlong num4 = 234763458476L;\n\n\t\t// Print min and maximum values\n\t\tSystem.out.println(\"Maximum value of byte is \" + Byte.MAX_VALUE);\n\t\tSystem.out.println(\"Minimum value of byte is \" + Byte.MIN_VALUE);\n\t\tSystem.out.println(\"Maximum value of short is \" + Short.MAX_VALUE);\n\t\tSystem.out.println(\"Minimum value of short is \" + Short.MIN_VALUE);\n\t\tSystem.out.println(\"Maximum value of int is \" + Integer.MAX_VALUE);\n\t\tSystem.out.println(\"Minimum value of int is \" + Integer.MIN_VALUE);\n\t\tSystem.out.println(\"Maximum value of long is \" + Long.MAX_VALUE);\n\t\tSystem.out.println(\"Minimum value of long is \" + Long.MIN_VALUE);\n\t}",
"public static void printGeneratedCombination() {\n\t\t\n\t\tfinal int randomDistance = randomizer(LARGE_DISTANCE * 3);\n\t\tfinal int randomDuration = randomizer(LARGE_DURATION * 3);\n\t\tfinal int randomExhalation = randomizer(LARGE_EXHALATION_LEVEL * 3);\n\t\t\n\t\tfinal boolean isSafe = isInterpolatedSafe(randomDistance, randomDuration, randomExhalation);\n\t\t\n\t\tSystem.out.println(\"(\" + randomDistance + COMMA + randomDuration + COMMA + randomExhalation + COMMA + isSafe + \")\");\n\t\t\n\t}",
"public String toString()\n {\n return \"The square's dimensions are \" + getLength() + \" X \" + getWidth();\n }",
"protected String getToStringFormat()\n {\n return getClass().getSimpleName() + \"@\"\n + Integer.toHexString(hashCode()) + \": { \"\n + \"offset = 0x\" + Integer.toHexString(offset) + \"; \"\n + \"size = \" + size + \"; \"\n + \"%s\"\n + \"value = \" + getValue() + \"; \"\n + \"isAccessible = \" + isAccessible() + \"; \"\n + \"checksum = 0x\" + Integer.toHexString(checksum()) + \"; \"\n + \"}\";\n }",
"void visualize(Object o) {\n\t\tif (o == null) {\n\t\t\to = new NullObject();\n\t\t}\n\n\t\tScratch scratch = scratchFactory.create(o);\n\t\tscratch.addCSSClass(\"printOut\");\n\n\t\tvisualizeScratch(scratch);\n\t}",
"public static void main(String[] args)\r\n\t\t\t{\n\t\t\t\tprintLowerAndUpperBound();\r\n\t\t\t}",
"public void printMiniMap() { }",
"void displayDebugInformation() {\n\t\tmyParent.text(\"X\", X.x + 10, X.y + 5);\n\t\tmyParent.text(\"Y\", Y.x + 10, Y.y + 5);\n\t\tmyParent.text(\"Z\", Z.x + 10, Z.y + 5);\n\t\tmyParent.text(\"Q\", Q.x + 10, Q.y + 5);\n\t\tmyParent.fill(255);\n\n\t\tString pointFocuses = \"\";\n\t\tString stickedPoints = \"\";\n\t\tfor (int i = 0; i < amount; i++) {\n\t\t\tpointFocuses += point[i].isFocusedOnThePoint() + \" \";\n\t\t\tstickedPoints += point[i].sticked + \" \";\n\n\t\t\t// fill(200);\n\t\t\tmyParent.text(i, point[i].x + 10, point[i].y + 5);\n\t\t}\n\n\t\tmyParent.text(\"state: \" + state + \"\\nfocused on line: \" + selectedLine + \"\\nfocused on point: \" + selectedPoint\n\t\t\t\t+ \"\\nmouseLockedToLine: \" + mouseLockedToLine + \"\\npointFocuses: \" + pointFocuses + \"\\nstickedPoints: \"\n\t\t\t\t+ stickedPoints + \"\\ndragLock: \" + dragLock + \"\\ndiagonal scale factor: \" + diagonalScaleFactor\n\t\t\t\t+ \"\\npress D to hide debug\", 40, myParent.height - 160);\n\n\t\t// diplayNeighborPoints();\n\t}",
"public static void main(String[] args) {\n \r\n UIManager.put(\"OptionPane.minimumSize\", new Dimension(150, 150));\r\n \r\n Scanner input = new Scanner(System.in);\r\n System.out.print(\"Enter five digits number: \");\r\n number = input.next();\r\n\r\n if (number.length() != 5) {\r\n System.out.println(\"Number most be five digits! \");\r\n System.out.print(\"Enter five digits number: \");\r\n number = input.next();\r\n }\r\n firstDigit = number.charAt(0);\r\n secondDigit = number.charAt(1);\r\n thirdDigit = number.charAt(2);\r\n fouthDigit = number.charAt(3);\r\n fifthDigit = number.charAt(4);\r\n\r\n //JOptionPane.showMessageDialog(null, firstDigit + \"\\t\\t\\t\" + secondDigit + \"\\t\\t\\t\" + thirdDigit + \"\\t\\t\\t\" + fouthDigit + \"\\t\\t\\t\" + fifthDigit);\r\n System.out.println(\"input of \" + number + \" will display \" + firstDigit + \"\\t\" + secondDigit + \"\\t\" + thirdDigit + \"\\t\" + fouthDigit + \"\\t\" + fifthDigit);\r\n }",
"short getPaperSize();",
"public void showMetrics() {\n }",
"public java.lang.String toDebugString () { throw new RuntimeException(); }",
"void printMax(){\r\n\t\tSystem.out.printf(\"\\nThe stock with the highest value is \" + maxNode.stockName + \" with a value of $%.2f%n\",maxNode.stockValue);\r\n\t}",
"private void showSummary() {\r\n System.out.println(\"LCG: a=\"+generator.getA()+\", m=\"+generator.getM()+\", c=\"+generator.getC());\r\n for (int i = 1; i < T; i++) {\r\n System.out.println(\"nu(\"+(i+1)+\") : \"+Math.sqrt(getNu()[i])+\"\\t\\t| mu(\"+(i+1)+\") : \"+getMu()[i]);\r\n }\r\n boolean goodMultiplier=true, greatMultiplier=true, sufficientNu = true;\r\n \r\n System.out.println(\"\\nSummary comments: \");\r\n for (int i = 1; i < 6; i++) {\r\n if(mu[i]<0.1) {\r\n goodMultiplier = false;\r\n System.out.println(\"mu[\"+(i+1)+\"] is less than 0.1\");\r\n }\r\n if(mu[i]<1)\r\n greatMultiplier = false;\r\n }\r\n \r\n if(greatMultiplier)\r\n System.out.println(\"The multiplier is a really good one.\");\r\n else if(goodMultiplier)\r\n System.out.println(\"The multiplier meets minimum requirements\");\r\n else\r\n System.out.println(\"The multiplier is not good enough\");\r\n \r\n \r\n for (int i = 1; i < 6; i++) {\r\n if(nu[i]<Math.pow(2, 30/(i+1)))\r\n sufficientNu = false;\r\n }\r\n \r\n if(sufficientNu)\r\n System.out.println(\"nu values for dimensions 2 through 6 are quite good for most applications.\");\r\n else\r\n System.out.println(\"nu values for some dimensions are low. LCG may not be suitable for your specific application\");\r\n \r\n }",
"public String toString() {\n StringBuffer sb = new StringBuffer();\r\n sb.append(\"VENDOR: \" + vendor + \"\\n\");\r\n sb.append(\"RENDERER: \" + renderer + \"\\n\");\r\n sb.append(\"VERSION: \" + version + \"\\n\");\r\n sb.append(\"EXTENSIONS: \" + extensions + \"\\n\");\r\n sb.append(\"\\n\");\r\n sb.append(\"ALIASED_POINT_SIZE_RANGE: [\" + aliased_point_size_range[0]\r\n + \", \" + aliased_point_size_range[1] + \"]\\n\");\r\n sb.append(\"SMOOTH_POINT_SIZE_RANGE: [\" + smooth_point_size_range[0]\r\n + \", \" + smooth_point_size_range[1] + \"]\\n\");\r\n sb.append(\"SMOOTH_POINT_SIZE_GRANULARITY: \"\r\n + smooth_point_size_granularity[0] + \"\\n\");\r\n sb.append(\"\\n\");\r\n sb.append(\"MAX_ELEMENTS_VERTICES: \" + elements_vertices[0] + \"\\n\");\r\n sb.append(\"MAX_ELEMENTS_INDICES: \" + elements_indices[0] + \"\\n\");\r\n sb.append(\"\\n\");\r\n sb.append(\"SUPPORTED_STENCIL_BITS: \" + stencilbuffer_bits[0] + \"\\n\");\r\n sb.append(\"\\n\");\r\n sb.append(\"NUMBER_OF_SAMPLE_BUFFERS: \" + sample_buffers[0] + \"\\n\");\r\n sb.append(\"NUMBER_OF_SAMPLES: \" + samples[0] + \"\\n\");\r\n return sb.toString();\r\n }",
"public String toString(){\n String temp = drv.getAbsolutePath() + \"\\n\";\n temp += freeSpace + \" / \" + totalSpace + \"\\n\";\n temp += getPercentRem() +\"%\\n\";\n temp += \"Drive Setup: \" + isSetup + \"\\n\";\n for(String i: drv.list()){\n temp += i + \"\\n\";\n }\n return temp;\n }",
"@Override\r\n public String print(){\r\n String geneString = \"Customer: \" + getNode() + \", isVehicle: \" + getIsVehicle() + \", capacity:\" + getSize();\r\n return geneString;\r\n }",
"ReadOnlyDoubleProperty displayMaximumProperty();",
"public static void displaySta() {\n System.out.println(\"\\n\\n\");\n System.out.println(\"average service time: \" + doAvgProcessingTime() /100 + \" milliseconds\");\n System.out.println(\"max service time: \" + maxProcessingTime /100 + \" milliseconds\");\n System.out.println(\"average turn around time \" + doAvgTurnAroundTime()/100 + \" milliseconds\");\n System.out.println(\"max turn around time \" + maxTurnAroundTime/100 + \" milliseconds\");\n System.out.println(\"average wait time \" + doAvgWaitTime()/10000 + \" milliseconds\");\n System.out.println(\"max wait time \" + maxWaitTime/10000 + \" milliseconds\");\n System.out.println(\"end time \" + endProgramTime);\n System.out.println(\"start time \" + startProgramTime);\n System.out.println(\"processor utilization: \" + doCPU_usage() + \" %\");\n System.out.println(\"Throughput: \" + doThroughPut());\n System.out.println(\"---------------------------\");\n\n\n }",
"public String toString() {\n return super.toString() + \"\\n\" + \"Lowest measurable weight: \" + getMinWeight() + \"g\\n\" + \"Highest measurable weight: \" + getMaxWeight() + \"g\\n\";\n }",
"public String format()\n {\n return String.format(\"%/t%/t/\", grassPatches.length, walkers.size());\n }",
"public String toString() {\n String output = dimension() + \"\\n\";\n for (int i = 0; i < blocks.length; i++) {\n for (int j = 0; j < blocks[i].length; j++) {\n if (blocks[i][j] < 10) {\n output += \" \";\n }\n output += blocks[i][j] + \" \";\n }\n output += \"\\n\";\n }\n return output;\n }",
"private void cmdInfoProg() {\n long total = Runtime.getRuntime().totalMemory();\n long free = Runtime.getRuntime().freeMemory();\n NumberFormat nf = NumberFormat.getInstance();\n Log.println(\"(mem: \"\n + NumberFormat.getPercentInstance().format(\n (double) free / (double) total) + \" = \"\n + nf.format(free) + \" bytes free, \" + nf.format(total)\n + \" bytes total)\");\n }",
"public void printUsage() {\n printUsage(System.out);\n }",
"void printFleet(ConsolePrinter printer);",
"public void printStats() {\n\t\tSystem.out.println(\"QuickSort terminates!\");\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Duration: \" + getDuration() + \" seconds\");\n\t\tSystem.out.println(\"Comparisons: \" + this.comparisonCounter);\n\t\tSystem.out.println(\"Boundary: \" + this.b);\n\t}",
"public void displayBmi () {\n\t\t\tSystem.out.println (\"Underweight =< 18.5\\nNormal weight = 18.5-24.9\\nOverweight = 25 - 29.9\\nObese = 30 or higher\");\n\t\t}",
"public String display(){\r\n\t\tif(this.AWD==true){\r\n\t\t\treturn super.display()+\" \"+model+\" \"+this.price+\"$ SF: \"+this.safetyRating+\" RNG: \" +this.maxRange+\" AWD\";\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn super.display()+\" \"+model+\" \"+this.price+\"$ SF: \"+this.safetyRating+\" RNG: \" +this.maxRange+\" 2WD\";\r\n\t\t}\r\n \r\n\t}",
"public String toString()\r\n\t{\r\n\t\tString parentDesc = super.toString();\r\n\t\tString myDesc = \"[Size: \" + this.size + \" ]\";\r\n\t\treturn parentDesc + myDesc;\r\n\t}",
"@Override\n public String toString() {\n return String.format(\"ServerID=%d, UsedCPU=%d, LeftoverCPU=%f, UsedMemory=%d, \" +\n \"LeftoverMemory=%f\",\n pm.getID(),\n used_cpu, getLeftoverCPUPercentile(),\n used_mem, getLeftoverMemoryPercentile());\n }",
"void info() {\n System.out.println(\"E16_OverloadJavaDoc is \" + height + \" feet tall\");\n }",
"public String toString(){\n\t\treturn \"(\" + width + \" , \" + height + \")\" ;\n\t}",
"@Override\n\tpublic int getMinSizeZ()\n\t{\n\t\treturn 50;\n\t}",
"public void dump(){\r\n\t\tString str = \"\";\r\n\t\tfor(int i = 0; i < M; i++){\r\n\t\t\tstr = str + i + \". \" + vals[i];\r\n\t\t\tif(keys[i] != null){\r\n\t\t\t\tstr = str + \" \" + keys[i] + \" (\";\r\n\t\t\t\tstr = str + hash(keys[i]) + \")\";\r\n\t\t\t}else\r\n\t\t\t\tstr = str + \" -\";\r\n\t\t\tSystem.out.println(str);\r\n\t\t\tstr = \"\";\r\n\t\t}\r\n\t\tSystem.out.println(\"Size: \" + N + \"\\n\"); //La till denna för enkelhetens skull\r\n\t}",
"public void printDetails (StringBuilder param)\r\n {\r\n System.out.println(\"The stringBuilder is \"+ param +\" the length is \"+ param.length()+\" and the capacity is \"+ param.capacity());\r\n }",
"public void printConfig() {\n\t\tProperty props = Property.getInstance();\n\t\tSystem.out.println(\"You are using the following settings. If this is correct, \"\n\t\t\t\t+ \"you do not have to do anything. If they are not correct, please alter \" + \"your config files.\");\n\t\tString[] importantSettings = new String[] { \"apkname\", \"alphabetFile\", \"learningAlgorithm\", \"EquivMethod\",\"deviceName\" };\n\t\tfor (int i = 0; i < importantSettings.length; i++) {\n\t\t\tSystem.out.printf(\"%-25s%s%n\", importantSettings[i], \" = \" + props.get(importantSettings[i]));\n\t\t}\n\t}",
"public String toString() {\n return \"\" + \"Magic=\" + Magic // NOI18N\n + \", Version=\" + Version // NOI18N\n + \", Reserved=\" + Reserved // NOI18N\n + \", StringsOffset=\" + StringsOffset // NOI18N\n + \", NumEntries=\" + NumEntries // NOI18N\n + \", NumBuckets=\" + NumBuckets // NOI18N\n + \", MaxValueLength=\" + MaxValueLength; // NOI18N\n }",
"@Override\n public String toString() {\n return super.toString() + \"| Weight: \" + weight + \"\" + \"| Time of PIN: \" + timePin + \"| Size of Screem: \" + sizeScreem;\n }",
"public String toString()\n\t{\n\t\treturn getClass().getName() +\n\t\t\t\"[hgap=\" + hgap + \",vgap=\" + vgap + \"]\";\n\t}",
"public void printInformation() {\n\n System.out.println(\"Name: \" + name);\n System.out.println(\"Weight: \" + weight);\n System.out.println(\"Shape: \" + shape);\n System.out.println(\"Color: \" + color);\n }",
"@Override\r\n public String dumpOf ()\r\n {\r\n StringBuilder sb = new StringBuilder();\r\n\r\n if (evaluation != null) {\r\n sb.append(String.format(\" evaluation=%s%n\", evaluation));\r\n }\r\n\r\n Shape physical = (getShape() != null) ? getShape().getPhysicalShape() : null;\r\n if (physical != null) {\r\n sb.append(String.format(\" physical=%s%n\", physical));\r\n }\r\n\r\n if (forbiddenShapes != null) {\r\n sb.append(String.format(\" forbiddenShapes=%s%n\", forbiddenShapes));\r\n }\r\n\r\n if (timeRational != null) {\r\n sb.append(String.format(\" rational=%s%n\", timeRational));\r\n }\r\n\r\n return sb.toString();\r\n }",
"public interface NumberPrinter {\n\n String print(int number) throws NumberPrinterException;\n\n int getMinNumber();\n int getMaxNumber();\n\n}",
"public String getStatistics() {\n return \"Bounds = (\" + x1 + \", \" + y1 + \"), (\" + x2 + \", \" + y2 + \")\\n\" +\n \"Number of Nodes = \" + numNodes + \"\\n\";\n }",
"public String getInfo(){\n return \"Name: \" + name + \"\\n\"\n + \"Min Range: \" + minRange + \"\\n\"\n + \"Max Range: \" + maxRange + \"\\n\"\n + \"Attack: \" + attack + \"\\n\"\n + \"Cost: \" + buildCost;\n }",
"public void printBasinSizes(){\n PriorityQueue<Integer> BasinQueue = new PriorityQueue<Integer>(sinkCounter, Collections.reverseOrder());\n String toPrint = \"\";\n for(int x: sinkCounterMap.values()){\n BasinQueue.add(x);\n \n }\n \n for(int i=0; i<(sinkCounter); i++){\n toPrint = toPrint + BasinQueue.poll() + \" \";\n }\n \n System.out.println(toPrint);\n }",
"@Override\n\tpublic void display() {\n\t\tSystem.out.println(valueType+\": \"+value);\n\t}",
"public void dump() {\n System.out.println(\"ID : \"+hostID);\n for (int i=0; i<hostAddresses.size(); i++) System.out.println(\" - addresse : \"+hostAddresses.elementAt(i).getNormalizedAddress());\n System.out.println(\"CPU : \"+cpuLoad);\n System.out.println(\"Memoire : \"+memoryLoad);\n System.out.println(\"Batterie : \"+batteryLevel);\n System.out.println(\"Threads : \"+numberOfThreads);\n System.out.println(\"CMs : \"+numberOfBCs);\n System.out.println(\"connecteurs : \"+numberOfConnectors);\n System.out.println(\"connecteurs entree reseau : \"+numberOfConnectorsNetworkInputs);\n System.out.println(\"connecteurs sortie reseau : \"+numberOfConnectorsNetworkOutputs);\n System.out.println(\"Traffic PF entree : \"+networkPFInputTraffic);\n System.out.println(\"Traffic PF sortie : \"+networkPFOutputTraffic);\n System.out.println(\"Traffic application entree : \"+networkApplicationInputTraffic);\n System.out.println(\"Traffic application sortie : \"+networkApplicationOutputTraffic);\n }"
]
| [
"0.5628652",
"0.55489373",
"0.54363704",
"0.54323924",
"0.5414512",
"0.53303695",
"0.5319632",
"0.5313559",
"0.52183354",
"0.518164",
"0.51494336",
"0.50975496",
"0.50945",
"0.5086579",
"0.50858957",
"0.50790006",
"0.50718635",
"0.50635374",
"0.5059955",
"0.50570863",
"0.5007776",
"0.50052017",
"0.49925995",
"0.49874085",
"0.4984477",
"0.4982961",
"0.49678063",
"0.49551788",
"0.49498677",
"0.49495617",
"0.49493125",
"0.4944474",
"0.49182457",
"0.49165815",
"0.48979944",
"0.48961762",
"0.48938435",
"0.4882667",
"0.48803148",
"0.4873612",
"0.48713747",
"0.48651764",
"0.48641807",
"0.4862321",
"0.48613748",
"0.48608464",
"0.48600695",
"0.48569906",
"0.48565084",
"0.48539189",
"0.48512074",
"0.48306876",
"0.4812856",
"0.48114708",
"0.47959518",
"0.479138",
"0.47866687",
"0.47842026",
"0.47778833",
"0.47758028",
"0.47691986",
"0.47612533",
"0.47551674",
"0.4754633",
"0.47495654",
"0.47373876",
"0.47359738",
"0.47307453",
"0.47300568",
"0.4730037",
"0.4729426",
"0.47249487",
"0.47234517",
"0.47216818",
"0.4717955",
"0.4715003",
"0.47059962",
"0.46935248",
"0.46874306",
"0.4683347",
"0.4683157",
"0.46793014",
"0.46717575",
"0.46712643",
"0.46698397",
"0.4663868",
"0.4661664",
"0.4661526",
"0.4659771",
"0.46595162",
"0.46593684",
"0.4656828",
"0.46516648",
"0.46499786",
"0.46486878",
"0.46449915",
"0.46424234",
"0.46420038",
"0.46417743",
"0.46415147"
]
| 0.6649683 | 0 |
/ Used by makeCompactGrid. | private static SpringLayout.Constraints getConstraintsForCell(
int row, int col,
Container parent,
int cols) {
final SpringLayout layout = (SpringLayout) parent.getLayout();
final Component c = parent.getComponent(row * cols + col);
return layout.getConstraints(c);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void buildGrid(){\n for(int column=0; column<columns; column++){\n for(int row=0; row<rows; row++){\n grid[column][row] = \"[ ]\";\n }\n }\n }",
"public void updateGridX();",
"private void clearGrid() {\n\n }",
"public RegularGrid() {\r\n }",
"private void actionSmallerCells() {\n layoutPanel.changeCellSize(false);\n }",
"private void updateGrid() {\n\t\tfor (Neighbor neighbor : upsetNeighbors) {\n\t\t\tClear vacated_cell = new Clear(neighbor.getCoordsX(), neighbor.getCoordsY());\n\t\t\tgrid.setGridIndex(vacated_cell, vacated_cell.getCoordsX(), vacated_cell.getCoordsY());\n\t\t\tCell new_location = availableSpaces.get((int) (Math.random() * (availableSpaces.size() - 1)));\n\t\t\tint new_x = new_location.getCoordsX();\n\t\t\tint new_y = new_location.getCoordsY();\n\t\t\tif (neighbor.getClass().equals(Group1.class))\n\t\t\t\tgrid.setGridIndex(new Group1(new_x, new_y, percentSimilar), new_x, new_y);\n\t\t\telse\n\t\t\t\tgrid.setGridIndex(new Group2(new_x, new_y, percentSimilar), new_x, new_y);\n\t\t\tavailableSpaces.remove(new_location);\n\t\t\tavailableSpaces.add(vacated_cell);\n\t\t}\n\t}",
"private void actionBiggerCells() {\n layoutPanel.changeCellSize(true);\n }",
"private void setGridOnCollectibleSelected() {\n showCardInfo(getNameFromID(selectedCollectibleID));\n setGridColor(Color.GOLD);\n for (int row = 0; row < Map.NUMBER_OF_ROWS; row++) {\n for (int column = 0; column < Map.NUMBER_OF_COLUMNS; column++) {\n ImageView interactor = getInteractor(row, column);\n int finalRow = row, finalColumn = column;\n interactor.setOnMouseClicked(e -> handleUseCollectible(finalRow, finalColumn, false));\n\n }\n }\n }",
"boolean hasGrid();",
"public void buildInCell() {\n this.level++;\n if (this.level == 4) {\n this.setFreeSpace(false);\n }\n }",
"private void displayGrid() {\r\n System.out.print(this.grid);\r\n }",
"void method0() {\nprivate double edgeCrossesIndicator = 0;\n/** counter for additions to the edgeCrossesIndicator\n\t\t */\nprivate int additions = 0;\n/** the vertical level where the cell wrapper is inserted\n\t\t */\nint level = 0;\n/** current position in the grid\n\t\t */\nint gridPosition = 0;\n/** priority for movements to the barycenter\n\t\t */\nint priority = 0;\n/** reference to the wrapped cell\n\t\t */\nVertexView vertexView = null;\n}",
"public void updateGrid() {\r\n if (getCrosstabElement() == null) return;\r\n\r\n try {\r\n getColumns().clear();\r\n getRows().clear();\r\n int current_x = 0;\r\n int current_y = 0;\r\n\r\n // Adjusting cells dimensions...\r\n CrosstabCell mainCell = findCell(\"\",\"\");\r\n for (int k=0; k<getCrosstabElement().getCells().size(); ++k) {\r\n CrosstabCell cell = (CrosstabCell)getCrosstabElement().getCells().elementAt(k);\r\n\r\n cell.setParent( this.getCrosstabElement());\r\n\r\n if (cell.getType() == cell.DETAIL_CELL) {\r\n if (cell.getHeight() == 0) cell.setHeight( getRowHeight( cell.getRowTotalGroup() ) );\r\n if (cell.getWidth() == 0) cell.setWidth( getColumnWidth( cell.getColumnTotalGroup() ) );\r\n }\r\n }\r\n\r\n addNotDefinedCells();\r\n\r\n getColumns().add( new Integer(current_x) );\r\n\r\n for (int i=0; i<getCrosstabElement().getRowGroups().size(); ++i) {\r\n CrosstabGroup cg = (CrosstabGroup)getCrosstabElement().getRowGroups().elementAt(i);\r\n cg.getHeaderCell().setLeft( current_x );\r\n cg.getTotalCell().setLeft( current_x );\r\n current_x = current_x + cg.getSize();\r\n getColumns().add( new Integer(current_x) );\r\n }\r\n\r\n ArrayList columnWidths = new ArrayList();\r\n for (int i=getCrosstabElement().getColumnGroups().size()-1; i>=0; --i) {\r\n CrosstabGroup cg = (CrosstabGroup)getCrosstabElement().getColumnGroups().elementAt(i);\r\n\r\n if (i == getCrosstabElement().getColumnGroups().size()-1)\r\n {\r\n columnWidths.add( new Integer( getColumnWidth(\"\")));\r\n }\r\n if (!cg.getTotalPosition().equals(\"Start\"))\r\n {\r\n columnWidths.add( new Integer( getColumnWidth(cg.getName())));\r\n }\r\n else\r\n {\r\n columnWidths.add(0, new Integer( getColumnWidth(cg.getName())));\r\n }\r\n\r\n }\r\n\r\n for (int i=0; i<columnWidths.size(); ++i)\r\n {\r\n current_x += ((Integer)columnWidths.get(i)).intValue();\r\n getColumns().add( new Integer(current_x));\r\n }\r\n if (getCrosstabElement().getColumnGroups().size() == 0) getColumns().add( new Integer(current_x += getColumnWidth(\"\")));\r\n\r\n // Look for all rows...\r\n\r\n getRows().add( new Integer(current_y) );\r\n for (int i=0; i<getCrosstabElement().getColumnGroups().size(); ++i) {\r\n CrosstabGroup cg = (CrosstabGroup)getCrosstabElement().getColumnGroups().elementAt(i);\r\n cg.getHeaderCell().setTop( current_y );\r\n cg.getTotalCell().setTop( current_y );\r\n current_y = current_y + cg.getSize();\r\n getRows().add( new Integer(current_y) );\r\n\r\n }\r\n\r\n ArrayList rowHeights = new ArrayList();\r\n for (int i=getCrosstabElement().getRowGroups().size()-1; i>=0; --i) {\r\n CrosstabGroup cg = (CrosstabGroup)getCrosstabElement().getRowGroups().elementAt(i);\r\n\r\n if (i == getCrosstabElement().getRowGroups().size()-1)\r\n {\r\n rowHeights.add( new Integer( getRowHeight(\"\")));\r\n }\r\n if (!cg.getTotalPosition().equals(\"Start\"))\r\n {\r\n rowHeights.add( new Integer( getRowHeight(cg.getName())));\r\n }\r\n else\r\n {\r\n rowHeights.add(0, new Integer( getRowHeight(cg.getName())));\r\n }\r\n }\r\n\r\n for (int i=0; i<rowHeights.size(); ++i)\r\n {\r\n current_y += ((Integer)rowHeights.get(i)).intValue();\r\n getRows().add( new Integer(current_y));\r\n }\r\n if (getCrosstabElement().getRowGroups().size() == 0) getRows().add( new Integer(current_y += getRowHeight(\"\")));\r\n\r\n int columnGroups = getCrosstabElement().getColumnGroups().size();\r\n int rowGroups = getCrosstabElement().getRowGroups().size();\r\n\r\n\r\n\r\n\r\n int currentTopRowNumber = columnGroups;\r\n int currentBottomRowNumber = columnGroups + rowGroups + 1;\r\n\r\n for (int i=0; i<getCrosstabElement().getRowGroups().size(); ++i) {\r\n CrosstabGroup cg = (CrosstabGroup)getCrosstabElement().getRowGroups().elementAt(i);\r\n\r\n cg.getHeaderCell().setLeftIndex( i );\r\n cg.getHeaderCell().setLeft( ((Integer)getColumns().get(i)).intValue() );\r\n cg.getHeaderCell().setTopIndex( (cg.getTotalPosition().equals(\"Start\")) ? currentTopRowNumber+1 : currentTopRowNumber );\r\n cg.getHeaderCell().setTop( ((Integer)getRows().get( cg.getHeaderCell().getTopIndex() )).intValue() );\r\n cg.getHeaderCell().setRightIndex( i+1 );\r\n cg.getHeaderCell().setWidth( cg.getSize() );\r\n cg.getHeaderCell().setBottomIndex( (cg.isHasTotal() && cg.getTotalPosition().equals(\"Start\")) ? currentBottomRowNumber : currentBottomRowNumber - 1 );\r\n cg.getHeaderCell().setHeight( ((Integer)getRows().get( cg.getHeaderCell().getBottomIndex() )).intValue() -cg.getHeaderCell().getTop());\r\n\r\n cg.getTotalCell().setLeftIndex( i );\r\n cg.getTotalCell().setLeft( cg.getHeaderCell().getLeft());\r\n cg.getTotalCell().setTopIndex( (cg.getTotalPosition().equals(\"Start\")) ? currentTopRowNumber : currentBottomRowNumber-1 );\r\n cg.getTotalCell().setTop( ((Integer)getRows().get( cg.getTotalCell().getTopIndex() )).intValue() );\r\n cg.getTotalCell().setRightIndex( rowGroups );\r\n cg.getTotalCell().setWidth( ((Integer)getColumns().get( rowGroups)).intValue() - cg.getTotalCell().getLeft() );\r\n cg.getTotalCell().setBottomIndex( (cg.isHasTotal() && cg.getTotalPosition().equals(\"Start\")) ? currentTopRowNumber +1 : currentBottomRowNumber );\r\n cg.getTotalCell().setHeight( ((Integer)getRows().get( cg.getTotalCell().getBottomIndex() )).intValue() - cg.getTotalCell().getTop() );\r\n\r\n if (cg.getTotalPosition().equals(\"Start\")) currentTopRowNumber++;\r\n else currentBottomRowNumber--;\r\n\r\n // Update all cells with rowTotalGroup this group\r\n for (int k=0; k<getCrosstabElement().getCells().size(); ++k) {\r\n CrosstabCell cell = (CrosstabCell)getCrosstabElement().getCells().elementAt(k);\r\n\r\n if (cell.getRowTotalGroup().equals(cg.getName())) {\r\n\r\n cell.setTop(cg.getTotalCell().getTop());\r\n cell.setHeight( cg.getTotalCell().getHeight());\r\n }\r\n }\r\n }\r\n\r\n int currentLeftColumnNumber = rowGroups;\r\n int currentRightColumnNumber = columnGroups + rowGroups + 1;\r\n for (int i=0; i<getCrosstabElement().getColumnGroups().size(); ++i) {\r\n CrosstabGroup cg = (CrosstabGroup)getCrosstabElement().getColumnGroups().elementAt(i);\r\n\r\n // Count preceding total rows...\r\n\r\n cg.getHeaderCell().setLeftIndex( (cg.getTotalPosition().equals(\"Start\")) ? currentLeftColumnNumber+1 : currentLeftColumnNumber );\r\n cg.getHeaderCell().setLeft( ((Integer)getColumns().get( cg.getHeaderCell().getLeftIndex())).intValue() );\r\n cg.getHeaderCell().setTopIndex( i );\r\n cg.getHeaderCell().setTop( ((Integer)getRows().get( i )).intValue() );\r\n cg.getHeaderCell().setRightIndex((cg.isHasTotal() && cg.getTotalPosition().equals(\"Start\")) ? currentRightColumnNumber : currentRightColumnNumber - 1);\r\n cg.getHeaderCell().setWidth( ((Integer)getColumns().get(cg.getHeaderCell().getRightIndex()) ).intValue() -cg.getHeaderCell().getLeft());\r\n cg.getHeaderCell().setBottomIndex( i+1 );\r\n cg.getHeaderCell().setHeight( cg.getSize());\r\n\r\n cg.getTotalCell().setLeftIndex( (cg.getTotalPosition().equals(\"Start\")) ? currentLeftColumnNumber : currentRightColumnNumber-1 );\r\n cg.getTotalCell().setLeft( ((Integer)getColumns().get( cg.getTotalCell().getLeftIndex() )).intValue() );\r\n cg.getTotalCell().setTopIndex( i );\r\n cg.getTotalCell().setTop( ((Integer)getRows().get( i)).intValue() );\r\n cg.getTotalCell().setRightIndex((cg.isHasTotal() && cg.getTotalPosition().equals(\"Start\")) ? currentLeftColumnNumber +1 : currentRightColumnNumber);\r\n cg.getTotalCell().setWidth( ((Integer)getColumns().get( cg.getTotalCell().getRightIndex() )).intValue() - cg.getTotalCell().getLeft() );\r\n cg.getTotalCell().setBottomIndex( columnGroups );\r\n cg.getTotalCell().setHeight( ((Integer)getRows().get( columnGroups)).intValue() - cg.getTotalCell().getTop() );\r\n\r\n if (cg.getTotalPosition().equals(\"Start\")) currentLeftColumnNumber++;\r\n else currentRightColumnNumber--;\r\n\r\n for (int k=0; k<getCrosstabElement().getCells().size(); ++k) {\r\n CrosstabCell cell = (CrosstabCell)getCrosstabElement().getCells().elementAt(k);\r\n\r\n if (cell.getColumnTotalGroup().equals(cg.getName())) {\r\n cell.setLeft(cg.getTotalCell().getLeft());\r\n cell.setWidth( cg.getTotalCell().getWidth());\r\n }\r\n }\r\n\r\n }\r\n\r\n // Update coordinates for the A0 cell\r\n\r\n if (getCrosstabElement().getRowGroups().size() > 0)\r\n {\r\n mainCell.setTopIndex(((CrosstabGroup)getCrosstabElement().getRowGroups().lastElement()).getHeaderCell().getTopIndex() );\r\n mainCell.setTop(((CrosstabGroup)getCrosstabElement().getRowGroups().lastElement()).getHeaderCell().getTop());\r\n }\r\n else\r\n {\r\n mainCell.setTop(getCrosstabElement().getColumnGroups().size());\r\n mainCell.setTop(((Integer)getRows().get(getCrosstabElement().getColumnGroups().size())).intValue() );\r\n }\r\n mainCell.setBottomIndex(mainCell.getTopIndex() + 1);\r\n\r\n if (getCrosstabElement().getColumnGroups().size() > 0)\r\n {\r\n mainCell.setLeftIndex(((CrosstabGroup)getCrosstabElement().getColumnGroups().lastElement()).getHeaderCell().getLeftIndex() );\r\n mainCell.setLeft(((CrosstabGroup)getCrosstabElement().getColumnGroups().lastElement()).getHeaderCell().getLeft());\r\n }\r\n else\r\n {\r\n mainCell.setLeftIndex(getCrosstabElement().getRowGroups().size());\r\n mainCell.setLeft(((Integer)getColumns().get(getCrosstabElement().getRowGroups().size())).intValue());\r\n }\r\n mainCell.setRightIndex(mainCell.getLeftIndex() + 1);\r\n\r\n\r\n for (int k=0; k<getCrosstabElement().getCells().size(); ++k) {\r\n CrosstabCell cell = (CrosstabCell)getCrosstabElement().getCells().elementAt(k);\r\n\r\n if (cell.getType() == cell.DETAIL_CELL)\r\n {\r\n if (cell.getRowTotalGroup().equals(\"\")) {\r\n\r\n cell.setTop(mainCell.getTop());\r\n cell.setTopIndex(mainCell.getTopIndex());\r\n cell.setBottomIndex(mainCell.getBottomIndex());\r\n }\r\n if (cell.getColumnTotalGroup().equals(\"\")) {\r\n\r\n cell.setLeft(mainCell.getLeft());\r\n cell.setLeftIndex(mainCell.getLeftIndex());\r\n cell.setRightIndex(mainCell.getRightIndex());\r\n }\r\n\r\n cell.setTopIndex( getTotalRowTopIndex(cell.getRowTotalGroup()) );\r\n cell.setBottomIndex( cell.getTopIndex() +1);\r\n\r\n cell.setLeftIndex( getTotalColumnLeftIndex(cell.getColumnTotalGroup()) );\r\n cell.setRightIndex( cell.getLeftIndex() +1);\r\n }\r\n }\r\n\r\n // adding DEFAULT NO DATA CELL....\r\n CrosstabCell detailCell = findCell( \"\", \"\");\r\n boolean found = false;\r\n for (int i=0; i<getCrosstabElement().getCells().size(); ++i)\r\n {\r\n CrosstabCell cell = (CrosstabCell)getCrosstabElement().getCells().elementAt(i);\r\n if (cell.getType() == cell.NODATA_CELL)\r\n {\r\n cell.setTop( 0 );\r\n cell.setLeft( 0 );\r\n cell.setWidth( this.getCrosstabElement().getWidth() );\r\n cell.setHeight( this.getCrosstabElement().getHeight());\r\n cell.setTopIndex( 0 );\r\n cell.setLeftIndex( 0 );\r\n cell.setBottomIndex( 0 );\r\n cell.setRightIndex( 0 );\r\n found = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!found)\r\n {\r\n CrosstabCell defaultWhenNoDataCell= detailCell.cloneMe();\r\n defaultWhenNoDataCell.setType( defaultWhenNoDataCell.NODATA_CELL);\r\n defaultWhenNoDataCell.setParent( this.getCrosstabElement());\r\n defaultWhenNoDataCell.setName(null);\r\n defaultWhenNoDataCell.setTop( 0 );\r\n defaultWhenNoDataCell.setLeft( 0 );\r\n defaultWhenNoDataCell.setWidth( this.getCrosstabElement().getWidth() );\r\n defaultWhenNoDataCell.setHeight( this.getCrosstabElement().getHeight());\r\n defaultWhenNoDataCell.setTopIndex( 0 );\r\n defaultWhenNoDataCell.setLeftIndex( 0 );\r\n defaultWhenNoDataCell.setBottomIndex( 0 );\r\n defaultWhenNoDataCell.setRightIndex( 0 );\r\n getCrosstabElement().getCells().add(defaultWhenNoDataCell);\r\n }\r\n\r\n found = false;\r\n\r\n // adding DEFAULT HEADER CELL....\r\n for (int i=0; i<getCrosstabElement().getCells().size(); ++i)\r\n {\r\n CrosstabCell cell = (CrosstabCell)getCrosstabElement().getCells().elementAt(i);\r\n if (cell.getType() == cell.CT_HEADER_CELL)\r\n {\r\n cell.setTop( 0 );\r\n cell.setTopIndex( 0 );\r\n cell.setLeft( 0 );\r\n cell.setLeftIndex( 0 );\r\n cell.setRightIndex( getCrosstabElement().getRowGroups().size() );\r\n cell.setWidth( ((Integer)getColumns().get( cell.getRightIndex() )).intValue() );\r\n cell.setBottomIndex( getCrosstabElement().getColumnGroups().size() );\r\n cell.setHeight( ((Integer)getRows().get( cell.getBottomIndex() )).intValue() );\r\n found = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!found)\r\n {\r\n\r\n CrosstabCell crossTabHeaderCell= new CrosstabCell();\r\n crossTabHeaderCell.setType( crossTabHeaderCell.CT_HEADER_CELL);\r\n crossTabHeaderCell.setParent( this.getCrosstabElement());\r\n crossTabHeaderCell.setName(null);\r\n crossTabHeaderCell.setTop( 0 );\r\n crossTabHeaderCell.setTopIndex( 0 );\r\n crossTabHeaderCell.setLeft( 0 );\r\n crossTabHeaderCell.setLeftIndex( 0 );\r\n crossTabHeaderCell.setRightIndex( getCrosstabElement().getRowGroups().size() );\r\n crossTabHeaderCell.setWidth( ((Integer)getColumns().get( crossTabHeaderCell.getRightIndex() )).intValue() );\r\n crossTabHeaderCell.setBottomIndex( getCrosstabElement().getColumnGroups().size() );\r\n crossTabHeaderCell.setHeight( ((Integer)getRows().get( crossTabHeaderCell.getBottomIndex() )).intValue() );\r\n getCrosstabElement().getCells().add(crossTabHeaderCell);\r\n }\r\n\r\n getRowBands().clear();\r\n\r\n for (int i=1; i<getRows().size(); ++i)\r\n {\r\n Vector rowBandContents = new Vector();\r\n for (int k=0; k<getCrosstabElement().getCells().size(); ++k) {\r\n CrosstabCell cell = (CrosstabCell)getCrosstabElement().getCells().elementAt(k);\r\n if (cell.getBottomIndex() == i)\r\n {\r\n rowBandContents.add(cell);\r\n }\r\n }\r\n getRowBands().add(rowBandContents);\r\n }\r\n\r\n getColumnBands().clear();\r\n\r\n for (int i=1; i<getColumns().size(); ++i)\r\n {\r\n Vector columnBandContents = new Vector();\r\n for (int k=0; k<getCrosstabElement().getCells().size(); ++k) {\r\n CrosstabCell cell = (CrosstabCell)getCrosstabElement().getCells().elementAt(k);\r\n if (cell.getRightIndex() == i)\r\n {\r\n columnBandContents.add(cell);\r\n }\r\n }\r\n getColumnBands().add(columnBandContents);\r\n }\r\n\r\n\r\n\r\n // Update all elements positions...\r\n for (int i=0; i< getCrosstabElement().getElements().size(); ++i) {\r\n ReportElement re = (ReportElement)getCrosstabElement().getElements().elementAt(i);\r\n\r\n re.getPosition().x = re.getRelativePosition().x + re.getCell().getLeft()+10;\r\n re.getPosition().y = re.getRelativePosition().y + re.getCell().getTop()+10;\r\n\r\n re.setPosition(re.position);\r\n re.trasform(new java.awt.Point(0,0),TransformationType.TRANSFORMATION_RESIZE_SE);\r\n\r\n }\r\n\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n updateSize();\r\n\r\n }",
"@Override\n protected void drawGrid(Graphics2D g2, int startPos, int rightEdgePos, int bottomEdgePos, int start,\n int nrows1, int ncols1, int gridOffset) {}",
"@Override\n\tpublic void placementcell() {\n\t\t\n\t}",
"public void gridLayout(ME_ENUM me_enum, MouseEvent me) {\n RenderContext myrc = (RenderContext) rc; if (myrc == null) return;\n switch (me_enum) {\n case PRESSED: initializeDragVars(me); ui_inter = UI_INTERACTION.GRID_LAYOUT; repaint(); break;\n case DRAGGED: updateDragVars(me); repaint(); break;\n case RELEASED: updateDragVars(me); ui_inter = UI_INTERACTION.NONE; \n Set<String> set = myrc.filterEntities(getRTParent().getSelectedEntities());\n double dx = m_wx1 - m_wx0,\n\t\t dy = m_wy1 - m_wy0;\n\t\t if (set != null && set.size() > 1) {\n int sqrt = (int) Math.sqrt(set.size()), max_x_i = 1, max_y_i = 1;\n if (dx < 0.0001) dx = 0.0001; if (dy < 0.0001) dy = 0.0001;\n\t\t if ((dx/dy) > 1.5 || (dy/dx) > 1.5) { // Rectangular\n\t\t double closest_dist = Double.POSITIVE_INFINITY;\n for (int i=1;i<=sqrt;i++) {\n\t\t\t int other = set.size()/i;\n\t\t\t double ratio = ((double) other)/((double) i);\n\t\t\t double dist = Math.abs(ratio - dx/dy);\n\t\t\t if (dist < closest_dist) {\n\t\t\t if (dx/dy > 1.0) {\n\t\t\t max_x_i = (i > other) ? i : other;\n\t\t\t max_y_i = (i > other) ? other : i;\n } else {\n\t\t\t max_x_i = (i > other) ? other : i;\n\t\t\t max_y_i = (i > other) ? i : other;\n\t\t\t }\n\t\t\t }\n\t\t\t }\n\t\t } else if ((dy/dx) > 1.5) { // Rectangular\n\n\t\t } else { // Roughly square\n\t\t max_x_i = max_y_i = sqrt;\n\t\t }\n\t\t int x_i = 0, y_i = 0;\n\t\t // Sort the elements\n\t\t List<StrCountSorter> sorter = new ArrayList<StrCountSorter>();\n\t\t Iterator<String> it = set.iterator();\n\t\t while (it.hasNext()) {\n\t\t String entity = it.next();\n int total = (int) myrc.entity_counter_context.total(entity); \n\t\t\t sorter.add(new StrCountSorter(entity,total));\n\t\t }\n\t\t Collections.sort(sorter);\n\t\t // Do the layout\n\t\t for (int i=0;i<sorter.size();i++) {\n\t\t String entity = sorter.get(i).toString();\n\t\t\t entity_to_wxy.put(entity,new Point2D.Double(m_wx0 + x_i*(dx/max_x_i),\n\t\t\t m_wy0 + y_i*(dy/max_y_i)));\n\t\t\t transform(entity);\n\t\t\t x_i++; if (x_i >= max_x_i) { x_i = 0; y_i++; }\n\t\t }\n\t\t getRTComponent().render();\n\t\t } else if (set != null && set.size() == 1) {\n\t\t entity_to_wxy.put(set.iterator().next(), new Point2D.Double(m_wx0 + dx/2, m_wy0 + dy/2));\n\t\t transform(set.iterator().next());\n\t\t getRTComponent().render();\n\t\t }\n repaint(); break;\n\tcase CLICKED:\n\t\tbreak;\n\tcase MOVED:\n\t\tbreak;\n\tcase WHEEL:\n\t\tbreak;\n\tdefault:\n\t\tbreak;\n }\n }",
"public void onRowMajorFillButtonClick()\n {\n for ( int row = 0; row < theGrid.numRows(); row++ )\n {\n for ( int column = 0; column < theGrid.numCols(); column++ )\n {\n placeColorBlock(row, column);\n }\n }\n }",
"public int getGridWidth() { return gridWidth; }",
"private void paintGrid() {\n\n g2d.setColor(_BOARDCOLOR); //Set the color to specific color of the board.\n\n for(int i = 0; i < grids.size(); i++) { //Iterating the 16 grids while drawing each on JComponent.\n\n g2d.draw(grids.get(i));\n }\n }",
"public void majAffichage() {\n this.grid.getChildren().clear(); // vide tout le gridpane\n for (int i = 0; i < this.matrice.getNbLigne(); i++) {\n for (int j = 0; j < this.matrice.getNbColonne(); j++) {\n Node n = this.matrice.getCell(i, j); // recupère les imgViews de la matrice\n this.grid.setHalignment(n, HPos.CENTER); // place les labels au centre des cases\n this.grid.add(this.matrice.getCell(i, j), j, i);\n }\n }\n }",
"void printGrid() {\n GridHelper.printGrid(hiddenGrid);\n }",
"private void setCellGrid(){\n count=0;\n status.setText(\"Player 1 Move\");\n field = new ArrayList<>();\n for (int i=0; i< TwoPlayersActivity.CELL_AMOUNT; i++) {\n field.add(new Cell(i));\n }\n }",
"public void createGrid() {\r\n generator.generate();\r\n }",
"private void addPieces() {\n gridPane.getChildren().clear();\n Map<Piece, Position> pieces = controller.getAllActivePiecesPositions();\n /* Add the tiles */\n for (int row = 0; row < 8; row++) {\n for (int col = 0; col < 8; col++) {\n Tile tile = new TileView(new Position(row, col));\n gridPane.add(tile.getRootNode(),\n 1 + tile.getPosition().getCol(),\n 1 + tile.getPosition().getRow());\n GridPane.setHgrow(tile.getRootNode(), Priority.ALWAYS);\n GridPane.setVgrow(tile.getRootNode(), Priority.ALWAYS);\n getTiles()[row][col] = tile;\n tile.getRootNode().setOnMouseClicked(\n tileListener(tile));\n tile.clear();\n tile.setSymbol(\"\");\n }\n }\n /* Add the pieces */\n for (Piece p : pieces.keySet()) {\n Position placeAt = pieces.get(p);\n getTileAt(placeAt).setSymbol(p.getType().getSymbol(p.getSide()));\n }\n /* Add the coordinates around the perimeter */\n for (int i = 1; i <= 8; i++) {\n Text coord1 = new Text((char) (64 + i) + \"\");\n coord1.setFont(Font.font(null, FontWeight.BOLD, 14));\n coord1.setFill(Color.WHITE);\n GridPane.setHalignment(coord1, HPos.CENTER);\n gridPane.add(coord1, i, 0);\n\n Text coord2 = new Text((char) (64 + i) + \"\");\n coord2.setFont(Font.font(null, FontWeight.BOLD, 14));\n coord2.setFill(Color.WHITE);\n GridPane.setHalignment(coord2, HPos.CENTER);\n gridPane.add(coord2, i, 9);\n\n Text coord3 = new Text(\" \" + (9 - i) + \" \");\n coord3.setFont(Font.font(null, FontWeight.BOLD, 14));\n coord3.setFill(Color.WHITE);\n GridPane.setHalignment(coord3, HPos.CENTER);\n gridPane.add(coord3, 0, i);\n\n Text coord4 = new Text(\" \" + (9 - i) + \" \");\n coord4.setFont(Font.font(null, FontWeight.BOLD, 14));\n coord4.setFill(Color.WHITE);\n GridPane.setHalignment(coord4, HPos.CENTER);\n gridPane.add(coord4, 9, i);\n }\n }",
"public void draw_grid() {\n for (int i = 0; i <= xNumTiles; i++) {\n stroke(100);\n line(i * tileSize, 0, i * tileSize, yNumTiles * tileSize);\n }\n\n for (int j = 0; j <= yNumTiles; j++) {\n stroke(100);\n line(0, j * tileSize, xNumTiles * tileSize, j * tileSize);\n }\n }",
"private static void setQui(){\n int mX, mY;\n for (Integer integer : qList) {\n mY = (int) (Math.floor(1.f * integer / Data.meshRNx));\n mX = integer - Data.meshRNx * mY;\n if (Data.densCells[mX][mY] > Data.gwCap[mX][mY] * .75) {\n for (int j = 0; j < Data.densCells[mX][mY]; j++) {\n Cell cell = (Cell) cells.get(Data.idCellsMesh[mX][mY][j]);\n cell.vState = true;\n cell.quiescent = Data.densCells[mX][mY] >= Data.gwCap[mX][mY];\n }\n }\n }\n }",
"private void initGrid() {\n m_emptyHexCount = 0;\n m_hexagons.clear();\n for (int i = 0; i < m_rowNum; i++) {\n ArrayList<Hexagon> tmp = new ArrayList<>();\n int maxColNum;\n if (i % 2 == 0)\n maxColNum = m_colNum;\n else\n maxColNum = m_colNum - 1;\n\n for (int j = 0; j < maxColNum; j++) {\n tmp.add(new Hexagon(m_app));\n m_emptyHexCount++;\n }\n m_hexagons.add(tmp);\n }\n }",
"private void colorizeGrid() {\n for (int x = 0; x < field.length; x++) {\n for (int y = 0; y < field[0].length; y++) {\n field[x][y].setStyle(intersection.getColorCode(x, y));\n }\n }\n }",
"public void paintComponent(Graphics g){\n \t\tsuper.paintComponent(g);\r\n \r\n \t\tint numOfRows = (int)blockShape.getResolution().x;\r\n \t\tint numOfCols = (int)blockShape.getResolution().y;\r\n \t\tint gridSize = (int)(SHAPE_WIN_SIZE/numOfRows);\r\n \t\t\r\n \t\t//1st: paint each element in the BlockShape -> shape(Color[][])\r\n \t\tfor(int i=0; i< numOfRows;i++){\r\n \t\t\tfor(int j=0; j< numOfCols; j++){\r\n \t\t\t\tg.setColor(blockShape.getShapeElement(i, j));\r\n \r\n \t\t\t\tif(i == numOfRows-1 || j == numOfCols-1){\r\n \t\t\t\t\t//the last row and last column is a bit wider because of the type casting =_=\r\n \t\t\t\t\tg.fillRect(j*gridSize, i*gridSize, gridSize+10, gridSize+10);\r\n \t\t\t\t}else{\r\n \t\t\t\t\tg.fillRect(j*gridSize, i*gridSize, gridSize, gridSize);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\r\n \t\t//2nd: paint the grid corresponding to the resolution of blockShape\r\n \t\tg.setColor(Color.orange);\r\n \t\tfor (int row = 0; row < numOfRows; row++) {\r\n \t\t\tg.drawLine(0,row*gridSize ,SHAPE_WIN_SIZE, row*gridSize);\r\n \t\t}\r\n \t\tg.drawLine(0,SHAPE_WIN_SIZE, SHAPE_WIN_SIZE, SHAPE_WIN_SIZE);\r\n \r\n \t\tfor (int col = 0; col < numOfCols; col++) {\r\n \t\t\tg.drawLine(col*gridSize, 0 , col*gridSize , SHAPE_WIN_SIZE);\r\n \t\t}\r\n \t\tg.drawLine(SHAPE_WIN_SIZE-1, 0, SHAPE_WIN_SIZE-1, SHAPE_WIN_SIZE);\r\n \t}",
"void setGridX(int i);",
"private void updateGrid() {\n if (intersection != null) {\n colorizeGrid();\n for (int x = 0; x < field.length; x++) {\n for (int y = 0; y < field[0].length; y++) {\n field[x][y].setText(intersection.getLetterCode(x, y));\n }\n }\n }\n }",
"public int getReuseGrid()\n {\n return this.reuseGrid;\n }",
"public void printGridAsChild()\n\t{\n\t\tfor ( int y = 0; y < height; y++)\n\t\t{\n\t\t\tSystem.out.print( \"\\t\" );\n\t\t\tfor ( int x = 0; x < width; x++ )\n\t\t\t{\n\t\t\t\t// If x & y are the same as the empty tile coordinates, print empty tile\n\t\t\t\tif ( x == x0 && y == y0 ) System.out.print( \" \" );\n\t\t\t\t// Else print element of grid\n\t\t\t\telse System.out.print( grid[x][y] + \" \" );\n\t\t\t}\n\t\t\tSystem.out.print( \"\\n\" );\n\t\t}\n\t\tSystem.out.print( \"\\n\" );\n\t}",
"protected void computeGridParameters() {\n float padding = 0.02f * overlay.getScalingValue();\n boolean flipX = x2 < x1;\n float xx1 = flipX ? (x1 + padding) : (x1 - padding);\n float xx2 = flipX ? (x2 - padding) : (x2 + padding);\n boolean flipY = y2 < y1;\n float yy1 = flipY ? (y1 + padding) : (y1 - padding);\n float yy2 = flipY ? (y2 - padding) : (y2 + padding);\n \n xGrid1 = xx1; yGrid1 = yy1;\n xGrid2 = xx2; yGrid2 = yy1;\n xGrid3 = xx1; yGrid3 = yy2;\n xGrid4 = xx2; yGrid4 = yy2;\n horizGridCount = 3; vertGridCount = 3;\n }",
"private void update() {\n // Set for each cell\n for (Cell cell : this.view.getGamePanel().getViewCellList()) {\n cell.setBackground(BKGD_DARK_GRAY);\n cell.setForeground(Color.WHITE);\n cell.setFont(new Font(\"Halvetica Neue\", Font.PLAIN, 36));\n cell.setBorder(new LineBorder(Color.BLACK, 0));\n cell.setHorizontalAlignment(JTextField.CENTER);\n cell.setCaretColor(new Color(32, 44, 53));\n cell.setDragEnabled(false);\n cell.setTransferHandler(null);\n\n // Add subgrid separators\n CellPosition pos = cell.getPosition();\n if (pos.getColumn() == 2 || pos.getColumn() == 5) {\n cell.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 2, new Color(146, 208, 80)));\n } else if (pos.getRow() == 2 || pos.getRow() == 5) {\n cell.setBorder(BorderFactory.createMatteBorder(0, 0, 2, 0, new Color(146, 208, 80)));\n }\n if ((pos.getColumn() == 2 && pos.getRow() == 2) || (pos.getColumn() == 5 && pos.getRow() == 5)\n || (pos.getColumn() == 2 && pos.getRow() == 5) || (pos.getColumn() == 5 && pos.getRow() == 2)) {\n cell.setBorder(BorderFactory.createMatteBorder(0, 0, 2, 2, new Color(146, 208, 80)));\n }\n\n // Validate User's Cell Input + Mouse Listeners\n cell.removeKeyListener(cellKeyListener);\n cell.removeMouseListener(cellMouseListener);\n if (cell.isLocked()) {\n cell.setEditable(false);\n cell.setHighlighter(null);\n } else {\n cell.setBackground(BKGD_LIGHT_GRAY);\n cell.addMouseListener(cellMouseListener);\n cell.addKeyListener(cellKeyListener);\n }\n if (cell.isEmpty()) {\n cell.setText(\"\");\n } else {\n cell.setText(String.valueOf(cell.getUserValue()));\n }\n\n // Adds cell to the view's grid\n this.view.getGamePanel().getGrid().add(cell);\n }\n\n }",
"private void setGrid() {\r\n maxRows = (FORM_HEIGHT - FORM_HEIGHT_ADJUST) / SQUARE_SIZE;\r\n maxColumns = (FORM_WIDTH - FORM_WIDTH_ADJUST) / SQUARE_SIZE; \r\n grid = new JLabel[maxRows][maxColumns];\r\n int y = (FORM_HEIGHT - (maxRows * SQUARE_SIZE)) / 2;\r\n for (int row = 0; row < maxRows; row++) {\r\n int x = (FORM_WIDTH - (maxColumns * SQUARE_SIZE)) / 2;\r\n for (int column = 0; column < maxColumns; column++) {\r\n createSquare(x,y,row,column);\r\n x += SQUARE_SIZE;\r\n }\r\n y += SQUARE_SIZE;\r\n } \r\n }",
"private void addGrid() {\n\n\t\tList<ColumnConfig> configs = new LinkedList<ColumnConfig>();\n\n\t\tColumnConfig column = new ColumnConfig(InheritedComponentInstanceSelModelData.PROPERTY_ID, messages\n\t\t\t.columnHeaderId(), 15);\n\t\tcolumn.setSortable(false);\n\t\tcolumn.setRenderer(idCellRenderer);\n\t\tconfigs.add(column);\n\n\t\tcolumn = new ColumnConfig(Constants.PROPERTY_KEY, Constants.EMPTY_STRING, 15);\n\t\tcolumn.setRenderer(gearCellRenderer);\n\t\tcolumn.setSortable(false);\n\t\tconfigs.add(column);\n\n\t\tcolumn = new ColumnConfig();\n\t\tcolumn.setId(Constants.PROPERTY_NAME);\n\t\tcolumn.setHeaderText(pmsMessages.columnHeaderName());\n\t\tcolumn.setWidth(COLUMN_NAME_WIDTH);\n\t\tconfigs.add(column);\n\n\t\tcolumn = new ColumnConfig();\n\t\tcolumn.setId(InheritedComponentInstanceSelModelData.PROPERTY_MODULE);\n\t\tcolumn.setHeaderText(pmsMessages.columnHeaderModule());\n\t\tcolumn.setWidth(COLUMN_MODULE_WIDTH);\n\t\tconfigs.add(column);\n\n\t\tcolumn = new ColumnConfig();\n\t\tcolumn.setId(InheritedComponentInstanceSelModelData.PROPERTY_CONFIGURATION);\n\t\tcolumn.setHeaderText(pmsMessages.columnHeaderConfiguration());\n\t\tcolumn.setWidth(COLUMN_CONFIGURATION_WIDTH);\n\t\tcolumn.setRenderer(new GridCellRenderer<InheritedComponentInstanceSelModelData>() {\n\n\t\t\tpublic Object render(InheritedComponentInstanceSelModelData model, String property, ColumnData config,\n\t\t\t\tint rowIndex, int colIndex, ListStore<InheritedComponentInstanceSelModelData> store,\n\t\t\t\tGrid<InheritedComponentInstanceSelModelData> grid) {\n\n\t\t\t\tString icon = null;\n\t\t\t\tString title = null;\n\t\t\t\tBoolean configuration = model.getDTO().getConfiguration();\n\t\t\t\tif (configuration == null) {\n\t\t\t\t\treturn \"\";\n\t\t\t\t} else if (configuration) {\n\t\t\t\t\ticon = Constants.OK_IMAGE;\n\t\t\t\t\ttitle = pmsMessages.titleComponentOverrideConfiguration();\n\t\t\t\t} else {\n\t\t\t\t\ticon = Constants.ERROR_IMAGE;\n\t\t\t\t\ttitle = pmsMessages.titleComponentInheritedConfiguration();\n\t\t\t\t}\n\t\t\t\treturn TEMPLATE_ICON_CELL.replaceAll(PATTERN_ICON, icon).replaceAll(PATTERN_TITLE, title);\n\t\t\t}\n\t\t});\n\t\tconfigs.add(column);\n\n\t\tcolumn = new ColumnConfig();\n\t\tcolumn.setId(InheritedComponentInstanceSelModelData.PROPERTY_DEPENDENCIES);\n\t\tcolumn.setHeaderText(pmsMessages.columnHeaderDependences());\n\t\tcolumn.setWidth(COLUMN_DEPENDENCIES_WIDTH);\n\t\tcolumn.setRenderer(new GridCellRenderer<InheritedComponentInstanceSelModelData>() {\n\n\t\t\tpublic Object render(InheritedComponentInstanceSelModelData model, String property, ColumnData config,\n\t\t\t\tint rowIndex, int colIndex, ListStore<InheritedComponentInstanceSelModelData> store,\n\t\t\t\tGrid<InheritedComponentInstanceSelModelData> grid) {\n\n\t\t\t\tString icon = null;\n\t\t\t\tString title = null;\n\t\t\t\tBoolean dependencies = model.getDTO().getDependencies();\n\t\t\t\tif (dependencies == null) {\n\t\t\t\t\treturn \"\";\n\t\t\t\t} else if (dependencies) {\n\t\t\t\t\ticon = Constants.OK_IMAGE;\n\t\t\t\t\ttitle = pmsMessages.titleComponentOverrideDependences();\n\t\t\t\t} else {\n\t\t\t\t\ticon = Constants.ERROR_IMAGE;\n\t\t\t\t\ttitle = pmsMessages.titleComponentInheritedDependences();\n\t\t\t\t}\n\t\t\t\treturn TEMPLATE_ICON_CELL.replaceAll(PATTERN_ICON, icon).replaceAll(PATTERN_TITLE, title);\n\t\t\t}\n\t\t});\n\t\tconfigs.add(column);\n\n\t\tColumnModel cm = new ColumnModel(configs);\n\n\t\tstore = new ListStore<InheritedComponentInstanceSelModelData>();\n\t\tstore.setStoreSorter((StoreSorter) storeSorter);\n\t\tstore.setSortField(ModuleInstanceSelModelData.PROPERTY_NAME);\n\n\t\tgrid = new Grid<InheritedComponentInstanceSelModelData>(\n\t\t\t(ListStore<InheritedComponentInstanceSelModelData>) store, cm);\n\t\tgrid.setSelectionModel(new GridSelectionModel<InheritedComponentInstanceSelModelData>());\n\t\tgrid.setAutoExpandColumn(InheritedComponentInstanceSelModelData.PROPERTY_MODULE);\n\t\tgrid.setLoadMask(true);\n\n\t\tGridView gridView = grid.getView();\n\t\tgridView.setForceFit(true);\n\n\t\tadd(grid);\n\t}",
"protected void doFillIntoGrid(Composite parent, int numColumns) {\n super.doFillIntoGrid(parent, numColumns);\n adjustForNumColumns(numColumns);\n }",
"public void drawGrid()\n {\n noStroke();\n for(int i = 0; i < xCells; i++)\n {\n for(int j = 0; j < yCells; j++)\n {\n if(pattern[i][j])\n fill(0);\n else\n fill(255);\n rect(firstCellPosition[0]+i*cellSize,firstCellPosition[1]+j*cellSize,cellSize-1,cellSize-1);\n }\n }\n }",
"protected abstract void paintGrid(Graphics2D g);",
"public void arrangeBoard(){\n for(int i=0;i<6;i++){\n for(int j=0;j<6;j++){\n if(i==2 && j==0){ //set the target ship.\n gbc.gridx = 0;\n gbc.gridy = 2;\n gbc.gridwidth = 2;\n targetShip = new JLabel();\n targetShip.setIcon(new ImageIcon(\"design\\\\ships\\\\targetShip.png\"));\n mainPanel.add(targetShip,gbc);\n }\n else if(i==2 && j==1){\n continue;\n }\n else{ //put free spaces in the other places.\n gbc.gridx = j;\n gbc.gridy = i;\n gbc.gridwidth = 1;\n gbc.gridheight = 1;\n freeSpaceButton freeSpace = new freeSpaceButton(new Point(j,i));\n mainPanel.add(freeSpace,gbc);\n }\n }\n }\n }",
"private void conformCorridors() {\n for (int rowView = 0; rowView < rowViewMax; rowView++) {\r\n for (int colView = 0; colView < colViewMax; colView++) {\r\n if (getCell(rowView, colView) != Cell.wall)\r\n setCell(rowView, colView, Cell.corridor);\r\n }\r\n }\r\n }",
"@Override\r\n\tpublic int getSize() {\n\t\treturn gridSize;\r\n\t}",
"private void populateGridData() {\n\t\t// Delete subfile\n\t\tnmfkpinds.setPgmInd74(true);\n\t\tnmfkpinds.setPgmInd71(false);\n\t\tnmfkpinds.setPgmInd72(false);\n\t\tnmfkpinds.setPgmInd31(false);\n\t\tnmfkpinds.setPgmInd74(false);\n\t\t// Write subfile\n\t\tif (stateVariable.getSflrrn() == 0) {\n\t\t\tcontractDetail.fetch(stateVariable.getXwordn());\n\t\t}\n\t\tcontractDetail.next(stateVariable.getXwordn());\n\t\tnmfkpinds.setPgmInd31(lastIO.isEndOfFile());\n\t\tuwScnIdx1 = 0;\n\t\twhile (! nmfkpinds.pgmInd31()) {\n\t\t\tstateVariable.setSflrrn(Integer.valueOf(stateVariable.getSflrrn() + 1));\n\t\t\tstateVariable.setDssel(blanks(1));\n\t\t\tstateVariable.setSwabcd(subString(stateVariable.getXwabcd(), 1, 15));\n\t\t\tstateVariable.setSwt8tx(subString(stateVariable.getXwt8tx(), 1, 9));\n\t\t\tproductMaster.retrieve(stateVariable.getXwabcd());\n\t\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t\t// BR00001 Product not found on Product_Master\n\t\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\t\tstateVariable.setXwhltx(all(\"-\", 10));\n\t\t\t}\n\t\t\tif (uwScnIdx1 < Integer.valueOf(gridVariable.length - 1)) {\n\t\t\t\tuwScnIdx1 = Integer.valueOf(uwScnIdx1 + 1);\n\t\t\t}\n\t\t\tgridVariable[uwScnIdx1].setDssel(\"X\");\n\t\t\tgridVariable[uwScnIdx1].setSwabcd(stateVariable.getSwabcd());\n\t\t\tgridVariable[uwScnIdx1].setXwabcd(stateVariable.getXwabcd());\n\t\t\tgridVariable[uwScnIdx1].setXwaacs(stateVariable.getXwaacs());\n\t\t\tgridVariable[uwScnIdx1].setSwt8tx(stateVariable.getSwt8tx());\n\t\t\tgridVariable[uwScnIdx1].setXwt8tx(stateVariable.getXwt8tx());\n\t\t\tgridVariable[uwScnIdx1].setXwricd(stateVariable.getXwricd());\n\t\t\tgridVariable[uwScnIdx1].setXwa5qt(stateVariable.getXwa5qt());\n\t\t\tgridVariable[uwScnIdx1].setXwa2cd(stateVariable.getXwa2cd());\n\t\t\tgridVariable[uwScnIdx1].setXwpric(stateVariable.getXwpric());\n\t\t\tgridVariable[uwScnIdx1].setXwhltx(stateVariable.getXwhltx());\n\t\t\t// Reading just one grid page\n\t\t\tif (uwScnIdx1 == Integer.valueOf(gridVariable.length - 1)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcontractDetail.next(stateVariable.getXwordn());\n\t\t\tnmfkpinds.setPgmInd31(lastIO.isEndOfFile());\n\t\t}\n\t\t// -\n\t\tif (stateVariable.getSflrrn() > 0) {\n\t\t\tif (equal(\"0\", stateVariable.getSflchg())) {\n\t\t\t\tstateVariable.setShwrec(1);\n\t\t\t}\n\t\t\tif ((stateVariable.getShwrec() > stateVariable.getSflrrn()) || (stateVariable.getShwrec() < 1)) {\n\t\t\t\tstateVariable.setShwrec(1);\n\t\t\t}\n\t\t\t// Richard T: 27 Sep 2010\n\t\t\tif (stateVariable.getSflrrn() > 0) {\n\t\t\t\tnmfkpinds.setPgmInd71(true);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tnmfkpinds.setPgmInd71(false);\n\t\t\t}\n\t\t}\n\t\tnmfkpinds.setPgmInd72(true);\n\t}",
"private void drawGrid(){\r\n\r\n\t\tdrawHorizontalLines();\r\n\t\tdrawVerticalLines();\r\n\t}",
"private void makeGrid(JLabel moves, JLabel remainingBombs) {\r\n this.grid = new Tile[gridSize][gridSize]; \r\n for (int r = 0; r < gridSize; r++) {\r\n for (int c = 0; c < gridSize; c++) {\r\n if (solution[r][c] == 1) {\r\n grid[r][c] = new Tile(r, c, true);\r\n } else {\r\n grid[r][c] = new Tile(r, c, false);\r\n }\r\n final Tile t = grid[r][c];\r\n t.repaint();\r\n handleClicksAndMoves(t, moves, remainingBombs); \r\n }\r\n }\r\n }",
"public void update() {\n\t\tfor (Entry<String, Integer> entry : countMap.entrySet()) {\n\t\t\tcountMap.put(entry.getKey(), 0);\n\t\t}\n\t\tfor (int i = 0; i < numRows; i++) {\n\t\t\tfor (int j = 0; j < numCols; j++) {\n\t\t\t\tCell c = newGrid[i][j];\n\t\t\t\tc.setRow(i);\n\t\t\t\tc.setCol(j);\n\t\t\t\tblocks[i][j].setFill(c.getColor());\n\t\t\t\tcurrentGrid[i][j] = newGrid[i][j];\n\t\t\t}\n\t\t}\n\t\tempty(newGrid);\n\t}",
"private void createGrid() {\n Platform.runLater(() -> {\n\n // Update UI here\n //createGrid(numRows); // E.g. let's create a 20 x 20 grid\n createGrid(20);\n });\n }",
"public int getGridColumns() \n { \n return gridColumns; \n }",
"private void drawGrid() {\r\n\t\t// loops through the 2d array of the grid.\r\n\t\tfor (int i = 0; i < TetrisGame.PANEL_WIDTH; i++) {\r\n\t\t\tfor (int j = 0; j < TetrisGame.PANEL_HEIGHT; j++) {\r\n\t\t\t\t// checks to see if the piece isn't empty, and draws the piece at it's position.\r\n\t\t\t\tif (game.grid[i][j] != Piece.PieceShape.E) {\r\n\t\t\t\t\tdrawSquare(i, j, Piece.getColor(game.grid[i][j]));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"void initData() {\r\n this.unconnectedCells = new ArrayList<ACell>(Arrays.asList(\r\n new EndCell(-1,-1), new EndCell(0,-1), new EndCell(1, -1),\r\n new EndCell(-1, 0), new Cell(0, 0, Color.BLUE, true), new EndCell(0, 1),\r\n new EndCell(-1, 1), new EndCell(0, 1), new EndCell(1, 1)));\r\n\r\n this.cells1 = new ArrayList<ACell>(Arrays.asList(\r\n new EndCell(-1,-1), new EndCell(0,-1), new EndCell(1, -1), new EndCell(2,-1),\r\n new EndCell(-1, 0), new Cell(0, 0, Color.RED, true),\r\n new Cell(1, 0, Color.RED, false), new EndCell(2, 0),\r\n new EndCell(-1, 1), new Cell(0, 1, Color.BLUE, false),\r\n new Cell(1, 1, Color.RED, false), new EndCell(2, 1),\r\n new EndCell(-1, 2), new EndCell(0, 2), new EndCell(1, 2), new EndCell(2, 2)));\r\n\r\n this.floodedCells = new ArrayList<ACell>(Arrays.asList(\r\n new EndCell(-1,-1), new EndCell(0,-1), new EndCell(1, -1), new EndCell(2,-1),\r\n new EndCell(-1, 0), new Cell(0, 0, Color.RED, true),\r\n new Cell(1, 0, Color.RED, true), new EndCell(2, 0),\r\n new EndCell(-1, 1), new Cell(0, 1, Color.BLUE, true),\r\n new Cell(1, 1, Color.RED, true), new EndCell(2, 1),\r\n new EndCell(-1, 2), new EndCell(0, 2), new EndCell(1, 2), new EndCell(2, 2)));\r\n\r\n this.halfFlooded = new ArrayList<ACell>(Arrays.asList(\r\n new EndCell(-1,-1), new EndCell(0,-1), new EndCell(1, -1), new EndCell(2,-1),\r\n new EndCell(-1, 0), new Cell(0, 0, Color.PINK, true),\r\n new Cell(1, 0, Color.CYAN, true), new EndCell(2, 0),\r\n new EndCell(-1, 1), new Cell(0, 1, Color.CYAN, true),\r\n new Cell(1, 1, Color.PINK, false), new EndCell(2, 1),\r\n new EndCell(-1, 2), new EndCell(0, 2), new EndCell(1, 2), new EndCell(2, 2)));\r\n\r\n this.mtACell = new ArrayList<ACell>();\r\n\r\n this.c1 = new Cell(0, 0, Color.PINK, false);\r\n this.c2 = new Cell(1, 0, Color.GREEN, false);\r\n this.c3 = new Cell(0, 1, Color.CYAN, false);\r\n this.e1 = new EndCell(0, 0);\r\n\r\n this.runGame = new FloodItWorld();\r\n this.runGame.initializeBoard();\r\n\r\n this.game1 = new FloodItWorld(20);\r\n this.game1.initializeBoard();\r\n\r\n this.game2 = new FloodItWorld(1, 100, new Random(20),\r\n 2, 3);\r\n this.game2.initializeBoard();\r\n\r\n this.game3 = new FloodItWorld(1, 10, new Random(21),\r\n 3, 8);\r\n this.game3.initializeBoard();\r\n\r\n this.game5 = new FloodItWorld(5, 5, new Random(23),\r\n 4, 2);\r\n this.game5.initializeBoard();\r\n this.game6 = new FloodItWorld(this.unconnectedCells,\r\n 0, 5, new Random(24), new ArrayList<Color>(Arrays.asList(Color.BLUE)),1, 1,\r\n new ArrayList<ACell>());\r\n this.game7 = new FloodItWorld(this.cells1, 0, 3, new Random(25),\r\n new ArrayList<Color>(Arrays.asList(Color.BLUE, Color.RED)), 2, 2,\r\n new ArrayList<ACell>());\r\n this.game7.stitchCells();\r\n\r\n this.game8 = new FloodItWorld(this.floodedCells, 0, 3, new Random(26),\r\n new ArrayList<Color>(Arrays.asList(Color.BLUE, Color.RED)), 2, 2,\r\n new ArrayList<ACell>());\r\n this.game8.stitchCells();\r\n\r\n this.game9 = new FloodItWorld(this.halfFlooded, 0, 3, new Random(27),\r\n new ArrayList<Color>(Arrays.asList(Color.PINK, Color.BLUE)), 2, 2,\r\n new ArrayList<ACell>());\r\n this.game9.stitchCells();\r\n }",
"public void addNotDefinedCells()\r\n {\r\n if (getCrosstabElement() == null) return;\r\n\r\n // First of all we have to calc what cells we have and in what position they are...\r\n int cellGridWidth = getCrosstabElement().getColumnGroups().size();\r\n int cellGridHeight = getCrosstabElement().getRowGroups().size();\r\n\r\n // We assume that cell D/D (detail/detail) is defined.\r\n // Cell x,y is the cell with totalColumnGroup = colums(x) and totalRowGroup the rows(y)\r\n\r\n for (int y = cellGridHeight; y >= 0; --y)\r\n {\r\n\r\n\r\n for (int x = cellGridWidth; x >= 0; --x)\r\n {\r\n\r\n String totalRowGroupName = \"\";\r\n if (y < cellGridHeight) totalRowGroupName = ((CrosstabGroup)getCrosstabElement().getRowGroups().get(y)).getName();\r\n\r\n String totalColumnGroupName = \"\";\r\n if (x < cellGridWidth) totalColumnGroupName = ((CrosstabGroup)getCrosstabElement().getColumnGroups().get(x)).getName();\r\n\r\n CrosstabCell cell = findCell( totalRowGroupName,\r\n totalColumnGroupName);\r\n\r\n if (cell == null)\r\n {\r\n // we have to find a cell on the same row that matchs the width to inherit by...\r\n int cellHeight = getRowHeight( totalRowGroupName );\r\n int cellWidth = getColumnWidth( totalColumnGroupName );\r\n\r\n\r\n // look for a good row cell with the same width on the same row...\r\n CrosstabCell templateCell = null;\r\n for (int k=x+1; k < cellGridWidth; ++k)\r\n {\r\n templateCell = findCell( totalRowGroupName,\r\n ((CrosstabGroup)getCrosstabElement().getColumnGroups().get(k)).getName());\r\n if (templateCell == null)\r\n {\r\n continue;\r\n }\r\n\r\n if (templateCell.getWidth() == cellWidth)\r\n {\r\n break;\r\n }\r\n else\r\n {\r\n templateCell = null;\r\n }\r\n }\r\n if (templateCell == null)\r\n {\r\n templateCell = findCell( totalRowGroupName, \"\");\r\n if (templateCell != null && templateCell.getWidth() != cellWidth) templateCell = null;\r\n }\r\n\r\n if (templateCell == null) // Look on the same column...\r\n {\r\n for (int k=y+1; k < cellGridHeight; ++k)\r\n {\r\n templateCell = findCell( ((CrosstabGroup)getCrosstabElement().getRowGroups().get(k)).getName(),\r\n totalColumnGroupName);\r\n\r\n if (templateCell.getHeight() == cellHeight)\r\n {\r\n // FOUND IT!\r\n break;\r\n }\r\n else\r\n {\r\n templateCell = null;\r\n }\r\n }\r\n if (templateCell == null)\r\n {\r\n templateCell = findCell( \"\", totalColumnGroupName);\r\n if (templateCell != null && templateCell.getHeight() != cellHeight) templateCell = null;\r\n }\r\n }\r\n\r\n if (templateCell == null)\r\n {\r\n // Default not found!!!! Our cell will be void!\r\n cell = new CrosstabCell();\r\n cell.setParent( this.getCrosstabElement());\r\n cell.setWidth(cellWidth);\r\n cell.setHeight(cellHeight);\r\n cell.setColumnTotalGroup( totalColumnGroupName);\r\n cell.setRowTotalGroup( totalRowGroupName );\r\n }\r\n else\r\n {\r\n cell = templateCell.cloneMe();\r\n cell.setColumnTotalGroup( totalColumnGroupName);\r\n cell.setRowTotalGroup( totalRowGroupName );\r\n cell.setParent( this.getCrosstabElement());\r\n\r\n // Duplicate all elements of this cell, and reassign parent cell...\r\n int currentElements = getCrosstabElement().getElements().size();\r\n for (int i=0; i<currentElements; ++i)\r\n {\r\n ReportElement re = (ReportElement)getCrosstabElement().getElements().elementAt(i);\r\n // WARNING this copy does not support container and group elements!!!\r\n if (re.getCell() == templateCell)\r\n {\r\n re = re.cloneMe();\r\n cell.setColumnTotalGroup(totalColumnGroupName );\r\n cell.setRowTotalGroup(totalRowGroupName );\r\n re.setCell( cell );\r\n getCrosstabElement().getElements().add(re);\r\n }\r\n }\r\n }\r\n\r\n getCrosstabElement().getCells().add( cell );\r\n }\r\n }\r\n }\r\n\r\n }",
"public void displayGrid ()\n {\n for (int i = 0; i < getDimX(); i++) {\n System.out.print(\"[ \");\n for (int y = 0; y < getDimY(); y++) {\n System.out.print(m_grid[i][y]);\n System.out.print(\" \");\n }\n System.out.println(\"]\");\n }\n }",
"@Override\n public Tile[][] getGrid() { return grid; }",
"public BuildGrid()\n {\n System.out.print(\"Creating a new grid: \");\n\n m_grid = new double[1][5];\n setDimX(1);\n setDimY(5);\n\n this.fillWith(0);\n System.out.println(\"Done\");\n }",
"private void initGrids() {\n grid0 = new Grid(100f, 50f, 100f, 0);\n grid1 = new Grid(100f, 150f, 100f, 1);\n grid2 = new Grid(100f, 250f, 100f, 2);\n grid3 = new Grid(100f, 350f, 100f, 3);\n grid4 = new Grid(100f, 50f, 200f, 4);\n grid5 = new Grid(100f, 150f, 200f, 5);\n grid6 = new Grid(100f, 250f, 200f, 6);\n grid7 = new Grid(100f, 350f, 200f, 7);\n grid8 = new Grid(100f, 50f, 300f, 8);\n grid9 = new Grid(100f, 150f, 300f, 9);\n grid10 = new Grid(100f, 250f, 300f, 10);\n grid11 = new Grid(100f, 350f, 300f, 11);\n grid12 = new Grid(100f, 50f, 400f, 12);\n grid13 = new Grid(100f, 150f, 400f, 13);\n grid14 = new Grid(100f, 250f, 400f, 14);\n grid15 = new Grid(100f, 350f, 400f, 15);\n\n /**\n * Adding grids from 0 to 15 to static ArayList of all grids\n */\n grids.clear();\n\n grids.add(grid0);\n grids.add(grid1);\n grids.add(grid2);\n grids.add(grid3);\n grids.add(grid4);\n grids.add(grid5);\n grids.add(grid6);\n grids.add(grid7);\n grids.add(grid8);\n grids.add(grid9);\n grids.add(grid10);\n grids.add(grid11);\n grids.add(grid12);\n grids.add(grid13);\n grids.add(grid14);\n grids.add(grid15);\n }",
"private Grid(Grid oldGrid) {\n\n grid = new String[Main.Y_SIZE][Main.X_SIZE][Main.Z_SIZE];\n this.gateDatabase = oldGrid.gateDatabase;\n this.netDatabase = oldGrid.netDatabase;\n\n for (int i = 0; i < Main.Z_SIZE; i++) {\n for (int k = 0; k < Main.X_SIZE; k++) {\n for (int n = 0; n < Main.Y_SIZE; n++) {\n grid[n][k][i] = oldGrid.grid[n][k][i];\n }\n }\n }\n }",
"public int getColspan() \n {\n return 1;\n }",
"@Override\n\tpublic boolean takeCellSpace() {\n\t\treturn true;\n\t}",
"void drawGridLayout() {\n\t\tpiecesGrid = (GridLayout) findViewById(R.id.layout_container); //get a reference to the GridLayout\n\t\tpiecesGrid.setColumnCount(NUM[COLS]); //set number of columns\n\t\tpiecesGrid.setRowCount(NUM[ROWS]); //set number of rows\n\t\tfor (int i=0; i<NUM[TOTAL]; i++) {\n\t\t\tpiecesGrid.addView(pieceViews.get(i), i); //add the ImageViews\n\t\t}\n\t}",
"public void updateBoard() {\r\n\t\tfor(int i = 0, k = 0; i < board.getWidth(); i+=3) {\r\n\t\t\tfor(int j = 0; j < board.getHeight(); j+=3) {\r\n\t\t\t\t//Check that there are pieces to display\r\n\t\t\t\tif(k < bag.size()) {\r\n\t\t\t\t\tboard.setTile(bag.get(k), i, j);\r\n\t\t\t\t\tk++;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tboard.fillSpace(GridSquare.Type.EMPTY, i, j);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void initializeGrid() {\r\n if (this.rowCount > 0 && this.columnCount > 0) {\r\n this.cellViews = new Rectangle[this.rowCount][this.columnCount];\r\n for (int row = 0; row < this.rowCount; row++) {\r\n for (int column = 0; column < this.columnCount; column++) {\r\n Rectangle rectangle = new Rectangle();\r\n rectangle.setX((double)column * CELL_WIDTH);\r\n rectangle.setY((double)row * CELL_WIDTH);\r\n rectangle.setWidth(CELL_WIDTH);\r\n rectangle.setHeight(CELL_WIDTH);\r\n this.cellViews[row][column] = rectangle;\r\n this.getChildren().add(rectangle);\r\n }\r\n }\r\n }\r\n }",
"@Override\n protected void generateTiles() {\n }",
"@Override \r\n public void setUI(TableUI ui) \r\n {\n super.setUI(new BasicTableUI(){ \r\n public void paint(Graphics g, JComponent c) { \r\n Rectangle r=g.getClipBounds(); \r\n int firstRow=table.rowAtPoint(new Point(0,r.y)); \r\n int lastRow=table.rowAtPoint(new Point(0,r.y+r.height)); \r\n // -1 is a flag that the ending point is outside the table \r\n if (lastRow<0) \r\n lastRow=table.getRowCount()-1; \r\n for (int i=firstRow; i<=lastRow; i++) \r\n paintRow(i,g); \r\n } \r\n private void paintRow(int row, Graphics g) \r\n { \r\n Rectangle r=g.getClipBounds(); \r\n for (int i=0; i<table.getColumnCount();i++) \r\n { \r\n Rectangle r1=table.getCellRect(row,i,true); \r\n if (r1.intersects(r)) // at least a part is visible \r\n { \r\n int sk=i;//((CTable)table).map.visibleCell(red,i); \r\n paintCell(row,sk,g,r1); \r\n // increment the column counter \r\n //i+=((CTable)table).map.span(row,sk)-1; \r\n //i++; \r\n } \r\n } \r\n } \r\n private void paintCell(int row, int column, Graphics g,Rectangle area) \r\n { \r\n int verticalMargin = table.getRowMargin(); \r\n int horizontalMargin = table.getColumnModel().getColumnMargin(); \r\n \r\n Color c = g.getColor(); \r\n g.setColor(table.getGridColor()); \r\n g.drawRect(area.x,area.y,area.width-1,area.height-1); \r\n g.setColor(c); \r\n \r\n area.setBounds(area.x + horizontalMargin/2, \r\n area.y + verticalMargin/2, \r\n area.width - horizontalMargin, \r\n area.height - verticalMargin); \r\n \r\n if (table.isEditing() && table.getEditingRow()==row && \r\n table.getEditingColumn()==column) \r\n { \r\n Component component = table.getEditorComponent(); \r\n component.setBounds(area); \r\n component.validate(); \r\n } \r\n else \r\n { \r\n TableCellRenderer renderer = table.getCellRenderer(row, column); \r\n Component component = table.prepareRenderer(renderer, row, column); \r\n if (component.getParent() == null) \r\n rendererPane.add(component); \r\n rendererPane.paintComponent(g, component, table, area.x, area.y, \r\n area.width, area.height, true); \r\n } \r\n } \r\n }); \r\n }",
"public void drawGrid() {\r\n\t\tsetLayout(new GridLayout(getSize_w(), getSize_h()));\r\n\t\tfor (int i = 0; i < getSize_h(); i++) {\r\n\t\t\tfor (int j = 0; j < getSize_w(); j++) {\r\n\t\t\t\tcity_squares[i][j] = new Gridpanel(j, i);\r\n\t\t\t\tadd(city_squares[i][j]);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private VerticalLayout buildGridInfo() {\n\t\tgridInfo = new VerticalLayout();\r\n\t\tgridInfo.setImmediate(false);\r\n\t\tgridInfo.setWidth(\"100%\");\r\n\t\tgridInfo.setHeight(\"100.0%\");\r\n\t\tgridInfo.setMargin(false);\r\n\t\tgridInfo.setSpacing(true);\r\n\t\t\r\n\t\t// gridTitle\r\n\t\tgridTitle = buildGridTitle();\r\n\t\tgridInfo.addComponent(gridTitle);\r\n\t\tgridInfo.setExpandRatio(gridTitle, 1.0f);\r\n\t\t\r\n\t\t// gridData\r\n\t\tgridData = buildGridData();\r\n\t\tgridInfo.addComponent(gridData);\r\n\t\tgridInfo.setExpandRatio(gridData, 1.0f);\r\n\t\t\r\n\t\treturn gridInfo;\r\n\t}",
"void growCells() {\n for (Cell cell : cells) {\n cell.grow();\n }\n }",
"public DraftGrid() {\n initComponents();\n markedCard = null;\n emptyGrid = true;\n }",
"public void printGrid(){\n\t\tfor(int i=0;i<getHeight();i++){\n\t\t\tfor(int j=0;j<getWidth();j++){\n\t\t\t\tif(grid[i][j]==null)\n\t\t\t\t\tSystem.out.print(\"- \");\n\t\t\t\telse if(getGrid(i,j).isPath())\n\t\t\t\t\tSystem.out.print(\"1 \");\n\t\t\t\telse if(getGrid(i,j).isScenery())\n\t\t\t\t\tSystem.out.print(\"0 \");\n\t\t\t\telse\n\t\t\t\t\tSystem.out.print(\"? \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t\tSystem.out.println();\n\t}",
"@Override\n\tpublic void createCellStructure() {\n\t\t\n\t}",
"private static void drawGrid(int[][] grid) {\n BufferStrategy buf = canvas.getBufferStrategy();\n Graphics g = buf.getDrawGraphics();\n\n g.clearRect(0, 0, (2 * WINDOW_MARGINS) + (CELL_SIZE * SIZE_X), (2 * WINDOW_MARGINS) + (CELL_SIZE * SIZE_Y));\n\n for (int i = 0; i < grid.length; i++) {\n for (int j = 0; j < grid[0].length; j++) {\n g.setColor(pallette[grid[i][j]]);\n g.fillRect(WINDOW_MARGINS + (CELL_SIZE * i), WINDOW_MARGINS + (CELL_SIZE * j), CELL_SIZE, CELL_SIZE);\n }\n }\n\n if (!buf.contentsLost()) buf.show();\n g.dispose();\n }",
"public void setBoard() {\n margin = Math.round((sizeOfCell * 3) / 2);\n RelativeLayout.LayoutParams marginParam = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);\n marginParam.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);\n marginParam.addRule(RelativeLayout.CENTER_HORIZONTAL);\n marginParam.setMargins(0, 0, 0, (margin));\n gridContainer.setLayoutParams(marginParam);\n\n LinearLayout.LayoutParams lpRow = new LinearLayout.LayoutParams(sizeOfCell * maxN, sizeOfCell);\n LinearLayout.LayoutParams lpCell = new LinearLayout.LayoutParams(sizeOfCell, sizeOfCell);\n LinearLayout linRow;\n\n for (int row = 0; row < maxN; row++) {\n linRow = new LinearLayout(context);\n for (int col = 0; col < maxN; col++) {\n ivCell[row][col] = new ImageView(context);\n linRow.addView(ivCell[row][col], lpCell);\n }\n linBoardGame.addView(linRow, lpRow);\n }\n }",
"public void printGrid(){\n\t\tfor (int i = 0; i < 8; i++){\n\t\t\tfor (int j = 0; j < 8; j++)\n\t\t\t\tSystem.out.print(Grid[i][j]+\" \"); \n\t\t\tSystem.out.println(); \n\t\t}\n\t}",
"public abstract boolean currentSizeVSCageSize(int row, int col);",
"private void compactVertically (List<List<NodeRealizer>> cellColumns)\n {\n for (List<NodeRealizer> cellColumn : cellColumns)\n {\n int centerIndex = (cellColumn.size () - 1) / 2;\n NodeRealizer centerRealizer = cellColumn.get (centerIndex);\n double minY = centerRealizer.getY () - GAP;\n double maxY = centerRealizer.getY () + centerRealizer.getHeight () + GAP;\n for (int i = 1; i <= centerIndex; i++)\n {\n NodeRealizer topRealizer = cellColumn.get (centerIndex - i);\n topRealizer.setY (minY - topRealizer.getHeight ());\n minY -= topRealizer.getHeight () + GAP;\n NodeRealizer bottomRealizer = cellColumn.get (centerIndex + i);\n bottomRealizer.setY (maxY);\n maxY += bottomRealizer.getHeight () + GAP;\n }\n if (cellColumn.size () % 2 == 0)\n {\n NodeRealizer bottomRealizer = cellColumn.get (cellColumn.size () - 1);\n bottomRealizer.setY (maxY);\n }\n }\n }",
"@Override\n public void printGrid(){\n for(int row = 0; row < rows; row++){\n System.out.print(\"\\n\");\n if(row==0){\n char row_char='A';\n System.out.print(\" |\");\n for(int i=0; i<rows; i++){\n System.out.print(\"[\" + row_char + \"]\");\n row_char++;\n }\n System.out.print(\"\\n\");\n System.out.print(\"---|\");\n for(int i=0; i<rows;i++){\n System.out.print(\"---\");\n }\n System.out.print(\"\\n\");\n }\n\n for(int column = 0; column < columns; column++){\n if (column==0){System.out.print(\"[\"+row+\"]|\");}\n System.out.print(grid[row][column]);\n }\n }\n }",
"public void fillTable() {\n\t\tif (scroll.getWidth() == 0) {\n\t\t\treturn;\n\t\t}\n\t\tboolean showedNew = false;\n\t\tArrayList<Placeable> currentView = new ArrayList<Placeable>();\n\t\tif (viewing == ViewingMode.MATERIAL) {\n\t\t\tif (loadedMats == null)\n\t\t\t\tloadedMats = repo.getAllMats();\n\t\t\tfor (NamedMaterial m: loadedMats) {\n\t\t\t\tcurrentView.add(m);\n\t\t\t}\n\t\t}\n\t\telse if (viewing == ViewingMode.PIECE){\n\t\t\tif (loadedPieces == null)\n\t\t\t\tloadedPieces = repo.getAllPieces();\n\t\t\tfor (Piece m: loadedPieces) {\n\t\t\t\tcurrentView.add(m);\n\t\t\t}\n\t\t\tshowedNew = true;\n\t\t}\n\t\t\n\t\ttiles.clearChildren();\n\t\tfloat cellWidth = 64.0f;\n\t\tint numAcross = (int)(scroll.getWidth() / cellWidth);\n\t\tif (numAcross <= 0) {\n\t\t\tnumAcross = 1;\n\t\t}\n\t\tint count = 0;\n\t\tActor tile;\n\t\twhile (count < currentView.size()) {\n\t\t\tfor (int y = 0; y < numAcross; y++) {\n\t\t\t\tif (!showedNew) {\n\t\t\t\t\ttile = new Label(\"New\", TextureOrganizer.getSkin());\n\t\t\t\t\t((Label)tile).setAlignment(Align.center);\n\t\t\t\t\ttile.addListener(new ClickListener() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t public void clicked(InputEvent event, float x, float y) {\n\t\t\t\t\t\t\tmakeNew();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tshowedNew = true;\n\t\t\t\t}\n\t\t\t\telse if (count >= currentView.size()) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttile = new ColoredRectActor(currentView.get(count++));\n\t\t\t\t\ttile.addListener(new TileListener((ColoredRectActor)tile));\n\t\t\t\t}\n\t\t\t\ttiles.add(tile).width(cellWidth).height(cellWidth).fill();\n\t\t\t}\n\t\t\tif (count < currentView.size())\n\t\t\t\ttiles.row();\n\t\t}\n\t}",
"public void splitBoard(Posn start, int currRows, int currCols) {\n int startRow = start.x;\n int startCol = start.y;\n if (currRows != 1 && currCols != 1) {\n // top left piece\n this.board.get(startCol).get(startRow).down = true; \n\n // top right piece\n this.board.get(startCol + currCols - 1).get(startRow).down = true; \n\n // bottom left right\n this.board.get(startCol).get(startRow + currRows - 1).right = true; \n this.board.get(startCol).get(startRow + currRows - 1).up = true; // bottom left up\n\n // bottom, right, left\n this.board.get(startCol + currCols - 1).get(startRow + currRows - 1).left = true; \n // bottom, right, up\n this.board.get(startCol + currCols - 1).get(startRow + currRows - 1).up = true; \n\n // connect middle pieces on both sides of subgrid\n for (int i = startRow + 1; i < startRow + currRows - 1; i++) { \n this.board.get(startCol).get(i).up = true;\n this.board.get(startCol).get(i).down = true;\n this.board.get(startCol + currCols - 1).get(i).up = true;\n this.board.get(startCol + currCols - 1).get(i).down = true;\n }\n // connect middle pieces on bottom of subgrid\n for (int i = startCol + 1; i < startCol + currCols - 1; i++) { \n this.board.get(i).get(startRow + currRows - 1).left = true;\n this.board.get(i).get(startRow + currRows - 1).right = true;\n }\n }\n\n // grid base cases\n if (this.height == 1) {\n for (ArrayList<GamePiece> p : this.board) {\n if (p.get(0).row == 0) {\n p.get(0).right = true;\n }\n else if (p.get(0).row == this.width - 1) {\n p.get(0).left = true;\n }\n else {\n p.get(0).right = true;\n p.get(0).left = true;\n }\n }\n }\n else if (this.width == 1) {\n for (GamePiece p : this.board.get(0)) {\n if (p.col == 0) {\n p.down = true;\n }\n else if (p.col == this.height - 1) {\n p.up = true;\n }\n else {\n p.down = true;\n p.up = true;\n }\n }\n }\n else if (currRows == 2) {\n for (int i = startCol + 1; i < startCol + currCols - 1; i++) {\n this.board.get(i).get(startRow).down = true;\n this.board.get(i).get(startRow + 1).up = true;\n }\n }\n else if (currRows == 3 && currCols == 3) { // base case for odd grid\n this.board.get(startCol).get(startRow + 1).right = true;\n this.board.get(startCol + 1).get(startRow + 1).left = true;\n this.board.get(startCol + 1).get(startRow + 1).up = true;\n this.board.get(startCol + 1).get(startRow).down = true;\n\n }\n // recur if the grid can be divided into 4 non-overlapping quadrants\n else if (currRows > 3 || currCols > 3) { \n this.splitBoard(new Posn(startRow, startCol), (int) Math.ceil(currRows / 2.0),\n (int) Math.ceil(currCols / 2.0));\n this.splitBoard(new Posn(startRow + (int) Math.ceil(currRows / 2.0), startCol), currRows / 2,\n (int) Math.ceil(currCols / 2.0));\n this.splitBoard(new Posn(startRow + (int) Math.ceil(currRows / 2.0),\n startCol + (int) Math.ceil(currCols / 2.0)), currRows / 2, currCols / 2);\n this.splitBoard(new Posn(startRow, startCol + (int) Math.ceil(currCols / 2.0)),\n (int) Math.ceil(currRows / 2.0), currCols / 2);\n }\n }",
"public static void AddStripToGrid(ArrayList<ArrayList<Points>> G, ArrayList<Points> strip_temp, double cell_width)\n {\n Collections.sort(strip_temp, new MyComparatorY());\n \n ArrayList<Points> Box = new ArrayList<>(); \n \n for(int i = 0; i < strip_temp.size(); i++)\n {\n ArrayList<Points> q = new ArrayList<>();\n \n q.add(new Points(strip_temp.get(i).x_cor, strip_temp.get(i).y_cor, strip_temp.get(i).p_id, \"no tag\"));\n \n Box.add(new Points(q.get(0).x_cor, q.get(0).y_cor, q.get(0).p_id, q.get(0).tag));\n \n \n int break_flag = 0;\n \n bnm:\n for(int j = i+1; j < strip_temp.size(); j++)\n {\n ArrayList<Points> r = new ArrayList<>();\n \n r.add(new Points(strip_temp.get(j).x_cor, strip_temp.get(j).y_cor, strip_temp.get(j).p_id, \"no tag\"));\n \n double box_dist = (q.get(0).y_cor + cell_Width);\n \n if(r.get(0).y_cor > (q.get(0).y_cor + cell_Width))\n {\n ArrayList<Points> box_temp = new ArrayList<>();\n \n box_temp.addAll(Box);\n \n G.add(box_temp);\n \n break_flag = 1;\n Box.clear();\n \n break bnm;\n }\n \n Box.add(new Points(r.get(0).x_cor, r.get(0).y_cor, r.get(0).p_id, r.get(0).tag));\n \n i=j;\n }\n \n if(break_flag == 0)\n {\n \n ArrayList<Points> box_temp = new ArrayList<>();\n box_temp.addAll(Box);\n\n Box.clear();\n G.add(box_temp);\n } \n }\n }",
"@Override\n public Boolean colisionoCon(MH gr) {\n return true;\n }",
"protected void layoutComponents() {\n double xOffset = 0;\n double yOffset = 0;\n\n final int numberOfColumns = 3;\n final int gap = 10;\n\n // add children\n int index = 0;\n while (index < operators.length) {\n for (int col = 0; col < numberOfColumns && index < operators.length; col++, index++) {\n final OperatorNode each = operators[index];\n if (each != null) {\n each.setOffset(xOffset + ((cellDim.width - each.getWidth()) / 2), yOffset + (cellDim.height - each.getHeight()) / 2);\n }\n xOffset += (cellDim.width + gap);\n }\n xOffset = 0;\n yOffset += cellDim.height + gap;\n }\n }",
"public GridPane() {\n\t\t for (int i=0;i<MAX_X; i++) {\n\t\t\tfor (int j=0;j<MAX_Y;j++) {\n\t\t\t\tseed[i][j] = new Cell(i,j,false);\n\t\t\t}//end for j\n\t\t }//end for i\n\t\n\t \tdefaultBackground = getBackground();\n\t\n\t MatteBorder border = new MatteBorder(1, 1, 1, 1, Color.BLACK);\n\t \tthis.setBorder(border);\n\t \t\t\n\t\t addMouseListener(new MouseAdapter() {\n\t @Override\n\t public void mouseClicked(MouseEvent e) {\n\t \t int x1 = (int)(e.getX()/CELL_WIDTH);\n\t \t int y1 = (int)(e.getY()/CELL_WIDTH);\n\t \t if(seed[x1][y1].isAlive()) {\n\t \t\t seed[x1][y1].isAlive = false;\n\t \t }\n\t \t else {\n\t \t\t seed[x1][y1].isAlive = true;\n\t \t }\n//\t \t System.out.println(\"[\"+x1+\",\"+y1+\"]\");\n\t repaint();\n\t }\n\t });\n\t }",
"public boolean isGridPainted() {\r\n return gridPainted;\r\n }",
"static void drawCrosses() { // draws a cross at each cell centre\n\t\tif (currentStage[currentSlice-1]>1)\n\t\t{\n\t\t\tfloat xc,yc;\n\t\t\t//GeneralPath path = new GeneralPath();\n\n\t\t\tfor (int i=0;i<pop.N;i++)\n\t\t\t{\n\t\t\t\txc = (float) ( (Balloon)(pop.BallList.get(i)) ).x0;\n\t\t\t\tyc = (float) ( (Balloon)(pop.BallList.get(i)) ).y0;\n\t\t\t\tfloat arm = 5;\n\n\t\t\t\t// label cell position\n\t\t\t\tjava.awt.geom.GeneralPath Nshape = new GeneralPath();\n\t\t\t\tNshape.moveTo(xc-arm, yc);\n\t\t\t\tNshape.lineTo(xc+arm, yc);\n\t\t\t\tNshape.moveTo(xc, yc-arm);\n\t\t\t\tNshape.lineTo(xc, yc+arm);\n\n\t\t\t\tRoi XROI = new ShapeRoi(Nshape);\n\t\t\t\tOL.add(XROI);\n\t\t\t}\n\t\t}\n\t}",
"int layout(ArrayList<ImageCell> images, int totalWidth);",
"public void onClearGridButtonClick()\n {\n // CODE MISSING !\n // Should call ensureEmpty for every location in the grid.\n\n // Create a warning dialog box (JOptionPane).\n JOptionPane.showMessageDialog(null,\n \"The method for clearing the grid \" +\n \"has not been fully implemented yet.\",\n \"Under Development\",\n JOptionPane.WARNING_MESSAGE);\n\n // Display the grid after it has been completely cleared.\n display.showGrid();\n }",
"private boolean isFull(){\n return cellSize == Max;\n }",
"public void displayGrid(){\n \tint max = currentOcean.getMaxGrid(); // modified by Ludo\n \tint line = max*2 +1; \t\t\t\t// modified by Ludo\n \tfor(int i=0; i<max+1;i++){\t\t\t// modified by Ludo\n \t int lineStart = 0 + line*i;\t\t// modified by Ludo\n \t int lineEnd = line + line*i;\t\t// modified by Ludo\n \t System.out.println(currentOcean.toString().substring(lineStart, lineEnd)); // modified by Ludo\n }\n }",
"private void fillGridForPreLayout(RecyclerView.Recycler recycler, RecyclerView.State state) {\r\n while ( fakeSpanBottomMin <= bottomBorder\r\n && mCurrentPosition >=0 && mCurrentPosition < state.getItemCount()) {\r\n layoutChunk(recycler, state, true, true);\r\n }\r\n }",
"void initLayout() {\n\t\t/* Randomize the number of rows and columns */\n\t\tNUM = Helper.randomizeNumRowsCols();\n\n\t\t/* Remove all the children of the gridContainer. It will be added again */\n\t\tpiecesGrid.removeAllViews();\n\t\t\n\t\t/* Dynamically calculate the screen positions and sizes of the individual pieces\n\t * Store the starting (x,y) of all the pieces in pieceViewLocations */\n\t\tpieceViewLocations = InitDisplay.initialize(getScreenDimensions(), getRootLayoutPadding());\n\t\t\n\t\t/* Create an array of ImageViews to store the individual piece images */\n\t\tcreatePieceViews();\n\t\t\n\t\t/* Add listeners to the ImageViews that were created above */\n\t\taddImageViewListeners();\n\t}",
"@Override\n\tprotected void generateTiles() {\n\t}",
"private void compactHorizontally (List<List<NodeRealizer>> cellColumns)\n {\n int centerIndex = (cellColumns.size () - 1) / 2;\n List<NodeRealizer> minXList = cellColumns.get (centerIndex);\n List<NodeRealizer> maxXList = cellColumns.get (centerIndex);\n for (int i = 1; i <= centerIndex; i++)\n {\n List<NodeRealizer> leftList = cellColumns.get (centerIndex - i);\n moveToRight (leftList, minXList);\n minXList = leftList;\n List<NodeRealizer> rightList = cellColumns.get (centerIndex + i);\n moveToLeft (rightList, maxXList);\n maxXList = rightList;\n }\n if (cellColumns.size () % 2 == 0)\n {\n List<NodeRealizer> rightList = cellColumns.get (cellColumns.size () - 1);\n moveToLeft (rightList, maxXList);\n }\n }",
"public void testWorkspace_items_not_merged_in_next_screen() throws Exception {\n long[][][] ids = createGrid(new int[][][]{{\n { 0, 0, 0, 1},\n { 3, 1, 0, 4},\n { -1, -1, -1, -1},\n { 5, 2, -1, 6},\n },{\n { -1, 0, -1, 1},\n { 3, 1, -1, 4},\n { -1, -1, -1, -1},\n { 5, 2, -1, 6},\n }});\n\n new GridSizeMigrationTask(getMockContext(), mIdp, mValidPackages, new HashMap<String, Point>(),\n new Point(4, 4), new Point(3, 3)).migrateWorkspace();\n\n // Items in the second column of the first screen should get placed on a new screen.\n verifyWorkspace(new long[][][] {{\n {ids[0][0][0], ids[0][0][1], ids[0][0][3]},\n {ids[0][1][0], ids[0][1][1], ids[0][1][3]},\n {ids[0][3][0], ids[0][3][1], ids[0][3][3]},\n }, {\n { -1, ids[1][0][1], ids[1][0][3]},\n {ids[1][1][0], ids[1][1][1], ids[1][1][3]},\n {ids[1][3][0], ids[1][3][1], ids[1][3][3]},\n }, {\n {ids[0][0][2], ids[0][1][2], -1},\n }});\n }",
"public void printGrid()\n\t{\n\t\tfor ( int y = 0; y < height; y++)\n\t\t{\n\t\t\tfor ( int x = 0; x < width; x++ )\n\t\t\t{\n\t\t\t\t// If x & y are the same as the empty tile coordinates, print empty tile\n\t\t\t\tif ( x == x0 && y == y0 ) System.out.print( \" \" );\n\t\t\t\t// Else print element of grid\n\t\t\t\telse System.out.print( grid[x][y] + \" \" );\n\t\t\t}\n\t\t\tSystem.out.print( \"\\n\" );\n\t\t}\n\t\tSystem.out.print( \"\\n\" );\n\t}",
"public void checkAll() {\n for (int i = 0; i < size * size; i++) {\r\n if (flowGrid[i]!=size*size) {\r\n if ((flowGrid[i] != flowGrid[flowGrid[i]]) || i != flowGrid[i]) {\r\n flowGrid[i] = flowGrid[flowGrid[i]];\r\n if (flowGrid[i] < size) {\r\n grid[i / size][i % size] = 2;\r\n }\r\n }\r\n }\r\n }\r\n\r\n }",
"private void markGrid(int row, int col, boolean p1Turn) {\n if (col == 1) {\n if (row == 5) {\n r6c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n } else if (col == 2) {\n if (row == 5) {\n r6c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 3) {\n if (row == 5) {\n r6c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 4) {\n if (row == 5) {\n r6c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 5) {\n if (row == 5) {\n r6c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 6) {\n if (row == 5) {\n r6c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 7) {\n if (row == 5) {\n r6c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n if (game.checkForWin()) { // This shows the final screen when the algorithm declares a win; buttons are disabled\n textOutput.setText(\"Game Over! \" + (game.getPlayerOneTurn() ? \" Player 1 Wins!\" : \" Player 2 Wins!\"));\n a1Button.setEnabled(false);\n a2Button.setEnabled(false);\n a3Button.setEnabled(false);\n a4Button.setEnabled(false);\n a5Button.setEnabled(false);\n a6Button.setEnabled(false);\n a7Button.setEnabled(false);\n }\n else {\n textOutput.setText(game.getPlayerOneTurn() ? \"Player 1 Turn\" : \"Player 2 Turn\"); // If there is no win, the turn alternates\n }\n game.setPlayerOneTurn();\n }",
"public void showGrid() {\n for (int i = minRow; i <= maxRow; i++) {\n for (int j = minCol; j <= maxCol; j++) {\n clientOutputStream.print(grid[i][j] + \" \");\n }\n clientOutputStream.println();\n }\n clientOutputStream.println();\n clientOutputStream.flush();\n }",
"protected Integer getGridHeight () {\n\t\treturn null ; \n\t}",
"private Pane getGridPane ()\r\n {\r\n GridPane gridPane = new GridPane();\r\n \r\n int i = 0;\r\n for(Button b : this.buttons)\r\n {\r\n gridPane.add( b, i*(i+(int)b.getWidth()), 0);\r\n i++;\r\n }\r\n \r\n return gridPane;\r\n }",
"@Override\n public Boolean colisionoCon(MV gr) {\n return true;\n }",
"public static void fillGridPlace(Composite composite, int num) {\n for (int i = 1; i <= num; i++) {\n Label label = new Label(composite, SWT.NONE);\n label.setText(\"This space intentionally left blank\");\n label.setVisible(false);\n }\n }"
]
| [
"0.650509",
"0.6425575",
"0.6379256",
"0.63644356",
"0.6331686",
"0.6255327",
"0.61998755",
"0.6182439",
"0.61661917",
"0.614702",
"0.6140818",
"0.61195433",
"0.60999346",
"0.6080223",
"0.60652894",
"0.6038573",
"0.60369956",
"0.6035592",
"0.6026788",
"0.6023034",
"0.60037094",
"0.5961819",
"0.59365624",
"0.5888627",
"0.58869106",
"0.5884597",
"0.5883678",
"0.5875231",
"0.5866019",
"0.5863893",
"0.58622825",
"0.58583176",
"0.5836109",
"0.5834845",
"0.5822982",
"0.58190054",
"0.58188605",
"0.581382",
"0.5807231",
"0.57996786",
"0.57984245",
"0.5794846",
"0.57902265",
"0.57838005",
"0.57813174",
"0.5780129",
"0.5779821",
"0.57768875",
"0.57620585",
"0.57600325",
"0.57544374",
"0.57541025",
"0.57510513",
"0.57455945",
"0.57433015",
"0.5737055",
"0.57345897",
"0.57291335",
"0.5718142",
"0.56847066",
"0.5683943",
"0.56701803",
"0.5669122",
"0.5661304",
"0.5656405",
"0.5651576",
"0.5649586",
"0.564878",
"0.5647072",
"0.56465304",
"0.56437683",
"0.56314796",
"0.56289065",
"0.56240135",
"0.5623509",
"0.56204444",
"0.5614821",
"0.5613478",
"0.5595008",
"0.5591718",
"0.55917025",
"0.55916494",
"0.5588032",
"0.55871594",
"0.55860186",
"0.55817205",
"0.5578383",
"0.5577849",
"0.5566888",
"0.5564136",
"0.5562068",
"0.5560248",
"0.55514055",
"0.5550241",
"0.55485094",
"0.55452144",
"0.5538238",
"0.5536241",
"0.553166",
"0.5531015",
"0.55304205"
]
| 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
HashMap<Character, Character> map = new HashMap<>();
map.put('(', ')');
map.put('{','}');
map.put('[', ']');
while(scanner.hasNext()) {
String s = scanner.next();
System.out.println(isBalanced(s,map) ? "true":"false");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
set ore rates to whatever input was | public void generate() {
currentlyGenerating = true;
Bukkit.broadcastMessage(ChatColor.GREEN + "The world generation process has been started!");
createUhcWorld();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setRate();",
"public void setRate(int rate) { this.rate = rate; }",
"public abstract void setRate();",
"public void setRate(double annualRate) {\nmonthlyInterestRate = annualRate / 100.0 / MONTHS;\n}",
"public void setRate(Integer rate) {\r\n this.rate = rate;\r\n }",
"private void prepareRates() {\n // set the Currency as GBP (symbol) which is applicable in all rates\n Currency gbp = Currency.getInstance(\"GBP\");\n rates.add(new Rate(\"Morning\", gbp, 15d, LocalTime.of(5, 0), LocalTime.of(10, 0)));\n rates.add(new Rate(\"Evening\", gbp, 18d, LocalTime.of(16, 30), LocalTime.of(20, 0)));\n rates.add(new Rate(\"Night\", gbp, 20d, LocalTime.of(20, 0), LocalTime.of(23, 0)));\n rates.add(new Rate(\"Default\", gbp, 10d, null, null));\n }",
"public void setRate(double newRate) {\n this.rate = newRate;\n }",
"public void setDefaultOvertimeRate(Rate rate)\r\n {\r\n m_defaultOvertimeRate = rate;\r\n }",
"public void setRate(String rate) {\r\n for (int index = 0; index < RATES.length; ++index){\r\n if (RATES[index].equals(rate)) {\r\n Rate = index;\r\n }\r\n }\r\n }",
"public void setRate(float rate) {\n\t\tthis.rate = rate;\n\t}",
"public Object setintrate(double rate)\r\n/* */ {\r\n\t\t\t\tlogger.info(count++ + \" About to setintrate : \" + \"Agent\");\r\n/* 67 */ \tthis.intrate = rate;\r\n/* 68 */ \tthis.intratep1 = (this.intrate + 1.0D);\r\n/* 69 */ \treturn this;\r\n/* */ }",
"private void updateMortgage() {\n Mortgage mortgage = MainActivity.mortgage; //same reference from MainActivity\n\n RadioButton RB10 = findViewById(R.id.BTN_10);\n RadioButton RB15 = findViewById(R.id.BTN_15);\n\n int years = 30;\n if (RB10.isChecked()) years = 10;\n else if (RB15.isChecked()) years = 15;\n\n mortgage.setYears(years);\n EditText amountEDIT = findViewById( R.id.EDIT_amount);\n String amountString = amountEDIT.getText().toString();\n EditText rateEDIT =findViewById( R.id.EDIT_rate);\n String rateString = rateEDIT.getText().toString();\n\n try { //bc there could be an error??\n float amount = Float.parseFloat(amountString);\n mortgage.setAmount(amount);\n float rate = Float.parseFloat(rateString);\n mortgage.setRate(rate);\n } catch(NumberFormatException nfe) {\n mortgage.setAmount(100000.0f);\n mortgage.setRate(.035f);\n }\n\n }",
"protected void onChange_EncounterRate() {\n onChange_EncounterRate_xjal( EncounterRate );\n }",
"public void setInterest(double rate)\n {\n interestRate = rate;\n }",
"public void setRe(double re) {\r\n this.re = re;\r\n }",
"public void setDefaultStandardRate(Rate rate)\r\n {\r\n m_defaultStandardRate = rate;\r\n }",
"public void changeTaxRate (double value) {\n this.taxRate = value;\n }",
"public abstract void setDiscountRate(double discountRate);",
"public void setEntrenchmentRate(int value) {\n this.entrenchmentRate = value;\n }",
"public Builder setRate(int value) {\n \n rate_ = value;\n onChanged();\n return this;\n }",
"@Override protected double convertRate(double rate) {\n return super.convertRate(rate);\n }",
"public void sendeRate(String spieler);",
"public void changeDiscountRate (double value) {\n this.discountRate = value;\n }",
"public void setPurchaseRate (double purchaseRate)\t{\n\t\t//REMEDY 5501\n\t\tint round_nth_decimal = 4;\n\n\t\tdouble rv = -1;\n\n\t\tif(ConfigProvider.getProperty(ROUND_NTH_DECIMAL)!=null){\n\t\t\tround_nth_decimal = Integer.parseInt(ConfigProvider.getProperty(ROUND_NTH_DECIMAL));\n\t\t}\n\n\t\trv = roundDouble(purchaseRate, round_nth_decimal);\n\n\t\tmPurchaseRate = rv;\n\t\t//END REMEDY 5501\n\t}",
"public void setOriPrice(double oriPrice) {\n this.oriPrice = oriPrice;\n }",
"public void updateRate(double r){\r\n rate *= r;\r\n }",
"Rate initRate(Rate iRate)\n {\n iRate.updateElementValue(\"Rate\");\n return iRate;\n }",
"double getRate();",
"public static void updateCalorieRate(Person person) {\n\n double calorieRate = person.getCalorieRate();\n updatePerson(person, \"usercaloryrate\", calorieRate);\n }",
"private void calculateRates() {\n if (rateOutput == null || !outputs.containsKey(rateOutput)) throw new RuntimeException(\"Insufficient data to calculate recipe rates\");\n recipesPerMinute = productionRate / outputs.get(rateOutput);\n\n for (String resource : inputs.keySet()) {\n ratesPerMinute.put(resource,-1.0 * recipesPerMinute * inputs.get(resource));\n }\n for (String resource: outputs.keySet()) {\n ratesPerMinute.put(resource, recipesPerMinute * outputs.get(resource));\n }\n }",
"public void setEngineeringRate(int value) {\n this.engineeringRate = value;\n }",
"public void setSupplyMovementRate(int value) {\n this.supplyMovementRate = value;\n }",
"void setSalario(double salario);",
"public int setRate(int rateToServer){\r\n\t\tint resultOfRate=1;\r\n\t\t//! send rate to server and check if ok.\r\n\t\tFLAG_RATED=true;\r\n\t\treturn resultOfRate;\r\n\t}",
"void setExpenses(double amount);",
"public void setRatetype(java.lang.Integer newRatetype) {\n\tratetype = newRatetype;\n}",
"void setMonto(double monto);",
"void setMonto(double monto);",
"public void setDecayRate(double newDecayRate ){\n\n decayRate= newDecayRate;\n}",
"Rate save(Rate u);",
"void setCost(double cost);",
"public void setSettable(){\n\t\tString letter;\n\t\tletter = JOptionPane.showInputDialog(getFrame(), \"Enter the settable rate of the simulation\");\n\t\twhile(letter==null || letter.equals(\"\")){\n\t\t\tletter = JOptionPane.showInputDialog(getFrame(), \"Enter the settable rate of the simulation\");\n\t\t\t\n\t\t}\n\t\trate=Integer.parseInt(letter);\n\t}",
"public void setAmount(double amount) {\nloanAmount = amount;\n}",
"@Override\n\tpublic double calRate() {\n\t\treturn 0.9f;\n\t}",
"public void setPricePerSquareFoot(double newPricePerSquareFoot){\nif(newPricePerSquareFoot > 0){\npricePerSquareFoot = newPricePerSquareFoot;\n}\n}",
"public static void setInfectionRate(double newRate) {\n infectionRate = newRate;\n }",
"protected InterestRate() {\n\t}",
"protected void onChange_VaccRate() {\n onChange_VaccRate_xjal( VaccRate );\n }",
"public void setRate(float wpm) {\n\tif (wpm > 0 && wpm < 1000) {\n\t setDurationStretch(nominalRate / wpm);\n\t}\n }",
"public float getRate(){\r\n return rate;\r\n }",
"public void setImprovementRelaxRate(double rate) {\n this.exec = this.exec.withProperty(\"sm.improve.relaxRate\", rate);\n }",
"double setCost(double cost);",
"public void setPotatoesPrice(double p);",
"protected void setAppraisalPrice(double ap) {\n \tappraisalPrice = ap;\n }",
"public double getRate( ) {\nreturn monthlyInterestRate * 100.0 * MONTHS;\n}",
"public void setInterestRate(double newInterestRate)\n {\n if (!(newInterestRate >= 0.0))\n {\n System.err.println(\"Interest rate must be positive.\");\n }\n else\n {\n this.interestRate = newInterestRate;\n }\n }",
"private Account_Type(int rate) {\r\n\tthis.rate=rate;\r\n\t}",
"public void setPreco(Double preco);",
"public void setGesamtRating() {\n this.gesamtRating = Precision.round((kriterium1 + kriterium2 + kriterium3 + kriterium4 + kriterium5\n + kriterium6 + kriterium7 + kriterium8), 2);\n\n }",
"public void updateAmount(double amount, Double rate){\r\n\t\t\tcurrencyAmount = currencyAmount + amount;\r\n\t\t\tdefaultCurrencyAmount = rate == null ? 0 : defaultCurrencyAmount + amount * rate.doubleValue();\r\n\t\t}",
"public void setRaio(double raio) {\n this.raio = raio;\n }",
"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 static void setRatings (double irating){\n\t\t\t//ratings = irating;\n\t\t\tr = irating;\n\t}",
"public int getRate() {\n return rate_;\n }",
"public void setMotors(double rate) {\n\t\tclimberMotor1.set(rate);\n\t}",
"public Integer getRate() {\r\n return rate;\r\n }",
"public double getRate() {\n return rate;\n }",
"public double getRate() {\n return rate;\n }",
"public void setManageLyRate(BigDecimal manageLyRate) {\n this.manageLyRate = manageLyRate;\n }",
"public void setEXCH_RATE(BigDecimal EXCH_RATE) {\r\n this.EXCH_RATE = EXCH_RATE;\r\n }",
"public void setRisultato(double risultato) {\r\n this.risultato = risultato;\r\n }",
"public static void setXoRate(double xoRate) {\n\t\tCrossOver.xoRate = xoRate;\n\t}",
"public void setRateForRewardCustomer(int weekDayCount,int weekEndRate) {\n this.rewardCustomerWeekDayRate = this.rewardCustomerWeekDayRate*weekDayCount;\n this.rewardCustimerWeekEndRate = this.rewardCustimerWeekEndRate*weekEndRate;\n this.totalRewardCustomerRate = this.rewardCustomerWeekDayRate + this.rewardCustimerWeekEndRate;\n }",
"public void setReputation(double reputation) {\n if(reputation >= 0.0 && reputation <= 100.0){\n this.reputation = reputation;\n }\n else if(reputation > 100.0){\n this.reputation = 100.0;\n }\n else{\n this.reputation = 0.0;\n }\n}",
"public void setRaggio(double raggio){\n this.raggio = raggio;\n }",
"public SavingsAccount(double rate) //setting interest rate with constructor\r\n { \r\n interestRate = rate;\r\n }",
"@Override\n\tpublic double getRate() {\n\t\treturn 7;\n\t}",
"void setCurrency(Currency currency);",
"public void setConvertedValues(User user, Search search) {\r\n\t\tif (user.getUserPreferences().getCurrency() != null) {\r\n\t\t\tDouble rate = currencyService.getCurrencyRate(user.getUserPreferences().getCurrency(), search.getEbayCountry().getCurrency());\r\n\t\t\tsearch.setMinPrice((int)(search.getMinPrice() * rate) );\r\n\t\t\tsearch.setMaxPrice((int)(search.getMaxPrice() * rate) );\r\n\t\t}\r\n\t}",
"int getMortgageRate();",
"@Override\n\tpublic double cost() {\n\t\treturn Double.parseDouble(rateOfLatte);\n\t}",
"public void setOreType() {\n\t\tif (subType.equalsIgnoreCase(\"poor\")) {\n\t\t\tif (type.equalsIgnoreCase(\"nether\") || type.equalsIgnoreCase(\"end\")) {\n\t\t\t\t// Poor Nether/End Ores\n\t\t\t\tif (isDust()) {\n\t\t\t\t\tcrushedItem = getDustTiny();\n\t\t\t\t\tdropType = (dropType == 3 || dropType == 0) ? 5 : 0;\n\t\t\t\t\tsetOreValues(2, 8, 4, 8, 8);\n\t\t\t\t\tsetSmeltingOutput(getDustTiny(smeltAmount));\n\t\t\t\t} else {\n\t\t\t\t\tcrushedItem = getNugget();\n\t\t\t\t\tdropType = (dropType == 2 || dropType == 0) ? 0 : 0;\n\t\t\t\t\tsetOreValues(1, 1, 3, 6, 6);\n\t\t\t\t\tsetSmeltingOutput(getNugget(smeltAmount));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Poor Sand/Gravel/Stone Ores\n\t\t\t\tif (isDust()) {\n\t\t\t\t\tcrushedItem = getDustTiny();\n\t\t\t\t\tdropType = (dropType == 3) ? 5 : 0;\n\t\t\t\t\tsetOreValues(1, 4, 2, 4, 4);\n\t\t\t\t\tsetSmeltingOutput(getDustTiny(smeltAmount));\n\t\t\t\t} else {\n\t\t\t\t\tcrushedItem = getNugget();\n\t\t\t\t\tdropType = (dropType == 2) ? 4 : 0;\n\t\t\t\t\tsetOreValues(1, 2, 1, 2, 2);\n\t\t\t\t\tsetSmeltingOutput(getNugget(smeltAmount));\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (subType.equalsIgnoreCase(\"dense\")) {\n\t\t\tif (type.equalsIgnoreCase(\"nether\") || type.equalsIgnoreCase(\"end\")) {\n\t\t\t\t// Dense Nether/End Ores\n\t\t\t\tif (isDust() || dropType == 3) {\n\t\t\t\t\tdropType = 3;\n\t\t\t\t\tsetOreValues(8, 32, 16, 32, 32);\n\t\t\t\t\tsetSmeltingOutput(getDust(smeltAmount));\n\t\t\t\t} else {\n\t\t\t\t\tif (dropType == 2) {\n\t\t\t\t\t\tsetOreValues(6, 16, 8, 16, 16);\n\t\t\t\t\t\tsetSmeltingOutput(getIngot(smeltAmount));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdropType = 0;\n\t\t\t\t\t\tsetOreValues(1, 1, 8, 16, 16);\n\t\t\t\t\t\tclearSmeltingOutput();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Dense Sand/Gravel/Stone Ores\n\t\t\t\tif (isDust() || dropType == 3) {\n\t\t\t\t\tdropType = 3;\n\t\t\t\t\tsetOreValues(3, 8, 6, 8, 8);\n\t\t\t\t\tsetSmeltingOutput(getDust(smeltAmount));\n\t\t\t\t} else {\n\t\t\t\t\tif (dropType == 2) {\n\t\t\t\t\t\tsetOreValues(2, 6, 3, 6, 6);\n\t\t\t\t\t\tsetSmeltingOutput(getIngot(smeltAmount));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdropType = 6;\n\t\t\t\t\t\tsetOreValues(3, 3, 3, 6, 6);\n\t\t\t\t\t\tclearSmeltingOutput();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (type.equalsIgnoreCase(\"nether\") || type.equalsIgnoreCase(\"end\")) {\n\t\t\t\t// Nether/End Ores\n\t\t\t\tif (isDust() || dropType == 3) {\n\t\t\t\t\tdropType = 3;\n\t\t\t\t\tsetOreValues(3, 2, 8, 16, 16);\n\t\t\t\t\tsetSmeltingOutput(getDust(smeltAmount));\n\t\t\t\t} else {\n\t\t\t\t\tif (dropType == 2) {\n\t\t\t\t\t\tsetOreValues(2, 1, 4, 8, 8);\n\t\t\t\t\t\tsetSmeltingOutput(getIngot(smeltAmount));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdropType = 0;\n\t\t\t\t\t\tsetOreValues(1, 1, 4, 8, 8);\n\t\t\t\t\t\tclearSmeltingOutput();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Stone Ores\n\t\t\t\tif (isDust() || dropType == 3) {\n\t\t\t\t\tdropType = 3;\n\t\t\t\t\tsetOreValues(1, 2, 2, 4, 4);\n\t\t\t\t\tsetSmeltingOutput(getDust(smeltAmount));\n\t\t\t\t} else {\n\t\t\t\t\tif (dropType == 2) {\n\t\t\t\t\t\tsetOreValues(1, 1, 1, 2, 2);\n\t\t\t\t\t\tsetSmeltingOutput(getIngot(smeltAmount));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdropType = 0;\n\t\t\t\t\t\tsetOreValues(1, 1, 1, 2, 2);\n\t\t\t\t\t\tsetSmeltingOutput(getIngot(smeltAmount));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void setCrossoverRate(double rate) { this.exec = this.exec.withProperty(\"ux.rate\", rate); }",
"@Override\n protected void setRetributionsAndBeneficiaries(){\n // Example for picking the \"chosen ones\" to be benefited from my generous policy\n // First we empty the bag in case we don't want to keep old beneficiaries\n beneficiaries.clear();\n // Pick 3 random territories from my subordinates\n if (myTerritory.getSubordinates().numObjs>=1){\n beneficiaries.add(myTerritory.getSubordinates().get((new Random()).nextInt(1)));\n\n // Now assign the corresponding amounts of soldiers to each beneficiary\n // Since there are three of them, we need to re-instantiate the retributions array to one of size 3\n retributions = new double[myTerritory.getSubordinates().numObjs];\n // Lets transfer equal amounts of soldiers, which will add up half of my soldiers stock\n retributions[myTerritory.getSubordinates().numObjs-1] = (myTerritory.getSoldiers())/(myTerritory.getSubordinates().numObjs);\n\n }\n\n // This procedure opdated the beneficiaries list and the retribution array, which gives to the system\n // the necessary info about the redistributive policy of the lords\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 1 && resultCode == 2) {\n rate.put(\"dollar\", data.getFloatExtra(\"dollar\", 0f));\n rate.put(\"euro\", data.getFloatExtra(\"euro\", 0f));\n rate.put(\"won\", data.getFloatExtra(\"won\", 0f));\n SharedPreferences sp = getSharedPreferences(\"myrate\", Activity.MODE_PRIVATE);\n SharedPreferences.Editor ed = sp.edit();\n ed.putFloat(\"dollar\", data.getFloatExtra(\"dollar\", 0f));\n ed.putFloat(\"euro\", data.getFloatExtra(\"euro\", 0f));\n ed.putFloat(\"won\", data.getFloatExtra(\"won\", 0f));\n ed.apply();\n\n }\n }",
"private void determinationExciseRate(Vehicle vehicle) {\n if (vehicle.getEngineType().name().equals(\"petrol\") && vehicle.getCapacity() <= 3000) {\n vehicle.setExciseRate(serviceForNumber.roundingNumber(\n (double) 50 / 1000 * vehicle.getAgeCoefficient(),\n 2));\n\n } else if (vehicle.getEngineType().name().equals(\"petrol\") && vehicle.getCapacity() > 3000) {\n vehicle.setExciseRate(serviceForNumber.roundingNumber(\n (double) 100 / 1000 * vehicle.getAgeCoefficient(),\n 2));\n\n } else if (vehicle.getEngineType().name().equals(\"diesel\") && vehicle.getCapacity() <= 3500) {\n vehicle.setExciseRate(serviceForNumber.roundingNumber(\n (double) 75 / 1000 * vehicle.getAgeCoefficient(),\n 2));\n\n } else if (vehicle.getEngineType().name().equals(\"diesel\") && vehicle.getCapacity() > 3500) {\n vehicle.setExciseRate(serviceForNumber.roundingNumber(\n (double) 150 / 1000 * vehicle.getAgeCoefficient(),\n 2));\n\n } else if (vehicle.getEngineType().name().equals(\"electric\")) {\n vehicle.setExciseRate(1);\n }\n }",
"public void setRateTables(entity.RateTable[] value);",
"public void setAAALethalityRate(int value) {\n this.aaaLethalityRate = value;\n }",
"public void refuel() {\n fuelAmount = type.fuelCapacity;\n }",
"double requestCurrentRate(String fromCurrency,\n String toCurrency);",
"public void setHourlyRate (double hourlyRate) {\r\n // if hourlyRate is negative, hourlyRate is 0\r\n if (hourlyRate < 0) {\r\n this.hourlyRate = 0;\r\n }\r\n else {\r\n this.hourlyRate = hourlyRate;\r\n }\r\n // calls calculateSalary to update the salary once hourlyRate is changed\r\n calculateSalary();\r\n }",
"public int getRate() {\n return rate_;\n }",
"@ApiModelProperty(value = \"Rates that will be applied during the duration of the car rental requested. These rates are generally not inclusive of tax and are used by the car rental company to compute the total cost at the end of the rental period.\")\n public List<Rate> getRates() {\n return rates;\n }",
"public void setPayRate(int x, double pr) {\r\n payRate[x] = pr;\r\n }",
"public void set2320MOA01ReimbursementRate$1(java.lang.CharSequence value) {\n this._2320MOA01ReimbursementRate = value;\n }",
"public void setHourlyRate(double rate) {\n\t\tthis.hourlyRate = rate;\n\t}",
"public void setFlete(double param){\n \n this.localFlete=param;\n \n\n }",
"private void setDiscount(double initDiscount){\n\t\tdiscount = initDiscount;\n\t}",
"private void Rating(int minAge)\r\n {\r\n this.minAge = minAge;\r\n }",
"public double getRate() {\n\t\treturn rate;\n\t}",
"public static void updateTransactionCharge(){\r\n\tScanner userInput = new Scanner(System.in);\r\n\tSystem.out.println(\"Current STT charge is\" +ApplicableCharge.getSecuritiesTransferTaxRate());\r\n\tSystem.out.println(\"Current Transaction charge is\" +ApplicableCharge.getTransactionChargeRate());\r\n\tSystem.out.println(\"Enter Transaction Charge \");\r\n\tif(!userInput.hasNextDouble()) {\r\n\t\tSystem.out.println(\"Transaction charge entered in invalid, it should be a numeric value. You will be returned to main menu\" + '\\n');\r\n\t\treturn;\r\n\t}\t\r\n\tdouble transactionCharge = userInput.nextDouble();\r\n\tApplicableCharge.setTransactionChargeRate(transactionCharge);\r\n\tSystem.out.println(\"Updated Transaction charge is\" +ApplicableCharge.getTransactionChargeRate() +'\\n');\r\n}"
]
| [
"0.7051423",
"0.70009655",
"0.67732716",
"0.6687138",
"0.6536129",
"0.6504882",
"0.6493726",
"0.61576474",
"0.6152453",
"0.61520255",
"0.61244684",
"0.6117133",
"0.6093482",
"0.60790575",
"0.60706854",
"0.6027949",
"0.60274523",
"0.5998585",
"0.59922373",
"0.59879583",
"0.5971979",
"0.5969054",
"0.5960018",
"0.59293556",
"0.5889494",
"0.5888954",
"0.5880955",
"0.5859344",
"0.58305526",
"0.5826819",
"0.5825898",
"0.58169377",
"0.5799136",
"0.579789",
"0.5778213",
"0.57611847",
"0.5721747",
"0.5721747",
"0.5721146",
"0.5718055",
"0.57075226",
"0.5682971",
"0.56754166",
"0.56664175",
"0.56568414",
"0.56437105",
"0.5640053",
"0.5628969",
"0.5627715",
"0.561597",
"0.561022",
"0.56069326",
"0.5580699",
"0.55712634",
"0.55582404",
"0.555659",
"0.5553544",
"0.5528939",
"0.5527724",
"0.5516844",
"0.5506616",
"0.54905474",
"0.54826725",
"0.5473369",
"0.54651684",
"0.54616225",
"0.54610276",
"0.54610276",
"0.5459534",
"0.54474795",
"0.54395527",
"0.54372305",
"0.54346764",
"0.54297066",
"0.54296964",
"0.54286695",
"0.5425976",
"0.542397",
"0.5421357",
"0.5416519",
"0.54101205",
"0.54094344",
"0.54067564",
"0.5404927",
"0.5390216",
"0.5388656",
"0.5386334",
"0.53851604",
"0.5379018",
"0.537762",
"0.5377449",
"0.5363931",
"0.53606075",
"0.5346792",
"0.53465134",
"0.53462535",
"0.5341314",
"0.5335506",
"0.5331339",
"0.5329834",
"0.5327137"
]
| 0.0 | -1 |
Create an extent report instance | public static ExtentReports createInstance() {
ExtentHtmlReporter htmlReporter = new ExtentHtmlReporter(Constants.EXTENTREPORT_PATH+"---"+ScreenShot.timeStamp()+".html");
htmlReporter.config().setTestViewChartLocation(ChartLocation.BOTTOM);
htmlReporter.config().setChartVisibilityOnOpen(true);
htmlReporter.config().setTheme(Theme.DARK);
htmlReporter.config().setReportName("Functional Report");
htmlReporter.config().setEncoding("utf-8");
htmlReporter.config().setDocumentTitle("AutoMation Report");
htmlReporter.config().setTimeStampFormat("EEEE, MMMM dd, yyyy, hh:mm a '('zzz')'");
extent = new ExtentReports();
extent.attachReporter(htmlReporter);
extent.setSystemInfo("OS", "Windows");
extent.setSystemInfo("AUT", "QA");
return extent;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static ExtentReports extentReportGenerator() \n\t{\n\tString path=System.getProperty(\"user.dir\")+\"\\\\reports\\\\index.html\";\n//\tExtentSparkReporter reporter=new ExtentSparkReporter(path);\n//\t\treporter.config().setEncoding(\"utf-8\");\n//\t\treporter.config().setReportName(\"Automation Test Results\");\n//\t\treporter.config().setDocumentTitle(\"Automation Reports\");\n//\t\treporter.config().setTheme(Theme.STANDARD);\n\t\t\n\t\tExtentHtmlReporter htmlReporter = new ExtentHtmlReporter(path);\t\n\t\thtmlReporter.setAppendExisting(true);\n\t\thtmlReporter.config().setEncoding(\"utf-8\");\n\t\thtmlReporter.config().setDocumentTitle(\"Automation Reports\");\n\t\thtmlReporter.config().setReportName(\"Automation Test Results\");\n\t\thtmlReporter.config().setTheme(Theme.STANDARD);\n\t\tLocale.setDefault(Locale.ENGLISH);\n\t\t\n\t\textent=new ExtentReports();\n\t\textent.attachReporter(htmlReporter);\n\t\textent.setSystemInfo(\"Tester\", \"Sonu\");\n\t\t\n\t\t\n\t\t\n\t\treturn extent;\n\t}",
"Report createReport();",
"public static void CreateReport() {\n\t\tString fileName = new SimpleDateFormat(\"'Rest_Country_Report_'YYYYMMddHHmm'.html'\").format(new Date());\n\t\tString path = \"Report/\" + fileName;\n\t\treport = new ExtentReports(path);\n\t}",
"@SuppressWarnings(\"deprecation\")\n\tpublic static ExtentReports getInstance()\n\t{\n\t\tif (Log.extent == null)\n\t\t{\n\t\t\ttry\n\t\t\t{\n//\t\t\t\tString systime = Genericmethod.getTimeStampValue().replace(\":\", \"-\");\n\t\t\t\tLog.extent = new ExtentReports(\"Automation_Report//SLAUTOMATE_Report_Transcripts.html\", false, DisplayOrder.OLDEST_FIRST);\n\t\t\t}\n\t\t\tcatch (Exception e1)\n\t\t\t{\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\ttry\n\t\t\t{\n\t\t\t\tFileInputStream fs;\n\t\t\t\tfs = new FileInputStream(System.getProperty(\"user.dir\")+\"\\\\src\\\\main\\\\java\\\\com\\\\test\\\\automation\\\\uIAutomation\\\\config\\\\config.properties\");\n\t\t\t\tconfig = new Properties();\n\t\t\t\tconfig.load(fs);\n\t\t\t\tString envirment = config.getProperty(\"Environment\");\n\t\t\t\tString release = config.getProperty(\"Release\");\n\t\t\t\tString browserType = config.getProperty(\"BrowserType\");\n\t\t\t\tTimeZone timeZone = TimeZone.getDefault();\n\t\t\t\tString TimeZonename = timeZone.getDisplayName();\n\t\t\t\tString gitBranch = config.getProperty(\"GitBranch\");\n\t\t\t\tString url = config.getProperty(\"TestURL\");\n\t\t\t\t/*String style = \".test { border: 2px solid #00BFFF; }\"\n\t\t\t\t\t\t+ \"body, .test .right span, .collapsible-header { background: #cce5ff; }\"\n\t\t\t\t\t\t+ \".cat-other { border-color: white !important; color: white; }\"\n\t\t\t\t\t\t+ \".panel-lead { font-size:14px }\" + \"nav .right { color: #324259; }\"\n\t\t\t\t\t\t+ \"span.label.info { font-size: 16px; font-weight: 400; padding: 3px 5px; }\";\n\t\t\t\t\n\t\t\t\tLog.extent.config().documentTitle(\"Straighterline Automation Report\").reportName(\"Straighterline\")\n\t\t\t\t\t\t.insertCustomStyles(style).reportHeadline(\"Automation Report\");*/\n\t\t\t\t\n\t\t\t\tLog.extent.addSystemInfo(\"Selenium Version\", \"2.53.1\").addSystemInfo(\"Testing Environment\", envirment)\n\t\t\t\t\t\t.addSystemInfo(\"Release\", release).addSystemInfo(\"Test URL\", url)\n\t\t\t\t\t\t.addSystemInfo(\"TimeZone\", TimeZonename).addSystemInfo(\"Git branch\", gitBranch)\n\t\t\t\t\t\t.addSystemInfo(\"Browser type\", browserType)\n\t\t\t\t\t\t.addSystemInfo(\"User Name\", \"delaPlex\").addSystemInfo(\"Host Name\", \"QMC185-delaPlex\");\n\t\t\t} \n\t\t\tcatch (Exception e) \n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn Log.extent;\n\t}",
"public static ExtentReports getInstance() {\n\t\t\n\t\tExtentReports extent;\n\t\tString Path=System.getProperty(\"user.dir\")+\"//Reports//report.html\";\n\t\t//String Path = \"//Users//atomar//Desktop//report-demo.html\";\n\t\textent = new ExtentReports(Path, false);\n\t\t\n\n\t\treturn extent;\n\t\n//\t\tDateFormat df = new SimpleDateFormat(\"dd/MM/yy HH:mm:ss\");\n//\t\tDate dateobj = new Date();\n//\t\tString reportname=\"SmokeTest\"+ df.format(dateobj).replaceAll(\" \", \"_\").replaceAll(\"/\", \"_\").replace(\":\", \"_\");\n//\t\t\t\t\n//\t\t\n//\t\tString Path=System.getProperty(\"user.dir\");\n//\t\tPath=Path+\"/Reports\";\n//\t\t Path=Path+\"/\"+reportname+\".html\";\n\t\t \n\t\t//String Path = \"E:\\\\Office\\\\JobSupport\\\\Inkbox_UITestFramework\\\\Inkbox_UITestFramework\\\\Reports\\\\report-demo.html\";\n//\t\textent = new ExtentReports(launchDriver.getReportPath(), false);\n//\t\tSystem.out.println(\"Report path :\"+launchDriver.getReportPath());\n//\n//\t\treturn extent;\n\t}",
"public static ExtentReports getReportInstance() {\n\t\tif (report == null) {\n\n\t\t\tString reportName = \"HTMLreport_\" + getTimeStamp() + \".html\";\n\t\t\tExtentHtmlReporter htmlReporter = new ExtentHtmlReporter(System.getProperty(\"user.dir\") +\n\t\t\t\t\t\"\\\\src\\\\test\\\\resources\\\\test_result\\\\\" + reportName);\n\t\t\n\t\t\treport = new ExtentReports();\n\t\t\treport.attachReporter(htmlReporter);\n\n\t\t\treport.setSystemInfo(\"OS\", \"Windows 10\");\n\t\t\treport.setSystemInfo(\"Environment\", \"UAT\");\n\t\t\treport.setSystemInfo(\"Browsers\", \"Chrome and Edge\");\n\n\t\t\thtmlReporter.config().setDocumentTitle(\"Identify New Bikes - HTML Report\");\n\t\t\thtmlReporter.config().setReportName(\"UI Test Report\");\n\t\t\thtmlReporter.config().setTimeStampFormat(\"MMM dd, yyyy HH:mm:ss\");\n\t\t}\n\n\t\treturn report;\n\t}",
"public static Report createEntity() {\n\t\tReport report = new Report()\n\t\t\t\t.fromIsoCode(DEFAULT_FROM_ISO_CODE)\n\t\t\t\t.toIsoCode(DEFAULT_TO_ISO_CODE)\n\t\t\t\t.total(DEFAULT_TOTAL)\n\t\t\t\t.lastUpdated(DEFAULT_LAST_UPDATED);\n\t\treturn report;\n\t}",
"@BeforeTest\n\tpublic void startReport() {\n\t\textent = new ExtentReports(System.getProperty(\"user.dir\")+\"//extent-reports//myreport.html\",true);\n\t\textent.addSystemInfo(\"Host Name\", \"LocalHost\");\n\t\textent.addSystemInfo(\"Environment\", \"QA\");\n\t\textent.addSystemInfo(\"User Name\", \"Prasanta\");\n\t\textent.loadConfig(new File(System.getProperty(\"user.dir\")+\"//ReportsConfig.xml\"));\n\t}",
"@BeforeTest\n\tpublic void startReport() {\n\t\t// ExtentReports(String filePath,Boolean replaceExisting)\n\t\t// filepath - path of the file, in .htm or .html format - path where your report\n\t\t// needs to generate.\n\t\t// replaceExisting - Setting to overwrite (TRUE) the existing file or append to\n\t\t// it\n\t\t// True (default): the file will be replaced with brand new markup, and all\n\t\t// existing data will be lost. Use this option to create a brand new report\n\t\t// False: existing data will remain, new tests will be appended to the existing\n\t\t// report. If the the supplied path does not exist, a new file will be created.\n\t\textent = new ExtentReports(System.getProperty(\"user.dir\") + \"/test-output/ExtentReport.html\", true);\n\t\t// extent.addSystemInfo(\"Environment\",\"Environment Name\")\n\t\textent.addSystemInfo(\"Host Name\", \"SoftwareTestingMaterial\").addSystemInfo(\"Environment\", \"Automation Testing\")\n\t\t\t\t.addSystemInfo(\"User Name\", \"Rajkumar SM\");\n\t}",
"@Test\r\n\tpublic void extendReports() throws IOException {\n\t\tString File = \"./Reports/report.html\";\r\n\t\tExtentHtmlReporter html = new ExtentHtmlReporter(File);\r\n\t\thtml.setAppendExisting(true);\r\n\t\t//to write on the created html file\r\n\t\tExtentReports extents = new ExtentReports();\r\n\t\textents.attachReporter(html);\r\n\t\t\r\n\t\tExtentTest createAccountTest = extents.createTest(\"TC001\", \"CreateAccount\");\r\n\t\tcreateAccountTest.pass(\"username entered\", MediaEntityBuilder.createScreenCaptureFromPath(\"./../snaps/img1.png\").build());\r\n\t\textents.flush();\r\n\t\t\r\n\r\n\t}",
"void createReport(Report report);",
"public static void setReport()\n {\n ExtentHtmlReporter htmlReporter = new ExtentHtmlReporter(\"\\\\C:\\\\Users\\\\shir halevi\\\\Desktop\\\\qaexpert\\\\buyMe\\\\reports\\\\extent.html\");\n htmlReporter.setAppendExisting(true);\n extent = new ExtentReports();\n extent.attachReporter(htmlReporter);\n test = extent.createTest(\"BuyMeSanityTestWeb\", \"This is a BuyMe Sanity Test Web\");\n extent.setSystemInfo(\"Tester\", \"Shir\");\n test.log(Status.INFO, \"@Before class\");\n }",
"private void startReport() {\r\n // initialize the HtmlReporter\r\n htmlReporter = new ExtentHtmlReporter(System.getProperty(\"user.dir\")\r\n + jsonConfig.get(\"extentReportPath\") + \"testReport.html\");\r\n\r\n //initialize ExtentReports and attach the HtmlReporter\r\n extent = new ExtentReports();\r\n extent.attachReporter(htmlReporter);\r\n\r\n //To add system or environment info by using the setSystemInfo method.\r\n extent.setSystemInfo(\"OS\", (String) jsonConfig.get(\"osValue\"));\r\n switch ((String) jsonConfig.get(\"browserToBeUsed\")) {\r\n case \"FF\":\r\n extent.setSystemInfo(\"Browser\", \"Firefox\");\r\n break;\r\n case \"CH\":\r\n extent.setSystemInfo(\"Browser\", \"Chrome\");\r\n break;\r\n case \"IE\":\r\n extent.setSystemInfo(\"Browser\", \"Internet Explorer\");\r\n break;\r\n }\r\n\r\n //configuration items to change the look and feel\r\n //add content, manage tests etc\r\n htmlReporter.config().setChartVisibilityOnOpen(true);\r\n htmlReporter.config().setDocumentTitle(\"Test Report\");\r\n htmlReporter.config().setReportName(\"Test Report\");\r\n htmlReporter.config().setTestViewChartLocation(ChartLocation.TOP);\r\n htmlReporter.config().setTheme(Theme.STANDARD);\r\n htmlReporter.config().setTimeStampFormat(\"EEEE, MMMM dd, yyyy, hh:mm a '('zzz')'\");\r\n }",
"public static void initExtentCucumberReport() {\n ExtentCucumberFormatter.initiateExtentCucumberFormatter();\n\n // Loads the extent config xml to customize on the report.\n ExtentCucumberFormatter.loadConfig(new File(\"src/test/resources/extent-config.xml\"));\n\n // User can add the system information as follows\n ExtentCucumberFormatter.addSystemInfo(\"Browser Name\", \"Firefox\");\n ExtentCucumberFormatter.addSystemInfo(\"Browser version\", \"v31.0\");\n ExtentCucumberFormatter.addSystemInfo(\"Selenium version\", \"v2.53.0\");\n\n // Also you can add system information using a hash map\n Map systemInfo = new HashMap();\n systemInfo.put(\"Cucumber version\", \"v1.2.3\");\n systemInfo.put(\"Extent Cucumber Reporter version\", \"v1.1.1\");\n ExtentCucumberFormatter.addSystemInfo(systemInfo);\n }",
"public static void generateReport()\n\t{\n\t\tlong time=System.currentTimeMillis();\n\t\tString reportPath=System.getProperty(\"user.dir\")+\"//automationReport//Report\"+time+\".html\";\n\t\t\n\t\thtmlreporter=new ExtentHtmlReporter(reportPath);\n\t\textent=new ExtentReports();\n\t\textent.attachReporter(htmlreporter);\n\t\t\n\t\tString username=System.getProperty(\"user.name\");\n\t\tString osname=System.getProperty(\"os.name\");\n\t\tString browsername=CommonFunction.readPropertyFile(\"Browser\");\n\t\tString env=CommonFunction.readPropertyFile(\"Enviornment\");\n\t\t\n\t\t\n\t\textent.setSystemInfo(\"User Name\", username);\n\t\textent.setSystemInfo(\"OS Name\", osname);\n\t\textent.setSystemInfo(\"Browser Name\", browsername);\n\t\textent.setSystemInfo(\"Enviornment\", env);\n\t\t\n\t\t\n\t\thtmlreporter.config().setDocumentTitle(\"Automation Report\");\n\t\thtmlreporter.config().setTheme(Theme.STANDARD);\n\t\thtmlreporter.config().setChartVisibilityOnOpen(true);\n \n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"@BeforeClass\r\n\tpublic void initiate()\r\n\t{\r\n\t\treporter = new ExtentHtmlReporter(\"./Reports/TestReport.html\");\r\n\t\textent = new ExtentReports();\r\n\t\textent.attachReporter(reporter);\r\n\t}",
"@BeforeSuite\r\n\t public void setExtent() \r\n\t {\n\t htmlReporter = new ExtentHtmlReporter(System.getProperty(\"user.dir\") + \"/test-output/myReport.html\");\r\n\r\n\t htmlReporter.config().setDocumentTitle(\"Automation Report\");\t // Tile of report\r\n\t htmlReporter.config().setReportName(\"REIMBURSIFY ANDROID\"); // Name of the report\r\n\t htmlReporter.config().setReportName(\"Regression Testing\"); // Name of the report\r\n\r\n\t htmlReporter.config().setTheme(Theme.STANDARD);\r\n\t \r\n\t extent = new ExtentReports();\r\n\t extent.attachReporter(htmlReporter);\r\n\t \r\n\t // Passing General information\r\n\t extent.setSystemInfo(\"Host name\", \"Reim Demo Runner\");\r\n\t extent.setSystemInfo(\"Environemnt\", \"QA\");\r\n\t// extent.setSystemInfo(\"User\", \"Sharmila\");\r\n\t extent.setSystemInfo(\"iOS\", \"13.6\");\r\n\t extent.setSystemInfo(\"Application Version\", \"QA Version 3.3.15\");\r\n\t extent.setSystemInfo(\"Type of Testing\", \"E2E Test\");\r\n\t }",
"@BeforeSuite(alwaysRun=true,description=\"test\")\r\n\tpublic void extentReportSetup() \r\n\t{\r\n\t\tSystem.out.println(\"===== I am Befor Test Method==== \");\r\n\t\t\r\n\t\thtmlReporter = new ExtentHtmlReporter(reporterPath);\r\n\t\thtmlReporter.config().setDocumentTitle(\"Free Job Portal\");\r\n\t\thtmlReporter.config().setReportName(\"ExtentReporter\");\r\n\t\thtmlReporter.config().setTheme(Theme.STANDARD);\r\n\t\t\r\n\t\treporter = new ExtentReports();\r\n\t\treporter.attachReporter(htmlReporter);\r\n\t\t\r\n\t\treporter.setSystemInfo(\"Host\",\"localhost\");\r\n\t\treporter.setSystemInfo(\"OS\",System.getProperty(\"OS\"));\r\n\t\treporter.setSystemInfo(\"User\",\"Sekhar\");\r\n\t}",
"public static ReportGenerator createInstance()\r\n {\r\n return new ReportGenerator();\r\n }",
"@AfterClass\n\t/* Executa a leitura das configuracoes do extends report */\n\tpublic static void writeExtentReport() {\n\t\tReporter.loadXMLConfig(new File(\"src/test/resources/configs/extension-config.xml\"));\n\t\t\n\t\t/* Informa qual o sistema foi utilizado para efetuar os testes */\n\t\tReporter.setSystemInfo(\"OS\", \"Windows10\");\n\t\t\n\t\t/* Informa o nome do analista no relatorio */\n\t\tReporter.setSystemInfo(\"Tester Name\", \"Wilker\");\n\t\t\n\t}",
"public synchronized static ExtentReports getReporter(String filePath) {\n\t\t if (report == null) {\r\n\t\t \treport = new ExtentReports(path.concat(\"Report\\\\Purchase_Admin_Report.html\"));\r\n\t\t \r\n\t\t report\r\n\t\t .addSystemInfo(\"Host Name\", \"Priti\") //Environment Setup For Report\r\n\t\t .addSystemInfo(\"Environment\", \"QA\");\r\n\t\t }\r\n\t\t \r\n\t\t return report;\r\n\t\t}",
"public GenerateReport() {\n initComponents();\n displayLogs();\n }",
"public Report() {\n\t\tsuper();\n\t}",
"@BeforeSuite\n public static void setup() {\n ExtentProperties extentProperties = ExtentProperties.INSTANCE;\n extentProperties.setReportPath(\"ExtentReports/myreport.html\");\n }",
"public DefaultValidationReport()\r\n {\r\n factory = new DefaultReportFactory();\r\n }",
"public Report() {\r\n }",
"protected Report()\n {\n super();\n }",
"public static void main(String[] args) {\n\t\tExtend ex =new Extend();\n\t\tex.startreport();\n\n\t}",
"public static JasperReportBuilder generateReport(ExportData metaData,HttpServletRequest request){\n session = request.getSession(false);\n report = report(); // Creer le rapport\n \n //Logo\n// logoImg = cmp.image(inImg).setStyle(DynamicReports.stl.style().setHorizontalAlignment(HorizontalAlignment.LEFT)); \n //logoImg.setDimension(80,80); \n \n //Definit le style des colonnes d'entàte\n report.setColumnTitleStyle(getHeaderStyle(metaData));\n \n \n \n LinkedHashMap <String,String> criteria = metaData.getCriteria(); \n //Ajout la date d'àdition au critere d'impression\n String valDateProperty = getDateTxt(metaData.getLang()) ;\n String keyDateProperty = \"\" ;\n if ( session.getAttribute(\"activedLocale\").equals(\"fr\") ) {\n keyDateProperty = \"Edité le \" ;\n }\n else {\n keyDateProperty = \"Printed on \" ;\n }\n criteria.put(keyDateProperty,valDateProperty);\n \n StyleBuilder titleStyle = stl.style(boldStyle).setFontSize(16).setForegroundColor(new Color(0, 0, 0)).setHorizontalAlignment(HorizontalAlignment.RIGHT).setRightIndent(20);\n ComponentBuilder<?, ?> logoComponent = cmp.horizontalList(\n //cmp.image(Templates.class.getResource(\"/logopalm.png\")).setFixedDimension(150, 50).setStyle(stl.style().setLeftIndent(20)),\n cmp.verticalList(\n cmp.text(metaData.getTitle()).setStyle(titleStyle)\n )\n ).newRow()\n .add(cmp.horizontalList().add(cmp.hListCell(createCriteriaComponent(criteria,metaData)).heightFixedOnTop()))\n .newRow(); \n \n report.noData(logoComponent, cmp.text(\"Aucun enregistrement trouvà\").setStyle(stl.style().setHorizontalAlignment(HorizontalAlignment.CENTER).setTopPadding(30)));\n\n \n \n lblStyle = stl.style(Templates.columnStyle).setForegroundColor(new Color(60, 91, 31)); // Couleur du text \n colStyle = stl.style(Templates.columnStyle).setHorizontalAlignment(HorizontalAlignment.CENTER);\n \n groupStyle = stl.style().setForegroundColor(new Color(60, 91, 31)) \n .setBold(Boolean.TRUE)\n .setPadding(5)\n .setFontSize(13)\n .setHorizontalAlignment(HorizontalAlignment.CENTER); \n \n\n \n if(metaData.getTitle().equals(ITitle.PARCEL)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.PARCEL_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.PLANTING)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.PLANTING_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.SECTOR)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.SECTOR_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.BLOCK)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.BLOCK_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.ATTACK_PHYTO)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.TREATMENT)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.TREATMENT_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.HARVEST)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.HARVEST_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.SERVICING)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.SERVICING_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.EVENT_PLANTING)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.EVENT_PLANTING_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.FERTILIZATION)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.FERTILIZATION_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.CONTROL_PHYTO)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.CONTROL_PHYTO_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.EVENT_FOLDING)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.EVENT_FOLDING_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.MORTALITY)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.MORTALITY_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.HARVESTING)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.HARVESTING_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.BUDGET)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.REPLACEMENT)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.REPLACEMENT_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.METEOROLOGY)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.METEOROLOGY_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.PLANTING_MATERIAL)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.PLANTING_MATERIAL_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.PLUVIOMETRY)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.PLUVIOMETRY_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.ETP)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.ETP_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.HYGROMETRY)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.HYGROMETRY_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.TEMPERATURE)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.TEMPERATURE_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.INSULATION)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.INSULATION_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.WORK)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.WORK_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }\n \n \n drColumns = new HashMap<String, TextColumnBuilder>(); \n groups = new ArrayList<String>();\n subtotals = new ArrayList<String>();\n \n //Definit la liste des colonnes du rapport\n ExportGenerator.getColumns(metaData); \n //Definit la liste des sous-totaux du rapport\n ExportGenerator.getSubTotals(metaData);\n \n \n //Genration des sous totaux\n for (String group : groups) {\n ColumnGroupBuilder group2 = grp.group(drColumns.get(group));\n report.groupBy(group2);\n for (String subtotal : subtotals) {\n report.subtotalsAtGroupFooter(group2,sbt.sum(drColumns.get(subtotal)));\n }\n }\n\n for (String subtotal : subtotals) {\n report.subtotalsAtSummary(sbt.sum(drColumns.get(subtotal))); \n }\n \n /*if(ExportGenerator.getColumnByNameField(\"plantingName\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL \"), ExportGenerator.getColumnByNameField(\"plantingName\"), Calculation.NOTHING));\n }*//*else if(ExportGenerator.getColumnByNameField(\"invoiceCode\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL GENERAL \"), ExportGenerator.getColumnByNameField(\"invoiceCode\"), Calculation.NOTHING));\n }else if(ExportGenerator.getColumnByNameField(\"planterCode\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL\"), ExportGenerator.getColumnByNameField(\"planterCode\"), Calculation.NOTHING));\n }else if(ExportGenerator.getColumnByNameField(\"transportTicket\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL GENERAL \"), ExportGenerator.getColumnByNameField(\"transportTicket\"), Calculation.NOTHING));\n }else if(ExportGenerator.getColumnByNameField(\"deliveryDate\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL GENERAL \"), ExportGenerator.getColumnByNameField(\"deliveryDate\"), Calculation.NOTHING));\n }\n else if(ExportGenerator.getColumnByNameField(\"arroundPlantingTicketNumber\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL GENERAL \"), ExportGenerator.getColumnByNameField(\"arroundPlantingTicketNumber\"), Calculation.NOTHING));\n }\n else if(ExportGenerator.getColumnByNameField(\"planterNumber\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL GENERAL \"), ExportGenerator.getColumnByNameField(\"planterNumber\"), Calculation.NOTHING));\n }else if(ExportGenerator.getColumnByNameField(\"startPaymentDate\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL GENERAL \"), ExportGenerator.getColumnByNameField(\"startPaymentDate\"), Calculation.NOTHING));\n }else if(ExportGenerator.getColumnByNameField(\"sectorCode\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL GENERAL \"), ExportGenerator.getColumnByNameField(\"sectorCode\"), Calculation.NOTHING));\n }else if(ExportGenerator.getColumnByNameField(\"month\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL \"), ExportGenerator.getColumnByNameField(\"month\"), Calculation.NOTHING));\n }*/\n \n\n \n \n //Genere la source de donnàes du rapport\n report.setDataSource(metaData.getData());\n \n report.highlightDetailEvenRows(); \n \n \n // Definition de l'entete : valable uniquement pour la 1ere page\n HorizontalListBuilder hlb= null;\n \n hlb = cmp.horizontalList().add(\n cmp.hListCell(createCriteriaComponent(criteria,metaData)).heightFixedOnTop()\n );\n\n \n report.title(\n createCustomTitleComponent(metaData.getTitle()), // Titre\n hlb,// Liste Horizontal des Critàres \n cmp.verticalGap(12) // Marge de 12 px entre chaque critàre\n ); \n \n \n \n report.setPageMargin(DynamicReports.margin().setLeft(15).setTop(30).setRight(15).setBottom(30));\n report.setPageFormat(PageType.A3, PageOrientation.LANDSCAPE);\n report.pageFooter(DynamicReports.cmp.pageXslashY());\n return report;\n \n }",
"@Override\n void createReport(final Format reportFormat,\n final long start, final long end) {\n makeBriefReport(reportFormat, \"Informe breu\", start, end);\n writeToFile();\n getFormat().finishPrinting();\n }",
"private ReportConcept createReportConcept(IClass cls) {\n\t\tConceptEntry entry = new ConceptEntry(cls.getName(), getEntryType(cls));\n\t\treturn new ReportConcept(entry, reportInterface);\n\t}",
"public void generateReport() {\n ReportGenerator rg = ui.getReportGenerator();\n if (rg == null || !rg.isVisible()) {\n ui.openReportGenerator();\n rg = ui.getReportGenerator();\n }\n Image img = getImage();\n if (img == null) {\n return;\n }\n rg.addImage(img, \"Plot\");\n }",
"@BeforeSuite\n public void setUp() {\n htmlReporter = new ExtentHtmlReporter(\"Reports.html\");\n // create ExtentReports and attach reporter(s)\n extent = new ExtentReports();\n extent.attachReporter(htmlReporter);\n }",
"@BeforeClass\n\tpublic void setup() {\n\t\treport2 = new ExtentReports(\"./Reports/ElfuScripts.html\");\n\n\t}",
"public Report getReport();",
"protected abstract JRAbstractExporter<?, ?, ?, ?> createExporter(JasperReportsConfiguration jContext, JRExportProgressMonitor monitor, File file);",
"public static IReport createReport(InputStream in) throws ArfException {\r\n \treturn new Report(Report.getAssetReportCollection(in));\r\n }",
"@Override\n public ResponseEntity<?> createReport(OutputReport report) throws IOException, MessagingException {\n Date endDate = midnight();\n Date startDate = midnight();\n if (report.getReportType() == 0) {\n endDate = midnight();\n startDate = setDateBefore(1);\n } else if (report.getReportType() == 1) {\n endDate = midnight();\n startDate = setDateBefore(7);\n } else if (report.getReportType() == 2) {\n endDate = midnight();\n startDate = setDateBefore(30);\n } else if (report.getReportType() == 3) {\n endDate = new Date(report.getEndDate());\n startDate = new Date(report.getStartDate());\n }\n ExcelHelper.writeExcel(report.getReportItemList(), \"NiceJavaBooks.xls\", report.getTotalRevenue());\n Place place = placeRepository.findById(report.getPlaceId()).get();\n String content = \"\";\n if(report.getReportType() == 0){\n content = \"Daily sales report\";\n }else if(report.getReportType() == 1){\n content = \"Weekly sales report\";\n }else if(report.getReportType() == 2){\n content = \"Monthly sales report\";\n }else if(report.getReportType() == 3){\n SimpleDateFormat formatter = new SimpleDateFormat(\"dd/MM/yyyy\");\n content = \"Sales report from \"+formatter.format(startDate)+\" to \"+formatter.format(endDate);\n }\n sendEmail(new File(\"NiceJavaBooks.xls\"), place.getMail(), content);\n return ResponseEntity.ok(\"OK\");\n }",
"private Report createFullReport(String message, Type type) {\n return Report.create(message, type);\n }",
"@Parameters({ \"report_name\" })\n\t@BeforeSuite\n\tpublic void setUp() {\n\t\tString reportName = \"Report-\" + getCurrentDateNTime(\"yyyy-MM-dd-HH-mm-ss\");\n\t\t//String reportFileName = reportName + \".html\";\n\t\tString reportFileName = \"TestExecutionReport.html\";\n\t\treports = new ExtentReports(\"./ExecutionReport/\" + reportFileName, true);\n\t\treports.loadConfig(new File(\"extent-config.xml\"));\n\t}",
"public static void startTest(String testName) throws IOException {\n \tloadConfigurationFile();\n \t\textentReportsPath = prop.getProperty(\"EXTENT_REPORT_DIR\");\n\t\tif(!extentReportsPath.isEmpty()) {\n\t\t\tDate date= new Date();\n\t\t\tlong time = date.getTime();\n\t\t\tTimestamp ts = new Timestamp(time);\n\t\t\tString t1 = \"ExtentReport_\" + ts.toString().replace(\":\",\"_\").replace(\".\",\"_\");\n\t\t\tString t2 = t1.substring(0,t1.length() - 4);\n\t\t\treport = new ExtentReports(extentReportsPath + \"\\\\\" + t2 + \".html\");\n\t\t\ttest = report.startTest(testName);\n\t\t}\n }",
"public static ReportType createEntity(EntityManager em) {\n ReportType reportType = new ReportType()\n .name(DEFAULT_NAME)\n .text(DEFAULT_TEXT)\n .status(DEFAULT_STATUS);\n return reportType;\n }",
"public Report(Employee employee, int numberOfReports){\n this.employee=employee;\n this.numberOfReports=numberOfReports;\n }",
"public void generateReport(List<XmlSuite> xmlSuites, List<ISuite>suites, \r\n\t\tString outputDirectory){//creating a method that takes three arguments,\r\n\t//to generate a report, arguments list requirements, \r\n\t//using a mechanism called List, which gets the array input\r\n\t//script will go back to xml suites, and look for \"suites\" which are the classes we created\r\n\t//we will create an xml file to contain all the classes within our test cases\r\n\t//PASS, FAIL, or SKIP will be string outputs; String outputDirectory\r\n\t//XML Suite: big time testing based on testing type\r\n\t//ISuite: pages we are working on; classes created to perform action; under test folder\r\n\t\r\n\textent = new ExtentReports(outputDirectory + File.separator\r\n\t\t\t+ \"Extent.html\", true);\r\n\t//creating an object for extent report, creating a virtual object to save all output to save all results\r\n\t//as a string, file seperator is not needed, it doesn't matter how u received the result\r\n\t//seperate them and consolidate the results\r\n\t//telling you how to save the file name, html is easy to open on any device and lightweight\r\n\t//outputDirectory: SKIP, PASS, FAIL\r\n\t//the reason for boolean option: if yu receive results, generate report//if yu dont then dont generate\r\n\tfor(ISuite suite : suites){//for loop is created\r\n\t\t//map obtains a key value, not duplicate, and then maps it to one location, which is the\r\n\t\t//extent report\r\n\t\t//an interface in java, between key value and location (between status and extent report)\r\n\t\t//will make sure how to map and seperate results under each class\r\n\t\tMap<String, ISuiteResult>result = suite.getResults();\r\n\t\r\n\tfor(ISuiteResult r : result.values()){\r\n\t\tITestContext context =r.getTestContext();//for each of the classes, create log status\r\n\t\t//test context: script that we are running, results from it\r\n\t\t//: is a conditional operator, which lists the conditions, which lists out the conditions\r\n\t\t//script should be able to run \r\n\t\t//one suite, or multiple suites in one shot\r\n\t\t//making context\r\n\t\t\r\n\t\t\r\n\t\tbuildTestNo(context.getPassedTests(), LogStatus.PASS);\r\n\t\tbuildTestNo(context.getFailedTests(), LogStatus.FAIL);\r\n\t\t//retrieving status using results/context\r\n\t\tbuildTestNo(context.getSkippedTests(), LogStatus.SKIP);\r\n\t\t\t\r\n\t}\r\n}\r\nextent.flush();//take results and place on html file\r\nextent.close();\r\n\r\n}",
"@Override\n public ReportDesign buildReportDesign(ReportDefinition reportDefinition) {\n ReportDesign rd = createExcelTemplateDesign(getExcelDesignUuid(), reportDefinition, \"SMCRegister.xls\");\n Properties props = new Properties();\n props.put(\"repeatingSections\", \"sheet:1,row:10-12,dataset:SMC\");\n props.put(\"sortWeight\", \"5000\");\n rd.setProperties(props);\n return rd;\n }",
"public static IReport createReport(File f) throws ArfException {\r\n \treturn new Report(Report.getAssetReportCollection(f));\r\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}",
"public JasperDesign create()\n\t{\n\t\tJasperDesign design = new JasperDesign();\n\t\tdesign.setName(\"demoReport\");\n\t\tJRDesignQuery query = new JRDesignQuery();\n\t\tquery.setText(\"//*\");\n\t\tquery.setLanguage(\"XPath\");\n\t\tdesign.setQuery(query);\n\t\tdesign.setBottomMargin(72);\n\t\tdesign.setTopMargin(72);\n\t\tdesign.setLeftMargin(72);\n\t\tdesign.setRightMargin(72);\n\t\t\n\t\t//A JRDesignBand can represent different report parts like the DetailBand, the PageHeader/Footer, ...\n\t\tJRDesignBand header = new JRDesignBand();\n\t\theader.setHeight(50);\n\t\t\n\t\t//Example of a dynamic text field\n\t\tJRDesignTextField textField=new JRDesignTextField();\n\t\ttextField.setStretchWithOverflow(true);\n\t\ttextField.setBlankWhenNull(true);\n\t\ttextField.setX(0);\n\t\ttextField.setY(4);\n\t\ttextField.setWidth(100);\n\t\ttextField.setHeight(13);\n\t\ttextField.setKey(\"header\");\n\t\n\t\t//TextField expression\n\t\tJRDesignExpression designExpression=new JRDesignExpression();\n\t\tdesignExpression.setValueClass(String.class);\n\t\tdesignExpression.setText(\"\\\"Welcome to the report.\\\"\");\n\n\t\t//Setting the expression\n\t\ttextField.setExpression(designExpression);\n\t\t\n\t\t//Add element to header band\n\t\theader.getChildren().add(textField);\n\t\t\n\t\t//A band is then set as a part of the report design\n\t\tdesign.setPageHeader(header);\n\t\treturn design;\n\t}",
"public ProductTestReport() {}",
"public ReportingExcelView() {\r\n\t\tsetContentType(CONTENT_TYPE);\r\n\t}",
"@Override\n\t\tpublic void onStart(ITestContext context) {\n\t\t\tSystem.out.println(\"Extent Reports Version 3 Test Suite started!\");\n\t ParentextentTest = extent.createTest(context.getName());\n\n\t\t\t\n\t\t}",
"public Report build() {\n return new Report(this);\n }",
"public void generateReport()\r\n {\r\n ProfilerGUI reportGUI = new ProfilerGUI(map,mapCountTracker);\r\n //reportGUI.\r\n }",
"public void ExtentRepoter() {\n\t\treporter = new ExtentHtmlReporter(\"./Reports/learn_automation1.html\");\n\n\t}",
"@Override\n\tpublic ReportDesign buildReportDesign(ReportDefinition reportDefinition) {\n\t\treturn createExcelTemplateDesign(getExcelDesignUuid(), reportDefinition, \"monthlyDhis2Reporting.xls\");\n\t}",
"@BeforeTest\n\tpublic void config() {\n\t\tString path=System.getProperty(\"user.dir\")+\"\\\\reports\\\\index.html\"; //after + we want new path to add to it\n\t\tExtentSparkReporter reporter=new ExtentSparkReporter(path);// this is responsible for creating report\n\t\treporter.config().setReportName(\"Web Automation Akhil\");\n\t\treporter.config().setDocumentTitle(\"Test Results\");\n\t\t\n\t\tExtentReports extent=new ExtentReports();// this is main class for Tracking the things.\n\t\textent.attachReporter(reporter); // Here is link of config with main class\n\t\textent.setSystemInfo(\"Tester\", \"Akhilesh Rawat\");\n\t}",
"String initializeExport(String dsID, int records) throws RepoxException;",
"boolean createReport(String lang, String reportId, String fileName, Object... params) throws Exception;",
"public static Report getInstance(Modello unModello, TestSuite unTestSuite) {\r\n\t\tif(instance==null)\r\n\t\t\tinstance = new Report(unModello,unTestSuite);\r\n\t\treturn instance;\r\n\t}",
"private void initExcelReport() {\n DocumentItem documentItem = new DocumentItem(\"Source Node ID\", \"File Name\", \"Target Destination Folder\", \"Target Node ID\", null, \"Target Node Status\", \"Message\", null, null);\n ExcelUtil.addMigrationRow(jobParameters.getMigrationReport(), \"Date Time\", \"Source Node Status\", \"Source Destination Folder\", documentItem);\n ExcelUtil.addErrorRow(jobParameters.getErrorReport(), \"Date Time\", \"Source Node Status\", \"Source Destination Folder\", documentItem);\n }",
"public String createCoverageReport() throws Exception{\n\t\tList<TestSuite> suites = getSuites();\t\n\t\treturn priorj.createCoverageReport(suites);\n\t}",
"public void registerReports() throws Exception{\n \tGenericPatientSummary ps = new GenericPatientSummary();\n \tps.delete();\n \tps.setup();\n }",
"public Reportes() {\n initComponents();\n }",
"boolean generateReport();",
"public Prof_Report() {\r\n initComponents();\r\n }",
"public EmailDailyReportOfZA() {\n\t}",
"@BeforeTest\n\tpublic void StartReportbeforeTest() {\n\t\textent = new ExtentReports(System.getProperty(\"user.dir\") + \"/test-output/casestudy_Reports.html\", true);\n\t\textent.addSystemInfo(\"Host Name\", \"TestMeApp\");\n\t\textent.addSystemInfo(\"Environment\", \"Selenium Testing\");\n\t\textent.addSystemInfo(\"User Name\", \"Group-1\");\n\n\t\tdriver = UtilityClass.getDriver(\"chrome\");\n\t\tdriver.manage().window().maximize();\n\t\tdriver.get(\"http://10.232.237.143:443/TestMeApp\");\n\n\t}",
"public void generateReport(ReportGenerationData data)throws ChangeApplicationException;",
"private void initReportWriter() {\n\t\tfinal XMLOutputFactory xmlof = XMLOutputFactory.newInstance();\r\n\r\n\t\t// Create an XML stream writer\r\n\t\tfinal File reportFile = new File(getOutputDirectory(), \"report.xml\");\r\n\t\ttry {\r\n\t\t\treportWriter = xmlof.createXMLStreamWriter(new FileWriter(reportFile));\r\n\r\n\t\t} catch (final XMLStreamException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (final IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public ReportScreen() {\n\t\t\n\t}",
"public Reports() {\n initComponents();\n }",
"public Reports() {\n initComponents();\n }",
"public Reports() {\n initComponents();\n }",
"public DeviceReportExample() {\n oredCriteria = new ArrayList<Criteria>();\n }",
"public abstract void getReport(java.io.Writer writer);",
"ReportGenerationPanel() {\n initComponents();\n reportPanel.setLayout(new GridBagLayout());\n constraints = new GridBagConstraints();\n constraints.fill = GridBagConstraints.BOTH;\n constraints.gridx = 0;\n constraints.gridy = 0;\n constraints.weightx = 1.0;\n glue = Box.createVerticalGlue();\n progressPanel = new ReportProgressPanel();\n }",
"public void generateReport(TaxChallan bean, HttpServletRequest request, HttpServletResponse response, String reportPath) {\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tReportDataSet rds = new ReportDataSet();\r\n\t\t\tString type = bean.getReportType();\r\n\t\t\trds.setReportType(type);\r\n\t\t\tString fileName = \"T.D.S.-TCS TAX CHALLAN\"+Utility.getRandomNumber(1000);\r\n\t\t\tString reportPathName=reportPath+fileName+\".\"+type;\r\n\t\t\trds.setFileName(fileName);\r\n\t\t\trds.setPageSize(\"A4\");\r\n\t\t\trds.setReportHeaderRequired(false);\r\n\t\t\trds.setShowPageNo(true);\r\n\t\t\torg.paradyne.lib.ireportV2.ReportGenerator rg=null;\r\n\t\t\t/* Added by Prashant*/\r\n\t\t\tif(reportPath.equals(\"\")){\r\n\t\t\t\trg = new org.paradyne.lib.ireportV2.ReportGenerator(rds, session, context, request);\r\n\t\t\t}else{\r\n\t\t\t\tlogger.info(\"################# ATTACHMENT PATH #############\"+reportPath+fileName+\".\"+type);\r\n\t\t\t\trg = new org.paradyne.lib.ireportV2.ReportGenerator(rds, reportPath ,session, context, request);\r\n\t\t\t\trequest.setAttribute(\"reportPath\", reportPath+fileName+\".\"+type);\r\n\t\t\t\trequest.setAttribute(\"fileName\", fileName+\".\"+type);\r\n\t\t\t\trequest.setAttribute(\"action\", \"TaxChallan_input.action\");\r\n\t\t\t}\r\n\t\t\trg = getReport(rg, bean);\r\n\t\t\trg.process();\r\n\t\t\tif(reportPath.equals(\"\")){\r\n\t\t\t\trg.createReport(response);\r\n\t\t\t}else{\r\n\t\t\t\t/* Generates the report as attachment*/\r\n\t\t\t\trg.saveReport(response);\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public ReportSheet createReport(RepletRequest req) throws RepletException\n {\n ss = (StyleSheet) theReport;\n try\n {\n bindMessages(req);\n bindData(req);\n }\n catch (Exception e)\n {\n ReportsPackage.logError(\"Problem creating report\", e);\n throw new RepletException(e.getMessage());\n }\n return theReport;\n }",
"public abstract void generateReport(Date from, Date to, String objectCode);",
"public ReportMetadataExample() {\n\t\toredCriteria = new ArrayList<Criteria>();\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\thtmlReporter = new ExtentHtmlReporter(\"C:\\\\Users\\\\Suresh Mylam\\\\eclipse-workspace\\\\TestNG_Listners\\\\Reports\\\\TestReport.html\");\r\n\t\textent = new ExtentReports();\r\n\t\textent.attachReporter(htmlReporter);\r\n\t\ttest= extent.createTest(\"TEst123\");\r\n\t\ttest.pass(\"pass\");\r\n\t\ttest.fail(\"fail\");\r\n\t\ttest.info(\"info\");\r\n\t\textent.flush();\r\n\t\tSystem.out.println(\"Done\");\r\n\r\n\t}",
"public void createReport(Report report) {\n view.onProgress(true);\n apiInterface.newReport(report.getNumber(), report.isNo_telp(), report.isNo_rek())\n .subscribeOn(Schedulers.io())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe(new SingleObserver<ReportItem>() {\n @Override\n public void onSubscribe(Disposable d) {\n\n }\n\n @Override\n public void onSuccess(ReportItem reportItem) {\n if (reportItem != null) {\n view.onReportResult(reportItem.toReportparcel(), true);\n }\n view.onProgress(false);\n }\n\n @Override\n public void onError(Throwable e) {\n view.onError(e.getMessage());\n view.onProgress(false);\n }\n });\n }",
"public void getReport(EntranceTestMaster bean, HttpServletRequest request,\r\n\t\t\tHttpServletResponse response, ServletContext context) {\n\t\tCrystalReport cr=new CrystalReport();\r\n\t\tString path=\"org\\\\paradyne\\\\rpt\\\\recruitment\\\\EntranceTestMaster.rpt\";\r\n\t\tcr.createReport(request, response, context,session, path, \"\");\r\n\t}",
"public org.paradyne.lib.ireportV2.ReportGenerator getReport(org.paradyne.lib.ireportV2.ReportGenerator rg, TaxChallan bean){\r\n\t\ttry {\r\n\t\t\tint toYear=Integer.parseInt(bean.getYear().substring(2))+1;\r\n\t\t\tString toYearStr =\"\";\r\n\t\t\tif(toYear < 10){\r\n\t\t\t\ttoYearStr = \"0\"+toYear;\r\n\t\t\t}else {\r\n\t\t\t\ttoYearStr =\"\"+toYear;\r\n\t\t\t}\r\n\t\t\tString assesmentYear = bean.getYear()+ \"-\"+ toYearStr;\r\n\t\t\tTableDataSet subtitleName = new TableDataSet();\r\n\t\t\tObject obj[][] = new Object[1][3];\r\n\t\t\t\r\n\t\t\tobj[0][0] = \"* Important : Please see notes \\noverleaf before filling up the challan\";\r\n\t\t\tobj[0][1] = \"T.D.S./TCS TAX CHALLAN\";\r\n\t\t\tobj[0][2] = \"Single Copy (to be sent to the ZAO)\";\r\n\t\t\tsubtitleName.setData(obj);\r\n\t\t\tsubtitleName.setCellAlignment(new int[] { 0, 1, 0 });\r\n\t\t\tsubtitleName.setCellWidth(new int[] { 30, 40, 30 });\r\n\t\t\tsubtitleName.setBorderDetail(3);\r\n\t\t\tsubtitleName.setHeaderTable(true);\r\n\t\t\trg.addTableToDoc(subtitleName);\r\n\t\t\t\r\n\t\t\tTableDataSet heading1 = new TableDataSet();\r\n\t\t\theading1.setData(new Object[][] { {\r\n\t\t\t\t\t\t\t\"CHALLAN NO./ \\nITNS \\n281\\n\\n\"+bean.getChallanNo(),\r\n\t\t\t\t\t\t\t\"Tax Applicable (Tick One)*\\nTAX DEDUCTED/COLLECTED AT SOURCE FROM\\n\\n(0020) COMPANY [__] \\t\\t\\t\\t(0021) NON-COMPANY [__] \\n\\n DEDUCTEES \\t\\t\\t\\t\\t\\t\\t DEDUCTEES\",\r\n\t\t\t\t\t\t\t\"Assesment Year \\n\\n\"+assesmentYear }});\r\n\t\t\theading1.setCellAlignment(new int[] { 1, 1, 1 });\r\n\t\t\theading1.setCellWidth(new int[] { 20, 60, 20 });\r\n\t\t\theading1.setBorderDetail(3);\r\n\t\t\trg.addTableToDoc(heading1);\r\n\t\t\t\r\n\t\t\tObject divAddress[][]=getSqlModel().getSingleResult(\"SELECT HRMS_DIVISION.DIV_NAME, NVL(HRMS_DIVISION.DIV_ADDRESS1,' '), NVL(HRMS_DIVISION.DIV_ADDRESS2,' '), NVL(HRMS_DIVISION.DIV_ADDRESS3,' '), NVL(HRMS_DIVISION.DIV_TANNO,' '), \"\r\n\t\t\t\t\t+\" HRMS_DIVISION.DIV_TELEPHONE, HRMS_DIVISION.DIV_PINCODE FROM HRMS_DIVISION WHERE HRMS_DIVISION.DIV_ID=\"+bean.getDivId());\r\n\t\t\t\r\n\t\t\tObject [][] empDataObj = new Object[4][1];\r\n \t\tempDataObj[0][0] = \"Tax Deduction Account No. (T.A.N.)\\n\"+divAddress[0][4];;\r\n \t\tempDataObj[1][0] = \"Full Name\\n\"+divAddress[0][0];\r\n \t\tempDataObj[2][0] = \"Complete Address with City & State\\n\"+divAddress[0][1]+\"\\n\"+\"\"+divAddress[0][2]+\"\\n\"+\"\"+divAddress[0][3];\r\n \t\tempDataObj[3][0] = \"Tel. No. : \"+checkNull(\"\"+divAddress[0][5])+\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\" +\r\n \t\t\t\t\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t Pin : \"+checkNull(\"\"+divAddress[0][6]);\r\n \t\t\r\n \t\t\r\n \t\tTableDataSet empData = new TableDataSet();\r\n\t\t\tempData.setData(empDataObj);\r\n\t\t\tempData.setCellAlignment(new int[] { 0 });\r\n\t\t\tempData.setCellWidth(new int[] { 100 });\r\n\t\t\tempData.setBorderDetail(3);\r\n\t\t\trg.addTableToDoc(empData);\r\n \t\t\r\n \t\tTableDataSet table1 = new TableDataSet();\r\n \t\ttable1.setData(new Object[][] { { \"Type of Payment\", \"Code * \" } });\r\n \t\ttable1.setCellAlignment(new int[] { 0, 2});\r\n \t\ttable1.setCellWidth(new int[] { 50, 50 });\r\n \t\ttable1.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tTableDataSet table2 = new TableDataSet();\r\n\t\t\ttable2.setData(new Object[][] { {\"(Tick One)\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\" +\r\n\t\t\t\t\t\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t(Please see overleaf)\" +\r\n\t\t\t\t\t\"\\n\\n\\n \\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tTDS/TCS Payable by Taxpayer\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t (200)\" +\r\n\t\t\t\t\t\"\\n\\n\\n \\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t TDS/TCS Regular Assessment (Raised by I.T. Deptt.)\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t(400)\\n\"}});\r\n\t\t\ttable2.setCellAlignment(new int[] {0});\r\n\t\t\ttable2.setCellWidth(new int[] { 100 });\r\n\t\t\ttable2.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map2 = rg.joinTableDataSet(table1, table2, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table3 = new TableDataSet();\r\n\t\t\ttable3.setData(new Object[][] { { \"DETAILS OF PAYMENTS\",\"Amount (in Rs. Only)\" }});\r\n\t\t\ttable3.setCellAlignment(new int[] { 0, 0});\r\n\t\t\ttable3.setCellWidth(new int[] { 50, 50});\r\n\t\t\ttable3.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map3 = rg.joinTableDataSet(map2, table3, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table4 = new TableDataSet();\r\n\t\t\ttable4.setData(new Object[][] { {\"Income Tax\",bean.getTax()},\r\n\t\t\t\t\t{\"Surcharge\",bean.getSurcharge()},\r\n\t\t\t\t\t{\"Education Cess\",bean.getEduCess()},\r\n\t\t\t\t\t{\"Interest\",bean.getIntAmt()},\r\n\t\t\t\t\t{\"Penalty\",bean.getOthrAmt()},\r\n\t\t\t\t\t{\"Total\",bean.getTotalTax()},\r\n\t\t\t\t\t{\"Total (in words)\",\"\"}});\r\n\t\t\ttable4.setCellAlignment(new int[] { 0, 0});\r\n\t\t\ttable4.setCellWidth(new int[] { 30, 70});\r\n\t\t\ttable4.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map4 = rg.joinTableDataSet(map3, table4, false, 100);\r\n\t\t\t\r\n\t\t\tString numberString [] = convert(Integer.parseInt(bean.getTotalTax().trim().replace(\".00\",\"\"))).split(\",\");\r\n\t\t\t\r\n\t\t\tObject totalInWord [][]= new Object [2][6];\r\n\t\t\ttotalInWord [0][0] = \"CRORE\";\r\n\t\t\ttotalInWord [0][1] = \"LACS\";\r\n\t\t\ttotalInWord [0][2] = \"THOUSAND\";\r\n\t\t\ttotalInWord [0][3] = \"HUNDRED\";\r\n\t\t\ttotalInWord [0][4] = \"TENS\";\r\n\t\t\ttotalInWord [0][5] = \"UNITS\";\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < numberString.length; i++) {\r\n\t\t\t\tif(numberString[i].equalsIgnoreCase(\"zero\")){\r\n\t\t\t\t\ttotalInWord [1][i] = \"Nil\";\r\n\t\t\t\t} else { \r\n\t\t\t\t\ttotalInWord [1][i] = numberString[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tTableDataSet table5 = new TableDataSet();\r\n\t\t\ttable5.setData(totalInWord);\r\n\t\t\ttable5.setCellAlignment(new int[] { 1, 1, 1, 1, 1, 1});\r\n\t\t\ttable5.setCellWidth(new int[] { 15, 15, 15, 15, 15, 15});\r\n\t\t\ttable5.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map5 = rg.joinTableDataSet(map4, table5, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table6 = new TableDataSet();\r\n\t\t\ttable6.setData(new Object[][] { {\"Paid in Cash/Debit to A/c /Cheque No.\"+bean.getChequeNo(), \"\", \"Dated\", bean.getChequeDate() }});\r\n\t\t\ttable6.setCellAlignment(new int[] { 1, 1, 1, 1});\r\n\t\t\ttable6.setCellWidth(new int[] { 50, 15, 20, 15});\r\n\t\t\ttable6.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map6 = rg.joinTableDataSet(map5, table6, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table7 = new TableDataSet();\r\n\t\t\ttable7.setData(new Object[][] { {\"Drawn on\", bean.getBank()}});\r\n\t\t\ttable7.setCellAlignment(new int[] { 0, 0});\r\n\t\t\ttable7.setCellWidth(new int[] { 50,50});\r\n\t\t\ttable7.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map7 = rg.joinTableDataSet(map6, table7, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table8 = new TableDataSet();\r\n\t\t\ttable8.setData(new Object[][] { {\"(Name of the Bank and Branch)\"}});\r\n\t\t\ttable8.setCellAlignment(new int[] { 2});\r\n\t\t\ttable8.setCellWidth(new int[] { 100 });\r\n\t\t\ttable8.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map8 = rg.joinTableDataSet(map7, table8, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table9 = new TableDataSet();\r\n\t\t\ttable9.setData(new Object[][] { {\"Date\", \"\"}});\r\n\t\t\ttable9.setCellAlignment(new int[] { 0, 0});\r\n\t\t\ttable9.setCellWidth(new int[] { 60, 40});\r\n\t\t\ttable9.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map9 = rg.joinTableDataSet(map8, table9, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table10 = new TableDataSet();\r\n\t\t\ttable10.setData(new Object[][] { {\"Signature of person making payment\"}});\r\n\t\t\ttable10.setCellAlignment(new int[] { 2 });\r\n\t\t\ttable10.setCellWidth(new int[] { 100});\r\n\t\t\ttable10.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map10 = rg.joinTableDataSet(map9, table10, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table11 = new TableDataSet();\r\n\t\t\ttable11.setData(new Object[][] { {\"Taxpayers Counterfoil (To be filled up by taxpayer)\"}});\r\n\t\t\ttable11.setCellAlignment(new int[] { 1 });\r\n\t\t\ttable11.setCellWidth(new int[] { 100});\r\n\t\t\ttable11.setBodyFontDetails(Font.FontFamily.HELVETICA, 8, Font.BOLD, new BaseColor(0, 0, 0));\r\n\t\t\ttable11.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map11 = rg.joinTableDataSet(map10, table11, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table12 = new TableDataSet();\r\n\t\t\ttable12.setData(new Object[][] { {\"TAN \"+divAddress[0][4]+\"\\n\\nReceived from \"+divAddress[0][0]}});\r\n\t\t\ttable12.setCellAlignment(new int[] { 0 });\r\n\t\t\ttable12.setCellWidth(new int[] { 100});\r\n\t\t\ttable12.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map12 = rg.joinTableDataSet(map11, table12, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table13 = new TableDataSet();\r\n\t\t\ttable13.setData(new Object[][] { {\"(Name)\"}});\r\n\t\t\ttable13.setCellAlignment(new int[] { 1 });\r\n\t\t\ttable13.setCellWidth(new int[] { 100 });\r\n\t\t\ttable13.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map13 = rg.joinTableDataSet(map12, table13, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table14 = new TableDataSet();\r\n\t\t\ttable14.setData(new Object[][] { {\"Cash/ Debit to A/c /Cheque No. :\"+bean.getChequeNo()+\"For Rs.\"+bean.getTotalTax().replace(\".00\", \"\")+\"/-\"}});\r\n\t\t\ttable14.setCellAlignment(new int[] { 1 });\r\n\t\t\ttable14.setCellWidth(new int[] { 100 });\r\n\t\t\ttable14.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map14 = rg.joinTableDataSet(map13, table14, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table15 = new TableDataSet();\r\n\t\t\ttable15.setData(new Object[][] { {\"Rs. (in words)\", Utility.convert(Integer.parseInt(bean.getTotalTax().trim().replace(\".00\", \"\")))}, {\"Drawn on\", bean.getBank()}});\r\n\t\t\ttable15.setCellAlignment(new int[] { 0, 1 });\r\n\t\t\ttable15.setCellWidth(new int[] { 30, 70 });\r\n\t\t\ttable15.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map15 = rg.joinTableDataSet(map14, table15, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table16 = new TableDataSet();\r\n\t\t\ttable16.setData(new Object[][] { {\"(Name of the Bank and Branch)\"}, \r\n\t\t\t\t\t{\"Company/Non-Company Deductees\"}, \r\n\t\t\t\t\t{\"on account of Tax Deducted at Source (TDS)/Tax Collected at Source (TCS) from____(Fill up Code)\"},\r\n\t\t\t\t\t{\"(Strike out whichever is not applicable)\"}});\r\n\t\t\ttable16.setCellAlignment(new int[] { 1 });\r\n\t\t\ttable16.setCellWidth(new int[] { 100 });\r\n\t\t\ttable16.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map16 = rg.joinTableDataSet(map15, table16, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table17 = new TableDataSet();\r\n\t\t\ttable17.setData(new Object[][] { {\"\\nfor the Assessment Year : \"+assesmentYear}});\r\n\t\t\ttable17.setCellAlignment(new int[] { 0});\r\n\t\t\ttable17.setCellWidth(new int[] { 100 });\r\n\t\t\ttable17.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map17 = rg.joinTableDataSet(map16, table17, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table18 = new TableDataSet();\r\n\t\t\ttable18.setData(new Object[][] { {\"\\n\\n\\n\\n\\n\\t\\t\\t\\t\\t\\t\\t\\tFOR USE IN RECEIVING BANK \\n\\n\\n\\n\\n\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tDebit to A/c/Cheque credited on\\n\\n\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tDD-MM-YY\\n\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tSPACE FOR BANK SEAL\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nRs.\"}});\r\n\t\t\ttable18.setCellAlignment(new int[] { 0 });\r\n\t\t\ttable18.setCellWidth(new int[] {100});\r\n\t\t\ttable18.setBorderDetail(3);\r\n\r\n\t\t\tTableDataSet table19 = new TableDataSet();\r\n\t\t\ttable19.setData(new Object[][] { {\"\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tSPACE FOR BANK SEAL\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nRs.\"}});\r\n\t\t\ttable19.setCellAlignment(new int[] { 0 });\r\n\t\t\ttable19.setCellWidth(new int[] {100});\r\n\t\t\ttable19.setBorderDetail(3);\r\n\t\t\t//rg.addTableToDoc(table11);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map18 = rg.joinTableDataSet(table18, table19, false, 100);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map19 = rg.joinTableDataSet(map17, map18, true, 70);\r\n\t\t\t\r\n\t\t\trg.addTableToDoc(map19);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn rg;\r\n\t}",
"public BeansReportWrittenExamination() {\n\t\tsuper();\n\t}",
"public Excel_Reporte_Borrador() {\r\n }",
"@BeforeMethod\n\tpublic void setup()\n\t{\n\t ExtentHtmlReporter reporter=new ExtentHtmlReporter(\"./Reports/naveen-report.html\");\n\t\t\n\t extent = new ExtentReports();\n\t \n\t extent.attachReporter(reporter);\n\t \n\t logger=extent.createTest(\"LoginTest\");\n\t}",
"public String getExtentReportConfigFilePath(){\r\n\t\t return rb.getProperty(\"extentReportConfig\");\r\n\t}",
"public FormFieldsReport() {}",
"public final void createReporter(){\n\n buildWriter();\n buildReporter();\n buildCloser();\n\n Validate.notNull(writer,\"Writer can not be null\");\n Validate.notNull(reporter,\"Reporter can not be null\");\n Validate.notNull(closer,\"Closer can not be null\");\n }",
"ExchangePlanContent createExchangePlanContent();",
"public XL() {\n Reporter.log(\"New XL ctor\", true);\n }",
"@BeforeSuite\r\n\tpublic void setUpSuite()\r\n\t{\n\t\t\r\n\t\t Reporter.log(\"*****************Setting up reports and test started********************\", true);\r\n\t\t exceldata = new ExcelDataProvider();\r\n\t\t configreader = new ConfigReader();\r\n\t\t \r\n\t\tExtentHtmlReporter extent = new ExtentHtmlReporter(new File(System.getProperty(\"user.dir\") + \"/Reports/SampleFramwork.html\"));\r\n\t\treport = new ExtentReports();\r\n\t\treport.attachReporter(extent);\r\n\t\t Reporter.log(\"******************All configurations done********************\", true);\r\n\t}",
"public static synchronized ReportGenerator getInstance()\r\n {\r\n if (generator == null)\r\n {\r\n generator = new ReportGenerator();\r\n }\r\n return generator;\r\n }",
"public void clickcreatenewAddparty(ExtentTest extentReport, boolean Screenshot) throws Exception {\n\t\ttry {\n\t\t\tWaitUtils.waitForelementToBeClickable(driver, addInterestcreateAddInterest,\n\t\t\t\t\t\"createAddinterest button is not visible\");\n\t\t\taddInterestcreateAddInterest.sendKeys(Keys.ENTER);\n\t\t\tLog.message(\"Clicked on createNewAddInterest button\", driver, extentReport, true);\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(\"Unable to click create new interested party button\" + e);\n\t\t}\n\t}",
"public static void generateReport() {\n PrintImpl printer = new PrintImpl(realtorLogImpl, propertyLogImpl);\n printer.generateReport(REQUESTS_FILE);\n }",
"public String generateReport() {\n throw new UnsupportedOperationException(\"ERROR: generateReport() Not yet implemented.\");\n }",
"public ReportGenerator(AccessibilityTester at, TestSettings set){\n tester = at;\n testSettings = set;\n printName = set.report_name;\n printDescription = set.report_description;\n printPosition = set.report_position;\n }",
"public ReportPanel() {\n initComponents();\n writer = new JTextAreaWriter(jTextArea1);\n }",
"@Bean\n ReportCreator reportCreator(ReportRepository reportRepository, ModelMapper modelMapper) {\n return new com.report.application.service.ReportCreator(reportRepository, modelMapper);\n }"
]
| [
"0.747967",
"0.7038648",
"0.6919",
"0.67445123",
"0.6703984",
"0.6696888",
"0.65175617",
"0.64860135",
"0.6465534",
"0.64432514",
"0.6387093",
"0.6333037",
"0.63274693",
"0.631654",
"0.6286335",
"0.6285572",
"0.6091306",
"0.6026994",
"0.59093",
"0.59007335",
"0.58968806",
"0.5880253",
"0.5842448",
"0.5808836",
"0.5762536",
"0.57167053",
"0.5647762",
"0.5609119",
"0.5604679",
"0.559027",
"0.55481184",
"0.5507085",
"0.550422",
"0.5479371",
"0.546451",
"0.5458271",
"0.54553133",
"0.5429256",
"0.54256094",
"0.5380987",
"0.53719616",
"0.5351744",
"0.5347861",
"0.53167087",
"0.53138894",
"0.5294882",
"0.5292184",
"0.52807796",
"0.52602226",
"0.5252605",
"0.5248628",
"0.5236512",
"0.52342457",
"0.52217096",
"0.5219112",
"0.51956964",
"0.5177251",
"0.51716304",
"0.5159636",
"0.51232463",
"0.5111843",
"0.50950634",
"0.5086882",
"0.50712115",
"0.5063242",
"0.5061232",
"0.50412",
"0.503966",
"0.5036528",
"0.50018454",
"0.49982762",
"0.49982762",
"0.49982762",
"0.49921218",
"0.4987043",
"0.49770078",
"0.49754512",
"0.49751422",
"0.49539164",
"0.49521095",
"0.49488822",
"0.49429524",
"0.4936876",
"0.49344605",
"0.49286678",
"0.49277383",
"0.49162522",
"0.4913538",
"0.48998725",
"0.48970214",
"0.48895487",
"0.48856208",
"0.4877418",
"0.48721862",
"0.48571756",
"0.4850205",
"0.48483813",
"0.48459983",
"0.48453736",
"0.4836487"
]
| 0.7867286 | 0 |
TODO Autogenerated method stub | public static void main(String[] args) {
TreeSet<String> treeset = new TreeSet<String>();
treeset.add("Good");
treeset.add("For");
treeset.add("Health");
//Add Duplicate Element
treeset.add("Good");
System.out.println("TreeSet : ");
for (String temp : treeset) {
System.out.println(temp);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG) .setAction("Action", null).show(); | @Override
public void onClick(View view) {
isFromResultActivity=false;
finish();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onClick(View v) {\n Snackbar.make(v, \"I'm dead! =(\", Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n }",
"private void showSnackbarMessage(String message){\n if(view != null){\n Snackbar.make(view, message, Snackbar.LENGTH_SHORT).show();\n }\n }",
"void showErrorSnackbar();",
"void onSnackBarActionClicked(int uniqueId, View view);",
"private void showSnackBar(String message) {\n }",
"public static void showSnackbar(Activity activity, final View parent, final String message, final String actionText) {\n activity.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n final Snackbar snackbar = Snackbar.make(parent, message, Snackbar.LENGTH_LONG)\n .setAction(actionText, new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n }\n });\n snackbar.show();\n }\n });\n\n }",
"public void DisplaySnackBarAboveBar(String message, Boolean setAction) {\n int marginSide = 0;\n int marginBottom = 150;\n Snackbar snackbar = Snackbar.make(\n coordinatorLayout,\n message,\n Snackbar.LENGTH_LONG\n );\n\n if (setAction) {\n snackbar.setAction(\"Share Now\", new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent sendIntent = new Intent();\n sendIntent.setAction(Intent.ACTION_SEND);\n sendIntent.putExtra(Intent.EXTRA_TEXT, \"please visit https://www.noobsplanet.com\");\n sendIntent.setType(\"text/plain\");\n startActivity(Intent.createChooser(sendIntent, \"Send to \"));\n }\n });\n }\n\n View snackbarView = snackbar.getView();\n CoordinatorLayout.LayoutParams params = (CoordinatorLayout.LayoutParams) snackbarView.getLayoutParams();\n params.setMargins(\n params.leftMargin + marginSide,\n params.topMargin,\n params.rightMargin + marginSide,\n params.bottomMargin + marginBottom + 100\n );\n\n snackbarView.setLayoutParams(params);\n snackbar.show();\n }",
"public void showSnackBar(final View view, final String message) {\n Snackbar.make(view, message, Snackbar.LENGTH_SHORT).show();\n }",
"public void SnackBarB() {\n Snackbar.make(getWindow().getDecorView().getRootView(),\n \"Cálculos sobre cinemática de rotación.\", Snackbar.LENGTH_LONG).show();\n }",
"private void showUndoSnackbar() {\n View view = ((Activity) this.context).findViewById(R.id.paletteActivity);\n\n Snackbar snackbar = Snackbar.make(view, R.string.undoColorShift,\n Snackbar.LENGTH_LONG);\n\n snackbar.setAction(\"UNDO\", v -> undoChange());\n snackbar.show();\n }",
"private void showSnackBar(String message) {\n if(getActivity()!=null) {\n Snackbar snackbar = Snackbar.make(getActivity().findViewById(android.R.id.content),\n message, Snackbar.LENGTH_SHORT);\n View sbView = snackbar.getView();\n TextView textView = sbView\n .findViewById(android.support.design.R.id.snackbar_text);\n textView.setTextColor(ContextCompat.getColor(getActivity(), R.color.white));\n snackbar.show();\n }\n }",
"public static void showSnackbar(Activity context, String message){\r\n Snackbar.make(context.findViewById(android.R.id.content), message, Snackbar.LENGTH_LONG)\r\n .setAction(\"Dismiss\", new View.OnClickListener(){\r\n @Override\r\n public void onClick(View v){\r\n // Dismisses automatically\r\n }\r\n }).setActionTextColor(context.getResources().getColor(R.color.colorAccent))\r\n .show();\r\n }",
"private void createSnackbar(String message) {\n Snackbar.make(mLayout, message, Snackbar.LENGTH_LONG).show();\n }",
"private void snackBar(String msg) {\n MySnackBar.createSnackBar(Objects.requireNonNull(getContext()), Objects.requireNonNull(getView()), msg);\n }",
"public static void showRedSnackbar(String message, Activity activity, int snackbarDuration) {\n snackbar = Snackbar.make(activity.findViewById(android.R.id.content), message, snackbarDuration);\n View snackbarView = snackbar.getView();\n snackbarView.setBackgroundColor(Color.parseColor(RED));\n\n TextView snackbarText = snackbarView.findViewById(com.google.android.material.R.id.snackbar_text);\n snackbarText.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_vector_cross, 0, 0, 0);\n snackbarText.setCompoundDrawablePadding(ICON_PADDING_SNACKBAR);\n snackbarText.setGravity(Gravity.CENTER);\n\n FrameLayout.LayoutParams params = (FrameLayout.LayoutParams)snackbarView.getLayoutParams();\n params.width = FrameLayout.LayoutParams.MATCH_PARENT;\n snackbarView.setLayoutParams(params);\n\n snackbar.show();\n }",
"public interface OnSnackBarActionListener {\n /**\n * On snack bar action clicked.\n *\n * @param uniqueId the unique id\n * @param view the mView\n */\n void onSnackBarActionClicked(int uniqueId, View view);\n}",
"@Override\n public void onFailure(@NonNull Call<Void> call, @NonNull Throwable t) {\n Snackbar.make(findViewById(R.id.activity_coordinator_layout), t.getLocalizedMessage(), Snackbar.LENGTH_INDEFINITE).show();\n }",
"@Override\n public void onQuedadaCreadaError() {\n btn_publicar.setEnabled(true);\n Snackbar.make(myView,\"Error al crear la quedada\", Snackbar.LENGTH_SHORT).show();\n\n }",
"public static void showSnackBar(Context context, String msg) {\n\n Snackbar.make(((Activity) context).findViewById(android.R.id.content), \"\" + msg, Snackbar.LENGTH_LONG).show();\n }",
"public static void showSnackBar(Context context, LinearLayout mainLayout, String msg, String btnText, int length){\n Resources resources = context.getResources();\n\n Snackbar snackbar = Snackbar\n .make(mainLayout, msg, length )\n .setAction(resources.getText(R.string.ok), new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n }\n });\n\n // Changing message text color\n snackbar.setActionTextColor(ContextCompat.getColor(context, R.color.home_yellow));\n\n // Changing action button text color\n View sbView = snackbar.getView();\n sbView.setBackgroundColor(ContextCompat.getColor(context, R.color.background_edittext));\n\n TextView textView = (TextView) sbView.findViewById(com.google.android.material.R.id.snackbar_text);\n textView.setTextColor(ContextCompat.getColor(context, R.color.edittext_text));\n textView.setMaxLines(5);\n snackbar.show();\n }",
"public static void showGreenSnackbar(String message, Activity activity, int snackbarDuration) {\n snackbar = Snackbar.make(activity.findViewById(android.R.id.content), message, snackbarDuration);\n View snackbarView = snackbar.getView();\n snackbarView.setBackgroundColor(Color.parseColor(GREEN));\n\n TextView snackbarText = snackbarView.findViewById(com.google.android.material.R.id.snackbar_text);\n snackbarText.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_vector_checkmark, 0, 0, 0);\n snackbarText.setCompoundDrawablePadding(ICON_PADDING_SNACKBAR);\n snackbarText.setGravity(Gravity.CENTER);\n\n FrameLayout.LayoutParams params = (FrameLayout.LayoutParams)snackbarView.getLayoutParams();\n params.width = FrameLayout.LayoutParams.MATCH_PARENT;\n snackbarView.setLayoutParams(params);\n\n snackbar.show();\n }",
"public void showHelp() {\n final Snackbar snackBar = Snackbar.make(findViewById(R.id.mapscontainer),\n \"Select a location by clicking the map. Press go to search your categories.\",\n Snackbar.LENGTH_INDEFINITE);\n\n snackBar.setAction(\"Got it!\", new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n snackBar.dismiss();\n }\n })\n .setActionTextColor(Color.WHITE);\n snackBar.show();\n }",
"private SnackbarHelper() {\n\n}",
"public void showToast(String text)\n {\n Text icon = GlyphsDude.createIcon(FontAwesomeIconName.CHECK_CIRCLE,\"1.5em\");\n icon.setFill(Color.WHITE);\n Label l = new Label(text) ;\n l.setTextFill(Color.WHITE);\n l.setGraphic(icon);\n snackbar = new JFXSnackbar(PrinciplePane);\n snackbar.enqueue( new JFXSnackbar.SnackbarEvent(l));\n }",
"private void showPermissionSnackbar() {\n Snackbar.make(\n findViewById(R.id.container), R.string.permission_explanation, Snackbar.LENGTH_LONG)\n .setAction(R.string.permission_explanation_action, new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n requestFineLocationPermission();\n }\n })\n .show();\n }",
"@OnClick(R.id.btnConfirm)\n public void onConfirmClicked(){\n new MaterialAlertDialogBuilder(getActivity(), R.style.MaterialAlertDialog_MaterialComponents_Title_Icon)\n .setTitle(R.string.dialog_confirm_title)\n .setMessage(R.string.card_message_demo_small)\n .setPositiveButton(R.string.dialog_confirm, (dialog, which) -> Toast.makeText(getActivity(),\n R.string.message_action_success, Toast.LENGTH_LONG).show())\n .setNegativeButton(R.string.dialog_cancel, null)\n .show();\n\n }",
"private void SnackShowTop(String message, View view) {\n Snackbar snack = Snackbar.make(view, message, Snackbar.LENGTH_LONG);\n View view_layout = snack.getView();\n FrameLayout.LayoutParams params = (FrameLayout.LayoutParams) view_layout.getLayoutParams();\n params.gravity = Gravity.TOP;\n view_layout.setLayoutParams(params);\n snack.show();\n }",
"@Override\n public void run() {\n snackbar.setVisibility(View.GONE); //This will remove the View. and free s the space occupied by the View\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n String message = String.valueOf(guardiansName.get(position));\n clickedGuardian = new String[]\n {String.valueOf(guardiansPhone.get(position)),\n String.valueOf(guardiansName.get(position)),};\n snackbar = Snackbar.make(getActivity().findViewById(R.id.myCoordinatorLayout), message, Snackbar.LENGTH_LONG);\n snackbar.setAction(R.string.Update, new UpdateGuardian());\n snackbar.show();\n }",
"public void showNotification(String notificationText) {\n View parentLayout = findViewById(android.R.id.content);\n Snackbar mySnackbar = Snackbar.make(parentLayout, notificationText, Snackbar.LENGTH_LONG);\n mySnackbar.show();\n }",
"void showToast(String message);",
"void showToast(String message);",
"@Override\n public void onSuccess(Void unused) {\n Snackbar.make(save, R.string.sucessfull_update, BaseTransientBottomBar.LENGTH_SHORT).show();\n }",
"protected void showMessage(@NonNull final String message) {\n SnackbarManager.show(Snackbar.with(this).text(message).colorResource(R.color.blende_red).swipeToDismiss(true));\n }",
"void showForbiddenErrorSnackbar();",
"public static void showWarningSnackBar(View layout, String text) {\n Snackbar s = Snackbar.make(layout, text, Snackbar.LENGTH_INDEFINITE);\n s.setAction(\"Retry\", v -> {\n s.dismiss();\n });\n s.show();\n }",
"private void showDeletedSnackbar() {\n Snackbar.make(parent, \"Selected \" + getTypeDescription() + \" deleted.\", Snackbar.LENGTH_LONG)\n .setAction(\"Undo\", new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (previouslyDeletedItems.size() > 0) {\n // Re-add the items and update the list.\n listDao.insertRows(previouslyDeletedItems);\n reloadData();\n }\n }\n })\n .show();\n }",
"private void muestraMensaje(int idMensaje) {\n final Snackbar snack=Snackbar.make(mLayout,idMensaje,Snackbar.LENGTH_LONG).\n setAction(R.string.texto_cerrar, v -> {\n // No necesitamos hacer nada, solo que se cierre\n });\n snack.show();\n }",
"@Override\n public void onClick(View v) {\n\n\n Toast.makeText(MainSOSActivity.this, \"Stay Safe and Confirm the Message!\", Toast.LENGTH_SHORT).show();\n\n }",
"public void showErrorMessage(){\n Toast.makeText(context, R.string.generic_error_message, Toast.LENGTH_LONG).show();\n }",
"@Override\n\t\tpublic void onClick(View arg0) {\n\t\t\tAlertDialog fuck = builder.create();\n\t\t\tfuck.show();\n\t\t}",
"protected void showTopSnackBar(String message, int bColor) {\n\n Snackbar snack = Snackbar.make(getWindow().getDecorView().findViewById(android.R.id.content), message, Snackbar.LENGTH_LONG);\n View snackbarView = snack.getView();\n snackbarView.setBackgroundColor(bColor);\n// TextView textView = (TextView) snackbarView.findViewById(com.androidadvance.topsnackbar.R.id.snackbar_text);\n// textView.setTextColor(Color.WHITE);\n// textView.setGravity(Gravity.CENTER_HORIZONTAL);\n// FrameLayout.LayoutParams params =(FrameLayout.LayoutParams)snackbarView.getLayoutParams();\n// params.gravity = Gravity.TOP;\n// snackbarView.setLayoutParams(params);\n snack.show();\n }",
"@Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n Snackbar.make(findViewById(R.id.actie_add), \"Database kan niet gelezen worden\", Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n }",
"public void showWarningMessage(View view){\n\n //Show popup to warn user about the entered start and destiantion Addresses\n builder = new AlertDialog.Builder(this);\n //Setting message manually and performing action on button click\n builder.setMessage(\"Please insert a start and a destination address!\")\n .setCancelable(false)\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // finish();\n Toast.makeText(getApplicationContext(),\"you choose yes action for the warning popup\",\n Toast.LENGTH_SHORT).show();\n }\n });\n /* .setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // Action for 'NO' Button\n dialog.cancel();\n Toast.makeText(getApplicationContext(),\"you choose no action for for the warning popup\",\n Toast.LENGTH_SHORT).show();\n }\n } );*/\n //Creating dialog box\n AlertDialog alert = builder.create();\n //Setting the title manually\n alert.setTitle(\"WARNING!\");\n alert.show();\n }",
"public void showMessage(String msg){\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();\n }",
"@Override\n public void onClick(View v) {\n\n\n Toast.makeText(MainSOSActivity.this, \"Stay Safe and Confirm the Message! Your emergnecy conctacts will be notified!\", Toast.LENGTH_SHORT).show();\n\n }",
"public void add(View view){\n displayAlertDialog();\n\n }",
"@Override\n public void onClick(View v) {\n limpiarCampos();\n if (validacion()) {//ejecuta la funcion validacion\n guardar_login();\n\n } else {\n Snackbar.make(findViewById(android.R.id.content), \"Faltan completar campos \",\n Snackbar.LENGTH_LONG)\n .setDuration(3000)\n .show();\n\n\n }\n }",
"public void displaySnackBar(View layout,int message,int bgcolor){\n Snackbar snack=null;\n View snackView;\n\n if(message == com.ibeis.wildbook.wildbook.R.string.offline)\n snack=Snackbar.make(layout,message,Snackbar.LENGTH_INDEFINITE);\n else\n snack=Snackbar.make(layout,message,Snackbar.LENGTH_SHORT);\n snackView = snack.getView();\n snackView.setBackgroundColor(bgcolor);\n snack.show();\n }",
"private void editPoint() {\n Snackbar.make(coordinatorLayout, R.string.feature_not_available, Snackbar.LENGTH_SHORT).show();\n }",
"@Override\n public void onClick(View view) {\n clearDisplay();\n table.setVisibility(View.INVISIBLE);\n saveButton.setVisibility(View.INVISIBLE);\n cancelButton.setVisibility(View.INVISIBLE);\n Snackbar snackbar = Snackbar.make(view, R.string.cancelled, Snackbar.LENGTH_SHORT);\n snackbar.show();\n }",
"void showErrorSnackbar(long syncInterval) {\r\n // Initialize the the parameters that will be used to create the String message\r\n int timePassed;\r\n String timeUnit;\r\n if (syncInterval < DAY_IN_SECONDS) {\r\n // If less than a day has passed, convert the number of seconds to hours\r\n timePassed = (int) (syncInterval / HOUR_IN_SECONDS);\r\n\r\n // Set the time unit to singular or multiple\r\n if (timePassed == 1) {\r\n timeUnit = getString(R.string.hour_singular);\r\n } else {\r\n timeUnit = getString(R.string.hour_multiple);\r\n }\r\n\r\n } else {\r\n // Convert the time passed to days\r\n timePassed = (int) (syncInterval / DAY_IN_SECONDS);\r\n\r\n // Set the time unit to singular or multiple\r\n if (timePassed == 1) {\r\n timeUnit = getString(R.string.day_singular);\r\n } else {\r\n timeUnit = getString(R.string.day_multiple);\r\n }\r\n }\r\n\r\n // Create the String message to display to the user to notify them of how long\r\n // since the last sync\r\n String timeString = getString(R.string.error_last_sync, timePassed + \" \" + timeUnit);\r\n\r\n // Create a Snackbar to hold the message\r\n mSnackBar = Snackbar.make(mDrawerLayout,\r\n timeString,\r\n Snackbar.LENGTH_INDEFINITE\r\n );\r\n\r\n // Set the Snackbar to be dismissed on click\r\n mSnackBar.getView().setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View view) {\r\n mSnackBar.dismiss();\r\n }\r\n });\r\n\r\n // Show the Snackbar\r\n mSnackBar.show();\r\n }",
"private void showErrorToast() {\n }",
"@Override public void onClick(View v) {\n Snackbar.make(groupViewHolder.itemView, \"Group was toggled\", Snackbar.LENGTH_SHORT).show();\n }",
"@Override\n public void onFailure(IMqttToken asyncActionToken, Throwable exception) {\n Snackbar.make(v, \"断开失败...\", Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n\n }",
"void showAlert(String message);",
"public void showToast(String msg){\n Toast.makeText(this, msg, Toast.LENGTH_SHORT).show();\n }",
"public void showErrorMessage(String message){\n Toast.makeText(context, message, Toast.LENGTH_LONG).show();\n }",
"public void toastKickoff(String message) {\n Toast.makeText(this, message, Toast.LENGTH_LONG).show();\n }",
"private void msg(String s)\n {\n Toast.makeText(getApplicationContext(),s,Toast.LENGTH_LONG).show();\n }",
"private void msg(String s)\n {\n Toast.makeText(getApplicationContext(),s,Toast.LENGTH_LONG).show();\n }",
"@Override\n public void onClick(View view) {\n createServer();\n Snackbar.make(view, \"Adding server done\", Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n\n }",
"private void showMessage(String msg) {\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();\n }",
"@Override\n public void onFailure(@NonNull @NotNull Exception e) {\n Snackbar.make(save, R.string.update_fail, BaseTransientBottomBar.LENGTH_SHORT).show();\n }",
"protected void showToast(String message) {\n\tToast.makeText(this, message, Toast.LENGTH_SHORT).show();\n}",
"@Override\n public void onClick(View view) {\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\n builder.setTitle(\"Discount Code\");\n builder.setMessage(\"Use this code : \" + dis.getDiscountID());\n builder.setIcon(android.R.drawable.ic_input_get); //Delete Icon\n builder.setPositiveButton(\"OK\",null);\n builder.show();\n }",
"private void showToastRequired(String message) {\n Toast.makeText(this, getString(R.string.validation_required, message),\n Toast.LENGTH_SHORT).show();\n }",
"@Override\n public void showError(@StringRes int messageId, @Nullable Object... args) {\n if (getView() != null) {\n //When we have the root view\n\n //Evaluating the message to be shown\n String messageToBeShown;\n if (args != null && args.length > 0) {\n //For the String Resource with args\n messageToBeShown = getString(messageId, args);\n } else {\n //For the String Resource without args\n messageToBeShown = getString(messageId);\n }\n\n if (!TextUtils.isEmpty(messageToBeShown)) {\n //Displaying the Snackbar message of indefinite time length\n //when we have the error message to be shown\n\n new SnackbarUtility(Snackbar.make(getView(), messageToBeShown, Snackbar.LENGTH_INDEFINITE))\n .revealCompleteMessage() //Removes the limit on max lines\n .setDismissAction(R.string.snackbar_action_ok) //For the Dismiss \"OK\" action\n .showSnack();\n }\n }\n }",
"private void showToast(String msg) {\n Toast.makeText(getBaseContext(), msg, Toast.LENGTH_LONG).show();\n }",
"private void createSnack() {\n }",
"private void showToast(String msg) {\r\n Toast.makeText(Imprimir.this, msg, Toast.LENGTH_LONG).show();\r\n }",
"private void showErrorView() {\n Log.d(\"lodd\", \"showSuccessView: hjfj91919515\");\n\n }",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\r\n\t\t\r\n\t\t\t\tToast.makeText(getApplicationContext(), \"등록완료\", Toast.LENGTH_SHORT).show();\r\n\t\t\t\r\n\t\t\t\t\t \r\n\t\t\t}",
"private void msg(String s) {\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_LONG).show();\n }",
"private void msg(String s) {\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_LONG).show();\n }",
"private void msg(String s) {\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_LONG).show();\n }",
"private void exibe_mensagem(String msg){\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();\n }",
"@Override\n public void onErrorResponse(VolleyError volleyError) {\n progressDialog.dismiss();\n\n // Showing error message if something goes wrong.\n Snackbar snackbar = Snackbar\n .make(coordinatorLayout, \"No internet connection!\", Snackbar.LENGTH_LONG)\n .setAction(\"RETRY\", new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n }\n });\n\n // Changing message text color\n snackbar.setActionTextColor(Color.RED);\n\n // Changing action button text color\n View sbView = snackbar.getView();\n TextView textView = (TextView) sbView.findViewById(android.support.design.R.id.snackbar_text);\n textView.setTextColor(Color.YELLOW);\n\n snackbar.show();\n }",
"public void toast (String msg)\n\t{\n\t\tToast.makeText (getApplicationContext(), msg, Toast.LENGTH_SHORT).show ();\n\t}",
"void showToast(String value);",
"@Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n Snackbar.make(findViewById(R.id.actie_add), \"Database kan niet gelezen worden\", Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n }",
"public static void showSnack(final Context context, View view, boolean isConnected) {\n if (snackbar == null) {\n snackbar = Snackbar\n .make(view, context.getString(R.string.network_failure), Snackbar.LENGTH_INDEFINITE)\n .setAction(\"SETTINGS\", new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent = new Intent(android.provider.Settings.ACTION_SETTINGS);\n context.startActivity(intent);\n }\n });\n View sbView = snackbar.getView();\n TextView textView = sbView.findViewById(android.support.design.R.id.snackbar_text);\n textView.setTextColor(Color.WHITE);\n }\n\n if (!isConnected && !snackbar.isShown()) {\n snackbar.show();\n } else {\n snackbar.dismiss();\n snackbar = null;\n }\n }",
"private void makeToast(String message){\n Toast.makeText(SettingsActivity.this, message, Toast.LENGTH_LONG).show();\n }",
"@Override\n protected void notifyUserOnPlayServicesErrorDialogCancelled() {\n final View rootView = findViewById(R.id.root_layout);\n if (rootView == null) return;\n Snackbar.make(rootView, R.string.google_play_services_error, Snackbar.LENGTH_LONG)\n .show();\n }",
"void showOthersActions(String message);",
"public void showMessageDialog(int id, String caption, String message)\n{\n MessageDialog.newInstance(id, caption, message, this)\n .show(getFragmentManager(), \"\");\n}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch (id) {\n case R.id.action_settings:\n Toast.makeText(this, \"Goto Settings\", Toast.LENGTH_SHORT).show();\n return true;\n case R.id.action_call:\n call();\n return true;\n case R.id.action_photo:\n //Some view that is inside the coordinator layout\n //Snackbar.make(toolbar, \"Hi, Snack\", BaseTransientBottomBar.LENGTH_LONG/*view:?*/).show();\n takePicture();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tmsg();\n\t\t\t}",
"@Override\n public void onClick(View v) {\n\n Toast toast = Toast.makeText(getApplicationContext(), \"Coming soon.\", Toast.LENGTH_SHORT);\n toast.show();\n\n }",
"private void showMessage(String message) {\n Toast.makeText(getApplicationContext(),message, Toast.LENGTH_LONG).show();\n }",
"void toast(int resId);",
"public void onClickShowAlert(View view) {\n AlertDialog.Builder myAlertBuilder = new\n AlertDialog.Builder(MainActivity.this);\n // Set the dialog title and message.\n myAlertBuilder.setTitle(\"Alert\");\n myAlertBuilder.setMessage(\"Click OK to continue, or Cancel to stop:\");\n // Add the dialog buttons.\n myAlertBuilder.setPositiveButton(\"OK\", new\n DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // User clicked OK button.\n Toast.makeText(getApplicationContext(), \"Pressed OK\",\n Toast.LENGTH_SHORT).show();\n }\n });\n myAlertBuilder.setNegativeButton(\"Cancel\", new\n DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // User cancelled the dialog.\n Toast.makeText(getApplicationContext(), \"Pressed Cancel\",\n Toast.LENGTH_SHORT).show();\n }\n });\n // Create and show the AlertDialog.\n myAlertBuilder.show();\n }",
"public void apply(View v) {\n String sound = soundSpinner.getSelectedItem().toString();\n\n Snackbar.make(v, \"Piano sound set to \" + sound, Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n }",
"private void showErrorDialog(){\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n builder.setTitle(getString(R.string.booking_not_created));\n builder.setMessage(getString(R.string.customer_already_has_active_booking_error));\n builder.setIcon(R.drawable.ic_error_black_24dp);\n builder.setCancelable(false);\n // When users confirms dialog, close the activity\n builder.setPositiveButton(android.R.string.ok, (dialog, which) -> {\n // Close the Activity..\n finish();\n });\n\n AlertDialog dialog = builder.create();\n dialog.setCanceledOnTouchOutside(false);\n dialog.show();\n\n // Change button colors\n Button positiveButton = dialog.getButton(AlertDialog.BUTTON_POSITIVE);\n positiveButton.setTextColor(getColor(R.color.colorPrimary));\n }",
"@Override\r\n\t\t\t\t\t\tpublic void failed(final String message) {\n\t\t\t\t\t\t\tact.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\tact.showToast(message);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t}",
"@Override\r\n\t\t\t\t\t\tpublic void failed(final String message) {\n\t\t\t\t\t\t\tact.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\tact.showToast(message);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t}",
"public static void showAlert(String message, Activity context) {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\n builder.setMessage(message).setCancelable(false)\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n\n }\n });\n try {\n builder.show();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"private void showToast(String message){\n\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n }",
"@Override\n\t\t\tpublic void onClick(View view) {\n\t\t\t\taddAlert(\"Fake Test Alert\");\n\t\t\t}",
"private void toastMessage(String message){\n Toast.makeText(this,message, Toast.LENGTH_SHORT).show();\n }",
"private void toastMessage(String message){\n Toast.makeText(this,message, Toast.LENGTH_SHORT).show();\n }"
]
| [
"0.77849233",
"0.73431313",
"0.7312924",
"0.7308021",
"0.71119523",
"0.70179576",
"0.6977823",
"0.693279",
"0.6817242",
"0.67794555",
"0.6773066",
"0.6769153",
"0.66969097",
"0.66901416",
"0.6535203",
"0.6526453",
"0.6526107",
"0.64990896",
"0.64981586",
"0.64537144",
"0.6414112",
"0.6353503",
"0.63491523",
"0.63199466",
"0.62861925",
"0.62444884",
"0.6190119",
"0.6170965",
"0.60915434",
"0.60613513",
"0.60370207",
"0.60370207",
"0.6026477",
"0.60116327",
"0.60113347",
"0.59772587",
"0.5974466",
"0.5961024",
"0.5951459",
"0.5934618",
"0.59216684",
"0.59014606",
"0.58802205",
"0.5866932",
"0.5855753",
"0.5846594",
"0.58317906",
"0.5826703",
"0.58245504",
"0.58212996",
"0.58109486",
"0.58045375",
"0.5782853",
"0.5769242",
"0.5732181",
"0.57166815",
"0.56946087",
"0.56927806",
"0.5691514",
"0.5677267",
"0.5677267",
"0.5663041",
"0.5662116",
"0.5655578",
"0.5649917",
"0.56457543",
"0.5636932",
"0.5631419",
"0.5627016",
"0.5623042",
"0.5622759",
"0.5617016",
"0.561286",
"0.5607505",
"0.5607505",
"0.5607505",
"0.55998355",
"0.5599323",
"0.55850863",
"0.5582139",
"0.5581274",
"0.55793315",
"0.5576287",
"0.5574755",
"0.5573701",
"0.55664074",
"0.5560323",
"0.5559148",
"0.55500984",
"0.5546177",
"0.55244446",
"0.5516881",
"0.5513321",
"0.5512136",
"0.5509982",
"0.5509982",
"0.5508461",
"0.5507319",
"0.55069315",
"0.5506873",
"0.5506873"
]
| 0.0 | -1 |
Returns the enum value for a string, or null if none. | public static Enum forString(java.lang.String s)
{ return (Enum)table.forString(s); } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static RecordStatusEnum get(String string) {\n if (string == null) {\n return null;\n }\n try {\n Integer id = Integer.valueOf(string);\n RecordStatusEnum enumeration = getById(id);\n if (enumeration != null) {\n return enumeration;\n }\n }\n catch (Exception e) {\n // ignore\n }\n return getByLabel(string);\n }",
"public static DataStructure getEnum(String s) {\n for (DataStructure e : DataStructure.values())\n if (e.getString().equals(s))\n return e;\n return NONE;\n }",
"public static EnumCardNumber fromString(String s) {\r\n\t\ttry {\r\n\t\t\tInteger index = Integer.parseInt(s);\r\n\t\t\treturn getNumbers().get(index - 1);\r\n\t\t} catch (Exception e) {\r\n\t\t\tswitch (s.toLowerCase()) {\r\n\t\t\tcase \"one\":\r\n\t\t\t\treturn ONE;\r\n\t\t\tcase \"two\":\r\n\t\t\t\treturn TWO;\r\n\t\t\tcase \"three\":\r\n\t\t\t\treturn THREE;\r\n\t\t\tcase \"four\":\r\n\t\t\t\treturn FOUR;\r\n\t\t\tcase \"five\":\r\n\t\t\t\treturn FIVE;\r\n\t\t\tcase \"six\":\r\n\t\t\t\treturn SIX;\r\n\t\t\tcase \"seven\":\r\n\t\t\t\treturn SEVEN;\r\n\t\t\tcase \"eight\":\r\n\t\t\t\treturn EIGHT;\r\n\t\t\tcase \"nine\":\r\n\t\t\t\treturn NINE;\r\n\t\t\tcase \"ten\":\r\n\t\t\t\treturn TEN;\r\n\t\t\tcase \"jack\":\r\n\t\t\t\treturn JACK;\r\n\t\t\tcase \"king\":\r\n\t\t\t\treturn KING;\r\n\t\t\tcase \"queen\":\r\n\t\t\t\treturn QUEEN;\r\n\t\t\tcase \"ace\":\r\n\t\t\t\treturn ACE;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}",
"public static Enum forString(java.lang.String s)\r\n { return (Enum)table.forString(s); }",
"public static Enum forString(java.lang.String s)\n { return (Enum)table.forString(s); }",
"public static Enum forString(java.lang.String s)\n { return (Enum)table.forString(s); }",
"public static BasicEnum fromString(String s)\n {\n for (int i = 0; i < _ENUMERATION_NAMES.length; i++)\n {\n if (_ENUMERATION_NAMES[i].equals(s))\n {\n return _ENUMERATIONS[i];\n }\n }\n return null;\n }",
"public static EventType fromString(String s) {\n if (s != null) {\n EventType[] vs = values();\n for (int i = 0; i < vs.length; i++) {\n if (vs[i].toString().equalsIgnoreCase(s)) {\n return vs[i];\n }\n }\n }\n return null;\n }",
"public static TransactionType getEnumFromString(String string) {\n for (TransactionType transactionType : TransactionType.values()) {\n if (transactionType.getTransactionType().equals(string)) {\n return transactionType;\n }\n }\n\n throw new UnsupportedOperationException(\"Zadali ste chybný názov transakcie\");\n }",
"public static StatusType get(String literal) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tStatusType result = VALUES_ARRAY[i];\n\t\t\tif (result.toString().equals(literal)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public static FieldType fromString(String s) \n {\n if (s!=null) \n for (FieldType t : FieldType.values())\n if (s.equalsIgnoreCase(t.name))\n return t;\n \n return null;\n }",
"public static String valueOfOrDefault(String myValue) {\n\t\t String value=myValue.toUpperCase().replaceAll(\"\\\\s\", \"_\");\r\n\t\t for(RegioneItaliana type : RegioneItaliana.class.getEnumConstants()) {\r\n\t\t if(type.name().equalsIgnoreCase(value)) {\r\n\t\t return type.toString();\r\n\t\t }\r\n\t\t }\r\n\t\t return myValue;\r\n\t\t }",
"public static Obj enumType(String type) {\n\t\tif ((type != null) && !type.isEmpty() && (StrObj.containsKey(type)))\n\t\t\treturn StrObj.get(type);\n\t\telse\n\t\t\treturn Obj.UNKOBJ;\n\t}",
"public static SheetTraitEnum get(String literal) {\r\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\r\n\t\t\tSheetTraitEnum result = VALUES_ARRAY[i];\r\n\t\t\tif (result.toString().equals(literal)) {\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public static int getValue(String string){\n for (ItemAttributeEnum item : ItemAttributeEnum.values()) {\n if (string.equals(item.toString())){\n return item.intValue;\n }\n }\n return -1;\n }",
"private ScalarEnum getInputType(final String inputType) {\n String temp = inputType.replaceAll(\"-\", \"_\");\n INPUT_TYPE answer = Arrays.stream(\n INPUT_TYPE.values()\n )\n .filter(value -> value.name().equals(temp))\n .findFirst()\n .orElse(INPUT_TYPE.unknown);\n return answer.getScalar();\n }",
"@SuppressWarnings({\"unchecked\", \"deprecation\"})\n protected static <T extends ExpandableStringEnum<T>> T fromString(String name, Class<T> clazz) {\n if (name == null) {\n return null;\n }\n\n ConcurrentHashMap<String, ?> clazzValues = VALUES.computeIfAbsent(clazz, key -> new ConcurrentHashMap<>());\n T value = (T) clazzValues.get(name);\n\n if (value != null) {\n return value;\n } else {\n MethodHandle ctor = CONSTRUCTORS.computeIfAbsent(clazz, ExpandableStringEnum::getDefaultConstructor);\n\n if (ctor == null) {\n // logged in ExpandableStringEnum::getDefaultConstructor\n return null;\n }\n\n try {\n value = (T) ctor.invoke();\n } catch (Throwable e) {\n LOGGER.warning(\"Failed to create {}, default constructor threw exception\", clazz.getName(), e);\n return null;\n }\n\n return value.nameAndAddValue(name, value, clazz);\n }\n }",
"private static DirType getEnum(String name) {\n\t\t\t//Find provided string in directions map.\n\t\t\tDirType direction = directions.get(name.toUpperCase());\n\t\t\tif (direction == null) {\n\t\t\t\tdirection = DirType.NONE;\n\t\t\t}\n\t\t\treturn direction;\n\t\t}",
"private static ContextLabel stringToContextLabel(String s)\n {\n \tfor (ContextLabel enumVal : ContextLabel.values())\n \t{\n \t\tif (enumVal.toString().equals(s))\n \t\t\treturn enumVal;\n \t}\n \t\n \t// in case of failure\n \treturn ContextLabel.UNKNOWN;\n }",
"public static Direction getValue(String val) {\n for (Direction e : Direction.values()) {\n if (e.direction.equals(val)) {\n return e;\n }\n }\n return null;// not found\n }",
"public static State fromString(String s) {\n if (s != null) {\n State[] vs = values();\n for (int i = 0; i < vs.length; i++) {\n if (vs[i].toString().equalsIgnoreCase(s)) {\n return vs[i];\n }\n }\n }\n return null;\n }",
"public void testNullEnum () {\n\t\tString example = null;\n\t\ttry {\n\t\t AppInterfaceUnregisteredReason temp = AppInterfaceUnregisteredReason.valueForString(example);\n assertNull(\"Result of valueForString should be null.\", temp);\n\t\t}\n\t\tcatch (NullPointerException exception) {\n fail(\"Null string throws NullPointerException.\");\n\t\t}\n\t}",
"public void testNullEnum () {\n\t\tString example = null;\n\t\ttry {\n\t\t ECallConfirmationStatus temp = ECallConfirmationStatus.valueForString(example);\n assertNull(\"Result of valueForString should be null.\", temp);\n\t\t}\n\t\tcatch (NullPointerException exception) {\n fail(\"Null string throws NullPointerException.\");\n\t\t}\n\t}",
"public static Enum getRole(String s){\n for(Roles roles : Roles.values()) {\n if(roles.toString().equalsIgnoreCase(s)){\n return roles;\n }\n }\n return GUEST;\n }",
"public static Resource_kind get(String literal) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tResource_kind result = VALUES_ARRAY[i];\n\t\t\tif (result.toString().equals(literal)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public static ChannelType getChannelTypeByString(String type) {\n for (ChannelType tmp : ChannelType.values()) {\n if (type.equalsIgnoreCase(tmp.name())) {\n return tmp;\n }\n }\n return null;\n }",
"public static grms_schema.types.LocalrmnameType valueOf(\n java.lang.String string) {\n java.lang.Object obj = null;\n\n if (string != null) {\n obj = _memberTable.get(string);\n }\n\n if (obj == null) {\n String err = \"'\" + string + \"' is not a valid LocalrmnameType\";\n throw new IllegalArgumentException(err);\n }\n\n return (LocalrmnameType) obj;\n }",
"public static PortType get(String literal)\n {\n for (int i = 0; i < VALUES_ARRAY.length; ++i)\n {\n PortType result = VALUES_ARRAY[i];\n if (result.toString().equals(literal))\n {\n return result;\n }\n }\n return null;\n }",
"@Override\n\tpublic Object valueOf(String arg0) {\n\t\treturn null;\n\t}",
"public static CommandEnum stringToEnum(String commandEnum) {\n if (lookup.containsKey(commandEnum)) {\n return lookup.get(commandEnum);\n } else {\n return CommandEnum.INVALID;\n }\n }",
"public void testNullEnum () {\n\t\tString example = null;\n\t\ttry {\n\t\t\tRadioBand temp = RadioBand.valueForString(example);\n assertNull(\"Result of valueForString should be null.\", temp);\n\t\t}\n\t\tcatch (NullPointerException exception) {\n fail(\"Null string throws NullPointerException.\");\n\t\t}\n\t}",
"private static TransitionType getTransitionType(String s)\n\t{\n\t\tfor (int i=0; i<transitionTypes.size(); i++)\n\t\t{\n\t\t\tif (transitionTypes.get(i).name.equals(s)) return transitionTypes.get(i);\n\t\t}\n\n\t\treturn null;\n\t}",
"public static APIVersionType get(String literal) {\n for (int i = 0; i < VALUES_ARRAY.length; ++i) {\n APIVersionType result = VALUES_ARRAY[i];\n if (result.toString().equals(literal)) {\n return result;\n }\n }\n return null;\n }",
"private static ContextType stringToContextType(String s) \n {\n for (ContextType enumVal : ContextType.values())\n {\n if (enumVal.toString().equals(s))\n return enumVal;\n }\n \n // in case of failure:\n return ContextType.UNKNOWN;\n }",
"public static StatusType getByName(String name) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tStatusType result = VALUES_ARRAY[i];\n\t\t\tif (result.getName().equals(name)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public static DatabaseType getDatabaseType(final String s) {\n DatabaseType e = STRINGTOENUM.get(s);\n if (e != null) return e;\n\n for (final String dispval : STRINGTOENUM.keySet()) {\n if (dispval.equalsIgnoreCase(s))\n return STRINGTOENUM.get(dispval);\n }\n\n return null;\n }",
"public Enum<?> findEnum(final String key) {\n Enum<?> en = _enumsById.get(key);\n if (en == null) {\n if (_isIgnoreCase) {\n return _findEnumCaseInsensitive(key);\n }\n }\n return en;\n }",
"public static MessageStatus get(String literal) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tMessageStatus result = VALUES_ARRAY[i];\n\t\t\tif (result.toString().equals(literal)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public java.lang.String getEnumSkillName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ENUMSKILLNAME$8);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"@Override\n\tObject getValue() {\n\t try {\n\t\tObject value = getField.get(object);\n\t\tif (value instanceof Enum)\n\t\t return value.toString();\n\t\treturn value;\n\t }\n\t catch (IllegalAccessException ex) {\n\t\treturn null;\n\t }\n\t}",
"public static CoverageType get(String literal) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tCoverageType result = VALUES_ARRAY[i];\n\t\t\tif (result.toString().equals(literal)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public void testInvalidEnum () {\n\t\tString example = \"noRMal\";\n\t\ttry {\n\t\t ECallConfirmationStatus temp = ECallConfirmationStatus.valueForString(example);\n assertNull(\"Result of valueForString should be null.\", temp);\n\t\t}\n\t\tcatch (IllegalArgumentException exception) {\n fail(\"Null string throws NullPointerException.\");\n\t\t}\n\t}",
"private PatternType matchPatternEnum(String s){\n s = s.toLowerCase();\n switch(s){\n case \"factory method\":\n return PatternType.FACTORY_METHOD;\n case \"prototype\":\n return PatternType.PROTOTYPE;\n case \"singleton\":\n return PatternType.SINGLETON;\n case \"(object)adapter\":\n return PatternType.OBJECT_ADAPTER;\n case \"command\":\n return PatternType.COMMAND;\n case \"composite\":\n return PatternType.COMPOSITE;\n case \"decorator\":\n return PatternType.DECORATOR;\n case \"observer\":\n return PatternType.OBSERVER;\n case \"state\":\n return PatternType.STATE;\n case \"strategy\":\n return PatternType.STRATEGY;\n case \"bridge\":\n return PatternType.BRIDGE;\n case \"template method\":\n return PatternType.TEMPLATE_METHOD;\n case \"visitor\":\n return PatternType.VISITOR;\n case \"proxy\":\n return PatternType.PROXY;\n case \"proxy2\":\n return PatternType.PROXY2;\n case \"chain of responsibility\":\n return PatternType.CHAIN_OF_RESPONSIBILITY;\n default:\n System.out.println(\"Was not able to match pattern with an enum. Exiting because this should not happen\");\n System.exit(0);\n\n }\n //should never get here because we exit on the default case\n return null;\n }",
"public static Direction fromString(String direction){\n if (direction != null){\n for (Direction d : Direction.values()){\n if (d.toString().equalsIgnoreCase(direction))\n return d;\n }\n }\n return null;\n }",
"public void testNullEnum () {\n\t\tString example = null;\n\t\ttry {\n\t\t SamplingRate temp = SamplingRate.valueForString(example);\n assertNull(\"Result of valueForString should be null.\", temp);\n\t\t}\n\t\tcatch (NullPointerException exception) {\n fail(\"Null string throws NullPointerException.\");\n\t\t}\n\t}",
"public static UserRole fromString(String str) {\n\t\tfor (UserRole role : values()) {\n\t\t\tif (role.name.equalsIgnoreCase(str)) {\n\t\t\t\treturn role;\n\t\t\t}\n\t\t}\n\t\treturn null; // not found\n\t}",
"public String getEnum() {\n if (model == null)\n return strEnum;\n return model.getEnum();\n }",
"private TYPE getType(final String type) {\n String temp = type.replaceAll(\"-\", \"_\");\n TYPE answer = Arrays.stream(\n TYPE.values()\n )\n .filter(value -> value.name().equals(temp))\n .findFirst()\n .orElse(TYPE.unknown);\n return answer;\n }",
"public static OperationType stateOf(String state) {\n for (OperationType stateEnum : values()) {\n if (stateEnum.getOperation().equals(state)) {\n return stateEnum;\n }\n }\n return null;\n }",
"public static InterfaceModeType get(String literal) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tInterfaceModeType result = VALUES_ARRAY[i];\n\t\t\tif (result.toString().equals(literal)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public static CurveCharKind get(String literal) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tCurveCharKind result = VALUES_ARRAY[i];\n\t\t\tif (result.toString().equals(literal)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public static String decode(String str){\r\n\t\treturn HtmlCodec.DefaultChar2ENUM.decode(str);\r\n\t}",
"java.lang.String getStringValue();",
"java.lang.String getStringValue();",
"public static Enum<?> findMatchingEnumVal(Field field, String unknownEnumName) {\n if (unknownEnumName == null || unknownEnumName.length() == 0) {\n return null;\n }\n for (Enum<?> enumVal : (Enum<?>[]) field.getType().getEnumConstants()) {\n if (enumVal.name().equals(unknownEnumName)) {\n return enumVal;\n }\n }\n throw new IllegalArgumentException(\"Unknwown enum unknown name \" + unknownEnumName + \" for field \" + field);\n }",
"@Override\n public T convert(String source, Class<T> enumType, T defaultTarget) {\n // If source is null or empty, defaultTarget is returned\n if (source == null || source.isEmpty()) {\n return defaultTarget;\n }\n try {\n // Try to get the enum constant with the specified name\n return (T) Enum.valueOf(enumType, source.trim().toUpperCase());\n } catch (IllegalArgumentException iae) {\n // If no matching enum constant is found, an exception is\n // thrown and defaultTarget is returned\n return defaultTarget;\n }\n }",
"org.hl7.fhir.String getValueString();",
"public static TripStatus fromString(String str) {\n\t\tfor (TripStatus status : values()) {\n\t\t\tif (StringUtils.equalsIgnoreCase(status.name, str)) {\n\t\t\t\treturn status;\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"public static TaskStatus fromString(String text) {\n for (TaskStatus taskStatus : TaskStatus.values()) {\n if (taskStatus.status.equalsIgnoreCase(text)) {\n return taskStatus;\n }\n }\n return null;\n }",
"public static CriterionOperatorEnum getByValue(String value) {\n checkType(value);\n return getValueToTypeMap().get(value);\n }",
"public static AssociationKind get(String literal) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tAssociationKind result = VALUES_ARRAY[i];\n\t\t\tif (result.toString().equals(literal)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"com.yahoo.xpathproto.TransformTestProtos.MessageEnum getEnumValue();",
"public static BioRelTypes getRelationshipType(String str, String pattern) {\n if (str.contains(pattern)) { \n String str1 = str.split(pattern)[0].toUpperCase().trim();\n log.info(\"str1 =\" + str1);\n return BioRelTypes.getEnum(str1);\n }\n return null;\n }",
"public static CommandEnum getCommand(String theString) {\n return validCommands.get(theString);\n }",
"public static SimulationType getSimulationType(String str) {\n for(SimulationType type: SimulationType.values()) {\n if(type.name().equalsIgnoreCase(str)) {\n return type;\n }\n }\n return null;\n }",
"public T caseCharEnum(CharEnum object)\n {\n return null;\n }",
"public static EndpointType get(String literal) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tEndpointType result = VALUES_ARRAY[i];\n\t\t\tif (result.toString().equals(literal)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"private static String getFaction(String string) {\r\n\t\tString faction = \"Нейтрал\";\r\n\t\tswitch (string) {\r\n\t\tcase \"2\":\r\n\t\t\tfaction = factions[0];\r\n\t\t\tbreak;\r\n\t\tcase \"3\":\r\n\t\t\tfaction = factions[1];\r\n\t\t\tbreak;\r\n\t\tcase \"4\":\r\n\t\t\tfaction = factions[2];\r\n\t\t\tbreak;\r\n\t\tcase \"5\":\r\n\t\t\tfaction = factions[3];\r\n\t\t\tbreak;\r\n\t\tcase \"6\":\r\n\t\t\tfaction = factions[4];\r\n\t\t}\r\n\t\treturn faction;\r\n\t}",
"public String asString() {\n\t\t\tString enumName;\n\t\t\tswitch(this) {\n\t\t\tcase INDEX:\n\t\t\t\tenumName = \"index\";\n\t\t\t\tbreak;\n\t\t\tcase NAME:\n\t\t\t\tenumName = \"name\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tenumName = \"unsupported\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn enumName;\n\t\t}",
"public static State parseString(String name)\n\t\t{\n\t\t\tif (FULL.toString().equals(name))\n\t\t\t\treturn FULL;\n\t\t\telse if (PARTIAL.toString().equals(name))\n\t\t\t\treturn PARTIAL;\n\t\t\telse if (DELETED.toString().equals(name))\n\t\t\t\treturn DELETED;\n\t\t\telse\n\t\t\t\treturn null;\n\t\t}",
"public static EndConditionTypes get(String literal)\n {\n for (int i = 0; i < VALUES_ARRAY.length; ++i)\n {\n EndConditionTypes result = VALUES_ARRAY[i];\n if (result.toString().equals(literal))\n {\n return result;\n }\n }\n return null;\n }",
"gov.nih.nlm.ncbi.www.MedlineSiDocument.MedlineSi.Type.Value.Enum getValue();",
"@JsonCreator\n public static EntityStatus fromString(String value) {\n EntityStatus[] items = EntityStatus.values();\n for (EntityStatus item : items) {\n if (item.toString().equalsIgnoreCase(value)) {\n return item;\n }\n }\n return null;\n }",
"String getStringValue();",
"String getStringValue();",
"public static SheetTraitEnum getByName(String name) {\r\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\r\n\t\t\tSheetTraitEnum result = VALUES_ARRAY[i];\r\n\t\t\tif (result.getName().equals(name)) {\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public static ConnectionDirection fromString(String s) {\n if (s != null) {\n for (ConnectionDirection cd : ConnectionDirection.values()) {\n if (s.equals(cd.text)) {\n return cd;\n }\n }\n }\n return ConnectionDirection.INVALID;\n }",
"public static State findState(String string) {\n String find = string.toUpperCase();\n\n if (find.contains(WAITING.name())) {\n return WAITING;\n }\n else if (find.contains(STARTING.name())) {\n return STARTING;\n }\n else if (find.contains(PLAYING.name())) {\n return PLAYING;\n }\n else if (find.contains(ENDING.name())) {\n return ENDING;\n }\n else if (find.contains(ENDED.name())) {\n return ENDED;\n }\n else {\n return OFFLINE;\n }\n }",
"public static <E extends Enum<E>> E nbtGetEnum(CompoundNBT nbt, String key, Function<String, E> enumFactory, E defaultValue) {\n\n if (nbt.contains(key)) {\n\n final String value = nbt.getString(key);\n\n if (!Strings.isNullOrEmpty(value)) {\n return enumFactory.apply(nbt.getString(key));\n }\n }\n\n return defaultValue;\n }",
"public static GrouperHttpMethod valueOfIgnoreCase(String string, boolean exceptionOnNull) {\r\n return GrouperUtil.enumValueOfIgnoreCase(GrouperHttpMethod.class, \r\n string, exceptionOnNull);\r\n\r\n }",
"public StateType getStateTypeFromName(String name) {\n\t\tfor(StateType stateType : StateType.values()) {\n\t\t\tif(stateType.toString().equals(name)) {\n\t\t\t\treturn stateType;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public static String umlType(String s)\n {\n read_if_needed_();\n \n int index = _builtins.length;\n \n while (index-- != 0)\n if (_builtins[index].java.equals(s))\n return _builtins[index].uml;\n \n return null;\n }",
"public static RLOGLevel resolve(String value) {\n\n String qName = PrefixNSService.getLocalName(value, schemaPrefix);\n for (RLOGLevel level : values()) {\n if (qName.equals(level.name())) {\n return level;\n }\n }\n if (value.equals(SHACL.Violation.getURI())) {\n return ERROR;\n }\n if (value.equals(SHACL.Warning.getURI())) {\n return WARN;\n }\n if (value.equals(SHACL.Info.getURI())) {\n return INFO;\n }\n return null;\n\n }",
"public static PseudostateKind get(String literal) {\r\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\r\n\t\t\tPseudostateKind result = VALUES_ARRAY[i];\r\n\t\t\tif (result.toString().equals(literal)) {\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"@JsonCreator\n public static DecryptionRuleTypeEnum fromString(String name) {\n return fromString(name, DecryptionRuleTypeEnum.class);\n }",
"public java.lang.String getEnumSkillId()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ENUMSKILLID$10);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"@Override\n public TransactionType convertToEntityAttribute(String s) {\n if (s == null) return null;\n\n return TransactionType.getEnumFromString(s);\n }",
"public static CrossoverType fromString(String text) {\n if (text != null) {\n for (CrossoverType CT : CrossoverType.values()) {\n if (text.equalsIgnoreCase(CT.name)) {\n return CT;\n }\n }\n }\n return null;\n }",
"public String getValue(String s) {\n return s;\n }",
"public static CurveCharKind getByName(String name) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tCurveCharKind result = VALUES_ARRAY[i];\n\t\t\tif (result.getName().equals(name)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public static Object getEnumAttribute(Node archiveNode, String attrName, Object[] values, Object defaultValue) {\n\n Node attr = archiveNode.getAttributes().getNamedItem(attrName);\n if (attr != null) {\n String found = attr.getNodeValue();\n for (Object value : values) {\n if (value.toString().equalsIgnoreCase(found)) {\n return value;\n }\n }\n }\n\n return defaultValue;\n }",
"private static Class<?> enumLiteralValueTypeOf(Class<? extends Enum<?>> enumType) {\r\n\t\tEnum<?>[] enumValues = enumType.getEnumConstants();\r\n\t\tif (enumValues != null) {\r\n\t\t\tfor (Enum<?> enumValue : enumValues) {\r\n\t\t\t\tif (enumValue instanceof DBEnumValue) {\r\n\t\t\t\t\tObject code = ((DBEnumValue<?>) enumValue).getCode();\r\n\t\t\t\t\tif (code != null) {\r\n\t\t\t\t\t\treturn code.getClass();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public static AccessType fromExternalName(String externalName) {\n\t\tif (externalName == null) {\n\t\t\treturn null;\n\t\t}\n\t\tfor (AccessType accessType : AccessType.values()) {\n\t\t\tif (accessType.getExternalName().equals(externalName)) {\n\t\t\t\treturn accessType;\n\t\t\t}\n\t\t}\n\t\tthrow new UnknownEnumExternalNameException(externalName);\n\t}",
"public static Resource_kind getByName(String name) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tResource_kind result = VALUES_ARRAY[i];\n\t\t\tif (result.getName().equals(name)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public static During get(String literal)\n {\n for (int i = 0; i < VALUES_ARRAY.length; ++i)\n {\n During result = VALUES_ARRAY[i];\n if (result.toString().equals(literal))\n {\n return result;\n }\n }\n return null;\n }",
"public static VisualizationType get(String literal) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tVisualizationType result = VALUES_ARRAY[i];\n\t\t\tif (result.toString().equals(literal)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public static CountryCodeEnum getEnumFromCode(String code) {\r\n for (int i = 0; i < CountryCodeEnum.values().length; i++) {\r\n if (CountryCodeEnum.values()[i].getCode().equals(code)) {\r\n return CountryCodeEnum.values()[i];\r\n }\r\n }\r\n return null;\r\n }",
"public static TopmarkType get(String literal) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tTopmarkType result = VALUES_ARRAY[i];\n\t\t\tif (result.toString().equals(literal)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}"
]
| [
"0.7287693",
"0.6751677",
"0.65314513",
"0.6493583",
"0.64313394",
"0.6422369",
"0.6397381",
"0.63267887",
"0.62091017",
"0.61424094",
"0.6082569",
"0.607042",
"0.60694385",
"0.601767",
"0.6001843",
"0.5966389",
"0.5958356",
"0.5955963",
"0.5934569",
"0.59279925",
"0.58848006",
"0.5841559",
"0.5818581",
"0.5783343",
"0.5767273",
"0.57612807",
"0.57575446",
"0.5753198",
"0.5723976",
"0.5719571",
"0.57139325",
"0.57125354",
"0.5683008",
"0.56750613",
"0.56641674",
"0.56270266",
"0.56238323",
"0.5619138",
"0.5592325",
"0.5590098",
"0.55852807",
"0.55683035",
"0.55681723",
"0.5566218",
"0.5549066",
"0.554835",
"0.55483115",
"0.5517765",
"0.55159456",
"0.5514909",
"0.5505349",
"0.5489716",
"0.54861456",
"0.54861456",
"0.54772615",
"0.54746765",
"0.5469559",
"0.5468368",
"0.54561085",
"0.544103",
"0.5437068",
"0.5412385",
"0.5412359",
"0.53899026",
"0.53872484",
"0.53443736",
"0.5343892",
"0.53386426",
"0.5317334",
"0.5316851",
"0.53164834",
"0.5298746",
"0.5276068",
"0.5270151",
"0.5270151",
"0.525692",
"0.5253421",
"0.5246143",
"0.5241644",
"0.52387565",
"0.5237846",
"0.52291673",
"0.5225921",
"0.52072257",
"0.5196688",
"0.519178",
"0.5173929",
"0.517294",
"0.5165862",
"0.5163617",
"0.5161584",
"0.51584816",
"0.51542914",
"0.51524144",
"0.51457494",
"0.5131859",
"0.512735",
"0.5126678"
]
| 0.64256704 | 7 |
Returns the enum value corresponding to an int, or null if none. | public static Enum forInt(int i)
{ return (Enum)table.forInt(i); } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static BendType toEnum(int val) {\r\n\t\t\ttry {\r\n\t\t\t\treturn values()[val - 1];\r\n\t\t\t} catch (IndexOutOfBoundsException e) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}",
"public T caseIntEnum(IntEnum object)\n {\n return null;\n }",
"public static Resource_kind get(int value) {\n\t\tswitch (value) {\n\t\tcase NONE_VALUE:\n\t\t\treturn NONE;\n\t\tcase RAND_VALUE:\n\t\t\treturn RAND;\n\t\tcase LOCK_VALUE:\n\t\t\treturn LOCK;\n\t\tcase SHARE_VALUE:\n\t\t\treturn SHARE;\n\t\t}\n\t\treturn null;\n\t}",
"public int getValue()\n {\n try\n {\n return (Integer) AlphaComposite.class.getField(name).get(null);\n }\n catch (Exception e)\n {\n return -1;\n }\n }",
"public IntType asInt(){\n return TypeFactory.getIntType(this.toInt(this.getValue()));\n }",
"public static CoverageType get(int value) {\n\t\tswitch (value) {\n\t\t\tcase PATIENT_GENDER_VALUE: return PATIENT_GENDER;\n\t\t\tcase PATIENT_AGE_GROUP_VALUE: return PATIENT_AGE_GROUP;\n\t\t\tcase CLINICAL_FOCUS_VALUE: return CLINICAL_FOCUS;\n\t\t\tcase TARGET_USER_VALUE: return TARGET_USER;\n\t\t\tcase WORKFLOW_SETTING_VALUE: return WORKFLOW_SETTING;\n\t\t\tcase WORKFLOW_TASK_VALUE: return WORKFLOW_TASK;\n\t\t\tcase CLINICAL_VENUE_VALUE: return CLINICAL_VENUE;\n\t\t}\n\t\treturn null;\n\t}",
"public static int getValueInt()\n {\n return Util.valueInt;\n }",
"public static PortType get(int value)\n {\n switch (value)\n {\n case INPUT_EN_VALUE: return INPUT_EN;\n case INPUT_RU_VALUE: return INPUT_RU;\n case OUTPUT_EN_VALUE: return OUTPUT_EN;\n case OUTPUT_RU_VALUE: return OUTPUT_RU;\n }\n return null;\n }",
"public static TasklistEnum enumOf(int i) {\n\t\t\tfor (TasklistEnum enumType : TasklistEnum.values()) {\n\t\t\t\tif (enumType.index == i) {\n\t\t\t\t\treturn enumType;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}",
"public int intVal(){\n\n if(currentTokenType == TYPE.INT_CONST){\n\n return Integer.parseInt(currentToken);\n }else {\n throw new IllegalStateException(\"Current token is not an integer constant!\");\n }\n }",
"int enumField(String name, boolean isDefined, int value,\n GPSEnumDefinition definition) throws NullField, InvalidFieldValue;",
"Integer getValue();",
"Integer getValue();",
"public int getVal()\n {\n return this.ordinal();\n }",
"public static RecordStatusEnum getById(Integer id) {\n if (id == null) {\n return null;\n }\n for (RecordStatusEnum type : RecordStatusEnum.values()) {\n if (type.id == id) {\n return type;\n }\n }\n return null;\n }",
"public static InterfaceModeType get(int value) {\n\t\tswitch (value) {\n\t\t\tcase MASTER: return MASTER_LITERAL;\n\t\t\tcase SLAVE: return SLAVE_LITERAL;\n\t\t\tcase SYSTEM: return SYSTEM_LITERAL;\n\t\t\tcase MIRRORED_MASTER: return MIRRORED_MASTER_LITERAL;\n\t\t\tcase MIRRORED_SLAVE: return MIRRORED_SLAVE_LITERAL;\n\t\t\tcase MIRRORED_SYSTEM: return MIRRORED_SYSTEM_LITERAL;\n\t\t}\n\t\treturn null;\n\t}",
"int intValue();",
"@Nullable\n public static <T extends Enum<T>> T getEnumValueSafe(@Nullable String name, int id, Class<T> enumClass)\n {\n return getEnumValueSafe(name, id, enumClass, null);\n }",
"public int getInt(String key, int defaultValue);",
"@java.lang.Override\n public int getNilValue() {\n if (typeCase_ == 1) {\n return (java.lang.Integer) type_;\n }\n return 0;\n }",
"public static APIVersionType get(int value) {\n switch (value) {\n case NONE_VALUE: return NONE;\n case CONTEXT_VALUE: return CONTEXT;\n case URL_VALUE: return URL;\n }\n return null;\n }",
"public final int getInt()\n {\n return intValue;\n }",
"public static int getInt() throws Exception {\n return getInt(null);\n }",
"public static String getString(int value){\n for (ItemAttributeEnum item : ItemAttributeEnum.values()) {\n if (value == item.intValue){\n return item.toString();\n }\n }\n return null;\n }",
"public static TypeDictionaryDicoActionQualificatifActivite get(int value) {\n\t\tswitch (value) {\n\t\t\tcase UNIQUE_VALUE: return UNIQUE;\n\t\t\tcase MINIMAL_VALUE: return MINIMAL;\n\t\t\tcase MAXIMAL_VALUE: return MAXIMAL;\n\t\t\tcase POSSIBLE_VALUE: return POSSIBLE;\n\t\t}\n\t\treturn null;\n\t}",
"int getIntValue();",
"int getFromValue();",
"public static StatusType get(int value) {\n\t\tswitch (value) {\n\t\t\tcase INSTALLED_VALUE: return INSTALLED;\n\t\t\tcase NOT_INSTALLED_VALUE: return NOT_INSTALLED;\n\t\t\tcase HALF_CONFIGURED_VALUE: return HALF_CONFIGURED;\n\t\t\tcase HALF_INSTALLED_VALUE: return HALF_INSTALLED;\n\t\t\tcase CONFIG_FILES_VALUE: return CONFIG_FILES;\n\t\t\tcase UNPACKED_VALUE: return UNPACKED;\n\t\t}\n\t\treturn null;\n\t}",
"String getInt();",
"int getInt();",
"int getInt();",
"public int getInt();",
"@Nullable\n public static <T extends Enum<T>> T getEnumValueSafe(@Nullable String name, int id, T def)\n {\n return getEnumValueSafe(name, id, def.getDeclaringClass(), def);\n }",
"public int getInt() {\r\n\t\treturn (value.getInt());\r\n\t}",
"int getInt(String key, int defaultValue);",
"public static DataType get(int value) {\n\t\tswitch (value) {\n\t\t\tcase CLASS_NAME: return CLASS_NAME_LITERAL;\n\t\t\tcase METHOD_NAME: return METHOD_NAME_LITERAL;\n\t\t\tcase METHOD_SIG: return METHOD_SIG_LITERAL;\n\t\t\tcase THIS_OBJECT: return THIS_OBJECT_LITERAL;\n\t\t\tcase ARGS: return ARGS_LITERAL;\n\t\t\tcase RETURNED_OBJECT: return RETURNED_OBJECT_LITERAL;\n\t\t\tcase IS_FINALLY: return IS_FINALLY_LITERAL;\n\t\t\tcase EXCEPTION_OBJECT: return EXCEPTION_OBJECT_LITERAL;\n\t\t\tcase STATIC_FIELD: return STATIC_FIELD_LITERAL;\n\t\t\tcase CLASS_SOURCE_FILE: return CLASS_SOURCE_FILE_LITERAL;\n\t\t\tcase METHOD_NAMES: return METHOD_NAMES_LITERAL;\n\t\t\tcase METHOD_LINE_TABLES: return METHOD_LINE_TABLES_LITERAL;\n\t\t\tcase METHOD_NUMBER: return METHOD_NUMBER_LITERAL;\n\t\t\tcase EXECUTABLE_UNIT_NUMBER: return EXECUTABLE_UNIT_NUMBER_LITERAL;\n\t\t\tcase PREVIOUS_UNIT_NUMBER: return PREVIOUS_UNIT_NUMBER_LITERAL;\n\t\t}\n\t\treturn null;\n\t}",
"public static StatusCode getType(Integer id) {\n\t\tif (id == null) {\n\t\t\treturn null;\n\t\t}\n\t\tfor (StatusCode position : StatusCode.values()) {\n\t\t\tif (id.equals(position.getId())) {\n\t\t\t\treturn position;\n\t\t\t}\n\t\t}\n\t\tthrow new IllegalArgumentException(\"No matching type for id: \" + id);\n\t}",
"public static ConflictResolution get(int value)\n {\n switch (value)\n {\n case ROLLBACK_VALUE: return ROLLBACK;\n case ABORT_VALUE: return ABORT;\n case FAIL_VALUE: return FAIL;\n case IGNORE_VALUE: return IGNORE;\n case REPLACE_VALUE: return REPLACE;\n }\n return null;\n }",
"public int getValue();",
"public int getValue();",
"public static AssociationKind get(int value) {\n\t\tswitch (value) {\n\t\t\tcase NONE_VALUE: return NONE;\n\t\t\tcase MAP_VALUE: return MAP;\n\t\t\tcase EXTRA_VALUE: return EXTRA;\n\t\t}\n\t\treturn null;\n\t}",
"public static EsOrderModeType findByValue(int value) { \n switch (value) {\n case -1:\n return UNKNOWN;\n case 0:\n return ORDER_MODE_FOK;\n case 1:\n return ORDER_MODE_FAK;\n case 2:\n return ORDER_MODE_GFD;\n case 3:\n return ORDER_MODE_GTC;\n case 4:\n return ORDER_MODE_GTD;\n default:\n return null;\n }\n }",
"public static JdbcTypeType get(int value) {\r\n\t\tswitch (value) {\r\n\t\t\tcase _1: return _1_LITERAL;\r\n\t\t\tcase _2: return _2_LITERAL;\r\n\t\t\tcase _3: return _3_LITERAL;\r\n\t\t\tcase _4: return _4_LITERAL;\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public int intValue();",
"public static TopmarkType get(int value) {\n\t\tswitch (value) {\n\t\t\tcase UNKNOWN_VALUE: return UNKNOWN;\n\t\t\tcase CYLINDER_VALUE: return CYLINDER;\n\t\t\tcase CONE_UP_VALUE: return CONE_UP;\n\t\t\tcase CONE_DOWN_VALUE: return CONE_DOWN;\n\t\t\tcase XCROSS_VALUE: return XCROSS;\n\t\t\tcase BALL_VALUE: return BALL;\n\t\t\tcase UPRIGHT_CROSS_VALUE: return UPRIGHT_CROSS;\n\t\t\tcase RHOMBUS_VALUE: return RHOMBUS;\n\t\t\tcase FLAG_VALUE: return FLAG;\n\t\t}\n\t\treturn null;\n\t}",
"public static OrderStatus valueOf(Integer value) {\n return Arrays.stream(values())\n .filter(orderStatus -> orderStatus.value == value)\n .findFirst()\n .orElse(null);\n }",
"public static Enum forInt(int i)\n { return (Enum)table.forInt(i); }",
"public java.lang.String getEnumSkillId()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ENUMSKILLID$10);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public static Enum forInt(int i)\r\n { return (Enum)table.forInt(i); }",
"public static MessageStatus get(int value) {\n\t\tswitch (value) {\n\t\t\tcase READY_VALUE: return READY;\n\t\t\tcase TRASMITTED_VALUE: return TRASMITTED;\n\t\t\tcase ERROR_VALUE: return ERROR;\n\t\t}\n\t\treturn null;\n\t}",
"public static TypeOfContext get(int value) {\r\n\t\tswitch (value) {\r\n\t\t\tcase WIFI_STATUS_VALUE: return WIFI_STATUS;\r\n\t\t\tcase BLUETOOTH_STATUS_VALUE: return BLUETOOTH_STATUS;\r\n\t\t\tcase BATTERY_LEVEL_VALUE: return BATTERY_LEVEL;\r\n\t\t\tcase CPU_LOAD_VALUE: return CPU_LOAD;\r\n\t\t\tcase MEMORY_LOAD_VALUE: return MEMORY_LOAD;\r\n\t\t\tcase AIRPLANE_MODE_VALUE: return AIRPLANE_MODE;\r\n\t\t\tcase NETWORK_STATUS_VALUE: return NETWORK_STATUS;\r\n\t\t\tcase GPS_STATUS_VALUE: return GPS_STATUS;\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public static Enum forInt(int i)\n { return (Enum)table.forInt(i); }",
"public int getInt()\n {\n return intValue;\n }",
"public int getInt()\n {\n return intValue;\n }",
"public int getAsInt(String key, int defaultVal) {\n String val = entries.getProperty(key);\n return val == null ? defaultVal : Integer.parseInt(val);\n }",
"public Integer getInt(int defaultVal) {\n return get(ContentType.IntegerType, defaultVal);\n }",
"com.google.protobuf.Int32Value getCode();",
"int intOf();",
"@Override\r\n\tpublic int getInt(int arg) {\n\t\treturn 0;\r\n\t}",
"public Integer getInteger(String key, Integer defaultValue);",
"public int get_int_value()\n\t{\n\t\treturn this.int_value;\n\t}",
"public Integer getValue();",
"public T caseIntegerValue(IntegerValue object) {\n\t\treturn null;\n\t}",
"public int getInt(@NonNull String name) {\n return getInt(name, /* defaultValue */ 0);\n }",
"public int intVal() {\r\n\t\t\tassert kind == Kind.INTEGER_LITERAL;\r\n\t\t\treturn Integer.valueOf(String.copyValueOf(chars, pos, length));\r\n\t\t}",
"public static SheetTraitEnum get(int value) {\r\n\t\tswitch (value) {\r\n\t\t\tcase SHEET_TRAITS_NONE_VALUE: return SHEET_TRAITS_NONE;\r\n\t\t\tcase SHEET_TRAITS_ROWS_VALUE: return SHEET_TRAITS_ROWS;\r\n\t\t\tcase SHEET_TRAITS_COLUMNS_VALUE: return SHEET_TRAITS_COLUMNS;\r\n\t\t\tcase SHEET_TRAITS_GRID_VALUE: return SHEET_TRAITS_GRID;\r\n\t\t\tcase SHEET_TRAITS_BARCHART_VALUE: return SHEET_TRAITS_BARCHART;\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public int getNilValue() {\n if (typeCase_ == 1) {\n return (java.lang.Integer) type_;\n }\n return 0;\n }",
"public int getInt(String name) {\n Enumeration enumer = INTS.elements();\n while(enumer.hasMoreElements()) {\n SimpleMessageObjectIntItem item = (SimpleMessageObjectIntItem) enumer.nextElement();\n if(item.getName().compareTo(name) == 0) {\n return item.getValue();\n }\n }\n return -1;\n }",
"public Integer getInt(String name) {\n Object o = get(name);\n if (o instanceof Number) {\n return ((Number)o).intValue();\n }\n\n if (o != null) {\n try {\n String string = o.toString();\n if (string != null) {\n return Integer.parseInt(string);\n }\n }\n catch (NumberFormatException e) {}\n }\n return null;\n }",
"@Override\n\tpublic Object visitIntLiteral(IntLiteral literal) {\n\t\treturn null;\n\t}",
"public static EndpointType get(int value) {\n\t\tswitch (value) {\n\t\tcase EDGE_VALUE:\n\t\t\treturn EDGE;\n\t\tcase REGIONAL_VALUE:\n\t\t\treturn REGIONAL;\n\t\tcase PRIVATE_VALUE:\n\t\t\treturn PRIVATE;\n\t\t}\n\t\treturn null;\n\t}",
"public static FileImport_RunImporter_PauseProcessing_Current_Type_ID_Enum fromValue( int value_ ) {\n for (FileImport_RunImporter_PauseProcessing_Current_Type_ID_Enum c: FileImport_RunImporter_PauseProcessing_Current_Type_ID_Enum.values()) {\n if (c.value == value_ ) {\n return c;\n }\n }\n throw new IllegalArgumentException( \"FileImport_RunImporter_PauseProcessing_Current_Type_ID_Enum not valid for value: \" + value_ );\n }",
"public static StatusCode findByValue(int value) { \n switch (value) {\n case 0:\n return Success;\n case 1:\n return ApplicationException;\n case 2:\n return RuntimeException;\n case 3:\n return RpcException;\n case 4:\n return TransportException;\n case 5:\n return ProtocolException;\n case 6:\n return DegradeException;\n case 7:\n return SecurityException;\n case 8:\n return ServiceException;\n case 9:\n return RemoteException;\n default:\n return null;\n }\n }",
"public final int intValue() {\n /*\n r2 = this;\n java.lang.String r0 = r2.f4032 // Catch:{ NumberFormatException -> 0x0007 }\n int r0 = java.lang.Integer.parseInt(r0) // Catch:{ NumberFormatException -> 0x0007 }\n return r0\n L_0x0007:\n java.lang.String r0 = r2.f4032 // Catch:{ NumberFormatException -> 0x000f }\n long r0 = java.lang.Long.parseLong(r0) // Catch:{ NumberFormatException -> 0x000f }\n int r1 = (int) r0\n return r1\n L_0x000f:\n java.math.BigDecimal r0 = new java.math.BigDecimal\n java.lang.String r1 = r2.f4032\n r0.<init>(r1)\n int r0 = r0.intValue()\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: o.C0442.intValue():int\");\n }",
"public T caseExprInt(ExprInt object)\n {\n return null;\n }",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"public static int getValue(String string){\n for (ItemAttributeEnum item : ItemAttributeEnum.values()) {\n if (string.equals(item.toString())){\n return item.intValue;\n }\n }\n return -1;\n }",
"public int getParamValueAsInt(String label, int defaultValue);",
"public int getAsInt(String key) {\n return getAsInt(key, 0);\n }"
]
| [
"0.65354",
"0.64121985",
"0.6008517",
"0.5999116",
"0.5954221",
"0.5938351",
"0.5918922",
"0.58807987",
"0.58773386",
"0.587598",
"0.5873916",
"0.58688426",
"0.58688426",
"0.5838283",
"0.58377904",
"0.58305204",
"0.5823383",
"0.5821554",
"0.57482404",
"0.5741277",
"0.57199764",
"0.5716666",
"0.57078767",
"0.57052773",
"0.570318",
"0.57014406",
"0.57011545",
"0.56944597",
"0.56680346",
"0.56651056",
"0.56651056",
"0.5664087",
"0.56529456",
"0.5651989",
"0.5650265",
"0.5645437",
"0.56441087",
"0.5641665",
"0.564103",
"0.564103",
"0.56378925",
"0.5630792",
"0.5629723",
"0.56192666",
"0.56191874",
"0.56102955",
"0.55968714",
"0.55916214",
"0.5590351",
"0.5573322",
"0.5567406",
"0.5559674",
"0.5534596",
"0.5534596",
"0.55312175",
"0.5527224",
"0.5526941",
"0.5510731",
"0.5499871",
"0.5489944",
"0.54808205",
"0.5478277",
"0.54733294",
"0.5467514",
"0.54666704",
"0.54630834",
"0.54617435",
"0.545807",
"0.5453341",
"0.5452161",
"0.5451229",
"0.5431654",
"0.54245776",
"0.5414894",
"0.5408471",
"0.53986126",
"0.53986126",
"0.53986126",
"0.53986126",
"0.53986126",
"0.53986126",
"0.53986126",
"0.53986126",
"0.53986126",
"0.53986126",
"0.53986126",
"0.53986126",
"0.53986126",
"0.53986126",
"0.53986126",
"0.53986126",
"0.53986126",
"0.53986126",
"0.53986126",
"0.53986126",
"0.53920794",
"0.53752095",
"0.53746414"
]
| 0.5595413 | 49 |
DENTRO DO EU COLOCO PRIMEIRO O NOME DA CLASSE E DEPOIS O TIPO DO ID | public interface ManutencaoRepository extends JpaRepository<ManutencaoTable, Long> {
Optional<ManutencaoTable> findByNome(String nome);
Optional<ManutencaoTable> findByNomeAndCategoria(String nome, String categoria);
@Query(value = "SELECT * FROM tb_manutencao_crud where id >= 3", nativeQuery = true)
List<ManutencaoTable> anosIntervalos();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.lang.Long getId_tecnico();",
"public abstract java.lang.Long getId_causal_peticion();",
"public long getIdCargaTienda();",
"public int getId()\r\n/* 53: */ {\r\n/* 54: 79 */ return this.idDetalleComponenteCosto;\r\n/* 55: */ }",
"public BigDecimal getIdContrato() {\r\n return idContrato;\r\n }",
"public TipoUsuario(int id_tipousuario) {\n this.id_tipousuario = id_tipousuario;\n }",
"public Integer getIdCurso() {\r\n return idCurso;\r\n }",
"public java.lang.Long getId_cita_previa();",
"public int getId()\r\n/* 208: */ {\r\n/* 209:381 */ return this.idCargaEmpleado;\r\n/* 210: */ }",
"public int getId_coodinador() {\n return id_coodinador;\n }",
"public long getLichChiTietId();",
"public void setIdacesso(int pIdacesso){\n this.idacesso = pIdacesso;\n }",
"public void setIdCurso(Integer idCurso) {\r\n this.idCurso = idCurso;\r\n }",
"public abstract Integer getCompteId();",
"public int getId()\r\n/* 75: */ {\r\n/* 76:110 */ return this.idAutorizacionDocumentoPuntoDeVentaAutoimpresorSRI;\r\n/* 77: */ }",
"public Long getId() {\r\n return idComentario;\r\n }",
"public String getCompoId() {\n\t return compoId;\r\n\t }",
"public int getId_anneeScolaire() {return id_anneeScolaire;}",
"@Override\n\tpublic long getCodTecnico() {\n\t\treturn model.getCodTecnico();\n\t}",
"public int getIdDetalleComponenteCosto()\r\n/* 58: */ {\r\n/* 59: 83 */ return this.idDetalleComponenteCosto;\r\n/* 60: */ }",
"String getCampoId();",
"long buscarAnterior(long id);",
"public abstract java.lang.String getTica_id();",
"public int getId()\r\n/* 69: */ {\r\n/* 70:103 */ return this.idAutorizacionEmpresaSRI;\r\n/* 71: */ }",
"public int idade() {\n\t\treturn 2020 - anoNascimento;\n\t}",
"public int getIdCandidatura(){\n return idCandidatura;\n }",
"public int getId_cabecera_pedido() {\n return id_cabecera_pedido;\n }",
"public int getIdLibro()\n {\n return id;\n }",
"public void setIdDetalleComponenteCosto(int idDetalleComponenteCosto)\r\n/* 63: */ {\r\n/* 64: 87 */ this.idDetalleComponenteCosto = idDetalleComponenteCosto;\r\n/* 65: */ }",
"public int getIdFornecedor(){\n\t return idFornecedor;\n\t}",
"@Override\n\tpublic Integer getId() {\n\t\treturn ofertaOpexId;\n\t}",
"public Integer getIdLocacion();",
"public java.lang.Long getUsua_id();",
"public BigDecimal getIdNaturaleza() {\r\n return idNaturaleza;\r\n }",
"public long getIdVozilo() {\n return idVozilo;\n }",
"public java.lang.Long getTiag_id();",
"@Override\r\n\tpublic Integer getId() {\n\t\treturn codigoCliente;\r\n\t}",
"public void setIdCargaTienda(long idCargaTienda);",
"public int getIdCargaEmpleado()\r\n/* 103: */ {\r\n/* 104:185 */ return this.idCargaEmpleado;\r\n/* 105: */ }",
"public Integer getCodTienda();",
"public abstract java.lang.Long getCod_actividad();",
"@Override\n\tpublic int getIdNguoiTao() {\n\t\treturn _keHoachKiemDemNuoc.getIdNguoiTao();\n\t}",
"public long getLichCongTacId();",
"public void leerPlanDieta(int id_paciente);",
"public Long getId()\r\n\t{\r\n\t\treturn idContrat;\r\n\t}",
"public long getDossierId();",
"public Integer getId_solicitud() {\n return id_solicitud;\n }",
"@Override\n\tpublic Contato buscaContatoId(int idContato) {\n\t\treturn null;\n\t}",
"public int getIdproducto() {\r\n\t\treturn idproducto;\r\n\t}",
"public String getInoId();",
"public String getIdProcuratore() {\n return idProcuratore;\n }",
"public static CentroDeCusto readId(int pCodigo) {\n Query query = HibernateUtil.getSession().createQuery(\"FROM CentroDeCusto WHERE id = \" + pCodigo);\n return (CentroDeCusto) query.uniqueResult();\n }",
"@Override\r\n\tpublic Integer getId() {\n\t\treturn this.codContacto;\r\n\t}",
"public Paises obtenerPaisPorID(Integer txtPais);",
"public static String getIdBeneficio(){\n //La Clase Math tiene varios metodos que te ayudaran\n //Escoger numero aleatorio entre 100000 y 1\n int idrandom1 = (int) (Math.random() * 1000000 + 1);\n\n String idrandom = Integer.toString(idrandom1);\n\n return idrandom;\n }",
"private String getIdioma()\n throws MareException\n {\n\t\tLong idioma = UtilidadesSession.getIdioma(this);\n\t\treturn idioma.toString();\n }",
"@Override\n public long getPartidoId() {\n return _partido.getPartidoId();\n }",
"public TipoUsuario(int id_tipousuario, String usuario) {\n this.id_tipousuario = id_tipousuario;\n this.usuario = usuario;\n }",
"public Long getPersonaId();",
"public java.lang.Integer getId_rango();",
"public void setId_anneeScolaire(int id_anneeScolaire) {this.id_anneeScolaire = id_anneeScolaire;}",
"public void setId_tecnico(java.lang.Long newId_tecnico);",
"public void setIdCliente(Integer id_cliente){\n this.id_cliente=id_cliente;\n }",
"public long getIdPessoa() {\n\t\treturn idPessoa;\n\t}",
"public int getIden() {\n return iden;\n }",
"public int getId_servico() {\n return id_servico;\n }",
"public java.lang.Long getPeti_numero();",
"public java.lang.Long getPeti_numero();",
"@Override\n\tpublic int getId() {\n\t\treturn _keHoachKiemDemNuoc.getId();\n\t}",
"private String getCursoId(String turma_id) \n\t{\n\t\tString curso = null;\n\t\tif(turma_id.charAt(0) == 'I')\n\t\t{\n\t\t\tcurso = \"LEIT\";\n\t\t}else if(turma_id.charAt(0) == 'C')\n\t\t{\n\t\t\tcurso = \"LECT\";\n\t\t}else if(turma_id.charAt(0) == 'M')\n\t\t{\n\t\t\tcurso = \"LEMT\";\n\t\t}else if(turma_id.charAt(0) == 'G')\n\t\t{\n\t\t\tcurso = \"LGF\";\n\t\t}\n\t\telse if(turma_id.charAt(0) == 'A')\n\t\t{\n\t\t\tcurso = \"LEIT\";\n\t\t}\n\t\treturn curso;\n\t}",
"public long getIdCadastroSelecionado(){\r\n \treturn idCadastroSelecionado;\r\n }",
"@AutoEscape\n\tpublic String getIdPtoServicio();",
"public void setLichCongTacId(long lichCongTacId);",
"public int getIdReceta() {\r\n return idReceta;\r\n }",
"public long getIdSejour(){\n\t\treturn idSejour;\n\t}",
"public Integer obterIdEmpresaPorRota(Rota rota) throws ErroRepositorioException;",
"public ctCurso get_ctPuesto(int id) throws RunTime4GLException,\r\n\tSystemErrorException, Open4GLException, IOException, SQLException {\n\t\t\r\n\t\t\r\n\t\tBooleanHolder oplResultado = new BooleanHolder();\r\n\t\tStringHolder opcTexto = new StringHolder();\r\n\r\n\t\tResultSetHolder tt_ctCurso = new ResultSetHolder();\r\n\t\tConnection conexion = DBConexion.getConnection();\r\n\t\tAppServer app = new AppServer(conexion);\r\n\t\tctCurso obj = new ctCurso();\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tapp.as_ctCurso_get(\"SISIMB\", id, tt_ctCurso, oplResultado, opcTexto);\r\n\t\t\t\r\n\t\t\tResultSet rs_tt_ctCurso = tt_ctCurso.getResultSetValue();\r\n\r\n\t\t\twhile (rs_tt_ctCurso.next()) {\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tobj.setiIdCurso(rs_tt_ctCurso.getInt(\"iIdCurso\"));\r\n\t\t\t\tobj.setcNombre(rs_tt_ctCurso.getString(\"cNombre\"));\r\n\t\t\t\tobj.setiMinCup(rs_tt_ctCurso.getInt(\"iMinCup\"));\r\n\t\t\t\tobj.setiMaxCup(rs_tt_ctCurso.getInt(\"iMaxCup\"));\r\n\t\t\t\tobj.setDePrecio(rs_tt_ctCurso.getBigDecimal(\"dePrecio\"));\r\n\t\t\t\tobj.setDeIva(rs_tt_ctCurso.getBigDecimal(\"deIva\"));\r\n\t\t\t\tobj.setDeTotal(rs_tt_ctCurso.getBigDecimal(\"deTotal\"));\r\n\t\t\t\tobj.setId(rs_tt_ctCurso.getBytes(\"id\"));\r\n\t\t\t\t\r\n\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (Exception ex) {\r\n\t\t\tSystem.err.println(ex);\r\n\r\n\t\t\t\r\n\t\t} finally {\r\n\t\t\tapp._release();\r\n\t\t\tDBConexion.closeConnection(conexion);\r\n\t\t}\r\n\t\t\r\n\t\treturn obj;\r\n\t}",
"@Override\n\tpublic int getTramCapNuocId() {\n\t\treturn _keHoachKiemDemNuoc.getTramCapNuocId();\n\t}",
"public java.lang.String getIdcliente() {\n return idcliente;\n }",
"public int getIdSucursal()\r\n/* 93: */ {\r\n/* 94:166 */ return this.idSucursal;\r\n/* 95: */ }",
"public String getIdVenta() {\n return idVenta;\n }",
"public int getIdPreventivo() {\n return idPreventivo;\n }",
"public int getIdPrestatario() {\n return idPrestatario;\n }",
"public int getCodiceID() \r\n\t\t{\r\n\t\t\treturn CodiceID;\r\n\t\t}",
"public Long getTitolarioId() {\r\n return titolarioId;\r\n }",
"public int getId_Socio()\r\n {\r\n return id_socio;\r\n }",
"long buscarProximo(long id);",
"public String getIdAeroporto()\n {\n return this.idAeroporto;\n }",
"public int getIdContacto() {\r\n return idContacto;\r\n }",
"@Override\n public long getCompanyId() {\n return _partido.getCompanyId();\n }",
"public String getidUsuario(){\n return preferencias.getString(CHAVE_ID, null);\n }",
"public int getIdSucursal()\r\n/* 118: */ {\r\n/* 119:131 */ return this.idSucursal;\r\n/* 120: */ }",
"public int getTransportista(){\n return this.transportista;\n }",
"public String getId_Pelanggan(){\r\n \r\n return id_pelanggan;\r\n }",
"public int getId_docente() {\n return id_docente;\n }",
"public long getVocubalaryId();",
"public void setIdContrato(BigDecimal idContrato) {\r\n this.idContrato = idContrato;\r\n }",
"public Long getIdVieSociale() {\r\n\t\treturn idVieSociale.get();\r\n\t}",
"public int getIdSucursal()\r\n/* 104: */ {\r\n/* 105:169 */ return this.idSucursal;\r\n/* 106: */ }",
"public int getTipoEleicao(int idEleicao){\n return this.eleicaoDB.getTipoEleicao(idEleicao);\n }",
"public Integer getIdProfilo() {\n\t\treturn idProfilo;\n\t}"
]
| [
"0.73384345",
"0.72565615",
"0.7106608",
"0.6951749",
"0.6938851",
"0.6916787",
"0.6886402",
"0.6840408",
"0.6744098",
"0.6711602",
"0.66703165",
"0.6602814",
"0.6589229",
"0.65864646",
"0.65854675",
"0.65604943",
"0.6551629",
"0.6551418",
"0.6531057",
"0.6513691",
"0.6513531",
"0.65082973",
"0.64669424",
"0.6445681",
"0.64157903",
"0.6405396",
"0.6405261",
"0.63976705",
"0.6388324",
"0.6377708",
"0.6372923",
"0.6363527",
"0.635521",
"0.6347145",
"0.6336628",
"0.6333055",
"0.6331217",
"0.63289136",
"0.6327889",
"0.6327465",
"0.6311492",
"0.63006014",
"0.62958765",
"0.6279687",
"0.6279667",
"0.62781227",
"0.6274648",
"0.6274312",
"0.62712175",
"0.6266223",
"0.62645406",
"0.6263576",
"0.6257059",
"0.62535226",
"0.62509835",
"0.62401223",
"0.6238023",
"0.6229174",
"0.6223682",
"0.622207",
"0.6207257",
"0.6203074",
"0.61938196",
"0.61887443",
"0.6184306",
"0.6182057",
"0.61787164",
"0.61787164",
"0.61750484",
"0.6173123",
"0.6168048",
"0.6160083",
"0.61578834",
"0.6154079",
"0.6137526",
"0.61297005",
"0.61294305",
"0.61216843",
"0.61133903",
"0.6104602",
"0.60962945",
"0.6072843",
"0.60695344",
"0.6066831",
"0.6065755",
"0.6057742",
"0.6052694",
"0.60517246",
"0.6048997",
"0.6047243",
"0.60460657",
"0.6045778",
"0.6042372",
"0.6042038",
"0.6039167",
"0.6034417",
"0.60224444",
"0.6020171",
"0.60159755",
"0.6014018",
"0.60126543"
]
| 0.0 | -1 |
Get the list of option values in the variant E.g product variant is a 60ml bottle of 6mg strength eliquid > option values are 60ml & 6mg | public ArrayList<String> getOptionValues() {
return optionValues;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<String> getValues(String opt) {\n //noinspection unchecked\n return m_commandLine.getValues(opt);\n }",
"@Override\n public Enumeration<Option> listOptions() {\n\n Vector<Option> result = new Vector<Option>();\n\n result.addElement(new Option(\"\\tThe method used to determine best split:\\n\"\n + \"\\t1. Gini; 2. MaxBEPP; 3. SSBEPP\", \"M\", 1, \"-M [1|2|3]\"));\n\n result.addElement(new Option(\n \"\\tThe constant used in the tozero() hueristic\", \"K\", 1,\n \"-K [kBEPPConstant]\"));\n\n result.addElement(new Option(\n \"\\tScales the value of K to the size of the bags\", \"L\", 0, \"-L\"));\n\n result.addElement(new Option(\n \"\\tUse unbiased estimate rather than BEPP, i.e. UEPP.\", \"U\", 0, \"-U\"));\n\n result\n .addElement(new Option(\n \"\\tUses the instances present for the bag counts at each node when splitting,\\n\"\n + \"\\tweighted according to 1 - Ba ^ n, where n is the number of instances\\n\"\n + \"\\tpresent which belong to the bag, and Ba is another parameter (default 0.5)\",\n \"B\", 0, \"-B\"));\n\n result\n .addElement(new Option(\n \"\\tMultiplier for count influence of a bag based on the number of its instances\",\n \"Ba\", 1, \"-Ba [multiplier]\"));\n\n result\n .addElement(new Option(\n \"\\tThe number of randomly selected attributes to split\\n\\t-1: All attributes\\n\\t-2: square root of the total number of attributes\",\n \"A\", 1, \"-A [number of attributes]\"));\n\n result\n .addElement(new Option(\n \"\\tThe number of top scoring attribute splits to randomly pick from\\n\\t-1: All splits (completely random selection)\\n\\t-2: square root of the number of splits\",\n \"An\", 1, \"-An [number of splits]\"));\n\n result.addAll(Collections.list(super.listOptions()));\n\n return result.elements();\n }",
"public GbossValueSet getOptions() {\n return BigrGbossData.getValueSetAlphabetized(ArtsConstants.VALUE_SET_PROCEDURE_HIERARCHY);\n }",
"public String[] getOptions() {\n\t\tString[] EvaluatorOptions = new String[0];\n\t\tString[] SearchOptions = new String[0];\n\t\tint current = 0;\n\n//\t\tif (m_ASEvaluator instanceof OptionHandler) {\n//\t\t\tEvaluatorOptions = ((OptionHandler) m_ASEvaluator).getOptions();\n//\t\t}\n//\n//\t\tif (m_ASSearch instanceof OptionHandler) {\n//\t\t\tSearchOptions = ((OptionHandler) m_ASSearch).getOptions();\n//\t\t}\n\n\t\tString[] setOptions = new String[10];\n//\t\tsetOptions[current++] = \"-E\";\n//\t\tsetOptions[current++] = getEvaluator().getClass().getName() + \" \"\n//\t\t\t\t+ Utils.joinOptions(EvaluatorOptions);\n//\n//\t\tsetOptions[current++] = \"-S\";\n//\t\tsetOptions[current++] = getSearch().getClass().getName() + \" \"\n//\t\t\t\t+ Utils.joinOptions(SearchOptions);\n//\t\t\n\t\t setOptions[current++] = \"-k\";\n\t\t setOptions[current++] = \"\" + getK();\n\t\t setOptions[current++] = \"-p\";\n\t\t setOptions[current++] = \"\" + getminF_Correlation();\n\n\t\twhile (current < setOptions.length) {\n\t\t\tsetOptions[current++] = \"\";\n\t\t}\n\n\t\treturn setOptions;\n\t}",
"public abstract String[] getOptions();",
"public String possibleValues(){\n int nbElement = 9-this.possibilities.size();\n String result = \"\";\n result = result+\"\"+this.value+\" (\";\n for(int i : this.possibilities){\n result = result+i;\n }\n for(int i = 0; i< nbElement ;i++){\n result = result+\".\";\n }\n result = result+\")\";\n return result;\n\n }",
"@Override\n public String[] getOptions() {\n\n Vector<String> result = new Vector<String>();\n\n result.add(\"-K\");\n result.add(\"\" + m_kBEPPConstant);\n\n if (getL()) {\n result.add(\"-L\");\n }\n\n if (getUnbiasedEstimate()) {\n result.add(\"-U\");\n }\n\n if (getB()) {\n result.add(\"-B\");\n }\n\n result.add(\"-Ba\");\n result.add(\"\" + m_bagInstanceMultiplier);\n\n result.add(\"-M\");\n result.add(\"\" + m_SplitMethod);\n\n result.add(\"-A\");\n result.add(\"\" + m_AttributesToSplit);\n\n result.add(\"-An\");\n result.add(\"\" + m_AttributeSplitChoices);\n\n Collections.addAll(result, super.getOptions());\n\n return result.toArray(new String[result.size()]);\n }",
"public static Vector getAllOptions() {\n\t\tVector allOptions = new Vector();\n\t\tallOptions.add(MaxHitsOption.DEFAULT_NUM_HITS);\n\t\tallOptions.add(new MaxHitsOption(20));\n\t\tallOptions.add(new MaxHitsOption(50));\n\t\tallOptions.add(new MaxHitsOption(100));\n\t\tallOptions.add(new MaxHitsOption(500));\n\t\tallOptions.add(new MaxHitsOption(1000));\n\t\tallOptions.add(new MaxHitsOption(5000));\n\t\tallOptions.add(new MaxHitsOption(Integer.MAX_VALUE));\n\n\t\treturn allOptions;\n\t}",
"public List<SelectItem> getLogSizeUnitValues() {\n return generalValues(NewTaskStepValues.LogSizeUnitEnum.values());\n }",
"private String getValues()\n\t{\n\t\tString values = \"(\";\n\t\tfor(int spot = 0; spot < fieldList.size(); spot++)\n\t\t{\n\t\t\tvalues += \"'\" + fieldList.get(spot).getText() + \"'\";\n\t\t\tif(spot == fieldList.size()-1)\n\t\t\t{\n\t\t\t\tvalues += \");\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvalues += \", \";\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn values;\n\t}",
"@Override\n\tabstract protected List<String> getOptionsList();",
"public List<String> getSizesOfArticle(Document document) {\n\t\tList<String> sizes = new ArrayList<>();\n\t\t//<select name=\"size\" id=\"size\"><option value=\"53313\">Medium</option> \n\t\t//<option value=\"53314\">Large</option> <option value=\"53315\">XLarge</option></select>\n\t\t\n\t\t// Peut etre sélectionner la div \"details\" avant de chercher les p ? \n\t\tElements selectElements = document.getElementsByTag(\"select\");\n\t\tfor (Element selectElement : selectElements) {\n\t\t\t// get all options\n\t\t\tElements optionElements = selectElement.getElementsByTag(\"option\");\n\t\t\tfor (Element optionElement : optionElements) {\n\t\t\t\tsizes.add(optionElement.text());\n\t\t\t}\n\t\t}\n\t\treturn sizes;\n\t}",
"public Enumeration listOptions(){\n\n Vector newVector = new Vector(2);\n\n newVector.addElement(new Option(\n\t\t\t\t \"\\tNumber of attempts of generalisation.\\n\",\n\t\t\t\t \"G\", \n\t\t\t\t 1, \n\t\t\t\t \"-G <value>\"));\n newVector.addElement(new Option(\n\t\t\t\t \"\\tNumber of folder for computing the mutual information.\\n\",\n\t\t\t\t \"I\", \n\t\t\t\t 1, \n\t\t\t\t \"-I <value>\"));\n\n return newVector.elements();\n }",
"public String getChoices() {\r\n\t\tString choice = \"\";\r\n\t\tfor(int i = 0; i < 4; i++) {\r\n\t\t\tchoice += i + 1 + \") \" + choices[i].getChoice() + \"\\n\";\r\n\t\t}\r\n\t\treturn choice;\r\n\t}",
"protected LinkedHashMap<String, Float> getAllOptionLHM() {\n\t\tLinkedHashMap<String, Float> optionsetmap = new LinkedHashMap<String,Float>();\n\t\tfor(Option op : options){\n\t\t\toptionsetmap.put(op.getOptionName(), op.getPrice());\n\t\t}\n\t\treturn optionsetmap;\n\t}",
"public List getValues() {\n/* 103 */ List<ConfigurableEffect.Value> values = super.getValues();\n/* 104 */ values.add(EffectUtil.floatValue(\"Wavelength\", this.wavelength, 1.0F, 100.0F, \"This setting controls the wavelength of the outline. The smaller the value, the more segments will be used to draw the outline.\"));\n/* */ \n/* 106 */ values.add(EffectUtil.floatValue(\"Amplitude\", this.amplitude, 0.5F, 50.0F, \"This setting controls the amplitude of the outline. The bigger the value, the more the zigzags will vary.\"));\n/* */ \n/* 108 */ return values;\n/* */ }",
"public ArrayList<String> getOptions(By locator){\n ArrayList<String> options = new ArrayList<String>();\n\t\tWebElement element = findElementClickable(locator);\n try {\n\n Select select = new Select(element);\n List<WebElement> optionsList = select.getOptions();\n if(optionsList.size() == 1)\n \toptions.add(optionsList.get(0).getText().trim());\n else {\n\t\t\t\tfor (int i = 1; i < optionsList.size(); i++) {\n\t\t\t\t\toptions.add(optionsList.get(i).getText().trim());\n\t\t\t\t}\n\t\t\t}\n LOGGER.info(\"Step : \" + Thread.currentThread().getStackTrace()[2].getMethodName() + \": Pass\");\n return options;\n\n } catch (Exception e) {\n LOGGER.error(\"Step : \" + Thread.currentThread().getStackTrace()[2].getMethodName() + \": Fail\");\n //e.printStackTrace();\n throw new NotFoundException(\"There is an error while getting the options: with locator \" + locator + \". Exception \" + e);\n\t\n }\n\n\n }",
"public Enumeration listOptions() {\n\n\t\tVector newVector = new Vector(6);\n\n\t\tnewVector\n\t\t\t\t.addElement(new Option(\n\t\t\t\t\t\t\"\\tSets search method for subset evaluators.\\n\"\n\t\t\t\t\t\t\t\t+ \"\\teg. -S \\\"weka.attributeSelection.BestFirst -S 8\\\"\",\n\t\t\t\t\t\t\"S\", 1,\n\t\t\t\t\t\t\"-S <\\\"Name of search class [search options]\\\">\"));\n\n\t\tnewVector\n\t\t\t\t.addElement(new Option(\n\t\t\t\t\t\t\"\\tSets attribute/subset evaluator.\\n\"\n\t\t\t\t\t\t\t\t+ \"\\teg. -E \\\"weka.attributeSelection.CfsSubsetEval -L\\\"\",\n\t\t\t\t\t\t\"E\", 1,\n\t\t\t\t\t\t\"-E <\\\"Name of attribute/subset evaluation class [evaluator options]\\\">\"));\n\n\t\tif ((m_ASEvaluator != null) && (m_ASEvaluator instanceof OptionHandler)) {\n\t\t\tEnumeration enu = ((OptionHandler) m_ASEvaluator).listOptions();\n\n\t\t\tnewVector.addElement(new Option(\"\", \"\", 0, \"\\nOptions specific to \"\n\t\t\t\t\t+ \"evaluator \" + m_ASEvaluator.getClass().getName() + \":\"));\n\t\t\twhile (enu.hasMoreElements()) {\n\t\t\t\tnewVector.addElement((Option) enu.nextElement());\n\t\t\t}\n\t\t}\n\n\t\tif ((m_ASSearch != null) && (m_ASSearch instanceof OptionHandler)) {\n\t\t\tEnumeration enu = ((OptionHandler) m_ASSearch).listOptions();\n\n\t\t\tnewVector.addElement(new Option(\"\", \"\", 0, \"\\nOptions specific to \"\n\t\t\t\t\t+ \"search \" + m_ASSearch.getClass().getName() + \":\"));\n\t\t\twhile (enu.hasMoreElements()) {\n\t\t\t\tnewVector.addElement((Option) enu.nextElement());\n\t\t\t}\n\t\t}\n\t\treturn newVector.elements();\n\t}",
"public java.lang.Object[] getSelectPresentationValueList();",
"public List< T > getSelectedValuesChoices() {\r\n return selectedValuesChoices;\r\n }",
"public QueryResult<Variant> getAllVariants(QueryOptions options);",
"List getValues();",
"public List<TileVariant> getVariants() {\r\n\t\treturn this.variants;\r\n\t}",
"public static List<String> formPossibleValues(String enumeraion){\n\t\tList<String> ret = new ArrayList<String>();\n\t\tfor (String value : enumeraion.split(\";\"))\n\t\t\tret.add(value);\n\t\t\n\t\treturn ret;\n\t}",
"public Map<String, Map<String, String>> getVariantStringMap() {\n Map<String, Map<String, String>> variantStringMap = this.variantStringMap;\n if (variantStringMap == null) { // FAST MUTABLE\n // rebuild this, needed for compat\n variantStringMap = new LinkedHashMap<>();\n for(VariantInfo variant : getVariantList()) {\n variantStringMap.put(variant.getName(), variant.propsToStringMap());\n }\n variantStringMap = Collections.unmodifiableMap(variantStringMap);\n this.variantStringMap = variantStringMap;\n }\n return variantStringMap;\n }",
"public Collection<SubsValue> getSubsValues() {\n\t\tCollection<SubsValue> result = new HashSet<SubsValue>();\n\n\t\tif (TemplatesStore.getInstance().getData().values() != null) {\n\t\t\tfor (TemplatesStoreData data : TemplatesStore.getInstance().getData().values()) {\n\t\t\t\tif (this.isSelectedCartridge(data)) {\n\t\t\t\t\tCollection<SubsValue> subsvals = data.getSubstitutes();\n\t\t\t\t\tif (subsvals != null) {\n\t\t\t\t\t\tDataStore.getInstance().mergeSubsValues(subsvals, false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}",
"java.util.List<java.lang.String> getValuesList();",
"public ArrayList<Integer> get_values()\r\n\t{\r\n\t\treturn this.poss_values;\r\n\t}",
"public String getValues() {\n\t\tString[] valStrArr = values.toArray(new String[values.size()]);\n\t\tlogInfo(String.join(\", \", valStrArr));\n\t\treturn \"\"+String.join(\", \", valStrArr);\n\t}",
"public List getOptions() {\n\t\treturn currentOption;\n\t}",
"public List<ProductInner> value() {\n return this.value;\n }",
"public Option[] SetSitesDropDownData(){\n List<SiteDTO> instDTOList = this.getinventory$GatheringSessionBean().SetSitesDropDownData();\n ArrayList<Option> allOptions = new ArrayList<Option>();\n Option[] allOptionsInArray;\n Option option;\n //Crear opcion titulo\n option = new Option(null,\" -- \"+BundleHelper.getDefaultBundleValue(\"drop_down_default\",getMyLocale())+\" --\");\n allOptions.add(option);\n //Crear todas las opciones del drop down\n for(SiteDTO sDTO : instDTOList){\n option = new Option(sDTO.getSiteId(), sDTO.getDescription().trim());\n allOptions.add(option);\n }\n //Sets the elements in the SingleSelectedOptionList Object\n allOptionsInArray = new Option[allOptions.size()];\n return allOptions.toArray(allOptionsInArray);\n }",
"@Nullable\n List<String> getOptionStrings(String name);",
"public String getOptions() {\n return this.options;\n }",
"public String[] getVariantNames() { return new String[] { \"normal\" }; }",
"public String[] getOptions(){\n\n String[] options = new String[5];\n int current = 0;\n\n options[current++] = \"-G\"; options[current++] = \"\" + m_NumAttemptsOfGene;\n options[current++] = \"-I\"; options[current++] = \"\" + m_NumFoldersMI;\n\n while (current < options.length) {\n options[current++] = \"\";\n }\n return options;\n }",
"public java.lang.String[] getSelectvalues() {\n return selectvalues;\n }",
"@Override\n List<Value> values();",
"public static OptionValues getInitialOptions() {\n return Graal.getRequiredCapability(OptionValues.class);\n }",
"public String getOptionsAsString() {\n\t\tStringBuilder buf = new StringBuilder();\n\t\tfor (int i = 0; i <propertyKeys.size(); i++) {\n\t\t\tString key = propertyKeys.get(i);\n\t\t\tif (!runtimeKeys.get(i))\n buf.append(key + \" : \" + getOption(key)).append(\"\\r\\n\");\n\t\t}\n\t\tfor (int i = 0; i <propertyKeys.size(); i++) {\n\t\t\tString key = propertyKeys.get(i);\n\t\t\tif (runtimeKeys.get(i))\n buf.append(\"* \" + key + \" : \" + getOption(key)).append(\"\\r\\n\");\n\t\t}\n\t\treturn buf.toString();\n\t}",
"public String[][] getOptions() {\r\n return options;\r\n }",
"public abstract ConnectorResultSet get_variants(DataRequest source, String field) throws ConnectorOperationException;",
"public java.util.List<java.lang.String> getValuesList() {\n return java.util.Collections.unmodifiableList(result.values_);\n }",
"public List<String> getValues() {\n\t\treturn (new Vector<String>(this.values));\n\t}",
"public abstract String[] getValues();",
"@NotNull\n @Override\n public Object[] getVariants() {\n final Set<String> alreadySeen = ContainerUtil.newHashSet();\n final List<LookupElement> results = ContainerUtil.newArrayList();\n ResolveUtil.treeWalkUp(myElement, new FrogBaseScopeProcessor() {\n @Override\n public boolean execute(@NotNull PsiElement element, ResolveState state) {\n if (element instanceof FrogNamedElement) {\n FrogNamedElement namedElement = (FrogNamedElement) element;\n String name = namedElement.getName();\n if (!alreadySeen.contains(name)) {\n alreadySeen.add(name);\n results.add(buildLookupElement(namedElement));\n }\n }\n return true;\n }\n });\n return ArrayUtil.toObjectArray(results);\n }",
"public List<NeonValue> getValues();",
"private void deliverOptions()\n {\n int counter = 0;\n for(Option choice : options){\n counter++;\n System.out.println(\"#\" + counter + \" \" + choice.getText());\n }\n }",
"public List<Opt> getOptions() {\n\t\treturn options;\n\t}",
"public List quantInscritosVestibular(String vest_info);",
"public List<String> getNames(VariantContext variantContext);",
"public String toString()\n {\n DecimalFormat df = new DecimalFormat(\"#.00\");\n String words = getOptionName() + \": $\" + df.format(getOptionPrice()) + \".\";\n return words;\n }",
"List<Options> getAllOptions(Configuration config) {\r\n\t\tList<Options> result = new ArrayList<Options>();\r\n\r\n\t\tfor (SimilarityStrategy simStrat : config.getSimilarityStrategies()) {\r\n\t\t\tfor (int kN = config.getKNStart(); kN <= config.getKNEnd(); kN += config\r\n\t\t\t\t\t.getKNStep()) {\r\n\t\t\t\tfor (RatingPredictor pred : config.getPredictionStrategies()) {\r\n\t\t\t\t\tfor (double favThreshold = config.getFavThresholdStart(); favThreshold <= config\r\n\t\t\t\t\t\t\t.getFavThresholdEnd(); favThreshold += config\r\n\t\t\t\t\t\t\t.getFavThresholdStep()) {\r\n\t\t\t\t\t\tfor (double testPercentage : config\r\n\t\t\t\t\t\t\t\t.getTestSetPercentages()) {\r\n\t\t\t\t\t\t\tresult.add(new Options(simStrat, kN, pred, 10,\r\n\t\t\t\t\t\t\t\t\tfavThreshold, testPercentage));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}",
"public String getVals(){\n return (\"a: \" + a + \"\\nr: \" + r + \"\\nb: \" + b + \"\\ng: \" + g);\n }",
"@Override\n\tpublic ArrayList<String> getPossibleValue() {\n\t\treturn possibleValue;\n\t}",
"public String[] getOptions() {\n return m_Classifier.getOptions();\n }",
"public static List<String> getLevelUpOptions() {\n List<String> getOptions = new ArrayList<String>();\n\n for (LevelUpOption option : options){\n getOptions.add(option.getName());\n } //for\n\n return getOptions;\n\n }",
"public List<String> getValue() {\r\n return value;\r\n }",
"public List<V> values()\r\n\t{\r\n\t\tList<V> values = new ArrayList<V>();\r\n\t\t\r\n\t\tfor(Entry element : data)\r\n\t\t{\r\n\t\t\tvalues.add(element.value);\r\n\t\t}\r\n\t\t\t\t\r\n\t\treturn values;\r\n\t}",
"public List<String> values() {\n return this.values;\n }",
"@Override\n\tpublic ArrayList<String> getChoices() {\n\t\t// TODO Auto-generated method stub\n\t\treturn this.choices;\n\t}",
"@Override\r\n\tpublic ArrayList<SchoolValue> getValues() {\r\n\t\t//Boolean test = stringMatchesTo(\"Park-ville dr. way st\", \"Park-Ville Secondary\"); //TODO: REMOVE TEST CODE\r\n\t\t//if (test)\r\n\t\t//\tSystem.out.println(\"string matches\");\r\n\t\t\r\n\t\t// populate a list of districts \r\n\t\tArrayList<District> districts = BCDistricts.getInstance().getDistricts();\r\n\t\t\r\n\t\t// populate a list of schools from districts\r\n\t\tArrayList<School> schoolList = new ArrayList<School>();\r\n\t\tfor (int i = 0; i<districts.size();i++) {\r\n\t\t\tschoolList.addAll(districts.get(i).schools);\r\n\t\t}\r\n\t\t\r\n\t\t// populate a list of schoolvalues from schools\r\n\t\tArrayList<SchoolValue> schoolValues = new ArrayList<SchoolValue>();\r\n\t\tRandom randomGenerator = new Random();\r\n\t\tfor (int i = 0; i<schoolList.size();i++) {\r\n\t\t\tSchool school = schoolList.get(i);\r\n\t\t\tschoolValues.add(school.getEquivSchoolValue());\r\n\t\t}\r\n\t\treturn schoolValues;\r\n\t}",
"public short getOptions()\n {\n return field_1_options;\n }",
"public List<String> getSelectedValues()\n {\n List<String> selectedValues = new ArrayList<String>();\n CharSequence[] allValues = getEntryValues();\n for( int i = 0; i < allValues.length; i++ )\n {\n if( mCheckedStates[i] )\n selectedValues.add( allValues[i].toString() );\n }\n return selectedValues;\n }",
"public List<String> getOptionsNames();",
"public char[] voltages_GET()\n {return voltages_GET(new char[10], 0);}",
"private double[] getMenuItemPrices() {\n double[] prices = new double[menuItemPrices.size()];\n for (int i = 0; i < menuItemPrices.size(); i ++) {\n prices[i] = menuItemPrices.get(i).doubleValue();\n }\n return prices;\n }",
"private String getOptionsString()\r\n\t{\r\n\t\tString options = \"\";\r\n\t\t\r\n\t\tfor (JRadioButton button : buttons)\r\n\t\t{\r\n\t\t\toptions += (StringEscaper.escape(button.getText()) + \";\" + button.isSelected() + \".\");\r\n\t\t}\r\n\t\t\r\n\t\toptions = options.substring(0, options.length() - 1); // Trim off the trailing ,\r\n\t\t\r\n\t\treturn options;\r\n\t}",
"public java.util.List<java.lang.String> getVariantSetIds() {\n return variantSetIds;\n }",
"public List<V> values() {\n return values;\n }",
"public List<V> values() {\n return values;\n }",
"public String getScriptOfValues() {\r\n\t\tString str = \"\";\r\n\r\n\t\tfor (DataVariable var : dataTestModel) {\r\n\t\t\tstr += var.getValue() + \",\";\r\n\t\t}\r\n\t\tif (str.endsWith(\",\")) {\r\n\t\t\tstr = str.substring(0, str.length() - 1);\r\n\t\t}\r\n\t\treturn str;\r\n\t}",
"@Override\n\tpublic String getValue() {\n\t\tString temp = \"\";\n\t\tif(anotherExps.size() == 0)\n\t\t{\n\t\t\tif(exp == null) return \"\";\n\t\t}\n\t\telse if(anotherExps.size() == 1)temp += \",\"+anotherExps.get(0).getValue();\n\t\telse\n\t\t{\n\t\t\tfor(int i = 0 ; i < anotherExps.size() ; i++)\n\t\t\t{\n\t\t\t\ttemp += \",\" + anotherExps.get(i).getValue();\n\t\t\t}\n\t\t}\n\t\treturn exp.getValue() + temp;\n\t}",
"protected abstract String listLearnValues();",
"java.lang.String getValues(int index);",
"public String valuesFromMap() {\n\t\thashMap = createSimpleMap(\"Breakfast\", \"Eggs\");\n\t\treturn hashMap.get(\"Breakfast\");\n\t}",
"public double getOptionPrice()\n {\n return optionPrice;\n }",
"ImmutableList<String> vmOptions();",
"List<String> getJavaOptions();",
"public ComboItem[] getCar_options() {\r\n\t\treturn car_options;\r\n\t}",
"public Option[] SetBreedDropDownData(){\n List<BreedDTO> instDTOList = this.getgermplasm$SementalSessionBean().getGermplasmFacadeRemote().getAllBreeds();\n ArrayList<Option> allOptions = new ArrayList<Option>();\n Option[] allOptionsInArray;\n Option option;\n //Crear opcion titulo\n option = new Option(null,\" -- \"+BundleHelper.getDefaultBundleValue(\"drop_down_default\",getMyLocale())+\" --\");\n allOptions.add(option);\n //Crear todas las opciones del drop down\n for(BreedDTO instDTO : instDTOList){\n option = new Option(instDTO.getBreedId(), instDTO.getName().trim());\n allOptions.add(option);\n }\n //Sets the elements in the SingleSelectedOptionList Object\n allOptionsInArray = new Option[allOptions.size()];\n return allOptions.toArray(allOptionsInArray);\n }",
"static String[] getProductTagsArray() {\n\n\t\tList<String> productTagsList = new ArrayList<>();\n\t\tproductTagsList.add(\"neutro\");\n\t\tproductTagsList.add(\"veludo\");\n\t\tproductTagsList.add(\"couro\");\n\t\tproductTagsList.add(\"basics\");\n\t\tproductTagsList.add(\"festa\");\n\t\tproductTagsList.add(\"workwear\");\n\t\tproductTagsList.add(\"inverno\");\n\t\tproductTagsList.add(\"boho\");\n\t\tproductTagsList.add(\"estampas\");\n\t\tproductTagsList.add(\"balada\");\n\t\tproductTagsList.add(\"colorido\");\n\t\tproductTagsList.add(\"casual\");\n\t\tproductTagsList.add(\"liso\");\n\t\tproductTagsList.add(\"moderno\");\n\t\tproductTagsList.add(\"passeio\");\n\t\tproductTagsList.add(\"metal\");\n\t\tproductTagsList.add(\"viagem\");\n\t\tproductTagsList.add(\"delicado\");\n\t\tproductTagsList.add(\"descolado\");\n\t\tproductTagsList.add(\"elastano\");\n\n\t\treturn productTagsList.toArray(new String[productTagsList.size()]);\n\t}",
"public String[] getChoices()\n\t{\n\t\treturn choices;\n\t}",
"Map getOptions();",
"public LabelValueBean[] getTermSelectOptions() {\n\t\tList terms = getTermList();\n\t\tLabelValueBean[] options = new LabelValueBean[terms.size() + 1];\n\t\toptions[0] = new LabelValueBean(org.dlese.dpc.schemedit.action.form.SchemEditForm.UNSPECIFIED, \"\");\n\t\tint index = 1;\n\t\tfor (Iterator i = terms.iterator(); i.hasNext();) {\n\t\t\tString term = (String) i.next();\n\t\t\toptions[index++] = new LabelValueBean(term, term);\n\t\t}\n\t\treturn options;\n\t}",
"public List<String> getEquityValueList() {\n return equityValueList;\n }",
"public List< T > getSelectedValuesChoicesObject() {\r\n return this.selectedValuesChoices;\r\n }",
"@JsonProperty(\"variant_ids\")\n public List<Object> getVariantIds() {\n return variantIds;\n }",
"public String getValueString() {\n int len=0;\n for (String value : values)\n len += value.length();\n return Util.join(values, len>30 ?\"\\n\":\" \");\n }",
"List<TrackRailsSingleNodeElement> values();",
"public List<Long> values() {\n\t\treturn sample.values();\n\t}",
"public String getGenresString(){\n String genres =\"\";\n for (String str : allGenres){\n genres += str +\", \";\n }\n return genres;\n }",
"void getTvAttrib() {\n for (HDTV item : vendor) {\r\n System.out.println(\"Brand: \" + item.brandname + \" Size: \" + item.size);\r\n }\r\n\r\n }",
"@SuppressWarnings(\"rawtypes\")\n\tpublic abstract Enumeration listOptions();",
"public String[] getValues()\n\t{\n\t\tString[] retArr = new String[values.size()];\n\n\t\tvalues.toArray(retArr);\n\n\t\treturn retArr;\n\t}",
"public String[] getKeysWithVariants() {\n Set keySet = new HashSet( values.keySet() );\n if( defaultValues != null ) {\n keySet.addAll( defaultValues.keySet() );\n }\n keySet.addAll( cssValues.keySet() );\n return ( String[] )keySet.toArray( new String[ keySet.size() ] );\n }",
"public Option[] getSelectionListDropDownData(Long selectionListEntityId) {\n \n //getAllSelectionListElementsByCollection\n List<SelectionListDTO> DTOList = this.getgermplasm$AccessionSessionBean().\n getInventoryFacadeRemote().\n getAllSelectionListElementsByCollection(selectionListEntityId, getAraSessionBean().getGlobalCollectionId());\n /*List<SelectionListDTO> DTOList = this.getPassportSessionBean().\n getGermplasmFacadeRemote().getElementsForSelectionList(selectionListEntityId);*/\n \n ArrayList<Option> allOptions = new ArrayList<Option>();\n Option[] allOptionsInArray;\n Option option;\n //Crear opcion titulo\n option = new Option(null, \" -- \" + BundleHelper.getDefaultBundleValue(\"drop_down_default\", getMyLocale()) + \" --\");\n allOptions.add(option);\n \n //Crear todas las opciones del drop down\n for (SelectionListDTO slDTO : DTOList) {\n option = new Option(slDTO.getValueId(), slDTO.getValueName());\n allOptions.add(option);\n }\n allOptionsInArray = new Option[allOptions.size()];\n return allOptions.toArray(allOptionsInArray);\n }",
"public String[] getValues()\n {\n return values;\n }",
"@Override\n\tpublic String[] getOptions() {\n\t\tVector<String> result = new Vector<String>();\n\n\t\tresult.add(\"-populationSize\");\n\t\tresult.add(\"\" + populationSize);\n\n\t\tresult.add(\"-initialMaxDepth\");\n\t\tresult.add(\"\" + maxDepth);\n\n\t\tCollections.addAll(result, super.getOptions());\n\n\t\treturn result.toArray(new String[result.size()]);\n\t}",
"@Override\n public List<String[]> namesAndValues() {\n List<String[]> nAv = new ArrayList<>();\n String[] m = {\"Meno\", this.meno};\n String[] i = {\"Iso\", this.iso};\n String[] b = {\"Brummitt 1\", this.brumit1.getMeno(), \"F Brumit1\"};\n nAv.add(m);\n nAv.add(i);\n nAv.add(b);\n return nAv;\n }"
]
| [
"0.61064845",
"0.5911697",
"0.584696",
"0.5752894",
"0.57143056",
"0.56954247",
"0.56687945",
"0.5611132",
"0.5609258",
"0.56090415",
"0.55957216",
"0.5561844",
"0.55267",
"0.5524711",
"0.5512507",
"0.5507065",
"0.54848087",
"0.5461166",
"0.5452004",
"0.5444821",
"0.5434461",
"0.54214895",
"0.54204047",
"0.541497",
"0.54001635",
"0.53986424",
"0.53857946",
"0.5380825",
"0.53509843",
"0.53242874",
"0.53043485",
"0.5272791",
"0.5269763",
"0.5240108",
"0.52207965",
"0.5207742",
"0.51999855",
"0.5189281",
"0.51772815",
"0.5171721",
"0.5154022",
"0.51522624",
"0.5151006",
"0.5147812",
"0.5137916",
"0.5137258",
"0.51344043",
"0.51341254",
"0.51257443",
"0.5122972",
"0.51221234",
"0.5119761",
"0.5117854",
"0.51124084",
"0.5112246",
"0.5109757",
"0.5102642",
"0.510207",
"0.5098113",
"0.50970656",
"0.5096794",
"0.50893456",
"0.508685",
"0.5073835",
"0.50641954",
"0.5055247",
"0.5051601",
"0.5035491",
"0.5035479",
"0.5035169",
"0.5035169",
"0.5024596",
"0.5021927",
"0.5019013",
"0.50187564",
"0.5015661",
"0.50121045",
"0.50118136",
"0.5005355",
"0.50047505",
"0.49977577",
"0.49951103",
"0.49949446",
"0.49923405",
"0.49918225",
"0.49885",
"0.4986191",
"0.49816188",
"0.49724242",
"0.49693435",
"0.49656278",
"0.49597958",
"0.4956956",
"0.49565747",
"0.49493256",
"0.49491203",
"0.49485537",
"0.49417534",
"0.49292615",
"0.4923028"
]
| 0.65168035 | 0 |
Add an option value to the set | public void addOptionValue(String optionValue) {
optionValue = optionValue.toLowerCase();
if(optionValueSet.contains(optionValue)){
return;
}
this.optionValueSet.add(optionValue);
this.optionValues.add(optionValue);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setOption(String name, Object value);",
"private static void addValue(ISet set, Scanner in)\n {\n boolean contained;\n int val;\n if (set.getSize() == ISet.MAX_SIZE)\n {\n System.out.println(\"Set is already full!\");\n return;\n }\n do {\n System.out.println(\"What value to add to set?\");\n val = Integer.parseInt(in.nextLine());\n contained = set.contains(val);\n if (contained)\n System.out.println(\"That value is already in the set\");\n } while (contained);\n set.add(val);\n }",
"public void addOption(Option toAdd)\n {\n options = Arrays.copyOf(options, options.length + 1);\n options[options.length - 1] = toAdd;\n }",
"private static StringBuffer addOption(StringBuffer html, DataObject o, String ln, String vn, Object val) {\r\n\t\tObject v = o.meanFieldFilter(vn) ? o.get(vn) : o.get(ln);\r\n\t\tboolean match = checkMatch(v, val);\r\n\t\treturn html.append(\"<option value=\\\"\").append(v == null ? \"\" : HttpUtils.htmlEncode(v.toString()))\r\n\t\t\t\t.append(match ? \"\\\" selected>\" : \"\\\">\")\r\n\t\t\t\t.append(o.get(ln) == null ? \"\" : HttpUtils.htmlEncode(o.get(ln).toString(), true, false))\r\n\t\t\t\t.append(\"</option>\");\r\n\t}",
"public void addOption(Option option) {\n synchronized (options) {\n options.add(option);\n }\n }",
"public void addOption(String option, String value) {\n args.add(\"--\" + option);\n if (value != null) {\n args.add(value);\n }\n }",
"public void addOption() {\n CreatePollLogic.addOption(pollOptions, optionArea, optionContainer);\n }",
"public void addOption(String opiton, boolean correct);",
"public void addOption(String s, Object o) {\n options.put(s, o);\n }",
"public synchronized void setoptset(String name)\n {\n this.opset.add(new OptionSet(name.toUpperCase(Locale.getDefault())));\n }",
"public void addValue() {\n addValue(1);\n }",
"public void addOption(SelectOption option) {\n if (options_ == null)\n options_ = new ArrayList<SelectOption>(3);\n options_.add(option);\n }",
"private static void push(String flag, String value) {\r\n\t\tboolean supported = isFlagValid(flag, value, false);\r\n\r\n\t\tOption opt = new Option(flag, null);\r\n\t\topt.value = value;\r\n\t\topt.supported = supported;\r\n\t\toptionsParsed.add(opt);\r\n\t\t\r\n\t\tif(flag.equals(\"help\"))\r\n\t\t\thelp(); /* Trigger help */\r\n\t}",
"public void addOption(List<WrappedOption> options, String key, String value, boolean overridable) throws FxInvalidParameterException {\n addOption(options, key, value, overridable, true);\n }",
"public boolean addOption(int pos, String optText){\n\t\tGOption option = makeOption(optText);\n\t\tboolean ok = optGroup.addOption(pos, option);\n\t\tif(ok)\n\t\t\tadd(option);\n\t\treturn ok;\n\t}",
"public DomCheckboxGroup<V> addOption(V value, IDisplayString label) {\n\n\t\treturn addOption(value, label, false);\n\t}",
"public void addValue(Object value)\n\t{\n\t\tif (!values.contains(value))\n\t\t{\n\t\t\tvalues.add(value + \"\");\n\t\t}\n\t}",
"public boolean addOption(String optText){\n\t\tGOption option = makeOption(optText);\n\t\tboolean ok = optGroup.addOption(option);\n\t\tif(ok)\n\t\t\tadd(option);\n\t\treturn ok;\n\t}",
"public void addOption(List<WrappedOption> options, String key, String value, boolean overridable, boolean isInherited) throws FxInvalidParameterException {\n if (!StringUtils.isEmpty(key)) {\n if (!StringUtils.isEmpty(value)) {\n options.add(new WrappedOption(key, value, overridable, true, isInherited));\n } else\n throw new FxInvalidParameterException(\"value\", \"ex.optionWrapper.noValue\");\n } else\n throw new FxInvalidParameterException(\"key\", \"ex.optionWrapper.noKey\");\n }",
"public boolean addSelectedValue( final T selectedValue ) {\r\n List< T > selectedValues = getSelectedValuesChoicesObject();\r\n return selectedValues.add( selectedValue );\r\n }",
"public void setCustomOption(String key, String value) {\n\t\tcustomOptions.put(key, value);\n\t\tdirtyAttributes.add(Constants.OPTIONS);\n\t}",
"public C_set_option(IKeyword keyword, IAttributeValue value) {\n\t\tsuper();\n\t\tthis.option = keyword;\n\t\tthis.value = value;\n\t}",
"public void addOption(Configurer option) {\n optionConfigurers.put(option.getKey(), option);\n Object initValue = optionInitialValues.get(option.getKey());\n if (initValue instanceof String) {\n option.setValue((String)initValue);\n }\n if (config != null) {\n ((Container)config.getControls()).add(option.getControls());\n }\n }",
"public void add(String value);",
"public void addPartOfSet(java.lang.String value) {\r\n\t\tBase.add(this.model, this.getResource(), PARTOFSET, value);\r\n\t}",
"public void setOption( String opt )\r\n {\r\n option.set( 0, new COSString( opt ) );\r\n }",
"public StringSetFieldBuilder plusValue(final String... value) {\n if (this.value == null) {\n this.value = new ArrayList<>();\n }\n this.value.addAll(Arrays.asList(value));\n return this;\n }",
"public void addOption(AbstractOption option) {\n\t\tthis.optionList.add(option);\r\n\t}",
"protected void addCurrentOption(final JComponent setting) {\n currentOptionsPanel.addOption(setting);\n }",
"protected void addOption(StringBuilder sb, String value, String label, boolean matched) throws JspException {\n\n sb.append(\"<option value=\\\"\");\n sb.append(value);\n sb.append(\"\\\"\");\n if (matched) {\n sb.append(\" selected=\\\"selected\\\"\");\n }\n if (style != null) {\n sb.append(\" style=\\\"\");\n sb.append(style);\n sb.append(\"\\\"\");\n }\n if (styleClass != null) {\n sb.append(\" class=\\\"\");\n sb.append(styleClass);\n sb.append(\"\\\"\");\n }\n sb.append(\">\");\n\n /* acrescentado por Nanda & Tania */\n // String locale = Action.LOCALE_KEY;\n // String bundle = Action.MESSAGES_KEY;\n String key = label;\n\n // Retrieve the message string we are looking for\n String message = RequestUtils.message(pageContext, this.bundle, this.localeKey, key, null);\n\n if (message == null) {\n JspException e = new JspException(messages.getMessage(\"message.message\", key));\n RequestUtils.saveException(pageContext, e);\n throw e;\n }\n label = message;\n /* ate aqui!! */\n\n sb.append(ResponseUtils.filter(label));\n sb.append(\"</option>\\r\\n\");\n\n }",
"public void setOptions(String value) {\n this.options = value;\n }",
"public synchronized void setOption(OptionSet optSet_Temp,String name,float price){\n optSet_Temp.Increase_Option_Manager(name.toUpperCase(Locale.getDefault()), price);\n }",
"private static void pushSingle(char flag, String value) {\r\n\t\tboolean supported = isFlagValid(flag + \"\", value, true);\r\n\r\n\t\tOption opt = new Option(flag, null);\r\n\t\topt.value = value;\r\n\t\topt.supported = supported;\r\n\t\toptionsParsed.add(opt);\r\n\t}",
"public void addValue(String value) {\n synchronized (values) {\n values.add(value);\n }\n }",
"String set(K key, V value, SetOption setOption, long expirationTime, TimeUnit timeUnit);",
"public void add(Object value) {\n\n\t}",
"public void addPartOfSet( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), PARTOFSET, value);\r\n\t}",
"public void set(String key, Object obj) {\n options.put(key, obj);\n }",
"public void addOption(String property, List options, boolean runtime) {\n\t\tif (geneartor == null) {\n\t\t\tgeneartor = new CombinationGenerator();\n\t\t}\n\t\tif (propertyKeys == null) {\n\t\t\tpropertyKeys = new ArrayList<>();\n\t\t}\n\t\tif (!propertyKeys.contains(property)) {\n\t\t\tgeneartor.addDimension(options);\n\t\t\tpropertyKeys.add(property);\n\t\t\tif (runtime) runtimeKeys.set(propertyKeys.size()-1);\n\t\t}\n\t}",
"void add(String value);",
"public Builder putOptions(java.lang.String key, java.lang.String value) {\n if (key == null) {\n throw new NullPointerException(\"map key\");\n }\n if (value == null) {\n throw new NullPointerException(\"map value\");\n }\n internalGetMutableOptions().getMutableMap().put(key, value);\n bitField0_ |= 0x00000100;\n return this;\n }",
"public void add(int add){\n if (!elementOf(add)) {\n int[] added = new int[set.length + 1];\n for(int element = 0; element < set.length; element++){\n added[element] = set[element];\n }\n added[set.length] = add; \n setSet(added);\n added = null;\n }\n }",
"public DomCheckboxGroup<V> addOption(V value, IDisplayString label, boolean preselected) {\n\n\t\tObjects.requireNonNull(value);\n\t\tObjects.requireNonNull(label);\n\n\t\tif (valueMap.isEmpty()) {\n\t\t\tpreselected = true;\n\t\t}\n\n\t\tvar checkbox = new Checkbox(label, preselected).setDisabled(disabled);\n\t\tif (preselected) {\n\t\t\tunselectOthers(checkbox);\n\t\t}\n\n\t\tvalueMap.put(checkbox, value);\n\t\tcheckboxMap.put(value, checkbox);\n\n\t\tappendChild(checkbox);\n\n\t\treturn this;\n\t}",
"public Builder putOptions(\n String key,\n String value) {\n if (key == null) { throw new NullPointerException(); }\n if (value == null) { throw new NullPointerException(); }\n internalGetMutableOptions().getMutableMap()\n .put(key, value);\n return this;\n }",
"public Builder putOptions(\n String key,\n String value) {\n if (key == null) { throw new NullPointerException(); }\n if (value == null) { throw new NullPointerException(); }\n internalGetMutableOptions().getMutableMap()\n .put(key, value);\n return this;\n }",
"public Builder putOptions(\n String key,\n String value) {\n if (key == null) { throw new NullPointerException(); }\n if (value == null) { throw new NullPointerException(); }\n internalGetMutableOptions().getMutableMap()\n .put(key, value);\n return this;\n }",
"public synchronized void updateOptsetOption(String name, ArrayList<OptionSet.Option> options) {\n OptionSet optionSet = findOneOptSetByName(name);\n if (optionSet != null) {\n optionSet.setOpt(options);\n } else {\n System.out.println(\"No optionSet named \" + name + \"in this model !!!\");\n }\n }",
"public V addElement(T t) {\n\t\tif(multiSet.containsKey(t)){\n\t\t\tNumber newValue = ((Integer)multiSet.get(t)) + 1;\n\t\t\tmultiSet.replace(t,(V)newValue);\n\t\t\treturn (V)newValue;\n\t\t}\n\t\tNumber firstValue = 1;\n\t\tmultiSet.put(t,(V)firstValue);\n\t\treturn (V)firstValue;\n\t}",
"public void addOption(String s) {\r\n CircleCADToolState actualState = (CircleCADToolState) _fsm.getPreviousState();\r\n String status = actualState.getName();\r\n\r\n if (status == \"Circle.CenterPointOr3p\") {\r\n if (s.equalsIgnoreCase(PluginServices.getText(this,\"CircleCADTool.3p\"))) {\r\n //Opción correcta.\r\n }\r\n }\r\n }",
"public void addOptionalfileset( final LibFileSet fileSet )\n {\n m_optionalsFilesets.add( fileSet );\n }",
"public void addOption(Option... options) {\n\t\tfor (Option option : options) {\n\t\t\tthis.options.add(option);\n\t\t}\n\t}",
"private void addSNP(String option) {\r\n //System.out.println(option);\r\n //System.out.println(currentSNP == null);\r\n \r\n option = option.trim();\r\n\r\n //System.out.println(\"addSNP(): \" + option);\r\n \r\n SNP currentSNP = getController().getActiveSNP();\r\n if (option.equals(\"null\") || option.equals(\"\") || (currentSNP != null && option.equals(currentSNP.getID()))\r\n || option.contains(\"(not found)\") || option.matches(\".*?\\\\[.*?\\\\]$\")) {\r\n return;\r\n }\r\n //System.out.println(option);\r\n searchSNP(option);\r\n if (getController().getActiveSNP() instanceof VerifiedSNP) {\r\n SNPOptions.add(option + \" [your input]\");\r\n SNPInput.setValue(option);\r\n }\r\n else {\r\n if (!SNPOptions.contains(option + \" (not found)\") && !SNPOptions.contains(option)) {\r\n SNPOptions.add(option + \" (not found)\");\r\n } \r\n SNPInput.setValue(option + \" (not found)\");\r\n currentSNPInputValue = option + \" (not found)\";\r\n System.out.println(\"Setting 'not found'.\");\r\n } \r\n }",
"@Override\r\n\tpublic int addOptionStock(OptionsVO opVO) {\n\t\treturn getSqlSession().update(namespace+\".addOptionStock\", opVO);\r\n\t}",
"public void add(String value) {\n add(value, false);\n }",
"public final void add(@NotNull T value) {\n\t\tObject priorValue;\n\t\tboolean replaced;\n\t\tdo {\n\t\t\tpriorValue = this.value.get();\n\t\t\tObject newValue = combine(priorValue, value);\n\t\t\treplaced = this.value.compareAndSet(priorValue, newValue);\n\t\t} while (!replaced);\n\t}",
"public void setOption(boolean isStructureOption, String key, String value) {\n WrappedOption o = new WrappedOption(key, value, false, true, false);\n if (isStructureOption) {\n if (!structureOptions.contains(o))\n structureOptions.add(new WrappedOption(key, value, false, true, true));\n else {\n List<WrappedOption> options = getAll(structureOptions, key);\n for (WrappedOption wo : options)\n wo.setValue(value);\n }\n } else {\n if (!assignmentOptions.contains(o))\n assignmentOptions.add(new WrappedOption(key, value, false, true, true));\n else {\n List<WrappedOption> options = getAll(assignmentOptions, key);\n for (WrappedOption wo : options)\n wo.setValue(value);\n }\n }\n }",
"public V setValue(V value);",
"public org.xms.g.common.AccountPicker.AccountChooserOptions.Builder setOptionsForAddingAccount(android.os.Bundle param0) {\n throw new java.lang.RuntimeException(\"Not Supported\");\n }",
"@Override\n\tpublic void addChoice(String choice) {\n\t}",
"public void addOption(final PreferencesCategory category) {\n this.category = category;\n\n for (final PreferencesSetting setting : category.getSettings()) {\n if (settings.get(setting) == null) {\n final JComponent component = compFactory.getComponent(setting);\n component.setName(setting.getTitle());\n settings.put(setting, component);\n }\n if (setting.isSet()) {\n addCurrentOption(settings.get(setting));\n } else {\n addAddableOption(settings.get(setting));\n }\n }\n }",
"public void add(Object value) {\n verifyModifiable();\n\n elements.add(value);\n }",
"public void setOption(String name, int value) {\n selectedOptions.put(name, value);\n }",
"public void addOption(String property, Object[] options) {\n\t\taddOption(property, options, false);\n\t}",
"public void addOption(String property, Object[] options, boolean runtime) {\n\t\taddOption(property, Arrays.asList(options), runtime);\n\t}",
"public void addOption(Option o) {\n\t\toptions.add(o);\n\t\tif (isConnected()) {\n\t\t\to.initiate(this);\n\t\t}\n\t}",
"private void setValue(String name, Object value, OptionMap map) {\n if (name.contains(\"_\")) {\n String pcs[] = name.split(\"\\\\_\", 2);\n name = pcs[0];\n OptionMap submap = (OptionMap) map.get(name);\n\n if (submap == null) {\n submap = new OptionMap();\n }\n\n setValue(pcs[1], value, submap);\n map.put(name, submap);\n } else {\n map.put(name, value);\n }\n }",
"public void setSingleSelectValue(String value){\n WebElement select = driver.findElement(singleSelectLocator);\n Select sele = new Select(select);\n sele.selectByIndex(1);\n /*\n actions.click(select).sendKeys(value).build().perform();\n // WebElement datalist = driver.findElement(By.tagName(\"datalist\"));\n \n List<WebElement> allOptions = select.findElements(By.tagName(\"option\"));\n System.out.println(\"#of datalist options: \" + allOptions.size());\n actions.moveToElement(allOptions.get(1)).click().build().perform();\n */\n //shift + tab\n // actions.sendKeys(Keys.TAB).perform();\n WebElement empidField = driver.findElement(inputTextEmpidLocator); \n actions.click(empidField).perform();\n \n }",
"public static void addPartOfSet(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.lang.String value) {\r\n\t\tBase.add(model, instanceResource, PARTOFSET, value);\r\n\t}",
"public void setOption(boolean isStructureOption, String key, boolean value) {\n WrappedOption o = new WrappedOption(key, value, false, true, true);\n if (isStructureOption) {\n if (!structureOptions.contains(o))\n structureOptions.add(new WrappedOption(key, value, false, true, true));\n else {\n List<WrappedOption> options = getAll(structureOptions, key);\n for (WrappedOption wo : options)\n wo.setValue(value);\n }\n } else {\n if (!assignmentOptions.contains(o))\n assignmentOptions.add(new WrappedOption(key, value, false, true, true));\n else {\n List<WrappedOption> options = getAll(assignmentOptions, key);\n for (WrappedOption wo : options)\n wo.setValue(value);\n }\n }\n }",
"protected abstract Set<String> _addToSet(String key, Collection<String> str);",
"public void setValue (String Value);",
"String setValue();",
"public void addOption( final ExtensionAdapter extensionAdapter )\n {\n m_optionals.add( extensionAdapter );\n }",
"public void setValue(Object value);",
"void setValue(V value);",
"@Override\n public void add(K key, V value) {\n if(containsKey(key)){\n List<V> v = getValues(key);\n if(v.contains(value)){return;}\n }\n internalGetValue(key).add(value);\n }",
"public void add(int add) {\r\n value += add;\r\n }",
"public boolean isSet(OPTION option) {\n/* 74 */ return (this.options != null && this.options.contains(option));\n/* */ }",
"public void addOption(String property, List options) {\n\t\taddOption(property, options, false);\n\t}",
"public StringSetFieldBuilder value(final String... value) {\n this.value = new ArrayList<>(Arrays.asList(value));\n return this;\n }",
"public static void addPartOfSet( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(model, instanceResource, PARTOFSET, value);\r\n\t}",
"public void setRentOption(String value) {\n setAttributeInternal(RENTOPTION, value);\n }",
"public void add(String value) {\n root.add(value, true);\n }",
"public void setValue(String value);",
"public void setValue(String value);",
"public void setValue(String value);",
"public void setValue(String value);",
"public boolean add(Object value)\r\n {\r\n if (contains(value))\r\n return false;\r\n root = add(root, value);\r\n return true;\r\n }",
"@Override\n public boolean add(Set<E> e) {\n throw new UnsupportedOperationException(\"Add not supported\");\n }",
"public void addValueLine(String line) {\n\t\tvaluesBuilder.append(line);\n\t\tif (!line.endsWith(NEW_LINE)) {\n\t\t\tvaluesBuilder.append(NEW_LINE);\n\t\t}\n\t\tthis.dirtyAttributes.add(Constants.VALUES);\n\t}",
"public void addValue(Row value)\n\t{\n\t\tallValues.add(value);\n\t}",
"public void addSetProperty(final ConfigSetDTO property) {\n \t\tsetProperties.put(property.getPropertyName(), property);\n \t}",
"public void setValue(Object value) { this.value = value; }",
"public synchronized boolean creatOneOptSet(String name, int size) throws AutoException {\n int index = findIndexOfOptset(name);\n boolean ret = false;\n if (index != -1) { //exist\n optionSet.add(index, new OptionSet(name, size));\n ret = true;\n } else { //not exists\n for (int i = 0; i < this.optionSet.size(); ++i) {\n if (\"\".equals(this.optionSet.get(i).getName())) {\n this.optionSet.set(i, new OptionSet(name, size));\n ret = true;\n break;\n }\n }\n if (!ret) {\n throw new AutoException(3);\n }\n }\n return ret;\n }",
"public void addToCalccusto(Calccusto calccustoValue)\r\n\t{\r\n\t\tgetCalccusto().add(calccustoValue);\r\n\t}",
"public void setValue(String... values) throws DeviceOptionException;",
"public boolean insert(int val) {\r\n return set.add(val);\r\n }",
"protected void addAddableOption(final JComponent setting) {\n settings.inverse().get(setting).setValue(null);\n addOptionPanel.addOption(setting);\n }",
"public void setValue(Object val);",
"static public /*@Nullable*/ C_set_option parse(Parser p) throws ParserException {\n\t\tIKeyword key = p.parseKeyword();\n\t\tif (key == null) return null;\n\t\tIAttributeValue value = p.parseAttributeValue();\n\t\tif (value == null) return null;\n\t\tC_set_option c = new C_set_option(key,value);\n\t\tIResponse.IError r = c.checkOptionType(p.smt(), key, value);\n\t\tif (r == null) return c;\n\t\tp.smt().log.logError(r);\n\t\treturn null;\n\t}"
]
| [
"0.6485531",
"0.6208906",
"0.6208554",
"0.59912586",
"0.5977987",
"0.5963509",
"0.594499",
"0.5864735",
"0.5758042",
"0.5700702",
"0.5699024",
"0.5669565",
"0.56674373",
"0.5628316",
"0.56085336",
"0.5607341",
"0.5575943",
"0.557142",
"0.5571164",
"0.55432963",
"0.551735",
"0.54854286",
"0.5481532",
"0.54704523",
"0.545917",
"0.5441622",
"0.544114",
"0.5435842",
"0.54241806",
"0.54112357",
"0.54062843",
"0.5388781",
"0.5367036",
"0.5347507",
"0.53429806",
"0.53180283",
"0.5290315",
"0.5283833",
"0.5260859",
"0.52199125",
"0.52116966",
"0.5189487",
"0.5187452",
"0.51854694",
"0.51854694",
"0.51854694",
"0.51718396",
"0.516724",
"0.5163017",
"0.51626587",
"0.51565886",
"0.5153037",
"0.51440465",
"0.51348346",
"0.51309824",
"0.51133406",
"0.50875473",
"0.5074839",
"0.50744545",
"0.5034004",
"0.5020529",
"0.5019993",
"0.50050324",
"0.5003373",
"0.49965835",
"0.49758276",
"0.49737012",
"0.4961608",
"0.4949019",
"0.49466974",
"0.49399483",
"0.49277592",
"0.49139464",
"0.49023843",
"0.49001268",
"0.48955512",
"0.48915446",
"0.4891367",
"0.48886025",
"0.4885675",
"0.48831418",
"0.4880198",
"0.48787066",
"0.48785296",
"0.48785296",
"0.48785296",
"0.48785296",
"0.4878256",
"0.48640066",
"0.48407724",
"0.48380885",
"0.48268092",
"0.48136953",
"0.4807717",
"0.48003498",
"0.4796412",
"0.47896263",
"0.47892547",
"0.47885454",
"0.47860366"
]
| 0.6447235 | 1 |
Get the price of the variant | public double getPrice() {
return price;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Double getPrice();",
"double getPrice();",
"double getPrice();",
"double getPrice();",
"public double getPrice();",
"public double getPrice() {\n return price_;\n }",
"public double price() {\n return price;\n }",
"public double getPrice() {\n return price_;\n }",
"String getPrice();",
"public double getPrice() {\r\n return price;\r\n }",
"public double getPrice() {\r\n return price;\r\n }",
"public double getPrice() {\r\n return price;\r\n }",
"public double getPrice() {\r\n return price;\r\n }",
"public double getPrice(){\n\t\t\n\t\treturn price;\n\t}",
"public double getPrice(){\r\n\t\treturn price;\r\n\t}",
"public double getPrice() {\n return price;\n }",
"public double getPrice(){\n\t\t\treturn price;\n\t\t}",
"public Double getPrice() {\r\n return price;\r\n }",
"public double getPrice(){\n\t\treturn price;\n\t}",
"@Override\r\n\tpublic double getPrice() {\n\t\treturn price;\r\n\t}",
"public Double getPrice() {\n return price;\n }",
"public Double getPrice() {\n return price;\n }",
"public double getPrice(){\n\t\treturn this.price;\n\t}",
"public double getPrice(){\n\t\treturn Price; // Return the product's price\n\t}",
"public BigDecimal\tgetPrice();",
"public Double getPrice() {\r\n\t\treturn price;\r\n\t}",
"@Override\n\tpublic int getPrice() {\n\t\treturn product.getPrice();\n\t}",
"public double getPrice()\r\n {\r\n return price;\r\n }",
"public double getPrice() {\n return this.price;\n }",
"public double getPrice() \n\t{\n\t\treturn price;\n\t}",
"public double getPrice() \n\t{\n\t\treturn price;\n\t}",
"public double getPrice()\n {\n \treturn price;\n }",
"public double getOptionPrice()\n {\n return optionPrice;\n }",
"public double getPrice()\n {\n return this.price;\n }",
"public double getPrice() {\n\t\treturn price;\n\t}",
"public double getPrice() {\n\t\treturn price;\n\t}",
"public double getPrice() {\n\t\treturn price;\n\t}",
"public double getPrice() {\n\t\treturn price;\n\t}",
"public double getPrice() {\n\t\treturn price;\n\t}",
"public java.lang.Integer getPrice()\n {\n return price;\n }",
"public Double getProductPrice(String product){\n return services.get(product);\n }",
"public float getPrice() {\n return price;\n }",
"public float getPrice() {\n return price;\n }",
"public float getPrice() {\n return price;\n }",
"public Double getPrice() {\n\t\treturn price;\n\t}",
"public double getPrice() {\r\n\t\treturn this.price;\r\n\t}",
"public double getPrice() {\r\n\t\treturn this.price;\r\n\t}",
"public double getPrice() {\r\n\t\treturn this.price;\r\n\t}",
"public BigDecimal getPrice() {\r\n return price;\r\n }",
"public BigDecimal getPrice() {\r\n return price;\r\n }",
"abstract public double getPrice();",
"public Integer getPrice() {\r\n return price;\r\n }",
"public Integer getPrice() {\r\n return price;\r\n }",
"public double getPrice()\n\t{\n\t\treturn this.price;\n\t}",
"public BigDecimal getPrice() {\n return price;\n }",
"public BigDecimal getPrice() {\n return price;\n }",
"public BigDecimal getPrice() {\n return price;\n }",
"public BigDecimal getPrice() {\n return price;\n }",
"public BigDecimal getPrice() {\n return price;\n }",
"public double getPrice()\n {\n return price;\n }",
"public Integer getPrice() {\n return price;\n }",
"public Integer getPrice() {\n return price;\n }",
"public Integer getPrice() {\n return price;\n }",
"public Integer getPrice() {\n return price;\n }",
"public Number getPrice() {\n return (Number)getAttributeInternal(PRICE);\n }",
"public double getPrice()\r\n {\r\n return this.price;\r\n }",
"public int getPrice() {\n return price_;\n }",
"BigDecimal getPrice();",
"@Override\n\tpublic double getPrice() {\n\t\treturn constantPO.getPrice();\n\t}",
"public double getPrice() {\n\t\treturn this.price;\n\t\t\n\t}",
"public Float getPrice() {\r\n return price;\r\n }",
"public double getPrice() {\n\t\treturn this.price;\n\t}",
"public String getPrice() {\n return price;\n }",
"public String getPrice() {\n return price;\n }",
"public Float getPrice() {\n return price;\n }",
"public BigDecimal getPrice()\n\t{\n\t\treturn price;\n\t}",
"public double getProductPrice() {\n return productPrice;\n }",
"public float getPrice() {\n return _price;\n }",
"long getPrice();",
"protected float getPrice() {\n\t\t\treturn price;\n\t\t}",
"public long getPrice() {\n return price;\n }",
"public double getPrice() {\n\t\t\treturn price;\n\t\t}",
"@Override\n public double getPrice(){\n \n return currentPrice; \n }",
"public Long getPrice() {\n return price;\n }",
"public java.math.BigDecimal getPrice() {\n return price;\n }",
"public int getPrice() {\n return price_;\n }",
"public int getPrice ( ) {\n return price;\n }",
"int getPrice();",
"public double getPotatoesPrice();",
"public java.lang.String getPrice() {\n return price;\n }"
]
| [
"0.74129224",
"0.73763853",
"0.73763853",
"0.73763853",
"0.7367344",
"0.73234403",
"0.7304251",
"0.72854304",
"0.725964",
"0.7237044",
"0.7237044",
"0.7237044",
"0.7237044",
"0.7236023",
"0.7233612",
"0.72215563",
"0.722009",
"0.7206072",
"0.7205577",
"0.72006786",
"0.7195761",
"0.7195761",
"0.71915215",
"0.7177474",
"0.7172732",
"0.71595377",
"0.71575046",
"0.7150578",
"0.71497387",
"0.7144613",
"0.7144613",
"0.71253186",
"0.71116006",
"0.71096355",
"0.7105207",
"0.7105207",
"0.7105207",
"0.7105207",
"0.7105207",
"0.7103611",
"0.7102153",
"0.7100944",
"0.7100944",
"0.7100944",
"0.7097455",
"0.70914507",
"0.70914507",
"0.70914507",
"0.70886874",
"0.70886874",
"0.7086221",
"0.70832926",
"0.70832926",
"0.7081567",
"0.7080473",
"0.7080473",
"0.7080473",
"0.7080473",
"0.7080473",
"0.7076631",
"0.7074393",
"0.7074393",
"0.7074393",
"0.7074393",
"0.70731467",
"0.7068043",
"0.7067921",
"0.70651877",
"0.70557314",
"0.705281",
"0.70487225",
"0.7047132",
"0.70428187",
"0.70428187",
"0.7039533",
"0.703473",
"0.7025784",
"0.7019018",
"0.70176226",
"0.7015897",
"0.6999025",
"0.69974905",
"0.69876397",
"0.6961323",
"0.6954793",
"0.6932925",
"0.6917201",
"0.691273",
"0.6903616",
"0.6881092"
]
| 0.72028875 | 25 |
Check if the variant is in stock | public boolean inStock() {
return inStock;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean checkStock(){\n int i;\n int inventorySize = inventory.size();\n int count = 0;\n for(i = 0; i < inventorySize; i++){\n count = count + inventory.get(i).getStock();\n\n }\n //System.out.println(\"Count was: \" + count);\n if(count < 1){\n return false;\n }else{\n return true;\n }\n }",
"public boolean getStockState() {\n\t\treturn inStock;\n\t}",
"private boolean inStock(Drink drink) {\n HashMap<Ingredient, Integer> recipe = drink.getIngredients();\n for (Ingredient i : recipe.keySet()) {\n if (recipe.get(i) > stock.get(i)) {\n drinks.put(drink, false);\n return false;\n }\n }\n drinks.put(drink, true);\n return true;\n }",
"boolean hasQuantity();",
"@Test\n public void checkStockWithoutProduction () {\n\n player.playRole(new Trader(stockGlobal,1));\n assertEquals(true,stockGlobal.getStockResource(TypeWare.INDIGO)==initialIndigoInStock);\n\n }",
"public static boolean isStocks() {\n\n // first of all check if there are Stocks available in the system:\n try {\n Engine.getStocks();\n return true;\n } catch (IOException e) {\n MessagePrint.println(MessagePrint.Stream.ERR, e.getMessage());\n return false;\n }\n }",
"private boolean ItemStockCalculation(String item) {\n\t\tboolean state = false;\n\t\tif (item.equals(\"F\")) {\n\t\t\tstate = getSetUpMachine().getFork_stock() > 0 ? true : false;\n\t\t\tif (state) {\n\t\t\t\tint mainStock = getSetUpMachine().getStock_size();\n\t\t\t\tgetSetUpMachine().setStock_size(mainStock - 1);\n\n\t\t\t\tint stock = getSetUpMachine().getFork_stock();\n\n\t\t\t\tgetSetUpMachine().setFork_stock(stock - 1);\n\n\t\t\t}\n\t\t} else if (item.equals(\"N\")) {\n\t\t\tstate = getSetUpMachine().getNapkin_stock() > 0 ? true : false;\n\t\t\tif (state) {\n\t\t\t\tint stock = getSetUpMachine().getNapkin_stock();\n\t\t\t\tint mainStock = getSetUpMachine().getStock_size();\n\t\t\t\tgetSetUpMachine().setStock_size(mainStock - 1);\n\t\t\t\tgetSetUpMachine().setNapkin_stock(stock - 1);\n\t\t\t}\n\t\t} else if (item.equals(\"S\")) {\n\t\t\tstate = getSetUpMachine().getSpoon_stock() > 0 ? true : false;\n\t\t\tif (state) {\n\t\t\t\tint stock = getSetUpMachine().getSpoon_stock();\n\t\t\t\tint mainStock = getSetUpMachine().getStock_size();\n\t\t\t\tgetSetUpMachine().setStock_size(mainStock - 1);\n\t\t\t\tgetSetUpMachine().setSpoon_stock(stock - 1);\n\t\t\t}\n\t\t} else if (item.equals(\"K\")) {\n\t\t\tstate = getSetUpMachine().getKnife_stock() > 0 ? true : false;\n\t\t\tif (state) {\n\t\t\t\tint stock = getSetUpMachine().getKnife_stock();\n\t\t\t\tint mainStock = getSetUpMachine().getStock_size();\n\t\t\t\tgetSetUpMachine().setStock_size(mainStock - 1);\n\t\t\t\tgetSetUpMachine().setKnife_stock(stock - 1);\n\t\t\t}\n\t\t}\n\t\treturn state;\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 }",
"private boolean validInventory(int min, int max, int stock) {\r\n\r\n boolean isTrue = true;\r\n\r\n if (stock < min || stock > max) {\r\n isTrue = false;\r\n alertDisplay(4);\r\n }\r\n\r\n return isTrue;\r\n }",
"@Override\n\tpublic boolean updateStock(int quant) {\n\t\treturn false;\n\t}",
"public boolean checkStock(String symbol) {\n\t\tfor(Stock s : stockList) {\n\t\t\tif(s.getSymbol().equals(symbol))\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"private boolean inventoryValid(int min, int max, int stock) {\n\n boolean isValid = true;\n\n if (stock < min || stock > max) {\n isValid = false;\n AlartMessage.displayAlertAdd(4);\n }\n\n return isValid;\n }",
"void checkInventoryExists() {\n\n MrnInventory[] checkInventory =\n new MrnInventory(survey.getSurveyId()).get();\n inventoryExists = false;\n if (checkInventory.length > 0) {\n inventoryExists = true;\n } // if (checkInventory.length > 0)\n\n\n }",
"public boolean isBuyable();",
"boolean hasExchangeprice();",
"boolean hasVolume();",
"boolean hasOpenedInventory(Player player);",
"public boolean inStock(String title, int quantity) {\n // Search for the book...if found, adjust the quantity. \n // otherwise, Book not in the BookStore.\n for (int i =0; i<books.length; i++) \n {\n if (title.equals(books[i].getTitle())) \n {\n if (quantity <= books[i].getQuantity()) \n {\n return true;\n }\n else \n {\n return false;\n }\n }\n }\n return false;\n\n }",
"@Test(expected = InsufficientStockException.class)\n\tpublic void testInventoryCheckOnAddingItemsToShoppingCart() throws InsufficientStockException {\n\t\tShoppingCartAggregate shoppingCartAggregate = storeFrontService.getStoreFront()\n\t\t\t\t.getShoppingCounter(SHOPPING_COUNTER_NAME).get().startShoppingCart(CUSTOMER_NAME);\n\n\t\tBigDecimal orderQuantity = TestProductInventory.iphoneInventory.getAvailableStock().add(new BigDecimal(1));\n\t\tshoppingCartAggregate.addToCart(TestProduct.phone.getProductId(), orderQuantity);\n\n\t}",
"public static boolean checkSensorState()\n\t{\n\t\tboolean state = false;\n\t\ttry\n\t\t{\t\n\t\t\t\tfor (SensorData sData : sCollect.getList())\n\t\t\t\t{\n\t\t\t\t\tif (sData.getId().equals(ConnectionManager.getInstance().currentSensor(0).getSerialNumber()))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(sData.getState().equals(Constants.SENSOR_STATE_STOCK))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstate = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t}catch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\t\treturn state;\n\t}",
"boolean hasHadithVolumeNo();",
"private boolean DeriveStockWith_FundIsAvailable() {\n\t\tif (getFunds() > 0) {\n\t\t\tif (calculateInputStock_Items() > getFunds()) {\n\t\t\t\tSystem.err.println(\"Insufficient Funds, Cannot restock\");\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t\t// available funds can accommodate input stock requirement\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.err.println(\"Insufficient Funds\");\n\t\t}\n\t\treturn false;\n\t}",
"boolean hasPrice();",
"boolean hasPrice();",
"boolean hasPrice();",
"public boolean test(FluidVolume volume) {\n\t\treturn volume.test(getFluid()) && volume.hasAvailable(getAmount());\n\t}",
"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}",
"private boolean checkVolume(Order otherOrder) {\n\t\treturn getVolume() == otherOrder.getVolume();\n\t}",
"boolean isInvoiced();",
"private void checkSold(JComponent parent) {\n if (itemSelected.isSold()) {\n auctionItemList.removeItem(itemSelected);\n userItemList.removeItem(itemSelected);\n playSound();\n JOptionPane.showMessageDialog(parent, \"Congratulations on your purchase!\");\n updateJList();\n scrollPane.setViewportView(list);\n updateLabels();\n } else {\n JOptionPane.showMessageDialog(parent, \"Bid placed on \" + itemSelected.getItemName() + \"!\");\n currentBidLabel.setText(\"Current bid: $\" + itemSelected.getCurrentBid());\n }\n }",
"private void refreshStock(){\n storeStock = sysMgr.getStock(sysMgr.getLoginId());\n ArrayList<Stock> nonEmpty = new ArrayList<>();\n for(Stock i : storeStock)\n if(i.getQuantity() != 0)\n nonEmpty.add(i);\n storeStock = nonEmpty;\n }",
"@java.lang.Override\n public boolean hasInventoryItemData() {\n return inventoryItemCase_ == 3;\n }",
"public int reservedBeanBagsInStock() {\n int ReservedStock = 0;\r\n // Loop through every object in the \"stockList\" object array list.\r\n for (int i = 0; i < stockList.size(); i++) {\r\n // If the current beanBag in the \"stockList\"ches reserved state boolean is true.\r\n if (((BeanBag) stockList.get(i)).getReserved()) {\r\n // Increment the \"ReservedStock\" integer by 1.\r\n ReservedStock = ReservedStock + 1;\r\n }\r\n }\r\n // Return the value of the \"ReservedStock\" integer.\r\n return ReservedStock;\r\n }",
"private void checkProductAvailability()\n\t{\n\n\t\tprodMsg = \"\";\n\t\tcartIsEmpty = false;\n\n\t\tMap <String,Product> products = getProducts();\n\n\t\tint qtyRequested, qtyAvailable;\n\n\t\t// Check for unavailable products\n\t\tfor ( Product p : shoppingCart.getProducts().keySet() )\n\t\t{\n\t\t\tfor ( String s : products.keySet() )\n\t\t\t{\n\t\t\t\tif ( products.get(s).getName().equals(p.getName()) )\n\t\t\t\t{\n\t\t\t\t\t// Modify product to write to file\n\t\t\t\t\tqtyRequested = shoppingCart.getProducts().get(p);\n\t\t\t\t\tqtyAvailable = products.get(s).getQtyAvailable();\n\n\t\t\t\t\tif ( qtyAvailable < qtyRequested )\n\t\t\t\t\t\tunavailableProds.put(p, new ArrayList <>(Arrays.asList(qtyRequested, qtyAvailable)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Show warning\n\t\tif ( !unavailableProds.isEmpty() )\n\t\t{\n\t\t\tprodMsg = \"The cart products were not available anymore in the requested quantity, only the available quantity has been bought:\\n\\n\";\n\n\t\t\tfor ( Product p : unavailableProds.keySet() )\n\t\t\t{\n\t\t\t\tprodMsg += p.getName() + \": requested: \" + unavailableProds.get(p).get(0) + \", available: \"\n\t\t\t\t\t\t+ unavailableProds.get(p).get(1) + \"\\n\";\n\n\t\t\t\tif ( unavailableProds.get(p).get(1) == 0 )\n\t\t\t\t\tshoppingCart.removeProduct(p);\n\t\t\t\telse\n\t\t\t\t\tshoppingCart.getProducts().replace(p, unavailableProds.get(p).get(1));\n\t\t\t}\n\n\t\t\tif ( shoppingCart.getProducts().size() == 0 )\n\t\t\t{\n\t\t\t\tcartIsEmpty = true;\n\t\t\t\tprodMsg = \"All of your products were not available anymore for purchase: payment cancelled.\\nPlease select some new products.\";\n\t\t\t}\n\t\t}\n\t}",
"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 }",
"public GiftCardProductQuery stockStatus() {\n startField(\"stock_status\");\n\n return this;\n }",
"public boolean isSold() {\n return sold;\n }",
"public ArrayList<Stock> getAvaiableStock (){\n\t\treturn inventory;\n\t}",
"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 }",
"boolean isSetValueQuantity();",
"@java.lang.Override\n public boolean hasInventoryItemData() {\n return inventoryItemCase_ == 3;\n }",
"public boolean isItemAvailable(String itemName) {\n\t\tfor (Item item : itemsInStock) {\n\t\t\tif (item.name.equals(itemName) && item.amount >= 1) {\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"public String getSupStockStatus() {\n return supStockStatus;\n }",
"boolean hasGoodsType();",
"public boolean hasProduct(ProductBarcode code);",
"boolean hasSingleBet();",
"private boolean inventoryVerify(int min, int max, int stock) {\r\n\r\n boolean invBetween = true;\r\n\r\n if (stock < min || stock > max) {\r\n invBetween = false;\r\n //LOGICAL ERROR: Inventory value error\r\n errorLabel.setVisible(true);\r\n errorTxtLabel.setText(\"Inventory must be less than Max and greater than Min.\");\r\n errorTxtLabel.setVisible(true);\r\n }\r\n\r\n return invBetween;\r\n }",
"@Test(expected = InsufficientInventoryException.class)\n\tpublic void testTypeBackOrderWhenOutOfStock() {\n\t\tassertInventoryWithAvailabilityCriteria(AvailabilityCriteria.AVAILABLE_FOR_BACK_ORDER);\n\t}",
"boolean hasTradeCurrency();",
"public int getStock(){\n\t\treturn Stock; // Return the product's stock\n\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 }",
"boolean hasItemStorage();",
"public boolean showInventory() {\n\n // removes products of 0 quantity\n for (int k = 0; k < this.getInventorySize(); k++) {\n\n if (this.getProduct(k).getQuantity() == 0) {\n this.removeProduct(this.getProduct(k));\n k --;\n }\n }\n return (this.getInventorySize() != 0);\n }",
"final boolean isValidCartQty() {\n Map<Integer, ReturnedItemDTO> cartMap = returnTable.getIdAndQuantityMap();\n for (Entry<Integer, ReturnedItemDTO> entry : cartMap.entrySet()) {\n ReturnedItemDTO ret = entry.getValue();\n int qty = ret.qty;\n int damageStatus = ret.damageStatus;\n if (qty > 0 && damageStatus > 0) {\n return true;\n }\n }\n return false;\n\n }",
"@Override\r\n\tpublic List prodStockseach() {\n\t\treturn adminDAO.seachProdStock();\r\n\t}",
"public void isPurchased(Player player) {\n\t}",
"@Override\n\tpublic int getStock() {\n\t\treturn 2;\n\t}",
"public boolean buyItem(Product n){\n\n if (balance.buyItem(n.getPrice()) == true & n.getQuantity() != 0 & vending_balance != 0) {\n validPurchase = true; // valid purchase was made\n vending_balance = 0; // resets vending balance to 0\n n.setQuantity(); // product quantity is -1\n return true;\n }\n\n else { // if quantity is 0 or balance is does not meet or exceed product's price\n return false;\n }\n }",
"public void setLowStock(boolean lowStock)\r\n\t{\r\n\t\tthis.lowStock = lowStock;\r\n\t\tif(this.lowStock)\r\n\t\t{\r\n\t\t\tnotifyObserver();\r\n\t\t}\r\n\t}",
"protected boolean isVolumeOn(int minVal){\n AudioManager audio = (AudioManager) getSystemService(Context.AUDIO_SERVICE);\n int currentVolume = audio.getStreamVolume(AudioManager.STREAM_MUSIC);\n if (currentVolume < minVal){\n printMessege(\"אנא הגבר/י את צלילי המדיה במכשיר שלך\");\n return false;\n }\n return true;\n }",
"private String getStock() {\n\t\treturn stock;\n\t}",
"boolean haveMBQuant()\n {\n return ((mbType & QUANT) != 0);\n }",
"@Override\n public boolean checkAvailability(BasketEntryDto basketEntryDto) {\n // Add communication to product micro service here for product validation\n return Boolean.TRUE;\n }",
"public boolean needsRepair() {\n if (id == 5509) {\n return false;\n }\n return inventory.contains(id + 1);\n }",
"public boolean use() throws UnavailableObjectException {\r\n\t\tInventory inventory = Game.getInstance().getInventory();\r\n\t\tinventory.take(id);\r\n\t\treturn inventory.available(id);\r\n\t}",
"boolean hasBracksSelected();",
"public boolean checkInventory(int serialNum, int qty){\n \n //create a boolean var and set to false- change to true only if there is enough of requested inventory\n boolean enoughInventory = false;\n \n //loop through all Inventory\n for(int i=0; i<this.items.size(); i++){\n //check if inventoryItem has matching serialNumber with specified serialNum\n if(this.items.get(i).getSerialNum()==serialNum){\n //if serial numbers match, check if inventoryItem has enough in stock for requested order\n if(this.items.get(i).getQty() >= qty){\n enoughInventory = true; //if quantity in inventory is greater than or equal to requested quantity there is enough\n }\n }\n }\n \n //return enoughInventory- will be false if no serial number matched or if there was not enough for requested qty\n return enoughInventory;\n \n }",
"boolean hasCampaignprice();",
"private boolean canBuy(BuildingType x) {\r\n return gameDetails.buildingsStats.get(x).price <= myself.energy;\r\n }",
"public List<AbstractProduct> getoutOfStock() {\n return outOfStock;\n }",
"public boolean isBearish(){\n return (Double.compare(this.open, this.close) > 0) ? true : false;\r\n }",
"@Test(expected = InsufficientInventoryException.class)\n\tpublic void testTypePreOrderWhenOutOfStock() {\n\t\tassertInventoryWithAvailabilityCriteria(AvailabilityCriteria.AVAILABLE_FOR_PRE_ORDER);\n\t}",
"private boolean validaCompra() {\n\n List<Purchase> purchasesList = billingClient.queryPurchases(INAPP).getPurchasesList();\n if (purchasesList != null && !purchasesList.isEmpty()) {\n for (Purchase purchase : purchasesList) {\n if (purchase.getSku().equals(skuId)) {\n return true;\n }\n }\n }\n return false;\n\n }",
"public boolean isAvailable(){\r\n // return statement\r\n return (veh == null);\r\n }",
"public static boolean inventoryIsFull() {\n\t\treturn Inventory.getCount() == 28;\n\t}",
"public int getStock(int pid) {\nfor (ProductStockPair pair : productCatalog) {\nif (pair.product.id == pid) {\nreturn pair.stock;\n}\n}\nreturn -1;\n}",
"public int getStock() {\n\t\treturn stock;\n\t}",
"@Test(expected = InsufficientInventoryException.class)\n\tpublic void testTypeInStockWhenOutOfStock() {\n\t\tfinal Inventory inventory = new InventoryImpl();\n\t\tinventory.setUidPk(INVENTORY_UID_1000);\n\t\tinventory.setQuantityOnHand(QUANTITY_OF_10);\n\t\tinventory.setReservedQuantity(QUANTITY_OF_5);\n\t\tinventory.setWarehouseUid(WAREHOUSE_UID);\n\n\t\tfinal ProductSku productSku = new ProductSkuImpl();\n\t\tproductSku.setSkuCode(SKU_CODE);\n\t\tfinal ProductImpl product = new ProductImpl();\n\t\tproduct.setAvailabilityCriteria(AvailabilityCriteria.AVAILABLE_WHEN_IN_STOCK);\n\t\tproduct.setGuid(PRODUCT);\n\t\tproductSku.setProduct(product);\n\n\t\tinventory.setSkuCode(productSku.getSkuCode());\n\n\t\tfinal Order order = new OrderImpl();\n\t\torder.setUidPk(ORDER_UID_2000);\n\t\torder.setStoreCode(store.getCode());\n\t\tfinal PhysicalOrderShipmentImpl shipment = getMockPhysicalOrderShipment();\n\t\tfinal OrderSku orderSku = new OrderSkuImpl();\n\t\torderSku.setProductSku(productSku);\n\t\torderSku.setQuantity(QUANTITY_OF_5);\n\t\tshipment.addShipmentOrderSku(orderSku);\n\t\torder.addShipment(shipment);\n\n\t\tfinal IndexNotificationService indexNotificationService = context.mock(IndexNotificationService.class);\n\t\tproductInventoryManagementService.setIndexNotificationService(indexNotificationService);\n\n\t\tfinal InventoryKey inventoryKey = new InventoryKey();\n\t\tinventoryKey.setSkuCode(SKU_CODE);\n\t\tinventoryKey.setWarehouseUid(WAREHOUSE_UID);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tInventoryJournalImpl inventoryJournal = new InventoryJournalImpl();\n\t\t\t\toneOf(beanFactory).getBean(INVENTORY_JOURNAL); will(returnValue(inventoryJournal));\n\t\t\t\toneOf(beanFactory).getBean(EXECUTION_RESULT); will(returnValue(new InventoryExecutionResultImpl()));\n\t\t\t\tatLeast(1).of(beanFactory).getBean(ALLOCATION_RESULT); will(returnValue(new AllocationResultImpl()));\n\n\t\t\t\tallowing(inventoryDao).getInventory(SKU_CODE, WAREHOUSE_UID); will(returnValue(inventory));\n\t\t\t\tallowing(inventoryJournalDao).getRollup(inventoryKey); will(returnValue(new InventoryJournalRollupImpl()));\n\t\t\t\toneOf(inventoryJournalDao).saveOrUpdate(inventoryJournal); will(returnValue(new InventoryJournalImpl()));\n\n\t\t\t\toneOf(indexNotificationService).addNotificationForEntityIndexUpdate(IndexType.PRODUCT, product.getUidPk());\n\t\t\t}\n\t\t});\n\n\t\tallocationService.processAllocationEvent(orderSku, AllocationEventType.ORDER_PLACED, \"\", QUANTITY_OF_5, \"\");\n\n\t\tfinal InventoryJournalRollupImpl ijRollup2 = new InventoryJournalRollupImpl();\n\t\tijRollup2.setAllocatedQuantityDelta(QUANTITY_5);\n\n\t\tfinal InventoryJournalDao inventoryJournalDao2 = context.mock(InventoryJournalDao.class, INVENTORY_JOURNAL_DAO2);\n\t\tjournalingInventoryStrategy.setInventoryJournalDao(inventoryJournalDao2);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tallowing(inventoryJournalDao2).getRollup(inventoryKey); will(returnValue(ijRollup2));\n\t\t\t}\n\t\t});\n\n\t\tInventoryDto inventoryDto = productInventoryManagementService.getInventory(inventory.getSkuCode(), inventory.getWarehouseUid());\n\t\tassertEquals(QUANTITY_OF_10, inventoryDto.getQuantityOnHand());\n\t\tassertEquals(0, inventoryDto.getAvailableQuantityInStock());\n\t\tassertEquals(QUANTITY_OF_5, inventoryDto.getAllocatedQuantity());\n\n\t\tfinal Inventory inventory3 = assembler.assembleDomainFromDto(inventoryDto);\n\t\tfinal InventoryDao inventoryDao3 = context.mock(InventoryDao.class, \"inventoryDao3\");\n\t\tjournalingInventoryStrategy.setInventoryDao(inventoryDao3);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tatLeast(1).of(inventoryDao3).getInventory(SKU_CODE, WAREHOUSE_UID); will(returnValue(inventory3));\n\t\t\t}\n\t\t});\n\n\t\tallocationService.processAllocationEvent(orderSku, AllocationEventType.ORDER_PLACED, \"\", QUANTITY_OF_5, \"\");\n\t}",
"public Integer getStock() {\n return stock;\n }",
"public boolean hasSong(){\n return numSongs < MAX_SONG;\n }",
"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 boolean hasProduct() {\n return product_ != null;\n }",
"public boolean lowQuantity(){\r\n if(getToolQuantity() < 40)\r\n return true;\r\n return false;\r\n }",
"private void checking() {\n\n System.out.println(cart);\n\n for (Order o : cart) {\n if (o.getOrderedProduct().getPrice()!= productRepository.getOne(o.getOrderedProduct().getId()).getPrice()){\n System.out.println(\"product will be updated\");\n deleteFromCart(o.getOrderedProduct().getId());\n addToCart(o.getOrderedProduct().getId(),o.getCount());\n }\n }\n }",
"@Override\n public boolean active() {\n return !Inventory.isFull();\n }",
"@Override\n\t@Transactional(readOnly=true)\n\tpublic boolean isProductAvailavle(String productId) {\n\t\treturn true;\n\t}",
"public boolean stockPurchase(String symbol, int quantity) {\n\t\tDouble price = APIController.getStockPrice(symbol);\n\t\tif(price < 0) return false; //There was some error / wrong symbol entered\n\t\tif(price * quantity > cash) return false; //Cannot afford this quantity of stocks \n\n\t\tthis.cash -= price * quantity;\n\t\t\n\t\t//if stockList does not contain this stock\n\t\tif(!checkStock(symbol)) {\n\t\t\tstockList.add(new Stock(symbol, quantity, price));\n\t\t}\n\t\telse { //Else just get the stock and update teh quantity\n\t\t\tStock s = getStock(symbol);\n\t\t\ts.update(quantity);\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"public String getStock() {\n return stock;\n }",
"public String getStock() {\n return stock;\n }",
"public static boolean isSongAvailable(Song details) {\n\t\tSongsDao dao = new SongsDao();\n\t\treturn dao.isSongAlreadyAvailable(details);\n\t}",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Stock)) {\n return false;\n }\n Stock other = (Stock) object;\n if ((this.goodsID == null && other.goodsID != null) || (this.goodsID != null && !this.goodsID.equals(other.goodsID))) {\n return false;\n }\n return true;\n }",
"@Override\n\tpublic boolean watchlistStock(int investorId) {\n\t\tad.watchlistStock( investorId);\n\t\treturn true;\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 }",
"boolean hasPokeStorage();",
"@Override\n\tpublic void addInStock(Stock s) {\n\t\n\t}",
"private boolean isSameQuant(PlainGraph graph, String quantLvl, String prevQuant) {\n PlainNode q = graphNodeMap.get(graph).get(quantLvl);\n PlainNode prevQ = graphNodeMap.get(graph).get(prevQuant);\n\n String quantName = graph.inEdgeSet(q).stream().filter(e -> e.target() == e.source()).map(e -> e.label().text()).collect(Collectors.toList()).get(0);\n String prevQuantName = graph.inEdgeSet(prevQ).stream().filter(e -> e.target() == e.source()).map(e -> e.label().text()).collect(Collectors.toList()).get(0);\n\n return quantName.equals(prevQuantName);\n }",
"public int getStock() {\n return stock;\n }",
"private void checkQPairIsInstalled() {\n try {\n if (!isPackageInstalled(getString(R.string.qpair_package))) {\n createDialog(getString(R.string.dialog_qpair_not_installed), getString(R.string.dialog_qpair_not_installed_description), new OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n openPlayStore(getString(R.string.qpair_package));\n }\n });\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"boolean hasBuyDescribe();",
"@Override\n\tpublic boolean placeOrder(ArrayList<CartItems> cart_items) {\n\t\tboolean b = false;\n\t\tif(checkStock.isAvailable(cart_items)) {\n\t\t\tb=true;\n\t\t}\n\t\treturn b;\n\t}"
]
| [
"0.726514",
"0.6949389",
"0.6706022",
"0.67051554",
"0.65851927",
"0.65094256",
"0.6474859",
"0.6472044",
"0.6393402",
"0.63223994",
"0.6308892",
"0.6226986",
"0.61548513",
"0.61326575",
"0.6132483",
"0.61159945",
"0.61006474",
"0.60539377",
"0.59802216",
"0.59483546",
"0.59464324",
"0.5929649",
"0.5910686",
"0.5910686",
"0.5910686",
"0.5902769",
"0.5863699",
"0.5852599",
"0.584503",
"0.5816998",
"0.5813703",
"0.58123654",
"0.5794534",
"0.57923913",
"0.57816344",
"0.5780354",
"0.5775687",
"0.5766237",
"0.57659674",
"0.5764877",
"0.57602376",
"0.5726896",
"0.57259774",
"0.5720282",
"0.57165504",
"0.5710686",
"0.5698326",
"0.5684253",
"0.5678905",
"0.56767905",
"0.56744885",
"0.5671825",
"0.5669738",
"0.5666768",
"0.5645585",
"0.5634352",
"0.5631248",
"0.5629588",
"0.56004006",
"0.559445",
"0.5593353",
"0.5590873",
"0.55875677",
"0.5582594",
"0.557212",
"0.5572067",
"0.5568864",
"0.55615896",
"0.55541414",
"0.55533105",
"0.5533647",
"0.55333966",
"0.5530854",
"0.55307114",
"0.55299497",
"0.55266106",
"0.552138",
"0.5518174",
"0.55146825",
"0.5513557",
"0.55093515",
"0.5508787",
"0.5500887",
"0.549781",
"0.54915977",
"0.5484735",
"0.547925",
"0.54656386",
"0.54656386",
"0.5463268",
"0.54589087",
"0.5448978",
"0.54470974",
"0.5439332",
"0.54386765",
"0.542883",
"0.54268503",
"0.5422036",
"0.5421086",
"0.54210377"
]
| 0.7419601 | 0 |
create pristine level instance | public static final void initLevel()
{
current = new JARLevel();
//assign blocks, enemies, the player and all items
current.iWalls = new JARWall[]
{
new JARWall( 30 + 256, current.iLevelBoundY - 310 + 64, JARWall.WALL_STONE_2, LibRect2D.Elevation.ENone, PassThrough.EYes ),
new JARWall( 30 + 384, current.iLevelBoundY - 320 + 64, JARWall.WALL_STONE_2, LibRect2D.Elevation.ENone, PassThrough.EYes ),
new JARWall( 30 + 512, current.iLevelBoundY - 300 + 64, JARWall.WALL_STONE_2, LibRect2D.Elevation.ENone, PassThrough.EYes ),
new JARWall( 30 + 640, current.iLevelBoundY - 290 + 64, JARWall.WALL_STONE_2, LibRect2D.Elevation.ENone, PassThrough.EYes ),
new JARWall( 30 + 768, current.iLevelBoundY - 280 + 64, JARWall.WALL_STONE_2, LibRect2D.Elevation.ENone, PassThrough.EYes ),
new JARWall( 30 + 896, current.iLevelBoundY - 270 + 64, JARWall.WALL_STONE_2, LibRect2D.Elevation.ENone, PassThrough.EYes ),
new JARWall( 30 + 1152, current.iLevelBoundY - 260 + 64, JARWall.WALL_STONE_2, LibRect2D.Elevation.ENone, PassThrough.EYes ),
new JARWall( 30 + 1408, current.iLevelBoundY - 250 + 64, JARWall.WALL_STONE_2, LibRect2D.Elevation.ENone, PassThrough.EYes ),
new JARWall( 30 + 1664, current.iLevelBoundY - 240 - 32, JARWall.WALL_STONE_2, LibRect2D.Elevation.ENone, PassThrough.EYes ),
new JARWall( 30 + 1664, current.iLevelBoundY - 240 + 0, JARWall.WALL_STONE_2, LibRect2D.Elevation.ENone, PassThrough.EYes ),
new JARWall( 30 + 1664, current.iLevelBoundY - 240 + 32, JARWall.WALL_STONE_2, LibRect2D.Elevation.ENone, PassThrough.EYes ),
new JARWall( 30 + 1664, current.iLevelBoundY - 240 - 2 * 32, JARWall.WALL_STONE_2, LibRect2D.Elevation.ENone, PassThrough.EYes ),
new JARWall( 30 + 1664, current.iLevelBoundY - 240 - 3 * 32, JARWall.WALL_STONE_2, LibRect2D.Elevation.ENone, PassThrough.EYes ),
new JARWall( 30 + 1664, current.iLevelBoundY - 240 - 4 * 32, JARWall.WALL_STONE_2, LibRect2D.Elevation.ENone, PassThrough.EYes ),
new JARWall( 30 + 1920, current.iLevelBoundY - 230 + 64, JARWall.WALL_STONE_2, LibRect2D.Elevation.ENone, PassThrough.EYes ),
new JARWall( 30 + 2100, current.iLevelBoundY - 230 + 64, JARWall.WALL_STONE_2, LibRect2D.Elevation.ENone, PassThrough.EYes ),
new JARWall( 66, current.iLevelBoundY - 324, JARWall.WALL_STONE_2, LibRect2D.Elevation.ENone, PassThrough.ENo ),
new JARWall( 0, current.iLevelBoundY - 64, JARWall.WALL_STONE_1, LibRect2D.Elevation.ENone, PassThrough.ENo ),
new JARWall( 128, current.iLevelBoundY - 64, JARWall.WALL_STONE_1, LibRect2D.Elevation.ENone, PassThrough.ENo ),
new JARWall( 256, current.iLevelBoundY - 64, JARWall.WALL_STONE_1, LibRect2D.Elevation.ENone, PassThrough.ENo ),
new JARWall( 384, current.iLevelBoundY - 64, JARWall.WALL_STONE_1, LibRect2D.Elevation.ENone, PassThrough.ENo ),
new JARWall( 512, current.iLevelBoundY - 64, JARWall.WALL_STONE_1, LibRect2D.Elevation.ENone, PassThrough.ENo ),
new JARWall( 640, current.iLevelBoundY - 64, JARWall.WALL_STONE_1, LibRect2D.Elevation.ENone, PassThrough.ENo ),
new JARWall( 768, current.iLevelBoundY - 64, JARWall.WALL_STONE_2, LibRect2D.Elevation.ENone, PassThrough.ENo ),
new JARWall( 896, current.iLevelBoundY - 64, JARWall.WALL_STONE_2, LibRect2D.Elevation.ENone, PassThrough.ENo ),
new JARWall( 1024, current.iLevelBoundY - 64, JARWall.WALL_STONE_2, LibRect2D.Elevation.ENone, PassThrough.ENo ),
new JARWall( 1152, current.iLevelBoundY - 64, JARWall.WALL_STONE_2, LibRect2D.Elevation.ENone, PassThrough.ENo ),
new JARWall( 1280, current.iLevelBoundY - 64, JARWall.WALL_STONE_2, LibRect2D.Elevation.ENone, PassThrough.ENo ),
new JARWall( 1408, current.iLevelBoundY - 64, JARWall.WALL_STONE_2, LibRect2D.Elevation.ENone, PassThrough.ENo ),
new JARWall( 1536, current.iLevelBoundY - 64, JARWall.WALL_STONE_3, LibRect2D.Elevation.ENone, PassThrough.ENo ),
new JARWall( 1664, current.iLevelBoundY - 64, JARWall.WALL_STONE_3, LibRect2D.Elevation.ENone, PassThrough.ENo ),
new JARWall( 1792, current.iLevelBoundY - 64, JARWall.WALL_STONE_3, LibRect2D.Elevation.ENone, PassThrough.ENo ),
new JARWall( 1920, current.iLevelBoundY - 64, JARWall.WALL_STONE_3, LibRect2D.Elevation.ENone, PassThrough.ENo ),
new JARWall( 2048, current.iLevelBoundY - 64, JARWall.WALL_STONE_3, LibRect2D.Elevation.ENone, PassThrough.ENo ),
new JARWall( 2176, current.iLevelBoundY - 64, JARWall.WALL_STONE_3, LibRect2D.Elevation.ENone, PassThrough.ENo ),
};
current.iEnemies = new JARPlayer[]
{
/*
new JARPlayer( 500, GameObjectType.EEnemy, JARPlayerTemplate.ENEMY_WEAK ),
new JARPlayer( 1000, GameObjectType.EEnemy, JARPlayerTemplate.ENEMY_WEAK ),
new JARPlayer( 1500, GameObjectType.EEnemy, JARPlayerTemplate.ENEMY_WEAK ),
new JARPlayer( 2000, GameObjectType.EEnemy, JARPlayerTemplate.ENEMY_WEAK ),
new JARPlayer( 2500, GameObjectType.EEnemy, JARPlayerTemplate.ENEMY_STRONG ),
new JARPlayer( 3000, GameObjectType.EEnemy, JARPlayerTemplate.ENEMY_STRONG ),
new JARPlayer( 3500, GameObjectType.EEnemy, JARPlayerTemplate.ENEMY_STRONG ),
new JARPlayer( 4000, GameObjectType.EEnemy, JARPlayerTemplate.ENEMY_STRONG ),
new JARPlayer( 4500, GameObjectType.EEnemy, JARPlayerTemplate.ENEMY_STRONG )
*/
};
current.iPlayer = new JARPlayer( 0, GameObjectType.EPlayer, JARPlayerTemplate.USER );
current.iItems = new JARItem[]
{
//new JARItem( 50, 700, JARItemType.ITEM_TYPE_COIN ),
//new JARItem( 150, 700, JARItemType.ITEM_TYPE_COIN ),
//new JARItem( 250, 700, JARItemType.ITEM_TYPE_COIN ),
new JARItem( 550, 700, JARItemType.ITEM_TYPE_CHERRY ),
new JARItem( 650, 700, JARItemType.ITEM_TYPE_CHERRY ),
new JARItem( 750, 700, JARItemType.ITEM_TYPE_CHERRY ),
new JARItem( 1050, 700, JARItemType.ITEM_TYPE_APPLE ),
new JARItem( 1150, 700, JARItemType.ITEM_TYPE_APPLE ),
new JARItem( 1250, 700, JARItemType.ITEM_TYPE_APPLE ),
new JARItem( 1550, 700, JARItemType.ITEM_TYPE_ORANGE ),
new JARItem( 1650, 700, JARItemType.ITEM_TYPE_ORANGE ),
new JARItem( 1750, 700, JARItemType.ITEM_TYPE_ORANGE ),
new JARItem( 2050, 700, JARItemType.ITEM_TYPE_PEAR ),
new JARItem( 2150, 700, JARItemType.ITEM_TYPE_PEAR ),
new JARItem( 2250, 700, JARItemType.ITEM_TYPE_PEAR ),
new JARItem( 2550, 700, JARItemType.ITEM_TYPE_STRAWBERRY ),
new JARItem( 2650, 700, JARItemType.ITEM_TYPE_STRAWBERRY ),
new JARItem( 2750, 700, JARItemType.ITEM_TYPE_STRAWBERRY ),
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void createNewLevel(int level);",
"public void createLevel() {\n room = 1;\n currentLevelFinish = false;\n createRoom();\n }",
"public void create(){}",
"public void create() {\n\t\t\n\t}",
"Reproducible newInstance();",
"WithCreate withLevel(LockLevel level);",
"private void initNewLevel() {\n\t\tmaze = new Maze(\"maze.xml\");\n\t\tPoint position = Cell.positionOfCell(26, 13);\n\t\tposition.x += 7;\n\t\tif (highScore.getScore() == 0)\n\t\t\tpacman = new Pacman(maze, position, maze.cellAt(26, 13),\n\t\t\t\t\tDirection.RIGHT, 3);\n\t\telse\n\t\t\tpacman = new Pacman(maze, position, maze.cellAt(26, 13),\n\t\t\t\t\tDirection.RIGHT, pacman.getNumberOfLives());\n\t\tinitGhosts();\n\n\t\ttimer.stop();\n\t\tlevelStartTimer.restart();\n\t}",
"@Override\r\n\tpublic void create() {\n\t\t\r\n\t}",
"@Override\n\tpublic void create() {\n\t\t\n\t}",
"Stone create();",
"@Override\n\tpublic void create () {\n\n\t}",
"@Override\n\tpublic void create() {\n\n\t}",
"Instance createInstance();",
"@Override\n\tpublic LightTank create() {\n\t\treturn new LightTank(GameContext.getGameContext());\n\t}",
"void create( State state );",
"Snapshot create();",
"TopLevel createTopLevel();",
"@Override\r\n\tpublic void create() {\n\r\n\t}",
"public abstract void create();",
"@SubL(source = \"cycl/stacks.lisp\", position = 1818) \n public static final SubLObject create_stack() {\n return clear_stack(make_stack(UNPROVIDED));\n }",
"P createP();",
"@Override\n protected void createEntity() {\n ProjectStatus status = createProjectStatus(5);\n setEntity(status);\n }",
"public Level create(Long id,String level){\n \n System.out.println(\"level\"+level);\n Level l=new Level(1,\"Beginner\");\n Level l2=new Level(2,\"Intermediate\");\n Level l3=new Level(3,\"professional\");\n levelRepository.save(l);\n levelRepository.save(l2);\n return levelRepository.save(l3);\n \n }",
"protected abstract S createDefault();",
"public void initLevel(){\n baseLevel = levelCreator.createStaticGrid(this.levelFile);\n dynamicLevel= levelCreator.createDynamicGrid(levelFile);\n colDetector = new CollisionHandler();\n goalTiles = baseLevel.getTilePositions('x');\n }",
"public Level(String levelToEdit)\r\n\t{\r\n\t\tmakeCommonObjects();\r\n\t\tgrid = new Grid(levelToEdit);//CHANGE GRID COORDINATES WHILE MAKING A NEW LEVEL\r\n\t\tmakeButton = new GameSprite(Player.filename);\r\n\t\tmakeButton.setPosition(0,0);\r\n\t\tplayer = new Player(100, 420);\r\n\t\tbackground = new Background(1, grid);\r\n\t}",
"public void spawnNew() {\n\t\tif (tier> 1) {\n\t\t\ttier--;\n\t\t\thealth = tier;\n\t\t\tdamage = tier;\n\t\t\tspeed = 5;\n\t\t\timg = getImage(updateImage(tier)); // converted getImage to protected b/c it wasn't accessible by Balloon class (child class)\n\t\t}\n\t\telse {\n\t\t\tisAlive = false;\n\t\t\tdeletePath();\t\t\t\n\t\t}\n\t}",
"Entity() {\n this.root = null;\n // As soon as the program is run, we sould start off with 1000 directory\n for (int temp = 0; temp < SIZE; temp++) {\n create(temp);\n }\n\n }",
"Lehrkraft createLehrkraft();",
"T create();",
"T create();",
"private Object createInstance() throws InstantiationException, IllegalAccessException {\n\t\treturn classType.newInstance();\n\t}",
"Elevage createElevage();",
"private void constructLevel(int level){\n gamePanel.removeAll();\n GridLayout layout = new GridLayout(grid.length,grid[0].length);\n gamePanel.setLayout(layout);\n gamePanel.setBackground(Color.BLACK);\n gamePanel.setFocusable(true);\n gamePanel.requestFocusInWindow();\n gamePanel.updateUI();\n }",
"public void create () {\n // TODO random generation of a ~100 x 100 x 100 world\n }",
"@Override\n protected T createInstance() throws Exception {\n return this.isSingleton() ? this.builder().build() : XMLObjectSupport.cloneXMLObject(this.builder().build());\n }",
"static RodUpgrades newInstance(int num) {\n RodUpgrades f = new RodUpgrades();\n\n return f;\n }",
"public CreateStatus()\n {\n super(new DataMap(), null);\n }",
"SAProcessInstanceBuilder createNewInstance(SProcessInstance processInstance);",
"Klassenstufe createKlassenstufe();",
"private SpTreeMan() {\n }",
"private void initLevel () \n {\n score = 0;\n scoreVisual = score;\n level = new Level(Constants.LEVEL_01);\n cameraHelper.setTarget(level.bird);\n initPhysics();\n }",
"private PerksFactory() {\n\n\t}",
"public void level1() {\n\t\tlevel = new Level(1); //Create Level object, passing 1 to constructor for level 1\n\t\tplayer = new Player(100, 100); //Set player y position); //Create player object, place in middle of screen, position will later be determined by level png\n\t}",
"@Override\n\tpublic Model create() {\n\t\treturn null;\n\t}",
"Lab create();",
"private void initLevel(){\r\n\t\tBetterSprite doodleSprite = (BetterSprite)(getGroup(\"doodleSprite\").getSprites()[0]);\r\n\t\tinitControls(doodleSprite);\r\n\t\tinitEvents();\r\n\t}",
"public void startNewLevel()\n\t{\n\t\tstopThreads();\n\t\tplanet = new Planet(750,600);\n\t\tship = new Ship(20.0,750,600,planet);\n\t\tplanet.increaseLevel();\n\t\tbuttonPanel.update(ship,planet);\n\t\tgamePanel.update(ship,planet);\n\t\trestartThreads();\n\t}",
"@Override\n \t\t\t\tpublic void doNew() {\n \n \t\t\t\t}",
"private SystemInfo() {\r\n // forbid object construction \r\n }",
"protected Entity() {\n UID = GEN_COUNT;\n GEN_COUNT++;\n }",
"@Override\n\tpublic Structure createNew() {\n\t\treturn new FloorSwitch();\n\t}",
"protected SceneGraphObjectState createState( SceneGraphObject obj, Controller control ) {\n\n return control.createState( obj );\n }",
"public void init(Level level) {\r\n\t\tthis.level = level;\r\n\t}",
"public Instance() {\n }",
"public static RelativeUserScoreTab emptyNewInstance() {\n RelativeUserScoreTab spt = new RelativeUserScoreTab();\n // put the argument in a bundle that the fragment can use\n Bundle args = new Bundle();\n args.putInt(\"userRank\", -1);\n args.putInt(\"highestRank\", -1);\n args.putParcelableArray(\"scoreList\", new ScoreEntry[0]);\n spt.setArguments(args);\n return spt;\n }",
"public static synchronized void constructInstance()\n {\n SmartDashboard.putBoolean( TelemetryNames.Elbow.status, false );\n\n if ( ourInstance != null )\n {\n throw new IllegalStateException( myName + \" Already Constructed\" );\n }\n ourInstance = new ElbowSubsystem();\n\n SmartDashboard.putBoolean( TelemetryNames.Elbow.status, true );\n }",
"private PumpManager() { }",
"@Override\n public void create() {\n theMap = new ObjectSet<>(2048, 0.5f);\n generate();\n }",
"private SceneGraphObject createNodeFromSuper( String className ) {\n\tSceneGraphObject ret;\n\n String tmp = this.getClass().getName();\n String superClass = tmp.substring( tmp.indexOf(\"state\")+6, tmp.length()-5 );\n\n System.err.println(\"Unable to create node \"+className+\" attempting Java3D superclass \"+superClass );\n\n\ttry {\n Class state = Class.forName( superClass );\n\n\t ret = (SceneGraphObject)state.newInstance();\n\n\t} catch(ClassNotFoundException e) {\n\t throw new SGIORuntimeException( \"No Such Class \"+\n\t\t\t\t\t\tclassName );\n\t} catch( IllegalAccessException exce ) {\n\t throw new SGIORuntimeException( \"Broken State class for \"+\n\t\t\t\t\t\tclassName+\" - IllegalAccess\" );\n\t} catch( InstantiationException excep ) {\n\t throw new SGIORuntimeException( \"Unable to instantiate class \"+\n\t\t\t\t\t\tclassName );\n\t}\n\n return ret;\n }",
"public static XPerformanceProblem createHierarchy() {\n\t\tXPerformanceProblem hierarchy = RawHierarchyFactory.getInstance().createEmptyHierarchy();\n\n\t\treturn hierarchy;\n\t}",
"public void createTree() {\n\t\taddNodeToParent(nodeMap);\n\t}",
"public Hashtree<V> build() {\n return new UnmodifiableMerkleTree<>(tree);\n }",
"public RBTree() {\r\n\t\t// well its supposed just create a new Red Black Tree\r\n\t\t// Maybe create a new one that does a array of Objects\r\n\t}",
"public void initForAddNew() {\r\n\r\n\t}",
"public Level() {\n\t\tthis.availableCount = NUM_SPOTS;\n\t}",
"private static void makeInstance(){\n\n if(settingsFile==null){\n settingsFile = new MetadataFile(SETTINGS_FILE_PATH);\n }\n\n if(!settingsFile.exists()){\n settingsFile.create();\n }\n\n if(tagListeners==null){\n tagListeners= new HashMap<>();\n }\n\n }",
"private synchronized static void createInstance(){\r\n\t\tif (instance == null){\r\n\t\t\tinstance = new Casino();\r\n\t\t}\r\n\t}",
"ManagementLockObject create();",
"public static Locks create() {\n\t\tString uuid = ObjectId.get().toHexString();\n\t\treturn owner( uuid );\n\t}",
"@Override\r\n\tpublic T createInstance() {\r\n\t\ttry {\r\n\t\t\treturn getClassType().newInstance();\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogger.getLogger(AbstractCRUDBean.class.getSimpleName()).log(Level.ALL, e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"private HierarchyFactory ()\n {\n }",
"void newGame() {\n\t\tstate = new model.State () ; \n\t\tif(host != null ) host.show(state) ; \n\t}",
"public State(){}",
"Level makeLevel(String levelName) {\r\n return new Level(levelName);\r\n }",
"public LevelSelect() {\n\t\t\n\t}",
"public void createNewFarm(){\n this.mFarm = new Farm();\n this.loaded = false;\n }",
"@Override\n public LocalGame createLocalGame() {\n return new LocalGameActual();\n }",
"public Pokemon() { // if nothing was provided i'm just gonna give \n\t\tthis.name = \"\"; //its name empty String\n\t\tthis.level = 1; // and level is level 1\n\t}",
"@Override\n\tpublic void newGame(String level) {\n\t\tmanager.newGame(level);\n\t}",
"protected abstract SelfChainingDataObject getNewIndependentInstance();",
"public static void init() {\n File dir = new File(\".gitlet\");\n if (dir.exists()) {\n System.out.println(\"a gitlet version-control system already exists in the current directory.\");\n return;\n } else {\n dir.mkdir();\n File next = new File(\".gitlet/heads/master.ser\");\n File currentBranch = new File(\".gitlet/current\");\n File heads = new File(\".gitlet/heads\");\n File currentname = new File(\".gitlet/current/master.ser\");\n File staged = new File(\".gitlet/staged\");\n File commits = new File(\".gitlet/commits\");\n File unstaged = new File(\".gitlet/unstaged\");\n File blobs = new File(\".gitlet/blobs\");\n try {\n heads.mkdir();\n staged.mkdir();\n commits.mkdir();\n unstaged.mkdir();\n currentBranch.mkdir();\n blobs.mkdir();\n Commit initial = new Commit(\"initial commit\", null, null);\n FileOutputStream fileOut = new FileOutputStream(next);\n ObjectOutputStream objectOut = new ObjectOutputStream(fileOut);\n objectOut.writeObject(initial);\n Files.copy(next.toPath(), currentname.toPath());\n } catch (IOException e) {\n return;\n }\n }}",
"T create() throws PersistException;",
"public void newlevel() {\n\t\tblack = new Background(COURT_WIDTH, COURT_HEIGHT); // reset background\n\t\tcannon = new Cannon(COURT_WIDTH, COURT_HEIGHT); // reset cannon\n\t\tdeadcannon = null;\n\t\tbullet = null;\n\t\tshot1 = null;\n\t\tshot2 = null;\n\t\t// reset top row\n\t\tfor (int i = 0; i < alien1.length; i++) {\n\t\t\talien1[i] = new Alien(COURT_WIDTH, COURT_HEIGHT);\n\t\t\talien1[i].pos_x = alien1[i].pos_x + 30*i;\n\t\t\talien1[i].v_x = level + alien1[i].v_x;\n\t\t}\n\t\t// reset second row\n\t\tfor (int i = 0; i < alien2.length; i++) {\n\t\t\talien2[i] = new Alien2(COURT_WIDTH, COURT_HEIGHT);\n\t\t\talien2[i].pos_x = alien2[i].pos_x + 30*i;\n\t\t\talien2[i].v_x = level + alien2[i].v_x;\n\t\t}\n\t\t// reset third row\n\t\tfor (int i = 0; i < alien3.length; i++) {\n\t\t\talien3[i] = new Alien3(COURT_WIDTH, COURT_HEIGHT);\n\t\t\talien3[i].pos_x = alien3[i].pos_x + 30*i;\n\t\t\talien3[i].v_x = level + alien3[i].v_x;\n\t\t}\n\t}",
"private void createRootNode()\r\n {\r\n root = new Node(\"root\", null);\r\n Node.clear();\r\n }",
"public LevelMenu(int levelmenu) {}",
"public InitialState() {\r\n\t\t}",
"private void populateLevel() {\r\n\r\n\r\n\t\t// Setup Goal\r\n\t\tJsonValue goalVal = levelAssets.get(\"goal\");\r\n\t\tfloat gWidth = goalTile.getRegionWidth()/scale.x;\r\n\t\tfloat gHeight = goalTile.getRegionHeight()/scale.y;\r\n\t\tfloat gX = goalVal.get(\"pos\").getFloat(0) + gWidth / 2;\r\n\t\tfloat gY = goalVal.get(\"pos\").getFloat(1) + gHeight / 2;\r\n\t\tgoalDoor = new DoorModel(gX, gY, gWidth, gHeight);\r\n\t\tgoalDoor.setBodyType(BodyDef.BodyType.StaticBody);\r\n\t\tgoalDoor.setDensity(constants.get(\"goal\").getFloat(\"density\", 0));\r\n\t\tgoalDoor.setFriction(constants.get(\"goal\").getFloat(\"friction\", 0));\r\n\t\tgoalDoor.setRestitution(constants.get(\"goal\").getFloat(\"restitution\", 0));\r\n\t\tgoalDoor.setSensor(true);\r\n\t\tgoalDoor.setDrawScale(scale);\r\n\t\tgoalDoor.setTexture(goalTile);\r\n\t\tgoalDoor.setName(\"goal\");\r\n\t\taddObject(goalDoor);\r\n\t\taddObjectTo(goalDoor, LevelCreator.allTag);\r\n\r\n\t\t// Get default values\r\n\t\tJsonValue defaults = constants.get(\"defaults\");\r\n\t\tJsonValue objs = levelAssets.get(\"objects\");\r\n\r\n\t\t//group platform constants together for access in following for-loop\r\n\t\tTextureRegion[] xTexture = {lightTexture, darkTexture, allTexture,\r\n\t\t\tlightningLightTexture, lightningDarkTexture, lightningAllTexture,\r\n\t\t\trainLightTexture, rainDarkTexture, rainAllTexture,\r\n\t\t\t\tcrumbleLightTexture, crumbleDarkTexture, crumbleAllTexture};\r\n\r\n\t\tTextureRegion[] reducedXTexture = {lightTexture, darkTexture, allTexture,\r\n\t\t\t\tlightningLightTextureReduced, lightningDarkTextureReduced, lightningAllTextureReduced,\r\n\t\t\t\trainLightTextureReduced, rainDarkTextureReduced, rainAllTextureReduced,\r\n\t\t\t\tcrumbleLightTextureReduced, crumbleDarkTextureReduced, crumbleAllTextureReduced};\r\n\r\n\r\n\t\t// Setup platforms\r\n\t\tfor(int i=0; i < (objs != null ? objs.size : 0); i++)\r\n\t\t{\r\n\t\t\tJsonValue obj = objs.get(i);\r\n\r\n\t\t\t// Get platform attributes\r\n\t\t\tint platformType = obj.get(\"type\").asInt();\r\n\t\t\tint property = obj.get(\"property\") == null ? 0: obj.get(\"property\").asInt();\r\n\t\t\tJsonValue platformArgs = obj.get(\"positions\");\r\n\t\t\tJsonValue pathsArgs = obj.get(\"paths\");\r\n\r\n\t\t\tfor (int j = 0; j < platformArgs.size; j++) {\r\n\t\t\t\tfloat[] bounds = platformArgs.get(j).asFloatArray();\r\n\t\t\t\tfloat x = bounds[0], y = bounds[1], width = bounds[2], height = bounds[3];\r\n\t\t\t\tTextureRegion newXTexture;\r\n\t\t\t\tTextureRegion crumbleTexture = null;\r\n\t\t\t\tTexture originalTexture = null;\r\n\t\t\t\ttry {\r\n\t\t\t\t\t// temporary - need to refactor asset directory\r\n\t\t\t\t\tJsonValue assetName = obj.get(\"assetName\");\r\n\t\t\t\t\tint assetIndex = assetName.asInt();\r\n\t\t\t\t\tnewXTexture = new TextureRegion(tutorial_signs[assetIndex]);\r\n\t\t\t\t} catch(Exception e) {\r\n\t\t\t\t\tint platIdx = platformType-1+(property - 1)*3;\r\n\t\t\t\t\tint crumbleIdx = platIdx + 3;\r\n\t\t\t\t\tnewXTexture = new TextureRegion(xTexture[platIdx]);\r\n\t\t\t\t\toriginalTexture = newXTexture.getTexture();\r\n\t\t\t\t\t// For crumble animation\r\n\t\t\t\t\tif (platIdx > 5) {\r\n\t\t\t\t\t\tcrumbleTexture = new TextureRegion(xTexture[crumbleIdx]);\r\n//\t\t\t\t\t\tcrumbleTexture.setRegion(0, 0, width, height);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// If the platform size is the same as the spritesheet size\r\n\t\t\t\t\tif (originalTexture.getWidth() > 32 && width%(originalTexture.getWidth()/32) == 0) {\r\n\t\t\t\t\t\tnewXTexture = new TextureRegion(reducedXTexture[platIdx]);\r\n\t\t\t\t\t\toriginalTexture = newXTexture.getTexture();\r\n\t\t\t\t\t\tif (platIdx > 5) {\r\n\t\t\t\t\t\t\tcrumbleTexture = new TextureRegion(reducedXTexture[crumbleIdx]);\r\n//\t\t\t\t\t\t\tcrumbleTexture.setRegion(0, 0, width, height);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n//\t\t\t\t\tnewXTexture.setRegion(0, 0, width, height);\r\n\t\t\t\t}\r\n\t\t\t\tPlatformModel platformModel = new PlatformModel(bounds, platformType, property, newXTexture, scale,\r\n\t\t\t\t\t\tdefaults.getFloat( \"density\", 0.0f ), defaults.getFloat( \"friction\", 0.0f ) ,\r\n\t\t\t\t\t\tdefaults.getFloat( \"restitution\", 0.0f ), originalTexture, crumbleTexture);\r\n\t\t\t\tplatformModel.setTag(platformType);\r\n\t\t\t\tplatformModel.setProperty(property);\r\n\t\t\t\taddObject(platformModel);\r\n\t\t\t\taddObjectTo(platformModel, platformType);\r\n\t\t\t\t//TODO: Moving platforms\r\n\r\n\r\n\t\t\t\tif (pathsArgs != null) {\r\n\t\t\t\t\tfloat[] paths = pathsArgs.get(j).asFloatArray();\r\n\r\n\t\t\t\t\t//** Moving platform if > 1 path or different path from starting position\r\n\t\t\t\t\tif (hasValidPath(x, y, paths)) {\r\n\t\t\t\t\t\tplatformModel.setBodyType(BodyDef.BodyType.KinematicBody);\r\n\t\t\t\t\t\tmovingObjects.add(platformModel);\r\n\r\n\t\t\t\t\t\tPooledList<Vector2> pathList = new PooledList<>();\r\n\t\t\t\t\t\tfor (int k = 0; k < paths.length; k+=2) {\r\n\t\t\t\t\t\t\tpathList.add(new Vector2(paths[k], paths[k+1]));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tfloat velocity = 3;\r\n\r\n\t\t\t\t\t\tplatformModel.setGravityScale(0);\r\n\t\t\t\t\t\tplatformModel.setPaths(pathList);\r\n\t\t\t\t\t\tplatformModel.setVelocity(velocity);\r\n\r\n\t\t\t\t\t\tmovingObjects.add(platformModel);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// This world is heavier\r\n\t\tworld.setGravity( new Vector2(0,defaults.getFloat(\"gravity\",0)) );\r\n\r\n\t\t// Set level background index\r\n\t\tint backgroundTextureIndex = levelAssets.get(\"background\").asInt();\r\n\t\tbackgroundLightTexture = backgrounds[backgroundTextureIndex - 1];\r\n\t\tbackgroundDarkTexture = backgrounds[backgroundTextureIndex];\r\n\t\tbackgroundTexture = backgroundLightTexture;\r\n\r\n\t\t// Initialize background animations\r\n\t\tactualBackgroundTexture = backgroundTexture.getTexture();\r\n\t\tbackgroundEntirePixelWidth = actualBackgroundTexture.getWidth();\r\n\t\tbackgroundNumAnimFrames = (int)(backgroundEntirePixelWidth/backgroundFramePixelWidth);\r\n\t\tbackgroundAnimator = new FilmStrip(backgroundTexture,1, backgroundNumAnimFrames, backgroundNumAnimFrames);\r\n\t\tbackgroundAnimator.setFrame(0);\r\n\t\tbackgroundAnimeframe = 0;\r\n\t\tbackgroundOrigin = new Vector2(backgroundAnimator.getRegionWidth()/2.0f, backgroundAnimator.getRegionHeight()/2.0f);\r\n\r\n\t\t// Set level bounds\r\n\t\twidthUpperBound = levelAssets.get(\"dimensions\").getInt(0);\r\n\t\theightUpperBound = levelAssets.get(\"dimensions\").getInt(1);\r\n\r\n\t\t// Setup Somni\r\n\r\n\t\tJsonValue somniVal = levelAssets.get(\"somni\");\r\n\t\tfloat sWidth = somniTexture.getRegionWidth()/scale.x;\r\n\t\tfloat sHeight = somniTexture.getRegionHeight()/scale.y;\r\n\t\tfloat sX = somniVal.get(\"pos\").getFloat(0) + sWidth / 2;\r\n\t\tfloat sY = somniVal.get(\"pos\").getFloat(1) + sHeight / 2;\r\n\t\tsomni = new CharacterModel(constants.get(\"somni\"), sX, sY, sWidth, sHeight, platformController.somnif, CharacterModel.LIGHT);\r\n\t\tsomni.setDrawScale(scale);\r\n\t\tsomni.setTexture(somniIdleTexture);\r\n\t\tsomni.setFilterData(platformController.somnif);\r\n\t\tsomni.setActive(true);\r\n\t\taddObject(somni);\r\n\t\taddObjectTo(somni, LevelCreator.allTag);\r\n\r\n\r\n\t\t// Setup Phobia\r\n\r\n\t\tJsonValue phobiaVal = levelAssets.get(\"phobia\");\r\n\t\tfloat pWidth = phobiaTexture.getRegionWidth()/scale.x;\r\n\t\tfloat pHeight = phobiaTexture.getRegionHeight()/scale.y;\r\n\t\tfloat pX = phobiaVal.get(\"pos\").getFloat(0) + pWidth / 2;\r\n\t\tfloat pY = phobiaVal.get(\"pos\").getFloat(1) + pHeight / 2;\r\n\t\tphobia = new CharacterModel(constants.get(\"phobia\"), pX, pY, pWidth, pHeight, platformController.phobiaf, CharacterModel.DARK);\r\n\t\tphobia.setDrawScale(scale);\r\n\t\tphobia.setTexture(phobiaIdleTexture);\r\n\t\tphobia.setFilterData(platformController.phobiaf);\r\n\t\taddObject(phobia);\r\n\t\taddObjectTo(phobia, LevelCreator.allTag);\r\n\t\tphobia.setActive(true);\r\n\r\n\t\t// Setup Combined\r\n\r\n\t\tfloat cWidth = combinedTexture.getRegionWidth()/scale.x;\r\n\t\tfloat cHeight = combinedTexture.getRegionHeight()/scale.y;\r\n\r\n\t\tcombined = new CharacterModel(constants.get(\"combined\"), 0, 0, cWidth, cHeight, platformController.combinedf, CharacterModel.DARK);\r\n\t\tcombined.setDrawScale(scale);\r\n\t\tcombined.setTexture(somniPhobiaTexture);\r\n\t\t//combined.setTag();\r\n\t\tcombined.setFilterData(platformController.combinedf);\r\n\t\taddObject(combined);\r\n\t\taddObjectTo(combined, LevelCreator.allTag);\r\n\t\tcombined.setActive(true);\r\n\r\n\t\t//Remove combined\r\n\t\tobjects.remove(combined);\r\n\t\tsharedObjects.remove(combined);\r\n\t\tcombined.setActive(false);\r\n\r\n\t\taction = 0;\r\n\r\n\t\tPreferences prefs = GDXRoot.getPreferences();\r\n\t\tvolume = prefs.contains(\"volume\") ? prefs.getFloat(\"volume\") : defaults.getFloat(\"volume\",\r\n\t\t\t\t1.0f);\r\n//\t\tSystem.out.println(volume);\r\n\r\n\t\tplatformController.applyFilters(objects);\r\n\t}",
"public void createChallenger() {\n\n Random random = new Random();\n if(currentTurn.getActivePlayers().size() != 1) {\n currentTurn.setCurrentPlayer(currentTurn.getActivePlayers().get(random.nextInt(currentTurn.getActivePlayers().size() - 1)));\n } else {\n currentTurn.setCurrentPlayer(currentTurn.getActivePlayers().get(0));\n }\n int i = onlinePlayers.indexOf(currentTurn.getCurrentPlayer());\n stateList.set(i, new Initialized(getCurrentTurn().getCurrentPlayer(), this));\n\n }",
"public void createLevel(){\n for(LevelController rc: rooms ) {\n rc.loadContent();\n rc.setScreenListener(listener);\n rc.setCanvas(canvas);\n }\n }",
"public Level3()\n {\n super();\n }",
"QualityRisk createQualityRisk();",
"protected CreateMachineNodeModel() {\r\n super(0,1);\r\n }",
"Strobo createStrobo();",
"protected SceneGraphObject createNode( Class state ) {\n\tSceneGraphObject ret;\n\n\ttry {\n\t ret = (SceneGraphObject)state.newInstance();\n\n\t //System.err.println(\"Created J3D node for \"+className );\n\t} catch( IllegalAccessException exce ) {\n\t throw new SGIORuntimeException( \"Broken State class for \"+\n\t\t\t\t\t\tstate.getClass().getName()+\" - IllegalAccess\" );\n\t} catch( InstantiationException excep ) {\n\t throw new SGIORuntimeException( \"Broken State class for \"+\n\t\t\t\t\t\tstate.getClass().getName() );\n\t}\n\n\treturn ret;\n }",
"Structure createStructure();",
"public Level(){\n\t\tlevel_image_pattern = \"default\";\n\t\t\n\t\timages = new HashMap <String, Image>();\n\t\tpickables = new ArrayList<Pickable>();\n\t\tplayer_initial_position = new int[2];\n\t\tplayer_initial_position[0] = 0;\n\t\tplayer_initial_position[1] = 0;\n\t\t\n\t\tconfig = Config.getInstance();\n\t\t\n\t}",
"@Override\n public boolean create(Revue objet) {\n return false;\n }",
"public ExcursionEntity() {\n\t}",
"@Override\n\tprotected CoreEntity createNewEntity() {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic ItemInstance createItemInstance() {\n\t\treturn new HpInstance();\r\n\t}"
]
| [
"0.63569164",
"0.62475276",
"0.61970013",
"0.6103494",
"0.6085479",
"0.59703505",
"0.59677505",
"0.5943273",
"0.5834053",
"0.5825372",
"0.5814432",
"0.5806399",
"0.58032596",
"0.5790231",
"0.5759044",
"0.5702422",
"0.5696098",
"0.56821376",
"0.5648802",
"0.56042755",
"0.55740464",
"0.55716175",
"0.5549351",
"0.5510506",
"0.55091596",
"0.5504635",
"0.5504427",
"0.55025023",
"0.5486453",
"0.548352",
"0.548352",
"0.54681087",
"0.54661775",
"0.54554754",
"0.5449446",
"0.5441837",
"0.54278463",
"0.5418264",
"0.54148394",
"0.53922427",
"0.53851444",
"0.53747493",
"0.53690875",
"0.5354776",
"0.53517705",
"0.5350553",
"0.5324423",
"0.5311247",
"0.53055775",
"0.53050524",
"0.5304925",
"0.5302762",
"0.5300365",
"0.5287581",
"0.52780104",
"0.527416",
"0.52692264",
"0.526759",
"0.5267414",
"0.5265481",
"0.5264097",
"0.5263964",
"0.52624476",
"0.5258521",
"0.52507913",
"0.5238145",
"0.52379274",
"0.52325433",
"0.52324796",
"0.52184474",
"0.5205976",
"0.52049965",
"0.5204469",
"0.52043295",
"0.5202139",
"0.5201034",
"0.5192791",
"0.51883405",
"0.5183015",
"0.5181313",
"0.5170782",
"0.51694185",
"0.51637095",
"0.5161478",
"0.51578754",
"0.51573694",
"0.51447207",
"0.51431996",
"0.5141932",
"0.513888",
"0.5137809",
"0.5136628",
"0.5135401",
"0.51332474",
"0.5127778",
"0.5126989",
"0.51261353",
"0.5125522",
"0.5125097",
"0.5123265",
"0.51228637"
]
| 0.0 | -1 |
Draws the bg using parallax scrolling. | public void drawLevelBg( SpriteBatch batch, JARCamera camera )
{
//draw bg image
if ( JARSettings.scrollBgImageParallax )
{
int imgWidth = (int)JARImage.GAME_BG_HILL.getWidth();
int imgHeight = (int)JARImage.GAME_BG_HILL.getHeight();
LibDrawing.drawImage
(
batch,
JARImage.GAME_BG_HILL.getTextureRegion(),
0 - ( imgWidth - JARScreen.width() ) * camera.x / ( iLevelBoundX - JARScreen.width() ),
0 - ( imgHeight - JARScreen.height() ) * camera.y / ( iLevelBoundY - JARScreen.height() ),
LibAnchor.LEFT_TOP
);
}
else
{
//draw image static on center bottom of the canvas
LibDrawing.drawImage( batch, JARImage.GAME_BG_HILL.getTextureRegion(), JARScreen.width() / 2, JARScreen.height(), LibAnchor.CENTER_BOTTOM );
}
//blend the image to make the fg more visible
//Drawing.fillCanvas( "rgba( 255, 255, 255, " + Settings.BG_BLENDING + " )" );
//draw middle layer
if ( JARSettings.scrollBgImageParallax )
{
float imgWidth = JARImage.GAME_BG_TREES.getWidth();
float imgHeight = JARImage.GAME_BG_TREES.getHeight();
float MAGIC_OFF_Y = 100;
LibDrawing.drawImage
(
batch,
JARImage.GAME_BG_TREES.getTextureRegion(),
0 - ( imgWidth - JARScreen.width() ) * camera.x / ( iLevelBoundX - JARScreen.width() ),
0 - 4 * ( imgHeight - JARScreen.height() ) * camera.y / ( iLevelBoundY - JARScreen.height() ) + MAGIC_OFF_Y,
LibAnchor.LEFT_TOP
);
/*
float offsetX = 0;
float offsetY = 3 * imgHeight;
float targetWidth = imgWidth;
float targetHeight = 4 * imgHeight;
LibDrawing.drawImage
(
batch,
JARImage.GAME_BG_TREES,
0 - ( targetWidth - Canvas.WIDTH ) * camera.x / ( iLevelBoundX - Canvas.WIDTH ) + offsetX,
0 - ( targetHeight - Canvas.HEIGHT ) * camera.y / ( iLevelBoundY - Canvas.HEIGHT ) + offsetY,
Anchor.LEFT_TOP
);
*/
}
else
{
//draw image static on center bottom of the canvas
LibDrawing.drawImage( batch, JARImage.GAME_BG_TREES.getTextureRegion(), JARScreen.width() / 2, JARScreen.height(), LibAnchor.CENTER_BOTTOM );
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void render(float delta) {\n Gdx.gl.glClearColor(0.8f, 0.3f, 0.3f, 1);\n Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);\n\n bgViewPort.apply();\n batch.setProjectionMatrix(bgViewPort.getCamera().combined);\n batch.begin();\n batch.draw(background,0,0);\n batch.end();\n\n stage.getViewport().apply();\n stage.draw();\n }",
"private void drawBackground() {\r\n\r\n\t\tGL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\r\n\t\tthis.mc.renderEngine.bindTexture(BACKGROUND_RESOURCE);\r\n\t\tString text = \"Nitro Teleport Waypoints\";\r\n\t\tint posX = (width - SIZE_X) / 2;\r\n\t\tint posY = (height - SIZE_Y) / 2;\r\n\t\tint strWidth = this.fontRendererObj.getStringWidth(text);\r\n\r\n\t\tthis.drawTexturedModalRect(posX, posY, 0, 0, SIZE_X, SIZE_Y);\r\n\t\tthis.drawCenteredString(this.fontRendererObj, text, width / 2, posY - 17, 0xFFFFFF);\r\n\t}",
"public void scrollBG(){\n\n\t\t//Moves First BG Image\n\t\tif(background1.getX() > -700){\n\t\t\tbackground1.setX(background1.getX() - 1);\n\t\t} else { background1.setX(700);\t}\n\t\t\n\t\t//Moves Second BG Image\n\t\tif(background2.getX() > -700){\n\t\t\tbackground2.setX(background2.getX() -1);\n\t\t} else { background2.setX(700);\t}\n\n\t}",
"private void createBackground()\n {\n GreenfootImage background = getBackground();\n background.setColor(Color.BLACK);\n background.fill();\n }",
"public void createBackground() {\n Sprite bg = this.levelInfo.getBackground();\n this.sprites.addSprite(bg);\n }",
"private void updateBackground() {\n\t\tif (World.getObjects().size() < numOfParticles) {\n\t\t\tfloat x = (float) (Math.random()\n\t\t\t\t\t* (Screen.getWidth() + LEDLogo.WIDTH * 2) - LEDLogo.WIDTH), y = (float) (Math\n\t\t\t\t\t.random() * (Screen.getHeight() + LEDLogo.HEIGHT * 2) - LEDLogo.HEIGHT);\n\t\t\tWorld.add(new LEDLogo(x, y, (float) Math.random() * 0.8f + 0.2f));\n\t\t}\n\t}",
"private void drawBackground() {\n\t\timgG2.setColor(Color.BLACK);\n\t\timgG2.fillRect(0,0,512, 512);\n\t\t\n\t\timgG2.setColor(Color.BLACK);\n\t\timgG2.fillRect(128, 0, 256, 512);\n\t}",
"@Override\n protected void paintBackground(Graphics2D g) {\n super.paintBackground(g);\n if (Game.level == 0) {\n g.drawImage(bg, 0, 0, this);\n } else if (Game.level == 1) {\n g.drawImage(bg, 0, 0, this);\n } else if (Game.level == 2) {\n g.drawImage(bg2, 0, 0, this);\n } else if (Game.level == 3) {\n g.drawImage(bg3, 0, 0, this);\n }\n\n }",
"private void initBackground() {\n\t\tfor (int i = numOfParticles - World.getObjects().size() - 1; i >= 0; i--) {\n\t\t\tfloat x = (float) (Math.random()\n\t\t\t\t\t* (Screen.getWidth() + LEDLogo.WIDTH * 2) - LEDLogo.WIDTH), y = (float) (Math\n\t\t\t\t\t.random() * (Screen.getHeight() + LEDLogo.HEIGHT * 2) - LEDLogo.HEIGHT);\n\t\t\tWorld.add(new LEDLogo(x, y, (float) Math.random() * 0.8f + 0.2f));\n\t\t}\n\t}",
"private void drawBG(Batch batch) {\n\t\tbackgroundSprite.setRegion(baybayinAnimation.getKeyFrame(animationCounter, true));\n\t}",
"private void drawBackground(Graphics g){\r\n g.setColor(Colors.ColorAlpha(Colors.blacks,a1));\r\n g.fillRect(0,0,w,h);\r\n if(moving){\r\n g.drawImage(Assets.burst.get((int)((game.counter%8)*0.625)),(int)(w*0.472),(int)(h*0.455),null);\r\n g.drawImage(Assets.sparks.get(((game.counter%20)/2)),(int)(w*0.465),(int)(h*0.345),null);\r\n }\r\n drawWires(g);\r\n }",
"@Override\r\n\tpublic void renderBackground() {\n\r\n\t}",
"private void drawScrollBar() {\r\n\r\n\t _scrollOffsetX = 68;\r\n\t _scrollOffsetY = _resolutionResolver.getScaledHeight() % 2 == 1 ? -33 : -32;\r\n\r\n\t ResourceLocation rl = getContentHeight() > getViewableHeight() ? SLIDER_RESOURCE : SLIDER_FULL_RESOURCE;\r\n\t int ySizeScrollToUse = getContentHeight() > getViewableHeight() ? SIZE_SCROLL_Y : SIZE_SCROLL_FULL_Y;\r\n\t int xTextureSize = getContentHeight() > getViewableHeight() ? 32 : 16;\r\n\t int yTextureSize = getContentHeight() > getViewableHeight() ? 32 : 128;\r\n\t _curScrollValue = getContentHeight() > getViewableHeight() ? _curScrollValue : 0;\r\n\r\n\t\tGL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\r\n\t\tthis.mc.renderEngine.bindTexture(rl);\r\n\t\tint x1 = (width - SIZE_SCROLL_X) / 2;\r\n\t\tint y1 = (height - SIZE_SCROLL_Y) / 2;\r\n\t\t\r\n\t\t// draw the scroll bar\r\n\t\tHubbyUtils.drawTexturedRectHelper(0.0f, x1 + _scrollOffsetX, y1 + _scrollOffsetY + _curScrollValue, SIZE_SCROLL_X, ySizeScrollToUse, 0, 0, (256 / xTextureSize) * SIZE_SCROLL_X, (256 / yTextureSize) * ySizeScrollToUse);\r\n\t}",
"@Override\n public void draw(CSpriteBatch spriteBatch)\n {\n if (isScrollingH || isScrollingV)\n {\n calculateScrollFromSliderPosition();\n }\n super.draw(spriteBatch);\n }",
"private void drawBackground(int position) {\n Background bg = backgrounds.get(position);\n\n // define what portion of images to capture and\n // what coordinates of screen to draw them at\n\n // For the regular bitmap\n Rect fromRect1 = new Rect(0, 0, bg.width - bg.xClip, bg.height);\n Rect toRect1 = new Rect(bg.xClip, bg.startY, bg.width, bg.endY);\n\n // For the reversed background\n Rect fromRect2 = new Rect(bg.width - bg.xClip, 0, bg.width, bg.height);\n Rect toRect2 = new Rect(0, bg.startY, bg.xClip, bg.endY);\n\n //draw the two background bitmaps\n if (!bg.reversedFirst) {\n canvas.drawBitmap(bg.bitmap, fromRect1, toRect1, paint);\n canvas.drawBitmap(bg.bitmapReversed, fromRect2, toRect2, paint);\n } else {\n canvas.drawBitmap(bg.bitmap, fromRect2, toRect2, paint);\n canvas.drawBitmap(bg.bitmapReversed, fromRect1, toRect1, paint);\n }\n\n }",
"@Override\r\n\tpublic void paintComponent (Graphics g) {\r\n\t\tsuper.paintComponent(g);\r\n\t\tg.drawImage(background, 0, 0, 800, 660, null);\r\n\t}",
"@Override\n public void render(float v) {\n game.batch.begin();\n game.batch.draw(game.backgroundImg,0,0,viewport.getWorldWidth(), viewport.getWorldHeight());\n game.batch.end();\n\n stage.act();\n stage.draw();\n\n }",
"protected void drawGuiContainerBackgroundLayer(float f, int x, int y)\n {\n GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\n super.mc.getTextureManager().bindTexture(background);\n int j = (super.width - super.xSize) / 2;\n int k = (super.height - super.ySize) / 2;\n this.drawTexturedModalRect(j, k, 0, 0, super.xSize, super.ySize);\n int i1;\n\n if (this.container.tileEntity.energy > 0)\n {\n i1 = this.container.tileEntity.energy * 14 / 200;\n\n if (i1 > 14)\n {\n i1 = 14;\n }\n\n this.drawTexturedModalRect(j + 62, k + 36 + 14 - i1, 176, 14 - i1, 14, i1);\n }\n\n i1 = this.container.tileEntity.pumpCharge * 41 / 200;\n\n if (i1 > 41)\n {\n i1 = 41;\n }\n\n this.drawTexturedModalRect(j + 99, k + 61 - i1, 176, 55, 12, 5);\n\n if (i1 > 0)\n {\n this.drawTexturedModalRect(j + 99, k + 25 + 41 - i1, 176, 14, 12, i1);\n }\n\n this.drawTexturedModalRect(j + 98, k + 19, 188, 14, 13, 47);\n }",
"@Override\n\tpublic void render(Graphics g) {\n\t\tg.drawImage(Game.background, 0, 0, 5200, 700, null);\n\t}",
"@Override\r\n\tprotected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {\n\t\tResourceLocation texture = new ResourceLocation(\"textures/gui/container/hopper.png\");\r\n\t\tthis.mc.renderEngine.bindTexture(texture);\r\n\t\tint x = (width - xSize) / 2;\r\n\t\tint y = (height - ySize) / 2;\r\n\t\tthis.drawTexturedModalRect(x, y, 0, 0, xSize, ySize);\r\n\t\t\r\n\t\t/*int progress = Math.round(24 * (40 - te.getTime()) / 40.0f);\r\n\t\tif(te.getTime() == 0) {\r\n\t\t\tprogress = 0;\r\n\t\t}\r\n\t\tthis.drawTexturedModalRect(x+79, y+29, 176, 0, 17, progress);*/\r\n\t}",
"public void scrollGround(){ \n\t\t\n\t\t//Moves First ground Image\n\t\tif(ground1.getX() > -700){\n\t\t\tground1.setX(ground1.getX() - 2);\n\t\t} else { ground1.setX(700); }\n\t\t\n\t\t//Moves Second ground Image\n\t\tif(ground2.getX() > -700){\t\n\t\t\tground2.setX(ground2.getX() -2);\n\t\t} else { ground2.setX(700); }\n\t}",
"public void draw() {\n background(0);\n}",
"@Override\n\tpublic void onDraw(final GL10 pGL, final Camera pCamera) {\n\t\tsuper.onDraw(pGL, pCamera);\n\n\t\tfinal float parallaxValueX = this.mParallaxValueX;\n\t\tfinal float parallaxValueY = this.mParallaxValueY;\n\t\tfinal ArrayList<ParallaxBackground2dEntity> parallaxEntities = this.mParallaxEntities;\n\n\t\tfor(int i = 0; i < this.mParallaxEntityCount; i++) {\n\t\t\tparallaxEntities.get(i).onDraw(pGL, parallaxValueX, parallaxValueY, pCamera);\n\t\t}\n\t}",
"@Override\r\n public void paintComponent(Graphics g) {\r\n\r\n //Paint background\r\n g.drawImage (background, 0, 0, null);\r\n }",
"@Override\n public void update(float dt) {\n for (Background background : backgrounds) {\n background.update(dt);\n }\n\n if(backgrounds[firstBackgroundIndex].getPosition().x < -drawingWidth){\n reposition();\n }\n }",
"private Texture createBackground() {\n Pixmap backgroundPixmap = new Pixmap(1, 1, Pixmap.Format.RGBA8888);\n backgroundPixmap.setColor(0, 0, 0, 0.3f);\n backgroundPixmap.fill();\n Texture texture = new Texture(backgroundPixmap);\n backgroundPixmap.dispose();\n return texture;\n }",
"public Background() {\n\t\ttime = 0;\n\t\tRandom rand = new Random();\n\t\trandomGrid = new Vector2[101][101];\n\t\tfor (int i = 0; i < randomGrid.length; i++) {\n\t\t\tfor (int j = 0; j < randomGrid[0].length; j++) {\n\t\t\t\trandomGrid[i][j] = new Vector2(rand.nextFloat() - 0.5f, rand.nextFloat() - 0.5f).nor();\n\t\t\t}\n\t\t}\n\n\t\tshapeRenderer = new ShapeRenderer();\n\t}",
"public void render(PGraphics2D dst, int background){\n int num_points_to_render = ALIVE_PARTICLES;\n int w = dst.width;\n int h = dst.height;\n \n dst.beginDraw();\n dst.blendMode(PConstants.BLEND);\n if(background == 0) dst.blendMode(PConstants.ADD); // works nicely on black background\n \n context.begin();\n shader_particelRender.begin();\n shader_particelRender.uniform2i (\"num_particles\", particles_x, particles_y);\n shader_particelRender.uniform1f (\"point_size\" , point_size);\n shader_particelRender.uniformTexture(\"tex_particles\", tex_particles.src);\n shader_particelRender.drawFullScreenPoints(0, 0, w, h, num_points_to_render);\n shader_particelRender.end();\n context.end(\"ParticelSystem.render\");\n \n dst.endDraw();\n }",
"public void preGameMode(){\n\n ImageIcon icon = new ImageIcon(getClass().getResource(\"/title.jpg\"));\n Image image=icon.getImage();\n background = new PBackground(image);\n this.repaint();\n background.setLayout(null);\n this.add(background);\n\n\n // Prepare the body container\n container = new PanelContainer();\n container.setBounds(230,170, 700, 400);\n background.add(container);\n\n this.setVisible(true);\n }",
"private void drawBackground(Graphics2D g2d, ScreenParameters screenParameters) {\n Composite defaultComposite = g2d.getComposite();\n g2d.setComposite(LOW_OPACITY);\n g2d.drawImage(background, 0, 0, screenParameters.x, screenParameters.y, null);\n g2d.setComposite(defaultComposite);\n }",
"private void draw(float deltaTime) \n\t{\n\t\t//Gets the tile sprites which represent the background.\n\t\tSprite[][] tiles = background.getTiles();\n\t\t\n\t\t//Cycles through each tile and renders it to the world camera.\n\t\tfor(int i = 0; i < tiles.length; i++)\n\t\t{\n\t\t\tfor(int j = 0; j < tiles[i].length; j++)\n\t\t\t{\n\t\t\t\t//Draws the tile sprite using the SpriteBatch instance stored as a member variable of this class.\n\t\t\t\ttiles[i][j].draw(batcher);\n\t\t\t}\n\t\t}\n\t}",
"public void paintComponent(Graphics g)\r\n\t{\r\n\t\t// Set a base background color\r\n\t\tg.setColor(new Color(0,0, 150));\r\n\t\tg.fillRect(0,0, this.getWidth(), this.getHeight());\r\n\t\t\r\n\t\t// Load the background image if its not already \r\n\t\tif(background == null){\r\n\t\t\tbackground = loadImage(\"HaloBackground.jpg\");\r\n\t\t}\r\n\t\t\r\n\t\t// Draw the background image to the screen at a third of the scroll rate\r\n\t\tg.drawImage(background,(int)(0 - model.mario.x)/3, -400, null);\r\n\t\tg.drawImage(background, (int)(0 - model.mario.x)/3, -400, -background.getWidth(), background.getHeight(), null);\r\n\r\n\t\t\r\n\t\t// Load the ground image if its not already\r\n\t\tif(ground == null){\r\n\t\t\tground = loadImage(\"Metal_Ground.png\");\r\n\t\t}\r\n\t\t\r\n\t\t// Count variable to indicate how many bricks are printed to the screen\r\n\t\tint count = 0;\r\n\t\tg.drawImage(ground, 0 - model.mario.x, this.getHeight() - 50, 50, 50, null);\r\n\t\t\r\n\t\t// Draw the middle set of bricks\r\n\t\tfor(int i = 0; i < (model.mario.x + this.getWidth())/50; i++){\r\n\t\t\tcount++;\r\n\t\t\t// Adjust the printing position to scroll with the characters\r\n\t\t\tg.drawImage(ground, 50 * i - model.mario.x, this.getHeight() - 50, 50, 50, null);\r\n\t\t}\r\n\t\t\r\n\t\t// Draw the last brick adjusted to the scroll position\r\n\t\t//int remainingSpace = (model.mario.x + this.getWidth()) % 100;\r\n\t\tg.drawImage(ground, count * 50 - model.mario.x, this.getHeight() - 50, 50, 50, null);\r\n\t\t\r\n\t\t// Draw all the sprites\r\n\t\tfor(int i = 0; i < model.sprites.size(); i++){\r\n\t\t\tmodel.sprites.get(i).draw(g);\r\n\t\t}\r\n\t\t\r\n\t}",
"void onRenderBackground(RenderArguments arguments);",
"protected void drawBackground(\n // CSOK: ParameterNumber\n final float startx, final float starty, final float width,\n final float height, final Trait.Background back,\n final BorderProps bpsBefore, final BorderProps bpsAfter,\n final BorderProps bpsStart, final BorderProps bpsEnd,\n final int level) {\n final BorderProps bpsTop = bpsBefore;\n final BorderProps bpsBottom = bpsAfter;\n BorderProps bpsLeft;\n BorderProps bpsRight;\n if (level == -1 || (level & 1) == 0) {\n bpsLeft = bpsStart;\n bpsRight = bpsEnd;\n } else {\n bpsLeft = bpsEnd;\n bpsRight = bpsStart;\n }\n drawBackground(startx, starty, width, height, back, bpsTop, bpsBottom,\n bpsLeft, bpsRight);\n }",
"@Override\r\n\tpublic void paint(Graphics g) {\n\t\tg.drawImage(BG_LIST.get(this.dto.getNowlevel()%BG_LIST.size()), 0, 0,1200,700, null);\r\n\t\t\r\n\r\n\t}",
"Sprite getBackground();",
"@Override\n\tpublic Scene onLoadScene() {\n\t\tmEngine.registerUpdateHandler(new FPSLogger());\n\t\tScene scene=new Scene();\n\t\tAutoParallaxBackground autoParallaxBackground=new AutoParallaxBackground(0, 0, 0, 5);\n\t\tautoParallaxBackground.attachParallaxEntity(new ParallaxEntity(-10.0f, new Sprite(0, 0, mTextureRegion)));\n\t\tscene.setBackground(autoParallaxBackground);\n\t\t//Position of the Sprite in the region\n\t\tAnimatedSprite banana=new AnimatedSprite(200,200,bananaRegion);\n\t\tbanana.animate(100);\n\t\tscene.attachChild(banana);\n\t\treturn scene;\n\t}",
"private Background InitBackground()\r\n {\r\n \tBoundingSphere worldBounds = new BoundingSphere(\r\n \t\t new Point3d( 0.0, 0.0, 0.0 ), // Center\r\n \t\t 1000000000000000000000.0 ); // Extent\r\n \t\t\r\n \t// Set the background color and its application bounds\r\n \tbg = new Background( );\r\n \tbg.setColor( backgroundColor );\r\n \tbg.setCapability( Background.ALLOW_COLOR_WRITE );\r\n \tbg.setCapability( Background.ALLOW_COLOR_READ );\r\n \tbg.setCapability( Background.ALLOW_IMAGE_READ );\r\n \tbg.setCapability( Background.ALLOW_IMAGE_WRITE );\r\n \tbg.setApplicationBounds( worldBounds );\r\n \t\r\n \treturn bg;\r\n }",
"public void updateXPosition(){\r\n if (centerX + speedX <= 60) {\r\n centerX = 60;\r\n }\r\n if(centerX + bg.getBackX() > 4890) {\r\n bg.setBackX(4890-startScrolling);\r\n if(centerX + speedX >= 1500) {\r\n centerX = 1500;\r\n rect1= new FloatRect (centerX,centerY,80,110);\r\n }\r\n if(centerX < 1504) {\r\n centerX+=speedX;\r\n rect1= new FloatRect (centerX,centerY,80,110);\r\n }\r\n }\r\n else if (speedX < 0) {\r\n centerX += speedX;\r\n rect1= new FloatRect (centerX,centerY,80,110);\r\n }\r\n else {\r\n if (centerX <= startScrolling) {\r\n centerX += speedX;\r\n rect1= new FloatRect (centerX,centerY,80,110);\r\n } else {\r\n background.setPosition((-bg.getBackX ()),0);\r\n }\r\n }\r\n }",
"@Override\n\t protected void paintComponent(Graphics g) {\n\t super.paintComponent(g);\n\t for (int y = 0; y < MAX_Y; y++) {\n\t for (int x = 0; x < MAX_X; x++) { \n\t if(seed[x][y].isAlive) {\n\t g.setColor(FILL_COLOR);\n\t g.fillRect(x * CELL_WIDTH, y * CELL_WIDTH, CELL_WIDTH, CELL_WIDTH);\n\t }\n\t else{\n\t g.setColor(defaultBackground);\n\t g.fillRect(x * CELL_WIDTH, y * CELL_WIDTH, CELL_WIDTH, CELL_WIDTH);\n\t }//end if..\n\t g.setColor(Color.GRAY);\n\t g.drawRect(x * CELL_WIDTH, y * CELL_WIDTH, CELL_WIDTH, CELL_WIDTH);\n\t }//end for x\n\t }//end for y\n\t }",
"@Override\n protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY)\n {\n GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);\n this.mc.getTextureManager().bindTexture(CHEST_GUI_TEXTURE);\n int i = (this.width - this.xSize) / 2;\n int j = (this.height - this.ySize) / 2;\n this.drawTexturedModalRect(i, j, 0, 0, this.xSize, this.inventoryRows * 18 + 17);\n this.drawTexturedModalRect(i, j + this.inventoryRows * 18 + 17, 0, 126, this.xSize, 96);\n }",
"public void setBackground(){\r\n Image background = new Image(\"Cards/table.jpg\", 192, 80, false, true);\r\n BackgroundImage backgroundImg = new BackgroundImage(background, BackgroundRepeat.REPEAT, BackgroundRepeat.REPEAT,BackgroundPosition.DEFAULT, null);\r\n mainPane.setBackground(new Background(backgroundImg));\r\n }",
"private PImage createBG() {\n\t\tPImage image = new PImage(64, 64);\n\t\timage.copy(Textures.get(\"gui.box_black_red_tl\"), 0, 0, 16, 16, 0, 0, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_tm\"), 0, 0, 16, 16, 16, 0, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_tm\"), 0, 0, 16, 16, 32, 0, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_tr\"), 0, 0, 16, 16, 48, 0, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_ml\"), 0, 0, 16, 16, 0, 16, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_mm\"), 0, 0, 16, 16, 16, 16, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_mm\"), 0, 0, 16, 16, 32, 16, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_mr\"), 0, 0, 16, 16, 48, 16, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_ml\"), 0, 0, 16, 16, 0, 32, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_mm\"), 0, 0, 16, 16, 16, 32, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_mm\"), 0, 0, 16, 16, 32, 32, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_mr\"), 0, 0, 16, 16, 48, 32, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_bl\"), 0, 0, 16, 16, 0, 48, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_bm\"), 0, 0, 16, 16, 16, 48, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_bm\"), 0, 0, 16, 16, 32, 48, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_br\"), 0, 0, 16, 16, 48, 48, 16, 16);\n\t\treturn image;\t\t\n\t}",
"protected void drawBackground(\n // CSOK: ParameterNumber\n final float startx, final float starty, final float width,\n final float height, final Trait.Background back,\n final BorderProps bpsTop, final BorderProps bpsBottom,\n final BorderProps bpsLeft, final BorderProps bpsRight) {\n if (back != null) {\n endTextObject();\n\n // Calculate padding rectangle\n float sx = startx;\n float sy = starty;\n float paddRectWidth = width;\n float paddRectHeight = height;\n if (bpsLeft != null) {\n sx += bpsLeft.width / 1000f;\n paddRectWidth -= bpsLeft.width / 1000f;\n }\n if (bpsTop != null) {\n sy += bpsTop.width / 1000f;\n paddRectHeight -= bpsTop.width / 1000f;\n }\n if (bpsRight != null) {\n paddRectWidth -= bpsRight.width / 1000f;\n }\n if (bpsBottom != null) {\n paddRectHeight -= bpsBottom.width / 1000f;\n }\n\n if (back.getColor() != null) {\n updateColor(back.getColor(), true);\n fillRect(sx, sy, paddRectWidth, paddRectHeight);\n }\n if (back.getImageInfo() != null) {\n final ImageSize imageSize = back.getImageInfo().getSize();\n saveGraphicsState();\n clipRect(sx, sy, paddRectWidth, paddRectHeight);\n int horzCount = (int) (paddRectWidth * 1000\n / imageSize.getWidthMpt() + 1.0f);\n int vertCount = (int) (paddRectHeight * 1000\n / imageSize.getHeightMpt() + 1.0f);\n if (back.getRepeat() == EN_NOREPEAT) {\n horzCount = 1;\n vertCount = 1;\n } else if (back.getRepeat() == EN_REPEATX) {\n vertCount = 1;\n } else if (back.getRepeat() == EN_REPEATY) {\n horzCount = 1;\n }\n // change from points to millipoints\n sx *= 1000;\n sy *= 1000;\n if (horzCount == 1) {\n sx += back.getHoriz();\n }\n if (vertCount == 1) {\n sy += back.getVertical();\n }\n for (int x = 0; x < horzCount; x++) {\n for (int y = 0; y < vertCount; y++) {\n // place once\n Rectangle2D pos;\n // Image positions are relative to the currentIP/BP\n pos = new Rectangle2D.Float(sx - this.currentIPPosition\n + x * imageSize.getWidthMpt(), sy\n - this.currentBPPosition + y\n * imageSize.getHeightMpt(),\n imageSize.getWidthMpt(),\n imageSize.getHeightMpt());\n drawImage(back.getURL(), pos);\n }\n }\n\n restoreGraphicsState();\n }\n }\n }",
"public void printTexture(Graphics2D bg) {\n\r\n\t\tbg.setColor(Color.RED);\r\n\t\tbg.setStroke(new BasicStroke(0.1f));\r\n\r\n\t\t//lower base\r\n\t\tprintTextureLine(bg,0,1);\r\n\t\tprintTextureLine(bg,1,2);\r\n\t\tprintTextureLine(bg,2,3);\r\n\t\tprintTextureLine(bg,3,4);\r\n\t\tprintTextureLine(bg,4,5);\r\n\t\tprintTextureLine(bg,5,0);\r\n\r\n\t\t//lateral faces\r\n\t\tbg.setColor(Color.BLACK);\r\n\t\tprintTextureLine(bg,6,7);\r\n\t\tprintTextureLine(bg,7,14);\r\n\t\tprintTextureLine(bg,14,13);\r\n\t\tprintTextureLine(bg,13,6);\r\n\t\t\r\n\t\tprintTextureLine(bg,7,8);\r\n\t\tprintTextureLine(bg,8,15);\r\n\t\tprintTextureLine(bg,15,14);\r\n\t\t\r\n\t\tprintTextureLine(bg,8,9);\r\n\t\tprintTextureLine(bg,9,16);\r\n\t\tprintTextureLine(bg,16,15);\r\n\t\t\r\n\t\tprintTextureLine(bg,9,10);\r\n\t\tprintTextureLine(bg,10,17);\r\n\t\tprintTextureLine(bg,17,16);\r\n\t\t\r\n\t\tprintTextureLine(bg,10,11);\r\n\t\tprintTextureLine(bg,11,18);\r\n\t\tprintTextureLine(bg,18,17);\r\n\t\t\r\n\t\tprintTextureLine(bg,11,12);\r\n\t\tprintTextureLine(bg,12,19);\r\n\t\tprintTextureLine(bg,19,18);\r\n\t\r\n\t\t//gables\r\n\t\tbg.setColor(Color.BLUE);\r\n\r\n\t\tprintTextureLine(bg,13,14);\r\n\t\tprintTextureLine(bg,14,20);\r\n\t\tprintTextureLine(bg,20,13);\r\n\t\t\r\n\t\tprintTextureLine(bg,16,17);\r\n\t\tprintTextureLine(bg,17,21);\r\n\t\tprintTextureLine(bg,21,16);\r\n\t\t\r\n\r\n\t\t//roof\r\n\t\tbg.setColor(Color.RED);\r\n\t\tprintTexturePolygon(bg,22,23,28,25);\r\n\t\t\r\n\t\tprintTexturePolygon(bg,23,24,26,28);\r\n\t\tprintTexturePolygon(bg,26,27,29,28);\r\n\t\tprintTexturePolygon(bg,28,29,31,30);\r\n\t\tprintTexturePolygon(bg,30,25,28);\r\n\r\n\t}",
"private void drawBackground(Graphics2D g2) {\n\t\t\tg2.fillRect(0, 0, WIDTHBG, HEIGHTBG);\n\t\t}",
"private void drawBackgroundGrid(Canvas canvas) {\n Resources resources = getResources();\n Drawable backgroundCell = resources.getDrawable(R.drawable.cell_rectangle);\n // Outputting the game grid\n for (int xx = 0; xx < game.numSquaresX; xx++) {\n for (int yy = 0; yy < game.numSquaresY; yy++) {\n int sX = startingX + gridWidth + (cellSize + gridWidth) * xx;\n int eX = sX + cellSize;\n int sY = startingY + gridWidth + (cellSize + gridWidth) * yy;\n int eY = sY + cellSize;\n\n drawDrawable(canvas, backgroundCell, sX, sY, eX, eY);\n }\n }\n }",
"private void setUpBackGround() {\n try {\n setBackGround(new Image(new FileInputStream(\"images/backgrounds/[email protected]\")));\n } catch (FileNotFoundException ignored) {\n }\n\n\n try {\n ImageView middleGround = new ImageView(new Image(new FileInputStream(\"images/gameIcons/middleGround/battlemap0_middleground.png\")));\n middleGround.setFitHeight(windowHeight);\n middleGround.setFitWidth(windowWidth);\n addComponent(new NodeWrapper(middleGround));\n } catch (FileNotFoundException ignored) {\n }\n\n try {\n ImageView foreGround = new ImageView(new Image(new FileInputStream(\"images/foregrounds/[email protected]\")));\n foreGround.setPreserveRatio(true);\n foreGround.setFitWidth(windowHeight / 3);\n foreGround.relocate(windowWidth - foreGround.getFitWidth(), windowHeight - foreGround.getFitWidth() * foreGround.getImage().getHeight() / foreGround.getImage().getWidth());\n addComponent(new NodeWrapper(foreGround));\n } catch (FileNotFoundException ignored) {\n }\n }",
"private void drawBackground() {\n g2.setColor(SquareRenderer.BLANK_CELL_COLOR);\n g2.fillRect(BORDER_SIZE, BORDER_SIZE, BOARD_SIZE, BOARD_SIZE);\n }",
"protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3)\n\t{\n\t\tint var4 = this.mc.renderEngine.getTexture(\"/luxcraft/gui/luxRitualTable.png\");\n\t\tGL11.glColor4f(1.0F, 1F, 1F, 1.0F);\n\t\tthis.mc.renderEngine.bindTexture(var4);\n\t\tint var5 = (this.width - this.xSize) / 2;\n\t\tint var6 = (this.height - this.ySize) / 2;\n\t\tthis.drawTexturedModalRect(var5, var6, 0, 0, this.xSize, this.ySize);\n\n\t\tif(this.ritualtableInventory.schemaMaxAnalyseTime != 0){\n\t\t\tint w = 2+(this.ritualtableInventory.schemaAnalyseTime * 41)/this.ritualtableInventory.schemaMaxAnalyseTime;\n\t\t\tthis.drawTexturedModalRect(var5 + 30, var6 + 37, 176, 14, w, 16);\n\t\t\tthis.drawTexturedModalRect(var5 + 103+43-w, var6 + 37, 176+43-w, 31, w, 16);\n\t\t}\n\n\n\t}",
"protected void drawGuiContainerBackgroundLayer(float var1, int var2, int var3)\n {\n int var4 = this.mc.renderEngine.getTexture(\"/shadow/lavafurnace.png\");\n GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\n this.mc.renderEngine.bindTexture(var4);\n int var5 = (this.width - this.xSize) / 2;\n int var6 = (this.height - this.ySize) / 2;\n this.drawTexturedModalRect(var5, var6, 0, 0, this.xSize, this.ySize);\n int var8 = this.furnaceInventory.getFuelScaled(63);\n this.drawTexturedModalRect(var5 + 144, var6 + 11 + 63 - var8, 176, 94 - var8, 17, 31 + var8);\n int var7 = this.furnaceInventory.getCookProgressScaled(24);\n this.drawTexturedModalRect(var5 + 59, var6 + 33, 176, 14, var7 + 1, 16);\n }",
"private static void drawUniverse(String background) {\n StdDraw.picture(0.0, 0.0, background);\n }",
"public void parallax(int startX, int startY, int endX, int endY) {\n if (parallaxSameDirection) {\n for (int i = 0; i < pointCount; i++) {\n points.get(i).setCenterX(points.get(i).getCenterX() + (endX - startX) / 40);\n points.get(i).setCenterY(points.get(i).getCenterY() + (endY - startY) / 40);\n }\n } else {\n for (int i = 0; i < pointCount; i++) {\n points.get(i).setCenterX(points.get(i).getCenterX() + (startX - endX) / 40);\n points.get(i).setCenterY(points.get(i).getCenterY() + (startY - endY) / 40);\n }\n }\n }",
"public void act(float delta) {\n scrollTimer = (scrollTimer + delta / 50) % 1.0f;\n scrollTimer2 = (scrollTimer2 + delta / 19) % 1.0f;\n\n backgroundSprite.setU(scrollTimer);\n backgroundSprite.setU2(scrollTimer + 0.5f);\n \n backgroundSprite2.setU(scrollTimer);\n backgroundSprite2.setU2(scrollTimer + 1.0f);\n }",
"@Override\n\tpublic void render(float delta) {\n\t\tbatch.begin();\n\t\tbatch.draw(background, 0, 0);\n\t\tbatch.end();\n\t\t\n\t\tstage.act(delta);\n\t\tstage.draw();\n\t\t\n\t}",
"private void drawBackGround() {\r\n\t\tdouble diff = getWidth() / NDECADES;\r\n\t\tdouble xcrd = 0;\r\n\t\tint year = START_DECADE;\r\n\t\tfor (int i = 0; i < NDECADES; i++) {\r\n\t\t\tString yearStr = year + \"\";\r\n\t\t\tadd(new GLine(xcrd, 0, xcrd, getHeight()));\r\n\t\t\tadd(new GLabel(yearStr, xcrd, getHeight()));\r\n\t\t\txcrd = xcrd + diff;\r\n\t\t\tyear = year + 10;\r\n\t\t}\r\n\t\tdouble ycrd = GRAPH_MARGIN_SIZE;\r\n\t\tadd(new GLine(0, ycrd, getWidth(), ycrd));\r\n\t\tadd(new GLine(0, getHeight() - ycrd, getWidth(), getHeight() - ycrd));\r\n\r\n\t}",
"@Override\n public void renderGameObject() {\n Gdx.gl.glClearColor(1, 1, 1, 1);\n Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);\n\n //this is where we can actually display stuff on the screen\n batch.begin();\n\n batch.draw(new TextureRegion(background),100,100,100,100,200,200,1,1,0);\n\n batch.end();\n\n }",
"public void draw() {\n\tbackground(bg_count); // set background to something\n\tbg_count = bg_count + bg_dir;\n\tif (bg_count >= 255) {\n\t bg_dir = -1;\n\t} else if (bg_count <= 0) {\n\t bg_count = 0;\n\t bg_dir = 1;\n\t}\n\tellipse_x = ellipse_x + ellipse_x_dir;\n\tellipse_y = ellipse_y - ellipse_y_dir;\n\n\tif (ellipse_x > width) {\n\t ellipse_x_dir = -1;\n\t ellipse_x = width - 1;\n\t} else if (ellipse_x < 0) {\n\t ellipse_x_dir = 1;\n\t ellipse_x = 0;\n\t}\n\tif (ellipse_y > height) {\n\t ellipse_y_dir = -1;\n\t ellipse_y = height - 1;\n\t} else if (ellipse_y < 0) {\n\t ellipse_y_dir = 1;\n\t ellipse_y = 0;\n\t}\n\n\tfill(0, 64, 0);\n\t// x y w h\n\trect(400, 300, 200, 100);\n\n\tfill(212, 111, 249);\n\t\n\tstrokeWeight(4.0f);\n\n\t// x y r1 r2 // can set to mouseX, mouseY\n\tellipse(ellipse_x, ellipse_y, 30, 30);\n\n\t// some draw methods associated with PApplet:\n\t// background(int)\n\t// stroke(int, int, int)\n\t// fill(int)\n\t// ellipse(x, y, radius_1, radius_2)\n\t// noFill()\n\n\t// text(str, x, y)\n }",
"public void paint() {\n BufferStrategy bs;\n bs = this.getBufferStrategy();\n\n Graphics g = bs.getDrawGraphics();\n g.drawImage(background, 0, 0, this.getWidth(), this.getHeight(), null);\n if (this.blackHoles != null) {\n for (BlackHole blackHole : this.blackHoles) {\n blackHole.paint(g);\n }\n }\n if (this.balls != null) {\n for (int i = 0; i <this.balls.size() ; i++) {\n this.balls.get(i).paint(g);\n }\n\n }\n\n bs.show();\n g.dispose();\n\n }",
"@Override\n\tpublic void pintar() {\n\t\n\t\tapp.image(water, this.px, this.py);\n\t\t\n\t}",
"@Override\n public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {\n int colorUpdate = (Integer) evaluator.evaluate(positionOffset, colorList[position], colorList[position == 2 ? position : position + 1]);\n mViewPager.setBackgroundColor(colorUpdate);\n }",
"public void draw() {\r\n background(255);\r\n\r\n float mouseXFactor = map(mouseX, 0, width, 0.05f, 1);\r\n float mouseYFactor = map(mouseY, 0, height, 0.05f, 1);\r\n\r\n for (int gridX = 0; gridX < img.width; gridX++) {\r\n for (int gridY = 0; gridY < img.height; gridY++) {\r\n // grid position + tile size\r\n float tileWidth = width / (float) img.width;\r\n float tileHeight = height / (float) img.height;\r\n float posX = tileWidth * gridX;\r\n float posY = tileHeight * gridY;\r\n\r\n // get current color\r\n int c = pixelArray[gridX][gridY];\r\n\r\n // greyscale conversion\r\n int greyscale = round(red(c) * 0.222f + green(c) * 0.707f + blue(c) * 0.071f);\r\n\r\n if (drawMode == 1) {\r\n // greyscale to ellipse area\r\n fill(0);\r\n noStroke();\r\n float r2 = 1.1284f * sqrt(tileWidth * tileWidth * (1 - greyscale / 255.0f));\r\n r2 = r2 * mouseXFactor * 3;\r\n ellipse(posX, posY, r2, r2);\r\n } else if (drawMode == 2) {\r\n // greyscale to rotation, line length and stroke weight\r\n stroke(0);\r\n float w4 = map(greyscale, 0, 255, 10, 0);\r\n strokeWeight(w4 * mouseXFactor + 0.1f);\r\n float l4 = map(greyscale, 0, 255, 35, 0);\r\n l4 = l4 * mouseYFactor;\r\n pushMatrix();\r\n translate(posX, posY);\r\n rotate(greyscale / 255.0f * PI);\r\n line(0, 0, 0 + l4, 0 + l4);\r\n popMatrix();\r\n } else if (drawMode == 3) {\r\n // greyscale to line relief\r\n float w5 = map(greyscale, 0, 255, 5, 0.2f);\r\n strokeWeight(w5 * mouseYFactor + 0.1f);\r\n // get neighbour pixel, limit it to image width\r\n int /* color */ c2 = img.get(min(gridX + 1, img.width - 1), gridY);\r\n stroke(c2);\r\n int greyscale2 = (int) (red(c2) * 0.222f + green(c2) * 0.707f + blue(c2) * 0.071f);\r\n float h5 = 50 * mouseXFactor;\r\n float d1 = map(greyscale, 0, 255, h5, 0);\r\n float d2 = map(greyscale2, 0, 255, h5, 0);\r\n line(posX - d1, posY + d1, posX + tileWidth - d2, posY + d2);\r\n } else if (drawMode == 4) {\r\n // pixel color to fill, greyscale to ellipse size\r\n float w6 = map(greyscale, 0, 255, 25, 0);\r\n noStroke();\r\n fill(c);\r\n ellipse(posX, posY, w6 * mouseXFactor, w6 * mouseXFactor);\r\n // TODO 2: Add the following: if(Math.random()<0.1) {pixelArray[gridX][gridY] = lerpColor(c,0xff0000, 0.1f);}\r\n } else if (drawMode == 5) {\r\n stroke(c);\r\n float w7 = map(greyscale, 0, 255, 5, 0.1f);\r\n strokeWeight(w7);\r\n fill(255, 255 * mouseXFactor);\r\n pushMatrix();\r\n translate(posX, posY);\r\n rotate(greyscale / 255.0f * PI * mouseYFactor);\r\n rect(0, 0, 15, 15);\r\n popMatrix();\r\n }\r\n /*\r\n * TODO 3: Add a drawMode == 6 case. \r\n * Try modifying the pixelArray \r\n * Try drawing shapes or colors depending on c and grayscale variables \r\n * Try adding other forms of animation\r\n */\r\n }\r\n }\r\n }",
"public BackgroundRenderer(SpriteBatch batch, Viewport viewport) {\n this.viewport = viewport;\n this.batch = batch;\n animation = \n new Animation<TextureRegion>(0.25f, atlas.findRegions(\"stars\"), PlayMode.LOOP);\n \n }",
"protected void drawGUI() {\n batch.draw(background, 0, 0);\n }",
"@Override\n protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {\n }",
"@Override\n public void paint(Graphics g) {\n\tsuper.paint(g);\n\t// getContentPane().setBackground(Color.orange);\n\timg = Util.createImage(getContentPane());\n\tbackColor = new Color(img.getRGB(3, 3));\n\t// img.getGraphics().setColor(Color.blue);\n\t// img.getGraphics().fillRect(0, 0, img.getWidth(), img.getHeight());\n\tdrawEntrance(new Point(557, 70), 0, img.getGraphics());\n\tgetContentPane().getGraphics().drawImage(img, 0, 0, null);\n\tanimate(g);\n\t// img = Util.createImage(getContentPane());\n\n }",
"private void drawBackground(Graphics2D g2d, int wid, int hei) {\n g2d.setColor(Light_Gray);\n Triangle triangle1 = new Triangle(new Point(0, 0), new Point(0, hei), new Point(wid, 0));\n triangle1.fill(g2d);\n g2d.setColor(Dark_Gray);\n Triangle triangle2 = new Triangle(new Point(wid, hei), new Point(0, hei), new Point(wid, 0));\n triangle2.fill(g2d);\n Triangle triangle3 = new Triangle(new Point(wid, 0), new Point(wid, 15), new Point(wid - 15, 15));\n triangle3.fill(g2d);\n g2d.setColor(Light_Gray);\n Triangle triangle4 = new Triangle(new Point(0, hei), new Point(0, hei - 15), new Point(15, hei - 15));\n triangle4.fill(g2d);\n g2d.setColor(Gray);\n g2d.fillRect(6, 6, wid - 12, hei - 12);\n }",
"private void reposition(){\n int lastBackgroundIndex = firstBackgroundIndex-1;\n if(firstBackgroundIndex == 0){\n lastBackgroundIndex = backgrounds.length-1;\n }\n backgrounds[firstBackgroundIndex].getPosition().x = backgrounds[lastBackgroundIndex].getPosition().x + drawingWidth;\n firstBackgroundIndex = (firstBackgroundIndex+1) % backgrounds.length;\n }",
"public void draw() {\r\n\t\tif (active_)\r\n\t\t\tGlobals.getInstance().getCamera().drawImageOnHud(posx_, posy_, currentImage());\r\n\t}",
"@Override\n\t\t\tprotected void paintComponent(Graphics g) {\n\t\t\t\tGraphics2D g2d = (Graphics2D) g;\n\t\t g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\n\t\t RenderingHints.VALUE_ANTIALIAS_ON);\n\t\t \n\t\t GradientPaint gp = new GradientPaint(0, 0,\n\t\t Const.BACKGROUND_COLOR.brighter(), 0, getHeight(),\n\t\t Color.BLUE);\n\t\t \n\t\t g2d.setPaint(gp);\n\t\t g2d.fillRect(0, 0, getWidth(), getHeight());\n\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t}",
"private void drawLines()\n {\n getBackground().setColor( Color.BLACK );\n \n for( int i = 200; i < getWidth(); i += 200 )\n {\n getBackground().drawLine(i, 0, i, getHeight() );\n getBackground().drawLine(0, i, getWidth(), i);\n }\n \n Greenfoot.start();\n }",
"@Override\n\tpublic void drawForeground(Canvas canvas, int width, int height) {\n\t\t\n\t}",
"@Override\n protected void beforeDraw(UI ui, PGraphics pg) {\n pointLight(0, 0, 40, model.cx, model.cy, LengthUnit.FOOT.toMillimetres(-20L));\n pointLight(0, 0, 50, model.cx, model.yMax + LengthUnit.FOOT.toMillimetres(10L), model.cz);\n pointLight(0, 0, 20, model.cx, model.yMin - LengthUnit.FOOT.toMillimetres(10L), model.cz);\n //hint(ENABLE_DEPTH_TEST);\n }",
"protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {\n\t\tsuper.drawGuiContainerBackgroundLayer(partialTicks, mouseX, mouseY);\n\n\t\tGlStateManager.color(1, 1, 1,1 );\n\t\tthis.mc.getTextureManager().bindTexture(getTexture());\n\t\tthis.drawTexturedModalRect(xBase, yBase, 0, 0, xSize, container.inventoryRows * 18 + 17);\n\t\tthis.drawTexturedModalRect(xBase, yBase + container.inventoryRows * 18 + 17, 0, 126, xSize, 96);\n\t}",
"@Override\n\tprotected void Draw(GameTime gameTime)\n\t{\n\t\tgetGraphicsDevice().Clear(Color.CornflowerBlue);\n\t\t\n\t\tspriteBatch.Begin();\n\t\tspriteBatch.Draw(background, new Vector2(0,0), Color.White);\n\t\tspriteBatch.End();\n\t\t\n\t\t// TODO: Add your drawing code here\n\t\t\n\t\tsuper.Draw(gameTime);\n\t}",
"public zombie_bg()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1010,900, 1); \n setPaintOrder(ScoreBoard.class, player.class, zomb_gen.class, options.class);\n populate();\n \n }",
"private void update() {\n for (Background bg : backgrounds) {\n bg.update(fps);\n }\n\n }",
"@Override\n \tpublic void draw() {\n \n \t\tGL11.glPushMatrix();\n \t\t\n \t\tGL11.glTranslatef(super.getX(), super.getY(), 0);\n \t\tGL11.glColor3f(1.0f, 1.0f, 1.0f);\n \t\tMain.BLANK_TEXTURE.bind();\n \t\tGL11.glBegin(GL11.GL_QUADS);\n \t\t{\n \t\t\t\n \t\t\tGL11.glColor3f(1.0f, 0.0f, 0.0f);\n \t\t\tGL11.glVertex2f(0, 0); // top left\n \t\t\tGL11.glVertex2f(0, Main.gridSize); // bottom left\n \t\t\tGL11.glVertex2f(Main.gridSize, Main.gridSize); // bottom right\n \t\t\tGL11.glVertex2f(Main.gridSize, 0); // top right\n \t\t\t\n \t\t\t\n \t\t\tif (isRight()) {\n \t\t\t\tGL11.glColor3f(1.0f, 1.0f, 1.0f);\n \t\t\t\tGL11.glVertex2f(12, 0);\n \t\t\t\tGL11.glVertex2f(12, 12);\n \t\t\t\tGL11.glVertex2f(Main.gridSize, 12);\n \t\t\t\tGL11.glVertex2f(Main.gridSize, 0);\n \t\t\t\t\n \t\t\t\tGL11.glColor3f(0.0f, 0.0f, 0.0f);\n \t\t\t\tGL11.glVertex2f(Main.gridSize-6, 3);\n \t\t\t\tGL11.glVertex2f(Main.gridSize-6, 9);\n \t\t\t\tGL11.glVertex2f(Main.gridSize, 9);\n \t\t\t\tGL11.glVertex2f(Main.gridSize, 3);\n \t\t\t\t\n \t\t\t} else {\n \t\t\t\tGL11.glColor3f(1.0f, 1.0f, 1.0f);\n \t\t\t\tGL11.glVertex2f(0, 0);\n \t\t\t\tGL11.glVertex2f(0, 12);\n \t\t\t\tGL11.glVertex2f(12, 12);\n \t\t\t\tGL11.glVertex2f(12, 0);\n \t\t\t\t\n \t\t\t\tGL11.glColor3f(0.0f, 0.0f, 0.0f);\n \t\t\t\tGL11.glVertex2f(0, 3);\n \t\t\t\tGL11.glVertex2f(0, 9);\n \t\t\t\tGL11.glVertex2f(4, 9);\n \t\t\t\tGL11.glVertex2f(4, 3);\n \t\t\t}\n \t\t\t\n \t\t}\n \t\tGL11.glEnd();\n \n \t\tGL11.glPopMatrix();\n \t\t\n \t}",
"@Override\n public void render(float delta) {\n Gdx.gl.glClearColor(0,0,0,1);\n Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);\n\n batch.begin();\n background.draw(batch);\n batch.end();\n\n renderer.setView(camera);\n renderer.render();\n\n }",
"private void updateBackgroundID() {\n if ((x + 1) % 2 == (y + 1) % 2) {\n switch (c) {\n case BLACK:\n background = R.drawable.pawngame_black_black;\n break;\n case WHITE:\n background = R.drawable.pawngame_black_white;\n break;\n default:\n background = R.drawable.pawngame_black_empty;\n }\n } else {\n switch (c) {\n case BLACK:\n background = R.drawable.pawngame_white_black;\n break;\n case WHITE:\n background = R.drawable.pawngame_white_white;\n break;\n default:\n background = R.drawable.pawngame_white_empty;\n }\n }\n }",
"public void renderBackground(Graphics g)\n\t{\n\t\tg.drawImage(Drawing.getImage(\"backgrounds/sky1.png\"), 0, 0, null);\n\t\tg.drawImage(Drawing.getImage(\"backgrounds/grass1.png\"), 0, 530, null);\n\t}",
"public void paint(Graphics g){\n \n for (int r=0; r < hexes.length; r++){ \n for (int c=0; c < hexes[r].length; c++){\n int x = (c*(55+HORIZONTAL_GAP))+(200-((2-(Math.abs(r-2)))*(55+HORIZONTAL_GAP)/2));\n int y = (r*(45+VERTICAL_GAP))+50;\n g.drawImage(hexes[r][c],x,y,this);\n g.drawImage(rolls[r][c],x+15,y+20,this);\n } \n }\n }",
"private void draw() {\n Graphics2D g2 = (Graphics2D) image.getGraphics();\n\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB);\n\n AffineTransform transform = AffineTransform.getTranslateInstance(0, height);\n transform.concatenate(AffineTransform.getScaleInstance(1, -1));\n g2.setTransform(transform);\n\n int width = this.width;\n int height = this.height;\n if (scale != 1) {\n g2.scale(scale, scale);\n width = (int) Math.round(width / scale);\n height = (int) Math.round(height / scale);\n }\n AbstractGraphics g = new GraphicsSWT(g2);\n\n g.setScale(scale);\n if (background != null) {\n g.drawImage(background, 0, 0, width, height);\n }\n\n synchronized (WFEventsLoader.GLOBAL_LOCK) {\n for (Widget widget : widgets) {\n if (widget != null) widget.paint(g, width, height);\n }\n }\n // draw semi-transparent pixel in top left corner to workaround famous OpenGL feature\n g.drawRect(0, 0, 1, 1, Color.WHITE, .5, PlateStyle.RectangleType.SOLID);\n\n g2.dispose();\n }",
"@Override\r\n public void paint(Graphics g){\n if(ch.moveCountY == 1 && flag == false){ \r\n flag = true;\r\n animator = new Thread(this);\r\n animator.start();\r\n }\r\n \r\n super.paint(g);\r\n \r\n Graphics2D g2d = (Graphics2D) g;\r\n \r\n if(ch.v == 330){\r\n ch.mainC = img;\r\n }\r\n \r\n if(pos2 < -15){\r\n // g2d.drawImage(img_bg2 , pos2, 0 , null);\r\n b.setBounds(pos2, 0, 995, 610);\r\n \r\n }\r\n \r\n if(pos <= -15){\r\n b.setBounds(pos2, 0, 995, 610);\r\n //g2d.drawImage(img_bg2 , pos2, 0 , null);\r\n \r\n }\r\n \r\n \r\n a.setBounds(pos, 0, 995, 610);\r\n g2d.drawImage(ch.getImage() , ch.getMoveX() , ch.v , null);\r\n g2d.drawImage(obs1.getImage() , obs1.getX() , obs1.getY() , null);\r\n g2d.drawImage(obs2.pic2 , obs2.getX() , obs2.getY() , null);\r\n \r\n }",
"@Override\n\tpublic void draw(Canvas game) {\n\t\tGraphicsContext gc = game.getGraphicsContext2D();\n\t\tgc.drawImage(image, posX, Y_LAND - image.getHeight());\n\t\t\n\t}",
"@Override\r\n public Sprite getBackground() {\r\n return new Level3Background();\r\n }",
"private void drawsegment_gouraud_alpha(float leftadd,\n float rghtadd,\n int ytop,\n int ybottom) {\n ytop *= SCREEN_WIDTH;\n ybottom *= SCREEN_WIDTH;\n // int p = m_index;\n \n float irf = iradd;\n float igf = igadd;\n float ibf = ibadd;\n float iaf = iaadd;\n \n while (ytop < ybottom) {\n int xstart = (int) (xleft + PIXEL_CENTER);\n if (xstart < 0)\n xstart = 0;\n int xend = (int) (xrght + PIXEL_CENTER);\n if (xend > SCREEN_WIDTH)\n xend = SCREEN_WIDTH;\n float xdiff = (xstart + PIXEL_CENTER) - xleft;\n \n int ir = (int) (irf * xdiff + rleft);\n int ig = (int) (igf * xdiff + gleft);\n int ib = (int) (ibf * xdiff + bleft);\n int ia = (int) (iaf * xdiff + aleft);\n float iz = izadd * xdiff + zleft;\n \n xstart+=ytop;\n xend+=ytop;\n \n for ( ; xstart < xend; xstart++ ) {\n if (noDepthTest || (iz <= m_zbuffer[xstart])) {\n //m_zbuffer[xstart] = iz;\n \n //\n int red = (ir & 0xFF0000);\n int grn = (ig >> 8) & 0xFF00;\n int blu = (ib >> 16);\n \n // get buffer pixels\n int bb = m_pixels[xstart];\n int br = (bb & 0xFF0000); // 0x00FF0000\n int bg = (bb & 0xFF00); // 0x0000FF00\n bb = (bb & 0xFF); // 0x000000FF\n \n // blend alpha\n int al = ia >> 16;\n \n //\n m_pixels[xstart] = 0xFF000000 | \n ((br + (((red - br) * al) >> 8)) & 0xFF0000) | \n ((bg + (((grn - bg) * al) >> 8)) & 0xFF00) | \n ((bb + (((blu - bb) * al) >> 8)) & 0xFF);\n // m_stencil[xstart] = p;\n }\n \n //\n ir+=iradd;\n ig+=igadd;\n ib+=ibadd;\n ia+=iaadd;\n iz+=izadd;\n }\n \n ytop+=SCREEN_WIDTH;\n xleft+=leftadd;\n xrght+=rghtadd;\n rleft+=rleftadd;\n gleft+=gleftadd;\n bleft+=bleftadd;\n aleft+=aleftadd;\n zleft+=zleftadd;\n }\n }",
"@Override\n public void setup()\n { \n background(100);\n quadrate();\n }",
"private void draw() {\n\n // Current generation (y-position on canvas)\n int generation = 0;\n\n // Looping while still on canvas\n while (generation < canvasHeight / CELL_SIZE) {\n\n // Next generation\n cells = generate(cells);\n\n // Drawing\n for (int i = 0; i < cells.length; i++) {\n gc.setFill(colors[cells[i]]);\n gc.fillRect(i * CELL_SIZE, generation * CELL_SIZE, CELL_SIZE, CELL_SIZE);\n }\n\n // Next line..\n generation++;\n }\n }",
"public void draw(Canvas c, Paint p)\n {\n\n c.drawBitmap(Bitmap.createScaledBitmap(background,(int)(radius*2),(int)(radius*2),false), centerX-radius, centerY-radius, p);\n\n c.drawBitmap(texture,this.currentX-this.texture.getWidth()/2, this.currentY-this.texture.getHeight()/2, p);\n }",
"private void drawsegment_texture8(float leftadd,\n float rghtadd,\n int ytop,\n int ybottom) { \n // Accurate texture mode added - comments stripped from dupe code, \n // see drawsegment_texture24() for details\n int ypixel = ytop;\n int lastRowStart = m_texture.length - TEX_WIDTH - 2;\n boolean accurateMode = parent.hints[ENABLE_ACCURATE_TEXTURES];\n float screenx = 0; float screeny = 0; float screenz = 0;\n float a = 0; float b = 0; float c = 0;\n int linearInterpPower = TEX_INTERP_POWER;\n int linearInterpLength = 1 << linearInterpPower;\n if (accurateMode) {\n // see if the precomputation goes well, if so finish the setup\n if (precomputeAccurateTexturing()) { \n newax *= linearInterpLength;\n newbx *= linearInterpLength;\n newcx *= linearInterpLength;\n screenz = nearPlaneDepth;\n firstSegment = false;\n } else{\n // if the matrix inversion screwed up, revert to normal rendering \n // (something is degenerate)\n accurateMode = false; \n }\n }\n ytop *= SCREEN_WIDTH;\n ybottom *= SCREEN_WIDTH;\n // int p = m_index;\n \n float iuf = iuadd;\n float ivf = ivadd;\n \n int red = m_fill & 0xFF0000;\n int grn = m_fill & 0xFF00;\n int blu = m_fill & 0xFF;\n \n while (ytop < ybottom) {\n int xstart = (int) (xleft + PIXEL_CENTER);\n if (xstart < 0)\n xstart = 0;\n \n int xpixel = xstart;//accurate mode\n \n int xend = (int) (xrght + PIXEL_CENTER);\n if (xend > SCREEN_WIDTH)\n xend = SCREEN_WIDTH;\n \n float xdiff = (xstart + PIXEL_CENTER) - xleft;\n int iu = (int) (iuf * xdiff + uleft);\n int iv = (int) (ivf * xdiff + vleft);\n float iz = izadd * xdiff + zleft;\n \n xstart+=ytop;\n xend+=ytop;\n \n if (accurateMode){\n screenx = xmult*(xpixel+.5f-(SCREEN_WIDTH/2.0f));\n screeny = ymult*(ypixel+.5f-(SCREEN_HEIGHT/2.0f));\n a = screenx*ax+screeny*ay+screenz*az;\n b = screenx*bx+screeny*by+screenz*bz;\n c = screenx*cx+screeny*cy+screenz*cz;\n }\n boolean goingIn = ( (newcx > 0) == (c > 0) )?false:true;\n int interpCounter = 0;\n int deltaU = 0; int deltaV = 0;\n float fu = 0; float fv = 0;\n float oldfu = 0; float oldfv = 0;\n \n if (accurateMode && goingIn) {\n int rightOffset = (xend-xstart-1)%linearInterpLength;\n int leftOffset = linearInterpLength-rightOffset;\n float rightOffset2 = rightOffset / ((float)linearInterpLength);\n float leftOffset2 = leftOffset / ((float)linearInterpLength);\n interpCounter = leftOffset;\n float ao = a-leftOffset2*newax;\n float bo = b-leftOffset2*newbx;\n float co = c-leftOffset2*newcx;\n float oneoverc = 65536.0f/co;\n oldfu = (ao*oneoverc); oldfv = (bo*oneoverc);\n a += rightOffset2*newax;\n b += rightOffset2*newbx;\n c += rightOffset2*newcx;\n oneoverc = 65536.0f/c;\n fu = a*oneoverc; fv = b*oneoverc;\n deltaU = ((int)(fu - oldfu)) >> linearInterpPower;\n deltaV = ((int)(fv - oldfv)) >> linearInterpPower;\n iu = ( (int)oldfu )+(leftOffset-1)*deltaU;\n iv = ( (int)oldfv )+(leftOffset-1)*deltaV; //another \"off-by-one\" hack\n } else {\n float preoneoverc = 65536.0f/c;\n fu = (a*preoneoverc);\n fv = (b*preoneoverc);\n }\n \n for ( ; xstart < xend; xstart++ ) {\n if (accurateMode) {\n if (interpCounter == linearInterpLength) interpCounter = 0;\n if (interpCounter == 0){\n a += newax;\n b += newbx;\n c += newcx;\n float oneoverc = 65536.0f/c;\n oldfu = fu; oldfv = fv;\n fu = (a*oneoverc); fv = (b*oneoverc);\n iu = (int)oldfu; iv = (int)oldfv;\n deltaU = ((int)(fu - oldfu)) >> linearInterpPower;\n deltaV = ((int)(fv - oldfv)) >> linearInterpPower;\n } else {\n iu += deltaU;\n iv += deltaV;\n }\n interpCounter++;\n }\n // try-catch just in case pixel offset it out of range\n try {\n if (noDepthTest || (iz <= m_zbuffer[xstart])) {\n //m_zbuffer[xstart] = iz;\n \n int al0;\n if (m_bilinear) {\n int ofs = (iv >> 16) * TEX_WIDTH + (iu >> 16);\n int iui = iu & 0xFFFF;\n al0 = m_texture[ofs] & 0xFF;\n int al1 = m_texture[ofs + 1] & 0xFF;\n if (ofs < lastRowStart) ofs+=TEX_WIDTH;\n int al2 = m_texture[ofs] & 0xFF;\n int al3 = m_texture[ofs + 1] & 0xFF;\n al0 = al0 + (((al1-al0) * iui) >> 16);\n al2 = al2 + (((al3-al2) * iui) >> 16);\n al0 = al0 + (((al2-al0) * (iv & 0xFFFF)) >> 16);\n } else {\n al0 = m_texture[(iv >> 16) * TEX_WIDTH + (iu >> 16)] & 0xFF;\n }\n \n int br = m_pixels[xstart];\n int bg = (br & 0xFF00);\n int bb = (br & 0xFF);\n br = (br & 0xFF0000);\n m_pixels[xstart] = 0xFF000000 | \n ((br + (((red - br) * al0) >> 8)) & 0xFF0000) | \n ((bg + (((grn - bg) * al0) >> 8)) & 0xFF00) | \n ((bb + (((blu - bb) * al0) >> 8)) & 0xFF);\n // m_stencil[xstart] = p;\n }\n }\n catch (Exception e) {\n }\n xpixel++;//accurate mode\n if (!accurateMode){\n iu+=iuadd;\n iv+=ivadd;\n }\n iz+=izadd;\n }\n ypixel++;//accurate mode\n ytop+=SCREEN_WIDTH;\n xleft+=leftadd;\n xrght+=rghtadd;\n uleft+=uleftadd;\n vleft+=vleftadd;\n zleft+=zleftadd;\n }\n }",
"public BoxBackground(float[] c)\n {\n super(c);\n\n texture = new TextureComponent2D[6];\n\n stateChanged = false;\n textureIdMap = new HashMap[6];\n\n for(int i = 0; i < 6; i++)\n textureIdMap[i] = new HashMap<GL, Integer>();\n\n generateBoxGeom();\n }",
"@Override\n protected void drawGuiContainerBackgroundLayer(float var1, int var2,int var3) \n\t{\n\t GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\n\t this.mc.renderEngine.bindTexture(resource);\n\t int var5 = (this.width - this.xSize) / 2;\n\t int var6 = (this.height - this.ySize) / 2;\n\t this.drawTexturedModalRect(var5, var6, 0, 0, this.xSize, this.ySize);\n\t int b = tile.tableBurnTime; // 取得Tile内的燃料燃烧时间\n\t float maxBurnTime = tile.maxBurnTime*1.0F;// 取得最大燃料燃烧时间,用float,不用的话得不出百分比\n\t if (b > 0 && maxBurnTime > 0) // 确定描绘的时机\n\t {\n\t // 描绘火焰图像\n\t this.drawTexturedModalRect(this.guiLeft + 81, this.guiTop + 37 + (int)(14 - 14 * ((float)b / maxBurnTime)),\n\t \t\t 176, (int)(14 - 14 * ((float)b / maxBurnTime)), 14, (int)(14 * ((float)b / maxBurnTime)));\n\t }\n\t \n\t int out = tile.outputTime; // 取得Tile内的燃料燃烧时间\n\t float maxOutputTime = 100F;// 取得最大燃料燃烧时间,用float,不用的话得不出百分比\n\t if (b > 0 && maxBurnTime > 0) // 确定描绘的时机\n\t {\n\t // 描绘火焰图像\n\t this.drawTexturedModalRect(this.guiLeft + 76, this.guiTop + 20,\n\t \t\t 176, 14, (int)(24*((float)out/maxOutputTime)), 16);\n\t }\n }",
"protected void drawForegroundToBackground() {\n if (backgroundColor == null) { return; }\n\n final BufferedImage backgroundBufferedImage = new BufferedImage(dimension.width, dimension.height, this.bufferedImage.getType());\n final Graphics graphics = backgroundBufferedImage.getGraphics();\n\n // draw current color\n graphics.setColor(backgroundColor);\n graphics.fillRect(0, 0, dimension.width, dimension.height);\n graphics.drawImage(bufferedImage, 0, 0, null);\n\n // draw back to original\n final Graphics graphics2 = bufferedImage.getGraphics();\n graphics2.drawImage(backgroundBufferedImage, 0, 0, null);\n }",
"@Override\n protected void paintBackground(Graphics2D g) {\n g.drawImage(image, 0, 0, this);\n }",
"Parent Background(){\r\n \r\n Group root = new Group();\r\n Scene scene = new Scene(root, w, h,null);\r\n \r\n Group circles = new Group();\r\n for (int i = 0; i < 30; i++) {\r\n Circle circle = new Circle(150, Color.web(\"white\", 0.05));\r\n circle.setStrokeType(StrokeType.OUTSIDE);\r\n circle.setStroke(Color.web(\"white\", 0.16));\r\n circle.setStrokeWidth(4);\r\n circles.getChildren().add(circle);\r\n }\r\n Rectangle colors = new Rectangle(scene.getWidth(), scene.getHeight(),\r\n new LinearGradient(1f, 1f, 0f, 1f, true, CycleMethod.NO_CYCLE, new Stop[]{\r\n new Stop(0, Color.web(\"#f8bd55\")),\r\n new Stop(0.14, Color.web(\"#c0fe56\")),\r\n new Stop(0.28, Color.web(\"#5dfbc1\")),\r\n new Stop(0.43, Color.web(\"#64c2f8\")),\r\n new Stop(0.57, Color.web(\"#be4af7\")),\r\n new Stop(0.71, Color.web(\"#ed5fc2\")),\r\n new Stop(0.85, Color.web(\"#ef504c\")),\r\n new Stop(1, Color.web(\"#f2660f\")),}));\r\n Group blendModeGroup =\r\n new Group(new Group(new Rectangle(scene.getWidth(), scene.getHeight(),\r\n Color.DARKCYAN.brighter()), circles), colors);\r\n colors.setBlendMode(BlendMode.OVERLAY);\r\n root.getChildren().add(blendModeGroup);\r\n circles.setEffect(new BoxBlur(10, 10, 3));\r\n Timeline timeline = new Timeline();\r\n for (Node circle : circles.getChildren()) {\r\n timeline.getKeyFrames().addAll(\r\n new KeyFrame(Duration.ZERO, // set start position at 0\r\n new KeyValue(circle.translateXProperty(), random() * w),\r\n new KeyValue(circle.translateYProperty(), random() * h)),\r\n new KeyFrame(new Duration(40000), // set end position at 40s\r\n new KeyValue(circle.translateXProperty(), random() * w),\r\n new KeyValue(circle.translateYProperty(), random() * h)));\r\n }\r\n \r\n // play 40s of animation\r\n timeline.play();\r\n return root;\r\n }",
"Parent Background(){\r\n \r\n Group root = new Group();\r\n Scene scene = new Scene(root, w, h,null);\r\n \r\n Group circles = new Group();\r\n for (int i = 0; i < 30; i++) {\r\n Circle circle = new Circle(150, Color.web(\"white\", 0.05));\r\n circle.setStrokeType(StrokeType.OUTSIDE);\r\n circle.setStroke(Color.web(\"white\", 0.16));\r\n circle.setStrokeWidth(4);\r\n circles.getChildren().add(circle);\r\n }\r\n Rectangle colors = new Rectangle(scene.getWidth(), scene.getHeight(),\r\n new LinearGradient(1f, 1f, 0f, 1f, true, CycleMethod.NO_CYCLE, new Stop[]{\r\n new Stop(0, Color.web(\"#f8bd55\")),\r\n new Stop(0.14, Color.web(\"#c0fe56\")),\r\n new Stop(0.28, Color.web(\"#5dfbc1\")),\r\n new Stop(0.43, Color.web(\"#64c2f8\")),\r\n new Stop(0.57, Color.web(\"#be4af7\")),\r\n new Stop(0.71, Color.web(\"#ed5fc2\")),\r\n new Stop(0.85, Color.web(\"#ef504c\")),\r\n new Stop(1, Color.web(\"#f2660f\")),}));\r\n Group blendModeGroup =\r\n new Group(new Group(new Rectangle(scene.getWidth(), scene.getHeight(),\r\n Color.DARKCYAN.brighter()), circles), colors);\r\n colors.setBlendMode(BlendMode.OVERLAY);\r\n root.getChildren().add(blendModeGroup);\r\n circles.setEffect(new BoxBlur(10, 10, 3));\r\n Timeline timeline = new Timeline();\r\n for (Node circle : circles.getChildren()) {\r\n timeline.getKeyFrames().addAll(\r\n new KeyFrame(Duration.ZERO, // set start position at 0\r\n new KeyValue(circle.translateXProperty(), random() * w),\r\n new KeyValue(circle.translateYProperty(), random() * h)),\r\n new KeyFrame(new Duration(40000), // set end position at 40s\r\n new KeyValue(circle.translateXProperty(), random() * w),\r\n new KeyValue(circle.translateYProperty(), random() * h)));\r\n }\r\n \r\n // play 40s of animation\r\n timeline.play();\r\n return root;\r\n }",
"public void PRCRender() {\n if(rollOver) {\n object.getStyle().setFillColorFloat(20);\n } else if(dragging) {\n object.getStyle().setFillColorFloat(5);\n } else {\n object.style.setFillColorFloat(100);\n }\n object.render();\n }",
"public Bitmap generateBackground()\n {\n Bitmap bg = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);\n Canvas temp = new Canvas(bg);\n for (int i = 0; i < width/blockWidth; i++)\n {\n for (int j = 0; j < height/blockHeight; j++)\n {\n Random rand = new Random();\n int val = rand.nextInt(5);\n\n if (val == 0)\n {\n temp.drawBitmap(Bitmap.createScaledBitmap(BitmapFactory.decodeResource(getResources(),R.drawable.ground_tile_1), blockWidth, blockHeight, true),\n i*blockWidth, j*blockHeight, null);\n\n }\n else if (val == 1)\n {\n temp.drawBitmap(Bitmap.createScaledBitmap(BitmapFactory.decodeResource(getResources(),R.drawable.ground_tile_2), blockWidth, blockHeight, true),\n i*blockWidth, j*blockHeight, null);\n }\n else if (val == 2)\n {\n temp.drawBitmap(Bitmap.createScaledBitmap(BitmapFactory.decodeResource(getResources(),R.drawable.ground_tile_3), blockWidth, blockHeight, true),\n i*blockWidth, j*blockHeight, null);\n }\n else if (val == 3)\n {\n temp.drawBitmap(Bitmap.createScaledBitmap(BitmapFactory.decodeResource(getResources(),R.drawable.ground_tile_4), blockWidth, blockHeight, true),\n i*blockWidth, j*blockHeight, null);\n }\n else if (val == 4)\n {\n temp.drawBitmap(Bitmap.createScaledBitmap(BitmapFactory.decodeResource(getResources(),R.drawable.ground_tile_5), blockWidth, blockHeight, true),\n i*blockWidth, j*blockHeight, null);\n }\n\n }\n }\n\n return bg;\n\n }",
"private void drawBackground(Canvas canvas) {\n if (resourceHelper == null || settingsHelper == null) return;\n \n paint.setStrokeWidth(0);\n paint.setStyle(Paint.Style.FILL);\n \n int lastThreshold = top;\n \n for (MeasurementLevel measurementLevel : new MeasurementLevel[]{MeasurementLevel.HIGH, MeasurementLevel.MID, MeasurementLevel.LOW}) {\n paint.setColor(resourceHelper.getGraphColor(measurementLevel));\n int threshold = settingsHelper.getThreshold(sensor, measurementLevel);\n \n canvas.drawRect(0, project(lastThreshold), getWidth(), project(threshold), paint);\n lastThreshold = threshold;\n }\n \n paint.setColor(resourceHelper.getGraphColor(MeasurementLevel.VERY_LOW));\n canvas.drawRect(0, project(lastThreshold), getWidth(), getHeight(), paint);\n }"
]
| [
"0.6602016",
"0.6548302",
"0.65348303",
"0.6249422",
"0.61358213",
"0.61093956",
"0.60954905",
"0.60636777",
"0.60508114",
"0.59149677",
"0.580171",
"0.57879716",
"0.5760771",
"0.5753868",
"0.57412964",
"0.56920564",
"0.56874865",
"0.56604964",
"0.56308687",
"0.55895376",
"0.5574279",
"0.55710906",
"0.55645597",
"0.5562346",
"0.554715",
"0.55389005",
"0.55287135",
"0.55281067",
"0.5514077",
"0.5501051",
"0.549404",
"0.5467888",
"0.54535306",
"0.54503113",
"0.5437242",
"0.54347",
"0.5430405",
"0.53960913",
"0.5394767",
"0.53922486",
"0.5336709",
"0.53304523",
"0.5327483",
"0.5324667",
"0.5321135",
"0.5298369",
"0.52945536",
"0.5287592",
"0.5287334",
"0.52855796",
"0.52853817",
"0.5270849",
"0.52700174",
"0.52596986",
"0.52532953",
"0.5252426",
"0.5251663",
"0.52509445",
"0.5247862",
"0.52432704",
"0.52387816",
"0.52305645",
"0.5224361",
"0.5218592",
"0.51864976",
"0.51761824",
"0.516629",
"0.51644886",
"0.5161816",
"0.51610214",
"0.51508945",
"0.5147711",
"0.513923",
"0.5137907",
"0.51376694",
"0.51375103",
"0.5134094",
"0.51102126",
"0.5098358",
"0.509367",
"0.5088857",
"0.50728774",
"0.5066803",
"0.50585306",
"0.5057141",
"0.5053569",
"0.50532293",
"0.5044519",
"0.50420743",
"0.5038917",
"0.50384575",
"0.5024018",
"0.50205576",
"0.5017606",
"0.50042236",
"0.49759907",
"0.49759907",
"0.49590105",
"0.49589106",
"0.49545074"
]
| 0.6948691 | 0 |
draw blocks in foreground | public void drawLevelFg( SpriteBatch batch, JARCamera camera )
{
for ( int i = 0; i < iWalls.length; ++i )
{
//draw block with isometric offset
iWalls[ i ].iBlock.draw( batch, camera );
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void paintComponent(Graphics g){\n \t\t\t g.setColor(Color.white);\n \t\t\t g.fillRect(0,0,getWidth(),getHeight());\n for(Block z : blocks){\n z.draw(g);\n }\n \t\t }",
"private void drawBlockLines(Canvas canvas,float offsetX) {\n List<BlockLine> blocks = mSpanner == null ? null : mSpanner.getColors().getBlocks();\n if(blocks == null || blocks.isEmpty()) {\n return;\n }\n int first = getFirstVisibleLine();\n int last = getLastVisibleLine();\n boolean mark = false;\n int jCount = 0;\n int maxCount = Integer.MAX_VALUE;\n if(mSpanner != null) {\n TextColorProvider.TextColors colors = mSpanner.getColors();\n if(colors != null) {\n maxCount = colors.getSuppressSwitch();\n }\n }\n int mm = binarySearchEndBlock(first,blocks);\n int cursorIdx = mCursorPosition;\n for(int curr = mm;curr < blocks.size();curr++){\n BlockLine block = blocks.get(curr);\n if(hasVisibleRegion(block.startLine,block.endLine,first,last)){\n try{\n prepareLine(block.endLine);\n float offset1 = measureText(mChars,0,block.endColumn);\n prepareLine(block.startLine);\n float offset2 = measureText(mChars,0,block.startColumn);\n float offset = Math.min(offset1,offset2);\n float centerX = offset + offsetX;\n mRect.top = Math.max(0,getLineBottom(block.startLine) - getOffsetY());\n mRect.bottom = Math.min(getHeight(),getLineTop(block.endLine) - getOffsetY());\n mRect.left = centerX - mDpUnit * mBlockLineWidth / 2;\n mRect.right = centerX + mDpUnit * mBlockLineWidth / 2;\n drawColor(canvas,mColors.getColor(curr == cursorIdx ? ColorScheme.BLOCK_LINE_CURRENT :ColorScheme.BLOCK_LINE),mRect);\n }catch(IndexOutOfBoundsException e) {\n e.printStackTrace();\n //Not handled.\n //Because the exception usually occurs when the content changed.\n }\n mark = true;\n }else if(mark) {\n if(jCount >= maxCount)\n break;\n jCount++;\n }\n }\n }",
"private void drawStuff() {\n //Toolkit.getDefaultToolkit().sync();\n g = bf.getDrawGraphics();\n bf.show();\n Image background = window.getBackg();\n try {\n g.drawImage(background, 4, 24, this);\n\n for(i=12; i<264; i++) {\n cellKind = matrix[i];\n\n if(cellKind > 0)\n g.drawImage(tile[cellKind], (i%12)*23-3, (i/12)*23+17, this);\n }\n\n drawPiece(piece);\n drawNextPiece(pieceKind2);\n\n g.setColor(Color.WHITE);\n g.drawString(\"\" + (level+1), 303, 259);\n g.drawString(\"\" + score, 303, 339);\n g.drawString(\"\" + lines, 303, 429);\n\n } finally {bf.show(); g.dispose();}\n }",
"public void paintComponent(Graphics g)\n {\n super.paintComponent(g);\n\n Dimension d = getSize();\n //current block\n for (j = 0; j < 16; j++)\n {\n if (shapes[blockType][turnState][j] == 1)\n {\n g.setColor(Color.BLUE);\n g.fillRect((j%4 + x + 1)*d.width/20,(j/4 + y - 4)*d.width/20, d.width/20, d.width/20);\n g.setColor(Color.BLACK);\n g.drawRect((j%4 + x + 1)*d.width/20,(j/4 + y - 4)*d.width/20, d.width/20, d.width/20);\n }\n }\n //next block\n for (j = 0; j < 16; j++)\n {\n if (shapes[nextb][nextt][j] == 1)\n {\n g.setColor(Color.RED);\n g.fillRect((j%4 + 1)*d.width/20+d.width*13/20,(j/4)*d.width/20+d.width/10, d.width/20, d.width/20);\n g.setColor(Color.BLACK);\n g.drawRect((j%4 + 1)*d.width/20+d.width*13/20,(j/4)*d.width/20+d.width/10, d.width/20, d.width/20);\n\n }\n }\n //left boundary drawing\n for (j = 4; j < 26; j++)\n { \n int i = 0;\n if (map[i][j]==2)\n { \n g.setColor(Color.BLACK);\n g.drawLine((i+1)*d.width/20,(j-4)*d.width/20,(i+1)*d.width/20,(j-5)*d.width/20);\n }\n }\n //right boundary drawing\n for (j = 4; j < 26; j++)\n { \n int i = 11;\n if (map[i][j]==2)\n { \n g.setColor(Color.BLACK);\n g.drawLine(i*d.width/20,(j-4)*d.width/20,i*d.width/20,(j-5)*d.width/20);\n }\n }\n //bottom boundary drawing\n for (i = 0; i < 10; i++)\n {\n int j = 25;\n g.setColor(Color.BLACK);\n g.drawLine((i+1)*d.width/20,(j-4)*d.width/20,(i+2)*d.width/20,(j-4)*d.width/20);\n }\n //draw blocks which reached the bottom or on top of another block\n for (j = 4; j < 26; j++)\n {\n for (i = 0; i < 12; i++)\n {\n if (map[i][j] == 1)\n { \n g.setColor(Color.GREEN);\n g.fillRect(i*d.width/20,(j-4)*d.width/20, d.width/20, d.width/20);\n g.setColor(Color.BLACK);\n g.drawRect(i*d.width/20,(j-4)*d.width/20, d.width/20, d.width/20);\n } \n }\n }\n\n //next label\n g.setColor(Color.BLACK);\n g.setFont(new Font(\"Serif\", Font.ITALIC, d.width/20));\n g.drawString(\"Next Shape:\", d.width*13/20, d.width*3/40);\n //level label\n g.setColor(Color.black);\n g.setFont(new Font(\"Serif\", Font.BOLD, d.width*3/80));\n g.drawString(\"Level: \" + level, d.width*13/20, d.width/2);\n //line label\n g.setColor(Color.black);\n g.setFont(new Font(\"Serif\", Font.BOLD, d.width*3/80));\n g.drawString(\"Line: \" + showline, d.width*13/20, d.width*3/5);\n //score label\n g.setColor(Color.BLACK);\n g.setFont(new Font(\"Serif\", Font.BOLD, d.width*3/80));\n g.drawString(\"Score: \" + score, d.width*13/20, d.width*7/10);\n }",
"public void paintComponent(Graphics g)\n {\n super.paintComponent(g);\n\n Dimension d = getSize();\n //current block\n for (j = 0; j < 16; j++)\n {\n if (shapes[blockType][turnState][j] == 1)\n {\n g.setColor(Color.BLUE);\n g.fillRect((j%4 + x + 1)*d.width/20,(j/4 + y - 4)*d.width/20, d.width/20, d.width/20);\n g.setColor(Color.BLACK);\n g.drawRect((j%4 + x + 1)*d.width/20,(j/4 + y - 4)*d.width/20, d.width/20, d.width/20);\n }\n }\n //next block\n for (j = 0; j < 16; j++)\n {\n if (shapes[nextb][nextt][j] == 1)\n {\n g.setColor(Color.RED);\n g.fillRect((j%4 + 1)*d.width/20+d.width*13/20,(j/4)*d.width/20+d.width*3/20, d.width/20, d.width/20);\n g.setColor(Color.BLACK);\n g.drawRect((j%4 + 1)*d.width/20+d.width*13/20,(j/4)*d.width/20+d.width*3/20, d.width/20, d.width/20);\n\n }\n }\n //left boundary drawing\n for (j = 4; j < 36; j++)\n { \n int i = 0;\n if (map[i][j]==2)\n { \n g.setColor(Color.BLACK);\n g.drawLine((i+1)*d.width/20,(j-4)*d.width/20,(i+1)*d.width/20,(j-5)*d.width/20);\n }\n }\n //right boundary drawing\n for (j = 4; j < 36; j++)\n { \n int i = 11;\n if (map[i][j]==2)\n { \n g.setColor(Color.BLACK);\n g.drawLine(i*d.width/20,(j-4)*d.width/20,i*d.width/20,(j-5)*d.width/20);\n }\n }\n //bottom boundary drawing\n for (i = 0; i < 10; i++)\n {\n int j = 35;\n g.setColor(Color.BLACK);\n g.drawLine((i+1)*d.width/20,(j-4)*d.width/20,(i+2)*d.width/20,(j-4)*d.width/20);\n }\n //draw blocks which reached the bottom or on top of another block\n for (j = 4; j < 36; j++)\n {\n for (i = 0; i < 12; i++)\n {\n if (map[i][j] == 1)\n { \n g.setColor(Color.GREEN);\n g.fillRect(i*d.width/20,(j-4)*d.width/20, d.width/20, d.width/20);\n g.setColor(Color.BLACK);\n g.drawRect(i*d.width/20,(j-4)*d.width/20, d.width/20, d.width/20);\n } \n }\n }\n\n //next label\n g.setColor(Color.BLACK);\n g.setFont(new Font(\"Serif\", Font.ITALIC, d.width/20));\n g.drawString(\"Next Shape:\", d.width*13/20, d.width/8);\n //level label\n g.setColor(Color.black);\n g.setFont(new Font(\"Serif\", Font.BOLD, d.width*3/80));\n g.drawString(\"Level: \" + level, d.width*13/20, d.width*5/8);\n //line label\n g.setColor(Color.black);\n g.setFont(new Font(\"Serif\", Font.BOLD, d.width*3/80));\n g.drawString(\"Line: \" + showline, d.width*13/20, d.width*7/8);\n //score label\n g.setColor(Color.BLACK);\n g.setFont(new Font(\"Serif\", Font.BOLD, d.width*3/80));\n g.drawString(\"Score: \" + score, d.width*13/20, d.width*9/8);\n }",
"public void draw()\r\n\t{\r\n\t\tsynchronized (lines)\r\n\t\t{\r\n\t\t\tfor(int i = lines.size()-1; i >= 0; i--)\r\n\t\t\t{\r\n\t\t\t\tlines.get(i).draw();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void paintComponent(Graphics g)\n {\n super.paintComponent(g);\n\n Dimension d = getSize();\n //current block\n for (j = 0; j < 16; j++)\n {\n if (shapes[blockType][turnState][j] == 1)\n {\n g.setColor(Color.BLUE);\n g.fillRect((j%4 + x + 1)*d.width/30,(j/4 + y - 4)*d.width/30, d.width/30, d.width/30);\n g.setColor(Color.BLACK);\n g.drawRect((j%4 + x + 1)*d.width/30,(j/4 + y - 4)*d.width/30, d.width/30, d.width/30);\n }\n }\n //next block\n for (j = 0; j < 16; j++)\n {\n if (shapes[nextb][nextt][j] == 1)\n {\n g.setColor(Color.RED);\n g.fillRect((j%4 + 1)*d.width/30+d.width*23/30,(j/4)*d.width/30+d.width/15, d.width/30, d.width/30);\n g.setColor(Color.BLACK);\n g.drawRect((j%4 + 1)*d.width/30+d.width*23/30,(j/4)*d.width/30+d.width/15, d.width/30, d.width/30);\n\n }\n }\n //left boundary drawing\n for (j = 4; j < 26; j++)\n { \n int i = 0;\n if (map[i][j]==2)\n { \n g.setColor(Color.BLACK);\n g.drawLine((i+1)*d.width/30,(j-4)*d.width/30,(i+1)*d.width/30,(j-5)*d.width/30);\n }\n }\n //right boundary drawing\n for (j = 4; j < 26; j++)\n { \n int i = 21;\n if (map[i][j]==2)\n { \n g.setColor(Color.BLACK);\n g.drawLine(i*d.width/30,(j-4)*d.width/30,i*d.width/30,(j-5)*d.width/30);\n }\n }\n //bottom boundary drawing\n for (i = 0; i < 20; i++)\n {\n int j = 25;\n g.setColor(Color.BLACK);\n g.drawLine((i+1)*d.width/30,(j-4)*d.width/30,(i+2)*d.width/30,(j-4)*d.width/30);\n }\n //draw blocks which reached the bottom or on top of another block\n for (j = 4; j < 26; j++)\n {\n for (i = 0; i < 21; i++)\n {\n if (map[i][j] == 1)\n { \n g.setColor(Color.GREEN);\n g.fillRect(i*d.width/30,(j-4)*d.width/30, d.width/30, d.width/30);\n g.setColor(Color.BLACK);\n g.drawRect(i*d.width/30,(j-4)*d.width/30, d.width/30, d.width/30);\n } \n }\n }\n\n //next label\n g.setColor(Color.BLACK);\n g.setFont(new Font(\"Serif\", Font.ITALIC, d.width/30));\n g.drawString(\"Next Shape:\", d.width*23/30, d.width*3/60);\n //level label\n g.setColor(Color.black);\n g.setFont(new Font(\"Serif\", Font.BOLD, d.width*3/120));\n g.drawString(\"Level: \" + level, d.width*23/30, d.width/3);\n //line label\n g.setColor(Color.black);\n g.setFont(new Font(\"Serif\", Font.BOLD, d.width*3/120));\n g.drawString(\"Line: \" + showline, d.width*23/30, d.width*2/5);\n //score label\n g.setColor(Color.BLACK);\n g.setFont(new Font(\"Serif\", Font.BOLD, d.width*3/120));\n g.drawString(\"Score: \" + score, d.width*23/30, d.width*7/15);\n }",
"public void showBlocks()\r\n {\r\n repaint();\r\n }",
"public void draw(){\n for(int i = 1; i <= height; i++){\n for(int s = 1; s <= i; s++)\n System.out.print(\"*\");\n System.out.println();\n }\n }",
"public Array<BlockDrawable> getAllBlocksToDraw() {\r\n \tArray<BlockDrawable> blocksToDraw = new Array<BlockDrawable>();\r\n\t\tblocksToDraw.addAll(tablero);\r\n\t\tif(isGhostActivated()){\r\n\t\t\tblocksToDraw.addAll(getGhostBlocksToDraw());\r\n\t\t}\r\n\t\tif (hasFalling())\r\n\t\t\tblocksToDraw.addAll(falling.allOuterBlocks());\r\n\t\t\r\n\t\treturn blocksToDraw;\r\n }",
"public abstract WorldImage drawBoard(int blocks);",
"private void draw() {\n\n // Current generation (y-position on canvas)\n int generation = 0;\n\n // Looping while still on canvas\n while (generation < canvasHeight / CELL_SIZE) {\n\n // Next generation\n cells = generate(cells);\n\n // Drawing\n for (int i = 0; i < cells.length; i++) {\n gc.setFill(colors[cells[i]]);\n gc.fillRect(i * CELL_SIZE, generation * CELL_SIZE, CELL_SIZE, CELL_SIZE);\n }\n\n // Next line..\n generation++;\n }\n }",
"public void drawBlock(Graphics g, int i, int j, int xOffset, int yOffset) {\n for (Layer l : layers) {\n l.paint(g, i, j, xOffset, yOffset);\n }\n collisionLayer.paint(g, i, j, xOffset, yOffset);\n // draw entities\n if (entities != null) {\n for (int k = 0; k < entities.size(); k++) {\n Entity next = entities.get(k);\n next.paint(g, i, j);\n }\n }\n\t}",
"public void paintComponent(Graphics g){\n \t\tsuper.paintComponent(g);\r\n \r\n \t\tint numOfRows = (int)blockShape.getResolution().x;\r\n \t\tint numOfCols = (int)blockShape.getResolution().y;\r\n \t\tint gridSize = (int)(SHAPE_WIN_SIZE/numOfRows);\r\n \t\t\r\n \t\t//1st: paint each element in the BlockShape -> shape(Color[][])\r\n \t\tfor(int i=0; i< numOfRows;i++){\r\n \t\t\tfor(int j=0; j< numOfCols; j++){\r\n \t\t\t\tg.setColor(blockShape.getShapeElement(i, j));\r\n \r\n \t\t\t\tif(i == numOfRows-1 || j == numOfCols-1){\r\n \t\t\t\t\t//the last row and last column is a bit wider because of the type casting =_=\r\n \t\t\t\t\tg.fillRect(j*gridSize, i*gridSize, gridSize+10, gridSize+10);\r\n \t\t\t\t}else{\r\n \t\t\t\t\tg.fillRect(j*gridSize, i*gridSize, gridSize, gridSize);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\r\n \t\t//2nd: paint the grid corresponding to the resolution of blockShape\r\n \t\tg.setColor(Color.orange);\r\n \t\tfor (int row = 0; row < numOfRows; row++) {\r\n \t\t\tg.drawLine(0,row*gridSize ,SHAPE_WIN_SIZE, row*gridSize);\r\n \t\t}\r\n \t\tg.drawLine(0,SHAPE_WIN_SIZE, SHAPE_WIN_SIZE, SHAPE_WIN_SIZE);\r\n \r\n \t\tfor (int col = 0; col < numOfCols; col++) {\r\n \t\t\tg.drawLine(col*gridSize, 0 , col*gridSize , SHAPE_WIN_SIZE);\r\n \t\t}\r\n \t\tg.drawLine(SHAPE_WIN_SIZE-1, 0, SHAPE_WIN_SIZE-1, SHAPE_WIN_SIZE);\r\n \t}",
"public void renderCenterBlock(int cons, int side, int end)\r\n/* 143: */ {\r\n/* 144:135 */ if (cons == 0)\r\n/* 145: */ {\r\n/* 146:136 */ this.context.setTex(end);\r\n/* 147:137 */ doubleBox(63, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 148:138 */ return;\r\n/* 149: */ }\r\n/* 150:139 */ if (cons == 3)\r\n/* 151: */ {\r\n/* 152:140 */ this.context.setTexFlags(1773);\r\n/* 153:141 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 154:142 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 155:143 */ return;\r\n/* 156: */ }\r\n/* 157:144 */ if (cons == 12)\r\n/* 158: */ {\r\n/* 159:145 */ this.context.setTexFlags(184365);\r\n/* 160:146 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 161:147 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 1.0F);\r\n/* 162:148 */ return;\r\n/* 163: */ }\r\n/* 164:149 */ if (cons == 48)\r\n/* 165: */ {\r\n/* 166:150 */ this.context.setTexFlags(187200);\r\n/* 167:151 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 168:152 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 169:153 */ return;\r\n/* 170: */ }\r\n/* 171:155 */ this.context.setTex(end);\r\n/* 172:156 */ doubleBox(0x3F ^ cons, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 173:157 */ if ((cons & 0x1) > 0)\r\n/* 174: */ {\r\n/* 175:158 */ this.context.setTexFlags(1773);\r\n/* 176:159 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 177:160 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 0.375F, 0.625F);\r\n/* 178: */ }\r\n/* 179:162 */ if ((cons & 0x2) > 0)\r\n/* 180: */ {\r\n/* 181:163 */ this.context.setTexFlags(1773);\r\n/* 182:164 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 183:165 */ doubleBox(60, 0.375F, 0.625F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 184: */ }\r\n/* 185:167 */ if ((cons & 0x4) > 0)\r\n/* 186: */ {\r\n/* 187:168 */ this.context.setTexFlags(184365);\r\n/* 188:169 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 189:170 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 0.375F);\r\n/* 190: */ }\r\n/* 191:172 */ if ((cons & 0x8) > 0)\r\n/* 192: */ {\r\n/* 193:173 */ this.context.setTexFlags(184365);\r\n/* 194:174 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 195:175 */ doubleBox(51, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F, 1.0F);\r\n/* 196: */ }\r\n/* 197:177 */ if ((cons & 0x10) > 0)\r\n/* 198: */ {\r\n/* 199:178 */ this.context.setTexFlags(187200);\r\n/* 200:179 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 201:180 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F);\r\n/* 202: */ }\r\n/* 203:182 */ if ((cons & 0x20) > 0)\r\n/* 204: */ {\r\n/* 205:183 */ this.context.setTexFlags(187200);\r\n/* 206:184 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 207:185 */ doubleBox(15, 0.625F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 208: */ }\r\n/* 209: */ }",
"private void drawLines()\n {\n getBackground().setColor( Color.BLACK );\n \n for( int i = 200; i < getWidth(); i += 200 )\n {\n getBackground().drawLine(i, 0, i, getHeight() );\n getBackground().drawLine(0, i, getWidth(), i);\n }\n \n Greenfoot.start();\n }",
"protected void drawImpl()\n {\n if (mode == 2) {\n // Invader\n background(0);\n noStroke();\n int triangleXDensity = 32;\n int triangleYDensity = 18;\n for (int i = 0; i < triangleXDensity + 100; i++) {\n for (int j = 0; j < triangleYDensity + 100; j++) {\n float value = scaledBandLevels[(i % scaledBandLevels.length)];\n float shapeSize = map(value, 0, 255, 0, 150);\n int currentX = (width/triangleXDensity) * i;\n int currentY = (int)(((height/triangleYDensity) * j));\n\n if (subMode == 1) {\n currentY = (int)(((height/triangleYDensity) * j) - (frameCount % height * 3));\n }\n else if (subMode == 3) {\n currentY = (int)(((height/triangleYDensity) * j) - (frameCount % height * 6));\n }\n\n if (subMode == 4) {\n shapeSize = map(value, 0, 255, 0, 500);\n }\n\n if ((i + j) % (int)random(1,5) == 0) {\n fill(0, 255, 255);\n }\n else {\n fill(234,100,255);\n }\n pushMatrix();\n if (subMode == 2) {\n translate(width/2, height/2);\n rotate(radians(frameCount % value * 2));\n translate(-width/2, -height/2);\n }\n triangle(currentX, currentY - shapeSize/2, currentX - shapeSize/2, currentY + shapeSize/2, currentX + shapeSize/2, currentY + shapeSize/2);\n popMatrix();\n }\n }\n\n }\n else if (mode == 5) {\n // Mirror Ball\n background(0);\n translate(width/2, height/2, 500);\n noStroke();\n if (subMode == 0) {\n rotateY(frameCount * PI/800);\n }\n else if (subMode == 1 || subMode == 2) {\n rotateY(frameCount * PI/800);\n rotateX(frameCount * PI/100);\n }\n else if (subMode == 3) {\n rotateY(frameCount * PI/400);\n }\n\n for (int i = 0; i < 100; i++) {\n for (int j = 0; j < 100; j++) {\n rotateY((2*PI/200) * j);\n pushMatrix();\n rotateX((2*PI/200) * i);\n translate(0,200);\n if (j > 50 && j < 150) {\n rotateX(PI/2);\n }\n else {\n rotateX(-PI/2);\n }\n if (subMode == 2 || subMode == 3) {\n fill(i * 2, 0, j, scaledBandLevels[i % scaledBandLevels.length] * 2);\n }\n else {\n fill(255, scaledBandLevels[i % scaledBandLevels.length]);\n }\n rect(0,200,20,20);\n popMatrix();\n }\n }\n }\n else if (mode == 8) {\n // End To Begin\n background(0);\n\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i] && modSizes[i] < 60) {\n modSizes[i]+=2;\n }\n else if (modSizes[i] > 5) {\n modSizes[i]--;\n }\n }\n \n theta += .2;\n\n if (subMode >=3) {\n theta += .6;\n }\n\n float tempAngle = theta;\n for (int i = 0; i < yvalues.length; i++) {\n yvalues[i] = sin(tempAngle)*amplitude;\n tempAngle+=dx;\n }\n\n noStroke();\n if (subMode >= 4) {\n translate(0, height/2);\n }\n int currentFrameCount = frameCount;\n for (int x = 0; x < yvalues.length; x++) {\n if (subMode >= 4) {\n fill(0,random(128,255),255, scaledBandLevels[x % scaledBandLevels.length] * 3);\n rotateX(currentFrameCount * (PI/200));\n }\n else {\n fill(0,random(128,255),255, scaledBandLevels[x % scaledBandLevels.length]);\n }\n ellipse(x*xspacing - period/2, height/2+yvalues[x], modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n if (subMode >= 1) {\n ellipse(x*xspacing, height/2+yvalues[x] - height/4, modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n ellipse(x*xspacing, height/2+yvalues[x] + height/4, modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n }\n if (subMode >= 2) {\n ellipse(x*xspacing, height/2+yvalues[x] - height/8, modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n ellipse(x*xspacing, height/2+yvalues[x] + height/8, modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n }\n }\n }\n else if (mode == 1) {\n // Life Support\n background(0);\n noStroke();\n if (trigger) { \n if (subMode == 0) {\n fill(255, 0, 0, triggerHold - (triggerCount * 4));\n }\n else if (subMode == 1) {\n fill(255, triggerHold - (triggerCount * 4));\n }\n rect(0,0,width,height);\n if (triggerCount > triggerHold) {\n trigger = false;\n triggerCount = 1;\n }\n else {\n triggerCount++;\n }\n }\n }\n else if (mode == 6) {\n // Stacking Cards\n background(255);\n if (subMode >= 1) {\n translate(width/2, 0);\n rotateY(frameCount * PI/200);\n }\n imageMode(CENTER);\n\n if (subMode <= 1) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i]) {\n modSizes[i]+=40;\n }\n else if (modSizes[i] > 40) {\n modSizes[i]--;\n }\n image(mod, ((width/scaledBandLevels.length) * i) + ((width/scaledBandLevels.length)/2), (height/2), modSizes[i], modSizes[i]);\n }\n }\n else if (subMode == 2) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i]) {\n modSizes[i]+=20;\n }\n else if (modSizes[i] > 40) {\n modSizes[i]--;\n }\n }\n for (int j = 0; j < 4; j++) {\n rotateY(j * (PI/4));\n for (int i = 0; i < scaledBandLevels.length; i++) {\n image(mod, ((width/scaledBandLevels.length) * i) + ((width/scaledBandLevels.length)/2), (height/2), modSizes[i], modSizes[i]);\n }\n }\n }\n else if (subMode == 3) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i]) {\n modSizes[i]+=20;\n }\n else if (modSizes[i] > 40) {\n modSizes[i]--;\n }\n }\n for (int j = 0; j < 8; j++) {\n rotateY(j * (PI/8));\n for (int i = 0; i < scaledBandLevels.length; i++) {\n image(mod, ((width/scaledBandLevels.length) * i) + ((width/scaledBandLevels.length)/2), (height/2), modSizes[i], modSizes[i]);\n }\n }\n }\n else if (subMode == 4) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i]) {\n modSizes[i]+=20;\n }\n else if (modSizes[i] > 40) {\n modSizes[i]--;\n }\n }\n for (int j = 0; j < 8; j++) {\n rotateY(j * (PI/8));\n for (int k = 0; k < height; k+= 300) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n image(mod, ((width/scaledBandLevels.length) * i) + ((width/scaledBandLevels.length)/2), k, modSizes[i], modSizes[i]);\n }\n }\n }\n }\n } \n else if (mode == 4) {\n background(0);\n noStroke();\n for (int i = 0; i < letterStrings.length; i++) { \n if (subMode == 0) {\n fill(234,100,255, scaledBandLevels[i % scaledBandLevels.length] * 2);\n if (i < letterStrings.length/2) {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) - scaledBandLevels[i % scaledBandLevels.length] - (400 - (i * 100)), (height/2) + 75);\n }\n else {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) + scaledBandLevels[i % scaledBandLevels.length] + (i * 100) - 400, (height/2) + 75);\n }\n }\n else if (subMode == 1) {\n fill(234,100,255, scaledBandLevels[i % scaledBandLevels.length] * 2);\n for (int j = -100; j < height + 100; j+=200) {\n if (i < letterStrings.length/2) {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) - scaledBandLevels[i % scaledBandLevels.length] - (400 - (i * 100)), j);\n }\n else {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) + scaledBandLevels[i % scaledBandLevels.length] + (i * 100) - 400, j);\n }\n }\n }\n else if (subMode == 2) {\n fill(234,100,255, scaledBandLevels[i % scaledBandLevels.length] * 2);\n for (int j = -100 - (frameCount % 400); j < height + 600; j+=200) {\n if (i < letterStrings.length/2) {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) - scaledBandLevels[i % scaledBandLevels.length] - (400 - (i * 100)), j);\n }\n else {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) + scaledBandLevels[i % scaledBandLevels.length] + (i * 100) - 400, j);\n }\n }\n }\n else if (subMode == 3) {\n for (int j = -100; j < height + 100; j+=200) {\n if (random(0,1) < .5) {\n fill(0,250,255, scaledBandLevels[i % scaledBandLevels.length] * 4);\n }\n else {\n fill(234,100,255, scaledBandLevels[i % scaledBandLevels.length] * 4);\n }\n if (i < letterStrings.length/2) {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) - scaledBandLevels[i % scaledBandLevels.length] - (400 - (i * 100)), j);\n }\n else {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) + scaledBandLevels[i % scaledBandLevels.length] + (i * 100) - 400, j);\n }\n }\n }\n }\n }\n else if (mode == 9) {\n background(0);\n noStroke();\n fill(234,100,255);\n String bandName = \"ELAPHANT\";\n text(bandName, (width/2) - (textWidth(bandName)/2), (height/2) + 75);\n }\n else {\n background(0);\n }\n }",
"@Override\n\t protected void paintComponent(Graphics g) {\n\t super.paintComponent(g);\n\t for (int y = 0; y < MAX_Y; y++) {\n\t for (int x = 0; x < MAX_X; x++) { \n\t if(seed[x][y].isAlive) {\n\t g.setColor(FILL_COLOR);\n\t g.fillRect(x * CELL_WIDTH, y * CELL_WIDTH, CELL_WIDTH, CELL_WIDTH);\n\t }\n\t else{\n\t g.setColor(defaultBackground);\n\t g.fillRect(x * CELL_WIDTH, y * CELL_WIDTH, CELL_WIDTH, CELL_WIDTH);\n\t }//end if..\n\t g.setColor(Color.GRAY);\n\t g.drawRect(x * CELL_WIDTH, y * CELL_WIDTH, CELL_WIDTH, CELL_WIDTH);\n\t }//end for x\n\t }//end for y\n\t }",
"public void paintComponent(final Graphics the_graphics)\n {\n super.paintComponent(the_graphics);\n final Graphics2D g2d = (Graphics2D) the_graphics;\n g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, \n RenderingHints.VALUE_ANTIALIAS_ON);\n g2d.setFont(my_font);\n g2d.setColor(Color.WHITE);\n g2d.setStroke(new BasicStroke(STROKE_SIZE));\n g2d.drawString(PIECE_STRING, (getWidth() / (STROKE_SIZE * STROKE_SIZE)) - \n (PIECE_STRING.length() / STROKE_SIZE), (int) (getHeight() * LABEL_STARTING_Y));\n \n for (int y = Piece.NUMBER_OF_BLOCKS - 1; 0 <= y; y--) \n {\n for (int x = 0; x < Piece.NUMBER_OF_BLOCKS; x++) \n {\n for (int i = 0; i < Piece.NUMBER_OF_BLOCKS; i++) \n {\n final Point block = my_board.nextPiece().blocks()[i];\n if (block.x() == x && block.y() == y) \n {\n g2d.setColor(my_board.nextPiece().color());\n g2d.fill(new Rectangle2D.Double((x * getWidth() * BLOCK_SIZE_CONSTANT) + \n (int) (getWidth() * BLOCK_STARTING_X), (getHeight() / 2) + \n (float) (getWidth() * BLOCK_SIZE_CONSTANT) - (y * getWidth() * \n BLOCK_SIZE_CONSTANT), getWidth() * BLOCK_SIZE_CONSTANT, getWidth() * \n BLOCK_SIZE_CONSTANT));\n g2d.setColor(Color.DARK_GRAY);\n g2d.draw(new Rectangle2D.Double((x * getWidth() * BLOCK_SIZE_CONSTANT) + \n (int) (getWidth() * BLOCK_STARTING_X), (getHeight() / 2) + \n (float) (getWidth() * BLOCK_SIZE_CONSTANT) - (y * getWidth() * \n BLOCK_SIZE_CONSTANT), getWidth() * BLOCK_SIZE_CONSTANT, getWidth() * \n BLOCK_SIZE_CONSTANT));\n } \n }\n }\n }\n }",
"public void paint() {\n BufferStrategy bs;\n bs = this.getBufferStrategy();\n\n Graphics g = bs.getDrawGraphics();\n g.drawImage(background, 0, 0, this.getWidth(), this.getHeight(), null);\n if (this.blackHoles != null) {\n for (BlackHole blackHole : this.blackHoles) {\n blackHole.paint(g);\n }\n }\n if (this.balls != null) {\n for (int i = 0; i <this.balls.size() ; i++) {\n this.balls.get(i).paint(g);\n }\n\n }\n\n bs.show();\n g.dispose();\n\n }",
"@Override\n\tpublic void draw(RoomBlocks grid) {\n\t\trenderer.setProjectionMatrix(CameraHolder.instance().getOrtho().combined);\n//\t\tCont tot = new Cont();\n\t\tColor color = new Color();\n\n\t\t\n\t\tDimensions dim = grid.getDimensions().toRoomWorldDimmensions();\n\t\tgrid.forEach(bl -> {\n//\t\t\t\n\t\t\tint x = (GeneratorConstants.ROOM_BLOCK_SIZE * bl.getX()) + GeneratorConstants.ROOM_BLOCK_SIZE;\n\t\t\t\n\t\t\tx = (dim.getW() - x) + dim.getX();\n\t\t\t\n\t\t\tint pseudWorldRoomY = grid.getDimensions().getY() * Configuration.getLevelGridElementContentSize();\n\t\t\tint y = (bl.getY() + pseudWorldRoomY) * (GeneratorConstants.ROOM_BLOCK_SIZE);\n\t\t\t\n\t\t\tShapeType shType = ShapeType.Filled;\n\t\t\tboolean render = false;\n\t\t\t\n\t\t\tif(bl.isDoor()) {\n\t\t\t\trender = true;\n\t\t\t\tcolor.set(0, 0, 0, 1);\n\t\t\t} else if(bl.isWall()) {\n//\t\t\t\trender = true;\n//\t\t\t\tcolor.set(1, 1, 1, 1);\n//\t\t\t\tshType = ShapeType.Line;\n\t\t\t} else if(bl.getMetaInfo() != null) {//TODO\n\t\t\t\t\n\t\t\t\tif(bl.getMetaInfo().getType().equals(\".\")) {\n\t\t\t\t\trender = true;\n\t\t\t\t\tcolor.set(0, 0, 0, 1);\n\t\t\t\t} else if(!bl.getMetaInfo().getType().equals(\"x\")) {\n\t\t\t\t\t\n\t\t\t\t\tBrush brush = Configuration.brushesPerTile.get(bl.getMetaInfo().getType().charAt(0));\n\t\t\t\t\tif(brush != null) {// && bl.getOwner() != null\n\t\t\t\t\t\t\n//\t\t\t\t\t\tif(bl.getOwner() != null) {\n//\t\t\t\t\t\t\tSystem.out.println(\"owner: \" + brush.tile);\n//\t\t\t\t\t\t}\t\t\t\t\t\t\n//\t\t\t\t\t\t\n\t\t\t\t\t\trender = true;\n\t\t\t\t\t\tcolor.set(brush.color[0], brush.color[1], brush.color[2], 1);\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(render) {\n\t\t\t\t\n\t\t\t\tint size = GeneratorConstants.ROOM_BLOCK_SIZE;\n\t\t\t\t\n\t\t\t\trenderer.begin(shType);\n\t\t\t\trenderer.setColor(color);\n\t\t\t\trenderer.rect(x, y, size, size);\n\t\t\t\trenderer.end();\n\t\t\t}\n\t\t\t\n//\t\t\tif(bl.getOwner() != null ) {\n//\t\t\t\tfinal int fx = x;\n//\t\t\t\tfinal int fy = y;\n//\t\t\t\t\n//\t\t\t\tbl.getOwner().forEachItems(itm -> {//desenhando os items\n//\t\t\t\t\trenderer.begin(ShapeType.Filled);\n//\t\t\t\t\trenderer.setColor(itm.color[0], itm.color[1], itm.color[2], 1);\n//\t\t\t\t\trenderer.rect(fx + itm.dx, fy + itm.dy, itm.width, itm.height);\n//\t\t\t\t\trenderer.end();\t\t\t\t\t\t\n//\t\t\t\t});\n//\t\t\t}\t\t\t\n\t\t});\n\t}",
"public abstract WorldImage drawCell(int blocks);",
"@Override\n public void paintComponent(Graphics g) {\n // always clear the screen first!\n g.clearRect(0, 0, WIDTH, HEIGHT);\n\n // GAME DRAWING GOES HERE\n \n \n // draw the blocks\n g.setColor(Color.black);\n for(int i = 0; i < blocks.length; i++){\n g.fillRect(blocks[i].x, blocks[i].y, blocks[i].width, blocks[i].height);\n }\n \n // middle ref (no longer needed)\n //g.setColor(Color.black);\n //g.drawRect(WIDTH/2 - 1, 0, 1, HEIGHT);\n \n // scores\n g.setFont(biggerFont);\n g.setColor(Color.blue);\n g.drawString(\"\" + tobyScore, WIDTH/2-100, 75);\n if(tobyWin){\n g.drawString(\"Toby Wins!\", WIDTH/2-115, 120);\n }\n g.setColor(Color.red);\n if(maxWin){\n g.drawString(\"Max Wins!\", WIDTH/2-115, 120);\n }\n g.drawString(\"\" + maxScore, WIDTH/2+100, 75);\n g.setColor(Color.white);\n g.setFont(titleFont);\n g.drawString(\"Toby N' Max: Capture the Flag!\", 25, 20);\n \n // draw the player\n g.setColor(Color.red);\n g.fillRect(max.x, max.y, max.width, max.height);\n g.setColor(Color.blue);\n g.fillRect(toby.x, toby.y, toby.width, toby.height);\n \n // draw the flag\n g.setColor(brown);\n for(int i = 0; i < flagPole.length; i++){\n g.fillRect(flagPole[i].x, flagPole[i].y, flagPole[i].width, flagPole[i].height);\n }\n \n g.setColor(purple);\n for(int i = 0; i < flag.length; i++){\n g.fillRect(flag[i].x, flag[i].y, flag[i].width, flag[i].height);\n }\n \n g.setColor(Color.white);\n for(int i = 0; i < flagLogo.length; i++){\n g.fillRect(flagLogo[i].x, flagLogo[i].y, flagLogo[i].width, flagLogo[i].height);\n }\n \n //g.setColor(Color.gray);\n // for(int i = 0; i < bombs.length; i++){\n // g.fillRect(bombs[i].x, bombs[i].y, bombs[i].width, bombs[i].height); \n //}\n \n \n // GAME DRAWING ENDS HERE\n }",
"void draw() {\n\n // SeamInfo lowestSeam = this.lowestSeamVert();\n // lowestSeam.changeColor();\n\n ComputedPixelImage seamRemovedImg = new ComputedPixelImage(this.newImg.width,\n this.newImg.height);\n int countRow = 0;\n int countCol = 0;\n\n Pixel current = this.curPixel;\n Pixel temp;\n\n while (current.down != null) {\n temp = current.down;\n while (current.right != null) {\n Color c = Color.MAGENTA;\n if (current.highlighted) {\n c = Color.RED;\n }\n else {\n c = current.color;\n }\n if (this.showType.equals(\"e\")) {\n int energy = (int) (current.energy * 100);\n if (energy > 255) {\n System.out.println(\"energy: \" + energy + \" to 255\");\n energy = 255;\n }\n c = new Color(energy, energy, energy);\n }\n else if (this.showType.equals(\"w\")) {\n int weight = (int) (current.seam.totalWeight);\n if (weight > 255) {\n System.out.println(\"weight: \" + weight + \" to 255\");\n weight = 255;\n }\n c = new Color(weight, weight, weight);\n }\n\n seamRemovedImg.setColorAt(countCol, countRow, c);\n countCol += 1;\n current = current.right;\n }\n countCol = 0;\n countRow += 1;\n current = temp;\n }\n countCol = 0;\n\n this.newImg = seamRemovedImg;\n\n }",
"@Override\n\tpublic void drawForeground(Canvas canvas, int width, int height) {\n\t\t\n\t}",
"private void drawBackGround() {\r\n\t\tdouble diff = getWidth() / NDECADES;\r\n\t\tdouble xcrd = 0;\r\n\t\tint year = START_DECADE;\r\n\t\tfor (int i = 0; i < NDECADES; i++) {\r\n\t\t\tString yearStr = year + \"\";\r\n\t\t\tadd(new GLine(xcrd, 0, xcrd, getHeight()));\r\n\t\t\tadd(new GLabel(yearStr, xcrd, getHeight()));\r\n\t\t\txcrd = xcrd + diff;\r\n\t\t\tyear = year + 10;\r\n\t\t}\r\n\t\tdouble ycrd = GRAPH_MARGIN_SIZE;\r\n\t\tadd(new GLine(0, ycrd, getWidth(), ycrd));\r\n\t\tadd(new GLine(0, getHeight() - ycrd, getWidth(), getHeight() - ycrd));\r\n\r\n\t}",
"public void paint() {\n for (int row = 0; row < ROWS; ++row) {\n for (int col = 0; col < COLS; ++col) {\n cells[row][col].paint();\n if (col < COLS - 1) System.out.print(\"|\");\n }\n System.out.println();\n if (row < ROWS - 1) {\n System.out.println(\"-----------\");\n }\n }\n }",
"public void display() {\t\t\n\t\tparent.pushStyle();\n\t\t\n\t\t//parent.noStroke();\n\t\t//parent.fill(255);\n\t\tparent.noFill();\n\t\tparent.ellipse(pos.x, pos.y, diam, diam);\n\t\tnodeSpin.drawNode(pos.x, pos.y, diam);\n\t\t\n\t\t//This should match what happens in the hover animation\n\t\tif (focused && userId >= 0) {\n\t\t\tparent.fill(Sequencer.colors[userId]);\n\t\t\tparent.ellipse(pos.x, pos.y, diam, diam);\n\t\t}\n\t\t\n\t\trunAnimations();\n\t\t\n\t\tparent.popStyle();\n\t}",
"private void refreshDisplay(){\n // The ArrayList bricks gets all the bricks currently on the board.\n bricks.addAll(board.getBoardBricks());\n bricks.addAll(board.getCurrentBlock().getBricks());\n g.clearRect(0, 0, BRICK_SIZE*(Board.BOUNDARY_RIGHT+7), BRICK_SIZE*(Board.BOUNDARY_BOTTOM+1));\n\n setupGhostBoard();\n for (Brick brick : ghostBoard.getCurrentBlock().getBricks()){\n g.setFill(Color.rgb(61, 61, 61));\n g.fillRect(brick.getX() * BRICK_SIZE, brick.getY() * BRICK_SIZE, BRICK_SIZE, BRICK_SIZE);\n g.setStroke(Color.WHITE);\n g.setLineWidth(2.0);\n g.strokeRect(brick.getX() * BRICK_SIZE, brick.getY() * BRICK_SIZE, BRICK_SIZE, BRICK_SIZE);\n }\n\n for (Brick brick : bricks) {\n g.setFill(getBrickColour(brick.getColour()));\n g.fillRect(brick.getX() * BRICK_SIZE + 2, brick.getY() * BRICK_SIZE + 2, BRICK_SIZE - 4, BRICK_SIZE - 4);\n }\n\n if(board.getHeldBlock() != null){\n for(Brick brick : board.getHeldBlock().getBricks()){\n g.setFill(getBrickColour(brick.getColour()));\n g.fillRect(brick.getX() * BRICK_SIZE + 259, brick.getY() * BRICK_SIZE + 44, BRICK_SIZE - 4, BRICK_SIZE - 4);\n }\n }\n\n for(Brick brick : board.getBlockQueue().get(0).getBricks()){\n g.setFill(getBrickColour(brick.getColour()));\n g.fillRect(brick.getX() * BRICK_SIZE + 259, brick.getY() * BRICK_SIZE + 184, BRICK_SIZE - 4, BRICK_SIZE - 4);\n }\n\n score.setText(\"\" + board.getScore());\n highScore.setText(\"\" + Math.max(FileHandler.readHighScore(), board.getScore()));\n level.setText(\"\" + board.getLevel());\n lines.setText(\"\" + board.getTotalLinesCleared());\n // All the elements of bricks must be removed, otherwise they stack up.\n bricks.removeAll(bricks);\n\n if(board.isGameOver()){\n g.setFill(Color.rgb(31, 31, 31, 0.5));\n g.fillRect(0, 0, BRICK_SIZE*(Board.BOUNDARY_RIGHT+1), BRICK_SIZE*(Board.BOUNDARY_BOTTOM+1));\n g.setTextAlign(TextAlignment.CENTER);\n g.setTextBaseline(VPos.CENTER);\n g.setFill(Color.WHITE);\n g.setFont(new Font(\"Impact\", 50));\n g.fillText(\n \"GAME OVER\",\n 160, 352\n );\n g.setFill(Color.rgb(190, 190, 190));\n g.setFont(new Font(\"Impact\", 20));\n g.fillText(\n \"Press 'Esc' to exit.\",\n 160, 392\n );\n\n int oldHighScore = FileHandler.readHighScore(), newHighScore = board.getScore();\n if(oldHighScore < newHighScore){\n highScoreSurpassed = true;\n }\n if(highScoreSurpassed){\n g.setFill(Color.WHITESMOKE);\n g.setFont(new Font(\"Impact\", 24));\n g.fillText(\n \"New High Score: \" + newHighScore + \"!\\nOld High Score: \" + oldHighScore + \".\",\n 160, 502\n );\n }\n }\n }",
"@Override\n\tpublic void doDraw(Canvas canvas) {\n\t\tcanvas.save();\n\t\tcanvas.translate(0,mScreenSize[1]/2.0F - mScreenSize[1]/6.0F);\n\t\tcanvas.scale(1.0F/3.0F, 1.0F/3.0F);\n\t\tfor(int i = 0; i < Math.min(mPatternSets.size(), 3); i++) {\n\t\t\tPatternSet.Pattern pattern = mPatternSets.get(i).get(0);\n\t\t\tcanvas.save();\n\t\t\tfor(int y = 0; y < pattern.height(); y++) {\n\t\t\t\tcanvas.save();\n\t\t\t\tfor(int x = 0; x < pattern.width(); x++) {\n\t\t\t\t\tif(pattern.get(x,y) > 0) {\n\t\t\t\t\t\t//Log.d(TAG, \"Ping!\");\n\t\t\t\t\t\tmBlockPaint.setColor(mBlockColors[pattern.get(x,y)]);\n\t\t\t\t\t\tcanvas.drawRect(1, 1, mBlockSize[0]-1, mBlockSize[1]-1, mBlockPaint);\n\t\t\t\t\t}\n\t\t\t\t\tcanvas.translate(mBlockSize[0], 0);\n\t\t\t\t}\n\t\t\t\tcanvas.restore();\n\t\t\t\tcanvas.translate(0, mBlockSize[1]);\n\t\t\t}\n\t\t\tcanvas.restore();\n\t\t\tcanvas.translate(mScreenSize[0], 0);\n\t\t}\n\t\tcanvas.restore();\n\t}",
"private void drawFences(Graphics g){\n\t\tg.setColor(Color.BLACK);\n\t\tdrawInteriorFences(g);\n\t\tdrawPerimeterFences(g);\n\t}",
"public abstract WorldImage drawRow(int blocks);",
"private void draw(){\n GraphicsContext gc = canvasArea.getGraphicsContext2D();\n canvasDrawer.drawBoard(canvasArea, board, gc, currentCellColor, currentBackgroundColor, gridToggle);\n }",
"public void createSideBlocks() {\n Fill fill = new FillColor(Color.darkGray);\n Block topB = new Block(new Rectangle(new Point(0, 0), 800, 45), fill);\n Block rightB = new Block(new Rectangle(new Point(775, 25), 25, 576), fill);\n Block leftB = new Block(new Rectangle(new Point(0, 25), 25, 576), fill);\n //add each screen-side block to game and set 1 hitpoint.\n topB.addToGame(this);\n topB.setHitPoints(1);\n rightB.addToGame(this);\n rightB.setHitPoints(1);\n leftB.addToGame(this);\n leftB.setHitPoints(1);\n }",
"void draw() {\n canvas.drawColor(Color.BLACK);\n insertSort(vstar);\n for( int i=0; i<NUMSTARS; i++){\n vstar[i].draw();\n }\n }",
"@Override\n\tvoid draw(Graphics g) {\n\t\tg.setColor(needsHighlight() ? selectColor : Color.GRAY);\n\t\tsetBbox(x, y, x2, y2);\n\t\tif (x < x2 && y < y2)\n\t\t\tg.fillRect(x, y, x2 - x, y2 - y);\n\t\telse if (x > x2 && y < y2)\n\t\t\tg.fillRect(x2, y, x - x2, y2 - y);\n\t\telse if (x < x2 && y > y2)\n\t\t\tg.fillRect(x, y2, x2 - x, y - y2);\n\t\telse\n\t\t\tg.fillRect(x2, y2, x - x2, y - y2);\n\t}",
"void drawStuff (Graphics g) {\n if (g instanceof PrintGraphics) \n g.setColor (parent.parent.parent.printImgBColor);\n else \n g.setColor (parent.parent.parent.normImgBColor);\n \n g.fillRect (0, 0, _xPix, _yPix - 3 * parent.lineSize);\n \n //draw the stuff\n drawBins (g);\n \n //Draw the Time Line\n drawTimeLine (g);\n }",
"@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"绘制圆形\");\n\t}",
"private void drawGrid(){\r\n\r\n\t\tdrawHorizontalLines();\r\n\t\tdrawVerticalLines();\r\n\t}",
"protected void drawGUI() {\n batch.draw(background, 0, 0);\n }",
"public Array<BlockDrawable> getGhostBlocksToDraw() {\t\t\r\n\t\tif(hasFalling()){\r\n\t\t\treturn ghost.allOuterBlocks();\r\n\t\t}\t\t\r\n\t\treturn new Array<BlockDrawable>();\r\n\t}",
"private void redraw() {\r\n for (int row = 0; row < maxRows; row++) {\r\n for (int column = 0; column < maxColumns; column++) {\r\n grid[row][column].setBackground(SQUARE_COLOR);\r\n }\r\n }\r\n grid[snake[HEAD].row][snake[HEAD].column].setBackground(\r\n SNAKE_HEAD_COLOR);\r\n for (int i = 1; i < length; i++) {\r\n grid[snake[i].row][snake[i].column].setBackground(SNAKE_BODY_COLOR);\r\n }\r\n grid[powerUp.row][powerUp.column].setBackground(POWER_UP_COLOR);\r\n }",
"public abstract void drawFill();",
"private void drawBackground() {\n g2.setColor(SquareRenderer.BLANK_CELL_COLOR);\n g2.fillRect(BORDER_SIZE, BORDER_SIZE, BOARD_SIZE, BOARD_SIZE);\n }",
"private void drawsegment_plain_alpha(float leftadd,\n float rghtadd,\n int ytop,\n int ybottom) {\n ytop *= SCREEN_WIDTH;\n ybottom *= SCREEN_WIDTH;\n \n int pr = m_fill & 0xFF0000;\n int pg = m_fill & 0xFF00;\n int pb = m_fill & 0xFF;\n \n // int p = m_index;\n float iaf = iaadd;\n \n while (ytop < ybottom) {\n int xstart = (int) (xleft + PIXEL_CENTER);\n if (xstart < 0)\n xstart = 0;\n \n int xend = (int) (xrght + PIXEL_CENTER);\n if (xend > SCREEN_WIDTH)\n xend = SCREEN_WIDTH;\n \n float xdiff = (xstart + PIXEL_CENTER) - xleft;\n float iz = izadd * xdiff + zleft;\n int ia = (int) (iaf * xdiff + aleft);\n xstart += ytop;\n xend += ytop;\n \n //int ma0 = 0xFF000000;\n \n for ( ; xstart < xend; xstart++ ) {\n if (noDepthTest || (iz <= m_zbuffer[xstart])) {\n // don't set zbuffer when not fully opaque\n //m_zbuffer[xstart] = iz;\n \n int alpha = ia >> 16;\n int mr0 = m_pixels[xstart];\n /*\n if (argbSurface) {\n ma0 = (((mr0 >>> 24) * alpha) << 16) & 0xFF000000;\n if (ma0 == 0) ma0 = alpha << 24;\n }\n */\n int mg0 = mr0 & 0xFF00;\n int mb0 = mr0 & 0xFF;\n mr0 &= 0xFF0000;\n \n mr0 = mr0 + (((pr - mr0) * alpha) >> 8);\n mg0 = mg0 + (((pg - mg0) * alpha) >> 8);\n mb0 = mb0 + (((pb - mb0) * alpha) >> 8);\n \n m_pixels[xstart] = 0xFF000000 | \n (mr0 & 0xFF0000) | (mg0 & 0xFF00) | (mb0 & 0xFF);\n \n // m_stencil[xstart] = p;\n }\n iz += izadd;\n ia += iaadd;\n }\n ytop += SCREEN_WIDTH;\n xleft += leftadd;\n xrght += rghtadd;\n zleft += zleftadd;\n }\n }",
"public void flush(){\r\n\t\tColor tempcol = screengraphics.getColor();\r\n\t\tscreengraphics.setColor(backgroundcolor);\r\n\t\tscreengraphics.fillRect(0, 0, sizex, sizey);\r\n\t\tscreengraphics.dispose();\r\n\t\tstrategy.show();\r\n\t\tscreengraphics =(Graphics2D) strategy.getDrawGraphics();\r\n\t\tscreengraphics.setColor(backgroundcolor);\r\n\t\tscreengraphics.fillRect(0, 0, sizex, sizey);\r\n\t\tscreengraphics.dispose();\r\n\t\tstrategy.show();\r\n\t\tscreengraphics =(Graphics2D) strategy.getDrawGraphics();\r\n\t\tscreengraphics.setColor(tempcol);\r\n\t\t\r\n\t}",
"@Override\n\tpublic void draw() {\n\t\tbg.draw();\n\t\tfor(Test2 t : test)\n\t\t\tt.draw();\n\t\tfor(Test2 t : test2)\n\t\t\tt.draw();\n\t\t\n\t\tfor(Test2 t : test3)\n\t\t\tt.draw();\n\t\tobj.draw();\n\t\tEffect().drawEffect(1);\n\t}",
"public void print()\n {\n System.out.println();\n for (int i = 0; i < 6; i++) {\n for (int j = 0; j < 6; j++) {\n int index=0;\n if(j>2)\n index++;\n if(i>2)\n index+=2;\n char c='○';\n if(blocks[index].getCells()[i%3][j%3]==CellType.Black)\n c='B';\n if(blocks[index].getCells()[i%3][j%3]==CellType.Red)\n c='R';\n System.out.print(c+\" \");\n if(j==2)\n System.out.print(\"| \");\n }\n System.out.println();\n if(i==2)\n System.out.println(\"-------------\");\n }\n }",
"private void draw() {\n Graphics2D g2 = (Graphics2D) image.getGraphics();\n\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB);\n\n AffineTransform transform = AffineTransform.getTranslateInstance(0, height);\n transform.concatenate(AffineTransform.getScaleInstance(1, -1));\n g2.setTransform(transform);\n\n int width = this.width;\n int height = this.height;\n if (scale != 1) {\n g2.scale(scale, scale);\n width = (int) Math.round(width / scale);\n height = (int) Math.round(height / scale);\n }\n AbstractGraphics g = new GraphicsSWT(g2);\n\n g.setScale(scale);\n if (background != null) {\n g.drawImage(background, 0, 0, width, height);\n }\n\n synchronized (WFEventsLoader.GLOBAL_LOCK) {\n for (Widget widget : widgets) {\n if (widget != null) widget.paint(g, width, height);\n }\n }\n // draw semi-transparent pixel in top left corner to workaround famous OpenGL feature\n g.drawRect(0, 0, 1, 1, Color.WHITE, .5, PlateStyle.RectangleType.SOLID);\n\n g2.dispose();\n }",
"@Override\n public void paintComponent(Graphics g) {\n g.setColor(Color.WHITE);\n g.fillRect(0,0,super.getWidth(),super.getHeight());\n\n for (DrawableVector instruction : instructions){\n instruction.draw(g, getWidth(), getHeight());\n }\n if (currentInstruction != null){\n currentInstruction.draw(g, getWidth(), getHeight());\n }\n }",
"public void draw() {\n \n // TODO\n }",
"public void show(){\n fill(255);\n stroke(255);\n \n if (left){\n rect(0, y, size, brickLength);\n x = 0;\n }\n else{\n rect(width - size, y, size, brickLength);\n x = width - size;\n }\n }",
"public void makeGraphic() {\n\t\tStdDraw.clear();\n\n\t\tfor (int i = 0; i < p.showArray.size(); i++) {\n\t\t\tStdDraw.setPenColor(0, 255, 255);\n\n\t\t\tStdDraw.circle(p.showArray.get(i).acquirePosition().x, p.showArray.get(i).acquirePosition().y,\n\t\t\t\t\tp.showArray.get(i).acquireSizeOfBody());\n\t\t\tStdDraw.setPenColor(StdDraw.GRAY);\n\n\t\t\tStdDraw.filledCircle(p.showArray.get(i).acquirePosition().x, p.showArray.get(i).acquirePosition().y,\n\t\t\t\t\tp.showArray.get(i).acquireSizeOfBody());\n\n\t\t}\n\t\tStdDraw.show();\n\t}",
"private void drawColoredRelief(Graphics g) throws InterruptedException {\n\t\tRectangle field = g.getClipBounds();\n\t\t\n\t\tBufferedImage[] bimages = new BufferedImage[threadCnt];\n\t\tfor(int i = 0; i< bimages.length; i++){\n\t\t\tbimages[i] = new BufferedImage(field.width, field.height, BufferedImage.TYPE_INT_ARGB);\n\t\t}\n\t\t\n//\t\tdouble[] thisCoordinate = plotSheet.toCoordinatePoint(0, 0, field);\n//\t\t\n//\t\tdouble thisF_xy;\n//\t\tfor(int i = field.x+plotSheet.getFrameThickness() ; i < field.x + field.width -plotSheet.getFrameThickness(); i++) {\n//\t\t\tfor(int j = field.y + +plotSheet.getFrameThickness() ; j < field.y +field.height -plotSheet.getFrameThickness(); j++) {\n//\t\t\t\tthisCoordinate = plotSheet.toCoordinatePoint(i, j, field);\n//\t\t\t\tthisF_xy = function.f(thisCoordinate[0], thisCoordinate[1]);\n//\t\t\t\tg.setColor(getColor(thisF_xy));\n//\t\t\t\tg.drawLine(i, j, i, j);\n//\t\t\t\t\n//\t\t\t}\n//\t\t}\n\t\t\n\t\tint length = (field.x + field.width-plotSheet.getFrameThickness()) - (field.x+plotSheet.getFrameThickness());\n\t\tThread[] threads = new Thread[threadCnt];\n\t\t\n\t\tPartRenderer[] partRenderer = new PartRenderer[threadCnt];\n\t\t\n\t\tGraphics gnew = bimages[0].getGraphics();\n\t\tgnew.setClip(field);\n\t\tpartRenderer[0] = new PartRenderer(gnew, field.x+plotSheet.getFrameThickness(), field.x + plotSheet.getFrameThickness()+ length/threadCnt);\n\t\tthreads[0] = new Thread(partRenderer[0]);\n\t\tfor(int i = 1; i< threads.length-1; i++){\n\t\t\tgnew = bimages[i].getGraphics();\n\t\t\tgnew.setClip(field);\n\t\t\tpartRenderer[i] = new PartRenderer(gnew, field.x + plotSheet.getFrameThickness() + length*i/threadCnt +1, field.x+ plotSheet.getFrameThickness() + length*(i+1)/threadCnt);\n\t\t\tthreads[i] = new Thread(partRenderer[i]);\n\t\t}\n\t\tif(threadCnt > 1){\n\t\tgnew = bimages[threadCnt-1].getGraphics();\n\t\tgnew.setClip(field);\n\t\tpartRenderer[threadCnt-1] = new PartRenderer(gnew, field.x + plotSheet.getFrameThickness() + length*(threadCnt-1)/threadCnt +1, field.x+ plotSheet.getFrameThickness() + length);\n\t\tthreads[threadCnt-1] = new Thread(partRenderer[threadCnt-1]);\n\t\t}\n\t\tfor(Thread thread : threads) {\n\t\t\tthread.start();\n\t\t}\n\t\t\n\t\tfor(Thread thread : threads) {\n\t\t\tthread.join();\n\t\t}\n\t\t\n\t\tfor(BufferedImage bimage: bimages){\n\t\t\t((Graphics2D)g).drawImage(bimage, null, 0, 0);\n\t\t}\n\t\t\n\t\t//\n\t}",
"public void drawSelf() {\n for (Point p : matches) {\n this.drawPoint(p, Color.WHITE);\n }\n }",
"private void drawFrozenBlocks(final Graphics2D theG2d, final int theHeight, \r\n final int theWidth) {\r\n final List<Block[]> blocks = myBoard.getFrozenBlocks(); \r\n //Calculates rows\r\n for (int row = 0; row < blocks.size(); row++) { \r\n //Calculates columns\r\n for (int column = 0; column < theWidth; column++) { \r\n \r\n //blocks.get requires (int index) Block[]\r\n final Block piece = blocks.get(row)[column];\r\n if (!piece.toString().equals(EMPTY)) { \r\n theG2d.setColor(PURPLE); \r\n rectangle(theG2d, column * SIZE, \r\n (theHeight * SIZE) - ((row + 1) * SIZE), \r\n SIZE, SIZE, DRAW); \r\n \r\n theG2d.setColor(PURPLE); \r\n rectangle(theG2d, column * SIZE, \r\n (theHeight * SIZE) - ((row + 1) * SIZE), \r\n SIZE, SIZE, COLOR);\r\n \r\n theG2d.setColor(piece.getColor()); \r\n rectangle(theG2d, column * SIZE, \r\n (theHeight * SIZE) - ((row + 1) * SIZE), \r\n SIZE - 1, SIZE - 1, COLOR); \r\n } \r\n } \r\n } \r\n }",
"public void drawBorder(boolean blue)\n\t{\n\t\t// copied most of the following from http://forums.inside3d.com/viewtopic.php?t=1326\n\t\tif (blue)\n\t\t\tglColor3f(0, 0, 1); // blue\n\t\telse\n\t\t\tglColor3f(1, 0, 0); // red\n\n\t\tglLineWidth(2); // Set line width to 2\n\t\tglLineStipple(1, (short) 0xf0f0); // Repeat count, repeat pattern\n\t\tglEnable(GL_LINE_STIPPLE); // Turn stipple on\n\n\t\tglBegin(GL_LINE_LOOP);\n\t\tglVertex2d(x - BORDER, y - BORDER);\n\t\tglVertex2d(x + BORDER + width, y - BORDER);\n\t\tglVertex2d(x + BORDER + width, y + BORDER + height);\n\t\tglVertex2d(x - BORDER, y + BORDER + height);\n\t\tglEnd();\n\t\tif (action == 3)\n\t\t{\n\t\t\tglBegin(GL_LINE_LOOP);\n\t\t\tdouble endPoint = endPos;\n\t\t\tif (!downRight)\n\t\t\t\tendPoint = startPos;\n\t\t\t//System.out.println(\"StartPos, EndPos, endPoint: \" + startPos + \", \" + endPos + \", \" + endPoint);\n\t\t\tif (upDown)\n\t\t\t{\n\t\t\t\tglVertex2d(x - BORDER, endPoint - BORDER);\n\t\t\t\tglVertex2d(x + BORDER + width, endPoint - BORDER);\n\t\t\t\tglVertex2d(x + BORDER + width, endPoint + BORDER + height);\n\t\t\t\tglVertex2d(x - BORDER, endPoint + BORDER + height);\n\t\t\t} else\n\t\t\t{\n\t\t\t\tglVertex2d(endPoint - BORDER, y - BORDER);\n\t\t\t\tglVertex2d(endPoint + BORDER + width, y - BORDER);\n\t\t\t\tglVertex2d(endPoint + BORDER + width, y + BORDER + height);\n\t\t\t\tglVertex2d(endPoint - BORDER, y + BORDER + height);\n\t\t\t}\n\t\t\tglEnd();\n\t\t}\n\n\t\tglDisable(GL_LINE_LOOP); // Turn it back off\n\t\tglDisable(GL_LINE_STIPPLE); // Turn it back off\n\t\tglEnd();\n\t}",
"private void drawInteriorFences(Graphics g){\n\t\tg.setColor(Color.BLACK);\n\t\tfor (Fence fence:b.interiorFences){\n\t\t\tDraw.drawFence(g, fence);\n\t\t}\n\t}",
"public void render(float partialTicks){\r\n\t\tif(blocks.size() > 0 && enabled){\r\n\t\t\tfor(int i = 0; i < blocks.size();i++){\r\n\t\t\t\tblocks.get(i).draw(partialTicks);\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}",
"private void paintConnectionsBetweenPostBlocks() {\n if (checkBoxShowConnectionsOfGroundTruth.isSelected()) {\n for (BlockPair blockPair : blockPairs_groundTruth) {\n if (blockPair.leftVersion == positionOfCurrentLeftVersionInViewedPost) {\n Polygon polygon = paintPolygonOfConnections(blockPair.rightBlock, blockPair.leftBlock);\n connectionsPane.getChildren().add(polygon);\n }\n }\n }\n\n if (checkBoxShowConnectionsOfComputedSimilarity.isSelected()) {\n for (BlockPair blockPair : blockPairs_computedSimilarity) {\n if (blockPair.leftVersion == positionOfCurrentLeftVersionInViewedPost) {\n Line line = paintLineOfConnections(blockPair.rightBlock, blockPair.leftBlock);\n connectionsPane.getChildren().add(line);\n }\n }\n }\n }",
"@Override\n\tpublic void draw(Graphics g) {\n\t\tg.setColor(Color.BLACK);\n for(int j = 0 ; j < 3 ; j++) {\n \tg.drawRect(0,50*j, 120, 50);\n }\n \n if(super.selected) {\n\t\t\tg.fillRect(super.north_port.x, super.north_port.y, super.connection_port_width ,super.connection_port_width);\n\t g.fillRect(super.east_port.x-super.connection_port_width, super.east_port.y, super.connection_port_width,super.connection_port_width);\n\t g.fillRect(super.south_port.x, super.south_port.y-super.connection_port_width ,super.connection_port_width,super.connection_port_width);\n\t g.fillRect(super.west_port.x, super.west_port.y, super.connection_port_width,super.connection_port_width);\n\t\t}\n \t\n \n }",
"@Override\npublic void paint(Graphics g) {\n\tsuper.paint(g);\n\tg.drawImage(bak, 0, 0, null);\n\t\n\t//画线\n\tfor(int i=0;i<Config.ROWS;i++)\n\t{\n\t\tfor(int j=0;j<Config.COLS;j++)\n\t\t{\n\t\t\tg.setColor(new Color(137,92,44));\n\t\t\tg.drawRect(j*Config.CELL+Config.OFFSETX, i*Config.CELL+Config.OFFSETY, Config.CELL, Config.CELL);\n\t\t}\n\t}\n\t//画焦点\n\tfor(int i=0;i<Config.ROWS;i++)\n\t{\n\t\tfor(int j=0;j<Config.COLS;j++)\n\t\t{\n\t\t\tif(Config.MAP[i][j]==Config.FOCUS)\n\t\t\t{\n\t\t\t\tg.setColor(new Color(137,92,44));\n\t\t\t\tg.fillRect(j*Config.CELL+Config.OFFSETX-5, i*Config.CELL+Config.OFFSETY-5, 10, 10);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t//画子\n\t\tfor(int i=0;i<Config.ROWS;i++)\n\t\t{\n\t\t\tfor(int j=0;j<Config.COLS;j++)\n\t\t\t{\n\t\t\t\tif(Config.MAP[i][j]==Config.BLACK)\n\t\t\t\t{\n\t\t\t\t g.drawImage(black, Config.CELL*j+Config.OFFSETX-20, i*Config.CELL+Config.OFFSETY-20, null);\n\t\t\t\t \n\t\t\t\t}\n\t\t\t\tif(Config.MAP[i][j]==Config.WHITE)\n\t\t\t\t{\n\t\t\t\t g.drawImage(white, Config.CELL*j+Config.OFFSETX-20, i*Config.CELL+Config.OFFSETY-20, null);\n\t\t\t\t \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n //画提拉\n\t\tg.setFont(new Font(\"微软雅黑\",Font.BOLD,24));\n\t\tg.setColor(step%2==0?Color.black:Color.white);\n\t\tg.drawString(step%2==0?\"黑子下\":\"白子下\", 640, 80);\n}",
"protected void paintComponent(Graphics g){\n\t\tGraphics2D g2 = (Graphics2D) g;\n\t\t\n\t\t// Creating all of the objects for snapshot with positions, then rotating if necessary\n\t\tI_Block iblock1 = new I_Block(0, 25 * 20);\n\t\tiblock1.rotate90();\n\t\tI_Block iblock2 = new I_Block(8 * 20, 17 * 20);\n\t\tS_Block sblock1 = new S_Block(3 * 20, 23 * 20);\n\t\tsblock1.rotate90();\n\t\tS_Block sblock2 = new S_Block(5 * 20, 21 * 20);\n\t\tsblock2.rotate90();\n\t\tO_Block oblock1 = new O_Block(5 * 20, 24 * 20);\n\t\tO_Block oblock2 = new O_Block(7 * 20, 21 * 20);\n\t\tT_Block tblock1 = new T_Block(7 * 20, 23 * 20);\n\t\ttblock1.rotate270();\n\t\tT_Block tblock2 = new T_Block(6 * 20, 18 * 20);\n\t\ttblock2.rotate270();\n\t\tL_Block lblock1 = new L_Block(0, 19 * 20);\n\t\tL_Block lblock2 = new L_Block(4 * 20, 21 * 20);\n\t\tZ_Block zblock1 = new Z_Block(0,23 * 20);\n\t\tZ_Block zblock2 = new Z_Block(1 * 20, 20 * 20);\n\t\tJ_Block jblock1 = new J_Block(0 ,22 * 20);\n\t\tjblock1.rotate90();\n\t\tJ_Block jblock2 = new J_Block(4 * 20, 20 * 20);\n\t\tjblock2.rotate90();\n\t\t\n\t\t// Put all objects into array\n\t\tTetromino[] bag = {iblock1, iblock2, sblock1, sblock2, oblock1, oblock2,\n\t\t\t\ttblock1, tblock2, lblock1, lblock2, zblock1, zblock2, jblock1, jblock2};\n\t\t\n\t\t/*\n\t\t * For each object in bag, set the color then display it, using polymorphism\n\t\t * Specifically what it does is that, since each shape could only be made with \n\t\t * the Rectangle class, I had each object store the Rectangles needed to create \n\t\t * it in an array. BlockComponent then takes the array from the class, then displays \n\t\t * each rectangle in the array.\n\t\t*/\n\t\tfor(Tetromino block : bag){\n\t\t\tg2.setColor(block.getColor());\n\t\t\tRectangle[] dimensions = block.getBlockArray();\n\t\t\tfor(Rectangle shape : dimensions){\t\n\t\t\t\tg2.fill(shape);\n\t\t\t}\n\t\t}\t\n\t}",
"@Override\n public void draw(Graphics g) {\n for (int i = 0; i < values.size(); i++) {\n g.setColor(Color.GRAY);\n g.fillRect(i * 25 - 5, 250 - values.get(i), 10, values.get(i));\n }\n super.draw(g);\n }",
"private void setUpBlocks() {\n\t\tdouble xStart=0;\n\t\tdouble midPoint = getWidth()/2;\n\t\tint yStart = BRICK_Y_OFFSET;\t\n\t\t\n\t\tfor(int i = 0; i < NBRICK_ROWS; i++) {\n\t\t\t\n\t\t\txStart = midPoint - (NBRICKS_PER_ROW/2 * BRICK_WIDTH) - BRICK_WIDTH/2;\n\t\t\tlayRowOfBricks(xStart, yStart, i);\n\t\t\tyStart += BRICK_HEIGHT + BRICK_SEP;\n\t\t}\t\n\t}",
"@Override\n public void paint(Graphics g) {\n g2 = (Graphics2D) g;\n drawBackground();\n drawSquares();\n drawLines();\n gui.hint = new TreeSet<>();\n }",
"@Override \r\n public void paintComponent(final Graphics theGraphics) { \r\n super.paintComponent(theGraphics); \r\n final Graphics2D g2d = (Graphics2D) theGraphics; \r\n \r\n final int width = myBoard.getWidth(); \r\n final int height = myBoard.getHeight(); \r\n g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, \r\n RenderingHints.VALUE_ANTIALIAS_ON); \r\n \r\n // draw purple game grid\r\n g2d.setColor(PURPLE); \r\n for (int i = 0; i < Math.max(width, height); i++) { \r\n final int lines = i * GRID_SIZING; \r\n \r\n //draws horizontal lines\r\n g2d.draw(new Line2D.Double(lines, ZERO, lines, height * GRID_SIZING));\r\n \r\n //draws vertical lines\r\n g2d.draw(new Line2D.Double(ZERO, lines, width * GRID_SIZING, lines));\r\n \r\n if (myBoard.isGameOver()) { \r\n myGameOver = true; \r\n myGamePaused = true; \r\n }\r\n } \r\n \r\n //update blocks\r\n drawCurrentPiece(g2d, height, width);\r\n drawFrozenBlocks(g2d, height, width);\r\n handlePausedGame(g2d);\r\n }",
"private void drawBackground() {\n\t\timgG2.setColor(Color.BLACK);\n\t\timgG2.fillRect(0,0,512, 512);\n\t\t\n\t\timgG2.setColor(Color.BLACK);\n\t\timgG2.fillRect(128, 0, 256, 512);\n\t}",
"public void paint() {\r\n\r\n\t\tsuper.paint();\r\n\t\r\n\t\tint len = _composites.size();\r\n\t\tfor (int i = 0; i < len; i++) {\r\n\t\t\tComposite c = _composites.get(i);\r\n\t\t\tc.paint();\r\n\t\t}\t\t\t\t\t\t\r\n\t}",
"@Override\n\t\t\tprotected void paintComponent(Graphics g) {\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t\tfor (int i = 0; i < wall.length; i++) {\n\t\t\t\t\tfor (int j = 0; j < wall[i].length; j++) {\n\t\t\t\t\t\tg.setColor(Color.blue);\n\t\t\t\t\t\tg.drawRect(i*30, j*30, 30, 30);\n\t\t\t\t\t\tif (wall[i][j] == 1) {\n\t\t\t\t\t\t\tg.fillRect(i*30, j*30, 30, 30);\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"public void draw()\n {\n Rectangle hatbox = new Rectangle(x, y, 20, 20);\n hatbox.fill();\n Rectangle brim = new Rectangle(x-10, y+20, 40, 0);\n brim.draw();\n Ellipse circle = new Ellipse (x, y+20, 20, 20);\n circle.draw();\n Ellipse circle2 = new Ellipse (x-10, y+40, 40, 40);\n circle2.draw();\n Ellipse circle3 = new Ellipse (x-20, y+80, 60, 60);\n circle3.draw();\n \n }",
"private void drawBackground(Graphics2D g2d, int wid, int hei) {\n g2d.setColor(Light_Gray);\n Triangle triangle1 = new Triangle(new Point(0, 0), new Point(0, hei), new Point(wid, 0));\n triangle1.fill(g2d);\n g2d.setColor(Dark_Gray);\n Triangle triangle2 = new Triangle(new Point(wid, hei), new Point(0, hei), new Point(wid, 0));\n triangle2.fill(g2d);\n Triangle triangle3 = new Triangle(new Point(wid, 0), new Point(wid, 15), new Point(wid - 15, 15));\n triangle3.fill(g2d);\n g2d.setColor(Light_Gray);\n Triangle triangle4 = new Triangle(new Point(0, hei), new Point(0, hei - 15), new Point(15, hei - 15));\n triangle4.fill(g2d);\n g2d.setColor(Gray);\n g2d.fillRect(6, 6, wid - 12, hei - 12);\n }",
"private void drawCurrentCodeBlockLabelBg(Canvas canvas) {\n if(mCursor.isSelected() || !mPaintLabel) {\n return;\n }\n int pos = mCursorPosition;\n if(pos == -1) {\n return;\n }\n List<BlockLine> blocks = mSpanner == null ? null : mSpanner.getColors().getBlocks();\n BlockLine block = (blocks != null && blocks.size() > pos) ? blocks.get(pos) : null;\n if(block != null) {\n int left = mCursor.getLeftLine();\n int color = mColors.getColor(ColorScheme.LINE_BLOCK_LABEL);\n if(block.startLine != left) {\n drawLineBackground(canvas,color,block.startLine);\n }\n if(block.endLine != left) {\n drawLineBackground(canvas,color,block.endLine);\n }\n }\n }",
"public void display() {\n shadow.display();\r\n strokeWeight(strokeWeight);\r\n fill(boxColour);\r\n rect(x, y, w, h, 7);\r\n }",
"public void paintComponenet(){\r\n\t\tfor(DShape ds : shapes){\r\n\t\t\tds.draw();\r\n\t\t}\r\n\t}",
"void drawEdges2(boolean drawBlobs, boolean drawEdges)\n\t{\n\t\tcurFrame.loadPixels();\n\t\t\n\t\tnoFill();\n\t\tBlob b;\n\t\tEdgeVertex eA,eB;\n\t\tfor (int n=0 ; n<theBlobDetection.getBlobNb() ; n++)\n\t\t{\n\t\t\tb=theBlobDetection.getBlob(n);\n\t\t\tif (b!=null)\n\t\t\t{\n//\t\t\t\tp.println(b.id);\n\t\t\t\tif (drawEdges)\n\t\t\t\t{\n\t\t\t\t\tstrokeWeight(1);\n\t\t\t\t\tstroke(0,255,0);\n\t\t\t\t\tfor (int m=0;m<b.getEdgeNb();m++)\n\t\t\t\t\t{\n\t\t\t\t\t\teA = b.getEdgeVertexA(m);\n\t\t\t\t\t\teB = b.getEdgeVertexB(m);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (eA !=null && eB !=null) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfloat angle = -MathUtil.getAngleToTarget(eA.x, eA.y, b.x, b.y);\n\t\t\t\t\t\t\tfloat angleB = -MathUtil.getAngleToTarget(eB.x, eB.y, b.x, b.y);\n\t\t\t\t\t\t\tfloat distance = MathUtil.getDistance(b.x, b.y, eA.x, eA.y) * 1f;\n\t\t\t\t\t\t\tfloat distanceB = MathUtil.getDistance(b.x, b.y, eB.x, eB.y) * 1f;\n\n\t\t\t\t\t\t\tfloat outerX = eA.x + P.sin( MathUtil.degreesToRadians(angle) )*distance;\n\t\t\t\t\t\t\tfloat outerY = eA.y + P.cos( MathUtil.degreesToRadians(angle) )*distance;\n\t\t\t\t\t\t\tfloat outerXB = eB.x + P.sin( MathUtil.degreesToRadians(angleB) )*distanceB;\n\t\t\t\t\t\t\tfloat outerYB = eB.y + P.cos( MathUtil.degreesToRadians(angleB) )*distanceB;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tint color = ImageUtil.getPixelColor( curFrame, P.round(eA.x*curFrame.width-1), P.round(eA.y*curFrame.height-1) );\n\t\t\t\t\t\t\tfill(color, 255);\n\t\t\t\t\t\t\t// float bright = brightness(color);\n\t\t\t\t\t\t\tnoStroke();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdraw4PointsTriangles(\n\t\t\t\t\t\t\t\tnew Vec3D(eA.x*width, eA.y*height, 0),\n\t\t\t\t\t\t\t\tnew Vec3D(outerX*width, outerY*height, 0),\n\t\t\t\t\t\t\t\tnew Vec3D(outerXB*width, outerYB*height, 0),\n\t\t\t\t\t\t\t\tnew Vec3D(eB.x*width, eB.y*height, 0),\n\t\t\t\t\t\t\t\tpg\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}",
"private void createBorders() {\r\n // Upper border rectangle\r\n Rectangle topRecFrame = new Rectangle(new Point(0, 0), WITH, SIZE + 20);\r\n // Left border rectangle\r\n Rectangle leftRecFrame = new Rectangle(new Point(0, SIZE + 21), SIZE, HEIGHT);\r\n // Right border rectangle\r\n Rectangle rightRecFrame = new Rectangle(new Point(WITH - SIZE, SIZE + 21), SIZE, HEIGHT);\r\n // Rectangle for block on top of upper block for the score\r\n Rectangle topRecScore = new Rectangle(new Point(0, 0), WITH, 20);\r\n Block topScore = new Block(topRecScore, Color.LIGHT_GRAY, 0);\r\n Block topFrame = new Block(topRecFrame, Color.GRAY, 0);\r\n Block leftFrame = new Block(leftRecFrame, Color.gray, 0);\r\n Block rightFrame = new Block(rightRecFrame, Color.gray, 0);\r\n topFrame.addToGame(this);\r\n leftFrame.addToGame(this);\r\n rightFrame.addToGame(this);\r\n topScore.addToGame(this);\r\n\r\n }",
"@Override\n\t\t\tprotected void paintComponent(Graphics g) {\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t\tfor (int i = 0; i < inc.length; i++) {\n\t\t\t\t\tg.setColor(new Color(220 - i * 50, 220 - i * 50, 220 - i * 50));\n\t\t\t\t\tg.fillOval(inc[i][0], inc[i][1], 30, 30);\n\t\t\t\t}\n\t\t\t\tg.setColor(Color.yellow);\n\t\t\t\tg.fillOval(x, h, 30, 30);\n\n\t\t\t\t// 장애물\n\t\t\t\tg.setColor(Color.red);\n\t\t\t\tg.fillRect(0, 480, 800, 20);\n\t\t\t\tg.fillRect(400, 200, 50, 300);\n\t\t\t\tg.fillRect(300, 350, 100, 30);\n\t\t\t\t//\n\t\t\t\tGraphics2D g2 = bi.createGraphics();\n//\t\t\t\tthis.paintAll(g2);\n\t\t\t}",
"void updateView () {\n updateScore();\n board.clearTemp();\n drawGhostToBoard();\n drawCurrentToTemp();\n view.setBlocks(board.getCombined());\n view.repaint();\n }",
"public void draw(Graphics surface) {\r\n surface.drawLine(50, 50, 250, 250);\r\n\tsurface.drawOval(20,20,40,40);\r\n box.draw(surface);\r\n\tfor (BouncingBox b : boxes) {\r\n\t b.draw(surface);\r\n\t}\r\n }",
"@Override\n protected void onDraw(Canvas canvas) {\n super.onDraw(canvas);\n\n int width = getWidth();\n int height = getHeight();\n float pieceWidth = width/5.0f-5;\n float pieceHeight = height/3.0f-20;\n Log.d(\"hello\", \"DRAWINGGGGGGG\");\n\n //this.paint.setColor(Color.WHITE);\n this.paint.setStyle(Paint.Style.FILL);\n //canvas.drawPaint(this.paint);\n canvas.drawColor(0x00000000);\n\n this.paint.setColor(Color.WHITE);\n //canvas.drawRect(0, 0, 100, 100, this.paint);\n\n\n for(int i = 0; i < 5; i++)\n for(int j = 0; j<3; j++){\n Cell cell = grid.getCellAt(i, j);\n if(cell!=null){\n //Before you can call any drawing methods, though, it's necessary to create a Paint object.\n\n this.paint.setColor(cell.getColor());\n canvas.drawRect(i*pieceWidth, j*pieceHeight, i*pieceWidth + pieceWidth, j*pieceHeight + pieceHeight, this.paint);\n\n this.paint.setColor(Color.WHITE);\n this.paint.setStrokeWidth(4);\n //Lines on window\n canvas.drawLine(i*pieceWidth, j*pieceHeight, i*pieceWidth, j*pieceHeight + pieceHeight, this.paint);\n canvas.drawLine(i*pieceWidth, j*pieceHeight, i*pieceWidth + pieceWidth, j*pieceHeight, this.paint);\n canvas.drawLine(i*pieceWidth + pieceWidth, j*pieceHeight, i*pieceWidth + pieceWidth, j*pieceHeight + pieceHeight, this.paint);\n canvas.drawLine(i*pieceWidth, j*pieceHeight + pieceHeight, i*pieceWidth + pieceWidth, j*pieceHeight + pieceHeight, this.paint);\n\n }\n }\n\n\n\n }",
"void drawCurrentToBoard () {\n board.clearTemp();\n for (int r = 0; r < currentPiece.height; ++r)\n for (int c = 0; c < currentPiece.width; ++c)\n if (currentPiece.blocks[r][c] == 1)\n board.addBlock(new Block(currentPiece.color), r + currentRow, c + currentColumn);\n }",
"private void drawBackOutlines(int dimCanvasX, int dimCanvasY, int thiknessEdges, String bkColor, String sColor) {\r\n\t\tShape fond = new Rectangle(0, 0, dimCanvasX, dimCanvasY);\r\n\t\tList<Shape> edges = getEdges(dimCanvasX, dimCanvasY, thiknessEdges);\r\n\t\tswitch (bkColor) {\r\n\t\tcase \"Light\":\r\n\t\t\tgraphics.setPaint(Color.decode(\"#FFF8DC\"));\r\n\t\t\tbreak;\r\n\t\tcase \"Dark\":\r\n\t\t\tgraphics.setPaint(Color.decode(\"#330000\"));\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tgraphics.setPaint(Color.decode(\"#BC8F8F\"));\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tgraphics.fill(fond);\r\n\t\tswitch (sColor) {\r\n\t\tcase \"Light\":\r\n\t\t\tgraphics.setPaint(Color.decode(\"#CD853F\"));\r\n\t\t\tbreak;\r\n\t\tcase \"Dark\":\r\n\t\t\tgraphics.setPaint(Color.decode(\"#660000\"));\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tgraphics.setPaint(Color.decode(\"#8B4513\"));\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tfor (Shape edge : edges) {\r\n\t\t\tgraphics.fill(edge);\r\n\t\t}\r\n\t}",
"public WorldImage drawCell(int blocks) {\r\n return new FrameImage(new RectangleImage(Cnst.boardWidth / blocks,\r\n Cnst.boardHeight / blocks,\r\n OutlineMode.SOLID, this.color));\r\n }",
"public void draw() \r\n\t{\r\n\t\tdraw(root, new RectHV(0,0,1,1) );\r\n\t}",
"public void draw() {\r\n background(255);\r\n\r\n float mouseXFactor = map(mouseX, 0, width, 0.05f, 1);\r\n float mouseYFactor = map(mouseY, 0, height, 0.05f, 1);\r\n\r\n for (int gridX = 0; gridX < img.width; gridX++) {\r\n for (int gridY = 0; gridY < img.height; gridY++) {\r\n // grid position + tile size\r\n float tileWidth = width / (float) img.width;\r\n float tileHeight = height / (float) img.height;\r\n float posX = tileWidth * gridX;\r\n float posY = tileHeight * gridY;\r\n\r\n // get current color\r\n int c = pixelArray[gridX][gridY];\r\n\r\n // greyscale conversion\r\n int greyscale = round(red(c) * 0.222f + green(c) * 0.707f + blue(c) * 0.071f);\r\n\r\n if (drawMode == 1) {\r\n // greyscale to ellipse area\r\n fill(0);\r\n noStroke();\r\n float r2 = 1.1284f * sqrt(tileWidth * tileWidth * (1 - greyscale / 255.0f));\r\n r2 = r2 * mouseXFactor * 3;\r\n ellipse(posX, posY, r2, r2);\r\n } else if (drawMode == 2) {\r\n // greyscale to rotation, line length and stroke weight\r\n stroke(0);\r\n float w4 = map(greyscale, 0, 255, 10, 0);\r\n strokeWeight(w4 * mouseXFactor + 0.1f);\r\n float l4 = map(greyscale, 0, 255, 35, 0);\r\n l4 = l4 * mouseYFactor;\r\n pushMatrix();\r\n translate(posX, posY);\r\n rotate(greyscale / 255.0f * PI);\r\n line(0, 0, 0 + l4, 0 + l4);\r\n popMatrix();\r\n } else if (drawMode == 3) {\r\n // greyscale to line relief\r\n float w5 = map(greyscale, 0, 255, 5, 0.2f);\r\n strokeWeight(w5 * mouseYFactor + 0.1f);\r\n // get neighbour pixel, limit it to image width\r\n int /* color */ c2 = img.get(min(gridX + 1, img.width - 1), gridY);\r\n stroke(c2);\r\n int greyscale2 = (int) (red(c2) * 0.222f + green(c2) * 0.707f + blue(c2) * 0.071f);\r\n float h5 = 50 * mouseXFactor;\r\n float d1 = map(greyscale, 0, 255, h5, 0);\r\n float d2 = map(greyscale2, 0, 255, h5, 0);\r\n line(posX - d1, posY + d1, posX + tileWidth - d2, posY + d2);\r\n } else if (drawMode == 4) {\r\n // pixel color to fill, greyscale to ellipse size\r\n float w6 = map(greyscale, 0, 255, 25, 0);\r\n noStroke();\r\n fill(c);\r\n ellipse(posX, posY, w6 * mouseXFactor, w6 * mouseXFactor);\r\n // TODO 2: Add the following: if(Math.random()<0.1) {pixelArray[gridX][gridY] = lerpColor(c,0xff0000, 0.1f);}\r\n } else if (drawMode == 5) {\r\n stroke(c);\r\n float w7 = map(greyscale, 0, 255, 5, 0.1f);\r\n strokeWeight(w7);\r\n fill(255, 255 * mouseXFactor);\r\n pushMatrix();\r\n translate(posX, posY);\r\n rotate(greyscale / 255.0f * PI * mouseYFactor);\r\n rect(0, 0, 15, 15);\r\n popMatrix();\r\n }\r\n /*\r\n * TODO 3: Add a drawMode == 6 case. \r\n * Try modifying the pixelArray \r\n * Try drawing shapes or colors depending on c and grayscale variables \r\n * Try adding other forms of animation\r\n */\r\n }\r\n }\r\n }",
"@Override\n\tpublic void draw() {\n\t\tif (isWhite){\n\t\t\tSystem.out.print(\"\\u2656\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.print(\"\\u265C\");\n\t\t}\t\t\n\t}",
"public static void mainDraw(Graphics graphics) {\n Color[] colors = {Color.green, Color.blue, Color.red, Color.cyan};\n int rectangles[] = {50, 100, 150, 200};\n for (int k = 0; k < 4; k++) {\n toCenter(graphics, rectangles[k], colors[k]);\n }\n }",
"public WorldImage drawBoard(int blocks) {\r\n return new EmptyImage();\r\n }",
"protected void commonUI(Graphics g) {\n\t\tfor (int i = 0; i <= ((AppConst.FRAMEBUFFER_HEIGHT - (AppConst.ARENA_GRID_HEIGHT * AppConst.BLOCK_HEIGHT)) / FileName.FILING_BLOCK_HOR_HT); i++) {\n\t\t\tfor (int j = 0; j < ((AppConst.ARENA_GRID_WIDTH * AppConst.BLOCK_WIDTH) / FileName.FILING_BLOCK_HOR_WH); j++) {\n\t\t\t\tg.drawPixmap(Assets.filing_block_hor, AppConst.ORIGIN_X\n\t\t\t\t\t\t+ (j * FileName.FILING_BLOCK_HOR_WH),\n\t\t\t\t\t\tAppConst.HORIZONTAL_LINE_Y\n\t\t\t\t\t\t\t\t+ (i * FileName.FILING_BLOCK_HOR_HT));\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; i < AppConst.FRAMEBUFFER_HEIGHT; i += FileName.FILING_BLOCK_VER_HT) {\n\t\t\tg.drawPixmap(Assets.filing_block_ver, AppConst.VERTICAL_LINE_X, i);\n\t\t}\n\n\t\t// Shape in the Next Box\n\t\tint[][] nsCoordinate = arena.getNextShapeCoordinate();\n\t\tfor (int i = 0; i < nsCoordinate.length; i++) {\n\t\t\tg.drawPixmap(\n\t\t\t\t\tAssets.block,\n\t\t\t\t\tnsCoordinate[i][0],\n\t\t\t\t\tnsCoordinate[i][1],\n\t\t\t\t\tAppConst.ORIGIN_X,\n\t\t\t\t\tAppConst.ORIGIN_Y\n\t\t\t\t\t\t\t+ arena.nextShape.colour\n\t\t\t\t\t\t\t* (AppConst.ATLASING_OFFSET + AppConst.BLOCK_HEIGHT),\n\t\t\t\t\tAppConst.BLOCK_WIDTH, AppConst.BLOCK_HEIGHT);\n\t\t}\n\n\t\t// Score Update\n\t\tString score = Integer.toString(arena.score);\n\t\tint startX = ScreenConst.SCORE_VALUE_X\n\t\t\t\t+ ((FileName.TEXT_SCORE_WH / 2) - ((score.length() * AppConst.SMALL_DIGIT_WIDTH) / 2));\n\t\tfor (int i = 0; i < score.length(); i++) {\n\t\t\tg.drawPixmap(\n\t\t\t\t\tAssets.small_digits,\n\t\t\t\t\tstartX + (i * AppConst.SMALL_DIGIT_WIDTH),\n\t\t\t\t\tScreenConst.SCORE_VALUE_Y,\n\t\t\t\t\tAppConst.ORIGIN_X,\n\t\t\t\t\t((score.charAt(i) - '0') + 1)\n\t\t\t\t\t\t\t* (AppConst.SMALL_DIGIT_HEIGHT + AppConst.SMALL_DIGIT_OFFSET),\n\t\t\t\t\tAppConst.SMALL_DIGIT_WIDTH, AppConst.SMALL_DIGIT_HEIGHT);\n\t\t}\n\n\t\t// level update\n\t\tString level = Integer.toString(arena.level);\n\t\tint levelStartX = ScreenConst.LEVEL_VALUE_X\n\t\t\t\t+ ((FileName.TEXT_LEVEL_WH / 2) - ((level.length() * AppConst.SMALL_DIGIT_WIDTH) / 2));\n\t\tfor (int i = 0; i < level.length(); i++) {\n\t\t\tg.drawPixmap(\n\t\t\t\t\tAssets.small_digits,\n\t\t\t\t\tlevelStartX + (i * AppConst.SMALL_DIGIT_WIDTH),\n\t\t\t\t\tScreenConst.LEVEL_VALUE_Y,\n\t\t\t\t\tAppConst.ORIGIN_X,\n\t\t\t\t\t((level.charAt(i) - '0') + 1)\n\t\t\t\t\t\t\t* (AppConst.SMALL_DIGIT_HEIGHT + AppConst.SMALL_DIGIT_OFFSET),\n\t\t\t\t\tAppConst.SMALL_DIGIT_WIDTH, AppConst.SMALL_DIGIT_HEIGHT);\n\t\t}\n\n\t\t// Lines update\n\t\tString lines = Integer.toString(arena.lines);\n\t\tint linesStartX = ScreenConst.LINES_VALUE_X\n\t\t\t\t+ ((FileName.TEXT_LINES_WH / 2) - ((lines.length() * AppConst.SMALL_DIGIT_WIDTH) / 2));\n\t\tfor (int i = 0; i < lines.length(); i++) {\n\t\t\tg.drawPixmap(\n\t\t\t\t\tAssets.small_digits,\n\t\t\t\t\tlinesStartX + (i * AppConst.SMALL_DIGIT_WIDTH),\n\t\t\t\t\tScreenConst.LINES_VALUE_Y,\n\t\t\t\t\tAppConst.ORIGIN_X,\n\t\t\t\t\t((lines.charAt(i) - '0') + 1)\n\t\t\t\t\t\t\t* (AppConst.SMALL_DIGIT_HEIGHT + AppConst.SMALL_DIGIT_OFFSET),\n\t\t\t\t\tAppConst.SMALL_DIGIT_WIDTH, AppConst.SMALL_DIGIT_HEIGHT);\n\t\t}\n\n\t\tg.drawPixmap(Assets.text_next, ScreenConst.NEXT_X, ScreenConst.NEXT_Y);\n\t\tg.drawPixmap(Assets.text_level, ScreenConst.LEVEL_X,\n\t\t\t\tScreenConst.LEVEL_Y);\n\t\tg.drawPixmap(Assets.text_score, ScreenConst.SCORE_X,\n\t\t\t\tScreenConst.SCORE_Y);\n\t\tg.drawPixmap(Assets.text_lines, ScreenConst.LINES_X,\n\t\t\t\tScreenConst.LINES_Y);\n\t}",
"public void draw() {\n StdDraw.setPenColor(StdDraw.BLACK);\n StdDraw.setPenRadius(.01);\n for (Point2D p : s) {\n p.draw();\n }\n }",
"@FXML\n public void fullPatternButtonPressed()\n {\n GraphicsContext gc = clearCanvasAndGetGraphicsContext();\n\n\n // loop to draw lines for each number of lines\n for(int i = 0; i <= lines; i++) {\n\n // draw L shape in bottom left\n gc.strokeLine(\n 0,\n (canvas.getHeight()/lines)*i,\n (canvas.getWidth()/lines)*i,\n canvas.getHeight()\n );\n\n // draw L shape in top right\n gc.strokeLine(\n (canvas.getWidth()/lines)*i,\n 0,\n canvas.getWidth(),\n (canvas.getHeight()/lines)*i\n );\n\n // draw L shape in bottom right\n gc.strokeLine(\n (canvas.getWidth()/lines)*i,\n canvas.getHeight(),\n canvas.getWidth(),\n canvas.getHeight() - (canvas.getHeight()/lines)*i\n );\n\n // draw L shape in top left\n gc.strokeLine(\n (canvas.getWidth()/lines)*i,\n 0,\n 0,\n canvas.getHeight() - (canvas.getHeight()/lines)*i\n );\n }\n }",
"public void renderSelectedRegion() {\n textBuffer.renderInit();\n renderFlag = 2;\n Text text;\n root.getChildren().removeAll(renderPieces);\n renderPieces.clear();\n if (!reversed) {\n while ((text = textBuffer.getTextToRender()) != null) {\n addRenderPieces(text);\n }\n } else {\n while ((text = textBuffer.getPreToRender()) != null) {\n addRenderPieces(text);\n }\n }\n\n }",
"void draw() {\n\t\t// display debug information\n\t\t// if (debugMode)\n\t\t// displayDebugInformation();\n\n\t\tupdate();\n\t\trender(); // display freetransform points, lines and colorings\n\n\t\t// display opposite objects\n\t\t// displayOppositeObject();\n\t}",
"public void draw() {\r\n\t\tbackground(255); // Clear the screen with a white background\r\n\r\n\t\ttextSize(12);\r\n\t\tfill(0);\r\n\r\n\t\tstroke(0);\r\n\t\tcurve.draw(this);\r\n\t}",
"private void drawNewDrawPanel(final Integer blkSize) {\n\t\tfrmNewBlock = new JFrame();\n\t\tfrmNewBlock.setPreferredSize(new Dimension(750, 700));\n\t\tfrmNewBlock.setTitle(\"New Block\");\n\t\tfrmNewBlock.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t\tfrmNewBlock.pack();\n\t\tfrmNewBlock.setVisible(true);\n\n\t\tcontrolPanel = new JPanel();\n\t\tcontrolPanel.setLayout(new MigLayout(\"\", \"[100][15][3][287][287][3]\",\n\t\t\t\t\"[][12.00][25][25][25][500][][]\"));\n\n\t\tRuler ruler = new Ruler(blkSize);\n\t\tcontrolPanel.add(ruler, \"cell 2 0 4 6\");\n\n\t\tbuttonGroup = new ButtonGroup();\n\n\t\tbtnNew = new JButton(\"Start New Block\");\n\t\tbuttonGroup.add(btnNew);\n\t\tbtnNew.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tfrmNewBlock.dispose();\n\t\t\t\tnew NewBlockFrame();\n\t\t\t}\n\t\t});\n\t\tcontrolPanel.add(btnNew, \"cell 0 2\");\n\n\t\tbtnReset = new JButton(\"Reset Block\");\n\t\tbuttonGroup.add(btnReset);\n\t\tbtnReset.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcontrolPanel.repaint();\n\t\t\t}\n\t\t});\n\t\tcontrolPanel.add(btnReset, \"cell 0 3,growx\");\n\n\t/*\tbtnUndo = new JButton(\"Undo Last\");\n\t\tbuttonGroup.add(btnUndo);\n\t\tbtnUndo.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tblkLines = DrawPiece.getBlkLines();\n\t\t\t\tblkLines = DrawPiece.removeBlkLine(blkLines);\n\t\t\t\truler.repaint();\n\t\t\t\truler.add(new DrawBlock(blkLines));\n\t\t\t\truler.repaint();\n\t\t\t\t\n\t\t\t\t\t*/\t\t\t\t\t\t\n\n//\t\t\t\tGraphics2D g2 = (Graphics2D) drawPiece.drawPieceSingleton\n//\t\t\t\t\t\t.getGraphics();\n//\n//\t\t\t\tThread myThread = new Thread() {\n//\n//\t\t\t\t\tpublic void run() {\n//\t\t\t\t\t\tGraphics2D g2 = (Graphics2D) drawPiece.drawPieceSingleton\n//\t\t\t\t\t\t\t\t.getGraphics();\n//\t\t\t\t\t\t\n//\t\t\t\t\t\tdrawPiece.redrawBlkLines(g2, blkLines);\t\t\t\t\t\t\n//\t\t\t\t\t\n//\t\t\t\t\t}\n//\n//\t\t\t\t};\n//\t\t\t\tmyThread.start();\n//\n//\t\t\t\tg2.setColor(Color.RED);\n//\n//\t\t\t}\n//\t});\n//\t\tcontrolPanel.add(btnUndo, \"cell 3 6,alignx left\");\n\n\t\tbtnSave = new JButton(\"Save\");\n\t\tbuttonGroup.add(btnSave);\n\t\tbtnSave.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tRandom rand = new Random();\n\t\t\t\tString blkName = JOptionPane.showInputDialog(\"Please enter \"\n\t\t\t\t\t\t+ \"a name for the block: \");\n\t\t\t\tint id = (int)QuiltPad.blockRepository.count() + 1;\n\t\t\t\tint uPieces = rand.nextInt(12) + 1;\n\t\t\t\tBlock block = new Block(id, blkName, blkSize, uPieces, blkLines);\n\t\t\t\tQuiltPad.blockRepository.save(block);\n\t\t\t\tfrmNewBlock.dispose();\n\t\t\t\tnew BlockFrame();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tcontrolPanel.add(btnSave, \"cell 4 6,alignx right\");\n\t\t\n\t\tfrmNewBlock.getContentPane().add(controlPanel);\n\n\t}",
"public void resetBlockColor() {\n for(int i=0;i<gridWidth; i++) {\n for(int j=0;j<gridHeight;j++) {\n getBlock(i,j).setDarker(false);\n }\n }\n repaint();\n }",
"public void draw() {\n background(0);\n}",
"public void paintComponent(Graphics g) {\n\n\t\t\tif (death==false) {//if we arent dead, the game must be drawn\n\t\t\t\tif (background!=null) {//draw background\n\t\t\t\t\tg.drawImage(background.getImage(), background.getX(), background.getY(), this);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (blocks!=null) {//draw the blocks. from the list\n\t\t\t\t\t//System.out.println(\"Yes\");\n\t\t\t\t\tfor (int x = blocks.size()-1; x>= 0; x--) {\n\t\t\t\t\t\tif (blocks.get(x).getDisable()) {//if the blocks are disabled, destroy\n\t\t\t\t\t\t\tblocks.remove(x);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfor (int t = 0; t<blocks.size(); t++) {//now draw the blocks.\n\t\t\t\t\t\t//System.out.printf(\"%d %d %d %d\\n\",blocks.get(t).getX(), blocks.get(t).getY(), blocks.get(t).getWidth(), blocks.get(t).getHeight());\n\t\t\t\t\t\tg.setColor(blocks.get(t).getColor());\n\t\t\t\t\t\tg.fillRect(blocks.get(t).getX(), blocks.get(t).getY(), blocks.get(t).getWidth(), blocks.get(t).getHeight());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (slider!=null) {//if the slider isnt null, draw it\n\t\t\t\t\t//System.out.printf(\"%d %d\\n\",slider.getX(), slider.getY());\n\t\t\t\t\tg.drawImage(slider.getImage(), slider.getX(), slider.getY(), this);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (ball!=null) {//draw ball.\n\t\t\t\t\tg.drawImage(ball.getImage(), ball.getX(), ball.getY(), this);\n\t\t\t\t}\n\t\t\t\tfor (PowerUp power: powerUps) {//draw all of the powerups\n\t\t\t\t\tg.drawImage(power.getImage(), power.getX(), power.getY(), this);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//draw bottom frame\n\t\t\t\t\n\t\t\t\tg.setColor(new Color(0,0,0));\n\t\t\t\tg.fillRect(0, GamePlay.getScreenHeight()-h, GamePlay.getScreenWidth(), h);//this is the menu bar\n\t\t\t\t\n\t\t\t\t//draw score\n\t\t\t\tg.setColor(new Color(255,255,255));\n\t\t\t\tg.setFont(new Font(\"Helvetica\", Font.PLAIN, 32));\n\t\t\t\tg.drawString(String.format(\"Score: %d\", score), GamePlay.getScreenWidth() - 5 - g.getFontMetrics().stringWidth(String.format(\"Score: %d\", score)), GamePlay.getScreenHeight() - 5 - 32);\n\t\t\t\t\n\t\t\t\t//paused\n\t\t\t\tif (stopped) {\n\t\t\t\t\tg.drawString(\"Paused\", 10, 42);//upper left corner of the screen. just say paused so user knows\n\t\t\t\t}\n\t\t\t\t//lives\n\t\t\t\tint livesFontSize=15;\n\t\t\t\tg.setFont(new Font(\"Helvetica\", Font.PLAIN, livesFontSize));\n\t\t\t\tg.drawString(String.format(\"Lives: %d\", lives), 20+5+pauseButton.getWidth(), GamePlay.getScreenHeight()-h+(2+livesFontSize));\n\t\t\t\t\n\t\t\t\tfor (int x=0; x<lives; x++) {//draw one ball for every life they have. \n\t\t\t\t\t//System.out.println(\"hey\");\n\t\t\t\t\tg.drawImage(ball.getImage(), 5+pauseButton.getWidth()+20+(5+ball.getWidth())*x, GamePlay.getScreenHeight()-(h/2)-(ball.getHeight())+(livesFontSize/2), this);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//logo\n\t\t\t\tg.drawImage(logo.getImage(), GamePlay.getScreenWidth()/2-logo.getWidth()/2, GamePlay.getScreenHeight() - (h/2) - (logo.getHeight()/2)-10, this);\n\t\t\t\t\n\t\t\t\t//pause button\n\t\t\t\tg.drawImage(pauseButton.getImage(), 5, GamePlay.getScreenHeight() - (h/2) - pauseButton.getHeight()/2 -10 , this);\n\t\t\t\t\n\t\t\t} else {//this means the player died.\n\t\t\t\t\n\t\t\t\t//draw black background \n\t\t\t\t\n\t\t\t\t//draw logo\n\t\t\t\tlogo.resize(400,100);\n\t\t\t\tg.setColor(new Color(0,0,0));\n\t\t\t\tg.fillRect(0, 0, GamePlay.getScreenWidth(), GamePlay.getScreenHeight());\n\t\t\t\tg.drawImage(logo.getImage(), GamePlay.getScreenWidth()/2 - logo.getWidth()/2, 100, this);\n\t\t\t\t\n\t\t\t\tg.setColor(new Color(255,255,255));//draw game over text\n\t\t\t\tg.setFont(new Font(\"Helvetica\", Font.PLAIN, 60));\n\t\t\t\tg.drawString(\"Game Over!\", GamePlay.getScreenWidth()/2 - g.getFontMetrics().stringWidth(\"Game Over!\")/2, GamePlay.getScreenHeight()/2 - 30);\n\t\t\t\t\n\t\t\t\t//draw score. \n\t\t\t\tg.drawString(String.format(\"Your Score: %d\", score), GamePlay.getScreenWidth()/2 - g.getFontMetrics().stringWidth(String.format(\"Your Score: %d\", score))/2, GamePlay.getScreenHeight()/2 + 100);\n\t\t\t}\n\t\t\t\n\t\t}",
"private void drawHeart2 (float sx, float sy, float sz, Appearance[] app)\n {\n\tfloat x, y, z, r;\n \n BranchGroup tBG = new BranchGroup();\n\ttBG.setCapability (BranchGroup.ALLOW_DETACH);\n\n System.out.println(\"Aqui\");\n \n\tx = sx+0f; y = sy+0.04f; z = sz+0f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[0]);\n\t//tBG.addChild (makeText (new Vector3d (sx+0,sy+1.1,sz+0), \"AP\"));\n\n\tx = sx-0.2f; y = sy-0.1f; z = sz+0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[1]);\n\t//tBG.addChild (makeText (new Vector3d (sx-2,sy+0,sz+1.5), \"IS_\"));\n\n\tx = sx+0.2f; y = sy-0.1f; z = sz+0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[2]);\n\t//tBG.addChild (makeText (new Vector3d (sx+2,sy+0,sz+1.5), \"IL\"));\n\n\tx = sx-0.32f; y = sy-0.1f; z = sz+0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[3]);\n\t//tBG.addChild (makeText (new Vector3d (sx-2.5,sy+0,sz+0.5), \"SI\"));\n\n\tx = sx+0.32f; y = sy-0.1f; z = sz+0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[4]);\n\t//tBG.addChild (makeText (new Vector3d (sx+2.5,sy+0,sz+0.5), \"LI\"));\n\n\tx = sx-0.32f; y = sy-0.1f; z = sz-0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[5]);\n\t//tBG.addChild (makeText (new Vector3d (sx-2.5,sy+0,sz-0.5), \"SA\"));\n\n\tx = sx+0.32f; y = sy-0.1f; z = sz-0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[6]);\n\t//tBG.addChild (makeText (new Vector3d (sx+2.5,sy+0,sz-0.5), \"LA\"));\n\n\tx = sx-0.2f; y = sy-0.1f; z = sz-0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[7]);\n\t//tBG.addChild (makeText (new Vector3d (sx-2,sy+0,sz-1.5), \"AS_\"));\n\n\tx = sx+0.2f; y = sy-0.1f; z = sz-0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[8]);\n\t//tBG.addChild (makeText (new Vector3d (sx+2,sy+0,sz-1.5), \"AL\"));\n\n\tsceneBG.addChild (tBG);\n }"
]
| [
"0.7398599",
"0.68172693",
"0.67863667",
"0.6645419",
"0.66409814",
"0.6636568",
"0.6623991",
"0.66051507",
"0.6550848",
"0.65179586",
"0.6512762",
"0.6507867",
"0.64817363",
"0.6471543",
"0.639275",
"0.63782007",
"0.6364532",
"0.6340708",
"0.6317989",
"0.6315345",
"0.630427",
"0.6294525",
"0.6294469",
"0.6291876",
"0.62781537",
"0.62672794",
"0.6260297",
"0.6256169",
"0.6216172",
"0.6214938",
"0.6189023",
"0.6176391",
"0.61610407",
"0.61593604",
"0.61499083",
"0.6134608",
"0.612577",
"0.61241335",
"0.6119797",
"0.6115108",
"0.6111749",
"0.6110275",
"0.6110055",
"0.60997826",
"0.6083484",
"0.60776854",
"0.6072491",
"0.6062936",
"0.60618913",
"0.60581183",
"0.6047673",
"0.60430866",
"0.60411614",
"0.6031016",
"0.6029876",
"0.6021204",
"0.6005849",
"0.60033053",
"0.5996055",
"0.59938836",
"0.5986458",
"0.59860665",
"0.5985778",
"0.5984857",
"0.59777904",
"0.5975789",
"0.597198",
"0.5965466",
"0.59640014",
"0.5957816",
"0.5949708",
"0.59422654",
"0.5933302",
"0.5930243",
"0.5919542",
"0.59184796",
"0.5912603",
"0.5911898",
"0.59073526",
"0.59062725",
"0.59062374",
"0.59015465",
"0.58960694",
"0.5894844",
"0.5890867",
"0.58882457",
"0.5884698",
"0.58825517",
"0.588093",
"0.58802354",
"0.5879279",
"0.5875301",
"0.58748126",
"0.5869587",
"0.5868951",
"0.5862956",
"0.58601457",
"0.5855923",
"0.5855758",
"0.58549803"
]
| 0.6584712 | 8 |
check collisions on player | public boolean checkHorizontalCollisions( LibRect2D rect )
{
if ( iPlayer.iBlock.checkBlockCollision( rect ) )
{
return true;
}
//check collision on blocks
for ( int i = 0; i < iWalls.length; ++i )
{
//only collide on non-passable blocks
if ( iWalls[ i ].iBlock.iPassThrough == PassThrough.ENo )
{
if ( iWalls[ i ].iBlock.checkBlockCollision( rect ) )
{
return true;
}
}
}
//check collisions on enemies
for ( int i = 0; i < iEnemies.length; ++i )
{
if ( iEnemies[ i ].isAlive() )
{
if ( iEnemies[ i ].iBlock.checkBlockCollision( rect ) )
{
return true;
}
}
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void checkPlayerCollisions() {\r\n\t\tGObject left = getElementAt(player.getX() - 1, player.getY() + player.getHeight() / 2.0);\r\n\t\tGObject right = getElementAt(player.getX() + player.getWidth() + 1, player.getY() + player.getHeight() / 2.0);\r\n\t\tif(dragon1 != null && (left == dragon1 || right == dragon1)) {\r\n\t\t\tremove(lifeBar);\r\n\t\t\tlifeBar = null;\r\n\t\t}\r\n\t\tif(dragon2 != null && (left == dragon2 || right == dragon2)) {\r\n\t\t\tremove(lifeBar);\r\n\t\t\tlifeBar = null;\r\n\t\t}\r\n\t}",
"public void checkPlayerCollisions() {\n\t\t//Iterate over the players\n\t\tfor (PlayerFish player : getPlayers()) {\n\t\t\t//Get collidables parallel.\n\t\t\tcollidables.parallelStream()\n\t\t\t\n\t\t\t//We only want the collidables we actually collide with\n\t\t\t.filter(collidable -> player != collidable && player.doesCollides(collidable))\n\t\t\t\n\t\t\t//We want to do the for each sequentially, otherwise we get parallelism issues\n\t\t\t.sequential()\n\t\t\t\n\t\t\t//Iterate over the elements\n\t\t\t.forEach(collidable -> {\n\t\t\t\tplayer.onCollide(collidable);\n\t\t\t\tcollidable.onCollide(player);\n\t\t\t});\n\t\t}\n\t}",
"private static void checkCollisions() {\n ArrayList<Entity> bulletsArray = bullets.entities;\n ArrayList<Entity> enemiesArray = enemies.entities;\n for (int i = 0; i < bulletsArray.size(); ++i) {\n for (int j = 0; j < enemiesArray.size(); ++j) {\n if (j < 0) {\n continue;\n }\n if (i < 0) {\n break;\n }\n Entity currentBullet = bulletsArray.get(i);\n Entity currentEnemy = enemiesArray.get(j);\n if (Collision.boxBoxOverlap(currentBullet, currentEnemy)) {\n ++player.hiScore;\n if (currentBullet.collided(currentEnemy)) {\n --i;\n }\n if (currentEnemy.collided(currentBullet)) {\n --j;\n }\n }\n }\n }\n textHiScore.setString(\"HISCORE:\" + player.hiScore);\n\n // Check players with bonuses\n ArrayList<Entity> bonusArray = bonus.entities;\n for (int i = 0; i < bonusArray.size(); ++i) {\n Entity currentBonus = bonusArray.get(i);\n if (Collision.boxBoxOverlap(player, currentBonus)) {\n if (currentBonus.collided(player)) {\n --i;\n player.collided(currentBonus);\n }\n }\n }\n }",
"public boolean collides(Rectangle player) {\r\n return player.overlaps(boundsTop) || player.overlaps(boundsBot);\r\n }",
"private void processPlayerCollision() {\n\t\t// This starts by converting the player vertices to global positions.\n\t\tVector3 playerGlobalPosition = player.getGlobalPositionVector();\n\t\tVector3 playerGlobalRotation = player.getGlobalRotationVector();\n\n\t\tVector3 playerVertex1 = new Vector3(player.hitboxPoints[0], player.hitboxPoints[1]);\n\t\tVector3 playerVertex2 = new Vector3(player.hitboxPoints[2], player.hitboxPoints[3]);\n\t\tVector3 playerVertex3 = new Vector3(player.hitboxPoints[4], player.hitboxPoints[5]);\n\t\t// TODO: Confirm this is correct.\n\t\tVector3 playerVertex1Global = new Vector3(playerVertex1.x * -Math.sin(Math.toRadians(playerGlobalRotation.z)), playerVertex1.y * Math.cos(Math.toRadians(playerGlobalRotation.z))).add(playerGlobalPosition);\n\t\tVector3 playerVertex2Global = new Vector3(playerVertex2.x * -Math.sin(Math.toRadians(playerGlobalRotation.z)), playerVertex2.y * Math.cos(Math.toRadians(playerGlobalRotation.z))).add(playerGlobalPosition);\n\t\tVector3 playerVertex3Global = new Vector3(playerVertex3.x * -Math.sin(Math.toRadians(playerGlobalRotation.z)), playerVertex3.y * Math.cos(Math.toRadians(playerGlobalRotation.z))).add(playerGlobalPosition);\n\n\t\tfor (AsteroidsAsteroid a : asteroids) {\n\t\t\t// If any of the vertices collide and the player is alive, lose a life.\n\t\t\tif ((a.collides(playerVertex1Global) || a.collides(playerVertex2Global) || a.collides(playerVertex3Global)) && player.isShowing()) {\n\t\t\t\tloseLife();\n\t\t\t}\n\t\t}\n\t}",
"public void checkCollision() {}",
"public void checkCollision()\r\n\t{\r\n\t\t//for Bullets against Avatar and Enemy\r\n\t\tfor(int bulletIndex = 0; bulletIndex < bullets.size(); bulletIndex++)\r\n\t\t{\r\n\t\t\tBullet b = bullets.get(bulletIndex);\r\n\t\t\tif (b instanceof AvatarBullet)\r\n\t\t\t{\r\n\t\t\t\t@SuppressWarnings(\"unused\")\r\n\t\t\t\tboolean collided = false;\r\n\t\t\t\tfor (int enemyIndex = 0; enemyIndex < enemy.size(); enemyIndex++)\r\n\t\t\t\t{\r\n\t\t\t\t\tEnemy e = enemy.get(enemyIndex);\r\n\t\t\t\t\tif(((AvatarBullet) b).collidedWith(e))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tbullets.remove(bulletIndex);\r\n\t\t\t\t\t\tbulletIndex--;\r\n\t\t\t\t\t\tenemy.remove(enemyIndex);\r\n\t\t\t\t\t\tenemyIndex --;\r\n\t\t\t\t\t\tcollided = true;\r\n\t\t\t\t\t\tint score = getScore()+1;\r\n\t\t\t\t\t\tsetScore(score);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if (b instanceof EnemyBullet)\r\n\t\t\t{\r\n\t\t\t\tif (((EnemyBullet) b).collidedWith(avatar))\r\n\t\t\t\t{\r\n\t\t\t\t\tbullets.remove(bulletIndex);\r\n\t\t\t\t\tbulletIndex--;\r\n\t\t\t\t\tint health = Avatar.getLives()-1;\r\n\t\t\t\t\tavatar.setLives(health);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int platformIndex = 0; platformIndex < platforms.size(); platformIndex++)\r\n\t\t{\r\n\t\t\tPlatforms p = platforms.get(platformIndex);\r\n\t\t\tif (p instanceof Platforms)\r\n\t\t\t{\r\n\t\t\t\t//boolean collided = false;\r\n\t\t\t\t//Avatar a = avatar.get(enemyIndex);\r\n\t\t\t\tif(((Platforms) p).collidedWith(avatar))\r\n\t\t\t\t{\r\n\t\t\t\t\tsetAlive(true);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tsetAlive(false);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void checkCollision(Actor player) {\n\n for (int i = 0; i < activePickups.size(); i++) {\n Pickup p = activePickups.get(i);\n\n if (p.getBounds().intersects(player.getBounds())) {\n p.despawn();\n if (p instanceof FogLightsPickup) {\n PlayerInventory.incrementFogLights();\n } else if (p instanceof SlowMotionPickup) {\n PlayerInventory.incrementSlowMotion();\n } else if (p instanceof InvincibilityPickup) {\n PlayerInventory.incrementInvincibility();\n\n } else if (p instanceof CoinPickup) {\n coinsPickedUp++;\n canvas.playSound(\"coin.wav\");\n }\n }\n }\n }",
"private void checkPlayerCollisions(int x, int y){\n\t\tint wHitBoxX = 100;\n\t\tint wHitBoxY = 150;\n\t\t\n\t\tfor(int i = 0; i<enemy_num; i++){\n\t\t\tfor(int j = 0; j<enemy_arrow_num[i]; j++){\n\t\t\t\tif(enemy_arrows[i][j][0] > x && enemy_arrows[i][j][0] < (x+wHitBoxX)){\n\t\t\t\tif(enemy_arrows[i][j][1] > y && enemy_arrows[i][j][1] < (y+wHitBoxY)){\n\t\t\t\t \tremove_arrow(i,j);\n\t\t\t\t}}\n\t\t\t}\n\t\t}\n\t\t\n\t\n\t}",
"@Override\n\tpublic boolean checkCollision() {\n\t\treturn true;\n\t}",
"void checkCollision(Entity other);",
"private void checkCollisions() {\n float x = pacman.getPos().x;\n float y = pacman.getPos().y;\n\n GameEntity e;\n for (Iterator<GameEntity> i = entities.iterator(); i.hasNext(); ) {\n e = i.next();\n // auf kollision mit spielfigur pruefen\n if (Math.sqrt((x - e.getPos().x) * (x - e.getPos().x) + (y - e.getPos().y) * (y - e.getPos().y)) < 0.5f)\n if (e.collide(this, pacman))\n i.remove();\n }\n }",
"public void checkCollision() {\n\t\tfor(SolidObject i : solidObjects) {\r\n\t\t\tif(getBounds().intersects(i.getBounds())) {\r\n\t\t\t\t//Increments the KillCount\r\n\t\t\t\tif(i.onAttack(damage, flipped)) {\r\n\t\t\t\t\tkillCount++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void collisionsCheck() {\n\t\tif(this.fence.collisionTest(\n\t\t\t\tthis.spider.getMovementVector())) \n\t\t{\n\t\t\t// we actually hit something!\n\t\t\t// call collision handlers\n\t\t\tthis.spider.collisionHandler();\n\t\t\tthis.fence.collisionHandler();\n\t\t\t// vibrate!\n\t\t\tvibrator.vibrate(Customization.VIBRATION_PERIOD);\n\t\t\t// lose one life\n\t\t\tthis.data.lostLife();\n\t\t}\n\t}",
"void collide() {\n for (Target t : this.helicopterpieces) {\n if (!t.isHelicopter && ((t.x == this.player.x && t.y == this.player.y)\n || (t.x == this.player2.x && t.y == this.player2.y))) {\n this.collected--;\n t.isCollected = true;\n }\n if (t.isHelicopter && this.collected == 1\n && ((t.x == this.player.x && t.y == this.player.y) || (t.isHelicopter\n && this.collected == 1 && t.x == this.player2.x && t.y == this.player2.y))) {\n this.collected = 0;\n this.helicopter.isCollected = true;\n }\n }\n }",
"private void checkCollision() {\n\n for(int b = 1; b < snakeLength; b++){\n if(xLength[b] == xLength[0] && yLength[b] == yLength[0]) {\n right = false;\n left = false;\n down = false;\n up = false;\n gameOver = true;\n }\n }\n\n if(right){\n if(xLength[0] >= 825) {\n gameOver = true;\n }\n }\n if(left){\n if(xLength[0] <= 50) {\n gameOver = true;\n }\n }\n if(down){\n if(yLength[0] >= 600) {\n gameOver = true;\n }\n }\n if(up){\n if(yLength[0] <= 100) {\n gameOver = true;\n }\n }\n }",
"void collisionHappened(int position);",
"@Override\n public boolean isCollided(gameObject obj){\n return Rect.intersects(obj.getastRect(), getRectplayer1())||\n Rect.intersects(obj.getastRect(), getRectplayer2()) ||\n Rect.intersects(obj.getastRect(), getRectplayer3()) ||\n Rect.intersects(obj.getastRect(), getRectplayer4());\n }",
"protected void checkEntityCollisions(long time) {\n\t\tRectangle2D.Float pla1 = player1.getLocationAsRect();\n\t\tRectangle2D.Float pla2 = player2.getLocationAsRect();\n\t\tfor(int i = 0; i < ghosts.length; i++)\n\t\t{\n\t\t\tGhost g = ghosts[i];\n\t\t\t\n\t\t\tif(g.isDead())\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\tRectangle2D.Float ghRect = g.getLocationAsRect();\n\t\t\t\n\t\t\tif(ghRect.intersects(pla1))\n\t\t\t\tonPlayerCollideWithGhost(time, player1, i);\n\t\t\t\n\t\t\tif(ghRect.intersects(pla2))\n\t\t\t\tonPlayerCollideWithGhost(time, player2, i);\n\t\t}\n\t}",
"private void checkCollision()\n {\n if(isTouching(Rocket.class))\n {\n removeTouching(Rocket.class);\n Level1 level1 = (Level1)getWorld(); \n isSwordscore = false;\n notifyObservers(-20);\n }\n else if(isTouching(Fire.class))\n {\n removeTouching(Fire.class);\n Level1 level1 = (Level1)getWorld(); \n isSwordscore = false;\n notifyObservers(-20);\n }\n else if(isTouching(Sword.class))\n { \n removeTouching(Sword.class);\n Level1 level1 = (Level1)getWorld();\n isSwordscore = false;\n notifyObservers(-20);\n }\n \n else if(isTouching(Star.class))\n { \n removeTouching(Star.class);\n Level1 level1 = (Level1)getWorld();\n isSwordscore = false;\n count++;\n boost();\n }\n }",
"private void handleCollisions() {\n\t\t\n\t\tfor (ArrayList<Invader> row : enemyArray) {\n\t\t\tfor (Invader a : row) {\n\t\t\t\tcheckInvaderDeath(a);\n\t\t\t\tcheckPlayerDeath(a);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (Shot s : enemyShotList) {\n\t\t\t\n\t\t\tif (s.detectDownwardCollision(player.getX(), player.getY())) {\n\t\t\t\trunning = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tcollectPowerUp(armorPiercing);\n\t\tcollectPowerUp(explosive);\n\t}",
"public int CollisionBetween2RedPlayers(Player player)\n {\n int total_collisions = 0;\n try\n {\n RedPlayer red_player = (RedPlayer) player;\n total_collisions += check4CollisionWithRed(player);\n player.setCollisions(total_collisions);\n }\n catch (Exception e)\n {\n return -1;\n }\n return total_collisions;\n }",
"private void CheckWorldCollision() {\n\t\tfor(WorldObj obj : World.CurrentWorld.SpawnedObjects) {\n\t\t\tif(bounds.overlaps(obj.bounds))\n\t\t\t\tobj.OnCollision(this);\n\t\t\tif(MapRenderer.CurrentRenderer.ItemAnimation != null) {\n\t\t\t\tif(obj.ai != null) {\n\t\t\t\t\tif(dir == LEFT)\n\t\t\t\t\tAttackBounds.set(pos.x+(dir*1.35f)+0.5f,pos.y,1.35f,1);\n\t\t\t\t\telse\n\t\t\t\t\t\tAttackBounds.set(pos.x+0.5f,pos.y,1.35f,1);\n\t\t\t\t\tif(obj.healthBarTimer > 0.4f)\n\t\t\t\tif(AttackBounds.overlaps(obj.bounds)) {\n\t\t\t\t\tif(!Terrain.CurrentTerrain.isSolid((int)(pos.x+0.5f+(0.3f*dir)), (int)(pos.y+0.5f)))\n\t\t\t\t\tobj.ai.onDamaged(this, UsedItem, GetATK());\n\t\t\t\t\tHitTimer = 0;\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(obj.damageable) {\n\t\t\t\t\tif(AttackBounds.overlaps(obj.bounds)) {\n\t\t\t\t\t\tobj.onDamaged(this, UsedItem, GetATK());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private void checkCollision()\n {\n if (gameOverBool==false)\n { \n Actor a = getOneIntersectingObject(Wall.class);\n if (a != null||isAtEdge())\n {\n setImage(\"gone.png\");//laat de helicopter verdwijnen\n //greenfoot.GreenfootSound.stop(\"helisound.wav\");\n World world = getWorld();\n world.addObject(new Explosion(), getX(), getY());\n Greenfoot.playSound(\"heliExplosion.wav\");\n world.addObject( new Gameover(), 600, 300 );\n gameOverBool = true; \n }\n } \n }",
"private void checkForBulletCollisions() {\r\n\t\tbulletMoveOffScreen();\r\n\t\tbulletCollisionWithObject();\r\n\t}",
"public void checkCollision(){\r\n\r\n\t\t\t\tsmile.updateVelocity();\r\n\r\n\t\t\t\tsmile.updatePosition();\r\n\r\n\t\t\t\tif (smile.updateVelocity() > 0){\r\n\r\n\t\t\t\t\tfor (int k = 0; k < arrayPlat.size(); k++){\r\n\r\n\t\t\t\t\t\tif (smile.getNode().intersects(arrayPlat.get(k).getX(), arrayPlat.get(k).getY(), Constants.PLATFORM_WIDTH, Constants.PLATFORM_HEIGHT)){\r\n\r\n\t\t\t\t\t\t\tsmile.setVelocity(Constants.REBOUND_VELOCITY);\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t}",
"private boolean detectCollisions(GameState mGaemState,ArrayList<GameObject> objects,SoundEngine se,ParticleSystem ps){\n boolean playerHit = false;\n for (GameObject go1:objects){\n if (go1.checkActive()){\n //the 1st object is active\n //so worth checking\n\n for (GameObject go2:objects){\n if (go2.checkActive()){\n //the 2nd object is active\n //so worth checking\n if (RectF.intersects(go1.getTransform().getCollider(),go2.getTransform().getCollider())){\n\n //switch goes here\n //there has been a collision\n //but does it matter?\n switch (go1.getTag() + \" with \" + go2.getTag()){\n case \"Player with Alien Laser\":\n playerHit = true;\n mGaemState.lostLife(se);\n\n break;\n\n case \"Player with Alien\":\n playerHit =true;\n mGaemState.lostLife(se);\n\n break;\n\n case \"Player Laser with Alien\":\n mGaemState.increaseScore();\n //respawn the alien\n ps.emitParticles(new PointF(go2.getTransform().getLocation().x,go2.getTransform().getLocation().y));\n go2.setInactive();\n go2.spawn(objects.get(Level.PLAYER_INDEX).getTransform());\n go1.setInactive();\n se.playAlienExplode();\n\n break;\n\n default:\n break;\n }\n\n }\n }\n }\n }\n }\n return playerHit;\n }",
"public int check4CollisionWithBlue(Player player)\n {\n int number_of_collisions = 0;\n int x_cord = getMidPoint(player.x_cordinate);\n int y_cord = getMidPoint(player.y_cordinate);\n int blux1 = getMidPoint(getBlue_player1().x_cordinate);//blue_player1.x_cordinate;\n int blux2 = getMidPoint(getBlue_player2().x_cordinate);\n int blux3 = getMidPoint(getBlue_player3().x_cordinate);//blue_player3.x_cordinate;\n int blux4 = getMidPoint(getBlue_player4().x_cordinate);//blue_player4.x_cordinate;\n int bluy1 = getMidPoint(getBlue_player1().y_cordinate);//blue_player1.y_cordinate;\n int bluy2 = getMidPoint(getBlue_player2().y_cordinate);//blue_player2.y_cordinate;\n int bluy3 = getMidPoint(getBlue_player3().y_cordinate);//blue_player3.y_cordinate;\n int bluy4 = getMidPoint(getBlue_player4().y_cordinate);//blue_player4.y_cordinate;\n number_of_collisions += collisionDetection(x_cord, y_cord, blux1, bluy1);\n number_of_collisions += collisionDetection(x_cord, y_cord, blux2, bluy2);\n number_of_collisions += collisionDetection(x_cord, y_cord, blux3, bluy3);\n number_of_collisions += collisionDetection(x_cord, y_cord, blux4, bluy4);\n return number_of_collisions;\n }",
"@Override\n public void checkCollision( Sprite obj )\n {\n \n }",
"public static void checkCollisions() {\n\t \n\t\tfor (Ball b1 : Panel.balls) {\n\t\t\tfor (Ball b2 : Panel.balls) {\n\t\t\t\tif (b1.Bounds().intersects(b2.Bounds()) && !b1.equals(b2)) {\t\t\t//checking for collision and no equals comparisions\n\t\t\t\t\tint vX = b1.getxVelocity();\n\t\t\t\t\tint vY = b1.getyVelocity();\n\t\t\t\t\tb1.setxVelocity(b2.getxVelocity());\t\t\t\t\t\t\t\t//reversing velocities of each Ball object\n\t\t\t\t\tb1.setyVelocity(b2.getyVelocity());\n\t\t\t\t\tb2.setxVelocity(vX);\n\t\t\t\t\tb2.setyVelocity(vY);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private void checkCollision() {\n for (int i = snakeSize; i > 0; i--) {\n if (i>4 && x[0] == x[i] && y[0] == y[i]){\n isInGame=false;\n }\n }\n\n if (x[0] > FIELD_SIZE) {\n isInGame=false;\n }\n\n if (x[0] < 0) {\n isInGame=false;\n }\n\n if (y[0] > FIELD_SIZE) {\n isInGame=false;\n }\n\n if (y[0] < 0) {\n isInGame=false;\n }\n\n\n }",
"private boolean playerDetection() {\n\t\tAxisAlignedBB axisalignedbb = new AxisAlignedBB(posX, posY, posZ, posX + 1, posY + 1, posZ + 1).grow(DETECTION_RANGE);\n\t\tList<EntityPlayer> list = world.getEntitiesWithinAABB(EntityPlayer.class, axisalignedbb);\n\n\t\treturn !list.isEmpty();\n\t}",
"private void checkCollisions() {\n int x1 = 0;\n int x2 = 0;\n for(CollisionBox e : cols) {\n for(CollisionBox f : cols) {\n if(\n x2 > x1 && // Skip checking collisions twice\n// (\n// e != f || // The entities are not the same entity\n// ( // One of the entities's parent object is not the bullet of the other's (aka ignore player bullets colliding with player)\n// // And also check they're not both from the same entity (two bullets colliding both going in the same direction from the same entity)\n// f.getParent() != null && // The first entity has a parent and\n// e.getParent() != null && // The second entity has a parent and\n// f.getParent().getParent() != null && // The first entity's parent has a parent and\n// e.getParent().getParent() != null && // The second entity's parent has a parent and\n// f.getParent().getParent() != e.getParent() && // The first entity's parent's parent is not the second entity's parent\n// e.getParent().getParent() != f.getParent() &&// The second entity's parent's parent is not the first entity's parent\n// f.getParent().getParent() != e.getParent().getParent() // The first and second entities' parents' parents are not the same\n// )\n// ) &&\n SAT.isColliding(e, f) // The entities are colliding\n ) { // Collide the Entities\n Entity ep = e.getParent();\n Entity fp = f.getParent();\n ep.collide(fp);\n fp.collide(ep);\n }\n x2++;\n }\n x1++;\n x2 = 0;\n }\n }",
"void checkHandleContactWithPlayer() {\n Player curPlayer = this.mainSketch.getCurrentActivePlayer();\n\n if (this.doesAffectPlayer) {\n // boundary collision for player\n if (contactWithCharacter(curPlayer)) { // this has contact with non-player\n if (!this.charactersTouchingThis.contains(curPlayer)) { // new collision detected\n curPlayer.changeNumberOfVerticalBoundaryContacts(1);\n this.charactersTouchingThis.add(curPlayer);\n }\n curPlayer.handleContactWithVerticalBoundary(this.startPoint.x);\n\n } else { // this DOES NOT have contact with player\n if (this.charactersTouchingThis.contains(curPlayer)) {\n curPlayer.setAbleToMoveRight(true);\n curPlayer.setAbleToMoveLeft(true);\n curPlayer.changeNumberOfVerticalBoundaryContacts(-1);\n this.charactersTouchingThis.remove(curPlayer);\n }\n }\n }\n }",
"private void checkRegTileCollisions(float deltaTime) {\n\t\tint len = regTiles.size();\n\t\tfor(int i = 0; i < len; i ++) {\n\t\t\tRegTile tile = regTiles.get(i);\n\t\t\t\n\t\t\t//overlap between player and tile\n\t\t\t\n\t\t\t//experiment with these values to get close to perfect collisions *************************\n\t\t\ttry {\n\t\t\t\tif(OverlapTester.overlapRectangles(player.bounds, tile.bounds)) {\n\t\t\t\t\t\n\t\t\t\t\t//check y - collisions\n\t\t\t\t\tif(player.position.y > tile.position.y + (tile.bounds.height / 2) && player.position.x - (player.bounds.width / 2) + correctionFactor < tile.position.x + (tile.bounds.width / 2) && player.position.x + (player.bounds.width / 2) - correctionFactor > tile.position.x - (tile.bounds.width / 2)) {\n\t\t\t\t\t\tplayer.velocity.y = 0;\n\t\t\t\t\t\tplayer.position.y = tile.position.y + 1;\n\t\t\t\t\t\tif(player.velocity.x > 3) {\n\t\t\t\t\t\t\tplayer.velocity.x -= 0.2f; //prev. optimal was .3\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if(player.position.y < tile.position.y - (tile.bounds.height / 2) && player.position.x - (player.bounds.width / 2) + correctionFactor < tile.position.x + (tile.bounds.width / 2) && player.position.x + (player.bounds.width / 2) - correctionFactor > tile.position.x - (tile.bounds.width / 2)) {\n\t\t\t\t\t\tplayer.velocity.y = 0;\n\t\t\t\t\t\tplayer.position.y = tile.position.y - 1;\n\t\t\t\t\t\tif(player.velocity.x > 3) {\n\t\t\t\t\t\t\tplayer.velocity.x -= 0.2f;\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//check x - collision\n\t\t\t\t\tif(player.position.x > tile.position.x + (tile.bounds.width / 2) + correctionFactor && player.position.y - (player.bounds.height / 2) + correctionFactor < tile.position.y + (tile.bounds.height / 2) && player.position.y + (player.bounds.height / 2) - correctionFactor > tile.position.y - (tile.bounds.height / 2)) {\n\t\t\t\t\t\tplayer.velocity.x = 0;\n\t\t\t\t\t\txColliding = true;\n\t\t\t\t\t\tplayer.position.x = tile.position.x + 1; //animate possibly\n\t\t\t\t\t\tif(player.velocity.y > 0) {\n\t\t\t\t\t\t\t//player.velocity.y -= 0.2f;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if(player.position.x < tile.position.x - (tile.bounds.width / 2) - correctionFactor && player.position.y - (player.bounds.height / 2) + correctionFactor < tile.position.y + (tile.bounds.height / 2) && player.position.y + (player.bounds.height / 2) - correctionFactor > tile.position.y - (tile.bounds.height / 2)) {\n\t\t\t\t\t\tplayer.velocity.x = 0;\n\t\t\t\t\t\txColliding = true;\n\t\t\t\t\t\tplayer.position.x = tile.position.x - 1; //animate possibly\n\t\t\t\t\t\tif(player.velocity.y > 0) {\n\t\t\t\t\t\t\t//player.velocity.y -= 0.2f;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t} catch (Exception e) {}\n\t\t}\n\t\trecheckTileCollisions(); //fix frame-skipping \n\t}",
"public int check4CollisionsBtnPlayers(Player player)\n {\n int collisions_red = CollisionBetween2RedPlayers(player);\n int collisions_green = CollisionBetween2GreenPlayers(player);\n int collisions_yellow = CollisionBetween2YellowPlayers(player);\n //player.setCollisions(collisions_red);\n if (collisions_red > 0)\n {\n player.setCollisions(collisions_red);\n return collisions_red;\n }\n if (collisions_green > 0)\n {\n player.setCollisions(collisions_green);\n return collisions_green;\n }\n if (collisions_yellow > 0)\n {\n player.setCollisions(collisions_yellow);\n return collisions_yellow;\n }\n return -1;\n }",
"public void checkCollisions(int xH, int yH) {\n Rectangle r1 = new Rectangle(xH, yH, 50, 50);\n Rectangle r2 = new Rectangle(zombie.x, zombie.y, 50, 50);\n if (r1.intersects(r2)) {\n zombieWins = true; \n }\n }",
"@Override\n public void checkCollision( Sprite obj )\n {\n\n }",
"private void checkWeaponCollisions(GObject element) {\r\n\t\tGObject topLeft = getElementAt(element.getX() - 1, element.getY());\r\n\t\tGObject topRight = getElementAt(element.getX() + element.getWidth() + 1, element.getY());\r\n\t\tGObject bottomLeft = getElementAt(element.getX() - 1, element.getY() + element.getHeight());\r\n\t\tGObject bottomRight = getElementAt(element.getX() + element.getWidth() + 1, element.getY() + element.getHeight());\r\n\t\tif(topLeft == player || topRight == player || bottomLeft == player || bottomRight == player) {\r\n\t\t\tremove(element);\r\n\t\t\telement = null;\r\n\t\t\thits++;\r\n\t\t\tloseLife();\r\n\t\t}\r\n\t}",
"private void checkCastleCollisions() {\n\t\t\n\t}",
"private void fireball1Collisions() {\r\n\t\tGObject topLeft = getElementAt(fireball1.getX() - 1, fireball1.getY());\r\n\t\tGObject bottomLeft = getElementAt(fireball1.getX() - 1, fireball1.getY() + fireball1.getHeight());\r\n\t\tGObject topRight = getElementAt(fireball1.getX() + fireball1.getWidth() + 1, fireball1.getY());\r\n\t\tGObject bottomRight = getElementAt(fireball1.getX() + fireball1.getWidth() + 1, fireball1.getY() + fireball1.getHeight());\r\n\t\tif(topLeft == player || bottomLeft == player || topRight == player || bottomRight == player) {\r\n\t\t\tremove(fireball1);\r\n\t\t\tfireball1 = null;\r\n\t\t\thits++;\r\n\t\t\tloseLife();\r\n\t\t}\r\n\t}",
"private void fireball2Collisions() {\r\n\t\tGObject topLeft = getElementAt(fireball2.getX() - 1, fireball2.getY());\r\n\t\tGObject topRight = getElementAt(fireball2.getX() + fireball2.getWidth() + 1, fireball2.getY());\r\n\t\tGObject bottomLeft = getElementAt(fireball2.getX() - 1, fireball2.getY() + fireball2.getHeight());\r\n\t\tGObject bottomRight = getElementAt(fireball2.getX() + fireball2.getWidth() + 1, fireball2.getY() + fireball2.getHeight());\r\n\t\tif(topLeft == player || topRight == player || bottomLeft == player || bottomRight == player) {\r\n\t\t\tremove(fireball2);\r\n\t\t\tfireball2 = null;\r\n\t\t\thits++;\r\n\t\t\tloseLife();\r\n\t\t}\r\n\t}",
"public void checkCollision(){\n\r\n for(int i = 0; i < enemies.size(); i++){\r\n \r\n // Player and Enemy collision\r\n \r\n if(collide(this.player, enemies.get(i)) && this.player.isVisible() && enemies.get(i).isVisible()){\r\n System.out.println(\"Collide\");\r\n this.player.setHealth(this.player.getHealth() - 100);\r\n }\r\n\r\n // Player and Enemy bullet collision\r\n \r\n for(int j =0; j < enemies.get(i).getBullets().size(); j++){\r\n\r\n if(collide(this.player, enemies.get(i).getBullets().get(j)) && this.player.isVisible() && enemies.get(i).getBullets().get(j).isVisible()){\r\n\r\n enemies.get(i).getBullets().get(j).setVisible(false);\r\n this.player.setHealth(this.player.getHealth() - enemies.get(i).getBullets().get(j).getDamage());\r\n\r\n }\r\n }\r\n\r\n }\r\n //time = DEFAULT_TIME_DELAY;\r\n// }\r\n\r\n\r\n\r\n for(int i = 0; i < player.getBullets().size(); i++){\r\n\r\n\r\n // Player bullet and enemy collision\r\n\r\n for(int j = 0; j < enemies.size(); j++) {\r\n if (collide(enemies.get(j), player.getBullets().get(i)) && enemies.get(j).isVisible() && player.getBullets().get(i).isVisible()) {\r\n\r\n if (enemies.get(j).getHealth() < 0) {\r\n enemies.get(j).setVisible(false);\r\n score.addScore(100);\r\n }\r\n\r\n enemies.get(j).setHealth(enemies.get(j).getHealth() - player.getBullets().get(i).getDamage());\r\n // enemies.get(j).setColor(Color.RED);\r\n player.getBullets().get(i).setVisible(false);\r\n\r\n\r\n }\r\n }\r\n\r\n\r\n // Boss collision & player bullet collision\r\n\r\n if(collide(player.getBullets().get(i), this.boss1) && player.getBullets().get(i).isVisible() && boss1.isVisible()){\r\n\r\n if(boss1.getHealth() < 0){\r\n boss1.setVisible(false);\r\n score.addScore(1000);\r\n state = STATE.WIN;\r\n }\r\n this.boss1.setHealth(this.boss1.getHealth() - player.getBullets().get(i).getDamage());\r\n // this.boss1.setHealth(0);\r\n player.getBullets().get(i).setVisible(false);\r\n\r\n }\r\n\r\n }\r\n\r\n // Bullet vs Bullet Collision\r\n\r\n for(int k = 0 ; k < player.getBullets().size(); k++){\r\n\r\n if(player.getBullets().get(k).isVisible()) {\r\n for (int i = 0; i < enemies.size(); i++) {\r\n\r\n if(enemies.get(i).isVisible()) {\r\n for (int j = 0; j < enemies.get(i).getBullets().size(); j++) {\r\n\r\n if (collide(player.getBullets().get(k), enemies.get(i).getBullets().get(j)) && enemies.get(i).getBullets().get(j ).isVisible()) {\r\n\r\n\r\n System.out.println(\"bullets colliding\");\r\n\r\n player.getBullets().get(k).setVisible(false);\r\n enemies.get(i).getBullets().get(j).setColor(Color.yellow);\r\n enemies.get(i).getBullets().get(j).deflect(this.player.getX() + this.player.getW()/2, this.player.getY() + this.player.getH()/2);\r\n\r\n player.getBullets().add(enemies.get(i).getBullets().get(j));\r\n\r\n enemies.get(i).getBullets().remove(enemies.get(i).getBullets().get(j)); //removes bullet\r\n\r\n\r\n k++;\r\n j--;\r\n //enemies.get(i).getBullets().get(j).setVisible(false);\r\n }\r\n }\r\n }\r\n }\r\n\r\n\r\n for(int i = 0; i < boss1.getBullets().size(); i++) {\r\n\r\n\r\n if (collide(player.getBullets().get(k), boss1.getBullets().get(i)) && boss1.getBullets().get(i).isVisible()) {\r\n\r\n System.out.println(\"boss bullets colliding\");\r\n player.getBullets().get(k).setVisible(false);\r\n boss1.getBullets().get(i).setColor(Color.yellow);\r\n boss1.getBullets().get(i).deflect(this.player.getX() + this.player.getW()/2, this.player.getY() + this.player.getH()/2);\r\n player.getBullets().add(boss1.getBullets().get(i));\r\n boss1.getBullets().remove(boss1.getBullets().get(i));\r\n k++;\r\n i--;\r\n\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Boss bullet and player collision\r\n\r\n for(Bullet b : boss1.getBullets() ){\r\n\r\n\r\n if(collide(player, b) && player.isVisible() && b.isVisible()){\r\n b.setVisible(false);\r\n player.setHealth(player.getHealth() - b.getDamage());\r\n }\r\n }\r\n\r\n\r\n // Power up collision\r\n\r\n for(PowerUp p : powerUps){\r\n\r\n if(collide(player, p) && p.isVisible()){\r\n\r\n p.executeEffect(this.player);\r\n p.setVisible(false);\r\n }\r\n }\r\n\r\n\r\n\r\n // Deleting out of bound bullets\r\n for(int i = 0; i < player.getBullets().size(); i++){\r\n if(player.getBullets().get(i).getY() < 0 || player.getBullets().get(i).getY() > GameWorld.SCREEN_H ||\r\n player.getBullets().get(i).getX()< 0 || player.getBullets().get(i).getX() > GameWorld.SCREEN_W) {\r\n\r\n player.getBullets().remove(player.getBullets().get(i));\r\n }\r\n }\r\n\r\n }",
"public int check4CollisionWithRed(Player player)\n {\n \n int number_of_collisions = 0;\n int x_cord = getMidPoint(player.getX_cordinate());\n int y_cord = getMidPoint(player.getY_cordinate());\n int redx1 = getMidPoint(ludo.getRedPlayer1().x_cordinate);\n int redx2 = getMidPoint(ludo.getRedPlayer2().x_cordinate);\n int redx3 = getMidPoint(ludo.getRedPlayer3().x_cordinate);\n int redx4 = getMidPoint(ludo.getRedPlayer4().x_cordinate);\n int redy1 = getMidPoint(ludo.getRedPlayer1().y_cordinate);\n int redy2 = getMidPoint(ludo.getRedPlayer2().y_cordinate);\n int redy3 = getMidPoint(ludo.getRedPlayer3().y_cordinate);\n int redy4 = getMidPoint(ludo.getRedPlayer4().y_cordinate);\n number_of_collisions += collisionDetection(x_cord, y_cord, redx1, redy1);\n number_of_collisions += collisionDetection(x_cord, y_cord, redx2, redy2);\n number_of_collisions += collisionDetection(x_cord, y_cord, redx3, redy3);\n number_of_collisions += collisionDetection(x_cord, y_cord, redx4, redy4);\n return number_of_collisions;\n }",
"public void checkCollisions() {\n\t\t List<Missile> missiles = player.getMissiles();\n\t\t for(Missile n : missiles) {\n\t\t\t Rectangle r1 = n.getBounds();\n\t\t\t for(Mushroom mush : mushrooms) {\n\t\t\t\t Rectangle r2 = mush.getBounds();\n\t\t\t\t r2.x += 8;\n\t\t\t\t if(r1.intersects(r2)) {\n\t\t\t\t\t mush.hitCnt += 1;\n\t\t\t\t\t if(mush.hitCnt == 3) {\n\t\t\t\t\t\t score += 5;\n\t\t\t\t\t\t n.setVisible(false);\n\t\t\t\t\t\t mush.setVisible(false);\n\t\t\t\t\t } else {\n\t\t\t\t\t\t score += 1;\n\t\t\t\t\t\t n.setVisible(false);\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\n\t\t //check if Missile hits Centipede\n\t\t //missiles = player.getMissiles();\n\t\t for(Missile m: missiles) {\n\t\t\t Rectangle rm = m.getBounds();\n\t\t\t for(int i = 0; i < centipede.size(); i++) {\n\t\t\t\t Segment s = centipede.get(i);\n\t\t\t\t Rectangle rs = s.getBounds();\n\t\t\t\t if(rs.intersects(rm)) {\n\t\t\t\t\ts.hit();\n\t\t\t\t\tscore = (s.hitCnt < 2 ? score +2 : score + 0);\n\t\t\t\t\tif(s.hitCnt == 2){\n\t\t\t\t\t\t//split centipede\n\t\t\t\t\t\tscore += 5;\n\t\t\t\t\t\tm.setVisible(false);\n\t\t\t\t\t\tcentipede.remove(i);\n\t\t\t\t\t\t//mushrooms.add(new Mushroom(s.getX(), s.getY()));\n\t\t\t\t\t}else {\n\t\t\t\t\t\tm.setVisible(false);\n\t\t\t\t\t}\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\n\t\t //check if missile hits spider\n\t\t missiles = player.getMissiles();\n\t\t for(Missile m : missiles) {\n\t\t\t Rectangle mBound = m.getBounds();\n\t\t\t Rectangle spiderBound = spider.getBounds();\n\t\t\t if(mBound.intersects(spiderBound)) {\n\t\t\t\t spiderHitCnt += 1;\n\t\t\t\t if(spiderHitCnt == 2) {\n\t\t\t\t\t m.setVisible(false);\n\t\t\t\t\t spider.setVisible(false);\n\t\t\t\t\t score += 600;\n\t\t\t\t } else {\n\t\t\t\t\t score += 100;\n\t\t\t\t\t m.setVisible(false);\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\n\t\t //check if centipede hits mushroom\n\t\t for(Segment c : centipede) {\n\t\t\t Rectangle cB = c.getBounds();\n\t\t\t for(Mushroom m: mushrooms) {\n\t\t\t\t Rectangle mB = new Rectangle(m.getX(), m.getY() + 5, m.getWidth(), m.getHeight() - 10);\n\t\t\t\t mB.y += 3;\n\t\t\t\t if(cB.intersects(mB)) {\n\t\t\t\t\t//makes each segment to go downs\n\t\t\t\t\tc.y += 16;\n\t\t\t\t\tc.dx = -c.dx;\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\n\t\t //check if Centipede hits Player\n\t\t Rectangle playerBounds = player.getBounds();\n\t\t for(Segment s : centipede) {\n\t\t\t Rectangle sB = s.getBounds();\n\t\t\t if(playerBounds.intersects(sB)) {\n\t\t\t\t playerLives -= 1;\n\t\t\t\t playerHitCnt += 1;\n\t\t\t\t if(playerHitCnt > MAX_HIT_COUNT) {\n\t\t\t\t\t// System.out.println(playerLives+\" \"+ x);\n\t\t\t\t\t player.setVisible(false);\n\t\t\t\t\t inGame = false;\n\t\t\t\t }else {\n\t\t\t\t\t\tplayer.x = 707;\n\t\t\t\t\t\tplayer.y = 708;\n\t\t\t\t\t\tPoint location = getLocationOnScreen();\n\t\t\t\t\t\trobot.mouseMove(location.x + 250, location.y + 425);\n\t\t\t\t\t\tplayer = new Player(300, 400);\n\t\t\t\t\t\tregenMushrooms();\n\t\t\t\t\t}\n\t\t\t }\n\t\t }\n\n\t\t //check if Spider hits Player\n\t\t playerBounds = player.getBounds();\n\t\t Rectangle spiderBounds = spider.getBounds();\n\t\t if(spiderBounds.intersects(playerBounds)) {\n\t\t\tplayerLives -= 1;\n\t\t\tplayerHitCnt += 1;\n\t\t\tif(playerLives > MAX_HIT_COUNT) {\n\t\t\t\t//System.out.println(playerLives+\" \"+ y);\n\t\t\t\tplayer.setVisible(false);\n\t\t\t\tspider.setVisible(false);\n\t\t\t}else {\n\t\t\t\tregenMushrooms();\n\t\t\t\tcentipede.clear();\n\t\t\t\tcreateCentipede();\n\t\t\t\tplayer.x = 707;\n\t\t\t\tplayer.y = 708;\n\t\t\t\tPoint location = getLocationOnScreen();\n\t\t\t\trobot.mouseMove(location.x + 250, location.y + 425);\n\t\t\t\tplayer = new Player(300, 400);\n\t\t\t}\n\t\t}\n\t }",
"public void collisionDetection(){\r\n\t\tif( this.isActiv() ){\r\n\t\t\tif( this.isCollided() ){\r\n\t\t\t\tthis.onCollision();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public boolean playerCollide(Player player) {\n return RectF.intersects(new RectF(this.rect), player.getRect());\n }",
"private void checkSpikeCollisions() {\n\t\t\n\t\t//check collisions with up spikes\n\t\tint len = upSpikes.size();\n\t\tfor(int i = 0; i < len; i ++) {\n\t\t\tSpike spike = upSpikes.get(i);\n\t\t\t\n\t\t\tif(OverlapTester.overlapCircleRectangle(spike.bounds, player.bounds)) {\n\t\t\t\tplayerAlive = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//check collisions with down spikes\n\t\tlen = downSpikes.size();\n\t\tfor(int i = 0; i < len; i ++) {\n\t\t\tSpike spike = downSpikes.get(i);\n\t\t\t\n\t\t\tif(OverlapTester.overlapCircleRectangle(spike.bounds, player.bounds)) {\n\t\t\t\tplayerAlive = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//check collisions with right spikes\n\t\tlen = rightSpikes.size();\n\t\tfor(int i = 0; i < len; i ++) {\n\t\t\tSpike spike = rightSpikes.get(i);\n\t\t\t\n\t\t\tif(OverlapTester.overlapCircleRectangle(spike.bounds, player.bounds)) {\n\t\t\t\tplayerAlive = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//check collisions with left spikes\n\t\tlen = leftSpikes.size();\n\t\tfor(int i = 0; i < len; i ++) {\n\t\t\tSpike spike = leftSpikes.get(i);\n\t\t\t\n\t\t\tif(OverlapTester.overlapCircleRectangle(spike.bounds, player.bounds)) {\n\t\t\t\tplayerAlive = false;\n\t\t\t}\n\t\t}\n\t}",
"public void checkCollisions(){\n for(int i=bodyParts;i>0;i--){\n if((x[0]==x[i])&&(y[0]==y[i])){\n running=false;\n }\n }\n //head with left border\n if(x[0]<0){\n running=false;\n }\n //head with right border\n if(x[0]>screen_width){\n running=false;\n }\n //head with top border\n if(y[0]<0){\n running=false;\n }\n //head with bottom border\n if(y[0]>screen_height){\n running=false;\n }\n if(!running){\n timer.stop();\n }\n }",
"public boolean willBoxesCollide(Unit player, float deltaX, float deltaY) {\n\tScene currentScene = WorldMap.getInstance().getCurrentScene();\n\tfor (Obstacle obstacle : currentScene.getObstacleList()) {\n\t if (player.collisionBetweenBoxes(deltaX, deltaY, obstacle) && player.getPosZ() < obstacle.getProtrusionHeight())\n\t\treturn true;\n\t}\n\t \n\treturn false;\n }",
"private boolean checkCollision(int x, int y){\n\t\t\n\t\tboolean b = false;\n\t\tif(Math.abs((this.particles.get(x).getPosition().distance(this.particles.get(y).getPosition()))) < 0.5*Renderer.SCALE*(this.particles.get(x).getRadius() + this.particles.get(y).getRadius()))\n\t\t{\n\t\t\tb = true;\n\t\t}\n\t\treturn b;\n\t}",
"private boolean checkCollisions(int keycode) {\n \t\t\n \t\tint sX = super.getX()/Main.gridSize;\n \t\tint sY = super.getY()/Main.gridSize;\n \t\t\n \t\tif (World.currentMap().solidAtPoint(sX-1, sY) && keycode == Keyboard.KEY_A) {\n \t\t\treturn false;\n \t\t} else if (World.currentMap().solidAtPoint(sX+1, sY) && keycode == Keyboard.KEY_D) {\n \t\t\treturn false;\n \t\t} else if (World.currentMap().solidAtPoint(sX, sY-1) && keycode == Keyboard.KEY_W) {\n \t\t\treturn false;\n \t\t} else if (World.currentMap().solidAtPoint(sX, sY+1) && keycode == Keyboard.KEY_S) {\n \t\t\treturn false;\n \t\t}\n \t\treturn true;\n \t}",
"public void collision(){\r\n\t\tif(currX < 0 || currX > 1000-width || currY < 0 || currY > 700-height){\r\n\t\t\tinGame=false;\r\n\t\t}\r\n\t\t/*\r\n\t\tI start at 1 because tail[0] will constantly be taking the position\r\n\t\tof the snake's head, so if i start at 0, the game would end immediately.\r\n\t\t*/\r\n\t\tfor(int i=1; i < numOranges; i++){\r\n\t\t\tRectangle currOrangeRect = new Rectangle(tail[i].getXcoords(), tail[i].getYcoords(), OrangeModel.getWidth(), OrangeModel.getHeight());\r\n\t\t\tif(new Rectangle(currX, currY, width, height).intersects(currOrangeRect)){\r\n\t\t\t\tinGame=false;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public int check4CollisionWithYellow(Player player)\n {\n int number_of_collisions = 0;\n int x_cord = getMidPoint(player.getX_cordinate());\n int y_cord = getMidPoint(player.getY_cordinate());\n int yellowx1 = getMidPoint(ludo.getYellowPlayer1().x_cordinate);\n int yellowx2 = getMidPoint(ludo.getYellowPlayer2().x_cordinate);\n int yellowx3 = getMidPoint(ludo.getYellowPlayer3().x_cordinate);\n int yellowx4 = getMidPoint(ludo.getYellowPlayer4().x_cordinate);\n int yellowy1 = getMidPoint(ludo.getYellowPlayer1().y_cordinate);\n int yellowy2 = getMidPoint(ludo.getYellowPlayer2().y_cordinate);\n int yellowy3 = getMidPoint(ludo.getYellowPlayer3().y_cordinate);\n int yellowy4 = getMidPoint(ludo.getYellowPlayer4().y_cordinate);\n number_of_collisions += collisionDetection(x_cord, y_cord, yellowx1, yellowy1);\n number_of_collisions += collisionDetection(x_cord, y_cord, yellowx2, yellowy2);\n number_of_collisions += collisionDetection(x_cord, y_cord, yellowx3, yellowy3);\n number_of_collisions += collisionDetection(x_cord, y_cord, yellowx4, yellowy4);\n return number_of_collisions;\n\n }",
"public int checkCollisions() {\r\n\t\tArrayList<Comet> comets = Comet.getCometList();\r\n\r\n\t\tfor (int i = 0; i < comets.size(); i++) {\r\n\t\t\tComet tempComet = comets.get(i);\r\n\r\n\t\t\tif (getBounds().intersects(tempComet.getBounds())) {\r\n\t\t\t\tComet.removeComet(tempComet);\r\n\t\t\t\tcol++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn col;\r\n\t}",
"public boolean checkCollisions(Tuple camera) {\n\n\t\t// already exploded\n\t\tif(disabled > 0) {\n\t\t\treturn false;\n\t\t} // if\n\t\t\n\t\t// collision detected\n\t\tif(location.distance(camera) - size < SHIP_SIZE) {\n\t\t\tdisabled = 1;\n\t\t\treturn true;\n\t\t} // if\n\t\treturn false;\n\t}",
"private void laserCollisions() {\r\n\t\tGObject topLeft = getElementAt(laser.getX() - 1, laser.getY());\r\n\t\tGObject topRight = getElementAt(laser.getX() + laser.getWidth() + 1, laser.getY());\r\n\t\tGObject bottomLeft = getElementAt(laser.getX() - 1, laser.getY() + laser.getHeight());\r\n\t\tGObject bottomRight = getElementAt(laser.getX() + laser.getWidth() + 1, laser.getY() + laser.getHeight());\r\n\t\tif(topLeft == player || topRight == player || bottomLeft == player || bottomRight == player) {\r\n\t\t\tremove(laser);\r\n\t\t\tlaser = null;\r\n\t\t\thits++;\r\n\t\t\tloseLife();\r\n\t\t}\r\n\t}",
"@Override\n public boolean checkCollideSingle(GameObject gameObject, int x, int y) {\n if (!(gameObject instanceof Player) || !isAlive())\n return false;\n\n boolean result = super.withinRange(x, y);\n\n if (result) {\n if (prev + (hitInterval * 10) < System.currentTimeMillis()) {\n prev = System.currentTimeMillis();\n startHitTime = prev + 300;\n startHit = true;\n }\n }\n\n if (result) {\n if (startHitTime < System.currentTimeMillis() && startHit) {\n HUD.getInstance().removeHealth(getDamage());\n setStatus(PlayerStatus.FIGHTING);\n startHit = false;\n }\n }\n\n return result;\n }",
"private void checkForCollisionWithSelf() {\r\n if (isInSnake(snake[0].row,snake[0].column,true)) {\r\n gameOver();\r\n }\r\n }",
"public abstract boolean collide(int x, int y, int z, int dim, Entity entity);",
"@Override\n\tpublic void onCollision(Entity collidedEntity)\n\t{\n\t\t\n\t}",
"public void collision(Collidable collider);",
"int checkCollision(Tumbleweed tumbleweed) {\n int retVal = 0;\n if (collidesWith(tumbleweed, true)) {\n retVal = 1;\n // once the cowboy has collided with the tumbleweed,\n // that tumbleweed is done for now, so we call reset\n // which makes it invisible and ready to be reused.\n tumbleweed.reset();\n }\n return (retVal);\n }",
"public void checkHits() {\n\t\t// your code here\n\t\tfor (int i = 0; i < enemyX.length; i++) {\n\t\t\tif (distance((int)xI, (int)yI, enemyX[i], enemyY[i]) <= DIAM_ENEMY/2 + DIAM_LAUNCHER/2) {\n\t\t\t}\n\t\t}\n\t}",
"public String playerCollide(PlayerObject player)\n {\n String collision;\n\n Rect oldPos = player.getRectangle();\n\n\n if (Rect.intersects(rectangle, player.getRectangle()))\n {\n if (isTouchable && isMovable )\n {\n if (Constants.xVelocity > 0) {\n return \"right\";\n }\n\n if (Constants.xVelocity < 0) {\n return \"left\";\n }\n\n if (Constants.yVelocity > 0) {\n return \"bottom\";\n }\n\n if (Constants.yVelocity < 0) {\n return \"top\";\n }\n }\n\n if (isTouchable & !isMovable)\n {\n return \"0\";\n }\n\n }\n\n return \"null\";\n }",
"public void processPlayerCollision(ArrayList<Player> players) {\n for(Player p : players) {\n boolean collided = collision.generalCollision(this, p); //Test for general collision\n if(collided) //if general collision occurs\n {\n int collisionY = collision.testCollisionY(this, p); //change collision state for y axis\n int cornerCollision = collision.testCornerCollision(this, p);\n\n if(collisionY == Collision.COLLISION_TOP || cornerCollision == Collision.TOP_CORNERS) {\n if(p.getState() != DYING_STATE && getState() != DESTROYED_STATE) {\n setState(KOOPA_STUNNED);\n setVelocityX(0f);\n hitCounter++;\n shelled = true;\n if(pointsCollected == false) {\n game.scoreBoard.addScorePoints(100);\n pointsCollected = true;\n }\n }\n }\n else {\n if(getState() != DYING_STATE && getState() != DESTROYED_STATE && getState() != KOOPA_STUNNED && shelled == false && hitCounter == 0) //if enemy isn't dying or dead, kill player\n p.die();\n }\n }\n }\n }",
"private void collision() {\n\t\tfor(int i = 0; i < brownMeteors.length; i++) {\n\t\t\tif( distance(brownMeteors[i].getLayoutX() + ENTITIES_SIZE/2, brownMeteors[i].getLayoutY() - ENTITIES_SIZE/2, \n\t\t\t\t\tplayer.getLayoutX() + ENTITIES_SIZE/2, player.getLayoutY() - ENTITIES_SIZE/2) <= ENTITIES_SIZE) {\n\t\t\t\tsetNewElementPosition(brownMeteors[i]);\n\t\t\t\t\n\t\t\t\t//Update score -\n\t\t\t\tsc.score -= 3 * sc.collisionCounter; \n\t\t\t\tsc.collisionCounter++;\n\t\t\t}\n\t\t}\n\t\t//player vs grey Meteor\n\t\tfor(int i = 0; i < greyMeteors.length; i++) {\n\t\t\tif( distance(greyMeteors[i].getLayoutX() + ENTITIES_SIZE/2, greyMeteors[i].getLayoutY() - ENTITIES_SIZE/2, \n\t\t\t\t\tplayer.getLayoutX() + ENTITIES_SIZE/2, player.getLayoutY() - ENTITIES_SIZE/2) <= ENTITIES_SIZE) {\n\t\t\t\tsetNewElementPosition(greyMeteors[i]);\n\n\t\t\t\t//Update score -\n\t\t\t\tsc.score -= 3 * sc.collisionCounter;\n\t\t\t\tsc.collisionCounter++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//laser vs brown Meteor\n\t\tfor(int i = 0; i < lasers.size(); i++) {\n\t\t\tfor(int j = 0; j < brownMeteors.length; j++) { // 0 - 2 -> 3elem\n\t\t\t\tif(lasers.get(i).getBoundsInParent().intersects(brownMeteors[j].getBoundsInParent())) {\t// bounds of a node in it's parent coordinates\n\t\t\t\t\tsetNewElementPosition(brownMeteors[j]);\n\t\t\t\t\tgamePane.getChildren().remove(lasers.get(i));\n\t\t\t\t\tlasers.remove(i);\n\t\t\t\t\tSystem.out.println(lasers.size());\n\t\t\t\t\t\n\t\t\t\t\t//Update score +\n\t\t\t\t\tsc.score += 1; \n\t\t\t\t\tbreak; //kein fehler mehr durch index out of bounds verletzung\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t\t\n\t\tfor(int i = 0; i < lasers.size(); i++) {\n\t\t\tfor(int j = 0; j < greyMeteors.length; j++) { // 0 - 2 -> 3elem\n\t\t\t\tif(lasers.get(i).getBoundsInParent().intersects(greyMeteors[j].getBoundsInParent())) {\t// bounds of a node in it's parent coordinates\n\t\t\t\t\tsetNewElementPosition(greyMeteors[j]);\n\t\t\t\t\tgamePane.getChildren().remove(lasers.get(i));\n\t\t\t\t\tlasers.remove(i);\n\t\t\t\t\tSystem.out.println(lasers.size());\n\t\t\t\t\t\n\t\t\t\t\t//Update score +\n\t\t\t\t\tsc.score += 1; \n\t\t\t\t\tbreak; //kein fehler mehr durch index out of bounds verletzung\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\t\t\n\t}",
"private void collision(){\n\t\tboolean touched = false;\n\t\tboolean hit;\n\t\tint j =0;\n\t\twhile ( j< this.game_.getSaveBaby().size() && !touched){\n\t\t\tBabyBunnies b = this.game_.getSaveBaby().get(j);\n\t\t\ttouched = this.game_.getBunnyHood().getPosition().dst(b.getPosition())<=80;\n\t\t\thit = this.game_.getWolf().getPosition().dst(b.getPosition())<=80;\n\t\t\tif (touched){\n\t\t\t\tthis.game_.setBabySaved(b);\n\t\t\t}\n\t\t\tif (hit){\n\t\t\t\tthis.game_.wolfCatchBunnies(b);\n\t\t\t\t/**\n\t\t\t\t * Test de callback, retour vers l app android\n\t\t\t\t */\n\t\t\t\tif(this.game_.getScoreWolf()==3){\n\t\t\t\t\tif (this.gameCallBack != null) {\n\n this.gameCallBack.gameOverActivity(this.game_.getScoreBunny());\n\t\t\t\t\t\tthis.isGameOver=true;\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tGdx.app.log(\"MyGame\", \"To use this class you must implement MyGameCallback!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tj++;\n\t\t}\n\t}",
"public void checkCollisions(ArrayList<Collidable> other);",
"private Player checkIfEatsRedPlayer(Player player)\n {\n int x_cord = getMidPoint(player.x_cordinate);//player.x_cordinate;\n int y_cord = getMidPoint(player.y_cordinate);//player.y_cordinate;\n int redx1 = getMidPoint(getRed_player1().x_cordinate);\n int redx2 = getMidPoint(getRed_player2().x_cordinate);\n int redx3 = getMidPoint(getRed_player3().x_cordinate);\n int redx4 = getMidPoint(getRed_player4().x_cordinate);\n int redy1 = getMidPoint(getRed_player1().y_cordinate);\n int redy2 = getMidPoint(getRed_player2().y_cordinate);\n int redy3 = getMidPoint(getRed_player3().y_cordinate);\n int redy4 = getMidPoint(getRed_player4().y_cordinate);\n if (collisionDetection(x_cord, y_cord, redx1, redy1) == 1)\n {\n return getRed_player1();\n }\n else if (collisionDetection(x_cord, y_cord, redx2, redy2) == 1)\n {\n return getRed_player2();\n }\n else if (collisionDetection(x_cord, y_cord, redx3, redy3) == 1)\n {\n return getRed_player3();\n }\n else if (collisionDetection(x_cord, y_cord, redx4, redy4) == 1)\n {\n return getRed_player4();\n }\n else\n {\n return null;\n }\n }",
"@Override\n\tpublic void collide(Entity e) {\n\n\t}",
"public void unitCollision() {\n\t}",
"public boolean collision() {\n for (int i = 0; i < coins.length; i++) {\n // This checks to see if the coin in the coins\n // array is alive. If it isn't then we shouldn't\n // waste time detecting if it's colliding with\n // anything!\n if (coins[i].alive) {\n\n // Gets our players \"box\" coordinates. Using very simple\n // collision detection here.\n float playerX = player1.position.x + Player.radius;\n float playerY = player1.position.y + Player.radius;\n float playerW = player1.position.x + 1.2f;\n float playerH = player1.position.y + 1.2f;\n\n // Gets our coins box coordinates\n // we'll be comparing these 2 boxes\n // against each other every frame\n // to see if there is a collision or not\n float coinX = coins[i].position.x;\n float coinY = coins[i].position.y;\n float coinW = coins[i].position.x + 2.5f;\n float coinH = coins[i].position.y + 2.5f;\n\n // These are the checks to see if any parts\n // of our 2 collision boxes are touching each other\n // if they are then we print out that we've collided\n // and we set this coins alive variable to false.\n // We then return true that there has been a collision\n if (playerX < coinW &&\n playerW > coinX &&\n playerY < coinH &&\n playerH > coinY\n ) {\n// if (coinCounter != 1)\n// System.out.println(\"Player1 has \" + coinCounter + \" coins\");\n// else\n// System.out.println(\"Player1 has 1 coin\");\n coinCounter++;\n coins[i].alive = false;\n return true;\n }\n }\n\n }\n // if there hasn't been a collision then we return false\n // and the game carries on as normal.\n return false;\n }",
"void checkCol() {\n Player player = gm.getP();\n int widthPlayer = (int) player.getImg().getWidth();\n int heightPlayer = (int) player.getImg().getHeight();\n Bullet dummyBuullet = new Bullet();\n int widthBullet = (int) dummyBuullet.getImg().getWidth();\n int heightBullet = (int) dummyBuullet.getImg().getHeight();\n for (Bullet bullet : gm.getBulletList()) {\n // the bullet must be an enemy bullet\n if (bullet.isEnemyBullet() && bullet.isActive()) {\n // the condition when the bullet location is inside the rectangle of player\n if ( Math.abs( bullet.getX() - player.getX() ) < widthPlayer / 2\n && Math.abs( bullet.getY() - player.getY() ) < heightPlayer / 2 ) {\n // 1) destroy the bullet\n // 2) decrease the life of a player\n gm.getP().setHasShield(false);\n if(gm.getP().getCurDirection() == 0){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipLeft4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if(gm.getP().getCurDirection() == 1){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipRight4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n bullet.setActive(false);\n if(gm.getP().getHasShield() == false)player.decreaseLife();\n break;\n }\n }\n }\n // 2'nd case\n // the enemy is hit with player bullet\n for (Enemy enemy : gm.getEnemyList()) {\n if (enemy.isActive()) {\n int widthEnemy = (int) enemy.getImg().getWidth();\n int heightEnemy = (int) enemy.getImg().getHeight();\n for (Bullet bullet : gm.getBulletList()) {\n if (!bullet.isEnemyBullet() && bullet.isActive()) {\n // the condition when the player bullet location is inside the rectangle of enemy\n if (Math.abs(enemy.getX() - bullet.getX()) < (widthBullet / 2 + widthEnemy / 2)\n && Math.abs(enemy.getY() - bullet.getY()) < (heightBullet / 2 + heightEnemy / 2)) {\n // 1) destroy the player bullet\n // 2) destroy the enemy\n if (destroyedEnemy % 3 == 0 && destroyedEnemy != 0) onlyOnce = 0;\n destroyedEnemy++;\n gm.increaseScore();\n enemy.setActive(false);\n\n\n if(enemy.hTitanium()) {\n gm.getTitaniumList()[gm.getTitaniumIndex()].setX(enemy.getX());\n gm.getTitaniumList()[gm.getTitaniumIndex()].setY(enemy.getY());\n gm.getTitaniumList()[gm.getTitaniumIndex()].setActive(true);\n gm.increaseTitaniumIndex();\n }\n\n if(enemy.hBonus()) {\n \tgm.getBonusList()[gm.getBonusIndex()].setX(enemy.getX());\n \tgm.getBonusList()[gm.getBonusIndex()].setY(enemy.getY());\n \tgm.getBonusList()[gm.getBonusIndex()].setActive(true);\n \tgm.increaseBonusIndex();\n }\n bullet.setActive(false);\n break;\n }\n }\n }\n }\n }\n\n // 3'rd case\n // the player collided with enemy ship\n for (Enemy enemy : gm.getEnemyList()) {\n if (enemy.isActive()) {\n int widthEnemy = (int) enemy.getImg().getWidth();\n int heightEnemy = (int) enemy.getImg().getHeight();\n // the condition when the enemy rectangle is inside the rectangle of player\n if (Math.abs(enemy.getX() - player.getX()) < (widthPlayer / 2 + widthEnemy / 2)\n && Math.abs(enemy.getY() - player.getY()) < (heightPlayer / 2 + heightEnemy / 2)) {\n // 1) destroy the enemy\n // 2) decrease the player's life\n if(gm.getP().getHasShield() == false)player.decreaseLife();\n gm.getP().setHasShield(false);\n if(gm.getP().getCurDirection() == 0){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipLeft4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if(gm.getP().getCurDirection() == 1){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipRight4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n enemy.setActive(false);\n\n break;\n }\n }\n }\n\n for (Bonus bonus : gm.getBonusList()) {\n if (bonus.isActive()) {\n int widthBonus = (int) bonus.getImg().getWidth();\n int heightBonus = (int) bonus.getImg().getHeight();\n if (Math.abs(bonus.getX() - player.getX()) < (widthPlayer / 2 + widthBonus / 2)\n && Math.abs(bonus.getY() - player.getY()) < (heightPlayer / 2 + heightBonus / 2)) {\n bonus.setActive(false);\n if (bonus.getType() == 1) {\n if (player.getLives() < player.getMaxLives()) {\n player.setLives(player.getLives() + 1);\n }\n }\n else{\n superAttack = 1;\n }\n }\n }\n }\n\n for (Titanium titanium : gm.getTitaniumList()) {\n if (titanium.isActive()) {\n int widthBonus = (int) titanium.getImg().getWidth();\n int heightBonus = (int) titanium.getImg().getHeight();\n if (Math.abs(titanium.getX() - player.getX()) < (widthPlayer / 2 + widthBonus / 2)\n && Math.abs(titanium.getY() - player.getY()) < (heightPlayer / 2 + heightBonus / 2)) {\n titanium.setActive(false);\n gm.getP().increaseTitanium();\n }\n }\n }\n\n }",
"public int check4CollisionWithGreen(Player player)\n {\n int number_of_collisions = 0;\n int x_cord = getMidPoint(player.getX_cordinate());\n int y_cord = getMidPoint(player.getY_cordinate());\n int greenx1 = getMidPoint(ludo.getGreenPlayer1().x_cordinate);\n int greenx2 = getMidPoint(ludo.getGreenPlayer2().x_cordinate);\n int greenx3 = getMidPoint(ludo.getGreenPlayer3().x_cordinate);\n int greenx4 = getMidPoint(ludo.getGreenPlayer4().x_cordinate);\n int greeny1 = getMidPoint(ludo.getGreenPlayer1().y_cordinate);\n int greeny2 = getMidPoint(ludo.getGreenPlayer2().y_cordinate);\n int greeny3 = getMidPoint(ludo.getGreenPlayer3().y_cordinate);\n int greeny4 = getMidPoint(ludo.getGreenPlayer4().y_cordinate);\n number_of_collisions += collisionDetection(x_cord, y_cord, greenx1, greeny1);\n number_of_collisions += collisionDetection(x_cord, y_cord, greenx2, greeny2);\n number_of_collisions += collisionDetection(x_cord, y_cord, greenx3, greeny3);\n number_of_collisions += collisionDetection(x_cord, y_cord, greenx4, greeny4);\n return number_of_collisions;\n }",
"void collisionDetection() {\n\t\tfor (int a = 0; a < botsList.size(); a++) {\r\n\t\t\tfor (int b = 0; b < botsList.size(); b++) {\r\n\r\n\t\t\t\tif (a == b) // Avoid checking if bot hits itself.\r\n\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\ttime = System.currentTimeMillis();\r\n\t\t\t\tif (time - botsList.get(a).enemy_last_detected > botsList.get(a).enemy_detect_timeout) {\r\n\t\t\t\t\tfor (int i = 0; i > botsList.get(b).bullets.size(); i++) {\r\n\t\t\t\t\t\tif (colides(botsList.get(a), botsList.get(b).bullets.get(i)))\r\n\t\t\t\t\t\t\tbotsList.get(a).loseLife();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (botsList.get(0).detect.intersects(botsList.get(1).body.getFrame())) {\r\n\t\t\tbotsList.get(0).enemyDetected(botsList.get(1).body);\r\n\t\t\tbot_1_detect = false;\r\n\t\t\tbot_1_detected = System.currentTimeMillis();\r\n\t\t}\r\n\t\tif (System.currentTimeMillis() - bot_1_detected > bot_1_detect_timeout)\r\n\t\t\tbot_1_detect = true;\r\n\t\t// and now same for bot 2\r\n\t\tif (botsList.get(1).detect.intersects(botsList.get(0).body.getFrame())) {\r\n\t\t\tbotsList.get(1).enemyDetected(botsList.get(0).body);\r\n\t\t\tbot_2_detect = false;\r\n\t\t\tbot_2_detected = System.currentTimeMillis();\r\n\t\t}\r\n\t\tif (System.currentTimeMillis() - bot_2_detected > bot_2_detect_timeout)\r\n\t\t\tbot_2_detect = true;\r\n\r\n\t\t// Bullets collision\r\n\t\t// See if bot_n hits the other bot with a bullet\r\n\t\tfor (int mainB = 0; mainB < botsList.size(); mainB++) {\r\n\t\t\tfor (int secB = 0; secB < botsList.size(); secB++) {\r\n\r\n\t\t\t\tif (secB == mainB)\r\n\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\t// if player_2 collides with player 1's bullets\r\n\t\t\t\tfor (int i = 0; i < botsList.get(mainB).bullets.size(); i++) {\r\n\t\t\t\t\tif (colides(botsList.get(secB), botsList.get(mainB).bullets.get(i))) {\r\n\t\t\t\t\t\tSystem.out.println(\"Bot \" + 2 + \" intersects bullet nš \" + i);\r\n\t\t\t\t\t\tbotsList.get(mainB).bullets.remove(i);\r\n\t\t\t\t\t\tbotsList.get(secB).loseLife();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// if player_1 collides with player 2's bullets\r\n\t\tfor (int i = 0; i < botsList.get(1).bullets.size(); i++) {\r\n\t\t\tif (colides(botsList.get(0), botsList.get(1).bullets.get(i))) {\r\n\t\t\t\tSystem.out.println(\"Bot \" + 2 + \" intersects bullet nš \" + i);\r\n\t\t\t\tbotsList.get(1).bullets.remove(i);\r\n\t\t\t\tbotsList.get(0).loseLife();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"public void checkFirePlayer() {\n if (up > 0) {\r\n if (up == 1) {\r\n\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX(), fire.getY() - 50, 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n if (up == 2) {\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX(), fire.getY() - 50, 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX(), fire.getY() - 100, 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (down > 0) {\r\n if (down == 1) {\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX(), fire.getY() + 50, 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n }\r\n if (down == 2) {\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX(), fire.getY() + 50, 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX(), fire.getY() + 100, 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (left > 0) {\r\n if (left == 1) {\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX() - 50, fire.getY(), 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n }\r\n if (left == 2) {\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX() - 50, fire.getY(), 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX() - 100, fire.getY(), 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (right > 0) {\r\n if (right == 1) {\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX() + 50, fire.getY(), 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n }\r\n if (right == 2) {\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX() + 50, fire.getY(), 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX() + 100, fire.getY(), 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n }\r\n }\r\n\r\n //Controllo per il blocco di fuoco centrale\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX(), fire.getY(), 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n\r\n }\r\n\r\n }",
"private void recheckTileCollisions() {\n\t\tint len = regTiles.size();\n\t\tfor(int i = 0; i < len; i ++) {\n\t\t\tRegTile tile = regTiles.get(i);\n\t\t\t\n\t\t\ttry{\n\t\t\t\tif(OverlapTester.overlapRectangles(player.bounds, tile.bounds)) {\n\t\t\t\t\t//check-x cols and fix\n\t\t\t\t\tif(player.position.x > tile.position.x - tile.bounds.width/2 && player.position.x < tile.position.x + tile.bounds.width/2 && player.position.y < tile.position.y + tile.bounds.height/2 && player.position.y > tile.position.y - tile.bounds.height/2) {\n\t\t\t\t\t\tif(player.position.x < tile.position.x) {\n\t\t\t\t\t\t\tplayer.position.x = tile.position.x - 1;\n\t\t\t\t\t\t} else if(player.position.x > tile.position.x) {\n\t\t\t\t\t\t\tplayer.position.x = tile.position.x + 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t} catch (Exception e) {}\n\t\t}\n\t}",
"boolean collideWithCoins(Coin c);",
"public abstract void onCollision();",
"public void collide(){\n hp -= 10;\n resetPos();\n //canMove = false;\n }",
"public void checkCollision(Enemy enemy){\r\n if(collidingEntity!=null && collidingEntity!=enemy){\r\n return;\r\n }\r\n FloatRect x = enemy.getRect ();\r\n\r\n if (rect1==null || x==null){\r\n return;\r\n }\r\n\r\n FloatRect ins = rect1.intersection (x);\r\n\r\n if(ins!=null) {\r\n this.collidingEntity= enemy;\r\n collide=true;\r\n checkRightCollision (x);\r\n checkLeftCollision (x);\r\n bounce(enemy);\r\n } else {\r\n noCollision ();\r\n }\r\n }",
"public abstract void processCollisions();",
"private void checkEFlagCollisions() {\n\t\tint len = eflags.size();\n\t\t\n\t\tfor(int i = 0; i < len; i ++) {\n\t\t\tEndingFlag eflag = eflags.get(i);\n\t\t\t\n\t\t\tif(OverlapTester.overlapRectangles(eflag.bounds, player.bounds)) {\n\t\t\t\tplayer.position.set(2,3);\n\t\t\t\tLevelScreen.nextLevel = 1;\n\t\t\t}\n\t\t}\n\t}",
"private boolean isInDoor(Entity player){\n Sprite playerSprite= (Sprite) player.getComponent(Sprite.class);\n for(int i = 0; i<Main.colliderWallMap.size(); i++){\n if(Main.colliderWallMap.get(i).intersects(playerSprite.getValue().getX(), playerSprite.getValue().getY(),playerSprite.getValue().getWidth(), playerSprite.getValue().getHeight())){\n return false;\n }\n }\n\n return true;\n }",
"private boolean checkCollisions(int X, int Y){\n\t\tint hitBoxSizeX = 105;\n\t\tint hitBoxSizeY = 80;\n\t\tfor(int i=0;i<enemy_num;i++){\n\t\t\tif(X<enemy[i][0]+hitBoxSizeX && X>enemy[i][0]){\n\t\t\t\tif(Y<enemy[i][1]+hitBoxSizeY && Y>enemy[i][1]){\n\t\t\t\t\tremoveEnemy(i);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn(false);\n\t}",
"private boolean collides(GameObject gameObject1) {\n return collides(gameObject1, 0.5);\n }",
"void checkHandleContactWithNonPlayerCharacters() {\n if (this.doesAffectNonPlayers) {\n // boundary collision for non-player characters\n for (ACharacter curCharacter : this.mainSketch.getCurrentActiveLevelDrawableCollection().getCharactersList()) {\n if (this.contactWithCharacter(curCharacter)) {\n curCharacter.handleContactWithVerticalBoundary(this.startPoint.x);\n\n } else if (curCharacter instanceof ControllableEnemy) { // this DOES NOT have contact with character AND character is controllable\n ((ControllableEnemy) curCharacter).setAbleToMoveLeft(true);\n ((ControllableEnemy) curCharacter).setAbleToMoveRight(true);\n }\n }\n }\n }",
"public boolean collides (){\n if(shipX<=astX && shipY>=astY){\n if(Math.abs(shipX-astX)<=40 && Math.abs(shipY-astY)<=65){\n return true;\n }\n }\n else if(shipX>=astX && shipY>=astY){\n if(Math.abs(shipX-astX)<=75 && Math.abs(shipY-astY)<=65){\n return true;\n }\n }\n else if(shipX>=astX && shipY<=astY){\n if(Math.abs(shipX-astX)<=75 && Math.abs(shipY-astY)<=55){\n return true;\n }\n }\n else if(shipX<=astX && shipY<=astY){\n if(Math.abs(shipX-astX)<=60 && Math.abs(shipY-astY)<=55){\n return true;\n }\n }\n return false;\n }",
"public boolean isCollision(double x, double y) {\n return false;\n }",
"public void collision() {\n for (int i = 0; i < friendlyBullets.size(); i++) {\n\n friendlyBullets.get(i).tick();\n\n if (friendlyBullets.get(i).getImgY() <= 40) {\n friendlyBullets.get(i).bulletImage.delete();\n friendlyBullets.remove(friendlyBullets.get(i));\n i--;\n continue;\n }\n\n for (int j = 0; j < enemies.size(); j++) {\n\n if (friendlyBullets.get(i).getHitbox().intersects(enemies.get(j).getHitbox())) {\n\n friendlyBullets.get(i).hit();\n friendlyBullets.remove(friendlyBullets.get(i));\n i--;\n\n enemies.get(j).hit();\n\n if (enemies.get(j).getHp() <= 0) {\n enemies.remove(enemies.get(j));\n score.setScore(50);\n j--;\n }\n //end this loop\n j = enemies.size();\n }\n }\n\n }\n\n ///////////////////////////////////////////////////////////////////////////////////////\n\n\n // Enemy out of bounds\n for (int i = 0; i < enemies.size(); i++) {\n\n enemies.get(i).tick();\n\n // Out of bounds\n if (enemies.get(i).getEnemyImage().getY() >= 750) {\n enemies.get(i).getEnemyImage().delete();\n enemies.remove(enemies.get(i));\n\n if (enemies.size() > 1) {\n i--;\n }\n }\n }\n\n\n //////////////////////////////////////////////////////////////////////////\n\n //powerUps out of bounds and collision with spaceships\n for (int i = 0; i < powerUps.size(); i++) {\n\n powerUps.get(i).tick();\n\n if (powerUps.get(i).getImgY() >= 745) {\n\n powerUps.get(i).powerUpImage.delete();\n powerUps.remove(powerUps.get(i));\n\n i--;\n continue;\n }\n\n for (int j = 0; j < spaceShips.size(); j++) {\n\n if (spaceShips.get(j).getHitbox().intersects(powerUps.get(i).getHitbox())) {\n\n\n spaceShips.get(j).powerUp(powerUps.get(i).getPowerUpType());\n powerUps.get(i).hit();\n powerUps.remove(powerUps.get(i));\n\n //if it collides with one leave the for loop\n i--;\n j = spaceShips.size();\n }\n }\n\n }\n\n }",
"boolean collidesEnemy() {\n for(int i = 0; i < barrage.size(); i++) {\n // establish a rectangle for the laser\n Rectangle blaster = new Rectangle((int)barrage.get(i).getX(), (int)barrage.get(i).getY(), WIDTH, HEIGHT);\n \n // determine if the laser intersects an enemy\n for (int q = 0; q < fleet.size(); q++) {\n Rectangle enemy = new Rectangle((int)fleet.get(q).getX(), (int)fleet.get(q).getY(), 40, 36); \n \n // if blaster hits a ship, remove it\n if (blaster.intersects(enemy) && fleet.get(q).getCount() == 0) {\n fleet.get(q).hit = true; // set the enemy hit\n barrage.remove(barrage.get(i));\n score += 100; // add to score\n return true; // hit\n }\n }\n }\n return false; // miss\n }",
"public void checkWindCollision() {\n\n if (Intersector.overlaps(player.boundingCircle, wind1.boundingRectangle)) {\n if (!wind1.angry) {\n //Blow Right\n if (wind1.left && (player.x + AssetHandler.WIND_STRENGTH + player.circleRad < AssetHandler.SCREEN_WIDTH)) {\n player.x += AssetHandler.WIND_STRENGTH;\n } else if (!wind1.left && player.x - AssetHandler.WIND_STRENGTH - player.circleRad > 0) {\n player.x -= AssetHandler.WIND_STRENGTH;\n }\n } else {\n wind1.boundingRectangle.x = -wind1.boundingRectangle.width;\n player.paralyzed = true;\n player.paralyzedStart = TimeUtils.nanoTime();\n shake = true;\n }\n\n }\n\n\n //Check 2nd wind\n\n if (Intersector.overlaps(player.boundingCircle, wind2.boundingRectangle)) {\n if (!wind2.angry) {\n if (wind2.left && (player.x + AssetHandler.WIND_STRENGTH + player.circleRad < AssetHandler.SCREEN_WIDTH)) {\n player.x += AssetHandler.WIND_STRENGTH;\n } else if (!wind2.left && player.x - AssetHandler.WIND_STRENGTH - player.circleRad > 0) {\n player.x -= AssetHandler.WIND_STRENGTH;\n }\n } else {\n wind2.boundingRectangle.x = -wind2.boundingRectangle.width;\n player.paralyzed = true;\n player.paralyzedStart = TimeUtils.nanoTime();\n shake = true;\n }\n }\n\n\n //Check 3rd wind\n\n if (Intersector.overlaps(player.boundingCircle, wind3.boundingRectangle)) {\n if (!wind3.angry) {\n if (wind3.left && (player.x + AssetHandler.WIND_STRENGTH + player.circleRad < AssetHandler.SCREEN_WIDTH)) {\n player.x += AssetHandler.WIND_STRENGTH;\n } else if (!wind3.left && player.x - AssetHandler.WIND_STRENGTH - player.circleRad > 0) {\n player.x -= AssetHandler.WIND_STRENGTH;\n }\n } else {\n wind3.boundingRectangle.x = -wind3.boundingRectangle.width;\n player.paralyzed = true;\n player.paralyzedStart = TimeUtils.nanoTime();\n shake = true;\n }\n }\n\n\n /*\n * Check Wind Collision For Particle Effect Generation\n */\n\n\n //Check 1st Wind\n\n if(Intersector.overlaps(player.boundingCircle, wind1.spriteRectangle)) {\n if(!particle) {\n cloudParticle.setPosition(player.x, wind1.y + wind1.height/2);\n if(cloudParticle.isComplete())\n cloudParticle.reset();\n particle = true;\n } else {\n cloudParticle.setPosition(cloudParticle.getEmitters().first().getX(), wind1.y + wind1.height/2);\n }\n if(wind1.angry) {\n cloudParticle.setFlip(false, true);\n } else {\n cloudParticle.setFlip(false, false);\n }\n }\n\n\n //Check 2nd Wind\n\n if(Intersector.overlaps(player.boundingCircle, wind2.spriteRectangle)) {\n if(!particle) {\n cloudParticle.setPosition(player.x, wind2.y + wind2.height/2);\n if(cloudParticle.isComplete())\n cloudParticle.reset();\n particle = true;\n } else {\n cloudParticle.setPosition(cloudParticle.getEmitters().first().getX(), wind2.y + wind2.height/2);\n }\n if(wind2.angry) {\n cloudParticle.setFlip(false, true);\n } else {\n cloudParticle.setFlip(false, false);\n }\n }\n\n\n //Check 3rd Wind\n\n if(Intersector.overlaps(player.boundingCircle, wind3.spriteRectangle)) {\n if(!particle) {\n cloudParticle.setPosition(player.x, wind3.y + wind3.height/2);\n if(cloudParticle.isComplete())\n cloudParticle.reset();\n particle = true;\n } else {\n cloudParticle.setPosition(cloudParticle.getEmitters().first().getX(), wind3.y + wind3.height/2);\n }\n if(wind3.angry) {\n cloudParticle.setFlip(false, true);\n } else {\n cloudParticle.setFlip(false, false);\n }\n }\n\n }",
"public boolean collidesWith(ICollider other);",
"public abstract boolean collisionWith(CollisionObject obj);",
"public void checkCollision(Actor a) {\r\n\t\tif (a.equals(this))\r\n\t\t\treturn;\r\n\r\n\t\tPolygon otherPoly = a.basePoly;\r\n\t\tint distance = 1;\r\n\r\n\t\tif (otherPoly != null && basePoly != null) {\r\n\t\t\t// Calculate distance using the formula x^2 + y^2 = z^2\r\n\t\t\tint x = otherPoly.getBounds().x - basePoly.getBounds().x;\r\n\t\t\tint y = otherPoly.getBounds().y - basePoly.getBounds().y;\r\n\t\t\tdistance = (int) Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));\r\n\t\t}\r\n\t\tif (distance > 150 || a instanceof Particle)\r\n\t\t\treturn;\r\n\r\n\t\tfor (int i = 0; i < basePoly.npoints; i++) {\r\n\t\t\tif (otherPoly.contains(new Point(basePoly.xpoints[i],\r\n\t\t\t\t\tbasePoly.ypoints[i]))) {\r\n\t\t\t\tonCollision(a);\r\n\t\t\t\ta.onCollision(a);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void checkCollisions() {\n // First check collisions between bullets and other objects.\n this.game.getBullets().forEach(bullet -> {\n this.game.getAsteroids().forEach(asteroid -> { // Check collision with any of the asteroids.\n if (asteroid.collides(bullet)) {\n asteroid.destroy();\n bullet.destroy();\n }\n });\n for (Spaceship ship : game.getPlayers().values()) {\n\n if (ship.collides(bullet)) { // Check collision with ship.\n bullet.destroy();\n ship.destroy();\n }\n }\n });\n // Next check for collisions between asteroids and the spaceship.\n this.game.getAsteroids().forEach(asteroid -> {\n for (Spaceship ship : game.getPlayers().values()) {\n\n if (asteroid.collides(ship)) {\n ship.destroy();\n asteroid.destroy();\n }\n }\n if (KESSLER_SYNDROME) { // Only check for asteroid - asteroid collisions if we allow kessler syndrome.\n this.game.getAsteroids().forEach(secondAsteroid -> {\n if (!asteroid.equals(secondAsteroid) && asteroid.collides(secondAsteroid)) {\n asteroid.destroy();\n secondAsteroid.destroy();\n }\n });\n }\n });\n }",
"private void testCollisions () \n\t{\n\t r1.set(level.bird.position.x, level.bird.position.y,\n\t \t\t level.bird.bounds.width+.03f, level.bird.bounds.height);\n\t \n\t // Test collision: Pipes\n\t for (Pipe pipe : level.pipes) \n\t {\n\t \t r2.set(pipe.position.x, pipe.position.y, pipe.bounds.width,\n\t \t\t\t pipe.bounds.height);\n\t \t if (!r1.overlaps(r2)) continue;\n\t \t \n\t \t onCollisionBirdWithPipe(pipe);\n\t }\n\t \n\t // Test collision: GoldCoins\n\t for (GoldCoin goldcoin : level.goldcoins)\n\t {\n\t \t if (goldcoin.collected) continue;\n\t \t r2.set(goldcoin.position.x, goldcoin.position.y,\n\t \t\t\t goldcoin.bounds.width, goldcoin.bounds.height);\n\t \t if (!r1.overlaps(r2)) continue;\n\t \t onCollisionBirdWithGoldCoin(goldcoin);\n\t \t break;\n\t }\n\t \n\t // Test collision: Dp\n\t for (DoublePoint doublepoint : level.doublepoints) \n\t {\n\t \t if (doublepoint.collected) continue;\n\t \t r2.set(doublepoint.position.x, doublepoint.position.y,\n\t \t\t\t doublepoint.bounds.width, doublepoint.bounds.height);\n\t \t if (!r1.overlaps(r2)) continue;\n\t \t onCollisionBirdWithDoublePoint(doublepoint);\n\t \t break;\n\t }\n\t \n\t // Test collision: Goal\n\t for (Goal goal : level.goals)\n\t {\n\t \t r2.set(goal.position.x, goal.position.y,\n\t \t\t\t goal.bounds.width, goal.bounds.height);\n\t \t if (!r1.overlaps(r2)) continue;\n\t \t onCollisionBirdWithGoal(goal);\n\t \t break;\n\t }\n\t \n\t // Test collision: Brick\n\t for (Brick brick : level.bricks) \n\t {\n\t \t r2.set(brick.position.x, brick.position.y, brick.bounds.width,\n\t \t\t\t brick.bounds.height);\n\t \t if (!r1.overlaps(r2)) continue;\n\t \t \n\t \t onCollisionBirdWithBrick(brick);\n\t }\n\t }",
"@Override\r\n\tpublic boolean collides (Entity other)\r\n\t{\r\n\t\tif (other == owner || other instanceof Missile)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\treturn super.collides(other);\r\n\t}",
"private void checkBounds() {\n\t\t// checks to see if playerX is to the left of the left side of the display\n\t\tif (player.getX() < 0)\n\t\t\tplayer.setX(0);\n\t\t// checks to see if playerX is greater than the width of the display\n\t\tif (player.getX() > displayWidth - sprite.get(\"playerSprite\").getWidth())\n\t\t\tplayer.setX(displayWidth - sprite.get(\"playerSprite\").getWidth());\n\t\t// checks to see if playerY is lower than the bottom of the display\n\t\tif (player.getY() < 0)\n\t\t\tplayer.setY(0);\n\t\t// checks to see if playerY is greater than the height of the display\n\t\tif (player.getY() > displayHeight - sprite.get(\"playerSprite\").getHeight())\n\t\t\tplayer.setY(displayHeight - sprite.get(\"playerSprite\").getHeight());\n\t}",
"@Override\n\tpublic void doCollision(CollisionResult c) {\n\t\t\n\t}"
]
| [
"0.8160248",
"0.762636",
"0.76015884",
"0.7576864",
"0.7506796",
"0.74566835",
"0.7424482",
"0.7299193",
"0.72677505",
"0.7246881",
"0.72022504",
"0.7185579",
"0.7155843",
"0.71303546",
"0.71261644",
"0.70994556",
"0.7091946",
"0.70677495",
"0.706611",
"0.7065951",
"0.70506996",
"0.7033679",
"0.7032061",
"0.7015679",
"0.69994175",
"0.6986587",
"0.69577706",
"0.6935101",
"0.6929166",
"0.6897746",
"0.6882378",
"0.6881424",
"0.6871064",
"0.68553025",
"0.68520004",
"0.6848214",
"0.68465775",
"0.68450475",
"0.68402994",
"0.6836441",
"0.6827306",
"0.68242705",
"0.67875665",
"0.6774594",
"0.676813",
"0.6755244",
"0.67461234",
"0.67343986",
"0.67243",
"0.67181516",
"0.6716875",
"0.6714941",
"0.6700359",
"0.6697706",
"0.669579",
"0.6693264",
"0.6679906",
"0.6659796",
"0.6655372",
"0.6633053",
"0.6611",
"0.6590436",
"0.6589803",
"0.6579168",
"0.6573577",
"0.65607643",
"0.6556841",
"0.6549522",
"0.6545917",
"0.6528435",
"0.6524157",
"0.65201956",
"0.65086794",
"0.6508045",
"0.65002155",
"0.6498969",
"0.64989305",
"0.64807",
"0.64751107",
"0.64676136",
"0.6461572",
"0.64504653",
"0.64500535",
"0.64472866",
"0.644322",
"0.6442601",
"0.64328897",
"0.64299685",
"0.64295864",
"0.64169395",
"0.6416865",
"0.64038575",
"0.63927394",
"0.63922757",
"0.63922",
"0.63718915",
"0.63613147",
"0.63463014",
"0.63422334",
"0.633391",
"0.631663"
]
| 0.0 | -1 |
Picks the nearest collision BELOW the given rect and all available level components. | public final JARCollisionInfo getNearestYBelowRect( LibRect2D rect )
{
float nearestY = iLevelBoundY;
JARPlayer nearestPlayer = null;
JARBlock nearestBlock = null;
//consider player
if ( iPlayer != null )
{
Float blockY = iPlayer.iBlock.getRect().getYonCollisionXrect( rect, LibRect2D.Elevation.ENone );
if ( blockY != null )
{
//check if the block is UNDER the rect
if ( blockY.floatValue() < nearestY && blockY.floatValue() >= rect.iTop + rect.iHeight )
{
nearestY = blockY.floatValue();
nearestPlayer = iPlayer;
nearestBlock = iPlayer.iBlock;
}
}
}
//consider blocks
if ( iWalls != null )
{
for ( int i = 0; i < iWalls.length; ++i )
{
//if ( iWalls[ i ].block.iPassThrough == PassThrough.ENo )
{
//check elevation below player
Float blockY = iWalls[ i ].iBlock.getRect().getYonCollisionXrect( rect, iWalls[ i ].iBlock.getElevation() );
if ( blockY != null )
{
//check if the block is UNDER the rect
if ( blockY.floatValue() < nearestY && ( blockY.floatValue() >= rect.iTop + rect.iHeight ) )
{
nearestY = blockY.floatValue();
nearestPlayer = null;
nearestBlock = iWalls[ i ].iBlock;
}
}
}
}
}
//consider enemies
if ( iEnemies != null )
{
for ( int i = 0; i < iEnemies.length; ++i )
{
if ( iEnemies[ i ].isAlive() )
{
Float blockY = iEnemies[ i ].iBlock.getRect().getYonCollisionXrect( rect, LibRect2D.Elevation.ENone );
if ( blockY != null )
{
//check if the block is UNDER the rect
if ( blockY.floatValue() < nearestY && blockY.floatValue() >= rect.iTop + rect.iHeight )
{
nearestY = blockY.floatValue();
nearestPlayer = iEnemies[ i ];
nearestBlock = iEnemies[ i ].iBlock;
}
}
}
}
}
//JARDebug.bugfix.info( "Get Y below: [" + rect.iTop + "][" + ( nearestBlock != null ? nearestBlock.iRect.iTop : "null" ) + "]" );
JARCollisionInfo ret = new JARCollisionInfo( nearestY, nearestPlayer, nearestBlock );
return ret;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Rectangle getCollisionBox();",
"Rectangle getCollisionRectangle();",
"Rectangle getCollisionRectangle();",
"public Iterable<Point2D> range(RectHV rect) {\n\t\tif (rect == null) {\n\t\t\tthrow new NullPointerException();\n\t\t}\n\t\tQueue<Point2D> queue = new Queue<Point2D>();\n\t\tStack<Node> stack = new Stack<>();\n\t\tstack.push(root);\n\t\twhile (!stack.isEmpty()) {\n\t\t\tNode nCur = stack.pop();\n\t\t\tPoint2D pCur = nCur.point;\n\t\t\tif (rect.contains(pCur)) {\n\t\t\t\tqueue.enqueue(pCur);\n\t\t\t\tif (nCur.right != null) {\n\t\t\t\t\tstack.push(nCur.right);\n\t\t\t\t}\n\t\t\t\tif (nCur.left != null) {\n\t\t\t\t\tstack.push(nCur.left);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (nCur.bDirection == USING_X) {\n\t\t\t\t\tif (nCur.x < rect.xmin() && nCur.right != null) {\n\t\t\t\t\t\tstack.push(nCur.right);\n\t\t\t\t\t} else if (nCur.x > rect.xmax() && nCur.left != null) {\n\t\t\t\t\t\tstack.push(nCur.left);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (nCur.right != null) {\n\t\t\t\t\t\t\tstack.push(nCur.right);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (nCur.left != null) {\n\t\t\t\t\t\t\tstack.push(nCur.left);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (nCur.y < rect.ymin() && nCur.right != null) {\n\t\t\t\t\t\tstack.push(nCur.right);\n\t\t\t\t\t} else if (nCur.y > rect.ymax() && nCur.left != null) {\n\t\t\t\t\t\tstack.push(nCur.left);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (nCur.right != null) {\n\t\t\t\t\t\t\tstack.push(nCur.right);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (nCur.left != null) {\n\t\t\t\t\t\t\tstack.push(nCur.left);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn queue;\n\t}",
"private Hit getLevelHit(final Ray r, final TestCounter c) {\n double minDist = Double.POSITIVE_INFINITY;\n Triangle curBest = null;\n for(final Triangle t : tri) {\n final double dist = t.hit(r, c);\n if(r.isValidDistance(dist) && dist < minDist) {\n minDist = dist;\n curBest = t;\n }\n }\n return new Hit(r, curBest, minDist, c);\n }",
"public Iterable<Point2D> range(RectHV rect) {\n //rect\n Queue<Point2D> range = new Queue<Point2D>();\n \n for (Point2D p: bst.keys()) {\n if (rect.contains(p)) {\n range.enqueue(p);\n }\n }\n return range; \n }",
"private static Rect getCollisionBounds(Rect rect1, Rect rect2) {\n gcbleft = Math.max(rect1.left, rect2.left);\n gcbtop = Math.max(rect1.top, rect2.top);\n gcbright = Math.min(rect1.right, rect2.right);\n gcbbottom = Math.min(rect1.bottom, rect2.bottom);\n gcbbounds.set(gcbleft, gcbtop, gcbright, gcbbottom);\n return gcbbounds;\n }",
"private E3DCollision getClosestCollisionWithWorld(IE3DCollisionDetector collisionDetector, IE3DCollisionDetectableObject sourceObject, E3DVector3F sourceStartPos, E3DVector3F sourceEndPos, E3DWorld world)\r\n\t{\r\n\t\tArrayList triangleList = null;\r\n E3DSector sector = null;\r\n\t\tE3DTriangle triangle = null;\r\n\t\tE3DCollision partialCollision = null;\r\n E3DCollision closestCollision = null;\r\n\t\t\r\n\t\tsector = sourceObject.getSector(); //only check collision with the sector the actor is in\r\n\t\t\t\r\n\t\ttriangleList = sector.getTriangleList(); //TODO: sort by how likely it is\r\n\t\t\r\n\t\tfor(int i=0; i<triangleList.size(); i++)\r\n\t\t{\r\n\t\t\ttriangle = (E3DTriangle)triangleList.get(i);\r\n\t\t\t\r\n partialCollision = collisionDetector.checkForCollisionWithTriangle(sourceObject, sourceStartPos, sourceEndPos, triangle);\r\n\t\t\tif(partialCollision != null)\r\n\t\t\t{\r\n partialCollision.setCollideeBoundingObject(triangle);\r\n \r\n\t\t\t\tif(closestCollision == null)\r\n\t\t\t\t\tclosestCollision = partialCollision;\r\n\t\t\t\telse //see if its closer than the previous collision.. We want the closest collision\r\n\t\t\t\t{\r\n\t\t\t\t\tif(Math.abs(partialCollision.getIntersectionPt().subtract(sourceStartPos).getLengthSquared()) < \r\n\t\t\t\t\t Math.abs(closestCollision.getIntersectionPt().subtract(sourceStartPos).getLengthSquared()))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tclosestCollision = partialCollision;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n \r\n if(closestCollision != null)\r\n {\r\n closestCollision.setCollideeObject(null); //it did run into the world, but the world can't be notified\r\n closestCollision.setCollisionSector(sector);\r\n closestCollision.setCollisionWorld(world);\r\n\r\n return closestCollision;\r\n }\r\n else\r\n return null;\r\n\t}",
"public CollisionInfo searchClosetCollision(List arr, Line l) {\r\n Point closetP = l.closestIntersectionToStartOfLine(((Collidable) arr.get(0)).getCollisionRectangle());\r\n Point tempP;\r\n int counter = 0;\r\n double minDist = closetP.distance(l.start());\r\n double tempDist;\r\n for (int i = 0; i < arr.size(); i++) {\r\n tempP = l.closestIntersectionToStartOfLine(((Collidable) arr.get(i)).getCollisionRectangle());\r\n tempDist = tempP.distance(l.start());\r\n // If the collision object is closet than the prev collision object.\r\n if (minDist > tempDist) {\r\n closetP = tempP;\r\n counter++;\r\n }\r\n }\r\n return new CollisionInfo(closetP, (Collidable) arr.get(counter));\r\n }",
"private GObject getCollidingObject() {\n \tdouble x1 = ball.getX();\n \tdouble y1 = ball.getY();\n \tdouble x2 = x1 + BALL_RADIUS * 2;\n \tdouble y2 = y1 + BALL_RADIUS * 2;\n \n \tif (getElementAt(x1, y1) != null) return getElementAt(x1, y1);\n \tif (getElementAt(x1, y2) != null) return getElementAt(x1, y2);\n \tif (getElementAt(x2, y1) != null) return getElementAt(x2, y1);\n \tif (getElementAt(x2, y2) != null) return getElementAt(x2, y2);\n \n \treturn null;\n }",
"@NotNull\n private RangeInfo findNearestRangeInfo() {\n final int caretPosition = myView.getCaretPosition();\n\n for (final RangeInfo range : myRangeInfos) {\n if (range.isWithin(caretPosition)) {\n return range;\n }\n if (range.getFrom() > caretPosition) {\n return range; // Ranges are sorted, so we are on the next range. Take it, if caret is not within range\n }\n }\n\n return myRangeInfos.last();\n }",
"private Point2D nearest(Node x, Point2D p, RectHV rect, boolean test) {\n\t\tPoint2D incumbent = x.point;\n\t\tPoint2D challenger;\n\t\tRectHV leftRect, rightRect;\n\t\tdouble distance = incumbent.distanceTo(p);\n\t\t\n\t\tif (test) {\n\t\t\tleftRect = new RectHV(rect.xmin(), rect.ymin(), x.point.x(), rect.ymax());\n\t\t\trightRect = new RectHV(x.point.x(), rect.ymin(), rect.xmax(), rect.ymax());\n\t\t} else {\n\t\t\tleftRect = new RectHV(rect.xmin(), rect.ymin(), rect.xmax(), x.point.y());\n\t\t\trightRect = new RectHV(rect.xmin(), x.point.y(), rect.xmax(), rect.ymax());\n\t\t}\n\n\t\tdouble comp = comparePoints(x, p, test);\n\t\tif (comp <= 0) {\n\t\t\tif (x.left != null) {\n\t\t\t\tif ((challenger = nearest(x.left, p, leftRect, !test)).distanceTo(p) < distance) {\n\t\t\t\t\tincumbent = challenger;\n\t\t\t\t\tdistance = challenger.distanceTo(p);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (x.right != null) {\n\t\t\t\tif (rightRect.distanceTo(p) < distance) {\n\t\t\t\t\tif ((challenger = nearest(x.right, p, rightRect, !test)).distanceTo(p) < distance) {\n\t\t\t\t\t\tincumbent = challenger;\n\t\t\t\t\t\tdistance = challenger.distanceTo(p);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\telse {\n\t\t\tif (x.right != null) {\n\t\t\t\tif ((challenger = nearest(x.right, p, rightRect, !test)).distanceTo(p) < distance) {\n\t\t\t\t\tincumbent = challenger;\n\t\t\t\t\tdistance = challenger.distanceTo(p);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (x.left != null) {\n\t\t\t\tif (leftRect.distanceTo(p) < distance) {\n\t\t\t\t\tif ((challenger = nearest(x.left, p, leftRect, !test)).distanceTo(p) < distance) {\n\t\t\t\t\t\tincumbent = challenger;\n\t\t\t\t\t\tdistance = challenger.distanceTo(p);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn incumbent;\n\t}",
"private void searchForNearest(KdNode kdNode, Point2D p, RectHV rectangle) {\n int comparison;\n // 2 rectangles that will store the coordinates of the rectangles that are delimited by kdNode's children,\n // used in order to calculate the distance to them and see if it's worth looking down the path inside them as well\n // (i.e. if the distance from point p to the rectangle is less than the distance to an already established nearest)\n RectHV rectLeftBelow, rectRightAbove;\n\n if (kdNode.point.equals(p)) {\n // if the point we're looking at actually equals the query point, we return here,\n // as we can no longer find a distance lower than 0\n nearest = kdNode.point;\n return;\n }\n\n // if the point in the current node is closer to the searched node, we update nearest\n if (p.distanceSquaredTo(kdNode.point) < p.distanceSquaredTo(nearest))\n nearest = kdNode.point;\n\n if (kdNode.dimension) { // if this KdNode is vertical (root.dimension == true), then we have left/right rectangles\n rectLeftBelow = new RectHV(rectangle.xmin(), rectangle.ymin(),\n kdNode.point.x(), rectangle.ymax());\n rectRightAbove = new RectHV(kdNode.point.x(), rectangle.ymin(),\n rectangle.xmax(), rectangle.ymax());\n }\n else { // if this KdNode is horizontal (root.dimension == false), then we have below/above rectangles\n rectLeftBelow = new RectHV(rectangle.xmin(), rectangle.ymin(),\n rectangle.xmax(), kdNode.point.y());\n rectRightAbove = new RectHV(rectangle.xmin(), kdNode.point.y(),\n rectangle.xmax(), rectangle.ymax());\n }\n // we look at which rectangle is nearest to the query point, in order to go down that path first\n comparison = Double.compare(rectLeftBelow.distanceSquaredTo(p),\n rectRightAbove.distanceSquaredTo(p));\n\n if (comparison < 0) { // if distance to left/lower rectangle is lower than to right/upper\n if (kdNode.left != null) {\n if (rectLeftBelow.distanceSquaredTo(p) < p.distanceSquaredTo(nearest)) {\n searchForNearest(kdNode.left, p, rectLeftBelow);\n }\n // if it's larger than to nearest, the distance to the other\n // rectangle will certainly be even larger, so we return here\n else return;\n }\n if (kdNode.right != null) {\n if (rectRightAbove.distanceSquaredTo(p) < p.distanceSquaredTo(nearest)) {\n searchForNearest(kdNode.right, p, rectRightAbove);\n }\n // else return; // return statement not needed, if (comparison < 0) statement terminates here anyway\n }\n }\n else { // comparison < 0, the opposite situation holds: distance to right/upper rectangle is lower than to left/lower\n if (kdNode.right != null) {\n if (rectRightAbove.distanceSquaredTo(p) < p.distanceSquaredTo(nearest)) {\n searchForNearest(kdNode.right, p, rectRightAbove);\n }\n else return;\n }\n if (kdNode.left != null) {\n if (rectLeftBelow.distanceSquaredTo(p) < p.distanceSquaredTo(nearest)) {\n searchForNearest(kdNode.left, p, rectLeftBelow);\n }\n }\n\n }\n }",
"public Iterable<Point2D> range(RectHV rect) {\n if (rect == null) throw new IllegalArgumentException(\"range: RectHV is null\");\n Queue<Point2D> q = new Queue<>();\n rangeSearch(root, rect, q);\n return q;\n }",
"public CollisionArea_SingleCirc getOptimalCollisionArea();",
"public Iterable<Point2D> range(RectHV rect) {\n if (isEmpty())\n return null;\n IntersectingPoints ip = new IntersectingPoints(rect);\n return new KdTreeIterable(ip.intersecting, ip.lenIntersecting);\n }",
"Rectangle getBoundingBox(Rectangle rect);",
"public abstract Cell getOverlappedCell(Rectangle rect);",
"private E3DCollision getClosestCollisionWithCollisionDetectableObject(IE3DCollisionDetector collisionDetector, boolean useBoundingObjectsIfPossible,\r\n boolean notifyAllObjectsCollided, IE3DCollisionDetectableObject sourceObject, \r\n E3DVector3F sourceStartPos, E3DVector3F sourceEndPos, IE3DCollisionDetectableObject possibleCollidee, E3DWorld world)\r\n {\r\n E3DCollision collision = null, closestCollision = null;\r\n if(useBoundingObjectsIfPossible && possibleCollidee.getBoundingObject() != null)\r\n {\r\n collision = collisionDetector.checkForCollisionWithBoundingObject(sourceObject, sourceStartPos, sourceEndPos, possibleCollidee.getBoundingObject());\r\n if(collision != null)\r\n {\r\n collision.setCollideeObject(possibleCollidee); \r\n collision.setCollideeBoundingObject(possibleCollidee.getBoundingObject());\r\n collision.setCollisionSector(possibleCollidee.getSector());\r\n collision.setCollisionWorld(world);\r\n }\r\n }\r\n else\r\n {\r\n ArrayList triangleList = possibleCollidee.getTriangleList();\r\n E3DTriangle triangle = null;\r\n for(int i=0; i<triangleList.size(); i++)\r\n {\r\n triangle = (E3DTriangle)triangleList.get(i);\r\n \r\n //put the detectable's triangles into worldspace coords\r\n scratchTriangle.setVertexPosA(possibleCollidee.getOrientation().getWorldVector(triangle.getVertexPosA()));\r\n scratchTriangle.setVertexPosB(possibleCollidee.getOrientation().getWorldVector(triangle.getVertexPosB()));\r\n scratchTriangle.setVertexPosC(possibleCollidee.getOrientation().getWorldVector(triangle.getVertexPosC()));\r\n \r\n collision = collisionDetector.checkForCollisionWithTriangle(sourceObject, sourceStartPos, sourceEndPos, scratchTriangle);\r\n if(collision != null)\r\n {\r\n collision.setCollideeObject(possibleCollidee); \r\n collision.setCollideeBoundingObject(triangle);\r\n collision.setCollisionSector(possibleCollidee.getSector());\r\n collision.setCollisionWorld(world);\r\n\r\n if(closestCollision == null)\r\n closestCollision = collision;\r\n else\r\n {\r\n if(Math.abs(collision.getIntersectionPt().subtract(sourceStartPos).getLengthSquared()) < \r\n Math.abs(closestCollision.getIntersectionPt().subtract(sourceStartPos).getLengthSquared()))\r\n closestCollision = collision;\r\n }\r\n }\r\n }\r\n collision = closestCollision;\r\n }\r\n \r\n //Only notify one time if necessary for the closest collision (before it was notifying for every triangle it hit, UGH!)\r\n if(collision != null && notifyAllObjectsCollided && collision.getCollideeObject() != null) //notify the object this one collided with.\r\n notifyCollidedObject(sourceObject, collision);\r\n\r\n return collision;\r\n }",
"public Rectangle getBoundsBigger() {\n return new Rectangle(x-32,y-32,128,128);\n }",
"public void checkTopCollision(FloatRect x){\r\n if((int)rect1.top<= (int)x.top-x.height ){\r\n collide=true;\r\n collidedTop=true;\r\n }\r\n }",
"@Override\n\tpublic Rect getHitbox() \n\t{\n\t\treturn _bounds;\n\t}",
"public Enemy lowestEnemyInCol(List<Enemy> col) {\r\n if (col.isEmpty()) {\r\n return null;\r\n }\r\n Enemy enemy = col.get(0);\r\n for (Enemy e : col) {\r\n if (e.getCollisionRectangle().getBoundaries().getLowY()\r\n > enemy.getCollisionRectangle().getBoundaries().getLowY()) {\r\n enemy = e;\r\n }\r\n }\r\n return enemy;\r\n }",
"public Rect hitBox(){\n return new Rect((int)getX(), (int)getY(), (int)getX() + spriteWidth, (int)getY() + spriteHeight);\n }",
"private RectHV rectLb() {\n\n if (!horizontal) {\n return new RectHV(\n rect.xmin(),\n rect.ymin(),\n p.x(),\n rect.ymax()\n );\n\n\n } else {\n return new RectHV(\n rect.xmin(),\n rect.ymin(),\n rect.xmax(),\n p.y()\n );\n }\n }",
"private void range(Node h, RectHV nrect, RectHV rect, TreeSet<Point2D> rangeSet) {\n \tif (h == null) {\r\n \t\treturn;\r\n \t}\r\n\r\n \tif (rect.intersects(nrect)) {\r\n \t\tif(rect.contains(h.p)) {\r\n \t\t\trangeSet.add(h.p);\r\n }\r\n \t\trange(h.lb, leftRect(nrect, h), rect, rangeSet);\r\n \t\trange(h.rt, rightRect(nrect, h), rect, rangeSet);\r\n \t}\r\n }",
"private RectHV leftRect(RectHV rect, Node h) {\n\t\tif (h.isVertical) { // left rect\r\n\t\t\treturn new RectHV(rect.xmin(), rect.ymin(), h.p.x(), rect.ymax());\r\n\t\t} else { //bottom rect\r\n\t\t\treturn new RectHV(rect.xmin(), rect.ymin(), rect.xmax(), h.p.y());\r\n\t\t}\r\n\t}",
"public Velocity hit(Ball hitter, Point collisionPoint, Velocity currentVelocity) {\n // Checking a collision with the corners.\n if (collisionPoint.equals(this.rectangle.getDownerLeft())\n || collisionPoint.equals(this.rectangle.getDownerRight())\n || collisionPoint.equals(this.rectangle.getUpperLeft())\n || collisionPoint.equals(this.rectangle.getUpperRight())) {\n this.notifyCounter();\n this.notifyHit(hitter);\n return new Velocity(currentVelocity.getDx() * -1, currentVelocity.getDy() * -1);\n }\n // checking collisions with the block's edges.\n if (this.rectangle.getDownerEdge().isOnLine(collisionPoint)) {\n this.notifyCounter();\n this.notifyHit(hitter);\n return new Velocity(currentVelocity.getDx(), currentVelocity.getDy() * -1);\n }\n if (this.rectangle.getLeftEdge().isOnLine(collisionPoint)) {\n this.notifyCounter();\n this.notifyHit(hitter);\n return new Velocity(currentVelocity.getDx() * -1, currentVelocity.getDy());\n }\n if (this.rectangle.getUpperEdge().isOnLine(collisionPoint)) {\n this.notifyCounter();\n this.notifyHit(hitter);\n return new Velocity(currentVelocity.getDx(), currentVelocity.getDy() * -1);\n }\n if (this.rectangle.getRightEdge().isOnLine(collisionPoint)) {\n this.notifyCounter();\n this.notifyHit(hitter);\n return new Velocity(currentVelocity.getDx() * -1, currentVelocity.getDy());\n }\n return currentVelocity; // default.\n }",
"@Override\n public Rectangle intersects( Rectangle boundingBox )\n {\n return null;\n }",
"public int getCollisionType(int x, int y) {\t\r\n\t\tbyte map_no = l();\r\n\t\tint index = x*15+y;\r\n\t\tif (index >= left_map_width*15) {\r\n\t\t\tmap_no = r();\r\n\t\t\tindex -= left_map_width*15;\r\n\t\t}\r\n\t\t//If it's out of bounds, it is not traversable.\r\n\t\tif(x < 0 || x >= levelWidth() ||\r\n\t\t y < 0 || y >= levelHeight() ||\r\n\t\t index >= collision[map_no].length )\r\n\t\t\treturn 1;\r\n\t\treturn collision[map_no][index];\r\n\t}",
"public void updateOptimalCollisionArea();",
"public Rectangle getCollider() {\n return collider;\n }",
"private PointDist findNearest(Node curr, RectHV rect, PointDist minP, boolean Isx) {\n double currDist;\n PointDist p1;\n PointDist p2;\n // double currDist = findNearP.distanceSquaredTo(curr.point);\n /*\n if (currDist < pointDist.dist)\n minP = new PointDist(curr.point, currDist);\n else\n minP = pointDist;\n\n */\n if (Isx) {\n if (curr.left != null) {\n RectHV leftRect = new RectHV(rect.xmin(), rect.ymin(), curr.point.x(), rect.ymax());\n currDist = findNearP.distanceSquaredTo(curr.left.point);\n if (currDist < minP.dist)\n minP = new PointDist(curr.left.point, currDist);\n if (minP.dist > leftRect.distanceSquaredTo(findNearP)) {\n p1 = findNearest(curr.left, leftRect, minP, false);\n if (p1 != null)\n if (p1.dist < minP.dist)\n minP = p1;\n }\n }\n if (curr.right != null) {\n RectHV rightRect = new RectHV(curr.point.x(), rect.ymin(), rect.xmax(), rect.ymax());\n currDist = findNearP.distanceSquaredTo(curr.right.point);\n if (currDist < minP.dist)\n minP = new PointDist(curr.right.point, currDist);\n if (minP.dist > rightRect.distanceSquaredTo(findNearP)) {\n p2 = findNearest(curr.right, rightRect, minP, false);\n if (p2 != null)\n if (p2.dist < minP.dist)\n minP = p2;\n }\n }\n }\n else {\n if (curr.left != null) {\n RectHV leftRect = new RectHV(rect.xmin(), rect.ymin(), rect.xmax(), curr.point.y());\n currDist = findNearP.distanceSquaredTo(curr.left.point);\n if (currDist < minP.dist)\n minP = new PointDist(curr.left.point, currDist);\n if (minP.dist > leftRect.distanceSquaredTo(findNearP)) {\n p1 = findNearest(curr.left, leftRect, minP, true);\n if (p1 != null)\n if (p1.dist < minP.dist)\n minP = p1;\n }\n }\n if (curr.right != null) {\n RectHV rightRect = new RectHV(rect.xmin(), curr.point.y(), rect.xmax(), rect.ymax());\n currDist = findNearP.distanceSquaredTo(curr.right.point);\n if (currDist < minP.dist)\n minP = new PointDist(curr.right.point, currDist);\n if (minP.dist > rightRect.distanceSquaredTo(findNearP)) {\n p2 = findNearest(curr.right, rightRect, minP, true);\n if (p2 != null)\n if (p2.dist < minP.dist)\n minP = p2;\n }\n }\n }\n return minP;\n }",
"private void testCollisions () \n\t{\n\t r1.set(level.bird.position.x, level.bird.position.y,\n\t \t\t level.bird.bounds.width+.03f, level.bird.bounds.height);\n\t \n\t // Test collision: Pipes\n\t for (Pipe pipe : level.pipes) \n\t {\n\t \t r2.set(pipe.position.x, pipe.position.y, pipe.bounds.width,\n\t \t\t\t pipe.bounds.height);\n\t \t if (!r1.overlaps(r2)) continue;\n\t \t \n\t \t onCollisionBirdWithPipe(pipe);\n\t }\n\t \n\t // Test collision: GoldCoins\n\t for (GoldCoin goldcoin : level.goldcoins)\n\t {\n\t \t if (goldcoin.collected) continue;\n\t \t r2.set(goldcoin.position.x, goldcoin.position.y,\n\t \t\t\t goldcoin.bounds.width, goldcoin.bounds.height);\n\t \t if (!r1.overlaps(r2)) continue;\n\t \t onCollisionBirdWithGoldCoin(goldcoin);\n\t \t break;\n\t }\n\t \n\t // Test collision: Dp\n\t for (DoublePoint doublepoint : level.doublepoints) \n\t {\n\t \t if (doublepoint.collected) continue;\n\t \t r2.set(doublepoint.position.x, doublepoint.position.y,\n\t \t\t\t doublepoint.bounds.width, doublepoint.bounds.height);\n\t \t if (!r1.overlaps(r2)) continue;\n\t \t onCollisionBirdWithDoublePoint(doublepoint);\n\t \t break;\n\t }\n\t \n\t // Test collision: Goal\n\t for (Goal goal : level.goals)\n\t {\n\t \t r2.set(goal.position.x, goal.position.y,\n\t \t\t\t goal.bounds.width, goal.bounds.height);\n\t \t if (!r1.overlaps(r2)) continue;\n\t \t onCollisionBirdWithGoal(goal);\n\t \t break;\n\t }\n\t \n\t // Test collision: Brick\n\t for (Brick brick : level.bricks) \n\t {\n\t \t r2.set(brick.position.x, brick.position.y, brick.bounds.width,\n\t \t\t\t brick.bounds.height);\n\t \t if (!r1.overlaps(r2)) continue;\n\t \t \n\t \t onCollisionBirdWithBrick(brick);\n\t }\n\t }",
"public Point closestIntersectionToStartOfLine(Rectangle rect) {\r\n List<Point> list = rect.intersectionPoints(this);\r\n if (list.isEmpty()) {\r\n return null;\r\n // there is only one point in list\r\n } else if (list.size() == 1) {\r\n return list.get(0);\r\n // first point in list closer than the second one\r\n } else if (this.start.distance(list.get(0)) < this.start.distance(list.get(1))) {\r\n return list.get(0);\r\n // second point in list closer than the first one\r\n } else {\r\n return list.get(1);\r\n }\r\n }",
"public Iterable<Point2D> range(RectHV rect) {\n TreeSet<Point2D> ret = new TreeSet<Point2D>();\n for (Point2D p: mPoints) {\n if (rect.contains(p)) {\n ret.add(p);\n }\n }\n return ret;\n }",
"private E3DCollision getClosestCollisionWithActor(IE3DCollisionDetector collisionDetector, boolean useBoundingObjectsIfPossible, boolean notifyAllObjectsCollided, IE3DCollisionDetectableObject sourceObject, E3DVector3F sourceStartPos, E3DVector3F sourceEndPos, E3DWorld world)\r\n\t{\r\n ArrayList collisions = new ArrayList();\r\n\t\tHashMap actorMap = sourceObject.getSector().getActorMap();\r\n \r\n Iterator it = actorMap.entrySet().iterator();\r\n Map.Entry entry = null;\r\n E3DActor actor = null;\r\n\r\n //Loop through all actors seeing if this actor runs into it\r\n\t\twhile(it.hasNext())\r\n\t\t{\r\n\t\t\tentry = (Map.Entry)it.next();\r\n\t\t\tactor = (E3DActor) entry.getValue();\r\n\t\t\tif(!actor.isCollideable())\r\n\t\t\t continue;\r\n\r\n\t\t\tif((IE3DCollisionDetectableObject)actor != sourceObject) //dont collide with self!\r\n\t\t\t{\r\n\t\t\t collisions.add(getClosestCollisionWithCollisionDetectableObject(collisionDetector, useBoundingObjectsIfPossible, notifyAllObjectsCollided,\r\n sourceObject, sourceStartPos, sourceEndPos, actor, world));\r\n }\r\n\t\t}\r\n return getClosestCollisionToPoint(sourceStartPos, collisions);\r\n\t}",
"public void CheckCollision(Ball b){\n\n if( b.getDirX() < 0f ){\n if( (b.getPosX() - b.getSizeX() ) < px + sx){\n //if we're in the upper \n if( b.getPosY() > py+sy/2 && b.getPosY() < py+sy){\n b.setDirX(-b.getDirX());\n b.setDirY(b.getDirY() + .25f);\n }\n //if we are in the lower\n else if( b.getPosY() < py-sy/2 && b.getPosY() > py-sy){\n b.setDirX(-b.getDirX());\n b.setDirY(b.getDirY() - .25f); \n }\n else if( b.getPosY() > py-sy && b.getPosY() < py+sy)\n b.setDirX(-b.getDirX());\n b.setVelocity(b.getVelocity() * 1.10f);\n } \n }else{\n if( (b.getPosX() + b.getSizeX() ) > px - sx){\n //if we're in the upper \n if( b.getPosY() > py+sy/2 && b.getPosY() < py+sy){\n b.setDirX(-b.getDirX());\n b.setDirY(b.getDirY() + .25f);\n }\n //if we are in the lower\n else if( b.getPosY() < py-sy/2 && b.getPosY() > py-sy){\n b.setDirX(-b.getDirX());\n b.setDirY(b.getDirY() - .25f); \n }\n else if( b.getPosY() > py-sy && b.getPosY() < py+sy)\n b.setDirX(-b.getDirX());\n b.setVelocity(b.getVelocity() * 1.10f);\n }\n }\n }",
"@Override\n public MovingObjectPosition collisionRayTrace(World world, BlockPos pos, Vec3 vec0, Vec3 vec1) {\n this.setBlockBoundsBasedOnState(world, pos);\n vec0 = vec0.addVector((double)(-pos.getX()), (double)(-pos.getY()), (double)(-pos.getZ()));\n vec1 = vec1.addVector((double) (-pos.getX()), (double) (-pos.getY()), (double) (-pos.getZ()));\n Vec3 vec2 = vec0.getIntermediateWithXValue(vec1, this.minX);\n Vec3 vec3 = vec0.getIntermediateWithXValue(vec1, this.maxX);\n Vec3 vec4 = vec0.getIntermediateWithYValue(vec1, this.minY);\n Vec3 vec5 = vec0.getIntermediateWithYValue(vec1, this.maxY);\n Vec3 vec6 = vec0.getIntermediateWithZValue(vec1, this.minZ);\n Vec3 vec7 = vec0.getIntermediateWithZValue(vec1, this.maxZ);\n Vec3 vec8 = null;\n if (!this.isVecInsideYZBounds(world, pos, vec2)) {\n vec2 = null;\n }\n if (!this.isVecInsideYZBounds(world, pos, vec3)) {\n vec3 = null;\n }\n if (!this.isVecInsideXZBounds(world, pos, vec4)) {\n vec4 = null;\n }\n if (!this.isVecInsideXZBounds(world, pos, vec5)) {\n vec5 = null;\n }\n if (!this.isVecInsideXYBounds(world, pos, vec6)) {\n vec6 = null;\n }\n if (!this.isVecInsideXYBounds(world, pos, vec7)) {\n vec7 = null;\n }\n if (vec2 != null) {\n vec8 = vec2;\n }\n if (vec3 != null && (vec8 == null || vec0.squareDistanceTo(vec3) < vec0.squareDistanceTo(vec8))) {\n vec8 = vec3;\n }\n if (vec4 != null && (vec8 == null || vec0.squareDistanceTo(vec4) < vec0.squareDistanceTo(vec8))) {\n vec8 = vec4;\n }\n if (vec5 != null && (vec8 == null || vec0.squareDistanceTo(vec5) < vec0.squareDistanceTo(vec8))) {\n vec8 = vec5;\n }\n if (vec6 != null && (vec8 == null || vec0.squareDistanceTo(vec6) < vec0.squareDistanceTo(vec8))) {\n vec8 = vec6;\n }\n if (vec7 != null && (vec8 == null || vec0.squareDistanceTo(vec7) < vec0.squareDistanceTo(vec8))) {\n vec8 = vec7;\n }\n if (vec8 == null) {\n return null;\n } else {\n EnumFacing enumfacing = null;\n if (vec8 == vec3) {\n enumfacing = EnumFacing.WEST;\n }\n if (vec8 == vec2) {\n enumfacing = EnumFacing.EAST;\n }\n if (vec8 == vec3) {\n enumfacing = EnumFacing.DOWN;\n }\n if (vec8 == vec4) {\n enumfacing = EnumFacing.UP;\n }\n if (vec8 == vec5) {\n enumfacing = EnumFacing.NORTH;\n }\n if (vec8 == vec6) {\n enumfacing = EnumFacing.SOUTH;\n }\n return new MovingObjectPosition(vec8.addVector((double) pos.getX(), (double) pos.getY(), (double) pos.getZ()), enumfacing, pos);\n }\n }",
"public Hit getHit(final Ray r, final TestCounter c) {\n if(box.intersects(r, c) < 0) return new Hit(r, c);\n if(tri != null) return getLevelHit(r, c);\n int firstCheck = 0;\n switch(splitType) {\n case 0:\n firstCheck = r.getDirection().getX() > 0 ? 0 : 1;\n break;\n case 1:\n firstCheck = r.getDirection().getY() > 0 ? 0 : 1;\n break;\n case 2:\n firstCheck = r.getDirection().getZ() > 0 ? 0 : 1;\n break;\n }\n for(int i = 0; i < 2; i++) {\n final int index = (firstCheck + i) % 2;\n if(children[index] == null) {\n continue;\n }\n final Hit hit = children[index].getHit(r, c);\n if(hit.hasHit()) {\n if(crossingTriangles.contains(hit.getTriangle())) {\n final Hit hit2 = children[(index + 1) % 2].getHit(r, c);\n if(hit2.hasHit()) return hit.getDistance() < hit2.getDistance() ? hit : hit2;\n }\n return hit;\n }\n }\n return new Hit(r, c);\n }",
"public Rectangle getHitBox()\n\t{\n\t\treturn new Rectangle(x, y, width, height);\n\t}",
"List<PathRectangle> getCollisionRectangles();",
"public float getY(){\n return hitBox.top;\n }",
"public List<Point> rangeSearch(Rectangle rect) {\n\t\tif (rect == null) {\n System.out.println(\"Rectangle can't be null\");\n\t\t\tSystem.exit(0);\n }\n List<Point> rangePoints = new List<>();\n if (!isEmpty()) {\n range(head, rect, rangePoints);\n }\n return rangePoints;\n\t}",
"public static boolean WithinRange(GameObject obj, int compX, int compY)\n\t{\n\t\t//Checks heigh/width and x/y to determine if the value is\n\t\t//over the object.\n\t\tif (compX >= obj.x && //is it too far to the right?\n\t\t\tcompX <= obj.texture.image.getWidth() + obj.x && //is it too far to the left?\n\t\t\tcompY >= obj.y && //is it too low?\n\t\t\tcompY <= obj.texture.image.getHeight() + obj.y ) //is it too high?\n\t\t\t\treturn true; //if none of those, return true.\n\t\treturn false; //else return false.\n\t\t\n\t}",
"static boolean intersectsRect(R2Vector a, R2Vector b, R2Rect rect) {\n // First check whether the bound of AB intersects \"rect\".\n R2Rect bound = R2Rect.fromPointPair(a, b);\n if (!rect.intersects(bound)) {\n return false;\n }\n\n // Otherwise AB intersects \"rect\" if and only if all four vertices of \"rect\"\n // do not lie on the same side of the extended line AB. We test this by\n // finding the two vertices of \"rect\" with minimum and maximum projections\n // onto the normal of AB, and computing their dot products with the edge\n // normal.\n R2Vector n = R2Vector.sub(b, a).ortho();\n int i = (n.x >= 0) ? 1 : 0;\n int j = (n.y >= 0) ? 1 : 0;\n double max = n.dotProd(R2Vector.sub(rect.getVertex(i, j), a));\n double min = n.dotProd(R2Vector.sub(rect.getVertex(1 - i, 1 - j), a));\n return (max >= 0) && (min <= 0);\n }",
"public void checkBoundaries(Player pl) {\n\t\tPoint loc = gameMap.toGridLocation(pl.getLocation());\n\t\tint locationX = loc.x;\n\t\tint locationY = loc.y;\n\t\t\n\t\tif(gameMap.getType(loc.x, loc.y) == GameMap.WALL)\n\t\t{\n\t\t\tif(loc.x > 0)\n\t\t\t\tpl.getLocation().x -= 1f;\n\t\t\telse\n\t\t\t\tpl.getLocation().x += 1f;\n\t\t}\n\t\t\n\t\tPoint[] surrounding = gameMap.getSurrounding((int) locationX, (int) locationY);\n\t\t\n\t\tRectangle2D.Float player = pl.getLocationAsRect();\n\t\tfor(Point p : surrounding)\n\t\t{\n\t\t\tRectangle2D.Float rect = new Rectangle2D.Float(p.x * 16 + 112, p.y * 16 + 32, 16, 16);\n\t\t\tif(rect.intersects(player))\n\t\t\t{\n\t\t\t\tbyte type = gameMap.getType(p.x, p.y);\n\t\t\t\tif(isSpecial(pl, type))\n\t\t\t\t{\n\t\t\t\t\tspecialMovement(pl, type);\n//\t\t\t\t\tSystem.out.println(pl.getClass().getSimpleName() + \" hit a boundary\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(type == GameMap.ORB)\n\t\t\t\t{\n\t\t\t\t\tgameMap.setType(p.x, p.y, GameMap.EATEN_ORB);\n\t\t\t\t\t\n\t\t\t\t\tonOrbCollect(pl);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"void setRectHitbox(float w, float h) {\n _hitbox = new PVector[]{\n new PVector(-w/2, h/2),\n new PVector(-w/2, -h/2),\n new PVector(w/2, -h/2),\n new PVector(w/2, h/2)\n };\n }",
"public Iterable<Point2D> range(RectHV rect) {\n Queue<Point2D> pointsInRect = new Queue<Point2D>();\n range(root, rect, pointsInRect);\n return pointsInRect;\n }",
"public CollisionInfo getClosestCollision(Line trajectory) {\r\n // check if there is a core.Collidable objects.\r\n if (this.collidObj.isEmpty()) {\r\n return null;\r\n }\r\n List<Collidable> collisobj = new ArrayList<Collidable>();\r\n int counter = 0;\r\n // Make a copy of the Sprite before iterating over them.\r\n List<Collidable> collidables = new ArrayList<Collidable>(this.collidObj);\r\n // create a List of collision Colidable.\r\n for (Collidable c : collidables) {\r\n if (trajectory.closestIntersectionToStartOfLine(c.getCollisionRectangle()) != null) {\r\n collisobj.add(c);\r\n }\r\n }\r\n if (collisobj.size() == 0) {\r\n return null;\r\n // if there is just one collision.\r\n } else if (collisobj.size() == 1) {\r\n Rectangle r = (collisobj.get(0)).getCollisionRectangle();\r\n return new CollisionInfo(trajectory.closestIntersectionToStartOfLine(r), collisobj.get(0));\r\n // else search the closet collision.\r\n } else {\r\n return searchClosetCollision(collisobj, trajectory);\r\n }\r\n }",
"protected Unit target() {\n\t\tUnit closest = null; // this variable will contain the closest Unit\n\t\tDouble min = (double) projectile_range; // this will contain the lowest distance\n\t\tList<Entity> entities = level.getEntities();\n\n\t\tfor (int i = 0; i < entities.size(); i++) {\n\t\t\tEntity e = entities.get(i);\n\t\t\tUnit u = (Unit) e; // casts e to Unit\n\t\t\tif (u.equals(this)) continue; // discounts self\n\t\t\tif (u.UNIT_R != UNIT_G && u.UNIT_G != UNIT_R) continue; // discounts Units from own team\n\t\t\tif (!(e instanceof Unit)) continue; // discounts non-Unit entities\n\n\t\t\tdouble distance = MathMachine.distance((u.getX() - x), (u.getY() - y));\n\t\t\t/*\n\t\t\t * int r = 0; int g = 0; for (int y = 0; y < level.getHeight() * 16; y++) { for (int x = 0; x < level.getWidth() * 16; x++) { if (level.redPixels[x + y * level.getWidth() * 16] == true) r++; if (level.greenPixels[x + y * level.getWidth() * 16] == true )g++; System.out.println(\"r: \" + r + \", \" + g); } }\n\t\t\t */\n\t\t\tif (UNIT_R) { // if it is a red unit\n\t\t\t\tif (distance < min) {\n\t\t\t\t\tint xt = (int) Math.round(u.getX());\n\t\t\t\t\tint yt = (int) Math.round(u.getY());\n\t\t\t\t\tif (level.redPixels[(int) Math.round(xt + level.getWidth() * 16.0 * yt)]) {\n\t\t\t\t\t\tclosest = u;\n\t\t\t\t\t\tmin = distance;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (UNIT_G) { // if it is a green unit\n\t\t\t\tif (distance < min) {\n\t\t\t\t\tSystem.out.println(level.greenPixels[(int) Math.round(u.getX() + level.getWidth() * 16.0 * u.getY())]);\n\n\t\t\t\t\tif (level.greenPixels[(int) Math.round(u.getX() + level.getWidth() * 16.0 * u.getY())]) {\n\t\t\t\t\t\tclosest = u;\n\t\t\t\t\t\tmin = distance;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn closest; // the program is fucked if null happens. just a headsup. hopefully you will remember if you get a null pointer exception.\n\t}",
"public void checkForCollisions()\r\n\t{\r\n\t\t//collision detection\r\n\t\tfor(PolygonD obj : objects)\r\n\t\t{\r\n\t\t\t//find points in character that intersected with the scene\r\n\t\t\tfor(PointD p : aSquare.getBoundary().getVerts())\r\n\t\t\t{\r\n\t\t\t\tif(obj.contains(p)){\r\n\t\t\t\t\t//find side that intersected\r\n\t\t\t\t\tdouble minDist = Double.MAX_VALUE;\r\n\t\t\t\t\tPointD prev = obj.getVerts().get(obj.getVerts().size()-1);\r\n\t\t\t\t\tPointD closestPoint = null;\r\n\t\t\t\t\tfor(PointD vert : obj.getVerts())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tDouble d = distanceToLine(new Vector(prev, vert), p);\r\n\t\t\t\t\t\tif(d != null && d < minDist)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tminDist = d;\r\n\t\t\t\t\t\t\tclosestPoint = getNearestPointOnLine(new Vector(prev, vert),p);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tprev = vert;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tVector offset = new Vector(p, closestPoint);\r\n\t\t\t\t\taSquare.translate(offset);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//find points in scene that intersected with the character\r\n\t\t\tfor(PointD p : obj.getVerts())\r\n\t\t\t{\r\n\t\t\t\tif(aSquare.getBoundary().contains(p)){\r\n\t\t\t\t\t//find side that intersected\r\n\t\t\t\t\tdouble minDist = Double.MAX_VALUE;\r\n\t\t\t\t\tPointD prev = aSquare.getBoundary().getVerts().get(aSquare.getBoundary().getVerts().size()-1);\r\n\t\t\t\t\tPointD closestPoint = null;\r\n\t\t\t\t\tfor(PointD vert : aSquare.getBoundary().getVerts())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tDouble d = distanceToLine(new Vector(prev, vert), p);\r\n\t\t\t\t\t\tif(d != null && d < minDist)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tminDist = d;\r\n\t\t\t\t\t\t\tclosestPoint = getNearestPointOnLine(new Vector(prev, vert),p);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tprev = vert;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//get the angle of object by 'feeling' it\r\n\t\t\t\t\tint numVerts = obj.verts.size();\r\n\t\t\t\t\tint objI = obj.verts.indexOf(p);\r\n\t\t\t\t\tint lastI = (objI - 1) % numVerts;\r\n\t\t\t\t\tif(lastI == -1)\r\n\t\t\t\t\t\tlastI = numVerts - 1;\r\n\t\t\t\t\tint nextI = (objI + 1) % numVerts;\r\n\t\t\t\t\t\r\n\t\t\t\t\tint angle = (int)Math.round((new Vector(obj.verts.get(objI), obj.verts.get(lastI))).angleBetween(new Vector(obj.verts.get(objI), obj.verts.get(nextI))));\r\n\t\t\t\t\t\r\n\t\t\t\t\taSquare.sendMsg(new Msg(aSquare, \"Felt Vertex: \" + angle + \"deg\"));//null means status message\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t//reverse direction to make aSquare move out of wall\r\n\t\t\t\t\tVector offset = new Vector(closestPoint, p);\r\n\t\t\t\t\taSquare.translate(offset);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\taSquare.getCenter();\r\n\t}",
"public static Rectangle findSmallest (Rectangle[] rectangles)\n {\n \t// Create rectangle reference that will be returned\n \t\n \tRectangle currentSmallest = rectangles[0];\n \t\n \tfor(Rectangle temp: rectangles)\n \t{\n \t\tint areaOfCurrent = currentSmallest.height * currentSmallest.width;\n \t\tint areaOfTemp = temp.height * temp.width;\n \t\t\n \t\tif(areaOfTemp <= areaOfCurrent)\n \t\t\tcurrentSmallest = temp;\n \t}\n \t\t\n return currentSmallest; // You will write this method as part of programming assignment #7. \n }",
"private int getPos(Label l) {\n\t\tRectangle2D pRect = l.getRect();\n\t\t//System.out.println(pRect);\n\t\tint index = -1;\n\t\tdouble verticalMidpoint = bounds.getX() + (bounds.getWidth() / 2.0d);\n\t\tdouble horizontalMidpoint = bounds.getY() + (bounds.getHeight() / 2.0d);\n\t \n\t\t//drawPoint(new Vector2f((double)verticalMidpoint,(double)horizontalMidpoint), 0.05f, Color.WHITE);\n\t\t\n\t\t// Object can completely fit within the top quadrants\n\t\tboolean topQuadrant = (\n\t\t\t\tpRect.getY() < \n\t\t\t\thorizontalMidpoint && \n\t\t\t\tpRect.getY() + \n\t\t\t\tpRect.getHeight() < \n\t\t\t\thorizontalMidpoint);\n\t\t// Object can completely fit within the bottom quadrants\n\t\tboolean bottomQuadrant = (pRect.getY() > horizontalMidpoint);\n\t\t\n\t\t//System.out.println(topQuadrant);\n\t\t\n\t\t// Object can completely fit within the left quadrants\n\t\tif (pRect.getX() < verticalMidpoint && pRect.getX() + pRect.getWidth() < verticalMidpoint) {\n\t\t\tif (topQuadrant) {\n\t\t\t\tindex = 1;\n\t\t\t}\n\t\t\telse if (bottomQuadrant) {\n\t\t\t\tindex = 2;\n\t\t\t}\n\t\t}\n\t\t// Object can completely fit within the right quadrants\n\t\telse if (pRect.getX() > verticalMidpoint) {\n\t\t\tif (topQuadrant) {\n\t\t\t\tindex = 0;\n\t\t\t}\n\t\t\telse if (bottomQuadrant) {\n\t\t\t\tindex = 3;\n\t\t\t}\n\t\t}\n\t \n\t\treturn index;\n\t}",
"private E3DCollision getClosestCollisionWithSprite(IE3DCollisionDetector collisionDetector, boolean useBoundingObjectsIfPossible, \r\n boolean notifyAllObjectsCollided, IE3DCollisionDetectableObject sourceObject, \r\n E3DVector3F sourceStartPos, E3DVector3F sourceEndPos, E3DWorld world)\r\n\t{\r\n ArrayList collisions = new ArrayList();\r\n\t\tArrayList spriteList = sourceObject.getSector().getSpriteList();\r\n\r\n\t\tE3DSprite sprite = null;\r\n\t\tfor(int a=0; a<spriteList.size(); a++)\r\n\t\t{\r\n\t\t\tsprite = (E3DSprite)spriteList.get(a);\r\n\t\t\tif(!sprite.isCollideable())\r\n\t\t\t continue;\r\n\t\t\t\r\n\t\t\tif((IE3DCollisionDetectableObject)sprite != sourceObject) //dont collide with self!\r\n\t\t\t{\r\n collisions.add(getClosestCollisionWithCollisionDetectableObject(collisionDetector, useBoundingObjectsIfPossible, notifyAllObjectsCollided,\r\n sourceObject, sourceStartPos, sourceEndPos, sprite, world));\r\n }\r\n }\r\n\t\treturn getClosestCollisionToPoint(sourceStartPos, collisions);\r\n\t}",
"public boolean intersects(Rectangle rect){\n\t\tRectangle rectIntersect = (Rectangle) rect.clone();\n\t\trectIntersect.translate(-x, -y);\n\t\treturn rectangle.intersects(rectIntersect);\n\t}",
"public abstract IAttackable getEnemyInSearchArea(ShortPoint2D centerPos, IAttackable movable, short minSearchRadius, short maxSearchRadius,\n\t\t\t\t\t\t\t\t\t\t\t\t\t boolean includeTowers);",
"private void findComponents(final int x, final int y,\r\n final double xOffset, final double yOffset, final double scale,\r\n final Bounds bounds, final int level,\r\n final StringBuilder textOut) {\r\n Rectangle b = bounds.bounds;\r\n \r\n double xOffs = xOffset;\r\n double yOffs = yOffset;\r\n if (level > 0) {\r\n xOffs += b.x * scale;\r\n yOffs += b.y * scale;\r\n }\r\n \r\n Rectangle rect = new Rectangle((int) xOffs, (int) yOffs,\r\n (int) (xOffs + b.width * scale) - (int) xOffs,\r\n (int) (yOffs + b.height * scale) - (int) yOffs);\r\n if (!rect.contains(x, y)) {\r\n return;\r\n }\r\n for (int l = 0; l < level; l++) {\r\n textOut.append(\" \");\r\n }\r\n textOut.append(bounds.type + \" (\" + b.x + \", \" + b.y + \") \"\r\n + b.width + \"x\" + b.height + \"\\n\");\r\n for (int c = 0; c < bounds.children.length; c++) {\r\n findComponents(x, y, xOffs, yOffs, scale, bounds.children[c],\r\n level + 1, textOut);\r\n }\r\n }",
"public Iterable<Point2D> range(RectHV rect)\n {\n Stack<Point2D> pointsInRect = new Stack<Point2D>();\n range(root, rect, pointsInRect);\n return pointsInRect;\n }",
"private boolean isOverRect(Point p) {\n Rectangle r = (Rectangle)component.rect.clone();\n r.grow(PROX_DIST, PROX_DIST);\n return r.contains(p);\n }",
"public ObjectHit getHit(Ray ray) {\n\t\t\n\t\tObjectHit nearestHit = new ObjectHit(Hit.MISS, null);\n\t\t\n\t\tfor(int i = 0; i < scene.objects.size(); i++) {\n\t\t\tWorldObject object = scene.objects.get(i);\n\t\t\t\n\t\t\tObjectHit hit = new ObjectHit(object.intersect(ray), object.material);\n\t\t\t\n\t\t\tif(hit.hit && hit.distance < nearestHit.distance) {\n\t\t\t\tnearestHit = hit;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn nearestHit;\n\t\t\n\t}",
"public Rect getHitbox() {\n return hitbox;\n }",
"CollisionRule getCollisionRule();",
"private void setCollision(){\n\t\tMapObjects mapObjects = map.getLayers().get(\"COLLISION\").getObjects();\n\t\tfor (int ii = 0; ii < mapObjects.getCount(); ++ii){\n\t\t\tRectangleMapObject rectangle_map_object = (RectangleMapObject) mapObjects.get(ii);\n\t\t\tareaCollision.add(new Rectangle(rectangle_map_object.getRectangle()));\n\t\t}\n\t}",
"public Rect getBound() {\n return new Rect((int) (x - radius), (int) (y - radius), (int) (x + radius), (int) (y + radius));\n }",
"public Iterable<Point2D> range(RectHV rect) {\n\n if (rect == null)\n throw new IllegalArgumentException(\"Got null object in range()\");\n \n Queue<Point2D> pointsInside = new Queue<>();\n \n for (Point2D p : point2DSET) {\n \n double x = p.x();\n double y = p.y();\n if (x >= rect.xmin() && x <= rect.xmax() &&\n y >= rect.ymin() && y <= rect.ymax())\n pointsInside.enqueue(p);\n \n }\n \n return pointsInside;\n }",
"public Entry minValue(Board board, int depth) throws CloneNotSupportedException{\n \tint score;\n \tint [][]b = board.board;\n \tif (cutOffTest(board, depth)) {\n \t\tscore = utility(board);\n \t\tEntry entry = new Entry(score, 0); \n \t\treturn entry;\n \t}\n \t\n \tint min = Integer.MAX_VALUE;\n \t\n \tList<Integer> list = board.getListOfPosition();\n \tif (list.size() == 0) {\n \t\tscore = 0;\n \t\tmin = Integer.MIN_VALUE;\n \t}\n \tfor (int item : list) {\n \t\tint row = item / b[0].length;\n \t\tint col = item % b[0].length;\n \t\tboard.board[row][col] = 2;\n \t\tEntry cur = maxValue(board, depth+1);\n \t\tmin = Math.min(min, cur.score);\n \t\tboard.board[row][col] = 0;\n \t}\n \tEntry res = new Entry(min, 0);\n \treturn res;\n }",
"public Rectangle getHitbox(){\n\t\treturn platformHitbox;\n\t}",
"private int findCoordElementContiguous(double target, boolean bounded) {\n int n = orgGridAxis.getNcoords();\n\n // Check that the point is within range\n MinMax minmax = orgGridAxis.getCoordEdgeMinMax();\n if (target < minmax.min()) {\n return bounded ? 0 : -1;\n } else if (target > minmax.max()) {\n return bounded ? n - 1 : n;\n }\n\n int low = 0;\n int high = n - 1;\n if (orgGridAxis.isAscending()) {\n // do a binary search to find the nearest index\n int mid;\n while (high > low + 1) {\n mid = (low + high) / 2; // binary search\n if (intervalContains(target, mid, true, false))\n return mid;\n else if (orgGridAxis.getCoordEdge2(mid) < target)\n low = mid;\n else\n high = mid;\n }\n return intervalContains(target, low, true, false) ? low : high;\n\n } else { // descending\n // do a binary search to find the nearest index\n int mid;\n while (high > low + 1) {\n mid = (low + high) / 2; // binary search\n if (intervalContains(target, mid, false, false))\n return mid;\n else if (orgGridAxis.getCoordEdge2(mid) < target)\n high = mid;\n else\n low = mid;\n }\n return intervalContains(target, low, false, false) ? low : high;\n }\n }",
"private CompartmentSBML findOutsideComp(Tissue tiss, CompartmentSBML compInside) {\n if(compInside.outside == null)\n {\n return null ;\n }\n \n ArrayList<CompartmentSBML> children = tiss.getInternVolumes();\n\n Iterator<CompartmentSBML> ishtar = children.iterator();\n\n while (ishtar.hasNext()) {\n CompartmentSBML leafComp = null;\n\n leafComp = ishtar.next();\n // Post processing for \"outside\" field\n String compId = leafComp.getIdentity();\n if (compInside.outside.contentEquals(compId)) {\n // we found it\n return leafComp;\n }\n }\n // we found nothing\n return null;\n }",
"public Vector2 returnToNearestStockpile(Resource resource){\n\t\tif(myTownHall == null)\n\t\t\treturn new Vector2(0,0);\n\t\treturn myTownHall.getCenter();\n\t}",
"Velocity hit(Ball hitter, Point collisionPoint, Velocity currentVelocity);",
"public boolean intersects(BaseGameObject other) {\r\n return (other.getPosx() - this.getPosx())\r\n * (other.getPosx() - this.getPosx())\r\n + (other.getPosy() - this.getPosy())\r\n * (other.getPosy() - this.getPosy())\r\n < (other.bound + this.bound) * (other.bound + this.bound);\r\n }",
"public Iterable<Point2D> range(RectHV rect) {\n if (rect == null) throw new IllegalArgumentException(\"rects cannot be null\");\n Queue<Point2D> pts = new Queue<Point2D>();\n range(pts, rect, root, inftyBbox);\n return pts;\n }",
"public Iterable<Point2D> range(RectHV rect) \n\t {\n\t\t if(rect==null)\n\t\t\t throw new java.lang.NullPointerException();\n\t\t LinkedQueue<Point2D> insidePoints = new LinkedQueue<Point2D>();\n\t\t range(root,rect.xmin(),rect.ymin(),rect.xmax(),rect.ymax(),insidePoints,true);\n\t\t return insidePoints;\n\t }",
"public double findRayIntersection(Vec3 origin, Vec3 direction, Vec3 normal)\n {\n double scale = width/obj.getScale();\n double ox = origin.x*scale+0.5*width;\n double oy = origin.y*scale+0.5*width;\n double oz = origin.z*scale+0.5*width;\n double dx = direction.x;\n double dy = direction.y;\n double dz = direction.z;\n\n // Find the intersection of the ray with the bounding box.\n\n double mint = -Double.MAX_VALUE;\n double maxt = Double.MAX_VALUE;\n if (dx == 0.0)\n {\n if (ox < minx || ox > maxx)\n return 0.0;\n }\n else\n {\n double t1 = (minx-ox)/dx;\n double t2 = (maxx-ox)/dx;\n if (t1 < t2)\n {\n if (t1 > mint)\n mint = t1;\n if (t2 < maxt)\n maxt = t2;\n }\n else\n {\n if (t2 > mint)\n mint = t2;\n if (t1 < maxt)\n maxt = t1;\n }\n if (mint > maxt || maxt < 0.0)\n return 0.0;\n }\n if (dy == 0.0)\n {\n if (oy < miny || oy > maxy)\n return 0.0;\n }\n else\n {\n double t1 = (miny-oy)/dy;\n double t2 = (maxy-oy)/dy;\n if (t1 < t2)\n {\n if (t1 > mint)\n mint = t1;\n if (t2 < maxt)\n maxt = t2;\n }\n else\n {\n if (t2 > mint)\n mint = t2;\n if (t1 < maxt)\n maxt = t1;\n }\n if (mint > maxt || maxt < 0.0)\n return 0.0;\n }\n if (dz == 0.0)\n {\n if (oz < minz || oz > maxz)\n return 0.0;\n }\n else\n {\n double t1 = (minz-oz)/dz;\n double t2 = (maxz-oz)/dz;\n if (t1 < t2)\n {\n if (t1 > mint)\n mint = t1;\n if (t2 < maxt)\n maxt = t2;\n }\n else\n {\n if (t2 > mint)\n mint = t2;\n if (t1 < maxt)\n maxt = t1;\n }\n if (mint > maxt || maxt < 0.0)\n return 0.0;\n }\n if (mint < 0.0)\n mint = 0.0;\n\n // Find the first voxel and initialize variables.\n\n double xpos = ox+mint*dx;\n double ypos = oy+mint*dy;\n double zpos = oz+mint*dz;\n int x = Math.max(Math.min((int) xpos, maxx), minx);\n int y = Math.max(Math.min((int) ypos, maxy), miny);\n int z = Math.max(Math.min((int) zpos, maxz), minz);\n int stepx, stepy, stepz;\n int finalx, finaly, finalz;\n double tdeltax, tdeltay, tdeltaz;\n double tmaxx, tmaxy, tmaxz;\n if (dx < 0.0)\n {\n stepx = -1;\n finalx = minx-1;\n tdeltax = -1.0/dx;\n tmaxx = (x-ox)/dx;\n }\n else if (dx > 0.0)\n {\n stepx = 1;\n finalx = maxx+1;\n tdeltax = 1.0/dx;\n tmaxx = (x+1-ox)/dx;\n }\n else\n {\n stepx = 0;\n finalx = 0;\n tdeltax = 0.0;\n tmaxx = Double.MAX_VALUE;\n }\n if (dy < 0.0)\n {\n stepy = -1;\n finaly = miny-1;\n tdeltay = -1.0/dy;\n tmaxy = (y-oy)/dy;\n }\n else if (dy > 0.0)\n {\n stepy = 1;\n finaly = maxy+1;\n tdeltay = 1.0/dy;\n tmaxy = (y+1-oy)/dy;\n }\n else\n {\n stepy = 0;\n finaly = 0;\n tdeltay = 0.0;\n tmaxy = Double.MAX_VALUE;\n }\n if (dz < 0.0)\n {\n stepz = -1;\n finalz = minz-1;\n tdeltaz = -1.0/dz;\n tmaxz = (z-oz)/dz;\n }\n else if (dz > 0.0)\n {\n stepz = 1;\n finalz = maxz+1;\n tdeltaz = 1.0/dz;\n tmaxz = (z+1-oz)/dz;\n }\n else\n {\n stepz = 0;\n finalz = 0;\n tdeltaz = 0.0;\n tmaxz = Double.MAX_VALUE;\n }\n\n // Step through the voxels, looking for intersections.\n\n VoxelOctree voxels = obj.getVoxels();\n byte values[] = new byte[8];\n while (true)\n {\n int index = x*width*width+y*width+z;\n if ((flags[index/32]&(1<<(index%32))) != 0)\n {\n // There is a piece of the surface in this voxel, so see if the ray intersects it.\n // First find the values of t at which the ray enters and exits it.\n \n double tenter = -Double.MAX_VALUE;\n double texit = Double.MAX_VALUE;\n if (dx != 0.0)\n {\n double t1 = (x-ox)/dx;\n double t2 = (x+1-ox)/dx;\n if (t1 < t2)\n {\n if (t1 > tenter)\n tenter = t1;\n if (t2 < texit)\n texit = t2;\n }\n else\n {\n if (t2 > tenter)\n tenter = t2;\n if (t1 < texit)\n texit = t1;\n }\n }\n if (dy != 0.0)\n {\n double t1 = (y-oy)/dy;\n double t2 = (y+1-oy)/dy;\n if (t1 < t2)\n {\n if (t1 > tenter)\n tenter = t1;\n if (t2 < texit)\n texit = t2;\n }\n else\n {\n if (t2 > tenter)\n tenter = t2;\n if (t1 < texit)\n texit = t1;\n }\n }\n if (dz != 0.0)\n {\n double t1 = (z-oz)/dz;\n double t2 = (z+1-oz)/dz;\n if (t1 < t2)\n {\n if (t1 > tenter)\n tenter = t1;\n if (t2 < texit)\n texit = t2;\n }\n else\n {\n if (t2 > tenter)\n tenter = t2;\n if (t1 < texit)\n texit = t1;\n }\n }\n if (tenter < 0.0)\n continue; // Ignore intersections in the voxel containing the origin.\n\n // Look up the values at the eight corners of the voxel.\n\n values[0] = voxels.getValue(x, y, z);\n values[1] = voxels.getValue(x, y, z+1);\n values[2] = voxels.getValue(x, y+1, z);\n values[3] = voxels.getValue(x, y+1, z+1);\n values[4] = voxels.getValue(x+1, y, z);\n values[5] = voxels.getValue(x+1, y, z+1);\n values[6] = voxels.getValue(x+1, y+1, z);\n values[7] = voxels.getValue(x+1, y+1, z+1);\n\n // Find the positions within the voxel where the ray enters and exits.\n\n double xenter = ox+dx*tenter-x;\n double yenter = oy+dy*tenter-y;\n double zenter = oz+dz*tenter-z;\n double xexit = ox+dx*texit-x;\n double yexit = oy+dy*texit-y;\n double zexit = oz+dz*texit-z;\n\n // Interpolate the find the values at those points.\n\n double enterValue = values[0]*(1.0-xenter)*(1.0-yenter)*(1.0-zenter)\n +values[1]*(1.0-xenter)*(1.0-yenter)*zenter\n +values[2]*(1.0-xenter)*yenter*(1.0-zenter)\n +values[3]*(1.0-xenter)*yenter*zenter\n +values[4]*xenter*(1.0-yenter)*(1.0-zenter)\n +values[5]*xenter*(1.0-yenter)*zenter\n +values[6]*xenter*yenter*(1.0-zenter)\n +values[7]*xenter*yenter*zenter;\n double exitValue = values[0]*(1.0-xexit)*(1.0-yexit)*(1.0-zexit)\n +values[1]*(1.0-xexit)*(1.0-yexit)*zexit\n +values[2]*(1.0-xexit)*yexit*(1.0-zexit)\n +values[3]*(1.0-xexit)*yexit*zexit\n +values[4]*xexit*(1.0-yexit)*(1.0-zexit)\n +values[5]*xexit*(1.0-yexit)*zexit\n +values[6]*xexit*yexit*(1.0-zexit)\n +values[7]*xexit*yexit*zexit;\n if ((enterValue > 0 && exitValue <= 0) || (enterValue <= 0 && exitValue > 0))\n {\n // Find the intersection point.\n\n double weight1 = Math.abs(exitValue);\n double weight2 = Math.abs(enterValue);\n double d = 1.0/(weight1+weight2);\n weight1 *= d;\n weight2 *= d;\n double tintersect = (tenter*weight1 + texit*weight2)/scale;\n if (normal != null)\n {\n normal.set(values[0]+values[1]+values[2]+values[3]-values[4]-values[5]-values[6]-values[7],\n values[0]+values[1]-values[2]-values[3]+values[4]+values[5]-values[6]-values[7],\n values[0]-values[1]+values[2]-values[3]+values[4]-values[5]+values[6]-values[7]);\n normal.normalize();\n }\n return tintersect;\n }\n }\n\n // Advance to the next voxel.\n\n if (tmaxx < tmaxy)\n {\n if (tmaxx < tmaxz)\n {\n x += stepx;\n if (x == finalx)\n return 0.0;\n tmaxx += tdeltax;\n }\n else\n {\n z += stepz;\n if (z == finalz)\n return 0.0;\n tmaxz += tdeltaz;\n }\n }\n else\n {\n if (tmaxy < tmaxz)\n {\n y += stepy;\n if (y == finaly)\n return 0.0;\n tmaxy += tdeltay;\n }\n else\n {\n z += stepz;\n if (z == finalz)\n return 0.0;\n tmaxz += tdeltaz;\n }\n }\n }\n }",
"public abstract boolean hit(Rectangle2D r);",
"private int minmax(Board board, int level, int depth, int alpha, int beta) \n {\n if (computerWin(board) || playerWin(board) || draw(board) || depth >= LIMIT)\n return evaluate(board);\n \n else if (level == MAX)\n {\n int maxValue = Integer.MIN_VALUE;\n \n LinkedList<Board> children = generate(board, COMPUTER);\n \n for (int i = 0; i < children.size(); i++)\n {\n int currentValue = minmax(children.get(i), MIN, depth + 1, alpha, beta);\n \n if (currentValue > maxValue)\n maxValue = currentValue;\n if (maxValue >= beta)\n return maxValue;\n if (maxValue > alpha)\n alpha = maxValue;\n }\n return maxValue;\n }\n else \n {\n int minValue = Integer.MAX_VALUE;\n \n LinkedList<Board> children = generate(board, PLAYER);\n \n for (int i = 0; i < children.size(); i++)\n {\n int currentValue = minmax(children.get(i), MAX, depth + 1, alpha, beta);\n \n if (currentValue < minValue)\n minValue = currentValue;\n if (minValue <= alpha)\n return minValue;\n if (minValue < beta)\n beta = minValue;\n }\n return minValue;\n }\n }",
"public final int compare(Rect rect, Rect rect2) {\n return Integer.valueOf(rect.top).compareTo(Integer.valueOf(rect2.top));\n }",
"Multimap<String, String> intersects(Circle bounds);",
"@Override\n\tpublic BoardLocation findBestLocWhenStuck() {\n\t\treturn null;\n\t}",
"private void range(RectHV rect, Queue<Point2D> queue, KdTreeST<Value>.Node node) {\n\n\t\tif (node == null)\n\t\t\treturn;\n\t\tif (!rect.intersects(node.rect))\n\t\t\treturn;\n\t\tif (rect.contains(node.point))\n\t\t\tqueue.enqueue(node.point);\n\t\trange(rect, queue, node.left);\n\t\trange(rect, queue, node.right);\n\n\t}",
"public void updateHitbox() {\n\t\tresistorPosEnd = new Rectangle(x - 10, y - 10, 40, 40);\n\t\tresistorNegEnd = new Rectangle(x + 30, y, 40, 40);\n\t}",
"@Override\n public void getLocalBounds(Vector3 min, Vector3 max) {\n\n // Maximum bounds\n max.setX(radius + margin);\n max.setY(halfHeight + margin);\n max.setZ(max.getX());\n\n // Minimum bounds\n min.setX(-max.getX());\n min.setY(-max.getY());\n min.setZ(min.getX());\n }",
"private RectHV rightRect(RectHV rect, Node h) {\n\t\tif(h.isVertical) { // right rect\r\n\t\t\treturn new RectHV(h.p.x(), rect.ymin(), rect.xmax(), rect.ymax());\r\n\t\t} else { // top rect\r\n\t\t\treturn new RectHV(rect.xmin(), h.p.y(), rect.xmax(), rect.ymax());\r\n\t\t}\r\n\t}",
"public String playerCollide(PlayerObject player)\n {\n String collision;\n\n Rect oldPos = player.getRectangle();\n\n\n if (Rect.intersects(rectangle, player.getRectangle()))\n {\n if (isTouchable && isMovable )\n {\n if (Constants.xVelocity > 0) {\n return \"right\";\n }\n\n if (Constants.xVelocity < 0) {\n return \"left\";\n }\n\n if (Constants.yVelocity > 0) {\n return \"bottom\";\n }\n\n if (Constants.yVelocity < 0) {\n return \"top\";\n }\n }\n\n if (isTouchable & !isMovable)\n {\n return \"0\";\n }\n\n }\n\n return \"null\";\n }",
"@Override\n final boolean intersect(Bounds bounds, Point4d pickPos) {\n\treturn bounds.intersect(this.bounds, pickPos);\n }",
"public void setCollider(Rectangle collider) {\n this.collider = collider;\n }",
"public interface BoundedObject {\n public BoundedCube getBounds();\n\n public static class BoundedCube implements Comparable<BoundedCube> {\n public long lx, ty, iz = 0;\n public long rx, by, oz = 0;\n\n public BoundedCube() {\n super();\n }\n\n public BoundedCube(long lx, long rx, long ty, long by, long iz, long oz) {\n super();\n this.lx = lx;\n this.rx = rx;\n this.ty = ty;\n this.by = by;\n this.iz = iz;\n this.oz = oz;\n }\n\n public BoundedCube(long[] coords, long radius) {\n super();\n this.lx = coords[0] - radius;\n this.rx = coords[0] + radius;\n this.ty = coords[1] - radius;\n this.by = coords[1] + radius;\n this.iz = coords[2] - radius;\n this.oz = coords[2] + radius;\n }\n\n public BoundedCube(BoundedCube l) {\n super();\n set(l);\n }\n\n public void set(BoundedCube l) {\n this.lx = l.lx;\n this.rx = l.rx;\n this.ty = l.ty;\n this.by = l.by;\n this.iz = l.iz;\n this.oz = l.oz;\n }\n\n public void union(BoundedCube l) {\n if (l.lx < lx)\n lx = l.lx;\n if (l.rx > rx)\n rx = l.rx;\n if (l.ty < ty)\n ty = l.ty;\n if (l.by > by)\n by = l.by;\n if (l.iz < iz)\n iz = l.iz;\n if (l.oz > oz)\n oz = l.oz;\n }\n\n public long radius() {\n return Math.round(Math.sqrt(((rx - lx) * (rx - lx))\n + ((by - ty) * (by - ty))\n + ((oz - iz) * (oz - iz))));\n }\n\n public BoundedCube expand(double[] direction, long distance) {\n final BoundedCube cube = new BoundedCube(this);\n final double x1 = Math.cos(direction[0]) * Math.sin(direction[1]);\n final double y1 = Math.sin(direction[0]) * Math.sin(direction[1]);\n final double z1 = Math.cos(direction[1]);\n final long[] oldCenter = new long[]{((lx + rx) / 2), ((ty + rx) / 2), ((iz + oz) / 2)};\n final long[] newCenter = new long[]{\n oldCenter[0] + Math.round(CMath.mul(distance, x1)),\n oldCenter[1] + Math.round(CMath.mul(distance, y1)),\n oldCenter[2] + Math.round(CMath.mul(distance, z1))};\n if (newCenter[0] > oldCenter[0])\n cube.rx += newCenter[0] - oldCenter[0];\n else\n cube.lx += newCenter[0] - oldCenter[0];\n if (newCenter[1] > oldCenter[1])\n cube.ty += newCenter[1] - oldCenter[1];\n else\n cube.by += newCenter[1] - oldCenter[1];\n if (newCenter[2] > oldCenter[2])\n cube.iz += newCenter[2] - oldCenter[2];\n else\n cube.oz += newCenter[2] - oldCenter[2];\n return cube;\n }\n\n public boolean intersects(BoundedCube two) {\n if (two == null)\n return false;\n return (\n ((lx <= two.lx && two.lx <= rx) || (two.lx <= lx && lx <= two.rx))\n && ((ty <= two.ty && two.ty <= by) || (two.ty <= ty && ty <= two.by))\n && ((iz <= two.iz && two.iz <= oz) || (two.iz <= iz && iz <= two.oz))\n );\n }\n\n public boolean contains(long x, long y, long z) {\n return ((x >= lx)\n && (x <= rx)\n && (y >= ty)\n && (y <= by)\n && (z >= iz)\n && (z <= oz));\n }\n\n public long width() {\n return rx - lx;\n }\n\n public long height() {\n return by - ty;\n }\n\n public long depth() {\n return oz - iz;\n }\n\n @Override\n public int compareTo(BoundedCube o) {\n if (lx < o.lx)\n return -1;\n if (lx > o.lx)\n return 1;\n if (rx < o.rx)\n return -1;\n if (rx > o.rx)\n return 1;\n if (ty < o.ty)\n return -1;\n if (ty > o.ty)\n return 1;\n if (by < o.by)\n return -1;\n if (by > o.by)\n return 1;\n if (iz < o.iz)\n return -1;\n if (iz > o.iz)\n return 1;\n if (oz < o.oz)\n return -1;\n if (oz > o.oz)\n return 1;\n return 0;\n }\n }\n}",
"public void checkCollisions(List<Entity> listOfCloseObjects){\n\n for(Entity first : listOfCloseObjects){\n for(Entity second : listOfCloseObjects){\n if(first!=second) {\n\n String typeOfCollision = \"\";\n\n //check for a collision between the bounding boxes\n if (first.getBoundingBox().intersects(second.getBoundingBox())) {\n if(first.getEntityType().equals(EntityType.WALL) && second.getEntityType().equals(EntityType.PLAYER)) {\n typeOfCollision = \"playerWithWall\";\n }\n else if(first.getEntityType().equals(EntityType.FLOOR_HAZARD) && second.getEntityType().equals(EntityType.PLAYER)){\n typeOfCollision = \"playerWithHazard\";\n }\n else if(first.getEntityType().equals(EntityType.MELEE_WEAPON) && second.getEntityType().equals(EntityType.ENEMY)){\n typeOfCollision = \"swordWithEnemy\";\n }\n else if(first instanceof Bullet && second.getEntityType().equals(EntityType.WALL)){\n typeOfCollision = \"bulletWithWall\";\n }\n else if(first.getEntityType().equals(EntityType.ENEMY) && second.getEntityType().equals(EntityType.WALL)){\n typeOfCollision = \"enemyWithWall\";\n }\n else if((first.getEntityType().equals(EntityType.DEFAULT_BULLET) || first.getEntityType().equals(EntityType.SHOTGUN_BULLET) || first.getEntityType().equals(EntityType.FAST_BULLET)) && second.getEntityType().equals(EntityType.ENEMY)){\n typeOfCollision = \"enemyWithBullet\";\n }\n else if(first.getEntityType().equals(EntityType.ENEMY) && second.getEntityType().equals(EntityType.ENEMY)){\n typeOfCollision = \"enemyWithEnemy\";\n }\n else if(first.getEntityType().equals(EntityType.ENEMY) && second.getEntityType().equals(EntityType.PLAYER)){\n typeOfCollision = \"enemyWithPlayer\";\n }\n else if((first.getEntityType().equals(EntityType.SWORD) || first.getEntityType().equals(EntityType.SHOTGUN) || first.getEntityType().equals(EntityType.PISTOL) || first.getEntityType().equals(EntityType.ASSAULT_RIFLE) ||\n first.getEntityType().equals(EntityType.SHIELD) || first.getEntityType().equals(EntityType.SPEEDBOOST) || first.getEntityType().equals(EntityType.HEART))\n && second.getEntityType().equals(EntityType.PLAYER)){\n typeOfCollision = \"itemWithPlayer\";\n }\n\n if(!typeOfCollision.isEmpty())\n collide(typeOfCollision, first, second);\n }\n }\n }\n }\n\n }",
"public Iterable<Point2D> range(RectHV rect) {\n if (rect == null) throw new NullPointerException();\n TreeSet<Point2D> inRangeSet = new TreeSet<>();\n for (Point2D point : pointSet) {\n if (rect.contains(point)) {\n inRangeSet.add(point);\n }\n }\n return inRangeSet;\n }",
"private void laserCollisions() {\r\n\t\tGObject topLeft = getElementAt(laser.getX() - 1, laser.getY());\r\n\t\tGObject topRight = getElementAt(laser.getX() + laser.getWidth() + 1, laser.getY());\r\n\t\tGObject bottomLeft = getElementAt(laser.getX() - 1, laser.getY() + laser.getHeight());\r\n\t\tGObject bottomRight = getElementAt(laser.getX() + laser.getWidth() + 1, laser.getY() + laser.getHeight());\r\n\t\tif(topLeft == player || topRight == player || bottomLeft == player || bottomRight == player) {\r\n\t\t\tremove(laser);\r\n\t\t\tlaser = null;\r\n\t\t\thits++;\r\n\t\t\tloseLife();\r\n\t\t}\r\n\t}",
"private List<Rectangle> getRectanglesToConsiderForBranchingVarCalculation () {\r\n \r\n List<Rectangle> rectanglesToConsider = new ArrayList<Rectangle> ();\r\n \r\n //for every constraint, see if it has rects at the best lp\r\n \r\n for (Map <Double, List<Rectangle>> rectMap: myInfeasibleRectanglesList) {\r\n for (List<Rectangle> rectList : rectMap.values()) { \r\n \r\n rectanglesToConsider.addAll(rectList );\r\n \r\n } \r\n }\r\n \r\n return rectanglesToConsider;\r\n }",
"public boolean intersects(HitBox h){\n\t\treturn rect.intersects(h.getRectangle());\n\t}",
"void collisions(){\n float tmp;\n \n if (dist(redX, redY, yelX, yelY) < 30 ){ // Red and Yellow\n tmp = yelDX; yelDX = redDX; redDX = tmp;\n tmp= yelDY; yelDY = redDY; redDY = tmp;\n }\n \n if (dist(redX, redY, bluX, bluY) < 30){ // Red and Blue\n tmp = bluDX; bluDX = redDX; redDX = tmp;\n tmp = bluDY; bluDY = redDY; redDY = tmp;\n }\n \n if (dist(bluX, bluY, yelX, yelY) < 30){ // Blue and Yellow\n tmp = yelDX; yelDX = bluDX; bluDX = tmp;\n tmp = yelDY; yelDY = bluDY; bluDY = tmp;\n }\n if (dist(cueX, cueY, redX, redY) < 30){ // Cue and Red\n tmp = redDX; redDX = cueDX; cueDX = tmp;\n tmp = redDY; redDY = cueDY; cueDY = tmp;\n }\n if (dist(cueX, cueY, bluX, bluY) < 30){ // Cue and Blue\n tmp = bluDX; bluDX = cueDX; cueDX = tmp;\n tmp = bluDY; bluDY = cueDY; cueDY = tmp;\n }\n if (dist(cueX, cueY, yelX, yelY) < 30){ // Cue and Yellow\n tmp = yelDX; yelDX = cueDX; cueDX = tmp;\n tmp = yelDY; yelDY = cueDY; cueDY = tmp;\n }\n}",
"public Iterable<Point2D> range(RectHV rect) {\n SET<Point2D> result = new SET<Point2D>();\n if (root == null) {\n return result;\n }\n\n range(root, rect, result);\n return result;\n }",
"public Iterable<Point2D> range(RectHV rect) {\n\n\t\tif (rect == null)\n\t\t\tthrow new NullPointerException(\"Rectangle can not be null\");\n\n\t\tQueue<Point2D> rangeQueue = new Queue<Point2D>();\n\t\trange(rect, rangeQueue, root);\n\t\treturn rangeQueue;\n\n\t}",
"private void findExtremes( Vector<? extends AbstractWirelessDevice> coll )\r\n {\r\n for( AbstractWirelessDevice e: coll )\r\n {\r\n double x = e.getLocation().getX();\r\n double y = e.getLocation().getY();\r\n \r\n if( x < minX )\r\n minX = x;\r\n \r\n if( x > maxX )\r\n maxX = x;\r\n \r\n if( y < minY )\r\n minY = y;\r\n \r\n if( y > maxY )\r\n maxY = y;\r\n }\r\n }",
"@Override\n\tpublic Rectangle getBound() {\n\t\trectBound.setX(posX+20);\n\t\trectBound.setY(Y_LAND - image.getHeight() +10);\n\t\trectBound.setWidth(image.getWidth()-10);\n\t\trectBound.setHeight(image.getHeight());\n\t\treturn rectBound;\n\t}",
"public void collideWith(Rigidbody obj) {\n\t\t\r\n\t}"
]
| [
"0.61396724",
"0.56905127",
"0.56905127",
"0.5603947",
"0.5537961",
"0.536616",
"0.53059006",
"0.52827346",
"0.5278598",
"0.5227975",
"0.5124807",
"0.51228595",
"0.50995225",
"0.50934714",
"0.50835043",
"0.50797844",
"0.5037316",
"0.49814242",
"0.49547142",
"0.49522167",
"0.49502817",
"0.4940386",
"0.49379888",
"0.4937232",
"0.4935747",
"0.49026537",
"0.49020383",
"0.49010223",
"0.490071",
"0.48946077",
"0.4891678",
"0.48830196",
"0.48749018",
"0.48706576",
"0.4861905",
"0.48539072",
"0.48488906",
"0.48470357",
"0.48435438",
"0.4842748",
"0.48401293",
"0.48296213",
"0.48284343",
"0.4826916",
"0.4817143",
"0.48170355",
"0.4811073",
"0.4809694",
"0.48065558",
"0.4795609",
"0.47788718",
"0.475131",
"0.47338063",
"0.47274",
"0.47178277",
"0.47080663",
"0.47072336",
"0.47037503",
"0.470116",
"0.4700894",
"0.46850333",
"0.46838573",
"0.46820506",
"0.46814543",
"0.46716326",
"0.46561846",
"0.46508262",
"0.46500468",
"0.4640096",
"0.46311668",
"0.46285656",
"0.46276528",
"0.46272814",
"0.4625241",
"0.46072665",
"0.4607083",
"0.46069974",
"0.45981073",
"0.45979205",
"0.4597053",
"0.45930833",
"0.4592157",
"0.45901898",
"0.45795175",
"0.45747077",
"0.45716682",
"0.45694345",
"0.45611385",
"0.45585233",
"0.4554528",
"0.45530564",
"0.45472708",
"0.45405972",
"0.4538748",
"0.45315737",
"0.45291528",
"0.45238173",
"0.4522785",
"0.45214188",
"0.45173967"
]
| 0.6915927 | 0 |
/ Bridge Routing Methods | public static boolean isOnlineAnywhere(String playerName)
{
if (haveBridge)
{
return bridge.isOnlineServerPlusClients(playerName);
}
else
{
return server.getOfflinePlayer(playerName).isOnline();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface Router {\n\t/**\n\t * @return\n\t * \t\trouting target information or null, if the URI didn't match\n\t */\n\tpublic RoutingTarget routeUri(HttpServletRequest request);\n\t\n\t/**\n\t * routers should be able to access the configuration and path resolver\n\t */\n\tpublic void setConfig(WeberknechtConf conf, AreaPathResolver areaPathResolver);\n}",
"@Override\n public void getRoutes(LoadRouteCallback callback) {\n\n\n }",
"public interface RecipientListRouter extends Router {\n}",
"public interface Route {\n boolean match(AreaPath path);\n\n Map<String, Object> getParameterValues();\n\n /**\n * target action path\n */\n ActionPath getActionPath();\n\n /**\n * target action processor\n */\n String getProcessor();\n\n /**\n * target action task\n */\n String getTask();\n}",
"public void routingStarted(RoutingHeader routingHeader) {\n \n }",
"public void routingStarted(RoutingHeader routingHeader) {\n \n }",
"public Route getRoute();",
"public interface Router {\n\n interface Message {\n /**\n * The reply-to header\n *\n * @return the reply-to header\n */\n default String replyTo() {\n return (String) metadata().get(\"reply-to\");\n }\n\n /**\n * The host header\n *\n * @return the host header\n */\n default String host() {\n return (String) metadata().get(\"x-host\");\n }\n\n /**\n * Get the name of the reply queue to send the message to\n *\n * @return the reply queue\n */\n default String replyQueue() {\n return (String) metadata().get(\"x-reply-queue\");\n }\n\n\n /**\n * The uri header\n *\n * @return the uri header\n */\n default String uri() {\n\n return (String) metadata().get(\"x-uri\");\n }\n\n /**\n * The scheme header\n *\n * @return the scheme header\n */\n default String scheme() {\n return (String) metadata().get(\"x-scheme\");\n }\n\n /**\n * The method header\n *\n * @return the method header\n */\n default String method() {\n String m = (String) metadata().get(\"x-method\");\n if (null == m) {\n m = \"get\";\n }\n return m.toLowerCase();\n }\n\n /**\n * Get the port... may be String, Number, or null\n *\n * @return get the port\n */\n default Object port() {\n return metadata().get(\"server-port\");\n }\n\n /**\n * get the protocol for the request\n *\n * @return\n */\n default String protocol() {\n return (String) metadata().get(\"x-server-protocol\");\n }\n\n /**\n * Get the uri args for the request\n *\n * @return the uri args for the request\n */\n default String args() {\n return (String) metadata().get(\"x-uri-args\");\n }\n\n /**\n * The content-type header\n *\n * @return the content-type header\n */\n default String contentType() {\n return (String) metadata().get(\"content-type\");\n }\n\n /**\n * The remote address of the client\n *\n * @return remote address\n */\n default String remoteAddr() {\n return (String) metadata().get(\"x-remote-addr\");\n }\n\n /**\n * The\n *\n * @return\n */\n Map<String, Object> metadata();\n\n Object body();\n\n byte[] rawBody();\n\n MessageBroker.ReceivedMessage underlyingMessage();\n }\n\n /**\n * Convert the message from the more generic one from the MessageBroker into\n * something that can be routed\n *\n * @param message\n * @return\n */\n default Message brokerMessageToRouterMessage(MessageBroker.ReceivedMessage message) {\n return new Message() {\n\n @Override\n public Map<String, Object> metadata() {\n return message.metadata();\n }\n\n @Override\n public Object body() {\n return message.body();\n }\n\n @Override\n public byte[] rawBody() {\n return message.rawBody();\n }\n\n @Override\n public MessageBroker.ReceivedMessage underlyingMessage() {\n return message;\n }\n };\n }\n\n /**\n * Route the message. This may cause the message to be queued to the next handler (Runner)\n * or route it to the handler Func.\n *\n * @param message the Message to route\n * @return the result of the Message application or void if this Router forwards the message\n */\n Object routeMessage(Message message) throws IOException;\n\n\n /**\n * Release any resources that the Router has... for example, any database pool connections\n */\n void endLife();\n\n /**\n * Get the host that this Router is listening for\n *\n * @return the name of the host. May be null\n */\n String host();\n\n /**\n * Get the base path for this Router\n *\n * @return the base path for the router\n */\n String basePath();\n\n /**\n * Return the name of the queue that is associated with the host/path combination\n *\n * @return the name of the queue associated with the host/path combination\n */\n String nameOfListenQueue();\n\n /**\n * Get the swagger for this Router\n *\n * @return the Swagger information for the router\n */\n Map<String, Object> swagger();\n\n}",
"public interface RouterB {\n @RouterUri(\"suninfo://host_b\")\n public Intent getIntentActivityB(@RouterParamters(\"name\") String name);\n}",
"public BridgeEntity onBridge();",
"@Override\n\tpublic void onGetIndoorRouteResult(IndoorRouteResult arg0) {\n\n\t}",
"public RoutingC2A()\r\n\t{\r\n\t\tsuper();\r\n\t}",
"public interface IRouter {\n\n void start(RouterContext routerContext);\n\n}",
"@Override\n public void onRouteInfo(BNRGRouteInfo arg0) {\n Log.d(BNRemoteConstants.MODULE_TAG, \"onRouteInfo...... \");\n }",
"@Override\n public void onAllRoutesCompleted() {\n\n }",
"public Router getRouter();",
"@Override\n\tprotected String route() {\n\t\treturn \"api/ad\";\n\t}",
"public interface MainRouter {\n void showWeather();\n\n void showSettings();\n\n void showAbout();\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}",
"public interface RoutesProcessor {\n RoutesProcessor addRoute(Route route);\n}",
"protected abstract Builder processSpecificRoutingRule(Builder rb);",
"@Override\n\tpublic void onGetBikingRouteResult(BikingRouteResult arg0) {\n\n\t}",
"public interface Router {\n final class BundleKeys {\n private BundleKeys() {\n }\n\n public static final String EMPLOYEE = \"employee\";\n }\n\n /**\n * This method enables navigation to {@link mk.pjonceski.empleyeemanager.ui.features.employee_details_feature.EmployeeDetailsActivity}\n *\n * @param data the extra data to be transferred.\n */\n void navigateToEmployeeDetailsActivity(@Nullable Bundle data);\n}",
"public void deliverLocally(RoutingHeader routingHeader) {\n \n }",
"public RouteObject(\n NsiTopology topology,\n SimpleStp srcStpId,\n SimpleStp dstStpId,\n DirectionalityType directionality,\n Optional<StpListType> ero) throws WebApplicationException {\n\n // Each segment of the a path is assigned a route object with an A and Z end.\n Route route = new Route();\n\n // Get the set of possible source STP identifiers (a range could be provided).\n StpTypeBundle srcBundle = new StpTypeBundle(topology, srcStpId, directionality);\n if (srcBundle.isEmpty()) {\n log.error(\"RouteObject: source STP does not exist in topology: \" + srcStpId.toString());\n throw Exceptions.stpResolutionError(srcStpId.toString());\n }\n\n route.setBundleA(srcBundle);\n\n // Now we process any ERO elements if present.\n if (ero.isPresent()) {\n // We need to process the ERO in order that it was specified.\n List<OrderedStpType> orderedSTP = ero.get().getOrderedSTP();\n Collections.sort(orderedSTP, new CustomComparator());\n\n // Our first processed segment starts with our source STP.\n SimpleStp lastStp = srcStpId;\n\n for (OrderedStpType stp : orderedSTP) {\n // Parse this STP and generate a bundle enumerating all the STP. The\n // specified STP must exist in topology for a bundle to be generated.\n SimpleStp nextStp = new SimpleStp(stp.getStp());\n StpTypeBundle nextBundle = new StpTypeBundle(topology, nextStp, directionality);\n\n // If we did not find an associated bundle the specified ERO STP may\n // be an internal STP used for a domain's internal path computation.\n if (nextBundle.isEmpty()) {\n // The one rule we have is that an internal STP must be bounded by\n // at least one externally visible STP from the same domain. This\n // check is to see if the previous STP was in the same domain.\n //if (!nextStp.getNetworkId().equalsIgnoreCase(lastStp.getNetworkId())) {\n //log.error(\"RouteObject: Internal STP not bounded by external STP: \" + stp.getStp());\n //throw Exceptions.invalidEroError(stp.getStp());\n //}\n\n // Save this internal STP.\n route.addInternalStp(stp.getStp());\n }\n else {\n // We have an inter-domain STP so save it and get the SDP\n // so we know the STP on far end. We may need to filter some\n // of these out if there is no corresponding SDP (mismatching\n // labels on each end of the link).\n nextBundle = nextBundle.getPeerReducedBundle();\n if (nextBundle.isEmpty()) {\n log.error(\"RouteObject: ERO STP not associated with SDP: \" + stp.getStp());\n throw Exceptions.invalidEroError(stp.getStp());\n }\n\n // We have completed this path segment by finding a external\n // interdomain STP.\n route.setBundleZ(nextBundle);\n routes.add(route);\n\n // Now create the bundle associated with the other end of SDP.\n route = new Route();\n\n StpTypeBundle lastBundle = new StpTypeBundle();\n\n for (StpType member : nextBundle.values()) {\n SdpType sdp = topology.getSdp(member.getSdp().getId());\n if (sdp == null) {\n log.error(\"RouteObject: ERO STP not associated with valid SDP in context of request: \" + stp.getStp());\n throw Exceptions.invalidEroMember(stp.getStp());\n }\n if (member.getId().equalsIgnoreCase(sdp.getDemarcationA().getStp().getId())) {\n lastBundle.addStpType(topology.getStp(sdp.getDemarcationZ().getStp().getId()));\n }\n else {\n lastBundle.addStpType(topology.getStp(sdp.getDemarcationA().getStp().getId()));\n }\n }\n\n if (lastBundle.isEmpty()) {\n log.error(\"RouteObject: ERO STP not associated with SDP: \" + stp.getStp());\n throw Exceptions.invalidEroError(stp.getStp());\n }\n\n route.setBundleA(lastBundle);\n lastStp = lastBundle.getSimpleStp();\n }\n }\n }\n\n // Add the original destination endpoint after any inserted ERO points.\n StpTypeBundle dstBundle = new StpTypeBundle(topology, dstStpId, directionality);\n if (dstBundle.isEmpty()) {\n log.error(\"RouteObject: destination STP does not exist in topology: \" + dstStpId.toString());\n throw Exceptions.stpResolutionError(dstStpId.toString());\n }\n\n route.setBundleZ(dstBundle);\n\n // Add this last route to our list of one or more routes.\n routes.add(route);\n\n // We have completed building the ERO but need to check for internal\n // consistency.\n routes.forEach(r -> {\n StpTypeBundle bundleA = r.getBundleA();\n StpTypeBundle bundleZ = r.getBundleZ();\n SimpleStp stpA = bundleA.getSimpleStp();\n SimpleStp stpZ = bundleZ.getSimpleStp();\n\n String network = stpA.getNetworkId();\n for (OrderedStpType internalStp : r.getInternalStp()) {\n SimpleStp istp = new SimpleStp(internalStp.getStp());\n if (!istp.getNetworkId().equalsIgnoreCase(network)) {\n network = stpZ.getNetworkId();\n if (!istp.getNetworkId().equalsIgnoreCase(network)) {\n log.error(\"RouteObject: internal STP {} not a member of networkA {} or networkZ {}\",\n istp.getStpId(), stpA.getNetworkId(), stpZ.getNetworkId());\n throw Exceptions.invalidEroError(istp.getStpId());\n }\n }\n }\n });\n }",
"Route route(String path);",
"@Override public void startUp(FloodlightModuleContext context) {\n restApi.addRestletRoutable(this);\n\n }",
"@Override\n public void init(Router router) {\n\n // /////////////////////////////////////////////////////////////////////\n // some default functions\n // /////////////////////////////////////////////////////////////////////\n // simply render a page:\n router.GET().route(\"/\").with(ApplicationController.class, \"index\");\n router.GET().route(\"/examples\").with(ApplicationController.class, \"examples\");\n\n // render a page with variable route parts:\n router.GET().route(\"/user/{id}/{email}/userDashboard\").with(ApplicationController.class, \"userDashboard\");\n\n router.GET().route(\"/validation\").with(ApplicationController.class, \"validation\");\n\n // redirect back to /\n router.GET().route(\"/redirect\").with(ApplicationController.class, \"redirect\");\n\n router.GET().route(\"/session\").with(ApplicationController.class, \"session\");\n \n router.GET().route(\"/flash_success\").with(ApplicationController.class, \"flashSuccess\");\n router.GET().route(\"/flash_error\").with(ApplicationController.class, \"flashError\");\n router.GET().route(\"/flash_any\").with(ApplicationController.class, \"flashAny\");\n \n router.GET().route(\"/htmlEscaping\").with(ApplicationController.class, \"htmlEscaping\");\n\n // /////////////////////////////////////////////////////////////////////\n // Json support\n // /////////////////////////////////////////////////////////////////////\n router.GET().route(\"/api/person.json\").with(PersonController.class, \"getPersonJson\");\n router.POST().route(\"/api/person.json\").with(PersonController.class, \"postPersonJson\");\n \n router.GET().route(\"/api/person.xml\").with(PersonController.class, \"getPersonXml\");\n router.POST().route(\"/api/person.xml\").with(PersonController.class, \"postPersonXml\");\n\n // /////////////////////////////////////////////////////////////////////\n // Form parsing support\n // /////////////////////////////////////////////////////////////////////\n router.GET().route(\"/contactForm\").with(ApplicationController.class, \"contactForm\");\n router.POST().route(\"/contactForm\").with(ApplicationController.class, \"postContactForm\");\n\n // /////////////////////////////////////////////////////////////////////\n // Cache support test\n // /////////////////////////////////////////////////////////////////////\n router.GET().route(\"/test_caching\").with(ApplicationController.class, \"testCaching\");\n \n // /////////////////////////////////////////////////////////////////////\n // Lifecycle support\n // /////////////////////////////////////////////////////////////////////\n router.GET().route(\"/udpcount\").with(UdpPingController.class, \"getCount\");\n \n // /////////////////////////////////////////////////////////////////////\n // Route filtering example:\n // /////////////////////////////////////////////////////////////////////\n router.GET().route(\"/filter\").with(FilterController.class, \"filter\");\n router.GET().route(\"/teapot\").with(FilterController.class, \"teapot\");\n\n // /////////////////////////////////////////////////////////////////////\n // Route filtering example:\n // /////////////////////////////////////////////////////////////////////\n router.GET().route(\"/injection\").with(InjectionExampleController.class, \"injection\");\n\n // /////////////////////////////////////////////////////////////////////\n // Async example:\n // /////////////////////////////////////////////////////////////////////\n router.GET().route(\"/async\").with(AsyncController.class, \"asyncEcho\");\n\n // /////////////////////////////////////////////////////////////////////\n // I18n:\n // /////////////////////////////////////////////////////////////////////\n router.GET().route(\"/i18n\").with(I18nController.class, \"index\");\n router.GET().route(\"/i18n/{language}\").with(I18nController.class, \"indexWithLanguage\");\n\n // /////////////////////////////////////////////////////////////////////\n // Upload showcase\n // /////////////////////////////////////////////////////////////////////\n router.GET().route(\"/upload\").with(UploadController.class, \"upload\");\n router.POST().route(\"/uploadFinish\").with(UploadController.class, \"uploadFinish\");\n \n \n //this is a route that should only be accessible when NOT in production\n // this is tested in RoutesTest\n if (!ninjaProperties.isProd()) {\n router.GET().route(\"/_test/testPage\").with(ApplicationController.class, \"testPage\");\n }\n\n router.GET().route(\"/assets/.*\").with(AssetsController.class, \"serve\");\n }",
"@Override\n public void addDefaultRoutes() {\n super.addDefaultRoutes();\n addRoute( \"/user\", UserResponder.class );\n addRoute( \"/user/:id\", UserResponder.class );\n addRoute( \"/user/help\", GeneralResponder.class );\n addRoute( \"/general/:param1/:param2\", GeneralResponder.class );\n addRoute( \"/photos/:customer_id/:photo_id\", null );\n addRoute( \"/test\", String.class );\n addRoute( \"/interface\", Responder.class ); // this will cause an error\n addRoute( \"/toBeDeleted\", String.class );\n removeRoute( \"/toBeDeleted\" );\n addRoute( \"/stream\", StreamUrl.class );\n addRoute( \"/browse/(.)+\", StaticPageTestResponder.class, new File( \"src/test/resources\" ).getAbsoluteFile() );\n }",
"public interface Action {\n\n /**\n * Execute.\n *\n * @param router the router\n * @param request the request\n * @return the response\n */\n public Response execute(Router router, Request request);\n\n}",
"@Override\n public void startUp(FloodlightModuleContext context) {\n restApi.addRestletRoutable(this);\n }",
"@SuppressWarnings(\"unchecked\")\r\n private Route attach(Router router, String targetClassName,\r\n String uriPattern, boolean defaultRoute) {\r\n Route route = null;\r\n // Load the application class using the given class name\r\n if (targetClassName != null) {\r\n try {\r\n Class<?> targetClass = Engine.classForName(targetClassName);\r\n \r\n // First, check if we have a Resource class that should be\r\n // attached directly to the router.\r\n if (Resource.class.isAssignableFrom(targetClass)) {\r\n Class<? extends Resource> resourceClass = (Class<? extends Resource>) targetClass;\r\n \r\n if (uriPattern != null && !defaultRoute) {\r\n route = router.attach(uriPattern, resourceClass);\r\n } else {\r\n route = router.attachDefault(resourceClass);\r\n }\r\n } else {\r\n Restlet target = null;\r\n \r\n try {\r\n // Create a new instance of the application class by\r\n // invoking the constructor with the Context parameter.\r\n target = (Restlet) targetClass.getConstructor(\r\n Context.class).newInstance(getContext());\r\n } catch (NoSuchMethodException e) {\r\n getLogger()\r\n .log(\r\n Level.WARNING,\r\n \"Couldn't invoke the constructor of the target class. Please check this class has a constructor with a single parameter of type Context. The empty constructor and the context setter will be used instead.\",\r\n e);\r\n \r\n // The constructor with the Context parameter does not\r\n // exist. Instantiate an application with the default\r\n // constructor then invoke the setContext method.\r\n target = (Restlet) targetClass.getConstructor()\r\n .newInstance();\r\n \r\n // Set the context based on the component's context\r\n target.setContext(getContext());\r\n }\r\n \r\n if (target != null) {\r\n if (uriPattern != null && !defaultRoute) {\r\n route = router.attach(uriPattern, target);\r\n } else {\r\n route = router.attachDefault(target);\r\n }\r\n }\r\n }\r\n } catch (ClassNotFoundException e) {\r\n getLogger().log(\r\n Level.WARNING,\r\n \"Couldn't find the target class. Please check that your classpath includes \"\r\n + targetClassName, e);\r\n \r\n } catch (InstantiationException e) {\r\n getLogger()\r\n .log(\r\n Level.WARNING,\r\n \"Couldn't instantiate the target class. Please check this class has an empty constructor \"\r\n + targetClassName, e);\r\n } catch (IllegalAccessException e) {\r\n getLogger()\r\n .log(\r\n Level.WARNING,\r\n \"Couldn't instantiate the target class. Please check that you have to proper access rights to \"\r\n + targetClassName, e);\r\n } catch (NoSuchMethodException e) {\r\n getLogger()\r\n .log(\r\n Level.WARNING,\r\n \"Couldn't invoke the constructor of the target class. Please check this class has a constructor with a single parameter of Context \"\r\n + targetClassName, e);\r\n } catch (InvocationTargetException e) {\r\n getLogger()\r\n .log(\r\n Level.WARNING,\r\n \"Couldn't instantiate the target class. An exception was thrown while creating \"\r\n + targetClassName, e);\r\n }\r\n }\r\n return route;\r\n }",
"public interface PrivateApiRoutes {\n}",
"public Route routes() {\n return concat(\n pathPrefix(\"hello\", () ->\n concat(\n getHello(),\n path(PathMatchers.segment(), message -> concat(\n getAck(message)\n )\n )\n )\n ),\n pathPrefix(\"mission\", this::handleMission)\n );\n }",
"public OntoBridge()\r\n\t{ \r\n\t}",
"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 List<BaggageRoute> getBaggageRoutes(BaggageProcessor processor);",
"public void addRoutes(Routing routing) {\n\n // Map to /foo\n routing.route(path(\"foo\", new Handler() {\n public void handle(Exchange exchange) {\n exchange.getResponse().send(\"from the foo handler\");\n }\n }));\n\n // Map to /bar\n routing.route(path(\"bar\", new Handler() {\n public void handle(Exchange exchange) {\n exchange.getResponse().send(\"from the bar handler\");\n }\n }));\n\n // Set up a nested routing block, where\n routing.route(path(\"nested\", new RoutingBuilder<Routing>() {\n public void addRoutes(Routing routing) {\n\n // Map to /nested/*/*\n routing.route(exactPath(\":var1/:var2\", new Handler() {\n public void handle(Exchange exchange) {\n // The path tokens are the :var1 and :var2 path components above\n Map<String, String> pathTokens = exchange.getPathTokens();\n exchange.getResponse().send(\"from the nested handler, var1: \" + pathTokens.get(\"var1\") + \", \" + pathTokens.get(\"var2\"));\n }\n }));\n }\n }));\n\n // Map a dependency injected handler to\n routing.route(path(\"injected\", handler(MyHandler.class)));\n\n // Bind the /static app path to the src/ratpack/assets dir\n // Try /static/logo.png\n routing.route(assetsPath(\"static\", \"assets\", new Handler() {\n public void handle(Exchange exchange) {\n exchange.getResponse().status(404).send();\n }\n }));\n\n // If nothing above matched, we'll get to here.\n routing.route(new Handler() {\n public void handle(Exchange exchange) {\n exchange.getResponse().send(\"root handler!\");\n }\n });\n }",
"public RouteResponse findRoute(RouteRequest routeRequest);",
"@Override\n\tpublic void onGetMassTransitRouteResult(MassTransitRouteResult arg0) {\n\n\t}",
"@Override\r\n \t\tpublic void configRoute(Routes me) {\n \t\t\tsuper.configRoute(me);\r\n \t\t\tme.add(\"/\", TestController.class, \"\");\r\n \t\t}",
"private void discoverNew(RoutingContext rctx) {\n rctx.response().end(new ObjectBuilder().build());\n }",
"public String getRoutingNo();",
"public interface IMainRouter {\n\n\t/**\n\t * Method to run wallet tab.\n\t *\n\t * @param activity activity that hold fragment\n\t */\n\tvoid goToWalletTab(FragmentActivity activity);\n\n\t/**\n\t * Method to run transactions history tab.\n\t *\n\t * @param activity activity that hold fragment\n\t */\n\tvoid goToHistoryTab(FragmentActivity activity);\n\n\t/**\n\t * Method to run user contacts tab.\n\t *\n\t * @param activity activity that hold fragment\n\t */\n\tvoid goToContactsTab(FragmentActivity activity);\n\n\t/**\n\t * Method to open settings tab.\n\t *\n\t * @param activity activity that hold fragment\n\t */\n\tvoid goToSettingsTab(FragmentActivity activity);\n\n\t/**\n\t * Method to open import or create wallet screen.\n\t *\n\t * @param context context\n\t */\n\tvoid openImportOrCreate(Context context);\n}",
"@Override\n public String handleRoute(String requestBody) {\n Gson gson = new Gson();\n Wrap sessionWrap = null;\n try {\n sessionWrap = gson.fromJson(requestBody, Wrap.class);\n } catch (JsonSyntaxException e) {\n logger.log(Level.WARNING, \"Failed to unwrap Json wrapper\", e);\n }\n Expression expression = sessionWrap.getExpression();\n // Extract protocol from expression\n String protocol = expression.getProtocol();\n // Forward to correct protocol application\n String protocolServicePath = \"NotSet\";\n if (protocolMap.containsKey(protocol)) {\n protocolServicePath = protocolMap.get(protocol);\n logger.log(Level.INFO, \"Sending packet to a protocol service..\");\n return transmissionHandler.handleTransmission(sessionWrap, protocolServicePath);\n } else {// Else inform service is down\n logger.log(Level.WARNING, \"Protocolservice: \" + protocol\n + \" not found, either it is down, or the service reference is wrong.\");\n }\n return protocolServicePath; // returns string NotSet\n }",
"public Object getRouting() {\n return this.routing;\n }",
"void setup(HttpRouting.Builder routing);",
"public interface RoutingAlgorithm {\n public void initMapInfo(int[][] map);\n public int getShortestPath(int start,int end);\n}",
"String viewRouteDetails(String source, String destination);",
"@Override\n\t\tpublic void onGetTransitRouteResult(MKTransitRouteResult arg0, int arg1) {\n\t\t\t\n\t\t}",
"@Override\n\tpublic Router getRestlet(Context context){\n\t\tRouter router = new Router(context);\n\t\trouter.attach(\"/links/json\", LinksResource.class);\n\t\trouter.attach(\"/config/json\",FdmReq_CapResource.class);\n\t\t\n\t\t\n\t\treturn router;\n\t}",
"@Override\n\t\tpublic void rest() {\n\t\t\t\n\t\t}",
"public abstract String redirectTo();",
"@Override\n public void onArriveDestination() {\n\n }",
"@RequestMapping(value = \"/link\", method = RequestMethod.GET)\n\tString link() {\n\t\ttry {\n\t\t\thueUseCase.linkBridgeWithNewUser();\n\t\t} catch (NullPointerException e) {\n\t\t\t// User did not press the Bridge button.\n\t\t\tSonarUtil.swallowException(e);\n\t\t\treturn \"setup\";\n\t\t}\n\n\t\treturn \"redirect:/configdata\";\n\t}",
"@Override\n\tpublic Restlet createInboundRoot() {\n\t\tRouter router = new Router(getContext());\n\t\trouter.attach(\"/supermarche/clients\", ResourceClients.class);\n\t\trouter.attach(\"/supermarche/clients/\", ResourceClients.class);\n\n\t\trouter.attach(\"/supermarche/clients/{id}\", ResourceClient.class);\n\t\trouter.attach(\"/supermarche/clients/{id}/\", ResourceClient.class);\n\n\t\trouter.attach(\"/supermarche/stock\", ResourceStocks.class);\n\t\trouter.attach(\"/supermarche/stock/\", ResourceStocks.class);\n\t\treturn router;\n\t}",
"public interface RouteConfigurator {\n\n PSConnector setLocalIpAddress(String cidr);\n\n PSConnector setStaticRoute(String destCidr, String nextHopeIpAddress);\n\n void setTunnelStaticRoute(String siteId, String destCidr);\n\n PSConnector setTunnel(String tunnelId, String localIpAddress, String remoteIpAddress);\n\n void setSiteToTunnel(String siteId, String tunnelId);\n\n PSConnector setDefaultGateway(String ipAddress);\n\n Set<RouteEntry>getRouteEntrySet();\n\n\n\n}",
"public interface IServerRouter {\n\t Optional<IServerAction> get(IServerExchange e);\n\n}",
"ForwardAction createForwardAction();",
"@Override\n\tpublic void onArriveDestination() {\n\n\t}",
"public interface RouteProtocol {\n\n default void onBeforeLaunch(@NonNull Context context) {}\n default int getLaunchDelay() { return 0; }\n default boolean willActivityFinish() { return false; }\n @NonNull\n Intent getIntent(@NonNull Context context);\n}",
"@SneakyThrows\n private void invokeRequestRouting(Class<?> clazz, Injector injector) {\n log.info(MODULE_NAME + clazz.getName());\n Route route = clazz.getAnnotation(Route.class);\n String prefix = route.value();\n Object instance = injector.getInstance(clazz);\n clazz.getMethod(ROUTE_METHOD_NAME, String.class).invoke(instance, prefix);\n Method[] methods = clazz.getMethods();\n for (Method method : Arrays.asList(methods)) {\n if (method.isAnnotationPresent(RequestRouting.class)) {\n RequestRouting requestRouting = method.getAnnotation(RequestRouting.class);\n String path = requestRouting.path();\n int order = requestRouting.order();\n path = (StringUtils.isNotEmpty(prefix)) ? prefix + path : path;\n router.route(requestRouting.method(), path).order(order).handler(rc -> {\n try {\n method.invoke(instance, rc);\n } catch (Exception e) {\n log.error(MODULE_NAME + e.getMessage());\n }\n });\n }\n }\n }",
"@Override\r\n\tpublic void onGetTransitRouteResult(MKTransitRouteResult arg0, int arg1) {\n\t\t\r\n\t}",
"public interface RoutesApi\n{\n\n //TODO add all methods from the API and annotate according to Retrofit\n\n @GET(\"/routecollection/{startLocation}\")\n void getRoutes(@Path(\"startLocation\")String startLocation, Callback<Routes> routes);\n\n\n @POST(\"/placeRoute\")\n void placeRoute(Route newRoute, Callback callback);\n\n @DELETE(\"/deleteRoute\")\n void deleteRoute(Long routeId);\n\n\n\n}",
"public interface loadBalanceRoutingService {\n Set<Path> getLoadPaths(Topology topo, ElementId src, ElementId dst);\n Set<Path> getLoadPaths(ElementId src, ElementId dst);\n}",
"@ARouterRemoteAction(Key = ConfigKey.BUNDLE_USER_KEY, RemoteAction = \"/user/service\")\npublic interface RouterUserCommand {\n String goUserHomeActivity = \"goUserHomeActivity\";\n String goUserRechargeActivity = \"goUserRechargeActivity\";\n}",
"@Override\n\t\tpublic void onGetWalkingRouteResult(MKWalkingRouteResult arg0, int arg1) {\n\t\t\t\n\t\t}",
"@Override\n public synchronized Restlet createInboundRoot() {\n\n Router router = new Router(getContext());\n router.attach(\"/\" + outputWSConfig.getKeywordPath(), KeywordQueryExecutorResource.class);\n router.attach(\"/\" + outputWSConfig.getUriPath(), UriQueryExecutorResource.class);\n router.attach(\"/\" + outputWSConfig.getMetadataPath(), MetadataQueryExecutorResource.class);\n router.attach(\"/\" + outputWSConfig.getNamedGraphPath(), NamedGraphQueryExecutorResource.class);\n return router;\n }",
"String createRoute(RouteBean route);",
"private void loadComponents(String compName) throws ClassNotFoundException {\n Class component = Class.forName(compName);\n Method[] compMethods = component.getDeclaredMethods();\n for(Method m: compMethods){\n if(m.isAnnotationPresent(RequestMapping.class)){\n route.put(m.getAnnotation(RequestMapping.class).value(),m);\n }\n }\n }",
"interface ActionDelegate {\n\n void onRouteUrlsChanged();\n\n void onResetRouteUrls();\n\n void onSaveRouteUrls();\n }",
"public int addRoute(RouteEntry rtEntry);",
"private void configureRoutesAndExceptions() {\n\n }",
"java.lang.String getRoutingKey();",
"public interface RouteFinish {\n\n String execute(HttpRequest req,HttpResponse res,NextOperation next);\n\n}",
"public RoutingProcessor(Network netIn)\r\n {\r\n network_topology = netIn;\r\n routing_method = \"SHP\";\r\n }",
"void btnGenerateRoute();",
"@Override\n protected RouterFunction<ServerResponse> getRoutingFunction(ErrorAttributes errorAttributes) {\n return RouterFunctions.route(RequestPredicates.all(),this::errorHandler);\n }",
"Object routeMessage(Message message) throws IOException;",
"@Override\n\t\tpublic void onGetDrivingRouteResult(MKDrivingRouteResult arg0, int arg1) {\n\t\t\t\n\t\t}",
"private void dispatchRequests(RoutingContext context) {\n int initialOffset = 5; // length of `/api/`\n // Run with circuit breaker in order to deal with failure\n circuitBreaker.execute(future -> {\n getAllEndpoints().setHandler(ar -> {\n if (ar.succeeded()) {\n List<Record> recordList = ar.result();\n // Get relative path and retrieve prefix to dispatch client\n String path = context.request().uri();\n if (path.length() <= initialOffset) {\n notFound(context);\n future.complete();\n return;\n }\n\n String prefix = (path.substring(initialOffset).split(\"/\"))[0];\n String newPath = path.substring(initialOffset + prefix.length());\n\n // Get one relevant HTTP client, may not exist\n Optional<Record> client = recordList.stream()\n .filter(record -> record.getMetadata().getString(\"api.name\") != null)\n .filter(record -> record.getMetadata().getString(\"api.name\").equals(prefix))\n .findAny(); // simple load balance\n\n if (client.isPresent()) {\n doDispatch(context, newPath, discovery.getReference(client.get()).get(), future);\n } else {\n notFound(context);\n future.complete();\n }\n } else {\n future.fail(ar.cause());\n }\n });\n }).setHandler(ar -> {\n if (ar.failed()) {\n badGateway(ar.cause(), context);\n }\n });\n }",
"@Override\r\n\tpublic void navigate() {\n\t\t\r\n\t}",
"public void testMissingRouteAfterMerge() throws Exception {\n a=createNode(LON, \"A\", LON_CLUSTER, null);\n b=createNode(LON, \"B\", LON_CLUSTER, null);\n Util.waitUntilAllChannelsHaveSameView(30000, 1000, a, b);\n\n x=createNode(SFO, \"X\", SFO_CLUSTER, null);\n assert x.getView().size() == 1;\n\n RELAY2 ar=a.getProtocolStack().findProtocol(RELAY2.class),\n xr=x.getProtocolStack().findProtocol(RELAY2.class);\n\n assert ar != null && xr != null;\n\n JChannel a_bridge=null, x_bridge=null;\n for(int i=0; i < 20; i++) {\n a_bridge=ar.getBridge(SFO);\n x_bridge=xr.getBridge(LON);\n if(a_bridge != null && x_bridge != null && a_bridge.getView().size() == 2 && x_bridge.getView().size() == 2)\n break;\n Util.sleep(500);\n }\n\n assert a_bridge != null && x_bridge != null;\n\n System.out.println(\"A's bridge channel: \" + a_bridge.getView());\n System.out.println(\"X's bridge channel: \" + x_bridge.getView());\n assert a_bridge.getView().size() == 2 : \"bridge view is \" + a_bridge.getView();\n assert x_bridge.getView().size() == 2 : \"bridge view is \" + x_bridge.getView();\n\n Route route=getRoute(x, LON);\n System.out.println(\"Route at sfo to lon: \" + route);\n assert route != null;\n\n // Now inject a partition into site LON\n System.out.println(\"Creating partition between A and B:\");\n createPartition(a, b);\n\n System.out.println(\"A's view: \" + a.getView() + \"\\nB's view: \" + b.getView());\n assert a.getView().size() == 1 && b.getView().size() == 1;\n\n route=getRoute(x, LON);\n System.out.println(\"Route at sfo to lon: \" + route);\n assert route != null;\n\n View bridge_view=xr.getBridgeView(BRIDGE_CLUSTER);\n System.out.println(\"bridge_view = \" + bridge_view);\n\n // Now make A and B form a cluster again:\n View merge_view=new MergeView(a.getAddress(), 10, Arrays.asList(a.getAddress(), b.getAddress()),\n Arrays.asList(View.create(a.getAddress(), 5, a.getAddress()),\n View.create(b.getAddress(), 5, b.getAddress())));\n GMS gms=a.getProtocolStack().findProtocol(GMS.class);\n gms.installView(merge_view, null);\n gms=b.getProtocolStack().findProtocol(GMS.class);\n gms.installView(merge_view, null);\n\n Util.waitUntilAllChannelsHaveSameView(20000, 500, a, b);\n System.out.println(\"A's view: \" + a.getView() + \"\\nB's view: \" + b.getView());\n\n for(int i=0; i < 20; i++) {\n bridge_view=xr.getBridgeView(BRIDGE_CLUSTER);\n if(bridge_view != null && bridge_view.size() == 2)\n break;\n Util.sleep(500);\n }\n\n route=getRoute(x, LON);\n System.out.println(\"Route at sfo to lon: \" + route);\n assert route != null;\n }",
"@Delegate\n @Path(\"/projects/{project}/global\")\n RouteApi getRouteApi(@PathParam(\"project\") String projectName);",
"abstract protected Result doNetworkAction(Params... params) throws Exception;",
"public void setRoutes(Route base) {\n\t\tthis.base = base;\n\t}",
"ViewMap<IBranchMapping> getView();",
"@Override\n\tpublic void onCalculateRouteSuccess() {\n\t\tnaviActivity();\n\t}",
"List<Route> getAllRoute();",
"@Override\r\n\tpublic void onGetDrivingRouteResult(MKDrivingRouteResult arg0, int arg1) {\n\t\t\r\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n private Route attachWithDescriptor(Router router, String targetDescriptor,\r\n String uriPattern, boolean defaultRoute) {\r\n Route route = null;\r\n String targetClassName = null;\r\n try {\r\n // Only WADL descriptors are supported at this moment.\r\n targetClassName = \"org.restlet.ext.wadl.WadlApplication\";\r\n Class<?> targetClass = Engine.classForName(targetClassName);\r\n \r\n // Get the WADL document\r\n Response response = getContext().getClientDispatcher().get(\r\n targetDescriptor);\r\n if (response.getStatus().isSuccess()\r\n && response.isEntityAvailable()) {\r\n Representation representation = response.getEntity();\r\n // Create a new instance of the application class by\r\n // invoking the constructor with the Context parameter.\r\n Application target = (Application) targetClass.getConstructor(\r\n Context.class, Representation.class).newInstance(\r\n getContext(), representation);\r\n if (target != null) {\r\n if (uriPattern != null && !defaultRoute) {\r\n route = router.attach(uriPattern, target);\r\n } else {\r\n route = router.attachDefault(target);\r\n }\r\n }\r\n } else {\r\n getLogger()\r\n .log(\r\n Level.WARNING,\r\n \"The target descriptor has not been found or is not available, or no client supporting the URI's protocol has been defined on this component. \"\r\n + targetDescriptor);\r\n }\r\n } catch (ClassNotFoundException e) {\r\n getLogger().log(\r\n Level.WARNING,\r\n \"Couldn't find the target class. Please check that your classpath includes \"\r\n + targetClassName, e);\r\n } catch (InstantiationException e) {\r\n getLogger()\r\n .log(\r\n Level.WARNING,\r\n \"Couldn't instantiate the target class. Please check this class has an empty constructor \"\r\n + targetClassName, e);\r\n } catch (IllegalAccessException e) {\r\n getLogger()\r\n .log(\r\n Level.WARNING,\r\n \"Couldn't instantiate the target class. Please check that you have to proper access rights to \"\r\n + targetClassName, e);\r\n } catch (NoSuchMethodException e) {\r\n getLogger()\r\n .log(\r\n Level.WARNING,\r\n \"Couldn't invoke the constructor of the target class. Please check this class has a constructor with a single parameter of Context \"\r\n + targetClassName, e);\r\n } catch (InvocationTargetException e) {\r\n getLogger()\r\n .log(\r\n Level.WARNING,\r\n \"Couldn't instantiate the target class. An exception was thrown while creating \"\r\n + targetClassName, e);\r\n }\r\n \r\n return route;\r\n }",
"@Override\r\n\tpublic void onGetWalkingRouteResult(MKWalkingRouteResult arg0, int arg1) {\n\t\t\r\n\t}",
"String getRouteDest();",
"@Override\r\n\t\tprotected Void doInBackground(Void... params) {\r\n\t\t\tgetBusRoutes();\r\n\t\t\treturn null;\r\n\t\t}",
"@Override\n protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException {\n ModelNode config = Resource.Tools.readModel(context.readResource(PathAddress.EMPTY_ADDRESS));\n\n MultiTenantRouterConfigurationBuilder configuration = new MultiTenantRouterConfigurationBuilder();\n MultiTenantRouterService routerService = new MultiTenantRouterService(configuration, getServiceName(config));\n\n final ServiceName MultitenantRouterServiceName = EndpointUtils.getServiceName(operation, \"router\");\n ServiceBuilder<?> builder = context.getServiceTarget().addService(MultitenantRouterServiceName, routerService);\n EndpointUtils.addSocketBindingDependency(builder, operation.get(ModelKeys.HOTROD_SOCKET_BINDING).asString(), routerService.getHotrodSocketBinding());\n EndpointUtils.addSocketBindingDependency(builder, operation.get(ModelKeys.REST_SOCKET_BINDING).asString(), routerService.getRestSocketBinding());\n\n ModelNode multiTenancyInnerConfiguration = config.get(ModelKeys.MULTI_TENANCY, ModelKeys.MULTI_TENANCY_NAME);\n\n addHotRod(multiTenancyInnerConfiguration, routerService, builder);\n addRest(multiTenancyInnerConfiguration, routerService, builder);\n\n builder.install();\n }",
"public abstract Route combineWith(Route other, double ratio);",
"private void mappingMethods() throws SecurityException, NoSuchMethodException{\n\t\tmappingMethodGet();\n\t\tmappingMethodSet();\n\t}",
"@Override\n\t\t\t\tpublic void onCalculateMultipleRoutesSuccess(int[] arg0) {\n\t\t\t\t\t\n\t\t\t\t}",
"protected void loadRoutesFromClasses(final App app){\n\t\t//Load web app's routes.\n log.debug(\"Load routes[base-path=/] from classes in base package '{}'\", app.getBasePackage());\n\t\tfinal String basePackage = app.getBasePackage();\n\t\tapp.config().getResources().processClasses((cls) -> {\n\t\t\tif(cls.getName().startsWith(basePackage)){\n\t\t\t\tif(as.isControllerClass(cls)){\n log.debug(\" Load controller '{}'\", cls.getName());\n\t\t\t\t\tloadControllerClass(app, \"/\", cls);\n\t\t\t\t}\t\t\t\t\t\n\t\t\t}\n\t\t});\n\n\t\t//Load web module's routes.\n\t\tfor(ModuleConfig module : app.getWebConfig().getModules()){\n\t\t\t// don't repeat load controller\n\t\t\tif(Strings.startsWith(module.getBasePackage()+\".\",basePackage+\".\")){\n\t\t\t\tif(Strings.isEmpty(module.getBasePath())||Strings.equals(\"/\",module.getBasePath())){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n log.debug(\"Scanning module resource(s) in package '{}'...\", module.getBasePackage());\n ResourceSet rs = Resources.scanPackage(module.getBasePackage());\n\n if(rs.isEmpty()) {\n log.info(\"No resource scanned in base package '{}' of module '{}', is the module exists?\",\n\t\t\t\t\t\tmodule.getBasePackage(), module.getName());\n }else{\n String appContextPath = app.getContextPath().equals(\"\") ? \"/\" : app.getContextPath();\n String moduleContextPath = module.getContextPath();\n\n if(Strings.isEmpty(moduleContextPath) || appContextPath.equals(moduleContextPath)) {\n\n log.debug(\"Load routes[base-path={}' from classes in base package '{}' of module '{}'.\",\n module.getBasePath(), module.getBasePackage(), module.getName());\n\n rs.processClasses((cls) -> {\n if(as.isControllerClass(cls)) {\n loadControllerClass(app, module.getBasePath(), cls);\n }\n });\n\n }\n }\n }\n\t}",
"protected int route(byte buffer[], int source) {\n \n // Get the message level\n byte messageLevel = getMessageLevel( buffer );\n // get the messageID\n byte messageID[] = getMessageID( buffer );\n \n // Check that the message was not received before\n if( messageIsNew( messageID )){\n \trecordMessageID( messageID );\n }\n else{\n \treturn Constants.SUCCESS;\n }\n \n // If I am not the sender of the message\n // add it to the message queue\n if (messageLevel == Constants.MESSAGE_ALL && source != Constants.SRC_ME){\n // Add message to message queue\n \taddMessageToQueue( buffer );\n }\n else if (messageLevel == Constants.MESSAGE_TARGET){\n \tbyte[] target = getTarget( buffer );\n \tif (target == this.address) {\n \t\t//Add to the message queue\n \t\treturn Constants.SUCCESS; //DO NOT send to all threads.\n \t}\n }\n \n // Send the message to all the threads\n synchronized (this.rwThreads) {\n for (ReadWriteThread aThread : rwThreads) {\n Log.d(TAG, \"Writing to device on thread: \" + aThread.getName());\n aThread.write(buffer);\n }\n }\n \n return Constants.SUCCESS;\n }",
"public void handleIncoming() {\n\t\t// parse the packet payload\n\t\tPair<Packet,Integer> pp = fwdr.receivePkt();\n\t\tPacket p = pp.left; int lnk = pp.right;\n\n\t\tString[] lines = p.payload.split(\"\\n\");\n\t\tif (!lines[0].equals(\"RPv0\")) return;\n\n\t\tString[] chunks = lines[1].split(\":\");\n\t\tif (!chunks[0].equals(\"type\")) return;\n\t\tString type = chunks[1].trim();\n\t\t\n\t\t// if it's an route advert, call handleAdvert\n\t\tif (type.equals(\"advert\")){\n\t\t\thandleAdvert(lines, lnk);\n\t\t}\n\t\t// if it's an link failure advert, call handleFailureAdvert\n\t\tif (type.equals(\"fadvert\")){\n\t\t\thandleFailureAdvert(lines, lnk);\n\t\t}\n\t\t// if it's a hello, echo it back\n\t\tif (type.equals(\"hello\")){\n\t\t\tchunks = lines[2].split(\":\");\n\t\t\tif (!chunks[0].equals(\"timestamp\")) return;\n\t\t\tString timestamp = chunks[1].trim();\n\t\t\tp.payload = String.format(\"RPv0\\ntype: echo\\n\"\n\t\t\t\t\t+ \"timestamp: %s \\n\", timestamp);\n\t\t\tfwdr.sendPkt(p, lnk);\n\t\t}\n\t\t// else it's a reply to a hello packet\n\t\t// use timestamp to determine round-trip delay\n\t\t// use this to update the link cost using exponential\n\t\t// weighted moving average method\n\t\t// also, update link cost statistics\n\t\t// also, set gotReply to true\n\t\telse {\n\t\t\tchunks = lines[2].split(\":\");\n\t\t\tif (!chunks[0].equals(\"timestamp\")) return;\n\t\t\tString timeString = chunks[1].trim();\n\t\t\tdouble timestamp = Double.parseDouble(timeString);\n\t\t\tdouble rtDelay = now - timestamp;\n\n\t\t\tLinkInfo link = lnkVec.get(lnk);\n\t\t\tlink.helloState = 3;\n\t\t\tlink.cost = rtDelay/2;\n\t\t\tRoute rt = new Route();\n\t\t\trt.outLink = lnk;\n\t\t\tboolean match = false;\n\t\t\tfor (Route rte : rteTbl){\n\t\t\t\tif (rte.outLink == lnk){\n\t\t\t\t\trt = rte;\n\t\t\t\t\tmatch = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t\tRoute newRt = rt;\n\t\t\tlink.count = 0;\n\t\t\tlink.totalCost = 0;\n\t\t\tfor (LinkInfo l : lnkVec){\n\t\t\t\tif(l.helloState != 0){\n\t\t\t\t\tlink.count++;\n\t\t\t\t\tlink.totalCost += l.cost;\n\t\t\t\t}\n\t\t\t}\n\t\t\tnewRt.cost = link.cost;\n\t\t\tif (updateRoute(rt,newRt)){\n\t\t\t\tlink.cost = rt.cost;\n\t\t\t}\n\t\t\tif (link.cost > link.maxCost){\n\t\t\t\tlink.maxCost = link.cost;\n\t\t\t}\n\t\t\tif (link.cost < link.minCost){\n\t\t\t\tlink.minCost = link.cost;\n\t\t\t}\n\t\t\tlink.gotReply = true;\n\t\t\tlnkVec.set(lnk, link);\n\t\t}\n\n\t}"
]
| [
"0.6415922",
"0.6377646",
"0.62237227",
"0.61657965",
"0.61147714",
"0.61147714",
"0.6044255",
"0.6004163",
"0.59989434",
"0.59453756",
"0.59043175",
"0.58917814",
"0.58264077",
"0.5821707",
"0.5805509",
"0.5769907",
"0.57496816",
"0.5746269",
"0.5669434",
"0.5663894",
"0.5653654",
"0.56458527",
"0.56373864",
"0.56024206",
"0.5597228",
"0.5594879",
"0.5594065",
"0.55849785",
"0.55560476",
"0.5553959",
"0.55516684",
"0.55465144",
"0.5539212",
"0.5535868",
"0.55260664",
"0.54847974",
"0.54820204",
"0.5455632",
"0.5440271",
"0.5437667",
"0.5430298",
"0.54159206",
"0.5415607",
"0.5407602",
"0.53898036",
"0.5384754",
"0.5381021",
"0.53545314",
"0.5348012",
"0.5347618",
"0.5337067",
"0.5330862",
"0.5322174",
"0.53138304",
"0.53085375",
"0.5289698",
"0.52782404",
"0.527312",
"0.52722687",
"0.5257132",
"0.5256554",
"0.5239249",
"0.5228643",
"0.5219449",
"0.5201889",
"0.5197257",
"0.5188142",
"0.51857036",
"0.5183983",
"0.5181886",
"0.51783127",
"0.5170144",
"0.5169346",
"0.5153539",
"0.5150406",
"0.51413125",
"0.5141186",
"0.51389813",
"0.51327753",
"0.51289225",
"0.51268375",
"0.51037353",
"0.51002884",
"0.50899786",
"0.50843436",
"0.50843143",
"0.50837284",
"0.50762933",
"0.50651866",
"0.50622034",
"0.50552773",
"0.5052562",
"0.5048533",
"0.504781",
"0.50346255",
"0.50310165",
"0.5025066",
"0.5014617",
"0.50109595",
"0.5006826",
"0.4996713"
]
| 0.0 | -1 |
send to bridge clients if we have bridge | public static void broadcastPermissionMessage(String message, String permission)
{
if (haveBridge)
{
bridge.broadcastMessage(message, permission, true);
}
else
{
//standard broadcast
server.broadcast(message, permission);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean enterBridge(BridgeEntity bridge);",
"public boolean isBridge() {\n return (getAccessFlags() & Constants.ACCESS_BRIDGE) > 0;\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic synchronized boolean doActivity() {\n\t\tJSONObject json = new JSONObject();\n\t\tjson.put(\"command\", SERVER_ANNOUNCE);\n\t\tjson.put(\"id\", id);\n\t\tjson.put(\"load\", loadConnections.size());\n\t\tjson.put(\"hostname\", Settings.getLocalHostname());\n\t\tjson.put(\"port\", Settings.getLocalPort());\n\t\tfor (Connection cons : broadConnections) {\n\t\t\tcons.writeMsg(json.toJSONString());\n\t\t}\n\t\treturn false;\n\t}",
"private boolean pushGameInfoToOtherDevice(){\n //some code to push board to other device\n\n return false;\n }",
"private void doJoin(){\n\n final String aggHost = System.getProperty(\"aggregate.host.uri\", \"\");\n if (aggHost.isEmpty()) {\n command(\"/aggregate\", \"addBot\", Record.of()\n .slot(\"node\", nodeUri().toString())\n .slot(\"key\", System.getProperty(\"device.name\", \"\")));\n } else {\n command(aggHost, \"/aggregate\", \"addBot\", Record.of()\n .slot(\"host\", hostUriHack().toString()) // ws://192.168.0.151:9001\n .slot(\"node\", nodeUri().toString()) // /bot/6\n .slot(\"key\", System.getProperty(\"device.name\", \"\")));// RaspiBot6|192.168.0.151:9001\n }\n }",
"private boolean sendMessage(Message m){\r\n\t\tAllocation alloc = client.getAllocation();\r\n\t\tEndPoint main = getBattlefieldFor(alloc.getMain());\r\n\t\ttry {\r\n\t\t\tIMessageReceivedHandler remoteReceiver = (IMessageReceivedHandler) main.connect();\r\n\t\t\tremoteReceiver.onMessageReceived(m);\r\n\t\t} catch (MalformedURLException | RemoteException | NotBoundException e) {\r\n\t\t\tEndPoint backup = getBattlefieldFor(alloc.getBackup());\r\n\t\t\tIMessageReceivedHandler remoteReceiver;\r\n\t\t\ttry {\r\n\t\t\t\tremoteReceiver = (IMessageReceivedHandler) backup.connect();\r\n\t\t\t\tremoteReceiver.onMessageReceived(m);\r\n\t\t\t} catch (MalformedURLException | RemoteException\r\n\t\t\t\t\t| NotBoundException e1) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\t\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public void testChannelHopping() throws RemoteException {\n List<Channel> channelList = mBinder.getChannelList();\n for(Channel channel : channelList) {\n mBinder.joinChannel(channel.getId());\n }\n try {\n Thread.sleep(TEST_OBSERVATION_DELAY);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"private boolean initiateConnections(RegistrySendsNodeManifest event)\n\t\t\tthrows UnknownHostException, IOException {\n\t\t// close all getConnections() from previous overlay.\n\t\tfor (Map.Entry<Integer, TCPConnection> entry : this.nodesToSendTo.getConnections()\n\t\t\t\t.entrySet()) {\n\t\t\tTCPConnection connector = entry.getValue();\n\t\t\tconnector.closeSocket();\n\t\t}\n\t\t//Create sockets to peers\n\t\tallNodes = event.getAllNodes();\n\t\tint numConnectionsToMake = event.getRoutingTableSize();\n\t\tnodesToSendTo = new TCPConnectionsCache();\n\t\tfor (int i = 0; i < numConnectionsToMake; i++) {\n\t\t\tString ipAdd = \"\";\n\t\t\tfor (int j = 0; j < event.getIPLen(i); j++) {\n\t\t\t\tint ipPortion = event.getHopIP(i)[j] & 0xFF;\n\t\t\t\tipAdd += ipPortion;\n\t\t\t\tif (j < event.getIPLen(i) - 1)\n\t\t\t\t\tipAdd += \".\";\n\t\t\t}\n\t\t\tSocket hopSocket = new Socket(ipAdd, event.getHopPort(i));\n\t\t\tTCPConnection hop = new TCPConnection(hopSocket, this);\n\t\t\tnodesToSendTo.putConnection(hop, event.getHopID(i));\n\t\t}\n\t\t//Ensure each socket connection was successful\n\t\tboolean connectionsAllGood = true;\n\t\tfor (Map.Entry<Integer, TCPConnection> entry : nodesToSendTo.getConnections()\n\t\t\t\t.entrySet()) {\n\t\t\tTCPConnection value = entry.getValue();\n\t\t\tif (!value.checkSocketStatus())\n\t\t\t\treturn false;\n\t\t}\n\t\treturn connectionsAllGood;\n\t}",
"private void handleWhiteboardSynchronization() {\n String userName = EventMessageParser.extractUserName(this.message);\n\n if (StringHelper.isNullOrEmpty(userName)) {\n for (SocketConnection peer : SocketManager.getInstance()\n .getNotManagerConnectionList()) {\n peer.send(this.message);\n }\n } else {\n SocketConnection connection = SocketManager.getInstance()\n .getUserConnection(userName);\n connection.send(this.message);\n }\n }",
"@Override\n public boolean process(Message msg, Connection root) throws Exception {\n return lockBroadCast(root, register);\n }",
"public void testMissingRouteAfterMerge() throws Exception {\n a=createNode(LON, \"A\", LON_CLUSTER, null);\n b=createNode(LON, \"B\", LON_CLUSTER, null);\n Util.waitUntilAllChannelsHaveSameView(30000, 1000, a, b);\n\n x=createNode(SFO, \"X\", SFO_CLUSTER, null);\n assert x.getView().size() == 1;\n\n RELAY2 ar=a.getProtocolStack().findProtocol(RELAY2.class),\n xr=x.getProtocolStack().findProtocol(RELAY2.class);\n\n assert ar != null && xr != null;\n\n JChannel a_bridge=null, x_bridge=null;\n for(int i=0; i < 20; i++) {\n a_bridge=ar.getBridge(SFO);\n x_bridge=xr.getBridge(LON);\n if(a_bridge != null && x_bridge != null && a_bridge.getView().size() == 2 && x_bridge.getView().size() == 2)\n break;\n Util.sleep(500);\n }\n\n assert a_bridge != null && x_bridge != null;\n\n System.out.println(\"A's bridge channel: \" + a_bridge.getView());\n System.out.println(\"X's bridge channel: \" + x_bridge.getView());\n assert a_bridge.getView().size() == 2 : \"bridge view is \" + a_bridge.getView();\n assert x_bridge.getView().size() == 2 : \"bridge view is \" + x_bridge.getView();\n\n Route route=getRoute(x, LON);\n System.out.println(\"Route at sfo to lon: \" + route);\n assert route != null;\n\n // Now inject a partition into site LON\n System.out.println(\"Creating partition between A and B:\");\n createPartition(a, b);\n\n System.out.println(\"A's view: \" + a.getView() + \"\\nB's view: \" + b.getView());\n assert a.getView().size() == 1 && b.getView().size() == 1;\n\n route=getRoute(x, LON);\n System.out.println(\"Route at sfo to lon: \" + route);\n assert route != null;\n\n View bridge_view=xr.getBridgeView(BRIDGE_CLUSTER);\n System.out.println(\"bridge_view = \" + bridge_view);\n\n // Now make A and B form a cluster again:\n View merge_view=new MergeView(a.getAddress(), 10, Arrays.asList(a.getAddress(), b.getAddress()),\n Arrays.asList(View.create(a.getAddress(), 5, a.getAddress()),\n View.create(b.getAddress(), 5, b.getAddress())));\n GMS gms=a.getProtocolStack().findProtocol(GMS.class);\n gms.installView(merge_view, null);\n gms=b.getProtocolStack().findProtocol(GMS.class);\n gms.installView(merge_view, null);\n\n Util.waitUntilAllChannelsHaveSameView(20000, 500, a, b);\n System.out.println(\"A's view: \" + a.getView() + \"\\nB's view: \" + b.getView());\n\n for(int i=0; i < 20; i++) {\n bridge_view=xr.getBridgeView(BRIDGE_CLUSTER);\n if(bridge_view != null && bridge_view.size() == 2)\n break;\n Util.sleep(500);\n }\n\n route=getRoute(x, LON);\n System.out.println(\"Route at sfo to lon: \" + route);\n assert route != null;\n }",
"public void enterBridge() {\n lock.lock();\n }",
"public void initiate() {\n // all we know is neighbours\n Set<Integer> idsToSend = neighbours.stream().map(Bunker::getId).collect(Collectors.toSet());\n sendGetCount(idsToSend);\n }",
"private void manageConnectedSocket(BluetoothSocket acceptSocket) {\n\n }",
"public void sendLiteGame(){\n SerializableLiteGame toSend = liteGame.makeSerializable();\n\n if ( client1 != null ) {\n client1.send(toSend);\n }\n if ( client2 != null ) {\n client2.send(toSend);\n }\n if ( client3 != null ) {\n client3.send(toSend);\n }\n }",
"public void sendGameInfoToAll(){\r\n\t\t\r\n\t\tVector<Player> players = lobby.getLobbyPlayers();\t\r\n\t\tString message = \"UDGM\" + lobby.getGameString();\r\n\t\t\r\n\t\tif(!players.isEmpty()){\r\n\t \tfor(int i=0; i<players.size(); i++){\t \t\t\r\n\t \t\tsendOnePlayer(players.get(i), message);\t \t\t\r\n\t \t}\r\n\t\t}\r\n\t}",
"protected void doBridgeClick() {\r\n\t\tuiSound.playSound(\"Bridge\");\r\n\t\tif (onBridgeClicked != null) {\r\n\t\t\tonBridgeClicked.invoke();\r\n\t\t}\r\n\t}",
"@Override\n public boolean isConnectable() {\n return true;\n }",
"public void testConnectAndReconnectOfBridgeStack() throws Exception {\n a=new JChannel(createBridgeStack());\n a.setName(\"A\");\n b=new JChannel(createBridgeStack());\n b.setName(\"B\");\n\n a.connect(BRIDGE_CLUSTER);\n b.connect(BRIDGE_CLUSTER);\n Util.waitUntilAllChannelsHaveSameView(10000, 500, a, b);\n\n b.disconnect();\n Util.waitUntilAllChannelsHaveSameView(10000, 500, a);\n\n b.connect(BRIDGE_CLUSTER);\n Util.waitUntilAllChannelsHaveSameView(10000, 500, a, b);\n }",
"public abstract boolean SourceSinkSide( Communicator comm);",
"public void setCOMStatus (TCPClient conn, boolean bbCanSend)\r\n\t{\r\n\t\tsynchronized (this)\r\n\t\t{\r\n\t\t\t_roboCOM=conn;\r\n\t\t\t_bbCanSend= (conn!=null) && bbCanSend;\r\n\t\t}\r\n\t}",
"public void sendToWard(){\r\n\t\t//here is some code that we do not have access to\r\n\t}",
"@Override\n public Boolean call() throws Exception {\n \tMySocket socket = new MySocket(node);\n socket.writeLine(listOfActivePeers);\n socket.close();\n return true;\n }",
"private boolean sendIfOnline(String client, Exchange exchange) {\n\t\tif (data.isConnected(client)) {\n\t\t\tconnection.send(client, exchange);\n\t\t\treturn true;\n\t\t}\n\t\tdata.addPendingClientMessage(client, exchange);\n\t\treturn false;\n\t}",
"public BridgeEntity onBridge();",
"private void processNeighbors() {\n for(int i = 0; i < this.nextAvailPort; i++) {\n if(this.ports[i] == null) { continue; }\n System.out.println(this.ports[i].getRemoteRouterDesc().simulatedIPAddress);\n }\n }",
"@Override\n\tpublic void run() {\n\t\twhile(!Server.killServer){\n\t\t\ttry {\n\t\t\t\tThread.sleep(Constants.BROADCAST_BATTLEFIELD_PERIOD_TO_CLIENTS);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t//send to EACH client\n\t\t\tfor(Node client : Server.getClientList().keySet()){\n\t\t\t\t//get client's RMI instance\n\t\t\t\tClientServer clientComm = null;\n\t\t\t\tclientComm = Server.getClientReg(client); \n\t\t\t\t//create Message\n\t\t\t\tClientServerMessage sendBattlefieldMessage = new ClientServerMessage(\n\t\t\t\t\t\t\tMessageType.GetBattlefield,\n\t\t\t\t\t\t\tthis.serverOwner.getName(),\n\t\t\t\t\t\t\tthis.serverOwner.getIP(),\n\t\t\t\t\t\t\tclient.getName(),\n\t\t\t\t\t\t\tclient.getIP());\n\t\t\t\tsendBattlefieldMessage.setBattlefield(Server.getBattlefield());\n\t\t\t\t\n\t\t\t\tif(clientComm==null){\n\t\t\t\t\tSystem.out.println(\"clientComm is null\");\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//System.out.println(\"Server: Battlefield sent\");\n\n\t\t\t\ttry {\n\t\t\t\t\tclientComm.onMessageReceived(sendBattlefieldMessage);\n\t\t\t\t} catch (RemoteException e) {\n\t\t\t\t\t//e.printStackTrace();\n\t\t\t\t} catch (NotBoundException e) {\n\t\t\t\t\t//e.printStackTrace();\n\t\t\t\t}\n\n\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"void forwardToAll(String text, NodeInfo senderInfo)\n {\n for (CommunicationLink node : allNodes.values())\n {\n NodeInfo nodeInfo = node.getInfo();\n if (nodeInfo.hashCode() != senderInfo.hashCode())\n {\n node.sendMessage(new Message(text, nodeInfo, senderInfo, CHAT));\n try\n {\n node.readMessage();\n } catch (IOException e)\n {\n handleNodeDeath(nodeInfo);\n logger.error(\"Node \" + myInfo + \"\\n - Failed to forward message to: \" +\n nodeInfo.getName() + \", they disconnected unexpectedly.\");\n }\n }\n }\n }",
"public void relay(ControlPacket pkt) {\n for(Client client : clients)\n if(client.getNumber() == pkt.getDestination())\n client.sendControlPacket(pkt);\n }",
"public boolean isConnecting ()\r\n\t{\r\n\t\tsynchronized (this)\r\n\t\t{\r\n\t\t\treturn _roboCOM!=null;\r\n\t\t}\r\n\t}",
"@Override\n public void notifyRollDice() {\n try {\n if (getClientInterface() != null)\n getClientInterface().notifyHaveToShotDice();\n }\n catch (RemoteException e) {\n System.out.println(\"remote sending have to shot error\");\n }\n }",
"boolean isSending();",
"protected abstract boolean isConnected();",
"public void setBridge(boolean on) {\n if (on)\n setAccessFlags(getAccessFlags() | Constants.ACCESS_BRIDGE);\n else\n setAccessFlags(getAccessFlags() & ~Constants.ACCESS_BRIDGE);\n }",
"@Override\n\tprotected boolean handleMessage(Connection conn, MessageContext context,\n\t\t\tOFMessage msg, List<OFMessage> outgoing) {\n\t\tSet<Long> swids = this.getController().getSwitchIdentifiers();\n\t\tboolean replied = false;\n\t\t\n\t\tfor ( long swid : swids ) { \n\t\t\tIDevice ret = deviceManager.findDevice(swid, null, null, swid, null);\n\t\t\tif ( ret != null ) {\n\t\t\t\t// ....\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// if correctly replied ARP\n\t\t\t\treplied = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn ! replied;\n\t}",
"public void sendDirectedPresence() {\n Cursor cursor = getContentResolver().query(\n Roster.CONTENT_URI,\n new String[]{Roster.LAST_UPDATED},\n null, null, \"last_updated desc\"\n );\n if (cursor.moveToFirst()) {\n long after = cursor.getLong(\n cursor.getColumnIndex(Roster.LAST_UPDATED));\n Presence presence = new Presence(Type.available);\n presence.setTo(\"broadcaster.buddycloud.com\");\n client.sendFromAllResources(presence);\n }\n cursor.close();\n }",
"public static void serverBroadcast(JSONObject obj,Socket source,boolean f){\n\t\t\n\t\tfor(Connection con:Control.getInstance().getConnections()){\n\t\t\tString conAddr = con.getSocket().getRemoteSocketAddress().toString();\n\t\t\tif(f){\n\t\t\t\tif(LocalserverStorage.getInstance().getAuthServers().contains(conAddr)){//all linked servers\n\t\t\t\t\tcon.writeMsg(obj.toJSONString());\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tString sourceAddr = source.getRemoteSocketAddress().toString();\n\t\t\t\tif(!sourceAddr.equals(conAddr)){//not to source\n\t\t\t\t\tif(LocalserverStorage.getInstance().getAuthServers().contains(conAddr)){//not to source\n\t\t\t\t\t\tcon.writeMsg(obj.toJSONString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"void joinBridge(BridgeDescription bridgeDescription)\n throws IOException, SoapException;",
"protected boolean connect() throws SAPIException{\r\n\t\t\tif(!isRBNBConnected()){\t\t\t\r\n\t\t\t\tlog.write(getParameterToStringById(\"expID\") + \" connecting to RBNB...\");\r\n\t\t\t\tgetSink().CloseRBNBConnection();\r\n\t\t\t\tgetSource().Detach();\r\n\t\t\t\tgetLocalSource().Detach();\r\n\t\t\t\t\r\n\t\t\t\tsink = new Sink();\r\n\t\t\t\tsrc = new Source(frameSize,\"append\",frameSize*10); \r\n\t\t\t\tlocal_src = new Source(frameSize,\"append\",frameSize*10);\r\n\t\t\t\t\r\n\t\t getSink().OpenRBNBConnection(getParameterToStringById(\"sinkServerAddress\"), getParameterToStringById(\"sinkName\"));\r\n\t\t getLocalSource().OpenRBNBConnection(getParameterToStringById(\"sinkServerAddress\"), getParameterToStringById(\"sourceName\")+\"_local\");\r\n\t\t getSource().OpenRBNBConnection(getParameterToStringById(\"sourceServerAddress\"), getParameterToStringById(\"sourceName\"));\r\n\t\t \r\n\t\t if(getSink().VerifyConnection()){\r\n\t\t \tupdateParameter(\"sinkConnectionStatus\",connectedStr);\r\n\t\t \tlog.write(\"Sink connected successfully\");\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tlog.write(\"Sink unable to connect to RBNB\");\r\n\t\t\t\t\tupdateParameter(\"sinkConnectionStatus\",notConnectedStr);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(getSource().VerifyConnection()){\r\n\t\t\t\t\tlog.write(\"Source connected successfully\");\r\n\t\t\t\t\tupdateParameter(\"sourceConnectionStatus\",connectedStr);\r\n\t\t\t\t\tsrcMap = new ChannelMap();\r\n\t\t\t srcMap.Add(getParameterToStringById(\"sourceChannelCommandName\"));\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tupdateParameter(\"sourceConnectionStatus\",notConnectedStr);\r\n\t\t\t\t\tlog.write(\"Source unable to connect to RBNB\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(getLocalSource().VerifyConnection()){\r\n\t\t\t\t\tlog.write(\"Local source connected successfully\");\r\n\t\t\t\t\tupdateParameter(\"localSourceConnectionStatus\",connectedStr);\r\n\t\t\t statusMap = new ChannelMap();\r\n\t\t\t statusMap.Add(\"Status\");\r\n\t\t\t \t\t\t\t \r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tupdateParameter(\"localSourceConnectionStatus\",notConnectedStr);\r\n\t\t\t\t\tlog.write(\"Local source unable to connect to RBNB\");\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tlog.write(\"connect() called while RBNB already connected\");\r\n\t\t\t\r\n\t\t\tif(isRBNBConnected()) return true;\r\n\t\t\telse return false;\r\n\t\t\r\n\t\t}",
"private boolean directlyToHub(DirectSocketAddress hub, ClientMessage cm) {\n\n HubConnection c = connections.getHub(hub);\n\n if (c != null) {\n return c.forwardClientMessage(cm);\n }\n\n return false;\n }",
"void connected(InetAddress address, boolean isMine);",
"private void sendUpdateConnectionInfo() {\n\n }",
"public static void chooseNeighbour() {\n clique.handler(ConnectReq.class, (i, req) -> {\n int randomIndex = new Random().nextInt(connections.size());\n connections.get(randomIndex).send(req);\n });\n }",
"@Override\r\n\tpublic boolean isConnected() {\n\t\treturn false;\r\n\t}",
"private synchronized boolean announce(Connection con, JsonObject receivedMSG) throws NullPointerException {\n\t\tif (!broadConnections.contains(con)) {\n\t\t\tInvalidMessage invalidMsg = new InvalidMessage();\n\t\t\tinvalidMsg.setInfo(\"Unanthenticated server\");\n\t\t\tcon.writeMsg(invalidMsg.toJsonString());\n\t\t\treturn false;\n\t\t}\n\n\t\t// Broadcast announcement to other servers\n\t\tfor (Connection server : broadConnections) {\n\t\t\tif (con != server) {\n\t\t\t\tserver.writeMsg(receivedMSG.getAsString());\n\t\t\t}\n\t\t}\n\t\tString hostname = receivedMSG.get(\"hostname\").getAsString();\n\t\tserverInfo.put(hostname, receivedMSG);\n\t\treturn true;\n\t}",
"boolean hasSender();",
"boolean hasSender();",
"boolean hasSender();",
"boolean hasSender();",
"boolean hasSender();",
"boolean hasSender();",
"@Override\r\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tsuper.handleMessage(msg);\r\n\t\t\tif(msg.obj != null){\r\n\t\t\t\ttry {\r\n\t\t\t\t\tString respose = (String) msg.obj;\r\n\t\t\t\t\tJSONObject object = new JSONObject(respose);\r\n\t\t\t\t\tint status = object.getInt(\"status\");\r\n\t\t\t\t\tint code = object.getInt(\"code\");\r\n\t\t\t\t\tif(status == ParamsUtils.SUCCESS_CODE){\r\n\t\t\t\t\t\t/*Bind successfully, then save gateway information on the device*/\r\n\t\t\t\t\t\tACache mCache = ACache.get(getApplicationContext(), \r\n\t\t\t\t\t\t\t\tParamsUtils.CACHE_SIZE, 1000); \r\n\t\t\t\t\t\tSharedPreferences preferences = getApplicationContext().getSharedPreferences(ParamsUtils.GATEWAY_COUNT, MODE_PRIVATE);\r\n\t\t\t\t\t\tgatewayCount = preferences.getInt(ParamsUtils.GATEWAY_COUNT_CURRENT, 0);\r\n\t\t\t\t\t\tgatewayCount = gatewayCount + 1;\r\n\t\t\t\t\t\tmCache.put(\"gateway\" + gatewayCount, gatewayId);\r\n\t\t\t\t\t\tEditor editor = preferences.edit();\r\n\t\t\t\t\t\teditor.putInt(ParamsUtils.GATEWAY_COUNT_CURRENT, gatewayCount);\r\n\t\t\t\t\t\teditor.commit();\r\n\t\t\t\t\t\tsetHintVisible(false);\r\n\t\t\t\t\t\tbindHintView.setText(R.string.bind_ok);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tLog.i(AddGatewayActivity.class.getSimpleName(), \"sendBroadcast\");\r\n\t\t\t\t\t\tIntent intent = new Intent(\"com.smartdevice.main.device.update\"); \r\n\r\n\t\t\t\t\t\tsendBroadcast(intent);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tsetHintVisible(false);\r\n\t\t\t\t\t\tbindHintView.setText(R.string.bind_fail);\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (JSONException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\tsetHintVisible(false);\r\n\t\t\t\t\tbindHintView.setText(R.string.bind_fail);\r\n\t\t\t\t}\r\n\t\t\t}else {\r\n\t\t\t\tsetHintVisible(false);\r\n\t\t\t\tbindHintView.setText(R.string.bind_fail);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}",
"public void sendMessageToAllClients(MessageWrapper message) {\n sendMessageToServer(message);\n\n for (SendenDevice device : clientsConnected.values()) {\n if (!device.getDeviceMac().equals(wiFiP2PInstance.getThisDevice().getDeviceMac())) {\n sendMessage(device, message);\n }\n }\n }",
"@Override\n\tpublic boolean isConnected() {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isConnected() {\n\t\treturn false;\n\t}",
"@Override\n\tpublic void communicate(Vertebra otherVertebra) {\n\t\t\n\t}",
"@Override\n\tpublic boolean connect() {\n\t\treturn false;\n\t}",
"private static void getClients() throws IOException {\r\n\t\tbidders=new ArrayList<Socket>();\r\n\t\tserverSocket=new ServerSocket(portno);\r\n\t\twhile ((bidders.size()<numBidders)&&(auctioneer==null)) {\r\n\t\t\tSocket temp=serverSocket.accept();\r\n\t\t\t//if (this client is a bidder)\r\n\t\t\t\tbidders.add(temp);\r\n\t\t\t//if (this client is the auctioneer)\r\n\t\t\t\tauctioneer=temp;\r\n\t\t}\r\n\t}",
"public void broadCastMessage(String message){\n\t\tfor (Socket s : connectedClientSockets){\n\t\t\tsendMsgToSocket(message, s);\n\t\t}\n\t}",
"public void sendAdverts() {\n\t\tfor (int pfx = 0; pfx < pfxList.size(); pfx++){\n\t\t\tfor(int lnk = 0; lnk < nborList.size(); ++lnk){\n\t\t\t\tif(lnkVec.get(lnk).helloState == 0){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tPacket p = new Packet();\n\t\t\t\tp.protocol = 2; p.ttl = 100;\n\t\t\t\tp.srcAdr = myIp;\n\t\t\t\tp.destAdr = lnkVec.get(lnk).peerIp;\n\t\t\t\tp.payload = String.format(\"RPv0\\ntype: advert\\n\" \n\t\t\t\t\t\t+ \"pathvec: %s %.3f %d %s\\n\",\n\t\t\t\t\t\tpfxList.get(pfx).toString(), now, 0, myIpString); //potential problems\n\t\t\t\tfwdr.sendPkt(p,lnk);\n\t\t\t}\n\t\t}\n\t}",
"private void sendToAll(final byte[] data) {\n for (ServerClient client : clients) {\n send(data, client.getAddress(), client.getPort());\n }\n }",
"public void sendToCurrClient ( String message ){\n currClient.send( message );\n ServerConnection[] clients = new ServerConnection[]{client1, client2, client3};\n for(ServerConnection c: clients){\n if(c != currClient && c != null )\n if ( !message.contains(\"You won\") )\n c.send(\"Wait for \" + currClient.getName() + \" to end his turn\" );\n else c.send(\"You lost the match. \" + currClient.getName() + \" won the game.\");\n }\n }",
"boolean isForwarding();",
"public void handleNetworkOutput(Response response) {\n if (playerConnections.containsKey(response.getPlayerID())) playerConnections.get(response.getPlayerID()).sendResponse(response);\n }",
"private void send()\n {\n\n\tRouterPacket pkt;\n if(poisonEnabled){\n\t // Create a false distance table\n int[] tmpDistTable = new int[RouterSimulator.NUM_NODES];\n System.arraycopy(myDistTable,0,tmpDistTable,0,RouterSimulator.NUM_NODES);\n for(int i = 0;i<neighbours.length;i++){\n if(neighbours[i]){\n\t\t //Poisoned reverse\n for(int j = 0;j<route.length;j++){\n\t\t\t// All routes that goes through my node, set to infinity\n if(route[j] == i && j!=i){\n tmpDistTable[j] = RouterSimulator.INFINITY;\n }\n }\n\t\t // Send new packet\n pkt = new RouterPacket(myID,i,tmpDistTable);\n sendUpdate(pkt);\n }\n }\n } else {\n for (int i = 0; i < neighbours.length; i++) {\n if (neighbours[i]) {\n\t\t // Send new packet\n pkt = new RouterPacket(myID, i, myDistTable);\n sendUpdate(pkt);\n }\n }\n }\n\n\n }",
"@SuppressWarnings(\"unchecked\")\n\tprivate synchronized boolean lockProcess(Connection con, JsonObject receivedMSG) throws NullPointerException {\n\t\t// Check if the message source is authenticated\n\t\tif (!broadConnections.contains(con)) {\n\t\t\tInvalidMessage invalidMsg = new InvalidMessage();\n\t\t\tinvalidMsg.setInfo(\"Unanthenticated server\");\n\t\t\tcon.writeMsg(invalidMsg.toJsonString());\n\t\t\treturn false;\n\t\t}\n\t\tString username = receivedMSG.get(\"username\").getAsString();\n\t\tString secret = receivedMSG.get(\"secret\").getAsString();\n\n\t\t// Broadcast message to all other servers except the source\n\t\tfor (Connection server : broadConnections) {\n\t\t\tif (server != con) {\n\n\t\t\t\t// If this is the server that asked for lock response from other server\n\t\t\t\t// for the coming user name, stop broadcasting\n\t\t\t\tif (!registerList1.containsKey(username))\n\t\t\t\t\tserver.writeMsg(receivedMSG.getAsString());\n\t\t\t}\n\t\t}\n\n\t\tif (receivedMSG.get(\"command\").getAsString().equals(LOCK_ALLOWED)) {\n\t\t\tif (registerList1.containsKey(username)) {\n\t\t\t\tint n = registerList1.get(username) + 1;\n\t\t\t\tregisterList1.put(username, n);\n\t\t\t\t// If the number of allow reaches the number of connected server\n\t\t\t\t// send register success\n\t\t\t\tif (n == serverInfo.size()) {\n\t\t\t\t\tuserInfo.put(username, secret);\n\t\t\t\t\tJSONObject response = new JSONObject();\n\t\t\t\t\tresponse.put(\"command\", REGISTER_SUCCESS);\n\t\t\t\t\tresponse.put(\"info\", \"register successful for \" + username);\n\t\t\t\t\tregisterList2.get(username).writeMsg(response.toJSONString());\n\t\t\t\t\tregisterList1.remove(username);\n\t\t\t\t\tregisterList2.remove(username);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\t// If received lock denied, send register failed immediately\n\t\telse if (receivedMSG.get(\"command\").getAsString().equals(LOCK_DENIED)) {\n\t\t\tif (registerList1.containsKey(username)) {\n\t\t\t\tJSONObject response = new JSONObject();\n\t\t\t\tresponse.put(\"command\", REGISTER_FAILED);\n\t\t\t\tresponse.put(\"info\", username + \" is already register with the system\");\n\t\t\t\tregisterList2.get(username).writeMsg(response.toJSONString());\n\t\t\t\tregisterList1.remove(username);\n\t\t\t\tregisterList2.remove(username);\n\t\t\t\tif (userInfo.containsKey(username) && userInfo.get(\"username\").equals(secret)) {\n\t\t\t\t\tuserInfo.remove(username);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"private void sendToOtherServers(ProxyEvent proxyEvent) throws AppiaEventException {\n //\t\tSystem.out.println(\"Sending to other servers: \"+ proxyEvent);\n \t\tproxyEvent.storeMessage();\n \t\tproxyEvent.setDir(Direction.DOWN);\n \t\tproxyEvent.setChannel(vsChannel);\n \t\tproxyEvent.setSourceSession(this);\n \t\tproxyEvent.init();\n \t\tproxyEvent.go();\n \n \t}",
"@Override\n public void testIfConnected() {\n }",
"@Override\n public void run() {\n try {\n connectionLoggerService.add(\"Connection Join: \"\n + socket.getInetAddress().getHostName());\n Message message = readMessage();\n if (message.getCommand() == Message.Command.REGISTER_CLIENT) {\n connectionType = Message.Command.REGISTER_CLIENT;\n writeMessage(new Message.Builder()\n .accountId(bank.registerClient())\n .response(Message.Response.SUCCESS)\n .command(Message.Command.REGISTER_CLIENT)\n .send(bank.getId()));\n }\n if (message.getCommand() == Message.Command.REGISTER_AH) {\n connectionType = Message.Command.REGISTER_AH;\n writeMessage(new Message.Builder()\n .accountId(bank.registerAuctionHouse(\n message.getNetInfo().get(0)))\n .response(Message.Response.SUCCESS)\n .command(Message.Command.REGISTER_AH)\n .send(bank.getId()));\n }\n while (running) {\n message = readMessage();\n switch (message.getCommand()) {\n // UUID - senderID\n // double - amount\n case DEPOSIT: {\n bank.depositFunds(message.getSender(),\n message.getAmount());\n writeMessage(new Message.Builder()\n .response(Message.Response.SUCCESS)\n .command(Message.Command.DEPOSIT)\n .amount(message.getAmount())\n .send(bank.getId()));\n break;\n }\n // UUID - accountId\n // double - amount\n case HOLD: {\n if (bank.holdFunds(message.getAccountId(),\n message.getAmount())) {\n writeMessage(new Message.Builder()\n .response(Message.Response.SUCCESS)\n .command(Message.Command.HOLD)\n .amount(message.getAmount())\n .accountId(message.getAccountId())\n .send(bank.getId()));\n System.out.println(message.getAmount());\n } else {\n writeMessage(new Message.Builder()\n .response(\n Message.Response.INSUFFICIENT_FUNDS)\n .command(Message.Command.HOLD)\n .accountId(message.getAccountId())\n .send(bank.getId()));\n }\n break;\n }\n // UUID - accountId\n // double - amount\n case RELEASE_HOLD: {\n if (bank.releaseFunds(message.getAccountId(),\n message.getAmount())) {\n writeMessage(new Message.Builder()\n .amount(message.getAmount())\n .response(Message.Response.SUCCESS)\n .command(Message.Command.RELEASE_HOLD)\n .send(bank.getId()));\n } else {\n writeMessage(new Message.Builder()\n .response(\n Message.Response.INSUFFICIENT_FUNDS)\n .command(Message.Command.RELEASE_HOLD)\n .amount(message.getAmount())\n .send(bank.getId()));\n }\n break;\n }\n // UUID - senderId\n // UUID - accountId\n // double - amount\n case TRANSFER: {\n if (bank.transferFunds(message.getSender(),\n message.getAccountId(), message.getAmount())) {\n writeMessage(new Message.Builder()\n .response(Message.Response.SUCCESS)\n .command(Message.Command.TRANSFER)\n .amount(message.getAmount())\n .accountId(message.getAccountId())\n .send(bank.getId()));\n } else {\n writeMessage(new Message.Builder()\n .response(Message.Response.ERROR)\n .command(Message.Command.TRANSFER)\n .amount(message.getAmount())\n .accountId(message.getAccountId())\n .send(bank.getId()));\n }\n break;\n }\n // UUID - senderId\n case GET_AVAILABLE: {\n writeMessage(new Message.Builder()\n .amount(bank.getAccountFunds(message.getSender()))\n .command(Message.Command.GET_AVAILABLE)\n .send(bank.getId()));\n break;\n }\n case GET_NET_INFO: {\n writeMessage(new Message.Builder()\n .command(Message.Command.GET_NET_INFO)\n .netInfo(bank.getAuctionHouseNetInfo())\n .send(bank.getId()));\n break;\n }\n // UUID - senderId\n case GET_RESERVED: {\n writeMessage(new Message.Builder()\n .command(Message.Command.GET_RESERVED)\n .amount(bank.getHeldFunds(message.getSender()))\n .send(bank.getId()));\n break;\n }\n // UUID - sender\n // List<NetInfo> netInfo\n case DEREGISTER_AH: {\n bank.deRegisterAuctionHouse(message.getNetInfo().get(0));\n connectionLoggerService.add(\"AuctionHouse Disconnected : \"\n + socket.getInetAddress().getHostName());\n this.closeThread();\n break;\n }\n // UUID - sender\n case DEREGISTER_CLIENT: {\n bank.deRegisterClient(message.getSender());\n connectionLoggerService.add(\"Client Disconnected : \"\n + socket.getInetAddress().getHostName());\n this.closeThread();\n break;\n }\n }\n }\n } catch (ClassNotFoundException |\n NullPointerException ignored) {\n try {\n writeMessage(new Message.Builder()\n .response(Message.Response.INVALID_PARAMETERS)\n .send(bank.getId()));\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n } catch (IOException e) {\n if (connectionType == Message.Command.REGISTER_AH) {\n bank.auctionHouseConnDrop(\n socket.getInetAddress().getHostAddress());\n }\n connectionLoggerService.add(\"Connection dropped : \"\n + socket.getInetAddress().getHostName());\n this.closeThread();\n }\n }",
"private void sendClientsChangedBroadcast() {\n Intent intent = new Intent(WifiHotspotManager.WIFI_HOTSPOT_CLIENTS_CHANGED_ACTION);\n intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);\n mContext.sendBroadcastAsUser(intent, UserHandle.ALL);\n }",
"private void tryNickname(NicknameEvent nicknameEvent) {\n if(connectionChoice == 1) {\n if(nicknameEvent.isFirstTime()){\n //Usare amazon checkip per rmi, settare la proprietà del sistema\n try {\n remoteReference = (ClientInterfaceRMI) UnicastRemoteObject.exportObject(this, 0);\n } catch (ExportException ignore) {\n //if the object is already exported then do nothing\n } catch (RemoteException e) {\n System.err.println(CONNECTION_ERROR + e.getMessage() + \"!\");\n }\n }\n\n try {\n server.addClient(remoteReference);\n } catch (RemoteException e) {\n System.err.println(CONNECTION_ERROR + e.getMessage() + \"!\");\n } catch (IllegalArgumentException e) {\n System.out.println(e.getMessage());\n setChanged();\n notifyObservers(new ConnectionEstablishedEvent(false));\n }\n } else {\n try {\n server.notify(nicknameEvent);\n }\n catch (RemoteException e) {\n System.out.println(\"This should never happen!\");\n }\n }\n }",
"protected boolean isConnected() {\n/* 160 */ return this.delegate.isConnected();\n/* */ }",
"private void sendReceiveRes(){\n\t}",
"private void handleMessage(final ParentOverloaded msg) {\n if (parents.get(msg.getTreeID()) == null || !parents.get(msg.getTreeID()).equals(msg.sourceId)) {\n return;\n }\n sendUnderLoadedNeighborsOffer(msg.sourceId, msg.getTreeID());\n }",
"protected abstract boolean sharedConnectionEnabled();",
"public void updateBridgePart(BridgePart bridgePart) {\n/* 4011 */ if (!isOnSurface() && !Features.Feature.CAVE_BRIDGES.isEnabled()) {\n/* */ \n/* 4013 */ getSurfaceTile().updateBridgePart(bridgePart);\n/* */ \n/* */ \n/* */ }\n/* 4017 */ else if (this.structure != null) {\n/* */ \n/* 4019 */ if (this.watchers != null)\n/* */ {\n/* 4021 */ for (VirtualZone vz : getWatchers()) {\n/* */ \n/* */ \n/* */ try {\n/* 4025 */ vz.updateBridgePart(this.structure.getWurmId(), bridgePart);\n/* */ }\n/* 4027 */ catch (Exception e) {\n/* */ \n/* 4029 */ logger.log(Level.WARNING, e.getMessage(), e);\n/* */ } \n/* */ } \n/* */ }\n/* */ \n/* */ try {\n/* 4035 */ bridgePart.save();\n/* */ }\n/* 4037 */ catch (IOException iox) {\n/* */ \n/* 4039 */ logger.log(Level.WARNING, \"Failed to save structure bridge part: \" + bridgePart.getId() + '.', iox);\n/* */ } \n/* 4041 */ if (bridgePart.getState() != BridgeConstants.BridgeState.COMPLETED.getCode()) {\n/* */ \n/* */ \n/* 4044 */ if (this.vitems != null) {\n/* */ \n/* 4046 */ for (Item item : this.vitems.getAllItemsAsArray()) {\n/* */ \n/* 4048 */ if (item.onBridge() == this.structure.getWurmId()) {\n/* */ \n/* 4050 */ item.setOnBridge(-10L);\n/* 4051 */ for (VirtualZone vz : getWatchers()) {\n/* */ \n/* */ \n/* */ try {\n/* 4055 */ if (item.getParentId() == -10L && vz.isVisible(item, this))\n/* */ {\n/* 4057 */ vz.removeItem(item);\n/* 4058 */ item.setPosZ(-3000.0F);\n/* 4059 */ vz.addItem(item, this, true);\n/* */ }\n/* */ \n/* 4062 */ } catch (Exception e) {\n/* */ \n/* 4064 */ logger.log(Level.WARNING, e.getMessage(), e);\n/* */ } \n/* */ } \n/* */ } \n/* */ } \n/* 4069 */ for (Item pile : this.vitems.getPileItems()) {\n/* */ \n/* 4071 */ if (pile.onBridge() == this.structure.getWurmId()) {\n/* */ \n/* 4073 */ pile.setOnBridge(-10L);\n/* 4074 */ for (VirtualZone vz : getWatchers()) {\n/* */ \n/* */ \n/* */ try {\n/* 4078 */ if (vz.isVisible(pile, this))\n/* */ {\n/* 4080 */ pile.setPosZ(-3000.0F);\n/* 4081 */ vz.removeItem(pile);\n/* 4082 */ vz.addItem(pile, this, true);\n/* */ }\n/* */ \n/* 4085 */ } catch (Exception e) {\n/* */ \n/* 4087 */ logger.log(Level.WARNING, e.getMessage(), e);\n/* */ } \n/* */ } \n/* */ } \n/* */ } \n/* */ } \n/* */ \n/* 4094 */ if (this.creatures != null)\n/* */ {\n/* 4096 */ for (Creature c : this.creatures) {\n/* */ \n/* 4098 */ if (c.getBridgeId() == this.structure.getWurmId()) {\n/* */ \n/* 4100 */ c.setBridgeId(-10L);\n/* 4101 */ if (!c.isPlayer()) {\n/* */ \n/* 4103 */ float oldposz = c.getPositionZ();\n/* 4104 */ float newPosz = c.calculatePosZ();\n/* 4105 */ float diffz = newPosz - oldposz;\n/* 4106 */ c.setPositionZ(newPosz);\n/* 4107 */ c.moved(0.0F, 0.0F, diffz, 0, 0);\n/* */ } \n/* */ } \n/* */ } \n/* */ }\n/* */ } \n/* */ } \n/* */ }",
"public void onReceiveGetNeighbours(GetNeighboursMessage message) {\n if (routing.get(message.sender) == null) {\n //Note: should exist cause neighbour\n routing.put(message.sender, routing.get(message.lastSender));\n }\n if (message.receiver == id) {\n // we are the destination\n Set<Integer> neighbourIds = neighbours.stream().map(Bunker::getId).collect(Collectors.toSet());\n GiveNeighboursMessage giveNeighboursMessage = new GiveNeighboursMessage();\n giveNeighboursMessage.receiver = message.sender;\n giveNeighboursMessage.sender = id;\n giveNeighboursMessage.ids = neighbourIds;\n sendGiveNeighbours(giveNeighboursMessage);\n } else {\n // route to destination\n message.lastSender = id;\n // we should know receiver at this step\n sendGetNeighbours(message);\n }\n }",
"public void sendToOutpatients(){\r\n\t\t//here is some code that we do not have access to\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tprivate synchronized boolean broadcast(Connection con, JsonObject receivedMSG) throws NullPointerException {\n\t\tif (!loadConnections.contains(con) && !broadConnections.contains(con)) {\n\t\t\tInvalidMessage invalidMsg = new InvalidMessage();\n\t\t\tinvalidMsg.setInfo(\"Unanthenticated connection\");\n\t\t\tcon.writeMsg(invalidMsg.toJsonString());\n\t\t\treturn false;\n\t\t}\n\n\t\t// System.out.println(\"Broadcasting\");\n\n\t\tJSONObject response = new JSONObject();\n\t\tif (receivedMSG.get(\"command\").getAsString().equals(ACTIVITY_MESSAGE)) {\n\t\t\tString username = receivedMSG.get(\"username\").getAsString();\n\n\t\t\tString secret = null;\n\t\t\tif (!receivedMSG.get(\"secret\").isJsonNull())\n\t\t\t\tsecret = receivedMSG.get(\"secret\").getAsString();\n\t\t\tif (secret == null || (con.getUsername().equals(username) && con.getSecret().equals(secret))) {\n\t\t\t\tresponse.put(\"command\", ACTIVITY_BROADCAST);\n\n\t\t\t\t// Process the activity object\n\t\t\t\tJsonObject actObj = receivedMSG.get(\"activity\").getAsJsonObject();\n\t\t\t\tactObj.addProperty(\"authenticated_user\", username);\n\t\t\t\tresponse.put(\"activity\", actObj);\n\t\t\t\tfor (Connection connection : connections) {\n\t\t\t\t\tconnection.writeMsg(response.toJSONString());\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tresponse.put(\"command\", AUTHENTICATION_FAIL);\n\t\t\t\tresponse.put(\"info\", \"Unauthenticated connection\");\n\t\t\t\tcon.writeMsg(response.toJSONString());\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else if (receivedMSG.get(\"command\").getAsString().equals(ACTIVITY_BROADCAST)) {\n\t\t\tresponse.put(\"command\", ACTIVITY_BROADCAST);\n\t\t\tJsonObject actObj = receivedMSG.get(\"activity\").getAsJsonObject();\n\t\t\tactObj.addProperty(\"authenticated_user\", actObj.get(\"authenticated_user\").getAsString());\n\t\t\tresponse.put(\"activity\", actObj);\n\t\t\tfor (Connection connection : connections) {\n\t\t\t\tif (connection != con)\n\t\t\t\t\tconnection.writeMsg(response.toJSONString());\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\n\t}",
"public void tunnel() {\r\n\t\tboolean status = true;\r\n\t\tfor (CellStorage i : node) {\r\n\t\t\tif (i.getCell().tunnelTo != null) {\r\n\t\t\t\tCellStorage tunnelTo = null;\r\n\t\t\t\t// Searching for destinated node from the tunnel\r\n\t\t\t\tfor (int k = 0; k < node.size(); k++) {\r\n\t\t\t\t\tif (node.get(k).getCell() == i.getCell().tunnelTo) {\r\n\t\t\t\t\t\ttunnelTo = node.get(k);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ti.setTunnel(tunnelTo);\r\n\r\n\t\t\t\t// Calling validateConnection method to make sure that no duplicated connection\r\n\t\t\t\t// is made.\r\n\t\t\t\t// Create new connection if no duplicate.\r\n\r\n\t\t\t\tstatus = validateConnection(i, tunnelTo);\r\n\t\t\t\tif (status == false) {\r\n\t\t\t\t\tHashMapConnectedNodes tunnelSet = new HashMapConnectedNodes();\r\n\t\t\t\t\ttunnelSet.hmConnectedNodesObj.put(i.getIndex(), i);\r\n\t\t\t\t\ttunnelSet.hmConnectedNodesObj.put(tunnelTo.getIndex(), tunnelTo);\r\n\t\t\t\t\thshMConnectedNodes.add(tunnelSet);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void youWinByAbandonment() {\n try {\n if (getClientInterface() != null)\n getClientInterface().gameEndedByAbandonment(\"YOU WON BECAUSE YOUR OPPONENTS HAVE ABANDONED!!\");\n }\n catch (RemoteException e) {\n System.out.println(\"remote sending ended by abandonment error\");\n }\n }",
"private void connectingPeer() {\n for (int index = 0; index < this.peers.size(); index++) {\n String peerUrl = urlAdderP2PNodeName((String) this.peers.get(index));\n try {\n Node distNode = NodeFactory.getNode(peerUrl);\n P2PService peer = (P2PService) distNode.getActiveObjects(P2PService.class.getName())[0];\n \n if (!peer.equals(this.localP2pService)) {\n // Send a message to the remote peer to record me\n peer.register(this.localP2pService);\n // Add the peer in my group of acquaintances\n this.acqGroup.add(peer);\n }\n } catch (Exception e) {\n logger.debug(\"The peer at \" + peerUrl +\n \" couldn't be contacted\", e);\n }\n }\n }",
"private synchronized void sendToAllClients(Object whatever) // Synchronized to work among multiple clients and multiple threads\n {\n System.out.println(\"Sending '\" + whatever + \"' to everyone.\");\t\n \n ObjectOutputStream[] oosList = whosIn.values().toArray(new ObjectOutputStream[0]);\n \n for (ObjectOutputStream clientOOS : oosList)\n {\n try {clientOOS.writeObject(whatever);}\n catch (IOException e) {} \n }\n\t \n }",
"public boolean canTransmitMessages()\n {\n return true;\n }",
"public static void sendOK() {\n try {\n Server destServer = ServerState.getInstance().getServers().get(sourceID);\n MessageTransfer.sendServer(\n ServerMessage.getOk( String.valueOf(ServerState.getInstance().getSelfID()) ),\n destServer\n );\n System.out.println(\"INFO : Sent OK to s\"+destServer.getServerID());\n }\n catch(Exception e) {\n System.out.println(\"INFO : Server s\"+sourceID+\" has failed. OK message cannot be sent\");\n }\n }",
"private void sendGMToAll(String msg){\r\n for(ClientHandler ch: clientThreads){\r\n try{\r\n //Get the client's ObjectOutputStream\r\n ObjectOutputStream oos = ch.getOOS();\r\n //Print the message to the client\r\n oos.writeObject(new DataWrapper(0, msg, true));\r\n } catch(IOException ioe) {\r\n System.out.println(\"IOException occurred: \" + ioe.getMessage());\r\n ioe.printStackTrace();\r\n }\r\n }\r\n }",
"public void setCOMStatus (boolean bbCanSend)\r\n\t{\r\n\t\tsynchronized (this)\r\n\t\t{\r\n\t\t\t_bbCanSend=bbCanSend;\r\n\t\t}\r\n\t}",
"protected void onRobotConnect (boolean bbUserNotify)\r\n\t{\r\n\t\tsetCOMStatus (true);\r\n\t\tUI_RefreshConnStatus ();\r\n\t}",
"public void blockingReceiveSenderSide() throws OOBException {\n \t}",
"final protected void sendAllBut(Node notSend) {\n\t\tfor (Node cn : peers)\n\t\t\tif (cn != notSend)\n\t\t\t\tsend(cn);\n\t}",
"@Override\n\tpublic boolean canConnect() {\n return false;\n }",
"public void startConnection(){\n startBTConnection(mBTDevice,MY_UUID_INSECURE);\n }",
"public void communicate() {\n // Send\n for (int i = 0; i < robots.length; i++) {\n if (i != this.id) {\n if (objectFound) {\n System.out.println(\"Robot \" + this.id + \": Telling everyone else...\");\n this.robots[i].mailbox[i] = new Message(this.id, this.objectFound, goal);\n } else {\n this.robots[i].mailbox[i] = new Message(this.id, this.objectFound, null);\n }\n }\n }\n // Read\n for (int i = 0; i < mailbox.length; i++) {\n if (i != this.id && mailbox[i] != null && mailbox[i].objectFound) {\n this.objectFound = true;\n this.goal = mailbox[i].objectLocation;\n }\n }\n }",
"protected abstract boolean sendNextRequests();",
"void send();",
"public void sendNameInfoToAll(){\r\n\t\t\r\n\t\tVector<Player> players = lobby.getLobbyPlayers();\t\r\n\t\tString message = \"UDNM\" + lobby.getNameString();\r\n\t\t\r\n\t\tif(!players.isEmpty()){\r\n\t \tfor(int i=0; i<players.size(); i++){\t \t\t\r\n\t \t\tsendOnePlayer(players.get(i), message);\t \t\t\r\n\t \t}\r\n\t\t}\r\n\t}",
"private void broadcast(String message)\n \t{\n \t\tfor(int i = 0; i < players.length; i++)\n \t\t{\n // PROTOCOL\n \t\t\tplayers[i].sendMessage(message);\n // PROTOCOL\n \t\t}\n \t}",
"public void send() {\n\t}",
"@Override\n\tpublic void networkIsOk() {\n\n\t}",
"@Override\n protected Void doInBackground(Void... devices){\n try {\n if (btSocket == null || !isBtConnected) {\n //get the mobile bluetooth device\n m_Bluetooth = BluetoothAdapter.getDefaultAdapter();\n //connects to the device's address and checks if it's available\n BluetoothDevice bluetoothDevice = m_Bluetooth.getRemoteDevice(address);\n //create a RFCOMM (SPP) connection\n btSocket = bluetoothDevice.createInsecureRfcommSocketToServiceRecord(myUUID);\n BluetoothAdapter.getDefaultAdapter().cancelDiscovery();\n btSocket.connect();//start connection\n }\n }\n catch (IOException e) {\n ConnectSuccess = false;//if the try failed, you can check the exception here\n }\n return null;\n }",
"@Override\n\t\tpublic void run() {\n\t\t\ttry{\n//\t\t\t\tdevAddr = devices.get(position).split(\"\\\\|\")[1];\n//\t\t\t\tbtAdapt.cancelDiscovery();\n//\t\t\t\t\n//\t\t\t\tbtSocket = btAdapt.getRemoteDevice(devAddr).createRfcommSocketToServiceRecord(uuid);\n//\t\t\t\tbtSocket.connect();Log.e(tag, \"connected\");\n\t\t\t\tInetAddress severInetAddr=InetAddress.getByName(\"120.105.129.108\");\n\t\t\t\tWifisocket = new Socket(severInetAddr, 8101);\n\t\t\t\t\n\t\t\t\tsynchronized (this) {\n//\t\t\t\t\tbtIn = btSocket.getInputStream();\n//\t\t\t\t\tbtOut = btSocket.getOutputStream();\n\t\t\t\t\tbtIn = Wifisocket.getInputStream();\n\t\t\t\t\tbtOut = Wifisocket.getOutputStream();\n\t\t\t\t\tLog.e(tag, \"connected\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tThread.sleep(100);\n\t\t\t\tsetUpAsForeground(\"Wifi已連線\");\n\t\t\t} catch( IOException | InterruptedException e ){\n\t\t\t\te.printStackTrace();\n\t\t\t\ttry{\n//\t\t\t\t\tbtSocket.close();\n//\t\t\t\t\tWifisocket.close();\n\t\t\t\t\tThread.sleep(1500);\n\t\t\t\t\tsetUpAsForeground(\"Wifi未連線\");\n\t\t\t\t\tLog.i(\"exiconne\", \"bluetoohservice bye!;\");\n\t\t\t\t} catch(InterruptedException e1){\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\tLog.i(\"exiconne\", \"bluetoohservice bye!;\");\n\t\t\t\t}\n//\t\t\t\tbtSocket = null;\n\t\t\t\tWifisocket = null;\n\t\t\t\tmBTState = BTState.stopped;\n\t\t\t\tBluetoothConnect.mBTstate = BTstate.opened;\n\t\t\t}\n\n\t\t}"
]
| [
"0.61976856",
"0.6157875",
"0.6025647",
"0.5953993",
"0.58297163",
"0.57791",
"0.5713403",
"0.5702355",
"0.5687605",
"0.5644922",
"0.5626474",
"0.5609882",
"0.5593409",
"0.5582336",
"0.5554863",
"0.55390346",
"0.5505767",
"0.5499297",
"0.54976106",
"0.54923964",
"0.5490928",
"0.54905236",
"0.5486608",
"0.5475871",
"0.5472678",
"0.54458374",
"0.544046",
"0.5430901",
"0.54264235",
"0.5425927",
"0.5418556",
"0.5415203",
"0.5415049",
"0.5394842",
"0.53786916",
"0.5378664",
"0.5376783",
"0.5372906",
"0.53592354",
"0.53331333",
"0.533227",
"0.532545",
"0.53216964",
"0.5320869",
"0.5306274",
"0.52911234",
"0.52911234",
"0.52911234",
"0.52911234",
"0.52911234",
"0.52911234",
"0.52904415",
"0.52902234",
"0.5284035",
"0.5284035",
"0.5282243",
"0.5278839",
"0.527732",
"0.5276379",
"0.52694",
"0.5266789",
"0.5257278",
"0.5251534",
"0.52410805",
"0.52344286",
"0.5230248",
"0.5226523",
"0.520429",
"0.52001166",
"0.5198799",
"0.5195466",
"0.51948243",
"0.5194629",
"0.51895857",
"0.5185589",
"0.51846045",
"0.5176688",
"0.5176411",
"0.51676047",
"0.5167282",
"0.51663816",
"0.5161443",
"0.51525944",
"0.5148528",
"0.5147415",
"0.51435816",
"0.5142347",
"0.5141954",
"0.51415706",
"0.5135795",
"0.51307887",
"0.51290435",
"0.5125623",
"0.51238215",
"0.51222116",
"0.511808",
"0.5113618",
"0.5112351",
"0.51097554",
"0.5105922",
"0.5105902"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public Link createLink(String caption, String url) {
return new ListLink(caption, url);
} | {
"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 Tray createTray(String caption) {
return new ListTray(caption);
} | {
"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 Page createPage(String title, String author) {
return new ListPage(title, author);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
]
| 0.0 | -1 |
set current active history and activate it | private void setActiveHistory(History activeHistory) {
this.activeHistory = activeHistory;
activeHistory.activate();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void switchToHistory() {\r\n\t\thistoryPane.addEditTabs(editTabs);\r\n\t\tlayout.show(this, \"historyPane\");\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}",
"public void activate(){\r\n\t\tactive=true;\r\n\t}",
"@Override\r\n public void activate() {\r\n super.getShell().setActive();\r\n }",
"public void activate();",
"public void activate() {\n\t\tactivated = true;\n\t}",
"private void openHistoryManagementWindow() {\r\n\t\tnew JFrameHistory(this.jFrameMainWindow.getUser());\r\n\t}",
"public void activate(){\r\n\r\n\t}",
"protected void activeActivity() {\n\t\tLog.i(STARTUP, \"active activity\");\n\t\tcheckActiveActivity();\n\t}",
"protected void toggleHistory(final Context ctx,\r\n final SubscriberNumberMgmtHistory history)\r\n throws AgentException\r\n {\r\n\r\n try\r\n {\r\n SubscriberNumberMgmtHistory cloneHistory = (SubscriberNumberMgmtHistory) history.clone();\r\n\r\n if (cloneHistory.getLatest() != latest_)\r\n {\r\n cloneHistory.setLatest(latest_);\r\n cloneHistory.setEndTimestamp(endTimestamp_);\r\n }\r\n setHistory((SubscriberNumberMgmtHistory)home_.store(ctx, cloneHistory));\r\n // there should only be one entry with latest set to true\r\n setAddNewHistoryRequired(true);\r\n count_++;\r\n throw new AbortVisitException();\r\n }\r\n catch(CloneNotSupportedException cloneEx)\r\n {\r\n throw new AgentException(cloneEx);\r\n }\r\n catch (HomeException hEx)\r\n {\r\n throw new AgentException(hEx);\r\n }\r\n }",
"void activate();",
"void activate();",
"public void activate() {\n\t\tif (resetCounter == 0 && isReloaded()) {\n\t\t\tactivated = true;\n\t\t}\n\t}",
"public void clickHistoryTab(){\t\n\t\t\n\t\tHistory_Tab.click();\n\t}",
"public void Activate() {\n state.Activate();\n }",
"public void setActive() {\n\t\tactive = true;\n\t}",
"public void openHistory() {\n usingHistoryScreen = true;\n myActivity.setContentView(R.layout.history);\n Button historyButtonToGame = myActivity.findViewById(R.id.button8);\n TextView historyText = myActivity.findViewById(R.id.textView46);\n historyText.setText(state.getHistory());\n historyText.setMovementMethod(new ScrollingMovementMethod());\n gui.invalidate();\n historyButtonToGame.setOnClickListener(\n new View.OnClickListener() {\n public void onClick(View v) {\n ShogiHumanPlayer.this.setAsGui(myActivity);\n usingHistoryScreen = false;\n if (state != null) {\n receiveInfo(state);\n }\n }\n });\n }",
"public void activate() {\n\t\t// TODO Auto-generated method stub\n\t}",
"public void activate()\n {\n }",
"public void activate()\n\t{\n\t\tlineNow = 0f;\n\t\tamp = begAmp;\n\t\tisActivated = true;\n\t}",
"private void rememberState() {\n int size = pageHistory.size();\n for ( int i = historyCursor + 1; i < size; i++ ) {\n pageHistory.remove( historyCursor + 1 );\n }\n // Add current state to history if different from current one\n PageState newState = new PageState();\n if ( historyCursor < 0 || !pageHistory.get( historyCursor ).equals( newState ) ) {\n pageHistory.add( newState );\n historyCursor = pageHistory.size() - 1;\n }\n }",
"public void showHistorySwitchAction() {\n\t\tanimalsListPanel.switchToPast();\n\t}",
"private void initConnectionHistory() {\n\t\t\tmConnectionHistory = new ConnectionHistory(System.currentTimeMillis());\n\t\t\t\n\t\t\t// Set action\n\t\t\tif (mActivationFlag) {\n\t\t\t\tmConnectionHistory.setAction(ConnectionHistory.Action.ACTIVATE);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmConnectionHistory.setAction(ConnectionHistory.Action.DEACTIVATE);\n\t\t\t}\n\t\t\t\n\t\t\t// Set connection type\n\t\t\tif (!NetworkUtil.hasInternetConnection(mContext)) {\n\t\t\t\tmConnectionHistory.setConnectionType(ConnectionHistory.ConnectionType.NO_CONNECTION);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tint networkType = NetworkUtil.getActiveNetworkType(mContext);\n\t\t\t\t\n\t\t\t\tif (networkType == ConnectivityManager.TYPE_MOBILE) {\n\t\t\t\t\tmConnectionHistory.setConnectionType(ConnectionHistory.ConnectionType.MOBILE);\n\t\t\t\t}\n\t\t\t\telse if (networkType == ConnectivityManager.TYPE_WIFI) {\n\t\t\t\t\tmConnectionHistory.setConnectionType(ConnectionHistory.ConnectionType.WIFI);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmConnectionHistory.setConnectionType(ConnectionHistory.ConnectionType.UNRECOGNIZED);\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public void activate(){\n active = true;\n state = State.cleaving;\n }",
"public void activate() {\n if (!isResumed) {\n isToBeActivated = true;\n return;\n }\n\n if (isLocked) {\n return;\n }\n\n if (!isActive) {\n isActive = true;\n onActivate();\n }\n\n if (isFirstUse) {\n isFirstUse = false;\n settings.edit()\n .putBoolean(\"isFirstUse\", false)\n .commit();\n onFirstUse();\n }\n }",
"public void setActive() {\n setState(true);\n }",
"public void showHistory(){\n \tif (historyExample==null) historyExample = new HistoryExample();\n setWidgetAsExample(historyExample);\n }",
"@Override\n public void activate() {\n\n }",
"public boolean activate();",
"protected void intentBrowsingHistory() {\n \t// TODO accessTokenの取得がBookmarkとかぶる部分共通に‥\n \n \t// ログイン状態か確認。Cookie制御は確認済かつ表示前にチェックが走るのでここでは確認しない。\n \tString accessToken = null;\n String refreshToken = null;\n try {\n SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0);\n accessToken = settings.getString(ACCESS_TOKEN, null);\n refreshToken = settings.getString(REFRESH_TOKEN, null);\n } catch (Exception e) {\n //\n }\n \n if (isNotEmpty(accessToken) && isNotEmpty(refreshToken)) { \n \tIntent intent = new Intent(this, BrowsingHistoryList.class);\n \tstartActivity(intent);\n } else {\n Intent loginIntent = new Intent(this, UserLogin.class);\n startActivityForResult(loginIntent, APL_REQUEST_BROWSINGHISTORY);\n }\n \t\n \t\n }",
"@Override\n public void activate() {\n \n }",
"public void setHistory(final SubscriberNumberMgmtHistory history)\r\n {\r\n history_ = history;\r\n }",
"@Override\n\tpublic void activate() {\n\t\t\n\t}",
"public void setHistoryCleared() {\n\n // If jelly bean or above.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {\n\n // Finish all activities on\n // the current stack.\n activity.finishAffinity();\n } else {\n activity.finish();\n }\n }",
"@Override\n\tpublic void activate() {\n\t}",
"@Override\n\tpublic void activate() {\n\t}",
"public abstract void activate();",
"public abstract void activate();",
"public void updateHistoryButtonState(ChatPanel chatPanel)\n {\n mainToolBar.changeHistoryButtonsState(chatPanel);\n }",
"@Override\n\t\tvoid switchOnCode(Activity act) {\n\t\t\tstartActivityForResult(new Intent(getApplicationContext(), OrderHistoryTabLayoutActivity.class), ActivitySwitchSignals.ORDERHISTORY);\n\n\t\t}",
"public void active() {\n createClassIfNotExists();\n\n globalHook = new OAuditingHook(security);\n\n retainTask =\n new TimerTask() {\n public void run() {\n retainLogs();\n }\n };\n\n long delay = 1000L;\n long period = 1000L * 60L * 60L * 24L;\n\n timer.scheduleAtFixedRate(retainTask, delay, period);\n\n Orient.instance().addDbLifecycleListener(this);\n if (context instanceof OServerAware) {\n if (((OServerAware) context).getDistributedManager() != null) {\n ((OServerAware) context).getDistributedManager().registerLifecycleListener(this);\n }\n }\n\n if (systemDbImporter != null && systemDbImporter.isEnabled()) {\n systemDbImporter.start();\n }\n }",
"public void setCurrentImageHistory(Stack<ColorImage> img) {\n currentImage = img;\n }",
"@Override\r\n\tpublic boolean activate() {\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean activate() {\n\t\treturn true;\r\n\t}",
"protected void activateTab() {\n GWT.log(\"activateTab \" + getActiveTabId());\n List<String> ids = new ArrayList<String>();\n ids.add(\"contestsli\");\n ids.add(\"driversli\");\n ids.add(\"chatsli\");\n ids.add(\"dirli\");\n ids.add(\"menuli\");\n for (String id : ids) {\n com.google.gwt.dom.client.Element element = DOM.getElementById(id);\n if (element != null) {\n element.removeAttribute(\"style\");\n }\n }\n String tabId = getActiveTabId();\n if (tabId != null) {\n com.google.gwt.dom.client.Element element = DOM.getElementById(tabId);\n if (element != null) {\n element.setAttribute(\"style\", \"background:white;\");\n }\n }\n }",
"public void activateButton() {\n\t\tif (isBrowser) this.bringToBack();\r\n\t\tMainActivity.resetXY();\r\n\t}",
"@Override\n\tpublic void pressTab() {\n\t\tSystem.out.println(\"Change active control.\");\n\t\t\n\t\tchangeCurrentControl(false);\n\t\t\n\t\tif (getCurrentControlIndex() < getControls().size() - 1) \n\t\t\tsetCurrentControlIndex(getCurrentControlIndex() + 1);\n\t\telse \n\t\t\tsetCurrentControlIndex(0);\n\n\t\tchangeCurrentControl(true);\n\t}",
"public void active(CallerContext cc)\n {\n }",
"@Override\n public void updateHistory(Command c) {\n }",
"private void activate_previous_activity(){\n\n Intent intent = new Intent(this,MainActivity.class);\n startActivity(intent);\n\n }",
"private void setHistory(final CreateUrlRequest request)\n {\n String token = Session.getInstance().generateUrl(request);\n History.newItem(token, true);\n }",
"@Override\n\tpublic boolean activate() {\n\t\treturn true;\n\t}",
"private void initializeUndoHistory() {\n \t\tif (fHistory != null && fUndoContext != null)\n \t\t\tfHistory.dispose(fUndoContext, true, true, false);\n \n \t}",
"void onHistoryButtonClicked();",
"public void activate() {\n\tif (canBeActive()) {\n\t\tmActive = true;\n\t} else {\n\t\tthrow new IllegalStateException(getClass().getSimpleName() + \" isn't allowed to be activated\");\n\t}\n}",
"public void setScriptHistory(ScriptHistory scriptHistory) {\n this.scriptHistory = scriptHistory;\n }",
"public synchronized void setupHistoWindows() {\r\n\t\tif (log.isLoggable(Level.INFO)) log.log(Level.INFO, String.format(\"started\")); //$NON-NLS-1$\r\n\t\tthis.histoSet = HistoSet.getInstance();\r\n\t\tthis.histoSet.initialize();\r\n\r\n\t\tif (this.histoGraphicsTabItem != null) this.resetGraphicsWindowHeaderAndMeasurement();\r\n\r\n\t\tthis.setHistoGraphicsTabItemVisible(this.settings.isHistoActive());\r\n\t\tthis.setHistoTableTabItemVisible(this.settings.isHistoActive());\r\n\t\tif (this.settings.isHistoActive()) {\r\n\t\t\tthis.updateHistoTabs(RebuildStep.A_HISTOSET, true);\r\n\t\t}\r\n\t}",
"public void setActivingColor(){\n this.setBackground(new Color( 213, 228, 242));\n this.forceupdateUI();\n }",
"@Override\r\n\tpublic void focus() {\r\n\t\tactivate();\r\n\t\ttoFront();\r\n\t}",
"public void setActive(Boolean active) {\n Boolean oldValue = this.active;\n this.active = active;\n forecast.updateForecastFromYr();\n firePropertyChange(\"active\", oldValue, active);\n }",
"public boolean activate(){\n mIsActive = true;\n return mIsActive;\n }",
"private History() {}",
"public void activated() \r\n\t{\r\n\t\t\r\n\t}",
"public void sbbActivate() {\n\t}",
"public void activate() {\n\t\tcameraNXT.sortBy('A');\n\t\tcameraNXT.enableTracking(true);\n\t}",
"@Override\n protected void onResume() {\n super.onResume();\n active = true;\n }",
"@Override\n protected void onResume() {\n super.onResume();\n active = true;\n }",
"protected synchronized void setActive(final boolean b) {\n active = b;\n }",
"@Override\n public void onActivate() {\n }",
"private void changeCurIndex() {\n\t\tint TexID=-1;\r\n\t\tif(ApplicationInfo.Destination == Constants.TO_FRONT)\r\n\t\t{\r\n\t\t\tCurIndex=++CurIndex >= mApplications.size()? 0 : CurIndex;\r\n\t\t\tif((TexID=mApplications.get(getPreIndex()).getReady()) != -1)\r\n\t\t\t\tunSetTexID(TexID);\r\n \t\t\tmApplications.get(getPreIndex()).setReady(-1);\r\n\t\t}\r\n\t\telse if(ApplicationInfo.Destination == Constants.TO_BACK)\r\n\t\t{\r\n\t\t\tCurIndex=--CurIndex < 0? mApplications.size()-1 : CurIndex;\r\n\t\t\tif((TexID=mApplications.get(getNextIndex()).getReady()) != -1)\r\n\t\t\t\tunSetTexID(TexID);\r\n\t\t\tmApplications.get(getNextIndex()).setReady(-1);\r\n\t\t}\r\n\t\tLog.d(TAG, \"changeCurIndex :\"+CurIndex);\r\n\t}",
"public void prev()\n {\n if (mHistoryIdx == 0) {\n return;\n }\n\n mCommandList.get(--mHistoryIdx).undo();\n this.setChanged();\n this.notifyObservers(mHistoryIdx);\n }",
"public void botaohistory(View v) {\n startActivity(new Intent(this, com.example.appstore.history.class));\n }",
"public void setActive(boolean active)\r\n\t{\r\n\t\tif (this.active != active)\r\n\t\t{\r\n\t\t\tthis.active = active;\r\n\t\t\tapply();\r\n\t\t}\r\n\t}",
"protected void setActive(boolean activate) {\n\t\tif (this.active ^ activate) {\r\n\t\t\tthis.active = activate;\r\n\t\t\t\r\n\t\t\tthis.img = AbstractRelicModRelic.getRelicTexture(this.relicId, activate);\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic void activate() {\n\t\tif(CID==true) {\r\n\t\t\tinter.setState(inter.getResults());\r\n\t\t}\r\n\t}",
"@Override\n public void activate() {\n init();\n }",
"static void setCurrentSettingTab(int currentIdx) {\n currentSettingTab = currentIdx;\n }",
"public void setActive( boolean tof ) {\n\t\tthis.active = tof;\n\t}",
"public void loadHistory(SyncedList<MSensor> history) {\n this.history = history;\n }",
"@Override\r\n\tpublic boolean reActivateIt() {\n\t\treturn false;\r\n\t}",
"@Override\n public void setActive(boolean active) {\n if (book != null) {\n book.getCurrencies().removeCurrencyListener(currencyTableCallback); // At most one listener\n book.removeAccountListener(allAccountsCallback);\n if (active) {\n book.getCurrencies().addCurrencyListener(currencyTableCallback);\n book.addAccountListener(allAccountsCallback);\n }\n }\n }",
"public void resetHistory() {\n SharedPreferences.Editor editor = preferences.edit();\n editor.remove(\"usernameHistory\");\n editor.apply();\n }",
"public void setActiveLevel(PlayerLevel toSet){\r\n\t\tthis.activeLevel = toSet;\r\n\t}",
"@Override\n public void setLatestActivity(IActivity activity) {\n }",
"public void onActive() {\n super.onActive();\n this.f5335l.registerOnSharedPreferenceChangeListener(this);\n }",
"public void setScriptStartedAt() {\n scriptHistory.setStartedAt(DateTime.now());\n scriptHistory.setRan(true);\n }",
"public final void setmot_history(java.util.List<vehiclelookup.proxies.dataObj> mot_history)\n\t{\n\t\tsetmot_history(getContext(), mot_history);\n\t}",
"private void prevHistoryEntry()\n {\n if (this.historyPos > 0) {\n this.historyPos--;\n this.textInput.setText(this.history.get(this.historyPos));\n this.textInput.setSelection(this.history.get(this.historyPos).length());\n }\n }",
"public void setFocus() {\r\n System.out.println(\"TN5250JPart: calling SetSessionFocus.run(): \" + tn5250jPart.getClass().getSimpleName());\r\n SetSessionFocus.run(tabFolderSessions.getSelectionIndex(), -1, tn5250jPart);\r\n }",
"public void active(boolean value) {\n\t\tactive = value;\n\t}",
"public void setHistoryAction(HistoryAction historyAction)\n {\n this.historyAction = historyAction;\n }",
"public void setActive(boolean active) {\n _isActive = active;\n }",
"public void setActive(){\n paycheckController.setActive();\n }",
"private void activateTrafficLight(TrafficLight activeTrafficLight) {\n for (TrafficLight trafficLight : trafficLights) {\n trafficLight.setState(TrafficLight.State.RED);\n }\n\n // Activating light\n this.activeTrafficLight = activeTrafficLight;\n activeTrafficLight.nextState();\n stepCounter = 0;\n }",
"@Override\r\n\tpublic void activate() {\r\n\t\t//System.err.println(\"activating: \" + this);\r\n\t\tsuper.activate();\r\n\t\tthis.getArtFrag().addPropertyChangeListener(this);\r\n\t}",
"public void setActive(boolean isActive) {\n if (this.isActive != isActive) {\n resetColors();\n }\n this.isActive = isActive;\n if (isActive) {\n button.setIdleColor(SELECTED_COLOR);\n icon.getMaterial().setColor(\"Color\", SELECTED_ICON_COLOR);\n label.setColor(ColorRGBA.White);\n levelLabel.setColor(SELECTED_LEVEL_COLOR);\n }\n }",
"public synchronized void startActivity(final Activity activity) {\r\n\t// FIXME: temp hack for Slide curtains\r\n\tif (activity.getName().equals(\"Curtains\")) {\r\n\t\ttry {\r\n\t\t\tString response = Request.Post(\"https://\" + slideHost + \"/rpc/Slide.SetPos\").bodyString(\"{\\\"pos\\\": 1}\", ContentType.APPLICATION_JSON).execute().returnContent().asString();\r\n\t\t\tSystem.out.println(\"Slide response: \" + response);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn;\r\n\t}\r\n if (this.isActive(activity)) {\r\n throw new IllegalStateException(\"Activity already active\");\r\n }\r\n if (this.activeActivity != null) {\r\n // Another activity is currently active, so stop that one first.\r\n // TODO: Don't turn off / turn on overlapping devices, but only change channels where needed.\r\n this.stopActivity(this.activeActivity);\r\n }\r\n final PyhActivity oldValue = this.createPyhActivity(activity);\r\n this.activeActivity = activity;\r\n if (activity.getModules().getPhilipsHue() != null) {\r\n this.taskExecutor.execute(() -> this.activateHueModule(activity.getModules().getPhilipsHue()));\r\n }\r\n if (activity.getModules().getInfraRed() != null) {\r\n this.taskExecutor.execute(() -> this.activateIrModule(activity.getModules().getInfraRed()));\r\n }\r\n final PyhActivity newValue = this.createPyhActivity(activity);\r\n this.eventPublisher.publishEvent(new ActivityChangedEvent(oldValue, newValue));\r\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n activeActivity();\n this.finish();\n }",
"public void setActive(boolean active) { \n this.active = active;\n }",
"public void activate(){\n callback.action();\n }",
"protected boolean setActive(String appName) {\n try {\n File active = appFile(appName, \"active\");\n createParentDirs(active);\n return active.createNewFile() && updateTime(appName);\n } catch (IOException e) {\n log.warn(\"Unable to mark app {} as active\", appName, e);\n throw new ApplicationException(\"Unable to mark app as active\", e);\n }\n }"
]
| [
"0.6781022",
"0.6591345",
"0.64583445",
"0.61609346",
"0.6158667",
"0.61345196",
"0.612999",
"0.60974",
"0.60610086",
"0.6033234",
"0.6033234",
"0.5914948",
"0.5895287",
"0.5893504",
"0.58862966",
"0.5865155",
"0.5854025",
"0.5852525",
"0.5849549",
"0.5836823",
"0.5825095",
"0.5787002",
"0.57703096",
"0.57663053",
"0.5765334",
"0.57466215",
"0.5735049",
"0.573043",
"0.5726408",
"0.5725546",
"0.5715202",
"0.5714558",
"0.5705642",
"0.5700439",
"0.5700439",
"0.5687228",
"0.5687228",
"0.5654244",
"0.5616166",
"0.5590097",
"0.5586307",
"0.5575898",
"0.5575898",
"0.5563901",
"0.5562469",
"0.55552125",
"0.5547394",
"0.55415493",
"0.55399513",
"0.5513521",
"0.55090743",
"0.5473346",
"0.5472835",
"0.54721504",
"0.54717714",
"0.5462767",
"0.54185426",
"0.54038095",
"0.5381513",
"0.5378359",
"0.5378123",
"0.5378024",
"0.53737086",
"0.5370468",
"0.5345092",
"0.5345092",
"0.5340463",
"0.5339257",
"0.53372556",
"0.53360033",
"0.53284603",
"0.5325919",
"0.531473",
"0.53109616",
"0.53096247",
"0.5302277",
"0.5289531",
"0.52852106",
"0.5279114",
"0.5277328",
"0.52601165",
"0.52539325",
"0.5248007",
"0.5239412",
"0.5235484",
"0.52281535",
"0.522217",
"0.5209615",
"0.520803",
"0.5199799",
"0.5193858",
"0.51931363",
"0.5189436",
"0.51845014",
"0.5174215",
"0.51666844",
"0.51598465",
"0.51578826",
"0.5149257",
"0.51434886"
]
| 0.8212736 | 0 |
save all(two) used historys | public void saveAllHistory() {
for (Map.Entry<Integer, History> entry : mapOfHistorys.entrySet()) {
History history = entry.getValue();
history.save();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void saveHistoryToStorage() {\r\n\t\tfor(Document i: strategy.getEntireHistory()) {\r\n\t\t\tif(!i.getContent().isEmpty()) {\r\n\t\t\t\ti.save(\"\");\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void storeFileHistory() {\n\t\ttheFileHistory.store(theConfiguration);\n\t}",
"public void saveHistory(OperatorSelectionHistory history,String filename){\n try(ObjectOutputStream os = new ObjectOutputStream(new FileOutputStream(filename));){\n os.writeObject(history);\n os.close();\n } catch (IOException ex) {\n Logger.getLogger(IOSelectionHistory.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public void storeResidueHistory() {\n\t\ttheResidueHistory.store(theConfiguration);\n\t}",
"private static void addToHistory() {\n\t\tFileInputStream fis = null;\n\t\tFileOutputStream fos = null;\n\t\tFileChannel resultChannel = null;\n\t\tFileChannel historyChannel = null;\n\t\ttry {\n\t\t\tfis = new FileInputStream(new File(\"result.txt\"));\n\t\t\tfos = new FileOutputStream(new File(\"history.txt\"), true);\n\t\t\t\n\t\t\tfos.write(\"\\n\\n\".getBytes(\"utf-8\"));\n\t\t\tfos.flush();\n\t\t\t\n\t\t\tresultChannel = fis.getChannel();\n\t\t\thistoryChannel = fos.getChannel();\n\n\t\t\tresultChannel.transferTo(0, resultChannel.size(), historyChannel);\n\t\t} catch (FileNotFoundException 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} finally {\n\t\t\ttry {\n\t\t\t\tif (fis != null) {\n\t\t\t\t\tfis.close();\n\t\t\t\t}\n\t\t\t\tif (fos != null) {\n\t\t\t\t\tfos.close();\n\t\t\t\t}\n\t\t\t\tif(resultChannel != null) {\n\t\t\t\t\tresultChannel.close();\n\t\t\t\t}\n\t\t\t\tif(historyChannel != null) {\n\t\t\t\t\thistoryChannel.close();\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}",
"private void Writehistory (List list, savekq savehistory){\n if (kiemtrasopt(list) < 10) {\n list.add(0, savehistory);\n } else {\n list.remove(9);\n list.add(0, savehistory);\n }\n }",
"public void saveHistory() {\r\n\t\tJFileChooser jfc = new JFileChooser();\r\n\t\tjfc.setFileSelectionMode(JFileChooser.FILES_ONLY);\r\n\t\tjfc.setDialogTitle(\"Save \" + curveName + \" history\");\r\n\t\tjfc.setSelectedFile(new File(\".txt\"));\r\n\t\tint returnVal = jfc.showSaveDialog(getRootPane());\r\n\t\tif(returnVal == JFileChooser.APPROVE_OPTION) {\r\n\t\t\tif (!cancelBecauseFileExist(jfc.getSelectedFile())) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\thistory.save(jfc.getSelectedFile());\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tJOptionPane.showMessageDialog(getRootPane(), \"Error while saving the history\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"protected void saveHistoryData() throws RemoteHomeManagerException {\n int expected = (isCurrentState()) ? 1 : 0;\n if (isEnabledScheduler()) {\n Boolean action = getLightSchedule().getCurrentSchedule();\n expected = action?1:0;\n }\n HistoryData history = new HistoryData();\n history.setDeviceId(getDeviceId());\n history.setDataName(\"ONOFF\");\n history.setDataValue(((isCurrentState())?1:0)+\"|\"+expected);\n history.setDataTimestamp();\n m.getPersistance().addHistoryData(history);\n RemoteHomeManager.log.debug(\"Saved history data: \"+history.toString());\n }",
"public void saveManyHistory() {\n Map<String, String> status = new HashMap<>();\n String userID = \"15\";\n List<User> allUsers = dumpDao.getAllUsers();\n Random random = new Random();\n for (int x = 0; x < 1000; x++) {\n System.out.println(\"Loop Counter : \" + x);\n userID = allUsers.get(random.nextInt(allUsers.size() - 1)).getId().toString();\n int numberOfHistory = random.nextInt(20);\n for (int y = 0; y < numberOfHistory + 1; y++) {\n System.out.println(\"\\nHistory Save\\n\");\n History history = new History();\n history.setUserId(userID);//will be set from service.\n history.setDate(DateUtil.getDate().toString());\n history.setLocation(DumpData.getLocation());\n history.setPatientDescription(DumpData.getPatientDescription());\n history.setRefferedBy(DumpData.getRefferedBy());\n history.setNote(DumpData.getNote());\n history.setUserId(userID);\n dao_history_i.save(history);\n System.out.println(history.getId());\n }//for\n }\n// bug : data are not being save\n// for (int x = 0; x < 100; x++) {\n// System.out.println(\"\\nHistory Save\\n\");\n// History history = new History();\n// history.setUserId(userID);//will be set from service.\n// history.setDate(DateUtil.getDate().toString());\n// history.setLocation(DumpData.getLocation());\n// history.setPatientDescription(DumpData.getPatientDescription());\n// history.setRefferedBy(DumpData.getRefferedBy());\n// history.setNote(DumpData.getNote());\n// history.setUserId(userID);\n// entityManager.persist(history);\n// System.out.println(history.getId());\n// }\n\n// bug : data are not being save\n// History history = new History();\n// history.setUserId(userID);//will be set from service.\n// history.setDate(DateUtil.getDate().toString());\n// history.setLocation(DumpData.getLocation());\n// history.setPatientDescription(DumpData.getPatientDescription());\n// history.setRefferedBy(DumpData.getRefferedBy());\n// history.setNote(DumpData.getNote());\n// history.setUserId(userID);\n// entityManager.persist(history);\n// System.out.println(history.getId());\n //working, insertion of history, just for one.\n// for (int x = 0; x < 10; x++) {\n// System.out.println(\"\\nHistory Save\\n\");\n// History history = new History();\n// history.setUserId(userID);//will be set from service.\n// history.setDate(DateUtil.getDate().toString());\n// history.setLocation(DumpData.getLocation());\n// history.setPatientDescription(DumpData.getPatientDescription());\n// history.setRefferedBy(DumpData.getRefferedBy());\n// history.setNote(DumpData.getNote());\n// history.setUserId(userID);\n// dao_history_i.save(history);\n// System.out.println(history.getId());\n// }//for\n }",
"@Override\n public void updateHistory() {\n List<Integer> allItemIds = determineItemIds();\n if (allItemIds == null || allItemIds.size() == 0) {\n Log.i(TAG, \"No Item Ids exists to create history data sets.\");\n return;\n }\n\n long processTs = System.currentTimeMillis();\n long startLastMonth;\n long endLastMonth;\n // determine the last month depending from the process timestamp. In the first iteration\n // the process timestamp is the current timestamp. With the second iteration,\n startLastMonth = DateHelper.startOfLastMonth(processTs);\n endLastMonth = DateHelper.endOfLastMonth(processTs);\n // iterate through all known IDs. This is required because we want to create a history entry\n // for each item\n for (int itemId : allItemIds) {\n updatePriceHistory(itemId, startLastMonth, endLastMonth);\n }\n }",
"protected void saveEarningHistory(EarningHistory earningHistory){\n }",
"protected void saveAllBuffers() {\r\n\r\n\t\tString save_dir = \"\";\r\n\t\t\r\n\t JFileChooser fileChooser = new JFileChooser(new File(System.getProperty(\"user.dir\")));\r\n\t fileChooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);\r\n\t int state = fileChooser.showDialog(null, \"Select Directory\");\r\n if (state == JFileChooser.APPROVE_OPTION ){\r\n \tif(fileChooser.getSelectedFile().isDirectory())\r\n \t\tsave_dir = fileChooser.getSelectedFile().getPath();\r\n \tif(fileChooser.getSelectedFile().isFile())\r\n \t\tsave_dir = fileChooser.getSelectedFile().getParent();\r\n }\r\n\t\t//what a nice way to get the list size...\r\n\t\tint size = m_History.getList().getModel().getSize();\r\n\t\tFastVector rlist_item = null;\r\n\t\tfor (int i = 0; i < size; i++) {\r\n\t\t\tString name = m_History.getNameAtIndex(i);\r\n\t\t\tStringBuffer buf = m_History.getNamedBuffer(name);\r\n\t\t try {\r\n\t\t String file = save_dir+\"\\\\\"+name.substring(11).replace(\"--> \", \"\")+\".txt\";\r\n\t\t if (m_Log != null) {\r\n\t\t \t\t m_Log.statusMessage(\"Saving to file...\");\r\n\t\t }\r\n\t\t PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(file, false)));\r\n\t\t out.write(buf.toString(),0,buf.toString().length());\r\n\t\t out.close();\r\n\t\t if (m_Log != null) {\r\n\t\t \t m_Log.statusMessage(\"OK\");\r\n\t\t }\r\n\t\t } catch (Exception ex) {\r\n\t\t ex.printStackTrace();\r\n\t\t if (m_Log != null) {\r\n\t\t \t m_Log.logMessage(ex.getMessage());\r\n\t\t }\r\n\t\t }\r\n\t\t}\r\n\t m_Log.logMessage(\"Saved all result buffers successfully.\");\r\n\t}",
"public interface Save {\n String writeHistory();\n}",
"private void addHistory(String s) {\r\n\t\tcurrentPlayer.getHistory().add(s);\r\n\t\tif (currentPlayer.getHistory().size() > 6) currentPlayer.getHistory().remove(0);\r\n\t\t//updatePlayArea(currentPlayer, false);\r\n\t}",
"private void saveHistoryToFile(File file) {\n JSONObject head = new JSONObject();\n\n // Meta information about the run\n JSONObject meta = new JSONObject();\n meta.put(\"TotalCycles\", this.totalCycles == -1 ? getEnvironment().getTime() : this.totalCycles);\n meta.put(\"TotalPackets\", this.totalPackets);\n meta.put(\"PacketsDelivered\", this.historyPackets.values().stream()\n .flatMap(Collection::stream)\n .filter(p -> p.mode == PacketAction.Mode.Delivery)\n .count());\n meta.put(\"EnergyConsumed\", UserPanel.getInstance().score);\n\n\n JSONObject moves = new JSONObject();\n moves.put(\"Key\", new JSONArray(new String[] {\"Cycle\", \"AgentID\", \"FromX\", \"FromY\", \"ToX\", \"ToY\"}));\n moves.put(\"Data\", new JSONArray(historyMoves.entrySet().stream()\n .flatMap(entry -> entry.getValue().stream()\n .map(l -> l.toJSONArray(entry.getKey())))\n .collect(Collectors.toList())));\n\n\n JSONObject packetPickup = new JSONObject();\n packetPickup.put(\"Key\", new JSONArray(new String[] {\"Cycle\", \"AgentID\", \"PacketX\", \"PacketY\"}));\n packetPickup.put(\"Data\", new JSONArray(historyPackets.entrySet().stream()\n .flatMap(entry -> entry.getValue().stream()\n .filter(p -> p.mode == PacketAction.Mode.Pickup)\n .map(p -> p.toJSONArray(entry.getKey())))\n .collect(Collectors.toList())));\n\n\n JSONObject packetDelivery = new JSONObject();\n packetDelivery.put(\"Key\", new JSONArray(new String[] {\"Cycle\", \"AgentID\", \"DestinationX\", \"DestinationY\"}));\n packetDelivery.put(\"Data\", new JSONArray(historyPackets.entrySet().stream()\n .flatMap(entry -> entry.getValue().stream()\n .filter(p -> p.mode == PacketAction.Mode.Delivery)\n .map(l -> l.toJSONArray(entry.getKey())))\n .collect(Collectors.toList())));\n\n\n JSONObject packetDrop = new JSONObject();\n packetDrop.put(\"Key\", new JSONArray(new String[] {\"Cycle\", \"AgentID\", \"DropX\", \"DropY\"}));\n packetDrop.put(\"Data\", new JSONArray(historyPackets.entrySet().stream()\n .flatMap(entry -> entry.getValue().stream()\n .filter(p -> p.mode == PacketAction.Mode.Drop)\n .map(l -> l.toJSONArray(entry.getKey())))\n .collect(Collectors.toList())));\n\n\n JSONObject energyUpdate = new JSONObject();\n energyUpdate.put(\"Key\", new JSONArray(new String[] {\"Cycle\", \"AgentID\", \"Operator\", \"Percentage\"}));\n energyUpdate.put(\"Data\", new JSONArray(historyEnergy.entrySet().stream()\n .flatMap(entry -> entry.getValue().stream()\n .map(l -> l.toJSONArray(entry.getKey())))\n .collect(Collectors.toList())));\n\n\n head.put(\"Meta\", meta);\n head.put(\"Moves\", moves);\n head.put(\"PacketPickups\", packetPickup);\n head.put(\"PacketDeliveries\", packetDelivery);\n head.put(\"PacketDrops\", packetDrop);\n head.put(\"EnergyUpdates\", energyUpdate);\n\n try {\n FileWriter writer = new FileWriter(file);\n head.write(writer, 0, 0);\n writer.close();\n } catch (IOException e) {\n System.err.println(\"Failed to write history to file \" + file.getAbsolutePath());\n e.printStackTrace();\n }\n }",
"public boolean saveHistory(OperatorSelectionHistory history,String filename,String separator) {\n try(FileWriter fw = new FileWriter(new File(filename))){\n ArrayList<Variation> orderedHistory = history.getOrderedHistory();\n ArrayList<Integer> orderedTime = history.getOrderedSelectionTime();\n\n for(int i = 0; i < orderedHistory.size(); i++) {\n fw.append(Integer.toString(orderedTime.get(i)));\n fw.append(separator);\n String[] heuristicName = orderedHistory.get(i).toString().split(\"operator.\");\n String[] splitName = heuristicName[heuristicName.length - 1].split(\"@\");\n fw.append(splitName[0]);\n if(!orderedHistory.isEmpty())\n fw.append(\"\\n\");\n }\n fw.flush();\n } catch (IOException ex) {\n Logger.getLogger(IOSelectionHistory.class.getName()).log(Level.SEVERE, null, ex);\n return false;\n }\n return true;\n }",
"void clearHistoryData();",
"@Override\n\tpublic void writeToParcel(Parcel dest, int flags) {\n\t\tdest.writeInt(history.size());\n\n\t\t// Save each chat message\n\t\tfor (ChatMessage cm : history) {\n\t\t\tdest.writeInt(cm.getIdx());\n\t\t\tdest.writeString(cm.getUser().toString());\n\t\t\tdest.writeString(cm.getMessage().toString());\n\t\t\tdest.writeLong(cm.getTimestamp());\n\t\t}\n\t}",
"private void persistHistoricalData() {\n /*\n r4 = this;\n r1 = r4.mInstanceLock;\n monitor-enter(r1);\n r0 = r4.mReadShareHistoryCalled;\t Catch:{ all -> 0x000f }\n if (r0 != 0) goto L_0x0012;\n L_0x0007:\n r0 = new java.lang.IllegalStateException;\t Catch:{ all -> 0x000f }\n r2 = \"No preceding call to #readHistoricalData\";\n r0.<init>(r2);\t Catch:{ all -> 0x000f }\n throw r0;\t Catch:{ all -> 0x000f }\n L_0x000f:\n r0 = move-exception;\n monitor-exit(r1);\t Catch:{ all -> 0x000f }\n throw r0;\n L_0x0012:\n r0 = r4.mHistoricalRecordsChanged;\t Catch:{ all -> 0x000f }\n if (r0 != 0) goto L_0x0018;\n L_0x0016:\n monitor-exit(r1);\t Catch:{ all -> 0x000f }\n L_0x0017:\n return;\n L_0x0018:\n r0 = 0;\n r4.mHistoricalRecordsChanged = r0;\t Catch:{ all -> 0x000f }\n r0 = 1;\n r4.mCanReadHistoricalData = r0;\t Catch:{ all -> 0x000f }\n r0 = r4.mHistoryFileName;\t Catch:{ all -> 0x000f }\n r0 = android.text.TextUtils.isEmpty(r0);\t Catch:{ all -> 0x000f }\n if (r0 != 0) goto L_0x0031;\n L_0x0026:\n r0 = SERIAL_EXECUTOR;\t Catch:{ all -> 0x000f }\n r2 = new com.actionbarsherlock.widget.ActivityChooserModel$HistoryPersister;\t Catch:{ all -> 0x000f }\n r3 = 0;\n r2.<init>();\t Catch:{ all -> 0x000f }\n r0.execute(r2);\t Catch:{ all -> 0x000f }\n L_0x0031:\n monitor-exit(r1);\t Catch:{ all -> 0x000f }\n goto L_0x0017;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.actionbarsherlock.widget.ActivityChooserModel.persistHistoricalData():void\");\n }",
"@Test\n\tpublic void test2() {\n\t\tHistoryStorage historyObj = HistoryStorage.getInstance();\n\t\tboolean result = historyObj.writeToHistory(HISTORY_TXT, null);\n\t\tassertFalse(result);\n\t}",
"void saveNewTargetsForLater() {\n while (!newFutureTargets.isEmpty()) {tempStack.push(newFutureTargets.pop());}\n while (!tempStack.isEmpty()) {laterFutureTargets.push(tempStack.pop());}\n }",
"public void saveProgress() {\n\t\tsaveUsers();\n\t\tsaveMaterials();\n\t\tsaveBorrowings();\n\t}",
"public void refreshHistory() {\n whitesEaten = \"\";\n blacksEaten = \"\";\n whitePiecesEaten.setText(\"None\");\n blackPiecesEaten.setText(\"None\");\n\n moveHistory.clear();\n }",
"void writeToFile() throws IOException{\n\t\tString fileName = f.getTitle() + \".txt\";\n\t\tfileWrite = new BufferedWriter( new FileWriter(fileName));\n\t\tfileWrite.write(history);\n\t\tSystem.out.println(fileName + \" File Writing Successful!!\");\n\t\tSystem.out.println(\"Data in file :\\n\" + history);\n\t\tfileWrite.flush();\n\t\tFile file = new File(fileName);\n\t\tjava.awt.Desktop.getDesktop().open(file);\n\n\t}",
"public StringBuilder getHistory() {\r\n\t\treturn history;\r\n\t}",
"public void saveSearchedCityNames(){\n SharedPreferences.Editor editor = getSharedPreferences(SharedPrefKeys.HISTORY, MODE_PRIVATE).edit();\n Set<String> cityNamesSet = new HashSet<>();\n cityNamesSet.addAll(mSearchedCities);\n editor.putStringSet(\"SearchedCities\", cityNamesSet);\n editor.apply();\n }",
"private void storeUserInputHistory(String input) {\n if (userInputHistoryPointer != userInputHistory.size() - 1\n || (userInputHistoryPointer == userInputHistory.size() - 1\n && !input.equals(userInputHistory.get(userInputHistoryPointer)))) {\n userInputHistory.add(input);\n }\n userInputHistoryPointer = userInputHistory.size();\n currentInput = null;\n }",
"public void writeBuyingHistory(ArrayList<String> boughtBooks)throws IOException\n {\n String toWrite = new String();\n int i =0;\n if(hisMap.get(Customer.getInstance().getUsername())==null)\n {\n hisMap.put(Customer.getInstance().getUsername(),new ArrayList<String>());\n }\n else\n {\n i=0;\n while (i<boughtBooks.size())\n {\n hisMap.get(Customer.getInstance().getUsername()).add(boughtBooks.get(i));\n i++;\n }\n }\n\n\n i=0;\n\n toWrite+=Customer.getInstance().getUsername()+\",\";\n while (i<hisMap.get(Customer.getInstance().getUsername()).size()-boughtBooks.size())\n {\n toWrite+=hisMap.get(Customer.getInstance().getUsername()).get(i)+\"%\";\n i++;\n }\n ;\n i=0;\n while (i<boughtBooks.size())\n {\n toWrite+=boughtBooks.get(i);\n if(i!=boughtBooks.size()-1)\n toWrite+=\"%\";\n i++;\n }\n\n\n\n\n List<String> lines = Files.readAllLines(Paths.get(\"history.txt\"));\n if(specificLine>lines.size()-1)\n {\n lines.add(toWrite);\n }\n else {\n lines.set(specificLine, toWrite);\n }\n /*write part*/\n BufferedWriter bw = null;\n FileWriter fw = null;\n try {\n int j=0;\n String content = \"\";\n while (j<lines.size())\n {\n content+= lines.get(j)+\"\\n\";\n j++;\n }\n\n fw = new FileWriter(\"history.txt\");\n bw = new BufferedWriter(fw);\n bw.write(content);\n\n } catch (IOException e) {\n\n e.printStackTrace();\n\n } finally {\n\n try {\n\n if (bw != null)\n bw.close();\n\n if (fw != null)\n fw.close();\n\n } catch (IOException ex) {\n\n ex.printStackTrace();\n\n }\n\n }\n\n }",
"protected void toggleHistory(final Context ctx,\r\n final SubscriberNumberMgmtHistory history)\r\n throws AgentException\r\n {\r\n\r\n try\r\n {\r\n SubscriberNumberMgmtHistory cloneHistory = (SubscriberNumberMgmtHistory) history.clone();\r\n\r\n if (cloneHistory.getLatest() != latest_)\r\n {\r\n cloneHistory.setLatest(latest_);\r\n cloneHistory.setEndTimestamp(endTimestamp_);\r\n }\r\n setHistory((SubscriberNumberMgmtHistory)home_.store(ctx, cloneHistory));\r\n // there should only be one entry with latest set to true\r\n setAddNewHistoryRequired(true);\r\n count_++;\r\n throw new AbortVisitException();\r\n }\r\n catch(CloneNotSupportedException cloneEx)\r\n {\r\n throw new AgentException(cloneEx);\r\n }\r\n catch (HomeException hEx)\r\n {\r\n throw new AgentException(hEx);\r\n }\r\n }",
"public void loadHistory(SyncedList<MSensor> history) {\n this.history = history;\n }",
"void saveSet() {\n if( file==null ) {\n int returnVal = fc.showSaveDialog(this);\n if (returnVal != JFileChooser.APPROVE_OPTION) {\n System.out.println(\"Open command cancelled by user.\");\n return;\n }\n file = fc.getSelectedFile();\n }\n System.out.println(\"Saving to: \" + file.getName());\n try {\n int count = tabbedPane.getTabCount();\n ArrayList l = new ArrayList();\n for(int i=0; i< count; i++) {\n rrpanel= (RoombaRecorderPanel)tabbedPane.getComponentAt(i);\n l.add(rrpanel.copy());\n }\n FileOutputStream fos = new FileOutputStream(file);\n ObjectOutputStream oos = new ObjectOutputStream(fos);\n //oos.writeObject(loopButton);\n //oos.writeObject(\n oos.writeObject(l);\n oos.close();\n } catch( Exception e ) {\n System.out.println(\"Save error \"+e);\n }\n }",
"@Override\n\tpublic void saveOrUpdateElementHistory(ElementHistory elementHistory) {\n\t\telementHistoryRepository.save(elementHistory);\n\t}",
"public synchronized Map<String, Long> getHistory() {\r\n return settings.getMap(HISTORY_SETTING);\r\n }",
"@Override\n\tpublic void save(ElementHistory elementHistory) {\n\t\telementHistoryRepository.save(elementHistory);\n\t}",
"public void saveAll() {\n\n if (schedule != null) {\n\n readWrite.save(schedule, buddies);\n }\n if (finalsList != null) {\n\n readWrite.save(finalsList, finalsTerm);\n }\n }",
"private void saveData(){\n\t\tsynchronized(onlineAllInfoList){\n\t\t\tRecorder.save(onlineAllInfoList, onlineAllInfoListFileName);\n\t\t}\n\t\t//System.out.println(\"Saving onlineCompetitionInfoList...\");System.out.flush();\n\t\tsynchronized(onlineCompetitionInfoList){\n\t\t\tRecorder.save(onlineCompetitionInfoList, onlineCompetitionInfoListFileName);\t\t\t\n\t\t}\n\t\t//System.out.println(\"Saving competitionList...\");System.out.flush();\n\t\tsynchronized(competitionList){\n\t\t\tRecorder.save(competitionList, competitionInfoListFileName);\n\t\t}\n\t\t//System.out.println(\"Saving allAIInfoList...\");System.out.flush();\n\t\tsynchronized(allAIInfoList){\n\t\t\tRecorder.save(allAIInfoList, allInfoListFileName);\t\t\t\n\t\t}\n\t\t//System.out.println(\"Saving waitingInfoList...\");System.out.flush();\n\t\tsynchronized(waitingInfoList){\n\t\t\tRecorder.save(waitingInfoList, waitingInfoListFileName);\t\t\t\n\t\t}\n\t\t//System.out.println(\"Saving sortedAIInfoPool...\");System.out.flush();\n\t\tsynchronized(sortedAIInfoPool){\n\t\t\tRecorder.save(sortedAIInfoPool, sortedInfoListFileName);\t\t\t\n\t\t}\n\t}",
"public static void clearHistoryData() {\n try {\n clearFile(HISTORY_FILE_PATH);\n } catch (Exception e) {\n StorageSavingException exception = new StorageSavingException(e);\n Ui.printExceptionMessage(exception);\n }\n }",
"public void switchToHistory() {\r\n\t\thistoryPane.addEditTabs(editTabs);\r\n\t\tlayout.show(this, \"historyPane\");\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}",
"public void commitChanges(){\r\n try{\r\n //Record the state of unfinished set in unfinished.dat\r\n unfinishedFileOutputStream = new FileOutputStream(UNFINISHED_FILE_PATH);\r\n unfinishedSetOutputStream = new ObjectOutputStream(unfinishedFileOutputStream);\r\n unfinishedSetOutputStream.writeObject(unfinished);\r\n unfinishedSetOutputStream.close();\r\n unfinishedFileOutputStream.close();\r\n\r\n //Record the state of finished list in finished.dat\r\n finishedFileOutputStream = new FileOutputStream(FINISHED_FILE_PATH);\r\n finishedListOutputStream = new ObjectOutputStream(finishedFileOutputStream);\r\n finishedListOutputStream.writeObject(finished);\r\n finishedListOutputStream.close();\r\n finishedFileOutputStream.close();\r\n\r\n //Record the state of activities list in activities.dat\r\n activitiesFileOutputStream = new FileOutputStream(ACTIVITIES_FILE_PATH);\r\n activitiesListOutputStream = new ObjectOutputStream(activitiesFileOutputStream);\r\n activitiesListOutputStream.writeObject(activities);\r\n activitiesListOutputStream.close();\r\n activitiesFileOutputStream.close();\r\n }\r\n catch(Exception e){\r\n System.out.println(\"Stress in commiting changes: \" + e.getMessage());\r\n e.printStackTrace();\r\n }\r\n }",
"public void saveJbdSendRecordHist(JbdSendRecordHist jbdSendRecordHist);",
"public void resetHistory() {\n SharedPreferences.Editor editor = preferences.edit();\n editor.remove(\"usernameHistory\");\n editor.apply();\n }",
"private void backupStateAll(BPState curState, FileProcess bkFile) {\n\t\tString result = \"Address=\" + curState.getLocation().toString() + \"\\n\";\n\t\tresult += \"Register:\" + curState.getEnvironement().getRegister() + \"\\n\";\n\t\tresult += \"Flag:\" + curState.getEnvironement().getFlag() + \"\\n\";\n\t\tresult += \"Memory:\" + curState.getEnvironement().getMemory() + \"\\n\";\n\t\tresult += \"SEH:\" + curState.getEnvironement().getSystem().getSEHHandler().toString() + \"\\n\";\n\t\tresult += \"*************************************************************\";\n\n\t\tbkFile.appendFile(result);\n\t}",
"public void saveState() { }",
"void saveActivityHistForAddEntity(Record inputRecord);",
"synchronized void saveDhtState() {\n if (dhtTracker != null) {\n saveDhtEntries(dhtTracker.getTrackerState());\n }\n }",
"protected void saveBuffer(String name) {\r\n\t\tStringBuffer sb = m_History.getNamedBuffer(name);\r\n\t\tif (sb != null) {\r\n\t\t\tif (m_SaveOut.save(sb)) {\r\n\t\t\t\tm_Log.logMessage(\"Save successful.\");\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void setHistoryCleared() {\n\n // If jelly bean or above.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {\n\n // Finish all activities on\n // the current stack.\n activity.finishAffinity();\n } else {\n activity.finish();\n }\n }",
"@Transactional\n public History save(History history) {\n return historyRepository.save(history);\n }",
"public static void saveState(Map<String, Feed> feeds) {\r\n try {\r\n FileOutputStream fileOut = new FileOutputStream(\"feeds\");\r\n ObjectOutputStream objectOut = new ObjectOutputStream(fileOut);\r\n objectOut.writeObject(feeds);\r\n objectOut.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"public void save() {\n savePrefs();\n }",
"protected abstract void createHistoryEvents();",
"public String getHistory () {\r\n\t\treturn history;\r\n\t}",
"public String getHistory () {\r\n\t\treturn history;\r\n\t}",
"private void copyAndSave()\n {\n // create new branch\n if (NEW_BRANCH.equals(selectedBranch)) {\n createAndSetNewBranch();\n }\n List<String> updatePages = getAllPageIdsForUpdate();\n\n // copy current filestats entry to source target branch\n copyAndSaveFileStats(branch, selectedBranch, updatePages);\n\n // add new page information to filestats of new branch\n updateFileStats(FileState.valueOf(newPageState), selectedAssignee, selectedBranch, updatePages);\n\n // save page(s) in new branch\n wikiContext.runInTenantContext(selectedBranch, getWikiSelector(), new CallableX<Void, RuntimeException>()\n {\n @Override\n public Void call() throws RuntimeException\n {\n for (GWikiElement pageToUpdate : getAllPagesForUpdate()) {\n wikiContext.getWikiWeb().saveElement(wikiContext, pageToUpdate, true);\n }\n return null;\n }\n });\n\n // remove page(s) in old branch\n wikiContext.runInTenantContext(branch, getWikiSelector(), new CallableX<Void, RuntimeException>()\n {\n @Override\n public Void call() throws RuntimeException\n {\n for (GWikiElement pageToUpdate : getAllPagesForUpdate()) {\n wikiContext.getWikiWeb().removeWikiPage(wikiContext, pageToUpdate);\n }\n return null;\n }\n });\n }",
"void writeStackToRecentsBlocking() {\n final ContentResolver resolver = getContentResolver();\n final ContentValues values = new ContentValues();\n\n final byte[] rawStack = DurableUtils.writeToArrayOrNull(mState.stack);\n\n // Remember location for next app launch\n final String packageName = getCallingPackageMaybeExtra();\n values.clear();\n values.put(ResumeColumns.STACK, rawStack);\n values.put(ResumeColumns.EXTERNAL, 0);\n resolver.insert(RecentsProvider.buildResume(packageName), values);\n }",
"public void saveAll(){\n // Store postings\n for (Map.Entry<String, PostingsList> entry : this.index.entrySet()) {\n saveJSON(\"postings/t\"+hash(entry.getKey())+\".json\", entry.getValue());\n System.err.println(\"postings/t\"+hash(entry.getKey())+\".json\");\n count++;\n if (count%1000==0)\n System.err.println(\"storing \"+ count);\n }\n // Store mapping ID<->document names mapping\n this.saveJSON(\"postings/docIDs.json\", this.docIDs);\n this.saveJSON(\"postings/docLengths.json\", this.docLengths);\n }",
"private void save(){\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n SharedPreferences.Editor editor = preferences.edit();\n Gson gson = new Gson();\n String json = gson.toJson(downloadedBooks);\n editor.putString( LISTS_DOWNLOADED, json);\n json = gson.toJson(progress);\n editor.putString( LISTS_PROGRESS, json);\n editor.apply();\n }",
"public void saveBranches(ArrayList<Branch> branchList2) {\r\n\t\ttry {\r\n\t\t\tFileOutputStream fos = new FileOutputStream(BRANCH_FILEPATH);\r\n\t\t\tObjectOutputStream oos = new ObjectOutputStream(fos);\r\n\t\t\tint size = branchList2.size();\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < size; i++) {\r\n\t\t\t\toos.writeObject(branchList2.get(i));\r\n\t\t\t}\r\n\t\t\toos.close();\r\n\t\t}\r\n\t\tcatch (EOFException e) {\r\n\t\t\tSystem.out.println(\"End of file reached.\");\r\n }\r\n catch (IOException e) {\r\n \te.printStackTrace();\r\n }\r\n\t}",
"private void saveAndExit() {\n if (yesNoQuestion(\"Would you like to save the current active courses to the saved list before saving?\")) {\n addActiveCourseListToCourseList();\n }\n try {\n JsonWriter writer = new JsonWriter(\"./data/ScheduleList.json\",\n \"./data/CourseList.json\");\n writer.open(true);\n writer.writeScheduleList(scheduleList);\n writer.close(true);\n\n writer.open(false);\n writer.writeCourseList(courseList);\n writer.close(false);\n } catch (IOException ioe) {\n System.out.println(\"File Not Found, failed to save\");\n } catch (Exception e) {\n System.out.println(\"Unexpected Error, failed to save\");\n }\n\n }",
"public void saveBorrowings() {\n\t}",
"public String getHistory () {\n\t\treturn history;\n\t}",
"public void save() {\n for (Workspace a : workspaces) {\n if (!a.isSearch()) {\n try {\n saveWorkspace(a);\n } catch (Exception e) {\n main.system.ExceptionMaster.printStackTrace(e);\n }\n }\n }\n }",
"private boolean dataToHistory(DataEntry oldEntry) {\n\t\tif (oldEntry != null) {\n\t\t\tif (bufferIndex < MAX_HISTORY_ENTRIES) {\n\t\t\t\toldEntries[bufferIndex++] = new HistoryEntry(oldEntry.getProductId(), oldEntry);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public void SaveUndo(){\r\n if(!IsFalling() && !IsDisappearing()) {\r\n char[][] x = new char[map.length][map[0].length];\r\n for (int i = 0; i < map.length; i++)\r\n for (int j = 0; j < map[i].length; j++)\r\n x[i][j] = this.map[i][j];\r\n UndoMap.add(x);\r\n }\r\n }",
"@Test\n\tpublic void test3() {\n\t\tHistoryStorage historyObj = HistoryStorage.getInstance();\n\t\tboolean result = historyObj.writeToHistory(HISTORY_TXT, EMPTY_STRING);\n\t\tassertTrue(result);\n\t}",
"public void initAllHistory() {\n\t\t// firstly tell the view clear its history content.\n\t\tview.clearHistoryTableContent();\n\n\t\tArrayList<Integer> scores = selectedLesson.getTestResultScores();\n\t\tArrayList<String> times = selectedLesson.getTestResultTimes();\n\n\t\tint count = times.size();\n\t\tfor (int i = 0; i < count; ++i) {\n\t\t\tview.addHistory(times.get(i), scores.get(i));\n\t\t}\n\t}",
"@Override\n\tpublic void onSaveInstanceState(Bundle savedInstanceState) {\n\n\t\tsuper.onSaveInstanceState(savedInstanceState);\n\n\t\t/* save variables */\n\t\tsavedInstanceState.putLong(\"NumberOfSignalStrengthUpdates\",\n\t\t\t\tNumberOfSignalStrengthUpdates);\n\n\t\tsavedInstanceState.putLong(\"LastCellId\", LastCellId);\n\t\tsavedInstanceState.putLong(\"NumberOfCellChanges\", NumberOfCellChanges);\n\n\t\tsavedInstanceState.putLong(\"LastLacId\", LastLacId);\n\t\tsavedInstanceState.putLong(\"NumberOfLacChanges\", NumberOfLacChanges);\n\n\t\tsavedInstanceState.putLongArray(\"PreviousCells\", PreviousCells);\n\t\tsavedInstanceState.putInt(\"PreviousCellsIndex\", PreviousCellsIndex);\n\t\tsavedInstanceState.putLong(\"NumberOfUniqueCellChanges\",\n\t\t\t\tNumberOfUniqueCellChanges);\n\n\t\tsavedInstanceState.putBoolean(\"outputDebugInfo\", outputDebugInfo);\n\n\t\t/* save the trace data still in the write buffer into a file */\n\t\tsaveDataToFile(FileWriteBufferStr, \"---in save instance, \"\n\t\t\t\t+ DateFormat.getTimeInstance().format(new Date()) + \"\\r\\n\",\n\t\t\t\tcellLogFilename);\n\t\tFileWriteBufferStr = \"\";\n\n\t}",
"public void deleteHistory() {\n weatherRepo.deleteAll();\n }",
"public void saveGame(){\n \tsaveOriginator.writeMap(this.map, this.getObjectives(), this.gameState);\n \tsaveGame.saveGame(saveOriginator);\n }",
"private void rememberState() {\n int size = pageHistory.size();\n for ( int i = historyCursor + 1; i < size; i++ ) {\n pageHistory.remove( historyCursor + 1 );\n }\n // Add current state to history if different from current one\n PageState newState = new PageState();\n if ( historyCursor < 0 || !pageHistory.get( historyCursor ).equals( newState ) ) {\n pageHistory.add( newState );\n historyCursor = pageHistory.size() - 1;\n }\n }",
"@Override\n public void updateHistory(Command c) {\n }",
"public void appendHistoryLog(String convertedURL) {\n\t\tString url_to_save = convertedURL + \"\\n\";\n\t\ttry (FileWriter fw = new FileWriter(\"history.txt\", true);\n\t\t\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\t\tPrintWriter out = new PrintWriter(bw)) {\n\t\t\tout.println(url_to_save);\n\t\t\tlblStatus.setText(\"Url successfully saved!\");\n\t\t} catch (IOException e) {\n\t\t\tlblStatus.setText(e.toString());\n\t\t}\n\t\t/*\n\t\t * try { Files.write(Paths.get(\"history.txt\"), url_to_save.getBytes(),\n\t\t * StandardOpenOption.APPEND); } catch (IOException e) { // tfNewURL\n\t\t * e.printStackTrace(); }\n\t\t */\n\t}",
"public void addSessionToLog(Setting theSetting) {\n // move all history items one position\n if (n == 1) {\n history[1] = history[0];\n }\n else if (n == MAX_HISTORY) {\n for (int i=MAX_HISTORY-1; i>=1; i--) {\n history[i] = history[i-1];\n }\n }\n else {\n for (int i=n; i>=1; i--) {\n history[i] = history[i-1];\n }\n }\n\n // add new item\n history[0] = theSetting.toString();\n settingList.add(new Setting(history[0]));\n if (n < MAX_HISTORY) {\n n++;\n }\n\n // print them to file\n try {\n OutputStreamWriter outputStreamWriter = new OutputStreamWriter(appContext.openFileOutput(MainActivity.FILENAME, Context.MODE_PRIVATE));\n\n for (int i=0; i<n; i++) {\n outputStreamWriter.write(history[i] + \"\\n\");\n }\n\n outputStreamWriter.close();\n }\n catch (IOException e) {\n Log.e(\"Exception\", \"File write failed: \" + e.toString());\n }\n }",
"public void save()\n\t{\n\t\tfor(PlayerData pd : dataMap.values())\n\t\t\tpd.save();\n\t}",
"public static void save() {\n\t\tfor (TeleporterData tld : teleports.values()) {\n\t\t\ttld.write();\n\t\t}\n\t}",
"public void saveAllData()\n {\n \tfor(String s : games.keySet())\n \t{\n \t\tGame g = games.get(s);\n \t\tif(g.saveAllData())\n \t\t{\n \t\t\tSystem.out.println(\"Game '\" + g.getGameName() + \"' saved all data successfully!\");\n \t\t}\n \t\telse\n \t\t{\n \t\t\tSystem.out.println(\"Error when attempting to save data in game '\" + g.getGameName() + \"'!\");\n \t\t}\n \t}\n }",
"public static void saveLotteryFiles() {\n\t\tFileUtility.deleteAllLines(TOTAL_TICKETS_FILE);\n\t\tFileUtility.deleteAllLines(LOTTERY_ENTRIES_FILE);\n\t\tFileUtility.addLineOnTxt(TOTAL_TICKETS_FILE, totalTicketsPurchased + \"\");\n\n\t\tArrayList<String> line = new ArrayList<String>();\n\t\tfor (int index = 0; index < LotteryDatabase.lotteryDatabase.size(); index++) {\n\t\t\tLotteryDatabase data = LotteryDatabase.lotteryDatabase.get(index);\n\t\t\tline.add(data.getPlayerName() + ServerConstants.TEXT_SEPERATOR + data.getTicketsPurchased());\n\t\t}\n\t\tFileUtility.saveArrayContentsSilent(LOTTERY_ENTRIES_FILE, line);\n\t}",
"public void saveChanges() {\n if(finalListModel.isEmpty() || finalListModel.size() < initialListModel.size() ) {\n JOptionPane.showMessageDialog(null, \"Sorry, number of buttons should be \" +\n \"equal to the number of files in final list\");\n }\n// else if((finalListModel.toString()).equals(initialListModel.toString())) {\n// JOptionPane.showMessageDialog(null, \"Sorry, make different selections as \" +\n// \"both final and initial list are same\");\n// }\n else {\n save();\n initialListModel.removeAllElements();\n for (int i = 0; i < order.getItemCount(); i++) {\n initialListModel.addElement(finalListModel.getElementAt(i));\n }\n }\n }",
"private static void saveChanges() throws IOException{\n\t\twriteToStudentsFile(); //copy all the StudentDetails objects in ALL_STUDENTS and write them to the students.txt file\n\t\twriteToBooksFile(); //copy all the BookDetails objects in ALL_BOOKS and write them to the books.txt file\n\t\tSystem.out.println(\"All Changes Successfully Saved!\");\n\t\tSystem.out.println(\"Thanks for using the Library Management System\");\n\t}",
"private History toHistory(Game game) {\n\n History history = new History();\n\n history.setDate(game.getDate());\n history.setPlayerNameUa(game.getUsers().get(0).getNameUa());//TODO improve\n history.setPlayerNameEn(game.getUsers().get(0).getNameEn());//TODO improve\n\n if (game.getUsers().size() > 1) { //TODO improve\n history.setOpponentNameUa(game.getUsers().get(1).getNameUa());\n history.setOpponentNameEn(game.getUsers().get(1).getNameEn());\n } else {\n //TODO correct for both languages\n history.setOpponentNameUa(ResourceBundleUtil.getBundleString(\"games.game.statistics.text.audience\"));\n history.setOpponentNameEn(ResourceBundleUtil.getBundleString(\"games.game.statistics.text.audience\"));\n }\n\n User firstPlayer = game.getUsers().get(0); //TODO correct\n long firstPlayerScores = game.getAnsweredQuestions()\n .stream()\n .filter(aq -> firstPlayer.equals(aq.getUserWhoGotPoint()))\n .count();\n\n long secondPlayerScores = (long) game.getAnsweredQuestions()\n .size() - firstPlayerScores;\n\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(firstPlayerScores);\n stringBuilder.append(DELIMITER);//TODO move \":\" to properties\n stringBuilder.append(secondPlayerScores);\n String scores = stringBuilder.toString();\n history.setScores(scores);\n //TODO correct for both languages\n game.getAppeals().stream()\n .forEach(appeal -> {\n if (appeal.getAppealStage().equals(AppealStage.CONSIDERED)) {\n history.setAppealStage(ResourceBundleUtil.getBundleStringForAppealStage(AppealStage.CONSIDERED.name()));\n } else {\n history.setAppealStage(ResourceBundleUtil.getBundleStringForAppealStage(AppealStage.NOT_FILED.name()));\n }\n\n });\n// }\n return history;\n\n }",
"private void savePreviousRates() {\n\t\tFileInputStream fis = null;\n\t\tFileOutputStream fos = null;\n\t\t\n\t\ttry {\n\t\t\tfis = openFileInput(getResString(R.string.INTERNAL_STORAGE_CACHE));\n\t\t\t\n\t\t\tByteArrayOutputStream baos = new ByteArrayOutputStream(1024);\n\t\t\tbyte[] buffer = new byte[1024];\n\t\t\tint read = -1;\n\t\t\twhile( (read = fis.read(buffer) ) != -1 ) {\n\t\t\t\tbaos.write(buffer, 0, read);\n\t\t\t}\n\t\t\tbaos.close();\n\t\t\tfis.close();\n\n\t\t\t// write to old rates cache\n\t\t\tfos = openFileOutput(getResString(R.string.PREVIOUS_INTERNAL_STORAGE_CACHE), MODE_PRIVATE);\n\t\t\tbaos.writeTo(fos);\n\t\t\tfos.close();\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tLog.e(TAG, \"Error saving previous rates!\");\n\t\t}\n\t\tfinally {\n\t\t\ttry { if ( fis != null ) fis.close(); } catch (IOException e) { }\n\t\t\ttry { if ( fos != null ) fos.close(); } catch (IOException e) { }\n\t\t}\n\t}",
"public static void saveHistoryData(Food foodInput) {\n try {\n addFoodToHistoryFile(HISTORY_FILE_PATH, foodInput);\n } catch (Exception e) {\n StorageSavingException exception = new StorageSavingException(e);\n Ui.printExceptionMessage(exception);\n }\n }",
"protected void storeCurrentValues() {\n }",
"private void saveVisitas(String estado) {\n int c = mVisitasTerreno.size();\n for (VisitaTerreno visita : mVisitasTerreno) {\n visita.getMovilInfo().setEstado(estado);\n estudioAdapter.updateVisitasSent(visita);\n publishProgress(\"Actualizando Visitas\", Integer.valueOf(mVisitasTerreno.indexOf(visita)).toString(), Integer\n .valueOf(c).toString());\n }\n //actualizar.close();\n }",
"private void printBrowsingHistory()\r\n\t{\r\n\t\tQueue temp = new Queue(SIZE);\r\n\t\tObject element;\r\n\t\t\r\n\t\tSystem.out.println(\"\\nBrowsing History (Oldest to Most Recent):\");\r\n\t\tfor (int i = 0; i < queueCount; i++)\r\n\t\t{\r\n\t\t\telement = rChronological.dequeue();\t\t\t\t//dequeue first element to the variable element\r\n\t\t\tSystem.out.println(element);\t\t\t\t\t//print out the value of element (the URL)\r\n\t\t\ttemp.enqueue(element);\t\t\t\t\t\t\t//enqueue element to a temporary queue\r\n\t\t}\r\n\t\tfor (int i = 0; i < queueCount; i++)\r\n\t\t\trChronological.enqueue(temp.dequeue());\t\t\t//put all elements in temp back to the original queue\r\n\t}",
"public void saveState() {\n\t\tsuper.saveState();\n\t}",
"List<HistoryData> loadAllHistoryData();",
"public void saveState() {\n\t\tFileOutputStream fos = null;\n\t\tObjectOutputStream out = null;\n\t\ttry {\n\t\t\tFile savefile = new File(getServletContext().getRealPath(\"/WEB-INF/\"), SAVED_RECEPTOR_FILE_NAME);\n\t\t\tfos = new FileOutputStream(savefile);\n\t\t\tout = new ObjectOutputStream(fos);\n\t\t\tout.writeObject(pgtMap);\n\t\t\tout.close();\n\t\t} catch (IOException ex) {\n\t\t\tSystem.err.println(\"IO Exception saving proxyTicket cache\");\n\t\t\tex.printStackTrace();\n\t\t} catch (Exception e) { //don't think this is possible, but I'm seeing some goofy behavior, so...\n\t\t\tSystem.err.println(\"Non-IO Exception saving proxyTicket cache\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void savePreferences() {\n SharedPreferences sp = getSharedPreferences(MY_PREFS, MODE_PRIVATE);\n SharedPreferences.Editor editor = sp.edit();\n\n editor.putInt(\"entreeIndex\", spEntree.getSelectedItemPosition());\n editor.putInt(\"drinkIndex\", spDrink.getSelectedItemPosition());\n editor.putInt(\"dessertIndex\", spDessert.getSelectedItemPosition());\n\n editor.apply();\n }",
"protected void saveKeys()\r\n {\r\n try\r\n {\r\n log.info(\"{0}: Saving keys to: {1}, key count: {2}\",\r\n () -> logCacheName, () -> fileName, keyHash::size);\r\n\r\n keyFile.reset();\r\n\r\n final HashMap<K, IndexedDiskElementDescriptor> keys = new HashMap<>(keyHash);\r\n if (!keys.isEmpty())\r\n {\r\n keyFile.writeObject(keys, 0);\r\n }\r\n\r\n log.info(\"{0}: Finished saving keys.\", logCacheName);\r\n }\r\n catch (final IOException e)\r\n {\r\n log.error(\"{0}: Problem storing keys.\", logCacheName, e);\r\n }\r\n }",
"private static void saveToFile(ArrayList<Favourite> allFav) {\n\t\t\n\t\tBufferedWriter writer=null;\n\t\t\n\t\ttry {\n\t\t\twriter=new BufferedWriter(new FileWriter(Constants.KEY_FAV_FILE));\n\t\t\tString save=\"\";\n\t\t\tfor(Favourite f:allFav) {\n\t\t\t\tsave+=fileFormat(f);\n\t\t\t}\n\t\t\twriter.write(save);\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t\n\t\t}finally{\n\t\tif(writer!=null){\n\t\t\ttry{\n\t\t\t\twriter.close();\n\t\t\t}catch(IOException e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\n\t\n}\n\n\t\t\n\t}",
"private void persistData() {\n mSharedPref.storeLastScreen(SCREEN_NAME);\n }",
"private static void writeToFilePriceHistory() throws IOException {\n FileWriter write = new FileWriter(path3, append);\n PrintWriter print_line = new PrintWriter(write);\n ArrayList<Product> stock = Inventory.getStock();\n for (int i = 0; i < stock.size(); i++) {\n Product product = (Product) stock.get(i);\n int UPC = product.getUpc();\n ArrayList<String> priceH = product.price.getArrayPriceHistory();\n for (int j = 0; j < priceH.size(); j++) {\n String price = priceH.get(j);\n textLine = UPC + \" \" + price;\n print_line.printf(\"%s\" + \"%n\", textLine);\n }\n }\n print_line.close();\n }",
"private void savePreferences(){\n SharedPreferences prefs = getPreferences(MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n\n editor.putInt(\"p1Count\", pOneCounter);\n editor.putInt(\"p2Count\", pTwoCounter);\n editor.putInt(\"pAICount\", pAICounter);\n editor.putInt(\"tieCount\", tieCounter);\n\n editor.commit();\n }",
"private void expungeAllHistoricFiles()\r\n {\r\n debug(\"expungeAllHistoricFiles() - Delete ALL HISTORIC Files\");\r\n\r\n java.io.File fileList = new java.io.File(\"./\");\r\n String rootName = getString(\"WatchListTableModule.edit.historic_details_basic_name\");\r\n String[] list = fileList.list(new MyFilter(rootName));\r\n for (int i = 0; i < list.length; i++)\r\n {\r\n StockMarketUtils.expungeListsFile(list[i]);\r\n }\r\n debug(\"expungeAllHistoricFiles() - Delete ALL HISTORIC Files - complete\");\r\n\r\n }",
"public void saveAll() {\n try {\n writeObject(IMAGE_DATA_PATH, imageFiles);\n writeObject(EXISTING_TAGS_PATH, existingTags);\n } catch (IOException e) {\n // e.printStackTrace();\n }\n }",
"private void saveState() {\n SharedPreferences prefs = getPreferences(MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n\n // Store our count..\n editor.putInt(\"count\", this._tally);\n\n // Save changes\n editor.commit();\n }",
"protected void addToHistory(ModelContainer model, \n\t\t\tList<OWLOntologyChange> appliedChanges, METADATA metadata) {\n\t\t// do nothing, for now\n\t}",
"public void openHistory() {\n usingHistoryScreen = true;\n myActivity.setContentView(R.layout.history);\n Button historyButtonToGame = myActivity.findViewById(R.id.button8);\n TextView historyText = myActivity.findViewById(R.id.textView46);\n historyText.setText(state.getHistory());\n historyText.setMovementMethod(new ScrollingMovementMethod());\n gui.invalidate();\n historyButtonToGame.setOnClickListener(\n new View.OnClickListener() {\n public void onClick(View v) {\n ShogiHumanPlayer.this.setAsGui(myActivity);\n usingHistoryScreen = false;\n if (state != null) {\n receiveInfo(state);\n }\n }\n });\n }",
"private void export(ActionEvent actionEvent) {\n if (this.totalCycles == -1) {\n var result = JOptionPane.showConfirmDialog(this, \"The run is not finished yet. Are you sure you want to proceed?\",\n \"Unfinished run\", JOptionPane.YES_NO_CANCEL_OPTION);\n\n if (result == JOptionPane.NO_OPTION) {\n return;\n }\n }\n\n // File dialog to save the history\n var fileChooser = new JFileChooser();\n fileChooser.setFileFilter(new FileFilter() {\n @Override\n public boolean accept(File file) {\n return file.getName().endsWith(\".json\");\n }\n\n @Override\n public String getDescription() {\n return \"*.json\";\n }\n });\n\n fileChooser.setAcceptAllFileFilterUsed(false);\n fileChooser.setCurrentDirectory(new File(Variables.OUTPUT_PATH));\n var resultDialog = fileChooser.showSaveDialog(this);\n\n if (resultDialog == JFileChooser.APPROVE_OPTION) {\n var file = fileChooser.getSelectedFile();\n\n if (!file.getName().endsWith(\".json\")) {\n file = new File(file.getAbsolutePath() + \".json\");\n }\n if (file.exists()) {\n var sure = JOptionPane.showConfirmDialog(this, \"File already exists. Overwrite?\",\n \"Overwrite file?\", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);\n\n if (sure != JOptionPane.YES_OPTION) {\n return;\n }\n }\n\n this.saveHistoryToFile(file);\n }\n }"
]
| [
"0.6908162",
"0.66873044",
"0.6604459",
"0.6584165",
"0.653183",
"0.6525347",
"0.6509158",
"0.6460949",
"0.6182111",
"0.59972423",
"0.5969321",
"0.59690744",
"0.5906623",
"0.5857627",
"0.58564234",
"0.5855428",
"0.58439004",
"0.5832412",
"0.5822509",
"0.57773787",
"0.5766541",
"0.5747017",
"0.5740947",
"0.5705348",
"0.56917477",
"0.5684845",
"0.56846565",
"0.56811035",
"0.5670803",
"0.5667983",
"0.56326145",
"0.5610294",
"0.5582881",
"0.5544968",
"0.5535894",
"0.5532146",
"0.5496604",
"0.54953396",
"0.54821104",
"0.5480513",
"0.5469037",
"0.5468803",
"0.54657763",
"0.5445056",
"0.54348785",
"0.54047835",
"0.53982353",
"0.539029",
"0.538992",
"0.538835",
"0.53815156",
"0.5377592",
"0.5377592",
"0.5366944",
"0.5366411",
"0.535928",
"0.5339776",
"0.53279",
"0.5321835",
"0.53127736",
"0.53047395",
"0.53046304",
"0.53028107",
"0.52980554",
"0.5285316",
"0.5281061",
"0.52725685",
"0.5272164",
"0.5269671",
"0.5267484",
"0.5252981",
"0.524476",
"0.5239557",
"0.523951",
"0.52360696",
"0.5232816",
"0.52303666",
"0.52177525",
"0.5213113",
"0.5211151",
"0.52106214",
"0.520632",
"0.520292",
"0.5201713",
"0.5192442",
"0.51898277",
"0.51877606",
"0.5185535",
"0.5179959",
"0.5177561",
"0.51695",
"0.5166381",
"0.5162908",
"0.51607156",
"0.5159062",
"0.5156082",
"0.51522005",
"0.51491535",
"0.5138508",
"0.5137156"
]
| 0.7883226 | 0 |
The API of the Model component. | public interface Model {
/**
* {@code Predicate} that always evaluate to true
*/
Predicate<Module> PREDICATE_SHOW_ALL_MODULES = unused -> true;
/**
* Replaces user prefs data with the data in {@code userPrefs}.
*/
void setUserPrefs(ReadOnlyUserPrefs userPrefs);
/**
* Returns the user prefs.
*/
ReadOnlyUserPrefs getUserPrefs();
/**
* Returns the user prefs' GUI settings.
*/
GuiSettings getGuiSettings();
/**
* Sets the user prefs' GUI settings.
*/
void setGuiSettings(GuiSettings guiSettings);
/**
* Returns the user prefs' mod book file path.
*/
Path getModBookFilePath();
/**
* Sets the user prefs' mod book file path.
*/
void setModBookFilePath(Path modBookFilePath);
/**
* Replaces mod book data with the data in {@code modBook}.
*/
void setModBook(ReadOnlyModBook modBook);
/**
* Returns the ModBook
*/
ReadOnlyModBook getModBook();
/**
* Returns true if a module with the same identity as {@code module} exists in the mod book.
*/
boolean hasModule(Module module);
/**
* Deletes the given module.
* The module must exist in the mod book.
*/
void deleteModule(Module module);
/**
* Adds the given module.
* {@code module} must not already exist in the mod book.
*/
void addModule(Module module);
/**
* Gets the requested module based on given modCode.
*
* @param modCode Used to find module.
* @return Module.
* @throws CommandException If module does not exist.
*/
Module getModule(ModuleCode modCode) throws CommandException;
/**
* Deletes the Exam from the specified module's lessons list.
*/
void deleteExam(Module module, Exam target);
/**
* Deletes the Lesson from the specified module's lessons list.
*/
void deleteLesson(Module module, Lesson target);
/**
* Checks if a module has the lesson
*/
boolean moduleHasLesson(Module module, Lesson lesson);
/**
* Adds a lesson to a module.
*/
void addLessonToModule(Module module, Lesson lesson);
/**
* Checks if a module has the lesson
*/
boolean moduleHasExam(Module module, Exam exam);
/**
* Adds a lesson to a module.
*/
void addExamToModule(Module module, Exam exam);
/**
* Replaces the {@code target} Exam with {@code newExam} from the specified module's exams list.
*/
void setExam(Module module, Exam target, Exam newExam);
/**
* Replaces the {@code target} Exam with {@code newLesson} from the specified module's lessons list.
*/
void setLesson(Module module, Lesson target, Lesson newLesson);
/**
* Replaces the given module {@code target} with {@code editedModule}.
* {@code target} must exist in the mod book.
* The module identity of {@code editedModule} must not be the same as another existing module in the mod book.
*/
void setModule(Module target, Module editedModule);
/**
* Returns an unmodifiable view of the filtered module list
*/
ObservableList<Module> getFilteredModuleList();
/**
* Updates the filter of the filtered module list to filter by the given {@code predicate}.
*
* @throws NullPointerException if {@code predicate} is null.
*/
void updateFilteredModuleList(Predicate<Module> predicate);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"ModelData getModel();",
"public Model getModel () { return _model; }",
"public ModelBean provideModel();",
"Model getModel();",
"Model getModel();",
"Model getModel();",
"public interface ModelAPI {\n\n @GET(\"repository/models\")\n Paging<Model> getModels();\n\n @GET(\"repository/models\")\n Paging<Model> getModels(@QueryMap Map<String, Object> params);\n\n @POST(\"repository/models\")\n Model createModel(@Body ModelRequest request);\n\n @DELETE(\"repository/models/{modelId}\")\n Void deleteModel(@Path(\"modelId\") String modelId);\n\n @GET(\"repository/models/{modelId}\")\n Model getModel(@Path(\"modelId\") String modelId);\n\n @PUT(\"repository/models/{modelId}\")\n Model getModel(@Body ModelRequest request);\n\n @GET(\"repository/models/{modelId}/source\")\n List<String> getModelSource(@Path(\"modelId\") String modelId);\n}",
"public Object getModel();",
"public abstract M getModel();",
"public String getModel();",
"IDataModel getIDataModel();",
"public Model getModel(){\r\n return model;\r\n }",
"@JsonIgnore\n @Override\n public Model getModel() {\n return this.model;\n }",
"java.lang.String getModel();",
"TypedModel getModel();",
"M getModel();",
"@Override\n\tpublic String getModel() {\n\t\treturn \"cool model\";\n\t}",
"NCModel getModel();",
"public interface Model {\n\tObservable<SignUpResponse> userLogin(String userEmail, String userPassword);\n\n\tObservable<ConferenceFeedResponse> getConferenceFeed(int offset);\n\n\tObservable<ConferenceDataResponse> getConferenceData(int id);\n\n\tObservable<ProfileDataResponse> getProfileData(int id);\n}",
"@Override\r\n\tpublic void setModel() {\n\t}",
"@Override\r\n\tpublic T getModel() {\n\t\treturn model;\r\n\t}",
"interface IModel {\n\n /**\n * Get settings of this model.\n * @return the settings\n */\n Settings getSettings();\n\n /**\n * Set the settings of this mobile.\n * @param sm the settings\n * @return Returns if the Settings could be set successfuly\n */\n boolean setSettings(Settings sm);\n\n /**\n * Add a device to the list containing the devices.\n * @param pc the pc to add\n */\n void addPC(PCDevice pc);\n\n /**\n * Get a PCDevice by unique ID.\n * @param uID unique ID\n * @return the PCDevice\n */\n PCDevice getPC(UUID uID);\n\n /**\n * Remove a device from list by unique ID.\n * @param uID the unique ID.\n */\n void removePC(UUID uID);\n\n /**\n * Add all devices from collection to the device list.\n * @param pcs the devices to add.\n * @return <tt>true</tt>\n */\n boolean addAllPCs(List<PCDevice> pcs);\n\n /**\n * Get all devices currently in device list.\n * @return the PCs\n */\n List<PCDevice> getAllPC();\n}",
"public interface IModel {\n}",
"public interface Model {\n /** {@code Predicate} that always evaluate to true */\n Predicate<ReadOnlyPerson> PREDICATE_SHOW_ALL_PERSONS = unused -> true;\n Predicate<ReadOnlyEvent> PREDICATE_SHOW_ALL_EVENTS = unused -> true;\n\n\n //@@author low5545\n /** Adds extra data to the existing model */\n void addData(ReadOnlyAddressBook newData);\n //@@author\n\n /** Clears existing backing model and replaces with the provided new data. */\n void resetData(ReadOnlyAddressBook newData);\n\n /** Returns the AddressBook */\n ReadOnlyAddressBook getAddressBook();\n\n //=========== Model support for property component =============================================================\n\n //@@author yunpengn\n /** Adds a new customize property */\n void addProperty(String shortName, String fullName, String message, String regex)\n throws DuplicatePropertyException, PatternSyntaxException;\n //@@author\n\n //=========== Model support for contact component =============================================================\n\n /** Adds the given person */\n void addPerson(ReadOnlyPerson person) throws DuplicatePersonException;\n\n /** Replaces the given person {@code target} with {@code editedPerson} */\n void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)\n throws DuplicatePersonException, PersonNotFoundException;\n\n /** Deletes the given person. */\n void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException;\n\n /** Adds or updates the avatar of the selected person. */\n void setPersonAvatar(ReadOnlyPerson target, Avatar avatar);\n\n //@@author dennaloh\n /** Gets URL for google maps. */\n String getGMapUrl(ReadOnlyPerson target);\n\n /** Gets URL to search on facebook. */\n String getFbUrl (ReadOnlyPerson target);\n\n /** Opens URL in default browser. */\n void openUrl (String url);\n //@@author\n\n //=========== Model support for tag component =============================================================\n\n /** Removes the specific tag (from all persons with that tag) */\n void removeTag(Tag tags) throws DuplicatePersonException, PersonNotFoundException;\n\n /** Checks whether there exists a tag (with the same tagName) */\n boolean hasTag(Tag tag);\n\n //@@author yunpengn\n /** Changes the color of an existing tag (through TagColorManager) */\n void setTagColor(Tag tag, String color);\n\n //@@author\n\n\n\n //@@author junyango\n //=========== Model support for activity component =============================================================\n\n /** Adds an event */\n void addEvent(ReadOnlyEvent event) throws DuplicateEventException;\n\n /** Updates the given event */\n void updateEvent(ReadOnlyEvent target, ReadOnlyEvent editedEvent)\n throws DuplicateEventException, EventNotFoundException;\n /** Deletes the given event */\n void deleteEvent(ReadOnlyEvent target) throws EventNotFoundException;\n\n\n\n //@@author\n\n //@@author\n\n //=========== Filtered Person/Activity List support =============================================================\n\n /** Returns an unmodifiable view of the filtered person list */\n ObservableList<ReadOnlyPerson> getFilteredPersonList();\n\n /** Returns an unmodifiable view of the filtered event list */\n ObservableList<ReadOnlyEvent> getFilteredEventList();\n\n /** Updates the filter of the filtered person list to filter by the given {@code predicate}. */\n void updateFilteredPersonList(Predicate<ReadOnlyPerson> predicate);\n\n /** Updates the filter of the filtered event list to filter by the given {@code predicate}. */\n void updateFilteredEventsList(Predicate<ReadOnlyEvent> predicate);\n\n}",
"@Override\n\tpublic String getModel() {\n\t\treturn model;\n\t}",
"public DataModel getModel() {\n return model;\n }",
"protected E getModel ()\n\t{\n\t\treturn model;\n\t}",
"public String getModel()\n {\n return model;\n }",
"public interface Model {\n /** Clears existing backing model and replaces with the provided new data. */\n void resetData(ReadOnlyAddressBook newData);\n\n /** Returns the AddressBook */\n ReadOnlyAddressBook getAddressBook();\n\n /** Deletes the given person. */\n void deletePerson(ReadOnlyPerson target) throws UniquePersonList.PersonNotFoundException;\n\n /** Adds the given person */\n void addPerson(Person person) throws UniquePersonList.DuplicatePersonException;\n\n /** Returns the filtered person list as an {@code UnmodifiableObservableList<ReadOnlyPerson>} */\n UnmodifiableObservableList<ReadOnlyPerson> getFilteredPersonList();\n\n /** Updates the filter of the filtered person list to show all persons */\n void updateFilteredListToShowAll();\n\n /** Updates the filter of the filtered person list to filter by the given keywords*/\n void updateFilteredPersonList(Set<String> keywords);\n\n}",
"A getModel();",
"public interface AbstractModel {\n\n void setId(long id);\n\n long getId();\n\n void setName(String name);\n\n String getName();\n\n}",
"DataModel getDataModel ();",
"public interface BaseModel {\n\n}",
"public interface BaseModel {\n}",
"public interface BaseModel {\n}",
"public interface Model {\n\n /**\n * @return model id\n */\n Integer getId();\n\n /**\n * @param id the id to set\n */\n void setId(Integer id);\n}",
"public Model getModel() {\n return model;\n }",
"public Model getModel() {\n return model;\n }",
"public Model getModel() {\n return model;\n }",
"public Model getModel() {\n return model;\n }",
"public interface ModelProvider\n{\n\t/* public: ModelProvider interface */\n\n\tpublic ModelBean provideModel();\n}",
"public interface Model {\n\n /**\n * @return - List\n */\n List<Client> retrieveAllClients();\n\n /**\n * @param client - Объект класса Client\n */\n void createClient(Client client);\n\n /**\n * Метод удаления\n */\n void deleteAllClients();\n\n /**\n * @param clientId - String UUID\n */\n void deleteClientById(String clientId);\n\n /**\n * @param updateClientId - String UUID\n * @param editedClient - Объект класса Client\n */\n void updateClient(String updateClientId, Client editedClient);\n\n /**\n * @param id - String UUID\n * @return - boolean\n */\n boolean checkClientForExistence(String id);\n\n /**\n * @param phoneNumber - String matches regex \"^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\\\.[A-Z]{2,6}$\"\n * @return - List<Client>\n */\n List<Client> getClientByPhoneNumber(String phoneNumber);\n\n /**\n * @param id - String UUID\n * @return - Объект класса Client\n */\n Client getClientById(String id);\n}",
"public interface Model {\n\n public ModelData getModelData();\n\n public void loadUsers();\n\n public void loadDeletedUsers();\n\n public void loadUserById(long userId);\n\n public void deleteUserById(long l);\n\n void changeUserData(String name, long id, int level);\n}",
"@Override\r\n\tpublic Model getModel() {\n\t\treturn this.model;\r\n\t}",
"public String getModel() {\r\n return model;\r\n }",
"private Model(){}",
"public MartyrsModel() {\n\t\tservice = GWT.create(VictimsRemoteService.class);\n\t}",
"public String getModel() {\n return this.model;\r\n }",
"@Override\r\n public String getModel() {\n return null;\r\n }",
"public String getModel() {\n return model;\n }",
"public String getModel() {\n return model;\n }",
"public Model() {\n this(DSL.name(\"model\"), null);\n }",
"@ModelEntity\n\tpublic static interface ModelObject {\n\n\t\tpublic static final String CHILDREN = \"children\";\n\t\tpublic static final String PARENT = \"parent\";\n\n\t\t@Getter(value = PARENT, inverse = CHILDREN)\n\t\tpublic ModelObject getParent();\n\n\t\t@Setter(PARENT)\n\t\tpublic void setParent(ModelObject parent);\n\n\t\t@Getter(value = CHILDREN, cardinality = Cardinality.LIST, inverse = PARENT)\n\t\tpublic List<ModelObject> getChildren();\n\n\t\t@Setter(CHILDREN)\n\t\tpublic void setChildren(List<ModelObject> children);\n\n\t\t@Adder(CHILDREN)\n\t\tpublic void addToChildren(ModelObject child);\n\n\t\t@Remover(CHILDREN)\n\t\tpublic void removeFromChildren(ModelObject child);\n\t}",
"public interface BaseModel {\n\n String getName();\n}",
"public ModelSnapshot getModel() {\n return model;\n }",
"@Override\n\t\tpublic int getModel() {\n\t\t\treturn 0;\n\t\t}",
"public interface Currency extends Model {\n String getCode();\n void setCode(String strCode);\n String getCurrencyName();\n void setCurrenyName(String strCurrencyName);\n String getCurrencySymbol();\n void setCurrencySymbol(String strCurrencySymbol);\n String getIsDefault();\n void setIsDefault(String strIsDefault);\n double getCurrencyRate();\n void setCurrencyRate(double dCurrencyRate);\n}",
"interface PresenterToModel extends Model<ModelToPresenter> {\n\n\n\n\n String getNameLabel();\n\n\n String getPhotoLabel();\n\n\n String getLabelRadio0();\n\n\n String getLabelRadio1();\n\n\n String getLabelRadio2();\n\n\n String getLabelRadio3();\n\n\n String getButtonAddlabel();\n\n\n String getToastNotifyingAdded();\n\n\n void insertEvent(String Categoryname, String image);\n\n String getImageByIdSelected(int id);\n\n\n String getImage(int i);\n }",
"public AbstractModel getModel() {\n return model;\n }",
"public String getModel()\n\t{\n\t\treturn model;\n\t}",
"com.google.protobuf.ByteString getModelBytes();",
"public interface iModel {\n\n public void add(Object value);\n public Object get(int index);\n\n}",
"public BaseSlingModel getGenericModel() {\n return model;\n }",
"public interface BatchEventStatusModel\r\n{\r\n\t/**\r\n\t * @return Current value of the property <em>operation</em>.\r\n\t */\r\n\tpublic String getOperation();\r\n\r\n\t/**\r\n\t * @param operation\r\n\t * New value of the property <em>operation</em>.\r\n\t */\r\n\tpublic void setOperation(String operation);\r\n\r\n\t/**\r\n\t * @return Current value of the property <em>count</em>.\r\n\t */\r\n\tpublic Integer getCount();\r\n\r\n\t/**\r\n\t * @param count\r\n\t * New value of the property <em>count</em>.\r\n\t */\r\n\tpublic void setCount(Integer count);\r\n}",
"@ProviderType\npublic interface PersonModel extends BaseModel<Person> {\n\n\t/*\n\t * NOTE FOR DEVELOPERS:\n\t *\n\t * Never modify or reference this interface directly. All methods that expect a person model instance should use the {@link Person} interface instead.\n\t */\n\n\t/**\n\t * Returns the primary key of this person.\n\t *\n\t * @return the primary key of this person\n\t */\n\tpublic long getPrimaryKey();\n\n\t/**\n\t * Sets the primary key of this person.\n\t *\n\t * @param primaryKey the primary key of this person\n\t */\n\tpublic void setPrimaryKey(long primaryKey);\n\n\t/**\n\t * Returns the uuid of this person.\n\t *\n\t * @return the uuid of this person\n\t */\n\t@AutoEscape\n\tpublic String getUuid();\n\n\t/**\n\t * Sets the uuid of this person.\n\t *\n\t * @param uuid the uuid of this person\n\t */\n\tpublic void setUuid(String uuid);\n\n\t/**\n\t * Returns the person ID of this person.\n\t *\n\t * @return the person ID of this person\n\t */\n\tpublic long getPersonId();\n\n\t/**\n\t * Sets the person ID of this person.\n\t *\n\t * @param personId the person ID of this person\n\t */\n\tpublic void setPersonId(long personId);\n\n\t/**\n\t * Returns the name of this person.\n\t *\n\t * @return the name of this person\n\t */\n\t@AutoEscape\n\tpublic String getName();\n\n\t/**\n\t * Sets the name of this person.\n\t *\n\t * @param name the name of this person\n\t */\n\tpublic void setName(String name);\n\n\t/**\n\t * Returns the age of this person.\n\t *\n\t * @return the age of this person\n\t */\n\tpublic int getAge();\n\n\t/**\n\t * Sets the age of this person.\n\t *\n\t * @param age the age of this person\n\t */\n\tpublic void setAge(int age);\n\n\t/**\n\t * Returns the gender of this person.\n\t *\n\t * @return the gender of this person\n\t */\n\t@AutoEscape\n\tpublic String getGender();\n\n\t/**\n\t * Sets the gender of this person.\n\t *\n\t * @param gender the gender of this person\n\t */\n\tpublic void setGender(String gender);\n\n\t/**\n\t * Returns the email ID of this person.\n\t *\n\t * @return the email ID of this person\n\t */\n\t@AutoEscape\n\tpublic String getEmailId();\n\n\t/**\n\t * Sets the email ID of this person.\n\t *\n\t * @param emailId the email ID of this person\n\t */\n\tpublic void setEmailId(String emailId);\n\n\t/**\n\t * Returns the nationality of this person.\n\t *\n\t * @return the nationality of this person\n\t */\n\t@AutoEscape\n\tpublic String getNationality();\n\n\t/**\n\t * Sets the nationality of this person.\n\t *\n\t * @param nationality the nationality of this person\n\t */\n\tpublic void setNationality(String nationality);\n\n\t/**\n\t * Returns the occupation of this person.\n\t *\n\t * @return the occupation of this person\n\t */\n\t@AutoEscape\n\tpublic String getOccupation();\n\n\t/**\n\t * Sets the occupation of this person.\n\t *\n\t * @param occupation the occupation of this person\n\t */\n\tpublic void setOccupation(String occupation);\n\n}",
"@Override\n public void Update(Model model) {\n\n }",
"public interface PmlFileReturningInfoModel extends BaseModel<PmlFileReturningInfo> {\n public long getPrimaryKey();\n\n public void setPrimaryKey(long pk);\n\n public long getFileReturningInfoId();\n\n public void setFileReturningInfoId(long fileReturningInfoId);\n\n public String getFileId();\n\n public void setFileId(String fileId);\n\n public String getFileSender();\n\n public void setFileSender(String fileSender);\n\n public String getLicenseNumber();\n\n public void setLicenseNumber(String licenseNumber);\n\n public Date getIssuingDateLicense();\n\n public void setIssuingDateLicense(Date issuingDateLicense);\n\n public Date getReceiveLicenseDate();\n\n public void setReceiveLicenseDate(Date receiveLicenseDate);\n\n public String getDocumentNumber();\n\n public void setDocumentNumber(String documentNumber);\n\n public String getBillNumber();\n\n public void setBillNumber(String billNumber);\n\n public long getNumberMoney();\n\n public void setNumberMoney(long numberMoney);\n\n public String getNote();\n\n public void setNote(String note);\n\n public String getConclude();\n\n public void setConclude(String conclude);\n\n public PmlFileReturningInfo toEscapedModel();\n}",
"public OntModel getModel()\r\n\t{\r\n\t\treturn this.ONT_MODEL;\r\n\t}",
"@Override\n\tpublic CalEntity getModel() {\n\t\treturn model;\n\t}",
"public Document getModel(){\n return getDocument();\n }",
"public interface IModel {\n\tvoid draw(Graphics g);\n\tvoid registerPaintObserver(IPaintObserver observer);\n\tvoid unregisterPaintObserver(IPaintObserver observer);\n\tvoid notifyPaintChange();\n\tvoid setMousePos(int x, int y);\n\tvoid setPrevMousePos(int x, int y);\n\tint getMouseX();\n\tint getMouseY();\n\tint getPrevMouseX();\n\tint getPrevMouseY();\n\tvoid setMousePressed(boolean isPressed);\n\tboolean isMousePressed();\n\tvoid setMouseDragging(boolean isDragging);\n\tboolean isMouseDragging();\n\tvoid setMouseMoving(boolean isMoving);\n\tboolean isMouseMoving();\n\tvoid setDrawMode(DrawMode mode);\n\tDrawMode getDrawMode();\n\tvoid refreshShapeState();\n\tvoid newShape();\n\tvoid newShape(DrawMode mode);\n\tvoid storeShape(IShape shape);\n\tvoid refreshShapeDepth();\n\tvoid setShapeSelectStatus(boolean selected);\n\tvoid addShapeString(String name);\n\tArrayList<IShape> getStoreShapes();\n\tvoid setSelectShapes(ArrayList<IShape> selectShapes);\n\tArrayList<IShape> getSelectShapes();\n\tvoid setUserMode(DrawMode mode);\n\tvoid checkMouseEnclose(int mouseX, int mouseY);\n\tvoid groupShapes();\n\tvoid unGroupShapes();\n\tboolean checkCanGroup();\n\tboolean checkCanUnGroup();\n\tboolean checkCanEditName();\n\tvoid editShapeName(String name);\n\tvoid deleteAllShapes();\n\tvoid saveFile(RenderedImage image, File file, String fileType) throws IOException;\n\tint getStoreImageType(String fileType);\n}",
"public interface VersiontableModel extends BaseModel {\n\n /**\n * Get the {@code version_name} value.\n * Can be {@code null}.\n */\n @Nullable\n String getVersionName();\n\n /**\n * Get the {@code version_id} value.\n * Can be {@code null}.\n */\n @Nullable\n Integer getVersionId();\n\n /**\n * Get the {@code model_id} value.\n * Can be {@code null}.\n */\n @Nullable\n Integer getModelId();\n\n /**\n * Get the {@code fuel_type} value.\n * Can be {@code null}.\n */\n @Nullable\n String getFuelType();\n}",
"public Model getModel()\n\t{\n\t\treturn this.model;\n\t}",
"public String getModel() {\n\t\treturn model; \n\t}",
"public interface UserModel {\n\n\n}",
"public Model getModel() {\n return petal_model;\n }",
"@objid (\"0fc4a30a-9083-11e1-81e9-001ec947ccaf\")\npublic interface IModel {\n @objid (\"158ef48a-aed6-4746-a113-8d9f740481b4\")\n public static final IMObjectFilter ISVALID = new IMObjectFilter() {\n\t\t@Override\n\t\tpublic boolean accept(MObject obj) {\n\t\t\treturn obj != null && obj.isValid();\n\t\t}\n\t};\n\n @objid (\"899f8ec3-25d4-4441-b499-c889c4e125a7\")\n public static final IMObjectFilter NOSHELL = new IMObjectFilter() {\n\t\t@Override\n\t\tpublic boolean accept(MObject obj) {\n\t\t\treturn obj != null && ! obj.isShell();\n\t\t}\n\t};\n\n @objid (\"f85615e6-6ad2-4a7a-9784-cf8d466faa65\")\n public static final IMObjectFilter NODELETED = new IMObjectFilter() {\n\t\t@Override\n\t\tpublic boolean accept(MObject obj) { \n\t\t\treturn obj != null && ! obj.isDeleted();\n\t\t}\n\t};\n\n /**\n * Find elements by a metaclass an an attribute value.\n * @param cls the metaclass.\n * @param att the attribute to search\n * @param val the attribute value\n * @return the found elements.\n */\n @objid (\"17c23aa0-9083-11e1-81e9-001ec947ccaf\")\n Collection<? extends MObject> findByAtt(MClass cls, final String att, Object val, IMObjectFilter filter);\n\n /**\n * Get all elements of a given class and the class descendants.\n * @param cls a metaclass.\n * @return all elements of this class.\n */\n @objid (\"17c23aa1-9083-11e1-81e9-001ec947ccaf\")\n Collection<? extends MObject> findByClass(MClass cls, IMObjectFilter filter);\n\n /**\n * Find an element from its MClass and its identifier.\n * @param cls a metaclass\n * @param siteIdentifier an UUID\n * @return the found element or <code>null</code>.\n */\n @objid (\"17c23aa2-9083-11e1-81e9-001ec947ccaf\")\n MObject findById(MClass cls, final UUID siteIdentifier, IMObjectFilter filter);\n\n /**\n * Find an element from a reference.\n * @param ref an element reference\n * @return the found element or <code>null</code>.\n * @throws org.modelio.vcore.session.UnknownMetaclassException if the referenced metaclass does not exist.\n */\n @objid (\"10a41285-16e7-11e2-b24b-001ec947ccaf\")\n MObject findByRef(MRef ref, IMObjectFilter filter) throws UnknownMetaclassException;\n\n /**\n * Get the generic factory.\n * @return the generic factory.\n */\n @objid (\"0078ca26-5a20-10c8-842f-001ec947cd2a\")\n GenericFactory getGenericFactory();\n\n @objid (\"00955b82-61a5-10c8-842f-001ec947cd2a\")\n Collection<? extends MObject> findByClass(MClass cls);\n\n @objid (\"0096d304-61a5-10c8-842f-001ec947cd2a\")\n Collection<? extends MObject> findByAtt(MClass cls, final String att, Object val);\n\n @objid (\"009711de-61a5-10c8-842f-001ec947cd2a\")\n MObject findById(MClass cls, final UUID siteIdentifier);\n\n @objid (\"33fb2113-b8a3-4b3b-95ed-3481c65d2881\")\n MObject findByRef(MRef ref) throws UnknownMetaclassException;\n\n @objid (\"261fe5dc-cfbf-40ee-886d-fc3c529c0e47\")\n <T extends MObject> Collection<T> findByClass(Class<T> metaclass, IMObjectFilter filter);\n\n @objid (\"e46abe41-187e-4d12-b565-c9e92df02519\")\n <T extends MObject> Collection<T> findByAtt(Class<T> metaclass, final String att, Object val, IMObjectFilter filter);\n\n @objid (\"83ef71a2-04ef-4e59-bf55-2bffe3069024\")\n <T extends MObject> T findById(Class<T> metaclass, final UUID siteIdentifier, IMObjectFilter filter);\n\n @objid (\"610f2f86-624b-469c-9c0c-6bf78147fba1\")\n <T extends MObject> Collection<T> findByClass(Class<T> metaclass);\n\n @objid (\"1540131b-bdd6-466c-a417-9e0efd220dda\")\n <T extends MObject> Collection<T> findByAtt(Class<T> metaclass, final String att, Object val);\n\n @objid (\"1b63d157-9858-4691-8636-7c625e97c65e\")\n <T extends MObject> T findById(Class<T> metaclass, final UUID siteIdentifier);\n\n}",
"public ModelElements getModelAccess() {\n\t\treturn pModel;\n\t}",
"public void buildModel() {\n }",
"public DataModel getDataModel() {\r\n\t\treturn this.model;\r\n\t}",
"public Model getModel() {\n\t\treturn model;\n\t}",
"public Model getModel() {\n\t\treturn model;\n\t}",
"public Model getModel() {\n\t\treturn model;\n\t}",
"@Override\r\n\tpublic Object getModel() {\n\t\treturn null;\r\n\t}",
"DataModel createDataModel();",
"public DefaultObjectModel ()\n {\n this (new Schema ());\n }",
"public Tuple getModel();",
"public Map<String, Object> getModel() {\n\t return getModelMap();\n\t }",
"public interface Model {\n\n /**\n * Replaces user prefs data with the data in {@code userPrefs}.\n */\n void setUserPrefs(ReadOnlyUserPrefs userPrefs);\n\n /**\n * Returns the user prefs.\n */\n ReadOnlyUserPrefs getUserPrefs();\n\n /**\n * Returns the user prefs' GUI settings.\n */\n GuiSettings getGuiSettings();\n\n /**\n * Sets the user prefs' GUI settings.\n */\n void setGuiSettings(GuiSettings guiSettings);\n\n /**\n * Returns the user prefs' address book file path.\n */\n Path getVendorManagerFilePath();\n\n /**\n * Sets the user prefs' menu manager file path.\n */\n void setVendorManagerFilePath(Path vendorManagerFilePath);\n\n /**\n * Replaces menu manager data with the data in {@code menuManager}.\n */\n\n void setVendorManager(ReadOnlyVendorManager vendorManager);\n\n /**\n * Returns the VendorManager\n */\n ReadOnlyVendorManager getVendorManager();\n\n /**\n * Returns true if a vendor with the same identity as {@code vendor} exists in the address book.\n */\n boolean hasVendor(Vendor vendor);\n\n /**\n * Selects the vendor with index {@code vendorIndex} .\n * {@code vendorIndex} must be a valid index in the model.\n */\n void selectVendor(int vendorIndex);\n\n ObservableList<Vendor> getObservableVendorList();\n\n /**\n * Replaces address book data with the data in {@code menuManager}.\n */\n void setMenuManager(ReadOnlyMenuManager menuManager, int index);\n\n /**\n * Returns the MenuManager at the ith index\n */\n ReadOnlyMenuManager getMenuManager(int index);\n\n void sortMenuItemBy(String sortedBy, boolean ascending, boolean toggle);\n\n void showDefaultMenu();\n /**\n * Replaces OrderManager data with the data in {@code orderItems}.\n */\n void setOrder(List<OrderItem> orderItems);\n\n /**\n * Replaces OrderManager data with the data in {@code orderManager}.\n */\n void setOrderManager(ReadOnlyOrderManager orderManager);\n\n /**\n * Returns the MenuManager at the ith index\n */\n ReadOnlyOrderManager getOrderManager();\n\n /**\n * Returns true if an orderItem with the same identity as {@code orderItem} exists in the address book.\n */\n boolean hasOrderItem(OrderItem orderItem);\n\n /**\n * Deletes the given orderItem.\n * The orderItem must exist in the order manager.\n */\n void removeOrderItem(OrderItem target);\n\n /**\n * Adds the given orderItem.\n * {@code orderItem} if orderItem exists in order manageradd to the current quantity.\n * @throws CommandException if after adding, there is more than 100 of the same order item\n */\n void addOrderItem(OrderItem orderItem) throws CommandException;\n\n /**\n * Returns an unmodifiable view of the filtered menu item list at the corresponding index\n */\n ObservableList<MenuItem> getFilteredMenuItemList();\n\n int getFilteredMenuItemListSize();\n\n /**\n * Clears the order.\n */\n void clearOrder();\n\n /**\n * Clears the orderHistory.\n */\n void resetOrder();\n\n /**\n * Updates the filter of the filtered menu item list at the corresponding index to filter by the given\n * {@code predicate}.\n *\n * @throws NullPointerException if {@code predicate} is null.\n */\n void updateFilteredMenuItemList(Predicate<MenuItem> predicate);\n\n /**\n * Updates the filter of the filtered menu item list at the corresponding index to filter by the given\n * {@code comparator}.\n * Only used for test cases.\n * @throws NullPointerException if {@code comparator} is null.\n */\n void updateFilteredMenuItemList(Comparator<MenuItem> comparator, boolean isSortedAsc);\n\n\n /**\n * Returns an unmodifiable view of the filtered orderItem list at the corresponding index\n */\n ObservableList<OrderItem> getObservableOrderItemList();\n\n int getOrderSize();\n\n int getVendorIndex();\n\n int getOrderHistorySize();\n\n int getOrderItemQuantity(int index);\n\n void undoOrder();\n\n boolean isSelected();\n\n void tagOrderItem(OrderItem orderItem, Tag tag);\n\n void untagOrderItem(OrderItem orderItem);\n}",
"Model createModel();",
"Model createModel();",
"Model createModel();",
"Model createModel();",
"Model createModel();",
"Model createModel();",
"Model createModel();",
"public interface ModelConstants {\n \n // elements\n @Deprecated\n public final static String ACQUISITION_STRATEGY = \"acquisition-strategy\";\n \n public final static String DATASOURCE = \"datasource\";\n public final static String HISTORY_LEVEL = \"history-level\";\n public final static String JOB_ACQUISITION = \"job-acquisition\";\n public final static String JOB_ACQUISITIONS = \"job-acquisitions\";\n public final static String JOB_EXECUTOR = \"job-executor\";\n public final static String PROCESS_ENGINE = \"process-engine\";\n public final static String PROCESS_ENGINES = \"process-engines\";\n public final static String PROPERTY = \"property\";\n public final static String PROPERTIES = \"properties\";\n public final static String CONFIGURATION = \"configuration\";\n\n public final static String PLUGINS = \"plugins\";\n public final static String PLUGIN = \"plugin\";\n public final static String PLUGIN_CLASS = \"class\";\n \n // attributes\n public final static String DEFAULT = \"default\";\n public final static String NAME = \"name\";\n public final static String THREAD_POOL_NAME = \"thread-pool-name\";\n /** The name of our subsystem within the model. */\n public static final String SUBSYSTEM_NAME = \"camunda-bpm-platform\";\n \n}",
"@Override\n\t//封装数据\n\tpublic Member getModel() {\n\t\treturn member;\n\t}",
"@Override\n\tpublic Classes getModel() {\n\t\treturn model;\n\t}",
"public String getModel()\n\t{\n\t\treturn null;\n\t}",
"public interface IModel {\r\n\t\r\n\tpublic Level getCurrentLevel();\r\n\tpublic void LoadLevel(String filepath);\r\n\tpublic void SaveLevel(String filepath);\r\n\tpublic void move(String moveInput);\r\n\tpublic int getSteps();\r\n\tpublic List<Record> getRecordsList();\r\n\tpublic void dbQuery(String params);\r\n\tpublic void addUser(String userName);\r\n\tpublic void addRecord(String recordValues);\r\n\t\r\n\tpublic void restart();\r\n\tpublic void getHint();\r\n\tpublic void getSolution();\r\n\t\r\n}"
]
| [
"0.7456265",
"0.73385507",
"0.7203751",
"0.7105992",
"0.7105992",
"0.7105992",
"0.70494694",
"0.70432985",
"0.7040317",
"0.6914594",
"0.6824597",
"0.68210256",
"0.6791134",
"0.6721404",
"0.67041063",
"0.66958684",
"0.66915065",
"0.66754895",
"0.6666074",
"0.66529065",
"0.6641807",
"0.6595335",
"0.65777594",
"0.656543",
"0.654668",
"0.6528474",
"0.65274155",
"0.6526696",
"0.65222186",
"0.6516355",
"0.6510287",
"0.65022904",
"0.64862275",
"0.6484835",
"0.6484835",
"0.6479377",
"0.64502364",
"0.64502364",
"0.64502364",
"0.64502364",
"0.6447717",
"0.6441149",
"0.643312",
"0.64312875",
"0.64236933",
"0.64158523",
"0.6406986",
"0.64004964",
"0.6398393",
"0.63839793",
"0.63839793",
"0.6383152",
"0.6378822",
"0.6370774",
"0.63414073",
"0.63347363",
"0.6330622",
"0.63170886",
"0.6305784",
"0.62915474",
"0.62850136",
"0.6277236",
"0.6260961",
"0.625269",
"0.62498313",
"0.62486786",
"0.6244827",
"0.6241733",
"0.6239979",
"0.62341505",
"0.6233574",
"0.62298393",
"0.6218405",
"0.6214584",
"0.6212686",
"0.6208682",
"0.62051284",
"0.6198391",
"0.6194288",
"0.61904025",
"0.6189127",
"0.6189127",
"0.6189127",
"0.61890894",
"0.6184011",
"0.6182639",
"0.6179867",
"0.61734724",
"0.6153512",
"0.61482173",
"0.61482173",
"0.61482173",
"0.61482173",
"0.61482173",
"0.61482173",
"0.61482173",
"0.61297095",
"0.6120007",
"0.6119059",
"0.61168253",
"0.6115662"
]
| 0.0 | -1 |
Returns the user prefs. | ReadOnlyUserPrefs getUserPrefs(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public BwPreferences getUserPreferences() {\n return userPreferences;\n }",
"public ReactivePreferences preferences() {\n\t\treturn ReactivePreferences.userRoot();\n\t}",
"public GamePreferences getPrefs() {\n\t\treturn prefs;\n\t}",
"public User getPrefsUser() {\n Gson gson = new Gson();\n String json = prefs.getString(USER_PREFS, \"\");\n return gson.fromJson(json, User.class);\n }",
"public SharedPreferences prefs() {\n\n SharedPreferences prefs = context.getSharedPreferences(APP_IDS_PREFS_NAME, Context.MODE_PRIVATE); // Private because it can still be accessed from other apps with the same User ID\n return prefs;\n }",
"public SharedPreferences getPrefs() { return this.prefs; }",
"public Preferences getPrefs() {\n return _prefs;\n }",
"@Override\n public Path getUserPrefsFilePath() {\n return userPrefsStorage.getUserPrefsFilePath();\n }",
"private static SharedPreferences getSharedPreferences() {\n Context ctx = AppUtils.getAppContext();\n return ctx.getSharedPreferences(\"pref_user_session_data\", Context.MODE_PRIVATE);\n }",
"UserSettings getByUser();",
"public static Collection<String> getPreferences(){\n\t\treturn preferences;\n\t}",
"public static BleTrackerPreferences getPreferences() {\n return preferences;\n }",
"private void readSharedPreferences() {\n SharedPreferences sharedPref = getActivity().getSharedPreferences(SETTINGS_FILE_KEY, MODE_PRIVATE);\n currentDeviceAddress = sharedPref.getString(SETTINGS_CURRENT_DEVICE_ADDRESS, \"\");\n currentDeviceName = sharedPref.getString(SETTINGS_CURRENT_DEVICE_NAME, \"\");\n currentFilenamePrefix = sharedPref.getString(SETTINGS_CURRENT_FILENAME_PREFIX, \"\");\n currentSubjectName = sharedPref.getString(SETTINGS_SUBJECT_NAME, \"\");\n currentShoes = sharedPref.getString(SETTINGS_SHOES, \"\");\n currentTerrain = sharedPref.getString(SETTINGS_TERRAIN, \"\");\n }",
"private void getPreferences() {\n Constants constants = new Constants();\n android.content.SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getActivity());\n\n serverUrl = sharedPreferences.getString(\"LedgerLinkBaseUrl\", constants.DEFAULTURL);\n IsEditing = SharedPrefs.readSharedPreferences(getActivity(), \"IsEditing\", \"0\");\n tTrainerId = SharedPrefs.readSharedPreferences(getActivity(), \"ttrainerId\", \"-1\");\n vslaId = SharedPrefs.readSharedPreferences(getActivity(), \"vslaId\", \"-1\");\n\n vslaName = DataHolder.getInstance().getVslaName();\n representativeName = DataHolder.getInstance().getGroupRepresentativeName();\n representativePost = DataHolder.getInstance().getGroupRepresentativePost();\n repPhoneNumber = DataHolder.getInstance().getGroupRepresentativePhoneNumber();\n grpBankAccount = DataHolder.getInstance().getGroupBankAccount();\n physAddress = DataHolder.getInstance().getPhysicalAddress();\n regionName = DataHolder.getInstance().getRegionName();\n grpPhoneNumber = DataHolder.getInstance().getGroupPhoneNumber();\n grpBankAccount = DataHolder.getInstance().getGroupBankAccount();\n locCoordinates = DataHolder.getInstance().getLocationCoordinates();\n grpSupportType = DataHolder.getInstance().getSupportTrainingType();\n numberOfCycles = DataHolder.getInstance().getNumberOfCycles();\n }",
"private SharedPreferences getSharedPrefs() {\n return Freelancer.getContext().getSharedPreferences(SHARED_PREFS_NAME, Context.MODE_PRIVATE);\n }",
"public void getLocal(){\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);\n user = preferences.getString(\"Username\", \"\");\n email = preferences.getString(\"Email\", \"\").replace(\".\", \",\");\n role = preferences.getString(\"Role\", \"\");\n }",
"public static SharedPreferences getActiveUserSharedPreferences(\r\n\t\t\tContext context) {\r\n\t\tSharedPreferences result = null;\r\n\t\tSharedPreferences prefs = PreferenceManager\r\n\t\t\t\t.getDefaultSharedPreferences(context);\r\n\t\tif (prefs != null) {\r\n\t\t\tString activeUserId = prefs.getString(PreferenceKeys.ActiveUserId,\r\n\t\t\t\t\t\"\");\r\n\t\t\tif (!TextUtils.isEmpty(activeUserId)) {\r\n\t\t\t\tString userConfigFileName = getUserConfigFileName(context,\r\n\t\t\t\t\t\tactiveUserId);\r\n\t\t\t\tresult = context.getSharedPreferences(userConfigFileName,\r\n\t\t\t\t\t\tContext.MODE_PRIVATE);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}",
"String getPreference(String user, String preferenceName) throws OntimizeJEERuntimeException;",
"public NetworkCallInformation getPreferences() {\n return preferencesModel.getPreferences();\n\n }",
"public String[] getUser(){\n Set<String> userSet = preferences.getStringSet(userRef, new HashSet<>());\n if(userSet.size() == 0) return new String[0];\n String user = \"\";\n String pass = \"\";\n String test = userSet.toArray()[0].toString();\n Pattern pattern = Pattern.compile(\"^.+@.+\\\\..+$\");\n Matcher matcher = pattern.matcher(test);\n if(matcher.matches()) {\n user = test;\n pass = userSet.toArray()[1].toString();\n }else {\n pass = test;\n user = userSet.toArray()[1].toString();\n }\n return new String[] {user, pass};\n }",
"private void showUserPreferences() {\r\n MyAccount ma = state.getMyAccount();\r\n \r\n mOriginName.setValue(ma.getOriginName());\r\n SharedPreferencesUtil.showListPreference(this, MyAccount.Builder.KEY_ORIGIN_NAME, R.array.origin_system_entries, R.array.origin_system_entries, R.string.summary_preference_origin_system);\r\n mOriginName.setEnabled(!ma.isPersistent());\r\n \r\n if (mEditTextUsername.getText() == null\r\n || ma.getUsername().compareTo(mEditTextUsername.getText()) != 0) {\r\n mEditTextUsername.setText(ma.getUsername());\r\n }\r\n StringBuilder summary = new StringBuilder(this.getText(R.string.summary_preference_username));\r\n if (ma.getUsername().length() > 0) {\r\n summary.append(\": \" + ma.getUsername());\r\n } else {\r\n summary.append(\": (\" + this.getText(R.string.not_set) + \")\");\r\n }\r\n mEditTextUsername.setSummary(summary);\r\n mEditTextUsername.setEnabled(ma.canSetUsername());\r\n\r\n if (ma.isOAuth() != mOAuth.isChecked()) {\r\n mOAuth.setChecked(ma.isOAuth());\r\n }\r\n // In fact, we should hide it if not enabled, but I couldn't find an easy way for this...\r\n mOAuth.setEnabled(ma.canChangeOAuth());\r\n\r\n if (mEditTextPassword.getText() == null\r\n || ma.getPassword().compareTo(mEditTextPassword.getText()) != 0) {\r\n mEditTextPassword.setText(ma.getPassword());\r\n }\r\n summary = new StringBuilder(this.getText(R.string.summary_preference_password));\r\n if (TextUtils.isEmpty(ma.getPassword())) {\r\n summary.append(\": (\" + this.getText(R.string.not_set) + \")\");\r\n }\r\n mEditTextPassword.setSummary(summary);\r\n mEditTextPassword.setEnabled(ma.getConnection().isPasswordNeeded());\r\n\r\n int titleResId;\r\n switch (ma.getCredentialsVerified()) {\r\n case SUCCEEDED:\r\n titleResId = R.string.title_preference_verify_credentials;\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_verify_credentials));\r\n break;\r\n default:\r\n if (ma.isPersistent()) {\r\n titleResId = R.string.title_preference_verify_credentials_failed;\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_verify_credentials_failed));\r\n } else {\r\n titleResId = R.string.title_preference_add_account;\r\n if (ma.isOAuth()) {\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_add_account_oauth));\r\n } else {\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_add_account_basic));\r\n }\r\n }\r\n break;\r\n }\r\n mVerifyCredentials.setTitle(titleResId);\r\n mVerifyCredentials.setSummary(summary);\r\n mVerifyCredentials.setEnabled(ma.isOAuth() || ma.getCredentialsPresent());\r\n }",
"public static IPreferenceStore getUIStore() {\n return getUIPlugin().getPreferenceStore();\n }",
"private void getAutonomousPrefs() {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(hardwareMap.appContext);\n alliance = preferences.getString(\"AllianceColor\", \"error\");\n frontBack = preferences.getString(\"FrontBack\", \"error\");\n getPartnerGlyph = preferences.getBoolean(\"PickupAllianceGlyph\", false);\n getPitGlyph = preferences.getBoolean(\"PickupPitGlyph\", false);\n }",
"public String[] getUsers(){\n try {\n names = credentials.keys();\n }catch (java.util.prefs.BackingStoreException e1){\n System.out.println(e1);\n }\n return names;\n }",
"public static String getSharedPrefs() {\n return SHARED_PREFS;\n }",
"public String getUserPreference(String aKey) {\r\n\t\tString result = null;\r\n\t\tif (this.getUserPreferences().containsKey(aKey)) {\r\n\t\t\tresult = this.getUserPreferences().get(aKey);\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public void getProfile() {\n\n String mKey = getString(R.string.preference_name);\n SharedPreferences mPrefs = getSharedPreferences(mKey, MODE_PRIVATE);\n\n // Load the user email\n\n /*userEmail = getString(R.string.preference_key_profile_email);\n userPassword = getString(R.string.preference_key_profile_password);*/\n\n // Load the user email\n\n mKey = getString(R.string.preference_key_profile_email);\n userEmail = mPrefs.getString(mKey, \"\");\n\n // Load the user password\n\n mKey = getString(R.string.preference_key_profile_password);\n userPassword = mPrefs.getString(mKey, \"\");\n\n\n //userEmail = getString(R.string.register_email);\n //userPassword = getString(R.string.register_password);\n\n }",
"public static SharedPreferences getSharedPrefs() {\n return App.getAppContext().getSharedPreferences(PREFS_LABEL, Context.MODE_PRIVATE);\n }",
"public UserSettings getUserSettings() {\n\t\treturn userSettings;\n\t}",
"public String getUserConfig() {\n return userConfig;\n }",
"Preferences userRoot();",
"public String getPreferences(String key) {\n return getPreferencesImpl(key);\n }",
"public String getPreferences(String key) {\n return getPreferencesImpl(key);\n }",
"protected String[] getUserData(){\n if (Utilities.isWindows()) {\n ArrayList<String> result = new ArrayList<String>();\n String localAppData = System.getenv(\"LOCALAPPDATA\"); // NOI18N\n if (localAppData != null) {\n result.add(localAppData+\"\\\\Google\\\\Chrome\\\\User Data\");\n } else {\n localAppData = Utils.getLOCALAPPDATAonWinXP();\n if (localAppData != null) {\n result.add(localAppData+\"\\\\Google\\\\Chrome\\\\User Data\");\n }\n }\n String appData = System.getenv(\"APPDATA\"); // NOI18N\n if (appData != null) {\n // we are in C:\\Documents and Settings\\<username>\\Application Data\\ on XP\n File f = new File(appData);\n if (f.exists()) {\n String fName = f.getName();\n // #219824 - below code will not work on some localized WinXP where\n // \"Local Settings\" name might be \"Lokale Einstellungen\";\n // no harm if we try though:\n f = new File(f.getParentFile(),\"Local Settings\");\n f = new File(f, fName);\n if (f.exists()) {\n result.add(f.getPath()+\"\\\\Google\\\\Chrome\\\\User Data\");\n }\n }\n }\n return result.toArray(new String[result.size()]);\n }\n else if (Utilities.isMac()) {\n return Utils.getUserPaths(\"/Library/Application Support/Google/Chrome\");// NOI18N\n }\n else {\n return Utils.getUserPaths(\"/.config/google-chrome\", \"/.config/chrome\");// NOI18N\n }\n }",
"public static UserPrefernce getInstance(){\r\n\t\tif(mInstance == null){\r\n\t\t\tmInstance = new UserPrefernce();\r\n\t\t}\r\n\t\treturn mInstance;\r\n\t}",
"public HashMap<String, Object> getUserConfig() {\n return userConfig;\n }",
"private void getPreferences() {\n\n if(sharedpreferences.getBoolean(\"usaGPU\", true)) {\n mUtilizzoGPU.setChecked(true);\n }\n else{\n mUtilizzoGPU.setChecked(false);\n }\n\n }",
"public File getPreferencesFile() {\n\t\treturn preferencesFile;\n\t}",
"public UserSettings getUserSettings(String username);",
"private void GetSharedPrefs()\n {\n// SharedPreferences pref = getActivity().getSharedPreferences(\"LoginPref\", 0);\n// UserId = pref.getInt(\"user_id\", 0);\n// Mobile = pref.getString(\"mobile_number\",DEFAULT);\n// Email = pref.getString(\"email_id\",DEFAULT);\n// Username = pref.getString(\"user_name\",DEFAULT);\n// Log.i(TAG, \"GetSharedPrefs: UserId: \"+UserId);\n\n SharedPreferences pref = getActivity().getSharedPreferences(\"RegPref\", 0); // 0 - for private mode\n UserId = pref.getInt(\"user_id\", 0);\n Mobile = pref.getString(\"mobile_number\",DEFAULT);\n Email = pref.getString(\"email_id\",DEFAULT);\n Log.i(TAG, \"GetSharedPrefs: UserId: \"+UserId);\n CallOnGoingRideAPI();\n }",
"private String getSavedPassword(){\n return new PrefManager(this).getPassword();\n }",
"private MinesweeperPreferences getPrefs() {\n return Main.getPrefs();\n }",
"public String getUserID(){\n return mSharedPreferences.getString(SharedPrefContract.PREF_USER_ID, null);\n }",
"public SharedPreferences GetSettings() {\n return mSettings;\n }",
"private void fetchPreferences() {\n macAddress = prefs.getString(getString(R.string.pref_mac), DEF_VALUE);\n macSet = prefs.getBoolean(getString(R.string.mac_set), false);\n //fetch previous values for temp, max, min\n tempMeasured = Double.parseDouble(prefs.getString(getString(R.string.text_temp), \"0\"));\n tempMax = Double.parseDouble(prefs.getString(getString(R.string.text_max), \"0\"));\n tempMin = Double.parseDouble(prefs.getString(getString(R.string.text_min), \"0\"));\n }",
"public interface PreferencesHelper {\r\n\r\n int getUserLoggedInMode();\r\n\r\n void setUserLoggedInMode(DataManager.LoggedInMode mode);\r\n\r\n String getUserName();\r\n\r\n void setUserName(String userName);\r\n\r\n String getAccessToken();\r\n\r\n void setAccessToken(String accessToken);\r\n\r\n String getUserProfilePicUrl();\r\n\r\n void setUserProfilePicUrl(String profilePicUrl);\r\n\r\n String getStoredProfilePicPath();\r\n\r\n void setStoredProfilePicPath(String profilePicPath);\r\n\r\n}",
"private void getPreferences() {\n Account rootAccount = book.getRootAccount();\n displayedSecuritiesList = rootAccount.getPreference(\"StockGlance_displayedSecurities\", \"\");\n allowMissingPrices = rootAccount.getPreferenceBoolean(\"StockGlance_DisplayMissingPrices\", false);\n timelySnapshotInterval = rootAccount.getPreferenceInt(\"StockGlance_TimelyWindow\", 7);\n }",
"public String getUser() {\r\n \t\treturn properties.getProperty(KEY_USER);\r\n \t}",
"@Api(1.0)\n @NonNull\n private SharedPreferences getSharedPreferences() {\n return mContext.getSharedPreferences(mPreferencesId, Context.MODE_PRIVATE);\n }",
"public String getProperty(String name, User user)\r\n {\r\n if (user == null || user.isGuest())\r\n return getSessionPreferences().get(name);\r\n\r\n return getPreferences(user).get(name);\r\n }",
"private User retrievePersonalProfileData() {\n if (checkIfProfileExists()) {\n return SharedPrefsUtils.convertSharedPrefsToUserModel(context);\n } else {\n return null;\n }\n }",
"public HashMap<String, String> getUserDetails(){\n HashMap<String, String> user = new HashMap<String, String>();\n user.put(KEY_EMAIL, pref.getString(KEY_EMAIL, null));\n return user;\n }",
"protected abstract IPreferenceStore getPreferenceStore();",
"public static Object get(String key) {\n return prefs.contains(key) ? prefs.getAll().get(key):null;\n }",
"public IPreferenceStore getPreferenceStore(String name);",
"public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<>();\n // user name\n user.put(KEY_NAME, sharedPreferences.getString(KEY_NAME, null));\n // user rol\n user.put(KEY_ROL, sharedPreferences.getString(KEY_ROL, null));\n // user user\n user.put(KEY_USER, sharedPreferences.getString(KEY_USER, null));\n // user email id\n user.put(KEY_EMAIL, sharedPreferences.getString(KEY_EMAIL, null));\n // user avatar\n user.put(KEY_PHOTO, sharedPreferences.getString(KEY_PHOTO, null));\n // return user\n return user;\n }",
"public static Path getUserSaveDir() {\n\t\treturn Paths.get(prefs.get(Constants.PREF_USERSAVE_DIR, null));\n\t}",
"private void readPreferences() {\n configAutonomousCommand();\n }",
"private void getGredentialsFromMemoryAndSetUser()\n\t{\n\t SharedPreferences settings = getSharedPreferences(LOGIN_CREDENTIALS, 0);\n\t String username = settings.getString(\"username\", null);\n\t String password = settings.getString(\"password\", null);\n\t \n\t //Set credentials to CouponsManager.\n\t CouponsManager.getInstance().setUser(new User(username, password));\n\t \n\t}",
"@JavascriptInterface\n public String getPreference(String name) {\n Log.d(TAG, \"getPreference: \" + name);\n return preferences.getString(name, \"\");\n }",
"private void showUserPreferences() {\r\n MyAccount ma = state.getAccount();\r\n \r\n mOriginName.setValue(ma.getOriginName());\r\n SharedPreferencesUtil.showListPreference(this, MyAccount.Builder.KEY_ORIGIN_NAME, R.array.origin_system_entries, R.array.origin_system_entries, R.string.summary_preference_origin_system);\r\n \r\n mOriginName.setEnabled(!state.builder.isPersistent() && TextUtils.isEmpty(ma.getUsername()));\r\n \r\n if (mEditTextUsername.getText() == null\r\n || ma.getUsername().compareTo(mEditTextUsername.getText()) != 0) {\r\n mEditTextUsername.setText(ma.getUsername());\r\n }\r\n StringBuilder summary;\r\n if (ma.getUsername().length() > 0) {\r\n summary = new StringBuilder(ma.getUsername());\r\n } else {\r\n summary = new StringBuilder(this.getText(ma.alternativeTermForResourceId(R.string.summary_preference_username)));\r\n }\r\n mEditTextUsername.setDialogTitle(this.getText(ma.alternativeTermForResourceId(R.string.dialog_title_preference_username)));\r\n mEditTextUsername.setTitle(this.getText(ma.alternativeTermForResourceId(R.string.title_preference_username)));\r\n mEditTextUsername.setSummary(summary);\r\n mEditTextUsername.setEnabled(!state.builder.isPersistent() && !ma.isUsernameValidToStartAddingNewAccount());\r\n \r\n boolean isNeeded = ma.canChangeOAuth();\r\n if (ma.isOAuth() != mOAuth.isChecked()) {\r\n mOAuth.setChecked(ma.isOAuth());\r\n }\r\n // In fact, we should hide it if not enabled, but I couldn't find an easy way for this...\r\n mOAuth.setEnabled(isNeeded);\r\n if (isNeeded) {\r\n mOAuth.setTitle(R.string.title_preference_oauth);\r\n mOAuth.setSummary(ma.isOAuth() ? R.string.summary_preference_oauth_on : R.string.summary_preference_oauth_off);\r\n } else {\r\n mOAuth.setTitle(\"\");\r\n mOAuth.setSummary(\"\");\r\n }\r\n \r\n isNeeded = ma.getConnection().isPasswordNeeded();\r\n if (mEditTextPassword.getText() == null\r\n || ma.getPassword().compareTo(mEditTextPassword.getText()) != 0) {\r\n mEditTextPassword.setText(ma.getPassword());\r\n }\r\n if (isNeeded) {\r\n mEditTextPassword.setTitle(R.string.title_preference_password);\r\n summary = new StringBuilder(this.getText(R.string.summary_preference_password));\r\n if (TextUtils.isEmpty(ma.getPassword())) {\r\n summary.append(\": (\" + this.getText(R.string.not_set) + \")\");\r\n }\r\n } else {\r\n summary = null;\r\n mEditTextPassword.setTitle(\"\");\r\n }\r\n mEditTextPassword.setSummary(summary);\r\n mEditTextPassword.setEnabled(isNeeded);\r\n \r\n int titleResId;\r\n boolean addAccountOrVerifyCredentialsEnabled = ma.isOAuth() || ma.getCredentialsPresent();\r\n switch (ma.getCredentialsVerified()) {\r\n case SUCCEEDED:\r\n titleResId = R.string.title_preference_verify_credentials;\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_verify_credentials));\r\n break;\r\n default:\r\n if (state.builder.isPersistent()) {\r\n titleResId = R.string.title_preference_verify_credentials_failed;\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_verify_credentials_failed));\r\n } else {\r\n if (!ma.isUsernameValidToStartAddingNewAccount()) {\r\n addAccountOrVerifyCredentialsEnabled = false;\r\n }\r\n titleResId = R.string.title_preference_add_account;\r\n if (ma.isOAuth()) {\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_add_account_oauth));\r\n } else {\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_add_account_basic));\r\n }\r\n }\r\n break;\r\n }\r\n addAccountOrVerifyCredentials.setTitle(titleResId);\r\n addAccountOrVerifyCredentials.setSummary(summary);\r\n addAccountOrVerifyCredentials.setEnabled(addAccountOrVerifyCredentialsEnabled);\r\n }",
"private static SharedPreferences getSharedPreferences(Context context) {\n return PreferenceManager.getDefaultSharedPreferences(context);\n }",
"public Hashtable getUserProperties() {\n PropertyHelper ph = PropertyHelper.getPropertyHelper(this);\n return ph.getUserProperties();\n }",
"private void readPreferences() {\r\n \t\tSharedPreferences sp = getSharedPreferences(SPN, MODE_PRIVATE);\r\n \t\t// set listener to this\r\n \t\tsp.registerOnSharedPreferenceChangeListener(this);\r\n \t\t// read shared preferences to get data file\r\n \t\tdataFile = sp.getString(res.getString(R.string.pref_data_file_key),\r\n \t\t\t\tnull);\r\n \t\tif (localLOGV) {\r\n \t\t\tLog.i(TAG, \"Data file is \" + dataFile);\r\n \t\t}\r\n \t\tif (dataFile == null)\r\n \t\t\treturn;\r\n \t\t// read if data file is compressed\r\n \t\tgzipFile = sp.getBoolean(res.getString(R.string.pref_data_file_gzip),\r\n \t\t\t\tfalse);\r\n \t}",
"public static File getPreferencesDirectory() {\n\t\treturn PREFERENCES_DIRECTORY;\n\t}",
"private SharedPreferences GetPreferences( Context context )\n\t{\n\t\treturn context.getSharedPreferences( CACHE_NAME, Context.MODE_PRIVATE );\n\t}",
"DataStoreInfo getUserDataStoreInfo();",
"private static SharedPreferences getSharedPreference(Context context){\n return PreferenceManager.getDefaultSharedPreferences(context);\n }",
"public static List<String> getAllUserIds(Context context) {\r\n\t\tList<String> result = new ArrayList<String>();\r\n\t\tSharedPreferences prefs = PreferenceManager\r\n\t\t\t\t.getDefaultSharedPreferences(context);\r\n\t\tif (prefs != null) {\r\n\t\t\tSet<String> keys = prefs.getAll().keySet();\r\n\t\t\tfor (String key : keys) {\r\n\t\t\t\tif (key.startsWith(\"user-\")) {\r\n\t\t\t\t\tString value = prefs.getString(key, \"\");\r\n\t\t\t\t\tif (!TextUtils.isEmpty(value)) {\r\n\t\t\t\t\t\tresult.add(value);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}",
"public String getUserName(){\n return mSharedPreferences.getString(SharedPrefContract.PREF_USER_NAME, null);\n }",
"public HashMap<String, String> getUserDetails()\n {\n HashMap<String, String> user = new HashMap<>();\n\n user.put(KEY_NAME, pref.getString(KEY_NAME, null));\n user.put(KEY_EMAIL, pref.getString(KEY_EMAIL, null));\n user.put(KEY_PHONE, pref.getString(KEY_PHONE, null));\n\n return user;\n }",
"private static String\n\tgetDefaultPrefsDir()\n\t{\n\t\tString homeDir\t= System.getProperty( \"user.home\" );\n\t\tif ( homeDir == null )\n\t\t{\n\t\t\thomeDir\t= \".\";\n\t\t}\n\t\t\n\t\treturn( homeDir );\n\t}",
"private static SharedPreferences getSharedPrefs(final Context context) {\n final String prefsName = context.getString(R.string.sharedprefs_name);\n return context.getSharedPreferences(prefsName, Context.MODE_PRIVATE);\n }",
"public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n // user name\n\n user.put(KEY_ID, pref.getString(KEY_ID, null));\n user.put(KEY_EMAIL, pref.getString(KEY_EMAIL, null));\n user.put(KEY_NAME, pref.getString(KEY_NAME, null));\n return user;\n }",
"UserSettings getByUser(HawkularUser user);",
"public String getUserGender(){\n return mSharedPreferences.getString(SharedPrefContract.PREF_GENDER, null);\n }",
"private SharedPreferences m4028a() {\n SharedPreferences sharedPreferences;\n synchronized (Preferences.class) {\n if (this.f5334b == null) {\n this.f5334b = this.f5333a.getSharedPreferences(\"androidx.work.util.preferences\", 0);\n }\n sharedPreferences = this.f5334b;\n }\n return sharedPreferences;\n }",
"public final File getUserPropertiesFile() {\n\t\treturn userPropertiesFile;\n\t}",
"public IPreferenceStore getTextPreferenceStore() {\n return fPreferenceStore;\n }",
"protected abstract IEditorPreferences getPreferences();",
"private void getSharedPreferenceValues(){\n // retrieve values\n // note: second item is the default value\n sortOrderOfResults = sharedPreferences.getString(DEFAULT_QUERY_PATH, AppUtilities.QUERY_PATH_POPULAR);\n preferredMovieGenre = sharedPreferences.getString(getString(R.string.pref_genre_key),\n getString(R.string.pref_genre_any_value));\n preferredStartYear = sharedPreferences.getString(getString(R.string.pref_earliest_year_key),\n getString(R.string.pref_earliest_year_default));\n preferredEndYear = sharedPreferences.getString(getString(R.string.pref_latest_year_key),\n getString(R.string.pref_latest_year_default));\n }",
"NetworkCallInformation getPreferences();",
"String getFlashPref();",
"public static String getUser() {\r\n return user;\r\n }",
"public String prefsAutomaticallyCheck();",
"public User getUser() {\n SharedPreferences sharedPreferences = mCtx.getSharedPreferences(SHARED_PREF_NAME, Context.MODE_PRIVATE);\n String userJson = sharedPreferences.getString(KEY_USER, null);\n User user = new Gson().fromJson(userJson, new TypeToken<User>(){}.getType());\n return user;\n }",
"public abstract Properties getProfileProperties();",
"public static String getUser() {\n return user;\n }",
"public ArrayList<Color> getPreferences() {\n\t\treturn preferences;\n\t}",
"public AudibleAccountPrefs getAccountPrefs(AudibleAccountPrefs in) {\n\t\tAudibleAccountPrefs out = in;\n\t\t\n\t\tfor (ConnectionListener l : getListeners()) {\n\t\t\tout = l.getAccountPrefs(out);\n\t\t\tif (out == null) return null; // canceled\n\t\t}\n\t\treturn out;\n\t}",
"private void getUser(){\n user = new User();\n SharedPreferences preferences = getSharedPreferences(\"account\", MODE_PRIVATE);\n user.setId(preferences.getInt(\"id\", 0));\n user.setPhone(preferences.getString(\"phone\", \"\"));\n user.setType(preferences.getInt(\"type\",0));\n }",
"public String getPreference(String key) {\n return prefs.get(key, null);\n }",
"public Map<String, ?> getAll() {\r\n SharedPreferences sharedPreferences = ctx.getSharedPreferences(SHARED_PREF_NAME, Context.MODE_PRIVATE);\r\n return sharedPreferences.getAll();\r\n }",
"private String getSharedPrefs (String folder, String file, String defaultValue)\t{\n\n\t\tSharedPreferences sp = getSharedPreferences(folder, MODE_PRIVATE);\n\t\treturn sp.getString(file, defaultValue);\n\t}",
"public String getSettings();",
"public DataRecord getUserSettingsRecord() throws ProcessManagerException {\r\n try {\r\n DataRecord data = getEmptyUserSettingsRecord();\r\n userSettings.load(data, processModel.getUserInfos().toRecordTemplate(\r\n currentRole, getLanguage(), false));\r\n \r\n return data;\r\n } catch (WorkflowException we) {\r\n throw new ProcessManagerException(\"ProcessManagerSessionController\",\r\n \"processManager.ERR_GET_EMPTY_USERSETTINGS_RECORD\");\r\n }\r\n }",
"public static SharedPreferences getSharedPreferences(@NonNull Context ctx, String preferName) {\n if (processFlag.get() == 0) {\n Bundle bundle = ctx.getContentResolver().call(PreferenceUtil.URI, PreferenceUtil.METHOD_QUERY_PID, \"\", null);\n int pid = 0;\n if (bundle != null) {\n pid = bundle.getInt(PreferenceUtil.KEY_VALUES);\n }\n //Can not get the pid, something wrong!\n if (pid == 0) {\n return getFromLocalProcess(ctx, preferName);\n }\n processFlag.set(Process.myPid() == pid ? 1 : -1);\n return getSharedPreferences(ctx, preferName);\n } else if (processFlag.get() > 0) {\n return getFromLocalProcess(ctx, preferName);\n } else {\n return getFromRemoteProcess(ctx, preferName);\n }\n }"
]
| [
"0.78049165",
"0.739698",
"0.73004234",
"0.7297378",
"0.7254111",
"0.7189983",
"0.71783674",
"0.7154654",
"0.7022628",
"0.6791623",
"0.67755044",
"0.66378444",
"0.658612",
"0.6542232",
"0.6534369",
"0.64963627",
"0.64962536",
"0.64730734",
"0.64500004",
"0.64146733",
"0.64043015",
"0.6402546",
"0.63934195",
"0.6383184",
"0.6376872",
"0.6356309",
"0.633785",
"0.633729",
"0.6295349",
"0.6283573",
"0.6277462",
"0.62712353",
"0.62712353",
"0.6264401",
"0.62599957",
"0.625257",
"0.6241172",
"0.62384605",
"0.6175961",
"0.6166545",
"0.6156926",
"0.61553353",
"0.6144642",
"0.61233586",
"0.61161035",
"0.6112017",
"0.61028886",
"0.6095075",
"0.60885316",
"0.60618913",
"0.60594255",
"0.605437",
"0.60444355",
"0.60280496",
"0.6016267",
"0.60161555",
"0.5991491",
"0.5983246",
"0.59768885",
"0.59576696",
"0.5957212",
"0.5943999",
"0.5943452",
"0.5940256",
"0.59371763",
"0.5920471",
"0.59111536",
"0.58958673",
"0.58805656",
"0.58783317",
"0.587814",
"0.5870486",
"0.5864613",
"0.58583987",
"0.58559716",
"0.58434033",
"0.5840498",
"0.5838774",
"0.5836802",
"0.58235127",
"0.58082086",
"0.5808137",
"0.5807184",
"0.579648",
"0.5779689",
"0.5776289",
"0.5758017",
"0.57538056",
"0.5746965",
"0.5741498",
"0.57309675",
"0.5723127",
"0.5716523",
"0.5710289",
"0.57046396",
"0.5702907",
"0.57020557"
]
| 0.7810087 | 3 |
Returns the user prefs' GUI settings. | GuiSettings getGuiSettings(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ReactivePreferences preferences() {\n\t\treturn ReactivePreferences.userRoot();\n\t}",
"GuiSettings getCurrentGuiSetting() {\n return new GuiSettings(primaryStage.getWidth(), primaryStage.getHeight(),\n (int) primaryStage.getX(), (int) primaryStage.getY());\n }",
"ReadOnlyUserPrefs getUserPrefs();",
"ReadOnlyUserPrefs getUserPrefs();",
"ReadOnlyUserPrefs getUserPrefs();",
"ReadOnlyUserPrefs getUserPrefs();",
"public GuiSettings getCurrentGuiSetting() {\n return new GuiSettings(primaryStage.getWidth(), primaryStage.getHeight(), (int) primaryStage.getX(),\n (int) primaryStage.getY());\n }",
"public BwPreferences getUserPreferences() {\n return userPreferences;\n }",
"public GamePreferences getPrefs() {\n\t\treturn prefs;\n\t}",
"public String getSettings();",
"public synchronized static Settings getSettings() {\n \tif (settings==null) {\n \t\tHashMap<String, String> def = new HashMap<>();\n \t\tdef.put(Settings.Keys.align.toString(), \"center_inner\");\n \t\tsettings = new Settings(\"/DotifyStudio/prefs_v\"+PREFS_VERSION, def);\n \t}\n \treturn settings;\n }",
"private void getPreferences() {\n\n if(sharedpreferences.getBoolean(\"usaGPU\", true)) {\n mUtilizzoGPU.setChecked(true);\n }\n else{\n mUtilizzoGPU.setChecked(false);\n }\n\n }",
"public Form getUserSettingsForm() throws ProcessManagerException {\r\n try {\r\n com.silverpeas.workflow.api.model.DataFolder userInfos = processModel\r\n .getUserInfos();\r\n if (userInfos == null)\r\n return null;\r\n \r\n return new XmlForm(userInfos.toRecordTemplate(currentRole, getLanguage(),\r\n false));\r\n } catch (FormException we) {\r\n throw new ProcessManagerException(\"ProcessManagerSessionController\",\r\n \"processManager.ERR_GET_USERSETTINGS_FORM\", we);\r\n } catch (WorkflowException fe) {\r\n throw new ProcessManagerException(\"ProcessManagerSessionController\",\r\n \"processManager.ERR_GET_USERSETTINGS_FORM\", fe);\r\n }\r\n }",
"private void getSettings(){\n SharedPreferences sp = getSharedPreferences(\"PACERUNNER_SETTINGS\", Activity.MODE_PRIVATE);\n AMOUNT_OF_SECONDS_WHEN_TRIGGERING_NOTIFICATION = sp.getInt(\"NOTIFICATION_SENSITIVITY\", -15);\n REQUIRED_METERS_BEFORE_SHOWING_AVGPACE = sp.getInt(\"NOTIFICATION_METERS_BEFORE_START\", 500);\n }",
"private MinesweeperPreferences getPrefs() {\n return Main.getPrefs();\n }",
"void getSettings(ControlsSettings settings);",
"private void showUserSettings() {\n\t\tSharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);\n\t\tStringBuilder builder = new StringBuilder();\n\t\tbuilder.append(\"\\n Send report:\"+ sharedPrefs.getBoolean(\"prefSendReport\", true));\n\t}",
"public Preferences getPrefs() {\n return _prefs;\n }",
"private void showUserSettings() {\n\t\t\tSharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);\n\t\t\tStringBuilder builder = new StringBuilder();\n\t\t\tbuilder.append(\"\\n Send report:\"+ sharedPrefs.getBoolean(\"prefSendReport\", true));\n\t\t}",
"public JComponent getPreferenceUI() {\n\t\treturn null;\n\t}",
"private void showUserPreferences() {\r\n MyAccount ma = state.getMyAccount();\r\n \r\n mOriginName.setValue(ma.getOriginName());\r\n SharedPreferencesUtil.showListPreference(this, MyAccount.Builder.KEY_ORIGIN_NAME, R.array.origin_system_entries, R.array.origin_system_entries, R.string.summary_preference_origin_system);\r\n mOriginName.setEnabled(!ma.isPersistent());\r\n \r\n if (mEditTextUsername.getText() == null\r\n || ma.getUsername().compareTo(mEditTextUsername.getText()) != 0) {\r\n mEditTextUsername.setText(ma.getUsername());\r\n }\r\n StringBuilder summary = new StringBuilder(this.getText(R.string.summary_preference_username));\r\n if (ma.getUsername().length() > 0) {\r\n summary.append(\": \" + ma.getUsername());\r\n } else {\r\n summary.append(\": (\" + this.getText(R.string.not_set) + \")\");\r\n }\r\n mEditTextUsername.setSummary(summary);\r\n mEditTextUsername.setEnabled(ma.canSetUsername());\r\n\r\n if (ma.isOAuth() != mOAuth.isChecked()) {\r\n mOAuth.setChecked(ma.isOAuth());\r\n }\r\n // In fact, we should hide it if not enabled, but I couldn't find an easy way for this...\r\n mOAuth.setEnabled(ma.canChangeOAuth());\r\n\r\n if (mEditTextPassword.getText() == null\r\n || ma.getPassword().compareTo(mEditTextPassword.getText()) != 0) {\r\n mEditTextPassword.setText(ma.getPassword());\r\n }\r\n summary = new StringBuilder(this.getText(R.string.summary_preference_password));\r\n if (TextUtils.isEmpty(ma.getPassword())) {\r\n summary.append(\": (\" + this.getText(R.string.not_set) + \")\");\r\n }\r\n mEditTextPassword.setSummary(summary);\r\n mEditTextPassword.setEnabled(ma.getConnection().isPasswordNeeded());\r\n\r\n int titleResId;\r\n switch (ma.getCredentialsVerified()) {\r\n case SUCCEEDED:\r\n titleResId = R.string.title_preference_verify_credentials;\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_verify_credentials));\r\n break;\r\n default:\r\n if (ma.isPersistent()) {\r\n titleResId = R.string.title_preference_verify_credentials_failed;\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_verify_credentials_failed));\r\n } else {\r\n titleResId = R.string.title_preference_add_account;\r\n if (ma.isOAuth()) {\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_add_account_oauth));\r\n } else {\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_add_account_basic));\r\n }\r\n }\r\n break;\r\n }\r\n mVerifyCredentials.setTitle(titleResId);\r\n mVerifyCredentials.setSummary(summary);\r\n mVerifyCredentials.setEnabled(ma.isOAuth() || ma.getCredentialsPresent());\r\n }",
"public void setSettings(UserPrefs prefs) {\n tfDataPath.setText(prefs.getProperty(UserPrefs.DATA_ROOT));\n // Save this for a comparison later\n existingDataPath = prefs.getProperty(UserPrefs.DATA_ROOT);\n\n String backup = prefs.getProperty(UserPrefs.BACKUP_FOLDER);\n // Nothing there, so add default based on username - this is OK\n if(backup == null || backup.length() == 0) {\n backup = DataFiler.getDefaultBackupFolder(prefs.getUserName());\n }\n tfBackupPath.setText(backup);\n\n cbBackUpOnExit.setSelected(prefs.getBooleanProperty(UserPrefs.BACKUP));\n\n tfNagSave.setText(prefs.getProperty(UserPrefs.SAVE_NAG_MINS));\n\n cbIncludeText.setSelected(prefs.getBooleanProperty(UserPrefs.MESSAGE_QUOTE));\n\n // L&F\n String lf = prefs.getProperty(UserPrefs.APP_LOOK_FEEL);\n cbLookAndFeel.setSelectedItem(lf);\n\n UIManager.LookAndFeelInfo[] systemLookAndFeels = UIManager.getInstalledLookAndFeels();\n for(int i = 0; i < systemLookAndFeels.length; i++) {\n if(systemLookAndFeels[i].getClassName().equals(lf)) {\n cbLookAndFeel.setSelectedIndex(i);\n break;\n }\n }\n\n cbShowStatusMessages.setSelected(prefs.getBooleanProperty(UserPrefs.STATUS_MESSAGES));\n }",
"public static IPreferenceStore getUIStore() {\n return getUIPlugin().getPreferenceStore();\n }",
"Preferences userRoot();",
"public UserSettings getUserSettings() {\n\t\treturn userSettings;\n\t}",
"private void getAutonomousPrefs() {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(hardwareMap.appContext);\n alliance = preferences.getString(\"AllianceColor\", \"error\");\n frontBack = preferences.getString(\"FrontBack\", \"error\");\n getPartnerGlyph = preferences.getBoolean(\"PickupAllianceGlyph\", false);\n getPitGlyph = preferences.getBoolean(\"PickupPitGlyph\", false);\n }",
"private void readSharedPreferences() {\n SharedPreferences sharedPref = getActivity().getSharedPreferences(SETTINGS_FILE_KEY, MODE_PRIVATE);\n currentDeviceAddress = sharedPref.getString(SETTINGS_CURRENT_DEVICE_ADDRESS, \"\");\n currentDeviceName = sharedPref.getString(SETTINGS_CURRENT_DEVICE_NAME, \"\");\n currentFilenamePrefix = sharedPref.getString(SETTINGS_CURRENT_FILENAME_PREFIX, \"\");\n currentSubjectName = sharedPref.getString(SETTINGS_SUBJECT_NAME, \"\");\n currentShoes = sharedPref.getString(SETTINGS_SHOES, \"\");\n currentTerrain = sharedPref.getString(SETTINGS_TERRAIN, \"\");\n }",
"private void getPreferences() {\n Account rootAccount = book.getRootAccount();\n displayedSecuritiesList = rootAccount.getPreference(\"StockGlance_displayedSecurities\", \"\");\n allowMissingPrices = rootAccount.getPreferenceBoolean(\"StockGlance_DisplayMissingPrices\", false);\n timelySnapshotInterval = rootAccount.getPreferenceInt(\"StockGlance_TimelyWindow\", 7);\n }",
"public static BleTrackerPreferences getPreferences() {\n return preferences;\n }",
"public SharedPreferences getPrefs() { return this.prefs; }",
"public SharedPreferences GetSettings() {\n return mSettings;\n }",
"public static @NotNull Settings getSettings ()\n {\n Application application = ApplicationManager.getApplication ();\n SettingsPlugin settingsPlugin = application.getComponent (SettingsPlugin.class);\n return settingsPlugin.getSettings ();\n }",
"private void getPreferences() {\n Constants constants = new Constants();\n android.content.SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getActivity());\n\n serverUrl = sharedPreferences.getString(\"LedgerLinkBaseUrl\", constants.DEFAULTURL);\n IsEditing = SharedPrefs.readSharedPreferences(getActivity(), \"IsEditing\", \"0\");\n tTrainerId = SharedPrefs.readSharedPreferences(getActivity(), \"ttrainerId\", \"-1\");\n vslaId = SharedPrefs.readSharedPreferences(getActivity(), \"vslaId\", \"-1\");\n\n vslaName = DataHolder.getInstance().getVslaName();\n representativeName = DataHolder.getInstance().getGroupRepresentativeName();\n representativePost = DataHolder.getInstance().getGroupRepresentativePost();\n repPhoneNumber = DataHolder.getInstance().getGroupRepresentativePhoneNumber();\n grpBankAccount = DataHolder.getInstance().getGroupBankAccount();\n physAddress = DataHolder.getInstance().getPhysicalAddress();\n regionName = DataHolder.getInstance().getRegionName();\n grpPhoneNumber = DataHolder.getInstance().getGroupPhoneNumber();\n grpBankAccount = DataHolder.getInstance().getGroupBankAccount();\n locCoordinates = DataHolder.getInstance().getLocationCoordinates();\n grpSupportType = DataHolder.getInstance().getSupportTrainingType();\n numberOfCycles = DataHolder.getInstance().getNumberOfCycles();\n }",
"public NetworkCallInformation getPreferences() {\n return preferencesModel.getPreferences();\n\n }",
"private void readPreferences() {\n configAutonomousCommand();\n }",
"com.google.apps.alertcenter.v1beta1.Settings getSettings();",
"protected String readSettings() {\n String output = \"\";\n for (String setting: settings.keySet()) {\n String value = settings.get(setting);\n output += setting + \":\" + value + \"\\n\";\n }\n return output;\n }",
"UserSettings getByUser();",
"@JavascriptInterface\n public String getPreference(String name) {\n Log.d(TAG, \"getPreference: \" + name);\n return preferences.getString(name, \"\");\n }",
"public UserSettings getUserSettings(String username);",
"public String prefsAutomaticallyCheck();",
"Settings getSettings();",
"@Override\n public Path getUserPrefsFilePath() {\n return userPrefsStorage.getUserPrefsFilePath();\n }",
"public static Collection<String> getPreferences(){\n\t\treturn preferences;\n\t}",
"protected abstract IEditorPreferences getPreferences();",
"public String getFxSettings() {\r\n return \"{}\";\r\n }",
"private void showUserPreferences() {\r\n MyAccount ma = state.getAccount();\r\n \r\n mOriginName.setValue(ma.getOriginName());\r\n SharedPreferencesUtil.showListPreference(this, MyAccount.Builder.KEY_ORIGIN_NAME, R.array.origin_system_entries, R.array.origin_system_entries, R.string.summary_preference_origin_system);\r\n \r\n mOriginName.setEnabled(!state.builder.isPersistent() && TextUtils.isEmpty(ma.getUsername()));\r\n \r\n if (mEditTextUsername.getText() == null\r\n || ma.getUsername().compareTo(mEditTextUsername.getText()) != 0) {\r\n mEditTextUsername.setText(ma.getUsername());\r\n }\r\n StringBuilder summary;\r\n if (ma.getUsername().length() > 0) {\r\n summary = new StringBuilder(ma.getUsername());\r\n } else {\r\n summary = new StringBuilder(this.getText(ma.alternativeTermForResourceId(R.string.summary_preference_username)));\r\n }\r\n mEditTextUsername.setDialogTitle(this.getText(ma.alternativeTermForResourceId(R.string.dialog_title_preference_username)));\r\n mEditTextUsername.setTitle(this.getText(ma.alternativeTermForResourceId(R.string.title_preference_username)));\r\n mEditTextUsername.setSummary(summary);\r\n mEditTextUsername.setEnabled(!state.builder.isPersistent() && !ma.isUsernameValidToStartAddingNewAccount());\r\n \r\n boolean isNeeded = ma.canChangeOAuth();\r\n if (ma.isOAuth() != mOAuth.isChecked()) {\r\n mOAuth.setChecked(ma.isOAuth());\r\n }\r\n // In fact, we should hide it if not enabled, but I couldn't find an easy way for this...\r\n mOAuth.setEnabled(isNeeded);\r\n if (isNeeded) {\r\n mOAuth.setTitle(R.string.title_preference_oauth);\r\n mOAuth.setSummary(ma.isOAuth() ? R.string.summary_preference_oauth_on : R.string.summary_preference_oauth_off);\r\n } else {\r\n mOAuth.setTitle(\"\");\r\n mOAuth.setSummary(\"\");\r\n }\r\n \r\n isNeeded = ma.getConnection().isPasswordNeeded();\r\n if (mEditTextPassword.getText() == null\r\n || ma.getPassword().compareTo(mEditTextPassword.getText()) != 0) {\r\n mEditTextPassword.setText(ma.getPassword());\r\n }\r\n if (isNeeded) {\r\n mEditTextPassword.setTitle(R.string.title_preference_password);\r\n summary = new StringBuilder(this.getText(R.string.summary_preference_password));\r\n if (TextUtils.isEmpty(ma.getPassword())) {\r\n summary.append(\": (\" + this.getText(R.string.not_set) + \")\");\r\n }\r\n } else {\r\n summary = null;\r\n mEditTextPassword.setTitle(\"\");\r\n }\r\n mEditTextPassword.setSummary(summary);\r\n mEditTextPassword.setEnabled(isNeeded);\r\n \r\n int titleResId;\r\n boolean addAccountOrVerifyCredentialsEnabled = ma.isOAuth() || ma.getCredentialsPresent();\r\n switch (ma.getCredentialsVerified()) {\r\n case SUCCEEDED:\r\n titleResId = R.string.title_preference_verify_credentials;\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_verify_credentials));\r\n break;\r\n default:\r\n if (state.builder.isPersistent()) {\r\n titleResId = R.string.title_preference_verify_credentials_failed;\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_verify_credentials_failed));\r\n } else {\r\n if (!ma.isUsernameValidToStartAddingNewAccount()) {\r\n addAccountOrVerifyCredentialsEnabled = false;\r\n }\r\n titleResId = R.string.title_preference_add_account;\r\n if (ma.isOAuth()) {\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_add_account_oauth));\r\n } else {\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_add_account_basic));\r\n }\r\n }\r\n break;\r\n }\r\n addAccountOrVerifyCredentials.setTitle(titleResId);\r\n addAccountOrVerifyCredentials.setSummary(summary);\r\n addAccountOrVerifyCredentials.setEnabled(addAccountOrVerifyCredentialsEnabled);\r\n }",
"IngestModuleGlobalSettingsPanel getGlobalSettingsPanel();",
"private static String getConfigFile() {\n\n final String sPath = getUserFolder();\n\n return sPath + File.separator + \"sextante.settings\";\n\n }",
"String getPreference(String user, String preferenceName) throws OntimizeJEERuntimeException;",
"public static String getSharedPrefs() {\n return SHARED_PREFS;\n }",
"Preferences systemRoot();",
"private void showPreferenceSettings() {\n \tfor(PrefKeysE k: PrefKeysE.values()) {\n \t\tString key = k.getKey();\n \t\tboolean isFound = Tt.isPreferencePresent(key);\n \t\tint prtFlags = 0; //don't print from getPreference()\n// \t\tboolean valB;\n// \t\tint valI;\n// \t\tdouble valD;\n \t\tString valFoundStr = \"\";\n \t\tString prefix = String.format(\"%-40s: %-7s: found? %s, default \", key, k.getType().name(), (isFound ? \"Y\" : \"N\"));\n \t\tswitch(k.getType()) {\n \t\tcase BOOLEAN:\n \t\t\tboolean dfltB = k.getDefaultBoolean();\n \t\t\tvalFoundStr += dfltB;\n \t\t\tif(isFound) {\n \t\t\t\tboolean val = Tt.getPreference(k, dfltB, prtFlags, PrefCreateE.DO_NOT_CREATE);\n \t\t\t\tvalFoundStr += \", current \" + val;\n \t\t\t}\n \t\t\tbreak;\n \t\tcase INT:\n \t\t\tint dfltI = k.getDefaultInt();\n \t\t\tvalFoundStr += dfltI;\n \t\t\tif(isFound) {\n \t\t\t\tint val = Tt.getPreference(k, dfltI, prtFlags, PrefCreateE.DO_NOT_CREATE);\n \t\t\t\tvalFoundStr += \", current \" + val;\n \t\t\t}\n \t\t\tbreak;\n \t\tcase DOUBLE:\n \t\t\tdouble dfltD = k.getDefaultDouble();\n \t\t\tvalFoundStr = String.format(\"% 1.4f\", dfltD);\n \t\t\tif(isFound) {\n \t\t\t\tdouble val = Tt.getPreference(k, dfltD, prtFlags, PrefCreateE.DO_NOT_CREATE);\n \t\t\t\tvalFoundStr += String.format(\", current % 1.4f\", val);\n \t\t\t}\n \t\t\tbreak;\n \t\tcase STRING:\n \t\t\tString dfltS = k.getDefaultString();\n\t\t\t\tvalFoundStr += \"'\" + dfltS + \"'\";\n \t\t\tif(isFound) {\n \t\t\t\tString val = Tt.getPreference(k, dfltS, prtFlags, PrefCreateE.DO_NOT_CREATE);\n \t\t\t\tvalFoundStr += \", current '\" + val + \"'\";\n \t\t\t}\n \t\t\tbreak;\n \t\t}\n\t\t\tP.println(prefix + valFoundStr);\n\n// \t\tif(k.getType().equals(PrefTypeE.BOOLEAN)) \n \t}\n }",
"static Menu settings ()\r\n \t{\r\n \t\tfinal byte width = 45;\r\n \t\tOption ram, rightHanded, dumpState, trackTime, assembly, compression;\r\n \t\tString label [] = {\"Which settings field would you\",\r\n \t\t\"like to modify?\"};\r\n \t\tMenu settings = new Menu (label, \"Change program settings.\", width);\r\n \t\t\r\n \t\t//Initialising options:\r\n \t\tassembly = new Editor (Settings.assembly, \"Assembly Definitions\");\r\n \t\trightHanded = new Toggle (Settings.rightHanded, \"RAM select\", \"Right\", \"Left\"); //True stands for right;\r\n \t\t//False for left.\r\n \t\tdumpState = new Toggle (Settings.dumpState, \"Data Recording\");\r\n \t\ttrackTime = new Toggle (Settings.trackTime, \"Time Tracking\");\r\n \t\tram = new PickNumber (Settings.rAMallowed, \"RAM Allowed\", \"bytes\");\r\n \t\tcompression = new Toggle (Settings.compressNBT, \"Schematic compression\");\r\n \t\t\r\n \t\t//Adding options to setting menu:\r\n \t\tsettings.addOption(assembly);\r\n \t\tsettings.addOption(rightHanded);\r\n \t\tsettings.addOption(dumpState);\r\n \t\tsettings.addOption(trackTime);\r\n \t\tsettings.addOption(ram);\r\n \t\t//Settings menu will display these options in the order they are added here.\r\n \t\t\r\n \t\t//TODO option for program name, target and programming language settings.\r\n \t\t\r\n \t\treturn settings;\r\n \t}",
"public String getUserConfig() {\n return userConfig;\n }",
"private static void changeSettings() {\n\t\t\n\t\tfinal Settings sett = config;\n\t\t\n\t\tfinal JDialog settingsDialog = new JDialog(frame, \"Change settings\");\n\t\t\n\t\tsettingsDialog.getContentPane().setLayout(new BorderLayout());\n\t\tsettingsDialog.setPreferredSize(new Dimension(350,150));\n\t\t\n\t\tJPanel settings = new JPanel();\n\t\tsettings.setLayout(new GridLayout(3,2));\n\t\t\n\t\tJLabel lblDB = new JLabel(\"Update DB dynamically\");\n\t\tJRadioButton rbDB = new JRadioButton();\n\t\trbDB.setSelected(sett.isUpdateDB());\n\t\trbDB.addItemListener(new ItemListener(){\n\n\t\t\t@Override\n\t\t\tpublic void itemStateChanged(ItemEvent e) {\n\t\t\t\tif(e.getStateChange() == ItemEvent.SELECTED){\n\t\t\t\t\tsett.setUpdateDB(true);\n\t\t\t\t} else if(e.getStateChange() == ItemEvent.DESELECTED){\n\t\t\t\t\tsett.setUpdateDB(false);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t});\t\t\n\t\tJLabel lblGUI = new JLabel(\"Use Graphical User Interface\");\n\t\tJRadioButton rbGUI = new JRadioButton();\n\t\trbGUI.setSelected(sett.isGUI());\n\t\trbGUI.addItemListener(new ItemListener() {\n\n\t\t\t@Override\n\t\t\tpublic void itemStateChanged(ItemEvent e) {\n\t\t\t\tif(e.getStateChange() == ItemEvent.SELECTED){\n\t\t\t\t\tsett.setGUI(true);\n\t\t\t\t} else if(e.getStateChange() == ItemEvent.DESELECTED){\n\t\t\t\t\tsett.setGUI(false);\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t});\n\t\t\n\t\tJLabel lblFile = new JLabel(\"Working file\");\n\t\tfinal JTextField tfFile = new JTextField(sett.getWorkingFile());\n\t\t\t\t\n\t\tsettings.add(lblDB);\n\t\tsettings.add(rbDB);\n\t\tsettings.add(lblGUI);\n\t\tsettings.add(rbGUI);\n\t\tsettings.add(lblFile);\n\t\tsettings.add(tfFile);\n\t\t\n\t\tJButton btnSave = new JButton(\"Save settings\");\n\t\tbtnSave.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tif(!saved) {\n\t\t \t\tint option = JOptionPane.showOptionDialog(frame,\n\t\t \t\t\t\t\"Updating the settings will reset the application\\nThere are unsaved changes\\nDo you want to save them now?\",\n\t\t \t\t\t\t\"Unsaved changes\",JOptionPane.YES_NO_CANCEL_OPTION,\n\t\t \t\t\t\tJOptionPane.WARNING_MESSAGE, null, null, 0);\n\t\t \t\tswitch(option) {\n\t\t \t\tcase 0:\n\t\t \t\t\ttoggleSaved(portfolio.save(WORKING_FILE));\n\t\t \t\tdefault:\n\t\t \t\t\tbreak; \t \t\t\n\t\t \t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tsett.setWorkingFile(tfFile.getText());\n\t\t\t\t\n\t\t\t\tsett.save();\n\t\t\t\tconfig = new Settings(sett);\n\t\t\t\tsettingsDialog.dispose();\n\t\t\t\t\n\t\t\t\tif(!sett.isGUI()){\n\t\t\t\t\tframe.dispose();\n\t\t\t\t\texit = false;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!sett.isUpdateDB()){\n\t\t\t\t\tportfolio.init(config.getWorkingFile());\n\t\t\t\t\tframe.setTitle(\"JProject v.\"+VERSION);\n\t\t\t\t\tbtnRestore.setEnabled(true);\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\tportfolio.initDB();\n\t\t\t\t\tframe.setTitle(\"JProject v.\"+VERSION+\" ** Linked to Database **\");\n\t\t\t\t\tbtnRestore.setEnabled(false);\n\t\t\t\t}\n\t\t\t\t\topTable.setModel((TableModel) new ProjectTableModel(portfolio.getOngoingProjects()));\n\t\t\t\t\tfpTable.setModel((TableModel) new ProjectTableModel(portfolio.getFinishedProjects()));\n\t\t\t\t\tsel.init(portfolio);\n\t\t\t\t\tupdateCounters();\n\t\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tsettingsDialog.add(settings, BorderLayout.CENTER);\n\t\tsettingsDialog.add(btnSave, BorderLayout.PAGE_END);\n\t\t\n\t\tsettingsDialog.pack();\n\t\tsettingsDialog.setVisible(true);\t\n\t}",
"public Object createPrefsEditor()\n \t{\n \t\treturn this.createPrefsEditor(true, false);\n \t}",
"public User getPrefsUser() {\n Gson gson = new Gson();\n String json = prefs.getString(USER_PREFS, \"\");\n return gson.fromJson(json, User.class);\n }",
"public static SharedPreferences getSharedPrefs() {\n return App.getAppContext().getSharedPreferences(PREFS_LABEL, Context.MODE_PRIVATE);\n }",
"public void savingVariablesWebConfig(){\n SharedPreferences prefs = getSharedPreferences(Constants.PREFERENCES_NAME, Context.MODE_PRIVATE);\n //Save data of user in preferences\n SharedPreferences.Editor editor = prefs.edit();\n\n editor.putString(Constants.PREF_VALUE_MAX_ORDERS_ACCEPTED, \"3\");\n editor.putString(Constants.PREF_VALUE_MAX_ORDERS_VISIBLE, \"10\");\n editor.putString(Constants.PREF_VALUE_MAX_TIME_ORDERS, \"15\");\n editor.commit();\n }",
"public SharedPreferences prefs() {\n\n SharedPreferences prefs = context.getSharedPreferences(APP_IDS_PREFS_NAME, Context.MODE_PRIVATE); // Private because it can still be accessed from other apps with the same User ID\n return prefs;\n }",
"protected Map<String, String> getSettings() {\n\n return (Map<String, String>) getExtraData().get(ProcessListener.EXTRA_DATA_SETTINGS);\n }",
"public interface PreferencesHelper {\r\n\r\n int getUserLoggedInMode();\r\n\r\n void setUserLoggedInMode(DataManager.LoggedInMode mode);\r\n\r\n String getUserName();\r\n\r\n void setUserName(String userName);\r\n\r\n String getAccessToken();\r\n\r\n void setAccessToken(String accessToken);\r\n\r\n String getUserProfilePicUrl();\r\n\r\n void setUserProfilePicUrl(String profilePicUrl);\r\n\r\n String getStoredProfilePicPath();\r\n\r\n void setStoredProfilePicPath(String profilePicPath);\r\n\r\n}",
"protected static void getSettingsFromFile(){\n\t\t Properties properties = new Properties();\r\n\t\t try {\r\n\t\t\t try {\r\n\t\t\t\t FileInputStream fi = new FileInputStream(MT4jSettings.getInstance().getDefaultSettingsPath() + \"Settings.txt\");\r\n\t\t\t\t properties.load(fi);\t\r\n\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\tlogger.debug(\"Couldnt load Settings.txt from the File system. Trying to load it as a resource..\");\r\n\t\t\t\tInputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(\"Settings.txt\");\r\n\t\t\t\t if (in != null){\r\n\t\t\t\t\t properties.load(in);\t\r\n\t\t\t\t }else{\r\n\t\t\t\t\t logger.debug(\"Couldnt load Settings.txt as a resource. Using defaults.\");\r\n\t\t\t\t\t throw new FileNotFoundException(\"Couldnt load Settings.txt as a resource\");\r\n\t\t\t\t }\r\n\t\t\t}\r\n\t\r\n\t\t\t MT4jSettings.fullscreen = Boolean.parseBoolean(properties.getProperty(\"Fullscreen\", Boolean.valueOf(MT4jSettings.getInstance().isFullscreen()).toString()).trim());\r\n\t\t\t //Use java's fullscreen exclusive mode (real fullscreen) or just use an undecorated window at fullscreen size \r\n\t\t\t MT4jSettings.getInstance().fullscreenExclusive = Boolean.parseBoolean(properties.getProperty(\"FullscreenExclusive\", Boolean.valueOf(MT4jSettings.getInstance().isFullscreenExclusive()).toString()).trim());\r\n\t\t\t //Which display to use for fullscreen\r\n\t\t\t MT4jSettings.getInstance().display = Integer.parseInt(properties.getProperty(\"Display\", String.valueOf(MT4jSettings.getInstance().getDisplay())).trim());\r\n\t\r\n\t\t\t MT4jSettings.getInstance().windowWidth = Integer.parseInt(properties.getProperty(\"DisplayWidth\", String.valueOf(MT4jSettings.getInstance().getWindowWidth())).trim());\r\n\t\t\t MT4jSettings.getInstance().windowHeight = Integer.parseInt(properties.getProperty(\"DisplayHeight\", String.valueOf(MT4jSettings.getInstance().getWindowHeight())).trim());\r\n\t\t\t \r\n\t\t\t //FIXME at fullscreen really use the screen dimension? -> we need to set the native resoultion ourselves!\r\n\t\t\t //so we can have a lower fullscreen resolution than the screen dimensions\r\n\t\t\t if (MT4jSettings.getInstance().isFullscreen() && !MT4jSettings.getInstance().isFullscreenExclusive()){\r\n\t\t\t\t Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n\t\t\t\t MT4jSettings.getInstance().windowWidth = screenSize.width;\r\n\t\t\t\t MT4jSettings.getInstance().windowHeight = screenSize.height;\r\n\t\t\t }\r\n\t\t\t /*\r\n\t\t\t //Comment this to not change the window width to the screen width in fullscreen mode\r\n\t\t\t else{\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 MT4jSettings.getInstance().maxFrameRate = Integer.parseInt(properties.getProperty(\"MaximumFrameRate\", String.valueOf(MT4jSettings.getInstance().getMaxFrameRate())).trim());\r\n\t\t\t MT4jSettings.getInstance().renderer = Integer.parseInt(properties.getProperty(\"Renderer\", String.valueOf(MT4jSettings.getInstance().getRendererMode())).trim());\r\n\t\t\t MT4jSettings.getInstance().numSamples = Integer.parseInt(properties.getProperty(\"OpenGLAntialiasing\", String.valueOf(MT4jSettings.getInstance().getNumSamples())).trim());\r\n\t\r\n\t\t\t MT4jSettings.getInstance().vSync = Boolean.parseBoolean(properties.getProperty(\"Vertical_sync\", Boolean.valueOf(MT4jSettings.getInstance().isVerticalSynchronization()).toString()).trim());\r\n\t\r\n\t\t\t //Set frametitle\r\n\t\t\t String frameTitle = properties.getProperty(\"Frametitle\", MT4jSettings.getInstance().getFrameTitle().trim());\r\n\t\t\t MT4jSettings.getInstance().frameTitle = frameTitle;\r\n\t\r\n\t\t } catch (Exception e) {\r\n\t\t\t logger.error(\"Error while loading Settings.txt. Using defaults.\");\r\n\t\t }\r\n\t\t settingsLoadedFromFile = true;\r\n\t}",
"private void preferences() {\n final Preferences prefs = Preferences.userNodeForPackage(DesktopPane.class);\n final JFileChooser chooser = new JFileChooser(prefs.get(SCREENSHOT_DIRECTORY_PREFS, null));\n chooser.setDialogTitle(\"Output directory for screenshots\");\n chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n switch (chooser.showOpenDialog(this)) {\n case JFileChooser.APPROVE_OPTION: {\n final File directory = chooser.getSelectedFile();\n if (directory != null) {\n prefs.put(SCREENSHOT_DIRECTORY_PREFS, directory.getPath());\n }\n break;\n }\n }\n }",
"public File getPreferencesFile() {\n\t\treturn preferencesFile;\n\t}",
"private Settings() {\n prefs = NbPreferences.forModule( Settings.class );\n }",
"private void fetchPreferences() {\n macAddress = prefs.getString(getString(R.string.pref_mac), DEF_VALUE);\n macSet = prefs.getBoolean(getString(R.string.mac_set), false);\n //fetch previous values for temp, max, min\n tempMeasured = Double.parseDouble(prefs.getString(getString(R.string.text_temp), \"0\"));\n tempMax = Double.parseDouble(prefs.getString(getString(R.string.text_max), \"0\"));\n tempMin = Double.parseDouble(prefs.getString(getString(R.string.text_min), \"0\"));\n }",
"public void loadPreferences() {\n\t\tVector v = dboxini.getSection(\"WindowState\");\n\t\tif (v != null && v.size() == 1) {\n\t\t\tDimension scrSize = Toolkit.getDefaultToolkit().getScreenSize();\n\n\t\t\tConfigSection wp = (ConfigSection) v.elementAt(0);\n\t\t\tint x = wp.getIntProperty(\"xLoc\",-1);\n\t\t\tint y = wp.getIntProperty(\"yLoc\",-1);\n\t\t\tint w = wp.getIntProperty(\"width\",-1);\n\t\t\tint h = wp.getIntProperty(\"height\",-1);\n\n\t\t\tif (w > -1 && h > -1) {\n\t\t\t\tif (w > scrSize.width) w = scrSize.width;\n\t\t\t\tif (h > scrSize.height) h = scrSize.height;\n\t\t\t\tsetSize(w,h);\n\t\t\t}\n\n\t\t\tDimension winSize = getSize();\n\n\t\t\tif (x > -1 && y > -1) {\n\t\t\t\tif (x + winSize.width > scrSize.width) x = scrSize.width - winSize.width;\n\t\t\t\tif (y + winSize.height > scrSize.height) y = scrSize.height - winSize.height;\n\n\t\t\t\tsetLocation(x,y);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tx = (scrSize.width - winSize.width) / 2;\n\t\t\t\ty = (scrSize.height - winSize.height) / 2;\n\n\t\t\t\tint dx = x + winSize.width - scrSize.width;\n\t\t\t\tif (dx > 0)\n\t\t\t\t\tx -= dx;\n\n\t\t\t\tif (x < 0)\n\t\t\t\t\tx = 0;\n\n\t\t\t\tint dy = y + winSize.height - scrSize.height;\n\t\t\t\tif (dy > 0)\n\t\t\t\t\ty -= dy;\n\n\t\t\t\tif (y < 0)\n\t\t\t\t\ty = 0;\n\n\t\t\t\tsetLocation(x,y);\n\t\t\t}\n\t\t}\n\t\t// Otherwise, use the default.\n\t\telse {\n\t\t\tsetSize(800,550);\n\t\n\t\t\tDimension scrSize = Toolkit.getDefaultToolkit().getScreenSize();\n\t\t\tDimension winSize = getSize();\n\t\n\t\t\tint x = (scrSize.width - winSize.width) / 2;\n\t\t\tint y = (scrSize.height - winSize.height) / 2;\n\t\n\t\t\tint dx = x + winSize.width - scrSize.width;\n\t\t\tif (dx > 0)\n\t\t\t\tx -= dx;\n\t\n\t\t\tif (x < 0)\n\t\t\t\tx = 0;\n\t\n\t\t\tint dy = y + winSize.height - scrSize.height;\n\t\t\tif (dy > 0)\n\t\t\t\ty -= dy;\n\t\n\t\t\tif (y < 0)\n\t\t\t\ty = 0;\n\t\n\t\t\tsetLocation(x,y);\n\t\t}\n\t}",
"int wkhtmltoimage_get_global_setting(PointerByReference settings, Pointer name, Pointer value, int vs);",
"void setGuiSettings(GuiSettings guiSettings);",
"void setGuiSettings(GuiSettings guiSettings);",
"void setGuiSettings(GuiSettings guiSettings);",
"void setGuiSettings(GuiSettings guiSettings);",
"void setGuiSettings(GuiSettings guiSettings);",
"void setGuiSettings(GuiSettings guiSettings);",
"void setGuiSettings(GuiSettings guiSettings);",
"public static synchronized void getSettingsWindow() {\n if (WINDOW == null) {\n WINDOW = new JFrame(\"Settings\");\n WINDOW.setContentPane(new SettingsWindow().settingsPanel);\n WINDOW.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n WINDOW.pack();\n }\n WINDOW.setVisible(true);\n WINDOW.requestFocus();\n }",
"private void saveCurrentPreferences() {\n\t\toldUnitType = preferences.getInt(\"displayUnit\", UnitType.FOOTINCH.getId());\n\t\toldPrecision = preferences.getInt(\"precision\", 16);\n\t\toldRounding = preferences.getBoolean(\"roundUp\", true);\n\t\toldDisplayOptions = preferences.getString(\"displayOptions\", context.getString(R.string.displayAutomatic));\n\t}",
"public String getPrefsAutoLoadDescription();",
"public PropertySet getViewProperties() {\r\n return prefs;\r\n }",
"public void updateUserPrefs(UserPrefs prefs) {\n // Get the backup path in the Text Field\n String backup = tfBackupPath.getText().trim();\n\n // Nothing there, so add default based on username - this is OK\n if(backup.length() == 0) {\n backup = DataFiler.getDefaultBackupFolder(prefs.getUserName());\n }\n\n prefs.putProperty(UserPrefs.BACKUP_FOLDER, backup);\n\n prefs.putProperty(UserPrefs.BACKUP, cbBackUpOnExit.isSelected());\n prefs.putProperty(UserPrefs.SAVE_NAG_MINS, tfNagSave.getText().trim());\n\n try {\n int mins = Integer.parseInt(tfNagSave.getText().trim());\n MainFrame.getInstance().mainMenu.actionSave.setNagInterval(mins);\n }\n catch(Exception ex) {\n //MainFrame.getInstance().mainMenu.actionSave.setNagInterval(0);\n }\n\n prefs.putProperty(UserPrefs.MESSAGE_QUOTE, cbIncludeText.isSelected());\n\n LookAndFeel lf = (LookAndFeel)cbLookAndFeel.getSelectedItem();\n prefs.putProperty(UserPrefs.APP_LOOK_FEEL, lf.getClassName());\n\n prefs.putProperty(UserPrefs.STATUS_MESSAGES, cbShowStatusMessages.isSelected());\n }",
"public HashMap<String, Object> getUserConfig() {\n return userConfig;\n }",
"public void printSettingsContents() {\n String fileName = \"collect.settings\";\n try {\n ClassLoader classLoader = getClass().getClassLoader();\n FileInputStream fin = new FileInputStream(\n classLoader.getResource(fileName).getFile());\n ObjectInputStream ois = new ObjectInputStream(fin);\n Map<?, ?> user_entries = (Map<?, ?>) ois.readObject();\n for (Map.Entry<?, ?> entry : user_entries.entrySet()) {\n Object v = entry.getValue();\n Object key = entry.getKey();\n System.out.println(\"user.\" + key.toString() + \"=\" + v.toString());\n }\n Map<?, ?> admin_entries = (Map<?, ?>) ois.readObject();\n for (Map.Entry<?, ?> entry : admin_entries.entrySet()) {\n Object v = entry.getValue();\n Object key = entry.getKey();\n System.out.println(\"admin.\" + key.toString() + \"=\" + v.toString());\n }\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }",
"int wkhtmltoimage_get_global_setting(PointerByReference settings, String name, ByteBuffer value, int vs);",
"public interface GeneralPreferenceHelper {\n String PREF_USER_NAME = \"pref_name_user\";\n String PREF_ENABLE_SOCIAL = \"pref_social_recomendation\";\n}",
"public IPreferenceStore getTextPreferenceStore() {\n return fPreferenceStore;\n }",
"public static SharedPreferences.Editor getSharedPrefsEditor() {\n return PreferencesUtils.getSharedPrefs().edit();\n }",
"public static PreferencesView createPreferencesView() {\n // Retrieve application preferences and attach them to their view\n // (This instance must be instanciated after dependencies)\n final LinkedHashMap<String, JPanel> panels = new LinkedHashMap<String, JPanel>(2);\n panels.put(\"General settings\", new PreferencePanel());\n\n final PreferencesView preferencesView = new PreferencesView(getFrame(), Preferences.getInstance(), panels);\n preferencesView.init();\n\n return preferencesView;\n }",
"private static SharedPreferences getSharedPreferences() {\n Context ctx = AppUtils.getAppContext();\n return ctx.getSharedPreferences(\"pref_user_session_data\", Context.MODE_PRIVATE);\n }",
"public final void updateGUIFromPrefs() {\n try {\n angleStepSizeSpinner_.setValue(Double.parseDouble(prefs_.get(PrefUtils.ANGLESTEPSIZE, \"0.0\")));\n startAngleField_.setText(prefs_.get(PrefUtils.STARTANGLE, \"\"));\n doubleZeroCheckBox_.setSelected(Boolean.parseBoolean(prefs_.get(PrefUtils.DOUBLEZERO, \"\")));\n saveImagesCheckBox_.setSelected(Boolean.parseBoolean(prefs_.get(PrefUtils.ACQSAVEIMAGES, \"\")));\n acqdirRootField_.setText(prefs_.get(PrefUtils.ACQDIRROOT, \"\"));\n acqnamePrefixField_.setText(prefs_.get(PrefUtils.ACQNAMEPREFIX, \"\"));\n String channelGroup = core_.getChannelGroup();\n prefs_.put(PrefUtils.CHANNEL, channelGroup + \": \" + core_.getCurrentConfig(channelGroup));\n coeff3Field_.setText(PrefUtils.parseCal(3, prefs_, gui_));\n coeff2Field_.setText(PrefUtils.parseCal(2, prefs_, gui_));\n coeff1Field_.setText(PrefUtils.parseCal(1, prefs_, gui_));\n coeff0Field_.setText(PrefUtils.parseCal(0, prefs_, gui_));\n channelField_.setText(prefs_.get(PrefUtils.CHANNEL,\"\"));\n } catch (Exception ex) {\n Logger.getLogger(AcquisitionPanel.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"String getFlashPref();",
"public static File getPreferencesDirectory() {\n\t\treturn PREFERENCES_DIRECTORY;\n\t}",
"public Properties storeSettings() {\r\n return mSettings.storeSettings();\r\n }"
]
| [
"0.6814523",
"0.6770192",
"0.6742717",
"0.6742717",
"0.6742717",
"0.6742717",
"0.6701116",
"0.66649663",
"0.65583646",
"0.6490545",
"0.6487666",
"0.6462761",
"0.63182724",
"0.63171756",
"0.62954676",
"0.6285168",
"0.62453854",
"0.6163197",
"0.6160784",
"0.6115528",
"0.6109718",
"0.609555",
"0.6083349",
"0.60722506",
"0.60677654",
"0.60561144",
"0.6038562",
"0.5985342",
"0.597366",
"0.59681344",
"0.59595907",
"0.59337544",
"0.5922549",
"0.589244",
"0.58919466",
"0.5876248",
"0.58616406",
"0.58599335",
"0.5857529",
"0.5854507",
"0.584624",
"0.583777",
"0.58368355",
"0.58345854",
"0.582585",
"0.58223945",
"0.579271",
"0.5786382",
"0.5772668",
"0.5750311",
"0.57365376",
"0.5720719",
"0.5717643",
"0.5682075",
"0.56591916",
"0.56535435",
"0.5648052",
"0.56376135",
"0.5626483",
"0.56237835",
"0.56193376",
"0.56167704",
"0.55697507",
"0.5567643",
"0.5558534",
"0.5551521",
"0.5550981",
"0.5547293",
"0.5532394",
"0.552903",
"0.5526639",
"0.5526639",
"0.5526639",
"0.5526639",
"0.5526639",
"0.5526639",
"0.5526639",
"0.5522949",
"0.552182",
"0.5511715",
"0.55094576",
"0.5499439",
"0.54941434",
"0.54925865",
"0.5468636",
"0.54685646",
"0.5465606",
"0.5457433",
"0.54519445",
"0.544148",
"0.54322433",
"0.54301846",
"0.54222995",
"0.54214644"
]
| 0.78347003 | 5 |
Sets the user prefs' GUI settings. | void setGuiSettings(GuiSettings guiSettings); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setSettings(UserPrefs prefs) {\n tfDataPath.setText(prefs.getProperty(UserPrefs.DATA_ROOT));\n // Save this for a comparison later\n existingDataPath = prefs.getProperty(UserPrefs.DATA_ROOT);\n\n String backup = prefs.getProperty(UserPrefs.BACKUP_FOLDER);\n // Nothing there, so add default based on username - this is OK\n if(backup == null || backup.length() == 0) {\n backup = DataFiler.getDefaultBackupFolder(prefs.getUserName());\n }\n tfBackupPath.setText(backup);\n\n cbBackUpOnExit.setSelected(prefs.getBooleanProperty(UserPrefs.BACKUP));\n\n tfNagSave.setText(prefs.getProperty(UserPrefs.SAVE_NAG_MINS));\n\n cbIncludeText.setSelected(prefs.getBooleanProperty(UserPrefs.MESSAGE_QUOTE));\n\n // L&F\n String lf = prefs.getProperty(UserPrefs.APP_LOOK_FEEL);\n cbLookAndFeel.setSelectedItem(lf);\n\n UIManager.LookAndFeelInfo[] systemLookAndFeels = UIManager.getInstalledLookAndFeels();\n for(int i = 0; i < systemLookAndFeels.length; i++) {\n if(systemLookAndFeels[i].getClassName().equals(lf)) {\n cbLookAndFeel.setSelectedIndex(i);\n break;\n }\n }\n\n cbShowStatusMessages.setSelected(prefs.getBooleanProperty(UserPrefs.STATUS_MESSAGES));\n }",
"public void setPreference() {\n prefs = Preferences.userRoot().node(this.getClass().getName());\n String ID1 = \"Test1\";\n String ID2 = \"Test2\";\n String ID3 = \"Test3\";\n// First we will get the values\n// Define a boolean value\n System.out.println(prefs.getBoolean(ID1, true));\n// Define a string with default \"Hello World\n System.out.println(prefs.get(ID2, \"Hello World\"));\n// Define a integer with default 50\n System.out.println(prefs.getInt(ID3, 50));\n// Now set the values\n prefs.putBoolean(ID1, false);\n prefs.put(ID2, \"Hello Europa\");\n prefs.putInt(ID3, 45);\n\t\t\n prefs.remove(ID1);// Delete the preference settings for the first value\n }",
"public void setUserPreferences(final BwPreferences val) {\n userPreferences = val;\n }",
"public void setPrefs(GamePreferences prefs) {\n\t\tthis.prefs = prefs;\n\t}",
"private static void changeSettings() {\n\t\t\n\t\tfinal Settings sett = config;\n\t\t\n\t\tfinal JDialog settingsDialog = new JDialog(frame, \"Change settings\");\n\t\t\n\t\tsettingsDialog.getContentPane().setLayout(new BorderLayout());\n\t\tsettingsDialog.setPreferredSize(new Dimension(350,150));\n\t\t\n\t\tJPanel settings = new JPanel();\n\t\tsettings.setLayout(new GridLayout(3,2));\n\t\t\n\t\tJLabel lblDB = new JLabel(\"Update DB dynamically\");\n\t\tJRadioButton rbDB = new JRadioButton();\n\t\trbDB.setSelected(sett.isUpdateDB());\n\t\trbDB.addItemListener(new ItemListener(){\n\n\t\t\t@Override\n\t\t\tpublic void itemStateChanged(ItemEvent e) {\n\t\t\t\tif(e.getStateChange() == ItemEvent.SELECTED){\n\t\t\t\t\tsett.setUpdateDB(true);\n\t\t\t\t} else if(e.getStateChange() == ItemEvent.DESELECTED){\n\t\t\t\t\tsett.setUpdateDB(false);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t});\t\t\n\t\tJLabel lblGUI = new JLabel(\"Use Graphical User Interface\");\n\t\tJRadioButton rbGUI = new JRadioButton();\n\t\trbGUI.setSelected(sett.isGUI());\n\t\trbGUI.addItemListener(new ItemListener() {\n\n\t\t\t@Override\n\t\t\tpublic void itemStateChanged(ItemEvent e) {\n\t\t\t\tif(e.getStateChange() == ItemEvent.SELECTED){\n\t\t\t\t\tsett.setGUI(true);\n\t\t\t\t} else if(e.getStateChange() == ItemEvent.DESELECTED){\n\t\t\t\t\tsett.setGUI(false);\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t});\n\t\t\n\t\tJLabel lblFile = new JLabel(\"Working file\");\n\t\tfinal JTextField tfFile = new JTextField(sett.getWorkingFile());\n\t\t\t\t\n\t\tsettings.add(lblDB);\n\t\tsettings.add(rbDB);\n\t\tsettings.add(lblGUI);\n\t\tsettings.add(rbGUI);\n\t\tsettings.add(lblFile);\n\t\tsettings.add(tfFile);\n\t\t\n\t\tJButton btnSave = new JButton(\"Save settings\");\n\t\tbtnSave.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tif(!saved) {\n\t\t \t\tint option = JOptionPane.showOptionDialog(frame,\n\t\t \t\t\t\t\"Updating the settings will reset the application\\nThere are unsaved changes\\nDo you want to save them now?\",\n\t\t \t\t\t\t\"Unsaved changes\",JOptionPane.YES_NO_CANCEL_OPTION,\n\t\t \t\t\t\tJOptionPane.WARNING_MESSAGE, null, null, 0);\n\t\t \t\tswitch(option) {\n\t\t \t\tcase 0:\n\t\t \t\t\ttoggleSaved(portfolio.save(WORKING_FILE));\n\t\t \t\tdefault:\n\t\t \t\t\tbreak; \t \t\t\n\t\t \t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tsett.setWorkingFile(tfFile.getText());\n\t\t\t\t\n\t\t\t\tsett.save();\n\t\t\t\tconfig = new Settings(sett);\n\t\t\t\tsettingsDialog.dispose();\n\t\t\t\t\n\t\t\t\tif(!sett.isGUI()){\n\t\t\t\t\tframe.dispose();\n\t\t\t\t\texit = false;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!sett.isUpdateDB()){\n\t\t\t\t\tportfolio.init(config.getWorkingFile());\n\t\t\t\t\tframe.setTitle(\"JProject v.\"+VERSION);\n\t\t\t\t\tbtnRestore.setEnabled(true);\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\tportfolio.initDB();\n\t\t\t\t\tframe.setTitle(\"JProject v.\"+VERSION+\" ** Linked to Database **\");\n\t\t\t\t\tbtnRestore.setEnabled(false);\n\t\t\t\t}\n\t\t\t\t\topTable.setModel((TableModel) new ProjectTableModel(portfolio.getOngoingProjects()));\n\t\t\t\t\tfpTable.setModel((TableModel) new ProjectTableModel(portfolio.getFinishedProjects()));\n\t\t\t\t\tsel.init(portfolio);\n\t\t\t\t\tupdateCounters();\n\t\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tsettingsDialog.add(settings, BorderLayout.CENTER);\n\t\tsettingsDialog.add(btnSave, BorderLayout.PAGE_END);\n\t\t\n\t\tsettingsDialog.pack();\n\t\tsettingsDialog.setVisible(true);\t\n\t}",
"void setSettings(ControlsSettings settings);",
"void setPreference(String user, String preferenceName, String value) throws OntimizeJEERuntimeException;",
"public void updateUserPrefs(UserPrefs prefs) {\n // Get the backup path in the Text Field\n String backup = tfBackupPath.getText().trim();\n\n // Nothing there, so add default based on username - this is OK\n if(backup.length() == 0) {\n backup = DataFiler.getDefaultBackupFolder(prefs.getUserName());\n }\n\n prefs.putProperty(UserPrefs.BACKUP_FOLDER, backup);\n\n prefs.putProperty(UserPrefs.BACKUP, cbBackUpOnExit.isSelected());\n prefs.putProperty(UserPrefs.SAVE_NAG_MINS, tfNagSave.getText().trim());\n\n try {\n int mins = Integer.parseInt(tfNagSave.getText().trim());\n MainFrame.getInstance().mainMenu.actionSave.setNagInterval(mins);\n }\n catch(Exception ex) {\n //MainFrame.getInstance().mainMenu.actionSave.setNagInterval(0);\n }\n\n prefs.putProperty(UserPrefs.MESSAGE_QUOTE, cbIncludeText.isSelected());\n\n LookAndFeel lf = (LookAndFeel)cbLookAndFeel.getSelectedItem();\n prefs.putProperty(UserPrefs.APP_LOOK_FEEL, lf.getClassName());\n\n prefs.putProperty(UserPrefs.STATUS_MESSAGES, cbShowStatusMessages.isSelected());\n }",
"private void setGUI()\r\n\t{\r\n\t\tbubblePB = setProgressBar(bubblePB);\r\n\t\tinsertionPB = setProgressBar(insertionPB);\r\n\t\tmergePB = setProgressBar(mergePB);\r\n\t\tquickPB = setProgressBar(quickPB);\r\n\t\tradixPB = setProgressBar(radixPB);\r\n\t\t\r\n\t\tsetLabels();\r\n\t\tsetPanel();\r\n\t\tsetLabels();\r\n\t\tsetFrame();\r\n\t}",
"void setGui(Gui gui);",
"private void showPreference(){\r\n if(userPreferencesForm == null) {\r\n userPreferencesForm = new UserPreferencesForm(mdiForm,true);\r\n }\r\n userPreferencesForm.loadUserPreferences(mdiForm.getUserId());\r\n userPreferencesForm.setUserName(mdiForm.getUserName());\r\n userPreferencesForm.display();\r\n }",
"private void setPreferences(Preferences preferences) {\n this.preferences = preferences;\n }",
"private void settings() {\n mainTitle = makeLabel(\"Settings\", true);\n add(mainTitle);\n add(content);\n add(diffSlider);\n add(colourChooser);\n add(mainB);//button to main menu\n diffSlider.requestFocus();\n }",
"private void setupSettingWindow()\n {\n setGUI.setWindowListener(new WindowListener() {\n @Override\n public void windowOpened(WindowEvent we) {\n }\n\n @Override\n public void windowClosing(WindowEvent we) {\n }\n\n @Override\n public void windowClosed(WindowEvent we) {\n player1Color = setGUI.getPlayer1Color();\n player2Color = setGUI.getPlayer2Color();\n }\n\n @Override\n public void windowIconified(WindowEvent we) {\n }\n\n @Override\n public void windowDeiconified(WindowEvent we) {\n }\n\n @Override\n public void windowActivated(WindowEvent we) {\n }\n\n @Override\n public void windowDeactivated(WindowEvent we) {\n }\n });\n }",
"private void settings() {\n\n\t\tthis.addWindowListener(controller);\n\t\tthis.setVisible(true);\n\t\tthis.setSize(1000, 660);\n\t\tthis.validate();\n\t\tthis.repaint();\n\n\t}",
"public DeveloperPrefsPanel(DeveloperPreferences prefs) {\n\t\tthis.prefs = prefs;\n\t\tinitComponents();\n\t}",
"public void settings() {\n btSettings().push();\n }",
"public final void updateGUIFromPrefs() {\n try {\n angleStepSizeSpinner_.setValue(Double.parseDouble(prefs_.get(PrefUtils.ANGLESTEPSIZE, \"0.0\")));\n startAngleField_.setText(prefs_.get(PrefUtils.STARTANGLE, \"\"));\n doubleZeroCheckBox_.setSelected(Boolean.parseBoolean(prefs_.get(PrefUtils.DOUBLEZERO, \"\")));\n saveImagesCheckBox_.setSelected(Boolean.parseBoolean(prefs_.get(PrefUtils.ACQSAVEIMAGES, \"\")));\n acqdirRootField_.setText(prefs_.get(PrefUtils.ACQDIRROOT, \"\"));\n acqnamePrefixField_.setText(prefs_.get(PrefUtils.ACQNAMEPREFIX, \"\"));\n String channelGroup = core_.getChannelGroup();\n prefs_.put(PrefUtils.CHANNEL, channelGroup + \": \" + core_.getCurrentConfig(channelGroup));\n coeff3Field_.setText(PrefUtils.parseCal(3, prefs_, gui_));\n coeff2Field_.setText(PrefUtils.parseCal(2, prefs_, gui_));\n coeff1Field_.setText(PrefUtils.parseCal(1, prefs_, gui_));\n coeff0Field_.setText(PrefUtils.parseCal(0, prefs_, gui_));\n channelField_.setText(prefs_.get(PrefUtils.CHANNEL,\"\"));\n } catch (Exception ex) {\n Logger.getLogger(AcquisitionPanel.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"private void showUserPreferences() {\r\n MyAccount ma = state.getMyAccount();\r\n \r\n mOriginName.setValue(ma.getOriginName());\r\n SharedPreferencesUtil.showListPreference(this, MyAccount.Builder.KEY_ORIGIN_NAME, R.array.origin_system_entries, R.array.origin_system_entries, R.string.summary_preference_origin_system);\r\n mOriginName.setEnabled(!ma.isPersistent());\r\n \r\n if (mEditTextUsername.getText() == null\r\n || ma.getUsername().compareTo(mEditTextUsername.getText()) != 0) {\r\n mEditTextUsername.setText(ma.getUsername());\r\n }\r\n StringBuilder summary = new StringBuilder(this.getText(R.string.summary_preference_username));\r\n if (ma.getUsername().length() > 0) {\r\n summary.append(\": \" + ma.getUsername());\r\n } else {\r\n summary.append(\": (\" + this.getText(R.string.not_set) + \")\");\r\n }\r\n mEditTextUsername.setSummary(summary);\r\n mEditTextUsername.setEnabled(ma.canSetUsername());\r\n\r\n if (ma.isOAuth() != mOAuth.isChecked()) {\r\n mOAuth.setChecked(ma.isOAuth());\r\n }\r\n // In fact, we should hide it if not enabled, but I couldn't find an easy way for this...\r\n mOAuth.setEnabled(ma.canChangeOAuth());\r\n\r\n if (mEditTextPassword.getText() == null\r\n || ma.getPassword().compareTo(mEditTextPassword.getText()) != 0) {\r\n mEditTextPassword.setText(ma.getPassword());\r\n }\r\n summary = new StringBuilder(this.getText(R.string.summary_preference_password));\r\n if (TextUtils.isEmpty(ma.getPassword())) {\r\n summary.append(\": (\" + this.getText(R.string.not_set) + \")\");\r\n }\r\n mEditTextPassword.setSummary(summary);\r\n mEditTextPassword.setEnabled(ma.getConnection().isPasswordNeeded());\r\n\r\n int titleResId;\r\n switch (ma.getCredentialsVerified()) {\r\n case SUCCEEDED:\r\n titleResId = R.string.title_preference_verify_credentials;\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_verify_credentials));\r\n break;\r\n default:\r\n if (ma.isPersistent()) {\r\n titleResId = R.string.title_preference_verify_credentials_failed;\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_verify_credentials_failed));\r\n } else {\r\n titleResId = R.string.title_preference_add_account;\r\n if (ma.isOAuth()) {\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_add_account_oauth));\r\n } else {\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_add_account_basic));\r\n }\r\n }\r\n break;\r\n }\r\n mVerifyCredentials.setTitle(titleResId);\r\n mVerifyCredentials.setSummary(summary);\r\n mVerifyCredentials.setEnabled(ma.isOAuth() || ma.getCredentialsPresent());\r\n }",
"public void setUserPreferences (int outdoorPref, int nightlifePref, int hotelPref, int shoppingPref, int restaurantPref) {\n\t\tpreferences.clear(); \n\t\tpreferences.add(outdoorPref); \n\t\tpreferences.add(nightlifePref); \n\t\tpreferences.add(hotelPref); \n\t\tpreferences.add(shoppingPref); \n\t\tpreferences.add(restaurantPref); \n\t}",
"private void changeUIdefaults() {\n\t\tUIManager.put(\"TaskPaneContainer.useGradient\", Boolean.FALSE);\n\t\tUIManager.put(\"TaskPaneContainer.background\",\n\t\t\t\tColors.LightGray.color(0.5f));\n\n\t\t// setting taskpane defaults\n\t\tUIManager.put(\"TaskPane.font\", new FontUIResource(new Font(\"Verdana\",\n\t\t\t\tFont.BOLD, 16)));\n\t\tUIManager.put(\"TaskPane.titleBackgroundGradientStart\",\n\t\t\t\tColors.White.color());\n\t\tUIManager.put(\"TaskPane.titleBackgroundGradientEnd\",\n\t\t\t\tColors.LightBlue.color());\n\t}",
"private void preferences() {\n final Preferences prefs = Preferences.userNodeForPackage(DesktopPane.class);\n final JFileChooser chooser = new JFileChooser(prefs.get(SCREENSHOT_DIRECTORY_PREFS, null));\n chooser.setDialogTitle(\"Output directory for screenshots\");\n chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n switch (chooser.showOpenDialog(this)) {\n case JFileChooser.APPROVE_OPTION: {\n final File directory = chooser.getSelectedFile();\n if (directory != null) {\n prefs.put(SCREENSHOT_DIRECTORY_PREFS, directory.getPath());\n }\n break;\n }\n }\n }",
"public void saveUserSettings() {\n\t}",
"private void showUserSettings() {\n\t\tSharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);\n\t\tStringBuilder builder = new StringBuilder();\n\t\tbuilder.append(\"\\n Send report:\"+ sharedPrefs.getBoolean(\"prefSendReport\", true));\n\t}",
"GuiSettings getGuiSettings();",
"GuiSettings getGuiSettings();",
"GuiSettings getGuiSettings();",
"GuiSettings getGuiSettings();",
"GuiSettings getGuiSettings();",
"GuiSettings getGuiSettings();",
"GuiSettings getGuiSettings();",
"private void initialize() {\n\t\tfrmSettings = new JFrame();\n\t\tfrmSettings.setTitle(\"Settings\");\n\t\tfrmSettings.setBounds(100, 100, 594, 420);\n\t\tfrmSettings.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t\tfrmSettings.getContentPane().setLayout(null);\n\n\t\tJLabel lblSettings = new JLabel(\"Check the appropriate checkbox to change the values\");\n\t\tlblSettings.setBounds(10, 8, 558, 14);\n\t\tfrmSettings.getContentPane().add(lblSettings);\n\n\t\tstorage_panel = new JPanel();\n\t\tstorage_panel.setBorder(new TitledBorder(UIManager.getBorder(\"TitledBorder.border\"), \"Storage\",\n\t\t\t\tTitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));\n\t\tstorage_panel.setBounds(20, 33, 548, 65);\n\t\tfrmSettings.getContentPane().add(storage_panel);\n\t\tstorage_panel.setLayout(null);\n\n\t\tJLabel lblDefaultPathfor = new JLabel(\"Default path (for reports):\");\n\t\tlblDefaultPathfor.setBounds(10, 27, 149, 14);\n\t\tstorage_panel.add(lblDefaultPathfor);\n\n\t\treport_path = new JTextField();\n\t\treport_path.setText(AppConfigInfo.getDefaultStorage());\n\t\treport_path.setBounds(171, 23, 367, 20);\n\t\tstorage_panel.add(report_path);\n\t\treport_path.setColumns(10);\n\n\t\twork_hours_panel = new JPanel();\n\t\twork_hours_panel.setBorder(new TitledBorder(UIManager.getBorder(\"TitledBorder.border\"), \"Work-hours\",\n\t\t\t\tTitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));\n\t\twork_hours_panel.setBounds(20, 112, 548, 90);\n\t\tfrmSettings.getContentPane().add(work_hours_panel);\n\t\twork_hours_panel.setLayout(null);\n\n\t\tJLabel lblNewLabel = new JLabel(\"Full-day hours (hh:mm:ss):\");\n\t\tlblNewLabel.setBounds(10, 26, 161, 14);\n\t\twork_hours_panel.add(lblNewLabel);\n\n\t\tJLabel lblHalfdayHours = new JLabel(\"Half-day hours (hh:mm:ss):\");\n\t\tlblHalfdayHours.setBounds(10, 54, 161, 14);\n\t\twork_hours_panel.add(lblHalfdayHours);\n\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"HH:mm:ss\");\n\t\tDate df = new Date(), dh = new Date();\n\t\ttry {\n\t\t\tdf = sdf.parse(AppConfigInfo.getFullWorkingHours());\n\t\t\tdh = sdf.parse(AppConfigInfo.getHalfWorkingHours());\n\t\t} catch (Exception ex) {\n\n\t\t}\n\t\tfull_day_spinner = new JSpinner(new SpinnerDateModel());\n\t\tfull_day_spinner.setEditor(new JSpinner.DateEditor(full_day_spinner, sdf.toPattern()));\n\t\tfull_day_spinner.setValue(df);\n\t\tfull_day_spinner.setBounds(171, 23, 122, 20);\n\t\twork_hours_panel.add(full_day_spinner);\n\n\t\thalf_day_spinner = new JSpinner(new SpinnerDateModel());\n\t\thalf_day_spinner.setEditor(new JSpinner.DateEditor(half_day_spinner, sdf.toPattern()));\n\t\thalf_day_spinner.setValue(dh);\n\t\thalf_day_spinner.setBounds(171, 51, 122, 20);\n\t\twork_hours_panel.add(half_day_spinner);\n\n\t\tadmin_profile_panel = new JPanel();\n\t\tadmin_profile_panel.setBorder(new TitledBorder(UIManager.getBorder(\"TitledBorder.border\"), \"Admin profile\",\n\t\t\t\tTitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));\n\t\tadmin_profile_panel.setBounds(20, 211, 548, 123);\n\t\tfrmSettings.getContentPane().add(admin_profile_panel);\n\t\tadmin_profile_panel.setLayout(null);\n\n\t\tlblNewLabel_1 = new JLabel(\"Existing password:\");\n\t\tlblNewLabel_1.setBounds(10, 28, 151, 14);\n\t\tadmin_profile_panel.add(lblNewLabel_1);\n\n\t\tlblNewPassword = new JLabel(\"New password:\");\n\t\tlblNewPassword.setBounds(10, 54, 151, 14);\n\t\tadmin_profile_panel.add(lblNewPassword);\n\n\t\tlblReenterPassword = new JLabel(\"Re-enter password:\");\n\t\tlblReenterPassword.setBounds(10, 79, 151, 14);\n\t\tadmin_profile_panel.add(lblReenterPassword);\n\n\t\texisting_password = new JPasswordField();\n\t\texisting_password.setBounds(171, 25, 159, 20);\n\t\tadmin_profile_panel.add(existing_password);\n\n\t\tnew_password = new JPasswordField();\n\t\tnew_password.setBounds(171, 51, 159, 20);\n\t\tadmin_profile_panel.add(new_password);\n\n\t\tre_entered_password = new JPasswordField();\n\t\tre_entered_password.addKeyListener(new KeyAdapter() {\n\t\t\t@Override\n\t\t\tpublic void keyReleased(KeyEvent e) {\n\t\t\t\tif (!re_entered_password.getText().equals(new_password.getText())) {\n\t\t\t\t\tpassword_status_label.setText(\"Password does not match.\");\n\t\t\t\t} else if (re_entered_password.getText().equals(new_password.getText())) {\n\t\t\t\t\tpassword_status_label.setText(\"\");\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\t\tre_entered_password.setBounds(171, 76, 159, 20);\n\t\tadmin_profile_panel.add(re_entered_password);\n\n\t\tpassword_status_label = new JLabel(\"\");\n\t\tpassword_status_label.setBounds(340, 79, 198, 14);\n\t\tadmin_profile_panel.add(password_status_label);\n\n\t\tstorage_check = new JCheckBox(\"\");\n\t\tstorage_check.addChangeListener(new ChangeListener() {\n\t\t\tpublic void stateChanged(ChangeEvent e) {\n\t\t\t\tif (storage_check.isSelected()) {\n\t\t\t\t\tstorage_panel.setEnabled(true);\n\t\t\t\t\tenableReportPanelFields();\n\t\t\t\t} else {\n\t\t\t\t\tstorage_panel.setEnabled(false);\n\t\t\t\t\tdisableReportPanelFields();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tstorage_check.setBounds(0, 56, 21, 23);\n\t\tfrmSettings.getContentPane().add(storage_check);\n\n\t\twork_hours_check = new JCheckBox(\"\");\n\t\twork_hours_check.addChangeListener(new ChangeListener() {\n\t\t\tpublic void stateChanged(ChangeEvent e) {\n\t\t\t\tif (work_hours_check.isSelected()) {\n\t\t\t\t\twork_hours_panel.setEnabled(true);\n\t\t\t\t\tenableWorkHourPanelFields();\n\t\t\t\t} else {\n\t\t\t\t\twork_hours_panel.setEnabled(false);\n\t\t\t\t\tdisableWorkHourPanelFields();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\twork_hours_check.setBounds(0, 149, 21, 23);\n\t\tfrmSettings.getContentPane().add(work_hours_check);\n\n\t\tadmin_profile_check = new JCheckBox(\"\");\n\t\tadmin_profile_check.addChangeListener(new ChangeListener() {\n\t\t\tpublic void stateChanged(ChangeEvent e) {\n\t\t\t\tif (admin_profile_check.isSelected()) {\n\t\t\t\t\tadmin_profile_panel.setEnabled(true);\n\t\t\t\t\tenableAdminProfilePanelFields();\n\t\t\t\t} else {\n\t\t\t\t\tadmin_profile_panel.setEnabled(false);\n\t\t\t\t\tdisableAdminProfilePanelFields();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tadmin_profile_check.setBounds(0, 263, 21, 23);\n\t\tfrmSettings.getContentPane().add(admin_profile_check);\n\n\t\tapply_button = new JButton(\"Apply\");\n\t\tapply_button.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t\tif (storage_check.isSelected()) {\n\t\t\t\t\tif (report_path.getText().equals(\"\")) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(frmSettings, \"Please enter the storage path.\", \"Error\",\n\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\t} else {\n\t\t\t\t\t\treport_status = UpdateAppSettings.updateStoragePath(report_path.getText());\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (work_hours_check.isSelected()) {\n\t\t\t\t\tif (full_day_spinner.getValue().toString().equals(\"\")) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(frmSettings, \"Please enter the full day hours.\", \"Error\",\n\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\t} else if (half_day_spinner.getValue().toString().equals(\"\")) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(frmSettings, \"Please enter the half day hours.\", \"Error\",\n\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\t} else {\n\t\t\t\t\t\twork_hours_status = UpdateAppSettings.updateWorkigHours((Date) full_day_spinner.getValue(),\n\t\t\t\t\t\t\t\t(Date) half_day_spinner.getValue());\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (admin_profile_check.isSelected()) {\n\t\t\t\t\tif (existing_password.getText().equals(\"\")) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(frmSettings, \"Please enter your existing password.\", \"Error\",\n\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\t} else if (new_password.getText().equals(\"\")) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(frmSettings, \"Please enter new password.\", \"Error\",\n\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\t} else if (re_entered_password.getText().equals(\"\")) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(frmSettings, \"Please re-enter new password.\", \"Error\",\n\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\t} else if (!new_password.getText().equals(re_entered_password.getText())) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(frmSettings, \"Re-entered password does not match.\", \"Error\",\n\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\t} else if (re_entered_password.getText().equals(existing_password.getText())) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(frmSettings,\n\t\t\t\t\t\t\t\t\"New password cannot be same as the existing password.\", \"Error\",\n\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tadmin_password_status = UpdateAppSettings.updateAdminPassword(existing_password.getText(),\n\t\t\t\t\t\t\t\tre_entered_password.getText());\n\t\t\t\t\t\tif (!admin_password_status) {\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(frmSettings, \"Wrong password entered.\", \"Error\",\n\t\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (report_status || work_hours_status || admin_password_status) {\n\t\t\t\t\tJOptionPane.showMessageDialog(frmSettings, \"Settings applied successfully.\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tapply_button.setBounds(239, 348, 89, 23);\n\t\tfrmSettings.getContentPane().add(apply_button);\n\n\t\tlabel = new JLabel(\"\\u00A9 Copyright 2017. Saraswat Infotech Ltd\");\n\t\tlabel.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tlabel.setFont(new Font(\"Tahoma\", Font.PLAIN, 9));\n\t\tlabel.setBounds(363, 368, 205, 14);\n\t\tfrmSettings.getContentPane().add(label);\n\t}",
"public void handlePreferences() {\n displayPrefs ();\n }",
"private void showUserSettings() {\n\t\t\tSharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);\n\t\t\tStringBuilder builder = new StringBuilder();\n\t\t\tbuilder.append(\"\\n Send report:\"+ sharedPrefs.getBoolean(\"prefSendReport\", true));\n\t\t}",
"public void setPreferences(Preferences preferences) {\n\n this.preferences = preferences;\n }",
"protected void showMineSettings() {\r\n settingsFrame.setLocation( scorePanel.getLocationOnScreen() );\r\n settingsFrame.setVisible( true );\r\n }",
"public PreferencesDialog (JFrame owner)\n {\n this (owner, \"OPENMARKOV User Preferences\",\n OpenMarkovPreferences.OPENMARKOV_NODE_PREFERENCES, true/*\n * ,\n * OpenMarkovPreferences\n * .\n * OPENMARKOV_KERNEL_PREFERENCES\n * , false\n */);\n }",
"private void settings() {\n\t\tthis.setVisible(true);\n\t\tthis.setSize(800,200);\n\t}",
"private void showUserPreferences() {\r\n MyAccount ma = state.getAccount();\r\n \r\n mOriginName.setValue(ma.getOriginName());\r\n SharedPreferencesUtil.showListPreference(this, MyAccount.Builder.KEY_ORIGIN_NAME, R.array.origin_system_entries, R.array.origin_system_entries, R.string.summary_preference_origin_system);\r\n \r\n mOriginName.setEnabled(!state.builder.isPersistent() && TextUtils.isEmpty(ma.getUsername()));\r\n \r\n if (mEditTextUsername.getText() == null\r\n || ma.getUsername().compareTo(mEditTextUsername.getText()) != 0) {\r\n mEditTextUsername.setText(ma.getUsername());\r\n }\r\n StringBuilder summary;\r\n if (ma.getUsername().length() > 0) {\r\n summary = new StringBuilder(ma.getUsername());\r\n } else {\r\n summary = new StringBuilder(this.getText(ma.alternativeTermForResourceId(R.string.summary_preference_username)));\r\n }\r\n mEditTextUsername.setDialogTitle(this.getText(ma.alternativeTermForResourceId(R.string.dialog_title_preference_username)));\r\n mEditTextUsername.setTitle(this.getText(ma.alternativeTermForResourceId(R.string.title_preference_username)));\r\n mEditTextUsername.setSummary(summary);\r\n mEditTextUsername.setEnabled(!state.builder.isPersistent() && !ma.isUsernameValidToStartAddingNewAccount());\r\n \r\n boolean isNeeded = ma.canChangeOAuth();\r\n if (ma.isOAuth() != mOAuth.isChecked()) {\r\n mOAuth.setChecked(ma.isOAuth());\r\n }\r\n // In fact, we should hide it if not enabled, but I couldn't find an easy way for this...\r\n mOAuth.setEnabled(isNeeded);\r\n if (isNeeded) {\r\n mOAuth.setTitle(R.string.title_preference_oauth);\r\n mOAuth.setSummary(ma.isOAuth() ? R.string.summary_preference_oauth_on : R.string.summary_preference_oauth_off);\r\n } else {\r\n mOAuth.setTitle(\"\");\r\n mOAuth.setSummary(\"\");\r\n }\r\n \r\n isNeeded = ma.getConnection().isPasswordNeeded();\r\n if (mEditTextPassword.getText() == null\r\n || ma.getPassword().compareTo(mEditTextPassword.getText()) != 0) {\r\n mEditTextPassword.setText(ma.getPassword());\r\n }\r\n if (isNeeded) {\r\n mEditTextPassword.setTitle(R.string.title_preference_password);\r\n summary = new StringBuilder(this.getText(R.string.summary_preference_password));\r\n if (TextUtils.isEmpty(ma.getPassword())) {\r\n summary.append(\": (\" + this.getText(R.string.not_set) + \")\");\r\n }\r\n } else {\r\n summary = null;\r\n mEditTextPassword.setTitle(\"\");\r\n }\r\n mEditTextPassword.setSummary(summary);\r\n mEditTextPassword.setEnabled(isNeeded);\r\n \r\n int titleResId;\r\n boolean addAccountOrVerifyCredentialsEnabled = ma.isOAuth() || ma.getCredentialsPresent();\r\n switch (ma.getCredentialsVerified()) {\r\n case SUCCEEDED:\r\n titleResId = R.string.title_preference_verify_credentials;\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_verify_credentials));\r\n break;\r\n default:\r\n if (state.builder.isPersistent()) {\r\n titleResId = R.string.title_preference_verify_credentials_failed;\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_verify_credentials_failed));\r\n } else {\r\n if (!ma.isUsernameValidToStartAddingNewAccount()) {\r\n addAccountOrVerifyCredentialsEnabled = false;\r\n }\r\n titleResId = R.string.title_preference_add_account;\r\n if (ma.isOAuth()) {\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_add_account_oauth));\r\n } else {\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_add_account_basic));\r\n }\r\n }\r\n break;\r\n }\r\n addAccountOrVerifyCredentials.setTitle(titleResId);\r\n addAccountOrVerifyCredentials.setSummary(summary);\r\n addAccountOrVerifyCredentials.setEnabled(addAccountOrVerifyCredentialsEnabled);\r\n }",
"private void setupSimplePreferencesScreen() {\n if (!isSimplePreferences(this)) {\n return;\n }\n\n // In the simplified UI, fragments are not used at all and we instead\n // use the older PreferenceActivity APIs.\n\n // Add 'general' preferences.\n addPreferencesFromResource(R.xml.pref_general);\n\n // Bind the summaries of EditText/List/Dialog/Ringtone preferences to\n // their values. When their values change, their summaries are updated\n // to reflect the new value, per the Android Design guidelines.\n bindPreferenceSummaryToValue(findPreference(\"pref_favColor\"));\n }",
"public void setUserSettings(UserSettings userSettings) {\n\t\tthis.userSettings = userSettings;\n\t}",
"private void setupSharedPreferences() {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);\n\n String aaString = sharedPreferences.getString(getString(R.string.pref_antalAktier_key), getString(R.string.pref_antalAktier_default));\n// float aaFloat = Float.parseFloat(aaString);\n editTextAntalAktier.setText(aaString);\n\n String kk = sharedPreferences.getString(getString(R.string.pref_koebskurs_key), getString(R.string.pref_koebskurs__default));\n editTextKoebskurs.setText(kk);\n\n String k = sharedPreferences.getString(getString(R.string.pref_kurtage_key), getString(R.string.pref_kurtage_default));\n editTextKurtage.setText(k);\n\n// float minSize = Float.parseFloat(sharedPreferences.getString(getString(R.string.pref_size_key),\n// getString(R.string.pref_size_default)));\n// mVisualizerView.setMinSizeScale(minSize);\n\n // Register the listener\n sharedPreferences.registerOnSharedPreferenceChangeListener(this);\n }",
"private void settings() {\n\t\tIntent intent = new Intent(this, ActivitySettings.class);\n\t\tstartActivity(intent);\n\t}",
"private void setupSimplePreferencesScreen() {\n if (!isSimplePreferences(this)) {\n return;\n }\n\n addPreferencesFromResource(R.xml.pref_empty);\n\n addHeader(R.string.pref_header_game);\n addPreferencesFromResource(R.xml.pref_game);\n this.gameModeSettingsPreferenceScreen = getPreferenceScreen();\n\n addHeader(R.string.pref_header_other);\n addPreferencesFromResource(R.xml.pref_other);\n\n Preference key_game_mode_summary = findPreference(getResources().getString(R.string.key_game_mode_summary));\n this.key_game_mode_summary = key_game_mode_summary;\n\n Preference useCodePreference = findPreference(getResources().getString(R.string.key_use_code));\n this.useCodePreference = useCodePreference;\n useCodePreference.setOnPreferenceChangeListener(USE_CODE_PREFERENCE_LISTENER);\n\n Preference customWidthPreference = findPreference(getResources().getString(R.string.key_custom_maze_width));\n customWidthPreference.setSummary(String.valueOf(getCustomMazeWidth()));\n this.customWidthPreference = customWidthPreference;\n customWidthPreference.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {\n @Override\n public boolean onPreferenceChange(Preference preference, Object value) {\n try {\n int width = Math.min(Math.max(Integer.parseInt(value.toString()), getResources().getInteger(R.integer.min_custom_maze_size)), getResources().getInteger(R.integer.max_custom_maze_size));\n synchronized (SettingsActivity.class) {\n SettingsActivity.customMazeWidth = width;\n }\n preference.setSummary(String.valueOf(width));\n } catch (NumberFormatException e) {\n }\n return true;\n }\n });\n Preference customHeightPreference = findPreference(getResources().getString(R.string.key_custom_maze_height));\n customHeightPreference.setSummary(String.valueOf(getCustomMazeHeight()));\n this.customHeightPreference = customHeightPreference;\n customHeightPreference.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {\n @Override\n public boolean onPreferenceChange(Preference preference, Object value) {\n try {\n int height = Math.min(Math.max(Integer.parseInt(value.toString()), getResources().getInteger(R.integer.min_custom_maze_size)), getResources().getInteger(R.integer.max_custom_maze_size));\n synchronized (SettingsActivity.class) {\n SettingsActivity.customMazeHeight = height;\n }\n preference.setSummary(String.valueOf(height));\n } catch (NumberFormatException e) {\n }\n return true;\n }\n });\n Preference customCreatePreference = findPreference(getResources().getString(R.string.key_custom_maze_create));\n this.customCreatePreference = customCreatePreference;\n customCreatePreference.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {\n @Override\n public boolean onPreferenceClick(Preference preference) {\n Maze2D.GeneratedMaze maze = generateCustomMaze(SettingsActivity.this);\n synchronized (SettingsActivity.class) {\n SettingsActivity.loadSeedMaze = maze;\n }\n if (maze != null) {\n SettingsActivity.this.finish();\n }\n return true;\n }\n });\n Preference customSolvePreference = findPreference(getResources().getString(R.string.key_custom_maze_solve));\n this.customSolvePreference = customSolvePreference;\n customSolvePreference.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {\n @Override\n public boolean onPreferenceClick(Preference preference) {\n synchronized (SettingsActivity.class) {\n SettingsActivity.showSolution = true;\n }\n SettingsActivity.this.finish();\n return true;\n }\n });\n Preference regularCreatePreference = findPreference(getResources().getString(R.string.key_maze_create));\n this.regularCreatePreference = regularCreatePreference;\n regularCreatePreference.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {\n @Override\n public boolean onPreferenceClick(Preference preference) {\n if (MainActivity.getGameMode() == GameMode.REGULAR) {\n synchronized (SettingsActivity.class) {\n SettingsActivity.newRegularMaze = true;\n }\n } else {\n synchronized (SettingsActivity.class) {\n SettingsActivity.newFillMaze = true;\n }\n }\n SettingsActivity.this.finish();\n return true;\n }\n });\n\n ListPreference algorithmPreference = (ListPreference) findPreference(getResources().getString(R.string.key_algorithm));\n this.algorithmPreference = algorithmPreference;\n\n // Bind the summaries of EditText/List/Dialog/Ringtone preferences to\n // their values. When their values change, their summaries are updated\n // to reflect the new value, per the Android Design guidelines.\n ListPreference gameModePreference = (ListPreference) findPreference(getResources().getString(R.string.key_game_mode));\n this.gamePreference = gameModePreference;\n bindPreferenceSummaryToValue(gameModePreference);\n String[] names = GameMode.getNames(this);\n gameModePreference.setEntries(names);\n gameModePreference.setEntryValues(names);\n GameMode gameMode = MainActivity.getGameMode();\n if (gameMode != null) {\n gameModePreference.setValueIndex(gameMode.getID());\n }\n\n bindPreferenceSummaryToValue(algorithmPreference);\n names = MazeAlgorithm.getNames(this, true);\n algorithmPreference.setEntries(names);\n algorithmPreference.setEntryValues(names);\n MazeAlgorithm algorithm = MainActivity.getAlgorithm();\n if (algorithm != null) {\n algorithmPreference.setDefaultValue(algorithm.getLocalName(this));\n }\n\n SwitchPreference showTracerPreference = (SwitchPreference) findPreference(getResources().getString(R.string.key_show_tracer));\n showTracerPreference.setOnPreferenceChangeListener(TOGGLE_TRACER_PREFERENCE_LISTENER);\n showTracerPreference.setDefaultValue(MainActivity.toggleTracer());\n\n SwitchPreference squareCellsPreference = (SwitchPreference) findPreference(getResources().getString(R.string.key_square_cells));\n squareCellsPreference.setOnPreferenceChangeListener(SQUARE_CELLS_PREFERENCE_LISTENER);\n squareCellsPreference.setDefaultValue(MainActivity.squareCells());\n\n Preference recalibratePreference = findPreference(getResources().getString(R.string.key_recalibrate));\n recalibratePreference.setOnPreferenceClickListener(RECALIBRATE_PREFERENCE_LISTENER);\n\n Preference defaultTiltPreference = findPreference(getResources().getString(R.string.key_default_tilt));\n defaultTiltPreference.setOnPreferenceClickListener(DEFAULT_TILT_PREFERENCE_LISTENER);\n\n prepareGameModeGUI(MainActivity.getGameMode());\n }",
"private void setupSharedPreferences() {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);\n\n //set the driver name and track variables using methods below, which are also called from onSharedPreferencesChanged\n setDriver(sharedPreferences);\n setTrack(sharedPreferences);\n }",
"private void setPrefs( File build_file ) {\n if ( _settings != null )\n _settings.load( build_file );\n else\n _settings = new OptionSettings( build_file );\n _prefs = _settings.getPrefs();\n }",
"protected void setWindowDefaultSize(UserPrefs prefs) {\n primaryStage.setHeight(prefs.getGuiSettings().getWindowHeight());\n primaryStage.setWidth(prefs.getGuiSettings().getWindowWidth());\n if (prefs.getGuiSettings().getWindowCoordinates() != null) {\n primaryStage.setX(prefs.getGuiSettings().getWindowCoordinates().getX());\n primaryStage.setY(prefs.getGuiSettings().getWindowCoordinates().getY());\n }\n }",
"private void initGui() {\n initSeekBar();\n initDateFormatSpinner();\n GuiHelper.defineButtonOnClickListener(view, R.id.settings_buttonSave, this);\n\n }",
"private void saveSettings() {\n \tLog.i(\"T4Y-Settings\", \"Save mobile settings\");\n \t\n \tmobileSettings.setAllowAutoSynchronization(autoSynchronizationCheckBox.isChecked());\n mobileSettings.setAllowAutoScan(autoScanCheckBox.isChecked());\n mobileSettings.setAllowAutoSMSNotification(autoSMSNotificationCheckBox.isChecked());\n \n \tmainApplication.setMobileSettings(mobileSettings);\n }",
"public void setGUIManager(GUIManager guiManager)\r\n {\r\n mGUIManager = guiManager;\r\n }",
"private void updateSetupGUI() {\n\t\tif (isLoggedIn == false) {\n\t\t\trestoreGameLabel.setVisible(false);\n\t\t\trestoreGameButton.setVisible(false);\n\t\t\tcreateAccountButton.setVisible(true);\n\t\t\tcreateAccountLabel.setVisible(true);\n\t\t\tseparator_1.setVisible(true);\n\t\t} else {\n\t\t\tcreateAccountButton.setVisible(false);\n\t\t\tcreateAccountLabel.setVisible(false);\n\t\t\tseparator_1.setVisible(false);\n\t\t\trestoreGameLabel.setVisible(true);\n\t\t\trestoreGameButton.setVisible(true);\n\t\t}\n\t}",
"private void configureUI() {\r\n // UIManager.put(\"ToolTip.hideAccelerator\", Boolean.FALSE);\r\n\r\n Options.setDefaultIconSize(new Dimension(18, 18));\r\n\r\n Options.setUseNarrowButtons(settings.isUseNarrowButtons());\r\n\r\n // Global options\r\n Options.setTabIconsEnabled(settings.isTabIconsEnabled());\r\n UIManager.put(Options.POPUP_DROP_SHADOW_ENABLED_KEY,\r\n settings.isPopupDropShadowEnabled());\r\n\r\n // Swing Settings\r\n LookAndFeel selectedLaf = settings.getSelectedLookAndFeel();\r\n if (selectedLaf instanceof PlasticLookAndFeel) {\r\n PlasticLookAndFeel.setPlasticTheme(settings.getSelectedTheme());\r\n PlasticLookAndFeel.setTabStyle(settings.getPlasticTabStyle());\r\n PlasticLookAndFeel.setHighContrastFocusColorsEnabled(\r\n settings.isPlasticHighContrastFocusEnabled());\r\n } else if (selectedLaf.getClass() == MetalLookAndFeel.class) {\r\n MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());\r\n }\r\n\r\n // Work around caching in MetalRadioButtonUI\r\n JRadioButton radio = new JRadioButton();\r\n radio.getUI().uninstallUI(radio);\r\n JCheckBox checkBox = new JCheckBox();\r\n checkBox.getUI().uninstallUI(checkBox);\r\n\r\n try {\r\n UIManager.setLookAndFeel(selectedLaf);\r\n } catch (Exception e) {\r\n System.out.println(\"Can't change L&F: \" + e);\r\n }\r\n\r\n }",
"public void setupGUI(){\n //home button\n homeBtn = (ImageButton) findViewById(R.id.home_button);\n homeBtn.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n goToHome();\n }\n });\n\n sharedpreferences = getSharedPreferences(savedColor, Context.MODE_PRIVATE);\n\n int value1 = sharedpreferences.getInt(\"value1\", 0);\n int value2 = sharedpreferences.getInt(\"value2\", 0);\n int value3 = sharedpreferences.getInt(\"value3\", 0);\n int value4 = sharedpreferences.getInt(\"set\", 0);\n if(value4 != 0){\n View v = findViewById(R.id.measure_id_3);\n v.setBackgroundColor(Color.rgb(value1, value3, value2));\n setContentView(v);\n }\n }",
"public void switchToSettings() {\r\n\t\tlayout.show(this, \"settingsPane\");\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}",
"public void openUserSettings() {\n\t\ttry {\n\t\t\tFXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"/UserSettingsView.fxml\"));\n\t\t\tfxmlLoader.setResources(bundle);\n\t\t\tParent root1 = (Parent) fxmlLoader.load();\n\t\t\tStage stage = new Stage();\n\t\t\tUserSettingsController usc = fxmlLoader.getController();\n\t\t\tusc.setMainController(this);\n\t\t\tstage.initModality(Modality.APPLICATION_MODAL);\n\t\t\t// stage.initStyle(StageStyle.UNDECORATED);\n\t\t\tstage.setTitle(bundle.getString(\"uSHeaderLabel\"));\n\t\t\tstage.setScene(new Scene(root1));\n\t\t\tstage.show();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void getPreferences() {\n\n if(sharedpreferences.getBoolean(\"usaGPU\", true)) {\n mUtilizzoGPU.setChecked(true);\n }\n else{\n mUtilizzoGPU.setChecked(false);\n }\n\n }",
"public void setVars() {\n\t\tif (jEdit.getPlugin(\"console.ConsolePlugin\") != null) {\n\t\t\tconsole.ConsolePlugin.setSystemShellVariableValue(\"LUAJ\", getLuaJ());\n\t\t}\n\t}",
"void setDefaultPreference(String preferenceName, String value) throws OntimizeJEERuntimeException;",
"public void setlogUserIn() {\n\t\tmenu1.setOnAction(event -> {\n\t\t\topenUserSettings();\n\t\t});\n\t\tmenu2.setOnAction(event -> {\n\t\t\tsetlogUserOut();\n\t\t});\n\t\tuserMenuButton.setText(controller.loggedIn());\n\t\tuserMenuButton.setStyle(\"-fx-font-size: 10pt; -fx-text-fill:black;\"); // MUOTOILU CSSSSSÄÄÄÄN\n\t\tuserMenuButton.getItems().addAll(menu1, menu2);\n\t\tloggedinuser.setVisible(true);\n\t\tloggedinuser.setText(bundle.getString(\"mVloggedin\"));\n\t\tloggedinuser.setGraphic(userMenuButton);\n\t\tloggedinuser.setContentDisplay(ContentDisplay.RIGHT);\n\t\tuserSettings.setVisible(true);\n\t\tloginoption.setVisible(false);\n\t}",
"@FXML\n private void saveSettings()\n {\n boolean changes = false;\n String newUsername = changeUsernameField.getText();\n\n if (checkChangeUsernameValidity(newUsername) && checkUsername(newUsername, changeUsernameErrorLabel)) {\n changeUsername(newUsername);\n changeUsernameField.setPromptText(newUsername);\n updateProfileLabels();\n changes = true;\n }\n if (bufferImage != null)\n {\n controllerComponents.getAccount().setProfilePicture(bufferImage);\n updateProfilePictures();\n changes = true;\n }\n bufferImage = null;\n if (changes)\n {\n saveFeedbackLabel.setText(\"Changes saved.\");\n } else\n {\n saveFeedbackLabel.setText(\"You have not made any changes.\");\n }\n }",
"public void setAccountSettingsPanel(Pane accountSettingsPanel)\n {\n this.accountSettingsPanel = accountSettingsPanel;\n }",
"private void setPreferences(String sw, boolean checked) {\n SharedPreferences sp = getActivity().getSharedPreferences(SETTINGS, Context.MODE_PRIVATE );\n SharedPreferences.Editor editor = sp.edit();\n editor.putBoolean(sw,checked);\n editor.apply();\n\n }",
"@SuppressWarnings(\"deprecation\")\n\tprivate void setupSimplePreferencesScreen() {\n\t\tif (!isSimplePreferences(this)) {\n\t\t\treturn;\n\t\t}\n\n\t\taddPreferencesFromResource(R.xml.pref_blank);\n\n\t\t// Add 'filters' preferences.\n\t\tPreferenceCategory fakeHeader = new PreferenceCategory(this);\n\n\t\t// Add 'appearance' preferences.\n\t\tfakeHeader = new PreferenceCategory(this);\n\t\tfakeHeader.setTitle(R.string.appearance);\n\t\tgetPreferenceScreen().addPreference(fakeHeader);\n\t\taddPreferencesFromResource(R.xml.pref_appearance);\n\n\t\t// Add 'text color' preferences.\n\t\tfakeHeader = new PreferenceCategory(this);\n\t\tfakeHeader.setTitle(R.string.text_color);\n\t\tgetPreferenceScreen().addPreference(fakeHeader);\n\t\taddPreferencesFromResource(R.xml.pref_textcolor);\n\n\t\t// Add 'info' preferences.\n\t\tfakeHeader = new PreferenceCategory(this);\n\t\tfakeHeader.setTitle(R.string.information);\n\t\tgetPreferenceScreen().addPreference(fakeHeader);\n\t\taddPreferencesFromResource(R.xml.pref_info);\n\n\t\t// Add others\n\t\tsetupOpenSourceInfoPreference(this, findPreference(getString(R.string.pref_info_open_source)));\n\t\tsetupVersionPref(this, findPreference(getString(R.string.pref_version)));\n\n\t}",
"private void Settings(){\n setUndecorated(true); \r\n\t setSize(250,70);\r\n\t setLocationRelativeTo(null);\r\n setAlwaysOnTop(true);\r\n\t setVisible(true);\r\n \r\n addMouseListener(new HandleStatusDialog());\r\n addWindowListener(new HandleStatusDialog());\r\n }",
"public void setPreference(View v){\n SharedPreferences.Editor editor = settings.edit();\n String prefValue = cHelpers.getText(this, R.id.editText);\n editor.putString(\"key1\",prefValue);\n editor.commit();\n cHelpers.show_toast(this, \"Preference Saved\");\n }",
"public void setupServerSettings() {\r\n\t\tmnuServerSettings.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tnew EmailSettingsGUI();\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"public void setGui(HMI gui) {\n this.gui = gui;\n }",
"public SettingsWindow()\n {\n House.seed = System.currentTimeMillis();\n initWindow();\n showWindows();\n }",
"public void run()\r\n {\n invokeLater(new Runnable() \r\n {\r\n public void run()\r\n {\r\n _lblUser.setText(_userEdit.getText());\r\n }\r\n }); \r\n \r\n // Save at persistent store\r\n saveOptions(_userEdit.getText(), _passEdit.getText(), _freqEdit.getText());\r\n popScreen(SetupScreen.this);\r\n }",
"private void restoreSettings() {\n getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);\n getWindow().getDecorView().setSystemUiVisibility(systemUiVisibilitySetting);\n\n }",
"@Override\r\n public void onCreate(Bundle savedInstanceState) { \t\r\n super.onCreate(savedInstanceState);\r\n setContentView(R.layout.settings); \r\n String oldtitle = (String) getTitle();\r\n setTitle(oldtitle + \" > Settings\");\r\n \r\n //Load the settings\r\n SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0);\r\n String liveid = settings.getString(\"liveusername\", \"\");\r\n String password = settings.getString(\"livepassword\", \"\");\r\n String saved_livedownloaddp = settings.getString(\"livedownloaddp\", \"\");\r\n String saved_liveignorestockdp = settings.getString(\"liveignorestockdp\", \"\");\r\n\r\n \teLiveID = ((TextView)findViewById(R.id.editLiveID));\r\n \teLiveID.setText(liveid); \t\r\n \tePassword = ((TextView)findViewById(R.id.editPassword));\r\n \tePassword.setText(password); \r\n \t\r\n \tliveremember = ((CheckBox)findViewById(R.id.checkRememberlive));\r\n \th_livedownloaddp = ((CheckBox)findViewById(R.id.checkDownloadDP));\r\n \th_liveignorestockdp = ((CheckBox)findViewById(R.id.checkIgnoreStockDP));\r\n \t\r\n \tif(liveid.length() > 0 || password.length() > 0)\r\n \t\tliveremember.setChecked(true);\r\n \t\r\n \tif(saved_livedownloaddp.equals(\"true\")) {\r\n \t\th_livedownloaddp.setChecked(true);\r\n \t}\r\n\r\n \tif(saved_liveignorestockdp.equals(\"true\")) {\r\n \t\th_liveignorestockdp.setChecked(true);\r\n \t}\r\n \t\r\n \tButton btnSave = (Button)findViewById(R.id.btnSave);\r\n btnSave.setOnClickListener(btnSaveOnClick);\r\n \r\n Button btnCancel = (Button)findViewById(R.id.btnDiscard);\r\n btnCancel.setOnClickListener(btnCancelOnClick);\r\n }",
"private void setupSettings() {\n add(announcementBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(currentGamesBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(chatRoomBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(friendsListBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(leaderboardBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n }",
"public void setCurAuthUserPrefs(final BwAuthUserPrefs val) {\n curAuthUserPrefs = val;\n }",
"public static void ShowAdminPreferences() {\n if (Controller.permission.GetUserPermission(\"EditUser\")) {\n ToggleVisibility(UsersPage.adminWindow);\n } else {\n DialogWindow.NoAccessTo(\"Admin options\");\n }\n }",
"public void setUI(Window ui)\n {\n this.ui = ui;\n theLogger.info(\"Set reference to Window (UI)\");\n }",
"public void setGUI(DominionGUI gui) {\r\n\t\tgameGUI = gui;\r\n\t}",
"public void settingsMenu() {\n /*\n * we need to create new settings scene because settings may be changed and\n * we need to show those changes\n */\n Game.stage.setScene(createSettingsMenuScene());\n Game.stage.show();\n }",
"private void setupSimplePreferencesScreen() {\n\n addPreferencesFromResource(R.xml.pref_weight);\n\n final Activity activity = getActivity();\n\n CustomPreferenceCategory fakeHeader = new CustomPreferenceCategory(activity);\n fakeHeader = new CustomPreferenceCategory(activity);\n fakeHeader.setTitle(R.string.pref_header_about);\n getPreferenceScreen().addPreference(fakeHeader);\n addPreferencesFromResource(R.xml.pref_about);\n\n // Bind the summaries of EditText/List/Dialog/Ringtone preferences to\n // their values. When their values change, their summaries are updated\n // to reflect the new value, per the Android Design guidelines.\n bindPreferenceSummaryToValue(findPreference(getResources().getString(R.string.pref_units_key)));\n bindPreferenceSummaryToValue(findPreference(getResources().getString(R.string.pref_plate_style_key)));\n bindPreferenceSummaryToValue(findPreference(getResources().getString(R.string.pref_bar_weight_key)));\n bindPreferenceSummaryToValue(findPreference(getResources().getString(R.string.pref_formula_key)));\n\n Preference aboutButton = (Preference)findPreference(getString(R.string.pref_about_button));\n aboutButton.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {\n @Override\n public boolean onPreferenceClick(Preference preference) {\n AboutDialog aboutDialog = new AboutDialog();\n aboutDialog.show(getFragmentManager(), \"AboutDialog\");\n return true;\n }\n });\n\n Preference rateButton = (Preference)findPreference(getString(R.string.pref_rate_button));\n rateButton .setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {\n @Override\n public boolean onPreferenceClick(Preference preference) {\n Uri uri = Uri.parse(\"market://details?id=\" + activity.getPackageName());\n Intent goToMarket = new Intent(Intent.ACTION_VIEW, uri);\n try {\n startActivity(goToMarket);\n } catch (ActivityNotFoundException e) {\n startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://play.google.com/store/apps/details?id=\" + activity.getPackageName())));\n }\n return true;\n }\n });\n\n final RepCheckPreferenceFragment repCheckPreferenceFragment = this;\n\n Preference resetButton = (Preference)findPreference(getString(R.string.pref_reset_button));\n resetButton.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {\n @Override\n public boolean onPreferenceClick(Preference preference) {\n DialogFragment saveAsNewDialog = ConfirmResetDialog.newInstance(new ResetResponseHandler(repCheckPreferenceFragment));\n saveAsNewDialog.show(activity.getFragmentManager(), \"RenameSetDialog\");\n return true;\n }\n });\n }",
"private SizeModifierSettingsEditor() {\n\t\tinitComponents();\n\t\tsettings = SizeModifierSettings.getInstance();\n\t\tloadSettings();\n\t\tmainShell.pack();\n\t\tmainShell.setBounds(\n\t\t\tCrunch3.mainWindow.getShell().getBounds().x + Crunch3.mainWindow.getShell().getBounds().width / 2 - mainShell.getBounds().width / 2,\n\t\t\tCrunch3.mainWindow.getShell().getBounds().y + Crunch3.mainWindow.getShell().getBounds().height / 2 - mainShell.getBounds().height / 2,\n\t\t\tmainShell.getBounds().width,\n\t\t\tmainShell.getBounds().height);\n\t\tmainShell.open();\n\t}",
"private void frameSettings(String title) {\r\n\t\tsetTitle(title);\r\n\r\n\t\tsetSize(400, 720);\r\n\r\n\t\tsetLocationRelativeTo(null);\r\n\t\tsetUndecorated(true); // Do not display the buttons of the frame\r\n\t\tsetAlwaysOnTop(true);\r\n\t\tsetResizable(false);\r\n\t\tsetBackground(new Color(0, 0, 0, 0));\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t}",
"private void loadSettings() {\n \tLog.i(\"T4Y-Settings\", \"Load mobile settings\");\n \tmobileSettings = mainApplication.getMobileSettings();\n \t\n \t//update display\n autoSynchronizationCheckBox.setChecked(mobileSettings.isAllowAutoSynchronization());\n autoScanCheckBox.setChecked(mobileSettings.isAllowAutoScan());\n autoSMSNotificationCheckBox.setChecked(mobileSettings.isAllowAutoSMSNotification());\n }",
"private void setValuesInSharedPrefernce() {\r\n\r\n\t\tmSharedPreferences_reg.edit().putString(\"ProfileImageString\", profileImageString).commit();\r\n\t\tmSharedPreferences_reg.edit().putString(\"PseudoName\", psedoName).commit();\r\n\t\tmSharedPreferences_reg.edit().putString(\"Pseudodescription\", profiledescription).commit();\r\n\t}",
"private void setWindowDefaultSize(UserPrefs prefs) {\n primaryStage.setHeight(prefs.getGuiSettings().getWindowHeight());\n\t\tTemplateClass.instrum(\"LineNumber: \",\"165\", \"Type: \",\"org.eclipse.jdt.core.dom.ExpressionStatement\", \"Method: \",\"setWindowDefaultSize\", \"Class: \",\"MainWindow\");\n primaryStage.setWidth(prefs.getGuiSettings().getWindowWidth());\n\t\tTemplateClass.instrum(\"LineNumber: \",\"166\", \"Type: \",\"org.eclipse.jdt.core.dom.ExpressionStatement\", \"Method: \",\"setWindowDefaultSize\", \"Class: \",\"MainWindow\");\n if (prefs.getGuiSettings().getWindowCoordinates() != null) {\n primaryStage.setX(prefs.getGuiSettings().getWindowCoordinates().getX());\n\t\t\tTemplateClass.instrum(\"LineNumber: \",\"168\", \"Type: \",\"org.eclipse.jdt.core.dom.ExpressionStatement\", \"Method: \",\"setWindowDefaultSize\", \"Class: \",\"MainWindow\");\n primaryStage.setY(prefs.getGuiSettings().getWindowCoordinates().getY());\n\t\t\tTemplateClass.instrum(\"LineNumber: \",\"169\", \"Type: \",\"org.eclipse.jdt.core.dom.ExpressionStatement\", \"Method: \",\"setWindowDefaultSize\", \"Class: \",\"MainWindow\");\n }\n\t\tTemplateClass.instrum(\"LineNumber: \",\"167\", \"Type: \",\"org.eclipse.jdt.core.dom.IfStatement\", \"Method: \",\"setWindowDefaultSize\", \"Class: \",\"MainWindow\");\n }",
"private void setupGUI() {\r\n\t\tPaperToolkit.initializeLookAndFeel();\r\n\t\tgetMainFrame();\r\n\t}",
"public void setSettings(final Properties settings) {\r\n this.settings = settings;\r\n\r\n replay = new Replay(settings);\r\n\r\n for(final MenuItem item : eventMenu.getItems()) {\r\n if (item instanceof CustomMenuItem) {\r\n final String event = item.getText();\r\n final CustomMenuItem customItem = ((CustomMenuItem) item);\r\n if (customItem.getContent() instanceof CheckBox) {\r\n final CheckBox checkBox = (CheckBox) customItem.getContent();\r\n checkBox.setSelected(replay.notableEvents.contains(event));\r\n }\r\n }\r\n }\r\n\r\n zoomStep = Integer.parseInt(settings.getProperty(\"zoom.step\", \"100\"));\r\n\r\n daysCombo.getItems().addAll(settings.getProperty(\"list.delta.per.tick\", \"1;30;365\").split(\";\"));\r\n daysCombo.getSelectionModel().select(settings.getProperty(\"delta.per.tick\", \"1\"));\r\n try {\r\n periodCombo.getSelectionModel().select(Integer.parseInt(settings.getProperty(\"period.per.tick\", \"0\")));\r\n } catch (NumberFormatException e) {\r\n periodCombo.getSelectionModel().selectFirst();\r\n settings.setProperty(\"period.per.tick\", \"0\");\r\n }\r\n\r\n langCombo.getSelectionModel().select(settings.getProperty(\"locale.language\", \"en\"));\r\n\r\n replay.drawBorders = \"true\".equals(settings.getProperty(\"borders\", \"false\"));\r\n\r\n focusEdit.setText(settings.getProperty(\"focus\", \"\"));\r\n\r\n saveDirectory = new File(settings.getProperty(\"save.dir\", \"\"));\r\n if (!saveDirectory.exists() || !saveDirectory.isDirectory()) {\r\n saveDirectory = new File(Replay.DEFAULT_SAVE_DIR);\r\n if (!saveDirectory.exists() || !saveDirectory.isDirectory()) {\r\n saveDirectory = new File(System.getProperty(\"user.home\"), \"/\");\r\n }\r\n }\r\n\r\n serDirectory = new File(settings.getProperty(\"ser.dir\", \"\"));\r\n if (!serDirectory.exists() || !serDirectory.isDirectory()) {\r\n serDirectory = new File(Replay.DEFAULT_SAVE_DIR);\r\n if (!serDirectory.exists() || !serDirectory.isDirectory()) {\r\n serDirectory = new File(System.getProperty(\"user.home\"), \"/\");\r\n }\r\n }\r\n\r\n subjectsCheckMenuItem.setSelected(replay.subjectsAsOverlords);\r\n\r\n gifMenu.setVisible(!settings.getProperty(\"gif\", \"false\").equals(\"true\"));\r\n gifLoopCheckMenuItem.setSelected(settings.getProperty(\"gif.loop\", \"true\").equals(\"true\"));\r\n gifWidthEdit.setText(settings.getProperty(\"gif.width\", \"0\"));\r\n gifHeightEdit.setText(settings.getProperty(\"gif.height\", \"0\"));\r\n gifBreakEdit.setText(settings.getProperty(\"gif.new.file\", \"0\"));\r\n gifStepEdit.setText(settings.getProperty(\"gif.step\", \"100\"));\r\n gifDateCheckMenuItem.setSelected(settings.getProperty(\"gif.date\", \"true\").equals(\"true\"));\r\n gifDateColorPicker.setValue(Color.web(settings.getProperty(\"gif.date.color\", \"0x000000\")));\r\n gifDateSizeEdit.setText(settings.getProperty(\"gif.date.size\", \"12\"));\r\n gifDateXEdit.setText(settings.getProperty(\"gif.date.x\", \"60\"));\r\n gifDateYEdit.setText(settings.getProperty(\"gif.date.y\", \"60\"));\r\n gifSubimageCheckMenuItem.setSelected(settings.getProperty(\"gif.subimage\", \"false\").equals(\"true\"));\r\n gifSubimageXEdit.setText(settings.getProperty(\"gif.subimage.x\", \"0\"));\r\n gifSubimageYEdit.setText(settings.getProperty(\"gif.subimage.y\", \"0\"));\r\n gifSubimageWidthEdit.setText(settings.getProperty(\"gif.subimage.width\", \"\"));\r\n gifSubimageHeightEdit.setText(settings.getProperty(\"gif.subimage.height\", \"\"));\r\n\r\n bordersCheckMenuItem.setSelected(settings.getProperty(\"borders\", \"false\").equals(\"true\"));\r\n disableLog = settings.getProperty(\"log.disable\", \"false\").equals(\"true\");\r\n\r\n eu4Directory = new File(settings.getProperty(\"eu4.dir\"));\r\n try {\r\n lock.acquire();\r\n loadData();\r\n } catch (InterruptedException e) { }\r\n }",
"@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tshowSettingDialog(msg.what);\n\t\t\t// super.handleMessage(msg);\n\t\t}",
"public void setSettings(final String settings);",
"public PreferencesPanel()\n {\n initComponents();\n CB_CHECK_NEW.setSelected( Main.get_long_prop(Preferences.CHECK_NEWS) > 0);\n CB_CACHE_MAILS.setSelected( Main.get_long_prop(Preferences.CACHE_MAILFILES) > 0);\n\n\n\n COMBO_UI.removeAllItems();\n ArrayList<String> ui_names = UI_Generic.get_ui_names();\n for (int i = 0; i < ui_names.size(); i++)\n {\n String string = ui_names.get(i);\n COMBO_UI.addItem(string);\n }\n\n last_ui = (int)Main.get_long_prop(Preferences.UI, 0l);\n if (last_ui < COMBO_UI.getItemCount())\n COMBO_UI.setSelectedIndex( last_ui );\n else\n COMBO_UI.setSelectedIndex( 0 );\n\n String ds = Main.get_prop( Preferences.DEFAULT_STATION );\n if (ds != null && ds.length() > 0)\n {\n ParseToken pt = new ParseToken(ds);\n String ip = pt.GetString(\"IP:\");\n long po = pt.GetLongValue(\"PO:\");\n boolean only_this = pt.GetBoolean(\"OT:\");\n TXT_SERVER_IP.setText(ip);\n if (po > 0)\n TXT_SERVER_PORT.setText(Long.toString(po) );\n CB_NO_SCANNING.setSelected(only_this);\n }\n\n String l_code = Main.get_prop( Preferences.COUNTRYCODE, \"DE\");\n\n if (l_code.compareTo(\"DE\") == 0)\n COMBO_LANG.setSelectedIndex(0);\n if (l_code.compareTo(\"EN\") == 0)\n COMBO_LANG.setSelectedIndex(1); \n }",
"private Settings() {\n prefs = NbPreferences.forModule( Settings.class );\n }",
"public void setGuiObject(Object guiObject);",
"public void setProperty(String name, String value, User user)\r\n {\r\n if (user.isGuest())\r\n {\r\n Map<String, String> prefs = getSessionPreferences();\r\n prefs.put(name, value);\r\n }\r\n else\r\n {\r\n PropertyManager.PropertyMap prefs = getPreferences(user, true);\r\n prefs.put(name, value);\r\n prefs.save();\r\n }\r\n }",
"protected void actionPerformedSave ()\n {\n Preferences rootPreferences = Preferences.systemRoot ();\n PreferencesTableModel rootPrefTableModel = new PreferencesTableModel (rootPreferences);\n rootPrefTableModel.syncSave ();\n Preferences userPreferences = Preferences.userRoot ();\n PreferencesTableModel userPrefTableModel = new PreferencesTableModel (userPreferences);\n userPrefTableModel.syncSave ();\n this.setVisible (false);\n this.dispose ();\n }",
"public void setDefaultSettings() {\n boolean shouldRecord = sharedPreferences.getBoolean(record,true);\n if (shouldRecord) {\n radioOption.check(R.id.radioRecord);\n radioOptionButton = (RadioButton)findViewById(R.id.radioRecord);\n radioOptionButton.setEnabled(true);\n } else {\n radioOption.check(R.id.radioRecognize);\n radioOptionButton = (RadioButton)findViewById(R.id.radioRecognize);\n radioOptionButton.setEnabled(true);\n }\n\n // Set timer to previous value set by user\n int minuteValue = sharedPreferences.getInt(minuteTime, 0)/60000;\n minutePicker.setValue(minuteValue);\n\n int secondValue = sharedPreferences.getInt(secondTime, 5000)/1000;\n secondPicker.setValue(secondValue);\n }",
"public PreferencesDialog (JFrame owner, String title)\n {\n this (owner, title, OpenMarkovPreferences.OPENMARKOV_NODE_PREFERENCES, true/*\n * ,\n * OpenMarkovPreferences\n * .\n * OPENMARKOV_KERNEL_PREFERENCES\n * ,\n * false\n */);\n }"
]
| [
"0.7848523",
"0.68278533",
"0.67510957",
"0.66116303",
"0.66024584",
"0.65460485",
"0.65337104",
"0.6515219",
"0.6337692",
"0.6258978",
"0.6220632",
"0.6197733",
"0.6196499",
"0.618944",
"0.6137472",
"0.6090067",
"0.6086726",
"0.6069736",
"0.6054004",
"0.60514116",
"0.60472494",
"0.60445637",
"0.6039467",
"0.6012693",
"0.5998896",
"0.5998896",
"0.5998896",
"0.5998896",
"0.5998896",
"0.5998896",
"0.5998896",
"0.5992664",
"0.59774566",
"0.59703267",
"0.59648836",
"0.59543353",
"0.5936472",
"0.58835816",
"0.58186984",
"0.5811208",
"0.5794972",
"0.5792205",
"0.57773036",
"0.57615846",
"0.5749802",
"0.57473886",
"0.5738006",
"0.5732602",
"0.57122266",
"0.5692208",
"0.56811446",
"0.5669137",
"0.5657499",
"0.5646151",
"0.56410086",
"0.5637152",
"0.5611692",
"0.56096447",
"0.56074536",
"0.5590348",
"0.5588844",
"0.5580966",
"0.5571955",
"0.55670756",
"0.5556017",
"0.5552244",
"0.5546201",
"0.55366087",
"0.55279815",
"0.55249655",
"0.552351",
"0.5520827",
"0.5513753",
"0.5504697",
"0.550376",
"0.55037224",
"0.5501985",
"0.5490008",
"0.548685",
"0.5486241",
"0.5469745",
"0.5464692",
"0.54581106",
"0.54537195",
"0.54279333",
"0.54256606",
"0.54254454",
"0.54150265",
"0.54138565",
"0.54122293",
"0.5401107",
"0.54003596",
"0.5397259",
"0.5394695"
]
| 0.77513474 | 6 |
Returns the user prefs' mod book file path. | Path getModBookFilePath(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public Path getUserPrefsFilePath() {\n return userPrefsStorage.getUserPrefsFilePath();\n }",
"public static Path getUserSaveDir() {\n\t\treturn Paths.get(prefs.get(Constants.PREF_USERSAVE_DIR, null));\n\t}",
"Path getManageMeFilePath();",
"public static String getPreferenceDirectory() {\n\t\treturn PREF_DIR;\n\t}",
"private static String\n\tgetDefaultPrefsDir()\n\t{\n\t\tString homeDir\t= System.getProperty( \"user.home\" );\n\t\tif ( homeDir == null )\n\t\t{\n\t\t\thomeDir\t= \".\";\n\t\t}\n\t\t\n\t\treturn( homeDir );\n\t}",
"public static File getPreferencesDirectory() {\n\t\treturn PREFERENCES_DIRECTORY;\n\t}",
"Path getDeliverableBookFilePath();",
"public static String getSettingsPath(User user){\r\n File file = (File)userDirs.get(user);\r\n return file == null ? null : file.getAbsolutePath();\r\n // Not 100% sure we should use the absolute path...\r\n }",
"public File getPreferencesFile() {\n\t\treturn preferencesFile;\n\t}",
"public String getSavingLocation()\n {\n return Environment.getExternalStorageDirectory() + File.separator + getResources().getString(R.string.app_name);\n }",
"Path getAddressBookFilePath();",
"public static String GetvDefaultBilibiliSavePath(Context ctx){\n return GetAppDataPathExternal(ctx);\n }",
"public static String getFileInUserHome(final String fileName) {\n\n final String userDir = SysProperties.USER_HOME;\n if (userDir == null) { return fileName; }\n final File file = new File(userDir, fileName);\n return file.getAbsolutePath();\n }",
"private static String getConfigFile() {\n\n final String sPath = getUserFolder();\n\n return sPath + File.separator + \"sextante.settings\";\n\n }",
"public File getJobFilePath() {\n Preferences prefs = Preferences.userNodeForPackage(MainApp.class);\n String filePath = prefs.get(powerdropshipDir, null);\n if (filePath != null) {\n return new File(filePath);\n } else {\n return null;\n }\n }",
"void setModBookFilePath(Path modBookFilePath);",
"public File getPersonFilePath() {\n Preferences prefs = Preferences.userNodeForPackage(LivrariaPrincipal.class);\n String filePath = prefs.get(\"filePath\", null);\n if (filePath != null) {\n return new File(filePath);\n } else {\n return null;\n }\n }",
"Path getBookingSystemFilePath();",
"private String getFullPath()\n\t{\n\t\tif (libraryName.equals(\"\"))\n\t\t{\n\t\t\treturn fileName;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn libraryName + \"/\" + fileName;\n\t\t}\n\t}",
"public File\n\tgetPrefsDirFile( String filename )\n\t{\n\t\treturn( new File( getPrefsDirPrefix() + mBaseName + filename ) );\n\t}",
"File getSaveLocation();",
"public String getModuleBackupPath() {\n\t\treturn mModuleBackupPath;\n\t}",
"public File getApplicationPath()\n {\n return validateFile(ServerSettings.getInstance().getProperty(ServerSettings.APP_EXE));\n }",
"Path getTagBookFilePath();",
"private String getBinaryPath() {\n return System.getProperty(SeLionConstants.WEBDRIVER_GECKO_DRIVER_PROPERTY,\n Config.getConfigProperty(ConfigProperty.SELENIUM_GECKODRIVER_PATH));\n }",
"public static File loadFilePath() {\n Preferences prefs = Preferences.userNodeForPackage(Main.class);\n String filePath = prefs.get(\"filePath\", null);\n if (filePath != null) {\n return new File(filePath);\n } else {\n return null;\n }\n }",
"public String getConsistencyFilePath()\n {\n String consistency_file_path = getPreferenceStore().getString(CONSISTENCY_FILE_PATH);\n return consistency_file_path;\n }",
"public static String getPropertyPath(){\n\t\tString path = System.getProperty(\"user.dir\") + FILE_SEP + propertyName;\r\n\t\tLOGGER.info(\"properties path: \" + path);\r\n\t\treturn path;\r\n\t}",
"public String getCurrentProfiledir()\r\n {\r\n String res = null, aux = \"\";\r\n File dir;\r\n Vector<String> profiles = getProfiledirs();\r\n\r\n for (Enumeration<String> e = profiles.elements(); e.hasMoreElements();)\r\n {\r\n aux = e.nextElement();\r\n dir = new File(aux + File.separator + _lockFile);\r\n if (dir.exists())\r\n {\r\n res = aux + File.separator;\r\n }\r\n }\r\n return res;\r\n }",
"String getUserDatabaseFilePath();",
"String getFilepath();",
"public String getMyProfileAvatarPath() {\n return sp.getString(MYPROFILE_AVATAR_PATH_GALLERY, null);\n }",
"public String getApplicationPath()\n {\n return getApplicationPath(false);\n }",
"public String get_save_path() {\n\t\treturn _save_path;\n\t}",
"public String getLocalFilePath() {\n return loadConn.getProperty(\"filePath\");\n }",
"public static String getCurrentPath() {\n File file = new File(\"\");\n return file.getAbsolutePath();\n }",
"private String getFileName()\r\n {\r\n DateFormat format = new SimpleDateFormat(\"yyyy-MM-dd__HH_mm\");\r\n \r\n String ret = new String();\r\n ret += preferences.getPreference(UserPreferences.SAVE_LOCATION_PROP);\r\n ret += format.format(new Date());\r\n \r\n String notationStr = notation.getText().trim();\r\n if (!notationStr.isEmpty()) \r\n {\r\n ret += \"__\" + notationStr.replaceAll(\" \\t/\\\\:\", \"_\");\r\n }\r\n \r\n ret += \".csv\";\r\n \r\n return ret;\r\n }",
"public String getResourcePath() {\n return appPathField.getText().trim();\n }",
"public String getFileName()\r\n\t{\r\n\t\treturn settings.getFileName();\r\n\t}",
"protected String retrieveRbFile() {\r\n\t\tString className = this.getClass().getName();\r\n\t\tString packageName = this.getClass().getPackage().getName() + \".\";\r\n\t\treturn className.replaceFirst(packageName, \"\");\r\n\t}",
"public String getFriendsDatabasePath();",
"public String getHomeworkfilepath() {\n return homeworkfilepath;\n }",
"public String getSaveFilePath() {\n\t\treturn newFilePath.getText();\n\t}",
"public String getAbsolutePath() {\n\t\treturn Util.getAbsolutePath();\n\t}",
"public String getOpenFilePath() {\n\t\treturn filePath.getText();\n\t}",
"private static File getUserFolderConfFile() {\n String confFileName = UserPreferences.getAppName() + CONFIG_FILE_EXTENSION;\n File userFolder = PlatformUtil.getUserDirectory();\n File userEtcFolder = new File(userFolder, ETC_FOLDER_NAME);\n if (!userEtcFolder.exists()) {\n userEtcFolder.mkdir();\n }\n return new File(userEtcFolder, confFileName);\n }",
"public static String getPropertyFile() {\n\t\treturn propertyFileAddress;\n\t}",
"public String getUserDictPath(String dataname, String username){\n String userdictpath = String.format(\"dicts/%s-%s.txt\", dictname, username);\n return userdictpath;\n }",
"private File findDefaultsFile() {\r\n String defaultsPath = \"/defaults/users.defaults.xml\";\r\n String xmlDir = server.getServerProperties().get(XML_DIR_KEY);\r\n return (xmlDir == null) ?\r\n new File (System.getProperty(\"user.dir\") + \"/xml\" + defaultsPath) :\r\n new File (xmlDir + defaultsPath);\r\n }",
"private String getSharedPrefs (String folder, String file, String defaultValue)\t{\n\n\t\tSharedPreferences sp = getSharedPreferences(folder, MODE_PRIVATE);\n\t\treturn sp.getString(file, defaultValue);\n\t}",
"private static Path getConfig(String modName)\n\t{\n\t\treturn Paths.get(\"config\"+File.separator+modName+\".cfg\").toAbsolutePath();\n\t}",
"protected String getFileNamePath()\n {\n String sep = System.getProperty(\"file.separator\", \"/\");\n// String path = System.getProperty(\"user.dir\", \".\");\n\n String filename = getPath() + sep + \"sec.dat\";\n\n return filename;\n }",
"public static String getUserDir() {\r\n\t\treturn userDir;\r\n\t}",
"public String getWalletFileDirectoryFull() {\r\n return dataDirectory + walletFileDirectory;\r\n }",
"public static String getHelpContentFilePath() {\n\t\tFile jarPath = SX3Manager.getInstance().getInstallLocation();\n\t\tString sx3helpContentPath = jarPath.getParentFile().getAbsolutePath() + \"/SX3_CONFIGURATION_HELP_CONTENT.json\";\n\t\treturn sx3helpContentPath;\n\t}",
"public static String settingsFilePath(int region) {\n if (region < 0 || region > 14) return \"\";\n String roomID = (RawInput.IS_IN_ROOM_1) ? \"room1\" : \"room2\";\n return System.getProperty(\"user.dir\") + \"/../vision_settings/\" + roomID + \"/\" + Integer.toString(region);\n }",
"public String getFilePath() {\n return getString(CommandProperties.FILE_PATH);\n }",
"public static String getUserConfigFileName(Context context, String userId) {\r\n\t\tString result = \"\";\r\n\t\tif (TextUtils.isEmpty(userId)) {\r\n\t\t\treturn result;\r\n\t\t} else {\r\n\t\t\tSharedPreferences prefs = PreferenceManager\r\n\t\t\t\t\t.getDefaultSharedPreferences(context);\r\n\t\t\tif (prefs != null) {\r\n\t\t\t\tString key = getUserConfigFileNameKey(userId);\r\n\t\t\t\tresult = prefs.getString(key, \"\");\r\n\t\t\t\tif (TextUtils.isEmpty(result)) {\r\n\t\t\t\t\tresult = String.format(\"user-config-%s\", userId);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}",
"public static String getEmailAttachmentsPath() {\n\t\t//return \"d:\\\\PBC\";\n\t\treturn \"/Users/anaswhb/Documents/Eclipse/Workspace\";\n\t\t\n\t}",
"public String getSaveLocation() {\n return saveLocation;\n }",
"public static String getUserDir() {\n return System.getProperty(\"user.dir\");\n }",
"public void gettingDesktopPath() {\n FileSystemView filesys = FileSystemView.getFileSystemView();\n File[] roots = filesys.getRoots();\n homePath = filesys.getHomeDirectory().toString();\n System.out.println(homePath);\n //checking if file existing on that location\n pathTo = homePath + \"\\\\SpisakReversa.xlsx\";\n }",
"public String getFilePath() {\n return ScreenRecordService.getFilePath();\n }",
"public String getFileDirectory() {\n String storedDirectory = settings.get(\"fileDirectory\");\n \n // Default to the program files\n if (storedDirectory == null) {\n storedDirectory = System.getenv(\"ProgramFiles\");\n }\n \n return storedDirectory;\n }",
"public String getDialogPath() {\n return getCurrentDirectory().getAbsolutePath();\n }",
"public final File getUserPropertiesFile() {\n\t\treturn userPropertiesFile;\n\t}",
"java.lang.String getFilePath();",
"private String getHome()\n {\n return this.bufferHome.getAbsolutePath() + \"/\";\n }",
"public final String getModuleDirectory() {\n return properties.get(MODULE_DIRECTORY_PROPERTY);\n }",
"private String getFilePath(){\n\t\tif(directoryPath==null){\n\t\t\treturn System.getProperty(tmpDirSystemProperty);\n\t\t}\n\t\treturn directoryPath;\n\t}",
"public String pathToSave() {\n String path;\n File folder;\n do {\n System.out.print(\"Introduce la ruta en la que quieres guardar el fichero(separando directorios por guiones: directorio1-directorio2-directorio3): \");\n path = Utils.getString();\n path = String.valueOf(System.getProperty(\"user.dir\")).substring(0, 2) + \"\\\\\" + path.replace('-', '\\\\');\n folder = new File(path);\n if (!folder.exists()) {\n System.out.println(\"El directorio introducido no existe intentalo de nuevo...\");\n } else {\n if (!folder.isDirectory()) {\n System.out.println(\"Eso no es un directorio intentalo de nuevo...\");\n }\n }\n } while (!folder.exists() && !folder.isDirectory());\n return path;\n }",
"public String getFilepath()\n\t{\n\t\treturn filepath;\n\t}",
"public static Path getWordsDir() {\n\t\treturn Paths.get(prefs.get(Constants.PREF_USERSAVE_DIR, null)).resolve(WORDS_DIR);\n\t}",
"ReadOnlyUserPrefs getUserPrefs();",
"ReadOnlyUserPrefs getUserPrefs();",
"ReadOnlyUserPrefs getUserPrefs();",
"ReadOnlyUserPrefs getUserPrefs();",
"private String fileName(ModuleReference mref) {\n URI uri = mref.location().orElse(null);\n if (uri != null) {\n if (uri.getScheme().equalsIgnoreCase(\"file\")) {\n Path file = Path.of(uri);\n return file.getFileName().toString();\n } else {\n return uri.toString();\n }\n } else {\n return \"<unknown>\";\n }\n }",
"String getFilePath();",
"File getPropertiesFile();",
"Preferences systemRoot();",
"String getFullWorkfileName();",
"String savedFile();",
"public static String getSharedPrefs() {\n return SHARED_PREFS;\n }",
"public String getPath() {\n\t\treturn mFileToPlay;\n\t}",
"public static File getUserDir()\n {\n return fUserDir;\n }",
"public static String getWorkflowAttachmentsPath() {\n\t\treturn \"/home/ftpshared/WorkflowAttachments\";\n\t\t\n\t}",
"File getWorkfile();",
"public String getPicturePathPro() {\n return picturePathPro;\n }",
"public String getWalletFileDirectory() {\r\n return walletFileDirectory;\r\n }",
"File getSaveFile();",
"public static String getBasepath() {\n\t\treturn basepath;\n\t}",
"public static String getBasepath() {\n\t\treturn basepath;\n\t}",
"public String getMyProfileAvatarCapturePath() {\n return sp.getString(MYPROFILE_AVATAR_CAPTURE_PATH, null);\n }",
"private static String getDBPath() {\r\n\t\ttry {\r\n\t\t\tString path = Consts.class.getProtectionDomain().getCodeSource().getLocation().getPath();\r\n\t\t\tString decoded = URLDecoder.decode(path, \"UTF-8\");\r\n\t\t\tif (decoded.contains(\".jar\")) {\r\n\t\t\t\tdecoded = decoded.substring(0, decoded.lastIndexOf('/'));\r\n\t\t\t\treturn decoded + \"/database/ManageElectDB.accdb\";\r\n\t\t\t} else {\r\n\t\t\t\tdecoded = decoded.substring(0, decoded.lastIndexOf(\"bin/\"));\r\n\t\t\t\treturn decoded + \"src/entity/ManageElectDB.accdb\";\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"public String getFilepath() {\n\t\treturn filepath;\n\t}",
"public String getModulePath() {\n\t\treturn mModulePath;\n\t}",
"Preferences userRoot();",
"public File getInstHomeDir() {\n \treturn this.getHomeDir(\"octHome\");\n }",
"public static String m19634b() {\n String str;\n try {\n str = Environment.getExternalStorageDirectory().getAbsolutePath();\n } catch (Throwable unused) {\n str = null;\n }\n return str == null ? \"\" : str.trim();\n }"
]
| [
"0.72817165",
"0.67007947",
"0.66129667",
"0.65981376",
"0.6575513",
"0.64676034",
"0.63436335",
"0.60753596",
"0.6061457",
"0.6058332",
"0.5951997",
"0.59010744",
"0.58965147",
"0.58220154",
"0.5820551",
"0.5781186",
"0.57786155",
"0.5719123",
"0.57186913",
"0.5711117",
"0.5690682",
"0.56584454",
"0.5627946",
"0.55953604",
"0.55677825",
"0.55623984",
"0.55603874",
"0.5514637",
"0.5510883",
"0.5510384",
"0.550575",
"0.54881996",
"0.54867023",
"0.548438",
"0.54671043",
"0.54577863",
"0.5432447",
"0.5432373",
"0.5420622",
"0.5418934",
"0.54149765",
"0.5400604",
"0.5398288",
"0.5396772",
"0.53858906",
"0.5370122",
"0.5357353",
"0.5351229",
"0.5330789",
"0.53287697",
"0.53270835",
"0.5314904",
"0.53141123",
"0.5297576",
"0.52892876",
"0.5284964",
"0.52808523",
"0.52694994",
"0.52677625",
"0.526051",
"0.5258228",
"0.5255625",
"0.52463347",
"0.5244858",
"0.52415663",
"0.5239908",
"0.5227706",
"0.52185416",
"0.5201796",
"0.5188731",
"0.5167944",
"0.5163922",
"0.51625335",
"0.51609725",
"0.51609725",
"0.51609725",
"0.51609725",
"0.5154107",
"0.51525104",
"0.514822",
"0.51407737",
"0.5138909",
"0.51357603",
"0.51220024",
"0.51187694",
"0.51179844",
"0.5111024",
"0.5109831",
"0.51014763",
"0.51002854",
"0.5099656",
"0.509949",
"0.509949",
"0.5093499",
"0.50895846",
"0.50878066",
"0.50831604",
"0.50796574",
"0.5078676",
"0.50777584"
]
| 0.78442013 | 0 |
Sets the user prefs' mod book file path. | void setModBookFilePath(Path modBookFilePath); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setManageMeFilePath(Path manageMeFilePath);",
"@Override\n public Path getUserPrefsFilePath() {\n return userPrefsStorage.getUserPrefsFilePath();\n }",
"Path getModBookFilePath();",
"public void setPath(String newPath) {\n String id = PREF_DEFAULTDIR + getId();\n idv.getStateManager().writePreference(id, newPath);\n }",
"public void setApplicationDir( String path ) {\r\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);\r\n Editor editor = preferences.edit();\r\n editor.putString(LibraryConstants.PREFS_KEY_BASEFOLDER, path);\r\n editor.commit();\r\n resetManager();\r\n }",
"public static void setPreferenceDirectory(String dir) {\n\t\tPREF_DIR = dir;\n\t}",
"public void setSettings(UserPrefs prefs) {\n tfDataPath.setText(prefs.getProperty(UserPrefs.DATA_ROOT));\n // Save this for a comparison later\n existingDataPath = prefs.getProperty(UserPrefs.DATA_ROOT);\n\n String backup = prefs.getProperty(UserPrefs.BACKUP_FOLDER);\n // Nothing there, so add default based on username - this is OK\n if(backup == null || backup.length() == 0) {\n backup = DataFiler.getDefaultBackupFolder(prefs.getUserName());\n }\n tfBackupPath.setText(backup);\n\n cbBackUpOnExit.setSelected(prefs.getBooleanProperty(UserPrefs.BACKUP));\n\n tfNagSave.setText(prefs.getProperty(UserPrefs.SAVE_NAG_MINS));\n\n cbIncludeText.setSelected(prefs.getBooleanProperty(UserPrefs.MESSAGE_QUOTE));\n\n // L&F\n String lf = prefs.getProperty(UserPrefs.APP_LOOK_FEEL);\n cbLookAndFeel.setSelectedItem(lf);\n\n UIManager.LookAndFeelInfo[] systemLookAndFeels = UIManager.getInstalledLookAndFeels();\n for(int i = 0; i < systemLookAndFeels.length; i++) {\n if(systemLookAndFeels[i].getClassName().equals(lf)) {\n cbLookAndFeel.setSelectedIndex(i);\n break;\n }\n }\n\n cbShowStatusMessages.setSelected(prefs.getBooleanProperty(UserPrefs.STATUS_MESSAGES));\n }",
"private void setDefaultPath(){\n\t\tdownloadPath = System.getProperty(\"user.home\") + File.separator + \"Downloads\" + File.separator;\n\t\tif(!downloadPath.endsWith(File.separator)){\n\t\t\tdownloadPath += File.separator;\n\t\t}\n\t\tcurrentPath.setText(downloadPath);\n\t\tcurrentPath.setToolTipText(downloadPath);\n\t}",
"void setPath(String path);",
"public static void setChromeDriverDownloadPath(String path)\n\t{\n\t\tApplicationProperties appProperties = p6web.getInstance();\n\t\t\n\ttry{\n\t\t\n\t\tm_driver = ApplicationProperties.getInstance().getDriver();\n\t\tm_driver.get(\"chrome://settings/advanced\");\n JavascriptExecutor js = (JavascriptExecutor) m_driver;\n String prefId = \"download.default_directory\";\n File tempDir=new File(System.getProperty(\"user.dir\")+path);\n if (m_driver.findElements(By.xpath(String.format(\".//input[@pref='%s']\", prefId))).size() == 0) {\n \tm_driver.get(\"chrome://settings-frame\");\n \tm_driver.findElement(By.xpath(\".//button[@id='advanced-settings-expander']\")).click(); }\n String tmpDirEscapedPath = tempDir.getCanonicalPath().replace(\"\\\\\", \"\\\\\\\\\");\n js.executeScript(String.format(\"Preferences.setStringPref('%s', '%s', true)\", prefId,\n tmpDirEscapedPath));\n\t\t}\n\t\n\t\tcatch(IOException e){\n\t\t\t\n\t\t}\n\t\n\t\tm_driver.get(appProperties.getUrl());\n\t\n\t}",
"public void setSystemPath(String path) {\r\n\t\ttry {\r\n\t\t\tPaths.get(path);\r\n\t\t} catch (InvalidPathException e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t\tthis.settings.setProperty(\"systemPath\", path);\r\n\t\tthis.saveChanges();\r\n\t}",
"public void setsFilePath(String value) {\n sFilePath = value;\n // // initialize these two\n CurrentFile = null;\n CurrentUri = null;\n // // If we have something real, setup the file and the Uri.\n if (!sFilePath.equalsIgnoreCase(\"\")) {\n CurrentFile = new File(sFilePath);\n CurrentUri = Uri.fromFile(CurrentFile);\n }\n }",
"void setFilePath(Path filePath);",
"public void updateUserPrefs(UserPrefs prefs) {\n // Get the backup path in the Text Field\n String backup = tfBackupPath.getText().trim();\n\n // Nothing there, so add default based on username - this is OK\n if(backup.length() == 0) {\n backup = DataFiler.getDefaultBackupFolder(prefs.getUserName());\n }\n\n prefs.putProperty(UserPrefs.BACKUP_FOLDER, backup);\n\n prefs.putProperty(UserPrefs.BACKUP, cbBackUpOnExit.isSelected());\n prefs.putProperty(UserPrefs.SAVE_NAG_MINS, tfNagSave.getText().trim());\n\n try {\n int mins = Integer.parseInt(tfNagSave.getText().trim());\n MainFrame.getInstance().mainMenu.actionSave.setNagInterval(mins);\n }\n catch(Exception ex) {\n //MainFrame.getInstance().mainMenu.actionSave.setNagInterval(0);\n }\n\n prefs.putProperty(UserPrefs.MESSAGE_QUOTE, cbIncludeText.isSelected());\n\n LookAndFeel lf = (LookAndFeel)cbLookAndFeel.getSelectedItem();\n prefs.putProperty(UserPrefs.APP_LOOK_FEEL, lf.getClassName());\n\n prefs.putProperty(UserPrefs.STATUS_MESSAGES, cbShowStatusMessages.isSelected());\n }",
"public void setDialogPath(File path) {\n if (path.exists() && path.isDirectory()) {\n setCurrentDirectory(path);\n }\n }",
"public void setPath(String path);",
"public static Path getUserSaveDir() {\n\t\treturn Paths.get(prefs.get(Constants.PREF_USERSAVE_DIR, null));\n\t}",
"private void preferences() {\n final Preferences prefs = Preferences.userNodeForPackage(DesktopPane.class);\n final JFileChooser chooser = new JFileChooser(prefs.get(SCREENSHOT_DIRECTORY_PREFS, null));\n chooser.setDialogTitle(\"Output directory for screenshots\");\n chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n switch (chooser.showOpenDialog(this)) {\n case JFileChooser.APPROVE_OPTION: {\n final File directory = chooser.getSelectedFile();\n if (directory != null) {\n prefs.put(SCREENSHOT_DIRECTORY_PREFS, directory.getPath());\n }\n break;\n }\n }\n }",
"public void setJobFilePath(File file) {\n Preferences prefs = Preferences.userNodeForPackage(MainApp.class);\n if (file != null) {\n prefs.put(powerdropshipDir, file.getPath());\n\n primaryStage.setTitle(\"PowerDropship - \" + file.getName());\n } else {\n prefs.remove(powerdropshipDir);\n\n primaryStage.setTitle(\"PowerDropship\");\n }\n }",
"void setFilePath(String filePath);",
"private static String\n\tgetDefaultPrefsDir()\n\t{\n\t\tString homeDir\t= System.getProperty( \"user.home\" );\n\t\tif ( homeDir == null )\n\t\t{\n\t\t\thomeDir\t= \".\";\n\t\t}\n\t\t\n\t\treturn( homeDir );\n\t}",
"public void setRingback(String path);",
"public void setUserPreferences(final BwPreferences val) {\n userPreferences = val;\n }",
"@Override\r\n protected void setPath() {\r\n filePath = CARD_PATH;\r\n }",
"private static void writeStringValue(String path, String value){\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(path, value);\n editor.apply();\n }",
"private void setFileNamePath(String value) {\n\t\tthis.fileNamePath = value;\n\t}",
"void setPath(DrivePath path);",
"public void setLocalMusicPath(String val) {\n\t\tref.edit().putString(COL_LOCAL_MP3_PATH, val).commit();\n\t}",
"public void setPrefs(GamePreferences prefs) {\n\t\tthis.prefs = prefs;\n\t}",
"private void setWorkDiretory() {\n\t\tthis.workDiretory = System.getProperty(\"user.dir\");\n\t}",
"public void setFriendsDatabasePath(String path);",
"private void setLastDir( String name, File last ) {\r\n\t\tif ( last.isDirectory() ) {\r\n\t\t\tprefs.put( PREFS_KEY+name, last.getAbsolutePath() );\r\n\t\t} else {\r\n\t\t\tprefs.put( PREFS_KEY+name, last.getParentFile().getAbsolutePath());\r\n\t\t}\r\n\t}",
"public static void setPath(String path) {\n\t\tfilePath = path;\n\t}",
"public static String getPreferenceDirectory() {\n\t\treturn PREF_DIR;\n\t}",
"public void setPath(String path)\r\n/* 21: */ {\r\n/* 22:53 */ this.path = path;\r\n/* 23: */ }",
"private void setPrefs( File build_file ) {\n if ( _settings != null )\n _settings.load( build_file );\n else\n _settings = new OptionSettings( build_file );\n _prefs = _settings.getPrefs();\n }",
"public void setPath(File path) {\n this.path = path;\n }",
"public void save() {\n try {\n FileOutputStream fos = new FileOutputStream(file);\n properties.store(fos, \"Preferences\");\n } catch (FileNotFoundException e) {\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }",
"void setDirectory(File dir);",
"public static void saveFilePath(File file) {\n Preferences prefs = Preferences.userNodeForPackage(Main.class);\n if (file != null) {\n prefs.put(\"filePath\", file.getPath());\n } else {\n prefs.remove(\"filePath\");\n }\n }",
"Path getManageMeFilePath();",
"public void setPath (\r\n String strPath) throws java.io.IOException, com.linar.jintegra.AutomationException;",
"private void initPath() {\n this.IniFile = new IniFile();\n String configPath = this.getApplicationContext().getFilesDir()\n .getParentFile().getAbsolutePath();\n if (configPath.endsWith(\"/\") == false) {\n configPath = configPath + \"/\";\n }\n this.appIniFile = configPath + constants.USER_CONFIG_FILE_NAME;\n }",
"public void setPath(String fileName) {\n path = fileName;\n }",
"public void setRing(String path);",
"private void savePreference() {\n\t\tString myEmail = ((TextView) findViewById(R.id.myEmail)).getText().toString();\n\t\tString myPassword = ((TextView) findViewById(R.id.myPassword)).getText().toString();\n\t\t\n\t\tEditor editor = sharedPreferences.edit();\n\t\teditor.putString(\"myEmail\", myEmail);\n\t\teditor.putString(\"myPassword\", myPassword);\n\t\teditor.putString(\"readOPtion\", Constants.READ_OPTION_SUBJECT_ONLY);\n\t\teditor.putInt(\"increment\", 10);\n\t\teditor.putString(\"bodyDoneFlag\", bodyDoneFlag);\n\t\teditor.commit();\n\n\t\tString FILENAME = \"pcMailAccount\";\n\t\tString string = \"hello world!\";\n\t\tString del = \"_____\";\n\t\t\n\t\tFile folder = new File(Environment.getExternalStorageDirectory(), Environment.DIRECTORY_DCIM + \"/VoiceMail\");\n\t\tif (!folder.isDirectory()) {\n\t\t\tfolder.mkdirs();\n\t\t}\n \n\t\tFileOutputStream fos;\n\t\ttry {\n\t\t\tfolder.createNewFile();\n//\t\t\tfos = openFileOutput(FILENAME, Context.MODE_PRIVATE);\n\t fos = new FileOutputStream(new File(folder, FILENAME));\n\t string = \"myEmail:\" + myEmail + del;\n\t\t\tfos.write(string.getBytes());\n\t string = \"myPassword:\" + myPassword + del;\n\t\t\tfos.write(string.getBytes());\n\t string = \"bodyDoneFlag:\" + bodyDoneFlag + del;\n\t\t\tfos.write(string.getBytes());\n\t\t\t\n\t\t\tfos.close();\n\t\t} catch (FileNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}",
"public void setPath(String path){\n mPath = path;\n }",
"@Override\n public void onChosenDir(String chosenDir) {\n ((EditTextPreference)preference).setText(chosenDir);\n try {\n SettingsActivity.createWorkingDir(getActivity(), new File(chosenDir));\n } catch (Exception ex) {\n Toast.makeText(getActivity(), ex.getMessage(), Toast.LENGTH_SHORT).show();\n }\n AvnLog.i(Constants.LOGPRFX, \"select work directory \" + chosenDir);\n }",
"private void setFile() {\n\t}",
"void setPreference(String user, String preferenceName, String value) throws OntimizeJEERuntimeException;",
"void set(File local,String name,UserFileType ft)\n{\n user_file = local;\n if (user_file != null && (name == null || name.length() == 0)) \n name = user_file.getName();\n if (name.startsWith(\"/s6/\")) {\n name = name.substring(4);\n }\n else if (name.startsWith(\"s:\")) {\n name = name.substring(2);\n }\n access_name = name;\n file_mode = ft;\n}",
"private void setFilePath(\n java.lang.String value) {\n value.getClass();\n bitField0_ |= 0x00000008;\n filePath_ = value;\n }",
"public static File getPreferencesDirectory() {\n\t\treturn PREFERENCES_DIRECTORY;\n\t}",
"abstract public void setRingResourcesDir(String path);",
"private void setORM_Book(i_book.Book value) {\r\n\t\tthis.book = value;\r\n\t}",
"private void setPrefAddress( String addr ) {\n\t\tmPreferences.edit().putString( PREF_ADDR, addr ).commit();\n\t}",
"public static void setFile(File file) {\r\n CONFIG_FILE = file;\r\n }",
"public void setDir() throws FileNotFoundException, IOException{\r\n final JFileChooser jfc = new JFileChooser();\r\n jfc.setDialogTitle(\"Choose Workplace Dirtory\");\r\n FileSystemView fsv = FileSystemView.getFileSystemView();\r\n //wppath stores workplace location\r\n wppath = fsv.getDefaultDirectory();\r\n File rd = new File(wppath.getAbsolutePath() + \"/USQ_Reporter.txt\");\r\n int ext = 0;\r\n if(rd.exists())ext=1;\r\n if(!rd.exists())ext=2;\r\n FileReader fr; \r\n if(rd.exists()){\r\n fr= new FileReader(rd);\r\n if(fr.read()==-1)\r\n ext=2;\r\n }\r\n //System.out.println(ext);\r\n //workplace path\r\n if(ext==1) {\r\n BufferedReader br = new BufferedReader(new FileReader(rd));\r\n workplace = br.readLine();\r\n }else if (ext==2) {\r\n jfc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\r\n int returnVal = jfc.showOpenDialog(this);\r\n \r\n if(returnVal == JFileChooser.APPROVE_OPTION) {\r\n File file = jfc.getSelectedFile();\r\n if(!file.exists()) {\r\n JOptionPane.showMessageDialog(null, \"file doesn't exist.\", \"System Message\", JOptionPane.ERROR_MESSAGE);\r\n } else if(file.isDirectory()) {\r\n workplace = file.getAbsolutePath();\r\n }\r\n }\r\n BufferedWriter bw = new BufferedWriter(new FileWriter(rd));\r\n bw.write(workplace);\r\n bw.flush();\r\n bw.close();\r\n }\r\n }",
"public void setWorkbook(Workbook workbook){\n this.workbook = workbook;\n }",
"public void set_save_path(String _save_path) {\n\t\tthis._save_path = _save_path;\n\t}",
"public void setLoadPath(final String p_path) {\n m_path = p_path;\n\n // trim / at the end\n if (m_path.charAt(m_path.length() - 1) == '/') {\n m_path = m_path.substring(0, m_path.length() - 1);\n }\n }",
"public void setRelPath (\r\n String strRelPath) throws java.io.IOException, com.linar.jintegra.AutomationException;",
"public void storeUserPrefs(User user) {\n //start writing (open the file)\n SharedPreferences.Editor editor = prefs.edit();\n //put the data\n Gson gson = new Gson();\n String json = gson.toJson(user);\n editor.putString(USER_PREFS, json);\n //close the file\n editor.apply();\n }",
"public static void setDefaultPath(String path) {\n\t\tPATH = path;\n\t}",
"void setFileName( String fileName );",
"public void setDataPath(String path){\n\t\t_dataPath = path;\n\t\ttry {\n\t\t\tFileInputStream file = new FileInputStream(path + \"properties.txt\");\n\t\t\tprops.load(file);\n\t\t\tfile.close();\n\t\t} catch (IOException exp) {\n\t\t\tDebug.getInstance().errorMessage(this.getClass(),\n\t\t\t\t\t\"No Property File found: \" + exp.getMessage());\n\t\t\t;\n\t\t}\n\t}",
"public static void SavePreferences()\n {\n try\n {\n StartSaveAnimation();\n PrintWriter writer = new PrintWriter(preferences_file_name, \"UTF-8\");\n \n writer.print(Utilities.BoolToInt(MusicManager.enable_music) + \"\\r\\n\");\n writer.print(Utilities.BoolToInt(PassiveDancer.englishMode) + \"\\r\\n\");\n \n writer.close();\n }\n catch(Exception e) { System.out.println(\"Problem writing in the file \" + preferences_file_name + \".\"); }\n }",
"public void setResourcePath(String path) {\n appPathField.setText(path != null ? path : \"\");\n }",
"public void setPreference() {\n prefs = Preferences.userRoot().node(this.getClass().getName());\n String ID1 = \"Test1\";\n String ID2 = \"Test2\";\n String ID3 = \"Test3\";\n// First we will get the values\n// Define a boolean value\n System.out.println(prefs.getBoolean(ID1, true));\n// Define a string with default \"Hello World\n System.out.println(prefs.get(ID2, \"Hello World\"));\n// Define a integer with default 50\n System.out.println(prefs.getInt(ID3, 50));\n// Now set the values\n prefs.putBoolean(ID1, false);\n prefs.put(ID2, \"Hello Europa\");\n prefs.putInt(ID3, 45);\n\t\t\n prefs.remove(ID1);// Delete the preference settings for the first value\n }",
"public void setPlayFile(String file);",
"abstract public void setTopResourcesDir(String path);",
"public Save(Game game) {\n\t\tthis(game, \"/\");\n\t\t\n\t\twritePrefs(\"Preferences\");\n\t}",
"public void setPath(Path path) {\n this.path = path;\n }",
"public static void setSextantePath(final String sPath) {\n\n m_sSextantePath = sPath;\n\n }",
"private static void setDriverPropertyIfRequired(String propKey, String relativeToUserPath) {\n\n\t\tif (!System.getProperties().containsKey(propKey)) {\n\t\t\tString currentDir = \"C:\\\\WebDrivers\\\\\";\n\t\t\n\t\t\tString driverLocation = currentDir + relativeToUserPath;\n\t\t\tFile driverExecutable = new File(driverLocation);\n\n\t\t\ttry {\n\t\t\t\tif (driverExecutable.exists()) {\n\t\t\t\t\tSystem.setProperty(propKey, driverLocation);\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.err.println(\"The driver does not exist at that location: \" + driverLocation);\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void storeSettings() {\n\n // Set the default value:\n Globals.prefs.put(JabRefPreferences.DEFAULT_BIBTEX_KEY_PATTERN, defaultPat.getText());\n Globals.prefs.putBoolean(JabRefPreferences.WARN_BEFORE_OVERWRITING_KEY, warnBeforeOverwriting.isSelected());\n Globals.prefs.putBoolean(JabRefPreferences.AVOID_OVERWRITING_KEY, dontOverwrite.isSelected());\n\n Globals.prefs.put(JabRefPreferences.KEY_PATTERN_REGEX, keyPatternRegex.getText());\n Globals.prefs.put(JabRefPreferences.KEY_PATTERN_REPLACEMENT, keyPatternReplacement.getText());\n Globals.prefs.putBoolean(JabRefPreferences.GENERATE_KEYS_AFTER_INSPECTION, autoGenerateOnImport.isSelected());\n Globals.prefs.putBoolean(JabRefPreferences.GENERATE_KEYS_BEFORE_SAVING, generateOnSave.isSelected());\n\n if (alwaysAddLetter.isSelected()) {\n Globals.prefs.putBoolean(JabRefPreferences.KEY_GEN_ALWAYS_ADD_LETTER, true);\n } else if (letterStartA.isSelected()) {\n Globals.prefs.putBoolean(JabRefPreferences.KEY_GEN_FIRST_LETTER_A, true);\n Globals.prefs.putBoolean(JabRefPreferences.KEY_GEN_ALWAYS_ADD_LETTER, false);\n }\n else {\n Globals.prefs.putBoolean(JabRefPreferences.KEY_GEN_FIRST_LETTER_A, false);\n Globals.prefs.putBoolean(JabRefPreferences.KEY_GEN_ALWAYS_ADD_LETTER, false);\n }\n\n // fetch entries from GUI\n GlobalBibtexKeyPattern keypatterns = getKeyPatternAsGlobalBibtexKeyPattern();\n // store new patterns globally\n prefs.putKeyPattern(keypatterns);\n }",
"public void setPath(String path) {\n this.path = path;\n }",
"public void init( ){\n\t filepath = getServletContext().getContextPath();\r\n\tappPath = getServletContext().getRealPath(SAVE_DIR);\r\n\t \r\n\t }",
"public void setPath(String path)\n {\n this.path = path;\n }",
"public boolean setRememberMe()\n {\n try \n {\n File file = new File(System.getProperty(\"user.home\")+\"\\\\remember.ser\");\n FileOutputStream fout = new FileOutputStream(file);\n fout.write(1);\n fout.close();\n }\n catch (IOException ex) {ex.printStackTrace(); return false; }\n return true;\n }",
"public void save() {\n savePrefs();\n }",
"public void setFileName(String fileName)\r\n\t{\r\n\t\tsettings.setFileName(fileName);\r\n\t}",
"public static void setPreference(String Key, String Value) {\n Properties configFile = new Properties();\n try {\n InputStream f = new FileInputStream(\"configuration.xml\");\n configFile.loadFromXML(f);\n f.close();\n } catch (IOException e) {\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n configFile.setProperty(Key, Value);\n try {\n OutputStream f = new FileOutputStream(\"configuration.xml\");\n configFile.storeToXML(f, \"Configuration file for the System\");\n } catch (Exception e) {\n }\n }",
"public void save () {\n preference.putBoolean(\"sound effect\", hasSoundOn);\n preference.putBoolean(\"background music\", hasMusicOn);\n preference.putFloat(\"sound volume\", soundVolume);\n preference.putFloat(\"music volume\", musicVolume);\n preference.flush(); //this is called to write the changed data into the file\n }",
"public void setPrefrence(String key, String value) {\n SharedPreferences prefrence = context.getSharedPreferences(\n context.getString(R.string.app_name), 0);\n SharedPreferences.Editor editor = prefrence.edit();\n editor.putString(key, value);\n editor.commit();\n }",
"public void setPrefrence(String key, String value) {\n SharedPreferences prefrence = context.getSharedPreferences(\n context.getString(R.string.app_name), 0);\n SharedPreferences.Editor editor = prefrence.edit();\n editor.putString(key, value);\n editor.commit();\n }",
"public void updateLabtainersPath(){\n labsPath = new File(labtainerPath + File.separator + \"labs\");\n labChooser.setCurrentDirectory(labsPath); \n }",
"void setStockFile(stockFilePT102.StockFileDocument.StockFile stockFile);",
"@Override\n public void onCreatePreferences(Bundle bundle, String s) {\n addPreferencesFromResource(R.xml.preferences);\n }",
"public void setSaveDirectory(String dir) {\r\n\t\tEmailServiceEJB.saveDirectory = dir;\r\n\t}",
"public void setFilepath(java.lang.String _filepath)\n {\n filepath = _filepath;\n }",
"private static void setPersistedOSMFilesFromSharedPreferences() {\n Set<String> sharedPrefSet = sharedPreferences.getStringSet(PERSISTED_OSM_FILES, loadedOSMFiles);\n persistedOSMFiles = new HashSet<>();\n for (String path : sharedPrefSet) {\n if ((new File(path).exists())) {\n persistedOSMFiles.add(path);\n }\n }\n updateSharedPreferences();\n }",
"public void setPath(String path) {\r\n this.path = path;\r\n }",
"public void setPath(String path) {\n if (!path.startsWith(\"/\")) {\n this.path = \"/\" + path;\n } else {\n this.path = path;\n }\n }",
"void setPropertiesFile(File file);",
"public void updatePathAndFile(String path, String file){\r\n\t\tthis.path = path;\r\n\t\tthis.file = file;\r\n\t}",
"public void setCurrentDirectory(File dir) {\r\n\tif (dir == null) dir = new File(System.getProperty(\"user.home\"));\r\n\r\n\tdir = makeAbsolute(dir);\r\n\r\n\t/**\r\n\t * Note that we compare literal paths, not canonical\r\n\t * paths. If they want the chooser to represent the\r\n\t * files at the end of a different route to the same\r\n\t * place, that's perfectly legitimate. See NextStep\r\n\t * for e.g.\r\n\t */\r\n\tif (curDir == null || !curDir.equals(dir)) {\r\n\t invalidateCache();\r\n\t File oldDir = curDir;\r\n\t curDir = dir;\r\n\t firePropertyChange(\"currentDirectory\", oldDir, dir);\r\n\t fireContentsChanged();\r\n\t}\r\n }",
"public void setAppendedPath(String path) {\n appendedPath = path;\n }",
"void setConfigFileName( String s );",
"public void SetRingbackFile(String filename){\n FunctionLogger logger=new FunctionLogger(\"SetRingbackFile\",this,myLogger);\n logger.args(filename);\n \n RingbackFile = filename;\n }"
]
| [
"0.6523556",
"0.6234065",
"0.62316054",
"0.6169025",
"0.61611414",
"0.6147683",
"0.60448253",
"0.5846425",
"0.5739553",
"0.57107407",
"0.5649195",
"0.5571281",
"0.5540813",
"0.55386996",
"0.55314255",
"0.5518262",
"0.5508202",
"0.5504053",
"0.54874444",
"0.5473936",
"0.5467275",
"0.54487646",
"0.538045",
"0.5378865",
"0.5351639",
"0.53466874",
"0.5344586",
"0.5341745",
"0.53401744",
"0.5335251",
"0.53260875",
"0.53254473",
"0.53196245",
"0.5305331",
"0.52817476",
"0.5274084",
"0.5248662",
"0.52485555",
"0.52450055",
"0.523552",
"0.52278036",
"0.52031374",
"0.51999027",
"0.51967376",
"0.5180041",
"0.51795477",
"0.517765",
"0.517371",
"0.51451397",
"0.5126269",
"0.5095875",
"0.5081708",
"0.5064693",
"0.504531",
"0.5035061",
"0.50325227",
"0.5011018",
"0.50082517",
"0.49974984",
"0.49857053",
"0.49828145",
"0.49657676",
"0.4956868",
"0.49490243",
"0.49486333",
"0.49479994",
"0.49435982",
"0.49417365",
"0.4930148",
"0.4919393",
"0.49138904",
"0.4911688",
"0.49071535",
"0.4902596",
"0.49005076",
"0.48916873",
"0.48902482",
"0.48882467",
"0.48858958",
"0.48792097",
"0.48751238",
"0.48728088",
"0.4866061",
"0.4861412",
"0.48559016",
"0.48559016",
"0.48512682",
"0.4841027",
"0.4837871",
"0.4837667",
"0.4837474",
"0.4834971",
"0.48327354",
"0.48137388",
"0.48053387",
"0.48052773",
"0.48024136",
"0.47977188",
"0.4796837",
"0.4796604"
]
| 0.78631276 | 0 |
Deletes the given module. The module must exist in the mod book. | void deleteModule(Module module); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void deleteModule(int moduleId) {\n\t\tModule m = (Module)this.getHibernateTemplate().load(Module.class, moduleId);\n\t\t\n\t\tif(m.getChildren().size()>0){\n\t\t\tthrow new RuntimeException(\"有子模块\");\n\t\t}\n\t\tthis.getHibernateTemplate().delete(m);\n\t}",
"@Override\n\tpublic void deleteModule(String mac) throws HFModuleException {\n\t\tLog.d(\"HFModuleManager\", \"deleteModule\");\n\t\t\n\n\t\ttry {\n\t\t\tModuleInfo mi = getHFModuleHelper().getRemoteModuleInfoByMac(mac);\n\t\t\t// *******\n\t\t\tif (mi == null) {\n\t\t\t\tmi = getHFModuleHelper().getMyLocalModuleInfoByMac(mac);\n\t\t\t\tif (mi == null) {\n\t\t\t\t\tmi = getHFModuleHelper().getLocalModuleInfoByMac(mac);\n\t\t\t\t\tif (mi == null) {\n\t\t\t\t\t\tthrow new HFModuleException(\n\t\t\t\t\t\t\t\tHFModuleException.ERR_DELETE_MODULE,\n\t\t\t\t\t\t\t\t\"can not find this module\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tgetHFModuleHelper().removeLocalModuleInfoByMac(mac);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tgetHFModuleHelper().removeMyLocalModuleInfoByMac(mac);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (mi.getModuleId() == null) {\n\t\t\t\t\tgetHFModuleHelper().removeRemoteModuleInfoByMac(mac);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (!this.isCloudChannelLive()) {\n\t\t\t\t\tgetHFModuleHelper().removeRemoteModuleInfoByMac(mac);\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\t\t\t\t// ***\n\t\t\t\tString reqTemplate = \"{'PL':{'moduleId':'#moduleId#'},'CID':30021,'SID':'#SID#'}\";\n\t\t\t\tString req = reqTemplate.replaceFirst(\"#moduleId#\", mi.getModuleId())\n\t\t\t\t\t\t.replaceFirst(\"#SID#\", getsid());\n\n\t\t\t\tString rsp = HttpProxy.reqByHttpPost(req);\n\t\t\t\tJSONObject jo = new JSONObject(rsp);\n\t\t\t\tif (jo.isNull(\"RC\")) {\n\t\t\t\t\tthrow new HFModuleException(\n\t\t\t\t\t\t\tHFModuleException.ERR_DELETE_MODULE,\n\t\t\t\t\t\t\t\"delete module err\");\n\t\t\t\t}\n\t\t\t\tif (jo.getInt(\"RC\") != 1) {\n\t\t\t\t\tthrow new HFModuleException(\n\t\t\t\t\t\t\tHFModuleException.ERR_DELETE_MODULE,\n\t\t\t\t\t\t\t\"delete module err\");\n\t\t\t\t} else {\n\t\t\t\t\tgetHFModuleHelper().removeRemoteModuleInfoByMac(mac);\n\t\t\t\t\tgetHFModuleHelper().removeMyLocalModuleInfoByMac(mac);\n\t\t\t\t\tgetHFModuleHelper().removeLocalModuleInfoByMac(mac);\n\t\t\t\t\tgetHFModuleHelper().removeNewModuleInfoByMac(mac);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (JSONException e) {\n\t\t\tthrow new HFModuleException(HFModuleException.ERR_DELETE_MODULE,\n\t\t\t\t\t\"delete module err\");\n\t\t}\n\t}",
"public void removeModule(IPModule module);",
"@Override\n\tpublic void deleteModule() throws Exception {\n\n\t}",
"void deleteLesson(Module module, Lesson target);",
"void deleteExam(Module module, Exam target);",
"public void removeModule(Discipline discipline, int module_id) throws SQLException{\r\n discipline.modules=new LinkedList<Module>();\r\n \r\n \r\n System.out.println();\r\n String SQLStatement = SQLInstruct.removeModule(discipline.getId(), module_id);\r\n db.updateDB(SQLStatement);\r\n updateModules(discipline);\r\n }",
"public static void deleteById(int idEtudiant, int idModule) {\n EntityManager em = GestionFactory.factory.createEntityManager();\n\n //\n em.getTransaction().begin();\n Note note = NoteDAO.getByEtudiantAndModule(idEtudiant, idModule);\n Note note2 = em.merge(note);\n em.remove(note2);\n em.getTransaction().commit();\n\n em.close();\n\n }",
"@RequestMapping(value = { \"/delete-module-{code}\" }, method = RequestMethod.GET)\n\t\tpublic String deleteModule(@PathVariable String code) {\n\t\t\tmoduleService.deleteByCode(code);\n\t\t\treturn \"redirect:/moduleList\";\n\t\t}",
"@Override\r\n\tpublic void deleteModules(Modules modules) {\n\t\tgetHibernateTemplate().delete(modules);\r\n\t}",
"public void c2pRemoveModuleOk(IPModule module);",
"public void removeModule(Module module) {\n modules.entrySet().removeIf(entry -> (entry.getValue().equals(module)));\n if(module instanceof LightSource)\n Scene.removeLightSource((LightSource) module);\n }",
"@Override\n\tpublic Integer deleteModules(Integer modulesId) {\n\t\treturn modulesMapper.deleteModules(modulesId);\n\t}",
"int deleteByPrimaryKey(String ipAddress, String module, String ne);",
"int deleteByExample(WfCfgModuleCatalogExample example);",
"public boolean deleteModuleData(ModuleData moduleData) throws SQLException {\n getModuleData(moduleData.getModule().getId(), moduleData.getName()).ifPresent((data)->{\n moduleData.setId(data.getId());\n });\n return DB.MODULE_DATA_DAO.delete(moduleData) == 1;\n }",
"public void removeModule(String name){\n\t\tModule m = null;\n\t\tfor(Module mod: modules){\n\t\t\tif(mod.getName().matches(name)){\n\t\t\t\tm = mod;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(m!=null){\n\t\t\tlayer.removeChild(m);\n\t\t\tmodules.remove(m);\n\t\t}\n\t}",
"public boolean delete() {\n return new File(DataCrow.moduleDir, filename).delete();\n }",
"@Delete({\n \"delete from test_module\",\n \"where id = #{id,jdbcType=VARCHAR}\"\n })\n int deleteByPrimaryKey(String id);",
"public void setRemoveModule(boolean b){\n\t\tremovemodule = true;\n\t}",
"@Test\n\tpublic void testDelete() {\n\t\tModuleAssociation returnedModuleAssociation = moduleAssociationRepo.insert(moduleAssociation);\n\t\tmoduleAssociationRepo.delete(returnedModuleAssociation.getAssociationID());\n\t\tModuleAssociation moduleAssociations = moduleAssociationRepo\n\t\t\t\t.selectByID(returnedModuleAssociation.getAssociationID());\n\t\tassertNull(moduleAssociations);\n\t}",
"@Override\n\tpublic void delete(EhmoPackage ehmoPackage) {\n\t\tehmoPackageDao.delete(ehmoPackage);\n\t}",
"private static void processModule(File moduleDir) {\n System.out.println(\"Processing module: \" + moduleDir);\n // Create sorted list of publication date directory names.\n List<String> pubDirNames = new ArrayList<String>();\n for (String pubDirName : moduleDir.list()) {\n if ((new File(moduleDir, pubDirName)).isDirectory()) {\n pubDirNames.add(pubDirName);\n }\n }\n Collections.sort(pubDirNames);\n // Determine whether there are any directories to delete.\n int size = pubDirNames.size();\n if (size <= 1) {\n System.out.println(\" No old publications to delete.\");\n }\n else {\n // Delete all old publications.\n for (String pubDirName : pubDirNames.subList(0, (size - 1))) {\n deletePublicationDir(new File(moduleDir, pubDirName));\n }\n }\n }",
"public void removeModule(ModulePanel panel) {\n\t\tfor (ConnectablePanel connectablePanel : panel.getConnectablePanels()) {\n\t\t\tConnector currentConnector = connectablePanel.getConnector();\n\t\t\t\n\t\t\t// Go through all of the connections\n\t\t\tfor (Connection\tconnection : getConnections()) {\n\t\t\t\t\n\t\t\t\t// If either of the connections are from this connector, \n\t\t\t\tif (currentConnector == connection.getOrigin() ||\n\t\t\t\t\tcurrentConnector == connection.getDestination()) {\n\t\t\t\t\tthis.removeConnection(connection);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tboxes.removeAll(panel.getConnectablePanels());\n\t\tremove(panel);\n\t\t\n\t\tApp.data.removeModule(panel);\n\t\tApp.synthModel.removeInstance(panel.getInstance());\n\t\t\n\t\trepaint();\n\t}",
"public void deleteGroup(Group group);",
"int deleteByExample(TLinkmanExample example);",
"Module getModule(ModuleCode modCode) throws CommandException;",
"public void deleteFromPA(IGUIBlock block) {\n Block toDelete = blockLink.getBlockFromGUIBlock(block);\n blockHandler.deleteProgram(toDelete);\n blockLink.removeBlock(block);\n }",
"int deleteByExample(AdminTabExample example);",
"public boolean delete(int menuId);",
"void onModuleRemoved(ModularConfigurationModule<T> module) {\n for (String name : module.getNames()) {\n ModularConfigurationEntry<T> e = getIfExists(name);\n if (e != null) {\n e.onModuleRemoved(module);\n }\n }\n }",
"public void closeModule() {\n\n }",
"private static void deletePackage(Path repoPath, Path pkgDirPath, String fullPkgPath, String pkgName) {\n try {\n Path path = repoPath.resolve(pkgDirPath);\n // Delete the package zip\n Files.deleteIfExists(path.resolve(pkgName + ProjectDirConstants.BLANG_COMPILED_PKG_EXT));\n\n // Delete the empty directories\n deleteEmptyParentDirs(path, repoPath);\n\n // Print that the package was successfully uninstalled\n outStream.println(fullPkgPath + \" successfully uninstalled\");\n } catch (IOException e) {\n throw LauncherUtils.createLauncherException(\"uninstalling module \" + fullPkgPath + \" was unsuccessful\");\n }\n }",
"@Override\r\n\tpublic int deleteBook(int book_id) {\n\t\treturn 0;\r\n\t}",
"public void deleteNode(String node) {\n nodeRepository.delete(new Node(node));\n }",
"void removeHadithChapterNo(Object oldHadithChapterNo);",
"public void delete(int roleId) throws QuestionBankSystemException,\n\t\t\tQuestionBankException;",
"@Indexable(type = IndexableType.DELETE)\n @Override\n public Libro deleteLibro(long isbn) throws PortalException, SystemException {\n return libroPersistence.remove(isbn);\n }",
"public String deleteProductionBlock(ProductionBlock pb);",
"public void deleteSection(String sectionId) {\n\t\t\r\n\t}",
"public void deleteBook(int num)\n { \n bookList.remove(num); \n }",
"public void unregisterModule(Enum event, IModule module) {\n eventQueue.unregisterModule(event, module);\n }",
"public void deleteContent(String spaceId, String contentId);",
"public DiffBuilder withModuleRemoved(Module module) {\n ModuleDiff.Builder diffBuilder = new ModuleDiff.Builder(module, null);\n diffBuilder.withVersionImpact(SemverImpact.MAJOR);\n diffBuilder.build().ifPresent(packageDiff::addModuleDiff);\n return this;\n }",
"private void deleteBook() {\n readViews();\n final BookEntry bookEntry = new BookEntry(mNameString, mQuantityString, mPriceString, mSupplier, mPhoneString);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n // Delete the book only if mBookId matches DEFAULT_BOOK_ID\n if (mBookId != DEFAULT_BOOK_ID) {\n bookEntry.setId(mBookId);\n mDb.bookDao().deleteBook(bookEntry);\n }\n finish();\n }\n });\n\n }",
"public void removeByTodoDocumentLibrary(String todoDocumentLibrary);",
"public void eliminar(Producto producto) throws IWDaoException;",
"int deleteByExample(LtsprojectpoExample example);",
"int deleteByExample(PensionRoleMenuExample example);",
"public void eliminar(Producto producto) throws BusinessErrorHelper;",
"public static void uninstallPackage(String fullPkgPath) {\n String orgName;\n String packageName;\n String version;\n // Get org-name\n int orgNameIndex = fullPkgPath.indexOf(\"/\");\n if (orgNameIndex == -1) {\n throw LauncherUtils.createLauncherException(\"no org-name is provided\");\n }\n orgName = fullPkgPath.substring(0, orgNameIndex);\n\n // Get package name\n int packageNameIndex = fullPkgPath.indexOf(\":\");\n if (packageNameIndex == -1) { // version is not provided\n throw LauncherUtils.createLauncherException(\"no module version is provided\");\n }\n packageName = fullPkgPath.substring(orgNameIndex + 1, packageNameIndex);\n version = fullPkgPath.substring(packageNameIndex + 1, fullPkgPath.length());\n\n Path homeRepoPath = BALLERINA_HOME_PATH.resolve(ProjectDirConstants.DOT_BALLERINA_REPO_DIR_NAME);\n Path cacheRepoPath = BALLERINA_HOME_PATH.resolve(ProjectDirConstants.CACHES_DIR_NAME)\n .resolve(ProjectDirConstants.BALLERINA_CENTRAL_DIR_NAME);\n Path pkgDirPath = Paths.get(orgName, packageName, version);\n\n // Check if module is installed locally\n if (Files.exists(homeRepoPath.resolve(pkgDirPath), LinkOption.NOFOLLOW_LINKS)) {\n deletePackage(homeRepoPath, pkgDirPath, fullPkgPath, packageName);\n } else if (Files.exists(cacheRepoPath.resolve(pkgDirPath), LinkOption.NOFOLLOW_LINKS)) {\n deletePackage(cacheRepoPath, pkgDirPath, fullPkgPath, packageName);\n } else {\n // module to be uninstalled doesn't exists\n throw LauncherUtils.createLauncherException(\"incorrect module signature provided \" + fullPkgPath);\n }\n }",
"int deleteByExample(TbJobProcessNodeRelationEntityExample example);",
"boolean delete(PageId pageId);",
"public void deleteForum(Forum forum);",
"public void deleteEquipoComunidad(EquipoComunidad equipoComunidad);",
"private void deleteBook() {\n if (currentBookUri != null) {\n int rowsDeleted = getContentResolver().delete(currentBookUri, null, null);\n\n // Confirmation or failure message on whether row was deleted from database\n if (rowsDeleted == 0)\n Toast.makeText(this, R.string.editor_activity_book_deleted_error, Toast.LENGTH_SHORT).show();\n else\n Toast.makeText(this, R.string.editor_activity_book_deleted, Toast.LENGTH_SHORT).show();\n }\n finish();\n }",
"public void deleteMission(Mission mission) throws IllegalArgumentException;",
"void deleteCartBundle(final int bundleNo) throws CommerceCartModificationException;",
"private void removeFromCacheDirty(String moduleId, String ownerId, String copyId) throws NoStorageForModuleException, StorageFailureException{\n\t\tremoveFromCache(moduleId, ownerId, copyId)\t;\n\t\tIModuleStorage storage = storages.get(moduleId);\n\t\tif (storage==null){\n\t\t\tthrow new NoStorageForModuleException(moduleId);\n\t\t}\n\t\tstorage.deleteModule(ownerId, copyId);\n\t}",
"public boolean delete(String username, int menuId);",
"public Module updateModule(Long mid, Module module){\n Module updateModule = repository.findById(mid).get();\n updateModule.setTitle(module.getTitle());\n return updateModule;\n }",
"public void delete(Book book){\n try{\n String query = \"DELETE FROM testdb.book WHERE id=\" + book.getId();\n DbConnection.update(query);\n }\n catch(Exception e){\n e.printStackTrace();\n }\n }",
"public void delete(String so_cd);",
"void deleteRecipe(RecipeObject recipe);",
"public void eliminar(Long id) throws AppException;",
"int deleteByPrimaryKey(String menuId);",
"void deleteProduct(Integer productId);",
"void deleteMaterial(int materialID);",
"public void remDefinedInModule(){\n ((MvwDefinitionDMO) core).remDefinedInModule();\n }",
"public final InvokeScriptedProcessor removeModuleDirectory() {\n properties.remove(MODULE_DIRECTORY_PROPERTY);\n return this;\n }",
"public void deleteBlock(JsonObject block){\n blocks.remove(Hash.getHashString(block.toString()));\n }",
"int deleteByExample(ReleaseSystemExample example);",
"@Override\r\n\tpublic int delete(int cms_bno) throws Exception {\n\t\treturn sql.delete(\"cms_board.delete\", cms_bno);\r\n\t}",
"void deleteItem(IDAOSession session, int id);",
"private void deleteBook() {\n // Only perform the delete if this is an existing book.\n if (currentBookUri != null) {\n // Delete an existing book.\n int rowsDeleted = getContentResolver().delete(currentBookUri, null,\n null);\n\n // Show a toast message depending on whether or not the delete was successful.\n if (rowsDeleted == 0) {\n // If no rows were deleted, then there was an error with the delete.\n Toast.makeText(this, R.string.delete_error, Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the delete was successful, display a toast.\n Toast.makeText(this, R.string.delete_successful, Toast.LENGTH_SHORT).show();\n }\n }\n // Exit the activity.\n finish();\n }",
"int deleteByExample(RepStuLearningExample example);",
"int deleteByExample(SysRoleDOExample example);",
"int deleteByPrimaryKey(Integer roleId);",
"int deleteByPrimaryKey(Integer roleId);",
"@Override\n\tpublic int deleteProduct(String productNo) {\n\t\treturn 0;\n\t}",
"int deleteByPrimaryKey(String courseId);",
"@Override\r\n\tpublic int deleteByExample(FarmerCreditExample example) {\n\t\treturn farmerCreditDao.deleteByExample(example);\r\n\t}",
"@Override\n\tpublic int deletePMIArticle(String id) {\n\t\treturn personmanagemarticleMapper.deleteByPrimaryKey(id);\n\t}",
"int deleteByExample(cskaoyan_mall_order_goodsExample example);",
"public void deleteRefactoring(String refactoringId);",
"void delete(Book book);",
"@Override\r\n\tpublic int deleteByExample(ManageNursingContentExample example)\r\n\t\t\tthrows Exception {\n\t\treturn mContentMapper.deleteByExample(example);\r\n\t}",
"void deleteRecipe(Recipe recipe) throws ServiceFailureException;",
"int deleteByPrimaryKey(String menuid);",
"int deleteByExample(GrpTagExample example);",
"int deleteByExample(SysIdExample example);",
"int deleteByPrimaryKey(String bookId);",
"@Override\r\n\tpublic void deleteMenmberMode(MenmberMode menmberMode) {\n\t\tgetHibernateTemplate().delete(menmberMode);\r\n\t}",
"int deleteByExample(FileRecordAdminExample example);",
"public void removeBycourse_id(long course_id);",
"int deleteByPrimaryKey(String bookIsbn);",
"@Override\n\tpublic int deleteBook(int bookID) {\n\t\treturn 0;\n\t}",
"public void deleteItem(String nomItem) {\r\n \t\titems.removeItem(nomItem);\r\n \t}",
"void deleteCmdlet(long cmdletID) throws IOException;",
"int deleteByExample(CliStaffProjectExample example);"
]
| [
"0.7072958",
"0.69937426",
"0.69458044",
"0.69297373",
"0.6836185",
"0.6621391",
"0.63683677",
"0.6234377",
"0.6216494",
"0.6148034",
"0.60615814",
"0.60140437",
"0.5999438",
"0.59936994",
"0.5955656",
"0.5841199",
"0.57526445",
"0.57217556",
"0.5547915",
"0.55460083",
"0.53625834",
"0.5311055",
"0.529485",
"0.5259528",
"0.5247113",
"0.523575",
"0.5221443",
"0.5210761",
"0.52010065",
"0.5199522",
"0.51935685",
"0.51779246",
"0.5157295",
"0.5151915",
"0.5147748",
"0.5141978",
"0.51350707",
"0.5115061",
"0.5111188",
"0.50805146",
"0.50480074",
"0.50446165",
"0.5037433",
"0.5021029",
"0.5020247",
"0.49905026",
"0.49801487",
"0.49796268",
"0.49780175",
"0.49724254",
"0.4971985",
"0.495447",
"0.4948099",
"0.49470654",
"0.49437732",
"0.49432796",
"0.494136",
"0.494074",
"0.49397555",
"0.49381864",
"0.49258038",
"0.49152452",
"0.4912709",
"0.4909956",
"0.4909304",
"0.4904042",
"0.48976693",
"0.4895719",
"0.48956454",
"0.48950112",
"0.4892797",
"0.48905835",
"0.48890105",
"0.4887579",
"0.4883488",
"0.4881931",
"0.48790833",
"0.487508",
"0.487508",
"0.48745462",
"0.48600098",
"0.48576525",
"0.4851868",
"0.4850412",
"0.48447722",
"0.48443156",
"0.4838584",
"0.4833839",
"0.48335353",
"0.48290893",
"0.48273775",
"0.4826143",
"0.4825304",
"0.48224097",
"0.48210433",
"0.48204416",
"0.48152643",
"0.48110712",
"0.4810098",
"0.48094237"
]
| 0.8323938 | 0 |
Gets the requested module based on given modCode. | Module getModule(ModuleCode modCode) throws CommandException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Module findModule(String moduleName) {\n if(modules.containsKey(moduleName))\n return modules.get(moduleName);\n //TODO: search in joined mobiles\n return null;\n }",
"public String getModuleCode() {\r\n\t\treturn moduleCode;\r\n\t}",
"public String getModuleCode() {\r\n\t\treturn moduleCode;\r\n\t}",
"public void setModuleCode(String moduleCode) {\r\n\t\tthis.moduleCode = moduleCode;\r\n\t}",
"public void setModuleCode(String moduleCode) {\r\n\t\tthis.moduleCode = moduleCode;\r\n\t}",
"public static RegisterModuleType codeOf(Object code) {\n if (code == null) { return null; }\n if (code instanceof RegisterModuleType) { return (RegisterModuleType)code; }\n return _codeValueMap.get(code.toString().toLowerCase());\n }",
"public static UpdateModuleType codeOf(Object code) {\n if (code == null) { return null; }\n if (code instanceof UpdateModuleType) { return (UpdateModuleType)code; }\n return _codeValueMap.get(code.toString().toLowerCase());\n }",
"public DcModule getModule();",
"public ProgramModule getModule(String treeName, String name);",
"@Override\n\tpublic ModuleInfo getModule(String mac) throws HFModuleException {\n\t\tLog.d(\"HFModuleManager\", \"getModule\");\n//\t\tif (!this.isCloudChannelLive()) {\n//\t\t\tthrow new HFModuleException(HFModuleException.ERR_USER_OFFLINE,\n//\t\t\t\t\t\"User is not online\");\n//\t\t}\n\t\t\n\t\tModuleInfo mi = getHFModuleHelper().getRemoteModuleInfoByMac(mac);\n\t\tif (mi == null) {\n\t\t\tthrow new HFModuleException(\n\t\t\t\t\tHFModuleException.ERR_GET_REMOTE_MODULEINFO,\n\t\t\t\t\t\"get moduleinfo from remote err\");\n\t\t}\n\t\tif (mi.getModuleId() == null) {\n\t\t\treturn mi;\n\t\t}\n\t\t\n\t\tModuleIdPayload payload = new ModuleIdPayload();\n\t\tpayload.setModuleId(mi.getModuleId());\n\t\tModuleGetRequest request = new ModuleGetRequest(payload);\n\t\ttry {\n\t\t\tModuleInfoResponse response = cloudModuleManager.getModule(request);\n\t\t\tModuleInfo responseModuleInfo = response.getPayload();\n\t\t\tresponseModuleInfo.setLocalIp(mi.getLocalIp());\n\t\t\tgetHFModuleHelper().addRemoteModuleInfo(responseModuleInfo);\n\t\t\t\n\t\t\treturn responseModuleInfo;\n\t\t} catch (CloudException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\treturn mi;\n//\t\ttry {\n//\t\t\tString reqTemplate = \"{'PL':{'moduleId':'#moduleId#'},'CID':30031,'SID':'#SID#'}\";\n//\t\t\tString req = reqTemplate.replaceFirst(\"#moduleId#\", mi.getModuleId())\n//\t\t\t\t\t.replaceFirst(\"#SID#\", getsid());\n//\n//\t\t\tString rsp = HttpProxy.reqByHttpPost(req);\n//\t\t\tJSONObject jo = new JSONObject(rsp);\n//\n//\t\t\tif (jo.isNull(\"RC\")) {\n//\t\t\t\tthrow new HFModuleException(\n//\t\t\t\t\t\tHFModuleException.ERR_GET_REMOTE_MODULEINFO,\n//\t\t\t\t\t\t\"get moduleinfo from remote err\");\n//\t\t\t}\n//\t\t\tif (jo.getInt(\"RC\") == 1) {\n//\t\t\t\tJSONObject rspPL = jo.getJSONObject(\"PL\");\n//\t\t\t\tModuleInfo rspInfo = new ModuleInfo();\n//\t\t\t\trspInfo.fromJson(rspPL);\n//\n//\t\t\t\tif (mi != null) {\n//\t\t\t\t\trspInfo.setLocalIp(mi.getLocalIp());\n//\t\t\t\t}\n//\t\t\t\tgetHFModuleHelper().addRemoteModuleInfo(mi);\n//\t\t\t\treturn rspInfo;\n//\t\t\t} else {\n//\t\t\t\treturn mi;\n//\t\t\t}\n//\t\t} catch (JSONException e) {\n//\t\t\treturn mi;\n//\t\t}\n\t}",
"public resPackageMembership getPackageMembershipByCode(long code){\n Optional<resPackageMembership> packageMembership = repoPackageMembership.findById(code);\n if(packageMembership.isPresent())\n return packageMembership.get();\n else\n //throw exception\n return null;\n }",
"public Module getModule(String name) {\n\t\tif (this._modules == null)\n\t\t\treturn null;\n\t\treturn _modules.get(name);\n\t}",
"public static Module getModuleForIndex(int index) {\r\n return getModule((String) KEYS.get(index));\r\n }",
"@RequestMapping(value = \"/modules/{year}/{semester}/{moduleCode}\", method = RequestMethod.GET)\n public @ResponseBody List<Module> getModules(@PathVariable String year, @PathVariable String semester, @PathVariable String moduleCode){\n return creatorService.getModules(year, semester, moduleCode);\n }",
"public Event getEventFromCode(String code) {\r\n // Gets the events collection and creates a query string for the event code\r\n MongoCollection<Document> events = mongoDB.getCollection(\"Events\");\r\n Document query = new Document(\"eventCode\", code);\r\n\r\n // Loops over events found matching the id, returning the first one\r\n for (Event event : events.find(query, Event.class)) {\r\n return event;\r\n }\r\n\r\n // Returns null if none are found\r\n return null;\r\n }",
"protected static Module getModule(String workspaceId, String modelId,\n String moduleId) throws AnaplanAPIException {\n Model model = getModel(workspaceId, modelId);\n\n if (model == null) {\n return null;\n }\n if (moduleId == null || moduleId.isEmpty()) {\n LOG.error(\"A module ID must be provided\");\n return null;\n }\n Module module = model.getModule(moduleId);\n if (module == null) {\n LOG.error(\"Module \\\"{}\\\" not found in workspace \\\"{}\\\", model \\\"{}\\\"\", moduleId, workspaceId, modelId);\n }\n return module;\n }",
"public <T extends AModule> T getModule(Class<T> moduleId)\n\t{\n\t\treturn getModuleOpt(moduleId)\n\t\t\t\t.orElseThrow(() -> new ModuleNotFoundException(moduleMessage(moduleId, \"not found\")));\n\t}",
"private ICMPAuthenticationModule getAuthModule(final String module, final String parameter, final PKIMessage pkimsg) {\n\t\tif(StringUtils.equals(module, CmpConfiguration.AUTHMODULE_HMAC)) {\n\t\t\tfinal HMACAuthenticationModule hmacmodule = new HMACAuthenticationModule(parameter);\n\t\t\thmacmodule.setSession(this.admin, this.userAdminSession, this.certificateStoreSession);\n\t\t\thmacmodule.setCaInfo(this.cainfo);\n\t\t\treturn hmacmodule;\n\t\t} else if(StringUtils.equals(module, CmpConfiguration.AUTHMODULE_ENDENTITY_CERTIFICATE)) {\n\t\t\tfinal EndEntityCertificateAuthenticationModule eemodule = new EndEntityCertificateAuthenticationModule(parameter);\n\t\t\teemodule.setSession(this.admin, this.caAdminSession, this.certificateStoreSession, this.authorizationSessoin, this.eeProfileSession, this.userAdminSession);\n\t\t\treturn eemodule;\n\t\t}\n\t\tif(!CmpConfiguration.getRAOperationMode()) {\n\t\t\tif(StringUtils.equals(module, CmpConfiguration.AUTHMODULE_REG_TOKEN_PWD)){\n\t\t\t\treturn new RegTokenPasswordExtractor();\n\t\t\t} else if(StringUtils.equals(module, CmpConfiguration.AUTHMODULE_DN_PART_PWD)) {\n\t\t\t\treturn new DnPartPasswordExtractor(parameter);\n\t\t\t}\n\t\t}\t\t\t\n\t\terrMsg = \"Unrecognized authentication module '\" + module + \"'\";\n\t\treturn null;\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic <T extends AModule> Optional<T> getModuleOpt(Class<T> moduleId)\n\t{\n\t\tfinal AModule aModule = modules.get(moduleId);\n\t\tif (aModule != null)\n\t\t{\n\t\t\treturn Optional.of((T) aModule);\n\t\t}\n\t\treturn modules.values().stream()\n\t\t\t\t.filter(m -> m.getClass().equals(moduleId))\n\t\t\t\t.map(a -> (T) a)\n\t\t\t\t.findFirst();\n\t}",
"public static Module getModule(String key) {\r\n Module module = null;\r\n module = (Module) SET.get(key);\r\n module.setSymbol(key);\r\n return module;\r\n }",
"@RequestMapping(value = { \"/edit-module-{code}\" }, method = RequestMethod.GET)\n\t\tpublic String editModule(@PathVariable String code, ModelMap model) {\n\n\t\t\tmodel.addAttribute(\"students\", studentService.listAllStudents());\n\t\t\tmodel.addAttribute(\"teachers\", teacherService.listAllTeachers());\n\t\t\tModule module = moduleService.findByCode(code);\n\t\t\tmodel.addAttribute(\"module\", module);\n\t\t\tmodel.addAttribute(\"edit\", true);\n\t\t\t\n\t\t\treturn \"addStudentToModule\";\n\t\t}",
"@RequestMapping(value = { \"/delete-module-{code}\" }, method = RequestMethod.GET)\n\t\tpublic String deleteModule(@PathVariable String code) {\n\t\t\tmoduleService.deleteByCode(code);\n\t\t\treturn \"redirect:/moduleList\";\n\t\t}",
"public Module getModule(Long id) {\n\t\tRecord row = dslContext.selectFrom(table(CmsTable.MODULES.getTableName()))\n\t\t\t\t.where(field(\"id\").equal(id)).fetchOne();\n\t\t\n\t\treturn row == null ? null : row.map(new ModuleRecordMapper());\n\t}",
"Module getById(Long identifier) throws DBException;",
"private Module selectModuleFromPath(String path) {\n\n\t\tModule module = modules.get(path);\n\t\tif (module != null)\n\t\t\treturn module;\n\t\telse\n\t\t\treturn new DiscardingModule();\n\t}",
"public RubyModule getModule(String name) {\n return (RubyModule) objectClass.getConstantAt(name);\n }",
"public ItemCart lookup(int code) {\n\t\tfor (int i = 0; i < listItemcart.size(); i++) {\n\t\t\tItemCart item = listItemcart.get(i);\n\t\t\tif (code == item.getP().getId())\n\t\t\t\treturn item;\n\n\t\t}\n\t\treturn null;\n\n\t}",
"public static ILookupProfile getLookupItem(String className, String code) {\r\n\t\tif (code == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\t// Instantiate a ServiceLocator instance.\r\n\t\tServiceLocator svcLocator = ServiceLocator.getInstance();\r\n\r\n\t\t// Get an instance of lookup facade from service locator.\r\n\t\tLookupFacade lookupFacade = (LookupFacade) svcLocator.getBean(\"lookupFacade\");\r\n\r\n\t\t// Retrieve the result by calling the lookupfacade's lookup list.\r\n\t\tLookupFacadeResult lookupResult = lookupFacade.getLookupList(className);\r\n\t\tList<ILookupProfile> lookupItemList = lookupResult.getLookupList();\r\n\t\tfor (ILookupProfile lookupItem : lookupItemList) {\r\n\t\t\tif (code.equalsIgnoreCase(lookupItem.getCode())) {\r\n\t\t\t\treturn lookupItem;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public static Service retrieve(String code) {\n \treturn find.ref(code); \n }",
"Optional<Module> getReadModule();",
"public Optional<T> getModule() {\n return Optional.ofNullable(this.module);\n }",
"String getModuleId();",
"public ModuleReference getModule (String name) {\n ModuleReference ref = this.moduleTable.get(name);\n if (ref == null) {\n \tthrow new IllegalArgumentException(\"Module \\\"\" + name + \"\\\" does not exist.\");\n }\n \n return ref;\n }",
"String getModID();",
"String getModID();",
"GameCode getGameCode(String gameCode);",
"public String module(String name)\n {\n return modules.get(name);\n }",
"public static <T extends Module> T getModule(Class<T> type, Map<Class, Module> map) {\n return type.cast(map.get(type));\n }",
"public java.lang.CharSequence getModule() {\n return module;\n }",
"@Override\n\tpublic mOrders loadAnOrderbyOrderCode(String orderCode) {\n\t\ttry{\n\t\t\tbegin();\n\t\t\tCriteria criteria = getSession().createCriteria(mOrders.class);\n\t\t\tcriteria.add(Restrictions.eq(\"O_Code\", orderCode));\n\t\t\tList<mOrders> o= criteria.list();\n\t\t\tcommit();\n\t\t\tif(o.size()>0)\n\t\t\treturn o.get(0);\n\t\t\telse return null;\n\t\t} catch (HibernateException e){\n\t\t\te.printStackTrace();\n\t\t\trollback();\n\t\t\tclose();\n\t\t\treturn null;\n\t\t}finally {\n\t\t\tflush();\n\t\t\tclose();\n\t\t}\n\t}",
"public abstract String getModuleName( );",
"public int getModuleId();",
"public SysDictData selectDictDataById(Long dictCode);",
"public static IStandardFieldLookupProfile getStandardFieldLookupItem(String className, String code) {\r\n\t\tif (code == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\t// Instantiate a ServiceLocator instance.\r\n\t\tServiceLocator svcLocator = ServiceLocator.getInstance();\r\n\r\n\t\t// Get an instance of lookup facade from service locator.\r\n\t\tLookupFacade lookupFacade = (LookupFacade) svcLocator.getBean(\"lookupFacade\");\r\n\r\n\t\t// Retrieve the result by calling the lookupfacade's lookup list.\r\n\t\tList<IStandardFieldLookupProfile> lookupResult = lookupFacade.getStandardFieldLookupList(className);\r\n\t\tfor (IStandardFieldLookupProfile lookupItem : lookupResult) {\r\n\t\t\tif (code.equalsIgnoreCase(lookupItem.getCode())) {\r\n\t\t\t\treturn lookupItem;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public static Product selectProduct(String productCode) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n ResultSet rs = null;\n\n String query = \"SELECT * FROM Product \"\n + \"WHERE productCode = ?\";\n \n try {\n ps = connection.prepareStatement(query);\n ps.setString(1, productCode);\n rs = ps.executeQuery();\n Product p = null;\n if (rs.next()) {\n p = new Product();\n p.setProductCode(rs.getString(\"productCode\"));\n p.setProductName(rs.getString(\"productName\"));\n p.setCatalogCategory(rs.getString(\"catalogCategory\"));\n p.setDescription(rs.getString(\"description\"));\n p.setPrice(Float.parseFloat(rs.getString(\"price\")));\n p.setImageURL(rs.getString(\"imageURL\"));\n ///For test purposes only //System.out.println(\"DBSetup @ line 323 \" + p.getProductCode());\n }\n return p;\n } catch (SQLException e) {\n System.out.println(e);\n return null;\n } finally {\n DBUtil.closeResultSet(rs);\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }",
"public java.lang.CharSequence getModule() {\n return module;\n }",
"public int getModuleID ()\n\n {\n\n // Returns moduleID when called.\n return moduleID;\n\n }",
"public String getMod() {\n\t\treturn this.mod;\n\t}",
"public PacketFactory get(int code) {\n PacketFactory tryFactory;\n tryFactory = this.packetFactories.get(Integer.valueOf(code));\n if(tryFactory == null) {\n tryFactory = new LcpPacketUnknownFactory(this.parent, code);\n this.packetFactories.put(Integer.valueOf(code), tryFactory);\n }\n return tryFactory;\n }",
"public int getCcdModule() {\n return ccdModule;\n }",
"public Effect getEffect(String effectCode){\n return this.registry.get(effectCode);\n }",
"public static Moderator getModerator(long modId) {\n HttpRequest request = HttpRequest.newBuilder().GET().uri(URI.create(\"http://localhost:8080/moderators/get/\" + modId)).build();\n HttpResponse<String> response = null;\n try {\n response = client.send(request, HttpResponse.BodyHandlers.ofString());\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n if (response.statusCode() != 200) {\n System.out.println(\"Status: \" + response.statusCode());\n }\n return gson.fromJson(response.body(), Moderator.class);\n }",
"public static ReserveTime getReserveTimeByCode(String Code)\n\t{\n\t\tConnection conn = DBConnection.getConnection();\n\t\tReserveTime reserveTime = new ReserveTime();\n\t\ttry {\n\t\t\tStatement stmt =conn.createStatement();\n\t\t\tString command = \"select * \" +\n\t\t\t\t\t\"from RESERVETIMES \" +\n\t\t\t\t\t\"where\" +\n\t\t\t\t\t\" Res_code_ID = \" +\n\t\t\t\t\tCode;\n\t\t\tResultSet rs=stmt.executeQuery(command);\n\t\t\tfillSingleReserveTime(rs, reserveTime);\n\t\t}catch(SQLException e)\n\t\t{\n\t\t\tLogger.getLogger(\"Exception\").log(Level.SEVERE, \"Exception \" + e);\n\t\t\treturn reserveTime;\n\t\t}finally {\n\t\t\tif(conn != null) {\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\tLogger.getLogger(\"Exception\").log(Level.SEVERE, \"Exception \" + e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn reserveTime;\n\t}",
"public ModuleDecision getModule() {\n return module;\n }",
"Module getModuleByFile(@NotNull VirtualFile file);",
"public oracle.jbo.Row getModule() {\n return (oracle.jbo.Row) getAttributeInternal(MODULE);\n }",
"public com.mozu.api.contracts.productadmin.Product getProduct(String productCode) throws Exception\r\n\t{\r\n\t\treturn getProduct( productCode, null);\r\n\t}",
"public static synchronized final MaxModule getModule() {\n if (sModule == null) {\n sModule = new MMXModule();\n }\n return sModule;\n }",
"public String getCode() {\n return (String) get(\"code\");\n }",
"private Module loadModule(String moduleId, String ownerId, String copyId) throws NoStorageForModuleException, NoStoredModuleEntityException, StorageFailureException{\n\t\tIModuleStorage storage = storages.get(moduleId);\n\t\tif (storage==null){\n\t\t\tthrow new NoStorageForModuleException(moduleId);\n\t\t}\n\t\treturn storage.loadModule(ownerId, copyId);\n\t}",
"public static String get(String code) {\n\n String valor = \"Propiedad no encontrada\";\n String aplicacion = System.getProperty(AGACE_PROPERTIES);\n aplicacion = \"/siat/fece/configuracion/AGACE_PROPIEDADES.properties\";\n Properties properties = null;\n\n try {\n properties = Propiedades.loadProperties(aplicacion);\n } catch (DocumentoException ex) {\n LOG.error(ex.getMessage(), ex);\n }\n\n if (properties != null) {\n valor = properties.getProperty(code);\n }\n\n return valor;\n }",
"@Override\n\tpublic VcmsPortion fetchByS_C(long groupId, String code) {\n\t\treturn fetchByS_C(groupId, code, true);\n\t}",
"@PermitAll\n @Override\n public Role getRole(String roleCode) {\n return getRepository().getEntity(Role.class, roleCode);\n }",
"public String getDeptForCode(String code) {\n return departmentMap.get(code);\n }",
"public String getModuleName ()\n\n {\n\n // Returns moduleName when called.\n return moduleName;\n\n }",
"Code getCode();",
"public int read(int addressCode) {\n Integer cacheValue = codes.get(addressCode);\n if(cacheValue != null) return cacheValue.intValue();\n\n int value = current.search(addressCode);\n if(value > -1) return value;\n\n// System.out.println(\"===== > \"+databases.size());\n for(int i = 0; i < databases.size(); i++) {\n// System.out.println(\" doc den database thu i \"+ databases.get(i).getName() + \" : \"+ i);\n if(databases.get(i) == current) continue;\n value = databases.get(i).search(addressCode);\n if(value < 0) continue;\n codes.put(addressCode, value);\n tempSize++;\n return value;\n }\n\n return -1;\n }",
"public ScOrgSeq selectByPrimaryKey(String orgCode) {\n ScOrgSeq key = new ScOrgSeq();\n key.setOrgCode(orgCode);\n ScOrgSeq record = (ScOrgSeq) getSqlMapClientTemplate().queryForObject(\"sc_org_seq.abatorgenerated_selectByPrimaryKey\", key);\n return record;\n }",
"public static Product getProductViaCode(int prodCode) {\r\n\t\tdbConnect();\r\n\t\tStatement stmt = null;\r\n\t\tResultSet rs = null;\r\n\t\tfinal String GET_PRODUCT = \"SELECT * FROM product WHERE product_code = \" + prodCode;\r\n\t\tProduct product = null;\r\n\t\ttry {\r\n\t\t\tstmt = conn.createStatement();\r\n\t\t\trs = stmt.executeQuery(GET_PRODUCT);\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tint productId = rs.getInt(1);\r\n\t\t\t\tint productCode = rs.getInt(2);\r\n\t\t\t\tString productName = rs.getString(3);\r\n\t\t\t\tString productUnit = rs.getString(4);\r\n\t\t\t\tString productDescription = rs.getString(5);\r\n\t\t\t\tdouble priceForPurchase = rs.getDouble(6);\r\n\t\t\t\tdouble priceForSales = rs.getDouble(7);\r\n\t\t\t\tdouble stockQuantity = rs.getDouble(8);\r\n\r\n\t\t\t\tproduct = new Product(productCode, productName, productUnit, productDescription, priceForPurchase,\r\n\t\t\t\t\t\tpriceForSales, stockQuantity);\r\n\t\t\t\tproduct.setProductId(productId);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tstmt.close();\r\n\t\t\trs.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn product;\r\n\t}",
"private ImgChannelDTO tryLoadChannel(String chosenChannelCode)\n {\n ImgChannelDTO channel = query.tryGetChannelForDataset(dataset.getId(), chosenChannelCode);\n // if not, we check at the experiment level\n if (channel == null && containerOrNull != null)\n {\n channel =\n query.tryGetChannelForExperiment(containerOrNull.getExperimentId(),\n chosenChannelCode);\n }\n return channel;\n }",
"@RequestMapping(value = \"/{id}\", method = RequestMethod.GET)\n\t\tResponseEntity<Optional<Modules>> getModById(@PathVariable long id) {\n\tOptional<Modules> post = repo.findById(id);\n\treturn ResponseEntity.ok(post);\n\t}",
"public MetadataModule getPhysicalModule() {\n\t\treturn attributes.getModule();\n\t}",
"StartedModule<?> getComponent(UUID id);",
"public String getTargetLabel(int code) {\n\t\tfor (String key : targetDictionary.values()) {\n\t\t\tif (targetDictionary.intern(key) == code) {\n\t\t\t\treturn key;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"private VerificationSteps.SubSteps getSubStepFromCode(String code) {\n for (VerificationSteps step :\n mVerificationSteps) {\n for (VerificationSteps.SubSteps subStep:\n step.subSteps) {\n if (subStep.code.equals(code)) {\n return subStep;\n }\n }\n }\n return null;\n }",
"public int getModuleId() {\n return moduleId_;\n }",
"public EventCode findById(Long eventCodeId)\n {\n EventCode eventCode = null;\n\n Session sess = null;\n try\n {\n SessionFactory fact = HibernateUtil.getSessionFactory();\n if (fact != null)\n {\n sess = fact.openSession();\n if (sess != null)\n {\n eventCode = (EventCode) sess.get(EventCode.class, eventCodeId);\n }\n else\n {\n log.error(\"Failed to obtain a session from the sessionFactory\");\n }\n }\n else\n {\n log.error(\"Session factory was null\");\n }\n }\n finally\n {\n if (sess != null)\n {\n try\n {\n sess.close();\n }\n catch (Throwable t)\n {\n log.error(\"Failed to close session: \" + t.getMessage(), t);\n }\n }\n }\n return eventCode;\n }",
"java.lang.String getCode();",
"java.lang.String getCode();",
"protected String getModuleId() {\n\n return moduleId;\n }",
"protected abstract Player getModPlayer(String name);",
"public org.mozilla.javascript.commonjs.module.ModuleScript getModuleScript(org.mozilla.javascript.Context r9, java.lang.String r10, java.net.URI r11, java.net.URI r12, org.mozilla.javascript.Scriptable r13) throws java.lang.Exception {\n /*\n r8 = this;\n r1 = r8.getLoadedModule(r10);\n r2 = getValidator(r1);\n if (r11 != 0) goto L_0x0019;\n L_0x000a:\n r0 = r8.moduleSourceProvider;\n r0 = r0.loadSource(r10, r13, r2);\n L_0x0010:\n r3 = org.mozilla.javascript.commonjs.module.provider.ModuleSourceProvider.NOT_MODIFIED;\n if (r0 != r3) goto L_0x0020;\n L_0x0014:\n r0 = r1.getModule();\n L_0x0018:\n return r0;\n L_0x0019:\n r0 = r8.moduleSourceProvider;\n r0 = r0.loadSource(r11, r12, r2);\n goto L_0x0010;\n L_0x0020:\n if (r0 != 0) goto L_0x0024;\n L_0x0022:\n r0 = 0;\n goto L_0x0018;\n L_0x0024:\n r3 = r0.getReader();\n r1 = r10.hashCode();\t Catch:{ all -> 0x007a }\n r4 = r8.loadLocks;\t Catch:{ all -> 0x007a }\n r5 = loadLockShift;\t Catch:{ all -> 0x007a }\n r1 = r1 >>> r5;\n r5 = loadLockMask;\t Catch:{ all -> 0x007a }\n r1 = r1 & r5;\n r4 = r4[r1];\t Catch:{ all -> 0x007a }\n monitor-enter(r4);\t Catch:{ all -> 0x007a }\n r1 = r8.getLoadedModule(r10);\t Catch:{ all -> 0x0077 }\n if (r1 == 0) goto L_0x0050;\n L_0x003d:\n r5 = getValidator(r1);\t Catch:{ all -> 0x0077 }\n r2 = equal(r2, r5);\t Catch:{ all -> 0x0077 }\n if (r2 != 0) goto L_0x0050;\n L_0x0047:\n r0 = r1.getModule();\t Catch:{ all -> 0x0077 }\n monitor-exit(r4);\t Catch:{ all -> 0x0077 }\n r3.close();\n goto L_0x0018;\n L_0x0050:\n r2 = r0.getUri();\t Catch:{ all -> 0x0077 }\n r1 = new org.mozilla.javascript.commonjs.module.ModuleScript;\t Catch:{ all -> 0x0077 }\n r5 = r2.toString();\t Catch:{ all -> 0x0077 }\n r6 = 1;\n r7 = r0.getSecurityDomain();\t Catch:{ all -> 0x0077 }\n r5 = r9.compileReader(r3, r5, r6, r7);\t Catch:{ all -> 0x0077 }\n r6 = r0.getBase();\t Catch:{ all -> 0x0077 }\n r1.<init>(r5, r2, r6);\t Catch:{ all -> 0x0077 }\n r0 = r0.getValidator();\t Catch:{ all -> 0x0077 }\n r8.putLoadedModule(r10, r1, r0);\t Catch:{ all -> 0x0077 }\n monitor-exit(r4);\t Catch:{ all -> 0x0077 }\n r3.close();\n r0 = r1;\n goto L_0x0018;\n L_0x0077:\n r0 = move-exception;\n monitor-exit(r4);\t Catch:{ all -> 0x0077 }\n throw r0;\t Catch:{ all -> 0x007a }\n L_0x007a:\n r0 = move-exception;\n r3.close();\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.mozilla.javascript.commonjs.module.provider.CachingModuleScriptProviderBase.getModuleScript(org.mozilla.javascript.Context, java.lang.String, java.net.URI, java.net.URI, org.mozilla.javascript.Scriptable):org.mozilla.javascript.commonjs.module.ModuleScript\");\n }",
"static String getDesc(String code) {\n\t\tString[] str = errorMap.get(code);\n\t\tif (str == null) {\n\t\t\treturn null;\n\t\t}\n\t\treturn str[1];\n\t}",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Module.cpp\", line = 323,\n FQN=\"llvm::Module::getModuleFlag\", NM=\"_ZNK4llvm6Module13getModuleFlagENS_9StringRefE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Module.cpp -nm=_ZNK4llvm6Module13getModuleFlagENS_9StringRefE\")\n //</editor-fold>\n public Metadata /*P*/ getModuleFlag(StringRef Key) /*const*/ {\n SmallVector<Module.ModuleFlagEntry> ModuleFlags/*J*/= new SmallVector<Module.ModuleFlagEntry>(8, new Module.ModuleFlagEntry());\n getModuleFlagsMetadata(ModuleFlags);\n for (final /*const*/ ModuleFlagEntry /*&*/ MFE : ModuleFlags) {\n if ($eq_StringRef(/*NO_COPY*/Key, MFE.Key.getString())) {\n return MFE.Val;\n }\n }\n return null;\n }",
"public Product getProduct(int productCode){\n\t\t/*\n\t\t * Il prodotto da restituire\n\t\t */\n\t\tProduct product = new Product();\n\t\t\n\t\t/*\n\t\t * Preleviamo il contenuto della tabella PRODOTTO.\n\t\t */\n\t\tPreparedStatement productStm = null;\n\t\tResultSet productRs = null;\n\t\t\n\t\tString sql = \"SELECT * FROM PRODOTTO WHERE CODICE = ?;\";\n\t\t\n\t\ttry{\n\t\t\tproductStm = connection.prepareStatement(sql);\n\t\t\tproductStm.setInt(1, productCode);\n\t\t\tproductRs = productStm.executeQuery();\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"DB issue: failed to retrive product data from database.\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\ttry{\n\t\t\tList<Product> productList = this.getProductListFromRs(productRs);\n\t\t\tproduct = productList.get(0);\n\t\t\t\n\t\t\tproductStm.close(); // Chiude anche il ResultSet productRs\n\t\t\tConnector.releaseConnection(connection);\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"ResultSet issue 2: failed to retrive data from ResultSet.\\n\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\treturn product;\n\t}",
"public Module module() {\n ////\n return module;\n }",
"public static Guns getByCode(int code) {\n switch (code){\n case 0:\n return RIFLE;\n case 1:\n return SHOTGUN;\n case 2:\n return REVOLVER;\n default:\n throw new IllegalArgumentException(\"Invalid gun code\");\n }\n }",
"public String getName(String code) throws ItemNotFoundException{\n\t \t \n\t \t \n\t \t ProduceNode p = LinkedList.first.next;\n\t \t \n\t \t for(int i=0; i<LinkedList.getLength(); i++) \n\t \t { \n\t \t\tif( p.data.getCode().equals(code))\n\t \t\t\n\t \t\t\treturn p.data.getName();\n\t \t \n\t \t p = p.next;\n\t \t }\n\t \t //return null;\n\t \t throw new ItemNotFoundException(\"Item is not found in the database\");\n\t \t \n\t \t\t}",
"String getCode();",
"String getCode();",
"String getCode();",
"String getCode();",
"String getCode();",
"public String getCode(){\n\t\treturn codeService;\n\t}",
"ModuleIdentifier getId();",
"public Optional<ModuleData> getModuleData(int moduleId, String name) throws SQLException {\n QueryBuilder<ModuleData, Integer> queryBuilder = DB.MODULE_DATA_DAO.queryBuilder();\n Where<ModuleData, Integer> where = queryBuilder.where();\n where.eq(\"module_id\", moduleId).and().eq(\"name\", name);\n\n PreparedQuery<ModuleData> preparedQuery = queryBuilder.prepare();\n\n\n ModuleData data = DB.MODULE_DATA_DAO.queryForFirst(preparedQuery);\n if (data != null) {\n return Optional.of(data);\n } else {\n return Optional.empty();\n }\n }",
"public int getModuleId() {\n return moduleId_;\n }",
"ConfigType getConfigTypeByCode(String typeCode);",
"public String getModuleName() {\n return moduleNameString;\n }",
"Value require(String module);"
]
| [
"0.6407209",
"0.61871743",
"0.61871743",
"0.61531407",
"0.61531407",
"0.610308",
"0.6083734",
"0.59093857",
"0.58156997",
"0.57817835",
"0.57799727",
"0.5741218",
"0.56413174",
"0.5595914",
"0.5509826",
"0.54978186",
"0.54639167",
"0.54107666",
"0.54098594",
"0.5402195",
"0.53544325",
"0.53229856",
"0.52862006",
"0.52495486",
"0.5215468",
"0.5212951",
"0.5204732",
"0.5190987",
"0.5178342",
"0.51650023",
"0.51598835",
"0.51375866",
"0.5135963",
"0.513436",
"0.513436",
"0.5120576",
"0.5096551",
"0.5073456",
"0.5042661",
"0.5041167",
"0.5027918",
"0.5026207",
"0.5014035",
"0.50023365",
"0.49955136",
"0.49793315",
"0.49776006",
"0.49446768",
"0.49297738",
"0.49199712",
"0.4905334",
"0.48859257",
"0.4883566",
"0.48744795",
"0.4864776",
"0.48402244",
"0.48277876",
"0.48164752",
"0.48160157",
"0.48112902",
"0.48042965",
"0.47988662",
"0.479616",
"0.47923753",
"0.47899124",
"0.47808683",
"0.47718424",
"0.47670224",
"0.47664377",
"0.47632462",
"0.47614273",
"0.47589737",
"0.47462168",
"0.47450688",
"0.47438395",
"0.4741659",
"0.47397944",
"0.4729016",
"0.4729016",
"0.47264165",
"0.47204012",
"0.47168818",
"0.47166932",
"0.4698481",
"0.4691113",
"0.46909848",
"0.46811667",
"0.46793273",
"0.46786535",
"0.46786535",
"0.46786535",
"0.46786535",
"0.46786535",
"0.46782216",
"0.46566424",
"0.46565112",
"0.46562812",
"0.464529",
"0.46057758",
"0.46000016"
]
| 0.75847304 | 0 |
Deletes the Exam from the specified module's lessons list. | void deleteExam(Module module, Exam target); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void deleteLesson(Module module, Lesson target);",
"void deleteModule(Module module);",
"@Override\r\n\tpublic Exam deleteExam(int id)\r\n\t{\n\t\treturn null;\r\n\t}",
"void delete(Exam exam);",
"@Override\n\tpublic void deleteExam(ExamBean exam) {\n\t\t\n\t}",
"@Override\n\tpublic void deleteModule() throws Exception {\n\n\t}",
"@Override\r\n\tpublic boolean removeExam(IExam exam) {\n\t\treturn false;\r\n\t}",
"void deleteLesson(int id) throws DataAccessException;",
"int deleteByExample(WfCfgModuleCatalogExample example);",
"int deleteByExample(TLinkmanExample example);",
"void addExamToModule(Module module, Exam exam);",
"public void deleteExempleDirect(ExempleDirect exempleDirect) throws DaoException;",
"int deleteByExample(WstatTeachingClasshourTeacherExample example);",
"int deleteByExample(AdminTabExample example);",
"int deleteByExample(RepStuLearningExample example);",
"private CommandResult deleteLesson() throws KolinuxException {\n timetable.executeDelete(parsedArguments);\n logger.log(Level.INFO, \"User has deleted\" + parsedArguments[0].toUpperCase()\n +\n \" from the timetable.\");\n return new CommandResult(parsedArguments[0].toUpperCase()\n +\n \" \" + parsedArguments[1].toUpperCase() + \" \" + parsedArguments[3] + \" \"\n +\n parsedArguments[2].toLowerCase()\n +\n \" has been deleted from timetable\");\n }",
"int deleteByExample(OnlineExample example);",
"int deleteByExample(TrainingCourseExample example);",
"int deleteByExample(Question11Example example);",
"int deleteByExample(IymDefAssignmentExample example);",
"public void removeModule(Discipline discipline, int module_id) throws SQLException{\r\n discipline.modules=new LinkedList<Module>();\r\n \r\n \r\n System.out.println();\r\n String SQLStatement = SQLInstruct.removeModule(discipline.getId(), module_id);\r\n db.updateDB(SQLStatement);\r\n updateModules(discipline);\r\n }",
"@Override\r\n\tpublic void deleteModules(Modules modules) {\n\t\tgetHibernateTemplate().delete(modules);\r\n\t}",
"int deleteByExample(WordSchoolExample example);",
"public void deleteStudentExam(Long studentExamId) {\n log.debug(\"Request to delete the student exam with Id : {}\", studentExamId);\n studentExamRepository.deleteById(studentExamId);\n }",
"void addLessonToModule(Module module, Lesson lesson);",
"@DeleteMapping(value = \"/{id}\")\n @ResponseStatus(HttpStatus.NO_CONTENT)\n public void deleteExam(@PathVariable long id) {\n examsService.delete(examsService.findById(id));\n }",
"public void delete(Long id) {\n log.debug(\"Request to delete Exam : {}\", id);\n examRepository.deleteById(id);\n }",
"int deleteByExample(TourstExample example);",
"private void delete(){\n solo.waitForView(R.id.search_action_button);\n solo.clickOnView(solo.getView(R.id.search_action_button));\n\n //Click on search bar\n SearchView searchBar = (SearchView) solo.getView(R.id.search_experiment_query);\n solo.clickOnView(searchBar);\n solo.sleep(500);\n\n //Type in a word from the description\n solo.typeText(0, searchTerm);\n\n //Make sure the experiment shows up\n assertTrue(solo.waitForText(description));\n\n //Click on experiment\n solo.clickOnText(description);\n\n //Click on more tab\n solo.waitForView(R.id.subscribe_button_experiment);\n solo.clickOnText(\"More\");\n\n //Click on unpublish button\n solo.clickOnView(solo.getView(R.id.delete_experiment_button));\n }",
"int deleteByExample(Question27Example example);",
"int deleteByExample(ProSchoolWareExample example);",
"public void removeModule(IPModule module);",
"int deleteByExample(UserCourseHistoryExample example);",
"int deleteByExample(Question14Example example);",
"int deleteByExample(DiscussExample example);",
"void removeHadithChapterIntro(Object oldHadithChapterIntro);",
"int deleteByExample(FinMonthlySnapModelExample example);",
"int deleteByExample(CourseExample example);",
"int deleteByExample(MenuInfoExample example);",
"int deleteByExample(PensionRoleMenuExample example);",
"public void deleteChapterWarningFragmentDoPositiveClick() {\n chapterManager.removeChapter();\n finish();\n }",
"private void removeLessonFragment() {\n\t\tFragmentManager fm = getSupportFragmentManager();\n\t\tFragment fragment = (Fragment) fm\n\t\t\t\t.findFragmentById(R.id.detailFragmentContainer);\n\t\tif (fragment != null) {\n\t\t\tFragmentTransaction ft = fm.beginTransaction();\n\t\t\tft.remove(fragment);\n\t\t\tft.commit();\n\t\t}\n\t}",
"int deleteByExample(TempletLinkExample example);",
"public void delete(long id) {\n SQLiteDatabase db = _openHelper.getWritableDatabase();\n if (db == null) {\n return;\n }\n db.delete(\"Exams\", \"_id = ?\", new String[] { String.valueOf(id) });\n db.close();\n }",
"int deleteByExample(TResearchTeachExample example);",
"@Override\n public void delete(ArrayList<League> leagues) {\n\n }",
"int deleteByExample(TourExample example);",
"int deleteByExample(SPermsExample example);",
"@Override\r\n\tpublic int deleteByExample(FarmerCreditExample example) {\n\t\treturn farmerCreditDao.deleteByExample(example);\r\n\t}",
"public void deleteExercise(Exercise exercise) {\n logger.info(\"Deleting exercise\");\n while (workoutExercises.contains(exercise)) {\n workoutExercises.remove(exercise);\n }\n }",
"int deleteByExample(NewsInfoExample example);",
"int deleteByExample(HomeWorkExample example);",
"int deleteByExample(PmPostExample example);",
"int deleteByExample(NewsExample example);",
"@Override\r\n\tpublic boolean removeExamManager(IUser user) {\n\t\treturn false;\r\n\t}",
"int deleteByExample(LtsprojectpoExample example);",
"int deleteByExample(ActivityHongbaoPrizeExample example);",
"int deleteByExample(WxNewsExample example);",
"public void deleteExamConfig(hu.advancedweb.model.ExamConfig examConfig)\n throws com.liferay.portal.kernel.exception.SystemException {\n _examConfigLocalService.deleteExamConfig(examConfig);\n }",
"int deleteByExample(CfgSearchRecommendExample example);",
"int deleteByExample(AbumExample example);",
"int deleteByExample(AccuseInfoExample example);",
"public void removeByTitle(String title);",
"int deleteByExample(TopicFragmentExample example);",
"public void remove(Ejemplar ej);",
"public void deleteExample(String classKey, int index, String type);",
"int deleteByExample(AdExample example);",
"int deleteByExample(MovimientoExample example);",
"int deleteByExample(AdminExample example);",
"@Override\r\n\tpublic void deleteWishList(int wishNo) throws Exception {\n\r\n\t}",
"@Override\r\n\tpublic int deleteByExample(WphPrivilegeExample example) {\n\t\treturn mapper.deleteByExample(example);\r\n\t}",
"int deleteByExample(QuestionExample example);",
"int deleteByExample(QuestionExample example);",
"int deleteByExample(QuestionExample example);",
"int deleteByExample(QuestionExample example);",
"int deleteByExample(CollectExample example);",
"int deleteByExample(ProcurementSourceExample example);",
"int deleteByExample(AutoAssessDetailExample example);",
"int deleteByExample(AgentLevelExample example);",
"public void delete(MiscellaneousRecord a){\n\t\t\t\tAssert.isTrue(LoginService.hasRole(\"HANDYWORKER\"));\n\t\t\t\tUserAccount logged = LoginService.getPrincipal();\n\t\t\t\tfor (Curricula c : curriculaService.findAll()) {\n\t\t\t\t\tif (c.getMiscellaneousRecords().contains(a)\n\t\t\t\t\t\t\t&& c.getHandyWorker().getUserAccount().equals(logged)) {\n\t\t\t\t\t\tc.getMiscellaneousRecords().remove(a);\n\t\t\t\t\t\tcurriculaService.save(c);\n\t\t\t\t\t\tmiscellaneousRecordRepository.delete(a);\n\t\t\t\t\t\t//System.out.println(\"se borra el miscellaneousRecord\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"@Override\r\n\tpublic int deleteByExample(ManageNursingContentExample example)\r\n\t\t\tthrows Exception {\n\t\treturn mContentMapper.deleteByExample(example);\r\n\t}",
"int deleteByExample(PracticeClassExample example);",
"@Override\r\n\tpublic int deleteByExample(EmpExample example) {\n\t\treturn 0;\r\n\t}",
"void deleteChallengeById(int id);",
"public static void deleteSubject(int i) {\n //delete lessons\n for(int x = 0; x < 5; x++) {\n for(int y = 0; y < 9; y++) {\n if(schedule.getLesson(x, y) != null) {\n Log.d(\"Storage\", \"Schedule: Lesson \" + x + y + \": \" + schedule.getLesson(x, y).getSubjectIndex());\n if (schedule.getLesson(x, y).getSubjectIndex() >= i) {\n if (schedule.getLesson(x, y).getSubjectIndex() == i) {\n schedule.setLessonToNull(x, y);\n }\n else {\n schedule.getLesson(x, y).setSubjectIndex(schedule.getLesson(x, y).getSubjectIndex()-1);\n }\n }\n if(schedule.getLesson(x, y) != null) {\n Log.d(\"Storage\", \"Schedule: Lesson \" + x + y + \": \" + schedule.getLesson(x, y).getSubjectIndex());\n }\n else {\n Log.d(\"Storage\", \"Schedule: Lesson \" + x + y + \": null\");\n }\n }\n }\n }\n\n //delete grades\n for(int n = i; n < Storage.grades.size(); n++) {\n for(int g = 0; g < Storage.grades.get(n).size(); g++) {\n if(n == i) {\n FileSaver.deleteGrade(Storage.grades.get(n).get(g));\n }\n else {\n FileSaver.renameGradeFolder(Storage.grades.get(n).get(g), FileSaver.GRADE_MINUS_SUBJECT_INDEX);\n }\n }\n }\n grades.remove(i);\n\n //delete homework\n for(int n = i; n < Storage.homework.size(); n++) {\n for(int h = 0; h < Storage.homework.get(n).size(); h++) {\n if(n == i) {\n FileSaver.deleteHomework(Storage.homework.get(n).get(h));\n }\n else {\n FileSaver.renameHomeworkFolder(Storage.homework.get(n).get(h), FileSaver.HOMEWORK_MINUS_SUBJECT_INDEX);\n }\n }\n }\n homework.remove(i);\n\n //delete subject\n subjects.remove(i);\n for(int n = i; n < Storage.subjects.size(); n++) {\n Storage.subjects.get(n).decreaseIndex();\n }\n }",
"int deleteByExample(CrawlExample example);",
"public static void deleteById(int idEtudiant, int idModule) {\n EntityManager em = GestionFactory.factory.createEntityManager();\n\n //\n em.getTransaction().begin();\n Note note = NoteDAO.getByEtudiantAndModule(idEtudiant, idModule);\n Note note2 = em.merge(note);\n em.remove(note2);\n em.getTransaction().commit();\n\n em.close();\n\n }",
"int deleteByExample(SeGroupExample example);",
"int deleteByExample(TbExpressTraceExample example);",
"boolean moduleHasExam(Module module, Exam exam);",
"int deleteByExample(CommonQuestionStrategyTypeExample example);",
"int deleteByExample(StudentExample example);",
"int deleteByExample(ProvidersExample example);",
"int deleteByExample(TCpySpouseExample example);",
"void removeHadithChapterNo(Object oldHadithChapterNo);",
"int deleteByExample(DisproductExample example);",
"@Override\n\tpublic void deleteStudToExamPlace(Map<String, Object> param) {\n\t\tExamManagement em = examManagementDao.getExamManagementListById(param,\n\t\t\t\tparam.get(\"termInfo\").toString());\n\t\tif (em == null) {\n\t\t\tthrow new CommonRunException(0, \"没有查询到相应的考试信息,请刷新页面!\");\n\t\t}\n\t\tInteger autoIncr = em.getAutoIncr();\n\t\tparam.put(\"autoIncr\", autoIncr);\n\t\texamManagementSetDao.deleteStudsWaiting(param);\n\t\tString acccount = param.get(\"acc\").toString();\n\t\tparam.put(\"accountId\", \"\");\n\t\tList<JSONObject> dlist = examManagementSetDao\n\t\t\t\t.getStudsInExamPlace(param);\n\t\tList<Map<String, Object>> inlist = new ArrayList<Map<String, Object>>();\n\t\tMap<String, Object> ob = new HashMap<String, Object>();\n\t\tif (dlist != null && dlist.size() > 0) {\n\t\t\tint maxSeatN = dlist.get(dlist.size() - 1)\n\t\t\t\t\t.getIntValue(\"seatNumber\");\n\t\t\tList<Integer> num = new ArrayList<Integer>();\n\t\t\tfor (int i = 0; i < dlist.size(); i++) {\n\t\t\t\tint seatNumber = dlist.get(i).getIntValue(\"seatNumber\");\n\t\t\t\tif (seatNumber != i + 1) {\n\t\t\t\t\tnum.add(i + 1);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (num.isEmpty()) {\n\t\t\t\tparam.put(\"seatNumber\", maxSeatN + 1);\n\t\t\t} else {\n\t\t\t\tparam.put(\"seatNumber\", num.get(0));\n\t\t\t}\n\t\t} else {\n\t\t\tparam.put(\"seatNumber\", 1);\n\t\t}\n\t\tparam.put(\"accountId\", acccount);\n\t\tinlist.add(param);\n\t\tob.put(\"autoIncr\", autoIncr);\n\t\tob.put(\"termInfo\", param.get(\"termInfo\"));\n\t\tob.put(\"list\", inlist);\n\t\texamManagementSetDao.saveArrangeExamResult(ob);\n\t\tif (param.containsKey(\"isKeepContinuous\")\n\t\t\t\t&& param.get(\"isKeepContinuous\").toString().equals(\"1\")) {// 进行排序\n\t\t\tthis.sortExamResult(param);\n\t\t}\n\t}",
"public void deleteWLMovie(){\n\t\tScanner input = new Scanner(System.in);\n\t\tprintMovieWL();\n\t\tint movieRank = 21;\n\t\tSystem.out.println(\"What number/rank on your wish list do you want to delete\");\n\t\twhile ((movieRank > numMP) || (movieRank < 1)){\n\t\t\ttry{\n\t\t\t\tmovieRank = input.nextInt();\n\t\t\t}\n\t\t\tcatch (InputMismatchException f) {\n\t\t\t\tSystem.out.println(\"That is not a valid movie rank, please enter another\");\n\t\t\t\tinput.nextLine();\n\t\t\t}\n\t\t\tif ((movieRank > numMP) || (movieRank < 1)){\n\t\t\t\tSystem.out.println(\"That rank is not in your list, please enter another\");\n\t\t\t}\n\t\t}\n\t\twhile ((movieRank) <= numMP){\n\t\t\tmoviePref[movieRank-1] = moviePref[movieRank];\n\t\t\tmovieRank++;\n\t\t}\n\t\tnumMP--;\n\t\tSystem.out.println(\"The movie has been successfully deleted\");\n\t}",
"int deleteByExample(QtActivitytypeExample example);",
"int deleteByExample(JzActExample example);"
]
| [
"0.72418445",
"0.60194236",
"0.59702486",
"0.59545237",
"0.57058865",
"0.55827963",
"0.55635166",
"0.55275065",
"0.54711497",
"0.54486734",
"0.54395545",
"0.543794",
"0.5419731",
"0.5396074",
"0.5338943",
"0.5315166",
"0.5310191",
"0.5300252",
"0.52898484",
"0.5266891",
"0.52579135",
"0.5233543",
"0.5227767",
"0.52262247",
"0.5217524",
"0.52157414",
"0.5153045",
"0.5148648",
"0.5141697",
"0.5132789",
"0.51316625",
"0.5124235",
"0.51164776",
"0.5112545",
"0.5104657",
"0.50895983",
"0.50885695",
"0.5065858",
"0.5049816",
"0.50300205",
"0.50296575",
"0.5024048",
"0.5016305",
"0.50137895",
"0.501053",
"0.5010032",
"0.5009936",
"0.500932",
"0.5003723",
"0.49998313",
"0.49965253",
"0.49919885",
"0.49753895",
"0.4967484",
"0.49673656",
"0.49597922",
"0.49561054",
"0.49549812",
"0.49495062",
"0.49474588",
"0.49425834",
"0.49311656",
"0.4928232",
"0.4923031",
"0.49209955",
"0.49192673",
"0.49168992",
"0.49168903",
"0.4912826",
"0.49089837",
"0.48989606",
"0.48973978",
"0.48973978",
"0.48973978",
"0.48973978",
"0.48967126",
"0.48964512",
"0.48921838",
"0.48843184",
"0.48794332",
"0.48784843",
"0.48743653",
"0.48667952",
"0.4859103",
"0.4859017",
"0.48534048",
"0.48466882",
"0.4833316",
"0.4832639",
"0.48312318",
"0.48306584",
"0.48266798",
"0.48207864",
"0.48174",
"0.4812205",
"0.48082808",
"0.4806579",
"0.4804247",
"0.47883144",
"0.47882357"
]
| 0.7410544 | 0 |
Deletes the Lesson from the specified module's lessons list. | void deleteLesson(Module module, Lesson target); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void deleteModule(Module module);",
"void deleteExam(Module module, Exam target);",
"void addLessonToModule(Module module, Lesson lesson);",
"void deleteLesson(int id) throws DataAccessException;",
"public void removeModule(Discipline discipline, int module_id) throws SQLException{\r\n discipline.modules=new LinkedList<Module>();\r\n \r\n \r\n System.out.println();\r\n String SQLStatement = SQLInstruct.removeModule(discipline.getId(), module_id);\r\n db.updateDB(SQLStatement);\r\n updateModules(discipline);\r\n }",
"private CommandResult deleteLesson() throws KolinuxException {\n timetable.executeDelete(parsedArguments);\n logger.log(Level.INFO, \"User has deleted\" + parsedArguments[0].toUpperCase()\n +\n \" from the timetable.\");\n return new CommandResult(parsedArguments[0].toUpperCase()\n +\n \" \" + parsedArguments[1].toUpperCase() + \" \" + parsedArguments[3] + \" \"\n +\n parsedArguments[2].toLowerCase()\n +\n \" has been deleted from timetable\");\n }",
"public void removeModule(IPModule module);",
"boolean moduleHasLesson(Module module, Lesson lesson);",
"@Override\n\tpublic void deleteModule() throws Exception {\n\n\t}",
"int deleteByExample(TLinkmanExample example);",
"private void removeLessonFragment() {\n\t\tFragmentManager fm = getSupportFragmentManager();\n\t\tFragment fragment = (Fragment) fm\n\t\t\t\t.findFragmentById(R.id.detailFragmentContainer);\n\t\tif (fragment != null) {\n\t\t\tFragmentTransaction ft = fm.beginTransaction();\n\t\t\tft.remove(fragment);\n\t\t\tft.commit();\n\t\t}\n\t}",
"int deleteByExample(RepStuLearningExample example);",
"@DeleteMapping(\"{id}\")\n public Lesson deleteLesson(@PathVariable long id) {\n //code\n return null;\n }",
"int deleteByExample(WstatTeachingClasshourTeacherExample example);",
"int deleteByExample(TempletLinkExample example);",
"int deleteByExample(TrainingCourseExample example);",
"@Override\r\n\tpublic void deleteModules(Modules modules) {\n\t\tgetHibernateTemplate().delete(modules);\r\n\t}",
"public void removeModule(Module module) {\n modules.entrySet().removeIf(entry -> (entry.getValue().equals(module)));\n if(module instanceof LightSource)\n Scene.removeLightSource((LightSource) module);\n }",
"int deleteByExample(TourstExample example);",
"int deleteByExample(WfCfgModuleCatalogExample example);",
"int deleteByExample(UserCourseHistoryExample example);",
"int deleteByExample(WordSchoolExample example);",
"public synchronized void removeWikiEntry(String title) {\r\n\t\twikiList.remove(title);\r\n\t}",
"public void removeCourse(Course c) {\n courseList.remove(c);\n numOfCourses--;\n }",
"int deleteByExample(OnlineExample example);",
"int deleteByExample(AdminTabExample example);",
"public void deleteMission(Mission mission) throws IllegalArgumentException;",
"public void deleteRefactoring(String refactoringId);",
"int deleteByExample(TourExample example);",
"public static void deleteById(int idEtudiant, int idModule) {\n EntityManager em = GestionFactory.factory.createEntityManager();\n\n //\n em.getTransaction().begin();\n Note note = NoteDAO.getByEtudiantAndModule(idEtudiant, idModule);\n Note note2 = em.merge(note);\n em.remove(note2);\n em.getTransaction().commit();\n\n em.close();\n\n }",
"public void removeByTitle(String title);",
"void removeHadithChapterIntro(Object oldHadithChapterIntro);",
"@Override\n public void delete(ArrayList<League> leagues) {\n\n }",
"public void removeBycourse_id(long course_id);",
"int deleteByExample(NewsExample example);",
"int deleteByExample(LtsprojectpoExample example);",
"public void deleteExempleDirect(ExempleDirect exempleDirect) throws DaoException;",
"public void deleteModule(int moduleId) {\n\t\tModule m = (Module)this.getHibernateTemplate().load(Module.class, moduleId);\n\t\t\n\t\tif(m.getChildren().size()>0){\n\t\t\tthrow new RuntimeException(\"有子模块\");\n\t\t}\n\t\tthis.getHibernateTemplate().delete(m);\n\t}",
"void removeHadithChapterNo(Object oldHadithChapterNo);",
"int deleteByExample(CourseExample example);",
"int deleteByExample(NewsInfoExample example);",
"public void remove(Student s1){\r\n this.studentList.remove(s1);\r\n }",
"int deleteByExample(ProSchoolWareExample example);",
"int deleteByExample(FinMonthlySnapModelExample example);",
"int deleteByExample(WxNewsExample example);",
"public String deleteByExample(BsNewsExample example) {\n BEGIN();\n DELETE_FROM(\"bs_news\");\n applyWhere(example, false);\n return SQL();\n }",
"public void removeByschoolId(long schoolId);",
"public static void deleteSubject(int i) {\n //delete lessons\n for(int x = 0; x < 5; x++) {\n for(int y = 0; y < 9; y++) {\n if(schedule.getLesson(x, y) != null) {\n Log.d(\"Storage\", \"Schedule: Lesson \" + x + y + \": \" + schedule.getLesson(x, y).getSubjectIndex());\n if (schedule.getLesson(x, y).getSubjectIndex() >= i) {\n if (schedule.getLesson(x, y).getSubjectIndex() == i) {\n schedule.setLessonToNull(x, y);\n }\n else {\n schedule.getLesson(x, y).setSubjectIndex(schedule.getLesson(x, y).getSubjectIndex()-1);\n }\n }\n if(schedule.getLesson(x, y) != null) {\n Log.d(\"Storage\", \"Schedule: Lesson \" + x + y + \": \" + schedule.getLesson(x, y).getSubjectIndex());\n }\n else {\n Log.d(\"Storage\", \"Schedule: Lesson \" + x + y + \": null\");\n }\n }\n }\n }\n\n //delete grades\n for(int n = i; n < Storage.grades.size(); n++) {\n for(int g = 0; g < Storage.grades.get(n).size(); g++) {\n if(n == i) {\n FileSaver.deleteGrade(Storage.grades.get(n).get(g));\n }\n else {\n FileSaver.renameGradeFolder(Storage.grades.get(n).get(g), FileSaver.GRADE_MINUS_SUBJECT_INDEX);\n }\n }\n }\n grades.remove(i);\n\n //delete homework\n for(int n = i; n < Storage.homework.size(); n++) {\n for(int h = 0; h < Storage.homework.get(n).size(); h++) {\n if(n == i) {\n FileSaver.deleteHomework(Storage.homework.get(n).get(h));\n }\n else {\n FileSaver.renameHomeworkFolder(Storage.homework.get(n).get(h), FileSaver.HOMEWORK_MINUS_SUBJECT_INDEX);\n }\n }\n }\n homework.remove(i);\n\n //delete subject\n subjects.remove(i);\n for(int n = i; n < Storage.subjects.size(); n++) {\n Storage.subjects.get(n).decreaseIndex();\n }\n }",
"int deleteByExample(DiscussExample example);",
"public Todo removeByURLTitle(String urlTitle) throws NoSuchTodoException;",
"int deleteByExample(Question11Example example);",
"public void removeCourse(String course);",
"void delete(Exam exam);",
"int deleteByPrimaryKey(String ipAddress, String module, String ne);",
"public void deleteTour(Tour t) {\r\n\t\t int i=Arrays.asList(tours).indexOf(t);\r\n\t\t\r\n\t\t tours[i]=null;\r\n\t\t }",
"int deleteByExample(FeiWenCommentExample example);",
"@Override\n\tpublic void deleteModule(String mac) throws HFModuleException {\n\t\tLog.d(\"HFModuleManager\", \"deleteModule\");\n\t\t\n\n\t\ttry {\n\t\t\tModuleInfo mi = getHFModuleHelper().getRemoteModuleInfoByMac(mac);\n\t\t\t// *******\n\t\t\tif (mi == null) {\n\t\t\t\tmi = getHFModuleHelper().getMyLocalModuleInfoByMac(mac);\n\t\t\t\tif (mi == null) {\n\t\t\t\t\tmi = getHFModuleHelper().getLocalModuleInfoByMac(mac);\n\t\t\t\t\tif (mi == null) {\n\t\t\t\t\t\tthrow new HFModuleException(\n\t\t\t\t\t\t\t\tHFModuleException.ERR_DELETE_MODULE,\n\t\t\t\t\t\t\t\t\"can not find this module\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tgetHFModuleHelper().removeLocalModuleInfoByMac(mac);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tgetHFModuleHelper().removeMyLocalModuleInfoByMac(mac);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (mi.getModuleId() == null) {\n\t\t\t\t\tgetHFModuleHelper().removeRemoteModuleInfoByMac(mac);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (!this.isCloudChannelLive()) {\n\t\t\t\t\tgetHFModuleHelper().removeRemoteModuleInfoByMac(mac);\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\t\t\t\t// ***\n\t\t\t\tString reqTemplate = \"{'PL':{'moduleId':'#moduleId#'},'CID':30021,'SID':'#SID#'}\";\n\t\t\t\tString req = reqTemplate.replaceFirst(\"#moduleId#\", mi.getModuleId())\n\t\t\t\t\t\t.replaceFirst(\"#SID#\", getsid());\n\n\t\t\t\tString rsp = HttpProxy.reqByHttpPost(req);\n\t\t\t\tJSONObject jo = new JSONObject(rsp);\n\t\t\t\tif (jo.isNull(\"RC\")) {\n\t\t\t\t\tthrow new HFModuleException(\n\t\t\t\t\t\t\tHFModuleException.ERR_DELETE_MODULE,\n\t\t\t\t\t\t\t\"delete module err\");\n\t\t\t\t}\n\t\t\t\tif (jo.getInt(\"RC\") != 1) {\n\t\t\t\t\tthrow new HFModuleException(\n\t\t\t\t\t\t\tHFModuleException.ERR_DELETE_MODULE,\n\t\t\t\t\t\t\t\"delete module err\");\n\t\t\t\t} else {\n\t\t\t\t\tgetHFModuleHelper().removeRemoteModuleInfoByMac(mac);\n\t\t\t\t\tgetHFModuleHelper().removeMyLocalModuleInfoByMac(mac);\n\t\t\t\t\tgetHFModuleHelper().removeLocalModuleInfoByMac(mac);\n\t\t\t\t\tgetHFModuleHelper().removeNewModuleInfoByMac(mac);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (JSONException e) {\n\t\t\tthrow new HFModuleException(HFModuleException.ERR_DELETE_MODULE,\n\t\t\t\t\t\"delete module err\");\n\t\t}\n\t}",
"int deleteByExample(TopicFragmentExample example);",
"void deleleNews(String id);",
"int deleteByExample(TResearchTeachExample example);",
"public void removeModule(String name){\n\t\tModule m = null;\n\t\tfor(Module mod: modules){\n\t\t\tif(mod.getName().matches(name)){\n\t\t\t\tm = mod;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(m!=null){\n\t\t\tlayer.removeChild(m);\n\t\t\tmodules.remove(m);\n\t\t}\n\t}",
"public void deleteSubjects(Cohort cohort, int rem) throws StructureManagementException {\n\n\t\tList<Subject> list = cohort.getSubjects();\n\n\t\tfor (int i = 0; i < rem; i++) {\n\t\t\ttry {\n\t\t\t\tsubjectDAO.delete(list.get(i));\n\t\t\t} catch (Exception e) {\n\t\t\t\tStructureManagementException ex = new StructureManagementException(\"Subject could not be removed. Cause: \" + e.getMessage());\n\t\t\t\tthrow ex;\n\t\t\t}\n\t\t}\n\n\t}",
"public void delete(String scholl_node) {\n db.delete(Value.TABLE_SCHOLLS, Value.COLUMN_NODE + \" = ?\",\n new String[] { String.valueOf(scholl_node) });\n }",
"public void deleteTDList(ActionEvent actionEvent) {\n // find the tdlist being referenced by the button,\n // removeList() from it's parenting group\n }",
"int deleteByExample(CrawlExample example);",
"public void deleteByStudy(Study study) {\n List<WeeklyTracking> weeklyTrackingAttachedToStudy = weeklyTrackingRepository.findByStudy(study);\n\n for (WeeklyTracking weeklyTracking : weeklyTrackingAttachedToStudy) {\n weeklyTrackingRepository.delete(weeklyTracking);\n }\n }",
"public void deleteStudent(String rollNo) {\n\t\t\r\n\t}",
"int deleteByExample(MovimientoExample example);",
"int deleteByExample(IymDefAssignmentExample example);",
"public void delete(LinkedList list, int start, int span) {\n\t\t\n\t}",
"int deleteByExample(StudentExample example);",
"public String deleteResearcher(int id);",
"int deleteByExample(SecondSlideshowExample example);",
"public void deleteStudent(String MatricNo) {\n\t\tif (checkIfStudentExists(MatricNo)) {\n\t\t\tfor (Student student : StudentList) {\n\t\t\t\tif (MatricNo.equals(student.getMatricNo())) {\n\t\t\t\t\tStudentList.remove(student);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tList<Object> students = new ArrayList<Object>();\n\t\t\tfor (Student s : StudentList)\n\t\t\t\tstudents.add((Object) s);\n\t\t\tFileManager.writeObjectToFile(\"student.dat\", students);\n\t\t\tSystem.out.println(\"Student Has been deleted\");\n\t\t} else {\n\t\t\tSystem.out.println(\"Student Does not Exist\");\n\t\t}\n\t}",
"@Transactional\n public void deleteLecturer(int lecturerID) throws KronosException {\n lecturerRepository.findById(lecturerID).orElseThrow(() -> new KronosException(\"Lecturer not found\"));\n\n //If lecturer teaches any modules\n if(moduleRepository.findFirstByLecturer_LecturerID(lecturerID).isPresent()) throw new KronosException(\"Lecturer has associated modules\");\n\n lecturerRepository.deleteById(lecturerID);\n\n }",
"int deleteByExample(SPermsExample example);",
"int deleteByExample(CmsVoteTitleExample example);",
"int deleteByExample(DressExample example);",
"int deleteByExample(HomeWorkExample example);",
"int deleteByExample(RegsatUserExample example);",
"private void removeStudy(int studyID) {\n\t}",
"@Override\n\tpublic Integer deleteModules(Integer modulesId) {\n\t\treturn modulesMapper.deleteModules(modulesId);\n\t}",
"public void removeModule(ModulePanel panel) {\n\t\tfor (ConnectablePanel connectablePanel : panel.getConnectablePanels()) {\n\t\t\tConnector currentConnector = connectablePanel.getConnector();\n\t\t\t\n\t\t\t// Go through all of the connections\n\t\t\tfor (Connection\tconnection : getConnections()) {\n\t\t\t\t\n\t\t\t\t// If either of the connections are from this connector, \n\t\t\t\tif (currentConnector == connection.getOrigin() ||\n\t\t\t\t\tcurrentConnector == connection.getDestination()) {\n\t\t\t\t\tthis.removeConnection(connection);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tboxes.removeAll(panel.getConnectablePanels());\n\t\tremove(panel);\n\t\t\n\t\tApp.data.removeModule(panel);\n\t\tApp.synthModel.removeInstance(panel.getInstance());\n\t\t\n\t\trepaint();\n\t}",
"int deleteByExample(PmPostExample example);",
"public synchronized void eliminar(int nombre){\n\n elemento.remove(nombre);\n \n }",
"public void deleteStudent(Student s) {\n\t\tstudents.remove(s);\n\t\tisStudentsListChanged = true;\n\t\tdataChangedNotify();\n\t}",
"private void loadLesson(Long lessonId) {\n\t\tlesson = null;\n\t\tif (lessonId != null && lessonId > -1) {\n\t\t\tdaoSession = LanguageApplication.getInstance().getDaoSession();\n\t\t\tLessonDao lessonDao = daoSession.getLessonDao();\n\t\t\tlesson = lessonDao.load(lessonId);\n\t\t}\n\t}",
"public void removeEnrolled(Course curs, Student stud) throws SQLException {\r\n Connection con = DriverManager.getConnection(\"jdbc:postgresql://localhost:5432/Hogwarts\",\"postgres\" , \"admin\");\r\n Statement st = con.createStatement();\r\n\r\n st.executeUpdate(\"DELETE FROM public.enrolled\\n\" +\r\n \"\\tWHERE \" + \"\\\"studentID\\\"=\" + stud.getId() + \" AND \\\"courseID\\\"=\" + curs.getId());\r\n\r\n st.close();\r\n\r\n }",
"public void deleteBook(int num)\n { \n bookList.remove(num); \n }",
"private void delete(){\n solo.waitForView(R.id.search_action_button);\n solo.clickOnView(solo.getView(R.id.search_action_button));\n\n //Click on search bar\n SearchView searchBar = (SearchView) solo.getView(R.id.search_experiment_query);\n solo.clickOnView(searchBar);\n solo.sleep(500);\n\n //Type in a word from the description\n solo.typeText(0, searchTerm);\n\n //Make sure the experiment shows up\n assertTrue(solo.waitForText(description));\n\n //Click on experiment\n solo.clickOnText(description);\n\n //Click on more tab\n solo.waitForView(R.id.subscribe_button_experiment);\n solo.clickOnText(\"More\");\n\n //Click on unpublish button\n solo.clickOnView(solo.getView(R.id.delete_experiment_button));\n }",
"int deleteByExample(Question27Example example);",
"@Override\n public int deleteByExample(JurUrlExample example) {\n return jurUrlMapper.deleteByExample(example);\n }",
"public void deleteStudent(Student student) {\n\t\t\r\n\t}",
"public void delete(MiscellaneousRecord a){\n\t\t\t\tAssert.isTrue(LoginService.hasRole(\"HANDYWORKER\"));\n\t\t\t\tUserAccount logged = LoginService.getPrincipal();\n\t\t\t\tfor (Curricula c : curriculaService.findAll()) {\n\t\t\t\t\tif (c.getMiscellaneousRecords().contains(a)\n\t\t\t\t\t\t\t&& c.getHandyWorker().getUserAccount().equals(logged)) {\n\t\t\t\t\t\tc.getMiscellaneousRecords().remove(a);\n\t\t\t\t\t\tcurriculaService.save(c);\n\t\t\t\t\t\tmiscellaneousRecordRepository.delete(a);\n\t\t\t\t\t\t//System.out.println(\"se borra el miscellaneousRecord\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"int deleteByExample(Question14Example example);",
"int deleteByExample(WpPostsExample example);",
"public com.ms3.training.services.model.Course remove(java.lang.String title)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException,\n\t\t\tcom.ms3.training.services.NoSuchCourseException;",
"int deleteByExample(CommentLikeExample example);",
"public void supprimerLivres(View view) {\n /* recuperer les ids des livres selectionnes dans\n * la liste de livres\n */\n long[] ids = list.getCheckedItemIds();\n if (ids.length == 0)\n return;\n\n for (long id : ids) {\n Log.d(\"supprimer id =\", id + \"\");\n Uri.Builder builder = new Uri.Builder();\n builder.scheme(\"content\")\n .authority(authority)\n .appendPath(\"book_table\");\n /* id du livre a supprimer a la fin de uri */\n ContentUris.appendId(builder, id);\n Uri uri = builder.build();\n\n int res = getContentResolver().delete(uri, null, null);\n Log.d(\"result of delete=\", res + \"\");\n }\n /* apres la suppression de titres mettre a jour la liste\n de titres, id_author ne change pas */\n getLoaderManager().restartLoader(1, null, callbackTitres);\n }",
"public ArrayList<Lesson> getLessonDetails(ArrayList<Lesson> lessons, String lessonType) throws AddException {\n ArrayList<Lesson> completeList = new ArrayList<>();\n try {\n for (Lesson lesson : lessons) {\n if (lesson.getLessonType().equals(lessonType)) {\n completeList.add(lesson);\n } else if (lessonType.equals(LECTURE)) {\n if (!lesson.getLessonType().equals(TUTORIAL) && !lesson.getLessonType().equals(LAB)) {\n completeList.add(lesson);\n }\n }\n }\n } catch (NullPointerException e) {\n throw new AddException(\"Module has been added into timetable, module has no lesson\");\n }\n Collections.sort(completeList, new ClassNumComparator());\n return completeList;\n }"
]
| [
"0.63540643",
"0.6182484",
"0.6145424",
"0.5869483",
"0.580221",
"0.5751647",
"0.5592725",
"0.55467266",
"0.54923433",
"0.54546595",
"0.5316989",
"0.52768993",
"0.5261847",
"0.5240669",
"0.522373",
"0.51641244",
"0.5160301",
"0.5128733",
"0.51160187",
"0.50960207",
"0.5094838",
"0.5080751",
"0.5053389",
"0.5037962",
"0.50269127",
"0.5007572",
"0.5003751",
"0.4980873",
"0.49699342",
"0.49605232",
"0.49526542",
"0.4945308",
"0.49409914",
"0.49335247",
"0.49256402",
"0.49250826",
"0.49223757",
"0.49087906",
"0.49082753",
"0.48672655",
"0.48664257",
"0.48651466",
"0.48371676",
"0.48338258",
"0.48227125",
"0.4819125",
"0.48170826",
"0.48071998",
"0.4800781",
"0.4799539",
"0.47841567",
"0.47667816",
"0.47597614",
"0.47561702",
"0.47533146",
"0.47501785",
"0.4738192",
"0.4737087",
"0.47306088",
"0.47278258",
"0.4722779",
"0.47133937",
"0.47092897",
"0.46989632",
"0.46917716",
"0.468883",
"0.46854243",
"0.4683044",
"0.46751326",
"0.46750075",
"0.46718234",
"0.46633267",
"0.4660666",
"0.46560168",
"0.46483168",
"0.4646882",
"0.46458676",
"0.4645166",
"0.46430364",
"0.4641579",
"0.46408394",
"0.4636167",
"0.46184236",
"0.461571",
"0.46150225",
"0.46143577",
"0.46141955",
"0.46095908",
"0.46046767",
"0.4597709",
"0.4593624",
"0.4593049",
"0.45906055",
"0.4589388",
"0.45854262",
"0.45834246",
"0.45760557",
"0.45696113",
"0.45692602",
"0.45689026"
]
| 0.79487926 | 0 |
Checks if a module has the lesson | boolean moduleHasLesson(Module module, Lesson lesson); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean moduleHasExam(Module module, Exam exam);",
"boolean hasTutorial();",
"boolean isPresent(ExamPackage examPackage);",
"synchronized boolean hasModule(Module module)\n {\n for (int i = 0; i < m_modules.size(); i++)\n {\n if (m_modules.get(i) == module)\n {\n return true;\n }\n }\n return false;\n }",
"boolean isValidModule(ExternalModule module);",
"boolean hasHadithChapterIntro();",
"void addLessonToModule(Module module, Lesson lesson);",
"boolean hasMission();",
"public IStatus canAddModule(IModule module);",
"public boolean hasModule() {\n return fieldSetFlags()[2];\n }",
"boolean hasHadithChapterNo();",
"public static boolean hasModule() {\n\t\ttry {\n\t\t\tPackageManager packageManager = AppMain.getContext().getPackageManager();\n\t\t\tIntent intent = new Intent(\"android.settings.USAGE_ACCESS_SETTINGS\");\n\t\t\tList<ResolveInfo> list = packageManager.queryIntentActivities(intent,\n\t\t\t\tPackageManager.MATCH_DEFAULT_ONLY);\n\t\t\treturn list.size() > 0;\n\t\t} catch (RuntimeException e) {\n\t\t\t// 在某个三星的设备上出现过安全异常\n\t\t\t// 在某个ZTE的设备上出现过RuntimeException\n\t\t\treturn false;\n\t\t}\n\t}",
"public void checkModuleExist(Module mod) throws ModuleExistException {\n for (Module module : timetable.getModules()) {\n String moduleCode = module.getModuleCode();\n try {\n if (moduleCode.equals(mod.getModuleCode())) {\n throw new ModuleExistException(\"Module currently already exist in your timetable\");\n }\n } catch (NullPointerException e) {\n throw new ModuleExistException(\"Module does not exist\");\n }\n }\n }",
"private void tutorialCheck() {\n SharedPreferences sp = getApplicationContext().getSharedPreferences(getApplicationContext().getString(R.string.app_name), MODE_PRIVATE);\n if (sp.contains(\"Tutorial_Complete\")) {\n if (sp.getBoolean(\"Tutorial_Complete\", false)) {\n return;\n }\n }\n Intent intent = new Intent(this, TutorialPanel.class);\n startActivity(intent);\n }",
"boolean hasUses();",
"boolean hasCampaignExperiment();",
"public boolean hasModule(String moduleName) \r\n {\r\n return moduleStore.containsKey(moduleName) || moduleStore.containsValue(moduleName); \r\n }",
"private boolean hasTools() {\n return hasTools(getAIUnit());\n }",
"boolean hasMinExperience();",
"boolean hasImported();",
"public boolean hasExam(int period) {\n return (iTable[period]!=null);\n }",
"boolean hasUsage();",
"public boolean createLesson() {\n\t\treturn false;\n\t}",
"@Override\n\tpublic EnrollmentStatus isSatisfiedBy(Section section) {\n\t\tfor(Course c : palnOfStudy.getCourses()){\n\t\t\tSystem.out.println(\"section:\"+section.getRepresentedCourse().getCourseNo());\n\t\t\tSystem.out.println(\"courseNo:\"+c.getCourseNo());\n\t\t\tif(section.getRepresentedCourse().getCourseNo().equals(c.getCourseNo())){\n\t\t\t\treturn EnrollmentStatus.success;\n\t\t\t}\n\t\t}\n\t\treturn EnrollmentStatus.notInPlan;\n\t}",
"boolean hasStartingHadithNo();",
"boolean hasStep();",
"boolean hasStep();",
"boolean hasStep();",
"public boolean hasTutorial() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"boolean hasQuestID();",
"boolean hasQuestID();",
"boolean hasQuestID();",
"boolean hasQuestID();",
"boolean isSetLegs();",
"public boolean hasTutorial() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"private boolean checkSectionAvailability(int id, int section) throws SQLException {\r\n String query = \"SELECT * FROM sections WHERE courseid=? AND secnum=?\";\r\n PreparedStatement pstmt = conn.prepareStatement(query);\r\n pstmt.setInt(1, id);\r\n pstmt.setInt(2, section);\r\n ResultSet rs = pstmt.executeQuery();\r\n rs.next();\r\n if (rs.getInt(\"numofstudents\") < rs.getInt(\"seccap\")) {\r\n rs.close();\r\n return true;\r\n } else {\r\n rs.close();\r\n return false;\r\n }\r\n }",
"public boolean isLoaded() {\n return m_module.isLoaded();\n }",
"boolean hasMajor();",
"public Boolean isHelpFAQAvailable(){\n\t\t\n\t\tgetElement(helpFAQlink).click();\n\t\twaitExplicitly(5);\n\t\t\n\t\tBoolean boo=false;\n\t\t\n\t\tif(getElements(helpFAQContentTitle).size()>0){\n\t\t\tboo=true;\n\t\t\tverbose(getElement(helpFAQContentTitle).getText());\n\t\t} else{\n\t\t\terror(\"Help and FAQ Document is not loaded\");\n\t\t}\n\t\t\n\t\treturn boo;\n\t}",
"boolean hasQuestId();",
"boolean hasQuestId();",
"boolean hasQuestId();",
"boolean hasQuestId();",
"public Boolean isValid() {\n if (modApptTitle.getText().isEmpty() || modApptTitle.getText() == null) {\n return false;\n } else if (modApptDescript.getText().isEmpty() || modApptDescript.getText() == null) {\n return false;\n } else if (modApptLocale.getText().isEmpty() || modApptLocale.getText() == null) {\n return false;\n }\n return true;\n }",
"@Override\n public boolean isLearnMoreDisplayed() {\n\n setLogString(\"Check if Learn More is displayed\", true, CustomLogLevel.HIGH);\n return isDisplayed(getDriver(), By.cssSelector(\".help_icon.clickable\"), TINY_TIMEOUT);\n }",
"boolean hasDecision();",
"boolean hasDecision();",
"public void verifyLearnMoreLink() {\n learnMoreLink.assertState().enabled();\n learnMoreLink.assertContains().text(\"Learn more about registering for an account.\");\n }",
"private void validateClassOrLesson() {\n\t\tclassId = languageSettings.getClassId();\n\t\tlessonId = languageSettings.getLessonId();\n\t\tif (classId != -1) {\n\t\t\tloadClassName(classId);\n\t\t\tif (className == null) {\n\t\t\t\tresetLanguageSettings();\n\t\t\t\tlessonId = -1l;\n\t\t\t\tlesson = null;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif ((!onLargeScreen) && lessonId != -1) {\n\t\t\tloadLesson(lessonId);\n\t\t\tif (lesson == null) {\n\t\t\t\t// lessons must have been deleted so reset\n\t\t\t\tresetLanguageSettings();\n\t\t\t\tlessonId = -1l;\n\t\t\t}\n\t\t}\n\t}",
"boolean hasHadithBookNo();",
"boolean hasTitle();",
"private void checkStories(){\n }",
"boolean hasProject();",
"boolean hasRewardResource();",
"boolean isHasResources();",
"boolean hasIsPerformOf();",
"private boolean canBeAdded(DetailedSection newSection) {\n for (Course course : courses) {\n // Lecture\n if (course.getSelectedLecture() != null) {\n if (newSection.conflictsWith(course.getSelectedLecture())) {\n return false;\n }\n }\n\n // Discussion\n if (course.getSelectedDiscussion() != null) {\n if (newSection.conflictsWith(course.getSelectedDiscussion())) {\n return false;\n }\n }\n\n // Lab\n if (course.getSelectedLab() != null) {\n if (newSection.conflictsWith(course.getSelectedLab())) {\n return false;\n }\n }\n }\n\n return true;\n }",
"static boolean Module(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"Module\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = Module_0(b, l + 1);\n r = r && Module_1(b, l + 1);\n exit_section_(b, m, null, r);\n return r;\n }",
"boolean hasGemReward();",
"boolean hasHeading();",
"boolean hasHeading();",
"boolean hasHeading();",
"boolean hasEnabled();",
"private static boolean hasTools(AIUnit aiUnit) {\n return aiUnit.getUnit().hasAbility(\"model.ability.improveTerrain\");\n }",
"boolean hasPrerequisiteId();",
"boolean hasHadithNo();",
"boolean isIntroduced();",
"boolean hasResource();",
"boolean hasMent();",
"public boolean isModuleLoaded(Class<? extends AModule> moduleId)\n\t{\n\t\treturn modules.containsKey(moduleId)\n\t\t\t\t|| modules.values().stream().map(Object::getClass).anyMatch(c -> c.equals(moduleId));\n\t}",
"boolean hasLevel();",
"boolean hasLevel();",
"boolean hasLevel();",
"boolean hasLevel();",
"boolean hasHas();",
"interface ExternalModuleChecker {\n\t/**\n\t * To check is external-module registered well\n\t *\n\t * @param module module to check\n\t * @return true if registered well\n\t */\n\tboolean isValidModule(ExternalModule module);\n}",
"boolean hasLte();",
"boolean hasAchievementType();",
"public static boolean isLearnable(IndustrySpecAPI spec)\n {\n return true;\n }",
"boolean hasWhid();",
"boolean hasConceptGroup();",
"public static boolean canHasModMOD(Context context) {\n return isPackageInstalled(context, MODMOD_PACKAGE);\n }",
"boolean hasHas_action();",
"public boolean isTutorialMode() {\n\t\treturn (this.tutorial != null);\n\t}",
"boolean hasBonusExp();",
"boolean hasBonusExp();",
"boolean hasBonusExp();",
"boolean hasDonatie();",
"boolean hasModel();",
"boolean hasModel();",
"boolean hasTask();",
"public boolean check(Student stu, Section sect){\n\t\tif (sect.getSectionNum() == 1){\n\t\t\tif (sect.getParent().section2.getResi().contains(stu)){\n\t\t\t\treturn false;\n\t\t\t} \n\t\t}\n\t\telse if (sect.getParent().section1.getResi().contains(stu)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"boolean hasDrugLumn();",
"boolean hasDrugLumn();",
"void addExamToModule(Module module, Exam exam);",
"boolean hasCurMP();",
"boolean hasCurMP();",
"boolean hasCurMP();",
"boolean hasCurMP();",
"boolean hasCurMP();"
]
| [
"0.7526017",
"0.66395986",
"0.6349177",
"0.6289102",
"0.6191716",
"0.6185571",
"0.6120657",
"0.61134773",
"0.6072784",
"0.60727733",
"0.60579395",
"0.5949234",
"0.5913107",
"0.58077466",
"0.57618195",
"0.57547796",
"0.57426566",
"0.5736073",
"0.57333946",
"0.57307875",
"0.5730135",
"0.5635514",
"0.5594781",
"0.5575579",
"0.5506531",
"0.55058676",
"0.55058676",
"0.55058676",
"0.54981405",
"0.54818815",
"0.54818815",
"0.54818815",
"0.54818815",
"0.54418105",
"0.54317755",
"0.54255307",
"0.5424393",
"0.53803635",
"0.53800297",
"0.5363173",
"0.5363173",
"0.5363173",
"0.5363173",
"0.5360883",
"0.5350226",
"0.5346641",
"0.5346641",
"0.5345924",
"0.53392583",
"0.53391844",
"0.5335196",
"0.5334625",
"0.53329164",
"0.530949",
"0.530634",
"0.53059536",
"0.52946067",
"0.5291896",
"0.5290818",
"0.52888703",
"0.52888703",
"0.52888703",
"0.5288699",
"0.5287683",
"0.528702",
"0.5286163",
"0.5280012",
"0.5276174",
"0.5272524",
"0.5271407",
"0.5259466",
"0.5259466",
"0.5259466",
"0.5259466",
"0.5259459",
"0.52512485",
"0.52477735",
"0.5239855",
"0.5237239",
"0.5236074",
"0.5212607",
"0.5205556",
"0.5203458",
"0.52002233",
"0.5180997",
"0.5180997",
"0.5180997",
"0.5178788",
"0.5176829",
"0.5176829",
"0.5176397",
"0.5168114",
"0.5162159",
"0.5162159",
"0.5155103",
"0.51512027",
"0.51512027",
"0.51512027",
"0.51512027",
"0.51512027"
]
| 0.87382853 | 0 |
Adds a lesson to a module. | void addLessonToModule(Module module, Lesson lesson); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void addExamToModule(Module module, Exam exam);",
"private CommandResult addLesson() throws KolinuxException {\n try {\n timetable.executeAdd(parsedArguments, false);\n } catch (ExceedWorkloadException exception) {\n new TimetablePromptHandler(exception.getMessage(), timetable).handleExceedWorkload(parsedArguments);\n }\n logger.log(Level.INFO, \"User added a module to timetable\");\n return new CommandResult(parsedArguments[0].toUpperCase() + \" \"\n +\n parsedArguments[1].toUpperCase() + \" has been added to timetable\");\n }",
"public void testAddModule() {\n\t System.out.println(\"addModule\");\n\t Module module = module1;\n\t Student instance = student1;\n\t instance.addModule(module);\n\t }",
"boolean moduleHasLesson(Module module, Lesson lesson);",
"public void addModule(String name, Discipline discipline) throws SQLException{\r\n \r\n discipline.modules=new LinkedList<Module>();\r\n \r\n String SQL_addModule = SQLInstruct.addModule(name);\r\n db.updateDB(SQL_addModule);\r\n \r\n int module_id;\r\n String SQL_moduleId = SQLInstruct.getModuleAdded();\r\n ResultSet rSet = db.queryDB(SQL_moduleId);\r\n \r\n if(rSet.next()){\r\n module_id=rSet.getInt(1);\r\n String SQL_connectModule=SQLInstruct.connectDisciplineModule(discipline.getId(), module_id);\r\n db.updateDB(SQL_connectModule);\r\n }\r\n updateModules(discipline);\r\n }",
"public void addModule(Module m) {\n feed.getModules().add(m);\n }",
"public void addStudent(Student student) {\t\r\n\t\t//Adds student to list of students taking module\r\n\t\tStudentList.add(student);\r\n\t\t\r\n\t\t// adds module to students list of modules\r\n\t\tstudent.AddModuleList(ModuleName);\r\n}",
"public void addModule(IPModule module);",
"@Override\n\tpublic CourseLesson createCourseLesson(CourseLesson courseLesson) {\n\t\treturn lessonRepository.save(courseLesson);\n\t}",
"public void addModule(Module module, String name) {\n module.parentMobile = this;\n modules.put(name, module);\n if(module instanceof LightSource)\n Scene.addLightSource((LightSource) module);\n }",
"void deleteLesson(Module module, Lesson target);",
"void addCourse(Course course);",
"public AddCompletedModuleCommand(Module module) {\n requireNonNull(module);\n toAdd = module;\n }",
"void addHadithChapterIntro(Object newHadithChapterIntro);",
"@Override\r\n\tpublic String addModulePage(Module module) {\n\t\ttry {\r\n\t\t\tsessionFactory.getCurrentSession().save(module);\r\n\t\t\treturn \"success\";\r\n\t\t} catch (HibernateException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn \"fail\";\r\n\t\t}\r\n\t}",
"public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n {\n\n modules = new ArrayList<Module>();\n\n // MODULE 1\n essayWritingLessons = new ArrayList<Lesson>();\n essayWritingLessons.add(new Lesson(\"Spelling – Mnemonics\"));\n essayWritingLessons.add(new Lesson(\"Essay Writing 2\"));\n essayWritingLessons.add(new Lesson(\"Phrases\"));\n essayWritingLessons.add(new Lesson(\"Clauses\"));\n essayWritingLessons.add(new Lesson(\"Prepositions\"));\n essayWritingLessons.add(new Lesson(\"Conjunctions\"));\n modules.add(new Module(\"Essay Writing\", essayWritingLessons));\n Log.d(TAG, \"onCreateView: Essay writing module instantiated and added.\");\n\n // MODULE 2\n speechLessons = new ArrayList<Lesson>();\n speechLessons.add(new Lesson(\"Conjunctions – Sentences\"));\n speechLessons.add(new Lesson(\"Sentence Improvement\"));\n speechLessons.add(new Lesson(\"Sentence Construction\"));\n speechLessons.add(new Lesson(\"Commas 2\"));\n speechLessons.add(new Lesson(\"Quotation Marks\"));\n modules.add(new Module(\"Speech\", speechLessons));\n Log.d(TAG, \"onCreateView: Speech module instantiated and added.\");\n\n // MODULE 3\n punctuationLessons = new ArrayList<Lesson>();\n punctuationLessons.add(new Lesson(\"Colons and Semi-Colons\"));\n punctuationLessons.add(new Lesson(\"Apostrophe – Possession\"));\n punctuationLessons.add(new Lesson(\"Punctuation – Various\"));\n punctuationLessons.add(new Lesson(\"Interjections\"));\n punctuationLessons.add(new Lesson(\"Clauses\"));\n modules.add(new Module(\"Punctuation\", punctuationLessons));\n Log.d(TAG, \"onCreateView: Punctuation module instantiated and added.\");\n\n // MODULE 4\n advancedSpeechLessons = new ArrayList<Lesson>();\n advancedSpeechLessons.add(new Lesson(\"Subject and Predicate\"));\n advancedSpeechLessons.add(new Lesson(\"Modal Verbs\"));\n advancedSpeechLessons.add(new Lesson(\"Adjectives\"));\n advancedSpeechLessons.add(new Lesson(\"Adverbs\"));\n advancedSpeechLessons.add(new Lesson(\"First and second conditionals\"));\n modules.add(new Module(\"Advanced Speech\", advancedSpeechLessons));\n Log.d(TAG, \"onCreateView: Advanced Speech module instantiated and added.\");\n\n // MODULE 5\n spellingLessons = new ArrayList<Lesson>();\n spellingLessons.add(new Lesson(\"Modals of obligation\"));\n spellingLessons.add(new Lesson(\"Imperatives\"));\n spellingLessons.add(new Lesson(\"Spelling\"));\n spellingLessons.add(new Lesson(\"Prefixes\"));\n spellingLessons.add(new Lesson(\"Suffixes\"));\n modules.add(new Module(\"Spelling\", spellingLessons));\n Log.d(TAG, \"onCreateView: Spelling module instantiated and added.\");\n\n // MODULE 6\n sentenceImprovementLessons = new ArrayList<Lesson>();\n sentenceImprovementLessons.add(new Lesson(\"Advanced Dictionary Use\"));\n sentenceImprovementLessons.add(new Lesson(\"Conjunctions – Sentences\"));\n sentenceImprovementLessons.add(new Lesson(\"Sentence Improvement\"));\n sentenceImprovementLessons.add(new Lesson(\"Sentence Construction\"));\n sentenceImprovementLessons.add(new Lesson(\"Verbs – Tense\"));\n modules.add(new Module(\"Sentence Improvement\", sentenceImprovementLessons));\n Log.d(TAG, \"onCreateView: Sentence improvement module instantiated and added.\");\n\n View root = inflater.inflate(R.layout.fragment_literacy, container, false);\n\n txtView = root.findViewById(R.id.tv_title);\n imgView = root.findViewById(R.id.piechart);\n lv_literacyModules = root.findViewById(R.id.lv_literacyModules);\n\n adapter = new Adapter_Modules(modules, getContext());\n\n lv_literacyModules.setAdapter(adapter);\n\n PieChart _piechart = (PieChart) root.findViewById(R.id.piechart);\n\n //set Status- & Navigation bar colors\n @SuppressLint(\"ResourceType\") String systemBar = getResources().getString(R.color.darkBewareOrange);\n ((MainActivity)getActivity()).updateStatusBarColor(systemBar);\n ((MainActivity)getActivity()).updateNavBarColor(systemBar);\n //Toolbar & Navigation drawer Header\n @SuppressLint(\"ResourceType\") String toolBar = getResources().getString(R.color.bewareOrange);\n ((MainActivity)getActivity()).updateActionBarColor(toolBar);\n ((MainActivity)getActivity()).updateNavHeaderColor(toolBar);\n\n\n return root;\n }",
"public void addModule(Module module, int parentId) {\n\t\tif(parentId !=0){\n\t\t\tmodule.setParent((Module)this.getHibernateTemplate().load(Module.class, parentId));\n\t\t}\n\t\tthis.getHibernateTemplate().save(module);\n\t}",
"public void addRequest(String module) {\r\n //if this module hasn't already requested this button\r\n if (!modules.contains(module)) {\r\n //add a request\r\n modules.add(module);\r\n }\r\n }",
"private void addStudy(Study study) {\n\t\t\r\n\t}",
"public boolean createLesson() {\n\t\treturn false;\n\t}",
"void addHadithChapterNo(Object newHadithChapterNo);",
"public void addStudent(Student student) {\n\t\t\r\n\t}",
"public void testAddCourse() {\n\t System.out.println(\"addCourse\");\n\t Course course = course1;\n\t Student instance = student1;\n\t instance.addCourse(course);\n\t }",
"public void addNewAssingment() throws IOException {\r\n\t\tconnectionmain.showTeacherGUIAssWindow();\r\n\t}",
"public void addStudent(Student student) {\n students.add(student);\n }",
"private void startLesson() {\n\t\tFragmentManager fm = getSupportFragmentManager();\n\t\tFragmentTransaction ft = fm.beginTransaction();\n\t\tint screenId = onLargeScreen ? R.id.detailFragmentContainer\n\t\t\t\t: R.id.fragmentContainer;\n\t\tFragment lessonFragment = (Fragment) fm.findFragmentById(screenId);\n\t\tif (lessonFragment != null) {\n\t\t\t// ft.remove(lessonFragment) ;\n\t\t\tfm.popBackStackImmediate();\n\n\t\t}\n\t\tlessonFragment = getLessonFragment();\n\t\tft.add(screenId, lessonFragment,\n\t\t\t\tonLargeScreen ? CHILD_CONTAINER : MASTER_CONTAINER)\n\t\t\t\t.addToBackStack(null).commit();\n\n\t}",
"public void addCourse(Course c){\n\t\tcourses.add(c);\n\t}",
"public void setLessonCount(Integer lessonCount) {\n this.lessonCount = lessonCount;\n }",
"private void addControl() {\n if(getActivity()!=null){\n ((DrawerLocker ) getActivity()).setDrawerEnabled(true);\n }\n //get Bundle\n Bundle args = getArguments();\n lessonIDItem = 1;\n if(args!=null && args.containsKey(\"lesson_item_id\")){\n lessonIDItem = args.getInt(\"lesson_item_id\");\n lesson_item_name =args.getString(\"lesson_item_name\");\n }\n toolbar = root.findViewById(R.id.contentLesson_toolbar);\n ((AppCompatActivity ) getActivity()).setSupportActionBar(toolbar);\n ((AppCompatActivity) getActivity()).getSupportActionBar().setTitle(\"Lesson\");\n ((AppCompatActivity) getActivity()).getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n\n progressBarContent = root.findViewById(R.id.progressBarContent);\n progressBarContent.setMax(100);\n progressBarContent.setProgress(1);\n progressBarContent.incrementProgressBy(2);\n\n wv_lesson_content = root.findViewById(R.id.wv_lesson_content);\n wv_lesson_content.setWebViewClient(new WebViewClientCustomer());\n WebSettings settings = wv_lesson_content.getSettings();\n settings.setSupportZoom(true);\n settings.setBuiltInZoomControls(true);\n settings.setDisplayZoomControls(false);\n settings.setJavaScriptEnabled(true);\n wv_lesson_content.loadUrl(url + lessonIDItem);\n }",
"public void addExercise(Exercise p) {\n exercises.add(p);\n }",
"public void addQuestion(Question question);",
"public void addStudent(Student student);",
"public void addTodoModule(){\n final Dialog dialog = new Dialog(context);\n dialog.setContentView(R.layout.add_todomodule);\n dialog.setTitle(R.string.name_module_todo);\n\n Button cancel = (Button) dialog.findViewById(R.id.cancel);\n cancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n }\n });\n\n Button validate = (Button) dialog.findViewById(R.id.validatenewmodule);\n validate.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n TodoModuleService service = TodoModuleAPI.getInstance();\n service.addTodoModule(event.getId(),new Callback<Response>() {\n @Override\n public void success(Response s, Response response) {\n Toast.makeText(AddModule.this, \"Le module a bien été ajouté!\", Toast.LENGTH_SHORT).show();\n finish();\n }\n\n @Override\n public void failure(RetrofitError error) {\n error.printStackTrace();\n finish();\n }\n });\n dialog.dismiss();\n }\n });\n\n dialog.show();\n }",
"public void addCourse(Course c) {\n\t\tcourseList.add(c);\n\t}",
"public void setLesson(Lesson lesson){\n\t\tselectedLesson = lesson;\n\t\tview = LessonPanel.getLessonPanel();\n\t\tview.clearPhraseTabelContent();\n\t\tinitAllPhrases();\n\n\t\tview.setVisible(true);\n\t}",
"public void addStudents(Student student) {\r\n System.out.println(\"conectado con model ---> metodo addStudents\");\r\n //TODO\r\n }",
"public void addt1Module(Module m) {\n t1UnSel.getItems().remove(m);\n t1Sel.getItems().add(m);\n }",
"public void addLecture(String lecture){\n\t\t//todo: fill this method\n\t}",
"public LessonId (int category,int lesson)\n\t{\n\t\tCategory = category;Lesson = lesson;\n\t}",
"public void addMission(Mission mission) {\n mission.setChallenge(this);\n this.missions.add(mission);\n this.xp += mission.getXp();\n this.level++;\n }",
"public void c2pAddModule(IPModule module);",
"void storeLesson(Lesson lesson) throws DataAccessException;",
"public void add(Student s)\r\n {\r\n students.add(s);\r\n }",
"synchronized void addModule(Module module) throws Exception\n {\n m_modules.add(module);\n\n // Set protection domain after adding the module to the bundle,\n // since this requires that the bundle has a module.\n ((ModuleImpl) module).setSecurityContext(\n new BundleProtectionDomain(getFramework(), this));\n\n SecurityProvider sp = getFramework().getSecurityProvider();\n if ((sp != null) && (System.getSecurityManager() != null))\n {\n try\n {\n sp.checkBundle(this);\n }\n catch (Exception ex) \n {\n m_modules.remove(m_modules.size() - 1);\n throw ex;\n }\n }\n\n // TODO: REFACTOR - consider moving ModuleImpl into the framework package\n // so we can null module capabilities for extension bundles so we don't\n // need this check anymore.\n if (!isExtension())\n {\n // Now that the module is added to the bundle, we can update\n // the resolver's module state.\n getFramework().getResolver().addModule(module);\n }\n }",
"public void addSchool(School school) {\n\n\t}",
"private void addNewCoursesOnClick(){\n dataSource.open();\n dataSource.createCourses(editTextCourses.getText().toString(),editTextTeacher.getText().toString(),editTextWhen.getText().toString(),editTextWhere.getText().toString(),editTextGrading.getText().toString(),editTextOther.getText().toString());\n dataSource.close();\n CoursesListElement courses = new CoursesListElement(editTextCourses.getText().toString(),editTextTeacher.getText().toString(),editTextWhen.getText().toString(),editTextWhere.getText().toString(),editTextGrading.getText().toString(),editTextOther.getText().toString(),0);\n listElements.add(courses);\n // setting list adapter\n listView.setAdapter(new ActionListAdapter(getActivity(),R.id.list_courses, listElements));\n newCourses.setVisibility(View.GONE);\n editTextCourses.setText(\"\");\n editTextTeacher.setText(\"\");\n editTextWhen.setText(\"\");\n editTextWhere.setText(\"\");\n editTextGrading.setText(\"\");\n editTextOther.setText(\"\");\n }",
"public Lesson saveLesson(Lesson lesson) {\n lesson.setName(StringUtils.trim(lesson.getName()));\n\n saveRelatedTopics(lesson);\n\n Lesson savedLesson = presaveLessonCover(lesson);\n\n saveRelatedExpressionItems(savedLesson);\n\n //Save again to store related expressionItem (with generated ids) inside the lesson.\n return lessonRepository.save(savedLesson);\n }",
"public void addCourse(int studentNumber, double credit, double gp)\r\n {\r\n Student s = findStudent(studentNumber);\r\n\r\n if(s == null)\r\n {\r\n System.out.println(\"the student is not exist\");\r\n return;\r\n }\r\n else\r\n {\r\n s.addCourse(credit,gp);\r\n }\r\n }",
"@Override\r\n\tpublic void addStudentInCourse(Course course, User user) {\n\t\t\r\n\t}",
"@Override\n public Lesson create(Long memberId, LessonRequest request) throws Exception {\n // find Instructor with memberId,\n Optional<Instructor> instr = instructorService.findInstructorById(memberId);\n // then create Lesson with given info from lessonRequest\n Lesson lesson = new Lesson();\n lesson.setInstructor(instr.get());\n lesson.setDescription(request.getDescription());\n lesson.setStartTime(request.getStartTime());\n lesson.setEndTime(request.getEndTime());\n lesson.setStatus(\"OPEN\");\n\n LessonTime.checkIfStartTimeIsFirst(lesson.getStartTime(),lesson.getEndTime());\n // LessonTime lessonTime = new LessonTime();\n lessonTime.checkOverlapBetweenLessons(lesson.getEndTime(),lesson.getStartTime(),lesson.getInstructor());\n\n // persist into DB -> go via LessonRepository\n return lessonRepository.save(lesson);\n\n }",
"public Lesson(String name)\r\n { this.name = name;\r\n layer = 1; \r\n }",
"abstract public NewsBrowserComponent addToGraph(NewsBrowserModule module);",
"public void add(MiningTask mt) {\n miningTasks.add(mt);\n }",
"private void loadLesson(Long lessonId) {\n\t\tlesson = null;\n\t\tif (lessonId != null && lessonId > -1) {\n\t\t\tdaoSession = LanguageApplication.getInstance().getDaoSession();\n\t\t\tLessonDao lessonDao = daoSession.getLessonDao();\n\t\t\tlesson = lessonDao.load(lessonId);\n\t\t}\n\t}",
"@Override\r\n\tpublic void addModules(Modules modules) {\n\t\tgetHibernateTemplate().save(modules);\r\n\t}",
"public void addModString(String name, String string)\n {\n modules.put(name,string);\n }",
"public void addElement(DemoTask task) {\n\t\tdata.add(task);\n\t}",
"public void addModule(Module m) throws Exception {\n\t\tModule returned = _modules.put(m.getName(), m);\n\t\tif (returned != null) \n\t\t\tthrow new Exception(\"Module with this name already exists. Module: \" + m.getName() + \" in \" + this._name);\n//\t\t\tSystem.out.println(\"ERROR: overwrote a module with the same name: \" + m.getName());\n\t\tSet<Vertex> vSet = m.getVertexMap();\n\t\tfor (Vertex v : vSet)\n\t\t\tif (_vertices.contains(v))\n\t\t\t\tthis._hasOverlap = true;\n\t\tthis._vertices.addAll(vSet);\n\t}",
"public void addHelp(Help help) {\n this.helps.clear();\n this.helps.add(help);\n }",
"protected final void addModule(BlankDialogModule module, boolean display) {\n // remove spacing (the child deals with that now)\n setBorder(BorderFactory.createEmptyBorder());\n // register this module\n childModules.add(module);\n id2ChildModule.put(module.getIdentifier(), module);\n // inject listener\n module.addListener(propagationListener);\n // add child module to this container to be displayed\n if (display) {\n GridBagConstraints gbc = new GridBagConstraints();\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.gridwidth = GridBagConstraints.REMAINDER;\n gbc.weightx = 1;\n this.add(module, gbc);\n }\n }",
"private void addStudent() {\n\t\t\n\t\tString lastName = sLastNameTF.getText();\n\t\tString firstName = sFirstNameTF.getText();\n\t\tString schoolName = sSchoolNameTF.getText();\n\t\tchar[] password = sPasswordPF1.getPassword();\n\t\tString sA1 = sSecurityQ1TF.getText();\n\t\tString sQ1 = (String)sSecurityList1.getSelectedItem();\n\t\tString sA2 = sSecurityQ2TF.getText();\n\t\tString sQ2 = (String)sSecurityList2.getSelectedItem();\n\t\tString grade = (String)sGradeList.getSelectedItem();\n\t\t\n\t\tstudent = new Student(lastName, firstName, schoolName, password, sA1, sQ1, sA2, sQ2, grade);\n\t\t\n\t\t//Add student to database\n\t\t\n\t}",
"public void addStmt(Stmt node) {\n List<Stmt> list = getStmtList();\n list.addChild(node);\n }",
"@Override\n\tpublic void addCourse(String courseName) {\n\t\tcd.addCourse(courseName);\n\t}",
"public void assignCourse(Course course) {\r\n this.course.add(course);\r\n }",
"public void add(Student student) {\n\t\tstudentList.add(student);\n\t}",
"private void addStudent(Student student) {\n\t\tSystem.out.println(\"Add Student\");\n\t\tsmb.saveStudent(student);\n\t}",
"public void AddNewSkill()\n\t{\n\t\t\n\t}",
"private void registerModule(Module module) {\n \t\tif (module.register()) {\n \t\t\t_availableModules.add(module);\n \t\t}\n \t}",
"public void addCourse(Course o) {\r\n\t\t\tcourseTaken.add(o);\r\n\t\t}",
"public Module(String code, String title)\n {\n // initialise instance variables\n this.code = code;\n this.title = title;\n credit = 0;\n }",
"public void addStudentInCourse(Course course, Student student){\n \n String statement = ADD_STUDENT_IN_COURSE;\n data.makeUpdateStatement(statement,new Object[]{(Object)course.getId(),(Object)student.getId()});\n data.closeConnections(data.ps, data.conn);\n }",
"public Lesson saveInternal(final Lesson lesson) {\n\t\tAssert.notNull(lesson);\n\n\t\t//Assertion that the user modifying this lesson has the correct privilege.\n\t\tfinal Authentication authentication = SecurityContextHolder.getContext().getAuthentication();\n\t\tAssert.isTrue(authentication.getAuthorities().toArray()[0].toString().equals(\"AUDITOR\"));\n\n\t\tfinal Lesson saved = this.lessonRepository.save(lesson);\n\t\treturn saved;\n\t}",
"void addWorkflow(Workflow workflow);",
"public void addStudent(User user) {\n\t\t\r\n\t}",
"private void Add() {\n\t\t\tString names2 = StudentNum.getText();\n\t\t\tString names1 = Studentname.getText();\n\t\t\tStudentname.setText(\"\");\n\t\t\tStudentNum.setText(\"\");\n\t\t\tif (!names2.equals(\"Student Number\")) {\n\t\t\t\tFile directory = new File(\"Schools\\\\\" + names2 + \".hi\");\n\t\t\t\tif (!directory.exists()) {\n\t\t\t\t\tif (directory.mkdir()) {\n\t\t\t\t\t\tworklabel.setText(\"Student has been added\");\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tPrintWriter out;\n\t\t\t\t\t\t\tPrintWriter out2;\n\t\t\t\t\t\t\tout = new PrintWriter(new FileWriter(\"Schools\\\\\"\n\t\t\t\t\t\t\t\t\t+ names2 + \".hi\" + \"\\\\\"\n\t\t\t\t\t\t\t\t\t+ \"Student Information.txt\", true));\n\t\t\t\t\t\t\tout.println(\"Student Name: \" + names1);\n\t\t\t\t\t\t\tout.println(\"Student Number: \" + names2);\n\t\t\t\t\t\t\tout.println(\"Address:\");\n\t\t\t\t\t\t\tout.println(\"Postal Code:\");\n\t\t\t\t\t\t\tout.println(\"Phone Number:\");\n\t\t\t\t\t\t\tout.println(\"Contact #1 Name:\");\n\t\t\t\t\t\t\tout.println(\"Contact #1 Number:\");\n\t\t\t\t\t\t\tout.println(\"Contact #1 Email:\");\n\t\t\t\t\t\t\tout.println(\"Contact #2 Name:\");\n\t\t\t\t\t\t\tout.println(\"Contact #2 Number:\");\n\t\t\t\t\t\t\tout.println(\"Contact #2 Email:\");\n\t\t\t\t\t\t\tout.println(\"Medical Alert #1:\");\n\t\t\t\t\t\t\tout.println(\"Medical Alert #2:\");\n\t\t\t\t\t\t\tout.println(\"Medical Alert #3:\");\n\t\t\t\t\t\t\tout.println(\"Medical Alert #4:\");\n\t\t\t\t\t\t\tout.println(\"Medical Alert #5:\");\n\t\t\t\t\t\t\tout.println(\"Accomodation #1:\");\n\t\t\t\t\t\t\tout.println(\"Accomodation #2:\");\n\t\t\t\t\t\t\tout.println(\"Accomodation #3:\");\n\t\t\t\t\t\t\tout.println(\"Accomodation #4:\");\n\t\t\t\t\t\t\tout.println(\"Accomodation #5:\");\n\t\t\t\t\t\t\tout.println(\"Volunteer Hours:\");\n\t\t\t\t\t\t\tout2 = new PrintWriter(new FileWriter(\"Schools\\\\\"+ names2+\".hi\" + \"\\\\\" + \"Transcript.txt\",true));\n\t\t\t\t\t\t\tout2.println(\"Course Code\t\tMark\tPassed\tAbsences\tLate\");\n\t\t\t\t\t\t\tout.close();\n\t\t\t\t\t\t\tout2.close();\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\tworklabel.setText(\"Invalid\");\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public void addCourse(Course course) {\n this.displayCourses();\n courses.add(course);\n this.displayCourses();\n }",
"public Lesson(int id, String name, LocalDate classDate) {\n this.id = id;\n this.name = name;\n this.classDate = classDate;\n }",
"public void AddCredits(int credits)\n {\n this.credits += credits;\n }",
"public boolean addCourse(Course c) {\n\t\treturn false;\n\t}",
"boolean moduleHasExam(Module module, Exam exam);",
"private static Module createEditedModule(Module moduleToEdit,\n EditModuleCommand.EditModuleDescriptor editModuleDescriptor) {\n assert moduleToEdit != null;\n\n ModuleName updatedName = editModuleDescriptor.getModuleName();\n\n UniqueStudentList studentList = moduleToEdit.getUniqueStudentList();\n UniqueTaskList taskList = moduleToEdit.getTaskList();\n\n return new Module(updatedName, studentList, taskList);\n }",
"@Transactional\n\t@Override\n\tpublic boolean addLesson(VInputLesson vil) throws Exception {\n\t\tLesson lesson = vil.getLesson();\n\t\tList<Integer> branches = vil.getBranches();\n\t\tif (lessonDao.addLesson(lesson)) {\n\t\t\tlessonbranchDao.deleteBranchesByLid(lesson.getLid());\n\t\t\tfor (Integer branchid : branches) {\n\t\t\t\tLessonbranch lessonbranch = new Lessonbranch();\n\t\t\t\tlessonbranch.setBranchid(branchid);\n\t\t\t\tlessonbranch.setLid(lesson.getLid());\n\t\t\t\tif(lessonbranchDao.insert(lessonbranch) == false) return false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"private void addQuestion() {\n if (modifiable()) {\n try {\n this.questions.add(Question.fromInput(gradeable()));\n } catch (UserInputException e) {\n System.err.println(e.getMessage());\n }\n } else {\n System.err.println(\"Can not modify this by add a question.\");\n }\n }",
"Lesson loadLesson(int id) throws DataAccessException;",
"@Test\n public void autocreateLesson() throws Exception{\n\n }",
"public long add(String name, String discipline, String grade) {\n SQLiteDatabase db = _openHelper.getWritableDatabase();\n if (db == null) {\n return 0;\n }\n ContentValues row = new ContentValues();\n row.put(\"name\", name);\n row.put(\"discipline\", discipline);\n row.put(\"grade\", grade);\n long id = db.insert(\"Exams\", null, row);\n db.close();\n return id;\n }",
"@Override\n\tpublic void addTmly(Tmly tmly) {\n\t\tString sql = \"insert into tmly(id_,title,content) values(?,?,?)\";\n\t\tthis.jdbcTemplate\n\t\t\t\t.update(sql,\n\t\t\t\t\t\tnew Object[] { tmly.getId(), tmly.getTitle(),\n\t\t\t\t\t\t\t\ttmly.getContent() });\n\t}",
"public com.transerainc.aha.gen.agent.SkillDocument.Skill addNewSkill()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.transerainc.aha.gen.agent.SkillDocument.Skill target = null;\n target = (com.transerainc.aha.gen.agent.SkillDocument.Skill)get_store().add_element_user(SKILL$0);\n return target;\n }\n }",
"public void insertCourse(){\n \n }",
"public void add(HeroNode heroNode){ //heroNode是需要添加的新节点\n // we need a temperate node temp, because the head node couldn't be changed\n HeroNode temp = head;\n // go through the linkedlist to find the last node\n while (true){\n //find the last node of this linkedlist\n if (temp.next==null){\n break;\n }\n temp = temp.next;\n }\n // temp points to the end of the linkedlist when exiting the while\n // let the next of the last node point to the new node\n temp.next = heroNode;\n }",
"@Override\n public void addStudent(Student student) {}",
"public Modul(String modulname) {\n\t\tthis.modulname=modulname;\n\t}",
"@Override\r\n\tpublic boolean addExam(IExam exam) {\n\t\treturn false;\r\n\t}",
"public void setModule(String name, BwModule module) {\n modules.put(name, module);\n }",
"public void addStudent(Student InStudent)\n\t{\n\t\tclassRoll.add (InStudent);\n\t\tthis.saveNeed = true;\n\n\t\t\n\t}",
"public void addStudent(String theStudent) {\n\t\tstudents[numberOfStudents] = theStudent;\n\t\tnumberOfStudents++; // Upadate the total number of students\n\t}",
"void addParticipant(Participant participant);",
"public ArrayList<Lesson> getLessonDetails(ArrayList<Lesson> lessons, String lessonType) throws AddException {\n ArrayList<Lesson> completeList = new ArrayList<>();\n try {\n for (Lesson lesson : lessons) {\n if (lesson.getLessonType().equals(lessonType)) {\n completeList.add(lesson);\n } else if (lessonType.equals(LECTURE)) {\n if (!lesson.getLessonType().equals(TUTORIAL) && !lesson.getLessonType().equals(LAB)) {\n completeList.add(lesson);\n }\n }\n }\n } catch (NullPointerException e) {\n throw new AddException(\"Module has been added into timetable, module has no lesson\");\n }\n Collections.sort(completeList, new ClassNumComparator());\n return completeList;\n }",
"@Test\n\tpublic void addAssignment() {\n\t\tfinal Date dueDate = new Date();\n\t\tfinal Template template = new Template(\"Template 1\");\n\t\ttemplate.addStep(new TemplateStep(\"Step 1\", 1.0));\n\t\tfinal Assignment asgn = new Assignment(\"Assignment 1\", dueDate, template);\n\t\tasgn.addTask(new Task(\"Task 1\", 1, 1, asgn.getID()));\n\t\t\n\t\tfinal String asgnId = asgn.getID();\n\t\t\n\t\ttry {\n\t\t\tStorageService.addTemplate(template);\n\t\t\tStorageService.addAssignment(asgn);\n\t\t} catch (final StorageServiceException e) {\n\t\t\tfail(e.getMessage());\n\t\t}\n\t\t\n\t\tfinal Assignment afterAsgn = StorageService.getAssignment(asgnId);\n\t\tassertEquals(asgn.fullString(), afterAsgn.fullString());\n\t}",
"public void actionPerformed(ActionEvent e){\n \t\t \tstudentsController.addStudent();\n \t\t }"
]
| [
"0.74173445",
"0.6660921",
"0.66467535",
"0.65050876",
"0.6395161",
"0.6074155",
"0.59791994",
"0.59528065",
"0.59009457",
"0.56868106",
"0.5664817",
"0.5647412",
"0.5597827",
"0.5585596",
"0.5462557",
"0.54480517",
"0.5413717",
"0.5370926",
"0.53488594",
"0.5273323",
"0.5271548",
"0.52356195",
"0.5228287",
"0.522823",
"0.51923966",
"0.51879436",
"0.5176241",
"0.51757634",
"0.5175193",
"0.51598394",
"0.5093437",
"0.5084626",
"0.5082709",
"0.5081169",
"0.50807655",
"0.50712174",
"0.5048686",
"0.50342053",
"0.5026969",
"0.5025694",
"0.5019658",
"0.50113386",
"0.5001578",
"0.49514988",
"0.494764",
"0.49354738",
"0.49169028",
"0.49135572",
"0.49078482",
"0.48996025",
"0.4896335",
"0.48870713",
"0.48700303",
"0.48638815",
"0.48557758",
"0.4853493",
"0.48523358",
"0.4846087",
"0.48306993",
"0.4824235",
"0.48187193",
"0.48018774",
"0.47941262",
"0.47863385",
"0.4781967",
"0.4781107",
"0.4773286",
"0.47729385",
"0.4763947",
"0.4747444",
"0.47467205",
"0.47460032",
"0.4744965",
"0.4726798",
"0.47241014",
"0.4710317",
"0.47075233",
"0.47048983",
"0.4687923",
"0.46848986",
"0.46841437",
"0.46791193",
"0.46737656",
"0.46678606",
"0.46671474",
"0.4662907",
"0.46607047",
"0.4657245",
"0.46567905",
"0.46507376",
"0.4649986",
"0.46487442",
"0.46435213",
"0.46342447",
"0.46300703",
"0.46216512",
"0.46196306",
"0.46135905",
"0.4611789",
"0.45890293"
]
| 0.9163757 | 0 |
Checks if a module has the lesson | boolean moduleHasExam(Module module, Exam exam); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean moduleHasLesson(Module module, Lesson lesson);",
"boolean hasTutorial();",
"boolean isPresent(ExamPackage examPackage);",
"synchronized boolean hasModule(Module module)\n {\n for (int i = 0; i < m_modules.size(); i++)\n {\n if (m_modules.get(i) == module)\n {\n return true;\n }\n }\n return false;\n }",
"boolean isValidModule(ExternalModule module);",
"boolean hasHadithChapterIntro();",
"void addLessonToModule(Module module, Lesson lesson);",
"boolean hasMission();",
"public boolean hasModule() {\n return fieldSetFlags()[2];\n }",
"public IStatus canAddModule(IModule module);",
"boolean hasHadithChapterNo();",
"public static boolean hasModule() {\n\t\ttry {\n\t\t\tPackageManager packageManager = AppMain.getContext().getPackageManager();\n\t\t\tIntent intent = new Intent(\"android.settings.USAGE_ACCESS_SETTINGS\");\n\t\t\tList<ResolveInfo> list = packageManager.queryIntentActivities(intent,\n\t\t\t\tPackageManager.MATCH_DEFAULT_ONLY);\n\t\t\treturn list.size() > 0;\n\t\t} catch (RuntimeException e) {\n\t\t\t// 在某个三星的设备上出现过安全异常\n\t\t\t// 在某个ZTE的设备上出现过RuntimeException\n\t\t\treturn false;\n\t\t}\n\t}",
"public void checkModuleExist(Module mod) throws ModuleExistException {\n for (Module module : timetable.getModules()) {\n String moduleCode = module.getModuleCode();\n try {\n if (moduleCode.equals(mod.getModuleCode())) {\n throw new ModuleExistException(\"Module currently already exist in your timetable\");\n }\n } catch (NullPointerException e) {\n throw new ModuleExistException(\"Module does not exist\");\n }\n }\n }",
"private void tutorialCheck() {\n SharedPreferences sp = getApplicationContext().getSharedPreferences(getApplicationContext().getString(R.string.app_name), MODE_PRIVATE);\n if (sp.contains(\"Tutorial_Complete\")) {\n if (sp.getBoolean(\"Tutorial_Complete\", false)) {\n return;\n }\n }\n Intent intent = new Intent(this, TutorialPanel.class);\n startActivity(intent);\n }",
"boolean hasUses();",
"boolean hasCampaignExperiment();",
"public boolean hasModule(String moduleName) \r\n {\r\n return moduleStore.containsKey(moduleName) || moduleStore.containsValue(moduleName); \r\n }",
"private boolean hasTools() {\n return hasTools(getAIUnit());\n }",
"boolean hasMinExperience();",
"public boolean hasExam(int period) {\n return (iTable[period]!=null);\n }",
"boolean hasImported();",
"boolean hasUsage();",
"public boolean createLesson() {\n\t\treturn false;\n\t}",
"@Override\n\tpublic EnrollmentStatus isSatisfiedBy(Section section) {\n\t\tfor(Course c : palnOfStudy.getCourses()){\n\t\t\tSystem.out.println(\"section:\"+section.getRepresentedCourse().getCourseNo());\n\t\t\tSystem.out.println(\"courseNo:\"+c.getCourseNo());\n\t\t\tif(section.getRepresentedCourse().getCourseNo().equals(c.getCourseNo())){\n\t\t\t\treturn EnrollmentStatus.success;\n\t\t\t}\n\t\t}\n\t\treturn EnrollmentStatus.notInPlan;\n\t}",
"boolean hasStartingHadithNo();",
"boolean hasStep();",
"boolean hasStep();",
"boolean hasStep();",
"public boolean hasTutorial() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"boolean hasQuestID();",
"boolean hasQuestID();",
"boolean hasQuestID();",
"boolean hasQuestID();",
"boolean isSetLegs();",
"public boolean hasTutorial() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"private boolean checkSectionAvailability(int id, int section) throws SQLException {\r\n String query = \"SELECT * FROM sections WHERE courseid=? AND secnum=?\";\r\n PreparedStatement pstmt = conn.prepareStatement(query);\r\n pstmt.setInt(1, id);\r\n pstmt.setInt(2, section);\r\n ResultSet rs = pstmt.executeQuery();\r\n rs.next();\r\n if (rs.getInt(\"numofstudents\") < rs.getInt(\"seccap\")) {\r\n rs.close();\r\n return true;\r\n } else {\r\n rs.close();\r\n return false;\r\n }\r\n }",
"public boolean isLoaded() {\n return m_module.isLoaded();\n }",
"public Boolean isHelpFAQAvailable(){\n\t\t\n\t\tgetElement(helpFAQlink).click();\n\t\twaitExplicitly(5);\n\t\t\n\t\tBoolean boo=false;\n\t\t\n\t\tif(getElements(helpFAQContentTitle).size()>0){\n\t\t\tboo=true;\n\t\t\tverbose(getElement(helpFAQContentTitle).getText());\n\t\t} else{\n\t\t\terror(\"Help and FAQ Document is not loaded\");\n\t\t}\n\t\t\n\t\treturn boo;\n\t}",
"boolean hasMajor();",
"boolean hasQuestId();",
"boolean hasQuestId();",
"boolean hasQuestId();",
"boolean hasQuestId();",
"public Boolean isValid() {\n if (modApptTitle.getText().isEmpty() || modApptTitle.getText() == null) {\n return false;\n } else if (modApptDescript.getText().isEmpty() || modApptDescript.getText() == null) {\n return false;\n } else if (modApptLocale.getText().isEmpty() || modApptLocale.getText() == null) {\n return false;\n }\n return true;\n }",
"@Override\n public boolean isLearnMoreDisplayed() {\n\n setLogString(\"Check if Learn More is displayed\", true, CustomLogLevel.HIGH);\n return isDisplayed(getDriver(), By.cssSelector(\".help_icon.clickable\"), TINY_TIMEOUT);\n }",
"boolean hasDecision();",
"boolean hasDecision();",
"public void verifyLearnMoreLink() {\n learnMoreLink.assertState().enabled();\n learnMoreLink.assertContains().text(\"Learn more about registering for an account.\");\n }",
"boolean hasHadithBookNo();",
"private void validateClassOrLesson() {\n\t\tclassId = languageSettings.getClassId();\n\t\tlessonId = languageSettings.getLessonId();\n\t\tif (classId != -1) {\n\t\t\tloadClassName(classId);\n\t\t\tif (className == null) {\n\t\t\t\tresetLanguageSettings();\n\t\t\t\tlessonId = -1l;\n\t\t\t\tlesson = null;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif ((!onLargeScreen) && lessonId != -1) {\n\t\t\tloadLesson(lessonId);\n\t\t\tif (lesson == null) {\n\t\t\t\t// lessons must have been deleted so reset\n\t\t\t\tresetLanguageSettings();\n\t\t\t\tlessonId = -1l;\n\t\t\t}\n\t\t}\n\t}",
"boolean hasTitle();",
"boolean hasProject();",
"private void checkStories(){\n }",
"boolean hasRewardResource();",
"boolean isHasResources();",
"boolean hasIsPerformOf();",
"private boolean canBeAdded(DetailedSection newSection) {\n for (Course course : courses) {\n // Lecture\n if (course.getSelectedLecture() != null) {\n if (newSection.conflictsWith(course.getSelectedLecture())) {\n return false;\n }\n }\n\n // Discussion\n if (course.getSelectedDiscussion() != null) {\n if (newSection.conflictsWith(course.getSelectedDiscussion())) {\n return false;\n }\n }\n\n // Lab\n if (course.getSelectedLab() != null) {\n if (newSection.conflictsWith(course.getSelectedLab())) {\n return false;\n }\n }\n }\n\n return true;\n }",
"static boolean Module(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"Module\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = Module_0(b, l + 1);\n r = r && Module_1(b, l + 1);\n exit_section_(b, m, null, r);\n return r;\n }",
"boolean hasGemReward();",
"boolean hasEnabled();",
"private static boolean hasTools(AIUnit aiUnit) {\n return aiUnit.getUnit().hasAbility(\"model.ability.improveTerrain\");\n }",
"boolean hasHeading();",
"boolean hasHeading();",
"boolean hasHeading();",
"boolean hasPrerequisiteId();",
"boolean hasHadithNo();",
"boolean isIntroduced();",
"boolean hasResource();",
"public boolean isModuleLoaded(Class<? extends AModule> moduleId)\n\t{\n\t\treturn modules.containsKey(moduleId)\n\t\t\t\t|| modules.values().stream().map(Object::getClass).anyMatch(c -> c.equals(moduleId));\n\t}",
"boolean hasMent();",
"boolean hasLevel();",
"boolean hasLevel();",
"boolean hasLevel();",
"boolean hasLevel();",
"boolean hasHas();",
"interface ExternalModuleChecker {\n\t/**\n\t * To check is external-module registered well\n\t *\n\t * @param module module to check\n\t * @return true if registered well\n\t */\n\tboolean isValidModule(ExternalModule module);\n}",
"boolean hasLte();",
"boolean hasAchievementType();",
"public static boolean isLearnable(IndustrySpecAPI spec)\n {\n return true;\n }",
"boolean hasWhid();",
"boolean hasConceptGroup();",
"public static boolean canHasModMOD(Context context) {\n return isPackageInstalled(context, MODMOD_PACKAGE);\n }",
"boolean hasHas_action();",
"public boolean isTutorialMode() {\n\t\treturn (this.tutorial != null);\n\t}",
"boolean hasBonusExp();",
"boolean hasBonusExp();",
"boolean hasBonusExp();",
"boolean hasDonatie();",
"boolean hasTask();",
"boolean hasModel();",
"boolean hasModel();",
"public boolean check(Student stu, Section sect){\n\t\tif (sect.getSectionNum() == 1){\n\t\t\tif (sect.getParent().section2.getResi().contains(stu)){\n\t\t\t\treturn false;\n\t\t\t} \n\t\t}\n\t\telse if (sect.getParent().section1.getResi().contains(stu)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"boolean hasDrugLumn();",
"boolean hasDrugLumn();",
"void addExamToModule(Module module, Exam exam);",
"boolean hasCurMP();",
"boolean hasCurMP();",
"boolean hasCurMP();",
"boolean hasCurMP();",
"boolean hasCurMP();"
]
| [
"0.873815",
"0.6638247",
"0.63475615",
"0.6290226",
"0.61907667",
"0.6182883",
"0.6120115",
"0.61131227",
"0.60729057",
"0.6072823",
"0.6056542",
"0.5948954",
"0.5911962",
"0.5806136",
"0.5759848",
"0.57546157",
"0.57430273",
"0.5735463",
"0.57317007",
"0.57305366",
"0.5727442",
"0.56336236",
"0.5593008",
"0.55755025",
"0.5504626",
"0.5504065",
"0.5504065",
"0.5504065",
"0.54973936",
"0.5480858",
"0.5480858",
"0.5480858",
"0.5480858",
"0.5439937",
"0.5430918",
"0.5425358",
"0.54249656",
"0.53779423",
"0.53776836",
"0.5362398",
"0.5362398",
"0.5362398",
"0.5362398",
"0.5360843",
"0.5350331",
"0.53453225",
"0.53453225",
"0.5344455",
"0.5338154",
"0.5337825",
"0.5334032",
"0.5331818",
"0.533145",
"0.530865",
"0.53056765",
"0.5304913",
"0.52927077",
"0.52908504",
"0.5288491",
"0.528724",
"0.52867025",
"0.52864504",
"0.52864504",
"0.52864504",
"0.5285905",
"0.5284326",
"0.5276691",
"0.5275358",
"0.52726066",
"0.52725255",
"0.5258461",
"0.5258461",
"0.5258461",
"0.5258461",
"0.5257852",
"0.52480185",
"0.52467465",
"0.5237991",
"0.52356625",
"0.5235048",
"0.521259",
"0.52040243",
"0.5201775",
"0.52004045",
"0.51784706",
"0.51784706",
"0.51784706",
"0.5178132",
"0.5175694",
"0.51745903",
"0.51745903",
"0.516696",
"0.51609313",
"0.51609313",
"0.5154891",
"0.5150477",
"0.5150477",
"0.5150477",
"0.5150477",
"0.5150477"
]
| 0.7526295 | 1 |
Adds a lesson to a module. | void addExamToModule(Module module, Exam exam); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void addLessonToModule(Module module, Lesson lesson);",
"private CommandResult addLesson() throws KolinuxException {\n try {\n timetable.executeAdd(parsedArguments, false);\n } catch (ExceedWorkloadException exception) {\n new TimetablePromptHandler(exception.getMessage(), timetable).handleExceedWorkload(parsedArguments);\n }\n logger.log(Level.INFO, \"User added a module to timetable\");\n return new CommandResult(parsedArguments[0].toUpperCase() + \" \"\n +\n parsedArguments[1].toUpperCase() + \" has been added to timetable\");\n }",
"public void testAddModule() {\n\t System.out.println(\"addModule\");\n\t Module module = module1;\n\t Student instance = student1;\n\t instance.addModule(module);\n\t }",
"boolean moduleHasLesson(Module module, Lesson lesson);",
"public void addModule(String name, Discipline discipline) throws SQLException{\r\n \r\n discipline.modules=new LinkedList<Module>();\r\n \r\n String SQL_addModule = SQLInstruct.addModule(name);\r\n db.updateDB(SQL_addModule);\r\n \r\n int module_id;\r\n String SQL_moduleId = SQLInstruct.getModuleAdded();\r\n ResultSet rSet = db.queryDB(SQL_moduleId);\r\n \r\n if(rSet.next()){\r\n module_id=rSet.getInt(1);\r\n String SQL_connectModule=SQLInstruct.connectDisciplineModule(discipline.getId(), module_id);\r\n db.updateDB(SQL_connectModule);\r\n }\r\n updateModules(discipline);\r\n }",
"public void addModule(Module m) {\n feed.getModules().add(m);\n }",
"public void addStudent(Student student) {\t\r\n\t\t//Adds student to list of students taking module\r\n\t\tStudentList.add(student);\r\n\t\t\r\n\t\t// adds module to students list of modules\r\n\t\tstudent.AddModuleList(ModuleName);\r\n}",
"public void addModule(IPModule module);",
"@Override\n\tpublic CourseLesson createCourseLesson(CourseLesson courseLesson) {\n\t\treturn lessonRepository.save(courseLesson);\n\t}",
"public void addModule(Module module, String name) {\n module.parentMobile = this;\n modules.put(name, module);\n if(module instanceof LightSource)\n Scene.addLightSource((LightSource) module);\n }",
"void deleteLesson(Module module, Lesson target);",
"void addCourse(Course course);",
"public AddCompletedModuleCommand(Module module) {\n requireNonNull(module);\n toAdd = module;\n }",
"void addHadithChapterIntro(Object newHadithChapterIntro);",
"@Override\r\n\tpublic String addModulePage(Module module) {\n\t\ttry {\r\n\t\t\tsessionFactory.getCurrentSession().save(module);\r\n\t\t\treturn \"success\";\r\n\t\t} catch (HibernateException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn \"fail\";\r\n\t\t}\r\n\t}",
"public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n {\n\n modules = new ArrayList<Module>();\n\n // MODULE 1\n essayWritingLessons = new ArrayList<Lesson>();\n essayWritingLessons.add(new Lesson(\"Spelling – Mnemonics\"));\n essayWritingLessons.add(new Lesson(\"Essay Writing 2\"));\n essayWritingLessons.add(new Lesson(\"Phrases\"));\n essayWritingLessons.add(new Lesson(\"Clauses\"));\n essayWritingLessons.add(new Lesson(\"Prepositions\"));\n essayWritingLessons.add(new Lesson(\"Conjunctions\"));\n modules.add(new Module(\"Essay Writing\", essayWritingLessons));\n Log.d(TAG, \"onCreateView: Essay writing module instantiated and added.\");\n\n // MODULE 2\n speechLessons = new ArrayList<Lesson>();\n speechLessons.add(new Lesson(\"Conjunctions – Sentences\"));\n speechLessons.add(new Lesson(\"Sentence Improvement\"));\n speechLessons.add(new Lesson(\"Sentence Construction\"));\n speechLessons.add(new Lesson(\"Commas 2\"));\n speechLessons.add(new Lesson(\"Quotation Marks\"));\n modules.add(new Module(\"Speech\", speechLessons));\n Log.d(TAG, \"onCreateView: Speech module instantiated and added.\");\n\n // MODULE 3\n punctuationLessons = new ArrayList<Lesson>();\n punctuationLessons.add(new Lesson(\"Colons and Semi-Colons\"));\n punctuationLessons.add(new Lesson(\"Apostrophe – Possession\"));\n punctuationLessons.add(new Lesson(\"Punctuation – Various\"));\n punctuationLessons.add(new Lesson(\"Interjections\"));\n punctuationLessons.add(new Lesson(\"Clauses\"));\n modules.add(new Module(\"Punctuation\", punctuationLessons));\n Log.d(TAG, \"onCreateView: Punctuation module instantiated and added.\");\n\n // MODULE 4\n advancedSpeechLessons = new ArrayList<Lesson>();\n advancedSpeechLessons.add(new Lesson(\"Subject and Predicate\"));\n advancedSpeechLessons.add(new Lesson(\"Modal Verbs\"));\n advancedSpeechLessons.add(new Lesson(\"Adjectives\"));\n advancedSpeechLessons.add(new Lesson(\"Adverbs\"));\n advancedSpeechLessons.add(new Lesson(\"First and second conditionals\"));\n modules.add(new Module(\"Advanced Speech\", advancedSpeechLessons));\n Log.d(TAG, \"onCreateView: Advanced Speech module instantiated and added.\");\n\n // MODULE 5\n spellingLessons = new ArrayList<Lesson>();\n spellingLessons.add(new Lesson(\"Modals of obligation\"));\n spellingLessons.add(new Lesson(\"Imperatives\"));\n spellingLessons.add(new Lesson(\"Spelling\"));\n spellingLessons.add(new Lesson(\"Prefixes\"));\n spellingLessons.add(new Lesson(\"Suffixes\"));\n modules.add(new Module(\"Spelling\", spellingLessons));\n Log.d(TAG, \"onCreateView: Spelling module instantiated and added.\");\n\n // MODULE 6\n sentenceImprovementLessons = new ArrayList<Lesson>();\n sentenceImprovementLessons.add(new Lesson(\"Advanced Dictionary Use\"));\n sentenceImprovementLessons.add(new Lesson(\"Conjunctions – Sentences\"));\n sentenceImprovementLessons.add(new Lesson(\"Sentence Improvement\"));\n sentenceImprovementLessons.add(new Lesson(\"Sentence Construction\"));\n sentenceImprovementLessons.add(new Lesson(\"Verbs – Tense\"));\n modules.add(new Module(\"Sentence Improvement\", sentenceImprovementLessons));\n Log.d(TAG, \"onCreateView: Sentence improvement module instantiated and added.\");\n\n View root = inflater.inflate(R.layout.fragment_literacy, container, false);\n\n txtView = root.findViewById(R.id.tv_title);\n imgView = root.findViewById(R.id.piechart);\n lv_literacyModules = root.findViewById(R.id.lv_literacyModules);\n\n adapter = new Adapter_Modules(modules, getContext());\n\n lv_literacyModules.setAdapter(adapter);\n\n PieChart _piechart = (PieChart) root.findViewById(R.id.piechart);\n\n //set Status- & Navigation bar colors\n @SuppressLint(\"ResourceType\") String systemBar = getResources().getString(R.color.darkBewareOrange);\n ((MainActivity)getActivity()).updateStatusBarColor(systemBar);\n ((MainActivity)getActivity()).updateNavBarColor(systemBar);\n //Toolbar & Navigation drawer Header\n @SuppressLint(\"ResourceType\") String toolBar = getResources().getString(R.color.bewareOrange);\n ((MainActivity)getActivity()).updateActionBarColor(toolBar);\n ((MainActivity)getActivity()).updateNavHeaderColor(toolBar);\n\n\n return root;\n }",
"public void addModule(Module module, int parentId) {\n\t\tif(parentId !=0){\n\t\t\tmodule.setParent((Module)this.getHibernateTemplate().load(Module.class, parentId));\n\t\t}\n\t\tthis.getHibernateTemplate().save(module);\n\t}",
"public void addRequest(String module) {\r\n //if this module hasn't already requested this button\r\n if (!modules.contains(module)) {\r\n //add a request\r\n modules.add(module);\r\n }\r\n }",
"private void addStudy(Study study) {\n\t\t\r\n\t}",
"public boolean createLesson() {\n\t\treturn false;\n\t}",
"void addHadithChapterNo(Object newHadithChapterNo);",
"public void addStudent(Student student) {\n\t\t\r\n\t}",
"public void testAddCourse() {\n\t System.out.println(\"addCourse\");\n\t Course course = course1;\n\t Student instance = student1;\n\t instance.addCourse(course);\n\t }",
"public void addNewAssingment() throws IOException {\r\n\t\tconnectionmain.showTeacherGUIAssWindow();\r\n\t}",
"public void addStudent(Student student) {\n students.add(student);\n }",
"private void startLesson() {\n\t\tFragmentManager fm = getSupportFragmentManager();\n\t\tFragmentTransaction ft = fm.beginTransaction();\n\t\tint screenId = onLargeScreen ? R.id.detailFragmentContainer\n\t\t\t\t: R.id.fragmentContainer;\n\t\tFragment lessonFragment = (Fragment) fm.findFragmentById(screenId);\n\t\tif (lessonFragment != null) {\n\t\t\t// ft.remove(lessonFragment) ;\n\t\t\tfm.popBackStackImmediate();\n\n\t\t}\n\t\tlessonFragment = getLessonFragment();\n\t\tft.add(screenId, lessonFragment,\n\t\t\t\tonLargeScreen ? CHILD_CONTAINER : MASTER_CONTAINER)\n\t\t\t\t.addToBackStack(null).commit();\n\n\t}",
"public void setLessonCount(Integer lessonCount) {\n this.lessonCount = lessonCount;\n }",
"public void addCourse(Course c){\n\t\tcourses.add(c);\n\t}",
"private void addControl() {\n if(getActivity()!=null){\n ((DrawerLocker ) getActivity()).setDrawerEnabled(true);\n }\n //get Bundle\n Bundle args = getArguments();\n lessonIDItem = 1;\n if(args!=null && args.containsKey(\"lesson_item_id\")){\n lessonIDItem = args.getInt(\"lesson_item_id\");\n lesson_item_name =args.getString(\"lesson_item_name\");\n }\n toolbar = root.findViewById(R.id.contentLesson_toolbar);\n ((AppCompatActivity ) getActivity()).setSupportActionBar(toolbar);\n ((AppCompatActivity) getActivity()).getSupportActionBar().setTitle(\"Lesson\");\n ((AppCompatActivity) getActivity()).getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n\n progressBarContent = root.findViewById(R.id.progressBarContent);\n progressBarContent.setMax(100);\n progressBarContent.setProgress(1);\n progressBarContent.incrementProgressBy(2);\n\n wv_lesson_content = root.findViewById(R.id.wv_lesson_content);\n wv_lesson_content.setWebViewClient(new WebViewClientCustomer());\n WebSettings settings = wv_lesson_content.getSettings();\n settings.setSupportZoom(true);\n settings.setBuiltInZoomControls(true);\n settings.setDisplayZoomControls(false);\n settings.setJavaScriptEnabled(true);\n wv_lesson_content.loadUrl(url + lessonIDItem);\n }",
"public void addExercise(Exercise p) {\n exercises.add(p);\n }",
"public void addQuestion(Question question);",
"public void addStudent(Student student);",
"public void addCourse(Course c) {\n\t\tcourseList.add(c);\n\t}",
"public void setLesson(Lesson lesson){\n\t\tselectedLesson = lesson;\n\t\tview = LessonPanel.getLessonPanel();\n\t\tview.clearPhraseTabelContent();\n\t\tinitAllPhrases();\n\n\t\tview.setVisible(true);\n\t}",
"public void addTodoModule(){\n final Dialog dialog = new Dialog(context);\n dialog.setContentView(R.layout.add_todomodule);\n dialog.setTitle(R.string.name_module_todo);\n\n Button cancel = (Button) dialog.findViewById(R.id.cancel);\n cancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n }\n });\n\n Button validate = (Button) dialog.findViewById(R.id.validatenewmodule);\n validate.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n TodoModuleService service = TodoModuleAPI.getInstance();\n service.addTodoModule(event.getId(),new Callback<Response>() {\n @Override\n public void success(Response s, Response response) {\n Toast.makeText(AddModule.this, \"Le module a bien été ajouté!\", Toast.LENGTH_SHORT).show();\n finish();\n }\n\n @Override\n public void failure(RetrofitError error) {\n error.printStackTrace();\n finish();\n }\n });\n dialog.dismiss();\n }\n });\n\n dialog.show();\n }",
"public void addStudents(Student student) {\r\n System.out.println(\"conectado con model ---> metodo addStudents\");\r\n //TODO\r\n }",
"public void addt1Module(Module m) {\n t1UnSel.getItems().remove(m);\n t1Sel.getItems().add(m);\n }",
"public void addLecture(String lecture){\n\t\t//todo: fill this method\n\t}",
"public LessonId (int category,int lesson)\n\t{\n\t\tCategory = category;Lesson = lesson;\n\t}",
"public void addMission(Mission mission) {\n mission.setChallenge(this);\n this.missions.add(mission);\n this.xp += mission.getXp();\n this.level++;\n }",
"public void c2pAddModule(IPModule module);",
"void storeLesson(Lesson lesson) throws DataAccessException;",
"public void add(Student s)\r\n {\r\n students.add(s);\r\n }",
"public void addSchool(School school) {\n\n\t}",
"synchronized void addModule(Module module) throws Exception\n {\n m_modules.add(module);\n\n // Set protection domain after adding the module to the bundle,\n // since this requires that the bundle has a module.\n ((ModuleImpl) module).setSecurityContext(\n new BundleProtectionDomain(getFramework(), this));\n\n SecurityProvider sp = getFramework().getSecurityProvider();\n if ((sp != null) && (System.getSecurityManager() != null))\n {\n try\n {\n sp.checkBundle(this);\n }\n catch (Exception ex) \n {\n m_modules.remove(m_modules.size() - 1);\n throw ex;\n }\n }\n\n // TODO: REFACTOR - consider moving ModuleImpl into the framework package\n // so we can null module capabilities for extension bundles so we don't\n // need this check anymore.\n if (!isExtension())\n {\n // Now that the module is added to the bundle, we can update\n // the resolver's module state.\n getFramework().getResolver().addModule(module);\n }\n }",
"private void addNewCoursesOnClick(){\n dataSource.open();\n dataSource.createCourses(editTextCourses.getText().toString(),editTextTeacher.getText().toString(),editTextWhen.getText().toString(),editTextWhere.getText().toString(),editTextGrading.getText().toString(),editTextOther.getText().toString());\n dataSource.close();\n CoursesListElement courses = new CoursesListElement(editTextCourses.getText().toString(),editTextTeacher.getText().toString(),editTextWhen.getText().toString(),editTextWhere.getText().toString(),editTextGrading.getText().toString(),editTextOther.getText().toString(),0);\n listElements.add(courses);\n // setting list adapter\n listView.setAdapter(new ActionListAdapter(getActivity(),R.id.list_courses, listElements));\n newCourses.setVisibility(View.GONE);\n editTextCourses.setText(\"\");\n editTextTeacher.setText(\"\");\n editTextWhen.setText(\"\");\n editTextWhere.setText(\"\");\n editTextGrading.setText(\"\");\n editTextOther.setText(\"\");\n }",
"public Lesson saveLesson(Lesson lesson) {\n lesson.setName(StringUtils.trim(lesson.getName()));\n\n saveRelatedTopics(lesson);\n\n Lesson savedLesson = presaveLessonCover(lesson);\n\n saveRelatedExpressionItems(savedLesson);\n\n //Save again to store related expressionItem (with generated ids) inside the lesson.\n return lessonRepository.save(savedLesson);\n }",
"public void addCourse(int studentNumber, double credit, double gp)\r\n {\r\n Student s = findStudent(studentNumber);\r\n\r\n if(s == null)\r\n {\r\n System.out.println(\"the student is not exist\");\r\n return;\r\n }\r\n else\r\n {\r\n s.addCourse(credit,gp);\r\n }\r\n }",
"@Override\r\n\tpublic void addStudentInCourse(Course course, User user) {\n\t\t\r\n\t}",
"@Override\n public Lesson create(Long memberId, LessonRequest request) throws Exception {\n // find Instructor with memberId,\n Optional<Instructor> instr = instructorService.findInstructorById(memberId);\n // then create Lesson with given info from lessonRequest\n Lesson lesson = new Lesson();\n lesson.setInstructor(instr.get());\n lesson.setDescription(request.getDescription());\n lesson.setStartTime(request.getStartTime());\n lesson.setEndTime(request.getEndTime());\n lesson.setStatus(\"OPEN\");\n\n LessonTime.checkIfStartTimeIsFirst(lesson.getStartTime(),lesson.getEndTime());\n // LessonTime lessonTime = new LessonTime();\n lessonTime.checkOverlapBetweenLessons(lesson.getEndTime(),lesson.getStartTime(),lesson.getInstructor());\n\n // persist into DB -> go via LessonRepository\n return lessonRepository.save(lesson);\n\n }",
"public Lesson(String name)\r\n { this.name = name;\r\n layer = 1; \r\n }",
"abstract public NewsBrowserComponent addToGraph(NewsBrowserModule module);",
"public void add(MiningTask mt) {\n miningTasks.add(mt);\n }",
"private void loadLesson(Long lessonId) {\n\t\tlesson = null;\n\t\tif (lessonId != null && lessonId > -1) {\n\t\t\tdaoSession = LanguageApplication.getInstance().getDaoSession();\n\t\t\tLessonDao lessonDao = daoSession.getLessonDao();\n\t\t\tlesson = lessonDao.load(lessonId);\n\t\t}\n\t}",
"@Override\r\n\tpublic void addModules(Modules modules) {\n\t\tgetHibernateTemplate().save(modules);\r\n\t}",
"public void addElement(DemoTask task) {\n\t\tdata.add(task);\n\t}",
"public void addModString(String name, String string)\n {\n modules.put(name,string);\n }",
"public void addModule(Module m) throws Exception {\n\t\tModule returned = _modules.put(m.getName(), m);\n\t\tif (returned != null) \n\t\t\tthrow new Exception(\"Module with this name already exists. Module: \" + m.getName() + \" in \" + this._name);\n//\t\t\tSystem.out.println(\"ERROR: overwrote a module with the same name: \" + m.getName());\n\t\tSet<Vertex> vSet = m.getVertexMap();\n\t\tfor (Vertex v : vSet)\n\t\t\tif (_vertices.contains(v))\n\t\t\t\tthis._hasOverlap = true;\n\t\tthis._vertices.addAll(vSet);\n\t}",
"public void addHelp(Help help) {\n this.helps.clear();\n this.helps.add(help);\n }",
"private void addStudent() {\n\t\t\n\t\tString lastName = sLastNameTF.getText();\n\t\tString firstName = sFirstNameTF.getText();\n\t\tString schoolName = sSchoolNameTF.getText();\n\t\tchar[] password = sPasswordPF1.getPassword();\n\t\tString sA1 = sSecurityQ1TF.getText();\n\t\tString sQ1 = (String)sSecurityList1.getSelectedItem();\n\t\tString sA2 = sSecurityQ2TF.getText();\n\t\tString sQ2 = (String)sSecurityList2.getSelectedItem();\n\t\tString grade = (String)sGradeList.getSelectedItem();\n\t\t\n\t\tstudent = new Student(lastName, firstName, schoolName, password, sA1, sQ1, sA2, sQ2, grade);\n\t\t\n\t\t//Add student to database\n\t\t\n\t}",
"protected final void addModule(BlankDialogModule module, boolean display) {\n // remove spacing (the child deals with that now)\n setBorder(BorderFactory.createEmptyBorder());\n // register this module\n childModules.add(module);\n id2ChildModule.put(module.getIdentifier(), module);\n // inject listener\n module.addListener(propagationListener);\n // add child module to this container to be displayed\n if (display) {\n GridBagConstraints gbc = new GridBagConstraints();\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.gridwidth = GridBagConstraints.REMAINDER;\n gbc.weightx = 1;\n this.add(module, gbc);\n }\n }",
"public void addStmt(Stmt node) {\n List<Stmt> list = getStmtList();\n list.addChild(node);\n }",
"@Override\n\tpublic void addCourse(String courseName) {\n\t\tcd.addCourse(courseName);\n\t}",
"public void assignCourse(Course course) {\r\n this.course.add(course);\r\n }",
"public void add(Student student) {\n\t\tstudentList.add(student);\n\t}",
"private void addStudent(Student student) {\n\t\tSystem.out.println(\"Add Student\");\n\t\tsmb.saveStudent(student);\n\t}",
"public void AddNewSkill()\n\t{\n\t\t\n\t}",
"private void registerModule(Module module) {\n \t\tif (module.register()) {\n \t\t\t_availableModules.add(module);\n \t\t}\n \t}",
"public void addCourse(Course o) {\r\n\t\t\tcourseTaken.add(o);\r\n\t\t}",
"public void addStudentInCourse(Course course, Student student){\n \n String statement = ADD_STUDENT_IN_COURSE;\n data.makeUpdateStatement(statement,new Object[]{(Object)course.getId(),(Object)student.getId()});\n data.closeConnections(data.ps, data.conn);\n }",
"public Lesson saveInternal(final Lesson lesson) {\n\t\tAssert.notNull(lesson);\n\n\t\t//Assertion that the user modifying this lesson has the correct privilege.\n\t\tfinal Authentication authentication = SecurityContextHolder.getContext().getAuthentication();\n\t\tAssert.isTrue(authentication.getAuthorities().toArray()[0].toString().equals(\"AUDITOR\"));\n\n\t\tfinal Lesson saved = this.lessonRepository.save(lesson);\n\t\treturn saved;\n\t}",
"public Module(String code, String title)\n {\n // initialise instance variables\n this.code = code;\n this.title = title;\n credit = 0;\n }",
"void addWorkflow(Workflow workflow);",
"public void addStudent(User user) {\n\t\t\r\n\t}",
"private void Add() {\n\t\t\tString names2 = StudentNum.getText();\n\t\t\tString names1 = Studentname.getText();\n\t\t\tStudentname.setText(\"\");\n\t\t\tStudentNum.setText(\"\");\n\t\t\tif (!names2.equals(\"Student Number\")) {\n\t\t\t\tFile directory = new File(\"Schools\\\\\" + names2 + \".hi\");\n\t\t\t\tif (!directory.exists()) {\n\t\t\t\t\tif (directory.mkdir()) {\n\t\t\t\t\t\tworklabel.setText(\"Student has been added\");\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tPrintWriter out;\n\t\t\t\t\t\t\tPrintWriter out2;\n\t\t\t\t\t\t\tout = new PrintWriter(new FileWriter(\"Schools\\\\\"\n\t\t\t\t\t\t\t\t\t+ names2 + \".hi\" + \"\\\\\"\n\t\t\t\t\t\t\t\t\t+ \"Student Information.txt\", true));\n\t\t\t\t\t\t\tout.println(\"Student Name: \" + names1);\n\t\t\t\t\t\t\tout.println(\"Student Number: \" + names2);\n\t\t\t\t\t\t\tout.println(\"Address:\");\n\t\t\t\t\t\t\tout.println(\"Postal Code:\");\n\t\t\t\t\t\t\tout.println(\"Phone Number:\");\n\t\t\t\t\t\t\tout.println(\"Contact #1 Name:\");\n\t\t\t\t\t\t\tout.println(\"Contact #1 Number:\");\n\t\t\t\t\t\t\tout.println(\"Contact #1 Email:\");\n\t\t\t\t\t\t\tout.println(\"Contact #2 Name:\");\n\t\t\t\t\t\t\tout.println(\"Contact #2 Number:\");\n\t\t\t\t\t\t\tout.println(\"Contact #2 Email:\");\n\t\t\t\t\t\t\tout.println(\"Medical Alert #1:\");\n\t\t\t\t\t\t\tout.println(\"Medical Alert #2:\");\n\t\t\t\t\t\t\tout.println(\"Medical Alert #3:\");\n\t\t\t\t\t\t\tout.println(\"Medical Alert #4:\");\n\t\t\t\t\t\t\tout.println(\"Medical Alert #5:\");\n\t\t\t\t\t\t\tout.println(\"Accomodation #1:\");\n\t\t\t\t\t\t\tout.println(\"Accomodation #2:\");\n\t\t\t\t\t\t\tout.println(\"Accomodation #3:\");\n\t\t\t\t\t\t\tout.println(\"Accomodation #4:\");\n\t\t\t\t\t\t\tout.println(\"Accomodation #5:\");\n\t\t\t\t\t\t\tout.println(\"Volunteer Hours:\");\n\t\t\t\t\t\t\tout2 = new PrintWriter(new FileWriter(\"Schools\\\\\"+ names2+\".hi\" + \"\\\\\" + \"Transcript.txt\",true));\n\t\t\t\t\t\t\tout2.println(\"Course Code\t\tMark\tPassed\tAbsences\tLate\");\n\t\t\t\t\t\t\tout.close();\n\t\t\t\t\t\t\tout2.close();\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\tworklabel.setText(\"Invalid\");\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public void addCourse(Course course) {\n this.displayCourses();\n courses.add(course);\n this.displayCourses();\n }",
"public Lesson(int id, String name, LocalDate classDate) {\n this.id = id;\n this.name = name;\n this.classDate = classDate;\n }",
"public void AddCredits(int credits)\n {\n this.credits += credits;\n }",
"public boolean addCourse(Course c) {\n\t\treturn false;\n\t}",
"boolean moduleHasExam(Module module, Exam exam);",
"private static Module createEditedModule(Module moduleToEdit,\n EditModuleCommand.EditModuleDescriptor editModuleDescriptor) {\n assert moduleToEdit != null;\n\n ModuleName updatedName = editModuleDescriptor.getModuleName();\n\n UniqueStudentList studentList = moduleToEdit.getUniqueStudentList();\n UniqueTaskList taskList = moduleToEdit.getTaskList();\n\n return new Module(updatedName, studentList, taskList);\n }",
"@Transactional\n\t@Override\n\tpublic boolean addLesson(VInputLesson vil) throws Exception {\n\t\tLesson lesson = vil.getLesson();\n\t\tList<Integer> branches = vil.getBranches();\n\t\tif (lessonDao.addLesson(lesson)) {\n\t\t\tlessonbranchDao.deleteBranchesByLid(lesson.getLid());\n\t\t\tfor (Integer branchid : branches) {\n\t\t\t\tLessonbranch lessonbranch = new Lessonbranch();\n\t\t\t\tlessonbranch.setBranchid(branchid);\n\t\t\t\tlessonbranch.setLid(lesson.getLid());\n\t\t\t\tif(lessonbranchDao.insert(lessonbranch) == false) return false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"private void addQuestion() {\n if (modifiable()) {\n try {\n this.questions.add(Question.fromInput(gradeable()));\n } catch (UserInputException e) {\n System.err.println(e.getMessage());\n }\n } else {\n System.err.println(\"Can not modify this by add a question.\");\n }\n }",
"Lesson loadLesson(int id) throws DataAccessException;",
"@Test\n public void autocreateLesson() throws Exception{\n\n }",
"public long add(String name, String discipline, String grade) {\n SQLiteDatabase db = _openHelper.getWritableDatabase();\n if (db == null) {\n return 0;\n }\n ContentValues row = new ContentValues();\n row.put(\"name\", name);\n row.put(\"discipline\", discipline);\n row.put(\"grade\", grade);\n long id = db.insert(\"Exams\", null, row);\n db.close();\n return id;\n }",
"@Override\n\tpublic void addTmly(Tmly tmly) {\n\t\tString sql = \"insert into tmly(id_,title,content) values(?,?,?)\";\n\t\tthis.jdbcTemplate\n\t\t\t\t.update(sql,\n\t\t\t\t\t\tnew Object[] { tmly.getId(), tmly.getTitle(),\n\t\t\t\t\t\t\t\ttmly.getContent() });\n\t}",
"public com.transerainc.aha.gen.agent.SkillDocument.Skill addNewSkill()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.transerainc.aha.gen.agent.SkillDocument.Skill target = null;\n target = (com.transerainc.aha.gen.agent.SkillDocument.Skill)get_store().add_element_user(SKILL$0);\n return target;\n }\n }",
"public void insertCourse(){\n \n }",
"public void add(HeroNode heroNode){ //heroNode是需要添加的新节点\n // we need a temperate node temp, because the head node couldn't be changed\n HeroNode temp = head;\n // go through the linkedlist to find the last node\n while (true){\n //find the last node of this linkedlist\n if (temp.next==null){\n break;\n }\n temp = temp.next;\n }\n // temp points to the end of the linkedlist when exiting the while\n // let the next of the last node point to the new node\n temp.next = heroNode;\n }",
"@Override\n public void addStudent(Student student) {}",
"public Modul(String modulname) {\n\t\tthis.modulname=modulname;\n\t}",
"@Override\r\n\tpublic boolean addExam(IExam exam) {\n\t\treturn false;\r\n\t}",
"public void addStudent(Student InStudent)\n\t{\n\t\tclassRoll.add (InStudent);\n\t\tthis.saveNeed = true;\n\n\t\t\n\t}",
"public void setModule(String name, BwModule module) {\n modules.put(name, module);\n }",
"public void addStudent(String theStudent) {\n\t\tstudents[numberOfStudents] = theStudent;\n\t\tnumberOfStudents++; // Upadate the total number of students\n\t}",
"void addParticipant(Participant participant);",
"public ArrayList<Lesson> getLessonDetails(ArrayList<Lesson> lessons, String lessonType) throws AddException {\n ArrayList<Lesson> completeList = new ArrayList<>();\n try {\n for (Lesson lesson : lessons) {\n if (lesson.getLessonType().equals(lessonType)) {\n completeList.add(lesson);\n } else if (lessonType.equals(LECTURE)) {\n if (!lesson.getLessonType().equals(TUTORIAL) && !lesson.getLessonType().equals(LAB)) {\n completeList.add(lesson);\n }\n }\n }\n } catch (NullPointerException e) {\n throw new AddException(\"Module has been added into timetable, module has no lesson\");\n }\n Collections.sort(completeList, new ClassNumComparator());\n return completeList;\n }",
"@Test\n\tpublic void addAssignment() {\n\t\tfinal Date dueDate = new Date();\n\t\tfinal Template template = new Template(\"Template 1\");\n\t\ttemplate.addStep(new TemplateStep(\"Step 1\", 1.0));\n\t\tfinal Assignment asgn = new Assignment(\"Assignment 1\", dueDate, template);\n\t\tasgn.addTask(new Task(\"Task 1\", 1, 1, asgn.getID()));\n\t\t\n\t\tfinal String asgnId = asgn.getID();\n\t\t\n\t\ttry {\n\t\t\tStorageService.addTemplate(template);\n\t\t\tStorageService.addAssignment(asgn);\n\t\t} catch (final StorageServiceException e) {\n\t\t\tfail(e.getMessage());\n\t\t}\n\t\t\n\t\tfinal Assignment afterAsgn = StorageService.getAssignment(asgnId);\n\t\tassertEquals(asgn.fullString(), afterAsgn.fullString());\n\t}",
"public void actionPerformed(ActionEvent e){\n \t\t \tstudentsController.addStudent();\n \t\t }"
]
| [
"0.9163312",
"0.6660737",
"0.6645157",
"0.6504214",
"0.63927877",
"0.6070341",
"0.59789675",
"0.5949735",
"0.59048307",
"0.568288",
"0.56651706",
"0.56487143",
"0.5594843",
"0.5585322",
"0.5459427",
"0.5447035",
"0.5411503",
"0.53674716",
"0.5349294",
"0.52749807",
"0.5270656",
"0.52356905",
"0.52302754",
"0.52297926",
"0.51925623",
"0.5189777",
"0.517936",
"0.5178207",
"0.51768905",
"0.51614565",
"0.5094792",
"0.5085268",
"0.5083187",
"0.5081222",
"0.50810415",
"0.5071141",
"0.5046094",
"0.50348616",
"0.50287366",
"0.50263906",
"0.5017915",
"0.5013673",
"0.5002838",
"0.49493465",
"0.49487245",
"0.4936788",
"0.49183688",
"0.49145913",
"0.49093533",
"0.49018627",
"0.4897305",
"0.48847532",
"0.48690486",
"0.486558",
"0.485349",
"0.4850966",
"0.48508325",
"0.4843384",
"0.48309147",
"0.482136",
"0.4820356",
"0.48027083",
"0.47959328",
"0.47868776",
"0.47819278",
"0.4780897",
"0.47743356",
"0.47694814",
"0.4766023",
"0.4747342",
"0.47470173",
"0.47456408",
"0.47428572",
"0.4727162",
"0.47255054",
"0.47104502",
"0.47078356",
"0.470443",
"0.46892115",
"0.46829408",
"0.46821347",
"0.4680754",
"0.46749508",
"0.4669445",
"0.46682343",
"0.46642023",
"0.4659873",
"0.4658511",
"0.46584773",
"0.46512735",
"0.46504647",
"0.46470132",
"0.46435896",
"0.46311566",
"0.46302852",
"0.46206704",
"0.46187565",
"0.46171153",
"0.4612073",
"0.4589586"
]
| 0.74155825 | 1 |
Returns an unmodifiable view of the filtered module list | ObservableList<Module> getFilteredModuleList(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected List<Object> getModules() {\n return new ArrayList<>();\n }",
"public List<Module> getModules(){\r\n return modules;\r\n }",
"public Set<String> moduleList() {\n return moduleList;\n }",
"public List<AModule> getModules()\n\t{\n\t\treturn new ArrayList<>(modules.values());\n\t}",
"public XmlSerializableModuleList() {\n modules = new ArrayList<>();\n }",
"synchronized List<Module> getModules()\n {\n return m_modules;\n }",
"public List<String> getNotExportedSearchableFields() {\n return Collections.unmodifiableList(notExportedSearchableFields);\n }",
"public static ArrayList<Modules> getModules() {\n ArrayList<Modules> modules = new ArrayList<>();\n modules.add(new Modules(\"Social Engineering Attacks\", 1, 1, R.drawable.graphic1));\n modules.add(new Modules(\"Psychology Based Attacks\", 2, 2, R.drawable.graphic2));\n modules.add(new Modules(\"Stay safe online\", 3, 3, R.drawable.graphic3));\n modules.add(new Modules(\"Work from Home\", 4, 4, R.drawable.graphic4));\n modules.add(new Modules(\"Best practices\", 5, 5, R.drawable.graphic5));\n modules.add(new Modules(\"Physical Security\", 6,6, R.drawable.graphic6));\n\n return modules;\n }",
"List<ICMakeModule> getModules();",
"public List<Module> unloadedButAvailableModules() {\n \t\tArrayList<Module> returned = new ArrayList<Module>();\n \t\treturned.addAll(_availableModules);\n \t\tfor (Enumeration<FlexoModule> e = loadedModules(); e.hasMoreElements();) {\n \t\t\treturned.remove(e.nextElement().getModule());\n \t\t}\n \t\treturn returned;\n \t}",
"public static List<String> getAllModules()\n {\n List<String> list = new ArrayList<String>();\n for (Map.Entry<String, String> listItem: mapper.entrySet()) {\n list.add(listItem.getValue());\n }\n return list;\n }",
"public List<String> getModulesList() {\n\t\treturn modulesList;\n\t}",
"public List<Module> availableModules() {\n \t\treturn _availableModules;\n \t}",
"List<String> getModuleNames() {\n return moduleNames;\n }",
"Iterable<String> getModuleNames();",
"@Override\r\n\tpublic List<Modules> getAllModules() {\n\t\tString hql = \"from Modules\";\r\n\t\treturn (List<Modules>) getHibernateTemplate().find(hql);\r\n\t}",
"public List<Module> getAllModules() {\n List<Module> moduleList = new ArrayList<>();\n\n db = dbHelper.getReadableDatabase();\n\n Cursor cursor = db.query(Constants.MODULE_TABLE_NAME, null, null, null, null, null, null);\n\n while (cursor.moveToNext()) {\n int id = cursor.getInt(cursor.getColumnIndex(Constants.MODULE_ID));\n\n String type = cursor.getString(cursor.getColumnIndex(Constants.MODULE_TYPE));\n String name = cursor.getString(cursor.getColumnIndex(Constants.MODULE_NAME));\n String label = cursor.getString(cursor.getColumnIndex(Constants.MODULE_LABEL));\n String command = cursor.getString(cursor.getColumnIndex(Constants.MODULE_COMMAND));\n\n Module module = new Module(type, name, label, command);\n module.setId(id);\n\n moduleList.add(module);\n }\n\n cursor.close();\n\n return moduleList;\n }",
"public Collection<Module> getModules() {\n\t\treturn this._modules.values();\n\t}",
"@Override\n\tpublic List<Module> listRootModule() {\n\t\treturn moduleDao.listRootModule();\n\t}",
"private Vector getModuleList(Object userObject) {\n\n if (userObject instanceof rcNode) {\n rcNode nn = (rcNode) userObject;\n if ((nn == null) || (nn.client == null) || (nn.client.farm == null)) {\n return new Vector();\n }\n return getModules(nn.client.farm);\n } else if (userObject instanceof String) {\n Vector farms = (Vector) groupFarms.get(userObject);\n if (farms == null) {\n return new Vector();\n }\n Vector v = null;\n TreeSet ss = null;\n for (Enumeration e = farms.elements(); e.hasMoreElements();) {\n rcNode nn = (rcNode) e.nextElement();\n if ((nn == null) || (nn.client == null) || (nn.client.farm == null)) {\n continue;\n }\n MFarm farm = nn.client.farm;\n Vector moduleList = getModules(farm);\n if (v == null) {\n v = new Vector(moduleList);\n if (!intersectSelected) {\n ss = new TreeSet();\n auxiliarAdding(ss, moduleList);\n }\n } else if (intersectSelected) {\n intersectVectors(v, moduleList);\n } else {\n reunionVectors(ss, v, moduleList);\n }\n }\n return v;\n }\n return new Vector();\n }",
"public List<String> getAllModules() {\n\t\treturn allModules;\n\t}",
"Set<File> getModules();",
"private static List createLocalizationModuleList(ModuleImpl module)\n {\n if (Util.isFragment(module))\n {\n List<Wire> hostWires = module.getWires();\n if ((hostWires != null) && (hostWires.size() > 0))\n {\n module = (ModuleImpl) hostWires.get(0).getExporter();\n for (int hostIdx = 1; hostIdx < hostWires.size(); hostIdx++)\n {\n if (module.getVersion().compareTo(\n hostWires.get(hostIdx).getExporter().getVersion()) < 0)\n {\n module = (ModuleImpl) hostWires.get(hostIdx).getExporter();\n }\n }\n }\n }\n\n // Create a list of the module and any attached fragments.\n List result = new ArrayList();\n result.add(module);\n List<Module> fragments = module.getFragments();\n if (fragments != null)\n {\n result.addAll(fragments);\n }\n return result;\n }",
"public List getListOfExtendedModules(String rootModule)\r\n {\r\n Vector dependantModules = null;\r\n if (rootModule == null) \r\n {\r\n dependantModules = new Vector();\r\n return dependantModules;\r\n }\r\n dependantModules = (Vector) moduleStore.getValues(rootModule);\r\n if (dependantModules == null)\r\n {\r\n dependantModules = new Vector();\r\n }\r\n return dependantModules;\r\n }",
"List<JModuleInfo> queryAll();",
"public List<AnnotatedLinkWrapper> getItemsUnfiltered() {\n return getDelegate().getExtendedItems().stream()\n .map(AnnotatedLinkWrapper::new)\n .filter(al -> al.getTarget() != null)\n .filter(al -> al.getTarget().isInProduction())\n .collect(Collectors.toList());\n }",
"public Collection getModulesNames() {\n\t\treturn modulesNames;\n\t}",
"List<Moderator> getModerators();",
"List<String> getActiveFilters();",
"public List<String> list() throws SecurityException {\n if (collectorsToList == null) {\n throw new IllegalArgumentException(\"Could not call Collectors.toList()\");\n }\n final Object /* Stream<String> */ resourcesStream = reflectionUtils\n .invokeMethod(/* throwException = */ true, moduleReader, \"list\");\n if (resourcesStream == null) {\n throw new IllegalArgumentException(\"Could not call moduleReader.list()\");\n }\n final Object resourcesList = reflectionUtils.invokeMethod(/* throwException = */ true, resourcesStream,\n \"collect\", collectorClass, collectorsToList);\n if (resourcesList == null) {\n throw new IllegalArgumentException(\"Could not call moduleReader.list().collect(Collectors.toList())\");\n }\n @SuppressWarnings(\"unchecked\")\n final List<String> resourcesListTyped = (List<String>) resourcesList;\n return resourcesListTyped;\n }",
"ObservableList<MenuItem> getFilteredMenuItemList();",
"public Builder moduleList(Set<String> moduleList) {\n this.moduleList = moduleList;\n return this;\n }",
"LazyStringList getUnmodifiableView();",
"@Override\n public Filter getFilter() {\n return main_list_filter;\n }",
"@Override\r\n\tpublic List<Modules> getModulesByName(String name) {\n\t\tString hql = \"from Modules m where m.name =?\";\r\n\t\treturn (List<Modules>) getHibernateTemplate().find(hql, name);\r\n\r\n\t}",
"List<String> getFilters();",
"public List getListOfModulesToReparse(String changedModule)\r\n {\r\n Vector dependantModules = (Vector) moduleStore.getKeys(changedModule);\r\n if (dependantModules == null)\r\n {\r\n dependantModules = new Vector();\r\n }\r\n return dependantModules;\r\n }",
"void updateFilteredListsToShowAll();",
"public List<ProcessModuleInfoInner> modules() {\n return this.modules;\n }",
"public List<T> getCopyOfUnfilteredItemList(){\n synchronized (listsLock){\n if (originalList != null){\n return new ArrayList<T>(originalList);\n } else {\n // if original list is null filtered list is unfiltered\n return new ArrayList<T>(filteredList);\n }\n }\n }",
"public interface SearchModulesViewInterface extends IsWidget, ProvidesValidate {\n\n ArrayList<FilterItem> getFilter();\n }",
"private static String getTestModulesListContents(ImmutableSet<String> modules) {\n StringBuilder contents = new StringBuilder(\"TEST_MODULES = [\\n\");\n for (String module : modules) {\n contents.append(String.format(\" \\\"%s\\\",\\n\", module));\n }\n contents.append(\"]\");\n return contents.toString();\n }",
"Module module() {\n return module;\n }",
"public Module module() {\n ////\n return module;\n }",
"public List<String> build()\n {\n return filters;\n }",
"public Enumeration<FlexoModule> loadedModules() {\n \t\treturn new Vector<FlexoModule>(_modules.values()).elements();\n \t}",
"UserModCollection getModificationsAsUserModCollection(SpectrumAnnotatorResult spectrumAnnotatorResult);",
"java.util.List<com.clarifai.grpc.api.InstalledModuleVersion> \n getInstalledModuleVersionsList();",
"public Collection<Module> getVertexModule(Vertex v) {\n\t\tArrayList<Module> array = new ArrayList<Module>();\n\t\t\n\t\tfor (Module m : this._modules.values()) {\n\t\t\tif (m.contains(v))\n\t\t\t\tarray.add(m);\n\t\t}\n//\t\tModule m = v.getModuleByClustering(this);\n//\t\tarray.add(m);\n\n\t\treturn array;\n\t}",
"ObservableList<Task> getUnfilteredTaskList();",
"public String[] getModuleNames() {\r\n String[] names = new String[modules.size()];\r\n Iterator it = modules.iterator();\r\n int i=0;\r\n while (it.hasNext()) {\r\n names[i++] = (String)it.next();\r\n }\r\n return names;\r\n }",
"@GetMapping\n\tpublic ResponseEntity<List<String>> registeredModules() {\n\t\tfinal List<String> modules = facade.registeredModules();\n\t\tlog.debug(\"Collected {} registered modules.\", modules.size());\n\t\treturn ResponseEntity.ok(modules);\n\t}",
"public List<RefineriesFilter> getRefineriesFilter();",
"ObservableList<Link> getUnfilteredLinkList();",
"@Override\n public Set<ModuleReference> findAll() {\n while (hasNextEntry()) {\n scanNextEntry();\n }\n return cachedModules.values().stream().collect(Collectors.toSet());\n }",
"ObservableList<Task> getFilteredTaskList();",
"private void getModules() throws BuildException {\n FilenameFilter fltr = new FilenameFilter() {\n @Override\n public boolean accept(final File dir, final String name) {\n return name.endsWith(\".war\");\n }\n };\n\n if (warDir == null) {\n throw new BuildException(\"No wardir supplied\");\n }\n\n String[] warnames = warDir.list(fltr);\n\n if (warnames == null) {\n throw new BuildException(\"No wars found at \" + warDir);\n }\n\n for (int wi = 0; wi < warnames.length; wi++) {\n wars.add(warnames[wi]);\n }\n\n for (FileSet fs: filesets) {\n DirectoryScanner ds = fs.getDirectoryScanner(getProject());\n\n String[] dsFiles = ds.getIncludedFiles();\n\n for (int dsi = 0; dsi < dsFiles.length; dsi++) {\n String fname = dsFiles[dsi];\n\n if (fname.endsWith(\".jar\")) {\n jars.add(fname);\n } else if (fname.endsWith(\".war\")) {\n wars.add(fname);\n }\n }\n }\n }",
"public List<Word> getCleanWordList(String moduleName) {\n return moduleList.stream()\n .skip(moduleList.size() - 1)\n .map(item -> new Word(item, moduleName))\n .collect(Collectors.toList());\n }",
"private List<RubyModule> gatherModules(RubyModule baseModule) {\n // build a list of all modules to consider for inclusion\n List<RubyModule> modulesToInclude = new ArrayList<RubyModule>();\n while (baseModule != null) {\n modulesToInclude.add(baseModule);\n baseModule = baseModule.getSuperClass();\n }\n \n return modulesToInclude;\n }",
"ObservableList<ReadOnlyEvent> getFilteredEventList();",
"Map<String, RemoteModule> allModulesByKey();",
"void updateFilteredListToShowAll();",
"void updateFilteredListToShowAll();",
"@Override\n\tpublic List<ModuleInfo> getAllModule(String sessionId) throws HFModuleException {\n\t\tLog.d(\"HFModuleManager\", \"getAllModule\");\n//\t\tif (!this.isCloudChannelLive()) {\n//\t\t\tthrow new HFModuleException(HFModuleException.ERR_COULD_NOT_ALIVE,\n//\t\t\t\t\t\"sid == null\");\n//\t\t}\n\t\t\n\t\tModuleGetAllRequest request = new ModuleGetAllRequest();\n\t\trequest.setSessionId(sessionId);\n\t\ttry {\n\t\t\tModuleGetAllResponse response = cloudModuleManager.getAllModule(request);\n\t\t\tList<ModuleInfo> modules = response.getPayload(); \n\t\t\tHFLocalSaveHelper.getInstence().getMainUserInfoHelper()\n\t\t\t.getServerModuleInfoHelper().putAll(modules);\n\t\t\treturn modules;\n\t\t} catch (CloudException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t\tthrow new HFModuleException(e1.getErrorCode(), e1.getMessage());\n\t\t}\n\t\t\n//\t\treturn Collections.<ModuleInfo>emptyList();\n//\t\t\n//\t\tString reqTemplate = \"{'CID':30051,'SID':'#SID#'}\";\n//\t\tString req = reqTemplate.replaceFirst(\"#SID#\", getsid());\n//\t\tString rsp = HttpProxy.reqByHttpPost(req);\n//\t\ttry {\n//\t\t\tJSONObject json = new JSONObject(rsp);\n//\t\t\tArrayList<ModuleInfo> result = new ArrayList<ModuleInfo>();\n//\t\t\tif (json.getInt(\"RC\") == 1) {\n//\t\t\t\tJSONArray ja = json.getJSONArray(\"PL\");\n//\t\t\t\tfor (int i = 0; i < ja.length(); i++) {\n//\t\t\t\t\tModuleInfo mi = new ModuleInfo();\n//\t\t\t\t\tmi.fromJson(ja.getJSONObject(i));\n//\t\t\t\t\tresult.add(mi);\n//\t\t\t\t}\n//\t\t\t\tHFLocalSaveHelper.getInstence().getMainUserInfoHelper()\n//\t\t\t\t\t\t.getServerModuleInfoHelper().putAll(result);\n//\t\t\t\treturn result;\n//\t\t\t} else {\n//\t\t\t\tthrow new HFModuleException(json.getInt(\"RC\"),\n//\t\t\t\t\t\tjson.getString(\"RN\"));\n//\t\t\t}\n//\t\t} catch (JSONException e) {\n//\t\t\t// TODO Auto-generated catch block\n//\t\t\te.printStackTrace();\n//\t\t}\n//\t\treturn null;\n\t}",
"com.clarifai.grpc.api.InstalledModuleVersion getInstalledModuleVersions(int index);",
"public List<SensorResponse> getFilteredList(){\n return filteredList;\n }",
"ObservableList<Link> getFilteredLinkList();",
"ObservableList<Expense> getFilteredExpenseList() throws NoUserSelectedException;",
"public List<AngularModuleBase> getAngularModules()\n {\n if (angularModules == null)\n {\n setAngularModules(new ArrayList<>());\n\n }\n return angularModules;\n }",
"@Override\n\tpublic List<ModuleClassCustom> queryList() throws Exception {\n\t\treturn null;\n\t}",
"private List<String> getSubModulesForEar(com.sun.enterprise.deployment.Application application) {\n List<String> moduleInfoList = new ArrayList<String>();\n for (ModuleDescriptor moduleDesc : application.getModules()) { \n String moduleInfo = moduleDesc.getArchiveUri() + \":\" + \n moduleDesc.getModuleType(); \n if (moduleDesc.getModuleType().equals(XModuleType.WAR)) {\n moduleInfo = moduleInfo + \":\" + moduleDesc.getContextRoot(); \n }\n moduleInfoList.add(moduleInfo);\n }\n return moduleInfoList;\n }",
"private Map<String, TestModuleHolder> getTestModules() {\n\t\treturn testModuleSupplier.get();\n\t}",
"public void filterList(ArrayList<GroupChannel> filteredList) {\n }",
"public Collection<AbstractFilterPlugin> getFilters();",
"private ArrayList<String> getCritterOptionsMenu() {\n\t\tArrayList<String> items = new ArrayList<String>();\n\t\tArrayList<Class<Critter>> critters = getCritterClasses(this.getClass().getPackage());\n\t\tfor (Class<Critter> c:critters){\n\t\t\titems.add(c.getSimpleName());\n\t\t}\n\t\treturn items;\n\t}",
"private Set<LECCModule> getDependeeModuleSet() {\r\n Set<LECCModule> dependeeModuleSet = new HashSet<LECCModule>();\r\n buildDependeeModuleSet(getModuleTypeInfo(), new HashSet<ModuleName>(), dependeeModuleSet);\r\n \r\n return dependeeModuleSet;\r\n }",
"public INodeFilter[] removeAllFilters ();",
"@Override\n\tpublic SortedSet<ProjectModule> getSelectedModules(Collection<String> templateNameList) throws UtilityException \n\t{\n\t\tSortedSet<ProjectModule> out = super.getSelectedModules(templateNameList);\n\t\tif (out.isEmpty())\n\t\t\tout = getSelectedModules(Arrays.asList(TEMPLATE_BASE));\n\t\treturn out;\n\t}",
"Set<Modification> filterModifications(ModificationHolder modificationHolder, Set<Modification> modifications);",
"public void addFilterToParentModule(ViewerFilter filter);",
"ObservableList<Person> getFilteredPersonList();",
"private List<String> getExcludedFields() {\n List<String> temp = new ArrayList<>();\n temp.add(\"_rallyAPIMajor\");\n temp.add(\"_rallyAPIMinor\");\n temp.add(\"_ref\");\n temp.add(\"_refObjectUUID\");\n temp.add(\"_objectVersion\");\n temp.add(\"_refObjectName\");\n temp.add(\"ObjectUUID\");\n temp.add(\"VersionId\");\n temp.add(\"_type\");\n return temp;\n }",
"private Map<String, TestModuleHolder> findTestModules() {\n\n\t\tMap<String, TestModuleHolder> testModules = new HashMap<>();\n\n\t\tClassPathScanningCandidateComponentProvider scanner = new ClassPathScanningCandidateComponentProvider(false);\n\t\tscanner.addIncludeFilter(new AnnotationTypeFilter(PublishTestModule.class));\n\t\tfor (BeanDefinition bd : scanner.findCandidateComponents(\"io.fintechlabs\")) {\n\t\t\ttry {\n\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\tClass<? extends TestModule> c = (Class<? extends TestModule>) Class.forName(bd.getBeanClassName());\n\t\t\t\tPublishTestModule a = c.getDeclaredAnnotation(PublishTestModule.class);\n\n\t\t\t\ttestModules.put(a.testName(), new TestModuleHolder(c, a));\n\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\tlogger.error(\"Couldn't load test module definition: \" + bd.getBeanClassName());\n\t\t\t}\n\t\t}\n\n\t\treturn testModules;\n\t}",
"void printFilteredItems();",
"List<ExamPackage> getListPresent();",
"public Collection<Miniserver> getFilteredMiniservers(){\n return this.filteredMiniservers;\n }",
"List<TModuleLo> selectSkillToLo();",
"@Override\n public Filter getFilter() {\n return scenarioListFilter;\n }",
"public List<Product> getFilteredRecommendedProductsList() {\n return filteredRecommendedProductsList;\n }",
"public static List<UpdateModuleType> listAll() {\n return new ArrayList<UpdateModuleType>(Arrays.asList(values()));\n }",
"public Map getWebServiceModules() {\n Map map = new HashMap();\n\n // admin config context\n ConfigContext configCtx = AdminService.getAdminService().\n getAdminContext().getAdminConfigContext();\n\n CacheMgr mgr = CacheMgr.getInstance();\n\n // j2ee application\n Map apps = mgr.getJ2eeApplications();\n Collection aValues = apps.values();\n for (Iterator iter=aValues.iterator(); iter.hasNext();) {\n J2eeApplication app = (J2eeApplication) iter.next();\n\n // ejb bundles\n List ejbBundles = app.getEjbBundles();\n if (ejbBundles != null) {\n for (Iterator itr=ejbBundles.iterator(); itr.hasNext();) {\n String ejb = (String) itr.next();\n try {\n Map m = getEjbBundleInfo(configCtx, app.getName(), ejb);\n map.put(m.get(WebServiceInfoProvider.\n SUN_EJB_JAR_XML_LOCATION_PROP_NAME), m);\n } catch (RepositoryException re) { }\n }\n }\n\n // web bundles \n List webBundles = app.getWebBundles();\n if (webBundles != null) {\n for (Iterator itr=webBundles.iterator(); itr.hasNext();) {\n String web = (String) itr.next();\n try {\n Map m = getWebBundleInfo(configCtx, app.getName(), web);\n map.put(m.get(WebServiceInfoProvider.\n SUN_WEB_XML_LOCATION_PROP_NAME), m);\n } catch (RepositoryException re) { }\n }\n }\n }\n\n // stand alone ejb module\n Map ejbs = mgr.getEjbModules();\n Collection eValues = ejbs.values();\n for (Iterator iter=eValues.iterator(); iter.hasNext();) {\n String ejbMod = (String) iter.next();\n try {\n Map m = getEjbModuleInfo(configCtx, ejbMod);\n map.put(m.get(WebServiceInfoProvider.\n SUN_EJB_JAR_XML_LOCATION_PROP_NAME), m);\n } catch (RepositoryException re) { }\n }\n\n // stand alone web module\n Map webs = mgr.getWebModules();\n Collection wValues = webs.values();\n for (Iterator iter=wValues.iterator(); iter.hasNext();) {\n String webMod = (String) iter.next();\n\n try {\n Map m = getWebModuleInfo(configCtx, webMod);\n map.put(m.get(WebServiceInfoProvider.\n SUN_WEB_XML_LOCATION_PROP_NAME), m);\n } catch (RepositoryException re) { }\n }\n\n return map;\n }",
"@VTID(20)\n @ReturnValue(type=NativeType.VARIANT)\n java.lang.Object getVisibleSlicerItemsList();",
"public List<View> getViews() {\n if (!isLoaded()) {\n throw new IllegalStateException(\"Error: The module is not loaded\");\n }\n\n return new ArrayList<View>(m_views);\n }",
"public Object clone() {\n return new ModuleParams(this);\n }",
"ObservableList<Deliverable> getFilteredDeliverableList();",
"List<Moderator> getAvailableModerators(int digestNum);",
"protected TargetModuleID[] filterTargetModuleIDsByModule(TargetModuleID [] tmids, String moduleID) {\n List tmidsToUse = new ArrayList();\n /*\n *Add to the vector of TMIDs each TMID from getApplications that also matches the\n *module ID.\n */\n for (int i = 0; i < tmids.length; i++) {\n if (moduleID.equals(tmids[i].getModuleID())) {\n tmidsToUse.add(tmids[i]);\n }\n }\n return (TargetModuleID [])(tmidsToUse.toArray(new TargetModuleID[tmidsToUse.size()]));\n }",
"public List<User> getDisabledUsers();",
"Map<String, String> getFilters();"
]
| [
"0.6462423",
"0.6316132",
"0.61775136",
"0.6104569",
"0.60309815",
"0.5951299",
"0.59248793",
"0.59146774",
"0.5906084",
"0.59026015",
"0.58433366",
"0.58312905",
"0.5824867",
"0.57743007",
"0.5736625",
"0.57030296",
"0.56027955",
"0.55839336",
"0.5567091",
"0.5544899",
"0.5528201",
"0.5511324",
"0.5496635",
"0.54880273",
"0.54668087",
"0.54324096",
"0.5419509",
"0.53830636",
"0.53771913",
"0.5348023",
"0.53450227",
"0.5285037",
"0.52641267",
"0.52505785",
"0.52365947",
"0.52225226",
"0.5201154",
"0.5199181",
"0.5191462",
"0.51905274",
"0.5183126",
"0.51695865",
"0.51664156",
"0.5157842",
"0.5132977",
"0.5121504",
"0.5116813",
"0.51155144",
"0.5108608",
"0.51012444",
"0.5086651",
"0.50860274",
"0.5072686",
"0.5064385",
"0.5061963",
"0.5028192",
"0.50196064",
"0.49969795",
"0.49935073",
"0.49833393",
"0.49659044",
"0.49572733",
"0.49572733",
"0.49531206",
"0.49521363",
"0.49490198",
"0.49448693",
"0.49273783",
"0.49042237",
"0.4894159",
"0.4886507",
"0.48862544",
"0.48821145",
"0.4872931",
"0.48684776",
"0.48674053",
"0.48629093",
"0.4861326",
"0.48593235",
"0.48565835",
"0.4840496",
"0.48354858",
"0.4828214",
"0.48238942",
"0.4818935",
"0.48003322",
"0.4797304",
"0.4796432",
"0.47906935",
"0.47858754",
"0.47814682",
"0.47764087",
"0.47693503",
"0.47415",
"0.47337788",
"0.47304836",
"0.47263023",
"0.47239405",
"0.47198564"
]
| 0.79727924 | 1 |
Initializes a new instance of the Submarine ship with length = 1 | public Submarine() {
length = 1;
hit = new boolean[1];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Submarine() {\n\t\tsuper(size);\n\t}",
"protected Ship(int length) {\n this.length = length;\n size = 0;\n cells = new Cell[length];\n }",
"public RegularUnit(Location location, int length, int width, int height){\n // initialise instance variables\n super(location, length, width, height, TYPE);\n }",
"public Parts (double x, double y, double length)\n {\n Path2D.Double line = new Path2D.Double();\n line.moveTo(0.0, length / 2);\n line.lineTo(0.0, -length / 2);\n\n // Making the rotation random, since everything else is random\n setRotation(RANDOM.nextDouble() * 4.5);\n\n // Velocity is also random for a more real life effect\n setVelocity(RANDOM.nextDouble(), RANDOM.nextDouble() * 4.5);\n\n // Sets the \"explosion\" where the ship was destroyed\n setPosition(x, y);\n\n shape = line;\n\n new ParticipantCountdownTimer(this, 2500);\n }",
"public Slip(int aNo, int aWidth, double aSlipLength) \r\n \t{\r\n\t\t// invoke accessors to populate attributes\r\n\t\tsetNo(aNo);\t\r\n\t\tsetWidth(aWidth);\r\n\t\tsetSlipLength(aSlipLength);\r\n\t\tsetBoat(null);\t// initially no boat is assigned to this slip\r\n\t\tsetLease(null);// initially no lease for this slip\r\n \t}",
"public SnakesAndLadders()\n {\n this(2);\n }",
"public EmptySea() {\r\n\t\tsuper(EmptySea.length);\r\n\t\t\r\n\t}",
"public salida()\r\n { \r\n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\r\n super(600, 400, 1); \r\n }",
"public Ship() {\n rotation = Rotation.VERTICAL;\n }",
"public Square(Point center, double sideLength) {\n super(center, sideLength);\n }",
"public Ship(int l){\n this.lifePoints=l;\n }",
"public Rectangle()\n {\n length = 1;\n width = 1;\n count++;\n }",
"public Ship(){\n\t}",
"public Sierpinski() {\n super(\"Sierpinski gasket\");\n \n this.resize(area_size, area_size);\n }",
"Length initLength(Length iLength)\n {\n iLength.updateElementValue(\"Length\");\n return iLength;\n }",
"Rectangle() {\r\n\t\tlength = 1.0;\r\n\t\twidth = 1.0;\r\n\t}",
"public ShearY() {\n this(0);\n }",
"public Ship(String name, int size) {\r\n this.name = name;\r\n this.size = size;\r\n this.livesLeft = size;\r\n this.isSunk = false;\r\n }",
"public LinesDimension1() {\n \n }",
"public Salle() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}",
"public Strand(Type stype, int length)\n {\n type = stype;\n //TODO: initialize seq with a new array of Base values of the correct length\n //Replace the next line -- it is for default compilation purposes\n seq = new Base[]{};\n }",
"public SuperS()\r\n {\r\n setStep(0,0,0,0,0);\r\n }",
"public Line()\n\t{\n\t\tthis(1.0f, 1.0f, 0.0f);\n\t}",
"public Cube(String shapeName, double sideLength){\n super(shapeName, sideLength, sideLength, sideLength);\n }",
"public BarSeat(){\n\t\tsuper(1);\n\t}",
"public Cenario1()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(900, 600, 1);\n adicionar();\n \n }",
"public levelTwo()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1); \n prepare();\n }",
"public Station(){\n\t\tthis.Name = \"\";\n\t\tthis.x_location = 0;\n\t\tthis.y_location = 0;\n\t\tthis.capacity = 0;\n\t\tthis.ambulances = null;\n\t\tthis.location = (\"(\" + x_location + \", \" + y_location + \")\");\n\n\t}",
"public Snake(){ super(); }",
"public Bathroom(int size) {\n this.size = size;\n myBathtub = new Bathtub(100); //instantiate bathtub object during Bathroom object creation\n }",
"public Ship(int shipLength, Point lowerLeft, boolean horiz, String name) {\r\n this.shipLength = shipLength;\r\n this.lowerLeft = lowerLeft;\r\n this.name = name;\r\n this.horiz = horiz;\r\n hit = new boolean[shipLength]; // initializes to all false\r\n }",
"public Square(float fsidelength) {\n setSide(fsidelength);\n }",
"public Spaceship(int x, int y)\r\n\t{\r\n\t\tsuper(x, y);\r\n\t}",
"public Rectangle(int length, int width) {\n }",
"public Mountain(int l, int w, int m)\n {\n super(l, w);\n // initialise instance variables\n numMountains = m;\n }",
"public Shelf() {\r\n\t\tsuper();\r\n\t}",
"private UniqueChromosomeReconstructor() { }",
"public BSPLine() {\n super();\n }",
"public Triangle(double length) {\n super(length); //Creates the square\n super.calculateArea(); //Calculates the area of the whole square\n calculateArea(); //Right Triangle 1/2 area\n }",
"public SmallFishData() {\n cPosition = generatePosition();\n cDestination = generatePosition();\n }",
"public Sobre() {\n\t\tsuper();\n\t\tinitialize();\n\t}",
"public Line(){\n\t\t\n\t}",
"public void creationSable(){\n\t\tfor(int x=2;x<=this.taille-3;x++) {\n\t\tfor(int y=2;y<=this.taille-3;y++) {\n\t\tif( grille.get(x).get(y).getTypeOccupation()==0 &&\n\t\t\t\tgrille.get(x+2).get(y).getTypeOccupation()!=3 &&\n\t\t\t\tgrille.get(x+2).get(y+2).getTypeOccupation()!=3 &&\n\t\t\t\tgrille.get(x).get(y+2).getTypeOccupation()!=3 &&\n\t\t\t\tgrille.get(x-2).get(y+2).getTypeOccupation()!=3 &&\n\t\t\t\tgrille.get(x-2).get(y).getTypeOccupation()!=3 &&\n\t\t\t\tgrille.get(x-2).get(y-2).getTypeOccupation()!=3 &&\n\t\t\t\tgrille.get(x).get(y-2).getTypeOccupation()!=3 &&\n\t\t\t\tgrille.get(x+2).get(y-2).getTypeOccupation()!=3 ) {\n\t\t\t\n\t\t\tint[] coord = new int[2];\n\t\t\tcoord[0]=x;\n\t\t\tcoord[1]=y;\n\t\t\tSable sable = new Sable(coord);\n\t\t\tgrille.get(x).set(y, sable);\n\t\t}\n\t\t}\n\t\t}\n\t}",
"public ZPathLayoutManager() {\n\tthis(new Line2D.Double(0.0,0.0,1.0,1.0));\n }",
"public Card() { this(12, 3); }",
"public Asteroid()\r\n\t{\r\n\t\tsuper.setDirection(rn.nextInt(360));\r\n\t\tsuper.setSpeed(rn.nextInt(100));\r\n\t\tsuper.setLocalX(rn.nextFloat() * 1024);\r\n\t\tsuper.setLocalY(rn.nextFloat() * 786);\r\n\t\tsuper.setColor(250);\r\n\t\tsize = rn.nextInt(10);\r\n\t\t\r\n\t}",
"public pr3s1()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1280, 720, 1); \n prepare();\n }",
"public Ship(float x, float y) {\r\n\t\tthis.bounds = new Rectangle(x, y, width, height);\r\n\t}",
"public Cannon(Space s) {\r\n\t\tthis(0,s);\r\n\t}",
"public F2_Ship4() {\n\n setH(100);\n setW(50); //Set the size of the ship\n\n setArt(\"Art/SpaceShips/Faction2/Ship4.png\"); //Set the artwork of the ship\n }",
"public Square(int w)\n {\n width = w;\n }",
"public FoodStation(float x, float y, GameWorld gw) {\n\t\tsuper(x, y);\n\t\trand = new Random();\n\t\tcapacity = rand.nextInt(400) + 400; \n\t\tcolor = ColorUtil.GREEN;\n\t\tsize = capacity / 20;\n\t\tselected = false;\n\t\twidth = 2 * size;\n\t\theight = 2 * size;\n\t}",
"public Rectangle() {\n this.length = 0;\n this.width = 0;\n\n }",
"private void setSnake() {\r\n length = 1;\r\n snake = new Location[maxRows*maxColumns];\r\n for (int i = 0; i < snake.length; i++) {\r\n snake[i] = new Location(BLANK,BLANK,STOP);\r\n }\r\n int startRow = maxRows / 2;\r\n int startColumn = maxColumns / 2;\r\n snake[HEAD] = new Location(startRow,startColumn,STOP);\r\n }",
"public Building(String[] line){\n setId(Integer.parseInt(line[0]));\n setRank(Integer.parseInt(line[1]));\n setName(line[2]);\n setCity(line[3]);\n setCountry(line[4]);\n setHeight_m(Double.parseDouble(line[5]));\n setHeight_ft(Double.parseDouble(line[6]));\n setFloors(line[7]);\n setBuild(line[8]);\n setArchitect(line[9]);\n setArchitectual_style(line[10]);\n setCost(line[11]);\n setMaterial(line[12]);\n setLongitude(line[13]);\n setLatitude(line[14]);\n // setImage(line[15]);\n\n }",
"public House(int length, int width, int lotLength, int lotWidth) {\r\n super(length, width, lotLength, lotWidth);\r\n }",
"public SpaceShip() {\r\n\t\tsuper();\r\n\t\tthis.radius = 15;\r\n\t\tgameController.setSpaceShip(this);\r\n\t\tArrayList<Point> shipList = new ArrayList<Point>();\r\n\t\tshipList.add(new Point(-10, -10));\r\n\t\tshipList.add(new Point(-10, 10));\r\n\t\tshipList.add(new Point(15, 0));\r\n\t\tthis.addShape(new Polygon(shipList, Color.WHITE, false));\r\n\t\t// this.addShape(new Circle(radius, this.getCenterPoint().copy(),\r\n\t\t// Color.RED, false));\r\n\t}",
"public void setSquareSide (int newLength){\r\n model.setSideLength(newLength);\r\n view.resetView(model);\r\n }",
"public Snake(Location snakeHead, int initialLength) {\n int posX = snakeHead.locX;\n int posY = snakeHead.locY;\n for (int i = 0; i < initialLength; i++) {\n body.add(new Location(posX, posY, Direction.RIGHT));\n\n posX -= segmentOffset;\n\n }\n snakeTail = body.getLast();\n }",
"public Skull() {\n\t\tsuper();\n\t\tsuper.setWidth(width);\n\t\tsuper.setheight(height);\n\t\tloadPattern();\n\t\tcurrentPattern = walkPattern;\n\t}",
"public AgileSet() {\n currentSize = 0.0;\n }",
"public Awale(short size) {\r\n\tthis.listeners = new ArrayList<AwaleListener>();\r\n\tthis.currentSide = 0;\r\n\tthis.size = size;\r\n\tthis.territory = new short[2][size];\r\n\tthis.simulateTerritory = new short[2][size];\r\n\tArrays.fill(this.territory[0], INITIAL_SEEDS);\r\n\tArrays.fill(this.territory[1], INITIAL_SEEDS);\r\n\tthis.points = new short[2];\r\n }",
"Length createLength();",
"public CampLease( ) {}",
"public Memoria() {\n for (int i=0; i<320; i++)\n slots[i]=\"\";\n }",
"LengthSmaller createLengthSmaller();",
"@Model\r\n\tpublic Vector() {\r\n\t\tthis(50,50);\r\n\t}",
"public CrnLineContainer() {\n }",
"public SLL()\r\n\t{\r\n\t\tstart = null;\r\n\t\tend = null;\r\n\t\tsize = 0;\r\n\t}",
"PlayerShip(int screenLength, int newY, int size, int newSpeed) {\n \tsuper(screenLength/2, newY, size, size);\n setHSpeed(newSpeed);\n }",
"public ArbolSplay() {\n super();\n }",
"public royalBlueSchool(int sizeE,int sizeF){}",
"public RatPolyStack() {\n size = 0;\n polys = null;\n }",
"public RailRoad() {}",
"public Square(int side) {\n super(side, side);\n }",
"public Classroom()\n { \n // Create a new world with 10x6 cells with a cell size of 130x130 pixels.\n super(10, 6, 130); \n prepare();\n }",
"public ShoeInventory(int size)\r\n\t{\r\n\t\tif(size == 0)\r\n\t\t\tSystem.out.println(\"Cannot set array to size 0.\"); \r\n\t\telse\r\n\t\t{\r\n\t\t\tcounter = 0;\r\n\t\t\tarraySize = size;\r\n\t\t\ttypeArray = new ShoeType[arraySize];\r\n\t\t}\r\n\t}",
"public Spielfeld() {\n\t\tmulden = new int[14];\n\t\tsetSteine();\n\t}",
"public Square () {\r\n super();\r\n \r\n }",
"public PlantingHarvester(int x, int y)\n {\n super(x, y);\n }",
"public Main()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 600, 1); \n\n prepare();\n }",
"public Rectangle(int length, int width)\n {\n this.length = length;\n this.width = width;\n\n }",
"Cube()\r\n\t{\r\n\t\t//System.out.println(\"We are in constructor\");\r\n\t\tlength=10;\r\n\t\tbredth=20;\r\n\t\theight=30;\r\n\t}",
"public Level1()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(560, 560, 1); \n prepare();\n gfs_level1 = new GreenfootSound(\"main.wav\");\n\n }",
"public SpecimenArray()\r\n\t{\r\n\t\tsuper();\r\n\t}",
"public Ninja(int x, int y)\r\n {\r\n super(x, y, 5);\r\n }",
"public Human(int theShipType){\n super(theShipType);\n }",
"Rectangle()\n {\n this(1.0,1.0);\n }",
"public Rectangle() {\n\t\twidth = 1;\n\t\theight = 1;\n\t}",
"public Square() {\n this(\"x\", false, false);\n }",
"public void setLength(double length){this.length=length;}",
"public PantallaVictoria()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(400, 600, 1); \n prepare();\n }",
"public Lane() {\n\t}",
"public SpaceStub(int size) {\n super(size);\n this.size = size;\n }",
"public SaboWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1);\n addObject(counter, 100, 380); //Add the scoreboard\n addObject(healthBar, 300, 370); //Add the health bar\n addObject(turret, getWidth()/2-5, getHeight()-turret.getImage().getWidth()); \n }",
"LengthAdd createLengthAdd();",
"Rectangle(){\n height = 1;\n width = 1;\n }",
"public Sijainti() {\n this.x = 0;\n this.y = 0;\n }",
"protected Word(int length) {\n\t\t// check if the length of is reasonable\n\t\tif(length > 0) {\n\t\t\t// initial the instance variables\n\t\t\tthis.length = length;\n\t\t\tthis.unrevealedSlots = this.length;\n\t\t\tthis.mask = new boolean[this.length];\n\t\t\t//each slots in the mask should be true (masked) by default\n\t\t\tfor (int i = 0; i < this.length; i++) {\n\t\t\t\tthis.mask[i] = true;\n\t\t\t}\n\t\t}else {\n\t\t\t// throw a exception if the length is not allowed\n\t\t\tthrow new RuntimeException(\"Non-positive value is unacceptable.\");\n\t\t}\n\t}",
"public Square(String name) {\r\n this(name.charAt(0), name.charAt(1));\r\n }"
]
| [
"0.75123566",
"0.6689562",
"0.59113085",
"0.57845944",
"0.57354486",
"0.5648449",
"0.56228024",
"0.559855",
"0.55952823",
"0.5587863",
"0.5585737",
"0.55712134",
"0.5537553",
"0.55085164",
"0.5508069",
"0.5499166",
"0.5495031",
"0.54556507",
"0.54538584",
"0.54536945",
"0.5452966",
"0.5440746",
"0.5430454",
"0.5421585",
"0.54179484",
"0.5414434",
"0.54132205",
"0.53988695",
"0.5383238",
"0.5377575",
"0.5351685",
"0.53475386",
"0.5346706",
"0.5330225",
"0.53053844",
"0.52958226",
"0.52755874",
"0.52524215",
"0.52496475",
"0.5239414",
"0.52313715",
"0.5214791",
"0.520883",
"0.5206613",
"0.5204602",
"0.52035856",
"0.52005893",
"0.5193609",
"0.518951",
"0.51791584",
"0.51772034",
"0.51758194",
"0.51733845",
"0.5164781",
"0.5163138",
"0.51595724",
"0.51586205",
"0.5156691",
"0.5136056",
"0.51338935",
"0.5131764",
"0.5130659",
"0.5125931",
"0.5120969",
"0.5120168",
"0.5114654",
"0.5109877",
"0.51095676",
"0.51063985",
"0.5105342",
"0.5101325",
"0.5097873",
"0.50873363",
"0.50863314",
"0.5085806",
"0.508458",
"0.50820255",
"0.50805336",
"0.5080208",
"0.5079476",
"0.5076776",
"0.5074708",
"0.5073405",
"0.50723773",
"0.5069407",
"0.5064409",
"0.5062571",
"0.5062124",
"0.50601614",
"0.5058523",
"0.5055134",
"0.50544614",
"0.504779",
"0.5040248",
"0.50373936",
"0.50368875",
"0.50362533",
"0.5034471",
"0.50286984",
"0.50280833"
]
| 0.76787794 | 0 |
Add header to accept gzip content | public void process(HttpRequest request, HttpContext context) {
if (!request.containsHeader(HEADER_ACCEPT_ENCODING)) {
request.addHeader(HEADER_ACCEPT_ENCODING, ENCODING_GZIP);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void addGzipHeader(Request request, Response response) {\n response.header(\"Content-Encoding\", \"gzip\");\n }",
"private void serviceGZipCompressed(Connection conn) \n throws IOException {\n conn.getResponse().setContentType(getContnentType().getMimeType());\n conn.getResponse().setHeader(\"Content-Encoding\", \"gzip\");\n conn.getOutputStream().write(gzipContent);\n }",
"@Override\n public boolean startContent(int statusCode, Compression compression) {\n return true;\n }",
"public GZIPOutputStream addGzipStream(String id) throws IOException {\n\t\tGZIPOutputStream gzos = new GZIPOutputStream(outputStream);\n\t\trks.add(id);\n\t\trvs.add(gzos);\n\t\treturn gzos;\n\t}",
"public static String getCompression(HttpServletRequest req) {\n String encoding = req.getHeader(HttpHeaders.ACCEPT_ENCODING);\n if (null != encoding) {\n if (BaseFileServlet.GZIP_PATTERN.matcher(encoding).find()) {\n return \"gzip\";\n //} else if (BR_PATTERN.matcher(encoding).find()) {\n // return \"br\";\n }\n }\n return \"none\";\n }",
"public void process(HttpResponse response, HttpContext context) {\n\t\t\t\tfinal HttpEntity entity = response.getEntity();\r\n\t\t\t\tif (entity != null) {\r\n\t\t\t\t\tfinal Header encoding = entity.getContentEncoding();\r\n\t\t\t\t\tif (encoding != null) {\r\n\t\t\t\t\t\tfor (HeaderElement element : encoding.getElements()) {\r\n\t\t\t\t\t\t\tif (element.getName().equalsIgnoreCase(\r\n\t\t\t\t\t\t\t\t\tENCODING_GZIP)) {\r\n\t\t\t\t\t\t\t\tresponse.setEntity(new InflatingEntity(response\r\n\t\t\t\t\t\t\t\t\t\t.getEntity()));\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}",
"public DsSipAcceptEncodingHeader(DsByteString value)\n throws DsSipParserException, DsSipParserListenerException {\n this(value.data(), value.offset(), value.length());\n }",
"public void setContentCompression(String method) {\n this.contentCompression = method;\n }",
"public void setContentEncoding(Header contentEncoding) {\n/* 143 */ this.contentEncoding = contentEncoding;\n/* */ }",
"public void setAcceptHeader(AcceptHeader header)\n\t{\n\t\tif (header == null)\n\t\t\treturn;\n\t\t\n\t\tString headerName = header.getName();\n\t\tString lowerName = headerName.toLowerCase();\n\t\t\n\t\tthis.acceptHeaders.put(lowerName, header);\n\t\tsetHeader(headerName, header.parseHeaderValue());\n\t}",
"@Deprecated\n/* */ public void addCompression() {\n/* 162 */ List<COSName> filters = getFilters();\n/* 163 */ if (filters == null)\n/* */ {\n/* 165 */ if (this.stream.getLength() > 0L) {\n/* */ \n/* 167 */ OutputStream out = null;\n/* */ \n/* */ try {\n/* 170 */ byte[] bytes = IOUtils.toByteArray((InputStream)this.stream.createInputStream());\n/* 171 */ out = this.stream.createOutputStream((COSBase)COSName.FLATE_DECODE);\n/* 172 */ out.write(bytes);\n/* */ }\n/* 174 */ catch (IOException e) {\n/* */ \n/* */ \n/* 177 */ throw new RuntimeException(e);\n/* */ }\n/* */ finally {\n/* */ \n/* 181 */ IOUtils.closeQuietly(out);\n/* */ }\n/* */ \n/* */ } else {\n/* */ \n/* 186 */ filters = new ArrayList<COSName>();\n/* 187 */ filters.add(COSName.FLATE_DECODE);\n/* 188 */ setFilters(filters);\n/* */ } \n/* */ }\n/* */ }",
"public Writer addGzipWriter(String id) throws IOException {\n\t\tGZIPOutputStream gzos = new GZIPOutputStream(outputStream);\n\t\trks.add(id + \"Stream\");\n\t\trvs.add(gzos);\n\t\tWriter w = new OutputStreamWriter(gzos, \"UTF-8\");\n\t\trks.add(id + \"Writer\");\n\t\trvs.add(w);\n\t\treturn w;\n\t}",
"public String getAcceptEncodingHeaderValue() {\n return acceptEncodingHeaderValue;\n }",
"@Override\r\n\tpublic void filter(ContainerRequestContext arg0, ContainerResponseContext responseContexet) throws IOException {\n\t\tresponseContexet.getHeaders().add(\"X-Powered-by\", \"Nikhil Joy\");\r\n\t\t\r\n\t}",
"@Override\n public void intercept(RequestInterceptor.RequestFacade request) {\n request.addHeader(\"Accept\", \"application/json\");\n }",
"@Override\n public void addHeader(String arg0, String arg1) {\n\n }",
"public static PageCompression detectCompressionMethod( HttpResponse response ) {\n\t\tif ( response != null && response.containsHeader( \"Content-Encoding\" ) ) {\n\t\t\tHeader[] headers = response.getHeaders( \"Content-Encoding\" );\n\t\t\tfor ( int i = 0 ; i < headers.length ; i++ ) {\n\t\t\t\tString val = headers[i].getValue().trim();\n\t\t\t\tSystem.out.println( val );\n\t\t\t\tif ( val.equalsIgnoreCase( \"gzip\" ) ) {\n\t\t\t\t\treturn PageCompression.GZIP;\n\t\t\t\t} else if ( val.equalsIgnoreCase( \"deflate\" ) ) {\n\t\t\t\t\treturn PageCompression.DEFLATE;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn PageCompression.NOT_COMPRESSED;\n\t}",
"public GZIPResponseWrapper(HttpServletResponse response, String contentType) {\n super(response);\n this.contentType = contentType;\n }",
"default boolean visitHeader() {\n\t\treturn true;\n\t}",
"private static void setContentTypeHeader(HttpResponse response, File file) {\n\t\tresponse.headers().set(HttpHeaderNames.CONTENT_TYPE, HttpHeaderValues.APPLICATION_OCTET_STREAM);\r\n\t}",
"private void mimicSunRequestHeaders() {\n if (!isHeaderSet(method.getRequestHeader(\"Accept\"))) {\n setRequestProperty(\"Accept\", acceptHeader);\n }\n if (!isHeaderSet(method.getRequestHeader(\"Connection\"))) {\n setRequestProperty(\"Connection\", \"keep-alive\");\n }\n }",
"protected void addDynamicHeaders() {\n }",
"public void setCompression( boolean compress ) {\n this .compression = compress;\n }",
"public boolean isCompressed() {\n byte[] data = packet.getData();\n int magic = ((int)(data[1] & 0xff) << 8) | (int)(data[0] & 0xff);\n return magic == GZIPInputStream.GZIP_MAGIC;\n }",
"public DsSipAcceptEncodingHeader(byte[] value)\n throws DsSipParserException, DsSipParserListenerException {\n this(value, 0, value.length);\n }",
"public void setMinExpiresHeader(MinExpiresHeader minExpires) {\n this.setHeader(minExpires);\n }",
"RequestHeaders headers();",
"@Override\n\tpublic void Compress() {\n\t\t\n\t}",
"public static BufferedWriter newGzipBufferedWriter(Path path) throws IOException {\n return new BufferedWriter(new OutputStreamWriter(new GZIPOutputStream(new FileOutputStream(path.toFile()))));\n }",
"public boolean isCompressed() {\r\n return gzipOp != null;\r\n }",
"private Map<String, String> getDefaultAdditionalHeader() {\n Map<String, String> additionalHeader = new HashMap<>();\n additionalHeader.put(\"accept-encoding \", \"gzip, deflate, sdch\");\n additionalHeader.put(\"Referer\", referer);\n additionalHeader.put(\"Upgrade-Insecure-Requests\", \"1\");\n return additionalHeader;\n }",
"public abstract void addMimeHeader(String name, String value);",
"@Override\n\tprotected void doOptions(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doOptions(req, resp);\n\t\tH5Utils.setHeaders(resp);\n\t}",
"@Override\n\tprotected void doOptions(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doOptions(req, resp);\n\t\tH5Utils.setHeaders(resp);\n\t}",
"@Override\n\tpublic void addHeader(String name, String value) {\n\t}",
"public void setHeaderFlag(boolean flag) {\n configuration.put(ConfigTag.HEADER, flag);\n }",
"HttpClientRequest addHeader(CharSequence name, CharSequence value);",
"void addHeader(HttpServletResponse response, String name, String value);",
"@Override\n protected com.squareup.okhttp.Request.Builder universal_header(com.squareup.okhttp.Request.Builder chain) {\n chain.addHeader(\"Accept\", \"*/*\");\n chain.addHeader(\"Accept-Language\", \"zh-TW,zh;q=0.8,en-US;q=0.6,en;q=0.4,zh-CN;q=0.2\");\n chain.addHeader(\"Content-Type\", \"text/html; charset=utf-8\");\n chain.addHeader(\"User-Agent\", \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36\");\n return super.universal_header(chain);\n }",
"public void setContentEncoding(String ceString) {\n/* */ BasicHeader basicHeader;\n/* 155 */ Header h = null;\n/* 156 */ if (ceString != null) {\n/* 157 */ basicHeader = new BasicHeader(\"Content-Encoding\", ceString);\n/* */ }\n/* 159 */ setContentEncoding((Header)basicHeader);\n/* */ }",
"default boolean hasHeader() {\n return true;\n }",
"public boolean modifyHeaderContent(Header header);",
"public boolean isCompressionEnabled() {\r\n return compressionEnabled;\r\n }",
"@Override\n protected void writeStreamHeader() throws IOException {\n // metodo honek ez du ezer egiten\n }",
"@Override\n public boolean containsHeader(String arg0) {\n return false;\n }",
"@Override\n public void filter(final ClientRequestContext requestContext) throws IOException {\n final String userAgent = VersionInfo.getUserAgent(\"Apache-HttpClient\", \"org.apache.http.client\", HttpClientBuilder.class);\n // Finally, we can add the header\n requestContext.getHeaders().add(HttpHeaders.USER_AGENT, userAgent);\n }",
"public Header getContentEncoding() {\n/* 89 */ return this.contentEncoding;\n/* */ }",
"public final int getHeaderID() {\n return ACCEPT_ENCODING;\n }",
"protected void copy(DsSipHeader header) {\n super.copy(header);\n DsSipAcceptEncodingHeader source = (DsSipAcceptEncodingHeader) header;\n\n m_bWildCard = source.m_bWildCard;\n m_strCoding = source.m_strCoding;\n qvalue = source.qvalue;\n }",
"private void compressArchive() throws Exception {\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"Compressing archive: \" + path);\n\t\t}\n\n\t\tFileOutputStream fout = new FileOutputStream(path + \".gz\");\n\t\tGZIPOutputStream gout = new GZIPOutputStream(fout);\n\t\tFileInputStream fin = new FileInputStream(path);\n\t\tbyte[] buf = new byte[blockSize];\n\t\tint len;\n\t\twhile ((len = fin.read(buf)) > 0) {\n\t\t\tgout.write(buf, 0, len);\n\t\t}\n\t\tfin.close();\n\n\t\t// flush and close gzip file\n\t\tgout.finish();\n\t\tgout.close();\n\n\t\t// unlink original archive\n\t\tFile file = new File(path);\n\t\tfile.delete();\n\t}",
"@Test(priority=5)\r\n\tpublic void validateHeader()\r\n\t{\r\n\t\tgiven()\r\n\t\t.get(\"https://reqres.in/api/users/2\")\r\n\t\t.then() \r\n\t \t.header(\"Content-Type\", containsString(\"application/json\")); \r\n\t\t//application/json; charset=utf-8 \r\n\t}",
"protected void writeHeader() throws IOException {\n _baos = new ByteArrayOutputStream();\n _dos = new DataOutputStream(_baos);\n _dos.write(PushCacheProtocol.instance().header(), 0, PushCacheProtocol.instance().header().length);\n }",
"public interface CompressedResource {\r\n\t\r\n\t/**\r\n\t * Return the supported encoding from the list of allowable encodings from the user agent\r\n\t * \r\n\t * If none are supported return null.\r\n\t * \r\n\t * @param acceptableEncodings\r\n\t * @return - null if none of the given encodings are supported, otherwise the content encoding header value to be used\r\n\t */\r\n\tString getSupportedEncoding(String acceptableEncodings);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param contentEncoding - the supported encoding returned from getSupportedEncoding\r\n\t * @param out\r\n\t * @param range\r\n\t * @param params\r\n\t * @param contentType\r\n\t * @throws IOException\r\n\t * @throws NotAuthorizedException\r\n\t * @throws BadRequestException\r\n\t * @throws NotFoundException \r\n\t */\r\n\tvoid sendCompressedContent( String contentEncoding, OutputStream out, Range range, Map<String,String> params, String contentType ) throws IOException, NotAuthorizedException, BadRequestException, NotFoundException;\r\n\t\r\n\t/**\r\n\t * Return the content length, if known, for the given encoding. Otherwise \r\n\t * return null\r\n\t * \r\n\t * @param contentEncoding\r\n\t * @return - null, or the length of the content encoded with the given encoding\r\n\t */\r\n\tLong getCompressedContentLength(String contentEncoding);\r\n}",
"public static boolean isGZipped(InputStream in) { \r\n if (!in.markSupported()) { \r\n in = new BufferedInputStream(in); \r\n } \r\n in.mark(2); \r\n int magic = 0; \r\n try { \r\n magic = in.read() & 0xff | ((in.read() << 8) & 0xff00); \r\n in.reset(); \r\n } catch (IOException e) { \r\n e.printStackTrace(System.err); \r\n return false; \r\n } \r\n return magic == GZIPInputStream.GZIP_MAGIC; \r\n }",
"public AcceptHeader(AcceptHeader other)\n\t\t{\n\t\t\tthis.acceptedTypes = new HashMap<>();\n\t\t\tthis.acceptedTypes.putAll(other.acceptedTypes);\n\t\t\tthis.headerName = other.headerName;\n\t\t}",
"Builder addEncoding(MediaObject value);",
"public RestClientBuilder setCompressionEnabled(boolean compressionEnabled) {\n this.compressionEnabled = compressionEnabled;\n return this;\n }",
"protected static HttpHeaders getJsonHeaders(){ \n HttpHeaders headers = new HttpHeaders();\n headers.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));\n headers.setContentType(MediaType.APPLICATION_JSON);\n return headers;\n }",
"protected void addContentLengthRequestHeader(HttpState state,\n HttpConnection conn)\n throws IOException, HttpException {\n LOG.trace(\"enter HttpMethodBase.addContentLengthRequestHeader(\"\n + \"HttpState, HttpConnection)\");\n\n // add content length or chunking\n int len = getRequestContentLength();\n if (getRequestHeader(\"content-length\") == null) {\n if (0 < len) {\n setRequestHeader(\"Content-Length\", String.valueOf(len));\n } else if (http11 && (len < 0)) {\n setRequestHeader(\"Transfer-Encoding\", \"chunked\");\n }\n }\n }",
"Long getCompressedContentLength(String contentEncoding);",
"public ClientBuilder compress(boolean compress) {\n this.compress = compress;\n return this;\n }",
"public void setContentType(Header contentType) {\n/* 114 */ this.contentType = contentType;\n/* */ }",
"public WriterOptions compress(CompressionKind value) {\n compressValue = value;\n return this;\n }",
"public DsSipAcceptEncodingHeader(byte[] value, int offset, int count)\n throws DsSipParserException, DsSipParserListenerException {\n /*\n CAFFEINE 2.0 bug fix - CSCef03455 It is the initialization sequence problem.\n The origianl super() calling will eventually call down to the child and set child's private date member.\n */\n parse(value, offset, count);\n }",
"private void generateHeader() throws IOException {\r\n\t\tcharset = Charset.forName(encoding);\r\n\t\t\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\r\n\t\t//first line\r\n\t\tsb.append(\"HTTP/1.1 \");\r\n\t\tsb.append(statusCode);\r\n\t\tsb.append(\" \");\r\n\t\tsb.append(statusText);\r\n\t\tsb.append(\"\\r\\n\");\r\n\t\t\r\n\t\t//second line\r\n\t\tsb.append(\"Content-type: \");\r\n\t\tsb.append(mimeType);\r\n\t\tif (mimeType.startsWith(\"text/\")) {\r\n\t\t\tsb.append(\" ;charset= \");\r\n\t\t\tsb.append(encoding);\r\n\t\t}\r\n\t\tsb.append(\"\\r\\n\");\r\n\t\t\r\n\t\t//third line\r\n\t\tif (contentLength > 0) {\r\n\t\t\tsb.append(\"Content-Length: \");\r\n\t\t\tsb.append(contentLength);\r\n\t\t\tsb.append(\"\\r\\n\");\r\n\t\t}\r\n\t\t\r\n\t\t//fourth line\r\n\t\tgetOutputCookies(sb);\r\n\t\tsb.append(\"\\r\\n\");\r\n\t\t\r\n\t\toutputStream.write(sb.toString().getBytes(Charset.forName(\"ISO_8859_1\")));\r\n\t\t\r\n\t\theaderGenerated = true;\r\n\t}",
"public void setHeader(ResChunkHeader header) {\n this.header = header;\n }",
"private HttpHeaders getHeaders(String contentType) {\n HttpHeaders httpHeaders = new HttpHeaders();\n httpHeaders.set(WebConstants.CONTENT_TYPE, WebConstants.TEXT_PLAIN_UTF8);\n return httpHeaders;\n }",
"public native void setCompression(int value) throws MagickException;",
"protected void addStatus(HeaderFactory headerFactory, Request request) {\n\t\ttry {\n\t\t\tHeader extension = headerFactory.createHeader(EXTENSION_HDR,\n\t\t\t\t\tnew Integer(counter++).toString());\n\t\t\trequest.addHeader(extension);\n\t\t} catch (ParseException ex) {\n\t\t\t// do nothing\n\t\t}\n\t}",
"@Override\r\n\tpublic XContentBuilder addMeta(XContentBuilder xcb, T river) throws IOException {\r\n\t\t// We add specific metadata here\r\n\t\txcb = addFSMeta(xcb, river);\r\n\t\t\r\n\t\txcb\t\r\n\t\t\t.field(\"url\", river.getUrl())\r\n\t\t\t.field(\"update_rate\", river.getUpdateRate() * 1000)\r\n\t\t\t.field(\"includes\", river.getIncludes())\r\n\t\t\t.field(\"excludes\", river.getExcludes())\r\n\t\t\t.field(\"analyzer\", river.getAnalyzer());\r\n\r\n\t\treturn xcb;\r\n\t}",
"public static boolean useJsonResponse(HttpServletRequest request) {\n String acceptHeaderValue = request.getHeader(\"Accept\");\n if (acceptHeaderValue == null) {\n return false;\n }\n HttpHeaders httpHeaders = new HttpHeaders();\n httpHeaders.add(HttpHeaders.ACCEPT, acceptHeaderValue);\n List<MediaType> acceptedMediaTypes = httpHeaders.getAccept();\n boolean acceptsHtml = acceptedMediaTypes.contains(MediaType.TEXT_HTML);\n boolean acceptsJson = acceptedMediaTypes.contains(MediaType.APPLICATION_JSON);\n if (acceptsJson && (!acceptsHtml)) {\n return true;\n } else {\n return false;\n }\n }",
"public void compress() {\r\n fCharBuffer.compress();\r\n fStyleBuffer.compress();\r\n fParagraphBuffer.compress();\r\n }",
"public void addHeader(javax.sip.header.Header sipHeader) {\n \t// Content length is never stored. Just computed.\n SIPHeader sh = (SIPHeader) sipHeader;\n try {\n if (sipHeader instanceof ViaHeader) {\n attachHeader(sh,false,true);\n } else {\n attachHeader(sh,false,false);\n }\n } catch (SIPDuplicateHeaderException ex) {\n \t try {\n \t if (sipHeader instanceof ContentLength) {\n \t\tContentLength cl = (ContentLength) sipHeader;\n \t\tcontentLengthHeader.setContentLength(cl.getContentLength());\n \t }\n \t } catch (InvalidArgumentException e) {}\n }\n }",
"void insertGZip(String file_path) {\n try {\n InputStream fileStream = new FileInputStream(file_path);\n InputStream gzipStream = new GZIPInputStream(fileStream);\n Reader decoder = new InputStreamReader(gzipStream, \"UTF-8\");\n BufferedReader buffered = new BufferedReader(decoder);\n\n for (String line = buffered.readLine(); line != null; line = buffered.readLine()) {\n // process line\n String[] tokens = line.trim().split(\"\\\\s+\"); // split line into different fields\n\n // valid table row should have 16 fields\n if (tokens.length == 16) {\n insertSingleRow(tokens);\n } else {\n continue;\n }\n }\n } catch (Exception e) {\n logger.log(Level.WARNING, \"insertGZip error \", e);\n }\n }",
"private void initHeader(boolean newHeader) throws IOException {\n\n if (newHeader) writeHeader();\n /*\n if (rafShp.read() == -1) { \n //File is empty, write a new one (what else???)\n writeHeader();\n } \n */ \n readHeader();\n }",
"@Override\n public void setHeader(String arg0, String arg1) {\n\n }",
"private void gzipFile(File file) throws IOException\n {\n InputStream input = null;\n GZIPOutputStream gzipOutput = null;\n try\n {\n input = new BufferedInputStream(new FileInputStream(file));\n\n String zippedPath = file.getAbsolutePath() + \".gz\";\n gzipOutput = new GZIPOutputStream(new BufferedOutputStream(new FileOutputStream(zippedPath)));\n\n int value = input.read();\n while (value >= 0)\n {\n gzipOutput.write(value);\n value = input.read();\n }\n gzipOutput.flush();\n gzipOutput.close();\n if (replaceOriginals)\n {\n file.delete();\n }\n }\n finally\n {\n if (input != null)\n {\n input.close();\n }\n if (gzipOutput != null)\n {\n gzipOutput.close();\n }\n }\n }",
"private static void addAdditionalHttpHeaders(Request.Builder requestBuilder) {\n for (Map.Entry<String, String> entry : Parley.getInstance().getNetwork().headers.entrySet()) {\n String name = entry.getKey();\n String value = entry.getValue();\n\n requestBuilder.addHeader(name, value);\n }\n }",
"public interface GZipListener\n{\n /**\n * Get the data buffer the listener wants the handled data in.\n * \n * @return the data buffer\n */\n byte [] getBuffer ();\n\n /**\n * Signal that an exception has occurred during handling of data.\n * \n * @param e\n * the real error\n */\n void failed (Exception e);\n}",
"Builder addEncoding(MediaObject.Builder value);",
"private void serverHeader(\n HttpHeaderFW header)\n {\n serverHeader |= header.name().value().equals(context.nameBuffer(54));\n }",
"private void writeHTTPHeader(OutputStream os, String contentType) throws Exception {\n Date d = new Date();\n DateFormat df = DateFormat.getDateTimeInstance();\n df.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\n os.write(streamStatus.getBytes());\n os.write(\"Date: \".getBytes());\n os.write((df.format(d)).getBytes());\n os.write(\"\\n\".getBytes());\n os.write(\"Server: Jon's very own server\\n\".getBytes());\n //os.write(\"Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT\\n\".getBytes());\n //os.write(\"Content-Length: 438\\n\".getBytes()); //num characters in HTML line\n os.write(\"Connection: close\\n\".getBytes());\n os.write(\"Content-Type: \".getBytes());\n os.write(contentType.getBytes());\n os.write(\"\\n\\n\".getBytes()); // HTTP header ends with 2 newlines\n return;\n}",
"public int accept(HttpResponseProlog prolog, HttpHeaders headers);",
"public void addHeader(String key, String header);",
"@Override\n\t\tprotected void writeStreamHeader() throws IOException {\n\t\t}",
"private static void addAdditionalHttpHeaders(LazyHeaders.Builder requestBuilder) {\n for (Map.Entry<String, String> entry : Parley.getInstance().getNetwork().headers.entrySet()) {\n String name = entry.getKey();\n String value = entry.getValue();\n\n requestBuilder.addHeader(name, value);\n }\n }",
"public Encoding addHeader(String key, HeaderInfo value) {\n\t\theaders = mapBuilder(headers).sparse().add(key, value).build();\n\t\treturn this;\n\t}",
"public static boolean isGZipped(File f) { \r\n int magic = 0; \r\n try { \r\n RandomAccessFile raf = new RandomAccessFile(f, \"r\"); \r\n magic = raf.read() & 0xff | ((raf.read() << 8) & 0xff00); \r\n raf.close(); \r\n } catch (Throwable e) { \r\n e.printStackTrace(System.err); \r\n } \r\n return magic == GZIPInputStream.GZIP_MAGIC; \r\n }",
"public void attachHeader( SIPHeader h, boolean replaceflag )\n throws SIPDuplicateHeaderException {\n this.attachHeader(h, replaceflag, false);\n }",
"public void flushHeader() {\r\n\t\t//resetBuffer();\r\n\t\tif (sc_status == 0) {\r\n\t\t\tsetStatus(200);\r\n\t\t}\r\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"EEE, dd MMM yyyy HH:mm:ss z\", Locale.US);\r\n\t\tdateFormat.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\r\n StringBuffer headerVal = new StringBuffer();\r\n headerVal.append(request.getProtocol() + \" \" + sc_status + \" \" + HttpResponse.getStatusMessage(sc_status) + \"\\r\\n\");\r\n// System.out.println(\"1st line:\" + headerVal.toString());\r\n headerVal.append(\"Date: \" + dateFormat.format(new Date()) + \"\\r\\n\");\r\n for (String headerName : headersMap.keySet()) {\r\n headerVal.append(headerName + \": \" + headersMap.get(headerName).get(0) + \"\\r\\n\");\r\n }\r\n //System.out.println(\"IF request.hasSession? \" + request.hasSession());\r\n if (request.hasSession() && request.getSession().isNew()) {\r\n \tServletEngine.deleteInvalidatedSession();\r\n \tHttpServletSessionM sessionM = (HttpServletSessionM) request.getSession(false);\r\n \tCookie sessionCookie = new Cookie(\"sessionId\", sessionM.getId());\r\n \t\r\n \t//HttpSession calExpireTime = request.getSession(false);\r\n \tint maxAge = (int) ((sessionM.getLastAccessedTime() - new Date().getTime())/1000 + sessionM.getMaxInactiveInterval());\r\n \t//maxAge = maxAge/1000;\r\n \tsessionCookie.setMaxAge(maxAge*60);\r\n// \tif (!sessionM.isValid()) {\r\n// \t\tSystem.out.println(\"Here the session is invaid\");\r\n// \t\tsessionCookie.setMaxAge(0);\r\n// \t}\r\n \theaderVal.append(\"Set-Cookie: \").append(getCookieInfo(sessionCookie)).append(\"\\r\\n\");\r\n }\r\n if (cookies.size() > 0) {\r\n \tfor (Cookie cur : cookies) {\r\n \t\theaderVal.append(\"Set-Cookie: \").append(getCookieInfo(cur)).append(\"\\r\\n\");\r\n \t}\r\n }\r\n \r\n headerVal.append(\"Content-Length: \" + buffer.getContentLength() + \"\\r\\n\");\r\n //System.out.println(\"buffer.getContentLength:\" + buffer.getContentLength());\r\n headerVal.append(\"Content-Type: \" + contentType + \"\\r\\n\");\r\n headerVal.append(\"Content-Encoding: \" + encoding + \"\\r\\n\");\r\n headerVal.append(\"Connection: close\\r\\n\\r\\n\");\r\n //System.out.println(headerVal.toString());\r\n try {\r\n\t\t\tout.write(headerVal.toString().getBytes());\r\n\t\t\tout.flush();\r\n\t\t\tisCommitted = true;\r\n\t\t\t//System.out.println(\"flushed \");\r\n\t\t} catch (IOException e) {\r\n\t\t\tLogRecorder.addErrorMessage(e, \"cannot write or flush\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void setVideoCompressionType(String videoCompressionType) {\n this.videoCompressionType = videoCompressionType;\n }",
"public void setCompress(boolean compress) {\n\t\tthis.compress = compress;\n\t}",
"protected ExtendedTagHeader makeExtendedHeader(InputStream in)\n throws IOException\n {\n return new ExtendedTagHeader_v2_3(in);\n }",
"@Test\n public void setFileExt_JSONL_GZIP_JSONL_GZ() {\n config = loadYamlResource(embulk, \"base.yml\");\n final PluginTask task = CONFIG_MAPPER.map(config, PluginTask.class);\n\n BigqueryTaskBuilder.setFileExt(task);\n assertEquals(\"NEWLINE_DELIMITED_JSON\", task.getSourceFormat());\n assertEquals(\"GZIP\", task.getCompression());\n assertEquals(\".jsonl.gz\", task.getFileExt().get());\n }",
"public void addRequestHeader(String name, String value);",
"protected void updateHeader() {\n\t}",
"private static void initializeResponse(String contentType, String header){\r\n\t\t // Initialize response.\r\n\t response.reset(); // Some JSF component library or some Filter might have set some headers in the buffer beforehand. We want to get rid of them, else it may collide.\r\n\t response.setContentType(contentType); // Check http://www.iana.org/assignments/media-types for all types. Use if necessary ServletContext#getMimeType() for auto-detection based on filename.\r\n\t response.setHeader(\"Content-disposition\", header); // The Save As popup magic is done here. You can give it any filename you want, this only won't work in MSIE, it will use current request URL as filename instead.\r\n\r\n\t}",
"public void loadGzipedSchematic(File f) throws IOException {\nDataInputStream in = new DataInputStream(new GZIPInputStream(new FileInputStream(f)));\nloadUncompressedSchematic(in);\nin.close();\n}",
"@Override\n public StreamHeader getHeader() throws Exception {\n return header;\n }",
"protected static void setContentTypeHeader(HttpResponse response, File file) {\n\t\tresponse.setHeader(HttpHeaders.Names.CONTENT_TYPE, mimeTypesMap.getContentType(file.getName())\n\t\t\t\t+ \"; charset=UTF-8\");\n\t}"
]
| [
"0.7943524",
"0.65302026",
"0.6190305",
"0.599023",
"0.5872702",
"0.57059795",
"0.5626093",
"0.5529697",
"0.54872483",
"0.53891623",
"0.5356309",
"0.53457433",
"0.53426343",
"0.5326529",
"0.5324221",
"0.52450866",
"0.519523",
"0.5191486",
"0.51657623",
"0.5144474",
"0.51401716",
"0.5116039",
"0.5114129",
"0.5092252",
"0.50469977",
"0.5024911",
"0.5021485",
"0.5002636",
"0.4986598",
"0.49751154",
"0.4968195",
"0.4957264",
"0.49550462",
"0.49550462",
"0.4954935",
"0.49530897",
"0.49265912",
"0.4861361",
"0.48582208",
"0.4853171",
"0.48268744",
"0.48078778",
"0.47991407",
"0.47976947",
"0.47945032",
"0.47921446",
"0.47915727",
"0.47889227",
"0.4780481",
"0.477495",
"0.47586355",
"0.47547317",
"0.4753756",
"0.4739328",
"0.47362086",
"0.47295013",
"0.47019807",
"0.4691431",
"0.46829817",
"0.46773297",
"0.46603346",
"0.4640637",
"0.46369752",
"0.4632633",
"0.46314442",
"0.46206653",
"0.46193457",
"0.46109384",
"0.45813832",
"0.45811072",
"0.4569085",
"0.45639488",
"0.45601565",
"0.45567918",
"0.45452708",
"0.45402062",
"0.45379305",
"0.45327806",
"0.45306584",
"0.452899",
"0.45264506",
"0.45263296",
"0.45246643",
"0.45229495",
"0.45156607",
"0.45147616",
"0.44997898",
"0.44876602",
"0.44803303",
"0.4471789",
"0.4467718",
"0.44664428",
"0.44557345",
"0.44542035",
"0.44536933",
"0.4445593",
"0.4441894",
"0.44395256",
"0.44347128",
"0.44343844"
]
| 0.66809756 | 1 |
Inflate any responses compressed with gzip | public void process(HttpResponse response, HttpContext context) {
final HttpEntity entity = response.getEntity();
if (entity != null) {
final Header encoding = entity.getContentEncoding();
if (encoding != null) {
for (HeaderElement element : encoding.getElements()) {
if (element.getName().equalsIgnoreCase(
ENCODING_GZIP)) {
response.setEntity(new InflatingEntity(response
.getEntity()));
break;
}
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void serviceGZipCompressed(Connection conn) \n throws IOException {\n conn.getResponse().setContentType(getContnentType().getMimeType());\n conn.getResponse().setHeader(\"Content-Encoding\", \"gzip\");\n conn.getOutputStream().write(gzipContent);\n }",
"private static void addGzipHeader(Request request, Response response) {\n response.header(\"Content-Encoding\", \"gzip\");\n }",
"byte[] deflate(byte[] data) throws IOException;",
"@Override\n public boolean startContent(int statusCode, Compression compression) {\n return true;\n }",
"public void process(HttpRequest request, HttpContext context) {\n\t\t\t\tif (!request.containsHeader(HEADER_ACCEPT_ENCODING)) {\r\n\t\t\t\t\trequest.addHeader(HEADER_ACCEPT_ENCODING, ENCODING_GZIP);\r\n\t\t\t\t}\r\n\t\t\t}",
"byte[] inflate(byte[] data) throws IOException;",
"@Override\n\tpublic void Decompress() {\n\t\t\n\t}",
"public interface CompressedResource {\r\n\t\r\n\t/**\r\n\t * Return the supported encoding from the list of allowable encodings from the user agent\r\n\t * \r\n\t * If none are supported return null.\r\n\t * \r\n\t * @param acceptableEncodings\r\n\t * @return - null if none of the given encodings are supported, otherwise the content encoding header value to be used\r\n\t */\r\n\tString getSupportedEncoding(String acceptableEncodings);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param contentEncoding - the supported encoding returned from getSupportedEncoding\r\n\t * @param out\r\n\t * @param range\r\n\t * @param params\r\n\t * @param contentType\r\n\t * @throws IOException\r\n\t * @throws NotAuthorizedException\r\n\t * @throws BadRequestException\r\n\t * @throws NotFoundException \r\n\t */\r\n\tvoid sendCompressedContent( String contentEncoding, OutputStream out, Range range, Map<String,String> params, String contentType ) throws IOException, NotAuthorizedException, BadRequestException, NotFoundException;\r\n\t\r\n\t/**\r\n\t * Return the content length, if known, for the given encoding. Otherwise \r\n\t * return null\r\n\t * \r\n\t * @param contentEncoding\r\n\t * @return - null, or the length of the content encoded with the given encoding\r\n\t */\r\n\tLong getCompressedContentLength(String contentEncoding);\r\n}",
"public static InputStream getResponseBodyStream(HttpResponse response) throws IOException {\n if (response == null || response.getEntity() == null) {\n return null;\n }\n InputStream inStream = response.getEntity().getContent();\n Header contentEncoding = response.getFirstHeader(\"Content-Encoding\");\n\n if (contentEncoding != null\n && contentEncoding.getValue().equalsIgnoreCase(\"gzip\")) {\n inStream = new GZIPInputStream(inStream);\n }\n\n return inStream;\n }",
"private ZipCompressor(){}",
"public GZIPResponseWrapper(HttpServletResponse response, String contentType) {\n super(response);\n this.contentType = contentType;\n }",
"public static InputStream getUngzippedContent(HttpEntity entity)\n\t\t\tthrows IOException {\n\t\tInputStream responseStream = entity.getContent();\n\t\tif (responseStream == null) {\n\t\t\treturn responseStream;\n\t\t}\n\t\tHeader header = entity.getContentEncoding();\n\t\tif (header == null) {\n\t\t\treturn responseStream;\n\t\t}\n\t\tString contentEncoding = header.getValue();\n\t\tif (contentEncoding == null) {\n\t\t\treturn responseStream;\n\t\t}\n\t\tif (contentEncoding.contains(\"gzip\")) {\n\t\t\tif (DEBUG)\n\t\t\t\tLog.d(TAG, \"getUngzippedContent\");\n\t\t\tresponseStream = new GZIPInputStream(responseStream);\n\t\t}\n\t\treturn responseStream;\n\t}",
"@Override\n\tpublic void Compress() {\n\t\t\n\t}",
"public static String getCompression(HttpServletRequest req) {\n String encoding = req.getHeader(HttpHeaders.ACCEPT_ENCODING);\n if (null != encoding) {\n if (BaseFileServlet.GZIP_PATTERN.matcher(encoding).find()) {\n return \"gzip\";\n //} else if (BR_PATTERN.matcher(encoding).find()) {\n // return \"br\";\n }\n }\n return \"none\";\n }",
"public static InputStream getDecompressingInputStream(final HttpResponse<InputStream> resp) throws IOException {\n final String encoding = resp.headers().firstValue(\"Content-Encoding\").orElse(\"identity\").toLowerCase(Locale.ROOT).trim();\n log.debug(\"HTTP server uses \" + encoding + \" content encoding.\");\n switch (encoding) {\n case \"gzip\": return new GZIPInputStream(resp.body());\n case \"deflate\": return new InflaterInputStream(resp.body());\n case \"identity\": return resp.body();\n }\n throw new IOException(\"Server uses an invalid content encoding: \" + encoding);\n }",
"private StandardDeCompressors() {}",
"Map<String, InputStream> extract(TypedValue<InputStream> archive) throws DecompressionException;",
"private static String parseResponse(HttpResponse response) throws Exception {\r\n \t\tString result = null;\r\n \t\tBufferedReader reader = null;\r\n \t\ttry {\r\n \t\t\tHeader contentEncoding = response\r\n \t\t\t\t\t.getFirstHeader(\"Content-Encoding\");\r\n \t\t\tif (contentEncoding != null\r\n \t\t\t\t\t&& contentEncoding.getValue().equalsIgnoreCase(\"gzip\")) {\r\n \t\t\t\treader = new BufferedReader(new InputStreamReader(\r\n \t\t\t\t\t\tnew GZIPInputStream(response.getEntity().getContent())));\r\n \t\t\t} else {\r\n \t\t\t\treader = new BufferedReader(new InputStreamReader(response\r\n \t\t\t\t\t\t.getEntity().getContent()));\r\n \t\t\t}\r\n \t\t\tStringBuilder sb = new StringBuilder();\r\n \t\t\tString line = null;\r\n \r\n \t\t\twhile ((line = reader.readLine()) != null) {\r\n \t\t\t\tsb.append(line + \"\\n\");\r\n \t\t\t}\r\n \t\t\tresult = sb.toString();\r\n \t\t} finally {\r\n \t\t\tif (reader != null) {\r\n \t\t\t\treader.close();\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn result;\r\n \t}",
"public void compress() {\r\n fCharBuffer.compress();\r\n fStyleBuffer.compress();\r\n fParagraphBuffer.compress();\r\n }",
"public static PageCompression detectCompressionMethod( HttpResponse response ) {\n\t\tif ( response != null && response.containsHeader( \"Content-Encoding\" ) ) {\n\t\t\tHeader[] headers = response.getHeaders( \"Content-Encoding\" );\n\t\t\tfor ( int i = 0 ; i < headers.length ; i++ ) {\n\t\t\t\tString val = headers[i].getValue().trim();\n\t\t\t\tSystem.out.println( val );\n\t\t\t\tif ( val.equalsIgnoreCase( \"gzip\" ) ) {\n\t\t\t\t\treturn PageCompression.GZIP;\n\t\t\t\t} else if ( val.equalsIgnoreCase( \"deflate\" ) ) {\n\t\t\t\t\treturn PageCompression.DEFLATE;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn PageCompression.NOT_COMPRESSED;\n\t}",
"public interface ExtractorStrategy {\n\n /**\n * Extracts all the entries of an compressed archive and returns a map with the name of the entry as key and\n * the proper data content of the entry as value.\n */\n Map<String, InputStream> extract(TypedValue<InputStream> archive) throws DecompressionException;\n}",
"public interface CompressionStrategy {\n\n /**\n * The type of compression performed.\n */\n String getType();\n\n /**\n * Uncompresses the data. The array received should not be modified, but it\n * may be returned unchanged.\n * \n * @param data compressed data.\n * @return uncompressed data.\n * @throws IOException if there is an issue during the operation.\n */\n byte[] inflate(byte[] data) throws IOException;\n\n /**\n * Compresses the data. The array received should not be modified, but it\n * may be returned unchanged.\n * \n * @param data uncompressed data.\n * @return compressed data.\n * @throws IOException if there is an issue during the operation.\n */\n byte[] deflate(byte[] data) throws IOException;\n}",
"public GZIPOutputStream addGzipStream(String id) throws IOException {\n\t\tGZIPOutputStream gzos = new GZIPOutputStream(outputStream);\n\t\trks.add(id);\n\t\trvs.add(gzos);\n\t\treturn gzos;\n\t}",
"public String xmlInflater(String SAMLRequest) {\n //base64 decode to deflated xml file string\n\n byte[] decoded = Base64.getDecoder().decode(SAMLRequest.getBytes());\n String inflated = new String(decoded, Charset.forName(\"UTF-8\"));\n //System.out.println(new String(decoded, StandardCharsets.UTF_8));\n //inflate(uncompress) the deflated xml data\n /* Inflater decompresser = new Inflater();\n decompresser.setInput(decoded);\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream(decoded.length);\n byte[] buffer = new byte[4096];\n // while (!decompresser.finished()) {\n String inflated = \"\"; */\n /* try{\n /* int bufferLen = decompresser.inflate(buffer);\n System.out.println(\"Inflater inflate\");\n if(!decompresser.finished()){\n throw new RuntimeException(\"didn't allocate enough space to hold decompressed data\");\n }\n decompresser.end();\n inflated = new String(buffer, 0, bufferLen, \"UTF-8\");*//*\n while(!decompresser.finished()){\n int count = decompresser.inflate(buffer);\n outputStream.write(buffer, 0, count);\n }\n outputStream.close();\n byte[] output = outputStream.toByteArray();\n System.out.println(\"output\");\n\n }catch (DataFormatException e){\n Log.debug(\"dataformat exception\");\n } */\n return inflated;\n }",
"Long getCompressedContentLength(String contentEncoding);",
"private byte[] decompress(byte[] content) throws IOException {\n ByteArrayInputStream bais = new ByteArrayInputStream(content);\n try (GZIPInputStream is = new GZIPInputStream(bais)) {\n return IOUtils.toByteArray(is);\n }\n }",
"public void loadGzipedSchematic(File f) throws IOException {\nDataInputStream in = new DataInputStream(new GZIPInputStream(new FileInputStream(f)));\nloadUncompressedSchematic(in);\nin.close();\n}",
"public static StringBuffer getContentFromGZIPBytes(byte[] bytes) throws ZipException, IOException{\n\t\tbyte[] b = null;\n\t\tByteArrayInputStream bain = new ByteArrayInputStream(bytes);\n\t\tGZIPInputStream gzip = new GZIPInputStream(bain);\n\t\t\n\t\tbyte[] buf = new byte[1024]; \n\t\tint num = -1; \n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream(); \n\t\twhile ((num = gzip.read(buf, 0, buf.length)) != -1) {\n\t\t\tbaos.write(buf, 0, num); \n\t\t}\n\t\t\n\t\tb = baos.toByteArray();\n\t\tbaos.flush();\n\t\tbaos.close();\n\t\tgzip.close();\n\t\tbain.close(); \n\t\t\n\t\t\n\t\treturn new StringBuffer(new String(b));\n\t}",
"public void flush() {\n\r\n int inflatedSize = buffer.position();\r\n deflator.setInput(buffer.getBuffer(), 0, inflatedSize);\r\n deflator.finish();\r\n int deflatedSize = deflator.deflate(compressionBuffer.array());\r\n deflator.reset();\r\n\r\n try {\r\n outputStream.writeInt(deflatedSize);\r\n outputStream.writeInt(inflatedSize);\r\n outputStream.write(compressionBuffer.array(), 0, deflatedSize);\r\n }\r\n catch (IOException e) {\r\n throw new RuntimeException(\"Failed to write compressed data to stream\", e);\r\n }\r\n\r\n buffer.clear();\r\n compressionBuffer.clear();\r\n }",
"private static StreamInfo<AInput<ByteBuffer>> createEncodedInputStream(\n final ByteParserContext input,\n final AResolver<InputState> stateTracker,\n final AResolver<HttpHeaders> trailersResolver,\n final Consumer<StreamFinishedEvent> listener,\n final boolean isRequest,\n final List<TransferEncoding> transferEncodings) {\n final TransferEncoding last = transferEncodings.get(transferEncodings.size() - 1);\n boolean restOfTheStream;\n AInput<ByteBuffer> current;\n int i = transferEncodings.size() - 1;\n if (CHUNKED_ENCODING.equalsIgnoreCase(last.getName())) {\n ensureNoParameters(last);\n current = new ChunkedInput(input, stateTracker, HttpLimits.MAX_HEADERS_SIZE, trailersResolver);\n restOfTheStream = false;\n i--;\n } else {\n if (isRequest) {\n throw new HttpException(\"The chunked encoding must be last for the request.\");\n }\n current = new RestOfStreamInput(input, stateTracker);\n trailersWouldNotHappen(trailersResolver);\n restOfTheStream = true;\n }\n while (i > 0) {\n final TransferEncoding currentEncoding = transferEncodings.get(i--);\n final String encoding = currentEncoding.getName();\n if (CHUNKED_ENCODING.equalsIgnoreCase(encoding)) {\n throw new HttpException(\"The chunked encoding must happen only once.\");\n } else if (GZIP_ENCODING.equalsIgnoreCase(encoding) || X_GZIP_ENCODING.equalsIgnoreCase(encoding)) {\n ensureNoParameters(currentEncoding);\n current = new GZipInput(current, IOUtil.BYTE.writeBuffer(input.buffer().capacity()), null);\n } else if (DEFLATE_ENCODING.equalsIgnoreCase(encoding)) {\n ensureNoParameters(currentEncoding);\n current = new InflateInput(new Inflater(), current,\n IOUtil.BYTE.writeBuffer(input.buffer().capacity()));\n } else {\n throw new UnknownTransferEncodingException(\"The unsupported encoding: \" + currentEncoding);\n }\n }\n current = export(listener, current);\n return new StreamInfo<>(current, null, restOfTheStream, transferEncodings);\n }",
"OptimizeResponse() {\n\n\t}",
"public void inflate(){\n\t\tInflateTextContent();\n\t\tif(tempData.get(\"Media_Type\").equals(\"1\")){\n\t\t\tgenerateMediaView();\n\t\t}else if(tempData.get(\"Media_Type\").equals(\"2\")){\n\t\t\tprocessURL(2);\n\t\t}else if(tempData.get(\"Media_Type\").equals(\"3\")){\n\t\t\tprocessURL(3);\n\t\t}\t\n\t}",
"public void writeResponse(OutputStream out, ServiceTunnelResponse msg) throws Exception {\n boolean compressed = isUseCompression();\r\n StringBuilder buf = new StringBuilder();\r\n buf.append(\"<SOAP-ENV:Envelope SOAP-ENV:encodingStyle=\\\"http://schemas.xmlsoap.org/soap/encoding/\\\" xmlns:SOAP-ENV=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\">\\n\");\r\n buf.append(\"<SOAP-ENV:Body>\\n\");\r\n if (msg.getException() == null) {\r\n buf.append(\" <response status=\\\"OK\\\"\");\r\n Object x = msg.getData();\r\n if (x != null) {\r\n buf.append(\" type=\\\"\" + x.getClass().getSimpleName() + \"\\\"\");\r\n }\r\n else {\r\n buf.append(\" type=\\\"\\\"\");\r\n }\r\n buf.append(\" compressed=\\\"\" + compressed + \"\\\"\");\r\n buf.append(\"/>\\n\");\r\n }\r\n else {\r\n buf.append(\" <response status=\\\"ERROR\\\">\\n\");\r\n buf.append(\" <exception type=\\\"\" + msg.getException().getClass().getSimpleName() + \"\\\">\");\r\n buf.append(msg.getException().getMessage());\r\n buf.append(\"</exception>\\n\");\r\n buf.append(\" </response>\\n\");\r\n }\r\n buf.append(\" <data>\");\r\n long y = System.nanoTime();\r\n setData(buf, msg, compressed);\r\n y = System.nanoTime() - y;\r\n if (LOG.isDebugEnabled()) LOG.debug(\"message encoding took \" + y + \" nanoseconds\");\r\n buf.append(\"</data>\\n\");\r\n buf.append(\" <info\");\r\n buf.append(\" origin=\\\"\" + m_originAddress + \"\\\"\");\r\n buf.append(\"/>\\n\");\r\n buf.append(\"</SOAP-ENV:Body>\");\r\n buf.append(\"</SOAP-ENV:Envelope>\");\r\n //\r\n if (LOG.isDebugEnabled()) {\r\n out = new DebugOutputStream(out);\r\n }\r\n try {\r\n out.write(buf.toString().getBytes(\"UTF-8\"));\r\n }\r\n finally {\r\n if (LOG.isDebugEnabled()) {\r\n String sentData = ((DebugOutputStream) out).getContent(\"UTF-8\");\r\n int lastWrittenCharacter = ((DebugOutputStream) out).getLastWrittenCharacter();\r\n Throwable lastThrownException = ((DebugOutputStream) out).getLastThrownException();\r\n LOG.debug(\"lastWrittenCharacter=\" + lastWrittenCharacter + \",lastThrownException=\" + lastThrownException + \", sentData: \" + sentData);\r\n }\r\n }\r\n }",
"private void initResource(final ResourceReference ref) throws ResourceStreamNotFoundException {\n\t\tfinal boolean gzip = Application.get().getResourceSettings().getDisableGZipCompression();\n\t\ttry {\n\t\t\tApplication.get().getResourceSettings().setDisableGZipCompression(true);\n\t\t\tref.getResource().getResourceStream().getInputStream();\n\t\t} finally {\n\t\t\tApplication.get().getResourceSettings().setDisableGZipCompression(gzip);\n\t\t}\n\t}",
"protected abstract ByteBuf decompress(ByteBuf compressed, int originalLength) throws Exception;",
"private ResponseEntity m37639a(C6148a aVar) throws AMapCoreException, IOException {\n Throwable th;\n PushbackInputStream pushbackInputStream;\n InputStream inputStream;\n PushbackInputStream pushbackInputStream2;\n PushbackInputStream pushbackInputStream3;\n Throwable th2;\n List<String> list;\n String str = \"\";\n ByteArrayOutputStream byteArrayOutputStream = null;\n try {\n long currentTimeMillis = System.currentTimeMillis();\n HttpURLConnection httpURLConnection = aVar.f25732a;\n httpURLConnection.connect();\n Map<String, List<String>> headerFields = httpURLConnection.getHeaderFields();\n int responseCode = httpURLConnection.getResponseCode();\n if (!(headerFields == null || (list = headerFields.get(\"gsid\")) == null || list.size() <= 0)) {\n str = list.get(0);\n }\n if (responseCode == 200) {\n m37642a(aVar, false, currentTimeMillis, System.currentTimeMillis());\n ByteArrayOutputStream byteArrayOutputStream2 = new ByteArrayOutputStream();\n try {\n inputStream = httpURLConnection.getInputStream();\n try {\n pushbackInputStream = new PushbackInputStream(inputStream, 2);\n try {\n byte[] bArr = new byte[2];\n pushbackInputStream.read(bArr);\n pushbackInputStream.unread(bArr);\n FilterInputStream gZIPInputStream = (bArr[0] == 31 && bArr[1] == -117) ? new GZIPInputStream(pushbackInputStream) : pushbackInputStream;\n byte[] bArr2 = new byte[1024];\n while (true) {\n int read = gZIPInputStream.read(bArr2);\n if (read == -1) {\n break;\n }\n byteArrayOutputStream2.write(bArr2, 0, read);\n }\n SDKLogHandler.m37520c();\n ResponseEntity avVar = new ResponseEntity();\n avVar.f25744a = byteArrayOutputStream2.toByteArray();\n avVar.f25745b = headerFields;\n avVar.f25746c = this.f25729i;\n avVar.f25747d = str;\n try {\n byteArrayOutputStream2.close();\n } catch (Throwable th3) {\n BasicLogHandler.m38679a(th3, \"ht\", \"par\");\n }\n if (inputStream != null) {\n try {\n inputStream.close();\n } catch (Throwable th4) {\n BasicLogHandler.m38679a(th4, \"ht\", \"par\");\n }\n }\n try {\n pushbackInputStream.close();\n } catch (Throwable th5) {\n BasicLogHandler.m38679a(th5, \"ht\", \"par\");\n }\n try {\n gZIPInputStream.close();\n } catch (Throwable th6) {\n BasicLogHandler.m38679a(th6, \"ht\", \"par\");\n }\n return avVar;\n } catch (IOException unused) {\n byteArrayOutputStream = byteArrayOutputStream2;\n pushbackInputStream3 = null;\n try {\n throw new AMapCoreException(\"IO 操作异常 - IOException\", str, this.f25729i);\n } catch (Throwable th7) {\n pushbackInputStream2 = pushbackInputStream3;\n th = th7;\n if (byteArrayOutputStream != null) {\n }\n if (inputStream != null) {\n }\n if (pushbackInputStream != null) {\n }\n if (pushbackInputStream2 != null) {\n }\n throw th;\n }\n } catch (Throwable th8) {\n byteArrayOutputStream = byteArrayOutputStream2;\n th = th8;\n pushbackInputStream2 = null;\n if (byteArrayOutputStream != null) {\n }\n if (inputStream != null) {\n }\n if (pushbackInputStream != null) {\n }\n if (pushbackInputStream2 != null) {\n }\n throw th;\n }\n } catch (IOException unused2) {\n pushbackInputStream = null;\n byteArrayOutputStream = byteArrayOutputStream2;\n pushbackInputStream3 = pushbackInputStream;\n throw new AMapCoreException(\"IO 操作异常 - IOException\", str, this.f25729i);\n } catch (Throwable th9) {\n th2 = th9;\n pushbackInputStream = null;\n byteArrayOutputStream = byteArrayOutputStream2;\n th = th2;\n pushbackInputStream2 = pushbackInputStream;\n if (byteArrayOutputStream != null) {\n }\n if (inputStream != null) {\n }\n if (pushbackInputStream != null) {\n }\n if (pushbackInputStream2 != null) {\n }\n throw th;\n }\n } catch (IOException unused3) {\n inputStream = null;\n pushbackInputStream = null;\n byteArrayOutputStream = byteArrayOutputStream2;\n pushbackInputStream3 = pushbackInputStream;\n throw new AMapCoreException(\"IO 操作异常 - IOException\", str, this.f25729i);\n } catch (Throwable th10) {\n th2 = th10;\n inputStream = null;\n pushbackInputStream = null;\n byteArrayOutputStream = byteArrayOutputStream2;\n th = th2;\n pushbackInputStream2 = pushbackInputStream;\n if (byteArrayOutputStream != null) {\n try {\n byteArrayOutputStream.close();\n } catch (Throwable th11) {\n BasicLogHandler.m38679a(th11, \"ht\", \"par\");\n }\n }\n if (inputStream != null) {\n try {\n inputStream.close();\n } catch (Throwable th12) {\n BasicLogHandler.m38679a(th12, \"ht\", \"par\");\n }\n }\n if (pushbackInputStream != null) {\n try {\n pushbackInputStream.close();\n } catch (Throwable th13) {\n BasicLogHandler.m38679a(th13, \"ht\", \"par\");\n }\n }\n if (pushbackInputStream2 != null) {\n try {\n pushbackInputStream2.close();\n } catch (Throwable th14) {\n BasicLogHandler.m38679a(th14, \"ht\", \"par\");\n }\n }\n throw th;\n }\n } else {\n AMapCoreException jVar = new AMapCoreException(\"网络异常原因:\" + httpURLConnection.getResponseMessage() + \" 网络异常状态码:\" + responseCode + \" \" + str + \" \" + this.f25729i, str, this.f25729i);\n jVar.mo41849a(responseCode);\n throw jVar;\n }\n } catch (IOException unused4) {\n pushbackInputStream3 = null;\n inputStream = null;\n pushbackInputStream = null;\n throw new AMapCoreException(\"IO 操作异常 - IOException\", str, this.f25729i);\n } catch (Throwable th15) {\n th = th15;\n pushbackInputStream2 = null;\n inputStream = null;\n pushbackInputStream = null;\n if (byteArrayOutputStream != null) {\n }\n if (inputStream != null) {\n }\n if (pushbackInputStream != null) {\n }\n if (pushbackInputStream2 != null) {\n }\n throw th;\n }\n }",
"public static InputStream getStream(HttpResponse response)\n\t\t\tthrows IllegalStateException, IOException {\n\n\t\tInputStream instream = response.getEntity().getContent();\n\t\tHeader contentEncoding = response.getFirstHeader(\"Content-Encoding\");\n\t\tif (contentEncoding != null\n\t\t\t\t&& contentEncoding.getValue().equalsIgnoreCase(\"gzip\")) {\n\t\t\tinstream = new GZIPInputStream(instream);\n\t\t}\n\t\treturn instream;\n\t}",
"@Override\n public byte[] compress(byte[] bytes) throws IOException\n {\n try (BinaryIO io = new BinaryIO())\n {\n io.write32Bits(LZW_TAG);\n\n LZWDictionary dict = new LZWDictionary();\n int bitsize = 9, index = -1, newIndex;\n\n for (byte b : bytes)\n {\n newIndex = dict.get(index, b);\n\n if (newIndex > 0)\n index = newIndex;\n else\n {\n io.writeBits(index, bitsize);\n bitsize = dict.put(index, b);\n index = dict.get(-1, b);\n }\n if (dict.isFull())\n dict.reset();\n }\n io\n .writeBits(index, bitsize)\n .write32Bits(0); // EoF marker\n\n return io.getBytesOut();\n }\n }",
"void encode(StreamingContent content, OutputStream out) throws IOException;",
"@Override\r\n\tpublic void prepare(ResponseBuilder arg0) throws IOException {\n\t\t\r\n\t}",
"List<CompressResult> decompress(Path input, Path output) throws IOException;",
"private void compressArchive() throws Exception {\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"Compressing archive: \" + path);\n\t\t}\n\n\t\tFileOutputStream fout = new FileOutputStream(path + \".gz\");\n\t\tGZIPOutputStream gout = new GZIPOutputStream(fout);\n\t\tFileInputStream fin = new FileInputStream(path);\n\t\tbyte[] buf = new byte[blockSize];\n\t\tint len;\n\t\twhile ((len = fin.read(buf)) > 0) {\n\t\t\tgout.write(buf, 0, len);\n\t\t}\n\t\tfin.close();\n\n\t\t// flush and close gzip file\n\t\tgout.finish();\n\t\tgout.close();\n\n\t\t// unlink original archive\n\t\tFile file = new File(path);\n\t\tfile.delete();\n\t}",
"public synchronized void finish() throws IOException {\n\t\t\tif (!def.finished()) {\n\t\t\t\tdef.finish();\n\t\t\t\twhile (!def.finished()) {\n\t\t\t\t\tdeflate();\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"private CompressionTools() {}",
"public interface GZipListener\n{\n /**\n * Get the data buffer the listener wants the handled data in.\n * \n * @return the data buffer\n */\n byte [] getBuffer ();\n\n /**\n * Signal that an exception has occurred during handling of data.\n * \n * @param e\n * the real error\n */\n void failed (Exception e);\n}",
"@Override\n default IServerPrx ice_compress(boolean co)\n {\n return (IServerPrx)_ice_compress(co);\n }",
"public byte[] decompress() throws FlateDecompressException {\r\n //byte[] newData = new byte[16384];\r\n byte[] newData = new byte[1024*512];\r\n int len;\r\n try {\r\n while ((len=in.read(newData, 0, newData.length)) != -1) {\r\n out.write(newData, 0, len);\r\n }\r\n out.close();\r\n in.close();\r\n } catch (java.util.zip.ZipException ze) {\r\n ze.printStackTrace();\r\n //throw new FlateDecompressException(\"ZipException during decompression\");\r\n byte[] r = {0x0D, 0x0A};\r\n return r;\r\n } catch (java.io.IOException e) {\r\n e.printStackTrace();\r\n throw new FlateDecompressException(\"IO Exception during decompression\");\r\n }\r\n return out.toByteArray(); \r\n }",
"public COSFilterFlateDecode(ASInputStream stream) throws IOException {\n super(stream);\n inflater = new Inflater();\n }",
"public interface HttpEncoding {\n\n /** Returns the content encoding name (for example {@code \"gzip\"}) or {@code null} for none. */\n String getName();\n\n /**\n * Encodes the streaming content into the output stream.\n *\n * <p>Implementations must not close the output stream, and instead should flush the output\n * stream. Some callers may assume that the output stream has not been closed, and will fail to\n * work if it has been closed.\n *\n * @param content streaming content\n * @param out output stream\n */\n void encode(StreamingContent content, OutputStream out) throws IOException;\n}",
"EzyDecodeHandler nextHandler();",
"public void useSnappyCompressFile(File in, File out) {\n\n FileInputStream fi = null;\n FileOutputStream fo = null;\n SnappyOutputStream sout = null;\n try {\n fi = new FileInputStream(in);\n fo = new FileOutputStream(out);\n sout = new SnappyOutputStream(fo);\n while (true) {\n int count = fi.read(BUFFER_SIZE, 0, BUFFER_SIZE.length);\n if (count == -1) {\n break;\n }\n sout.write(BUFFER_SIZE, 0, count);\n }\n sout.flush();\n } catch (IOException ex) {\n log.warn(\"compress file failed: {}\",ex.getMessage());\n ex.printStackTrace();\n } finally {\n IOUtils.closeQuietly(sout);\n IOUtils.closeQuietly(fi);\n IOUtils.closeQuietly(fo);\n }\n }",
"@SuppressWarnings(\"PMD.CloseResource\") // PMD does not understand Closer.\n private static void serializeToLz4Data(Serializable object, OutputStream out) {\n try (Closer closer = Closer.create()) {\n OutputStream los = closer.register(new LZ4FrameOutputStream(out));\n ObjectOutputStream oos = closer.register(new ObjectOutputStream(los));\n oos.writeObject(object);\n } catch (Throwable e) {\n throw new BatfishException(\"Failed to convert object to LZ4 data\", e);\n }\n }",
"public static @NotNull String compress(@NotNull String str) throws IOException {\n ByteArrayOutputStream out = new ByteArrayOutputStream();\n GZIPOutputStream gzip = new GZIPOutputStream(out);\n gzip.write(str.getBytes());\n gzip.close();\n String outStr = out.toString(\"ISO-8859-1\");\n //System.out.println(\"Output String length: \" + outStr.length());\n return outStr;\n }",
"@Override\n protected void doFetch(SocketTimeout timeout) throws IOException {\n _aborted = false;\n readHeaders();\n if (_aborted)\n throw new IOException(\"Timed out reading the HTTP headers\");\n \n if (timeout != null) {\n timeout.resetTimer();\n if (_fetchInactivityTimeout > 0)\n timeout.setInactivityTimeout(_fetchInactivityTimeout);\n else\n timeout.setInactivityTimeout(60*1000);\n } \n if (_fetchInactivityTimeout > 0)\n _proxy.setSoTimeout(_fetchInactivityTimeout);\n else\n _proxy.setSoTimeout(INACTIVITY_TIMEOUT);\n\n if (_redirectLocation != null) {\n throw new IOException(\"Server redirect to \" + _redirectLocation + \" not allowed\");\n }\n \n if (_log.shouldLog(Log.DEBUG))\n _log.debug(\"Headers read completely, reading \" + _bytesRemaining);\n \n boolean strictSize = (_bytesRemaining >= 0);\n\n Thread pusher = null;\n _decompressException = null;\n if (_isGzippedResponse) {\n PipedInputStream pi = new PipedInputStream(64*1024);\n PipedOutputStream po = new PipedOutputStream(pi);\n pusher = new I2PAppThread(new Gunzipper(pi, _out), \"EepGet Decompressor\");\n _out = po;\n pusher.start();\n }\n\n int remaining = (int)_bytesRemaining;\n byte buf[] = new byte[16*1024];\n while (_keepFetching && ( (remaining > 0) || !strictSize ) && !_aborted) {\n int toRead = buf.length;\n if (strictSize && toRead > remaining)\n toRead = remaining;\n int read = _proxyIn.read(buf, 0, toRead);\n if (read == -1)\n break;\n if (timeout != null)\n timeout.resetTimer();\n _out.write(buf, 0, read);\n _bytesTransferred += read;\n\n remaining -= read;\n if (remaining==0 && _encodingChunked) {\n int char1 = _proxyIn.read();\n if (char1 == '\\r') {\n int char2 = _proxyIn.read();\n if (char2 == '\\n') {\n remaining = (int) readChunkLength();\n } else {\n _out.write(char1);\n _out.write(char2);\n _bytesTransferred += 2;\n remaining -= 2;\n read += 2;\n }\n } else {\n _out.write(char1);\n _bytesTransferred++;\n remaining--;\n read++;\n }\n }\n if (timeout != null)\n timeout.resetTimer();\n if (_bytesRemaining >= read) // else chunked?\n _bytesRemaining -= read;\n if (read > 0) {\n for (int i = 0; i < _listeners.size(); i++) \n _listeners.get(i).bytesTransferred(\n _alreadyTransferred, \n read, \n _bytesTransferred, \n _encodingChunked?-1:_bytesRemaining, \n _url);\n // This seems necessary to properly resume a partial download into a stream,\n // as nothing else increments _alreadyTransferred, and there's no file length to check.\n // Do this after calling the listeners to keep the total correct\n _alreadyTransferred += read;\n }\n }\n \n if (_out != null)\n _out.close();\n _out = null;\n \n if (_isGzippedResponse) {\n try {\n pusher.join();\n } catch (InterruptedException ie) {}\n pusher = null;\n if (_decompressException != null) {\n // we can't resume from here\n _keepFetching = false;\n throw _decompressException;\n }\n }\n\n if (_aborted)\n throw new IOException(\"Timed out reading the HTTP data\");\n \n if (timeout != null)\n timeout.cancel();\n \n if (_transferFailed) {\n // 404, etc - transferFailed is called after all attempts fail, by fetch() above\n for (int i = 0; i < _listeners.size(); i++) \n _listeners.get(i).attemptFailed(_url, _bytesTransferred, _bytesRemaining, _currentAttempt, _numRetries, new Exception(\"Attempt failed\"));\n } else if ( (_bytesRemaining == -1) || (remaining == 0) ) {\n for (int i = 0; i < _listeners.size(); i++) \n _listeners.get(i).transferComplete(\n _alreadyTransferred, \n _bytesTransferred, \n _encodingChunked?-1:_bytesRemaining, \n _url, \n _outputFile, \n _notModified);\n } else {\n throw new IOException(\"Disconnection on attempt \" + _currentAttempt + \" after \" + _bytesTransferred);\n }\n }",
"@Override\n public int read(byte[] buffer, int size) throws IOException {\n if (inflater.getRemaining() == 0) {\n int bytesFed = (int) this.feedBuffer(getBufferCapacity());\n if (bytesFed == -1) {\n return -1;\n }\n inflater.setInput(this.internalBuffer, 0, bytesFed);\n }\n try {\n return inflater.inflate(buffer, 0, size);\n } catch (DataFormatException e) {\n throw new IOException(\"Can't decode Flate encoded data\", e);\n }\n }",
"public void setCompression( boolean compress ) {\n this .compression = compress;\n }",
"private String transform(InputStream isCswResponse)\n\t\t\tthrows TransformerException, IOException {\n\n\t\tStringWriter writer2Client = new StringWriter();\n\t\tInputStream isXslt = Catalog.class\n\t\t\t\t.getResourceAsStream(\"/response2client.xsl\"); //$NON-NLS-1$\n\n\t\tSource responseSource = new StreamSource(isCswResponse);\n\t\tSource xsltSource = new StreamSource(isXslt);\n\n\t\tTransformerFactory transFact = TransformerFactory.newInstance();\n\t\tTemplates template = transFact.newTemplates(xsltSource);\n\t\tTransformer transformer = template.newTransformer();\n\n\t\ttransformer.transform(responseSource, new StreamResult(writer2Client));\n\n\t\twriter2Client.flush();\n\t\twriter2Client.close();\n\n\t\tisXslt.close();\n\n\t\treturn writer2Client.toString();\n\t}",
"private void unCompress()\n\t{\n\t\ttry\n\t\t{\n\t\t\tbyte[] buffer = new byte[4096];\n\t\t\tint bytesIn;\n\t\t\tZipFile rfoFile = new ZipFile(path + fileName);\n\t\t\tEnumeration<? extends ZipEntry> allFiles = rfoFile.entries();\n\t\t\twhile(allFiles.hasMoreElements())\n\t\t\t{\n\t\t\t\tZipEntry ze = (ZipEntry)allFiles.nextElement();\n\t\t\t\tInputStream is = rfoFile.getInputStream(ze);\n\t\t\t\tString fName = processSeparators(ze.getName());\n\t\t\t\tFile element = new File(tempDir + fName);\n\t\t\t\torg.reprap.Main.ftd.add(element);\n\t\t\t\tFileOutputStream os = new FileOutputStream(element);\n\t\t\t\twhile((bytesIn = is.read(buffer)) != -1) \n\t\t\t\t\tos.write(buffer, 0, bytesIn);\n\t\t\t\tos.close();\n\t\t\t}\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tDebug.e(\"RFO.unCompress(): \" + e);\n\t\t}\n\t}",
"public InflaterInputStream(InputStream in, Inflater inf) {\n this(in, inf, 512);\n }",
"private static byte[] compress(final String str) throws IOException {\n if (str == null) {\n return null;\n }\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n try (GZIPOutputStream gzip = new GZIPOutputStream(outputStream)) {\n gzip.write(str.getBytes(StandardCharsets.UTF_8));\n }\n return outputStream.toByteArray();\n }",
"public Writer addGzipWriter(String id) throws IOException {\n\t\tGZIPOutputStream gzos = new GZIPOutputStream(outputStream);\n\t\trks.add(id + \"Stream\");\n\t\trvs.add(gzos);\n\t\tWriter w = new OutputStreamWriter(gzos, \"UTF-8\");\n\t\trks.add(id + \"Writer\");\n\t\trvs.add(w);\n\t\treturn w;\n\t}",
"private void nocompressedUnPack()throws UnpackException,ZipEndException{\n skipByte();\n //get the len\n long LEN = 0x00;\n byte byte0 = getByte();\n byte byte1 = getByte();\n byte byte2 = getByte();\n byte byte3 = getByte();\n LEN |= byte1;\n LEN |= (byte0 << 8);\n LEN &= 0X0000ffff;\n// LEN |= (byte2<<24);\n// LEN |= (byte3<<16);\n int l = 0;\n try{\n for (long num = 0; num < LEN ; num ++){\n outputStoredByte(getByte());\n }\n }catch (IOException e){\n e.printStackTrace();\n }\n }",
"public RestClientBuilder setCompressionEnabled(boolean compressionEnabled) {\n this.compressionEnabled = compressionEnabled;\n return this;\n }",
"@Override\r\n protected PreprocessedPageInfo buildPage(HttpServletRequest request, HttpServletResponse response, FilterChain chain)\r\n throws Exception {\n final ByteArrayOutputStream outstr = new ByteArrayOutputStream();\r\n GenericResponseWrapper wrapper = new GenericResponseWrapper(\r\n response, outstr);\r\n chain.doFilter(new CompressFreeHttpServletRequestWrapper(request), wrapper);\r\n wrapper.flush();\r\n\r\n Ehcache cache = getTargetCacheByRequest(request); \r\n long timeToLiveSeconds = cache.getCacheConfiguration().getTimeToLiveSeconds();\r\n\r\n String outputString = new String( outstr.toByteArray(), Charset.defaultCharset());\r\n\r\n // Create the page info\r\n PreprocessedPageInfo pageInfo = new PreprocessedPageInfo(wrapper.getStatus(), wrapper.getContentType(),\r\n wrapper.getCookies(), MutableCacheManager.getResponseForClient(outputString).getBytes(), true,\r\n timeToLiveSeconds, wrapper.getAllHeaders(), MutableCacheManager.getResponseForCache(outputString));\r\n\r\n final List<Header<? extends Serializable>> headers = pageInfo.getHeaders();\r\n\r\n //Remove any conflicting headers\r\n for (final Iterator<Header<? extends Serializable>> headerItr = headers.iterator(); headerItr.hasNext();) {\r\n final Header<? extends Serializable> header = headerItr.next();\r\n \r\n final String name = header.getName();\r\n if (\"Last-Modified\".equalsIgnoreCase(name) || \r\n \"Expires\".equalsIgnoreCase(name) || \r\n \"Cache-Control\".equalsIgnoreCase(name) || \r\n \"ETag\".equalsIgnoreCase(name)) {\r\n headerItr.remove();\r\n }\r\n }\r\n\r\n return pageInfo;\r\n }",
"private String compressString(String input) throws IOException {\n\t\tByteArrayOutputStream output = new ByteArrayOutputStream();\n\t\tGZIPOutputStream gzip = new GZIPOutputStream(output);\n\n\t\tgzip.write(input.getBytes(\"UTF-8\"));\n\t\tgzip.close();\n\t\toutput.close();\n\n\t\treturn Base64.encodeBase64String(output.toByteArray());\n\t}",
"@Override\r\n\tpublic void comprar() {\n\t\tsuper.comprar();\r\n\t}",
"public interface RawContentResponse {\n /**\n * Gets the input stream for the response.\n *\n * @return the input stream\n */\n Optional<String> getResponseBody();\n\n /**\n * Gets the state of the response.\n *\n * @return the response state\n */\n ResponseState getState();\n\n /**\n * Gets the type of error, if any.\n *\n * @return the error type, or {@link ErrorType#UNKNOWN} on a non-error\n */\n ErrorType getErrorType();\n\n /**\n * Gets the number of pages in the response.\n *\n * @return the page count, or absent if the endpoint isn't paginated\n */\n Optional<Integer> getPageCount();\n\n /**\n * Returns true if the server gave a deprecation warning during this request.\n *\n * @return true if route is deprecated\n */\n default boolean isDeprecated() {\n return false;\n }\n\n /**\n * Gets the ETag associated with this request.\n *\n * @return the ETag, optionally\n */\n default Optional<String> getETag() {\n return Optional.empty();\n }\n\n /**\n * Gets the date that the data in the response becomes expired.\n *\n * @return the expiry date\n */\n Optional<ZonedDateTime> getExpiryDate();\n\n static RawContentResponse.Builder builder() {\n return new Builder() {\n private final Response.ResponseBuilder responseBuilder = new Response.ResponseBuilder();\n\n private ResponseState state = ResponseState.SUCCESS;\n private ErrorType errorType = ErrorType.UNKNOWN;\n private boolean deprecated = false;\n private String etag = null;\n private ZonedDateTime expiryDate = null;\n\n @Override\n public Builder setState(final ResponseState state) {\n this.state = state;\n return this;\n }\n\n @Override\n public Builder setErrorType(final ErrorType errorType) {\n this.errorType = errorType;\n return this;\n }\n\n @Override\n public Builder setDeprecated(final boolean deprecated) {\n this.deprecated = deprecated;\n return this;\n }\n\n public Builder setETag(final String etag) {\n this.etag = etag;\n return this;\n }\n\n @Override\n public Builder setExpiryDate(final ZonedDateTime expiryDate) {\n this.expiryDate = expiryDate;\n return this;\n }\n\n @Override\n public Builder accumulate(final HttpResponseStatus status) {\n responseBuilder.accumulate(status);\n return this;\n }\n\n @Override\n public Builder accumulate(final HttpResponseHeaders headers) {\n responseBuilder.accumulate(headers);\n return this;\n }\n\n @Override\n public Builder accumulate(final HttpResponseBodyPart bodyPart) {\n responseBuilder.accumulate(bodyPart);\n return this;\n }\n\n @Override\n public RawContentResponse build() {\n return new Impl(responseBuilder.build(), state, errorType, deprecated, etag, expiryDate);\n }\n };\n }\n\n interface Builder {\n @SuppressWarnings(\"UnusedReturnValue\")\n Builder setState(ResponseState state);\n @SuppressWarnings(\"UnusedReturnValue\")\n Builder setErrorType(ErrorType errorType);\n @SuppressWarnings(\"UnusedReturnValue\")\n Builder setDeprecated(boolean deprecated);\n @SuppressWarnings(\"UnusedReturnValue\")\n Builder setETag(String etag);\n @SuppressWarnings(\"UnusedReturnValue\")\n Builder setExpiryDate(ZonedDateTime expiryDate);\n @SuppressWarnings(\"UnusedReturnValue\")\n Builder accumulate(final HttpResponseStatus status);\n @SuppressWarnings(\"UnusedReturnValue\")\n Builder accumulate(final HttpResponseHeaders headers);\n @SuppressWarnings(\"UnusedReturnValue\")\n Builder accumulate(final HttpResponseBodyPart bodyPart);\n RawContentResponse build();\n }\n\n class Impl implements RawContentResponse {\n private final Response response;\n private final ResponseState state;\n private final ErrorType errorType;\n private final boolean deprecated;\n private final String etag;\n private final ZonedDateTime expiryDate;\n\n private Impl(@Nullable Response response, ResponseState state, ErrorType errorType, final boolean deprecated, final String etag, final ZonedDateTime expiryDate) {\n this.response = response;\n this.state = state;\n this.errorType = errorType;\n this.deprecated = deprecated;\n this.etag = etag;\n this.expiryDate = expiryDate;\n }\n\n @Override\n public Optional<String> getResponseBody() {\n if (null == response) {\n return Optional.empty();\n }\n\n return Optional.ofNullable(response.getResponseBody());\n }\n\n @Override\n public ResponseState getState() {\n return state;\n }\n\n @Override\n public ErrorType getErrorType() {\n return errorType;\n }\n\n @Override\n public Optional<Integer> getPageCount() {\n if (null != response && response.getHeaders().contains(Constants.PAGE_COUNT_RESPONSE_HEADER)) {\n final String pageCount = response.getHeader(Constants.PAGE_COUNT_RESPONSE_HEADER);\n\n if (null != pageCount) {\n return Optional.of(Integer.valueOf(pageCount));\n }\n }\n return Optional.empty();\n }\n\n @Override\n public boolean isDeprecated() {\n return deprecated;\n }\n\n @Override\n public Optional<String> getETag() {\n return Optional.ofNullable(etag);\n }\n\n @Override\n public Optional<ZonedDateTime> getExpiryDate() {\n return Optional.ofNullable(expiryDate);\n }\n }\n}",
"private static byte[] transform(final URL url) throws Exception {\n String name = url.getPath();\n final int idx = name.lastIndexOf('/');\n if (idx >= 0) {\n name = name.substring(idx + 1);\n }\n final String[] nameVersionStr = DeployerUtils.extractNameVersionType(name);\n\n final Manifest manifest = new Manifest();\n manifest.getMainAttributes().putValue(\"Manifest-Version\", \"1.0\");\n manifest.getMainAttributes().putValue(Constants.BUNDLE_MANIFESTVERSION, \"2\");\n manifest.getMainAttributes().putValue(Constants.BUNDLE_SYMBOLICNAME, nameVersionStr[0]);\n manifest.getMainAttributes().putValue(Constants.BUNDLE_VERSION, nameVersionStr[1]);\n\n // Put content\n try (ByteArrayOutputStream os = new ByteArrayOutputStream(1024);\n JarOutputStream out = new JarOutputStream(os)) {\n\n ZipEntry e = new ZipEntry(JarFile.MANIFEST_NAME);\n out.putNextEntry(e);\n manifest.write(out);\n out.closeEntry();\n e = new ZipEntry(\"META-INF/\");\n out.putNextEntry(e);\n e = new ZipEntry(\"META-INF/\" + FEATURE_JSON_PATH + \"/\");\n out.putNextEntry(e);\n out.closeEntry();\n e = new ZipEntry(JSON_FEATURE_DESCRIPTOR_PATH);\n out.putNextEntry(e);\n try (InputStream fis = url.openStream()) {\n StreamUtils.copy(fis, out);\n }\n out.closeEntry();\n out.close();\n return os.toByteArray();\n }\n }",
"static byte[] compressData(byte data[]) {\n\t\tif (data.length < 8) {\n\t\t\treturn (data);\n\t\t} // Too short to compress effectively...\n\t\ttry {\n\t\t\t// Make a buffer; data expansion is unusual except for short inputs.\n\t\t\tfinal ByteArrayOutputStream baos = new ByteArrayOutputStream(\n\t\t\t\t\tMath.max(data.length, 32));\n\t\t\tfinal DefOutputStream cos = new DefOutputStream(baos);\n\t\t\t// Write uncompressed data to stream.\n\t\t\tcos.write(data);\n\t\t\t// Force everything out...\n\t\t\tcos.finish();\n\t\t\tcos.flush();\n\t\t\t// Maybe we should strip some other headers too?\n\t\t\treturn (baos.toByteArray());\n\t\t} catch (IOException e) {\n\t\t\t// Should never happen...\n\t\t\tthrow new Error(\"unexpected internal error\");\n\t\t}\n\t}",
"public boolean isCompressed() {\n byte[] data = packet.getData();\n int magic = ((int)(data[1] & 0xff) << 8) | (int)(data[0] & 0xff);\n return magic == GZIPInputStream.GZIP_MAGIC;\n }",
"void onUnzipCompleted(String output);",
"@Override\n public Single<StreamingHttpResponse> handle(HttpServiceContext ctx,\n StreamingHttpRequest request,\n StreamingHttpResponseFactory responseFactory) {\n request.context().put(CLIENT_CTX, request.headers().get(header(CLIENT_CTX)));\n request.context().put(CLIENT_FILTER_OUT_CTX, request.headers().get(header(CLIENT_FILTER_OUT_CTX)));\n // Set server-side values:\n request.context().put(SERVER_FILTER_IN_CTX, value(SERVER_FILTER_IN_CTX));\n request.context().put(SERVER_FILTER_IN_TRAILER_CTX, value(SERVER_FILTER_IN_TRAILER_CTX));\n return delegate().handle(ctx, request, responseFactory).map(response -> {\n HttpHeaders headers = response.headers();\n // Take the first two values from context:\n headers.set(header(SERVER_FILTER_IN_CTX),\n requireNonNull(response.context().get(SERVER_FILTER_IN_CTX)));\n headers.set(header(SERVER_CTX), requireNonNull(response.context().get(SERVER_CTX)));\n // Set the last value explicitly:\n assertThat(response.context().containsKey(SERVER_FILTER_OUT_CTX), is(false));\n headers.set(header(SERVER_FILTER_OUT_CTX), value(SERVER_FILTER_OUT_CTX));\n\n // For Trailers-Only response put everything into headers:\n if (headers.contains(GRPC_STATUS)) {\n setTrailers(response.context(), headers);\n return response;\n }\n return response.transform(new StatelessTrailersTransformer<Buffer>() {\n @Override\n protected HttpHeaders payloadComplete(HttpHeaders trailers) {\n setTrailers(response.context(), trailers);\n return trailers;\n }\n });\n });\n }",
"public static byte[] compressBytes(byte[] data) {\n\t\t\tDeflater deflater = new Deflater();\n\t\t\tdeflater.setInput(data);\n\t\t\tdeflater.finish();\n\t\t\tByteArrayOutputStream outputStream = new ByteArrayOutputStream(data.length);\n\t\t\tbyte[] buffer = new byte[1024];\n\t\t\twhile (!deflater.finished()) {\n\t\t\t\tint count = deflater.deflate(buffer);\n\t\t\t\toutputStream.write(buffer, 0, count);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\toutputStream.close();\n\t\t\t} catch (IOException e) {\n\t\t\t}\n\t\t\tSystem.out.println(\"Compressed Image Byte Size - \" + outputStream.toByteArray().length);\n\t\t\treturn outputStream.toByteArray();\n\t\t}",
"public static void compress(InputStream fins, OutputStream outs) {\n int value = 1;\n byte[] pattern = new byte[0];\n byte[] byteArray = new byte[8192];\n boolean isEmpty = true;\n Map<Byte, byte[]> dictionary = new TreeMap<>();\n boolean patternAlreadyExist;\n int numberOfBytesRead;\n\n try {\n // While the end of file is not reached.\n while ((numberOfBytesRead = fins.read(byteArray)) != -1) {\n for (int i = 0; i < numberOfBytesRead; i++) {\n //Compress the stream if the dictionary size exceeds 127,\n // and construct a new dictionary\n if (dictionary.size() == Byte.MAX_VALUE) {\n if (!isEmpty) {\n dictionary.put((byte) value, pattern);\n }\n compressStream(dictionary, outs);\n dictionary.clear();\n value = 1;\n }\n\n // Read pattern corresponding to an array of bytes.\n byte[] temp = Util.mergeBytes(pattern, byteArray[i]);\n pattern = temp;\n patternAlreadyExist = doesPatternExist(dictionary, pattern);\n\n // Add the pattern to the dictionary if its doesn't exist.\n if (!patternAlreadyExist) {\n dictionary.put((byte) value, pattern.clone());\n value++;\n pattern = new byte[0];\n isEmpty = true;\n\n // If it already exists, read the next byte in the IS\n } else {\n isEmpty = false;\n continue;\n }\n }\n }\n\n // Insert the pattern in the dictionary if the end of the file is\n // reached and the pattern already exist.\n if (!isEmpty) {\n dictionary.put((byte) value, pattern.clone());\n }\n compressStream(dictionary, outs);\n outs.close();\n } catch (IOException e) {\n System.err.println(\"An error happened while decompressing.\");\n }\n }",
"@Override\n default ManagerPrx ice_compress(boolean co)\n {\n return (ManagerPrx)_ice_compress(co);\n }",
"private Response<Bitmap> doParse(NetworkResponse response) {\n byte[] data = response.data;\n Bitmap bitmap;\n bitmap = ImageUtils.zipBitmap(data, mMaxWidth, mMaxHeight, mScaleType, mDecodeConfig);\n\n if (bitmap == null) {\n return Response.error(new ParseError(response));\n } else {\n return Response.success(bitmap, HttpHeaderParser.parseCacheHeaders(response));\n }\n }",
"@Override\n public File compress() throws Exception\n {\n File dest = File.createTempFile(\"TMP\",\".tar.gz\");\n FileOutputStream fos = new FileOutputStream( dest );\n BufferedOutputStream bos = new BufferedOutputStream(fos);\n TarOutputStream out = new TarOutputStream(bos);\n tarFolder( null, folder.getAbsolutePath(), out );\n out.close();\n return dest;\n }",
"public Compressor() {\n initCompressor(getDefaultSolenoidModule());\n }",
"@Override\n public JsonElement serialize(FrontPageContentResponse src, Type typeOfSrc, JsonSerializationContext context) {\n\treturn null;\n }",
"@Override\n default UserpostPrx ice_compress(boolean co)\n {\n return (UserpostPrx)_ice_compress(co);\n }",
"private void encodeIntoResponse(ServletResponse resp, BigInteger[] factors) {\n\r\n }",
"@Override\n\t\tprotected void prepareResponse(HttpServletResponse response)\n\t\t\t\tthrows IOException {\n\n\t\t}",
"private static @Nonnull byte[] compress(@Nonnull final byte[] repBytes) {\n final ByteArrayOutputStream baos = new ByteArrayOutputStream();\n try (OutputStream compos = new GZIPOutputStream(baos)) {\n compos.write(repBytes);\n } catch (final IOException e) {\n log.error(\"can not construct compressed representation: {}\", e);\n }\n return baos.toByteArray();\n }",
"private static String paseResponse(HttpResponse response) {\n\t\tHttpEntity entity = response.getEntity();\n\t\t\n//\t\tlog.info(\"response status: \" + response.getStatusLine());\n\t\tString charset = EntityUtils.getContentCharSet(entity);\n//\t\tlog.info(charset);\n\t\t\n\t\tString body = null;\n\t\ttry {\n if (entity != null) { \n InputStream instreams = entity.getContent(); \n body = convertStreamToString(instreams); \n// System.out.println(\"result:\" + body);\n } \n//\t\t\tlog.info(body);\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn body;\n\t}",
"public CompressionInputStream(InputStream in) {\n super(in);\n }",
"private void initForReadableEndpoints() {\n // clear content type\n response.setContentType(null);\n }",
"boolean hasChunkResponse();",
"@Test\n public void testDecompressWithoutPrefix() throws Exception {\n\n Path outputDir =\n new CompressedTarFunction() {\n @Override\n protected InputStream getDecompressorStream(DecompressorDescriptor descriptor)\n throws IOException {\n return new GZIPInputStream(new FileInputStream(descriptor.archivePath().getPathFile()));\n }\n }.decompress(descriptorBuilder.build());\n\n assertOutputFiles(outputDir.getRelative(ROOT_FOLDER_NAME).getRelative(INNER_FOLDER_NAME));\n }",
"private void processResponse(byte[] bResponse, long startTime, long endTime, BaseRequest request, String message, int httpCode, Headers headers) {\n BaseResponse response = request.getResponse();\n try {\n if (response == null) {\n // Get response header information\n String contentType = headers.get(\"ContentType\");\n if (StringUtils.isBlank(contentType)) {\n contentType = \"\";\n }\n response = TankHttpUtil.newResponseObject(contentType);\n request.setResponse(response);\n }\n\n // Get response detail information\n response.setHttpMessage(message);\n response.setHttpCode(httpCode);\n\n // Get response header information\n for (String key : headers.names()) {\n response.setHeader(key, headers.get(key));\n }\n\n if (((CookieManager) okHttpClient.getCookieHandler()).getCookieStore().getCookies() != null) {\n for (HttpCookie cookie : ((CookieManager) okHttpClient.getCookieHandler()).getCookieStore().getCookies()) {\n // System.out.println(\"in processResponse-getCookies\");\n // System.out.println(cookie.toString());\n response.setCookie(cookie.getName(), cookie.getValue());\n }\n }\n\n response.setResponseTime(endTime - startTime);\n String contentType = response.getHttpHeader(\"Content-Type\");\n String contentEncode = response.getHttpHeader(\"Content-Encoding\");\n if (BaseResponse.isDataType(contentType) && contentEncode != null && contentEncode.toLowerCase().contains(\"gzip\")) {\n // decode gzip for data types\n try {\n GZIPInputStream in = new GZIPInputStream(new ByteArrayInputStream(bResponse));\n ByteArrayOutputStream out = new ByteArrayOutputStream();\n IOUtils.copy(in, out);\n bResponse = out.toByteArray();\n } catch (Exception e) {\n LOG.warn(request.getLogUtil().getLogMessage(\"cannot decode gzip stream: \" + e, LogEventType.System));\n }\n }\n response.setResponseBody(bResponse);\n\n } catch (Exception ex) {\n LOG.warn(\"Unable to get response: \" + ex.getMessage());\n } finally {\n response.logResponse();\n }\n }",
"@Override\n protected WebMap.Info getInfoFromPath(String prepath,\n\t\t\t\t\t String epath,\n\t\t\t\t\t String query,\n\t\t\t\t\t String fragment,\n\t\t\t\t\t WebMap.RequestInfo requestInfo)\n {\n\t// System.out.format(\"prepath = \\\"%s\\\"\\n\", prepath);\n\t// System.out.format(\"epath = \\\"%s\\\"\\n\", epath);\n\ttry {\n\t InputStream is = null;\n\t long length = -1;\n\t String mimeType = null;\n\t boolean compress = false;\n\t if (zipfile != null) {\n\t\tif (epath.startsWith(\"/\")) {\n\t\t epath = epath.substring(1);\n\t\t}\n\t\tif (epath.endsWith(\"/\") || epath.length() == 0) {\n\t\t // System.out.println(\"prepath = \" + prepath);\n\t\t // System.out.println(\"epath = \" + epath);\n\t\t if (getDisplayDir() == false) return null;\n\t\t return EjwsUtilities.printHtmlDir(zipfile, prepath, null,\n\t\t\t\t\t\t epath, \"UTF-8\", this);\n\t\t} else {\n\t\t ZipEntry ze = zipfile.getEntry(epath);\n\t\t if (ze == null) {\n\t\t\tfor (String ep: gzipPaths(epath)) {\n\t\t\t ze = zipfile.getEntry(ep);\n\t\t\t if (ze != null) {\n\t\t\t\tcompress = true;\n\t\t\t\tbreak;\n\t\t\t }\n\t\t\t}\n\t\t }\n\t\t if (ze == null) return null;\n\n\t\t is = zipfile.getInputStream(ze);\n\t\t length = (int)ze.getSize();\n\t\t mimeType = getMimeType(epath);\n\t\t URI uri = new URI(null, null, epath, query, fragment);\n\t\t String name =\n\t\t\t\"jar:\" + rootURI.toString() + \"!/\"\n\t\t\t+ uri.toString();\n\t\t // System.out.println(\"name = \" + name);\n\t\t // new URL(\"jar:file:\" + rootURI.toString()\n\t\t //\t + \"!/\" + epath).toString();\n\t\t WebMap.Info result =\n\t\t\tnew WebMap.Info(is, length, mimeType, name);\n\t\t if (compress) {\n\t\t\tresult.setEncoding(\"gzip\");\n\t\t }\n\t\t return result;\n\t\t}\n\t }\n\t return null;\n\t} catch (IOException e) {\n\t return null;\n\t} catch (URISyntaxException ee) {\n\t return null;\n\t} catch (NullPointerException eee) {\n\t eee.printStackTrace();\n\t System.exit(1);\n\t return null;\n\t}\n }",
"public abstract String zza(Charset charset);",
"public static boolean isGZipped(InputStream in) { \r\n if (!in.markSupported()) { \r\n in = new BufferedInputStream(in); \r\n } \r\n in.mark(2); \r\n int magic = 0; \r\n try { \r\n magic = in.read() & 0xff | ((in.read() << 8) & 0xff00); \r\n in.reset(); \r\n } catch (IOException e) { \r\n e.printStackTrace(System.err); \r\n return false; \r\n } \r\n return magic == GZIPInputStream.GZIP_MAGIC; \r\n }",
"@Deprecated\n/* */ public void addCompression() {\n/* 162 */ List<COSName> filters = getFilters();\n/* 163 */ if (filters == null)\n/* */ {\n/* 165 */ if (this.stream.getLength() > 0L) {\n/* */ \n/* 167 */ OutputStream out = null;\n/* */ \n/* */ try {\n/* 170 */ byte[] bytes = IOUtils.toByteArray((InputStream)this.stream.createInputStream());\n/* 171 */ out = this.stream.createOutputStream((COSBase)COSName.FLATE_DECODE);\n/* 172 */ out.write(bytes);\n/* */ }\n/* 174 */ catch (IOException e) {\n/* */ \n/* */ \n/* 177 */ throw new RuntimeException(e);\n/* */ }\n/* */ finally {\n/* */ \n/* 181 */ IOUtils.closeQuietly(out);\n/* */ }\n/* */ \n/* */ } else {\n/* */ \n/* 186 */ filters = new ArrayList<COSName>();\n/* 187 */ filters.add(COSName.FLATE_DECODE);\n/* 188 */ setFilters(filters);\n/* */ } \n/* */ }\n/* */ }",
"Object visitorResponse();",
"private void _testSimple(ChunkDecoder decoder) throws IOException\n {\n byte[] orig = \"Another trivial test\".getBytes(\"UTF-8\");\n byte[] compressed = compress(orig);\n byte[] result = decoder.decode(compressed);\n Assert.assertEquals(result, orig);\n\n // also, ensure that offset, length are passed\n byte[] compressed2 = new byte[compressed.length + 4];\n System.arraycopy(compressed, 0, compressed2, 2, compressed.length);\n\n result = decoder.decode(compressed2, 2, compressed.length);\n Assert.assertEquals(result, orig);\n\n // two ways to do that as well:\n result = LZFDecoder.decode(compressed2, 2, compressed.length);\n Assert.assertEquals(result, orig);\n }",
"public static void Init()\n {\n _compressor = new Compressor();\n }",
"Builder addResponseTransformer(GlobalRequestTransformer transformer);",
"@Override\n protected Response<WeatherPOJO> parseNetworkResponse(NetworkResponse response) {\n try {\n // Convert the obtained byte[] into a String\n String json = new String(response.data, HttpHeaderParser.parseCharset(response.headers));\n // Use Gson to process the JSON string and return a WeatherPOJO object\n return Response.success(new Gson().fromJson(json, WeatherPOJO.class),\n HttpHeaderParser.parseCacheHeaders(response));\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n return null;\n }",
"public void setContentCompression(String method) {\n this.contentCompression = method;\n }",
"entities.Torrent.ChunkResponse getChunkResponse();"
]
| [
"0.635747",
"0.61234355",
"0.5974734",
"0.5891944",
"0.5817336",
"0.57226276",
"0.56778795",
"0.56004",
"0.5546635",
"0.5532003",
"0.5515078",
"0.55139065",
"0.5510591",
"0.5433853",
"0.5431205",
"0.5290378",
"0.52605754",
"0.5254241",
"0.5233543",
"0.5221271",
"0.52130604",
"0.5161242",
"0.50843674",
"0.50363946",
"0.50221497",
"0.50174147",
"0.5006403",
"0.49639204",
"0.49171272",
"0.49144325",
"0.4881285",
"0.4852487",
"0.4836124",
"0.48282364",
"0.48251632",
"0.48142368",
"0.48104757",
"0.47989872",
"0.47983092",
"0.47668636",
"0.47496504",
"0.47436997",
"0.47394893",
"0.4714987",
"0.46953815",
"0.46810395",
"0.46797127",
"0.4637355",
"0.46273723",
"0.46261436",
"0.46201956",
"0.4609276",
"0.4573775",
"0.45717785",
"0.4565644",
"0.45652813",
"0.45598918",
"0.45469844",
"0.45416883",
"0.45324305",
"0.45298198",
"0.45260277",
"0.45111337",
"0.45092592",
"0.4499617",
"0.4498705",
"0.4465162",
"0.4455803",
"0.4453026",
"0.44494188",
"0.44366977",
"0.44316894",
"0.44261134",
"0.44189778",
"0.4414181",
"0.4408752",
"0.4394176",
"0.43889263",
"0.43872228",
"0.43859333",
"0.43842402",
"0.43774173",
"0.4376125",
"0.43678492",
"0.43664545",
"0.4353508",
"0.43408298",
"0.43405652",
"0.43396705",
"0.4336243",
"0.43319783",
"0.43312398",
"0.43291104",
"0.43252704",
"0.43213046",
"0.43138802",
"0.43112606",
"0.42988053",
"0.42957538",
"0.42890605"
]
| 0.6788542 | 0 |
Build and return a useragent string that can identify this application to remote servers. Contains the package name and version code. | private static String buildUserAgent(Context context) {
try {
final PackageManager manager = context.getPackageManager();
final PackageInfo info = manager.getPackageInfo(
context.getPackageName(), 0);
// Some APIs require "(gzip)" in the user-agent string.
return info.packageName + "/" + info.versionName + " ("
+ info.versionCode + ") (gzip)";
} catch (NameNotFoundException e) {
return null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.lang.String getUserAgent() {\n java.lang.Object ref = userAgent_;\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 userAgent_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"private String createUserAgent() {\n String userAgentString = createUserAgentString();\n StringBuilder result = new StringBuilder();\n\n // Removing invalid characters\n for (int i = 0; i < userAgentString.length(); i++) {\n char c = userAgentString.charAt(i);\n if (c == '\\t' || ('\\u0020' <= c && c <= '\\u007e')) {\n result.append(c);\n }\n }\n return result.toString();\n }",
"public java.lang.String getUserAgent() {\n java.lang.Object ref = userAgent_;\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 userAgent_ = s;\n }\n return s;\n }\n }",
"String getUserAgent();",
"java.lang.String getUserAgent();",
"public String getUserAgent();",
"public static String getUserAgent()\n {\n return USER_AGENT;\n }",
"public static String userAgent() {\n Random random = new Random();\n return userAgents.get(random.nextInt(userAgents.size()));\n }",
"public java.lang.String getUserAgentVersion() {\n java.lang.Object ref = \"\";\n if (userAgentVersionTypeCase_ == 7) {\n ref = userAgentVersionType_;\n }\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 (userAgentVersionTypeCase_ == 7) {\n userAgentVersionType_ = s;\n }\n return s;\n }\n }",
"@java.lang.Override\n public java.lang.String getUserAgentVersion() {\n java.lang.Object ref = \"\";\n if (userAgentVersionTypeCase_ == 7) {\n ref = userAgentVersionType_;\n }\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 (userAgentVersionTypeCase_ == 7) {\n userAgentVersionType_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getPlayUserAgent() throws IOException {\n\t\t// Safe defaults from a Nexus 7 2012\n\t\tString vn = \"3.10.10\";\n\t\tString vc = \"8016010\";\n\t\ttry {\n\t\t\tvn = exec(\"dumpsys package com.android.vending | grep versionName\")\n\t\t\t\t\t.replace('\\n', ' ').trim().split(\"=\")[1];\n\t\t\tvc = exec(\"dumpsys package com.android.vending | grep versionCode\")\n\t\t\t\t\t.replace('\\n', ' ').trim().split(\"=\")[1];\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\t// Maybe a custom ROM?\n\t\t}\n\t\tObject[] args = { vn, vc, getSdkVersion(),\n\t\t\t\texec(\"getprop ro.product.device\").replace('\\n', ' ').trim(),\n\t\t\t\texec(\"getprop ro.hardware\").replace('\\n', ' ').trim(),\n\t\t\t\texec(\"getprop ro.build.product\").replace('\\n', ' ').trim(),\n\t\t\t\texec(\"getprop ro.build.id\").replace('\\n', ' ').trim(),\n\t\t\t\texec(\"getprop ro.build.type\").replace('\\n', ' ').trim() };\n\t\tMessageFormat ret = new MessageFormat(\n\t\t\t\t\"Android-Finsky/{0} (versionCode={1},sdk={2},device={3},hardware={4},product={5},build={6}:{7})\");\n\t\treturn ret.format(args);\n\t}",
"abstract String getUserAgent();",
"public com.google.protobuf.ByteString\n getUserAgentBytes() {\n java.lang.Object ref = userAgent_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n userAgent_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public String getUserAgent(){\n return this.userAgent;\n }",
"public com.google.protobuf.ByteString\n getUserAgentBytes() {\n java.lang.Object ref = userAgent_;\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 userAgent_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public String getUserAgent() {\n return userAgent;\n }",
"public final String getUserAgent() {\n return properties.get(USER_AGENT_PROPERTY);\n }",
"public static String m21385a() {\n return System.getProperty(\"http.agent\");\n }",
"public final String getUserAgent( ) {\r\n\t\treturn this.userAgent;\r\n\t}",
"public com.google.protobuf.ByteString\n getUserAgentVersionBytes() {\n java.lang.Object ref = \"\";\n if (userAgentVersionTypeCase_ == 7) {\n ref = userAgentVersionType_;\n }\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 if (userAgentVersionTypeCase_ == 7) {\n userAgentVersionType_ = b;\n }\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString\n getUserAgentVersionBytes() {\n java.lang.Object ref = \"\";\n if (userAgentVersionTypeCase_ == 7) {\n ref = userAgentVersionType_;\n }\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n if (userAgentVersionTypeCase_ == 7) {\n userAgentVersionType_ = b;\n }\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"com.google.protobuf.ByteString\n getUserAgentBytes();",
"public java.lang.String getUserAgentName() {\n java.lang.Object ref = userAgentName_;\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 userAgentName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"@java.lang.Override\n public java.lang.String getUserAgentName() {\n java.lang.Object ref = userAgentName_;\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 userAgentName_ = s;\n return s;\n }\n }",
"@Override\n\tpublic java.lang.String getUserAgent() {\n\t\treturn _userTracker.getUserAgent();\n\t}",
"private String getUserAgent(HTTPSampleResult sampleResult) {\n String res = sampleResult.getRequestHeaders();\n int index = res.indexOf(USER_AGENT);\n if (index >= 0) {\n // see HTTPHC3Impl#getConnectionHeaders\n // see HTTPHC4Impl#getConnectionHeaders\n // see HTTPJavaImpl#getConnectionHeaders\n //': ' is used by JMeter to fill-in requestHeaders, see getConnectionHeaders\n final String userAgentPrefix = USER_AGENT+\": \";\n String userAgentHdr = res.substring(\n index+userAgentPrefix.length(),\n res.indexOf('\\n',// '\\n' is used by JMeter to fill-in requestHeaders, see getConnectionHeaders\n index+userAgentPrefix.length()+1));\n return userAgentHdr.trim();\n } else {\n if (log.isInfoEnabled()) {\n log.info(\"No user agent extracted from requestHeaders:\" + res);\n }\n return null;\n }\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString\n getUserAgentNameBytes() {\n java.lang.Object ref = userAgentName_;\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 userAgentName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public static String getInterfaceName(){\r\n return getAppName()+\" \"+getAppVersion()+\" (\"+System.getProperty(\"java.vendor\")+\" \"+System.getProperty(\"java.version\")+\", \"+System.getProperty(\"os.name\")+\" \"+System.getProperty(\"os.version\")+\")\";\r\n }",
"public static String getDefaultUserAgent(){\n return sDefaultUserAgent;\n }",
"public void setUserAgent(String uaName, String version);",
"private static String getUserAgent() {\n return \"FBAndroidSDK\";\n }",
"public String getServerVersion();",
"protected String getUserAgent() {\n return null;\n }",
"@Override\r\n\tpublic String getUserAgent() {\n\t\treturn null;\r\n\t}",
"@java.lang.Override\n public io.envoyproxy.envoy.config.core.v3.BuildVersion getUserAgentBuildVersion() {\n if (userAgentBuildVersionBuilder_ == null) {\n if (userAgentVersionTypeCase_ == 8) {\n return (io.envoyproxy.envoy.config.core.v3.BuildVersion) userAgentVersionType_;\n }\n return io.envoyproxy.envoy.config.core.v3.BuildVersion.getDefaultInstance();\n } else {\n if (userAgentVersionTypeCase_ == 8) {\n return userAgentBuildVersionBuilder_.getMessage();\n }\n return io.envoyproxy.envoy.config.core.v3.BuildVersion.getDefaultInstance();\n }\n }",
"public static String getBuiltBy() {\r\n return getJarInfo(\"Built-By\");\r\n }",
"public com.google.protobuf.ByteString\n getUserAgentNameBytes() {\n java.lang.Object ref = userAgentName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n userAgentName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public String getAgentHost() {\n return (String)getAttributeInternal(AGENTHOST);\n }",
"public Builder setUserAgentVersion(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n userAgentVersionTypeCase_ = 7;\n userAgentVersionType_ = value;\n onChanged();\n return this;\n }",
"java.lang.String getApplicationVersion();",
"@java.lang.Override\n public io.envoyproxy.envoy.config.core.v3.BuildVersion getUserAgentBuildVersion() {\n if (userAgentVersionTypeCase_ == 8) {\n return (io.envoyproxy.envoy.config.core.v3.BuildVersion) userAgentVersionType_;\n }\n return io.envoyproxy.envoy.config.core.v3.BuildVersion.getDefaultInstance();\n }",
"java.lang.String getAgentMac();",
"public void setUserAgent(String userAgent){\n this.userAgent = userAgent;\n }",
"public Builder setUserAgent(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n userAgent_ = value;\n onChanged();\n return this;\n }",
"public io.envoyproxy.envoy.config.core.v3.BuildVersion.Builder getUserAgentBuildVersionBuilder() {\n return getUserAgentBuildVersionFieldBuilder().getBuilder();\n }",
"private String m5297b() {\n String str = \"\";\n try {\n return getPackageManager().getPackageInfo(getPackageName(), 0).versionName;\n } catch (NameNotFoundException e) {\n e.printStackTrace();\n return str;\n }\n }",
"protected String getOsVersion() {\n return \"\";\n }",
"public String getTargetOSVersion() {\n return targetOSVersion;\n }",
"public String getVendor() {\n\tSystem.out.println(\"MANIFEST_INFO: \"+MANIFEST_INFO);\n\treturn MANIFEST_INFO.getImplVendor();\n\t//return this.getClass().getPackage().getImplementationVendor();\n }",
"@AppNameInUserAgent\n public abstract String assertUserAgentAppName();",
"public static String getAppVersion() {\n \t\tif (props.containsKey(\"app.version\")) {\n \t\t\treturn props.getProperty(\"app.version\");\n \t\t} else {\n \t\t\treturn \"unspecified\";\n \t\t}\n \t}",
"public String mo1080a() {\n return \"1.2.7.19\";\n }",
"public String getUserAgentStub() {\n\t\treturn this.userAgentStub;\n\t}",
"private void resetUserAgent() {\n \tif (isExposeVersion()) {\n \t\tuserAgent = String.format(\"{0} ({1} {2})\", getUserAgentStub(), userAgentPostfix, version);\n \t} else {\n \t\tuserAgent = String.format(\"{0} ({1})\", getUserAgentStub(), userAgentPostfix);\n \t}\n\t}",
"String buildVersion();",
"java.lang.String getAppName();",
"java.lang.String getAppName();",
"java.lang.String getAppName();",
"@java.lang.Override\n public io.envoyproxy.envoy.config.core.v3.BuildVersionOrBuilder getUserAgentBuildVersionOrBuilder() {\n if ((userAgentVersionTypeCase_ == 8) && (userAgentBuildVersionBuilder_ != null)) {\n return userAgentBuildVersionBuilder_.getMessageOrBuilder();\n } else {\n if (userAgentVersionTypeCase_ == 8) {\n return (io.envoyproxy.envoy.config.core.v3.BuildVersion) userAgentVersionType_;\n }\n return io.envoyproxy.envoy.config.core.v3.BuildVersion.getDefaultInstance();\n }\n }",
"public String getServerVersion() throws IOException {\n\t\treturn Core.getServerVersion(getHttpMethodExecutor());\n\t}",
"@java.lang.Override\n public io.envoyproxy.envoy.config.core.v3.BuildVersionOrBuilder getUserAgentBuildVersionOrBuilder() {\n if (userAgentVersionTypeCase_ == 8) {\n return (io.envoyproxy.envoy.config.core.v3.BuildVersion) userAgentVersionType_;\n }\n return io.envoyproxy.envoy.config.core.v3.BuildVersion.getDefaultInstance();\n }",
"String getBrowser();",
"public String getStrappver() {\n return strappver;\n }",
"String version();",
"public String getOsVersion() {\n return osVersion;\n }",
"String offerVersion();",
"java.lang.String getOs();",
"synchronized public static AndroidUserAgent getUserAgent(Context context) {\n if (singleton == null) {\n String uid = getUniqueId(context);\n String platform = context.getString(R.string.platform);\n String packageName = context.getPackageName();\n PackageManager pm = context.getPackageManager();\n try {\n PackageInfo pi = pm.getPackageInfo(packageName, 0);\n String appName = context.getResources().getString(pi.applicationInfo.labelRes);\n String version = pi.versionName;\n singleton = new AndroidUserAgent(appName, version, packageName, uid, platform);\n } catch (Exception e) {\n Timber.e(e, e.getMessage());\n }\n }\n return singleton;\n }",
"public native static String getLameVersion();",
"public native static String getLameVersion();",
"public String getAppVersion() { return appVersion; }",
"public abstract String majorVersion();",
"public String getCopyrightAgent() {\n return (String)getAttributeInternal(COPYRIGHTAGENT);\n }",
"public java.lang.String getMinimumOsVersion() {\r\n return minimumOsVersion;\r\n }",
"public String getAppName();",
"String getOs();",
"public static String getAppVersion(){\r\n return getProperty(\"version\");\r\n }",
"@java.lang.Override\n public boolean hasUserAgentBuildVersion() {\n return userAgentVersionTypeCase_ == 8;\n }",
"private String getHttpVersion() {\n return (http11 ? \"HTTP/1.1\" : \"HTTP/1.0\");\n }",
"public static String getPackageVersion() {\n return mPackageName + \" V\" + mVersion + \" [\" + mBuildDate + \"]\";\n }",
"public String getClientMachine();",
"public Builder setUserAgentName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n userAgentName_ = value;\n onChanged();\n return this;\n }",
"@java.lang.Override\n public boolean hasUserAgentBuildVersion() {\n return userAgentVersionTypeCase_ == 8;\n }",
"public static String getOSInfo() {\n String os = System.getProperty(\"os.name\");\n String osVersion = System.getProperty(\"os.version\");\n String osArchitecture = System.getProperty(\"os.arch\");\n\n return \"OS Detection:\" + os + \",\" + osVersion + \",\" + osArchitecture;\n }",
"String getMetaServerAddress(Env targetEnv);",
"public static String getVersion() {\n if (version != null) {\n return version;\n }\n\n Package p = MCBouncer.class.getPackage();\n\n if (p == null) {\n p = Package.getPackage(\"com.mcbouncer\");\n }\n\n if (p == null) {\n version = \"(unknown)\";\n } else {\n version = p.getImplementationVersion();\n\n if (version == null) {\n version = \"(unknown)\";\n }\n }\n\n return version;\n }",
"public static String m21397c(Context context) {\n if (TextUtils.isEmpty(f16892c)) {\n try {\n f16892c = VERSION.SDK_INT >= 17 ? WebSettings.getDefaultUserAgent(context) : m21385a();\n } catch (Throwable unused) {\n f16892c = m21385a();\n }\n }\n return f16892c;\n }",
"public static String m21396c() {\n return Build.MANUFACTURER;\n }",
"public String version() throws CallError, InterruptedException {\n return (String)service.call(\"version\").get();\n }",
"public static void setUserAgent(String userAgent)\n {\n USER_AGENT = userAgent;\n }",
"public static String getImplementationVendor() {\r\n return getJarInfo(\"Implementation-Vendor\");\r\n }",
"public String getAppVersion() {\n return appVersion;\n }",
"private static String getVersion(Server server) {\n final String packageName = server.getClass().getPackage().getName();\n return packageName.substring(packageName.lastIndexOf('.') + 1);\n }",
"java.lang.String getAgentIP();",
"public static String getRuntimeMetadata() {\n StringBuilder s = new StringBuilder();\n String version;\n\n version = kotlinVersion();\n if (version != null) {\n s.append(\",kt=\").append(version);\n }\n\n version = scalaVersion();\n if (version != null) {\n s.append(\",sc=\").append(version);\n }\n\n version = clojureVersion();\n if (version != null) {\n s.append(\",clj=\").append(version);\n }\n\n version = groovyVersion();\n if (version != null) {\n s.append(\",gy=\").append(version);\n }\n\n version = jRubyVersion();\n if (version != null) {\n s.append(\",jrb=\").append(version);\n }\n\n return s.toString();\n }",
"String platform();",
"public static String getAppBuild() {\n \t\tif (props.containsKey(\"app.build\")) {\n \t\t\treturn props.getProperty(\"app.build\");\n \t\t} else {\n \t\t\treturn \"unspecified\";\n \t\t}\n \t}",
"@java.lang.Override\n public boolean hasUserAgentVersion() {\n return userAgentVersionTypeCase_ == 7;\n }",
"private String getRemoteVersion(String address) {\n\t\ttry {\n\t URL url = new URL(address);\n\t \n\t BufferedReader br = new BufferedReader(\n new InputStreamReader(url.openStream()));\n\t String inputLine;\n\t StringBuilder sb = new StringBuilder();\n\t while ((inputLine = br.readLine()) != null) {\n\t\t\t\tsb.append(inputLine);\n\t\t\t}\n\t br.close();\n\t return sb.toString();\n\t\t} catch (IOException ex) {\n\t\t\tLOG.error(\"Problem with accessing address {}\", address);\n\t\t\tLOG.error(\"exc\", ex);\n\t\t\treturn null;\n\t\t}\n }",
"public String getApp();"
]
| [
"0.6909344",
"0.6904488",
"0.68859947",
"0.6720294",
"0.67171043",
"0.65743077",
"0.6561993",
"0.6542531",
"0.6538336",
"0.65079635",
"0.6474109",
"0.6463705",
"0.64413124",
"0.6423798",
"0.6382271",
"0.637921",
"0.6266476",
"0.62613565",
"0.61267567",
"0.6114649",
"0.60984457",
"0.6041143",
"0.6009921",
"0.5998928",
"0.59405655",
"0.58406174",
"0.57058746",
"0.56795335",
"0.5678694",
"0.5662114",
"0.5654878",
"0.565378",
"0.56397396",
"0.56263006",
"0.55825776",
"0.5559922",
"0.55430335",
"0.5528869",
"0.5495901",
"0.5474479",
"0.5474176",
"0.5424467",
"0.53439486",
"0.5312588",
"0.5306389",
"0.53029734",
"0.52534205",
"0.5245707",
"0.5219221",
"0.52010065",
"0.51912594",
"0.5186631",
"0.51646125",
"0.5164603",
"0.5164114",
"0.5140936",
"0.5140936",
"0.5140936",
"0.5140386",
"0.51218504",
"0.51081216",
"0.5094228",
"0.5087081",
"0.5056049",
"0.50542754",
"0.5036833",
"0.50040895",
"0.49980128",
"0.4979178",
"0.4979178",
"0.49711022",
"0.4965473",
"0.49627334",
"0.4961547",
"0.49591064",
"0.49496484",
"0.4942632",
"0.4929599",
"0.49272972",
"0.49256533",
"0.49178994",
"0.4906988",
"0.49066016",
"0.48995578",
"0.48974815",
"0.48966122",
"0.48902687",
"0.48867223",
"0.4874327",
"0.48740447",
"0.48692447",
"0.4868721",
"0.48246518",
"0.48160976",
"0.48117042",
"0.4811427",
"0.4789928",
"0.47848356",
"0.47780734",
"0.47765037"
]
| 0.74517405 | 0 |
minimal constructor full constructor Property accessors | public String getTeid() {
return this.teid;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Property() {}",
"public Property() {\n this(0, 0, 0, 0);\n }",
"public Property()\r\n {\r\n }",
"private PropertyAccess() {\n\t\tsuper();\n\t}",
"private void __sep__Constructors__() {}",
"public Propuestas() {}",
"public Properties(){\n\n }",
"public Constructor(){\n\t\t\n\t}",
"private PropertySingleton(){}",
"Constructor() {\r\n\t\t \r\n\t }",
"private PropertyHolder() {\n }",
"private void addConstructors() {\n\t\tthis.rootBindingClass.getConstructor().body.line(\"super({}.class);\\n\", this.name.getTypeWithoutGenerics());\n\t\tGMethod constructor = this.rootBindingClass.getConstructor(this.name.get() + \" value\");\n\t\tconstructor.body.line(\"super({}.class);\", this.name.getTypeWithoutGenerics());\n\t\tconstructor.body.line(\"this.set(value);\");\n\t}",
"@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }",
"public Pojo1110110(){\r\n\t}",
"public Property() {\n\t\tcity=\"\";\n\t\towner=\"\";\n\t\tpropertyName=\"\";\n\t\trentAmount=0;\n\t\tplot= new Plot(0,0,1,1);\n\t}",
"public Clade() {}",
"public Property() {\r\n\t\tpositive = new String[] { \"fun\", \"happy\", \"positive\" };\r\n\t\tnegative = new String[] { \"sad\", \"bad\", \"angry\" };\r\n\t\tstop = new String[] { \"a\", \"an\", \"the\" };\r\n\t\tscoringmethod = 0;\r\n\t\tmindistance = 0.5;\r\n\t}",
"public EntityPropertyBean() {}",
"private ReadProperty()\r\n {\r\n\r\n }",
"defaultConstructor(){}",
"protected NodeProperties() {\r\n }",
"private PropertiesGetter() {\n // do nothing\n }",
"void DefaultConstructor(){}",
"public Member() {}",
"public Basic() {}",
"public Pasien() {\r\n }",
"public Identity()\n {\n super( Fields.ARGS );\n }",
"private PropertiesLoader() {\r\n\t\t// not instantiable\r\n\t}",
"public Field(){\n\n // this(\"\",\"\",\"\",\"\",\"\");\n }",
"public PropertyParser()\n\t{\n\t\tthis(System.getProperties());\n\t}",
"public ConstructorsDemo() \n\t {\n\t x = 5; // Set the initial value for the class attribute x\n\t }",
"public Person() {\n\t\t\n\t}",
"public Car () {\n\n Make = \"\";\n Model = \"\";\n Year = 2017;\n Price = 0.00;\n }",
"public Person(){\r\n\t\tsuper();\r\n\t}",
"public PSRelation()\n {\n }",
"private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}",
"public Plato(){\n\t\t\n\t}",
"public CustomerPolicyProperties() {\n }",
"public CyanSus() {\n\n }",
"public DPropertyElement() {\n super(null, null);\n }",
"public PropertySellerDetailDTO() {\n\n\t}",
"private PropertySetFactory() {}",
"public Customer()\n{\n this.firstName = \"noFName\";\n this.lastName = \"noLName\";\n this.address = \"noAddress\";\n this.phoneNumber = 0;\n this.emailAddress = \"noEmail\";\n \n}",
"private mxPropertiesManager()\n\t{\n\t}",
"public Potencial() {\r\n }",
"public Product() { }",
"public Product() { }",
"public Component() {\n }",
"public ComponentDescriptor() {\r\n\t\t// initialize empty collections\r\n\t\tconstructorParametersTypes = new LinkedList<List<Class<?>>>();\r\n//\t\trequiredProperties = new HashMap<String, MetaProperty>();\r\n//\t\toptionalProperties = new HashMap<String, MetaProperty>();\r\n\t}",
"public Individual()\r\n\t{\r\n\t}",
"public Property(String name) {\n super(SOME, NONE);\n this.name = name;\n }",
"public Student() {\n//\t\tname = \"\";\n//\t\tage = 0;\n\t\t\n\t\t\n\t\t//call constructors inside of other constructors\n\t\tthis(999,0);\n\t}",
"private DatabaseValidationProperties() {}",
"public Product() {}",
"public Property(Property p) {\r\n\t\tpositive = Arrays.copyOf(p.positive, p.positive.length);\r\n\t\tnegative = Arrays.copyOf(p.negative, p.negative.length);\r\n\t\tstop = Arrays.copyOf(p.stop, p.stop.length);\r\n\t\tscoringmethod = p.scoringmethod;\r\n\t\tmindistance = p.mindistance;\r\n\t}",
"public Properties() \r\n\t{\r\n\t\tsuper();\r\n\t\tthis.port = 1234;\r\n\t\tthis.ip = \"127.0.0.1\";\r\n\t}",
"public Member() {\r\n\t}",
"public Product() {\n\t}",
"@Test\n\tpublic static void testConstructorAndGetters() {\n\t\tMetalDTO m = new MetalDTO(1, 2, 3, 4.0, \"Name\", 3.7, 8.4);\n\t\tassertEquals(m.getAtomicMass(), 4.0, 0.01);\n\t\tassertEquals(m.getAtomicNumber(), 2);\n\t\tassertEquals(m.getDissolvedBy(), 3);\n\t\tassertEquals(m.getID(), 1);\n\t\tassertEquals(m.getName(), \"Name\");\n\t\tassertEquals(m.getMoles(), 3.7, 0.01);\n\t\tassertEquals(m.getMolesOfAcidToDissolve(), 8.4, 0.01);\n\t}",
"private SingleObject(){}",
"public Person() {}",
"protected Product() {\n\t\t\n\t}",
"public Person()\n\t{\n\t\tthis.age = -1;\n\t\tthis.name = \"Unknown\";\n\t}",
"public Cohete() {\n\n\t}",
"private PropertyReaderConverter() {\n // empty\n }",
"public Complex(){\r\n\t this(0,0);\r\n\t}",
"public Customer() {\n name = \"N.A.\";\n surname = \"N.A.\";\n address = \"N.A.\";\n email = \"N.A.\";\n }",
"public DimensionProperties() {\n }",
"@SuppressWarnings(\"unused\")\r\n\tprivate Person() {\r\n\t}",
"private DiffProperty() {\n\t\t// No implementation\n\t}",
"public PropertyCriteria() {\n\t\tsuper();\n\t}",
"public Person()\n {\n //intentionally left empty\n }",
"private SingleObject()\r\n {\r\n }",
"public Customer(){\n\t \n }",
"public Person() {\n\t\tname \t= \"\";\n\t\taddress = \"\";\n\t\tcity \t= \"\";\n\t\tage \t= 0;\n\t}",
"protected Product()\n\t{\n\t}",
"public Propiedad(){\n\t}",
"private TerminalProperties() {\n this(new TerminalPropertiesBuilder());\n }",
"private StaticProperty() {}",
"public Member() {\n //Empty constructor!\n }",
"public Car(){\n\t\t\n\t}",
"public Poem(){}",
"public Complex() {\n this(0);\n }",
"public Customer(){}",
"Member() {}",
"ConstructorPractice () {\n\t\tSystem.out.println(\"Default Constructor\");\n\t}",
"@SuppressWarnings(\"unused\")\n public Coordinate() {}",
"public Point()\n\t{ \n\t\t// Instantiate default properties\n\t\tx = 0;\n\t\ty = 0;\n\t}",
"@Test\n\tpublic static void testConstructorAndGetters() {\n\n\t\tCompoundMadeOfElement comp = new CompoundMadeOfElement(1, 2, 5);\n\t\tassertEquals(comp.getCompoundID(), 1);\n\t\tassertEquals(comp.getElementID(), 2);\n\t\tassertEquals(comp.getElementQuantity(), 5);\n\t}",
"public Car() {\r\n this(\"\", \"\", \"\", 0, Category.EMPTY, 0.00, \"\", 0, \"\", 0.00, \"\", DriveTrain.EMPTY,\r\n Aspiration.EMPTY, 0.00, 0.00, 0.00, 0.00, 0.0, 0.0, 0.0, 0.0, 0.0);\r\n }",
"public Overview() {\n\t\t// It will work whenever i create object with using no parameter const\n\t\tSystem.out.println(\"This is constructor\");\n\t}",
"private Converter()\n\t{\n\t\tsuper();\n\t}",
"private Value() {\n\t}",
"public Setting() {\n\t}",
"public AttributeDescriptorDTO()\n\t{\n\t\tsuper();\n\t}",
"public Vaccine() {\n\t}",
"public KeyVaultProperties() {\n }",
"public Product() {\n }",
"public Product() {\n }",
"public Property(int xLength, int yWidth, int xLeft, int yTop) {\n this(xLength, yWidth, xLeft, yTop, DEFAULT_REGNUM);\n }",
"public City() {\n\t}"
]
| [
"0.73289424",
"0.73047435",
"0.72857964",
"0.70668024",
"0.6991728",
"0.6978641",
"0.688696",
"0.68103564",
"0.67404914",
"0.6640894",
"0.6631651",
"0.654951",
"0.65166205",
"0.651238",
"0.6501782",
"0.6463848",
"0.6428599",
"0.64285725",
"0.642824",
"0.64140916",
"0.63180673",
"0.63089424",
"0.6293962",
"0.62909544",
"0.6285796",
"0.6282529",
"0.6266854",
"0.6265978",
"0.6250952",
"0.62449455",
"0.623523",
"0.62286484",
"0.6227652",
"0.6223536",
"0.6219694",
"0.6214176",
"0.62139934",
"0.62128603",
"0.62091863",
"0.62000513",
"0.6200012",
"0.6197199",
"0.61854583",
"0.6184646",
"0.61800414",
"0.61743766",
"0.61743766",
"0.61684555",
"0.6165362",
"0.6160866",
"0.6158765",
"0.61583537",
"0.6157137",
"0.6155673",
"0.6154724",
"0.61511457",
"0.6144193",
"0.6139644",
"0.6135088",
"0.61340016",
"0.6130456",
"0.6124653",
"0.6124066",
"0.6121569",
"0.6121558",
"0.6118367",
"0.61165065",
"0.61117643",
"0.61078566",
"0.61075443",
"0.6095159",
"0.6093494",
"0.60910285",
"0.60906565",
"0.6090545",
"0.60887593",
"0.6074544",
"0.60744923",
"0.6069462",
"0.60635275",
"0.6058647",
"0.60463357",
"0.604527",
"0.60430723",
"0.6042569",
"0.6041522",
"0.60344845",
"0.60330886",
"0.6028761",
"0.602645",
"0.6023998",
"0.60230607",
"0.6018344",
"0.6017928",
"0.6017829",
"0.6016517",
"0.60087603",
"0.6004605",
"0.6004605",
"0.59992546",
"0.59969556"
]
| 0.0 | -1 |
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 Personal)) {
return false;
}
Personal other = (Personal) object;
if ((this.idper == null && other.idper != null) || (this.idper != null && !this.idper.equals(other.idper))) {
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 |
return super.onCreateView(inflater, container, savedInstanceState); | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
mRoot = inflater.inflate(R.layout.fragment_train_list, container, false);
ButterKnife.inject(this, mRoot);
return mRoot;
// mLayoutManager = new LinearLayoutManager(this.getActivity());
/// mTrainList.setLayoutManager(mLayoutManager);
// return mRoot;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return super.onCreateView(inflater, container, savedInstanceState);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return super.onCreateView(inflater, container, savedInstanceState);\n }",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\treturn super.onCreateView(inflater, container, savedInstanceState);\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return super.onCreateView(inflater, container, savedInstanceState);\n }",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn super.onCreateView(inflater, container, savedInstanceState);\n\t}",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn super.onCreateView(inflater, container, savedInstanceState);\n\t}",
"@Override\n\tpublic View onCreateView(final LayoutInflater inflater, final ViewGroup container, final Bundle savedInstanceState) {\n\t\treturn super.onCreateView(inflater, container, savedInstanceState);\n\t}",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n \tthis.setRetainInstance(true);\n \treturn super.onCreateView(inflater, container, savedInstanceState);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n \n return this.view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = getThisView(inflater,container);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }",
"@Override\n public void onViewCreated(View view, Bundle savedInstanceState) {\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.activity_recetas, parent, false);\n }",
"@Override\n public void onViewCreated(View view, Bundle savedInstanceState) {\n }",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tLogUtil.d(TAG, \"onCreateView---------\");\n\t\tview = inflater.inflate(getContentViewId(),container,false);\n\t\tunbinder = ButterKnife.bind(this,view);\n\t\tinitView(savedInstanceState);\n\t\treturn view;\n\t}",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n\n\n view = inflater.inflate(LAYOUT, container, false);\n return view;\n }",
"@Override\n public void onViewCreated(View view , Bundle savedInstanceState) {\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\treturn inflater.inflate(R.layout.activity_main, container, false);\n }",
"@Override\n public void onViewCreate() {\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_main4, container, false);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_add_meals, container, false);\n return view;\n\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.activity_adddatacat, container, false);\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_sesion3, container, false);\n\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return initUiComponents(inflater, container);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.layoutview3, container, false);\n }",
"public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState) {\n return null;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_conta, container, false);\n\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return super.onCreateView(inflater, (ViewGroup) inflater.inflate(R.layout.fragment_display_good_detial, container, false), savedInstanceState);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }",
"@Override\n public View onCreateView(\n LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState\n ) {\n return inflater.inflate(R.layout.select_game, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n root = inflater.inflate(R.layout.activity_show3, container, false);\n return root;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }",
"@Override\n public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {\n }",
"@Override\r\n\tprotected void initViews(Bundle savedInstanceState) {\n\t\t\r\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n Log.d(TAG, \"onCreateView\");\n return inflater.inflate(R.layout.fragment_crime, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = super.onCreateView(inflater, container, savedInstanceState);\n unbinder = ButterKnife.bind(this, rootView);\n mLayoutInflater = inflater;\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n Log.d(LOG, \"Inflating...\");\n return inflater.inflate(R.layout.fragment_milk_adder, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n mView = inflater.inflate(R.layout.fragment_list_book, container, false);\n initViews();\n if(BuildConfig.enableDebugLogging) {\n Log.i(TAG, \"onCreateView\");\n }\n return mView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = super.onCreateView(inflater, container, savedInstanceState);\n unbinder=ButterKnife.bind(this, rootView);\n return rootView;\n }",
"@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n\r\n View v = inflater.inflate(R.layout.fragment_donor_dash, container, false);\r\n\r\n\r\n\r\n return v;\r\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n activity = (InitializeDineOrderActivity) getActivity();\n View view = inflater.inflate(R.layout.fragment_items_added_success, container, false);\n unbinder = ButterKnife.bind(this, view);\n //animate(imageView);\n return view;\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_coat_of_arms, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n {\n View rootView = super.onCreateView(inflater, container, savedInstanceState);\n unbinder = ButterKnife.bind(this, rootView);\n return rootView;\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\r\n\t\tView view = inflater.inflate(R.layout.frag_main_pak, container, false);\r\n\r\n\t\tinit(view);\r\n\t\t\r\n\t\t\r\n\t\treturn view;\r\n\r\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n parent_view = inflater.inflate(R.layout.fragment_medals, container, false);\n initComponent(parent_view);\n\n return parent_view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.folio_activity, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n return inflater.inflate(R.layout.frag_new_entries, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fg_movie, null);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.activity_post_property_screen, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n if (view == null) {\n view = inflater.inflate(R.layout.fragment_bao_yang_scx, container, false);\n unbinder = ButterKnife.bind(this, view);\n init();\n }\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = super.onCreateView(inflater, container, savedInstanceState);\n ButterKnife.inject(this, rootView);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = super.onCreateView(inflater, container, savedInstanceState);\n ButterKnife.inject(this, rootView);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = super.onCreateView(inflater, container, savedInstanceState);\n ButterKnife.inject(this, rootView);\n return rootView;\n }",
"@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n Fabric.with(getContext(), new Crashlytics());\r\n View view = inflater.inflate(R.layout.fragment_open_ticket_general_enquiries_department, container, false);\r\n unbinder = ButterKnife.bind(this, view);\r\n\r\n\r\n intialize();\r\n return view;\r\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tv = inflater.inflate(R.layout.wisata, container, false);\r\n \r\n\t\t\r\n\t\t\r\n\t\treturn v;\r\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_intro_ds, container, false);\n\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container , savedInstanceState);\n View rootView = inflater.inflate(R.layout.fragment_info_, container, false);\n //return inflater.inflate(R.layout.fragment_info_, container, false);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }",
"@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = super.onCreateView(inflater, container, savedInstanceState);\r\n unbinder = ButterKnife.bind(this, rootView);\r\n return rootView;\r\n }",
"@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = super.onCreateView(inflater, container, savedInstanceState);\r\n unbinder = ButterKnife.bind(this, rootView);\r\n return rootView;\r\n }",
"@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = super.onCreateView(inflater, container, savedInstanceState);\r\n unbinder = ButterKnife.bind(this, rootView);\r\n return rootView;\r\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.main_fragment, container, false);\n\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view= inflater.inflate(R.layout.fragment_votevents, container, false);\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n view = inflater.inflate(R.layout.layout_inventory_list, container, false);\n\n return view;\n }",
"@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_vicky, container, false);\r\n }",
"@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = super.onCreateView(inflater, container, savedInstanceState);\r\n ButterKnife.bind(this, rootView);\r\n return rootView;\r\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, final ViewGroup container,\n Bundle savedInstanceState) {\n\n\n return inflater.inflate(R.layout.fragment_splash, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.frag__tanding, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View view= inflater.inflate(R.layout.fragment_insect, container, false);\n\n return view;\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = super.onCreateView(inflater, container, savedInstanceState);\n unbinder2 = ButterKnife.bind(this, rootView);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = super.onCreateView(inflater, container, savedInstanceState);\n unbinder2 = ButterKnife.bind(this, rootView);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n View view = inflater.inflate(R.layout.fragment_guan_lxswei_shen, container, false);\n ButterKnife.bind(this, view);\n init();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_eatery_detail, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = super.onCreateView(inflater, container, savedInstanceState);\n unbinder1 = ButterKnife.bind(this, rootView);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = super.onCreateView(inflater, container, savedInstanceState);\n unbinder1 = ButterKnife.bind(this, rootView);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = super.onCreateView(inflater, container, savedInstanceState);\n unbinder = ButterKnife.bind(this, rootView);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = super.onCreateView(inflater, container, savedInstanceState);\n unbinder = ButterKnife.bind(this, rootView);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = super.onCreateView(inflater, container, savedInstanceState);\n unbinder = ButterKnife.bind(this, rootView);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = super.onCreateView(inflater, container, savedInstanceState);\n unbinder = ButterKnife.bind(this, rootView);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = super.onCreateView(inflater, container, savedInstanceState);\n unbinder = ButterKnife.bind(this, rootView);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = super.onCreateView(inflater, container, savedInstanceState);\n unbinder = ButterKnife.bind(this, rootView);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = super.onCreateView(inflater, container, savedInstanceState);\n unbinder = ButterKnife.bind(this, rootView);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = super.onCreateView(inflater, container, savedInstanceState);\n unbinder = ButterKnife.bind(this, rootView);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = super.onCreateView(inflater, container, savedInstanceState);\n unbinder = ButterKnife.bind(this, rootView);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = super.onCreateView(inflater, container, savedInstanceState);\n unbinder = ButterKnife.bind(this, rootView);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = super.onCreateView(inflater, container, savedInstanceState);\n unbinder = ButterKnife.bind(this, rootView);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = super.onCreateView(inflater, container, savedInstanceState);\n unbinder = ButterKnife.bind(this, rootView);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = super.onCreateView(inflater, container, savedInstanceState);\n unbinder = ButterKnife.bind(this, rootView);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = super.onCreateView(inflater, container, savedInstanceState);\n unbinder = ButterKnife.bind(this, rootView);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = super.onCreateView(inflater, container, savedInstanceState);\n unbinder = ButterKnife.bind(this, rootView);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = super.onCreateView(inflater, container, savedInstanceState);\n unbinder = ButterKnife.bind(this, rootView);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = super.onCreateView(inflater, container, savedInstanceState);\n unbinder = ButterKnife.bind(this, rootView);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = super.onCreateView(inflater, container, savedInstanceState);\n unbinder = ButterKnife.bind(this, rootView);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n mView=inflater.inflate(R.layout.fragment_map, container, false);\n return mView;\n }"
]
| [
"0.8520813",
"0.8520813",
"0.847007",
"0.8439895",
"0.82387525",
"0.82387525",
"0.82015836",
"0.81712425",
"0.8142262",
"0.81095177",
"0.80202746",
"0.7959163",
"0.79340607",
"0.791035",
"0.790481",
"0.7901562",
"0.78917783",
"0.7888019",
"0.7887485",
"0.7875566",
"0.7838798",
"0.782503",
"0.78034484",
"0.779693",
"0.7788811",
"0.77694637",
"0.77669305",
"0.7763698",
"0.7758987",
"0.77552456",
"0.7753443",
"0.7747924",
"0.7740381",
"0.7735951",
"0.77209795",
"0.7719046",
"0.7718476",
"0.77166873",
"0.7713199",
"0.77103513",
"0.77069014",
"0.7693021",
"0.76782256",
"0.7676591",
"0.7670587",
"0.76659244",
"0.7659797",
"0.7655986",
"0.76548433",
"0.7651506",
"0.7645863",
"0.7645669",
"0.76427597",
"0.76415145",
"0.76403344",
"0.76403344",
"0.76403344",
"0.7638121",
"0.76380795",
"0.7635857",
"0.7628827",
"0.7628506",
"0.76259506",
"0.7624694",
"0.761622",
"0.761622",
"0.761622",
"0.7613342",
"0.7611278",
"0.76101434",
"0.7600905",
"0.75991076",
"0.7597419",
"0.75968933",
"0.7589372",
"0.7587284",
"0.7586717",
"0.7586717",
"0.7585681",
"0.75848323",
"0.7582083",
"0.7582083",
"0.7571735",
"0.7571735",
"0.7571735",
"0.7571735",
"0.7571735",
"0.7571735",
"0.7571735",
"0.7571735",
"0.7571735",
"0.7571735",
"0.7571735",
"0.7571735",
"0.7571735",
"0.7571735",
"0.7571735",
"0.7571735",
"0.7571735",
"0.7571735",
"0.7568288"
]
| 0.0 | -1 |
Type your code here. | int main()
{
int a;
std::cin>>a;
int b=(a%10)+(a/1000);
std::cout<<b;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void generateCode()\n {\n \n }",
"@Override\r\n\tpublic void code() {\n\t\tus.code();\r\n\t\tSystem.out.println(\"我会java...\");\r\n\t}",
"CD withCode();",
"@Override\r\n\tpublic void code() {\n\t\tSystem.out.println(\"我会C语言....\");\r\n\t}",
"public void genCode(CodeFile code) {\n\t\t\n\t}",
"private void searchCode() {\n }",
"Code getCode();",
"public void generateCode() {\n new CodeGenerator(data).generateCode();\n }",
"public void code (String code) throws LuchthavenException\r\n\t{\r\n\t\tluchthaven.setCode(code);\r\n\t}",
"public abstract int code();",
"public void mo38117a() {\n }",
"public void Tyre() {\n\t\t\r\n\t}",
"@Override public boolean isCodeTask() { return true; }",
"String getCode();",
"String getCode();",
"String getCode();",
"String getCode();",
"String getCode();",
"public Code() {\n\t}",
"public void mo5382o() {\n }",
"public interface Code {\n //运行结果编号\n Integer getCode();\n //运行结果描述\n String getDescription();\n String toString();\n\n}",
"public abstract String getFullCode();",
"void setCode(String code);",
"abstract protected void pre(int code);",
"public void mo9848a() {\n }",
"public void gen(CodeSeq code, ICodeEnv env) {\n\r\n\t}",
"public static void main(String[] args) {\n\t// write your code here\n }",
"public void mo9241ay() {\n }",
"public void exec(PyObject code) {\n }",
"public static void main(String[] args) {\n\t\tBlockCode blockcode = new BlockCode();\n\t\t//blockcode.printName();\n\t\t\n\t\t}",
"java.lang.String getCode();",
"java.lang.String getCode();",
"public void generateCodeItemCode() {\n\t\tcodeItem.generateCodeItemCode();\n\t}",
"private void yy() {\n\n\t}",
"public void ganar() {\n // TODO implement here\n }",
"public void mo5248a() {\n }",
"public void mo3749d() {\n }",
"public void mo115188a() {\n }",
"public void mo21785J() {\n }",
"public static void main(String[] args) {\n\t\tSystem.out.print(\"This is added code\");\n\t\tSystem.out.print(\"This is added code from GitHub\");\n\n\t}",
"public interface CodeFormatter\n{\n}",
"@Override\n\tpublic void Coding() {\n\t\tBefore();\n\t\tcoder.Coding();\n\t\tEnd();\n\t}",
"public void mo97908d() {\n }",
"public void mo4359a() {\n }",
"@Override\n\tpublic void type() {\n\t\t\n\t}",
"public String getCode();",
"public String getCode();",
"public void mo12930a() {\n }",
"public void addToCode(String code){\r\n\t\tiCode+=getTabs()+code+\"\\n\";\r\n\t}",
"public void mo9233aH() {\n }",
"Programming(){\n\t}",
"public void mo21795T() {\n }",
"@Override\n\tpublic void orgasm() {\n\t\t\n\t}",
"public void createCode(){\n\t\tsc = animationScript.newSourceCode(new Coordinates(10, 60), \"sourceCode\",\r\n\t\t\t\t\t\t null, AnimProps.SC_PROPS);\r\n\t\t \r\n\t\t// Add the lines to the SourceCode object.\r\n\t\t// Line, name, indentation, display dealy\r\n\t\tsc.addCodeLine(\"1. Berechne für jede (aktive) Zeile und Spalte der Kostenmatrix\", null, 0, null); // 0\r\n\t\tsc.addCodeLine(\" die Differenz aus dem kleinsten (blau) und zweit-kleinsten (lila)\", null, 0, null);\r\n\t\tsc.addCodeLine(\" Element der entsprechenden Zeile/ Spalte.\", null, 0, null);\r\n\t\tsc.addCodeLine(\"2. Wähle die Zeile oder Spalte (grün) aus bei der sich die größte\", null, 0, null); \r\n\t\tsc.addCodeLine(\" Differenz (blau) ergab.\", null, 0, null);\r\n\t\tsc.addCodeLine(\"3. Das kleinste Element der entsprechenden Spalte\", null, 0, null); \r\n\t\tsc.addCodeLine(\" (bzw. Zeile) gibt nun die Stelle an, welche im\", null, 0, null);\r\n\t\tsc.addCodeLine(\" Transporttableau berechnet wird (blau).\", null, 0, null);\r\n\t\tsc.addCodeLine(\"4. Nun wird der kleinere Wert von Angebots- und\", null, 0, null); // 4\r\n\t\tsc.addCodeLine(\" Nachfragevektor im Tableau eingetragen.\", null, 0, null);\r\n\t\tsc.addCodeLine(\"5. Anschließend wird der eingetragene Wert von den Rändern\", null, 0, null); // 5\r\n\t\tsc.addCodeLine(\" abgezogen (mindestens einer muss 0 werden). \", null, 0, null);\r\n\t\tsc.addCodeLine(\"6. Ist nun der Wert im Nachfragevektor Null so markiere\", null, 0, null); // 6\r\n\t\tsc.addCodeLine(\" die entsprechende Spalte in der Kostenmatrix. Diese\", null, 0, null);\r\n\t\tsc.addCodeLine(\" wird nun nicht mehr beachtet (rot). Ist der Wert des\", null, 0, null);\r\n\t\tsc.addCodeLine(\" Angebotsvektors Null markiere die Zeile der Kostenmatrix.\", null, 0, null);\r\n\t\tsc.addCodeLine(\"7. Der Algorithmus wird beendet, falls lediglich eine Zeile oder\", null, 0, null); // 8\r\n\t\tsc.addCodeLine(\" Spalte der Kostenmatrix unmarkiert ist (eines reicht aus).\", null, 0, null);\r\n\t\tsc.addCodeLine(\"8 . Der entsprechenden Zeile bzw. Spalte im Transporttableau werden\", null, 0, null); // 9\t\t \r\n\t\tsc.addCodeLine(\" die restlichen Angebots- und Nachfragemengen zugeordnet.\", null, 0, null);\r\n\t\t\r\n\t}",
"public void mo21782G() {\n }",
"public void setCode(String code){\n\t\tthis.code = code;\n\t}",
"private List<String> runCode(JasminBytecode code) throws AssembleException {\n // Turn the Jasmin code into a (hopefully) working class file\n if (code == null) {\n throw new AssembleException(\"No valid Jasmin code to assemble\");\n }\n AssembledClass aClass = AssembledClass.assemble(code);\n // Run the class and return the output\n SandBox s = new SandBox();\n s.runClass(aClass);\n return s.getOutput();\n }",
"public void mo8738a() {\n }",
"public void mo44053a() {\n }",
"public void mo21791P() {\n }",
"public void mo6944a() {\n }",
"public void generateCode() {\n\t\tthis.setCharacter();\n\t}",
"public void setCode(String code)\n {\n this.code = code;\n }",
"public void mo3376r() {\n }",
"public void mo21789N() {\n }",
"int getCode();",
"int getCode();",
"int getCode();",
"public void mo5099c() {\n }",
"public void mo56167c() {\n }",
"public String CodeInterpreter() {\n\n\t\tString timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n\t\treturn \"DA\" + \"_\" + timeStamp;\n\t}",
"CodeType createCodeType();",
"public void mo55254a() {\n }",
"public static void main(String[] args) {\n // write your code here - this is called comment and it always starts with double slash\n // and comlier will ignore this because of the // sign.\n // I am gonna say hello\n // JAVA IS CASE SENSITIVE LANGUAGE\n // System and system are very different things in java\n //Hello AND hello are different for java\n // System.out.println(\"Hello Batch 15!\");\n // System.out.println(\"I am still here.\");\n // System.out.println(\"I love Java.\");\n\n // Write a program to display your information.\n // When you run it, it should have this outcome.\n // I am your name here\n // I am from batch 15\n // I am from your city here\n // I love Java\n\n System.out.println(\"I am Sevim.\");\n System.out.println(\"I am from Batch 15.\");\n System.out.println(\"I'm from New Jersey.\");\n System.out.println(\"I love Java.\");\n\n\n\n }",
"boolean hasCode();",
"boolean hasCode();",
"boolean hasCode();",
"@Deprecated\n\tprivate void oldCode()\n\t{\n\t}",
"CodeBlock createCodeBlock();",
"public static void main() {\n \n }",
"@Override\n\tpublic void compile(CodeBlock c, CompilerEnvironment environment) {\n\n\t}",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"Hello\");\r\n\t\tSystem.out.println(\" code\");\r\n\t\tSystem.out.println(\" added one more line of code\");\r\n\t\t;\r\n\r\n\t}",
"public void mo5097b() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void setCode(String code) {\n this.code = code;\n }",
"public void setCode(String code) {\n this.code = code;\n }",
"public void setCode(String code) {\n this.code = code;\n }",
"public void setCode(String code) {\n this.code = code;\n }",
"public void setCode(String code) {\n this.code = code;\n }",
"public void setCode(String code) {\n this.code = code;\n }",
"public void mo2740a() {\n }",
"public void mo21794S() {\n }",
"public void mo21779D() {\n }",
"public void setCode (String code) {\r\n\t\tthis.code = code;\r\n\t}",
"@Override\n protected void codeGenMain(DecacCompiler compiler, Registres regs, Pile p) {\n }"
]
| [
"0.69842434",
"0.665857",
"0.65043616",
"0.64650613",
"0.63898635",
"0.6277537",
"0.6139541",
"0.6012061",
"0.5984972",
"0.5979616",
"0.59751785",
"0.596551",
"0.5955566",
"0.59450895",
"0.59450895",
"0.59450895",
"0.59450895",
"0.59450895",
"0.5809104",
"0.57985586",
"0.5777725",
"0.57464784",
"0.5740305",
"0.5716604",
"0.56864303",
"0.5682408",
"0.56579745",
"0.5653926",
"0.56398976",
"0.5637711",
"0.56355214",
"0.56355214",
"0.5628492",
"0.5620271",
"0.561891",
"0.5618374",
"0.56167454",
"0.56150943",
"0.5610781",
"0.5594045",
"0.55925286",
"0.55870664",
"0.5581226",
"0.55671275",
"0.55666274",
"0.55653137",
"0.55653137",
"0.55625725",
"0.55622894",
"0.55609936",
"0.5559227",
"0.55516464",
"0.5551071",
"0.5547098",
"0.55405045",
"0.55380666",
"0.553792",
"0.5532347",
"0.55308056",
"0.5527823",
"0.55251664",
"0.5523652",
"0.552316",
"0.5522602",
"0.55124557",
"0.55112135",
"0.55112135",
"0.55112135",
"0.55075884",
"0.54989487",
"0.549723",
"0.54885614",
"0.5487294",
"0.54811233",
"0.54779404",
"0.54779404",
"0.54779404",
"0.5476039",
"0.5471641",
"0.5470106",
"0.5466424",
"0.5461605",
"0.54515743",
"0.5449883",
"0.5449883",
"0.5449883",
"0.5449883",
"0.5449883",
"0.5449883",
"0.5449883",
"0.54491556",
"0.54491556",
"0.54491556",
"0.54491556",
"0.54491556",
"0.54491556",
"0.5435008",
"0.54342437",
"0.5427511",
"0.5425906",
"0.5425692"
]
| 0.0 | -1 |
================================== Fim do Merge sorting===================== ===================== Inicio do QuickSort ============================== | public String[][] quickSort(String[][] arr, int inicio, int fim, int requiredData) { // Função que realiza
if (requiredData != 4) {
if (inicio < fim) {
int pivo;
pivo = Integer.parseInt(arr[fim][requiredData]); // Pivo ser� o ultimo de cada galho
int i = (inicio - 1);
for (int j = inicio; j <= fim - 1; j++) {
if (Integer.parseInt(arr[j][requiredData]) < pivo) {
i++;
String[] aux = arr[i];
arr[i] = arr[j];
arr[j] = aux;
}
}
String[] aux = arr[i + 1];
arr[i + 1] = arr[fim];
arr[fim] = aux;
int piAux = i + 1;
// Funcao recursiva para cada ramo da arvore
quickSort(arr, inicio, piAux - 1, requiredData);
quickSort(arr, piAux + 1, fim, requiredData);
return arr;
}
} else {
Collator collator = Collator.getInstance();
collator.setStrength(Collator.NO_DECOMPOSITION);
if (inicio < fim) {
String pivo = arr[fim][requiredData];
int i = (inicio - 1);
for (int j = inicio; j <= fim - 1; j++) {
if (collator.compare(pivo, arr[j][requiredData]) > 0) {
i++;
String[] aux = arr[i];
arr[i] = arr[j];
arr[j] = aux;
}
}
String[] aux = arr[i + 1];
arr[i + 1] = arr[fim];
arr[fim] = aux;
int piAux = i + 1;
// Funcao recursiva para cada ramo da arvore
quickSort(arr, inicio, piAux - 1, requiredData);
quickSort(arr, piAux + 1, fim, requiredData);
}
}
return arr;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void merge() {\n for (int i = low; i<high; i++){\n temparray[i]=nums[i];\n }\n\n int i = low;\n int j = middle;\n //index of the original array for which we are making compare\n int index = low;\n //copy the smallest from the left and right partition to temp\n while ((i<middle)&&(j<high)){\n if(temparray[i]<=temparray[j]){\n nums[index]=temparray[i];\n i++;\n }\n else {\n nums[index]=temparray[j];\n j++;\n }\n index++;\n }\n // copy the rest of the the left side\n while (i<middle){\n nums[index]= temparray[i];\n i++;\n index++;\n }\n //and the right\n while (j<high){\n nums[index]=temparray[j];\n j++;\n index++;\n }\n\n }",
"private void quickSort(int start, int end) {\n\t\tint pivot, i, j;\n\t\tif (start < end) {\n\t\t\t// Select first element as Pivot\n\t\t\tpivot = start;\n\t\t\ti = start;\n\t\t\tj = end;\n\n\t\t\t// Base condition\n\t\t\twhile (i < j) {\n\t\t\t\t// increment i till found greater element than pivot\n\t\t\t\tfor (i = start; i <= end; i++) {\n\t\t\t\t\tif (data.get(i) > data.get(pivot)) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// decrement j till found lesser element than pivot\n\t\t\t\tfor (j = end; j >= start; j--) {\n\t\t\t\t\tif (data.get(j) <= data.get(pivot)) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// if i<j than swap\n\t\t\t\tif (i < j) {\n\t\t\t\t\tswap(i, j);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// set pivot to jth element & move pivot to proper position\n\t\t\tswap(j, pivot);\n\n\t\t\t// Repeat for sub arrays\n\t\t\tquickSort(start, j - 1);\n\t\t\tquickSort(j + 1, end);\n\t\t}\n\t}",
"public void mergesort(int[] a, int startI, int endI) {\n\t\t\n\t\t//int si= a.length-1;\n\t\tint [] val = new int[1];\n\t\tint midPoint;\n\t\tlong heapSize = Runtime.getRuntime().totalMemory();\n\t\tlong heapFreeSize = Runtime.getRuntime().freeMemory(); \n\t\t//System.out.println(\"current heap size \"+heapsize);\n\t\tmidPoint = (endI+startI)/2; //midpoint for array\n\t\t\n\t\tif(heapFreeSize<1212015976)\n\t\tSystem.out.println(\"Start: \"+startI+\" End: \"+endI+\" Mid: \"+midPoint+\" current heap size \"+heapSize+\" current free heap \"+heapFreeSize);\n\t\tif (endI-startI < 1) {\n\t\t\tval[0]=a[startI];\n\t\t\t//System.out.println(\"returning \"+val[0]);\n\t\t\treturn ;\n\t\t}\n\t\t/*try\n\t\t{\n\t\t Thread.sleep(3000);\n\t\t}\n\t\tcatch(InterruptedException ex)\n\t\t{\n\t\t Thread.currentThread().interrupt();\n\t\t}*/\n\t\n\t\tmergesort(a, startI, midPoint); //split left\n\t\t\n\t\t\n\t\t//System.out.println(\"Start 2: \"+startI+\" End: \"+endI+\" Mid: \"+midPoint);\n\t\tmergesort(a, midPoint+1, endI);\t\t//split right\n\t\ttemp=mergeSortedArrays(a, startI, midPoint, midPoint+1, endI); //by defining positions in array, we are taking out array slices\n\t\t/*for (int i=0;i<temp.length;i++) {\n\t\t\ta[i]=temp[i];\n\t\t}*/\n\t\t/*System.out.println(\"Printing Temp=>\");\n\t\t\n\t\tfor (int i=0;i<temp.length;i++) {\n\t\t\tSystem.out.print(temp[i]+\", \");\n\t\t}\n\t\tSystem.out.println(\"\\n Printing A=>\");\n\t\t\n\t\tfor (int i=startI;i<endI;i++) {\n\t\t\tSystem.out.print(a[i]+\", \");\n\t\t}\n\t\tSystem.out.println(\"==>\");\n\t\treturn a;*/\n\t\t\n\t\t//System.out.println(\"==>\");\n\t\tint fill = startI;\n\t\tfor (int i=0;i<temp.length;i++) {\n\t\t\ta[fill]=temp[i];\n\t\t\tfill++;\n\t\t}\n\t\treturn ;\n\t}",
"private PerfectMergeSort() {}",
"private static void mergeAsc(int arr[], int start, int mid, int end) {\n\r\n\t\tint subArrLen1 = mid - start + 1;\r\n\t\tint subArrLen2 = end - mid;\r\n\r\n\t\t// create the sub Arrays as temporary storage\r\n\t\tint subArray1[] = new int[subArrLen1];\r\n\t\tint subArray2[] = new int[subArrLen2];\r\n\r\n\t\t// copy data in temporary arrays\r\n\r\n\t\tfor (int i = 0; i < subArrLen1; i++) {\r\n\t\t\tsubArray1[i] = arr[start + i];\r\n\t\t}\r\n\r\n\t\tfor (int i = 0; i < subArrLen2; i++) {\r\n\t\t\tsubArray2[i] = arr[mid + i + 1];\r\n\t\t}\r\n\r\n\t\t// merging the temporary arrays\r\n\r\n\t\tint i = 0, j = 0;\r\n\t\tint k = start;\r\n\r\n\t\twhile (i < subArrLen1 && j < subArrLen2) {\r\n\t\t\tif (subArray1[i] <= subArray2[j]) {\r\n\t\t\t\tarr[k] = subArray1[i];\r\n\t\t\t\ti++;\r\n\t\t\t} else {\r\n\t\t\t\tarr[k] = subArray2[j];\r\n\t\t\t\tj++;\r\n\t\t\t}\r\n\t\t\tk++;\r\n\r\n\t\t}\r\n\r\n\t\t// copy left over elements of subArray2[]\r\n\t\twhile (i < subArrLen1) {\r\n\t\t\tarr[k] = subArray1[i];\r\n\t\t\ti++;\r\n\t\t\tk++;\r\n\t\t}\r\n\r\n\t\t// copy left over elements of subArray2[]\r\n\t\twhile (j < subArrLen2) {\r\n\t\t\tarr[k] = subArray2[j];\r\n\t\t\tj++;\r\n\t\t\tk++;\r\n\t\t}\r\n\r\n\t}",
"private static <AnyType extends Comparable<? super AnyType>> void quicksort(AnyType[] a, int left, int right)\n {\n if(left + CUTOFF <= right)\n {\n AnyType pivot = median3(a, left, right);\n\n // Begin partitioning\n int i = left, j = right - 1;\n for( ; ; )\n {\n while(a[++i].compareTo(pivot) < 0);\n while(a[--j].compareTo(pivot) > 0);\n if(i < j)\n CommonFunc.swapReference(a, i, j);\n else\n break;\n }\n\n CommonFunc.swapReference(a, i, right - 1);\n\n quicksort(a, left, i - 1);\n quicksort(a, i + 1, right);\n }\n else // Do an insertion sort on the subarray\n Insertionsort.insertionsort(a, left, right);\n }",
"public static void intQSort(int v[], int l, int r) {\n\n int tmp; //tmp variable for swapping\n\n if (INSERTIONENABLED) {\n\n //Use insertion sort for arrays smaller than CUTOFF\n if (r < CUTOFF) {\n\n for(int i = l; i < r; i++) {\n for(int j = i; j > 0 && v[j - 1] > v[j]; j--) {\n // swap(j, j -1) {\n tmp=v[j - 1];\n v[j - 1]=v[j];\n v[j]=tmp;\n // }\n }\n }\n\n return;\n }\n }\n\n int pivot;\n int m = l + (int) (Math.random() * ((r - l) + 1)); // random number between first and last, Peto's remark\n\n //median(v[l], v[m], v[r]) {\n if (v[l] <= v[m]) {\n if (v[m] <= v[r])\n pivot = v[m];\n else {\n if (v[l] <= v[r])\n pivot = v[r];\n else\n pivot = v[l];\n }\n } else {\n if (v[m] <= v[r]) {\n if (v[l] <= v[r])\n pivot = v[l];\n else\n pivot = v[r];\n } \n else\n pivot = v[m];\n }\n // }\n\n int i=l,j=r;\n\n //Partioning\n while(i<=j) {\n\n while(v[i]<pivot) i++;\n while(v[j]>pivot) j--;\n\n if(i<=j) {\n //swap(i, j) {\n tmp=v[i];\n v[i]=v[j];\n v[j]=tmp;\n // }\n\n i++;\n j--;\n }\n }\n\n if(l<j) \n intQSort(v,l,j);\n\n if(i<r) \n intQSort(v,i,r);\n }",
"public static void main(String[] args) {\n String linesReadFileName = \"\"; // Input file name\n String MSWriteFileName = \"\"; // Output file name for the sorted data obtained using mergesort\n String QSWriteFileName = \"\"; // Output file name for the sorted data obtained using quicksort\n File linesReadFile; // Input file of unsorted lines used for both sorts\n File MSWriteFile; // Mergesort write file\n File QSWriteFile; // Quicksort write file\n linesReadFile = new File(linesReadFileName);\n String[] mergeSortLines = new String[MAX_LINES]; // List of lines to be sorted using mergesort\n String[] quickSortLines = new String[MAX_LINES]; // List of lines to be sorted using quicksort\n String[] temp = new String[MAX_LINES]; // Temporary array used in mergesort\n\n // Read the input file name from the console\n System.out.println(\"What is the name of your input file?\");\n Scanner consoleReader = new Scanner(System.in);\n linesReadFileName = consoleReader.nextLine();\n\n // Open the input file for reading and read in all of the lines\n try\n {\n linesReadFile = new File(linesReadFileName);\n Scanner linesScanner = new Scanner(linesReadFile);\n\n int i = 0; // Index used to add elements to the lines array in the loop\n while (linesScanner.hasNextLine() && i < MAX_LINES) // Either stop reading when the file runs out of lines or when we reach MAX_LINES lines\n {\n mergeSortLines[i] = linesScanner.nextLine();\n i++;\n }\n\n linesScanner.close();\n }\n catch (FileNotFoundException e)\n {\n System.out.println(\"Error opening input file.\");\n e.printStackTrace();\n }\n\n quickSortLines = mergeSortLines.clone(); // Copy the unsorted string list to be used for merge sort into the array to be used for quick sort\n\n // Read the output file names from the console\n System.out.println(\"What is the name of your output file for the data obtained using mergesort?\");\n consoleReader = new Scanner(System.in);\n MSWriteFileName = consoleReader.nextLine();\n\n System.out.println(\"What is the name of your output file for the data obtained using quicksort?\");\n consoleReader = new Scanner(System.in);\n QSWriteFileName = consoleReader.nextLine();\n\n // Perform the mergesort, obtain the start and end time of the algorithm\n long mergeSortBegin = System.nanoTime();\n mergeSort(mergeSortLines, 0, mergeSortLines.length - 1, temp);\n long mergeSortEnd = System.nanoTime();\n\n long mergeSortDuration = (mergeSortEnd - mergeSortBegin);\n System.out.println(\"Mergesort duration: \" + mergeSortDuration + \" nanoseconds\");\n\n // Perform the quicksort, obtain the start and end time of the algorithm\n long quickSortBegin = System.nanoTime();\n quickSort(quickSortLines, 0, quickSortLines.length - 1);\n long quickSortEnd = System.nanoTime();\n\n long quickSortDuration = (quickSortEnd - quickSortBegin);\n System.out.println(\"Quicksort Duration: \" + quickSortDuration + \" nanoseconds\");\n\n // Write the sorted data to separate text files\n writeSortedArrayToFile(mergeSortLines, mergeSortLines.length, MSWriteFileName);\n writeSortedArrayToFile(quickSortLines, quickSortLines.length, QSWriteFileName);\n\n }",
"private void mergeSort(int low, int high) {\n\t\tif (low < high) {\n\t\t\tint middle = low + (high - low) / 2;\n\t\t\tmergeSort(low, middle);\n\t\t\tmergeSort(middle + 1, high);\n\t\t\tmergeParts(low, middle, high);\n\t\t}\n\t}",
"public void merge(paintIntegers[] arr, int lidx, int midx, int ridx){\n int leftn = midx - lidx + 1;\n int rightn = ridx - midx;\n\n //instantiating the left and right arrays\n int Left[] = new int [leftn];\n int Right[] = new int [rightn];\n\n //copies the data from original to the left and right\n for (int i=0; i < leftn; ++i) {\n Left[i] = arr[lidx + i].val;\n }\n for (int j=0; j < rightn; ++j) {\n Right[j] = arr[midx + 1 + j].val;\n }\n\n //merges the two arrays and updates the original array\n //initializes leftIndex and rightIndex to iterate over the left and right arrays\n //if it is added to the original array, then where it came from, it would increment\n int leftIndex = 0;\n int rightIndex = 0;\n int k = lidx; //to properly align where the elements to go, left\n //System.out.println(k);\n //while it hasnt gone through all the elements in the left and right array\n //between the two arrays check which one is lowest, and then updates original array\n while (leftIndex < leftn && rightIndex < rightn)\n {\n if (Left[leftIndex] <= Right[rightIndex])\n {\n arr[k].val = Left[leftIndex];\n sorting.add(paintIntegers.deepCopy(arr));//adds current array to list\n leftIndex++;\n }\n else\n {\n arr[k].val = Right[rightIndex];\n sorting.add(paintIntegers.deepCopy(arr));//adds current array to list\n rightIndex++;\n }\n k++;\n }\n //if there are some left on the left array then just adds to original array\n //possible because all the elements in right array have been added\n //all thats left is the sorted elements from the left array\n while (leftIndex < leftn)\n {\n arr[k].val = Left[leftIndex];\n sorting.add(paintIntegers.deepCopy(arr));//adds current array to list\n leftIndex++;\n k++;\n }\n //same explanation as above but with the right array\n while (rightIndex < rightn)\n {\n arr[k].val = Right[rightIndex];\n sorting.add(paintIntegers.deepCopy(arr));//adds current array to list\n rightIndex++;\n k++;\n }\n }",
"public void mergeSort(){\r\n mergeSort(mArray, new int[mArray.length], 0 , mArray.length - 1);\r\n }",
"private static void mergeDesc(int arr[], int start,int mid, int end) {\n\r\n\t\t\t\tint subArrLen1 = mid - start + 1;\r\n\t\t\t\tint subArrLen2 = end - mid;\r\n\r\n\t\t\t\t// create the sub Arrays as temporary storage\r\n\t\t\t\tint subArray1[] = new int[subArrLen1];\r\n\t\t\t\tint subArray2[] = new int[subArrLen2];\r\n\r\n\t\t\t\t// copy data in temporary arrays\r\n\r\n\t\t\t\tfor (int i = 0; i < subArrLen1; i++) {\r\n\t\t\t\t\tsubArray1[i] = arr[start + i];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor (int i = 0; i < subArrLen2; i++) {\r\n\t\t\t\t\tsubArray2[i] = arr[mid + i + 1];\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// merging the temporary arrays\r\n\r\n\t\t\t\tint i = 0, j = 0;\r\n\t\t\t\tint k = start;\r\n\r\n\t\t\t\twhile (i < subArrLen1 && j < subArrLen2) {\r\n\t\t\t\t\tif (subArray1[i] > subArray2[j]) {\r\n\t\t\t\t\t\tarr[k] = subArray1[i];\r\n\t\t\t\t\t\ti++;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tarr[k] = subArray2[j];\r\n\t\t\t\t\t\tj++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tk++;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// copy left over elements of subArray2[]\r\n\t\t\t\twhile (i < subArrLen1) {\r\n\t\t\t\t\tarr[k] = subArray1[i];\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\tk++;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// copy left over elements of subArray2[]\r\n\t\t\t\twhile (j < subArrLen2) {\r\n\t\t\t\t\tarr[k] = subArray2[j];\r\n\t\t\t\t\tj++;\r\n\t\t\t\t\tk++;\r\n\t\t\t\t}\r\n\r\n\t}",
"public static void Mergesort(int[]data,int[]storageA,int[]storageB){\n int length=data.length;\n while (length>8){\n for(int i=0;i<data.length/2;i++){\n storageA[i]=data[i];\n }\n int index=0;\n for(int i=data.length/2;i<data.length;i++){\n storageB[index]=data[i];\n index++;\n }\n int[]temp1=new int[storageA.length/2];\n int[]temp2=new int[storageA.length-temp1.length];\n int[]temp3=new int[storageB.length/2];\n int[]temp4=new int[storageB.length-temp3.length];\n Mergesort(storageA,temp1,temp2);\n Mergesort(storageB,temp3,temp4);\n\n merge(data,storageA,storageB);\n // System.out.println(Arrays.toString(data));\n length=8;\n }\n insertion(data);\n\n // System.out.println(Arrays.toString(storageA));\n //System.out.println(Arrays.toString(storageB));\n //data=merge(storageA,storageB,0,1);\n }",
"public static void merge(int[] array, int start, int mid, int end) {\n if (array[mid - 1] <= array[mid]) {\n return;\n }\n\n // Index variables\n int i = start;\n int j = mid;\n int tempIndex = 0;\n\n // Create a temp array large enough to hold all elements in the left and right partitions\n int[] temp = new int[end - start];\n\n // While there are elements left in any of the left and right partitions...\n while (i < mid && j < end) {\n /* \n temp[tempIndex++] = array[i] <= array[j] ? array[i++] : array[j++];\n */\n // If the left element is smaller than or equal to the right...\n if (array[i] <= array[j]) {\n // Assign the left element to the temp array, and increment tempIndex and i\n temp[tempIndex++] = array[i++];\n } else {\n // Else assign the right element to the temp array, and increment tempIndex and j\n temp[tempIndex++] = array[j++];\n }\n }\n\n // At this point, either left or right partition will now be empty. \n // Then we simply merge the rest from another partition into temp array \n // as elements left are all larger than the largest elements in the temp array.\n /*\n System.arraycopy(src, srcPos, dest, destPos, length)\n src => source array\n srcPos => source index\n dest => destination array\n destPos => destination index\n */\n\n // Start at unhandled index of the left partition and copy over the rest of the elements\n // to the end of the array from index we've copied over to temp array so far.\n // If there are left over elements in the right partitions, they're already in the end of the array.\n // In the next step, we will be copying over the sorted and merged array from temp array \n // back to the original array, so the the beginning of the array is now sorted in the original array.\n System.arraycopy(array, i, array, start + tempIndex, mid - i);\n\n // Copy the elements in the temp array back into the original array\n System.arraycopy(temp, 0, array, start, tempIndex);\n }",
"private static void quicksort( Comparable [ ] a, int low, int high ) {\n if( low + CUTOFF > high )\n insertionSort( a, low, high );\n else {\n// Sort low, middle, high\n int middle = ( low + high ) / 2;\n if( a[ middle ].lessThan( a[ low ] ) )\n swapReferences( a, low, middle );\n if( a[ high ].lessThan( a[ low ] ) )\n swapReferences( a, low, high );\n if( a[ high ].lessThan( a[ middle ] ) )\n swapReferences( a, middle, high );\n// Place pivot at position high - 1\n swapReferences( a, middle, high - 1 );\n Comparable pivot = a[ high - 1 ];\n// Begin partitioning\n int i, j;\n for( i = low, j = high - 1; ; ) {\n while( a[ ++i ].lessThan( pivot ) );\n while( pivot.lessThan( a[ --j ] ) );\n if( i < j )\n swapReferences( a, i, j );\n else\n break;\n }\n// Restore pivot\n swapReferences( a, i, high - 1 );\n quicksort( a, low, i - 1 ); // Sort small elements\n quicksort( a, i + 1, high ); // Sort large elements\n }\n }",
"private void sort(int arr1[], int arr2[], int low, int high) {\n if (low < high) {\n /* index is partitioning index, arr[index] is\n now at right place */\n int index = partition(arr1, arr2, low, high);\n // Recursively sort elements before partition and after partition\n sort(arr1, arr2, low, index-1);\n sort(arr1, arr2, index+1, high);\n }\n }",
"private static void merge(int[] inputArray, int start, int mid, int end) {\n int tempArray [] = new int[end - start + 1]; //length of array\n\n // index counter for left side of Array\n int leftSlot = start;\n\n // index counter for right side of Array\n int rightSlot = mid + 1;\n\n // index for temp array\n int k = 0;\n\n while(leftSlot <= mid && rightSlot <= end){ //loop will run till left slot is less than mid value, and right slot is less than end index\n if(inputArray[leftSlot] < inputArray[rightSlot]){\n tempArray[k] = inputArray[leftSlot];\n leftSlot = leftSlot + 1; // incrementing the left slot\n }else {\n tempArray[k] = inputArray[rightSlot];\n rightSlot = rightSlot + 1; // incrementing the right slot\n }\n\n k = k+1; //need to increment the index of temp array so that value gets copied to correct place\n }\n\n /**\n * when it gets to here that means the above loop is completed and\n * both the left and right side of array are sorted\n */\n\n //there can be scenario that right array is sorted and left index is always less than right\n\n if(leftSlot <= mid){\n while(leftSlot <= mid){\n tempArray[k] = inputArray[leftSlot];\n leftSlot = leftSlot + 1;\n k = k + 1;\n }\n }else if(rightSlot <= end){\n while(rightSlot <= end){\n tempArray[k] = inputArray[rightSlot];\n rightSlot = rightSlot + 1;\n k = k + 1;\n }\n }\n for(int i=0;i< tempArray.length;i++){\n inputArray[start + i] = tempArray[i]; // copying back to original array\n }\n }",
"public void quicksort(int[] a, int start, int end){\n\t\tif(end <= start) return;\r\n\t\t//2 number\r\n//\t\tif(end - start == 1 && a[start] > a[end]){\r\n//\t\t\tswap(a, start, end);\r\n//\t\t\treturn;\r\n//\t\t}\r\n\t\tif((end - start )< 20){\r\n\t\t\tinsertSort(a, start,end);\r\n\t\t\treturn;\r\n\t\t}\r\n\t int pivot = getPivot(a, start, end);\r\n\t int i = start, j = end - 1;\r\n\t while(i < j){\r\n\t while(i < j && a[++i] < pivot);\r\n\t while(i < j && a[--j] > pivot);\r\n\t if(i < j)\r\n\t swap(a, i, j);\r\n\t }\r\n\t swap(a, i, end -1);\r\n\t quicksort(a, start, i - 1);\r\n\t quicksort(a, i + 1, end);\r\n\t}",
"void quickSort(int arr[], int low, int high) \n { \n if (low < high) \n { \n /* pi is partitioning index, arr[pi] is \n now at right place */\n int pi = partition(arr, low, high); \n \n // Recursively sort elements before \n // partition and after partition \n quickSort(arr, low, pi-1); \n quickSort(arr, pi+1, high); \n } \n }",
"private void sort(T[] arr, T[] temp, int lo, int hi) {\n if (lo >= hi) return; // we return if the size of the part equals 1\n int mid = lo + (hi - lo) / 2;\n sort(arr, temp, lo, mid); // sorting the left part\n sort(arr, temp, mid + 1, hi); // sorting the right part\n merge(arr, temp, lo, hi, mid); // merging two parts\n }",
"public void mergesort()\n { sort(this.heap, 0, heap.size()-1);\n }",
"static void mergeSort(int array[], int start, int end) {\n if (start < end) {\n // Find the middle point\n int middle = start + (end - start)/2;\n\n // Sort first and second parts\n mergeSort(array, start, middle);\n mergeSort(array, middle + 1, end);\n\n // Merge the sorted parts\n merge(array, start, middle, end);\n\n }\n\n }",
"static void quickSort (int a[], int lo, int hi){\n\t int i=lo, j=hi, h;\r\n\t int pivot=a[lo];\r\n\r\n\t // pembagian\r\n\t do{\r\n\t while (a[i]<pivot) i++;\r\n\t while (a[j]>pivot) j--;\r\n\t if (i<=j)\r\n\t {\r\n\t h=a[i]; a[i]=a[j]; a[j]=h;//tukar\r\n\t i++; j--;\r\n System.out.println(\"i = \"+i + \" j = \" + j);\r\n\t }\r\n\t } while (i<=j);\r\n\r\n\t // pengurutan\r\n\t if (lo<j) quickSort(a, lo, j);\r\n\t if (i<hi) quickSort(a, i, hi);\r\n\t }",
"public static void main(String[] args) {\n\r\n\t\tint [] array1 = {3,2,5,0,1};\r\n\t\tint [] array2 = {8,10,7,6,4};\r\n\t\tint [] array3= new int[array1.length+array2.length];\r\n\t\t\r\n\t\tint i=0,j=0;\r\n\t\t\r\n\t\twhile(i<array1.length){\r\n\t\t\tarray3[i]=array1[i];\r\n\t\t\ti++;\r\n\t\t}\r\n\t\t\r\n\t\twhile(j<array2.length){\r\n\t\t\tarray3[i]=array2[j];\r\n\t\t\ti++;\r\n\t\t\tj++;\r\n\t\t}\r\n\t\tQuickSort(array3,0,array3.length-1,false,false);\r\n\t\t\r\n\t}",
"public void quickSortHelper(int start, int end){\n if(start < end){\n //partition index calls partition that returns idx\n //and also puts toSort[partitionidx] in the right place\n int partitionidx = partition(start, end);\n\n //sorts elements before and after the partitions\n //recursive - nice\n //System.out.println(\"test\");\n quickSortHelper(start, partitionidx - 1); //befre\n quickSortHelper(partitionidx + 1, end); //after\n }\n }",
"private void merge_sort( ArrayList<Type> array, ArrayList<Type> auxillary, int low, int high ){\n\t\tif((high-low)>switchOff){\n\t\t\tint middle=low+((high-low)/2);\n\t\t\tmerge_sort(array,auxillary,low,middle);\n\t\t\tmerge_sort(array,auxillary,middle+1,high);\n\t\t\tcombine(array,auxillary,low,middle,high);\n\t\t}else{\n\t\t\tSort_Utils.insertion_sort(array, low, high);\n\t\t}\n\t}",
"public static void merge(int[] a, int[] temp, int low, int mid, int high) {\r\n // low is the low index of the part of the array to be sorted\r\n // high is the high index of the part of the array to be sorted\r\n // mid is the middle of the array – last item in low half\r\n\r\n // copy the two sets from a[] to the same locations in the temporary array\r\n for (int i = low; i <= high; i++) {\r\n temp[i] = a[i];\r\n }\r\n //set up necessary pointers\r\n int lowP = low; // pointer to current item in low half\r\n int highP = mid + 1; // pointer to current item in high half\r\n int aP = low; // pointer to where each item will be put back in a[]\r\n // while the pointers have not yet reached the end of either half\r\n while ((lowP <= mid) && (highP <= high)) {\r\n // if current item in low half <= current item in high half\r\n if (temp[lowP] <= temp[highP]) {\r\n // move item at lowP back to array a and increment low pointer\r\n a[aP] = temp[lowP];\r\n lowP++;\r\n } else {\r\n // move item at highP back to array a and increment high pointer\r\n a[aP] = temp[highP];\r\n highP++;\r\n } // end if..else\r\n\r\n // increment pointer for location in original array\r\n aP++;\r\n } // end while\r\n // if lowP is at end of low half, then low half is done, move rest of high half.\r\n if (lowP > mid) {\r\n for (int i = highP; i <= high; i++) {\r\n a[aP] = temp[i]; //\r\n aP++;\r\n } // end for\r\n } else // high half is done, move rest of low half\r\n {\r\n for (int i = lowP; i <= mid; i++) {\r\n a[aP] = temp[i];\r\n aP++;\r\n }// end for\r\n }\r\n//\r\n }",
"static void quickSort(int[] arr, int left, int right){\n int position = partition(arr, left, right);\n if(left<position){\n quickSort(arr,left,position);\n }\n if(position+1<right){\n quickSort(arr,position+1,right);\n }\n }",
"void merge(int []arr,int low, int mid, int high){\n int n1 = mid-low+1;\n int n2 = high-mid; //high - (mid+1)+1\n\n //create temp arrays\n int temp1[] = new int[n1];\n int temp2[] = new int[n2];\n\n //copy data to temp arrays\n for(int i=0;i<n1;i++){\n temp1[i] = arr[low+i];\n }\n for(int i=0;i<n2;i++){\n temp2[i] = arr[mid+1+i];\n }\n\n //Merge the temp arrays\n int i=0, j=0,k=low;\n while(i<n1 && j <n2){\n if(temp1[i]<temp2[j]){\n arr[k++] = temp1[i++];\n }else{\n arr[k++] = temp2[j++];\n }\n }\n\n //copy remaining elements\n while(i<n1){\n arr[k++]= temp1[i++];\n }\n while(j<n2){\n arr[k++] = temp2[j++];\n }\n }",
"public static void merge(int []a , int low,int mid,int high) {\n int [] helper = new int[a.length] ; \n for (int i = low; i<=high; i++) {\n helper[i] = a[i]; \n }\n\n int i = low;\n int j = mid + 1;\n int k = low;\n\n // combine the low part of a and its high part \n while (i<=mid && j<=high) {\n if (helper[i] >= helper[j]){\n a[k] = helper[i];\n i++;\n } else {\n a[k] = helper[j];\n j++;\n }\n k++;\n }\n\n // copy the rest of low part of a if there is any\n while (i<=mid) {\n a[k] = helper[i];\n i++; k++;\n }\n\n\n // copy the rest of the high part of a if there is any\n while (j<=high) {\n a[k] = helper[j];\n j++;k++;\n }\n\n // out put each time we sort and let you watch the change sequence\n for (int Item:a) {\n System.out.print(Item+\" \");\n }\n System.out.println();\n\n }",
"static void quickSort (double a[], int lo, int hi){\n int i=lo, j=hi;\r\n\t\tdouble h;\r\n double pivot=a[lo];\r\n\r\n // pembagian\r\n do{\r\n while (a[i]<pivot) i++;\r\n while (a[j]>pivot) j--;\r\n if (i<=j)\r\n {\r\n h=a[i]; a[i]=a[j]; a[j]=h;//tukar\r\n i++; j--;\r\n }\r\n } while (i<=j);\r\n\r\n // pengurutan\r\n if (lo<j) quickSort(a, lo, j);\r\n if (i<hi) quickSort(a, i, hi);\r\n }",
"static void mergesort(MappedByteBuffer A, MappedByteBuffer result, \r\n\t\t\tint start, int end) throws IOException {\r\n\r\n\t\tif (end - start < 8) { \r\n\t\t\treturn; \r\n\t\t}\r\n\r\n\t\tif (end - start == 8) {\r\n\t\t\tresult.position(start);\r\n\t\t\tint left = result.getInt();\r\n\t\t\tint right = result.getInt();\r\n\t\t\tif (left > right) {\r\n\t\t\t\tresult.position (start);\r\n\t\t\t\tresult.putInt (right);\r\n\t\t\t\tresult.putInt (left);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tint mid = (end + start)/8*4;\r\n\t\tmergesort (result, A, start, mid);\r\n\t\tmergesort (result, A, mid, end);\r\n\r\n\t\tresult.position(start);\r\n\t\tfor (int i = start, j = mid, idx=start; idx < end; idx += 4) {\r\n\t\t\tint Ai = A.getInt (i);\r\n\t\t\tint Aj = 0;\r\n\t\t\tif (j < end) { Aj = A.getInt (j); }\r\n\t\t\tif (j >= end || (i < mid && Ai < Aj)) { \r\n\t\t\t\tresult.putInt (Ai);\r\n\t\t\t\ti += 4;\r\n\t\t\t} else {\r\n\t\t\t\tresult.putInt (Aj);\r\n\t\t\t\tj += 4;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void sort() {\n Stack<Pair> stack = new Stack();\n //fill the stack\n Pair temp = new Pair(0, a.length);\n stack.push(temp);\n quickSort(stack,stack.peek().first, stack.peek().n);\n }",
"private static void quickSort(double arr[],Integer[] pageIDS, int low, int high)\n {\n if (low < high)\n {\n /* pi is partitioning index, arr[pi] is\n now at right place */\n int pi = partition(arr,pageIDS, low, high);\n\n // Recursively sort elements before\n // partition and after partition\n quickSort(arr, pageIDS, low, pi-1);\n quickSort(arr, pageIDS,pi+1, high);\n }\n }",
"private static void quickSortArray(int[] a, int startIndex, int endIndex) {\n\t\t\n\t\t\n\t\tif (startIndex<endIndex){\n\t\t\t\n\t\t\t// calculate the partitioned index\n\t\t\t\n\t\t\tint partitionIndex= partion(a, startIndex,endIndex);\n\t\t\t\n\t\t\tquickSortArray(a,startIndex,partitionIndex-1);\n\t\t\tquickSortArray(a,partitionIndex+1,endIndex);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public static void sort(String f1, String f2) throws FileNotFoundException, IOException {\n\t\tDataInputStream input = new DataInputStream(new BufferedInputStream(new FileInputStream(new File(f1))));\n\t\tfileSize = (int) input.available()/4;\n\t\tif (fileSize == 0){ input.close(); return;} //file is empty\t\n\t\t\n\t\tRandomAccessFile f1a = new RandomAccessFile(f1,\"rw\");\n\t\tRandomAccessFile f2a = new RandomAccessFile(f2,\"rw\");\n\t\tDataOutputStream f1d = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(f1a.getFD())));\n\t\tDataOutputStream f2d = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(f2a.getFD())));\n\t\t\n\t\t//perform quicksort on partitions of quickSortSize\n\t\tquickSortSize = (int) (Math.min(quickSortSize, fileSize)); \n\t\tint numDivisions = (int) (Math.floor(fileSize/quickSortSize));\n\t\tint excess = (int) (fileSize%(numDivisions*quickSortSize));\n\t\tint[] tmp = new int[quickSortSize];\n\t\tfor (int j = 0; j < numDivisions; j++){\n\t\t\tfor (int i = 0; i< quickSortSize; i++){\n\t\t\t\ttmp[i] = input.readInt();\n\t\t\t}\n\t\t\tquickSort(tmp);\n\t\t\tfor (int i: tmp){\n\t\t\t\tf2d.writeInt(i);\n\t\t\t}\n\t\t}\n\t\ttmp = new int[excess];\n\t\tfor (int i = 0; i< excess; i++){\n\t\t\ttmp[i] = input.readInt();\n\t\t}\n\t\tquickSort(tmp);\n\t\tfor (int i: tmp){\n\t\t\tf2d.writeInt(i);\n\t\t}\n\t\tf2d.flush();\n\t\tinput.close();\n\t\t\n\t\t//Perform Merge sort on the larger partitions\n\t\tint iteration = (int) Math.ceil(Math.log(fileSize/(quickSortSize))/Math.log(2));\n\t\tfor (int i = 0; i < iteration; i++){\n\t\t\tint size = (int) Math.pow(2, i)*quickSortSize;\n\t\t\tif (i%2 == 0){ \n\t\t\t\tf1a.seek(0);\n\t\t\t\tstepSorter(f2, f1d, size);\n\t\t\t} else {\n\t\t\t\tf2a.seek(0);\n\t\t\t\tstepSorter(f1, f2d, size);\n\t\t\t}\n\t\t}\n\n\t\t//Copies f2 to f1 if the iteration ends with f2\n\t\tif (iteration%2==0){\n\t\t\tFileChannel source = null;\n\t\t\tFileChannel destination = null;\n\t\t\ttry {\n\t\t\t\tsource = new FileInputStream(f2).getChannel();\n\t\t\t\tdestination = new FileOutputStream(f1).getChannel();\n\t\t destination.transferFrom(source, 0, source.size());\n\t\t }\n\t\t finally {\n\t\t if(source != null) {\n\t\t source.close();\n\t\t }\n\t\t if(destination != null) {\n\t\t destination.close();\n\t\t }\n\t\t }\n\t\t}\n\t\tf1a.close();\n\t\tf2a.close();\n\t\tf1d.close();\n\t\tf2d.close();\n\t}",
"void quick_sort(int intArray[], int low, int high)\n {\n if (low < high)\n {\n // partition the array around pi=>partitioning index and return pi\n int pi = partition(intArray, low, high);\n // sort each partition recursively\n quick_sort(intArray, low, pi - 1);\n quick_sort(intArray, pi + 1, high);\n }\n }",
"public void sort(int arr[], int l, int m, int r) \n {\n int n1 = m - l + 1; \n int n2 = r - m; \n /* Create temp arrays */\n int L[] = new int [n1]; \n int R[] = new int [n2]; \n /*Copy data to temp arrays*/\n for (int i=0; i<n1; ++i) \n L[i] = arr[l + i]; \n for (int j=0; j<n2; ++j) \n R[j] = arr[m + 1+ j]; \n /* Merge the temp arrays */\n // Initial indexes of first and second subarrays \n int i = 0, j = 0; \n // Initial index of merged subarry array \n int k = l; \n while (i < n1 && j < n2) \n { \n if (L[i] <= R[j]) \n { \n arr[k] = L[i]; \n i++; \n } \n else\n { \n arr[k] = R[j]; \n j++; \n } \n k++; \n } \n /* Copy remaining elements of L[] if any */\n while (i < n1) \n { \n arr[k] = L[i]; \n i++; \n k++; \n } \n /* Copy remaining elements of R[] if any */\n while (j < n2) \n { \n arr[k] = R[j]; \n j++; \n k++; \n } \n }",
"static void merge(double a[],int start,int mid, int end) {\r\n \tint i,j,k;\r\n \tint size1 = mid - start +1;\r\n \tint size2 = end - mid;\r\n \tif (size2 > 0 && size1 > 0) {\r\n \t\tdouble leftA[] = new double[size1]; // temp arrays\r\n \tdouble rightA[] = new double[size2];\r\n \tfor(i=0;i < size1;i++) leftA[i] = a[start+i]; //Copy data into temp arrays \r\n \tfor(j=0;j<size2;j++) rightA[j] = a[mid+1+j];\r\n \ti=0; // Merge temp arrays back into a[]\r\n \tj=0;\r\n \tk=start;\r\n \twhile (i<size1 && j < size2) {\r\n \t\tif(leftA[i]<=rightA[j]) {\r\n \t\t\ta[k]=leftA[i];\r\n \t\t\ti++;\r\n \t\t}else {\r\n \t\t\ta[k]=rightA[j];\r\n \t\t\tj++;\r\n \t\t}\r\n \t\tk++;\r\n \t}\r\n \twhile(i<size1) { //if remaining in leftA[] copy in\r\n \t\ta[k]=leftA[i];\r\n \t\ti++;\r\n \t\tk++;\r\n \t}\r\n \twhile(j<size2) { //if remaining in rightA[] copy in\r\n \t\ta[k]=rightA[j];\r\n \t\tj++;\r\n \t\tk++;\r\n \t}\r\n \t}\t\r\n }",
"private static <T extends Comparable<T>> void mergeSort(T[] arrayToSort, int startIndex, int endIndex) {\n if(startIndex + 1 < endIndex) {\n int centerIndex = (endIndex + startIndex)/2;\n mergeSort(arrayToSort, startIndex, centerIndex); // sort left half\n mergeSort(arrayToSort, centerIndex, endIndex); // sort right half\n merge(arrayToSort, startIndex, centerIndex, endIndex); // merge two, sorted halves\n }\n }",
"private static <T extends Comparable<T>> void quicksort(T v[], int left, int right) {\n if(left<right){\n int indexP = partition(v,left,right);\n quicksort(v, left, indexP - 1);\n quicksort(v, indexP + 1, right );\n\n }\n\n }",
"public static void main(String[] args) throws FileNotFoundException{\n int[] quicktimes1 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes1[i] = (int)endTime;\n }\n \n int[] mergetimes1 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes1[i] = (int)endTime;\n }\n \n int[] heaptimes1 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes1[i] = (int)endTime;\n }\n \n int[] quicktimes2 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[i] = j;\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes2[i] = (int)endTime;\n }\n \n int[] mergetimes2 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes2[i] = (int)endTime;\n }\n \n int[] heaptimes2 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes2[i] = (int)endTime;\n }\n \n int[] quicktimes3 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes3[i] = (int)endTime;\n }\n \n int[] mergetimes3 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes3[i] = (int)endTime;\n }\n \n int[] heaptimes3 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes3[i] = (int)endTime;\n }\n \n int[] quicktimes4 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes4[i] = (int)endTime;\n }\n \n int[] mergetimes4 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes4[i] = (int)endTime;\n }\n \n int[] heaptimes4 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes4[i] = (int)endTime;\n }\n \n \n //THESE WILL GENERATE THE MERGE/HEAP/QUICK SORT FOR THE REVERSE SORTED ARRAYS OF VARIOUS LENGTHS\n int[] quicktimes5 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes5[i] = (int)endTime;\n }\n \n int[] mergetimes5 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes5[i] = (int)endTime;\n }\n \n int[] heaptimes5 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes5[i] = (int)endTime;\n }\n \n int[] quicktimes6 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes6[i] = (int)endTime;\n }\n \n int[] mergetimes6 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes6[i] = (int)endTime;\n }\n \n int[] heaptimes6 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes6[i] = (int)endTime;\n }\n \n int[] quicktimes7 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes7[i] = (int)endTime;\n }\n \n int[] mergetimes7 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes7[i] = (int)endTime;\n }\n \n int[] heaptimes7 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes7[i] = (int)endTime;\n }\n \n int[] quicktimes8 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes8[i] = (int)endTime;\n }\n \n int[] mergetimes8 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes8[i] = (int)endTime;\n }\n \n int[] heaptimes8 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes8[i] = (int)endTime;\n }\n \n //THESE WILL GENERATE THE MERGE/HEAP/QUICK SORT FOR THE RANDOM ARRAYS OF VARIOUS LENGTHS\n int[] quicktimes9 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999);\n long startTime = System.nanoTime();\n Sorting.quickSort(rarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes9[i] = (int)endTime;\n }\n \n int[] mergetimes9 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999);\n long startTime = System.nanoTime();\n Sorting.mergeSort(rarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes9[i] = (int)endTime;\n }\n \n int[] heaptimes9 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999);\n long startTime = System.nanoTime();\n Sorting.heapSort(rarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes9[i] = (int)endTime;\n }\n \n int[] quicktimes10 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[10000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(9999);\n long startTime = System.nanoTime();\n Sorting.quickSort(rarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes10[i] = (int)endTime;\n }\n \n int[] mergetimes10 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[10000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(9999);\n long startTime = System.nanoTime();\n Sorting.mergeSort(rarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes10[i] = (int)endTime;\n }\n \n int[] heaptimes10 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[10000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(9999);\n long startTime = System.nanoTime();\n Sorting.heapSort(rarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes10[i] = (int)endTime;\n }\n \n int[] quicktimes11 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[100000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(99999);\n long startTime = System.nanoTime();\n Sorting.quickSort(rarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes11[i] = (int)endTime;\n }\n \n int[] mergetimes11 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[100000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(99999);\n long startTime = System.nanoTime();\n Sorting.mergeSort(rarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes11[i] = (int)endTime;\n }\n \n int[] heaptimes11 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[100000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(99999);;\n long startTime = System.nanoTime();\n Sorting.heapSort(rarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes11[i] = (int)endTime;\n }\n \n int[] quicktimes12 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999999);\n long startTime = System.nanoTime();\n Sorting.quickSort(rarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes12[i] = (int)endTime;\n }\n \n int[] mergetimes12 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999999);\n long startTime = System.nanoTime();\n Sorting.mergeSort(rarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes12[i] = (int)endTime;\n }\n \n int[] heaptimes12 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999999);\n long startTime = System.nanoTime();\n Sorting.heapSort(rarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes12[i] = (int)endTime;\n }\n \n //PRINTING THE RESULTS OUT INTO FILE\n File f = new File(\"Results.txt\");\n FileOutputStream fos = new FileOutputStream(f);\n PrintWriter pw = new PrintWriter(fos);\n pw.println(\"SORTED ARRAYS TIMES:\");\n pw.printf(\"1000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes1), medVal(quicktimes1), varVal(quicktimes1, meanVal(quicktimes1)));\n pw.printf(\"10000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes2), medVal(quicktimes2), varVal(quicktimes2, meanVal(quicktimes2)));\n pw.printf(\"100000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes3), medVal(quicktimes3), varVal(quicktimes3, meanVal(quicktimes3)));\n pw.printf(\"1000000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes4), medVal(quicktimes4), varVal(quicktimes4, meanVal(quicktimes4)));\n pw.printf(\"1000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes1), medVal(mergetimes1), varVal(mergetimes1, meanVal(mergetimes1)));\n pw.printf(\"10000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes2), medVal(mergetimes2), varVal(mergetimes2, meanVal(mergetimes2)));\n pw.printf(\"100000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes3), medVal(mergetimes3), varVal(mergetimes3, meanVal(mergetimes3)));\n pw.printf(\"1000000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes4), medVal(mergetimes4), varVal(mergetimes4, meanVal(mergetimes4)));\n pw.printf(\"1000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes1), medVal(heaptimes1), varVal(heaptimes1, meanVal(heaptimes1)));\n pw.printf(\"10000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes2), medVal(heaptimes2), varVal(heaptimes2, meanVal(heaptimes2)));\n pw.printf(\"100000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes3), medVal(heaptimes3), varVal(heaptimes3, meanVal(heaptimes3)));\n pw.printf(\"1000000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes4), medVal(heaptimes4), varVal(heaptimes4, meanVal(heaptimes4)));\n pw.println(\"REVERSE SORTED ARRAYS TIMES:\");\n pw.printf(\"1000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes5), medVal(quicktimes5), varVal(quicktimes5, meanVal(quicktimes5)));\n pw.printf(\"10000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes6), medVal(quicktimes6), varVal(quicktimes6, meanVal(quicktimes6)));\n pw.printf(\"100000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes7), medVal(quicktimes7), varVal(quicktimes7, meanVal(quicktimes7)));\n pw.printf(\"1000000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes8), medVal(quicktimes8), varVal(quicktimes8, meanVal(quicktimes8)));\n pw.printf(\"1000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes5), medVal(mergetimes5), varVal(mergetimes5, meanVal(mergetimes5)));\n pw.printf(\"10000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes6), medVal(mergetimes6), varVal(mergetimes6, meanVal(mergetimes6)));\n pw.printf(\"100000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes7), medVal(mergetimes7), varVal(mergetimes7, meanVal(mergetimes7)));\n pw.printf(\"1000000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes8), medVal(mergetimes8), varVal(mergetimes8, meanVal(mergetimes8)));\n pw.printf(\"1000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes5), medVal(heaptimes5), varVal(heaptimes5, meanVal(heaptimes5)));\n pw.printf(\"10000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes6), medVal(heaptimes6), varVal(heaptimes6, meanVal(heaptimes6)));\n pw.printf(\"100000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes7), medVal(heaptimes7), varVal(heaptimes7, meanVal(heaptimes7)));\n pw.printf(\"1000000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes8), medVal(heaptimes8), varVal(heaptimes8, meanVal(heaptimes8)));\n pw.println(\"RANDOM ARRAYS TIMES:\");\n pw.printf(\"1000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes9), medVal(quicktimes9), varVal(quicktimes9, meanVal(quicktimes9)));\n pw.printf(\"10000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes10), medVal(quicktimes10), varVal(quicktimes10, meanVal(quicktimes10)));\n pw.printf(\"100000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes11), medVal(quicktimes11), varVal(quicktimes11, meanVal(quicktimes11)));\n pw.printf(\"1000000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes12), medVal(quicktimes12), varVal(quicktimes12, meanVal(quicktimes12)));\n pw.printf(\"1000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes9), medVal(mergetimes9), varVal(mergetimes9, meanVal(mergetimes9)));\n pw.printf(\"10000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes10), medVal(mergetimes10), varVal(mergetimes10, meanVal(mergetimes10)));\n pw.printf(\"100000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes11), medVal(mergetimes11), varVal(mergetimes11, meanVal(mergetimes11)));\n pw.printf(\"1000000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes12), medVal(mergetimes12), varVal(mergetimes12, meanVal(mergetimes12)));\n pw.printf(\"1000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes9), medVal(heaptimes9), varVal(heaptimes9, meanVal(heaptimes9)));\n pw.printf(\"10000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes10), medVal(heaptimes10), varVal(heaptimes10, meanVal(heaptimes10)));\n pw.printf(\"100000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes11), medVal(heaptimes11), varVal(heaptimes11, meanVal(heaptimes11)));\n pw.printf(\"1000000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes12), medVal(heaptimes12), varVal(heaptimes12, meanVal(heaptimes12)));\n pw.close();\n }",
"protected abstract void partialQuickSort(Integer[] map, int left, int right, int minIdx, int maxIdx);",
"private void quickSortM(int[] arr, int start, int end) {\n\t\tif(start>=end)\r\n\t\t\treturn ;\r\n\t\tint bounary = partition(arr,start,end);\r\n\t\tquickSortM(arr,start,bounary-1);\r\n\t\tquickSortM(arr, bounary+1, end);\r\n\t}",
"private static void mergeSort(int[] data, int left, int right) {\n\n\t\tint mid;\n\n\t\tif (left < right) {\n\n\t\t\tmid = (left + right) / 2;\n\n\t\t\tmergeSort(data, left, mid);\n\t\t\tmergeSort(data, mid + 1, right);\n\t\t\tmerge(data, left, mid, right);\n\t\t}\n\n\t}",
"private static int[] mergeSortedArray(int[] a, int[] b){\n int i = a.length -1;\n for(int j = 3, k = 3, x=0; ( (j >= 0) && (k >= 0)) ; x++){\n\n if(a[j] > b[k]){\n a[i] = a[j];\n a[j] = 0;\n --j;\n --i;\n\n } else{\n a[i] = b[k];\n --k;\n --i;\n }\n\n if(j == -1 ) // this condition worked\n j = 0;\n }\n\n return a;\n\n }",
"private static void quickSort(int[] array, int startIndex, int rightIndex) {\n if (startIndex < rightIndex) {\n int pivot = partition(array, startIndex, rightIndex);\n quickSort(array, startIndex, pivot - 1);\n quickSort(array, pivot + 1, rightIndex);\n }\n }",
"private void mergeSort(int[] array, int start, int end) {\n\t\tif (start < end) {\n\t\t\tint mid = (start + end) / 2;\n\t\t\tmergeSort(array, start, mid);\n\t\t\tmergeSort(array, mid + 1, end);\n\t\t\tmerge(array, start, mid, end);\n\t\t}\n\t}",
"public void quickSort() {\n\t\tquickSort(0, data.size() - 1);\n\t}",
"public static void quickSort(ArrayList<Integer> S){\n\t\t\n\t\tif (S.isEmpty()) { //if empty just return itself \n\t\t\treturn; \n\t\t}\n\t\t\n\t\tint pivot = S.get(S.size()-1); //creating a pivot point for the sort \n\t\t\n\t\tArrayList<Integer> L = new ArrayList<Integer>(); //Creating array list for Less than\n\t\tArrayList<Integer> E = new ArrayList<Integer>(); //Creating array list for Equal than\n\t\tArrayList<Integer> G = new ArrayList<Integer>(); //Creating array list for Greater than \n\t\t\n\t\twhile (!S.isEmpty()) { //run while the array list isn't empty \n\t\t\t\n\t\t\tif (S.get(0)< pivot) { //if its less than the pivot, add less than \n\t\t\t\t\n\t\t\t\tL.add(S.get(0)); //adds the less than \n\t\t\t\tS.remove(0); //removes the elements at that index position \n\t\t\t}\n\t\t\telse if(S.get(0) == pivot) { //if its equal to the pivot, add equal to \n\t\t\t\t\n\t\t\t\tE.add(S.get(0));\n\t\t\t\tS.remove(0);\n\t\t\t}\n\t\t\t\n\t\t\telse if (S.get(0) > pivot) { //if its greater than the pivot point, add greater than \n\t\t\t\t\n\t\t\t\tG.add(S.get(0));\n\t\t\t\tS.remove(0);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\tif (!L.isEmpty()) { //if Less than isn't empty, call quick sort on less than \n\t\t\t\n\t\t\tquickSort(L); //calls the quick sort for less than \n\t\t}\n\t\t\n\t\tif (!G.isEmpty()) { //if Greater than isn't empty, call quick sort on greater than \n\t\t\t\n\t\t\tquickSort(G); //calls quick sort for greater than \n\t\t}\n\t\t\n\t\tS.addAll(L); //Shifting all of the elements to the right \n\t\tS.addAll(E); //Shifting all of the elements to the right \n\t\tS.addAll(G); //Shifting all of the elements to the right \n\t}",
"public void mergeSort() {\n this.array = mergeSort(array);\n }",
"private void quickSort(List<T> array, int startIndex, int endIndex, FuncInterface<T> ICompare)\n {\n if (startIndex < endIndex)\n {\n // calculate the pivotIndex\n int pivotIndex = partition(array, startIndex, endIndex, ICompare);\n // quickSort the left sub-array\n quickSort(array, startIndex, pivotIndex, ICompare);\n // quickSort the right sub-array\n quickSort(array, pivotIndex + 1, endIndex, ICompare); \n }\n }",
"private void merge(ArrayList <Comparable> a, int first, int mid, int last){\r\n\t\tsteps += 5;\r\n\t\tArrayList<Comparable> temp = new ArrayList<Comparable>();\r\n\t\tint firstInd = first;\r\n\t\tint middle = mid + 1;\r\n\t\tsteps += 2;\r\n\t\twhile (firstInd <= mid && (middle) <= last) {\r\n\t\t\tif (a.get(firstInd).compareTo(a.get(middle)) < 0) {\r\n\t\t\t\ttemp.add(a.get(firstInd));\r\n\t\t\t\tfirstInd ++;\r\n\t\t\t\tsteps += 7;\r\n\t\t\t}else if (a.get(middle).compareTo(a.get(firstInd)) < 0){\r\n\t\t\t\ttemp.add(a.get(middle));\r\n\t\t\t\tmiddle++;\r\n\t\t\t\tsteps += 7;\r\n\t\t }else {\r\n\t\t\t\ttemp.add(a.get(middle));\r\n\t\t\t\tmiddle++;\r\n\t\t\t\tsteps += 3;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (firstInd >= mid + 1) {\r\n\t\t\tsteps += 4;\r\n\t\t\tfor (int i = middle; i <= last; i++) {\r\n\t\t\t\ttemp.add(a.get(i));\r\n\t\t\t}\r\n\t\t\tsteps += 3;\r\n\t\t}else {\r\n\t\t\tsteps += 2;\r\n\t\t\tfor (int i = firstInd; i <= mid; i++) {\r\n\t\t\t\ttemp.add(a.get(i));\r\n\t\t\t}\r\n\t\t\tsteps += 3;\r\n\t\t}\r\n\t\tsteps += 3;\r\n\t\tint j = 0;\r\n\t\tfor (int i = first; i <= last; i++) {\r\n\t\t\ta.set(i, temp.get(j));\r\n\t\t\tj++;\r\n\t\t\tsteps += 4;\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"Merge\");\r\n\t\tSystem.out.println();\r\n\r\n\t}",
"private void mergesort(int[] array) {\n\t\t\n\t}",
"private static void merge(ArrayList<Integer> a, int left, int mid, int right) {\n\t\tint chunk1 = mid - left + 1;\r\n\t\tint chunk2 = right - mid;\r\n\t\tArrayList<Integer> tempArrLeft = new ArrayList<>();\r\n\t\tArrayList<Integer> tempArrRight = new ArrayList<>();\r\n\t\t//pipe data into temps\r\n\t\tfor (int i=0; i < chunk1; ++i) {\r\n\t\t\ttempArrLeft.add(a.get(left + i));\r\n\t\t}\r\n\t\tfor (int j=0; j < chunk2; ++j) {\r\n\t\t\ttempArrRight.add(a.get(mid + 1 + j));\r\n\t\t}\r\n\r\n\t\t//merge temp arrays\r\n\t\tint i = 0, j = 0;\r\n\t\tint k = left;\r\n\t\twhile (i < chunk1 && j < chunk2) {\r\n\t\t\tif (tempArrLeft.get(i) <= tempArrRight.get(j)) {\r\n\t\t\t\ta.set(k, tempArrLeft.get(i));\r\n\t\t\t\ti++;\r\n\t\t\t} else {\r\n\t\t\t\ta.set(k, tempArrRight.get(j));\r\n\t\t\t\tj++;\r\n\t\t\t}\r\n\t\t\tk++;\r\n\t\t}\r\n\t\twhile (i < chunk1) {\r\n\t\t\ta.set(k, tempArrLeft.get(i));\r\n\t\t\ti++;\r\n\t\t\tk++;\r\n\t\t}\r\n\t\twhile (j < chunk2) {\r\n\t\t\ta.set(k, tempArrRight.get(j));\r\n\t\t\tj++;\r\n\t\t\tk++;\r\n\t\t}\r\n\t}",
"private void sort(T[] arr, int lo, int hi) {\n if (lo >= hi) return; // we return if the size of the part equals 1\n int pivot = partition(arr, lo, hi); // receiving the index of the pivot element\n sort(arr, lo, pivot - 1); // sorting the left part\n sort(arr, pivot + 1, hi); // sorting the right part\n }",
"public void sort(){\n\t\t\n\t\tif(Q.size() != 1){\n\t\t\tArrayQueue<E> tempQueue1 = Q.dequeue();\n\t\t\tArrayQueue<E> tempQueue2 = Q.dequeue();\n\t\t\tArrayQueue<E> tempQueue3 = merge(tempQueue1, tempQueue2);\n\t\t\tQ.enqueue(tempQueue3);\n\t\t\tsort();\n\t\t}\n\t\t\n\t}",
"public static void mergesort(int[]data){\n if (data.length <= 1)\n return;\n mergesortH(data, 0, data.length - 1);\n \n }",
"private void quickSort(Comparable[] items, int left, int right) {\n if (left < right) {\n /**\n * Split the list at the pivot through partitioning it,\n * and return the pivot to separate out the less than\n * and greater than sides.\n */\n int pivot = partition(items, left, right);\n if (pivot - 1 > left) {\n quickSort(items, left, pivot - 1);\n }\n if (pivot + 1 < right) {\n quickSort(items, pivot + 1, right);\n }\n }\n }",
"private static void mergeSort(int[] array, int startIndex, int endIndex) {\n if (startIndex < endIndex) {\n int halfIndex = (int) Math.floor((startIndex + endIndex) / 2);\n mergeSort(array, startIndex, halfIndex);\n mergeSort(array, halfIndex + 1, endIndex);\n mergeLogic(array, startIndex, halfIndex, endIndex);\n }\n }",
"private void quickSort(Node<T> low, Node<T> high) {\n if (!Objects.isNull(high) &&\n low != high && low != high.getNext()) {\n\n Node<T> pivot = partition(low, high);\n quickSort(low, pivot.getPrev());\n quickSort(pivot.getNext(), high);\n }\n }",
"private static <E extends Comparable<? super E>> void quickSortHelper(\r\n\t\t\tComparable<E>[] data, int left, int right) {\r\n\t\tif (left + CUTOFF <= right) {\r\n\t\t\tE pivot = median3(data, left, right);\r\n\t\t\tint partition = partition(data, left, right, pivot);\r\n\t\t\tquickSortHelper(data, left, partition - 1);\r\n\t\t\tquickSortHelper(data, partition + 1, right);\r\n\t\t} else {\r\n\t\t\tinsertionSort(data, left, right);\r\n\t\t}\r\n\t}",
"void sort( int low, int high)\n {\n if (low > high)\n {\n /* pi is partitioning index, arr[pi] is\n now at right place */\n int pi = partition(low, high);\n\n // Recursively sort elements before\n // partition and after partition\n sort( low, pi-1);\n sort( pi+1, high);\n }\n }",
"private void quicksort(int inLow, int inHigh) {\n\t\tint i = inLow; int j = inHigh;\n\t\t//____| Get Pivot from middle.\n\t\tfloat pivot = gameObjectsList.get(inLow + (inHigh - inLow)/2).getX();\n\t\t//____| Divide List\n\t\twhile (i <= j){\n\t\t\twhile(gameObjectsList.get(i).getX() < pivot){\n\t\t\t\ti++;\n\t\t\t}\n\t\t\twhile(gameObjectsList.get(j).getX() > pivot){\n\t\t\t\tj--;\n\t\t\t}\n\t\t\tif (i<=j){\n\t\t\t\tCollections.swap(gameObjectsList, i, j);\n\t\t\t\ti++;\n\t\t\t\tj--;\n\t\t\t}\n\t\t}\n\t\tif (inLow < j)\n\t\t\tquicksort(inLow, j);\n\t\tif (i < inHigh)\n\t\t\tquicksort(i, inHigh);\n\t}",
"public ListUtilities quicksort(){\n\t\t\n\t\tListUtilities lo = this.returnToStart();\n\t\tListUtilities hi = this.goToEnd();\n\t\tListUtilities sorted = this.partition(lo, hi);\n\t\t\n\t\treturn sorted.returnToStart();\t\t\n\t}",
"private static void mergeSortInternally(int[] a, int low, int high) {\n\n if (low >= high) {\n return;\n }\n int mid = low + (high - low) / 2;\n mergeSortInternally(a, low, mid);\n mergeSortInternally(a, mid + 1, high);\n System.out.println(\"low:\" + low + \", mid:\" + mid + \", high:\" + high);\n merge(a, low, mid, high);\n }",
"@Override\r\n\tpublic void sort() {\r\n\t\tint minpos;\r\n\t\tfor (int i = 0; i < elements.length-1; i++) {\r\n\t\t\tminpos=AuxMethods.minPos(elements, i);\r\n\t\t\telements=AuxMethods.swapElements(elements, i, minpos);\r\n\t\t\t\r\n\t\t}\r\n\t}",
"private static void quicksort(Object a[], int lo0, int hi0) {\n int lo = lo0;\n int hi = hi0;\n int mid;\n\n if (hi0 > lo0) {\n swapReferences(a, lo0, (lo0 + hi0)/2);\n Object[] midObject = (Object[]) a[(lo0 + hi0) / 2];\n mid = (int)midObject[2];\n while (lo <= hi) {\n Object[] loObject = (Object[])a[lo];\n int loWeight = (int)loObject[2];\n while((lo < hi0) && (loWeight < mid)) {\n loObject = (Object[])a[lo];\n loWeight = (int)loObject[2];\n if (loWeight < mid) {\n lo++;\n }\n }\n\n Object[] hiObject = (Object[])a[hi];\n int hiWeight = (int)hiObject[2];\n while((hi > lo0) && (hiWeight > mid)) {\n hiObject = (Object[])a[hi];\n hiWeight = (int)hiObject[2];\n if (hiWeight > mid) {\n hi--;\n }\n }\n\n if (lo <= hi) {\n swapReferences(a, lo, hi);\n lo++;\n hi--;\n }\n }\n\n if (lo0 < hi) {\n quicksort(a, lo0, hi);\n }\n\n if (lo < hi0) {\n quicksort(a, lo, hi0);\n }\n }\n }",
"private void merge(Comparable[] a, int min, int mid, int max){\n for(int t = min; t <= max;t++){\n aux[t] = a[t];\n }\n \n int i = min; // start index for left side\n int j = mid + 1; // start index for right side\n \n for(int k = min; k <= max; k++){\n if(i > mid){\n a[k] = aux[j++];\n }\n else if(j > max){\n a[k] = aux[i++];\n }\n else if(aux[i].compareTo(aux[j]) < 0 ){\n a[k] = aux[i++];\n }\n else {\n a[k] = aux[j++];\n }\n }\n }",
"private static void merge(Comparable[] a, int[] index, int[] aux, int lo, int mid, int hi){\n for(int k=lo;k<=hi;k++){\n aux[k]=index[k];\n }\n int i=lo,j=mid+1;\n for(int k=lo;k<=hi;k++){\n if(i>mid) index[k]=aux[j++];\n else if(j>hi) index[k]=aux[i++];\n else if(less(a[aux[j]],a[aux[i]])) index[k]=aux[j++];\n else index[k]=aux[i++];\n }\n }",
"private static void sort(Comparable[] a, int[] index, int[] aux, int lo, int hi){\n if(hi<=lo) return;\n int mid=lo+(hi-lo)/2;\n sort(a,index,aux,lo,mid);\n sort(a,index,aux,mid+1,hi);\n merge(a,index,aux,lo,mid,hi);\n }",
"private void merge_sort( ArrayList<Type> array, ArrayList<Type> auxillary, int low, int high )\r\n\t{\r\n\t\t// base case\r\n\t\tif ((high - low) <= switchValue)\r\n\t\t{\r\n\t\t\tSort_Utils.insertion_sort(array, low, high);\r\n\t\t}\r\n\t\t\r\n\t\tif (low < high)\r\n\t\t{\r\n\t\t\tint middle = low + (high - low)/2;\r\n\t\t\t\r\n\t\t\t// recursively sort the two halves of the array\r\n\t\t\tmerge_sort(array, auxillary, low, middle);\r\n\t\t\tmerge_sort(array, auxillary, middle + 1, high);\r\n\t\t\tcombine(array, auxillary, low, middle, high);\r\n\t\t}\r\n}",
"private static void mergeSort(int[] num, int low, int high) {\n\t\tif ((high - low) >= 1) {\n\n\t\t\t// find the middle index\n\t\t\tint middle = (low + high) / 2;\n\n\t\t\t// make recursive calls to the 'left' and 'right' sides of the sublist\n\t\t\tmergeSort(num, low, middle);\n\t\t\tmergeSort(num, middle + 1, high);\n\n\t\t\t// merge the sublists back together\n\t\t\tmerge(num, low, middle, middle + 1, high);\n\n\t\t}\n\t}",
"public void sort(T[] arr, T[] aux, int begin, int end){\n\n if(end-begin < 7){\n insertionSort(arr, begin, end);\n return;\n }\n\n int mid = (begin+end)/2;\n\n sort(arr, aux, begin, mid);\n sort(arr, aux, mid+1, end);\n\n if(arr[mid].compareTo(arr[mid+1]) != 1){\n return;\n }else{\n merge(arr, aux, begin, mid, end);\n }\n }",
"private void doQuickSort(int lowerIndex, int higherIndex){\n\t\tint lowItter = lowerIndex;\n\t\tint highItter = higherIndex;\n \n\t\t// use the middle as a pivot numberr\n int middleIndex = lowerIndex + (higherIndex - lowerIndex)/2;\n\t\tint pivot = sortArray[middleIndex];\n \n\t\twhile (lowItter <= highItter) {\n\t\t\twhile (sortArray[lowItter] < pivot)\n lowItter++;\n \n\t\t\twhile (sortArray[highItter] > pivot)\n highItter--;\n \n compCount++;\n\t\t\tif (lowItter <= highItter) {\n\t\t\t\tswap(lowItter, highItter);\n swapCount++;\n \n\t\t\t\tlowItter++;\n\t\t\t\thighItter--;\n\t\t }\n\t\t}\n \n compCount++;\n\t\tif (lowerIndex < higherIndex)\n\t\t\tdoQuickSort(lowerIndex, highItter);\n \n compCount++;\n\t\tif (lowItter < higherIndex)\n\t\t\tdoQuickSort(lowItter, higherIndex);\n \n\t}",
"public void mergeSort() throws Exception{\n\t\tif(this.qtd<=1)\n\t\t\tthrow new Exception(\"Nada para ordenar\");\n\t\tthis.sort(0,this.qtd-1);\n\t}",
"public void quicksort()\n { quicksort(this.heap, 0, heap.size()-1);\n }",
"private void quickSort(int low, int high) {\n\t\tint i = low;\n\t\tint k = high;\n\t\tint pivot = array[low + (high - low) / 2];\n\n\t\twhile (i <= k) {\n\t\t\t// Stops when element on left side is greater than the pivot\n\t\t\twhile (array[i] < pivot) {\n\t\t\t\ti++;\n\t\t\t}\n\t\t\t// Stops when the element on the right side is less than the pivot\n\t\t\twhile (array[k] > pivot) {\n\t\t\t\tk--;\n\t\t\t}\n\t\t\t// Swap the left and right elements, since the one on the left is\n\t\t\t// greater than the one on the right (proved via pivot)\n\t\t\tif (i <= k) {\n\t\t\t\texchangeNums(i, k);\n\t\t\t\t// Move on to the next elements\n\t\t\t\ti++;\n\t\t\t\tk--;\n\t\t\t}\n\t\t}\n\t\t// Recursive calls\n\t\tif (low < k) {\n\t\t\tquickSort(low, k);\n\t\t}\n\t\tif (i < high) {\n\t\t\tquickSort(i, high);\n\t\t}\n\t}",
"protected static <T extends Comparable<? super T>> void merge(List<T> a,\n List<T> tmpArray, int low, int high){\n int leftEnd = (low + high)/2;\n int leftPos = low;\n int rightPos = leftEnd + 1;\n int rightEnd = high;\n\n // merge into beginning of tmpArray\n int tmpPos = 0;\n int numElements = high - low + 1;\n\n while(leftPos <= leftEnd && rightPos <= rightEnd){\n // if value at leftPos is less than rightPos\n // copy leftPos into tmpArray and increment leftPos\n if(a.get(leftPos).compareTo(a.get(rightPos)) <= 0){\n tmpArray.set(tmpPos, a.get(leftPos));\n leftPos++;\n \n } else { // else rightPos is less and should be copied\n tmpArray.set(tmpPos, a.get(rightPos));\n rightPos++;\n }\n\n // in either case increment tmpPos\n tmpPos++;\n }\n\n // copy rest of left array if right array finished first\n while(leftPos <= leftEnd){\n tmpArray.set(tmpPos, a.get(leftPos));\n // increment left and tmp position\n leftPos++;\n tmpPos++;\n }\n\n // copy rest of right array if left array finished first\n while(rightPos <= rightEnd){\n tmpArray.set(tmpPos, a.get(rightPos));\n // increment right and tmp position\n rightPos++;\n tmpPos++;\n }\n\n // copy tmpArray back into array a\n for(int i = 0; i < numElements; i++){\n a.set(low+i, tmpArray.get(i));\n }\n }",
"public void sort(int[] seq, int begin, int end) {\n if (seq == null || end - begin <= 1) {// only seq with length larger than 1 is needed to sort\n return;\n }\n // divide and conquer\n int p = partition(seq, begin, end);// the pivot is now in the final place\n sort(seq, begin, p); // sort the left part\n sort(seq, p + 1, end); // sort the right part, p+1 excludes p because p is the final place of pivot\n }",
"public static int[] mergeSort(int[] arr, int lo, int hi) {\n //write your code here\n if(lo < hi) {\n int mid = (lo+hi)/2;\n int[] lft = mergeSort(arr, lo, mid);\n int[] rgt = mergeSort(arr, mid+1, hi);\n int[] res = mergeTwoSortedArrays(lft, rgt);\n return res;\n }\n return new int[]{arr[lo]}; // if(lo==hi)\n}",
"static void merge(int arr[], int low, int mid, int high){\n int len1 = mid-low+1;\n int len2 = high - mid;\n\n //Create temp arrays\n int left[] = new int[len1];\n int right[] = new int[len2];\n\n //Copy data into the temp arrays\n for(int i=0;i<len1;++i) left[i] = arr[low+i];\n\n for(int j=0;j<len2;++j) right[j] = arr[mid+1+j];\n\n /*Merge two arrays*/\n\n int i=0, j=0, k=low;\n\n while(i<len1 && j<len2)\n {\n if (left[i] <= right[j])\n {\n arr[k] = left[i];\n i++;\n }\n else\n {\n arr[k] = right[j];\n j++;\n }\n k++;\n\n }\n\n /* Copy remaining elements of left[] if any */\n while (i < len1)\n {\n arr[k] = left[i];\n i++;\n k++;\n }\n\n /* Copy remaining elements of right[] if any */\n while (j < len2)\n {\n arr[k] = right[j];\n j++;\n k++;\n }\n }",
"public void sort() {\n\t\tSystem.out.println(\"Quick Sort Algorithm invoked\");\n\n\t}",
"public void merge(int[] inputArray, int start, int mid, int end) {\n int s1 = mid - start + 1;\n int s2 = end - mid;\n\n //Create a left and right array\n int L[] = new int [s1];\n int R[] = new int [s2];\n\n //Copy elements into two separate arrays\n for (int i=0; i<s1; ++i)\n L[i] = inputArray[start + i];\n for (int j=0; j<s2; ++j)\n R[j] = inputArray[mid + 1+ j];\n\n\n int i = 0, j = 0;\n int k = start;\n\n //Start your comparision\n while (i < s1 && j < s2)\n {\n if (L[i] <= R[j])\n {\n inputArray[k] = L[i];\n i++;\n }\n else\n {\n inputArray[k] = R[j];\n j++;\n }\n k++;\n }\n\n //Copy the remaining elements\n while (i < s1)\n {\n inputArray[k] = L[i];\n i++;\n k++;\n }\n while (j < s2)\n {\n inputArray[k] = R[j];\n j++;\n k++;\n }\n }",
"static void MergeSort(int[] arr){\n int[] helper = new int[arr.length];\n MergeSort(arr, helper, 0, arr.length-1);\n }",
"public static void mergeSortedArrays(final int MEM_SIZE, ArrayList<Integer []> inputChunks, HeapTuple[] minHeap, String outfile, final boolean ENABLE_DEBUG){\n\n FileOutputStream out;\n try{\n out = new FileOutputStream(outfile);\n }\n catch (FileNotFoundException e){\n System.err.println(e);\n return;\n }\n PrintWriter sortedFiles = new PrintWriter(out, true);\n\n int tempLength = 0;\n FHbinHeap<Integer> heap = new FHbinHeap<>();\n for (int i = 0; i < inputChunks.size(); i++) {\n Integer[] temp = inputChunks.get(i).clone();\n for(int j = 0; j < temp.length; j++){\n //Integer[] temp = inputChunks.get(i).clone();\n //System.out.print(temp[j] + \",\");\n int hi = temp[j];\n heap.insert(hi);\n }\n tempLength += temp.length;\n }\n System.out.println();\n for(int i = 0; i < tempLength; i++){\n int removal = heap.remove();\n System.out.print(removal + \",\");\n sortedFiles.print(removal + \",\");\n }\n sortedFiles.close();\n\n\n\n\n\n/* FAILED CODE\n\n Due to our sorting of the arrays, the minimum of the entire set must be the minimum of the set of the first element for all chunks\n By adding an offset to the array whose\n\n\n FHbinHeap<HeapTuple> metaHeap = null;\n HeapTuple[] heapElement = null;\n // Probably should just be a FHbinheap\n for (int i = 0; i < inputChunks.size(); i++) {\n for (int j = 0; j < MEM_SIZE; i++) {\n heapElement[i] = new HeapTuple(inputChunks.get(i)[j], i, j);\n metaHeap.insert(heapElement[i]);\n System.out.println(metaHeap.remove());\n //sortedFiles.println(metaHeap.remove());\n }\n }\n\n*/\n\n\n //First MEM_SIZE minima, no order\n /*/*\n int removed = 0;\n int [] arrayShift = new int[MEM_SIZE];\n //int innerIndex = 0;\n\n int tempLength = 0;\n\n int tempMin = 0;\n int tempMinIndex = 0;\n FHbinHeap<Integer> heap = new FHbinHeap<>();\n for (int j = 0; j < 5; j++) {\n //System.out.println(arrayShift[0] + \"ARRAYSHIFT\");\n for (int i = 0; i < inputChunks.size(); i++) {\n //FHbinHeap<Integer> heap = new FHbinHeap<>();\n Integer[] temp = inputChunks.get(i).clone();\n //System.out.println(temp[arrayShift[i]] + \",\");\n if (temp[arrayShift[i]] < tempMin) {\n tempMin = temp[arrayShift[i]];\n tempMinIndex = i;\n }\n\n\n for(int j = arrayShift[i]; j < temp.length; j++){\n //Integer[] temp = inputChunks.get(i).clone();\n System.out.print(temp[j] + \",\");\n //int hi = temp[j];\n //heap.insert(hi);\n }\n\n tempLength += temp.length;\n heap.insert(temp[arrayShift[i]]);\n //System.out.print(temp[arrayShift[i]]+ \",\");\n\n\n //int heapRemove = heap.remove();\n if (i == inputChunks.size() - 1) {\n removed = heap.remove();\n System.out.println();\n System.out.println(removed + \",MINIMUM\");\n arrayShift[tempMinIndex] = (arrayShift[tempMinIndex] + 1);\n }\n\n }\n }\n */\n\n\n\n\n }",
"public static void sort(int inputArray[], int start, int end) {\n if (end <= start) {\n return;\n }\n\n // Cut current window in half\n int mid = (start + end) / 2;\n\n // sort on new left array\n sort(inputArray, start, mid);\n // sort on new right array\n sort(inputArray, mid + 1, end);\n\n // merge left and right\n merge(inputArray, start, mid, end);\n }",
"public void mergeSort(int[] array){\n if(array.length <= 1){\r\n return;\r\n }\r\n // divide into 2 arrays\r\n int split = array.length/2;\r\n // create 2 arrays\r\n int[] front = Arrays.copyOfRange(array, 0, split);\r\n int[] back = Arrays.copyOfRange(array, split, array.length);\r\n \r\n // recursively sort\r\n mergeSort(front);\r\n mergeSort(back);\r\n \r\n // put numbers in correct spot\r\n // keeping track of where we are\r\n int fSpot = 0;\r\n int bSpot = 0;\r\n for(int i = 0; i < array.length; i++){\r\n // no more items in front array\r\n if(fSpot == front.length){\r\n // put item from back array in\r\n array[i] = back[bSpot];\r\n bSpot++;\r\n }else if(bSpot == back.length){\r\n // put item from front array in\r\n array[i] = front[fSpot];\r\n fSpot++;\r\n }else if(front[fSpot] < back[bSpot]){\r\n // put front item in\r\n array[i] = front[fSpot];\r\n fSpot++;\r\n }else{\r\n // put back item in\r\n array[i] = back[bSpot];\r\n bSpot++;\r\n }\r\n }\r\n }",
"public static void sort(int[] array, int from, int to) {\n int size = to - from + 1;\n int mid = from + (to - from)/2;\n if (size < cutoff|| counThread>20) \n \t{\n \t\tSystem.out.println(\"cut-off: \"+ (to-from+1));\n \t\tArrays.sort(array, from, to+1);\n \t}\n else {\n \n \tCompletableFuture<int[]> parsort1 = parsort(array, from, mid);\n \t\n \t\n CompletableFuture<int[]> parsort2 = parsort(array, mid+1, to);\n\n\n CompletableFuture<int[]> parsort = \n \t\tparsort1.thenCombine(parsort2, (xs1, xs2) -> {\n \tint[] result = new int[xs1.length + xs2.length];\n \tmerge(array, result, from);\n return result;\n });\n\n parsort.whenComplete((result, throwable) -> { \t\n// \tSystem.arraycopy(result, 0, array, from, to-from+1);\n// \tSystem.out.println(\"Thread count: \"+ counThread);\n \t\n \t\n }); \n parsort.join();\n }\n }",
"static void MergeSort(int[] A, int p, int r) {\n\t\tif (p < r) {\n\t\t\tint q = (p + r) / 2;\n\t\t\tMergeSort(A, p, q);\n\t\t\tMergeSort(A, q + 1, r);\n\t\t\tMerge(A, p, q, r);\n\t\t}\n\t}",
"private void recMergeSort(final long[] workSpace, final int lowerBound,\n final int upperBound) {\n if (lowerBound == upperBound) // if range is 1,\n return; // no use sorting\n else { // find midpoint\n final int mid = (lowerBound + upperBound) / 2;\n // sort low half\n recMergeSort(workSpace, lowerBound, mid);\n // sort high half\n recMergeSort(workSpace, mid + 1, upperBound);\n // merge them\n merge(workSpace, lowerBound, mid + 1, upperBound);\n } // end else\n }",
"private static void sort(Object[] a, Object[] tmp,\n int from, int to, Fun isLess) {\n int split = (from + to) / 2;\n if (split - from > 1)\n sort(tmp, a, from, split, isLess);\n if (to - split > 1)\n sort(tmp, a, split, to, isLess);\n int i = from, j = split;\n while (i < split && j < to) {\n if (isLess.apply(tmp[i], tmp[j]) == Boolean.TRUE)\n a[from] = tmp[i++];\n else\n a[from] = tmp[j++];\n ++from;\n }\n if (i < split)\n System.arraycopy(tmp, i, a, from, split - i);\n else if (j < to)\n System.arraycopy(tmp, j, a, from, to - j);\n }",
"public static void main(String[] args) {\n\r\n\t\t int[] arr = generateRandomArrayWithRandomNum();\r\n\t int checksSelectionSort = 0;\r\n\t int checksBubbleSort = 0;\r\n\t int checksMergeSort = 0;\r\n\t int checksQuickSort = 0;\r\n\t int[] copyArr = new int[1000];\r\n\t for (int x = 0; x < 20; x++) {\r\n\t System.arraycopy(arr, 0, copyArr, 0, 1000);\r\n\t checksSelectionSort += doSelectionSort(arr);\r\n\r\n\t \r\n\t System.arraycopy(copyArr, 0, arr, 0, 1000);\r\n\t checksBubbleSort += bubbleSort(copyArr);\r\n\t System.arraycopy(arr, 0, copyArr, 0, 1000);\r\n\t checksMergeSort += new mergeSort().sort(arr);\r\n\t System.arraycopy(copyArr, 0, arr, 0, 1000);\r\n\t checksQuickSort += new quickSort().sort(copyArr);\r\n\t }\r\n\t System.out.println(\"Analysis Of Sorting algorithms \");\r\n\t System.out.println(\"Selection Sort : \"+checksSelectionSort/20);\r\n\t System.out.println(\"Bubble Sort : \"+checksBubbleSort/20);\r\n\t System.out.println(\"Merge Sort : \"+checksMergeSort/20);\r\n\t System.out.println(\"Quick Sort : \"+checksQuickSort/20);\r\n\r\n\t \r\n\t }",
"private static void sort1(int x[], int[] a2, int off, int len) {\n\t\t// Insertion sort on smallest arrays\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && x[j-1]>x[j]; j--)\n\t\t\t\t\tswap(x, a2, j, j-1);\n\t\t\treturn;\n\t\t}\n\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x, l, l+s, l+2*s);\n\t\t\t\tm = med3(x, m-s, m, m+s);\n\t\t\t\tn = med3(x, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tint v = x[m];\n\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && x[b] <= v) {\n\t\t\t\tif (x[b] == v)\n\t\t\t\t\tswap(x,a2,a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && x[c] >= v) {\n\t\t\t\tif (x[c] == v)\n\t\t\t\t\tswap(x, a2,c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x,a2, b++, c--);\n\t\t}\n\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x,a2, off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x,a2, b, n-s, s);\n\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x, a2,off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x, a2,n-s, s);\n\t}",
"private static void mergeSort(int[] attr, int low, int hight) {\n\t\t\n\t}",
"private static void sort(Comparable[] as, Comparable[] aux, int lo, int hi) {\n if (hi <= lo + CUTOFF - 1) {\n Insertion.sort(as, lo, hi);\n return;\n }\n int mid = lo + (hi - lo) / 2;\n sort (as, aux, lo, mid);\n sort (as, aux, mid + 1, hi);\n // Last element of first array is less than the first of the second --> Stop!\n if (!less(as[mid + 1], as[mid])) return;\n merge (as, aux, lo, mid, hi);\n }",
"public MergeSort(){\r\n \r\n }",
"private static void merge(int[] nums, int low, int mid, int high) {\n int n1=mid-low+1;\n int n2=high-mid;\n int[] left=new int[n1];\n int[] right=new int[n2];\n for (int i = 0; i <n1 ; i++) {\n left[i]=nums[i+low];\n }\n for (int j = 0; j < n2; j++) {\n right[j]=nums[mid+1+j];\n }\n int k=low;\n int i=0,j=0;\n while (i< left.length && j< right.length){\n if(left[i]<right[j]){\n nums[k++]=left[i++];\n }\n else {\n nums[k++]=right[j++];\n }\n }\n //copy the remaining elements\n\n while (i<left.length){\n nums[k++]=left[i++];\n }\n while (j< right.length){\n nums[k++]=right[j++];\n }\n }",
"@Override\n public void sort() throws IOException {\n long i = 0;\n // j represents the turn of writing the numbers either to g1 or g2 (or viceversa)\n long j = 0;\n long runSize = (long) Math.pow(2, i);\n long size;\n\n long startTime = System.currentTimeMillis();\n\n System.out.println(\"Strart sorting \"+ this.inputFileName);\n\n while(i <= Math.ceil(Math.log(this.n) / Math.log(2))){\n j = 0;\n do{\n size = merge(runSize, destinationFiles[(int)j % 2]);\n j += 1;\n }while (size/2 == runSize);\n\n System.out.println(\"iteration: \" + i + \", Run Size:\" + runSize + \", Total time elapsed: \" + (System.currentTimeMillis() - startTime));\n i += 1;\n runSize = (long) Math.pow(2, i);\n swipe();\n }\n System.out.println(\"The file has been sorted! Total time elapsed: \"+(System.currentTimeMillis() - startTime));\n\n destinationFiles[0].close();\n destinationFiles[1].close();\n originFiles[0].close();\n originFiles[1].close();\n\n createFile(OUT_PATH +inputFileName);\n copyFile(new File(originFileNames[0]), new File(\"out/TwoWayMergesort/OUT_\"+inputFileName));\n\n }",
"private void quickSort(int[] array, int left, int right) {\n if (left>=right){\n return;\n }\n\n //2. Pick a pivot element -> we will choose the centre element:\n // Note: Better would be to choose left + (right-left)/2 (as this would avoid overflow error for large arrays i.e. 2GB))\n\n int pivot = array[(left+right)/2];\n\n //3. Partition the array around this pivot and return the index of the partition.\n int index = partition(array,left,right,pivot);\n\n //4. Sort on the left and right side recursively.\n quickSort(array,left,index-1); //Left side\n quickSort(array,index,right); //Right side\n }",
"public void sort() {\n if(c==null) {\n int middle;\n\n Comparable[] left, right;\n\n\n if (unsorted.length <= 1) {\n\n sorted = unsorted;\n\n } else {\n\n middle = unsorted.length / 2;\n\n\n left = new Comparable[middle];\n\n right = new Comparable[unsorted.length - middle];\n\n\n System.arraycopy(unsorted, 0, left, 0, middle);\n\n System.arraycopy(unsorted, middle, right, 0, unsorted.length - middle);\n\n\n // Внимание! Опа, рекурсия :)\n\n SimpleMerger leftSort = new SimpleMerger(left, c);\n\n SimpleMerger rightSort = new SimpleMerger(right,c);\n\n\n leftSort.sort();\n\n rightSort.sort();\n\n\n sorted = merge(leftSort.getSorted(), rightSort.getSorted());\n\n }\n }else{\n\n int middle;\n\n Object[] left, right;\n\n\n if (unsorted2.length <= 1) {\n\n sorted2 = unsorted2;\n\n } else {\n\n middle = unsorted2.length / 2;\n\n\n left = new Object[middle];\n\n right = new Object[unsorted2.length - middle];\n System.arraycopy(unsorted2, 0, left, 0, middle);\n\n System.arraycopy(unsorted2, middle, right, 0, unsorted2.length - middle);\n\n\n\n\n SimpleMerger leftSort = new SimpleMerger(left,c);\n\n SimpleMerger rightSort = new SimpleMerger(right,c);\n\n\n leftSort.sort();\n\n rightSort.sort();\n\n\n\n sorted2 = merge2(leftSort.getSorted2(), rightSort.getSorted2());\n\n }\n\n }\n }"
]
| [
"0.73808473",
"0.7138228",
"0.7120298",
"0.7036974",
"0.7006026",
"0.6963342",
"0.69429463",
"0.6936854",
"0.6924753",
"0.6915164",
"0.6902832",
"0.6901035",
"0.6895995",
"0.68912935",
"0.68819636",
"0.68625975",
"0.68571335",
"0.6846859",
"0.6844296",
"0.68201166",
"0.6819292",
"0.68185335",
"0.68151104",
"0.6812634",
"0.68076146",
"0.6806612",
"0.68057394",
"0.67901593",
"0.6778056",
"0.6772173",
"0.6765278",
"0.6755668",
"0.6745065",
"0.6742591",
"0.6735341",
"0.67287034",
"0.6716431",
"0.6709548",
"0.67094797",
"0.67075354",
"0.66917133",
"0.66788703",
"0.66706437",
"0.6665033",
"0.6657082",
"0.66534984",
"0.6641691",
"0.6638718",
"0.6630891",
"0.66213113",
"0.6620164",
"0.6617104",
"0.66112995",
"0.6608837",
"0.6601928",
"0.6600371",
"0.65969485",
"0.6592928",
"0.65810305",
"0.65634036",
"0.6554052",
"0.6553121",
"0.6547897",
"0.65414417",
"0.65259284",
"0.65251356",
"0.6515614",
"0.65069646",
"0.65064484",
"0.6503399",
"0.65021884",
"0.64995974",
"0.6497863",
"0.6497346",
"0.649686",
"0.6494481",
"0.64912623",
"0.6489856",
"0.64870834",
"0.6481699",
"0.6476252",
"0.64721435",
"0.6470998",
"0.64658874",
"0.6464775",
"0.6447373",
"0.6446558",
"0.64445305",
"0.643873",
"0.64334536",
"0.64330477",
"0.6429699",
"0.6429412",
"0.6424757",
"0.6423667",
"0.6415033",
"0.64126563",
"0.6411989",
"0.64113134",
"0.64109814",
"0.6408783"
]
| 0.0 | -1 |
===================== Final do QuickSort ============================= ==================== Inicio da mediana de 3=========================== | public String[][] medianaDeTres(String[][] arr, int primeiro, int ultimo, int requiredData) {
if (requiredData != 4) {
if (primeiro < ultimo) {
int meio = ((primeiro + ultimo) / 2);
int a = Integer.parseInt(arr[primeiro][requiredData]);
int b = Integer.parseInt(arr[meio][requiredData]);
int c = Integer.parseInt(arr[ultimo][requiredData]);
int medianaIndice;
if (a < b) {
if (b < c) {
// a < b && b < c
medianaIndice = meio;
} else {
if (a < c) {
// a < c && c <= b
medianaIndice = ultimo;
} else {
// c <= a && a < b
medianaIndice = primeiro;
}
}
} else {
if (c < b) {
// c < b && b <= a
medianaIndice = meio;
} else {
if (c < a) {
// b <= c && c < a
medianaIndice = ultimo;
} else {
// b <= a && a <= c
medianaIndice = primeiro;
}
}
}
swap(arr, medianaIndice, ultimo);
int pivo = Integer.parseInt(arr[ultimo][requiredData]);
int i = (primeiro - 1);
for (int j = primeiro; j <= ultimo - 1; j++) {
if (Integer.parseInt(arr[j][requiredData]) < pivo) {
i++;
String[] aux = arr[i];
arr[i] = arr[j];
arr[j] = aux;
}
}
String[] aux = arr[i + 1];
arr[i + 1] = arr[ultimo];
arr[ultimo] = aux;
int piAux = i + 1;
medianaDeTres(arr, primeiro, piAux - 1, requiredData);
medianaDeTres(arr, piAux + 1, ultimo, requiredData);
}
} else {
if (primeiro < ultimo) {
Collator collator = Collator.getInstance();
collator.setStrength(Collator.NO_DECOMPOSITION);
int meio = ((primeiro + ultimo) / 2);
String a = (arr[primeiro][requiredData]);
String b = (arr[meio][requiredData]);
String c = (arr[ultimo][requiredData]);
int medianaIndice;
if (collator.compare(b, a) > 0) {
if (collator.compare(c, b) > 0) {
// a < b && b < c
medianaIndice = meio;
} else {
if (collator.compare(c, a) > 0) {
// a < c && c <= b
medianaIndice = ultimo;
} else {
// c <= a && a < b
medianaIndice = primeiro;
}
}
} else {
if (collator.compare(b, c) > 0) {
// c < b && b <= a
medianaIndice = meio;
} else {
if (collator.compare(a, c) > 0) {
// b <= c && c < a
medianaIndice = ultimo;
} else {
// b <= a && a <= c
medianaIndice = primeiro;
}
}
}
swap(arr, medianaIndice, ultimo);
String pivo = (arr[ultimo][requiredData]);
int i = (primeiro - 1);
for (int j = primeiro; j <= ultimo - 1; j++) {
if (collator.compare(pivo, arr[j][requiredData]) > 0) {
i++;
String[] aux = arr[i];
arr[i] = arr[j];
arr[j] = aux;
}
}
String[] aux = arr[i + 1];
arr[i + 1] = arr[ultimo];
arr[ultimo] = aux;
int piAux = i + 1;
medianaDeTres(arr, primeiro, piAux - 1, requiredData);
medianaDeTres(arr, piAux + 1, ultimo, requiredData);
}
}
return arr;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private QuickSort3Way() {}",
"private void quickSort(int start, int end) {\n\t\tint pivot, i, j;\n\t\tif (start < end) {\n\t\t\t// Select first element as Pivot\n\t\t\tpivot = start;\n\t\t\ti = start;\n\t\t\tj = end;\n\n\t\t\t// Base condition\n\t\t\twhile (i < j) {\n\t\t\t\t// increment i till found greater element than pivot\n\t\t\t\tfor (i = start; i <= end; i++) {\n\t\t\t\t\tif (data.get(i) > data.get(pivot)) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// decrement j till found lesser element than pivot\n\t\t\t\tfor (j = end; j >= start; j--) {\n\t\t\t\t\tif (data.get(j) <= data.get(pivot)) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// if i<j than swap\n\t\t\t\tif (i < j) {\n\t\t\t\t\tswap(i, j);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// set pivot to jth element & move pivot to proper position\n\t\t\tswap(j, pivot);\n\n\t\t\t// Repeat for sub arrays\n\t\t\tquickSort(start, j - 1);\n\t\t\tquickSort(j + 1, end);\n\t\t}\n\t}",
"public void quickSort() {\n\t\tquickSort(0, data.size() - 1);\n\t}",
"static void quickSort (int a[], int lo, int hi){\n\t int i=lo, j=hi, h;\r\n\t int pivot=a[lo];\r\n\r\n\t // pembagian\r\n\t do{\r\n\t while (a[i]<pivot) i++;\r\n\t while (a[j]>pivot) j--;\r\n\t if (i<=j)\r\n\t {\r\n\t h=a[i]; a[i]=a[j]; a[j]=h;//tukar\r\n\t i++; j--;\r\n System.out.println(\"i = \"+i + \" j = \" + j);\r\n\t }\r\n\t } while (i<=j);\r\n\r\n\t // pengurutan\r\n\t if (lo<j) quickSort(a, lo, j);\r\n\t if (i<hi) quickSort(a, i, hi);\r\n\t }",
"public static void quickSort(ArrayList<Integer> S){\n\t\t\n\t\tif (S.isEmpty()) { //if empty just return itself \n\t\t\treturn; \n\t\t}\n\t\t\n\t\tint pivot = S.get(S.size()-1); //creating a pivot point for the sort \n\t\t\n\t\tArrayList<Integer> L = new ArrayList<Integer>(); //Creating array list for Less than\n\t\tArrayList<Integer> E = new ArrayList<Integer>(); //Creating array list for Equal than\n\t\tArrayList<Integer> G = new ArrayList<Integer>(); //Creating array list for Greater than \n\t\t\n\t\twhile (!S.isEmpty()) { //run while the array list isn't empty \n\t\t\t\n\t\t\tif (S.get(0)< pivot) { //if its less than the pivot, add less than \n\t\t\t\t\n\t\t\t\tL.add(S.get(0)); //adds the less than \n\t\t\t\tS.remove(0); //removes the elements at that index position \n\t\t\t}\n\t\t\telse if(S.get(0) == pivot) { //if its equal to the pivot, add equal to \n\t\t\t\t\n\t\t\t\tE.add(S.get(0));\n\t\t\t\tS.remove(0);\n\t\t\t}\n\t\t\t\n\t\t\telse if (S.get(0) > pivot) { //if its greater than the pivot point, add greater than \n\t\t\t\t\n\t\t\t\tG.add(S.get(0));\n\t\t\t\tS.remove(0);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\tif (!L.isEmpty()) { //if Less than isn't empty, call quick sort on less than \n\t\t\t\n\t\t\tquickSort(L); //calls the quick sort for less than \n\t\t}\n\t\t\n\t\tif (!G.isEmpty()) { //if Greater than isn't empty, call quick sort on greater than \n\t\t\t\n\t\t\tquickSort(G); //calls quick sort for greater than \n\t\t}\n\t\t\n\t\tS.addAll(L); //Shifting all of the elements to the right \n\t\tS.addAll(E); //Shifting all of the elements to the right \n\t\tS.addAll(G); //Shifting all of the elements to the right \n\t}",
"static void quickSort (double a[], int lo, int hi){\n int i=lo, j=hi;\r\n\t\tdouble h;\r\n double pivot=a[lo];\r\n\r\n // pembagian\r\n do{\r\n while (a[i]<pivot) i++;\r\n while (a[j]>pivot) j--;\r\n if (i<=j)\r\n {\r\n h=a[i]; a[i]=a[j]; a[j]=h;//tukar\r\n i++; j--;\r\n }\r\n } while (i<=j);\r\n\r\n // pengurutan\r\n if (lo<j) quickSort(a, lo, j);\r\n if (i<hi) quickSort(a, i, hi);\r\n }",
"void quickSort(int arr[], int low, int high) \n { \n if (low < high) \n { \n /* pi is partitioning index, arr[pi] is \n now at right place */\n int pi = partition(arr, low, high); \n \n // Recursively sort elements before \n // partition and after partition \n quickSort(arr, low, pi-1); \n quickSort(arr, pi+1, high); \n } \n }",
"public void quickSortIter(){\n int pivot = 0;\n int partition;\n boolean unordered = false;\n do {\n unordered = false;\n partition = pivot;\n for (int i = pivot + 1; i < array.length; i++) {\n if (((Comparable) array[pivot]).compareTo(array[i]) >= 0) {\n if (i - partition > 1) {\n T temp = array[i];\n array[i] = array[partition];\n array[partition] = temp;\n partition++;\n unordered = true;\n } else {\n partition++;\n unordered = true;\n }\n }\n }\n T temp = array[partition];\n array[partition] = array[pivot];\n array[pivot] = temp;\n if (partition < array.length) {\n pivot = partition + 1;\n for (int i = 0; i < partition; i++) {\n if (((Comparable) array[i]).compareTo(array[i + 1]) > 0) {\n pivot = i;\n break;\n }\n }\n }\n } while (unordered);\n\n }",
"public static void intQSort(int v[], int l, int r) {\n\n int tmp; //tmp variable for swapping\n\n if (INSERTIONENABLED) {\n\n //Use insertion sort for arrays smaller than CUTOFF\n if (r < CUTOFF) {\n\n for(int i = l; i < r; i++) {\n for(int j = i; j > 0 && v[j - 1] > v[j]; j--) {\n // swap(j, j -1) {\n tmp=v[j - 1];\n v[j - 1]=v[j];\n v[j]=tmp;\n // }\n }\n }\n\n return;\n }\n }\n\n int pivot;\n int m = l + (int) (Math.random() * ((r - l) + 1)); // random number between first and last, Peto's remark\n\n //median(v[l], v[m], v[r]) {\n if (v[l] <= v[m]) {\n if (v[m] <= v[r])\n pivot = v[m];\n else {\n if (v[l] <= v[r])\n pivot = v[r];\n else\n pivot = v[l];\n }\n } else {\n if (v[m] <= v[r]) {\n if (v[l] <= v[r])\n pivot = v[l];\n else\n pivot = v[r];\n } \n else\n pivot = v[m];\n }\n // }\n\n int i=l,j=r;\n\n //Partioning\n while(i<=j) {\n\n while(v[i]<pivot) i++;\n while(v[j]>pivot) j--;\n\n if(i<=j) {\n //swap(i, j) {\n tmp=v[i];\n v[i]=v[j];\n v[j]=tmp;\n // }\n\n i++;\n j--;\n }\n }\n\n if(l<j) \n intQSort(v,l,j);\n\n if(i<r) \n intQSort(v,i,r);\n }",
"public void quicksort()\n { quicksort(this.heap, 0, heap.size()-1);\n }",
"public void quicksort() {\r\n quicksort(mArray, 0, mArray.length -1);\r\n }",
"public void sort() {\n Stack<Pair> stack = new Stack();\n //fill the stack\n Pair temp = new Pair(0, a.length);\n stack.push(temp);\n quickSort(stack,stack.peek().first, stack.peek().n);\n }",
"public ListUtilities quicksort(){\n\t\t\n\t\tListUtilities lo = this.returnToStart();\n\t\tListUtilities hi = this.goToEnd();\n\t\tListUtilities sorted = this.partition(lo, hi);\n\t\t\n\t\treturn sorted.returnToStart();\t\t\n\t}",
"public static void quickSort(LinkedQueue q) {\n // Your solution here.\n if (q.isEmpty())\n {\n return;\n }\n int pivotInt = (int) (1 + Math.random() * q.size());\n Object pivot = q.nth(pivotInt);\n LinkedQueue qSmall = new LinkedQueue();\n LinkedQueue qEquals = new LinkedQueue();\n LinkedQueue qLarge = new LinkedQueue();\n \n ListSorts.partition(q, (Comparable) pivot, qSmall, qEquals, qLarge);\n \n ListSorts.quickSort(qSmall);\n ListSorts.quickSort(qLarge);\n \n q.append(qSmall);\n q.append(qEquals);\n q.append(qLarge);\n \n\n }",
"private static void quicksort( Comparable [ ] a, int low, int high ) {\n if( low + CUTOFF > high )\n insertionSort( a, low, high );\n else {\n// Sort low, middle, high\n int middle = ( low + high ) / 2;\n if( a[ middle ].lessThan( a[ low ] ) )\n swapReferences( a, low, middle );\n if( a[ high ].lessThan( a[ low ] ) )\n swapReferences( a, low, high );\n if( a[ high ].lessThan( a[ middle ] ) )\n swapReferences( a, middle, high );\n// Place pivot at position high - 1\n swapReferences( a, middle, high - 1 );\n Comparable pivot = a[ high - 1 ];\n// Begin partitioning\n int i, j;\n for( i = low, j = high - 1; ; ) {\n while( a[ ++i ].lessThan( pivot ) );\n while( pivot.lessThan( a[ --j ] ) );\n if( i < j )\n swapReferences( a, i, j );\n else\n break;\n }\n// Restore pivot\n swapReferences( a, i, high - 1 );\n quicksort( a, low, i - 1 ); // Sort small elements\n quicksort( a, i + 1, high ); // Sort large elements\n }\n }",
"public void quicksort(int[] a, int start, int end){\n\t\tif(end <= start) return;\r\n\t\t//2 number\r\n//\t\tif(end - start == 1 && a[start] > a[end]){\r\n//\t\t\tswap(a, start, end);\r\n//\t\t\treturn;\r\n//\t\t}\r\n\t\tif((end - start )< 20){\r\n\t\t\tinsertSort(a, start,end);\r\n\t\t\treturn;\r\n\t\t}\r\n\t int pivot = getPivot(a, start, end);\r\n\t int i = start, j = end - 1;\r\n\t while(i < j){\r\n\t while(i < j && a[++i] < pivot);\r\n\t while(i < j && a[--j] > pivot);\r\n\t if(i < j)\r\n\t swap(a, i, j);\r\n\t }\r\n\t swap(a, i, end -1);\r\n\t quicksort(a, start, i - 1);\r\n\t quicksort(a, i + 1, end);\r\n\t}",
"public int[] quicksort(int A[], int izq, int der) {\r\n\r\n\t\t int piv=A[izq]; // tomamos el primer elemento como pivote\r\n\t\t int i=izq; // i realiza la búsqueda de izquierda a derecha\r\n\t\t int j=der; // j realiza la búsqueda de derecha a izquierda\r\n\t\t int aux;\r\n\t\t \r\n\t\t while(i<j){ // mientras no se crucen...\r\n\t\t while(A[i]<=piv && i<j) i++; // busca un elemento mayor que pivote,\r\n\t\t while(A[j]>piv) j--; // busca un elemento menor que pivote,\r\n\t\t if (i<j) { // si los encuentra y no se han cruzado... \r\n\t\t aux= A[i]; // los intercambia.\r\n\t\t A[i]=A[j];\r\n\t\t A[j]=aux;\r\n\t\t }\r\n\t\t }\r\n\t\t A[izq]=A[j]; // colocamos el pivote en su lugar de la forma [menores][pivote][mayores]\r\n\t\t A[j]=piv; \r\n\t\t if(izq<j-1)\r\n\t\t quicksort(A,izq,j-1); // ordenamos mitad izquierda\r\n\t\t if(j+1 <der)\r\n\t\t quicksort(A,j+1,der); // ordenamos mitad derecha\r\n\t\t \r\n\t return A;\r\n\t\t\t }",
"public void quickSortHelper(int start, int end){\n if(start < end){\n //partition index calls partition that returns idx\n //and also puts toSort[partitionidx] in the right place\n int partitionidx = partition(start, end);\n\n //sorts elements before and after the partitions\n //recursive - nice\n //System.out.println(\"test\");\n quickSortHelper(start, partitionidx - 1); //befre\n quickSortHelper(partitionidx + 1, end); //after\n }\n }",
"private void quickSortM(int[] arr, int start, int end) {\n\t\tif(start>=end)\r\n\t\t\treturn ;\r\n\t\tint bounary = partition(arr,start,end);\r\n\t\tquickSortM(arr,start,bounary-1);\r\n\t\tquickSortM(arr, bounary+1, end);\r\n\t}",
"private static void quickSortArray(int[] a, int startIndex, int endIndex) {\n\t\t\n\t\t\n\t\tif (startIndex<endIndex){\n\t\t\t\n\t\t\t// calculate the partitioned index\n\t\t\t\n\t\t\tint partitionIndex= partion(a, startIndex,endIndex);\n\t\t\t\n\t\t\tquickSortArray(a,startIndex,partitionIndex-1);\n\t\t\tquickSortArray(a,partitionIndex+1,endIndex);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"private void quicksort(int inLow, int inHigh) {\n\t\tint i = inLow; int j = inHigh;\n\t\t//____| Get Pivot from middle.\n\t\tfloat pivot = gameObjectsList.get(inLow + (inHigh - inLow)/2).getX();\n\t\t//____| Divide List\n\t\twhile (i <= j){\n\t\t\twhile(gameObjectsList.get(i).getX() < pivot){\n\t\t\t\ti++;\n\t\t\t}\n\t\t\twhile(gameObjectsList.get(j).getX() > pivot){\n\t\t\t\tj--;\n\t\t\t}\n\t\t\tif (i<=j){\n\t\t\t\tCollections.swap(gameObjectsList, i, j);\n\t\t\t\ti++;\n\t\t\t\tj--;\n\t\t\t}\n\t\t}\n\t\tif (inLow < j)\n\t\t\tquicksort(inLow, j);\n\t\tif (i < inHigh)\n\t\t\tquicksort(i, inHigh);\n\t}",
"public static void quickSort(int[] arr, int lo, int hi) {\n //write your code here\n if(lo>hi){\n return;\n }\n int pivot = partition(arr, arr[hi], lo, hi);\n quickSort(arr, lo, pivot-1);\n quickSort(arr, pivot+1, hi);\n }",
"public void sort() {\n\t\tSystem.out.println(\"Quick Sort Algorithm invoked\");\n\n\t}",
"private void quickSort(List<T> array, int startIndex, int endIndex, FuncInterface<T> ICompare)\n {\n if (startIndex < endIndex)\n {\n // calculate the pivotIndex\n int pivotIndex = partition(array, startIndex, endIndex, ICompare);\n // quickSort the left sub-array\n quickSort(array, startIndex, pivotIndex, ICompare);\n // quickSort the right sub-array\n quickSort(array, pivotIndex + 1, endIndex, ICompare); \n }\n }",
"@Test\n public void testQuickSort() {\n System.out.println(\"QuickSort listo\");\n Comparable[] list = {3,2,5,4,1};\n QuickSort instance = new QuickSort();\n Comparable[] expResult = {1,2,3,4,5};\n Comparable[] result = instance.QuickSort(list, 0, list.length-1);\n assertArrayEquals(expResult, result);\n }",
"private static void quickSort(double arr[],Integer[] pageIDS, int low, int high)\n {\n if (low < high)\n {\n /* pi is partitioning index, arr[pi] is\n now at right place */\n int pi = partition(arr,pageIDS, low, high);\n\n // Recursively sort elements before\n // partition and after partition\n quickSort(arr, pageIDS, low, pi-1);\n quickSort(arr, pageIDS,pi+1, high);\n }\n }",
"private void quickSort(int low, int high) {\n\t\tint i = low;\n\t\tint k = high;\n\t\tint pivot = array[low + (high - low) / 2];\n\n\t\twhile (i <= k) {\n\t\t\t// Stops when element on left side is greater than the pivot\n\t\t\twhile (array[i] < pivot) {\n\t\t\t\ti++;\n\t\t\t}\n\t\t\t// Stops when the element on the right side is less than the pivot\n\t\t\twhile (array[k] > pivot) {\n\t\t\t\tk--;\n\t\t\t}\n\t\t\t// Swap the left and right elements, since the one on the left is\n\t\t\t// greater than the one on the right (proved via pivot)\n\t\t\tif (i <= k) {\n\t\t\t\texchangeNums(i, k);\n\t\t\t\t// Move on to the next elements\n\t\t\t\ti++;\n\t\t\t\tk--;\n\t\t\t}\n\t\t}\n\t\t// Recursive calls\n\t\tif (low < k) {\n\t\t\tquickSort(low, k);\n\t\t}\n\t\tif (i < high) {\n\t\t\tquickSort(i, high);\n\t\t}\n\t}",
"public static void QuickSort(int a[]) {\n\t Sort(a, 0, a.length-1); \n\t }",
"public static void quickSortTest(){\n\t\tTransformer soundwave = new Transformer(\"Soundwave\", 'D', new int[] {8,9,2,6,7,5,6,10});\n\t\tTransformer bluestreak = new Transformer(\"Bluestreak\", 'A', new int[] {6,6,7,9,5,2,9,7});\n\t\tTransformer hubcap = new Transformer(\"Hubcap\", 'A', new int[] {4,4,4,4,4,4,4,4});\n\t\tTransformer abominus = new Transformer(\"Abominus\", 'D', new int[] {10,1,3,10,5,10,8,4});\n\t\t\n\t\tgame.addTransformer(soundwave);\n\t\tgame.addTransformer(bluestreak);\n\t\tgame.addTransformer(hubcap);\n\t\tgame.addTransformer(abominus);\n\t\t\n\t\tgame.sortCompetitorsByRank();\n\t\tgame.printSortedRoster();\n\t}",
"void quick_sort(int intArray[], int low, int high)\n {\n if (low < high)\n {\n // partition the array around pi=>partitioning index and return pi\n int pi = partition(intArray, low, high);\n // sort each partition recursively\n quick_sort(intArray, low, pi - 1);\n quick_sort(intArray, pi + 1, high);\n }\n }",
"private static <T> void quickSort(@Nonnull List<T> x, @Nonnull Comparator<? super T> comparator, int off, int len) {\n if (len < 7) {\n for (int i = off; i < len + off; i++) {\n for (int j = i; j > off && comparator.compare(x.get(j), x.get(j - 1)) < 0; j--) {\n swapElements(x, j, j - 1);\n }\n }\n return;\n }\n\n // Choose a partition element, v\n int m = off + (len >> 1); // Small arrays, middle element\n if (len > 7) {\n int l = off;\n int n = off + len - 1;\n if (len > 40) { // Big arrays, pseudomedian of 9\n int s = len / 8;\n l = med3(x, comparator, l, l + s, l + 2 * s);\n m = med3(x, comparator, m - s, m, m + s);\n n = med3(x, comparator, n - 2 * s, n - s, n);\n }\n m = med3(x, comparator, l, m, n); // Mid-size, med of 3\n }\n T v = x.get(m);\n\n // Establish Invariant: v* (<v)* (>v)* v*\n int a = off;\n int b = a;\n int c = off + len - 1;\n int d = c;\n while (true) {\n while (b <= c && comparator.compare(x.get(b), v) <= 0) {\n if (comparator.compare(x.get(b), v) == 0) {\n swapElements(x, a++, b);\n }\n b++;\n }\n while (c >= b && comparator.compare(v, x.get(c)) <= 0) {\n if (comparator.compare(x.get(c), v) == 0) {\n swapElements(x, c, d--);\n }\n c--;\n }\n if (b > c) break;\n swapElements(x, b++, c--);\n }\n\n // Swap partition elements back to middle\n int n = off + len;\n int s = Math.min(a - off, b - a);\n vecswap(x, off, b - s, s);\n s = Math.min(d - c, n - d - 1);\n vecswap(x, b, n - s, s);\n\n // Recursively sort non-partition-elements\n if ((s = b - a) > 1) quickSort(x, comparator, off, s);\n if ((s = d - c) > 1) quickSort(x, comparator, n - s, s);\n }",
"private static <AnyType extends Comparable<? super AnyType>> void quicksort(AnyType[] a, int left, int right)\n {\n if(left + CUTOFF <= right)\n {\n AnyType pivot = median3(a, left, right);\n\n // Begin partitioning\n int i = left, j = right - 1;\n for( ; ; )\n {\n while(a[++i].compareTo(pivot) < 0);\n while(a[--j].compareTo(pivot) > 0);\n if(i < j)\n CommonFunc.swapReference(a, i, j);\n else\n break;\n }\n\n CommonFunc.swapReference(a, i, right - 1);\n\n quicksort(a, left, i - 1);\n quicksort(a, i + 1, right);\n }\n else // Do an insertion sort on the subarray\n Insertionsort.insertionsort(a, left, right);\n }",
"public void quicksort(ArrayList<Node> array, int low, int high)\n {\n Node pivot = new Node(array.get(low).element);\n //Start value for pivot index\n int pivotIndex = low;\n //Define index in list where values start being higher than the pivot \n int higherThan = -1;\n //Begin the for loop after the first element\n for (int i = low + 1; i <= high; i++)\n \n { int gap = Math.abs(pivotIndex - i);\n if (array.get(i).element.compareTo(pivot.element) <= 0 && gap == 1)\n { switchPosition(i,pivotIndex);\n pivotIndex = i;\n }\n else if (array.get(i).element.compareTo(pivot.element) <= 0 && gap > 1)\n { //higherThan = i;\n switchPosition(i, pivotIndex);\n int temp = i;\n i = pivotIndex;\n pivotIndex = temp;\n switchPosition(i+1, pivotIndex); \n pivotIndex = i+1;\n //i++;\n //pivotIndex = higherThan;\n //higherThan++;\n }\n else // (array.get(i).element.compareTo(pivot.element) > 0 )\n { //Do nothing, element should stay in its position greater than the pivot\n }\n \n }\n System.out.println(\"Pivot index: \" + pivotIndex + \"\\n\");\n for (int i = 0; i < array.size(); i++)\n {\n System.out.println(\" \" + array.get(i).element.toString());\n }\n if ((pivotIndex - 1) >= 1)\n { quicksort(array, 0, pivotIndex - 1);\n System.out.println(\"\\n low index call, pivot element \" + array.get(pivotIndex).element.toString());\n }\n if ((high - pivotIndex) >= 1)\n {\n quicksort(array, pivotIndex + 1, high-1); \n }\n }",
"private void doQuickSort(int lowerIndex, int higherIndex){\n\t\tint lowItter = lowerIndex;\n\t\tint highItter = higherIndex;\n \n\t\t// use the middle as a pivot numberr\n int middleIndex = lowerIndex + (higherIndex - lowerIndex)/2;\n\t\tint pivot = sortArray[middleIndex];\n \n\t\twhile (lowItter <= highItter) {\n\t\t\twhile (sortArray[lowItter] < pivot)\n lowItter++;\n \n\t\t\twhile (sortArray[highItter] > pivot)\n highItter--;\n \n compCount++;\n\t\t\tif (lowItter <= highItter) {\n\t\t\t\tswap(lowItter, highItter);\n swapCount++;\n \n\t\t\t\tlowItter++;\n\t\t\t\thighItter--;\n\t\t }\n\t\t}\n \n compCount++;\n\t\tif (lowerIndex < higherIndex)\n\t\t\tdoQuickSort(lowerIndex, highItter);\n \n compCount++;\n\t\tif (lowItter < higherIndex)\n\t\t\tdoQuickSort(lowItter, higherIndex);\n \n\t}",
"public static void main(String[] args) {\n\r\n\t\tint [] array1 = {3,2,5,0,1};\r\n\t\tint [] array2 = {8,10,7,6,4};\r\n\t\tint [] array3= new int[array1.length+array2.length];\r\n\t\t\r\n\t\tint i=0,j=0;\r\n\t\t\r\n\t\twhile(i<array1.length){\r\n\t\t\tarray3[i]=array1[i];\r\n\t\t\ti++;\r\n\t\t}\r\n\t\t\r\n\t\twhile(j<array2.length){\r\n\t\t\tarray3[i]=array2[j];\r\n\t\t\ti++;\r\n\t\t\tj++;\r\n\t\t}\r\n\t\tQuickSort(array3,0,array3.length-1,false,false);\r\n\t\t\r\n\t}",
"private int partition(Comparable[] items, int first, int last) {\n /**\n * Get a random pivot for the current section.\n * <p/>\n * It should be noted that I made a decision to choose a randomized pivot\n * over selecting a hard-coded pivot (i.e. the middle), or a median. This\n * is to avoid situations where we might get the 'worst case' scenario for\n * QuickSort, leading to O(n^2) time complexity. By using a random pivot,\n * it becomes highly unlikely for the algorithm to run into this situation.\n * <p/>\n * I felt this was the safest and most reliable way of implementing the\n * pivot selection.\n */\n int pivot = (int) Math.floor(UtilityMethods.getPivot(first, last));\n\n /**\n * Swap the pivot item with the first element to move it out\n * of the way during sorting. Assign a variable to hold this\n * for quick comparison.\n */\n UtilityMethods.swapElements(items, pivot, first);\n Comparable pivotElement = items[first];\n\n /**\n * The index to begin the swapping of the elements is the next\n * index after the pivot, currently at first.\n */\n int swapPosition = first + 1;\n\n /**\n * For each element within the current section, we iterate through\n * the section, starting from one after the pivot (the swap position)\n */\n for (int currentElement = swapPosition; currentElement <= last; currentElement++) {\n\n /**\n * If the currently being checked element is smaller than the pivot,\n * we swap the current element with the 'swap position'. This results\n * in gathering all of the numbers less than the pivot element to\n * one side of the array.\n *\n * The index that is then to be swapped is incremented. This means\n * that any elements before the swap position will be sorted as 'less'\n * than the pivot. We don't need to move any elements greater than\n * the pivot.\n */\n if (items[currentElement].compareTo(pivotElement) < 0) {\n UtilityMethods.swapElements(items, swapPosition, currentElement);\n swapPosition++;\n }\n\n }\n\n /**\n * After all elements have been swapped around, we switch the first element\n * (the pivot element), with the last sorted 'less than' element in swap\n * position -1. The works, as it doesn't matter what element is in what\n * position, as long as there are greater and less than sections. By\n * doing this swap, we keep the elements less than the pivot to the left\n * of the pivot, and put the pivot in the 'correct' sorted place in the list.\n */\n UtilityMethods.swapElements(items, first, swapPosition - 1);\n\n /**\n * We return the swapPosition -1, which is the final index of the pivot element.\n */\n return swapPosition - 1;\n }",
"static void quickSort(int[] arr, int left, int right){\n int position = partition(arr, left, right);\n if(left<position){\n quickSort(arr,left,position);\n }\n if(position+1<right){\n quickSort(arr,position+1,right);\n }\n }",
"private void quickSort(Comparable[] items, int left, int right) {\n if (left < right) {\n /**\n * Split the list at the pivot through partitioning it,\n * and return the pivot to separate out the less than\n * and greater than sides.\n */\n int pivot = partition(items, left, right);\n if (pivot - 1 > left) {\n quickSort(items, left, pivot - 1);\n }\n if (pivot + 1 < right) {\n quickSort(items, pivot + 1, right);\n }\n }\n }",
"public static void quickSort(Integer[] arr) {\n int len = arr.length;\n// qsort3way(arr, 0, len - 1);\n qsort(arr, 0, len - 1);\n }",
"private void quickSort(Node<T> low, Node<T> high) {\n if (!Objects.isNull(high) &&\n low != high && low != high.getNext()) {\n\n Node<T> pivot = partition(low, high);\n quickSort(low, pivot.getPrev());\n quickSort(pivot.getNext(), high);\n }\n }",
"private static void quickSort(int[] array, int begin, int end, boolean useMedian) {\n int i = begin;\n int j = end;\n if (array.length==0 || array == null) {\n return;\n }\n int pivot = array[begin];\n if (useMedian) { \n pivot = array[begin + (end - begin) / 2];\n }\n\n while (i <= j) { \n while (array[i] < pivot) { \n i++;\n }\n while (array[j] > pivot) { \n j--; r\n }\n if (i <= j) { \n swap(array, i, j); \n i++;\n j--;\n }\n }\n\n if (begin < j) { \n quickSort(array, begin, j, useMedian);\n }\n if (i < end) { \n quickSort(array, i, end, useMedian);\n }\n }",
"private static void quickSort(int[] array, int startIndex, int rightIndex) {\n if (startIndex < rightIndex) {\n int pivot = partition(array, startIndex, rightIndex);\n quickSort(array, startIndex, pivot - 1);\n quickSort(array, pivot + 1, rightIndex);\n }\n }",
"public static void quickSort(int[] src) {\n if (src == null || src.length <= 1) return;\n\n rPartition(src, 0, src.length - 1);\n }",
"public void quickSort() {\n if (actualArray == null || actualArray.length == 0) {\n return;\n }\n quickSort(0, actualArray.length - 1);\n }",
"static void quicksort( Vector<ECG> L, Vector<Paciente> m,int ini, int fin){\n\t\tif(ini<fin){\n\t\t\tint x=pivotear(L,m,ini,fin);\n\t\t\tquicksort(L,m,ini,x-1);\n\t\t\tquicksort(L,m,x+1,fin);\n\t\t}\n\t}",
"public static void main(String[] args){\n int [] a= {18,10,23,46,9};\n quickSort(a,0,a.length-1);\n }",
"public static void main(String[] args){\n\tint[] o = {3,1,2,2,4};\n\tint[] p = {3,7,1,4,32,95,47,12,50,41};\n\tSystem.out.println(toString(o));\n\tSystem.out.println(toString(quicksort(o,0,o.length)));\n }",
"public static void ordenarQuickSort( Comparable[ ] datos )\n\t{\n\t\t// TODO \n\t\t// Ejecuto Quick Sort y ordeno recursivamente las secciones restantes\n\t\tint inicio = 0;//indice que indica el inicio del ordenamiento por pivote\n\t\tint fin = datos.length; //indice que indica el final del ordenamiento por pivote\n\t\tComparable pivote = datos[inicio]; //escogo el pivote como el primer termino del arreglo\n\t\tint primermayor = inicio;\n\t\tif( inicio != fin)\n\t\t{\n\t\t\t//primer ordenamiento\n\t\t\tfor(int i=inicio +1; i<fin; i++) //ordena los elementos con respecto al pivote empezando por el segundo de la lista\n\t\t\t{\n\t\t\t\tif(less(datos[i], pivote)) \n\t\t\t\t{\n\t\t\t\t\t//si el elemento en la posicion i es menor al pivote se intercambio con el indice del primer elemento mayor al pivote\n\t\t\t\t\texchange(datos, i, primermayor);\n\t\t\t\t\tprimermayor++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//ordenamientos sucesivos\n\t\t\tQuickSort (datos, inicio, primermayor);\n\t\t\tQuickSort (datos, primermayor+1, fin);\n\t\t}\n\t}",
"public static void quickSort(int[] a, int startIndex, int endIndex) {\r\n int pivotIndex; // the index of pivot returned by the quicksort partition\r\n // if the set has more than one element, then partition\r\n if (startIndex < endIndex) {\r\n // partition and return the pivotIndex\r\n pivotIndex = partition(a, startIndex, endIndex);\r\n // recursive call to quicksort on low half\r\n quickSort(a, startIndex, pivotIndex - 1);\r\n // recursive call to quicksort on high half \r\n quickSort(a, pivotIndex + 1, endIndex);\r\n } // end if\r\n }",
"protected static <T extends Comparable<? super T>> void quickSort(List<T> a,\n int low, int high){\n // Example\n // low = 0, high = 5, center = 2\n // a - 1 3 4 2 5 6 \n // a[low] = 1, a[center] = 4, a[high] = 6\n // sort if necessary\n // 4 is median, place median in position high - 1\n // pivot = 4\n // a - 1 3 5 2 4 6\n // Let i = low + 1, and j = high - 2\n // a[i] = 3, a[j] = 2\n // increment i until a[i] > pivot\n // i = 2\n // decrement j until a[j] < pivot\n // j = 3\n // swap a[i] and a[j]\n // a - 1 3 2 5 4 6\n // continue\n // i = 3\n // j = 2\n // when i and j cross\n // replace median at position i\n // a - 1 3 2 4 5 6\n // sort low to i - 1\n // sort i + 1 to high\n // a - 1 2 3 4 5 6\n\n // If length of array is short enough use insertion sort\n if(high - low < CUTOFF){\n insertionSort(a, low, high);\n return;\n } \n\n // Median of three\n int center = (high + low)/2;\n // sort low, center, high\n // 3 2 1\n // if low is greater than center\n if(a.get(low).compareTo(a.get(center)) > 0){\n swapReferences(a, low, center);\n // low is less than center\n // 2 3 1\n }\n // if center is greater than high\n if(a.get(center).compareTo(a.get(high)) > 0){\n swapReferences(a, center, high);\n // high is largest\n // 2 1 3\n }\n // if low is greater than center\n if(a.get(low).compareTo(a.get(center)) > 0){\n swapReferences(a, low, center);\n // low is less than center\n // 1 2 3\n }\n\n // center is median and will be used as pivot\n // place pivot at position high - 1\n swapReferences(a, center, high - 1);\n // store pivot value for easy accesss\n T pivot = a.get(high - 1);\n\n // partition array into elements smaller than and greater than pivot\n // low is already less than pivot\n // high is already greater than pivot\n int i = low + 1;\n int j = high - 2;\n while(true){\n // scan i to the right until object greater than pivot is found\n // when loop stops i will be pointing at element greater than pivot\n while(a.get(i).compareTo(pivot) < 0){\n i++;\n }\n\n // scan j to the left until object less than pivot is found\n // when loop stops j will be pointing to an element less than pivot\n while(a.get(j).compareTo(pivot) > 0){\n j--;\n }\n\n // if i and j cross than partitioning is complete\n if(i >= j){\n break;\n }\n\n swapReferences(a, i, j);\n\n // after swapping move to next position to check\n i++;\n j--;\n }\n\n // Put pivot in between elements less than and greater than itself\n // i is greater than so should belong above pivot\n swapReferences(a, high - 1, i);\n \n // Recursively sort element smaller than pivot and greater than pivot\n quickSort(a, low, i - 1);\n quickSort(a, i+1, high);\n }",
"public String[][] quickSort(String[][] arr, int inicio, int fim, int requiredData) { // Função que realiza\r\n\t\tif (requiredData != 4) {\r\n\t\t\tif (inicio < fim) {\r\n\t\t\t\tint pivo;\r\n\t\t\t\tpivo = Integer.parseInt(arr[fim][requiredData]); // Pivo ser� o ultimo de cada galho\r\n\r\n\t\t\t\tint i = (inicio - 1);\r\n\t\t\t\tfor (int j = inicio; j <= fim - 1; j++) {\r\n\r\n\t\t\t\t\tif (Integer.parseInt(arr[j][requiredData]) < pivo) {\r\n\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\tString[] aux = arr[i];\r\n\t\t\t\t\t\tarr[i] = arr[j];\r\n\t\t\t\t\t\tarr[j] = aux;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tString[] aux = arr[i + 1];\r\n\t\t\t\tarr[i + 1] = arr[fim];\r\n\t\t\t\tarr[fim] = aux;\r\n\t\t\t\tint piAux = i + 1;\r\n\r\n\t\t\t\t// Funcao recursiva para cada ramo da arvore\r\n\t\t\t\tquickSort(arr, inicio, piAux - 1, requiredData);\r\n\t\t\t\tquickSort(arr, piAux + 1, fim, requiredData);\r\n\t\t\t\treturn arr;\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tCollator collator = Collator.getInstance();\r\n\t\t\tcollator.setStrength(Collator.NO_DECOMPOSITION);\r\n\t\t\tif (inicio < fim) {\r\n\t\t\t\tString pivo = arr[fim][requiredData];\r\n\r\n\t\t\t\tint i = (inicio - 1);\r\n\t\t\t\tfor (int j = inicio; j <= fim - 1; j++) {\r\n\r\n\t\t\t\t\tif (collator.compare(pivo, arr[j][requiredData]) > 0) {\r\n\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\tString[] aux = arr[i];\r\n\t\t\t\t\t\tarr[i] = arr[j];\r\n\t\t\t\t\t\tarr[j] = aux;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tString[] aux = arr[i + 1];\r\n\t\t\t\tarr[i + 1] = arr[fim];\r\n\t\t\t\tarr[fim] = aux;\r\n\t\t\t\tint piAux = i + 1;\r\n\r\n\t\t\t\t// Funcao recursiva para cada ramo da arvore\r\n\t\t\t\tquickSort(arr, inicio, piAux - 1, requiredData);\r\n\t\t\t\tquickSort(arr, piAux + 1, fim, requiredData);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn arr;\r\n\t}",
"private static <E extends Comparable<? super E>> void quickSortHelper(\r\n\t\t\tComparable<E>[] data, int left, int right) {\r\n\t\tif (left + CUTOFF <= right) {\r\n\t\t\tE pivot = median3(data, left, right);\r\n\t\t\tint partition = partition(data, left, right, pivot);\r\n\t\t\tquickSortHelper(data, left, partition - 1);\r\n\t\t\tquickSortHelper(data, partition + 1, right);\r\n\t\t} else {\r\n\t\t\tinsertionSort(data, left, right);\r\n\t\t}\r\n\t}",
"public <T extends Comparable<T>> int partition(T[] list, int first, int last) {\n\t/**\n\t * System.out.println(\"hey\" + Arrays.toString(list));\n\n\tint pivotIndex = 0;\n\tif(list.length < 3) {\n\t\tpivotIndex = 0;\n\t} else {\n\t\tT[] temp = Arrays.copyOfRange(list, 0, 3);\n\t\tArrays.sort(temp);\n\t\tT a = temp[1];\n\t\tfor(int i=0; i<3; i++) {\n\t\t\tif(a.equals(list[i])) {\n\t\t\t\tpivotIndex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// Move pivot to first Index...\n\t\tT tempo = list[first];\n\t\tlist[first] = list[pivotIndex];\n\t\tlist[pivotIndex] = tempo;\n\t}\n\t\n\t\t */\n\t\n\t\n\tT pivot = list[first]; \n\tdisplay(list, pivot);\n\t// Choose the first element as the pivot 17 \n\tint low = first + 1; // Index for forward search\n\tint high = last; \n\t// Index for backward search\n\n\twhile (high > low) {\n\t\t// Search forward from left\n\t\twhile (low <= high && list[low].compareTo(pivot) <= 0)\n\t\t\tlow++;\n\n\t\t// Search backward from right\n\t\twhile (low <= high && list[high].compareTo(pivot) > 0)\n\t\t\thigh--;\n\n\t\t// Swap two elements in the list\n\t\tif (high > low) {\n\t\t\tT temp = list[high]; \n\t\t\tlist[high] = list[low]; \n\t\t\tlist[low] = temp;\n\t\t} \n\t} \n\n\n\twhile (high > first && list[high].compareTo(pivot) >= 0) high--;\n\tif (list[high].compareTo(pivot) <= 0){ \n\t\tlist[first] = list[high]; \n\t\tlist[high] = pivot;\n\t\treturn high;\n\t}else {\n\t\treturn first; \n\t}\n}",
"private static void quickSort(Array A, int iStart, int iEnd)\n\t{\n\t\tif (iStart == iEnd)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tint pivot = Rand.randInt(iStart, iEnd);\n\t\tpivot = partition(A, iStart, iEnd, pivot);\n\t\tif (pivot > iStart)\n\t\t{\n\t\t\tquickSort(A, iStart, pivot - 1);\n\t\t}\n\t\tif (pivot < iEnd)\n\t\t{\n\t\t\tquickSort(A, pivot + 1, iEnd);\n\t\t}\n\t}",
"public static void main(String[] args){\n\n Scanner sc = new Scanner(System.in);\n String[] elements = sc.nextLine().trim().split(\" \");\n int[] unsorted = Arrays.stream(elements).parallel()\n .mapToInt(Integer::parseInt).toArray();\n /* System.out.println(partition(unsorted, 0, unsorted.length-1));\n System.out.println(Arrays.toString(unsorted));*/\n quickSort(unsorted, 0, unsorted.length-1);\n }",
"public void doQuickSort() {\n\t\t\n\t\twhile(true) {\n\t\t\tSystem.out.println(\"Enter 1, to choose the pivot as 1st element\");\n\t\t\tSystem.out.println(\"Enter 2, to Choose the pivot as random number\");\n\t\t\tSystem.out.println(\"Enter 3, to choose the pivot as median of 3 random numbers\");\n\t\t\t//System.out.println(\"Enter any random number to choose the pivot from median of median method\");\n\t\t\tchoice = quickInput.nextLine();\n\t\t\t\tif(choice.equals(\"1\") || choice.equals(\"2\") || choice.equals(\"3\")) {\n\t\t\t\t\tSystem.out.println(\"Please enter the value of L to run insertion Sort: (0 if not applicable) \");\n\t\t\t\t\tchunkValue = quickInput.nextInt();\n\t\t\t\t\tQuickAlgorithm quick = new QuickAlgorithm(dataSet, choice, chunkValue);\n\t\t\t\t\tquick.processFileData();\n\t\t\t\t\tdataSet = quick.getFinalDataSet();\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Invalid value.. Try again..!!!\");\n\t\t\t\t}\n\t\t}\n\t\t\n\t\tquickInput = new Scanner(System.in);\n\t\t\n\t\t\n\t\tSystem.out.println(\"Would you like to export the result array to a csv file?\"\n\t\t\t\t+ \"('Y' for yes)\");\n\t\tif(quickInput.nextLine().equalsIgnoreCase(\"Y\")) {\n\t\t\n\t\t\t// Write the output to a csv file\n\t\t\ttry {\n\t\t\t\tWriteOutputToCSV.generateOutput(dataSet, \"Quick\");\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\t\n\t\tSystem.out.println(\"Quick Sort Algorithm Process complete\");\n\t\t\n\t}",
"private void quickSort(int[] array, int left, int right) {\n if (left>=right){\n return;\n }\n\n //2. Pick a pivot element -> we will choose the centre element:\n // Note: Better would be to choose left + (right-left)/2 (as this would avoid overflow error for large arrays i.e. 2GB))\n\n int pivot = array[(left+right)/2];\n\n //3. Partition the array around this pivot and return the index of the partition.\n int index = partition(array,left,right,pivot);\n\n //4. Sort on the left and right side recursively.\n quickSort(array,left,index-1); //Left side\n quickSort(array,index,right); //Right side\n }",
"public static void main(String[] args) {\n\t\t\n\t\tint[] x = {9,2,4,5,6,7,8,2,44,55,90,1456,300,345654,1,76};\n\t\t\n\t\tSystem.out.println(Arrays.toString(x));\n\t\t\n\t\tint since = 0;\n\t\tint until = x.length - 1;\n\t\tquicksort(x,since,until);\n\t\tSystem.out.println(Arrays.toString(x));\n\t\t\n\t\t}",
"public static void main(String[] args) {\n QuickSort quickSort=new QuickSort();\n int[] unsortedArray=new int[] {0,100,3,24,45,54};\n int[] sortrdArray= quickSort.quickSort(unsortedArray,0,unsortedArray.length-1);\n for (int i: sortrdArray){\n System.out.println(\"Sorted values =\"+i);\n }\n }",
"public static void QuickSort( Comparable[ ] datos, int inicio, int fin)\n\t{\n\t\t// TODO \n\t\t//se escoge como pivote el primer termino\n\t\tComparable pivote = datos[inicio];\n\t\tint primermayor = inicio;\n\t\tif(inicio<fin&&inicio<datos.length)\n\t\t{\n\t\t\tfor(int i=inicio +1; i<fin; i++) //ordena los elementos empezando por el segundo de la lista\n\t\t\t{\n\t\t\t\tif(less(datos[i],pivote)) \n\t\t\t\t{\n\t\t\t\t\t//si el elemento en la posicion i es menor al pivote se intercambio con el indice del primer elemento mayor al pivote\n\t\t\t\t\texchange(datos, i, primermayor);\n\t\t\t\t\tprimermayor++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//se repite recursivamente el metodo\n\t\t\tQuickSort(datos,inicio, primermayor);\n\t\t\tQuickSort(datos,primermayor+1,fin);\n\t\t}\n\t}",
"public static void main(String[] args) {\n int size = 100;\n int mult = 100;\n\n ArrayList<Integer> numbers = new ArrayList<>();\n\n //generate random array to sort\n for (int i = 0; i < size; i++) {\n numbers.add((int) (Math.random() * mult));\n }\n\n System.out.println(numbers.toString());\n\n numbers = quickSortSubset(numbers,0);\n\n System.out.println(numbers.toString());\n\n }",
"private void quicksort(int low, int high) {\r\n\t\tint i = low, j = high;\r\n\t\t// Get the pivot element from the middle of the list\r\n\t\tint pivot = mutualNum[low + (high-low)/2];\r\n\t\t// Divide into two lists\r\n\t\twhile (i <= j) {\r\n\t\t\twhile (mutualNum[i] > pivot) {\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\twhile (mutualNum[j] < pivot) {\r\n\t\t\t\tj--;\r\n\t\t\t}\r\n\t\t\tif (i <= j) {\r\n\t\t\t\texchange(i, j);\r\n\t\t\t\ti++;\r\n\t\t\t\tj--;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Recursion\r\n\t\tif (low < j)\r\n\t\t\tquicksort(low, j);\r\n\t\tif (i < high)\r\n\t\t\tquicksort(i, high);\r\n\t}",
"public static void quickSort(int[] a, int left, int right)\r\n {\r\n int pivot = partition(a, left, right);\r\n if(left < pivot - 1)\r\n quickSort(a, left, pivot - 1);\r\n if(pivot < right)\r\n quickSort(a, pivot, right);\r\n }",
"protected void quickSort(Vector v, int lo0, int hi0) {\r\n\tint lo = lo0;\r\n\tint hi = hi0;\r\n\tTypedFile mid;\r\n\r\n\tif ( hi0 > lo0)\r\n\t{\r\n\r\n\t /* Arbitrarily establishing partition element as the midpoint of\r\n\t * the array.\r\n\t */\r\n\t mid = (TypedFile) v.elementAt(( lo0 + hi0 ) / 2);\r\n\r\n\t // loop through the array until indices cross\r\n\t while( lo <= hi )\r\n\t {\r\n\t\t/* find the first element that is greater than or equal to \r\n\t\t * the partition element starting from the left Index.\r\n\t\t */\r\n\t\t// Nasty to have to cast here. Would it be quicker\r\n\t\t// to copy the vectors into arrays and sort the arrays?\r\n\t\twhile( ( lo < hi0 ) && lt( (TypedFile)v.elementAt(lo), mid ) )\r\n\t\t ++lo;\r\n\r\n\t\t /* find an element that is smaller than or equal to \r\n\t\t * the partition element starting from the right Index.\r\n\t\t */\r\n\t\twhile( ( hi > lo0 ) && lt( mid, (TypedFile)v.elementAt(hi) ) )\r\n\t\t --hi;\r\n\r\n\t\t // if the indexes have not crossed, swap\r\n\t\tif( lo <= hi ) \r\n\t\t{\r\n\t\t swap(v, lo, hi);\r\n\t\t ++lo;\r\n\t\t --hi;\r\n\t\t}\r\n\t }\r\n\r\n\t /* If the right index has not reached the left side of array\r\n\t\t * must now sort the left partition.\r\n\t\t */\r\n\t if( lo0 < hi )\r\n\t\tquickSort( v, lo0, hi );\r\n\r\n\t\t/* If the left index has not reached the right side of array\r\n\t\t * must now sort the right partition.\r\n\t\t */\r\n\t if( lo < hi0 )\r\n\t\tquickSort( v, lo, hi0 );\r\n\r\n\t}\r\n }",
"private static <T extends Comparable<? super T>> void quickSort(List<T> list, int beginIndex, int finishIndex){\n if(beginIndex + 1 <= finishIndex){\n int i = beginIndex;\n int j = finishIndex;\n while(i <= j){\n while(list.get(i).compareTo(list.get(finishIndex)) < 0 && i < finishIndex){\n i++;\n }\n while(list.get(j).compareTo(list.get(finishIndex)) >= 0 && j > beginIndex){\n j--;\n }\n if(i <= j) {\n if(i != j)\n swap(list, i, j);\n if(i != beginIndex)\n i++;\n if(j != finishIndex)\n j--;\n }\n }\n if(i < finishIndex)\n swap(list, i, finishIndex);\n\n quickSort(list, beginIndex, i - 1);\n quickSort(list, i + 1, finishIndex);\n }\n }",
"private static <T extends Comparable<T>> void quicksort(T v[], int left, int right) {\n if(left<right){\n int indexP = partition(v,left,right);\n quicksort(v, left, indexP - 1);\n quicksort(v, indexP + 1, right );\n\n }\n\n }",
"public static void quickSort (int[] elts) {\r\n\t\tquickSortSegment (elts, 0, elts.length);\r\n\t}",
"public static void quickSort (int[] elts) {\r\n\t\tquickSortSegment (elts, 0, elts.length);\r\n\t}",
"@Test\n public void sortArrayQuickSortTest() {\n int[] array1 = new int[]{5, 2, 3, 1};\n int[] expectedArray1 = new int[]{1, 2, 3, 5};\n int[] actualArray1 = sortArrayQuickSort(array1);\n assertArrayEquals(expectedArray1, actualArray1);\n /**\n * Example 2:\n * Input: nums = [5,1,1,2,0,0]\n * Output: [0,0,1,1,2,5]\n */\n int[] array2 = new int[]{5, 1, 1, 2, 0, 0};\n int[] expectedArray2 = new int[]{0, 0, 1, 1, 2, 5};\n int[] actualArray2 = sortArrayQuickSort(array2);\n assertArrayEquals(expectedArray2, actualArray2);\n }",
"static void quickSortFirst(int[] array, int left, int right) {\n if (left < right) {\n //Selecting first element as pivot\n int pivot = array[left];\n //For partition\n int i = left;\n int j = right;\n while (i < j) {\n //Shift one place to past pivot element\n i += 1;\n //Search right part to find elements greater than pivot\n while (i <= right && array[i] < pivot) {\n i += 1;\n\n }\n //Search left part to find elements smaller than pivot\n while (j >= left && array[j] > pivot) {\n j -= 1;\n\n }\n if (i <= right && i < j) {\n //Swap\n swap(array, i, j);\n\n }\n }\n //Place pivot in correct place\n swap(array, left, j);\n //Sorting again for partition parts\n quickSortFirst(array, left, j - 1);\n quickSortFirst(array, j + 1, right);\n }\n }",
"private void sort(T[] arr, int lo, int hi) {\n if (lo >= hi) return; // we return if the size of the part equals 1\n int pivot = partition(arr, lo, hi); // receiving the index of the pivot element\n sort(arr, lo, pivot - 1); // sorting the left part\n sort(arr, pivot + 1, hi); // sorting the right part\n }",
"public void sortArray() {\n\t\tSystem.out.println(\"QUICK SORT\");\n\t}",
"public static void QuickSort(int arr[], int low, int high) {\n\n if (low < high) {\n int pivot = partition(arr, low, high);\n\n //Sort elements before and after partition\n QuickSort(arr, low, pivot - 1);\n QuickSort(arr, pivot + 1, high);\n }\n }",
"public static void quickSortInPlace(List<Comparable> data, int from, int to) {\n\t\tif (data==null || data.size()<2 || (to-from)<1)\n\t\t\treturn;\n\t\tif (from<0 || to <0 || from>data.size() || to>data.size()) {\n\t\t\tthrow new IndexOutOfBoundsException(data+\" from \"+from+\" to \"+to);\n\t\t}\n\t\t\n\t\tComparable pivot = data.get(to);\n\t\tint pos=from;\n\t\tfor (int i=from; i<to; ++i ) {\n\t\t\tif (data.get(i).compareTo(pivot)<0) {\n\t\t\t\tif (i!=pos) {\n\t\t\t\t\tComparable tmp = data.get(i);\n\t\t\t\t\tdata.set(i,data.get(pos));\n\t\t\t\t\tdata.set(pos, tmp);\n\t\t\t\t\t//System.out.println(data.get(i)+\"<=>\"+tmp);\n\t\t\t\t}\n\t\t\t\tpos++;\n\t\t\t}\n\t\t\t//System.out.println(Arrays.asList(data));\n\t\t}\n\t\t\n\t\tif (pos!=to) {\n\t\t\tComparable tmp = data.get(to);\n\t\t\tdata.set(to, data.get(pos));\n\t\t\tdata.set(pos, tmp);\n\t\t}\n\t\t\n\t\t//System.out.println(Arrays.asList(data)+\" [\"+pos+\"]\"+pivot+\" (\"+from+\",\"+to+\")\");\n\t\tquickSortInPlace(data,from, pos-1);\n\t\tquickSortInPlace(data,pos+1,to);\n\t}",
"private static void quicksort(Object a[], int lo0, int hi0) {\n int lo = lo0;\n int hi = hi0;\n int mid;\n\n if (hi0 > lo0) {\n swapReferences(a, lo0, (lo0 + hi0)/2);\n Object[] midObject = (Object[]) a[(lo0 + hi0) / 2];\n mid = (int)midObject[2];\n while (lo <= hi) {\n Object[] loObject = (Object[])a[lo];\n int loWeight = (int)loObject[2];\n while((lo < hi0) && (loWeight < mid)) {\n loObject = (Object[])a[lo];\n loWeight = (int)loObject[2];\n if (loWeight < mid) {\n lo++;\n }\n }\n\n Object[] hiObject = (Object[])a[hi];\n int hiWeight = (int)hiObject[2];\n while((hi > lo0) && (hiWeight > mid)) {\n hiObject = (Object[])a[hi];\n hiWeight = (int)hiObject[2];\n if (hiWeight > mid) {\n hi--;\n }\n }\n\n if (lo <= hi) {\n swapReferences(a, lo, hi);\n lo++;\n hi--;\n }\n }\n\n if (lo0 < hi) {\n quicksort(a, lo0, hi);\n }\n\n if (lo < hi0) {\n quicksort(a, lo, hi0);\n }\n }\n }",
"int partition(int arr[], int low, int high, SequentialTransition sq,ArrayList<StackPane> list,double speed) \n\t {\n\t\t\tint step;\n//\t\t\tint n = arr.length;\n\t int pivot = arr[high]; \n\t int i = (low-1);\n\t for (int j=low; j<high; j++) \n\t { \n\t if (arr[j] <= pivot) \n\t { \n\t i++; \n\t int temp = arr[i]; \n\t arr[i] = arr[j]; \n\t arr[j] = temp; \n\t step = j - i;\n\t sq.getChildren().add(FillBeforeSwap(list.get(i), list.get(j),speed));\n\t sq.getChildren().add(swapMe(list.get(i), list.get(j), step, list, speed));\n\t sq.getChildren().add(FillAfterSwap(list.get(j), list.get(i), speed));\n\t } \n\t } \n\t int temp = arr[i+1]; \n\t arr[i+1] = arr[high]; \n\t arr[high] = temp; \n\t step = (high) - (i+1);\n\t sq.getChildren().add(FillBeforeSwap(list.get(i+1), list.get(high), speed));\n\t sq.getChildren().add(swapMe(list.get(i+1), list.get(high), step, list, speed));\n\t sq.getChildren().add(FillAfterSwap(list.get(i+1), list.get(high), speed));\n\t \n\t return i+1; \n\t }",
"public static void main(String[] args) {\n\t\tStopwatch timer = new Stopwatch();\n \tString[] s1 = {\"LS3A3PS\",\"130N740\",\"53KD8Y60\",\"D48P1L3D\",\"Y7M\"};\n\t\tString[] s2 = {\"U45\",\"J6Y\",\"VRW\",\"L60\",\"ZVN\"};\n\t\tString[] s3 = {\"NCDJMN\",\"0BTWJ\",\"TK5FLT\",\"JNYJO\",\"C1LA9H\"};\n\t\tString[] s4 = {\"K32Z\",\"KJH6\",\"5G9O\",\"9JOL\",\"VJNY\"};\n\t\tString[] s5 = {\"3J4\",\"TFHX\",\"A5QOR4\",\"L7\",\"L9T7K8ZG\"};\n\t\t\n int n = s1.length;\n sort(s1);\n StdOut.println(\"Asad Zaheer\\n\\nThree-way Quicksort Test 1\\n\");\n for (int x = 0; x < n; x++) {\n \tStdOut.println(s1[x]);\n }\n StdOut.println();\n double time = timer.elapsedTime();\n \t\t//display the execution time second test\n \t\tStdOut.println(\"Execution time \" + time + \" seconds.\\n\");\n \n //start stop watch for second test\n Stopwatch timer2 = new Stopwatch();\n int n1 = s2.length;\n StdOut.println(\"Asad Zaheer\\n\\nThree-way Quicksort Test 2\\n\");\n sort(s2);\n for (int x = 0; x < n1; x++) {\n \tStdOut.println(s2[x]);\n }\n StdOut.println();\n double time2 = timer2.elapsedTime();\n \t\t//display the execution time second test\n \t\tStdOut.println(\"Execution time \" + time2 + \" seconds.\\n\");\n \n //start stop watch for third test\n Stopwatch timer3 = new Stopwatch();\n int n2 = s3.length;\n StdOut.println(\"Asad Zaheer\\n\\nThree-way Quicksort Test 3\\n\");\n sort(s3);\n for (int x = 0; x < n2; x++) {\n \tStdOut.println(s3[x]);\n }\n StdOut.println();\n double time3 = timer3.elapsedTime();\n \t\t//display the execution time third test\n \t\tStdOut.println(\"Execution time \" + time3 + \" seconds.\\n\");\n \n //start stop watch for fourth test\n Stopwatch timer4 = new Stopwatch();\n int n3 = s4.length;\n StdOut.println(\"Asad Zaheer\\n\\nThree-way Quicksort Test 4\\n\");\n sort(s4);\n for (int x = 0; x < n3; x++) {\n \tStdOut.println(s4[x]);\n }\n StdOut.println();\n double time4 = timer4.elapsedTime();\n \t\t//display the execution time fourth test\n \t\tStdOut.println(\"Execution time \" + time4 + \" seconds.\\n\");\n \n //start stop watch for fifth test\n Stopwatch timer5 = new Stopwatch();\n int n4 = s5.length;\n StdOut.println(\"Asad Zaheer\\n\\nThree-way Quicksort Test 5\\n\");\n sort(s5);\n for (int x = 0; x < n4; x++) {\n \tStdOut.println(s5[x]);\n }\n StdOut.println();\n double time5 = timer5.elapsedTime();\n \t\t//display the execution time fifth test\n \t\tStdOut.println(\"Execution time \" + time5 + \" seconds.\\n\");\n }",
"public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }",
"public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }",
"public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }",
"public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }",
"public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }",
"public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }",
"public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }",
"public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }",
"public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }",
"public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }",
"public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }",
"public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }",
"public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }",
"public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }",
"public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }",
"public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }",
"public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }",
"public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }",
"public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }",
"public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }",
"public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }",
"public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }",
"public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }",
"public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }"
]
| [
"0.76459235",
"0.7553792",
"0.7542818",
"0.73877114",
"0.7374344",
"0.7368993",
"0.73388374",
"0.732567",
"0.73107904",
"0.7310267",
"0.7286064",
"0.727553",
"0.7270889",
"0.7259906",
"0.7210986",
"0.71969956",
"0.7185969",
"0.7179258",
"0.7158112",
"0.71495664",
"0.7117257",
"0.7106368",
"0.7102418",
"0.70729154",
"0.7068072",
"0.7055709",
"0.70408016",
"0.7023146",
"0.6996366",
"0.69953495",
"0.6992594",
"0.6991076",
"0.6980219",
"0.69589156",
"0.6940722",
"0.693863",
"0.6937685",
"0.6922337",
"0.6908745",
"0.68851525",
"0.6867293",
"0.6867007",
"0.6859599",
"0.68564826",
"0.6853461",
"0.68469584",
"0.68341285",
"0.6829958",
"0.68282926",
"0.6826566",
"0.68146974",
"0.6813487",
"0.6791868",
"0.67620844",
"0.67574155",
"0.67507124",
"0.6749691",
"0.67463344",
"0.6738281",
"0.6714316",
"0.67048",
"0.6700814",
"0.6695074",
"0.6690603",
"0.6676948",
"0.6665871",
"0.6659862",
"0.6659862",
"0.6654114",
"0.66514796",
"0.6649142",
"0.66446126",
"0.66401404",
"0.66359735",
"0.66324854",
"0.661677",
"0.6616769",
"0.6599737",
"0.6599737",
"0.6599737",
"0.6599737",
"0.6599737",
"0.6599737",
"0.6599737",
"0.6599737",
"0.6599737",
"0.6599737",
"0.6599737",
"0.6599737",
"0.6599737",
"0.6599737",
"0.6599737",
"0.6599737",
"0.6599737",
"0.6599737",
"0.6599737",
"0.6599737",
"0.6599737",
"0.6599737",
"0.6599737",
"0.6599737"
]
| 0.0 | -1 |
==================== Fim da mediana de 3========================= ==================== Inicio do heapify=========================== | public String[][] sort(String[][] arr, int requiredData) {
int n = arr.length;
for (int i = n / 2 - 1; i >= 1; i--)
heapify(arr, n, i, requiredData);
for (int i = n - 1; i > 1; i--) {
String[] temp = arr[0];
arr[0] = arr[i];
arr[i] = temp;
heapify(arr, i, 0, requiredData);
}
return arr;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void heapify() {\n for (int i=N/2; i>=1; i--)\n sink(i);\n }",
"public static void heapify() {\n //배열을 heap 자료형으로 만든다.\n // 1d 2d 2d 3d 3d 3d 3d 4d\n// int[] numbers = {9, 12, 1, 3, 6, 2, 8, 4};\n // 1depth의 자식노드 numbers[2i], numbers[2i+1]\n int[] numbers = {4, 1, 3, 2, 16, 9, 10, 14, 8, 7};\n int i = 1;\n while (true) {\n int target = numbers[i-1];\n int left = numbers[2*i-1];\n\n if (2*i == numbers.length) {\n if (left > target){\n numbers[i-1] = left;\n numbers[2*i-1] = target;\n }\n print(numbers);\n break;\n }\n int right =numbers[2*i];\n\n if (left > right) {\n if(left > target) {\n numbers[i-1] = left;\n numbers[2*i-1] = target;\n }\n }else if (right > left) {\n if (right > target) {\n numbers[i-1] = right;\n numbers[2*i] = target;\n }\n }\n i++;\n\n print(numbers);\n }\n\n }",
"private void heapify(int idx) {\r\n // TODO\r\n }",
"public void makeHeap() {\r\n\t\t//for (int i = (theHeap.size() >> 1) - 1; i >= 0; i--) {\r\n\t\tfor (int i = (theHeap.size() - 1) >> 1; i >= 0; i--) {\r\n\t\t\tsiftDown(i);\r\n\t\t}\r\n\t}",
"void Minheap()\n {\n for(int i= (size-2)/2;i>=0;i--)\n {\n minHeapify(i);\n }\n }",
"void buildHeap() {\n\tfor(int i=parent(size-1); i>=0; i--) {\n\t percolateDown(i);\n\t}\n }",
"@Test\n\tpublic void testHeap() {\n\t\t// merely a suggestion \n\t}",
"public static void main(String[] args) {\n\r\n\t\tint [][] arr = new int[][] {\r\n\t\t\t{8,9,10,12},\r\n\t\t\t{2,5,9,12},\r\n\t\t\t{3,6,10,11},\r\n\t\t\t{1,4,7,8}\r\n\t\t};\t\t\r\n\t\t\r\n\t\tPriorityQueue<HeapNode> heap = new PriorityQueue<>();\r\n\t\tfor(int i=0;i<arr.length;i++)\r\n\t\t{\r\n\t\t\theap.offer(new HeapNode(arr[i][0], i, 0));\r\n\t\t}\r\n\t\tint count=0;\r\n\t\twhile(count<16)\r\n\t\t{\r\n\t\t\tHeapNode min = heap.poll();\r\n\t\t\tSystem.out.println(min.value);\r\n\t\t\tcount++;\r\n\t\t\tint value=0;\r\n\t\t\tint nextIndex=min.index+1;\r\n\t\t\tif(nextIndex < arr[min.k].length)\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tvalue=arr[min.k][nextIndex];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tvalue=Integer.MAX_VALUE;\r\n\t\t\t}\r\n\t\t\theap.offer(new HeapNode(value, min.k, nextIndex));\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"public void buildHeap() {\n\t\tthis.makeComplete();\n\t\tfor(int i = this.size/2; i >= 1; i--)\n\t\t\tthis.heapify(i);\n\t}",
"void buildHeap() {\n for (int i = parent(size - 1); i >= 0; i--) {\n percolateDown(i);\n }\n }",
"private void grow() {\n int oldCapacity = heap.length;\n // Double size if small; else grow by 50%\n int newCapacity = oldCapacity + ((oldCapacity < 64) ?\n (oldCapacity + 2) :\n (oldCapacity >> 1));\n Object[] newQueue = new Object[newCapacity];\n for (int i = 0; i < heap.length; i++) {\n newQueue[i] = heap[i];\n }\n heap = newQueue;\n }",
"@Test\n\tpublic void testHeapify() {\n\t\tHeap heap = new Heap(testArrayList);\n\t\theap.heapify(0);\n\t\tArrayList<Integer> expected = new ArrayList<>(\n\t\t\t\tArrays.asList(3, 5, 33, 36, 15, 70, 24, 47, 7, 27, 38, 48, 53, 32, 93));\n\t\tassertEquals(expected, heap.getHeapArray());\n\t}",
"public int heapSize();",
"public static void heapify(Integer arr[])\n {\n N = arr.length-1;\n for (int i = N/2; i >= 0; i--)\n maxheap(arr, i);\n }",
"public Heap12()\n {\n arrayList = new ArrayList<E>(5);\n size = 0;\n isMax = false;\n cap = 5;\n }",
"private boolean buildHeap(int numPerRun){ \n\t\tTuple temp;\n\t\tint i = 0;\n\t\twhile(i < numPerRun && (temp = child.getNextTuple()) != null) {\n\t\t\tinternal.offer(temp);\n\t\t\ti++;\n\t\t}\n//\t\tSystem.out.println(\"internal heap has: \" + i + \"tuples\");\n\t\tif(i != numPerRun || i == 0) { // i == 0, heap is empty!\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"private void heapify() {\n\t\tint currIndex = 0;\n\t\twhile (currIndex < heapSize) {\n\t\t\tT val = lstEle.get(currIndex);\n\t\t\tint leftSubtreeIndex = getLeftSubtree(currIndex);\n\t\t\tint rightSubtreeIndex = getRightSubtree(currIndex);\n\t\t\tT leftChildVal = leftSubtreeIndex < heapSize ? lstEle.get(leftSubtreeIndex) : null;\n\t\t\tT rightChildVal = rightSubtreeIndex < heapSize ? lstEle.get(rightSubtreeIndex) : null;\n\t\t\t\n\t\t\tT minVal = null;\n\t\t\tint minValIndex = -1;\n\t\t\tif(leftChildVal != null && rightChildVal != null){\n\t\t\t\tint compVal = leftChildVal.compareTo(rightChildVal); \n\t\t\t\tif(compVal < 0){\n\t\t\t\t\tminVal = leftChildVal;\n\t\t\t\t\tminValIndex = leftSubtreeIndex;\n\t\t\t\t}else {\n\t\t\t\t\tminVal = rightChildVal;\n\t\t\t\t\tminValIndex = rightSubtreeIndex;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(leftChildVal != null && leftChildVal.compareTo(val) < 0){\n\t\t\t\t\tminValIndex = leftSubtreeIndex;\n\t\t\t\t\tminVal = leftChildVal;\n\t\t\t\t}else if (rightChildVal != null && rightChildVal.compareTo(val) < 0 ){\n\t\t\t\t\tminValIndex = rightSubtreeIndex;\n\t\t\t\t\tminVal = rightChildVal;\n\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"\\tMin Val : \" +minVal +\" --> \" +minValIndex);\n\t\t\t\n\t\t\tlstEle.set(currIndex, minVal);\n\t\t\tcurrIndex = minValIndex;\n\t\t\tlstEle.set(minValIndex, val);\n\t\t\t\n\t\t}\n\n\t}",
"public Heap() {\n this.arr = new ArrayList<>();\n this.isMax = false;\n }",
"@Test\n public void test() {\n List<Integer> list = Arrays.asList(48, 12, 24, 7, 8, -5, 24, 391, 24, 56, 2, 6, 8, 41);\n Heap minHeap = new Heap(Heap.MIN_HEAP, list);\n List<Integer> expected = Arrays.asList(-5, 2, 6, 7, 8, 8, 24, 391, 24, 56, 12, 24, 48, 41);\n Assert.assertArrayEquals(expected.toArray(), minHeap.heap.toArray());\n Heap maxHeap = new Heap(Heap.MAX_HEAP, list);\n Assert.assertArrayEquals(expected.toArray(), maxHeap.heap.toArray());\n }",
"public void balanceHeaps(){\n \n //If max heap size is greater than min heap then pop the first element and put int min heap\n if(maxHeap.size() > minHeap.size())\n minHeap.add(maxHeap.pollFirst());\n\n }",
"private static <T> void heapify (HeapSet<T> heap) {\r\n\t\tfor (int i = heap.size () - 1; i >= 0; --i) {\r\n\t\t\tsiftDown (heap, i, heap.size ());\r\n\t\t}\r\n\t}",
"public void buildMaxHeap(){\n\t\tfor(int i = (n-2)/2 ; i >= 0; i--){\n\t\t\tmaxHeapfy(i);\n\t\t}\n\t}",
"protected void heapify(int i) {\n \tE temp;\n\t\tE left = null;\n\t\tE right = null;\n\t\tE current = internal[i];\n\n\t\tif(left(i) < heapSize) left = internal[left(i)];\n\t\tif(right(i) < heapSize ) right = internal[right(i)];\n\n\t\tif(left != null && right != null){\n\t\t\tif(compy.compare(current, right) < 0 && compy.compare(current, left) < 0){\n\t\t\t\ttemp = current;\n\t\t\t\tif(compy.compare(right, left) < 0){\n\t\t\t\t\tinternal[i] = left;\n\t\t\t\t\tinternal[left(i)] = temp;\n\t\t\t\t\theapify(left(i));\n\t\t\t\t}else{\n\t\t\t\t\tinternal[i] = right;\n\t\t\t\t\tinternal[right(i)] = temp;\n\t\t\t\t\theapify(right(i));\n\t\t\t\t}\n\t\t\t}else if(compy.compare(current, left) < 0){\n\t\t\t\ttemp = current;\n\t\t\t\tinternal[i] = internal[left(i)];\n\t\t\t\tinternal[left(i)] = temp;\n\t\t\t\theapify(left(i));\n\t\t\t}else if(compy.compare(current, right) < 0){\n\t\t\t\ttemp = current;\n\t\t\t\tinternal[i] = internal[right(i)];\n\t\t\t\tinternal[right(i)] = temp;\n\t\t\t\theapify(right(i));\n\t\t\t}\n\t\t}else if(left != null){\n\t\t\tif(compy.compare(current, left) < 0){\n\t\t\t\ttemp = current;\n\t\t\t\tinternal[i] = internal[left(i)];\n\t\t\t\tinternal[left(i)] = temp;\n\t\t\t\theapify(left(i));\n\t\t\t}\n\t\t}else if(right != null){\n\t\t\tif(compy.compare(current, right) < 0){\n\t\t\t\ttemp = current;\n\t\t\t\tinternal[i] = internal[right(i)];\n\t\t\t\tinternal[right(i)] = temp;\n\t\t\t\theapify(right(i));\n\t\t\t}\n\t\t}\n }",
"public static void heapify(int arr[]) {\n N = arr.length - 1;\n for (int i = N / 2; i >= 0; i--)\n maxheap(arr, i);\n }",
"private void heapify(final int i) {\n assert(valid(i));\n if (leaf(i)) return;\n final int v = H[i];\n final int left_child = ls(i);\n final int right_child = rs(i);\n int largest = (v >= H[left_child]) ? i : left_child;\n if (right_child != n && H[largest] < H[right_child])\n largest = right_child;\n assert(valid(largest));\n if (largest != i) {\n H[i] = H[largest]; H[largest] = v;\n heapify(largest);\n }\n }",
"private void heapify(int i) {\n if (!hasLeft(i))\n return;\n int max = i;\n if (this.heap.get(max).compareTo(this.heap.get(leftIndex(i))) < 0)\n max = leftIndex(i);\n if (hasRight(i) && this.heap.get(max)\n .compareTo(this.heap.get(rightIndex(i))) < 0)\n max = rightIndex(i);\n if (max == i)\n return; // ho finito\n // scambio i con max e richiamo la funzione ricorsivamente sull'indice\n // del nodo figlio uguale a max\n E app = this.heap.get(i);\n this.heap.set(i, this.heap.get(max));\n this.heap.set(max, app);\n heapify(max);\n }",
"public static Object PQdownheap(Object... arg) {\nUNSUPPORTED(\"c01vxogao855zs8fe94tpim9g\"); // void\nUNSUPPORTED(\"5jo6sukhc9upf5qv4eukh8kop\"); // PQdownheap (int k)\nUNSUPPORTED(\"erg9i1970wdri39osu8hx2a6e\"); // {\nUNSUPPORTED(\"dd3235mkocimg2v70ln8ixz3k\"); // snode* x = pq[k];\nUNSUPPORTED(\"e0wd4mp2k58ml2bf01e6mtxfc\"); // int v = (x)->n_val;\nUNSUPPORTED(\"b9pl90rstqz0jhnw3ttda3kx5\"); // int lim = PQcnt/2;\nUNSUPPORTED(\"917ffzmzxsh6kw3txaqow8dv0\"); // snode* n;\nUNSUPPORTED(\"zrgst5t0lhf2kxrym9g7gvsn\"); // int j;\nUNSUPPORTED(\"7bbx1rekibyh3hyxh24lprwwk\"); // while (k <= lim) {\nUNSUPPORTED(\"disb3eax2r4wgge9im541y9hv\"); // j = k+k;\nUNSUPPORTED(\"e4w7jx4o3i4gav8ujef2bapbn\"); // n = pq[j];\nUNSUPPORTED(\"4yles8zr6ozg2g0df2jefc1l2\"); // if (j < PQcnt) {\nUNSUPPORTED(\"77cupwd0hd3zp8he6wd4tm6nx\"); // if ((n)->n_val < (pq[j+1])->n_val) {\nUNSUPPORTED(\"1jeqo15tfc6vbefwf85bniwfn\"); // j++;\nUNSUPPORTED(\"1sglut5nbxcoto9tvzxs3eixh\"); // n = pq[j];\nUNSUPPORTED(\"dquo3qofk56ds5xl95lhvcthf\"); // }\nUNSUPPORTED(\"dvgyxsnyeqqnyzq696k3vskib\"); // }\nUNSUPPORTED(\"3hshbuqs95898wh95e2fdh5uz\"); // if (v >= (n)->n_val) break;\nUNSUPPORTED(\"4i53ezzk69bsmpugd2h8bo35\"); // pq[k] = n;\nUNSUPPORTED(\"iolnc8pg22pbme3zbdim1eqy\"); // (n)->n_idx = k;\nUNSUPPORTED(\"8lpwfkimmel90007dlp5eqpbh\"); // k = j;\nUNSUPPORTED(\"7ijd6pszsxnoopppf6xwo8wdl\"); // }\nUNSUPPORTED(\"1lxwoekai0i8v3rg0vrg6ahmx\"); // pq[k] = x;\nUNSUPPORTED(\"7ss0wudteh17yswf0ihopig7z\"); // (x)->n_idx = k;\nUNSUPPORTED(\"c24nfmv9i7o5eoqaymbibp7m7\"); // }\n\nthrow new UnsupportedOperationException();\n}",
"private void heapSort() {\n\n\t\tint queueSize = priorityQueue.size();\n\n\t\tfor (int j = 0; j < queueSize; j++) {\n\n\t\t\theapified[j] = binaryHeap.top(priorityQueue);\n\t\t\tbinaryHeap.outHeap(priorityQueue);\n\n\t\t}\n\n\t}",
"public static void main(String[] args) {\n Maxheap<Integer> maxheap = new Maxheap<>();\n double time=0;\n int opCount = 10000000;\n time = testHeap(maxheap,opCount,true);\n System.out.println(\"Test heapify completed: \"+time+ \"s\");\n time = testHeap(maxheap,opCount,false);\n System.out.println(\"Test completed: \"+time+ \"s\");\n\n\n// time = debugHeap(maxheap,5,true);\n// System.out.println(\"Test completed: \"+time+ \"s\");\n }",
"private <E extends Comparable<E>> void heapify(E[] array){\n\t\tif(array.length > 0){\n\t\t\tint n = 1;\n\t\t\twhile( n < array.length){\t//for each value in the array\n\t\t\t\tn++;\n\t\t\t\t\n\t\t\t\tint child = n-1;\n\t\t\t\tint parent = (child-1)/2;\n\t\t\t\twhile(parent >= 0 && array[parent].compareTo(array[child]) < 0){\t//if the heap property isn't observed between the parent and child, swap them and readjust parent/child values until it is\n\t\t\t\t\tabstractSorter.swap(array, parent, child);\n\t\t\t\t\tchild = parent;\n\t\t\t\t\tparent = (child-1)/2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public static void main(String[] args) {\n\n\t\t// display programmer info\n\t\tCommonSuite.commonProgramStart(3, 7, \"Meldable Heap Remove\", false);\n\n\t\t// re-create the heaps from ODS\n\t\tInteger meldableHeapPage218_1[] = new Integer[] { 4, 9, 8, 17, 26, 50, 16, 19, 55 };\n\t\tInteger meldableHeapPage218_2[] = new Integer[] { 19, 25, 20, 28, 89, 32, 93, 99 };\n\n\t\tA3Q7MeldableHeap<Integer> h, j;\n\n\t\th = new A3Q7MeldableHeap<Integer>();\n\t\tj = new A3Q7MeldableHeap<Integer>();\n\n\t\tfor (int i = 0; i < meldableHeapPage218_1.length; i++)\n\t\t\th.add(meldableHeapPage218_1[i]);\n\n\t\tfor (int i = 0; i < meldableHeapPage218_2.length; i++)\n\t\t\tj.add(meldableHeapPage218_2[i]);\n\n\t\t// show the heaps before and after they are merged\n\t\tCommonSuite.printFancyHeader(\"MeldableHeap h\");\n\t\th.printBSTree();\n\t\tCommonSuite.printFancyHeader(\"MeldableHeap j\");\n\t\tj.printBSTree();\n\t\th.merge(h.r, j.r);\n\t\tCommonSuite.printFancyHeader(\"MERGE of MeldableHeap h and j: h.merge(h.r, j.r)\");\n\t\th.printBSTree();\n\t\tCommonSuite.printFancyHeader(\"Pointer & element originally at j.r.right.right\");\n\t\ttry {\n\t\t\tSystem.out.printf(\"j.r.R.R %s = %s%n\", j.r.right.right, j.r.right.right.x);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Node empty. Run simulation again. No nodes removed.\");\n\t\t\tSystem.out.println(e.toString());\n\t\t}\n\n\t\t// demonstrate the remove(u) method\n\t\tCommonSuite.printFancyHeader(\"REMOVE j.r.right.right: h.remove(j.right.right)\");\n\t\th.remove(j.r.right.right);\n\t\th.printBSTree();\n\t}",
"public void heapify(int[] A) {\n int len = A.length;\n int temp;\n //构建堆\n for (int i = len / 2 - 1; i >= 0; i--) {\n keepSmallHeap(A, i, len);\n }\n }",
"private static void buildMaxHeapify(int arr[]) {\n // Build heap (Re-Arrange the @array).\n System.out.print(\"=> Building Max-Heapified array.........\");\n for (int i = arr.length / 2 - 1; i >= 0; i--) {\n maxHeapify(arr, arr.length, i);\n }\n System.out.println(\"Success !!!\");\n }",
"private static void buildHeap(int arr[], int n) \n\t\t{\n\t\t\tfor(int i=n;i>=0;i++)\n\t\t\t\theapify(arr,n,i);\n\t\t\t\n\t\t}",
"private void heapify(T[] array) \n\t{\n\t\tfor (int i=0; i < array.length; i++)\n\t\t{\n\t\t\tinsert(array[i], i);\n\t\t}\n\t}",
"public void maxHeapify(int i){\n\t\tint left, right, largest;\n\t\tKeyword temp;\n\t\tleft=2*i;\n\t\tright=2*i+1;\n\t\tif(left<=heapSize){\n\t\t\tif(keywords[left].keyword.equalsIgnoreCase(keywords[i].keyword)){\t\t//if keywords of the two Keyword objects are equal\n\t\t\t\tif(keywords[left].pageNo.compareTo(keywords[i].pageNo)>0){\t//comparing pageNo of the Keyword objects\n\t\t\t\t\tlargest=left;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tlargest=i;\n\t\t\t}\n\t\t\telse if(keywords[left].keyword.compareToIgnoreCase(keywords[i].keyword)>0){\n\t\t\t\tlargest=left;\n\t\t\t}\n\t\t\telse \n\t\t\t\tlargest = i;\n\t\t}\n\t\t\n\t\telse \n\t\t\tlargest =i;\n\t\t\n\t\tif(right<=heapSize){\n\t\t\tif(keywords[right].keyword.equalsIgnoreCase(keywords[largest].keyword)){\t//if keywords of the two Keyword objects are equal\n\t\t\t\tif(keywords[right].pageNo.compareTo(keywords[largest].pageNo)>0){\t//comparing pageNo of the Keyword object\n\t\t\t\t\tlargest=right;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(keywords[right].keyword.compareToIgnoreCase(keywords[largest].keyword)>0)\n\t\t\t\tlargest=right;\n\t\t}\n\t\t\n\t\tif (largest!=i){\n\t\t\ttemp=keywords[i];\n\t\t\tkeywords[i]=keywords[largest];\n\t\t\tkeywords[largest]=temp;\n\t\t\tmaxHeapify(largest);\n\t\t}\n\t}",
"public static void buildHeap(int[]data){\n for (int i = data.length-1; i>=0; i--){\n pushDown(data, data.length, i);\n }\n }",
"public static void main(String[] args) {\n\t\tint A[] = { 17, 15, 13, 9, 6, 5, 10, 4, 8, 3, 1 };\t\t// max-heap structure\n\t\t//index\t\t0 1 2 3 4 5 6 7 8 9 10\n\t\t\n\t\tdeleteMax(A);\n\t\tSystem.out.println(Arrays.toString(A));\n\t}",
"private void expandCapacity() {\n heap = Arrays.copyOf(heap, heap.length * 2);\n }",
"void reheap (int a[], int length, int i) throws Exception {\n boolean done = false;\n int T = a[i];\n int parent = i;\n int child = 2*(i+1)-1;\n while ((child < length) && (!done)) {\n compex(parent, child);\n pause();\n if (child < length - 1) {\n if (a[child] < a[child + 1]) {\n child += 1;\n }\n }\n if (T >= a[child]) {\n done = true;\n }\n else {\n a[parent] = a[child];\n parent = child;\n child = 2*(parent+1)-1;\n }\n }\n a[parent] = T;\n }",
"private static <T extends Comparable<T>> void buildHeap(T[] table)\n {\n int n = 1;\n while (n < table.length)\n {\n n++;\n int child = n-1;\n int parent = (child - 1) / 2;\n while (parent >=0 && table[parent].compareTo(table[child]) < 0)\n {\n swap (table, parent, child);\n child = parent;\n parent = (child - 1) / 2;\n }//end while\n }//end while\n }",
"private void fixHeap(){\r\n int i = 1;\r\n int v = array[i].value.getYear();\r\n while(hasChildren(i)){\r\n Node left = array[getLeftChildIndex(i)];\r\n Node right = array[getRightChildIndex(i)];\r\n if(left != null){\r\n if(right != null){\r\n if(left.value.getYear() < right.value.getYear()){\r\n if(v > left.value.getYear()){\r\n swap(array[i], left);\r\n i = getLeftChildIndex(i);\r\n continue;\r\n }\r\n else{\r\n break;\r\n }\r\n }\r\n else{\r\n if(v > right.value.getYear()){\r\n swap(array[i], right);\r\n i = getRightChildIndex(i);\r\n continue;\r\n }\r\n else{\r\n break;\r\n }\r\n }\r\n }\r\n else{\r\n if(v > left.value.getYear()){\r\n swap(array[i], left);\r\n i = getLeftChildIndex(i);\r\n continue;\r\n }\r\n else{\r\n break;\r\n }\r\n }\r\n }\r\n else{\r\n break;\r\n }\r\n }\r\n\r\n }",
"@Test\n\tpublic void BuildMaxHeaptest1() {\n\t\t Job jarray[]=new Job[5];\n\t\t jarray[0]=new Job(\"job1\",50,1);\n\t\t jarray[1]=new Job(\"job2\",20,2);\n\t\t jarray[2]=new Job(\"job3\",80,3);\n\t\t jarray[3]=new Job(\"job4\",20,4);\n\t\t jarray[4]=new Job(\"job5\",1,5);\n\t\t int i;\n\t\t //= (int)Math.floor(jarray.length);\n\t\t \n\t\t\n\t\t PQHeap.BuildMaxHeap(jarray);\n\t\t\n\t\t for( i = (int)Math.floor(jarray.length); i >0; i-- )\n\t\t \tPQHeap.MaxHeapify(jarray, i);\n\t\n\t\tassertNotEquals(-1, i);\n\t}",
"public MedianFinderElegant() {\n minHeap = new PriorityQueue<>();\n maxHeap = new PriorityQueue<>((v1, v2) -> v2 - v1);\n }",
"public MinHeap() {\n\tdata = new ArrayList<Integer>();\n\t}",
"public static Object PQupheap(Object... arg) {\nUNSUPPORTED(\"c01vxogao855zs8fe94tpim9g\"); // void\nUNSUPPORTED(\"5hhoge8azwixhuw1r6f1ae6d\"); // PQupheap(int k)\nUNSUPPORTED(\"erg9i1970wdri39osu8hx2a6e\"); // {\nUNSUPPORTED(\"7e1sq1127wt16hr7o0andcwob\"); // snode* x = pq[k];\nUNSUPPORTED(\"7bfu0p9xmzkty10xv4n4l5cqs\"); // int v = x->n_val;\nUNSUPPORTED(\"1j1bbq23z0qzohezignztjo66\"); // int next = k/2;\nUNSUPPORTED(\"ae5pat4mp4l6k25pvk8saz8c7\"); // snode* n;\nUNSUPPORTED(\"70492o1szwz9au93c3is2goa\"); // while ((n = pq[next])->n_val < v) {\nUNSUPPORTED(\"4i53ezzk69bsmpugd2h8bo35\"); // pq[k] = n;\nUNSUPPORTED(\"iolnc8pg22pbme3zbdim1eqy\"); // (n)->n_idx = k;\nUNSUPPORTED(\"8fpdpgwovt0k58t5u167v63is\"); // k = next;\nUNSUPPORTED(\"eqtnhenyor3dwsa6on9crthdd\"); // next /= 2;\nUNSUPPORTED(\"7ijd6pszsxnoopppf6xwo8wdl\"); // }\nUNSUPPORTED(\"1lxwoekai0i8v3rg0vrg6ahmx\"); // pq[k] = x;\nUNSUPPORTED(\"7ss0wudteh17yswf0ihopig7z\"); // (x)->n_idx = k;\nUNSUPPORTED(\"c24nfmv9i7o5eoqaymbibp7m7\"); // }\n\nthrow new UnsupportedOperationException();\n}",
"private MyList<PartidaVacuna> heapSort(MyList<PartidaVacuna> listaDesordenada) {\n MyList<PartidaVacuna> salida = new MyLinkedListImpl<>();\n MyHeap<PartidaVacuna> heap = new MyHeapImpl<>();\n\n // insertar valores en el heap\n\n for (PartidaVacuna temp : listaDesordenada) {\n heap.insert(temp);\n }\n\n // quitar del heap y agregar en lista resultado\n\n for (int i = 0; i < heap.size(); i++) {\n salida.add(heap.delete());\n }\n\n return salida;\n }",
"public void makeComplete() { \n\t\tthis.size = 0;\n\t\tint index = 1;\n\t\tfor(int i=1; i<this.heap.length; i++) {\n\t\t\tif(this.heap[i] != -1) {\n\t\t\t\tint temp = this.heap[index];\n\t\t\t\tthis.heap[index] = this.heap[i];\n\t\t\t\tthis.heap[i] = temp;\n\t\t\t\tindex++;\n\t\t\t\tthis.size++;\n\t\t\t}\n\t\t}\n\t\tthis.heap[0] = this.size;\n\t}",
"public void buildHeap(int[] arr) {\n int size = arr.length;\n\n for (int i = getParentIndex(size); i >= 0; i--) {\n minHeapify(i);\n }\n }",
"public static void main(String[] args) {\n int[] numeros = new int[20];\n Random rand = new Random();\n\n for (int i = 0; i < 20; i++){\n numeros[i] = rand.nextInt();\n }\n\n Sorter sort = new Sorter();\n sort.heapSort(numeros);\n\n for (int i = 0; i < 20; i++){\n System.out.println(numeros[i]+\" \");\n }\n\n }",
"public static void heap(int[] data, int number){\n for(int i=1; i<number; i++){\n int child = i;\n while(child>0){\n int parent = child/2;\n if(data[child] > data[parent]){\n int temp=data[parent];\n data[parent]=data[child];\n data[child]=temp;\n }\n child=parent;\n }\n }\n }",
"static int[] buildMaxHeap(int [] arr) {\n\t\tint n = arr.length;\n\t\tint startIdx = (n / 2) - 1;\n\t\tfor(int i = startIdx; i >= 0; i--)\n\t\t\theapify(arr, n, i);\n\t\treturn arr;\n\t}",
"private void setMinHeap() {\n // parentIndex is the last leaf node parentIndex\n int parentIndex = (array.length - 2) / 2;\n // from last parentIndex down on the depth path to the root\n // convert to minHeap\n while (parentIndex >= 0) { // when parentIndex = 0, the root\n minHeapify(parentIndex, array.length);\n // go to next index(parentIndex) on that level\n parentIndex--;\n }\n }",
"public static void main(String[] args) {\n\t\tint[] arr = \n\t\t\t{18, 30, 21, -1, 53, 65, 70, -1, -1, 25, 46, -1, 35, 61, 32, -1, 15, 8, 17, -1, 55};\n\t\t\n\t\tSystem.out.println(\"\\nArray before buliding heap:\");\n\t\tfor(int i=0; i<arr.length; i++) {\n\t\t\tSystem.out.print(arr[i] + \" \");\n\t\t}\n\t\tSystem.out.print(\"\\n\");\n\t\t\n\t\tHeap h = new Heap(arr);\n\t\t\n\t\th.buildHeap();\n\t\tSystem.out.println(\"\\nFirst element indicates size of heap:\\nHeap after applying build heap:\");\n\t\th.printHeap();\n\t\t\n\t\th.heapsort();\n\t\tSystem.out.println(\"\\nHeap after applying heap sort:\");\n\t\th.printHeap();\n\t}",
"void minHeapify(int i)\n {\n int lt=MyHeap.left(i);\n int rt=MyHeap.right(i);\n int smallest=i;\n if(lt<size && arr[lt]<arr[i])\n smallest=lt;\n if(rt<size && arr[rt]<arr[smallest])\n smallest=rt;\n if(smallest!=i)\n {\n swap(i,smallest);\n minHeapify(smallest);\n }\n }",
"void minHeapify(int i) {\n\n\t\tint l = 2*i + 1;\n\t\tint r = 2*i + 2;\n\t\tint smallest = i;\n \n\t\tif(l < size && arr[l].element < arr[smallest].element)\n\t\t\tsmallest = l;\n\n\t\tif(r < size && arr[r].element < arr[smallest].element)\n\t\t\tsmallest = r;\n\n\t\tif(smallest != i) {\n\t\t\t// call method exchange to change \n\t\t\texchange(arr,i,smallest);\n\t\t\tminHeapify(smallest);\n\t\t}\n\t}",
"private void heapify(int left, int right) {\r\n\t\tint k = 2 * left;\r\n\r\n\t\tif (k > right)\r\n\t\t\treturn;\r\n\r\n\t\tif ((k + 1) > right) {\r\n\t\t\tif (c[k - 1].compareTo(c[left - 1]) > 0)\r\n\t\t\t\tswitchElements(left - 1, k - 1);\r\n\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (c[k - 1].compareTo(c[k]) < 0)\r\n\t\t\tk++;\r\n\r\n\t\tif (c[left - 1].compareTo(c[k - 1]) < 0) {\r\n\t\t\tswitchElements(left - 1, k - 1);\r\n\t\t\theapify(k, right);\r\n\t\t}\r\n\t}",
"void buildMaxHeap(int[] array, int heapSize) {\n for (int i = heapSize / 2 - 1; i >= 0; i--) heapify(array, i, heapSize);\n }",
"public ArrayHeapMinPQ() {\n heapArray = new ArrayList<>();\n itemMap = new HashMap<>();\n heapArray.add(null); //alway set index 0 null and heap starts from index 1.\n nextIndex = 1;\n }",
"public Heap12( boolean isMaxHeap)\n {\n arrayList = new ArrayList<E>(5);\n size = 0;\n isMax = isMaxHeap;\n cap = 5;\n }",
"public static void main(String[] args) {\n\t\tMaxHeap mh = new MaxHeap(10);\n\t\tmh.insert(12);\n\t\tmh.insert(7);\n\t\tmh.insert(6);\n\t\tmh.insert(10);\n\t\tmh.insert(8);\n\t\tmh.insert(20);\n\t\t\n\t\tmh.print();\n\t}",
"private static void Heapify(int[] A , int i , int size){\r\n\t\t\r\n\t\tint left = LEFT(i);\r\n\t\tint right = RIGHT(i);\r\n\t\tint smallest =i;\r\n\t\t\r\n\t\t// get left and right child of node at index i \r\n\t\t//& compare A[i] with its left and right child\r\n\t\t\r\n\t\tif(left<size && A[left] < A[i]){\r\n\t\t\tsmallest = left;\r\n\t\t}\r\n\t\tif(right<size && A[right] < A[smallest]){\r\n\t\t\tsmallest = right;\r\n\t\t}\r\n\t\t// swap with child having lesser value and\r\n\t\t// call heapify-down on the child\r\n\t\tif(smallest !=i){\r\n\t\t\tswap(A,i,smallest);\r\n\t\t\tHeapify(A,smallest,size);\r\n\t\t}\r\n\t\t\r\n\t}",
"static void heapSort(int[] input){\n int len = input.length;\n for(int i=(len/2)-1;i>=0;i--){\n heapify(input,i,len);\n }\n for(int i = len-1;i>=0;i--){\n int temp = input[0];\n input[0] = input[i];\n input[i] = temp;\n heapify(input,0,i);\n }\n }",
"private static <T extends Comparable<T>> void shrinkHeap(T[] table)\n {\n int n = table.length;\n \n while (n > 0)\n {\n n--;\n swap(table, 0, n);\n int parent = 0;\n \n while (true) \n {\n int leftChild = 2 * parent + 1;\n if (leftChild >= n )\n {\n break;\n }//end if\n \n int rightChild = leftChild + 1;\n \n int maxChild = leftChild;\n \n if (rightChild < n && table[leftChild].compareTo(table[rightChild]) < 0)\n {\n maxChild = rightChild;\n }//end if\n \n if (table[parent].compareTo(table[maxChild]) < 0)\n {\n swap(table, parent, maxChild);\n \n parent = maxChild;\n } else {\n break;\n }\n }//end while\n }//end while\n }",
"public static void heapSort(int arr[]) {\n int n = arr.length;\n\n //Creating heap\n for (int i = n / 2 - 1; i >= 0; i--)\n heapify(arr, n, i);\n\n //Taking elements from heap one by one\n for (int i = n - 1; i > 0; i--) {\n //Place current root to end\n int temp = arr[0];\n arr[0] = arr[i];\n arr[i] = temp;\n\n //Call max heapify\n heapify(arr, i, 0);\n }\n }",
"private void heapifyAdd() {\n // TODO. The general idea of this method is that we are checking whether the \n // most recently added item, which has been put at the end of the array, \n //needs to be swapped with its parent. We do this in a loop, until a swap isn’t needed or we reach the root. This is not recursive.\n\n // Pseudocode:\n // assign newly added item to a temp var.\n // use an index variable to keep track of the index where that value was added\n // while the index isn’t pointing at the root, and while the node at this index is greater than the node at its parent:\n // copy the parent node to the index location (move parent node down the heap)\n // set the index to the parent index\n // when we are at the root, or the parent of current index isn’t bigger, we are done\n // copy the temp variable to the location of the current index. \n T temp;\n int next = count - 1;\n\n temp = heap[next];\n\n while ((next != 0) && (((Comparable) temp).compareTo(heap[(next - 1) / 2]) > 0)) {\n heap[next] = heap[(next - 1) / 2];\n next = (next - 1) / 2;\n }\n heap[next] = temp;\n }",
"private static void Heapify(int[] A, int i, int size)\n {\n // get left and right child of node at index i\n int left = LEFT(i);\n int right = RIGHT(i);\n\n int smallest = i;\n\n // compare A[i] with its left and right child\n // and find smallest value\n if (left < size && A[left] < A[i]) {\n smallest = left;\n }\n\n if (right < size && A[right] < A[smallest]) {\n smallest = right;\n }\n\n // swap with child having lesser value and\n // call heapify-down on the child\n if (smallest != i) {\n swap(A, i, smallest);\n Heapify(A, smallest, size);\n }\n }",
"@Test\n\tpublic void BuildMaxHeaptest() {\n\t\t Job jarray[]=new Job[5];\n\t\t jarray[0]=new Job(\"job1\",50,1);\n\t\t jarray[1]=new Job(\"job2\",20,2);\n\t\t jarray[2]=new Job(\"job3\",80,3);\n\t\t jarray[3]=new Job(\"job4\",20,4);\n\t\t jarray[4]=new Job(\"job5\",1,5);\n\t\t int i;\n\t\t //= (int)Math.floor(jarray.length);\n\t\t \n\t\n\t\t for( i = (int)Math.floor(jarray.length); i >0; i-- )\n\t\t \tPQHeap.MaxHeapify(jarray, i);\n\t\n\t\tassertNotEquals(-1, i);\n\t}",
"private void heapify(int[] arr, int i, int end){\n \n int largest = i;\n int left = 2 * i + 1;\n int right = 2 * i + 2;\n \n if(left < end && arr[left] > arr[largest]){ // check bounds and compare values\n largest = left;\n }\n \n if(right < end && arr[right] > arr[largest]){\n largest = right;\n }\n \n if(largest != i){\n // perform swap arr[i] and arr[largest]\n swap(arr,largest,i);\n //recursively fix the tree using heapify()\n heapify(arr,largest,end);\n }\n \n }",
"private HuffmanTreeNode[] heapify(int freq[][]) {\n\t\tHuffmanTreeNode[] heap = new HuffmanTreeNode[freq.length];\n\t\tfor (int i = 0; i < freq.length; i++)\n\t\t{\n\t\t\theap[i] = new HuffmanTreeNode(freq[i][1], freq[i][0], null, null);\n\t\t}\n\t\t\n\t\theap = heapSort(heap);\n\n\t\treturn heap;\n\t}",
"@Before\n public void setUpBinaryMinHeaps() {\n empty = new BinaryMinHeap<>();\n emptyArr = new ArrayList<>();\n \n multipleElements = new BinaryMinHeap<>();\n multipleElements.insert(7);\n multipleElements.insert(8);\n multipleElements.insert(5);\n multipleElements.insert(3);\n multipleElements.insert(2);\n multipleElements.insert(6);\n \n multiArr = new ArrayList<>();\n multiArr.add(2);\n multiArr.add(3);\n multiArr.add(6);\n multiArr.add(8);\n multiArr.add(5);\n multiArr.add(7);\n \n }",
"public static void main(String[] args) {\n\n\t\tHeap hp = new Heap();\n\t\thp.add(20);\n\t\thp.add(10);\n\t\thp.add(70);\n\t\thp.add(80);\n\t\thp.add(1);\n//\t\thp.display();\n//\n//\t\twhile (hp.size() != 0) {\n//\t\t\tSystem.out.println(hp.remove());\n//\t\t}\n\n\t\tint[] arr = { 1, 5, 2, 3, 10, 20, 2, 1, 6, 7 };\n\n\t\tKthLargest(arr, 3);\n\t}",
"public static void main(String[] args) {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\r\n\t\ttry {\r\n\t\t\tint T = Integer.parseInt(br.readLine());\r\n\t\t\tfor (int t = 0; t < T; t++) {\r\n\t\t\t\tint N = Integer.parseInt(br.readLine());\r\n\t\t\t\tint[] A = new int[N]; // 수열 저장\r\n\t\t\t\tint cnt = 0;\r\n\r\n\t\t\t\tfor (int i = 0; i < N / 10 + 1; i++) {\r\n\t\t\t\t\tString[] arr = br.readLine().split(\" \");\r\n\t\t\t\t\tfor (int j = 0; j < arr.length; j++) {\r\n\t\t\t\t\t\tA[cnt] = Integer.parseInt(arr[j]);\r\n\t\t\t\t\t\tcnt++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tArrayList<Integer> result = new ArrayList<Integer>();\r\n\t\t\t\tPriorityQueue<Integer> maxheap = new PriorityQueue<Integer>(Collections.reverseOrder());\r\n\t\t\t\tPriorityQueue<Integer> minheap = new PriorityQueue<Integer>();\r\n\r\n\t\t\t\tfor (int i = 0; i < A.length; i++) {\r\n\t\t\t\t\tif (maxheap.size() == minheap.size())\r\n\t\t\t\t\t\tmaxheap.offer(A[i]);\r\n\t\t\t\t\telse if (maxheap.size() > minheap.size())\r\n\t\t\t\t\t\tminheap.offer(A[i]);\r\n\r\n\t\t\t\t\tif (!maxheap.isEmpty() && !minheap.isEmpty() && minheap.peek() < maxheap.peek()) {\r\n\t\t\t\t\t\tint max = maxheap.poll();\r\n\t\t\t\t\t\tint min = minheap.poll();\r\n\r\n\t\t\t\t\t\tminheap.offer(max);\r\n\t\t\t\t\t\tmaxheap.offer(min);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (i % 2 == 0) {\r\n\t\t\t\t\t\tresult.add(maxheap.peek());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(result.size());\r\n\t\t\t\tfor (int i = 0; i < result.size(); i++) {\r\n\t\t\t\t\tSystem.out.print(result.get(i) + \" \");\r\n\t\t\t\t\tif (i % 10 == 9)\r\n\t\t\t\t\t\tSystem.out.println();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n private void resize() {\n // Create a temporary array of the old capacity of the heap and store all of the heaps\n // elements in it\n int size = heap.length;\n T[] temp = (T[]) new Comparable[size];\n System.arraycopy(heap, 0, temp, 0, size);\n\n // Double the capacity of the heap array and copy the values of the temp array back into\n // the heap\n heap = (T[]) new Comparable[size * DOUBLE];\n System.arraycopy(temp, 0, heap, 0, size);\n }",
"static void max_heapify(int[] ar , int i ) {\r\n\t\tint left = left(i);\r\n\t\tint right = right(i);\r\n\t\tint largest = i;\r\n\t\tif(left <= heapSize && ar[left] > ar[i]) largest = left;\r\n\t\tif(right <= heapSize && ar[right] > ar[largest]) largest = right;\r\n\t\tif(largest !=i) {\r\n\t\t\tswap (ar,i,largest);\r\n\t\t\tmax_heapify(ar, largest);\r\n\t\t}\r\n\t}",
"void MaxInsert(int x)\n {\n if (size == capacity) {\n return;\n }\n size++;\n arr[size - 1] = x;\n for (int i = size - 1; i != 0 && arr[MyHeap.parent(i)] < arr[i]; )\n {\n swap(i,MyHeap.parent(i));\n i = MyHeap.parent(i);\n }\n }",
"public Heap(int mx) // constructor\n{\nmaxSize = mx;\ncurrentSize = 0;\nheapArray = new Node[maxSize]; // create array\n}",
"public static void main(String[] args) throws Exception {\n\t\tint[] a = {5,4, 9,7,19,8,17,2,6,5,21};\n\t\tMaxHeapSort hs = new MaxHeapSort(a);\t\t\n\t\ths.buildMaxHeap();\n\t\tPrintHelper.print(a);\n\t\ths.heapIncreaseKey(7, 22);\n\t\tPrintHelper.print(a);\n//\t\ths.heapSort();\n//\t\ths.heapExtractMax();\n//\t\tSortHelper.print(a,hs.n);\n//\t\ths.heapExtractMax();\n//\t\ths.heapInsert(10);\n//\t\tSortHelper.print(hs.a);\n//\t\ths.heapInsert(6);\n//\t\tSortHelper.print(hs.a);\n\t}",
"static void heapify1(Vector<Integer> arr, int n, int i) {\r\n\t\tint s = i;\r\n\t\tint l = 2 * i + 1;\r\n\t\tint r = l + 1;\r\n\r\n\t\tif (r < n && arr.get(s) > arr.get(r)) {\r\n\t\t\ts = r;\r\n\t\t}\r\n\t\tif (l < n && arr.get(s) > arr.get(l)) {\r\n\t\t\ts = l;\r\n\t\t}\r\n\t\tif (s != i) {\r\n\t\t\tint temp = arr.get(i);\r\n\t\t\tarr.set(i, arr.get(s));\r\n\t\t\tarr.set(s, temp);\r\n\t\t\theapify1(arr, n, s);\r\n\t\t}\r\n\t}",
"void minDecrease(int i,int x)\n {\n arr[i]=x;\n while(i!=0 && arr[MyHeap.parent(i)]>arr[i])\n {\n swap(MyHeap.parent(i),i);\n i=MyHeap.parent(i);\n }\n }",
"public HeapImp() {\n\t\tthis(10000);\n\t}",
"public MedianFinder() {\n maxHeap = new PriorityQueue<Integer>((x, y) -> (y - x));\n minHeap = new PriorityQueue<Integer>();\n size = 0;\n }",
"@Override\n\t\tpublic void run() {\n\t\t\tfor (int i = 0; i < 1000000; i++) {\n\t\t\t\tint[] a = Util.generateRandomArray(500, 200000);\n\t\t\t\tint[] b = a.clone();\n\t\t\t\t\n\t\t\t\ta = sort(a);\n\t\t\t\tArrays.sort(b);\n\t\t\t\t\n\t\t\t\tfor (int j = 0; j < b.length; j++) {\n\t\t\t\t\tUtil.Assert(a[j] == b[j], \"shit\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"Heap sort ok\");\n\t\t}",
"private void fixHeap(int indexItem){\r\n int child = indexItem;\r\n int parent = get_parent(child);\r\n // Fixing heap for upperbounds\r\n while (parent >= 0 && compare(theData.get(parent).data, theData.get(child).data) < 0) {\r\n swap(parent, child);\r\n child = parent;\r\n parent = get_parent(child);\r\n }\r\n\r\n parent = indexItem;\r\n\r\n // Fixing heap for lowerbounds\r\n while (true) {\r\n int leftChild = get_left_child(parent);\r\n if (leftChild >= theData.size()) {\r\n break;\r\n }\r\n int rightChild = leftChild + 1;\r\n int maxChild = leftChild;\r\n\r\n if (rightChild < theData.size() && compare(theData.get(leftChild).data, theData.get(rightChild).data) < 0) {\r\n maxChild = rightChild;\r\n }\r\n\r\n if (compare(theData.get(parent).data, theData.get(maxChild).data) < 0) {\r\n swap(parent, maxChild);\r\n parent = maxChild;\r\n } else {\r\n break;\r\n }\r\n }\r\n }",
"public MedianFromStream() {\n // if odd max-heap will have 1 more element than min-heap\n maxHeap = new PriorityQueue<>((a, b) -> b - a);\n minHeap = new PriorityQueue<>();\n }",
"public Heap(boolean isMin, Collection<ValueType> data) {\r\n // TODO\r\n }",
"@Override\n protected void downHeap(int k)\n {\n while (2 * k <= this.count)\n {\n //identify which of the 2 children are smaller\n int j = 2 * k;\n if (j < this.count && this.isGreater(j, j + 1))\n {\n j++;\n }\n //if the current value is < the smaller child, we're done\n if (!this.isGreater(k, j))\n {\n break;\n }\n //if not, swap and continue testing\n this.swap(k, j);\n k = j;\n }\n \tthis.elementsToArrayIndex.put(elements[k], k);\n }",
"public MinHeap(){\r\n nextAvail = 1;\r\n }",
"public static void heapify(int[] ints) {\n\t\tfor (int si = ints.length / 2 - 1; si >= 0; si--)\n\t\t\tpushDown(ints, si, ints.length);\n\t}",
"public static void main(String[] args)\r\n {\r\n ArrayHeapClass testClass = new ArrayHeapClass();\r\n String testValue;\r\n int index;\r\n\r\n for( index = 0; index < 25; index++ )\r\n {\r\n testValue = testClass.createHeapDataItem();\r\n\r\n System.out.println( \"Adding data Value: \"\r\n + testValue + \", Priority: \"\r\n + testClass.getPriority( testValue ) );\r\n\r\n testClass.addItem( testValue );\r\n }\r\n\r\n for( index = 0; index < 25; index++ )\r\n {\r\n testValue = testClass.removeItem();\r\n\r\n System.out.println( \"Data value removed: \" + testValue );\r\n }\r\n\r\n testClass.setDisplayFlag( true );\r\n\r\n for( index = 0; index < 25; index++ )\r\n {\r\n testValue = testClass.createHeapDataItem();\r\n\r\n testClass.addItem( testValue );\r\n }\r\n\r\n for( index = 0; index < 25; index++ )\r\n {\r\n testValue = testClass.removeItem();\r\n }\r\n }",
"public node_data heapMinimum(){return _a[0];}",
"private void heapifyRemove() {\n // this is called after the item at the bottom-left has been put at the root\n // we need to see if this item should swap down\n int node = 0;\n int left = 1;\n int right = 2;\n int next;\n\n // store the item at the root in temp\n T temp = heap[node];\n\n // find out where we might want to swap root \n if ((heap[left] == null) && (heap[right] == null)) {\n next = count; // no children, so no swapping\n return;\n } else if (heap[right] == null) {\n next = left; // we will check left child\n } else if (((Comparable) heap[left]).compareTo(heap[right]) > 0) { // figure out which is the biggest of the two children\n next = left; // left is bigger than right, so check left child\n } else {\n next = right; // check right child\n }\n\n // compare heap[next] to item temp, if bigger, swap, and then repeat process\n while ((next < count) && (((Comparable) heap[next]).compareTo(temp) > 0)) {\n heap[node] = heap[next];\n node = next;\n left = 2 * node + 1; // left child of current node\n right = 2 * (node + 1); // right child of current node\n if ((heap[left] == null) && (heap[right] == null)) {\n next = count;\n } else if (heap[right] == null) {\n next = left;\n } else if (((Comparable) heap[left]).compareTo(heap[right]) > 0) {\n next = left;\n } else {\n next = right;\n }\n }\n heap[node] = temp;\n\n }",
"public Heap(int maxSize, int[] _dist, int[] _hPos) \r\n {\r\n N = 0;\r\n h = new int[maxSize + 1];\r\n dist = _dist;\r\n hPos = _hPos;\r\n }",
"public void heapSort(int[] arr){\n \n int mid = arr.length/2 ;\n \n /* build max-heap step- does not gurantee sorted order*/\n for(int i = mid; i >= 0; i--){\n heapify(arr,i, arr.length);\n }\n \n /*sorting in ascending order*/\n for(int i = nums.length - 1; i >=0; i--){\n /*swap largest element (at index 0) with last index*/\n swap(nums,0,i);\n heapify(nums,0,i); // note- here we consider length of array to be i, as we dont wanna run the algo for entire length of array\n } \n \n \n \n }",
"private void maxHeapifyDown(int index) {\n assert index >= 0 && index < heap.size();\n\n while (!isLeaf(index)) {\n int j = leftChildIndex(index);\n\n if ( (j < heap.size() - 1) && (heap.get(j).compareTo(heap.get(j + 1)) < 0) ) {\n j++;\n }\n\n if (heap.get(index).compareTo(heap.get(j)) >= 0) {\n return;\n }\n \n swap(heap, index, j);\n index = j;\n }\n }",
"public LeftistHeap() {\n root = null;\n }",
"public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tPriorityQueue<Integer>heap=new PriorityQueue<Integer>(new comparison());\n\t\tPriorityQueue<Integer>heap1=new PriorityQueue<Integer>();\n\t\tint num=sc.nextInt();\n\t\tint k=sc.nextInt();\n\t\tfor(int i=0;i<num;i++)\n\t\t{\n\t\t\tint value=sc.nextInt();\n\t\t\theap.add(value);\n\t\t\theap1.add(value);\n\t\t\tif(heap.size()>k)\n\t\t\t{\n\t\t\t\theap.remove();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tSystem.out.println(heap.peek());\n\t\tfor(int i=0;i<k-1;i++)\n\t\t{\n\t\t\theap.remove();\n\t\t}\n\t\tSystem.out.println(heap.peek());\n\t}",
"public MaxHeap() {\n this.heap = new ArrayList<E>();\n }",
"public PriorityQueue(int size){\n heap = new Element[size];\n }",
"private void minHeapify(int i) {\n int l, r, smallest, temp;\n\n l = leftchild(i);\n r = rightchild(i);\n\n if (r <= heapsize) {\n if (array[l] < array[r]) {\n smallest = l;\n } else {\n smallest = r;\n }\n if (array[i] > array[smallest]) {\n temp = array[i];\n array[i] = array[smallest];\n array[smallest] = temp;\n\n minHeapify(smallest);\n }\n else if ((l == heapsize) && (array[i] > array[l])) {\n temp = array[i];\n array[i] = array[l];\n array[l] = temp;\n\n }\n }\n }",
"public static void main(String[] args) {\n List<EntityProfile>[] profiles;\r\n if (args.length > 0) {\r\n BASEPATH = args[0] + \"/\";\r\n profiles = Utilities.getEntities(BASEPATH, DATASET, CLEAN);\r\n } else {\r\n //profiles = Utilities.getEntities(BASEPATH, DATASET, CLEAN);\r\n profiles = Utilities.getEntities(DATASET, CLEAN);\r\n }\r\n\r\n Instant start = Instant.now();\r\n\r\n ProgressiveSnHeap psn = new ProgressiveSnHeap(profiles, WeightingSchemeSn.MINHASH, false, 50);\r\n // weighted psn needs a block collection and a wighing scheme\r\n //psn.buildEntityList(50);\r\n // passing no argument simple psn is performed\r\n //psn.buildEntityList();\r\n\r\n //MinMaxPriorityQueue<Comparison> comparisons = psn.get_heap();\r\n\r\n double num_comparisons = 0;\r\n double comparisons_old = 0;\r\n //AbstractDuplicatePropagation adp = Utilities.getGroundTruth(BASEPATH, DATASET, CLEAN);\r\n AbstractDuplicatePropagation adp = Utilities.getGroundTruth(DATASET, CLEAN);\r\n\r\n double pc = 0.0;\r\n double pc_old = 0.0;\r\n double pq = 0.0;\r\n double detectedDuplicates = 0;\r\n\r\n double w_old = Double.MAX_VALUE;\r\n //while (!comparisons.isEmpty()) {\r\n while (psn.hasNext()) {\r\n //Comparison c = comparisons.pollFirst();\r\n Comparison c = (Comparison) psn.next();\r\n //double w = c.getUtilityMeasure();\r\n //if (w_old < w) {\r\n // System.out.println(\"error weight: \" + w_old + \" \" + w);\r\n //}\r\n //System.out.println(\"weight: \" + w);\r\n //w_old = w;\r\n\r\n\r\n num_comparisons++;\r\n detectedDuplicates = adp.getNoOfDuplicates();\r\n pc = ((double) detectedDuplicates) / adp.getExistingDuplicates();\r\n if ((pc - pc_old) > .1) {\r\n pc_old = pc;\r\n //pq = detectedDuplicates / (double) comparisons;\r\n System.out.println(\"pc: \" + Math.round(pc * 100) / 100.0 + \" - \" + (num_comparisons - comparisons_old));\r\n comparisons_old = num_comparisons;\r\n }\r\n adp.isSuperfluous(c);\r\n\r\n if (pc > 0.8) {\r\n break;\r\n }\r\n }\r\n\r\n detectedDuplicates = adp.getNoOfDuplicates();\r\n pc = ((double) detectedDuplicates) / adp.getExistingDuplicates();\r\n pq = detectedDuplicates / (double) num_comparisons;\r\n\r\n System.out.println(\"partial res1\");\r\n System.out.println(\"pc: \" + pc);\r\n System.out.println(\"pq: \" + pq);\r\n }"
]
| [
"0.749711",
"0.7496643",
"0.7452341",
"0.7127477",
"0.70963377",
"0.7091346",
"0.70633084",
"0.70151496",
"0.700288",
"0.69755006",
"0.68606985",
"0.6839667",
"0.6757959",
"0.6738045",
"0.67035997",
"0.669334",
"0.66864014",
"0.6681492",
"0.66797614",
"0.66746473",
"0.66633207",
"0.6651654",
"0.66487706",
"0.6645026",
"0.6633999",
"0.6628325",
"0.662472",
"0.6617712",
"0.66152567",
"0.661212",
"0.66056585",
"0.6591609",
"0.65855837",
"0.65683955",
"0.6555276",
"0.6532828",
"0.6523298",
"0.6505095",
"0.650238",
"0.64440227",
"0.6417445",
"0.6414738",
"0.64083624",
"0.64062244",
"0.639987",
"0.6399495",
"0.6398248",
"0.6384267",
"0.63824016",
"0.63796663",
"0.63739234",
"0.6364637",
"0.6363368",
"0.6362959",
"0.6362255",
"0.6352452",
"0.63507444",
"0.6345885",
"0.6344217",
"0.63434064",
"0.63426894",
"0.63283455",
"0.6327073",
"0.63206446",
"0.6318407",
"0.63114125",
"0.6295932",
"0.6285835",
"0.628583",
"0.6285056",
"0.6280604",
"0.62740374",
"0.6273646",
"0.6264569",
"0.6257426",
"0.62471515",
"0.62438095",
"0.6239171",
"0.6231132",
"0.62238044",
"0.62223125",
"0.62158054",
"0.6215355",
"0.6207114",
"0.6200617",
"0.6197286",
"0.6179489",
"0.61651385",
"0.61648864",
"0.61638546",
"0.61590034",
"0.6158316",
"0.6155681",
"0.61545825",
"0.6150727",
"0.61499655",
"0.61430424",
"0.61419475",
"0.6134469",
"0.61276376",
"0.61252755"
]
| 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.