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
/ Enabled aggressive block sorting
@Override public final /* synthetic */ zzfjs zza(zzfjj zzfjj2) throws IOException { block19: do { int n; int n2; Object[] arrobject; int n3 = zzfjj2.zzcvt(); switch (n3) { default: { if (super.zza(zzfjj2, n3)) continue block19; } case 0: { return this; } case 10: { this.zzlmn = zzfjj2.readBytes(); continue block19; } case 18: { this.zzlmo = zzfjj2.readString(); continue block19; } case 25: { this.zzlmp = Double.longBitsToDouble(zzfjj2.zzcwp()); continue block19; } case 37: { this.zzlmq = Float.intBitsToFloat(zzfjj2.zzcwo()); continue block19; } case 40: { this.zzlmr = zzfjj2.zzcwn(); continue block19; } case 48: { this.zzlms = zzfjj2.zzcwi(); continue block19; } case 56: { n3 = zzfjj2.zzcwi(); this.zzlmt = -(n3 & 1) ^ n3 >>> 1; continue block19; } case 64: { this.zzlmu = zzfjj2.zzcvz(); continue block19; } case 74: { n = zzfjv.zzb(zzfjj2, 74); n3 = this.zzlmv == null ? 0 : this.zzlmv.length; arrobject = new zzdmc[n + n3]; n = n3; if (n3 != 0) { System.arraycopy(this.zzlmv, 0, arrobject, 0, n3); n = n3; } while (n < arrobject.length - 1) { arrobject[n] = new zzdmc(); zzfjj2.zza((zzfjs)arrobject[n]); zzfjj2.zzcvt(); ++n; } arrobject[n] = new zzdmc(); zzfjj2.zza((zzfjs)arrobject[n]); this.zzlmv = arrobject; continue block19; } case 82: { n = zzfjv.zzb(zzfjj2, 82); n3 = this.zzlmw == null ? 0 : this.zzlmw.length; arrobject = new zzdmd[n + n3]; n = n3; if (n3 != 0) { System.arraycopy(this.zzlmw, 0, arrobject, 0, n3); n = n3; } while (n < arrobject.length - 1) { arrobject[n] = new zzdmd(); zzfjj2.zza((zzfjs)arrobject[n]); zzfjj2.zzcvt(); ++n; } arrobject[n] = new zzdmd(); zzfjj2.zza((zzfjs)arrobject[n]); this.zzlmw = arrobject; continue block19; } case 90: { n = zzfjv.zzb(zzfjj2, 90); n3 = this.zzlmx == null ? 0 : this.zzlmx.length; arrobject = new String[n + n3]; n = n3; if (n3 != 0) { System.arraycopy(this.zzlmx, 0, arrobject, 0, n3); n = n3; } while (n < arrobject.length - 1) { arrobject[n] = zzfjj2.readString(); zzfjj2.zzcvt(); ++n; } arrobject[n] = zzfjj2.readString(); this.zzlmx = arrobject; continue block19; } case 96: { n = zzfjv.zzb(zzfjj2, 96); n3 = this.zzlmy == null ? 0 : this.zzlmy.length; arrobject = new long[n + n3]; n = n3; if (n3 != 0) { System.arraycopy(this.zzlmy, 0, arrobject, 0, n3); n = n3; } while (n < arrobject.length - 1) { arrobject[n] = zzfjj2.zzcwn(); zzfjj2.zzcvt(); ++n; } arrobject[n] = zzfjj2.zzcwn(); this.zzlmy = arrobject; continue block19; } case 98: { n2 = zzfjj2.zzks(zzfjj2.zzcwi()); n3 = zzfjj2.getPosition(); n = 0; while (zzfjj2.zzcwk() > 0) { zzfjj2.zzcwn(); ++n; } zzfjj2.zzmg(n3); n3 = this.zzlmy == null ? 0 : this.zzlmy.length; arrobject = new long[n + n3]; n = n3; if (n3 != 0) { System.arraycopy(this.zzlmy, 0, arrobject, 0, n3); n = n3; } while (n < arrobject.length) { arrobject[n] = zzfjj2.zzcwn(); ++n; } this.zzlmy = arrobject; zzfjj2.zzkt(n2); continue block19; } case 104: { this.zzlna = zzfjj2.zzcwn(); continue block19; } case 117: { n = zzfjv.zzb(zzfjj2, 117); n3 = this.zzlmz == null ? 0 : this.zzlmz.length; arrobject = new float[n + n3]; n = n3; if (n3 != 0) { System.arraycopy(this.zzlmz, 0, arrobject, 0, n3); n = n3; } while (n < arrobject.length - 1) { arrobject[n] = Float.intBitsToFloat(zzfjj2.zzcwo()); zzfjj2.zzcvt(); ++n; } arrobject[n] = Float.intBitsToFloat(zzfjj2.zzcwo()); this.zzlmz = arrobject; continue block19; } case 114: } n3 = zzfjj2.zzcwi(); n2 = zzfjj2.zzks(n3); n = n3 / 4; n3 = this.zzlmz == null ? 0 : this.zzlmz.length; arrobject = new float[n + n3]; n = n3; if (n3 != 0) { System.arraycopy(this.zzlmz, 0, arrobject, 0, n3); n = n3; } while (n < arrobject.length) { arrobject[n] = Float.intBitsToFloat(zzfjj2.zzcwo()); ++n; } this.zzlmz = arrobject; zzfjj2.zzkt(n2); } while (true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sortBlocks(){\n\t\tCurrentSets = getCurrentSets();\n\t\tif(CurrentSets == 1){\n\t\t\treturn;\n\t\t}else{\n\t\t\tfor(i = 0; i < CurrentSets - 1; i++){\n\t\t\t\tfor(j = i + 1; j < CurrentSets; j++){\n\t\t\t\t\tif((Integer.parseInt(blocks[i].getHexTag(), 16)) > (Integer.parseInt(blocks[j].getHexTag(), 16))){\n\t\t\t\t\t\ttemp = blocks[j];\n\t\t\t\t\t\tblocks[j] = blocks[i];\n\t\t\t\t\t\tblocks[i] = temp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void sort(IAlg algorithm, boolean decrescent){}", "private static void sortingMemo() {\n\t\t\n\t}", "public void sort()throws InterruptedException{\n\t\tfor (int i = 0; i < a.length - 1; i++) {\n\t\t\tint minPos = minPosition(i);\n\t\t\tsortStateLock.lock();\n\t\t\ttry{\n\t\t\t\tswap(minPos, i);\n\t\t\t\t// For animation\n\t\t\t\talreadySorted = i;\n\t\t\t}\n\t\t\tfinally{\n\t\t\t\tsortStateLock.unlock();\n\t\t \t\t}\n\t\t\tpause(2);\n\t }\n }", "public FastNondominatedSorting() {\r\n\t\tthis(new ParetoDominanceComparator());\r\n\t}", "private PerfectMergeSort() {}", "@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 void sort() {\n compares = 0;\n shuttlesort((int[]) indexes.clone(), indexes, 0, indexes.length);\n }", "public void sort() {\r\n int k = start;\r\n for (int i = 0; i < size - 1; i++) {\r\n int p = (k + 1) % cir.length;\r\n for (int j = i + 1; j < size; j++) {\r\n if ((int) cir[p] < (int) cir[k % cir.length]) {\r\n Object temp = cir[k];\r\n cir[k] = cir[p];\r\n cir[p] = temp;\r\n }\r\n p = (p + 1) % cir.length;\r\n }\r\n k = (k + 1) % cir.length;\r\n }\r\n }", "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}", "private void sort() {\n\t\trunPassZero();\n\t\tList<TupleReaderBinary> buffers = new ArrayList<>();\n\t\tList<Tuple> sortStage = new ArrayList<>();\n\t\tassert (readerBucketID == 0);\n\t\tassert (writerBucketID == 0);\n\t\tassert (passNumber == 1);\n\t\tassert (currentGroup == 1);\n\t\toutputBuffer.clear();\n\n\t\t// assign buffers\n\t\tfor (int i = 0; i < numInputBuffers; i++) {\n\t\t\tbuffers.add(null);\n\t\t\tassignBuffer(buffers, i);\n\t\t\tsortStage.add(null);\n\t\t}\n\n\t\tassert (buffers.size() == numInputBuffers);\n\t\tassert (sortStage.size() == numInputBuffers);\n\n\t\t// read from buffers into list of size numInputBuffers\n\t\tfor (int i = 0; i < numInputBuffers; i++) {\n\t\t\tsortStage.set(i, readFromBuffer(buffers, i));\n\t\t}\n\n\t\toutputWriter = new TupleWriterBinary(DatabaseCatalog.getInstance().getTempDirectory() + \"/\" + instanceHashcode\n\t\t\t\t+ \"_\" + passNumber + \"_\" + writerBucketID);\n\n\t\twhile (true) {\n\t\t\tif (!findAndReplaceSmallest(buffers, sortStage)) {\n\t\t\t\tprevPrevTotalBuckets = prevTotalBuckets;\n\t\t\t\tprevTotalBuckets = writerBucketID + 1;\n\t\t\t\tflushOutputBuffer();\n\t\t\t\toutputWriter.close();\n\n\t\t\t\t// We are done! Return\n\t\t\t\tif (prevTotalBuckets == 1) {\n\t\t\t\t\tdeleteTempFiles();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\twriterBucketID = 0;\n\t\t\t\treaderBucketID = 0;\n\t\t\t\twriterFlushes = 0;\n\t\t\t\tdeleteTempFiles();\n\t\t\t\tpassNumber++;\n\t\t\t\tcurrentGroup = 1;\n\n\t\t\t\tfor (int i = 0; i < numInputBuffers; i++) {\n\t\t\t\t\tassignBuffer(buffers, i);\n\t\t\t\t\tsortStage.add(null);\n\t\t\t\t}\n\t\t\t\tfor (int i = 0; i < numInputBuffers; i++) {\n\t\t\t\t\tsortStage.set(i, readFromBuffer(buffers, i));\n\t\t\t\t}\n\n\t\t\t\toutputWriter = new TupleWriterBinary(DatabaseCatalog.getInstance().getTempDirectory() + \"/\"\n\t\t\t\t\t\t+ instanceHashcode + \"_\" + passNumber + \"_\" + writerBucketID);\n\t\t\t}\n\t\t}\n\n\t}", "public void radixSorting() {\n\t\t\n\t}", "public void sort() {\n }", "public void sort() {\n\t\tdivider(0, array.size() - 1);\n\t}", "public void setBubbleSort() \n\t{\n\t\tint last = recordCount + NOT_FOUND; //array.length() - 1\n\n\t\twhile(last > RESET_VALUE) //last > 0\n\t\t{\n\t\t\tint localIndex = RESET_VALUE; \n\t\t\tboolean swap = false;\n\n\t\t\twhile(localIndex < last) \n\t\t\t{\n\t\t\t\tif(itemIDs[localIndex] > itemIDs[localIndex + 1]) \n\t\t\t\t{\n\t\t\t\t\tsetSwapArrayElements(localIndex);\n\t\t\t\t\tswap = true;\n\t\t\t\t}\n\t\t\t\tlocalIndex++;\n\t\t\t}\n\n\t\t\tif(swap == false) \n\t\t\t{\n\t\t\t\tlast = RESET_VALUE;\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tlast = last + NOT_FOUND;\n\t\t\t}\n\n\t\t}//END while(last > RESET_VALUE)\n\t\treturn;\n\t}", "private void trIntroSort(int r34, int r35, int r36, int r37, int r38, io.netty.handler.codec.compression.Bzip2DivSufSort.TRBudget r39, int r40) {\n /*\n r33 = this;\n r0 = r33;\n r0 = r0.SA;\n r16 = r0;\n r4 = 64;\n r0 = new io.netty.handler.codec.compression.Bzip2DivSufSort.StackEntry[r4];\n r29 = r0;\n r32 = 0;\n r27 = 0;\n r4 = r38 - r37;\n r22 = trLog(r4);\n r28 = r27;\n r23 = r22;\n L_0x001a:\n if (r23 >= 0) goto L_0x02b6;\n L_0x001c:\n r4 = -1;\n r0 = r23;\n if (r0 != r4) goto L_0x01a4;\n L_0x0021:\n r4 = r38 - r37;\n r0 = r39;\n r1 = r40;\n r4 = r0.update(r1, r4);\n if (r4 != 0) goto L_0x0050;\n L_0x002d:\n r22 = r23;\n L_0x002f:\n r26 = 0;\n L_0x0031:\n r0 = r26;\n r1 = r28;\n if (r0 >= r1) goto L_0x072a;\n L_0x0037:\n r4 = r29[r26];\n r4 = r4.d;\n r5 = -3;\n if (r4 != r5) goto L_0x004d;\n L_0x003e:\n r4 = r29[r26];\n r4 = r4.b;\n r5 = r29[r26];\n r5 = r5.c;\n r0 = r33;\n r1 = r34;\n r0.lsUpdateGroup(r1, r4, r5);\n L_0x004d:\n r26 = r26 + 1;\n goto L_0x0031;\n L_0x0050:\n r6 = r35 + -1;\n r10 = r38 + -1;\n r4 = r33;\n r5 = r34;\n r7 = r36;\n r8 = r37;\n r9 = r38;\n r25 = r4.trPartition(r5, r6, r7, r8, r9, r10);\n r0 = r25;\n r8 = r0.first;\n r0 = r25;\n r9 = r0.last;\n r0 = r37;\n if (r0 < r8) goto L_0x0072;\n L_0x006e:\n r0 = r38;\n if (r9 >= r0) goto L_0x016d;\n L_0x0072:\n r0 = r38;\n if (r8 >= r0) goto L_0x0087;\n L_0x0076:\n r17 = r37;\n r31 = r8 + -1;\n L_0x007a:\n r0 = r17;\n if (r0 >= r8) goto L_0x0087;\n L_0x007e:\n r4 = r16[r17];\n r4 = r4 + r34;\n r16[r4] = r31;\n r17 = r17 + 1;\n goto L_0x007a;\n L_0x0087:\n r0 = r38;\n if (r9 >= r0) goto L_0x009c;\n L_0x008b:\n r17 = r8;\n r31 = r9 + -1;\n L_0x008f:\n r0 = r17;\n if (r0 >= r9) goto L_0x009c;\n L_0x0093:\n r4 = r16[r17];\n r4 = r4 + r34;\n r16[r4] = r31;\n r17 = r17 + 1;\n goto L_0x008f;\n L_0x009c:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = 0;\n r6 = 0;\n r4.<init>(r5, r8, r9, r6);\n r29[r28] = r4;\n r28 = r27 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r35 + -1;\n r6 = -2;\n r0 = r37;\n r1 = r38;\n r4.<init>(r5, r0, r1, r6);\n r29[r27] = r4;\n r4 = r8 - r37;\n r5 = r38 - r9;\n if (r4 > r5) goto L_0x0117;\n L_0x00bd:\n r4 = 1;\n r5 = r8 - r37;\n if (r4 >= r5) goto L_0x00e3;\n L_0x00c2:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r38 - r9;\n r5 = trLog(r5);\n r0 = r35;\n r1 = r38;\n r4.<init>(r0, r9, r1, r5);\n r29[r28] = r4;\n r38 = r8;\n r4 = r8 - r37;\n r22 = trLog(r4);\n L_0x00dd:\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x00e3:\n r4 = 1;\n r5 = r38 - r9;\n if (r4 >= r5) goto L_0x00f3;\n L_0x00e8:\n r37 = r9;\n r4 = r38 - r9;\n r22 = trLog(r4);\n r27 = r28;\n goto L_0x00dd;\n L_0x00f3:\n if (r28 != 0) goto L_0x00fa;\n L_0x00f5:\n r27 = r28;\n r22 = r23;\n L_0x00f9:\n return;\n L_0x00fa:\n r27 = r28 + -1;\n r20 = r29[r27];\n r0 = r20;\n r0 = r0.a_isRightVersion;\n r35 = r0;\n r0 = r20;\n r0 = r0.b;\n r37 = r0;\n r0 = r20;\n r0 = r0.c;\n r38 = r0;\n r0 = r20;\n r0 = r0.d;\n r22 = r0;\n goto L_0x00dd;\n L_0x0117:\n r4 = 1;\n r5 = r38 - r9;\n if (r4 >= r5) goto L_0x0138;\n L_0x011c:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r8 - r37;\n r5 = trLog(r5);\n r0 = r35;\n r1 = r37;\n r4.<init>(r0, r1, r8, r5);\n r29[r28] = r4;\n r37 = r9;\n r4 = r38 - r9;\n r22 = trLog(r4);\n goto L_0x00dd;\n L_0x0138:\n r4 = 1;\n r5 = r8 - r37;\n if (r4 >= r5) goto L_0x0148;\n L_0x013d:\n r38 = r8;\n r4 = r8 - r37;\n r22 = trLog(r4);\n r27 = r28;\n goto L_0x00dd;\n L_0x0148:\n if (r28 != 0) goto L_0x014f;\n L_0x014a:\n r27 = r28;\n r22 = r23;\n goto L_0x00f9;\n L_0x014f:\n r27 = r28 + -1;\n r20 = r29[r27];\n r0 = r20;\n r0 = r0.a_isRightVersion;\n r35 = r0;\n r0 = r20;\n r0 = r0.b;\n r37 = r0;\n r0 = r20;\n r0 = r0.c;\n r38 = r0;\n r0 = r20;\n r0 = r0.d;\n r22 = r0;\n goto L_0x00dd;\n L_0x016d:\n r17 = r37;\n L_0x016f:\n r0 = r17;\n r1 = r38;\n if (r0 >= r1) goto L_0x017e;\n L_0x0175:\n r4 = r16[r17];\n r4 = r4 + r34;\n r16[r4] = r17;\n r17 = r17 + 1;\n goto L_0x016f;\n L_0x017e:\n if (r28 != 0) goto L_0x0186;\n L_0x0180:\n r27 = r28;\n r22 = r23;\n goto L_0x00f9;\n L_0x0186:\n r27 = r28 + -1;\n r20 = r29[r27];\n r0 = r20;\n r0 = r0.a_isRightVersion;\n r35 = r0;\n r0 = r20;\n r0 = r0.b;\n r37 = r0;\n r0 = r20;\n r0 = r0.c;\n r38 = r0;\n r0 = r20;\n r0 = r0.d;\n r22 = r0;\n goto L_0x00dd;\n L_0x01a4:\n r4 = -2;\n r0 = r23;\n if (r0 != r4) goto L_0x01ea;\n L_0x01a9:\n r27 = r28 + -1;\n r4 = r29[r27];\n r8 = r4.b;\n r4 = r29[r27];\n r9 = r4.c;\n r11 = r35 - r34;\n r4 = r33;\n r5 = r34;\n r6 = r36;\n r7 = r37;\n r10 = r38;\n r4.trCopy(r5, r6, r7, r8, r9, r10, r11);\n if (r27 != 0) goto L_0x01c8;\n L_0x01c4:\n r22 = r23;\n goto L_0x00f9;\n L_0x01c8:\n r27 = r27 + -1;\n r20 = r29[r27];\n r0 = r20;\n r0 = r0.a_isRightVersion;\n r35 = r0;\n r0 = r20;\n r0 = r0.b;\n r37 = r0;\n r0 = r20;\n r0 = r0.c;\n r38 = r0;\n r0 = r20;\n r0 = r0.d;\n r22 = r0;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x01ea:\n r4 = r16[r37];\n if (r4 < 0) goto L_0x0202;\n L_0x01ee:\n r8 = r37;\n L_0x01f0:\n r4 = r16[r8];\n r4 = r4 + r34;\n r16[r4] = r8;\n r8 = r8 + 1;\n r0 = r38;\n if (r8 >= r0) goto L_0x0200;\n L_0x01fc:\n r4 = r16[r8];\n if (r4 >= 0) goto L_0x01f0;\n L_0x0200:\n r37 = r8;\n L_0x0202:\n r0 = r37;\n r1 = r38;\n if (r0 >= r1) goto L_0x028c;\n L_0x0208:\n r8 = r37;\n L_0x020a:\n r4 = r16[r8];\n r4 = r4 ^ -1;\n r16[r8] = r4;\n r8 = r8 + 1;\n r4 = r16[r8];\n if (r4 < 0) goto L_0x020a;\n L_0x0216:\n r4 = r16[r8];\n r4 = r4 + r34;\n r4 = r16[r4];\n r5 = r16[r8];\n r5 = r5 + r35;\n r5 = r16[r5];\n if (r4 == r5) goto L_0x0241;\n L_0x0224:\n r4 = r8 - r37;\n r4 = r4 + 1;\n r24 = trLog(r4);\n L_0x022c:\n r8 = r8 + 1;\n r0 = r38;\n if (r8 >= r0) goto L_0x0244;\n L_0x0232:\n r9 = r37;\n r31 = r8 + -1;\n L_0x0236:\n if (r9 >= r8) goto L_0x0244;\n L_0x0238:\n r4 = r16[r9];\n r4 = r4 + r34;\n r16[r4] = r31;\n r9 = r9 + 1;\n goto L_0x0236;\n L_0x0241:\n r24 = -1;\n goto L_0x022c;\n L_0x0244:\n r4 = r8 - r37;\n r5 = r38 - r8;\n if (r4 > r5) goto L_0x0264;\n L_0x024a:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = -3;\n r0 = r35;\n r1 = r38;\n r4.<init>(r0, r8, r1, r5);\n r29[r28] = r4;\n r35 = r35 + 1;\n r38 = r8;\n r22 = r24;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x0264:\n r4 = 1;\n r5 = r38 - r8;\n if (r4 >= r5) goto L_0x0282;\n L_0x0269:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r35 + 1;\n r0 = r37;\n r1 = r24;\n r4.<init>(r5, r0, r8, r1);\n r29[r28] = r4;\n r37 = r8;\n r22 = -3;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x0282:\n r35 = r35 + 1;\n r38 = r8;\n r22 = r24;\n r23 = r22;\n goto L_0x001a;\n L_0x028c:\n if (r28 != 0) goto L_0x0294;\n L_0x028e:\n r27 = r28;\n r22 = r23;\n goto L_0x00f9;\n L_0x0294:\n r27 = r28 + -1;\n r20 = r29[r27];\n r0 = r20;\n r0 = r0.a_isRightVersion;\n r35 = r0;\n r0 = r20;\n r0 = r0.b;\n r37 = r0;\n r0 = r20;\n r0 = r0.c;\n r38 = r0;\n r0 = r20;\n r0 = r0.d;\n r22 = r0;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x02b6:\n r4 = r38 - r37;\n r5 = 8;\n if (r4 > r5) goto L_0x02d5;\n L_0x02bc:\n r4 = r38 - r37;\n r0 = r39;\n r1 = r40;\n r4 = r0.update(r1, r4);\n if (r4 != 0) goto L_0x02cc;\n L_0x02c8:\n r22 = r23;\n goto L_0x002f;\n L_0x02cc:\n r33.trInsertionSort(r34, r35, r36, r37, r38);\n r22 = -3;\n r23 = r22;\n goto L_0x001a;\n L_0x02d5:\n r22 = r23 + -1;\n if (r23 != 0) goto L_0x0331;\n L_0x02d9:\n r4 = r38 - r37;\n r0 = r39;\n r1 = r40;\n r4 = r0.update(r1, r4);\n if (r4 == 0) goto L_0x002f;\n L_0x02e5:\n r15 = r38 - r37;\n r10 = r33;\n r11 = r34;\n r12 = r35;\n r13 = r36;\n r14 = r37;\n r10.trHeapSort(r11, r12, r13, r14, r15);\n r8 = r38 + -1;\n L_0x02f6:\n r0 = r37;\n if (r0 >= r8) goto L_0x032b;\n L_0x02fa:\n r4 = r16[r8];\n r0 = r33;\n r1 = r34;\n r2 = r35;\n r3 = r36;\n r32 = r0.trGetC(r1, r2, r3, r4);\n r9 = r8 + -1;\n L_0x030a:\n r0 = r37;\n if (r0 > r9) goto L_0x0329;\n L_0x030e:\n r4 = r16[r9];\n r0 = r33;\n r1 = r34;\n r2 = r35;\n r3 = r36;\n r4 = r0.trGetC(r1, r2, r3, r4);\n r0 = r32;\n if (r4 != r0) goto L_0x0329;\n L_0x0320:\n r4 = r16[r9];\n r4 = r4 ^ -1;\n r16[r9] = r4;\n r9 = r9 + -1;\n goto L_0x030a;\n L_0x0329:\n r8 = r9;\n goto L_0x02f6;\n L_0x032b:\n r22 = -3;\n r23 = r22;\n goto L_0x001a;\n L_0x0331:\n r8 = r33.trPivot(r34, r35, r36, r37, r38);\n r0 = r16;\n r1 = r37;\n r2 = r16;\n swapElements(r0, r1, r2, r8);\n r4 = r16[r37];\n r0 = r33;\n r1 = r34;\n r2 = r35;\n r3 = r36;\n r31 = r0.trGetC(r1, r2, r3, r4);\n r9 = r37 + 1;\n L_0x034e:\n r0 = r38;\n if (r9 >= r0) goto L_0x0369;\n L_0x0352:\n r4 = r16[r9];\n r0 = r33;\n r1 = r34;\n r2 = r35;\n r3 = r36;\n r32 = r0.trGetC(r1, r2, r3, r4);\n r0 = r32;\n r1 = r31;\n if (r0 != r1) goto L_0x0369;\n L_0x0366:\n r9 = r9 + 1;\n goto L_0x034e;\n L_0x0369:\n r8 = r9;\n r0 = r38;\n if (r9 >= r0) goto L_0x039e;\n L_0x036e:\n r0 = r32;\n r1 = r31;\n if (r0 >= r1) goto L_0x039e;\n L_0x0374:\n r9 = r9 + 1;\n r0 = r38;\n if (r9 >= r0) goto L_0x039e;\n L_0x037a:\n r4 = r16[r9];\n r0 = r33;\n r1 = r34;\n r2 = r35;\n r3 = r36;\n r32 = r0.trGetC(r1, r2, r3, r4);\n r0 = r32;\n r1 = r31;\n if (r0 > r1) goto L_0x039e;\n L_0x038e:\n r0 = r32;\n r1 = r31;\n if (r0 != r1) goto L_0x0374;\n L_0x0394:\n r0 = r16;\n r1 = r16;\n swapElements(r0, r9, r1, r8);\n r8 = r8 + 1;\n goto L_0x0374;\n L_0x039e:\n r17 = r38 + -1;\n L_0x03a0:\n r0 = r17;\n if (r9 >= r0) goto L_0x03bb;\n L_0x03a4:\n r4 = r16[r17];\n r0 = r33;\n r1 = r34;\n r2 = r35;\n r3 = r36;\n r32 = r0.trGetC(r1, r2, r3, r4);\n r0 = r32;\n r1 = r31;\n if (r0 != r1) goto L_0x03bb;\n L_0x03b8:\n r17 = r17 + -1;\n goto L_0x03a0;\n L_0x03bb:\n r18 = r17;\n r0 = r17;\n if (r9 >= r0) goto L_0x03f5;\n L_0x03c1:\n r0 = r32;\n r1 = r31;\n if (r0 <= r1) goto L_0x03f5;\n L_0x03c7:\n r17 = r17 + -1;\n r0 = r17;\n if (r9 >= r0) goto L_0x03f5;\n L_0x03cd:\n r4 = r16[r17];\n r0 = r33;\n r1 = r34;\n r2 = r35;\n r3 = r36;\n r32 = r0.trGetC(r1, r2, r3, r4);\n r0 = r32;\n r1 = r31;\n if (r0 < r1) goto L_0x03f5;\n L_0x03e1:\n r0 = r32;\n r1 = r31;\n if (r0 != r1) goto L_0x03c7;\n L_0x03e7:\n r0 = r16;\n r1 = r17;\n r2 = r16;\n r3 = r18;\n swapElements(r0, r1, r2, r3);\n r18 = r18 + -1;\n goto L_0x03c7;\n L_0x03f5:\n r0 = r17;\n if (r9 >= r0) goto L_0x045a;\n L_0x03f9:\n r0 = r16;\n r1 = r16;\n r2 = r17;\n swapElements(r0, r9, r1, r2);\n L_0x0402:\n r9 = r9 + 1;\n r0 = r17;\n if (r9 >= r0) goto L_0x042c;\n L_0x0408:\n r4 = r16[r9];\n r0 = r33;\n r1 = r34;\n r2 = r35;\n r3 = r36;\n r32 = r0.trGetC(r1, r2, r3, r4);\n r0 = r32;\n r1 = r31;\n if (r0 > r1) goto L_0x042c;\n L_0x041c:\n r0 = r32;\n r1 = r31;\n if (r0 != r1) goto L_0x0402;\n L_0x0422:\n r0 = r16;\n r1 = r16;\n swapElements(r0, r9, r1, r8);\n r8 = r8 + 1;\n goto L_0x0402;\n L_0x042c:\n r17 = r17 + -1;\n r0 = r17;\n if (r9 >= r0) goto L_0x03f5;\n L_0x0432:\n r4 = r16[r17];\n r0 = r33;\n r1 = r34;\n r2 = r35;\n r3 = r36;\n r32 = r0.trGetC(r1, r2, r3, r4);\n r0 = r32;\n r1 = r31;\n if (r0 < r1) goto L_0x03f5;\n L_0x0446:\n r0 = r32;\n r1 = r31;\n if (r0 != r1) goto L_0x042c;\n L_0x044c:\n r0 = r16;\n r1 = r17;\n r2 = r16;\n r3 = r18;\n swapElements(r0, r1, r2, r3);\n r18 = r18 + -1;\n goto L_0x042c;\n L_0x045a:\n r0 = r18;\n if (r8 > r0) goto L_0x0716;\n L_0x045e:\n r17 = r9 + -1;\n r26 = r8 - r37;\n r30 = r9 - r8;\n r0 = r26;\n r1 = r30;\n if (r0 <= r1) goto L_0x046c;\n L_0x046a:\n r26 = r30;\n L_0x046c:\n r19 = r37;\n r21 = r9 - r26;\n L_0x0470:\n if (r26 <= 0) goto L_0x0484;\n L_0x0472:\n r0 = r16;\n r1 = r19;\n r2 = r16;\n r3 = r21;\n swapElements(r0, r1, r2, r3);\n r26 = r26 + -1;\n r19 = r19 + 1;\n r21 = r21 + 1;\n goto L_0x0470;\n L_0x0484:\n r26 = r18 - r17;\n r4 = r38 - r18;\n r30 = r4 + -1;\n r0 = r26;\n r1 = r30;\n if (r0 <= r1) goto L_0x0492;\n L_0x0490:\n r26 = r30;\n L_0x0492:\n r19 = r9;\n r21 = r38 - r26;\n L_0x0496:\n if (r26 <= 0) goto L_0x04aa;\n L_0x0498:\n r0 = r16;\n r1 = r19;\n r2 = r16;\n r3 = r21;\n swapElements(r0, r1, r2, r3);\n r26 = r26 + -1;\n r19 = r19 + 1;\n r21 = r21 + 1;\n goto L_0x0496;\n L_0x04aa:\n r4 = r9 - r8;\n r8 = r37 + r4;\n r4 = r18 - r17;\n r9 = r38 - r4;\n r4 = r16[r8];\n r4 = r4 + r34;\n r4 = r16[r4];\n r0 = r31;\n if (r4 == r0) goto L_0x04d3;\n L_0x04bc:\n r4 = r9 - r8;\n r24 = trLog(r4);\n L_0x04c2:\n r17 = r37;\n r31 = r8 + -1;\n L_0x04c6:\n r0 = r17;\n if (r0 >= r8) goto L_0x04d6;\n L_0x04ca:\n r4 = r16[r17];\n r4 = r4 + r34;\n r16[r4] = r31;\n r17 = r17 + 1;\n goto L_0x04c6;\n L_0x04d3:\n r24 = -1;\n goto L_0x04c2;\n L_0x04d6:\n r0 = r38;\n if (r9 >= r0) goto L_0x04eb;\n L_0x04da:\n r17 = r8;\n r31 = r9 + -1;\n L_0x04de:\n r0 = r17;\n if (r0 >= r9) goto L_0x04eb;\n L_0x04e2:\n r4 = r16[r17];\n r4 = r4 + r34;\n r16[r4] = r31;\n r17 = r17 + 1;\n goto L_0x04de;\n L_0x04eb:\n r4 = r8 - r37;\n r5 = r38 - r9;\n if (r4 > r5) goto L_0x060c;\n L_0x04f1:\n r4 = r38 - r9;\n r5 = r9 - r8;\n if (r4 > r5) goto L_0x0571;\n L_0x04f7:\n r4 = 1;\n r5 = r8 - r37;\n if (r4 >= r5) goto L_0x051e;\n L_0x04fc:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r35 + 1;\n r0 = r24;\n r4.<init>(r5, r8, r9, r0);\n r29[r28] = r4;\n r28 = r27 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r38;\n r2 = r22;\n r4.<init>(r0, r9, r1, r2);\n r29[r27] = r4;\n r38 = r8;\n r23 = r22;\n goto L_0x001a;\n L_0x051e:\n r4 = 1;\n r5 = r38 - r9;\n if (r4 >= r5) goto L_0x0538;\n L_0x0523:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r35 + 1;\n r0 = r24;\n r4.<init>(r5, r8, r9, r0);\n r29[r28] = r4;\n r37 = r9;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x0538:\n r4 = 1;\n r5 = r9 - r8;\n if (r4 >= r5) goto L_0x0549;\n L_0x053d:\n r35 = r35 + 1;\n r37 = r8;\n r38 = r9;\n r22 = r24;\n r23 = r22;\n goto L_0x001a;\n L_0x0549:\n if (r28 != 0) goto L_0x054f;\n L_0x054b:\n r27 = r28;\n goto L_0x00f9;\n L_0x054f:\n r27 = r28 + -1;\n r20 = r29[r27];\n r0 = r20;\n r0 = r0.a_isRightVersion;\n r35 = r0;\n r0 = r20;\n r0 = r0.b;\n r37 = r0;\n r0 = r20;\n r0 = r0.c;\n r38 = r0;\n r0 = r20;\n r0 = r0.d;\n r22 = r0;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x0571:\n r4 = r8 - r37;\n r5 = r9 - r8;\n if (r4 > r5) goto L_0x05c6;\n L_0x0577:\n r4 = 1;\n r5 = r8 - r37;\n if (r4 >= r5) goto L_0x059e;\n L_0x057c:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r38;\n r2 = r22;\n r4.<init>(r0, r9, r1, r2);\n r29[r28] = r4;\n r28 = r27 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r35 + 1;\n r0 = r24;\n r4.<init>(r5, r8, r9, r0);\n r29[r27] = r4;\n r38 = r8;\n r23 = r22;\n goto L_0x001a;\n L_0x059e:\n r4 = 1;\n r5 = r9 - r8;\n if (r4 >= r5) goto L_0x05c0;\n L_0x05a3:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r38;\n r2 = r22;\n r4.<init>(r0, r9, r1, r2);\n r29[r28] = r4;\n r35 = r35 + 1;\n r37 = r8;\n r38 = r9;\n r22 = r24;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x05c0:\n r37 = r9;\n r23 = r22;\n goto L_0x001a;\n L_0x05c6:\n r4 = 1;\n r5 = r9 - r8;\n if (r4 >= r5) goto L_0x05f5;\n L_0x05cb:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r38;\n r2 = r22;\n r4.<init>(r0, r9, r1, r2);\n r29[r28] = r4;\n r28 = r27 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r37;\n r2 = r22;\n r4.<init>(r0, r1, r8, r2);\n r29[r27] = r4;\n r35 = r35 + 1;\n r37 = r8;\n r38 = r9;\n r22 = r24;\n r23 = r22;\n goto L_0x001a;\n L_0x05f5:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r38;\n r2 = r22;\n r4.<init>(r0, r9, r1, r2);\n r29[r28] = r4;\n r38 = r8;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x060c:\n r4 = r8 - r37;\n r5 = r9 - r8;\n if (r4 > r5) goto L_0x067b;\n L_0x0612:\n r4 = 1;\n r5 = r38 - r9;\n if (r4 >= r5) goto L_0x0639;\n L_0x0617:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r35 + 1;\n r0 = r24;\n r4.<init>(r5, r8, r9, r0);\n r29[r28] = r4;\n r28 = r27 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r37;\n r2 = r22;\n r4.<init>(r0, r1, r8, r2);\n r29[r27] = r4;\n r37 = r9;\n r23 = r22;\n goto L_0x001a;\n L_0x0639:\n r4 = 1;\n r5 = r8 - r37;\n if (r4 >= r5) goto L_0x0653;\n L_0x063e:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r35 + 1;\n r0 = r24;\n r4.<init>(r5, r8, r9, r0);\n r29[r28] = r4;\n r38 = r8;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x0653:\n r4 = 1;\n r5 = r9 - r8;\n if (r4 >= r5) goto L_0x0664;\n L_0x0658:\n r35 = r35 + 1;\n r37 = r8;\n r38 = r9;\n r22 = r24;\n r23 = r22;\n goto L_0x001a;\n L_0x0664:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r37;\n r2 = r38;\n r3 = r22;\n r4.<init>(r0, r1, r2, r3);\n r29[r28] = r4;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x067b:\n r4 = r38 - r9;\n r5 = r9 - r8;\n if (r4 > r5) goto L_0x06d0;\n L_0x0681:\n r4 = 1;\n r5 = r38 - r9;\n if (r4 >= r5) goto L_0x06a8;\n L_0x0686:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r37;\n r2 = r22;\n r4.<init>(r0, r1, r8, r2);\n r29[r28] = r4;\n r28 = r27 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r35 + 1;\n r0 = r24;\n r4.<init>(r5, r8, r9, r0);\n r29[r27] = r4;\n r37 = r9;\n r23 = r22;\n goto L_0x001a;\n L_0x06a8:\n r4 = 1;\n r5 = r9 - r8;\n if (r4 >= r5) goto L_0x06ca;\n L_0x06ad:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r37;\n r2 = r22;\n r4.<init>(r0, r1, r8, r2);\n r29[r28] = r4;\n r35 = r35 + 1;\n r37 = r8;\n r38 = r9;\n r22 = r24;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x06ca:\n r38 = r8;\n r23 = r22;\n goto L_0x001a;\n L_0x06d0:\n r4 = 1;\n r5 = r9 - r8;\n if (r4 >= r5) goto L_0x06ff;\n L_0x06d5:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r37;\n r2 = r22;\n r4.<init>(r0, r1, r8, r2);\n r29[r28] = r4;\n r28 = r27 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r38;\n r2 = r22;\n r4.<init>(r0, r9, r1, r2);\n r29[r27] = r4;\n r35 = r35 + 1;\n r37 = r8;\n r38 = r9;\n r22 = r24;\n r23 = r22;\n goto L_0x001a;\n L_0x06ff:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r37;\n r2 = r22;\n r4.<init>(r0, r1, r8, r2);\n r29[r28] = r4;\n r37 = r9;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x0716:\n r4 = r38 - r37;\n r0 = r39;\n r1 = r40;\n r4 = r0.update(r1, r4);\n if (r4 == 0) goto L_0x002f;\n L_0x0722:\n r22 = r22 + 1;\n r35 = r35 + 1;\n r23 = r22;\n goto L_0x001a;\n L_0x072a:\n r27 = r28;\n goto L_0x00f9;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: io.netty.handler.codec.compression.Bzip2DivSufSort.trIntroSort(int, int, int, int, int, io.netty.handler.codec.compression.Bzip2DivSufSort$TRBudget, int):void\");\n }", "public void sort()\n\t{\n\t\tfor(int i=0;i<bowlers.size()-1;i++)\n\t\t{\n\t\t\tfor(int j=i+1;j<bowlers.size();j++)\n\t\t\t{\n\t\t\t\tif(bowlers.get(i).getBall()<bowlers.get(j).getBall())\n\t\t\t\t{\n\t\t\t\t\tBowler bowler=bowlers.get(i);\n\t\t\t\t\tbowlers.set(i,bowlers.get(j));\n\t\t\t\t\tbowlers.set(j,bowler);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int i=0;i<bowlers.size();i++)\n\t\t{\n\t\tSystem.out.println(bowlers.get(i).getBall());\n\t\t}\n\t}", "@Override\r\n\tpublic void editSort() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void addSort() {\n\t\t\r\n\t}", "@Override\n protected void runAlgorithm() {\n for (int i = 0; i < getArray().length; i++) {\n for (int j = i + 1; j < getArray().length; j++) {\n if (applySortingOperator(getValue(j), getValue(i))) {\n swap(i, j);\n }\n }\n }\n }", "@Override\n\tvoid sort(int[] array, SortingVisualizer display) {\n\t\tSystem.out.println(\"a\");\n\t\tboolean sorted = false;\n\t\tboolean h = true;\n\t\twhile (sorted == false) {\nh=true;\n\t\t\t// System.out.println(\"1\");\n\t\t\tRandom x = new Random();\n\t\t\tint y = x.nextInt(array.length);\n\n\t\t\tint el1 = array[y];\n\t\t\tint z = x.nextInt(array.length);\n\t\t\tint el2 = array[z];\n\n\t\t\tarray[y] = el2;\n\t\t\tarray[z] = el1;\n\t\t\tfor (int i = 0; i < array.length - 1; i++) {\n/*\n\t\t\t\tif (array[i] < array[i + 1]) {\n\n\t\t\t\t\th = true;\n\n\t\t\t\t}*/\n\n\t\t\t\tif (array[i] > array[i + 1]) {\n\t\t\t\t\th = false;\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif (h == true) {\n\n\t\t\t\tsorted = true;\n\t\t\t}\n\n\t\t\tdisplay.updateDisplay();\n\t\t\t\n\t\t}\n\t}", "public List<SimulinkBlock> generateBlockOrder(UnmodifiableCollection<SimulinkBlock> unmodifiableCollection,\n\t\t\tSet<SimulinkBlock> unsortedBlocks) {\n\t\tSet<SimulinkBlock> unsorted = new HashSet<SimulinkBlock>();\n\t\tSet<SimulinkBlock> unsortedRev = new HashSet<SimulinkBlock>();\n\t\tList<SimulinkBlock> sorted = new LinkedList<SimulinkBlock>();\n\n\t\t// start with source blocks without input\n\t\tfor (SimulinkBlock block : unmodifiableCollection) {\n\t\t\tif (block.getInPorts().isEmpty()) {\n\t\t\t\tsorted.add(block);\n\t\t\t} else {\n\t\t\t\tunsorted.add(block);\n\t\t\t}\n\t\t}\n\n\t\tint sizeBefore = 0;\n\t\tint sizeAfter = 0;\n\t\tdo {\n\t\t\tsizeBefore = unsorted.size();\n\t\t\tfor (SimulinkBlock myBlock : unsorted) {\n\t\t\t\tunsortedRev.add(myBlock);\n\t\t\t}\n\t\t\tunsorted.clear();\n\t\t\tfor (SimulinkBlock block : unsortedRev) {\n\t\t\t\tboolean allPredeccesorsAvailable = specialBlockChecking(block, sorted);\n\t\t\t\tif (allPredeccesorsAvailable) {\n\t\t\t\t\tsorted.add(block);\n\t\t\t\t} else {\n\t\t\t\t\tunsorted.add(block);\n\t\t\t\t}\n\t\t\t}\n\t\t\tsizeAfter = unsorted.size();\n\t\t\tunsortedRev.clear();\n\t\t} while ((!(unsorted.isEmpty())) && (!(sizeBefore == sizeAfter)));\n\n\t\tfor (SimulinkBlock block : unsorted) {\n\t\t\t// TODO sort the last unsorted blocks\n\t\t\tPluginLogger\n\t\t\t\t\t.info(\"Currently unsorted after sorting : \" + block.getName() + \" of type \" + block.getType());\n\t\t\tsorted.add(block);\n\t\t\tunsortedBlocks.add(block);\n\t\t}\n\t\treturn sorted;\n\t}", "@Test\n public void doubleSortWithExchangeUnbalancedNodes() {\n ExternalSort es1 = new ExternalSort(OpProps.prototype(0, Long.MAX_VALUE).cloneWithMemoryExpensive(true).cloneWithMemoryFactor(options.getOption(SORT_FACTOR)).cloneWithBound(options.getOption(SORT_BOUNDED)), ARBTRIARY_LEAF, Collections.emptyList(), false);\n SingleSender ss = new SingleSender(OpProps.prototype(1, Long.MAX_VALUE).cloneWithMemoryFactor(options.getOption(SORT_FACTOR)).cloneWithBound(options.getOption(SORT_BOUNDED)), Mockito.mock(BatchSchema.class), es1, 0,\n MinorFragmentIndexEndpoint.newBuilder().setMinorFragmentId(0).build());\n Fragment f1 = new Fragment();\n f1.addOperator(ss);\n Wrapper w1 = new Wrapper(f1, 0);\n w1.overrideEndpoints(Arrays.asList(N1, N2));\n\n UnorderedReceiver or = new UnorderedReceiver(OpProps.prototype(1, Long.MAX_VALUE), Mockito.mock(BatchSchema.class), 0, Collections.emptyList(), false);\n ExternalSort es2 = new ExternalSort(OpProps.prototype(0, Long.MAX_VALUE).cloneWithMemoryExpensive(true).cloneWithMemoryFactor(options.getOption(SORT_FACTOR)).cloneWithBound(options.getOption(SORT_BOUNDED)), or, Collections.emptyList(), false);\n Fragment f2 = new Fragment();\n f2.addOperator(es2);\n Wrapper w2 = new Wrapper(f2, 0);\n w2.overrideEndpoints(Collections.singletonList(N1));\n\n\n MemoryAllocationUtilities.setMemory(options, ImmutableMap.of(f1, w1, f2, w2), 10 + adjustReserve);\n assertEquals(3L, es1.getProps().getMemLimit());\n assertEquals(3L, es2.getProps().getMemLimit());\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 Sort() { }", "public void sort() {\n\t\tSystem.out.println(\"Quick Sort Algorithm invoked\");\n\n\t}", "@Override\n public void sortCurrentList(FileSortHelper sort) {\n }", "public String doSort();", "public void sortArray() {\n\t\tSystem.out.println(\"QUICK SORT\");\n\t}", "@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 updateOrder() {\n Arrays.sort(positions);\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 }", "void order() {\n for (int i = 0; i < numVertices; i++) {\n if (simp[i][numParams] < simp[best][numParams]) {\n best = i;\n }\n if (simp[i][numParams] > simp[worst][numParams]) {\n worst = i;\n }\n }\n nextWorst = best;\n for (int i = 0; i < numVertices; i++) {\n if (i != worst) {\n if (simp[i][numParams] > simp[nextWorst][numParams]) {\n nextWorst = i;\n }\n }\n }\n }", "public void shellSort(int[] a) \n {\n int increment = a.length / 2;\n while (increment > 0) \n {\n \n for (int i = increment; i < a.length; i++) //looping over the array\n {\n int j = i;\n int temp = a[i]; // swapping the values to a temporary array\n try\n {\n if(!orderPanel) // checking for Descending order\n {\n while (j >= increment && a[j - increment] > temp) \n {\n a[j] = a[j - increment]; //swapping the values\n thread.sleep(100);\n repaint();\n this.setThreadState();\n j = j - increment;\n }\n }\n \n else\n {\n while (j >= increment && a[j - increment] < temp) //checking for Ascending order\n {\n a[j] = a[j - increment];\n thread.sleep(200);\n repaint();\n this.setThreadState();\n j = j - increment;\n }\n \n }\n }\n catch(Exception e)\n {\n System.out.println(\"Exception occured\" + e);\n }\n a[j] = temp;\n }\n \n if (increment == 2) \n {\n increment = 1;\n } \n else \n {\n increment *= (5.0 / 11);\n }\n }\n }", "void sort();", "void sort();", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tif (currentSize >= size)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"MERGESORT END\");\n\t\t\t\t\ttimer.stop();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// deciding the block to to merged\n\t\t\t\telse if (mergeSortCodeFlag == 1)\n\t\t\t\t{\n\t\t\t\t\tif (leftStart >= size - 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tcurrentSize = currentSize * 2;\n\t\t\t\t\t\tleftStart = 0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tmid = leftStart + currentSize - 1;\n\t\t\t\t\t\tif (leftStart + 2 * currentSize - 1 >= size - 1)\n\t\t\t\t\t\t\trightEnd = size - 1;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\trightEnd = leftStart + 2 * currentSize - 1;\n\t\t\t\t\t\tbox.setBaseColor(BASE_COLOR);\n\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\tmergeSortDelayFlag1 = 1;\n\t\t\t\t\t\tmergeSortdelay1 = 0;\n\t\t\t\t\t\tmergeSortCodeFlag = 0;\n\t\t\t\t\t\tif(mid >= rightEnd)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tleftStart += 2 * currentSize;\n\t\t\t\t\t\t\tmergeSortDelayFlag1 = 0;\n\t\t\t\t\t\t\tmergeSortCodeFlag = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (mergeSortDelayFlag1 == 1)\n\t\t\t\t{\n\t\t\t\t\tmergeSortdelay1++;\n\t\t\t\t\tif (mergeSortdelay1 >= DELAY)\n\t\t\t\t\t{\n\t\t\t\t\t\tl = leftStart;\n\t\t\t\t\t\tm = mid;\n\t\t\t\t\t\tr = rightEnd;\n\t\t\t\t\t\tmergeSortDelayFlag1 = 0;\n\t\t\t\t\t\tmergeInitializeFlag = 1;\n\t\t\t\t\t\tleftStart += 2 * currentSize;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Merging the block selected\n\t\t\t\t\n\t\t\t\t// initializing the variables needed by the merge block \n\t\t\t\telse if (mergeInitializeFlag == 1)\n\t\t\t\t{\n\t\t\t\t\ti = l;\n\t\t\t\t\tj = m + 1;\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tcurrentDownCount = 0;\n\t\t\t\t\tindexRightCount = 0;\n\t\t\t\t\tcurrentLeftCount = 0;\n\t\t\t\t\tcurrentUpCount = 0;\n\t\t\t\t\tcodeFlag = 1;\n\t\t\t\t\trightFlag = 0;\n\t\t\t\t\trightBlockFlag = 0;\n\t\t\t\t\tdownFlag = 0;\n\t\t\t\t\tupFlag = 0;\n\t\t\t\t\tleftFlag = 0;\n\t\t\t\t\tdelay1 = 0;\n\t\t\t\t\tdelayFlag1 = 0;\n\t\t\t\t\tdelay2 = 0;\n\t\t\t\t\tdelayFlag2 = 0;\n\t\t\t\t\tcolorFlag1 = 1;\n\t\t\t\t\tcolorDelayFlag1 = 0;\n\t\t\t\t\tcolorDelay1 = 0;\n\t\t\t\t\tcolorFlag2 = 1;\n\t\t\t\t\tcolorDelayFlag2 = 0;\n\t\t\t\t\tcolorDelay2 = 0;\n\t\t\t\t\tbox.setBaseColor(BASE_COLOR);\n\t\t\t\t\tbox.setColorRange(l, m, BLOCK_COLOR1);\n\t\t\t\t\tbox.setColorRange(m + 1, r, BLOCK_COLOR2);\n\t\t\t\t\tpaintBox();\n\t\t\t\t\t\n\t\t\t\t\tmergeFlag = 1;\n\t\t\t\t\tmergeInitializeFlag = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// actual merging starts here\n\t\t\t\telse if (mergeFlag == 1)\n\t\t\t\t{\n\t\t\t\t\t// step zero check whether to continue merging or not\n\t\t\t\t\tif (j > r)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (i >= j)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmergeFlag = 0;\n\t\t\t\t\t\t\tmergeSortCodeFlag = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (colorFlag1 == 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tbox.getRectangle(i).setColor(END_COLOR);\n\t\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\t\tcolorDelay1 = 0;\n\t\t\t\t\t\t\tcolorDelayFlag1 = 1;\n\t\t\t\t\t\t\tcolorFlag1 = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (colorDelayFlag1 == 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcolorDelay1++;\n\t\t\t\t\t\t\tif (colorDelay1 >= DELAY)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t\t\tcolorDelayFlag1 = 0;\n\t\t\t\t\t\t\t\tcolorFlag1 = 1;\n\t\t\t\t\t\t\t\tcolorDelay1 = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse if (i >= j)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (j > r)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmergeFlag = 0;\n\t\t\t\t\t\t\tmergeSortCodeFlag = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (colorFlag2 == 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tbox.getRectangle(j).setColor(END_COLOR);\n\t\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\t\tcolorDelay2 = 0;\n\t\t\t\t\t\t\tcolorDelayFlag2 = 1;\n\t\t\t\t\t\t\tcolorFlag2 = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (colorDelayFlag2 == 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcolorDelay2++;\n\t\t\t\t\t\t\tif (colorDelay2 >= DELAY)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tj++;\n\t\t\t\t\t\t\t\tcolorDelayFlag2 = 0;\n\t\t\t\t\t\t\t\tcolorFlag2 = 1;\n\t\t\t\t\t\t\t\tcolorDelay2 = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Step one Check whether a[i] <= a[j]\n\t\t\t\t\telse if (codeFlag == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tRectangle currRect = box.getRectangle(i);\n\t\t\t\t\t\tRectangle scanRect = box.getRectangle(j);\n\t\t\t\t\t\tcurrRect.setColor(FOCUS_COLOR1);\n\t\t\t\t\t\tscanRect.setColor(FOCUS_COLOR2);\n\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\tdelayFlag2 = 1;\n\t\t\t\t\t\tcodeFlag = 0;\n\t\t\t\t\t\tdelay2 = 0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse if (delayFlag2 == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tdelay2++;\n\t\t\t\t\t\tif (delay2 >= DELAY)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tRectangle currRect = box.getRectangle(i);\n\t\t\t\t\t\t\tRectangle scanRect = box.getRectangle(j);\n\t\t\t\t\t\t\tif (currRect.getData() < scanRect.getData())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tbox.getRectangle(i).setColor(END_COLOR);\n\t\t\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\t\t\tdelay1 = 0;\n\t\t\t\t\t\t\t\tdelayFlag2 = 0;\n\t\t\t\t\t\t\t\tdelayFlag1 = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tbox.getRectangle(j).setColor(END_COLOR);\n\t\t\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\t\t\tdelayFlag2 = 0;\n\t\t\t\t\t\t\t\tdownFlag = 1;\n\t\t\t\t\t\t\t\tcurrentDownCount = 0;\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\telse if (delayFlag1 == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tdelay1++;\n\t\t\t\t\t\tif (delay1 >= DELAY)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcodeFlag = 1;\n\t\t\t\t\t\t\tdelayFlag1 = 0;\n\t\t\t\t\t\t\ti++;\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// Moving the first rectangle on right down (if it was smaller than the first one on the left)\n\t\t\t\t\telse if (downFlag == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tbox.addOffsetRectangle(j, 0, YCHANGE);\n\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\tcurrentDownCount += YCHANGE;\n\t\t\t\t\t\tif (currentDownCount >= DOWN)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tint excess = currentDownCount - DOWN;\n\t\t\t\t\t\t\tbox.addOffsetRectangle(j, 0, -excess);\n\t\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\t\tdownFlag = 0;\n\t\t\t\t\t\t\trightBlockFlag = 1;\n\t\t\t\t\t\t\tindexRightCount = 0;\n\t\t\t\t\t\t\tindex = j - 1;\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// moving each of the rectangles in the block to the right(between the two smallest rectangle on both side)\n\t\t\t\t\t// including the first rectangle\n\t\t\t\t\telse if (rightBlockFlag == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (index < i)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\trightBlockFlag = 0;\n\t\t\t\t\t\t\tleftFlag = 1;\n\t\t\t\t\t\t\tcurrentLeftCount = 0;\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\trightFlag = 1;\n\t\t\t\t\t\t\trightBlockFlag = 0;\n\t\t\t\t\t\t\tindexRightCount = 0;\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// moving a rectangle in the block to the right\n\t\t\t\t\telse if (rightFlag == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tbox.addOffsetRectangle(index, XCHANGE, 0);\n\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\tindexRightCount += XCHANGE;\n\t\t\t\t\t\tif (indexRightCount >= width)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tint excess = indexRightCount - width;\n\t\t\t\t\t\t\tbox.addOffsetRectangle(index, -excess, 0);\n\t\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\t\trightFlag = 0;\n\t\t\t\t\t\t\trightBlockFlag = 1;\n\t\t\t\t\t\t\tindex--;\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// moving the rectangle left (the smallest in the un-merged block)\n\t\t\t\t\telse if (leftFlag == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tbox.addOffsetRectangle(j, -XCHANGE, 0);\n\t\t\t\t\t\tcurrentLeftCount += XCHANGE;\n\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\tif (currentLeftCount >= width * (j - i))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tint excess = currentLeftCount - width * (j - i);\n\t\t\t\t\t\t\tbox.addOffsetRectangle(j, excess, 0);\n\t\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tleftFlag = 0;\n\t\t\t\t\t\t\tupFlag = 1;\n\t\t\t\t\t\t\tcurrentUpCount = 0;\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// moving the rectangle up (the smallest in the un-merged block)\n\t\t\t\t\telse if (upFlag == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tbox.addOffsetRectangle(j, 0, -YCHANGE);\n\t\t\t\t\t\tcurrentUpCount += YCHANGE;\n\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\tif (currentUpCount >= DOWN)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tint excess = currentUpCount - DOWN;\n\t\t\t\t\t\t\tbox.addOffsetRectangle(j, 0, excess);\n\t\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tRectangle smallestRect = box.getRectangle(j);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor (int t = j - 1; t >= i; t--)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tbox.setRectangle(box.getRectangle(t), t + 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbox.setRectangle(smallestRect, i);\n\t\t\t\t\t\t\tupFlag = 0;\n\t\t\t\t\t\t\tcodeFlag = 1;\n\t\t\t\t\t\t\tj++;\n\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "private void externalSort() throws IOException{\n\t\t/*\n\t\t * Pass 0: internal sort\n\t\t */\n\t\t// Read in from child;Write out runs of B pages;\n\t\t\n\t\tint numPerRun = B * 4096 / (schema.size() * 4); // # of tuples per run given in Pass0\n\t\tboolean buildMore;\n\t\tint numRuns = 0;\n\t\tif(sortAttrsIndex == null) {\n\t\t\tthis.buildAttrsIndex();\n\t\t}\n\t\texComparator myComp = new exComparator();\n\t\tinternal = new PriorityQueue<Tuple>(myComp);\n\t\tdo {\n\t\t\tbuildMore = this.buildHeap(numPerRun);\n\t\t\tnumRuns++;\n\t\t\t\n\t\t\t// write out the (numRuns)th run\n\t\t\tTupleWriter TW;\n\t\t\tif(!buildMore && numRuns == 1) {\n\t\t\t\tTW = new TupleWriter(new FileOutputStream(tempsubdir + \"sortResult\"));\n\t\t\t} else {\n\t\t\t\tTW = new TupleWriter(new FileOutputStream(tempsubdir + \"0_\" + numRuns));\n\t\t\t}\n\t\t\twhile(!internal.isEmpty()) {\n//\t\t\t\tSystem.out.println(internal.peek().data);\n\t\t\t\tTW.setNextTuple(internal.poll()); \n\t\t\t}\n\t\t\t// leftover, fill with zero and write out\n\t\t\tif(!TW.bufferEmpty()) { // TW would never know the end of writing\n\t\t\t\tTW.fillFlush(); \n\t\t\t}\n\t\t\tTW.close();\n\t\t\t// internal must be empty until this point\n\t\t}while (buildMore);\n\t\t\n\t\t/*\n\t\t * Pass 1 and any following\n\t\t */\n\t\tif(numRuns > 1) { // if numRuns generated in Pass 0 is 1 already, file sorted already, no need to merge\n\t\t\tthis.merge(numRuns, myComp);\n\t\t}\n\t\t\n\t}", "public void sortByLength()\n {\n boolean swapMade;//has a swap been made in the most recent pass?\n \n //repeat looking for swaps\n do\n {\n swapMade=false;//just starting this pass, so no swap yet\n \n //go through entire array. looking for swaps that need to be done\n for(int i = 0; i<currentRide-1; i++)\n {\n //if the other RideLines has less people\n if(rides[i].getCurrentPeople()<rides[i+1].getCurrentPeople())\n {\n // standard swap, using a temporary. swap with less people\n RideLines temp = rides[i];\n rides[i]=rides[i+1];\n rides[i+1]=temp;\n \n swapMade=true;//remember this pass made at least one swap\n }\n \n } \n }while(swapMade);//until no swaps were found in the most recent past\n \n redrawLines();//redraw the image\n \n }", "private void sortByAmount(){\n int stopPos = 0;\n while(colours.size()-stopPos > 0){\n int inARow = 1;\n for(int i = colours.size() - 1; i > stopPos; i--){\n if(colours.get(i-1).getAmount() < colours.get(i).getAmount()){\n rgb temp = new rgb(colours.get(i-1));\n colours.set(i-1, colours.get(i));\n colours.set(i, temp);\n }else{\n inARow++;\n }\n }\n stopPos++;\n if(inARow == colours.size()){\n break;\n }\n }\n }", "public static void specialSets() {\n\t\tSystem.out.printf(\"%12s%15s%15s%10s%10s%10s%10s%n\",\"Size\",\"Range\",\"Pre-Sort Type\",\"Insertion\",\"Selectuon\",\"Quick\",\"Merge\");\n\t\tint[] array;\n\t\t//200K\n\t\tSystem.out.printf(\"%12d%15s%15s\",200000,\"1-200k\",\"N/A\");\n\t\tarray = generateArray(200000, 1, 200000);\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t\t//Sorted array\n\t\tSystem.out.printf(\"%12d%15s%15s\",200000,\"1-200k\",\"Sorted\");\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t\t//Reverse Sorted\n\t\tSystem.out.printf(\"%12d%15s%15s\",200000,\"1-200k\",\"Reverse Sorted\");\n\t\tint[] temp = new int[array.length];\n\t\tfor(int i = 0; i < array.length; i++) {\n\t\t\ttemp[i] = array[array.length -1 -i];\n\t\t}\n\t\tfourSorts(temp);\n\t\tSystem.out.println();\n\t\t//Range 1-20\n\t\tSystem.out.printf(\"%12d%15s%15s\",200000,\"1-20\",\"N/A\");\n\t\tarray = generateArray(200000, 1, 20);\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t}", "public void selectionSort()\r\n {\r\n for(int x = 0; x < numItems; x++)\r\n {\r\n int smallestLoc = x;\r\n for(int y = x+1; y<numItems; y++)\r\n {\r\n if(mArray[y]< mArray[smallestLoc])\r\n {\r\n smallestLoc = y;\r\n }\r\n }\r\n int temp = mArray[x];\r\n mArray[x] = mArray[smallestLoc];\r\n mArray[smallestLoc] = temp;\r\n }\r\n }", "public void sortCompetitors(){\n\t\t}", "public void sortPassing(){\n\t\tpassing.sort(PlayingCard.PlayingCardComparator_ACEHIGH);\n\t}", "@Override\n\tvoid sort(int[] arr, SortingVisualizer display) {\n\t\tint current = 0;\n\t\tint x;\n\t\tint y;\n\t\tboolean complete = false;\n\t\twhile(complete == false) {\n\t\t\tcurrent = 0;\n\t\t\tcomplete = true;\n\t\t\tfor(int i = 0 ; i < arr.length; i ++) {\n\t\t\t\tdisplay.updateDisplay();\n\t\t\t\tif(arr[current] > arr[i]) {\n\t\t\t\t\tx = arr[i];\n\t\t\t\t\ty = arr[current];\n\t\t\t\t\tarr[i] = y;\n\t\t\t\t\tarr[current] = x;\n\t\t\t\t\tcomplete = false;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\tcurrent = i;\n\t\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "public BucketSort()\n {\n for(int i = 0; i < 30; i++)\n {\n a[i] = generator.nextInt(50)+1;\n b[i] = a[i];\n }\n }", "@Override\n\tpublic void setSortCounters(boolean sortCounters) {\n\t\t\n\t}", "public void sort() {\n /*int jokers = this.getJokers();\n\t\tif (jokers > 0 && this.size() > 2) {\n\t\t\tArrayList<Tile> list = new ArrayList<>();\n for (int i=0; i<this.size(); i++) {\n\t\t\t\tif (this.get(i).getColour() == 'J') {\n\t\t\t\t\tTile joker = this.remove(this.get(i));\n\t\t\t\t\tlist.add(joker);\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (Tile j : list) {\n\t\t\t\tthis.addInSort(j);\n\t\t\t}\n }*/\n \n\n //may need something in here to accomodate a joker changing its form\n\n if (tiles.size() > 1) { //will only sort a meld with any tiles in it\n //Override default comparator to compare by tile value (ints)\n Collections.sort(tiles, new Comparator<Tile>() {\n @Override \n public int compare(Tile t1, Tile t2) { \n if (t1.getColour() > t2.getColour()) {\n return 1;\n } else if (t1.getColour() < t2.getColour()) {\n return -1;\n }\n if (t1.getValue() > t2.getValue()) {\n return 1;\n } else if (t1.getValue() < t2.getValue()) {\n return -1;\n } else {\n return 0;\n }\n }\n });\n }\n\n }", "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 setup() {\r\n final int gsz = _g.getNumNodes();\r\n if (_k==2) {\r\n\t\t\tNodeComparator2 comp = new NodeComparator2();\r\n\t\t\t_origNodesq = new TreeSet(comp);\r\n\t\t} else { // _k==1\r\n\t\t\tNodeComparator4 comp = new NodeComparator4();\r\n\t\t\t_origNodesq = new TreeSet(comp);\r\n\t\t}\r\n for (int i=0; i<gsz; i++) {\r\n _origNodesq.add(_g.getNodeUnsynchronized(i)); // used to be _g.getNode(i)\r\n }\r\n _nodesq = new TreeSet(_origNodesq);\r\n //System.err.println(\"done sorting\");\r\n }", "public void changeSortOrder();", "private void sortEntities(){\n for (int i = 1; i < sorted.size; i++) {\n for(int j = i ; j > 0 ; j--){\n \tEntity e1 = sorted.get(j);\n \tEntity e2 = sorted.get(j-1);\n if(getRL(e1) < getRL(e2)){\n sorted.set(j, e2);\n sorted.set(j-1, e1);\n }\n }\n }\n }", "private static void selectionSort(ArrayList<Box> BoxArray) { \n\n\t\tfor ( int i = 0; i < BoxArray.size(); i++ ) { \n\t\t\tint lowPos = i; \n\t\t\tfor ( int j = i + 1; j < BoxArray.size(); j++ ) \n\t\t\t\tif ( BoxArray.get(j).volume() < BoxArray.get(lowPos).volume() ) \n\t\t\t\t\tlowPos = j;\n\t\t\tif ( BoxArray.get(lowPos) != BoxArray.get(i) ) { \n\t\t\t\tBox temp = BoxArray.get(lowPos);\n\t\t\t\tBoxArray.set(lowPos, BoxArray.get(i));\n\t\t\t\tBoxArray.set(i, temp);\n\t\t\t}\n\t\t}\n\t}", "public void sort() {\n\t\t\tfor (int j = nowLength - 1; j > 1; j--) {\n\t\t\t\tfor (int i = 0; i < j; i++) {\n\t\t\t\t\tif (ray[i] > ray[i+1]) {\n\t\t\t\t\t\tint tmp = ray [i];\n\t\t\t\t\t\tray[i] = ray[i+1];\n\t\t\t\t\t\tray[i+1] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tprint();\n\t\t\t}\n\t}", "public BubSortList() {\n\t\tray = new int[MAXSIZE];\n\t\tnowLength = 0;\n\t}", "public static void s1AscendingTest() {\n int key = 903836722;\n SortingLab<Integer> sli = new SortingLab<Integer>(key);\n int M = 600000;\n int N = 1000;\n double start;\n double elapsedTime;\n System.out.print(\"Sort 1 Ascending\\n\");\n for (; N < M; N *= 2) {\n Integer[] ai = getRandomArray(N, Integer.MAX_VALUE);\n Arrays.sort(ai);\n start = System.nanoTime();\n sli.sort1(ai);\n elapsedTime = (System.nanoTime() - start) / 1_000_000_000d;\n System.out.print(N + \"\\t\");\n System.out.printf(\"%4.3f\\n\", elapsedTime);\n }\n }", "public void sortByDefault() {\r\n\t\tcomparator = null;\r\n\t}", "public static int[] partialSort(int[] a) {\n for (int i = 0; i < 2; i++) {\n for (int j = 0; j < 2 - i; j++) {\n if (a[j] > a[j+1]) {\n int temp = a[j+1];\n a[j+1] = a[j];\n a[j] = temp;\n }\n }\n }\n return a;\n}", "public void setSortOnCPUTime() {\n this.sortedJobList = new TreeSet<Job>(new Comparator<Job>() {\n @Override\n public int compare(Job a, Job b) {\n\n int aCPUUsed = 0;\n int bCPUUsed = 0;\n\n try {\n aCPUUsed = a.getCPUUsed();\n bCPUUsed = b.getCPUUsed();\n } catch (AS400SecurityException e) {\n e.printStackTrace();\n } catch (ErrorCompletingRequestException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ObjectDoesNotExistException e) {\n e.printStackTrace();\n }\n\n if (aCPUUsed == bCPUUsed) return 0;\n else return bCPUUsed - aCPUUsed;\n }\n });\n }", "@Override\n \tpublic void sort() {\n \t\tArrays.sort(data);\n \t}", "public void sortOccurred() {\n //SET ALL THE ROWS TO -1, (THEY INITIALIZE TO 0).\n \tfor(int i = 0; i < data.length; i++) {\n \t\tdata[i] = null;\n \t\trowIndexLookup[i] = -1;\n \t}\t\t\n }", "public void doTheAlgorithm() {\n this.swapCount = 0;\n this.compCount = 0;\n \n\t\tdoQuickSort(0, this.sortArray.length - 1);\n\t}", "@VTID(28)\n boolean getSortUsingCustomLists();", "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 void sort() {\n Collections.sort(jumpers, new SortJumperByPoints()); \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 }", "void sortV();", "private void sortAndEmitUpTo(double maxX)\n {\n /**\n * Heuristic: Check if there are no obvious segments to process\n * and skip sorting & processing if so\n * \n * This is a heuristic only.\n * There may be new segments at the end of the buffer\n * which are less than maxx. But this should be rare,\n * and they will all get processed eventually.\n */\n if (bufferHeadMaxX() >= maxX)\n return;\n \n // this often sorts more than are going to be processed.\n //TODO: Can this be done faster? eg priority queue?\n \n // sort segs in buffer, since they arrived in potentially unsorted order\n Collections.sort(segmentBuffer, ORIENT_COMPARATOR);\n int i = 0;\n int n = segmentBuffer.size();\n LineSeg prevSeg = null;\n \n //reportProcessed(maxX);\n \n while (i < n) {\n LineSeg seg = (LineSeg) segmentBuffer.get(i);\n if (seg.getMaxX() >= maxX)\n \tbreak;\n \n i++;\n if (removeDuplicates) {\n if (prevSeg != null) {\n // skip this segment if it is a duplicate\n if (prevSeg.equals(seg)) {\n // merge in side label of dup seg\n prevSeg.merge(seg);\n continue;\n }\n }\n prevSeg = seg;\n }\n // remove interior segments (for dissolving)\n if (removeInteriorSegs\n && seg.getTopoLabel() == TopologyLabel.BOTH_INTERIOR)\n continue;\n \n segSink.process(seg);\n }\n //System.out.println(\"SegmentStreamSorter: total segs = \" + n + \", processed = \" + i);\n removeSegsFromBuffer(i);\n }", "public void sort(){\n for(int i = array.length-1;i >= 0;i--){\n sink(i);\n }\n while(size > 0){\n swap(0, size-1);\n size -= 1;\n sink(0);\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 }", "public void sort() {\r\n lang.setInteractionType(Language.INTERACTION_TYPE_AVINTERACTION);\r\n\r\n int nrElems = array.getLength();\r\n ArrayMarker iMarker = null, jMarker = null;\r\n // highlight method header\r\n code.highlight(\"header\");\r\n lang.nextStep();\r\n\r\n // check if array is null\r\n code.toggleHighlight(\"header\", \"ifNull\");\r\n incrementNrComparisons(); // if null\r\n lang.nextStep();\r\n\r\n // switch to variable declaration\r\n\r\n code.toggleHighlight(\"ifNull\", \"variables\");\r\n lang.nextStep();\r\n\r\n // initialize i\r\n code.toggleHighlight(\"variables\", \"initializeI\");\r\n iMarker = installArrayMarker(\"iMarker\", array, nrElems - 1);\r\n incrementNrAssignments(); // i =...\r\n lang.nextStep();\r\n\r\n // switch to outer loop\r\n code.unhighlight(\"initializeI\");\r\n\r\n while (iMarker.getPosition() >= 0) {\r\n code.highlight(\"outerLoop\");\r\n lang.nextStep();\r\n\r\n code.toggleHighlight(\"outerLoop\", \"innerLoop\");\r\n if (jMarker == null) {\r\n jMarker = installArrayMarker(\"jMarker\", array, 0);\r\n } else\r\n jMarker.move(0, null, DEFAULT_TIMING);\r\n incrementNrAssignments();\r\n while (jMarker.getPosition() <= iMarker.getPosition() - 1) {\r\n incrementNrComparisons();\r\n lang.nextStep();\r\n code.toggleHighlight(\"innerLoop\", \"if\");\r\n array.highlightElem(jMarker.getPosition() + 1, null, null);\r\n array.highlightElem(jMarker.getPosition(), null, null);\r\n incrementNrComparisons();\r\n lang.nextStep();\r\n\r\n if (array.getData(jMarker.getPosition()) > array.getData(jMarker\r\n .getPosition() + 1)) {\r\n // swap elements\r\n code.toggleHighlight(\"if\", \"swap\");\r\n array.swap(jMarker.getPosition(), jMarker.getPosition() + 1, null,\r\n DEFAULT_TIMING);\r\n incrementNrAssignments(3); // swap\r\n lang.nextStep();\r\n code.unhighlight(\"swap\");\r\n } else {\r\n code.unhighlight(\"if\");\r\n }\r\n // clean up...\r\n // lang.nextStep();\r\n code.highlight(\"innerLoop\");\r\n array.unhighlightElem(jMarker.getPosition(), null, null);\r\n array.unhighlightElem(jMarker.getPosition() + 1, null, null);\r\n if (jMarker.getPosition() <= iMarker.getPosition())\r\n jMarker.move(jMarker.getPosition() + 1, null, DEFAULT_TIMING);\r\n incrementNrAssignments(); // j++ will always happen...\r\n }\r\n lang.nextStep();\r\n code.toggleHighlight(\"innerLoop\", \"decrementI\");\r\n array.highlightCell(iMarker.getPosition(), null, DEFAULT_TIMING);\r\n if (iMarker.getPosition() > 0)\r\n iMarker.move(iMarker.getPosition() - 1, null, DEFAULT_TIMING);\r\n else\r\n iMarker.moveBeforeStart(null, DEFAULT_TIMING);\r\n incrementNrAssignments();\r\n lang.nextStep();\r\n code.unhighlight(\"decrementI\");\r\n }\r\n\r\n // some interaction...\r\n TrueFalseQuestionModel tfQuestion = new TrueFalseQuestionModel(\"tfQ\");\r\n tfQuestion.setPrompt(\"Did this work?\");\r\n tfQuestion.setPointsPossible(1);\r\n tfQuestion.setGroupID(\"demo\");\r\n tfQuestion.setCorrectAnswer(true);\r\n tfQuestion.setFeedbackForAnswer(true, \"Great!\");\r\n tfQuestion.setFeedbackForAnswer(false, \"argh!\");\r\n lang.addTFQuestion(tfQuestion);\r\n\r\n lang.nextStep();\r\n HtmlDocumentationModel link = new HtmlDocumentationModel(\"link\");\r\n link.setLinkAddress(\"http://www.heise.de\");\r\n lang.addDocumentationLink(link);\r\n\r\n lang.nextStep();\r\n MultipleChoiceQuestionModel mcq = new MultipleChoiceQuestionModel(\"mcq\");\r\n mcq.setPrompt(\"Which AV system can handle dynamic rewind?\");\r\n mcq.setGroupID(\"demo\");\r\n mcq.addAnswer(\"GAIGS\", -1, \"Only static images, not dynamic\");\r\n mcq.addAnswer(\"Animal\", 1, \"Good!\");\r\n mcq.addAnswer(\"JAWAA\", -2, \"Not at all!\");\r\n lang.addMCQuestion(mcq);\r\n\r\n lang.nextStep();\r\n MultipleSelectionQuestionModel msq = new MultipleSelectionQuestionModel(\r\n \"msq\");\r\n msq.setPrompt(\"Which of the following AV systems can handle interaction?\");\r\n msq.setGroupID(\"demo\");\r\n msq.addAnswer(\"Animal\", 2, \"Right - I hope!\");\r\n msq.addAnswer(\"JHAVE\", 2, \"Yep.\");\r\n msq.addAnswer(\"JAWAA\", 1, \"Only in Guido's prototype...\");\r\n msq.addAnswer(\"Leonardo\", -1, \"Nope.\");\r\n lang.addMSQuestion(msq);\r\n lang.nextStep();\r\n // Text text = lang.newText(new Offset(10, 20, \"array\", \"S\"), \"Hi\", \"hi\",\r\n // null);\r\n // lang.nextStep();\r\n }", "public void shellSort(){\n int increment = list.size() / 2;\n while (increment > 0) {\n for (int i = increment; i < list.size(); i++) {\n int j = i;\n int temp = list.get(i);\n while (j >= increment && list.get(j - increment) > temp) {\n list.set(j, list.get(j - increment));\n j = j - increment;\n }\n list.set(j, temp);\n }\n if (increment == 2) {\n increment = 1;\n } else {\n increment *= (5.0 / 11);\n }\n }\n }", "public void sort() {\n\t\tif (data.size() < 10) {\n\t\t\tbubbleSort();\n\t\t\tSystem.out.println(\"Bubble Sort\");\n\t\t} else {\n\t\t\tquickSort();\n\t\t\tSystem.out.println(\"Quick Sort\");\n\t\t}\n\t}", "public void insertReorderBarrier() {\n\t\t\n\t}", "private static void allSorts(int[] array) {\n\t\tSystem.out.printf(\"%12d\",array.length);\n\t\tint[] temp;\n\t\tStopWatch1 timer;\n\t\t\n\t\t//Performs bubble sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.bubbleSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"\\tSelection\\tBubble\\tInsertion\\tCollections\\tQuick\\tinPlaceQuick\\tMerge\");\r\n\t\tfor (int n = 1000; n <= 7000; n += 500) {\r\n\t\t\tAPArrayList<Double> lists = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listb = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listi = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listc = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listq = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listipq = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listm = new APArrayList<Double>();\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\t\tDouble val = Math.random();\r\n\t\t\t\tlists.add(val);\r\n\t\t\t\tlistb.add(val);\r\n\t\t\t\tlisti.add(val);\r\n\t\t\t\tlistc.add(val);\r\n\t\t\t\tlistq.add(val);\r\n\t\t\t\tlistipq.add(val);\r\n\t\t\t\tlistm.add(val);\r\n\t\t\t}\r\n\r\n\t\t\tlong selStartTime = System.nanoTime();\r\n\t\t\tlists.selectionSort();\r\n\t\t\tlong selEndTime = System.nanoTime();\r\n\t\t\tlong selSortTime = selEndTime - selStartTime;\r\n\t\t\tlists.clear();\r\n\t\t\t\r\n\t\t\tlong bubStartTime = System.nanoTime();\r\n\t\t\tlistb.bubbleSort();\r\n\t\t\tlong bubEndTime = System.nanoTime();\r\n\t\t\tlong bubSortTime = bubEndTime - bubStartTime;\r\n\t\t\tlistb.clear();\r\n\t\t\t\r\n\t\t\tlong insStartTime = System.nanoTime();\r\n\t\t\tlisti.insertionSort();\r\n\t\t\tlong insEndTime = System.nanoTime();\r\n\t\t\tlong insSortTime = insEndTime - insStartTime;\r\n\t\t\tlisti.clear();\r\n\t\t\t\r\n\t\t\tlong CollStartTime = System.nanoTime();\r\n\t\t\tlistc.sort();\r\n\t\t\tlong CollEndTime = System.nanoTime();\r\n\t\t\tlong CollSortTime = CollEndTime - CollStartTime;\r\n\t\t\tlistc.clear();\r\n\t\t\t\r\n\t\t\tlong quickStartTime = System.nanoTime();\r\n\t\t\tlistq.simpleQuickSort();\r\n\t\t\tlong quickEndTime = System.nanoTime();\r\n\t\t\tlong quickSortTime = quickEndTime - quickStartTime;\r\n\t\t\tlistq.clear();\r\n\t\t\t\r\n\t\t\tlong inPlaceQuickStartTime = System.nanoTime();\r\n\t\t\tlistipq.inPlaceQuickSort();\r\n\t\t\tlong inPlaceQuickEndTime = System.nanoTime();\r\n\t\t\tlong inPlaceQuickSortTime = inPlaceQuickEndTime - inPlaceQuickStartTime;\r\n\t\t\tlistipq.clear();\r\n\t\t\t\r\n\t\t\tlong mergeStartTime = System.nanoTime();\r\n\t\t\tlistm.mergeSort();\r\n\t\t\tlong mergeEndTime = System.nanoTime();\r\n\t\t\tlong mergeSortTime = mergeEndTime - mergeStartTime;\r\n\t\t\tlistq.clear();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(n + \"\\t\" + selSortTime + \"\\t\" + bubSortTime + \"\\t\" + insSortTime + \"\\t\" + CollSortTime + \"\\t\" + quickSortTime + \"\\t\" + inPlaceQuickSortTime + \"\\t\" + mergeSortTime);\r\n\t\t}\r\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}", "private void collapseIgloo() {\n blocks.sort(Comparator.comparing(a -> a.center.getY()));\n\n double minDistance, distance;\n Point3D R = new Point3D(0, -1, 0);\n for (int i = 0; i < blocks.size(); i++) {\n minDistance = Double.MAX_VALUE;\n for (int j = i - 1; j >= 0; j--) {\n if (boundingSpheresIntersect(blocks.get(i), blocks.get(j))) {\n distance = minDistance(blocks.get(i), blocks.get(j), R);\n if (distance < minDistance) {\n minDistance = distance;\n }\n }\n }\n if (minDistance != Double.MAX_VALUE) {\n blocks.get(i).move(R.multiply(minDistance));\n }\n }\n }", "public void sortAllRows(){\n\t\t/* code goes here */ \n\t\t\n\t\t\n\t\t//WHY SHOULD THEY BE SORTED LIKE THE EXAMPLE SAYS???????\n\t\t\n\t}", "private void sortGallery_10_Runnable() {\r\n\r\n\t\tif (_allPhotos == null || _allPhotos.length == 0) {\r\n\t\t\t// there are no files\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tfinal GalleryMT20Item[] virtualGalleryItems = _galleryMT20.getAllVirtualItems();\r\n\t\tfinal int virtualSize = virtualGalleryItems.length;\r\n\r\n\t\tif (virtualSize == 0) {\r\n\t\t\t// there are no items\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// sort photos with new sorting algorithm\r\n\t\tArrays.sort(_sortedAndFilteredPhotos, getCurrentComparator());\r\n\r\n\t\tupdateUI_GalleryItems(_sortedAndFilteredPhotos, null);\r\n\t}", "private static long sortingTime(String[] array, boolean isStandardSort) {\n long start = System.currentTimeMillis(); // starting time\n if (isStandardSort) \n Arrays.sort(array);\n selectionSort(array);\n return System.currentTimeMillis() - start; // measure time consumed\n }", "@Override // java.util.Comparator\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public int compare(androidx.recyclerview.widget.GapWorker.Task r6, androidx.recyclerview.widget.GapWorker.Task r7) {\n /*\n r5 = this;\n androidx.recyclerview.widget.GapWorker$Task r6 = (androidx.recyclerview.widget.GapWorker.Task) r6\n androidx.recyclerview.widget.GapWorker$Task r7 = (androidx.recyclerview.widget.GapWorker.Task) r7\n androidx.recyclerview.widget.RecyclerView r5 = r6.view\n r0 = 0\n r1 = 1\n if (r5 != 0) goto L_0x000c\n r2 = r1\n goto L_0x000d\n L_0x000c:\n r2 = r0\n L_0x000d:\n androidx.recyclerview.widget.RecyclerView r3 = r7.view\n if (r3 != 0) goto L_0x0013\n r3 = r1\n goto L_0x0014\n L_0x0013:\n r3 = r0\n L_0x0014:\n r4 = -1\n if (r2 == r3) goto L_0x001d\n if (r5 != 0) goto L_0x001b\n L_0x0019:\n r0 = r1\n goto L_0x0037\n L_0x001b:\n r0 = r4\n goto L_0x0037\n L_0x001d:\n boolean r5 = r6.immediate\n boolean r2 = r7.immediate\n if (r5 == r2) goto L_0x0026\n if (r5 == 0) goto L_0x0019\n goto L_0x001b\n L_0x0026:\n int r5 = r7.viewVelocity\n int r1 = r6.viewVelocity\n int r5 = r5 - r1\n if (r5 == 0) goto L_0x002f\n L_0x002d:\n r0 = r5\n goto L_0x0037\n L_0x002f:\n int r5 = r6.distanceToItem\n int r6 = r7.distanceToItem\n int r5 = r5 - r6\n if (r5 == 0) goto L_0x0037\n goto L_0x002d\n L_0x0037:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: androidx.recyclerview.widget.GapWorker.AnonymousClass1.compare(java.lang.Object, java.lang.Object):int\");\n }", "private static void performSort(TestApp testApp) {\n testApp.testPartition();\n\n /*\n Date end = new Date();\n System.out.println(\"Sort ended @ \" + end.getTime());\n System.out.println(\"Total time = \" + (end.getTime() - start.getTime())/1000.0 + \" seconds...\");\n */\n }", "public void sort() {\n\t\tfor (int i = 1; i < this.dataModel.getLength(); i++) {\n\t\t\tfinal int x = this.dataModel.get(i);\n\n\t\t\t// Find location to insert using binary search\n\t\t\tfinal int j = Math.abs(this.dataModel.binarySearch(0, i, x) + 1);\n\n\t\t\t// Shifting array to one location right\n\t\t\tthis.dataModel.arrayCopy(j, j + 1, i - j);\n\n\t\t\t// Placing element at its correct location\n\t\t\tthis.dataModel.set(j, x);\n\t\t\tthis.repaint(this.count++);\n\t\t}\n\t}", "public void sortieBloc() {\n this.tableLocaleCourante = this.tableLocaleCourante.getTableLocalPere();\n }", "private static void fourSorts(int[] array) {\n\t\tStopWatch1 timer;\n\t\tint[] temp;\n\t\t//Performs insertion sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.insertionSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\n\n\t\t//Performs selection sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.selectionSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\n\t\t//Performs quick sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.quickSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\n\t\t//Performs merge sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.mergeSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\n\t}", "private void orderSegments() {\n //insert numOrder for the db\n int i = 0;\n for(TransportSegmentLogic transportSegment: transportSegments){\n transportSegment.setOrder(i);\n i++;\n }\n\n\n\n /*int i = 0;\n int j = 1;\n\n\n TransportSegmentLogic swapSegment;\n\n while(j < transportSegments.size()){\n if(transportSegments.get(j).getOrigin().equals(transportSegments.get(i).getDestination())){\n swapSegment = transportSegments.get(j);\n transportSegments.remove(swapSegment);\n transportSegments.add(i +1, swapSegment);\n i = i + 1;\n j = i + 1;\n }\n j++;\n }\n\n j = transportSegments.size() -1;\n\n while(j > i){\n if(transportSegments.get(j).getDestination().equals(transportSegments.get(0).getOrigin())){\n swapSegment = transportSegments.get(j);\n transportSegments.remove(swapSegment);\n transportSegments.add(0, swapSegment);\n i = i + 1;\n j = transportSegments.size();\n }\n j--;\n } */\n }", "public void run()\n { // checking for appropriate sorting algorithm\n \n if(comboAlgorithm.equals(\"Shell Sort\"))\n {\n this.shellSort(randInt);\n }\n \n if(comboAlgorithm.equals(\"Selection Sort\"))\n {\n this.selectionSort(randInt);\n }\n \n if(comboAlgorithm.equals(\"Insertion Sort\"))\n {\n this.insertionSort(randInt);\n }\n if(comboAlgorithm.equals(\"Bubble Sort\"))\n {\n this.bubbleSort(randInt);\n }\n \n }", "private synchronized void freshSort(){\n Process[] newQueue = new Process[pros.proSize()];\n for(int i = 0; i <queue.length; i++){\n if(pros.isInList(queue[i])){\n newQueue[i] = queue[i];\n }\n }\n queue = new Process[pros.proSize()];\n queue = newQueue;\n }", "public void sortFullList()\r\n {\r\n if (log.isDebugEnabled())\r\n {\r\n log.debug(\"[\" + this.id + \"] sorting full data\");\r\n }\r\n sortRowList(this.getRowListFull());\r\n }", "private void updateFilteringAndSorting() {\n log.debug(\"update filtering of adapter called\");\n if (lastUsedComparator != null) {\n sortWithoutNotify(lastUsedComparator, lastUsedAsc);\n }\n Filter filter = getFilter();\n if (filter instanceof UpdateableFilter){\n ((UpdateableFilter)filter).updateFiltering();\n }\n }", "private static void evaluateMergesortVogellaThreaded() {\n\n // LOGGER.info(\"evaluating parallel mergesort with Java Threads based on the Vogella version\");\n\n // The time before start to sort.\n long startTime;\n\n // The time after sort.\n long endTime;\n\n // generate sorted array\n numbers = generateSortedArray(ARRAY_SIZE);\n\n // get array to evaluate\n generateWorstUnsortArray(numbers);\n\n // get systemtime before sorting\n startTime = System.currentTimeMillis();\n\n // sort\n msVogellaJThreads.sort(numbers);\n\n // get systemtime after sorting\n endTime = System.currentTimeMillis();\n\n // show the result of the sorting process\n System.out.println(\"\\n- Sortierergebnis: Java Threads (Vogella) -\");\n System.out.println(\"Die sortierte Folge lautet: \" + arrayToString(numbers));\n System.out.printf(\"Für die Sortierung wurden %d ms benötigt\", endTime - startTime);\n System.out.println(\"\\n------------------------------------------------\\n\");\n }", "public void sortSpeeds() {\n\n//\t\tSystem.out.println(\"BEGIN: SORT SPEEDS\");\n\t\tthis.printMoves();\n\n\t\tArrayList<Move> temp = new ArrayList<Move>();\n\t\tint i = 1;\n\t\tint x = 0;\n\t\tboolean y = true;\n\n\t\ttemp.add(niceMoves.get(0));\n\t\tint size = niceMoves.size();\n\n\t\twhile (i < niceMoves.size()) {\n\n//\t\t\tSystem.out.println(\"Reiterating.\");\n\t\t\ty = true;\n\n\t\t\twhile (y) {\n\n\t\t\t\t//System.out.println(\"I: \" + i + \" X: \" + x);\n\n\t\t\t\ttry {\n\n\t\t\t\t\tif (niceMoves.get(i).getSpeed() > temp.get(x).getCalcedSpeed()) {\n\n//\t\t\t\t\t\tSystem.out.println(\"Adding \" + niceMoves.get(i).getCaster() + \" to spot \" + x);\n\t\t\t\t\t\ttemp.add(x, niceMoves.get(i));\n\t\t\t\t\t\ty = false;\n\t\t\t\t\t}\n\t\t\t\t\t//X has cycled through temp, meaning nicemoves.i should be added to the end\n\t\t\t\t\t//The only way to check for this is to let it overflow lol\n\t\t\t\t} catch (Exception E) {\n//\t\t\t\t\tSystem.out.println(\"Adding \" + niceMoves.get(i).getCaster() + \" to spot \" + x);\n\t\t\t\t\ttemp.add(x, niceMoves.get(i));\n\t\t\t\t\ty = false;\n\n\t\t\t\t}\n\n\t\t\t\tx += 1;\n\t\t\t}\n\n\t\t\ti += 1;\n\t\t\tx = 0;\n\t\t}\n\n\t\tniceMoves = temp;\n\n//\t\tSystem.out.println();\n//\t\tSystem.out.println(\"Sorting Complete! New Order: \");\n//\t\tthis.printMoves();\n\t\t//end of sort speeds\n\t}", "public void sort() {\r\n // sort the process variables\r\n Arrays.sort(pvValues, categoryComparator);\r\n fireTableDataChanged();\r\n }", "public void sort() throws IOException {\n for(int i = 0; i < 32; i++)\n {\n if(i%2 == 0){\n filePointer = file;\n onePointer = one;\n }else{\n filePointer = one;\n onePointer = file;\n }\n filePointer.seek(0);\n onePointer.seek(0);\n zero.seek(0);\n zeroCount = oneCount = 0;\n for(int j = 0; j < totalNumbers; j++){\n int n = filePointer.readInt();\n sortN(n,i);\n }\n //Merging\n onePointer.seek(oneCount*4);\n zero.seek(0L);\n for(int j = 0; j < zeroCount; j++){\n int x = zero.readInt();\n onePointer.writeInt(x);\n }\n //One is merged\n }\n }", "void sortUI();", "private static long sortingTime(double[] array, boolean isStandardSort) {\n long start = 0; // starting time\n if (isStandardSort) { \n start = System.currentTimeMillis(); \n Arrays.sort(array);\n } else {\t\n start = System.currentTimeMillis();\n selectionSort(array);\n }\n return System.currentTimeMillis() - start; // measure time consumed\n }", "private void compressBlocks(final int phaseId) {\n // 1. uncross all crossing blocks: O(|G|)\n popBlocks(head -> head.isTerminal() && head.getPhaseId() < phaseId,\n tail -> tail.isTerminal() && tail.getPhaseId() < phaseId);\n\n List<BlockRecord<N, S>> shortBlockRecords = new ArrayList<>();\n List<BlockRecord<N, S>> longBlockRecords = new ArrayList<>();\n\n // 2. get all blocks: O(|G|)\n slp.getProductions().stream().forEach(rule -> consumeBlocks(rule.getRight(), shortBlockRecords::add, longBlockRecords::add, letter -> true));\n\n // 3.1 sort short blocks using RadixSort: O(|G|)\n sortBlocks(shortBlockRecords);\n\n // 3.2 sort long blocks O((n+m) log(n+m))\n Collections.sort(longBlockRecords, blockComparator);\n List<BlockRecord<N, S>> blockRecords = mergeBlocks(shortBlockRecords, longBlockRecords);\n\n // compress blocks\n BlockRecord<N, S> lastRecord = null;\n S letter = null;\n\n // 4. compress blocks: O(|G|)\n for(BlockRecord<N, S> record : blockRecords) {\n\n // check when it is the correct time to introduce a fresh letter\n if(lastRecord == null || !lastRecord.equals(record)) {\n letter = terminalAlphabet.createTerminal(phase, 1L, record.node.getElement().getLength() * record.block.getLength(), record.block);\n lastRecord = record;\n }\n replaceBlock(record, letter);\n }\n }", "@Test(timeout = SHORT_TIMEOUT)\n public void testAdaptiveInsertionSort() {\n //Test adaptiveness of completely ordered sort\n\n //Generate sorted array\n toSort = randArrDuplicates(MAX_ARR_SIZE, new Random(2110));\n Arrays.parallelSort(toSort, comp);\n sortedInts = cloneArr(toSort);\n\n comp.resetCount();\n Sorting.insertionSort(sortedInts, comp);\n int numComparisons = comp.getCount();\n\n assertSorted(sortedInts, comp);\n\n //Should require only 1 pass through array, for n-1 comparisons\n assertTrue(\"Too many comparisons: \" + numComparisons,\n numComparisons <= MAX_ARR_SIZE - 1);\n\n //Check adaptiveness with 1 item out-of-order\n\n //Set up list\n toSort = new IntPlus[6];\n for (int i = 0; i < toSort.length; i++) {\n toSort[i] = new IntPlus(2 * i);\n }\n toSort[3] = new IntPlus(-1);\n\n sortedInts = cloneArr(toSort);\n\n /*\n Initial Array: [0, 2, 4, -1, 8, 10]\n Should require 7 comparisons to sort\n */\n comp.resetCount();\n Sorting.insertionSort(sortedInts, comp);\n numComparisons = comp.getCount();\n\n assertSorted(sortedInts, comp);\n\n assertTrue(\"Too many comparisons: \" + numComparisons,\n numComparisons <= 7);\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 }", "public void sort(){\n ListNode t, x, b = new ListNode(null, null);\n while (firstNode != null){\n t = firstNode; firstNode = firstNode.nextNode;\n for (x = b; x.nextNode != null; x = x.nextNode) //b is the first node of the new sorted list\n if (cmp.compare(x.nextNode.data, t.data) > 0) break;\n t.nextNode = x.nextNode; x.nextNode = t;\n if (t.nextNode==null) lastNode = t;\n }\n firstNode = b.nextNode;\n }" ]
[ "0.719662", "0.6253113", "0.6209965", "0.60641325", "0.6062344", "0.60514784", "0.6039714", "0.6020895", "0.6018125", "0.6015914", "0.59652436", "0.5950544", "0.5932971", "0.5900926", "0.58313674", "0.5802383", "0.5788351", "0.57315594", "0.56716985", "0.56670487", "0.5629508", "0.5613598", "0.5612099", "0.5611703", "0.5592451", "0.55917716", "0.5588461", "0.55848163", "0.5554659", "0.5554079", "0.5549377", "0.55441636", "0.5537118", "0.5532984", "0.5532803", "0.5532803", "0.55292463", "0.55275965", "0.5522279", "0.5519424", "0.551642", "0.5511716", "0.55057514", "0.5502017", "0.54939586", "0.5476436", "0.54741585", "0.5473029", "0.5441123", "0.54384875", "0.54355913", "0.5428854", "0.5424462", "0.5404587", "0.54042906", "0.5398141", "0.53981346", "0.5394633", "0.5393649", "0.53902", "0.538549", "0.53852785", "0.5384685", "0.53686666", "0.5345649", "0.5341686", "0.53390706", "0.53294265", "0.53148216", "0.53070915", "0.53057426", "0.5305577", "0.5304475", "0.5292254", "0.52918285", "0.5290364", "0.5287865", "0.52842516", "0.52834797", "0.52813774", "0.5267899", "0.52645266", "0.5263191", "0.5262101", "0.5261538", "0.5259155", "0.52528334", "0.5249513", "0.524533", "0.5243381", "0.5239559", "0.5239141", "0.5237668", "0.52372295", "0.5224401", "0.5223193", "0.5222278", "0.522134", "0.5221159", "0.5217173", "0.52171165" ]
0.0
-1
endregion region for constructor
public Role() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "public Constructor(){\n\t\t\n\t}", "private void __sep__Constructors__() {}", "public PSRelation()\n {\n }", "public CyanSus() {\n\n }", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "public CSSTidier() {\n\t}", "private TMCourse() {\n\t}", "protected abstract void construct();", "private Rekenhulp()\n\t{\n\t}", "private Instantiation(){}", "public Orbiter() {\n }", "public _355() {\n\n }", "public Pitonyak_09_02() {\r\n }", "public mapper3c() { super(); }", "public Self__1() {\n }", "public Pasien() {\r\n }", "public Anschrift() {\r\n }", "public Curso() {\r\n }", "ConstructorPractice () {\n\t\tSystem.out.println(\"Default Constructor\");\n\t}", "private Solution() {\n /**.\n * { constructor }\n */\n }", "public Clade() {}", "defaultConstructor(){}", "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 CZ()\n {\n }", "public Coche() {\n super();\n }", "public Vaccine() {\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public Method() {\n }", "public Chick() {\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "public Chauffeur() {\r\n\t}", "public Ov_Chipkaart() {\n\t\t\n\t}", "public Supercar() {\r\n\t\t\r\n\t}", "@Override\n public void init() {}", "public Soil()\n\t{\n\n\t}", "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}", "@Override\r\n\tpublic void init() {}", "public JSFOla() {\n }", "public Methods() {\n // what is this doing? -PMC\n }", "@Override public void init()\n\t\t{\n\t\t}", "public Catelog() {\n super();\n }", "public MethodEx2() {\n \n }", "private Cat() {\n\t\t\n\t}", "public Lanceur() {\n\t}", "public Parameters() {\n\t}", "public Cohete() {\n\n\t}", "private Marinator() {\n }", "private Marinator() {\n }", "@Override\n public void init() {\n }", "public Person() {\n\t\t\n\t}", "public SourceCode() {\n }", "public SgaexpedbultoImpl()\n {\n }", "@Override\n protected void init() {\n }", "public Cgg_jur_anticipo(){}", "private SingleObject()\r\n {\r\n }", "@Override\n public void construct() throws IOException {\n \n }", "void DefaultConstructor(){}", "public Odontologo() {\n }", "public C23317d() {\n }", "public void init(){}", "protected ASTNode() {\n\t\t\n\t}", "@Override\n public void init() {\n }", "@Override\r\n\tpublic final void init() {\r\n\r\n\t}", "private Node() {\n\n }", "public void init() {\r\n\t\t// to override\r\n\t}", "private Composite() {\n }", "public Region() { }", "public Carrinho() {\n\t\tsuper();\n\t}", "protected Coord() {\n\t}", "public AbstractT153()\n {\n }", "public Region() {\n }", "public Phl() {\n }", "public Mannschaft() {\n }", "private void translateConstructor( ) {\n \n Set<MethodInfoFlags> flags = EnumSet.noneOf( MethodInfoFlags.class );\n \n AVM2Method method = new AVM2Method( null, flags );\n avm2Class.avm2Class.constructor = method;\n \n AVM2MethodBody body = method.methodBody;\n body.maxStack = 1;\n body.maxRegisters = 1;\n body.maxScope = 11;\n body.scopeDepth = 10;\n \n InstructionList il = body.instructions;\n \n// il.append( OP_getlocal0 );\n// il.append( OP_pushscope );\n il.append( OP_getlocal0 );\n il.append( OP_constructsuper, 0 );\n \n// il.append( OP_findpropstrict, new AVM2QName( PUBLIC_NAMESPACE, \"drawTest\" ));\n il.append( OP_getlocal0 );\n \n il.append( OP_callpropvoid, new AVM2QName( EmptyPackage.namespace, \"drawTest\" ), 0 );\n\n il.append( OP_returnvoid );\n }", "private CustomerReader()\r\n\t{\r\n\t}", "@Override\n void init() {\n }", "private CoverageParser() {\n }", "private Catalog() {\r\n }", "public void init() { }", "public void init() { }", "public Achterbahn() {\n }", "private Solution() {\n //constructor\n }", "@SuppressWarnings(\"unused\")\r\n\tprivate Person() {\r\n\t}", "public Code() {\n\t}", "private IndexBitmapObject() {\n\t}", "ConstuctorOverloading(){\n\t\tSystem.out.println(\"I am non=argument constructor\");\n\t}", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "public Identity()\n {\n super( Fields.ARGS );\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "public Zeffit()\n {\n // TODO: initialize instance variable(s)\n }", "public Account() {\n this(0, 0.0, \"Unknown name\"); // Invole the 2-param constructor\n }", "private R() {\n\n }", "private Road()\n\t{\n\t\t\n\t}", "Reproducible newInstance();", "public BasicLineParser() {\n/* 99 */ this(null);\n/* */ }", "public Genret() {\r\n }" ]
[ "0.8237375", "0.8142659", "0.74925685", "0.7282556", "0.7145001", "0.71447164", "0.712398", "0.7118645", "0.7109488", "0.70640165", "0.70141566", "0.7010768", "0.69858664", "0.6975708", "0.6963821", "0.69399714", "0.6938218", "0.6924999", "0.6920924", "0.69132453", "0.6901624", "0.689851", "0.68978995", "0.68977576", "0.68839383", "0.68559325", "0.6844431", "0.6844093", "0.6841502", "0.68298036", "0.68239284", "0.6822206", "0.68205875", "0.6819301", "0.68130636", "0.6808069", "0.6807941", "0.6800757", "0.6798671", "0.6779391", "0.6776484", "0.6765394", "0.6763515", "0.67413056", "0.67301273", "0.6728018", "0.67265654", "0.6724191", "0.6724191", "0.6723797", "0.6722613", "0.67225707", "0.6703224", "0.67018145", "0.67011684", "0.6696276", "0.6694697", "0.6683357", "0.66791886", "0.6675467", "0.6673937", "0.6672511", "0.66684633", "0.66669226", "0.66658336", "0.66625524", "0.6657919", "0.66572183", "0.66503733", "0.66503155", "0.6647103", "0.664638", "0.6643889", "0.6639551", "0.66395223", "0.6638573", "0.66355884", "0.6634772", "0.6632468", "0.663044", "0.663044", "0.66279894", "0.66276586", "0.66257745", "0.66209173", "0.6620784", "0.6619195", "0.66187733", "0.66125864", "0.6612146", "0.6612146", "0.6612146", "0.6612146", "0.6612146", "0.66114634", "0.6610843", "0.6610145", "0.65991855", "0.65987194", "0.6596687", "0.65960014" ]
0.0
-1
endregion region for getter setter
public int getId() { return id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T get() {\n return value;\n }", "public T get() {\n return value;\n }", "public T get() {\n return value;\n }", "protected abstract Set method_1559();", "@Override\n String get();", "@Override\n public void get() {}", "public Value makeGetter() {\n Value r = new Value(this);\n r.getters = object_labels;\n r.object_labels = null;\n return canonicalize(r);\n }", "public Value makeSetter() {\n Value r = new Value(this);\n r.setters = object_labels;\n r.object_labels = null;\n return canonicalize(r);\n }", "public V get() {\n return value;\n }", "public abstract String get();", "public void get() {\n }", "public String setter() {\n\t\treturn prefix(\"set\");\n\t}", "public Object get()\n {\n return m_internalValue;\n }", "public String get();", "@Override\r\n\tpublic void get() {\n\t\t\r\n\t}", "public String getValue() {\n/* 99 */ return this.value;\n/* */ }", "public Object getNewValue()\n {\n return newValue;\n }", "String setValue();", "@Deprecated\n final Method setter() {\n return this.setter;\n }", "public Value restrictToGetterSetter() {\n checkNotPolymorphicOrUnknown();\n if (!isMaybePrimitive() && !isMaybeObjectOrSymbol())\n return this;\n Value r = new Value(this);\n r.flags &= ~PRIMITIVE;\n r.num = null;\n r.str = null;\n r.object_labels = null;\n r.excluded_strings = r.included_strings = null;\n return canonicalize(r);\n }", "public int getValue() {\n/* 450 */ return this.value;\n/* */ }", "public int getSet() {\n return set;\n }", "protected Object doGetValue() {\n\t\treturn value;\n\t}", "public String getValor()\n/* 17: */ {\n/* 18:27 */ return this.valor;\n/* 19: */ }", "public String get()\n {\n return val;\n }", "public String get()\n {\n return this.string;\n }", "public final Object get() {\n return getValue();\n }", "public Value restrictToGetter() {\n checkNotPolymorphicOrUnknown();\n if (getters == null)\n return theNone;\n Value r = new Value();\n r.getters = getters;\n return canonicalize(r);\n }", "@Override\n Derived get();", "public int\t\tget() { return value; }", "public Empresa getEmpresa()\r\n/* 84: */ {\r\n/* 85:131 */ return this.empresa;\r\n/* 86: */ }", "public String getSetter() {\n return \"set\" + getCapName();\n }", "String get();", "String get();", "public String get() {\n return value;\n\t}", "@Override\n public Object getValue()\n {\n return value;\n }", "public Empleado getEmpleado()\r\n/* 183: */ {\r\n/* 184:337 */ return this.empleado;\r\n/* 185: */ }", "public Object getValue() { return _value; }", "public abstract void set(M newValue);", "V setValue(final V value) {\n\t setMethod.accept(value);\n\n\t return value;\n\t}", "@Override\r\n\tpublic String get() {\n\t\treturn null;\r\n\t}", "public Value restrictToSetter() {\n checkNotPolymorphicOrUnknown();\n if (setters == null)\n return theNone;\n Value r = new Value();\n r.setters = setters;\n return canonicalize(r);\n }", "V getValue() {\n return value;\n }", "public String get() {\n return this.value;\n }", "@Override\r\n public Object getValue() {\r\n return value;\r\n }", "@Override\n\tpublic String get() {\n\t\treturn null;\n\t}", "public Method getGetter() {\n return this.getter;\n }", "@Override\n \tpublic IValue getValue() {\n \t\treturn this;\n \t}", "public Object getValue() { return this.value; }", "@Override\n\tpublic Object getValue() {\n\t\treturn this ;\n\t}", "@Override\n\tpublic Object getValue() {\n\t\treturn this ;\n\t}", "public Object getValue(){\n \treturn this.value;\n }", "public int get () { return rating; }", "public int getValue()\r\n/* 21: */ {\r\n/* 22: 71 */ return this.value;\r\n/* 23: */ }", "@Test\n\tpublic void get_test()\n\t{\n\t\tb.set(1,2,'x');\n\t\tassertEquals(b.get(1,2),'x');\n\t}", "public String getEmployee()\r\n/* 38: */ {\r\n/* 39:43 */ return this.employee;\r\n/* 40: */ }", "protected V getValue() {\n return this.value;\n }", "String getValue() {\n return mValue;\n }", "public S getValue() { return value; }", "public Object getValue()\n {\n\treturn value;\n }", "public double getHiY() {\r\n\treturn fieldHiY;\r\n}", "public ValoresCalculo getValorCalculo()\r\n/* 88: */ {\r\n/* 89:107 */ return this.valorCalculo;\r\n/* 90: */ }", "public int getAge() {return age;}", "public int getValue() { return 42; }", "public double getLoY() {\r\n\treturn fieldLoY;\r\n}", "public Value getSetValue() {\n\t\treturn set_value_;\n\t}", "public byte[] get(){\n return this.value;\n }", "public int getYearsOffice()\n {\n return yearsOffice;\n}", "public void setValor(String valor)\n/* 22: */ {\n/* 23:34 */ this.valor = valor;\n/* 24: */ }", "public int getf(){\r\n return f;\r\n}", "@Override\n\t\tpublic V getValue(){\n\t\t\treturn value;\n\t\t}", "@Override\n\t\tpublic V setValue(V p1){\n\t\t\treturn p1;\n\t\t}", "public Value getValue(){\n return this.value;\n }", "@Override\r\n\tpublic <T> T get() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic T somme() {\n\t\treturn val;\n\t}", "public int getx(){\r\n return z;\r\n}", "public String getStudentLastName(){\r\n return studentLastName.get();\r\n}", "public T getValue()\n {\n return value;\n }", "public int getAge(){\n return age;\n }", "@SuppressWarnings(\"UnusedReturnValue\")\n @Override\n public T setField (T f) {\n T temp = mField;\n mField = f;\n return temp;\n }", "double sety(double y) {\nreturn this.y;\n }", "private String getSetMethodName() {\n assert name != null;\n return \"set\" + upperFirstChar(name);\n }", "public int geti(){\r\n return i;\r\n}", "public interface Getter {\r\n\tObject get();\r\n}", "@Override\r\n\tpublic T get() {\n\t\treturn null;\r\n\t}", "public T get() {\n return object;\n }", "@SuppressWarnings(\"UnusedReturnValue\")\n @Override\n public T setField(T f) {\n T temp = mField;\n mField = f;\n return temp;\n }", "public abstract Object getValue(Context context) throws PropertyException;", "public void setValue(T value) {\n/* 134 */ this.value = value;\n/* */ }", "public String getNombre()\r\n/* 113: */ {\r\n/* 114:204 */ return this.nombre;\r\n/* 115: */ }", "public int getAge()\r\n {\r\n return age;\r\n }", "public void setValue(T value) {\n/* 89 */ this.value = value;\n/* */ }", "public CuentaContable getCuentaContableCierre()\r\n/* 98: */ {\r\n/* 99:115 */ return this.cuentaContableCierre;\r\n/* 100: */ }", "@Override\r\n\tpublic void unsetGetValue() {\n\t\t\r\n\t}", "public abstract Object getValue();", "public abstract Object getValue();", "public abstract Object getValue();", "double get();", "final ASTNode internalGetSetChildProperty(ChildPropertyDescriptor property, boolean get, ASTNode child) {\n if (property == NAME_PROPERTY) {\n if (get) {\n return getName();\n } else {\n setName((SimpleName) child);\n return null;\n }\n }\n if (property == EXPRESSION_PROPERTY) {\n if (get) {\n return getExpression();\n } else {\n setExpression((Expression) child);\n return null;\n }\n }\n // allow default implementation to flag the error\n return super.internalGetSetChildProperty(property, get, child);\n }", "boolean get();", "public double getHiX() {\r\n\treturn fieldHiX;\r\n}" ]
[ "0.6721712", "0.66995394", "0.66995394", "0.66836286", "0.6634656", "0.6614465", "0.64633876", "0.646325", "0.64589626", "0.63877106", "0.6351972", "0.63434464", "0.63421047", "0.6325112", "0.63241684", "0.6274871", "0.62501186", "0.62415916", "0.62353873", "0.6220706", "0.6166426", "0.616493", "0.6160349", "0.6147167", "0.61427116", "0.61158407", "0.61060464", "0.6095214", "0.6077046", "0.6042529", "0.6037448", "0.6017856", "0.5999715", "0.5999715", "0.5993978", "0.596534", "0.5950348", "0.5943951", "0.59201", "0.5913842", "0.590613", "0.5903748", "0.5888969", "0.5886089", "0.58749205", "0.58651143", "0.5864929", "0.5862294", "0.5853973", "0.58527786", "0.58527786", "0.5851999", "0.58400434", "0.58397377", "0.583633", "0.58278114", "0.5821261", "0.58025134", "0.58024657", "0.57984275", "0.57955635", "0.5759068", "0.57503515", "0.5748085", "0.5739658", "0.573107", "0.57269216", "0.57142305", "0.5711386", "0.570932", "0.57002175", "0.56867534", "0.5686488", "0.568617", "0.5684829", "0.56785", "0.5673691", "0.5670921", "0.56659526", "0.56644756", "0.564667", "0.56350815", "0.56349945", "0.5617249", "0.5616756", "0.5616621", "0.56102574", "0.5603174", "0.5601315", "0.55988437", "0.55964506", "0.55950737", "0.5590218", "0.55897826", "0.5588686", "0.5588686", "0.5588686", "0.5579842", "0.55789566", "0.5578555", "0.55782485" ]
0.0
-1
create a TipCalculator object and call its start method
public static void main(String[] args) { launch(args); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Tip() { ; }", "public BasicTipOfTheDayUI(JXTipOfTheDay tipPane)\n/* */ {\n/* 89 */ this.tipPane = tipPane;\n/* */ }", "private void startChangeTipActivity()\n {\n\t\tIntent settingsIntent = new Intent();\n\t\tsettingsIntent.setClass(this, ChangeTipActivity.class);\n\t\tstartActivity(settingsIntent);\t\t\n\t}", "Start createStart();", "public DefaultTip() {}", "public void start() {\n \t\tzCalc.start();\n \t}", "public void start() {\n \n convertLabelsToInt();\n executor = Executors.newSingleThreadExecutor();\n executor.submit(this);\n active = true;\n \n tSec.setEditable(false);\n tMin.setEditable(false);\n tHours.setEditable(false);\n }", "private void calculateTip()\n {\n\t\ttry\n {\n\t\t\tbillAmount = Double.parseDouble(billAmountEditText.getText().toString());\n\t\t\thideKeyboard();\n loadTipPercentage();\n\t\t}\n catch (NumberFormatException ex)\n {\n\t\t\tbillAmount = 0;\n\t\t}\n try\n {\n numberPeople = Integer.parseInt(nbOfPpleView.getText().toString());\n hideKeyboard();\n loadTipPercentage();\n }\n catch (NumberFormatException ex)\n {\n numberPeople = 1;\n nbOfPpleView.setText(String.format(\"%d\", 1));\n }\n\t\t\n\t\ttipAmount = billAmount * tipPercentage;\n\t\ttotalAmount = billAmount + tipAmount;\n if (numberPeople > 0)\n {\n totalAmountByPerson = totalAmount / numberPeople;\n totalAmountByPerson = Math.ceil(totalAmountByPerson);\n }\n else\n {\n totalAmountByPerson = totalAmount;\n totalAmountByPerson = Math.ceil(totalAmountByPerson);\n }\n\n tipAmtView.setText(String.format(\"$%.2f\", tipAmount));\n totalAmtView.setText(String.format(\"$%.2f\", totalAmount));\n totalAmtByPersonView.setText(String.format(\"$%.0f\", totalAmountByPerson));\n\t}", "@Override\n\tpublic void onResume()\n {\n super.onResume();\n // Call the calculateTip method\n\t\tcalculateTip();\n\t}", "@Override\n\tpublic void setTip(double tip) {\n\t\t\n\t}", "void tip(double amount);", "private void findATip() {\n\n TextView tipsText = (TextView) findViewById(R.id.tipsText);\n TipManager tipManager = new TipManager();\n //Uses the TipManager to get a random tip\n this.tip = tipManager.getATip();\n //Gets the text of the tip\n String tipText = this.tip.getTipText();\n //Gets the activity that the tip should go to\n String tipIntent = this.tip.getTipIntent();\n tipsText.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n goSomewhere();\n }\n });\n tipsText.setText(tipText);\n tipsText.setTypeface(FontHelper.getLatoRegular(getApplicationContext()));\n //Log.d(\"Logthis \",tip);\n\n }", "public Calculator()\n {\n \n frame = new JFrame();\n createCalculator(range);\n createCP(range);\n frame.setVisible(true);\n frame.setSize(1200,1000);\n \n\n }", "public Calculator() {\n initComponents();\n \n }", "public static void start() { \r\n\t\ttempo_inicial = System.nanoTime(); \r\n\t\ttempo_final = 0; \r\n\t\tdiftempo = 0; \r\n\t}", "public AddTipLogic(AddTipActivity view, Context context){\n this.view = view;\n this.context = context;\n }", "public Calculator() {\r\n\t\tsuper();\r\n\t}", "public Calculator()\n {\n \n }", "public void start()\r\n\t{\n\tSystem.out.println(\"normal start method\");\r\n\t}", "@Before\n public void createCalc(){\n calculator = new Calculator();\n System.out.println(\"I am BeforeMethod\");\n }", "public JDayTip()\n\t{\n\t\tsuper();\n\t}", "public static void main(String[] args) {\n new Calculator();\n }", "public Topping(int start) {\n super(start);\n }", "public void start(Point p);", "public void tipOfTheDay(boolean force) {\n\t\tProperties props = new Properties();\n\t\ttry {\n\t\t\tprops.load(RailGUI.class.getResourceAsStream(\"/org/railsim/gui/resources/totd.properties\"));\n\t\t} catch (IOException ex) {\n\t\t\treturn;\n\t\t} catch (NullPointerException e) {\n\t\t\tdataCollector.collector.gotException(e);\n\t\t}\n\n\t\tTipModel tips = TipLoader.load(props);\n\n\t\t/*\tDefaultTipModel tips = new DefaultTipModel();\n\t\t // plain text\n\t\t tips\n\t\t .add(new DefaultTip(\n\t\t \"tip1\",\n\t\t \"SimplyTrain Tip 1\"));\n\n\t\t // html text\n\t\t tips.add(new DefaultTip(\"tip2\",\n\t\t \"<html>This is an html <b>TIP</b><br><center>\"\n\t\t + \"<table border=\\\"1\\\">\" + \"<tr><td>1</td><td>entry 1</td></tr>\"\n\t\t + \"<tr><td>2</td><td>entry 2</td></tr>\"\n\t\t + \"<tr><td>3</td><td>entry 3</td></tr>\" + \"</table>\"));\n\n\t\t // a Component\n\t\t tips.add(new DefaultTip(\"tip3\", new JTree()));\n\n\t\t // an Icon\n\t\t tips.add(new DefaultTip(\"tip 4\", new ImageIcon(BasicTipOfTheDayUI.class\n\t\t .getResource(\"TipOfTheDay24.gif\"))));\n\t\t */\n\t\tfinal JTipOfTheDay totd = new JTipOfTheDay(tips);\n\t\tint t = dataCollector.collector.prefs_totd.getInt(\"lasttip\", 0);\n\t\tif ((t + 1) < totd.getModel().getTipCount()) {\n\t\t\ttotd.setCurrentTip(t + 1);\n\t\t} else {\n\t\t\ttotd.setCurrentTip(0);\n\t\t}\n\n\t\tif (force) {\n\t\t\tfinal JTipOfTheDay.ShowOnStartupChoice fake = new JTipOfTheDay.ShowOnStartupChoice() {\n\t\t\t\t@Override\n\t\t\t\tpublic boolean isShowingOnStartup() {\n\t\t\t\t\treturn totd.isShowingOnStartup(dataCollector.collector.prefs_totd);\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void setShowingOnStartup(boolean showOnStartup) {\n\t\t\t\t\tif (showOnStartup) {\n\t\t\t\t\t\ttotd.forceShowOnStartup(dataCollector.collector.prefs_totd);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tdataCollector.collector.prefs_totd.flush();\n\t\t\t\t\t\t} catch (BackingStoreException e) {\n\t\t\t\t\t\t\tdataCollector.collector.gotException(e);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\ttotd.showDialog(this, fake, true);\n\t\t} else {\n\t\t\ttotd.showDialog(this, dataCollector.collector.prefs_totd);\n\t\t}\n\t\tdataCollector.collector.prefs_totd.putInt(\"lasttip\", totd.getCurrentTip());\n\t\ttry {\n\t\t\tdataCollector.collector.prefs_totd.flush();\n\t\t} catch (BackingStoreException e) {\n\t\t\tdataCollector.collector.gotException(e);\n\t\t}\n\t}", "public CreateKonceptWorker() {\n\t\tsuper();\n\t\tthis.koncept = new KoncepteParaula();\n\t}", "public @Override T start() \r\n {\r\n // Declare variables\r\n ControlPanel operationTimesCPanel = new ControlPanel(this.cPanel.getAdministrator(), \"OPERATION DATA\");\r\n\r\n String[] optionNames = {\"Operations\", \"Sorted Operations\",\"Operation Statistics\",\"Time Sorter\"\r\n ,\"Reset Operation Data\",\"Back\"};\r\n\r\n ControlPanelOption[] options = new ControlPanelOption[6];\r\n \r\n ControlPanelOption printOpTimes = new PrintAllOperationsOption(operationTimesCPanel);\r\n ControlPanelOption printSortedTimes= new PrintSortedOperationTimesOption(operationTimesCPanel);\r\n ControlPanelOption printOpStats = new PrintOperationStatisticsOption(operationTimesCPanel);\r\n ControlPanelOption timeSorter = new TimeSortingOption(operationTimesCPanel);\r\n ControlPanelOption resetOperationTimekeeper = new ResetOperationTimekeeperOption(operationTimesCPanel);\r\n ControlPanelOption back = new GoBackOption(operationTimesCPanel);\r\n\r\n // Add options to options array\r\n options[0] = printOpTimes;\r\n options[1] = printSortedTimes;\r\n options[2] = printOpStats;\r\n options[3] = timeSorter;\r\n options[4] = resetOperationTimekeeper;\r\n options[5] = back;\r\n \r\n // Build a menu\r\n operationTimesCPanel.setMenuOptions(optionNames, options);\r\n\r\n // Print the menu and allow the user to select an option\r\n operationTimesCPanel.printMenuOptions();\r\n operationTimesCPanel.selectMenuOption();\r\n \r\n // Recur the previous menu\r\n recurMenu();\r\n return null;\r\n }", "public void start() {\r\n if (ticks != 0) {\r\n if (uiCreator.isPresent()) {\r\n uiCreator.get().createUI(simulator);\r\n } else {\r\n simulator.start();\r\n }\r\n }\r\n }", "public Calculate() {\n initComponents();\n setIcon();\n }", "private void start(){\n\t\tMetricData metric = new MetricData();\n\t\tmetric.getName();\n\t\tmetric.getValue();\n\t\tmetric.setValue(2);\n\t}", "public void start(){\n }", "protected abstract void startIndividualTrx();", "public Calc() {\n obj = new CalcOperation();\n initComponents();\n }", "public final void start(){\n cpt = 0;\n inProgress = true;\n init();\n UpdateableManager.addToUpdate(this);\n }", "private Calculator() {\n }", "public void start() {\n\t\tPetriNetView pnmlData = ApplicationSettings.getApplicationView()\n\t\t\t\t.getCurrentPetriNetView();\n\t\t//if (pnmlData.getTokenViews().size() > 1) {\n\t\tif(pnmlData.getEnabledTokenClassNumber() > 1){\n\t\t\tExpander expander = new Expander(pnmlData);\n\t\t\tpnmlData = expander.unfold();\n\t\t\tJOptionPane.showMessageDialog(null, \"This is CGSPN. The analysis will only apply to default color (black)\",\n\t\t\t\t\t\"Information\", JOptionPane.INFORMATION_MESSAGE);\n\t\t}\n\t\t// Build interface\n\t\tEscapableDialog guiDialog = new EscapableDialog(\n\t\t\t\tApplicationSettings.getApplicationView(), MODULE_NAME, true);\n\n\t\t// 1 Set layout\n\t\tContainer contentPane = guiDialog.getContentPane();\n\t\tcontentPane.setLayout(new BoxLayout(contentPane, BoxLayout.PAGE_AXIS));\n\n\t\t// 2 Add file browser\n\t\tsourceFilePanel = new PetriNetChooserPanel(\"Source net\", pnmlData);\n\t\tcontentPane.add(sourceFilePanel);\n\n\t\t// 3 Add results pane\n\t\tresults = new ResultsHTMLPane(pnmlData.getPNMLName());\n\t\tcontentPane.add(results);\n\n\t\t// 4 Add button's\n\t\tcontentPane.add(new ButtonBar(\"Analyse GSPN\", runAnalysis, guiDialog\n\t\t\t\t.getRootPane()));\n\n\t\t// 5 Make window fit contents' preferred size\n\t\tguiDialog.pack();\n\n\t\t// 6 Move window to the middle of the screen\n\t\tguiDialog.setLocationRelativeTo(null);\n\n\t\ttry {\n\t\t\tguiDialog.setVisible(true);\n\t\t} catch (NullPointerException e) {\n\t\t}\n\n\t}", "public void setTip(java.lang.String tip)\n {\n this.tip = tip;\n }", "public void start() {\n }", "public abstract void startTape();", "public void start()\n\t{\n\t\t\n//\t\tlistExample();\n\t\tlistExample2();\n\t\t\n//\t\tstart1();\n\t\t// forPractice();\n\t//\t askUser();\n\t//\t Looooop2();\n//\t\t myLooooop();\n\t//\t JOptionPane.showMessageDialog(null, myProperties); //THIS WOULD PRINT THE\n\t\t// DEFAULT VALUES!!!\n\t\t \n\n\t}", "@Override\n\tpublic void onStart()\n {\n super.onStart();\n // Load the preferences tip of percentage\n\t\tloadTipPercentage();\n\t}", "public start() {\n\t\tsuper();\n\t}", "public void start() {\n\n }", "public static void startTripTrackingService(Context context, String startMethod) {\n Timber.i(\"method=startTripTrackingService marker=StartingTripTrackingService startMethod=%s\", startMethod);\n\n Timber.d(\"method=startTripTrackingService preferences.set.TRIP_STARTED_STATE=true\");\n PreferencesManager.getInstance(context).saveTripStartedState(true);\n stopStartTripService();\n\n // TODO: should the reference to this object be kept beyond the MotionTrackerBuilder.class?\n Timber.d(\"method=startTripTrackingService action='instantiate MotionTrackerBuilder object'\");\n new MotionTrackerBuilder(context);\n\n Intent tripTrackingService = new Intent(context, TripTrackingService.class);\n tripTrackingService.putExtra(ConfigurationConstants.START_TRIP_EXTRA, true);\n tripTrackingService.putExtra(ConfigurationConstants.START_METHOD_EXTRA, startMethod);\n context.startService(tripTrackingService);\n }", "private void start() {\r\n\t\t// Clear the log file.\r\n\t\tBPCC_Logger.clearLogFile();\r\n\t\t\r\n\t\t// Initialize BPCC_Util static fields.\r\n\t\tBPCC_Util.initStaticFields();\r\n\t\t\r\n\t\t// Set logging level desired for test.\r\n\t\tBPCC_Util.setLogLevel(LogLevelEnum.DEBUG);\r\n\t\t\r\n\t\t// Initialize class global variables.\r\n\t\tinitVars();\r\n\t\t\r\n\t\tcreateAndShowGUI();\r\n\t}", "public void start()\n {\n }", "public static void main(String[] args) {\r\n BaseCalc calc = new BaseCalc();\r\n }", "public ProvAnimatorManager(ViewType viewType, int tps, String inputFile, String outputFile) {\n this.tps = tps;\n this.viewType = viewType;\n this.outputFile = outputFile;\n this.inputFile = inputFile;\n this.createModel();\n this.createViewController();\n }", "private void start() {\n\n\t}", "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 pn_Creating() {\n initComponents();\n imageCreating.start();\n }", "public void start() {\n ActionListener listener = new TimePrinter();\n Timer t = new Timer(interval, listener);\n t.start();\n }", "public void start() {\n\n\t}", "@Override\n public void start() {\n runtime.reset();\n\n telemetry.addData(\"Instructions:\", \"To increase or decrease the shooter speed, use A button to decrease\" +\n \"speed and B button to increase speed. Use the right and left bumper to control the intake. To change \" +\n \"the intake speed, use d-pad down to decrease the speed and dpad up to increase the speed. The normal driving \" +\n \"should work as normal. Both speeds are initialized to .5, and you should be able to read that in the telemetry \" +\n \"once you start the program :) buena suerte\");\n telemetry.update();\n }", "public void start()\n {}", "public void start() {}", "public void start() {}", "@Override\n\tpublic void teleopInit() {\n\t\tif (driveTrainCommand != null) {\n\t\t\tdriveTrainCommand.start();\n\t\t}\n\t\tif (colorCommand != null) {\n\t\t\tcolorCommand.start();\n\t\t}\n\t\tif (intakeCommand != null) {\n\t\t\tintakeCommand.start();\n\t\t}\n\t\tif (outtakeCommand != null) {\n\t\t\touttakeCommand.start();\n\t\t}\n\t}", "private TAPosition()\n {\n\n }", "@Override\r\n\tvoid start() {\n\t\tButton btnPayed = new Button(\"Paid\");\r\n\t\tButton btnCanceled = new Button(\"Canceled\");\r\n\t\t// Set button action events to the event methods of this class\r\n\t\tsetControlButton(btnPayed, \"Paid\");\r\n\t\tsetControlButton(btnCanceled, \"Canceled\");\r\n\r\n\t\ttextLabelDisplayed = new Label(\"\");\r\n\t\ttextLabelDisplayed.setPrefWidth(120);\r\n\r\n\t\tGridPane gridPaneAll = new GridPane();\r\n\t\tgridPaneAll.setVgap(10);\r\n\t\tGridPane gridPaneOrder = new GridPane();\r\n\t\tgridPaneOrder.setHgap(10);\r\n\t\tgridPaneOrder.add(btnPayed, 0, 0);\r\n\t\tgridPaneOrder.add(btnCanceled, 1, 0);\r\n\t\tgridPaneAll.add(gridPaneOrder, 0, 0);\r\n\t\tgridPaneAll.add(textLabelDisplayed, 0, 1);\r\n\r\n\t\twindow.addNodesAsChildrenToRoot(gridPaneAll);\r\n\r\n\t\t// Put the final touches and display the window.\r\n\t\twindow.start();\r\n\r\n\t\trefreshDisplay();\r\n\t}", "protected void start() {\n }", "public TripManager() {\n }", "public void start() {\n\r\n }", "public Calculator() {\r\n\t\t/*\r\n\t\t * Constructor - Method name which has the same class name is called a Consatructor\r\n\t\t */\r\n\t\tSystem.out.println(\"Calling constructor\");\r\n\t}", "public void startTask() {\n\t}", "public static void main(String[] args) {\n CalculatorV1 calc = new CalculatorV1();\n\n }", "public void teleopInit() {\n\t\tauto.cancel();\r\n\t\t// Create the teleop command and start it.\r\n\t\tteleop.start();\r\n\t\t// Reset the drivetrain encoders\r\n\t\tDriveTrain.getInstance().resetEncoders();\r\n\t\t// Start pushing sensor readings to the SD.\r\n\t\treadings.start();\r\n\t}", "public static void main(String[] args) {\n\t\tCalculatrice calc = new Calculatrice();\r\n\t\t//MonBouton bout = new MonBouton(\"Magic!\");\r\n\t\t\r\n\t}", "public CalculatorParser(CalculatorParserTokenManager tm) {\n token_source = tm;\n token = new Token();\n jj_ntk = -1;\n }", "public Start() {\n initComponents();\n }", "public Start() {\n initComponents();\n }", "public void start() {\n\t\t\n\t}", "public void start() {\n\t\t\n\t}", "public void SetupTissue(double startProp) {\n for (int i = 0; i < length; i++) {\n if (GetAgent(i) == null) {\n if (rn.nextDouble() < startProp) {\n MarkCell_II c = NewAgentSQ(i);\n c.InitNormal();\n //initialize cells with random cell cycle progress\n c.cycleRemaining=c.cycleRemaining*rn.nextDouble();\n }\n }\n }\n }", "public synchronized void start() {\r\n\t\tif(type == TYPE_DELAY) {\r\n\t\t\tdate = new Date(System.currentTimeMillis() + delay);\r\n\t\t}\r\n\t\tif(started) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tstarted = true;\r\n\t\ttm.addStartedTimers(this);\t\t\r\n//\t\ttm.getHandler().post(new Runnable() {\r\n//\t\t\tpublic void run() {\r\n//\t\t\t\tdoCancel();\r\n//\t\t\t\tdoStart();\r\n//\t\t\t}\r\n//\t\t});\r\n\t}", "abstract public void start();", "public void start()\r\n\t{\r\n\t\tcurrentstate = TIMER_START;\r\n\t\tstarttime = Calendar.getInstance();\r\n\t\tamountOfPause = 0;\r\n\t\trunningTime = 0;\r\n\t\tlastRunningTime = 0;\r\n\t\tpassedTicks = 0;\r\n\t}", "public tool() {\n initComponents();\n }", "public void start() {\n\t\tSystem.out.println(\"parent method\");\n\t}", "void start() {\n }", "public void starting();", "public DefaultTip(String name, Object tip)\n/* */ {\n/* 39 */ this.name = name;\n/* 40 */ this.tip = tip;\n/* */ }", "public void start(){\n\t\ttimer = new Timer();\n\t\ttimer.schedule(this, 0, (long)66.6);\n\t}", "public void start() {\n SetupGUI setup = new SetupGUI();\n }", "public static void main(String[] args) {\n\t\tinterestCalculator calc = new interestCalculator(\"4000\", \".1\");\n\n\n\t}", "public abstract void start();", "public abstract void start();", "public abstract void start();", "public abstract void start();", "public abstract void start();" ]
[ "0.6295729", "0.6122395", "0.582094", "0.5788953", "0.5759858", "0.571556", "0.5658013", "0.5610423", "0.5598519", "0.5594901", "0.5586741", "0.55752355", "0.5559877", "0.5489158", "0.5453826", "0.54394054", "0.5423535", "0.5419015", "0.53978395", "0.53863037", "0.5374922", "0.5369499", "0.5365378", "0.53590626", "0.53436863", "0.5315925", "0.5311736", "0.5311444", "0.5290589", "0.527341", "0.527088", "0.5262673", "0.52580875", "0.52443635", "0.52338874", "0.5233684", "0.52308387", "0.5229251", "0.5224636", "0.52032816", "0.520162", "0.51963276", "0.5195045", "0.5190632", "0.5187338", "0.51734585", "0.516471", "0.5162982", "0.5154121", "0.5148873", "0.5148873", "0.5148873", "0.5148873", "0.5148873", "0.5148873", "0.5148873", "0.5148873", "0.5148873", "0.5148873", "0.5148873", "0.5148873", "0.5148654", "0.5148344", "0.5142288", "0.5110719", "0.5110352", "0.5108557", "0.5108557", "0.51054406", "0.5103033", "0.50988466", "0.5095943", "0.50916755", "0.5089895", "0.5088302", "0.5084796", "0.50768054", "0.50729305", "0.50700283", "0.50641245", "0.5057525", "0.5057525", "0.5055886", "0.5055886", "0.50557184", "0.5055301", "0.5052988", "0.50516695", "0.5050264", "0.50484014", "0.50395143", "0.5038531", "0.5028839", "0.50286925", "0.5023301", "0.501473", "0.5011873", "0.5011873", "0.5011873", "0.5011873", "0.5011873" ]
0.0
-1
constructor with no parameter
public Qualifiers() { AddQualifiers(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "defaultConstructor(){}", "void DefaultConstructor(){}", "public Constructor(){\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "public Generic(){\n\t\tthis(null);\n\t}", "private Instantiation(){}", "private SingleObject(){}", "private SingleObject()\r\n {\r\n }", "public Clade() {}", "O() { super(null); }", "public Method() {\n }", "public Curso() {\r\n }", "Reproducible newInstance();", "public Basic() {}", "public Pasien() {\r\n }", "public no() {}", "public lo() {}", "public Orbiter() {\n }", "ConstuctorOverloading(){\n\t\tSystem.out.println(\"I am non=argument constructor\");\n\t}", "protected abstract void construct();", "private Params()\n {\n }", "DefaultConstructor(int a){}", "public CyanSus() {\n\n }", "public JsonFactory() { this(null); }", "public Parameters() {\n\t}", "public Parser()\n {\n //nothing to do\n }", "public Pitonyak_09_02() {\r\n }", "public TTau() {}", "public Member() {}", "public Person() {}", "public PowerMethodParameter() {\r\n\t\t\r\n\t\t//constructor fara parametru, utilizat in cazul in care utilizatorul nu introduce\r\n\t\t//fisierul sursa si nici fiesierul destinatie ca parametrii in linia de comanda\r\n\t\tSystem.out.println(\"****The constructor without parameters PowerMethodParameter has been called****\");\r\n\t\tSystem.out.println(\"You did not specify the input file and the output file\");\r\n\t\t\r\n\t}", "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}", "public Complex() {\n this(0);\n }", "public Data() {}", "public Identity()\n {\n super( Fields.ARGS );\n }", "public Parser()\n{\n //nothing to do\n}", "public None()\n {\n \n }", "public Person() {\n\t\t\n\t}", "public Cgg_jur_anticipo(){}", "public Postoj() {}", "public PSRelation()\n {\n }", "public Function() {\r\n\r\n\t}", "public Demo3() {}", "public Lanceur() {\n\t}", "public AllDifferent()\n {\n this(0);\n }", "private Sequence() {\n this(\"<Sequence>\", null, null);\n }", "ConstructorPractice () {\n\t\tSystem.out.println(\"Default Constructor\");\n\t}", "public Mannschaft() {\n }", "public prueba()\r\n {\r\n }", "public God() {}", "public GTFTranslator()\r\n {\r\n // do nothing - no variables to instantiate\r\n }", "public ObjectFactory() {\n\t}", "public CSSTidier() {\n\t}", "public Operation() {\n\t}", "public Chick() {\n\t}", "public Account() {\n this(0, 0.0, \"Unknown name\"); // Invole the 2-param constructor\n }", "public ObjectFactory() {\r\n\t}", "public SgaexpedbultoImpl()\n {\n }", "public Chauffeur() {\r\n\t}", "private Default()\n {}", "public Component() {\n }", "public SpeakerSerivceImpl() {\n\t\tSystem.out.println(\"No args in constructor\");\n\t}", "public Implementor(){}", "public Vector() {\n construct();\n }", "public LifeComponent() {\n // call other constructor with null param\n this(null);\n }", "public Odontologo() {\n }", "public Person()\n {\n //intentionally left empty\n }", "public Field(){\n\n // this(\"\",\"\",\"\",\"\",\"\");\n }", "public Rol() {}", "protected SimpleMatrix() {}", "public Phl() {\n }", "public Request(){\n\t\tthis(null, null, null);\n\t}", "public Achterbahn() {\n }", "public RngObject() {\n\t\t\n\t}", "public Complex(){\r\n\t this(0,0);\r\n\t}", "public User() {\r\n this(\"\", \"\");\r\n }", "private ATCres() {\r\n // prevent to instantiate this class\r\n }", "public CalccustoRequest()\r\n\t{\r\n\t}", "public MethodEx2() {\n \n }", "public Member() {\r\n\t}", "public D() {}", "public User(){\n this(null, null);\n }", "public Data() {\n }", "public Data() {\n }", "public PipelineImpl() {\n }", "public Individual()\r\n\t{\r\n\t}", "MyEncodeableWithoutPublicNoArgConstructor() {}", "private Composite() {\n }", "public Student(){}", "public AntrianPasien() {\r\n\r\n }", "public Gasto() {\r\n\t}", "public Node() {\r\n\t}", "public Node() {\r\n\t}", "public Node() {\n\t}", "public Data() {\n \n }", "public Anschrift() {\r\n }", "public Pleasure() {\r\n\t\t}", "public Alojamiento() {\r\n\t}", "public TCubico(){}", "public Student()\r\n {\r\n //This is intended to be empty\r\n }" ]
[ "0.7731066", "0.7503863", "0.74570054", "0.74419796", "0.7351043", "0.72035694", "0.7161443", "0.7016152", "0.7003779", "0.69892645", "0.6982277", "0.6967068", "0.6965196", "0.6958624", "0.69490725", "0.69454503", "0.6911837", "0.6909617", "0.6875224", "0.68106484", "0.68082666", "0.6781527", "0.6774433", "0.6757423", "0.6756893", "0.6747962", "0.6744831", "0.67317265", "0.6703028", "0.6684027", "0.66755265", "0.66566074", "0.6651527", "0.66501856", "0.66473716", "0.66330004", "0.66319335", "0.6627205", "0.66236305", "0.6610555", "0.66090685", "0.66050816", "0.6598628", "0.6596054", "0.6591237", "0.6589551", "0.6579208", "0.6572453", "0.6570875", "0.6567685", "0.65670085", "0.6566001", "0.6565462", "0.65644395", "0.65631163", "0.6563089", "0.6562415", "0.65565664", "0.65457237", "0.65450233", "0.6542267", "0.6540359", "0.6539074", "0.6531187", "0.6529346", "0.65283626", "0.6528239", "0.65268135", "0.65199023", "0.65164286", "0.6512227", "0.65102327", "0.6508227", "0.6504905", "0.6503719", "0.65032345", "0.65005326", "0.6492494", "0.64920926", "0.64913875", "0.64911926", "0.64846396", "0.6484099", "0.6481872", "0.6481872", "0.647879", "0.6478364", "0.6477308", "0.6476999", "0.6476755", "0.6474393", "0.647254", "0.6472413", "0.6472413", "0.6470085", "0.6468616", "0.64653814", "0.6465356", "0.64652264", "0.64647406", "0.64631826" ]
0.0
-1
Checking User in Joining the table with enough balance.
public SNGTestCases PlayerJoin_TC1007() throws InterruptedException{ String flavour = "Electrical"; try{ waitForVisibilityOf(By.id("com.pointedsquares.gamy5.android:id/debug_cancel")); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/debug_cancel")).click(); }catch(Exception ex){ } try{ waitForElement(By.xpath("//android.widget.TextView[contains(@text , 'Academics') and contains(@resource-id , 'itemTitle')]") , 40); }catch(Exception ex){ driver.scrollTo("Academics"); } driver.findElement(By.xpath("//android.widget.TextView[contains(@text , 'Academics') and contains(@resource-id , 'itemTitle')]/following-sibling::android.widget.TextView[contains(@text , 'More')]")).click(); waitForElement(By.id("com.pointedsquares.gamy5.android:id/search_all"), 10); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/search_all")).click(); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/search_all")).sendKeys(flavour); driver.findElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'flavour_name_list') and contains(@text , 'Electrical Engineering')]")).click(); driver.findElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'stake_amount') and contains(@text , '500')]")).click(); waitForElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'message_text') and contains(@text , 'You are about to play Electrical Engineering game with 500 coins stake.')]"), 5); driver.findElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'message_text') and contains(@text , 'You are about to play Electrical Engineering game with 500 coins stake.')]")).click(); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/positive_button")).click(); waitForVisibilityOf(By.xpath("//android.widget.TextView[contains(@resource-id , 'response') and contains(@text , 'Finding room for you...')]")); return new SNGTestCases(driver); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void checkBalance()\n\t{\n\t\tList<Account> accounts = Main.aDao.getAllAccounts(this.loggedIn.getUserId());\n\t\tdouble accountsTotal = 0;\n\t\t\n\t\tfor(Account a : accounts)\n\t\t{\n\t\t\taccountsTotal += a.getBalance();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Total funds available across all accounts:\\n\" + accountsTotal);\n\t}", "@Transactional(readOnly = true)\n public boolean checkAvailableBalance(Long accountId, Double amount) {\n return getAccountBalance(accountId) < amount;\n }", "Boolean checkAccountHasSufficientBalance(PrintWriter out, Account from, Double amount);", "private static Boolean doWithdrawCheck(\n Account fromAccount,\n Integer toAccountId,\n Integer userId,\n Integer amount,\n Transaction.TransactionType type\n ) {\n // Check that there is enough money\n switch (fromAccount.type) {\n case Credit:\n if (fromAccount.balance - amount < MAX_CREADIT) {\n return false;\n }\n break;\n default:\n if (fromAccount.balance - amount < 0) {\n return false;\n }\n break;\n }\n\n // Check that account type can be used for action\n switch (type) {\n case Transfer:\n if (fromAccount.type == AccountType.Savings) {\n return userOwnsDestination(fromAccount, toAccountId, userId);\n }\n break;\n case Payment:\n if (fromAccount.type == AccountType.Savings) {\n return false;\n }\n break;\n default:\n return true;\n }\n return true;\n }", "protected static Boolean withdrawCanBeMade(\n Account fromAccount,\n Integer toAccountId,\n Integer userId,\n Integer amount,\n Transaction.TransactionType type\n ) {\n return doWithdrawCheck(fromAccount, toAccountId, userId, amount, type);\n }", "private void userHasBooking() throws SQLException {\n BookingModel bookingModel2 = new BookingModel();\n if (bookingModel2.checkUserBooking(employeeID)) {\n hasBooking = true;\n } else {\n hasBooking = false;\n }\n\n }", "public void withdraw(double amount) throws InsufficientFundsException {\n if (amount <= balance) {\n balance -= amount;\n \n try {\n \n Class.forName(\"net.ucanaccess.jdbc.UcanaccessDriver\");\n \n // Load Driver\n String connURL=\"jdbc:ucanaccess://c:/Users/Ellen/Documents/CIST2373/ChattBankMDB.mdb\";\n \n // Get Connection\n Connection con = DriverManager.getConnection(connURL);\n \n // Create Statement\n Statement stmt = con.createStatement();\n \n // Create sql string \n String sql = \"Update Accounts set Balance = \"+getBalance()+ \n \" where AcctNo= '\"+getAcctNo()+\"'\";\n \n // Check for properly formed sql\n System.out.println(sql);\n \n // Execute Statement\n int n = stmt.executeUpdate(sql);\n if (n == 1)\n System.out.println(\"Update was successful!\");\n else\n System.out.println(\"Update failed!\"); \n \n // Close Connection\n con.close(); \n } //end try\n \n catch (Exception err) {\n System.out.println(\"Error: \" + err);\n } //end catch\n } //end if\n else {\n throw new InsufficientFundsException(amount);\n } //end else\n }", "private static double checkUserBalance(User user, Document doc, Printer printer) {\n\t\t\n\t\tdouble balance = user.getBalance().doubleValue();\n\t\tint pagesToPrint = printer.numPagesToPrint(doc).intValue();\n\t\t\n\t\tchar format = doc.getPageFormat();\n\t\tchar toner = doc.getPageToner();\n\n\t\tdouble pricing = 0.0;\n\n\t\t// Get printer pricing\n\t\tif(format == '4' && toner == 'B') {\n\t\t\tpricing = printer.getPrinterPricing().getPriceA4Black().doubleValue();\n\t\t} else if(format == '4' && toner == 'C') {\n\t\t\tpricing = printer.getPrinterPricing().getPriceA4Color().doubleValue();\n\t\t} else if(format == '3' && toner == 'B') {\n\t\t\tpricing = printer.getPrinterPricing().getPriceA3Black().doubleValue();\n\t\t} else if(format == '3' && toner == 'C') {\n\t\t\tpricing = printer.getPrinterPricing().getPriceA3Color().doubleValue();\n\t\t}\n\t\t\n\t\t// Calc total cost\n\t\tdouble totalCost = pricing * pagesToPrint;\n\t\t\n\t\tif(balance >= totalCost) return 0;\n\t\telse return totalCost;\n\t}", "@Override\r\n\tpublic boolean withdraw(double amount) {\n\t\ttry {\r\n\t\t\tif (accountStatus.equals(AccountStatus.ACTIVE)) {\r\n\t\t\t\tif (balance > amount) {\r\n\t\t\t\t\tbalance = (float) (balance - amount);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow new InsufficientBalanceException(\"You'er Balance is insufficient to make this transation !\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\telse {\r\n\t\t\t\tthrow new AccountInactiveException(\"You'er Account is not Active !\");\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean isBalanced ();", "boolean hasLedger();", "private void doCheckBalance() {\n while (true){\n try{\n Account userAccount = ui.readAccount(currentUser.getAccounts());\n ui.displayMessage(\"Balance: \" + userAccount.getBalance());\n break;\n } catch (Exception e){\n ui.displayError(\"Please enter a valid number.\");\n }\n }\n\n }", "@Override\n public boolean withdrawAmount(TransactionDTO transaction) {\n CustomerDetails customerDetails=this.viewAccount(transaction.getUserName()); \n if(customerDetails.getAccountBalance()>=transaction.getAmount()){\n customerDetails.setAccountBalance(customerDetails.getAccountBalance()-transaction.getAmount());\n customerRepository.save(customerDetails);\n return true;\n }\n else{\n return false;\n }\n }", "public boolean transfer(int fromId, int toId, double amount) {\n boolean result;\n synchronized (this.base) {\n User from = this.base.get(fromId);\n User to = this.base.get(toId);\n if (result = from != null && to != null) {\n if (result = amount > 0 && from.getAmount() >= amount) {\n synchronized (this.base) {\n this.base.put(fromId, new User(fromId, from.getAmount() - amount));\n this.base.put(toId, new User(toId, to.getAmount() + amount));\n }\n }\n }\n }\n return result;\n }", "public void withdraw(String accountNumber, int amount) {\n\t\tConnection conn;\n\t\tPreparedStatement ps, pp, ll;\n\t\tString url = \"jdbc:mysql://localhost:3306/mars\";\n\t\tString username = \"root\";\n\t\tString password = \"1113\";\n\t\tint lastBalance;\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\ttry{\n\t\tconn=DriverManager.getConnection(url, username, password);\n\t\tString sql = \"select balance,userId from \"+this.name+\" where accountNumber=?\";\n\t\tps= (PreparedStatement) conn.prepareStatement(sql);\n\t\tps.setString(1, accountNumber.toString());\n\t\tResultSet rs = ps.executeQuery();\n\t\tint nowBalance = 0;\n\t\tString id = \"\";\n\t\twhile(rs.next()) { \n\t\t\tnowBalance=rs.getInt(\"balance\");\n\t\t\tid = rs.getString(\"userId\");\n\t\t}\n\t\tif (nowBalance<amount) {\n\t\t\tSystem.out.println(\"No Balance\");\n\t\t\treturn;\n\t\t}\n\t\tlastBalance = nowBalance - amount;\n\t\t//System.out.println(lastBalance);\n\t\t\n\t\tString sql1 = \"UPDATE \"+this.name+\" SET balance=? where accountNumber=?\";\n\t\tpp = (PreparedStatement) conn.prepareStatement(sql1);\n\t\tpp.setInt(1, lastBalance);\n\t\tpp.setString(2, accountNumber.toString());\n\t\tpp.executeUpdate();\n\t\t\n\t\tString logs = \"withdraw : \"+ amount+\" / balance: \"+String.valueOf(lastBalance);\n\t\tString sql11 = \"insert into \"+id+\" (log) values (?)\";\n\t\tll = (PreparedStatement) conn.prepareStatement(sql11);\n\t\tll.setString(1, logs);\n\t\tll.executeUpdate();\n\t\tSystem.out.println(\"Ypu got $\"+String.valueOf(amount));\n\t\t\n\t\t}catch (SQLException e) {\n\t\t throw new IllegalStateException(\"Cannot connect the database!\", e);\n\t\t}\n\t\t\n\t}", "public abstract boolean isBalanced();", "@Test\n public void testImpossible2TransferMoney() {\n Bank bank = new Bank();\n User user = new User(\"Petr\", \"0000 000000\");\n AccountOfUser acc = new AccountOfUser(0, \"0000 0000 0000 0001\");\n bank.addUser(user);\n bank.addAccountToUser(user.getPassport(), acc);\n assertThat(bank.transferMoney(user.getPassport(), \"0000 0000 0000 0000\", user.getPassport(), acc.getRequisites(), 100), is(false));\n }", "private void withdraw() {\n userInput = 0;\n while (userInput <= 0) {\n System.out.printf(\"Din nuværende balance er: %.2f DKK\\n\" +\n \"Indtast ønsket beløb at hæve: \", balanceConverted);\n\n textMenuKey(false, \"\");\n\n if (userInput <= 0) {\n System.out.println(\"Indtast et gyldigt beløb\");\n }\n }\n\n if ((userInput * 100) <= balance) {\n moneyController(-userInput);\n mysql.transactionUpdate(customerNumber, customerName, balance, userInput, \"Withdraw\");\n } else {\n System.out.println(\"Utilstrækkelig balance på kontien\");\n }\n }", "public boolean checkBalance() {\n checkBalanceHelper(root);\n if (unbalanced == null) {\n return true;\n } else {\n return false;\n }\n }", "public boolean makeTransfer(String fromAccountNumber,\r\n\t\t\tString toAccountNumber, double amount, String memo) {\r\n\t\tif (DaoUtility.isAccountNumberValid(fromAccountNumber)\r\n\t\t\t\t&& DaoUtility.isAccountNumberValid(toAccountNumber)) {\r\n\t\t} else\r\n\t\t\treturn false;\r\n\r\n\t\t// do transaction\r\n\t\tConnection conn = dbConnector.getConnection();\r\n\t\tif (conn==null)\r\n\t\t\treturn false;\r\n\t\t\r\n\t\tPreparedStatement st;\r\n\t\tString sql;\r\n\t\tResultSet rs;\r\n\r\n\t\ttry {\r\n\t\t\tconn.setAutoCommit(false);\r\n\t\t\tSavepoint savepnt = conn.setSavepoint();\r\n\r\n\t\t\ttry {\r\n\t\t\t\tint fromAccountId=0;\r\n\t\t\t\tint toAccountId=0;\r\n\t\t\t\tString fromName=\"SECRET USER\";\r\n\t\t\t\tString toName=\"SECRET USER\";\r\n\t\t\t\tString fname,mname,lname;\r\n\t\t\t\t\r\n\t\t\t\tst = conn.prepareStatement(\"select tbAccount.aid,balance,isactive,\"\r\n\t\t\t\t\t\t+ \"fname,mname,lname from tbAccount, tbClient \"\r\n\t\t\t\t\t\t+ \" where acnumber= ? and tbAccount.cid=tbClient.cid\");\r\n\t\t\t\tst.setString(1, fromAccountNumber);\r\n\t\t\t\trs = st.executeQuery();\r\n\t\t\t\tif (rs.next()){\r\n\t\t\t\t\tfromAccountId = rs.getInt(\"aid\");\r\n\t\t\t\t\tdouble balance = rs.getDouble(\"balance\");\r\n\t\t\t\t\tboolean isactive = rs.getBoolean(\"isactive\");\r\n\t\t\t\t\tfname = rs.getString(\"fname\");\r\n\t\t\t\t\tmname = rs.getString(\"mname\");\r\n\t\t\t\t\tlname = rs.getString(\"lname\");\r\n\t\t\t\t\tfromName = fname + \" \" + (mname==null?\"\":mname) + \" \" +lname;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (balance<amount || !isactive) { //not enough money or frozen\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tst = conn.prepareStatement(\"select aid,isactive,\"\r\n\t\t\t\t\t\t+ \" fname,mname,lname from tbAccount,tbClient \"\r\n\t\t\t\t\t\t+ \" where acnumber= ? and tbAccount.cid=tbClient.cid\");\r\n\t\t\t\tst.setString(1, toAccountNumber);\r\n\t\t\t\trs = st.executeQuery();\r\n\t\t\t\tif (rs.next()){\r\n\t\t\t\t\ttoAccountId = rs.getInt(\"aid\");\r\n\t\t\t\t\tboolean isactive = rs.getBoolean(\"isactive\");\r\n\t\t\t\t\tfname = rs.getString(\"fname\");\r\n\t\t\t\t\tmname = rs.getString(\"mname\");\r\n\t\t\t\t\tlname = rs.getString(\"lname\");\r\n\t\t\t\t\ttoName = fname + \" \" + (mname==null?\"\":mname) + \" \" +lname;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (!isactive) { //frozen\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// substract balance of fromAccount\r\n\t\t\t\tst = conn.prepareStatement(\r\n\t\t\t\t\t\t\"update tbAccount set balance = balance - ? \"\r\n\t\t\t\t\t\t\t\t+ \" where balance >= ? \"\r\n\t\t\t\t\t\t\t\t+ \" and acnumber = ? \"\r\n\t\t\t\t\t\t\t\t+ \" and isactive=TRUE \");\r\n\t\t\t\tst.setDouble(1, amount);\r\n\t\t\t\tst.setDouble(2, amount);\r\n\t\t\t\tst.setString(3, fromAccountNumber);\r\n\t\t\t\tint nRs = st.executeUpdate();\r\n\t\t\t\tif (nRs <= 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tconn.rollback(savepnt);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// add balance of toAccount\r\n\t\t\t\tst = conn.prepareStatement(\r\n\t\t\t\t\t\t\"update tbAccount set balance = balance + ? \"\r\n\t\t\t\t\t\t\t\t+ \" where acnumber = ? \"\r\n\t\t\t\t\t\t\t\t+ \" and isactive=TRUE \");\r\n\t\t\t\tst.setDouble(1, amount);\r\n\t\t\t\tst.setString(2, toAccountNumber);\r\n\t\t\t\tnRs = st.executeUpdate();\r\n\t\t\t\tif (nRs <= 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tconn.rollback(savepnt);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// insert 2 transaction record\r\n\t\t\t\t// insert into tbTransaction(aid, trtype, amount, description)\r\n\t\t\t\t// values( select aid from tbAccount where acnumber='acnumber',\r\n\t\t\t\t// DEPOSIT_TRANSACTION_TYPE_ID,\r\n\t\t\t\t// amount, 'transfer 123.4 dollars to 3333343 on 2014-09-19')\r\n\t\t\t\t//\r\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\t\t\tjava.util.Date date = new java.util.Date();\r\n\t\t\t\tString currentDate = dateFormat.format(date); // 2014-08-06\r\n\r\n\t\t\t\tsql = String.format(\r\n\t\t\t\t\t\t\"insert into tbTransaction(aid,trtype,amount,description) \"\r\n\t\t\t\t\t\t\t\t+ \" values( %d, \" + \"\t\t\t%d, \"\r\n\t\t\t\t\t\t\t\t+ \"\t\t\t%f, 'Transfer out %.2f dollars to %s(%s) on %s. MEMO: %s' ) \", \r\n\t\t\t\t\t\t\t\tfromAccountId,\r\n\t\t\t\t\tTRANSFER_OUT_TRANSACTION_TYPE_ID, amount, amount,\r\n\t\t\t\t\ttoAccountNumber, toName, currentDate,memo);\r\n\t\t\t\tnRs = st.executeUpdate(sql);\r\n\t\t\t\tif (nRs<=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tconn.rollback(savepnt);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsql = String.format(\r\n\t\t\t\t\t\t\"insert into tbTransaction(aid,trtype,amount,description) \"\r\n\t\t\t\t\t\t\t\t+ \" values( %d, \" + \" %d, \"\r\n\t\t\t\t\t\t\t\t+ \"\t%f, 'Transfer in %.2f dollars from %s(%s) on %s. MEMO: %s' ) \", \r\n\t\t\t\t\t\t\t\ttoAccountId,\r\n\t\t\t\t\tTRANSFER_IN_TRANSACTION_TYPE_ID, amount, amount,\r\n\t\t\t\t\tfromAccountNumber, fromName, currentDate,memo);\r\n\t\t\t\tnRs = st.executeUpdate(sql);\r\n\t\t\t\tif (nRs<=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tconn.rollback(savepnt);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn true;\r\n\t\t\t\t\r\n\t\t\t} catch (Exception ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t\tconn.rollback(savepnt);\r\n\t\t\t} finally {\r\n\t\t\t\tconn.setAutoCommit(true);\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (conn != null)\r\n\t\t\t\t\tconn.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "public double checkBalanceSavings(long socialSecurityNumber, String userName, String password) throws AuthenticationException,UnauthorizedActionException{\r\n if(security(socialSecurityNumber, userName, password)){\r\n throw new AuthenticationException();\r\n }\r\n if(getPatron(socialSecurityNumber).getSavingsAccount() == null){\r\n throw new UnauthorizedActionException();\r\n }\r\n return getPatron(socialSecurityNumber).getSavingsAccount().getAvailableBalance();\r\n }", "@Test\n public void testImpossible1TransferMoney() {\n Bank bank = new Bank();\n User user = new User(\"Petr\", \"0000 000000\");\n AccountOfUser acc = new AccountOfUser(0, \"0000 0000 0000 0000\");\n AccountOfUser acc2 = new AccountOfUser(0, \"0000 0000 0000 0001\");\n bank.addUser(user);\n bank.addAccountToUser(user.getPassport(), acc);\n bank.addAccountToUser(user.getPassport(), acc2);\n assertThat(bank.transferMoney(user.getPassport(), acc.getRequisites(), user.getPassport(), acc2.getRequisites(), 100), is(false));\n }", "public boolean isOverdrawn() {\n return balance < 0;\n }", "private void validateBalance(Double fromBalance, Double transferAmount) throws PaymentsException {\n\t\tif ((fromBalance - transferAmount) <= 0) {\n\t\t\tlogger.error(\"Not enough balance.\");\n\t\t\tthrow new PaymentsException(\" Not enough funds. \");\n\t\t\t\n\t\t}\n\t}", "@Override\r\n\tpublic void updateBalance( Integer userid, double amount) {\n\t\tif ( getBalance( userid) < amount) {\r\n\t\t\tthrow new RuntimeException( \"用户余额不足!\");\r\n\t\t}\r\n\t\tString sql = \"UPDATE buyers SET balance = balance - ? WHERE id = ?;\";\r\n\t\tjdbcTemplate.update( sql, amount, userid);\r\n\t}", "boolean hasAccountBudget();", "public String transaction_pay(int reservationId) {\r\n\t\ttry {\r\n\t\t\tif (username == null){\r\n\t\t\t\treturn \"Cannot pay, not logged in\\n\";\r\n\t\t\t}\r\n\t\t\tbeginTransaction();\r\n\t\t\t\r\n\t\t\t//query for the user balance \r\n\t\t\tcheckBalanceStatement.clearParameters();\r\n\t\t\tcheckBalanceStatement.setString(1, username);\r\n\t\t\tResultSet b = checkBalanceStatement.executeQuery();\r\n\t\t\tb.next();\r\n\t\t\tint user_balance = b.getInt(\"balance\");\r\n\t\t\t\r\n\t\t\t//get the price of the first flight\r\n\t\t\tunpaidReservationStatement.clearParameters();\r\n\t\t\tunpaidReservationStatement.setString(1, username);\r\n\t\t\tunpaidReservationStatement.setInt(2, reservationId);\r\n\t\t\tResultSet unpaid = unpaidReservationStatement.executeQuery();\r\n\t\t\t\r\n\t\t\tint total_price = 0;\r\n\t\t\tif (!unpaid.next()){\r\n\t\t\t\trollbackTransaction();\r\n\t\t\t\treturn \"Cannot find unpaid reservation \"+reservationId+\" under user: \"+username+\"\\n\";\r\n\t\t\t} else {\r\n\t\t\t\t//unpaid.next() ?? maybe not sure\r\n\r\n\t\t\t\tint fid1 = unpaid.getInt(\"fid1\");\r\n\t\t\t\tint fid2 = unpaid.getInt(\"fid2\");\r\n\t\t\t\tcheckPriceStatement.clearParameters();\r\n\t\t\t\tcheckPriceStatement.setInt(1, fid1);\r\n\t\t\t\tResultSet p1 = checkPriceStatement.executeQuery();\r\n\t\t\t\tp1.next();\r\n\t\t\t\ttotal_price += p1.getInt(\"price\");\r\n\t\t\t\tp1.close();\r\n\t\t\t\t\r\n\t\t\t\t//unpaidReservationStatement2.clearParameters();\r\n\t\t\t\t//unpaidReservationStatement2.setString(1, username);\r\n\t\t\t\t//unpaidReservationStatement2.setInt(2, reservationId);\r\n\t\t\t\t//ResultSet second = unpaidReservationStatement2.executeQuery();\r\n\t\t\t\tif (fid2 != 0){\r\n\t\t\t\t\t//second fid is not null\r\n\t\t\t\t\tcheckPriceStatement.clearParameters();\r\n\t\t\t\t\tcheckPriceStatement.setInt(1, fid2);\r\n\t\t\t\t\tResultSet p2 = checkPriceStatement.executeQuery();\r\n\t\t\t\t\tp2.next();\r\n\t\t\t\t\ttotal_price += p2.getInt(\"price\");\r\n\t\t\t\t\tp2.close();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (total_price > user_balance){\r\n\t\t\t\t\trollbackTransaction();\r\n\t\t\t\t\treturn \"User has only \"+user_balance+\" in account but itinerary costs \"+total_price+\"\\n\";\r\n\t\t\t\t} else {\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tupdatePaidStatement.clearParameters();\r\n\t\t\t\t\tupdatePaidStatement.setString(1, \"true\");\r\n\t\t\t\t\tupdatePaidStatement.setInt(2, reservationId);\r\n\t\t\t\t\tupdatePaidStatement.executeUpdate();\r\n\t\t\t\t\t\r\n\t\t\t\t\tupdateBalanceStatement.clearParameters();\r\n\t\t\t\t\tupdateBalanceStatement.setInt(1, (user_balance-total_price));\r\n\t\t\t\t\tupdateBalanceStatement.setString(2, username);\r\n\t\t\t\t\tupdateBalanceStatement.executeUpdate();\r\n\t\t\t\t\t\r\n\t\t\t\t\tcommitTransaction();\r\n\t\t\t\t\treturn \"Paid reservation: \"+reservationId+\" remaining balance: \"+(user_balance-total_price)+\"\\n\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (SQLException e){\r\n\t\t\te.printStackTrace();\r\n\t\t\t//rollbackTransaction();\r\n\t\t\treturn \"Failed to pay for reservation \" + reservationId + \"\\n\";\r\n\t\t}\r\n }", "boolean check(double amount) {\n\t\treturn (balance >= amount);\n\t}", "public boolean canWithdraw(double withdrawalAmount){\n double potentialAmountOwed = withdrawalAmount + Math.abs(super.getCurrentBalance());\n if(potentialAmountOwed < creditLine) return true;\n \n return false;\n }", "@Test\n public void testValidApplyWithBlockedUser() {\n with().parameters(\"loanAmount\", \"10\", \"term\", \"12 month\", \"name\", \"kung-fu\", \"surname\", \"panda\", \"personalId\", \"kung-fu-666-panda\").expect().body(\"passed\", equalTo(false), \"errors.size()\", is(1)).when().post(\"/apply\");\n //No additional user created, we have one from fixture sql\n assertEquals(1, userDataRepository.count());\n }", "public ResultSet retBalance(Long userid) throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"Select balance from account where accno=\"+userid+\"\");\r\n\treturn rs;\r\n}", "private void doWithdrawal() {\n while(true){\n try{\n Account userAccount = ui.readAccount(currentUser.getAccounts());\n int amountWithdrawn = ui.readWithdrawalAmount();\n\n if(userAccount.debit(amountWithdrawn)){\n ui.displayNewBalance(userAccount);\n break;\n\n } else {\n ui.displayError(\"You do not have enough money in this account to withdraw \" + amountWithdrawn);\n }\n }catch(Exception e){\n ui.displayError(\"Please enter a valid number.\");\n }\n }\n\n }", "public void acctCheck(User user) {\n\t\tif (user.getExec() == 0)\n\t\t\tLogging.logger.info(\"User \" + user.getuName() + \" has logged in\");\n\t\telse\n\t\t\tLogging.logger.info(\"Employee \" + user.getuName() + \" has logged in\");\n\t\tList<Account> accounts = udao.viewAcct(user);\n\n\t\tfor (int i = 0; i != 60; i++) {\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println(\"Welcome \" + user.getfName() + \" \" + user.getlName() + \"\\n\");\n\n\t\t// If the user has no account, tell them to go find a staff member\n\t\tif (accounts.isEmpty() && user.getExec() == 0) {\n\n\t\t\tLogging.logger.info(user.getuName() + \" has no active accounts\");\n\t\t\tSystem.out.println(\"You currently have no accounts with our bank. \\n \"\n\t\t\t\t\t+ \"Please see one of our representitives to open a new account.\");\n\t\t\ttry {\n\t\t\t\tThread.sleep(6000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\t// Otherwise, lets do business\n\t\t} else {\n\t\t\tAccounting act = new Accounting(user);\n\t\t\ttry {\n\t\t\t\tact.accounting(accounts);\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "InsufficientFunds(Account a) {\n balance = a.currentBalance();\n }", "public boolean isBenefitAvailableFor(Account account, Dining dining);", "@Test\n public void hasInjuredUnitJoiningUser() {\n assertEquals(0, dao.getUnitsWithTypeJoiningUser().size());\n assertFalse(cache.hasInjuredUnitJoiningUser());\n\n // Create a peasant and two soldiers joining the user.\n RoosterDaoUtil.creditUnit(dao, GameConfig.PEASANT_ID, 1, null);\n RoosterDaoUtil.creditUnit(dao, SOLDIER_UNIT_TYPE_ID, 2, null);\n\n // Create unrelated units at buildings.\n RoosterDaoUtil.creditUnit(dao, GameConfig.PEASANT_ID, 3, wheatFieldId);\n RoosterDaoUtil.creditUnit(dao, SOLDIER_UNIT_TYPE_ID, 4, wheatFieldId);\n\n // Test code.\n resetDataCache();\n assertFalse(cache.hasInjuredUnitJoiningUser());\n\n // Injure a unit.\n List<UnitWithType> unitsWithType = dao.getUnitsWithTypeJoiningUser();\n Unit unit = unitsWithType.get(0).getUnit();\n unit.setHealth(1);\n dao.update(unit);\n\n // Test code.\n assertFalse(cache.hasInjuredUnitJoiningUser()); // Ensure cache is accessed.\n resetDataCache();\n assertTrue(cache.hasInjuredUnitJoiningUser());\n }", "public void checkBanStatus() {\n if(getBanned() != null && getBanned().after(getLast_join())) {\n Date today = new Date();\n Date banDate = getBanned();\n String timeLeft = ClymeSkyblockCore.getInstance().getTimeUtil().getTimeDifference(banDate, today);\n\n Bukkit.getScheduler().runTask(ClymeSkyblockCore.getInstance(), () -> {\n getPlayer().kickPlayer(\" \\n\" +\n ClymeSkyblockCore.getInstance().getClymeMessage().getRawPrefix() + \"\\n\" +\n \" \\n\" +\n \" \\n\" +\n \"§cYou are banned from the Server!\\n\" +\n \" \\n\" +\n \"§f§lReason: §7\" + getBanReason() + \"\\n\" +\n \"§f§lTime left: §7\" + timeLeft + \"\\n\" +\n \"\\n\\n\" +\n \"§c§oIf you think you have been wrongly punished,\\n\" +\n \"please contact our support team!\\n\" +\n \"§c§oor purchase a ban evasion in our store: §fshop.clyme.games§c§o!\" +\n \"\\n\");\n\n Bukkit.getConsoleSender().sendMessage(\"[ClymeGames] §4Player \" + getUsername() + \" tried to join but is banned!\");\n });\n }\n }", "private TransferPointRequest isAccountLinked(TransferPointRequest transferPointRequest) {\n Customer fromCustomer = transferPointRequest.getFromCustomer();\n\n //check whether the customer is linked\n List<LinkedLoyalty> linkedLoyalties = linkedLoyaltyService.getAllLinkedAccounts(fromCustomer.getCusCustomerNo());\n\n //if account is not linked , set account linked as false\n if(linkedLoyalties == null || linkedLoyalties.size() == 0){\n\n transferPointRequest.setAccountLinked(false);\n\n } else {\n\n //if linked , get the primary customer info\n transferPointRequest = isCustomerPrimary(linkedLoyalties,transferPointRequest);\n\n //set accountLinked as true\n transferPointRequest.setAccountLinked(true);\n }\n\n return transferPointRequest;\n }", "void checkBalance() {\n\t\tSystem.out.println(\"Account balance: \" + balance);\n\t}", "public Boolean canBorrowBook() {\n\t\tif (loans.size() >= getLoanLimit()) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean transferMoney(Account fromAcct, Account toAcct, DollarAmount amount,\n long timeout, TimeUnit unit)\n throws DollarAmount.InsufficientFundsException, InterruptedException {\n long stopTime = System.nanoTime() + unit.toNanos(timeout);\n\n for (; ; ) {\n if (fromAcct.lock.tryLock()) {\n try {\n if (toAcct.lock.tryLock()) {\n try {\n if (fromAcct.getBalance().compareTo(amount) < 0) {\n throw new DollarAmount.InsufficientFundsException();\n } else {\n fromAcct.debit(amount);\n toAcct.credit(amount);\n return true;\n }\n } finally {\n toAcct.lock.unlock();\n }\n }\n } finally {\n fromAcct.lock.unlock();\n }\n }\n\n if (System.nanoTime() > stopTime)\n return false;\n\n// TimeUnit.NANOSECONDS.sleep(fixedDelay + rnd.nextLong() % randMod);\n }\n }", "@Test\n public void test_total_balance2() {\n assertEquals(1200, ao2.totalBalanceOfAccountsOwned(), EPS);\n }", "private boolean isValidTransaction(double remainingCreditLimit, double transactionAmount){\n return transactionAmount <= remainingCreditLimit;\n }", "public boolean isCustomersLinked(Customer fromAccount, Customer toAccount) {\n\n // Get the LinkedLoyalty for the fromAccount\n LinkedLoyalty fromLinkedLoyalty = accountBundlingUtils.getCustomerLinkedLoyalty(fromAccount.getCusMerchantNo(),fromAccount.getCusLoyaltyId());\n\n // Get the LinkedLoyalty for the toAccount\n LinkedLoyalty toLinkedLoyalty = accountBundlingUtils.getCustomerLinkedLoyalty(toAccount.getCusMerchantNo(),toAccount.getCusLoyaltyId());\n\n\n\n // If both linked loyaltys are null, none of them are child\n if ( fromLinkedLoyalty == null && toLinkedLoyalty == null ){\n\n return false;\n\n }\n\n\n // If both of thme are not null , then check if they have a common parent\n if ( fromLinkedLoyalty != null && toLinkedLoyalty != null ) {\n\n // Check if the parents for the linked loyalties are different\n if ( fromLinkedLoyalty.getLilParentCustomerNo().longValue() == toLinkedLoyalty.getLilParentCustomerNo().longValue() ) {\n\n // Log the information\n log.info(\"transferPoints -> isCustomersLinked -> From and two accounts are linked and having same parent\");\n\n // return true\n return true;\n\n }\n\n }\n\n\n\n // If the fromLinkedLoyalty is not null, then kk if toACcount is parent\n if ( fromLinkedLoyalty != null ) {\n\n // Check if the from account's parent is toAccount\n if ( fromLinkedLoyalty.getLilParentCustomerNo().longValue() == toAccount.getCusCustomerNo().longValue() ) {\n\n // Log the information\n log.info(\"transferPoints -> isCustomersLinked -> To account is parent of from account\");\n\n // return true\n return true;\n\n\n }\n\n }\n\n\n\n // If toLinkedLoyalty is not null, then check if the fromAccount is parent\n if ( toLinkedLoyalty != null ) {\n\n // Check if the fromAccount is parent for toAccount\n if ( toLinkedLoyalty.getLilParentCustomerNo().longValue() == fromAccount.getCusCustomerNo().longValue() ) {\n\n // Log the information\n log.info(\"transferPoints -> isCustomersLinked -> From account is parent of to account\");\n\n // return true\n return true;\n\n }\n\n }\n\n\n\n // Finally return false indicating that they are not linked\n return false;\n\n }", "public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}", "public boolean hasUser(){\n return numUser < MAX_USER;\n }", "public int balance(String accountNumber, String userId) {\n\t\tConnection conn;\n\t\tPreparedStatement ps, pp;\n\t\tString url = \"jdbc:mysql://localhost:3306/mars\";\n\t\tString username = \"root\";\n\t\tString password = \"1113\";\n\t\t\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\ttry{\n\t\t\t//connect to database\n\t\t\tconn=DriverManager.getConnection(url, username, password);\n\t\t\tString sql = \"select balance from \"+this.name+\" where accountNumber=?\";\n\t\t\tps= (PreparedStatement) conn.prepareStatement(sql);\n\t\t\tps.setString(1, accountNumber.toString());\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\tint nowBalance = 0;\n\t\t\twhile(rs.next()) { \n\t\t\t\tnowBalance=rs.getInt(\"balance\");\n\t\t\t}\n\t\t\t\n\t\t\tString logs = \"Checked balance: \"+String.valueOf(nowBalance);\n\t\t\tString sql1 = \"insert into \"+userId+\" (log) values (?)\";\n\t\t\tpp = (PreparedStatement) conn.prepareStatement(sql1);\n\t\t\tpp.setString(1, logs);\n\t\t\tpp.executeUpdate();\n\t\t\t\n\t\t\treturn nowBalance;\n\t\t} catch (SQLException e) {\n\t\t throw new IllegalStateException(\"Cannot connect the database!\", e);\n\t\t}\n\t\t\n\t}", "@Override\n public void transferLockingAccounts(int fromId, int toId, long amount) throws InsufficientFundsException {\n Account fromAcct = accountMap.get(fromId);\n Account toAcct = accountMap.get(toId);\n Account lock1, lock2;\n\n if(fromAcct.getId() < toAcct.getId()){\n lock1 = fromAcct;\n lock2 = toAcct;\n } else {\n lock1 = toAcct;\n lock2 = fromAcct;\n }\n\n synchronized (lock1){\n synchronized (lock2){\n fromAcct.withdraw(amount);\n toAcct.deposit(amount);\n }\n }\n }", "protected boolean ensureBalance(BigInteger value)\n {\n String account = appContext.getSettingProvider().getSelectedAccount();\n\n BigInteger balance = appContext.getServiceProvider().getAccountService().getAccountBalance(account).get();\n if(balance == null)\n {\n appContext.getMessageService().showErrorMessage(\"Cannot reach the exchange service. Try again later.\");\n return false;\n }\n\n if(balance.compareTo(value) < 0)\n {\n appContext.getMessageService().showErrorMessage(\"You need at least \" + value.toString() + \" wei to do that!\");\n return false;\n }\n\n return true;\n }", "@Override\n public boolean test(User user) {\n return user.getPoints() > 160;\n }", "public boolean isOverdrawn() {\n return this.getBalance().compareTo(new BigDecimal(\"0\")) < 0;\n }", "@Override\n\tpublic boolean hasAvailability(String userId) throws ASException {\n\t\tUser user = userDao.get(userId, true);\n\t\t\n\t\t// No messaging enabled means no coupons received\n\t\tif( !user.getGeoFenceEnabled() || !user.getReceivePushMessages() ) \n\t\t\treturn false;\n\t\t\n\t\t// if has an active lock, means false\n\t\tif( dmlDao.hasActiveLocks(userId, new Date()))\n\t\t\treturn false;\n\t\t\n\t\t// No surprises till now... means it's OK\n\t\treturn true;\n\t}", "boolean shouldRebalance() {\n if (ThreadLocalRandom.current().nextInt(100) > REBALANCE_PROB_PERC) {\n return false;\n }\n\n // if another thread already runs rebalance -- skip it\n if (!isEngaged(null)) {\n return false;\n }\n int numOfEntries = entryIndex.get() / FIELDS;\n int numOfItems = statistics.getCompactedCount();\n int sortedCount = this.sortedCount.get();\n // Reasons for executing a rebalance:\n // 1. There are no sorted keys and the total number of entries is above a certain threshold.\n // 2. There are sorted keys, but the total number of unsorted keys is too big.\n // 3. Out of the occupied entries, there are not enough actual items.\n return (sortedCount == 0 && numOfEntries * MAX_ENTRIES_FACTOR > maxItems) ||\n (sortedCount > 0 && (sortedCount * SORTED_REBALANCE_RATIO) < numOfEntries) ||\n (numOfEntries * MAX_IDLE_ENTRIES_FACTOR > maxItems && numOfItems * MAX_IDLE_ENTRIES_FACTOR < numOfEntries);\n }", "private boolean checkBudgetAvailability(Company company, double bonusForDevelopers) {\n\n double requiredBudget = 0;\n\n for (Employee employee : company.getEmployees()) {\n\n double employeeSalary = 0;\n\n if (employee instanceof Developer) {\n employeeSalary = ((Developer) employee).getSalary(bonusForDevelopers);\n } else {\n employeeSalary = employee.getSalary();\n }\n requiredBudget += employeeSalary;\n }\n\n return requiredBudget >= company.getBudget();\n }", "private boolean checkUser(userr user, int ID) throws Exception {\n String query = \"Select * FROM userr WHERE userName ='\" + user.getName() + \"' AND password ='\" + user.getPass() + \"'\";\n try {\n Statement stmt = con.createStatement();\n ResultSet rs = stmt.executeQuery(query);\n if (rs.next()) {\n// ArrayList<userr> listU = new ArrayList<userr>();\n int id = rs.getInt(\"id\");\n// System.out.println(id);\n clients[findClient(ID)].user.setId(id);\n// String query2 = \"SELECT userr.id,userName,password FROM userr INNER JOIN friend WHERE friend.idFriend = userr.id and friend.idUser = '\" + id + \"'\";\n// Statement stmt2 = con.createStatement();\n// ResultSet rs2 = stmt2.executeQuery(query2);\n// while(rs2.next()){\n// userr friend = new userr(rs2.getInt(\"userr.id\"), rs2.getString(\"userName\"), rs2.getString(\"password\"));\n// listU.add(friend);\n// System.out.println(\"===================\");\n// System.out.println(friend.getId());\n// System.out.println(friend.getName());\n// System.out.println(friend.getPass());\n// System.out.println(\"===================\");\n// }\n// clients[findClient(ID)].user.setListFriend(listU);\n return true;\n }\n } catch (Exception e) {\n System.out.println(\"cccc\");\n throw e;\n }\n return false;\n }", "public boolean hasAccount(String user);", "@Override\n\tpublic void transferAccount(Bank recievingBank, String recievingUser,\n\t\t\tBank payingBank, String payingUser, double amount) {\n\t\ttry {\n\t\t\tif (getAccount(payingBank, payingUser).getBalance() >= amount) {\n\t\t\tgetAccount(payingBank, payingUser).withdrawal(amount);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Not enough funds\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t}catch(NullPointerException e){\n\t\t\t\tSystem.out.println(\"User not found\");\n\t\t\t}\n\t\t\n\t\ttry {\n\t\tgetAccount(recievingBank, recievingUser).deposit(amount);\n\t\t}\n\t\tcatch(NullPointerException e) {\n\t\t\tSystem.out.println(\"User not found\");\n\t\t\tgetAccount(payingBank, payingUser).deposit(amount);\n\t\t}\n\t}", "public boolean withdraw(long id, String password, String currency, double amount);", "@Test\n public void checkingAccount2() {\n Bank bank = new Bank();\n Customer bill = new Customer(\"Bill\");\n Account checkingAccount = new CheckingAccount(bill, Account.CHECKING);\n bank.addCustomer(new Customer(\"Bill\").openAccount(checkingAccount));\n Transaction t = new CreditTransaction(1000.0);\n t.setTransactionDate(getTestDate(-5));\n checkingAccount.addTransaction(t);\n\n assertEquals(Math.pow(1 + 0.001 / 365.0, 5) * 1000 - 1000, bank.totalInterestPaid(), DOUBLE_DELTA);\n }", "Boolean accountIsActivated(Integer userId);", "private boolean isUserActivated(DUsers user) {\n return isUserWithMoreHits(user, 30);\n }", "boolean refillUserAccount(User user, double delta);", "public boolean checkIfEnough(Account account, float amount) {\n float remaining = account.getBalance() - amount;\n if (remaining >= 0) {\n return true;\n }\n return false;\n }", "protected void initUserAccount(String userServer, long userId, String userName, String balanceId) {\r\n\t\tDataCollection.remove(userServer, \"finance\", \"bill_\" + userId, new BasicDBObject());\r\n\t\tBasicDBObject oField = null;\r\n\t\tif (StringUtil.isEmpty(balanceId)) {\r\n\t\t\toField = new BasicDBObject().append(\"balance\", 0).append(\"income\", 0).append(\"withdraw\", 0).append(\"timestamp\", System.currentTimeMillis())\r\n\t\t\t\t\t.append(\"userId\", userId).append(\"userName\", userName);\r\n\t\t} else {\r\n\t\t\toField = new BasicDBObject().append(\"_id\", new ObjectId(balanceId)).append(\"balance\", 0).append(\"income\", 0).append(\"withdraw\", 0)\r\n\t\t\t\t\t.append(\"timestamp\", System.currentTimeMillis()).append(\"userId\", userId).append(\"userName\", userName);\r\n\t\t}\r\n\t\tbalanceId = DataCollection.insert(userServer, \"finance\", \"bill_\" + userId, oField).toString();\r\n\t\tDataCollection.createIndex(userServer, \"finance\", \"bill_\" + userId, \"keyIdx\", new BasicDBObject().append(\"shortId\", 1), false);\r\n\t\tString sql = \"update user set balance=0,income=0,withdraw=0,income_total=0,withdraw_total=0,sms_count=0,balance_id=? where user_id=?\";\r\n\t\tDataSet.update(Const.defaultMysqlServer, Const.defaultMysqlDB, sql, new String[] { balanceId, String.valueOf(userId) });\r\n\t}", "int withdraw(int id, int amount, int accountType) {\n int idCompare; // will contain the ID needed\n double accountBalance = 0;\n String account; // 0 = chequing, 1 = savings\n\n // If the accountType is 0, then it's a Chequing account the user wants to deposit to, if it's 1 then\n // it's savings\n account = accountType == 0 ? \"UserBalanceC\" : \"UserBalanceS\";\n\n // Look into the account number and user balance for the deposit\n String sql = \"SELECT AccountNum, \" + account + \" FROM CashiiDB2\";\n\n try {\n rs = st.executeQuery(sql);\n while (rs.next()) {\n idCompare = rs.getInt(\"AccountNum\"); // grab the id to compare with after\n\n // If the ID turns about to be the one that's needed, get the balance and add the amount needed\n if (idCompare == id) {\n accountBalance = rs.getDouble(account);\n if (accountBalance <= amount)\n return -1;\n else {\n accountBalance -= amount;\n }\n }\n }\n updateAccount(id, accountBalance, account); // update command\n } catch (java.sql.SQLException e) {\n e.printStackTrace();\n }\n\n return 1;\n }", "@Override\n public void transferLockingBank(int fromId, int toId, long amount) throws InsufficientFundsException {\n synchronized (this){\n accounts.get(fromId).withdraw(amount);\n accounts.get(toId).deposit(amount);\n }\n }", "public int hasBalance(UUID uuid, int number) {\r\n\t\tPennyGame plugin = PennyGame.getPlugin(PennyGame.class);\r\n\t\t//int previousTicketCount = getTicketCount(uuid);\r\n\t\t//number = Math.min(number, this.maxTicketCount - previousTicketCount);\r\n\t\tRegisteredServiceProvider<Economy> rsp = plugin.getServer().getServicesManager().getRegistration(Economy.class);\r\n\t\tEconomy econ = rsp.getProvider();\r\n\t\tOfflinePlayer player = Bukkit.getOfflinePlayer(uuid);\r\n\t\tdouble balance = econ.getBalance(player);\r\n\t\tnumber = (int)Math.min(number, (balance / this.ticketPrice));\r\n\t\t//number = (int)Math.min(number - (number - (balance / this.ticketPrice)), number);\r\n\t\t\r\n\t\treturn number;\t\r\n\t}", "public CheckingAccount(int id, double balance, double overdraftLimit) {\n\t\tsuper(id, balance);\n\t\tthis.overdraftLimit = overdraftLimit;\n\t}", "@Override\n public void transferLockingAccounts(int fromId, int toId, long amount) throws InsufficientFundsException {\n Account fromAccount = accounts.get(fromId);\n Account toAccount = accounts.get(toId);\n synchronized (fromAccount) {\n fromAccount.withdraw(amount);\n }\n synchronized (toAccount) {\n toAccount.deposit(amount);\n }\n }", "@Override\n public void logWithdrawal(UUID userUUID, double amount) {\n }", "public double checkCashInBrokerage(long socialSecurityNumber, String userName, String password) throws AuthenticationException,UnauthorizedActionException{\r\n if(security(socialSecurityNumber, userName, password)){\r\n throw new AuthenticationException();\r\n }\r\n if(getPatron(socialSecurityNumber).getBrokerageAccount() == null){\r\n throw new UnauthorizedActionException();\r\n }\r\n return getPatron(socialSecurityNumber).getBrokerageAccount().getAvailableBalance();\r\n }", "@Override\n\tpublic void checkBalance() {\n\t\tSystem.out.println(\"balance is checked\");\n\t}", "public static boolean fundsAvailable(Map<Money, Integer> toWithdraw,\r\n\t\t\tMap<Money, Integer> count) {\r\n\t\tif (count.size() > 0) {\r\n\t\t\tfor (Map.Entry<Money, Integer> entry : toWithdraw.entrySet()) {\r\n\t\t\t\tif (!count.containsKey(entry.getKey()))\r\n\t\t\t\t\treturn false;\r\n\t\t\t\tif (count.get(entry.getKey()) < entry.getValue())\r\n\t\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t}", "boolean hasUserInterest();", "boolean hasUserInterest();", "public void payEconomical() {\n if (this.balance >= 2.50) {\n this.balance -= 2.50;\n }\n }", "@Test\n\tpublic void withdrawTest(){\n\t\tCustomer cus = new Customer(\"wgl\", myDate, \"Beijing\");\n\t\tAccount cAcc = new CurrentAccount(cus);\n\t\tbc.withdraw(cAcc, 300);\n\t\tboolean flag = false;\n\t\tif(cAcc.getBalance() == -300.0){\n\t\t\tflag = true;\n\t\t}\n\t\tassertTrue(flag);\n\t}", "Boolean isAccountLocked(String username);", "abstract int checkBalance(String accountno) throws RemoteException;", "public boolean addBankAccount(String name, double balance) {\n\t\tif(balance>0){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "boolean hasAccount();", "boolean hasAccount();", "boolean hasAccount();", "boolean activateAccount(Integer userId);", "@Override\r\n\tpublic boolean checkUser(User user) {\n\t\tint age = user.getAge();\r\n\t\tint height = user.getHeight();\r\n\t\tint weight = user.getWeight();\r\n\t\tString country =user.getCountry();\r\n\t\t if((age>=18 && age<=35) && (height>=155 && height<=170) && (weight>=55 && weight<=90) && country.equals(\"ProGrad\")) \r\n\t\t\t return true;\r\n\t\t else \r\n\t\t\t return false;\r\n\t }", "@Test\n public void test_total_balance3() {\n assertEquals(0, ao3.totalBalanceOfAccountsOwned(), EPS);\n }", "public void withdraw(double ammount) throws insufficientFunds{\n if(ammount > abal)\n throw new insufficientFunds();\n else{\n ammount = abal - ammount;\n UpdateDB();\n }\n }", "public boolean withdrawl(double withdrawAmount) {\n\t\tif (balance-withdrawAmount < 0 || withdrawAmount < 0) return false; // Special cases: can't withdraw more than your balance; can't withdraw negative money\n\t\tbalance -= withdrawAmount;\n\t\treturn true;\n\t}", "public boolean transferFunds (int secretKey, double amtToTransfer) {\n\n int sourceBankAccountNumber; // account FROM which to transfer\n int targetBankAccountNumber; // account TO which to transfer\n\n // use secretKey to obtain AccountLink, which will contains the\n // source and target BankAccount numbers\n AccountLink theAccountLink = hashMapOfSecretKeys.get(secretKey);\n\n if ( theAccountLink != null ) { // i.e. secretKey was valid\n\n sourceBankAccountNumber = theAccountLink.getAGENT_ACCOUNT_NUMBER();\n targetBankAccountNumber = theAccountLink.getAH_ACCOUNT_NUMBER();\n\n } else { // secretKey appears invalid; no transfer possible\n return false;\n }\n\n // use account numbers to get full BankAccounts\n BankAccount sourceBankAccount =\n hashMapOfAllAccts.get(sourceBankAccountNumber);\n BankAccount targetBankAccount =\n hashMapOfAllAccts.get(targetBankAccountNumber);\n\n // ask source BankAccount to delete amtToTransfer (if possible)\n // This effects a transfer only if frozen funds >= amtToTransfer\n boolean fundsTakenFromSource =\n sourceBankAccount.decreaseFrozenAndBalance(amtToTransfer);\n\n // if funds were able to be taken from source, then add amt to target\n if ( fundsTakenFromSource ) {\n targetBankAccount.increaseTotalBalance(amtToTransfer);\n updateBankDisplay();\n } else {\n return false; // b/c funds could not be taken from source\n }\n\n return true;\n }", "@Test\n public void testImpossible3TransferMoney() {\n Bank bank = new Bank();\n User user = new User(\"Petr\", \"0000 000000\");\n AccountOfUser acc = new AccountOfUser(1000, \"0000 0000 0000 0000\");\n bank.addUser(user);\n bank.addAccountToUser(user.getPassport(), acc);\n assertThat(bank.transferMoney(user.getPassport(), acc.getRequisites(), user.getPassport(), \"0000 0000 0000 0001\", 100), is(false));\n }", "public int TransBroBuy(Long userid,Long compid,Long newbalance,Double amount)throws SQLException {\n\t\tjava.util.Date d=new java.util.Date();\r\n\t\tSimpleDateFormat sd=new SimpleDateFormat(\"dd-MMM-yy\");\r\n\t\tString sdate=sd.format(d);\r\n\t\tResultSet rs1=DbConnect.getStatement().executeQuery(\"select * from transaction where type='purchase' and bywhom='broker' and comp_id=\"+compid+\" and DATEOFTRANS='\"+sdate+\"' and user_id=\"+userid+\"\");\r\n\t\tif(rs1.next()==true)\r\n\t\t{\r\n\t\t\tint l=DbConnect.getStatement().executeUpdate(\"update transaction set amount=amount+\"+amount+\",SHAREAMOUNT=SHAREAMOUNT+\"+newbalance+\" where type='purchase' and bywhom='broker' and comp_id=\"+compid+\" and DATEOFTRANS='\"+sdate+\"' and user_id=\"+userid+\" \");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tint i=DbConnect.getStatement().executeUpdate(\"Insert into transaction values(trans_seq.nextval,\"+userid+\",'\"+sdate+\"',\"+amount+\",'purchase','broker',\"+compid+\",\"+newbalance+\")\");\r\n\r\n\t\t}\r\n\t\t\tResultSet rss=DbConnect.getStatement().executeQuery(\"select * from FINALALLOCATION where user_id=\"+userid+\" and comp_id=\"+compid+\" \");\r\n\t\tif(rss.next()==true)\r\n\t\t{\r\n\t\t\tint j=DbConnect.getStatement().executeUpdate(\"update FINALALLOCATION set no_share=no_share+\"+newbalance+\" where user_id=\"+userid+\" and comp_id=\"+compid+\" \");\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tint k=DbConnect.getStatement().executeUpdate(\"insert into FINALALLOCATION values(\"+userid+\",\"+compid+\",\"+newbalance+\")\");\r\n\t\t}\r\n\t\treturn 1;\r\n\t}", "boolean investmentIsBondListFull() throws BankException {\n logger.warning(\"This account does not support this feature\");\n throw new BankException(\"This account does not support this feature\");\n }", "boolean hasHasAccount();", "protected boolean withdraw(double amount)\n\t{\n\t\tif(amount>acc_balance)\n\t\t\treturn false;\n\t\t\n\t\t//else the deduction is done from balance and success message is passed\n\t\tacc_balance-=amount;\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean transferAmnt(int toAccNo, double money)\r\n\t\t\tthrows EwalletException {\n\t\tAccount ftTemp =new Account();\r\n\t\tif(temp.getCustBal()>=money) {\r\n\t\tftTemp = dao.loginuser(toAccNo);\r\n\t\tif(ftTemp!=null)\r\n\t\t{\r\n\t\t\tftTemp.setCustBal(ftTemp.getCustBal()+money);\r\n\t\t\ttemp.setCustBal(temp.getCustBal()-money);\r\n\t\t\ttemp.settDetails(\"Date :\"+tDate+\" Amount Transfered :\"+money+\" To Acc No: \"+ftTemp.getAccNum()+\" Total Balance :\"+temp.getCustBal());\r\n\t\t\tftTemp.settDetails(\"Date :\"+tDate+\" Depsoited Amount :\"+money+\" From Acc No: \"+temp.getAccNum()+\" Total Balance :\"+ftTemp.getCustBal());\r\n\t\t\tdao.updatedetails(temp.getAccNum(), temp);\r\n\t\t\tdao.updatedetails(ftTemp.getAccNum(), ftTemp);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}\r\n\t\telse if(temp.getCustBal()<money)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Low Balance to transfer\");\r\n\t\t}\r\n\t\t\r\n\t\telse\r\n\t\t\tSystem.out.println(\"No such user account\");\r\n\t\treturn false;\r\n\t}", "@Override\n\tpublic void stateCheck() {\n\t\tif(balance<0 && balance>=-1000)\n\t\t{\n\t\t\tacc.setState(new YellowState(this));\n\t\t}\n\t\telse if(balance<-1000)\n\t\t{\n\t\t\tacc.setState(new RedState(this));\n\t\t}\n\t}", "void join(User user);", "public boolean updateBalance(int account_id, int final_amount, Connection con){\n try {\n tryDbUpdate(\"update ACCOUNTS set BALANCE = \"+ final_amount + \" where ACCOUNT_ID = \" + account_id, con);\n cache.add(new Account(account_id, final_amount));\n } catch (SQLException e) {\n try {\n con.rollback();\n return false;\n } catch (SQLException e1) {\n e1.printStackTrace();\n return false;\n }\n }\n return true;\n }", "public void testAutoBalanceTransactions(){\n\t\tsetDoubleEntryEnabled(false);\n\t\tmTransactionsDbAdapter.deleteAllRecords();\n\n\t\tassertThat(mTransactionsDbAdapter.getRecordsCount()).isEqualTo(0);\n\t\tString imbalanceAcctUID = mAccountsDbAdapter.getImbalanceAccountUID(Currency.getInstance(CURRENCY_CODE));\n\t\tassertThat(imbalanceAcctUID).isNull();\n\n\t\tvalidateTransactionListDisplayed();\n\t\tonView(withId(R.id.fab_create_transaction)).perform(click());\n\t\tonView(withId(R.id.fragment_transaction_form)).check(matches(isDisplayed()));\n\n\t\tonView(withId(R.id.input_transaction_name)).perform(typeText(\"Autobalance\"));\n\t\tonView(withId(R.id.input_transaction_amount)).perform(typeText(\"499\"));\n\n\t\t//no double entry so no split editor\n\t\t//TODO: check that the split drawable is not displayed\n\t\tonView(withId(R.id.menu_save)).perform(click());\n\n\t\tassertThat(mTransactionsDbAdapter.getRecordsCount()).isEqualTo(1);\n\t\tTransaction transaction = mTransactionsDbAdapter.getAllTransactions().get(0);\n\t\tassertThat(transaction.getSplits()).hasSize(2);\n\t\timbalanceAcctUID = mAccountsDbAdapter.getImbalanceAccountUID(Currency.getInstance(CURRENCY_CODE));\n\t\tassertThat(imbalanceAcctUID).isNotNull();\n\t\tassertThat(imbalanceAcctUID).isNotEmpty();\n\t\tassertTrue(mAccountsDbAdapter.isHiddenAccount(imbalanceAcctUID)); //imbalance account should be hidden in single entry mode\n\n\t\tassertThat(transaction.getSplits()).extracting(\"mAccountUID\").contains(imbalanceAcctUID);\n\n\t}", "public boolean addTransaction(double amount) {\n if ((this.balance+amount)>=0) {\r\n this.transactions.add(amount);\r\n balance+=amount;\r\n return true;\r\n }else{\r\n System.out.println(\"Balance Insufficient\");\r\n return false;\r\n }\r\n }", "public boolean getAccountHasWithdrawLimit(){\n if (currentAccount instanceof SavingAccount){\n return ((SavingAccount)currentAccount).getHasWithdrawLimit();\n \n }\n else if (currentAccount instanceof NetSavingAccount){\n return ((NetSavingAccount)currentAccount).getHasWithdrawLimit();\n }\n else if (currentAccount instanceof ChequeAccount){\n return ((ChequeAccount)currentAccount).getHasWithdrawLimit(); \n }\n else if (currentAccount instanceof FixedAccount){\n return ((FixedAccount)currentAccount).getHasWithdrawLimit();\n }\n else{\n System.out.println(\"Get Account WithdrawLimit (Bool) Account not found\");\n return false;\n }\n }" ]
[ "0.6569839", "0.5892709", "0.5810008", "0.5784985", "0.568236", "0.5673149", "0.5621609", "0.5616467", "0.55543095", "0.5553309", "0.55417866", "0.5505591", "0.5488548", "0.5484799", "0.54698956", "0.5454141", "0.5427681", "0.54076934", "0.53882426", "0.5378529", "0.5371431", "0.5345536", "0.53275347", "0.5326899", "0.53137857", "0.5309708", "0.52943397", "0.52875674", "0.52710474", "0.52618974", "0.52568394", "0.52302057", "0.5228665", "0.52172315", "0.5214607", "0.52122825", "0.52093697", "0.5207844", "0.5200507", "0.5186897", "0.5186034", "0.51816803", "0.5170143", "0.5162694", "0.51495034", "0.51420516", "0.5141564", "0.51374674", "0.5131613", "0.51230633", "0.5091719", "0.509104", "0.50903857", "0.5081604", "0.507988", "0.5079865", "0.5065681", "0.506533", "0.505883", "0.505783", "0.505576", "0.5054782", "0.50500774", "0.5044689", "0.50418264", "0.50406975", "0.50355995", "0.5033531", "0.50262517", "0.5023859", "0.5011054", "0.5006103", "0.5003748", "0.5002184", "0.5002184", "0.49994525", "0.49986035", "0.49975482", "0.4993377", "0.49909186", "0.4988491", "0.4988491", "0.4988491", "0.49875602", "0.49727425", "0.4972034", "0.49709666", "0.49669784", "0.49642098", "0.49637616", "0.4957118", "0.4953648", "0.49518025", "0.49509227", "0.49470094", "0.4943756", "0.49418467", "0.49345282", "0.49301884", "0.492953", "0.49286792" ]
0.0
-1
User doesn't have enough balance to join the table (prerequirement coin should be less then stake value)
public SNGTestCases PlayerJoin_TC1008() throws InterruptedException{ String flavour = "Electrical"; forDebugger(); waitForVisibilityOf(By.id("com.pointedsquares.gamy5.android:id/header_name")); try{ waitForElement(By.xpath("//android.widget.TextView[contains(@text , 'Academics') and contains(@resource-id , 'itemTitle')]") , 5); }catch(Exception ex){ driver.scrollTo("Academics"); } driver.findElement(By.xpath("//android.widget.TextView[contains(@text , 'Academics') and contains(@resource-id , 'itemTitle')]/following-sibling::android.widget.TextView[contains(@text , 'More')]")).click(); waitForElement(By.id("com.pointedsquares.gamy5.android:id/search_all"), 10); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/search_all")).click(); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/search_all")).sendKeys(flavour); driver.findElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'flavour_name_list') and contains(@text , 'Electrical Engineering')]")).click(); driver.findElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'stake_amount') and contains(@text , '500')]")).click(); waitForElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'message_text') and contains(@text , 'You are about to play Electrical Engineering game with 500 coins stake.')]"), 5); driver.findElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'message_text') and contains(@text , 'You are about to play Electrical Engineering game with 500 coins stake.')]")).click(); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/positive_button")).click(); waitForVisibilityOf(By.xpath("//android.widget.TextView[contains(@resource-id , 'message_text') and contains(@text , 'InSufficient Balance.')]")); Thread.sleep(7000); return new SNGTestCases(driver); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void withdraw(double ammount) throws insufficientFunds{\n if(ammount > abal)\n throw new insufficientFunds();\n else{\n ammount = abal - ammount;\n UpdateDB();\n }\n }", "@Test\n public void testNotEnoughCash() throws Exception {\n\n // login with sufficient rights\n shop.login(admin.getUsername(), admin.getPassword());\n\n // trying to pay for a sale with insufficient funds\n assertEquals(-1, shop.receiveCashPayment(saleId, toBePaid-1), 0.001);\n\n // verify sale did not change state to PAID/COMPLETED\n assertFalse(isTransactionInAccountBook(saleId));\n\n // verify system's balance did not change\n assertEquals(totalBalance, shop.computeBalance(), 0.001);\n }", "InsufficientFunds(Account a) {\n balance = a.currentBalance();\n }", "protected boolean ensureBalance(BigInteger value)\n {\n String account = appContext.getSettingProvider().getSelectedAccount();\n\n BigInteger balance = appContext.getServiceProvider().getAccountService().getAccountBalance(account).get();\n if(balance == null)\n {\n appContext.getMessageService().showErrorMessage(\"Cannot reach the exchange service. Try again later.\");\n return false;\n }\n\n if(balance.compareTo(value) < 0)\n {\n appContext.getMessageService().showErrorMessage(\"You need at least \" + value.toString() + \" wei to do that!\");\n return false;\n }\n\n return true;\n }", "public boolean isOverdrawn() {\n return balance < 0;\n }", "@Test\n public void testImpossible1TransferMoney() {\n Bank bank = new Bank();\n User user = new User(\"Petr\", \"0000 000000\");\n AccountOfUser acc = new AccountOfUser(0, \"0000 0000 0000 0000\");\n AccountOfUser acc2 = new AccountOfUser(0, \"0000 0000 0000 0001\");\n bank.addUser(user);\n bank.addAccountToUser(user.getPassport(), acc);\n bank.addAccountToUser(user.getPassport(), acc2);\n assertThat(bank.transferMoney(user.getPassport(), acc.getRequisites(), user.getPassport(), acc2.getRequisites(), 100), is(false));\n }", "public void payEconomical() {\n if (this.balance >= 2.50) {\n this.balance -= 2.50;\n }\n }", "protected void imposeTransactionFee ()\n {\n if (getBalance () < minimumBalance)\n super.withdraw (transactionFee);\n }", "@Test\n public void testImpossible2TransferMoney() {\n Bank bank = new Bank();\n User user = new User(\"Petr\", \"0000 000000\");\n AccountOfUser acc = new AccountOfUser(0, \"0000 0000 0000 0001\");\n bank.addUser(user);\n bank.addAccountToUser(user.getPassport(), acc);\n assertThat(bank.transferMoney(user.getPassport(), \"0000 0000 0000 0000\", user.getPassport(), acc.getRequisites(), 100), is(false));\n }", "public void checkBalance()\n\t{\n\t\tList<Account> accounts = Main.aDao.getAllAccounts(this.loggedIn.getUserId());\n\t\tdouble accountsTotal = 0;\n\t\t\n\t\tfor(Account a : accounts)\n\t\t{\n\t\t\taccountsTotal += a.getBalance();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Total funds available across all accounts:\\n\" + accountsTotal);\n\t}", "boolean withdraw (int value )\n {\n if (value>balance)\n {\n return false;\n }\n else {\n balance-=value;\n return true;\n }\n }", "private void validateBalance(Double fromBalance, Double transferAmount) throws PaymentsException {\n\t\tif ((fromBalance - transferAmount) <= 0) {\n\t\t\tlogger.error(\"Not enough balance.\");\n\t\t\tthrow new PaymentsException(\" Not enough funds. \");\n\t\t\t\n\t\t}\n\t}", "public Integer withdraw(Integer amount) {\r\n\t if (balance < amount) {\r\n\t throw new NotEnoughFundsException(amount, balance);\r\n\t }\r\n\t balance -= amount;\r\n\t return balance;\r\n\t }", "public void withdrawFromChecking(double amount) {\r\n\t\tif(amount > this.getSavingsBalance()) {\r\n\t\t\tSystem.out.println(\"Unsufficient funds\");\r\n\t\t} else {\r\n\t\t\tthis.checkingBalance -= amount;\r\n\t\t\ttotalAmount -= amount;\r\n\t\t}\r\n\t}", "@Test\n\tpublic void moneyTrnasferExcetionInsufficientBalanceOfFromAccount() {\n\t\t\n\t\tString accountNumberFrom = createAccount(\"krishna\",4000);\n\t\tString accountNumberTo = createAccount(\"ram\",2000);\n\t\tdouble amountToBeTranfered = 40000.0;\n\t\tMoneyTransfer moneyTransfer = new MoneyTransfer();\n\t\tmoneyTransfer.setAccountNumberFrom(Integer.parseInt(accountNumberFrom));\n\t\tmoneyTransfer.setAccountNumberTo(Integer.parseInt(accountNumberTo));\n\t\tmoneyTransfer.setAmount(amountToBeTranfered);\n\t\t\n\t\tString requestBody = gson.toJson(moneyTransfer);\n\t\t\n\t\tRequestSpecification request = RestAssured.given();\n\t\trequest.body(requestBody);\n\t\tResponse response = request.put(\"/transfer\");\n\t\t\n\t\t// This logic is required due to response has been set as mix of Message and return data value. - START\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"Account Number - \");\n\t\tsb.append(accountNumberFrom);\n\t\tsb.append(\" do not have sufficient amout to transfer.\");\n\t\t// This logic is required due to response has been set as mix of Message and return data value. - END\n\t\t\n\t\tAssertions.assertEquals(sb.toString(), response.asString());\n\t\t\n\t}", "@Override\r\n\tpublic boolean withdraw(double amount) {\n\t\ttry {\r\n\t\t\tif (accountStatus.equals(AccountStatus.ACTIVE)) {\r\n\t\t\t\tif (balance > amount) {\r\n\t\t\t\t\tbalance = (float) (balance - amount);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow new InsufficientBalanceException(\"You'er Balance is insufficient to make this transation !\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\telse {\r\n\t\t\t\tthrow new AccountInactiveException(\"You'er Account is not Active !\");\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@Test(expected = BidAmountException.class)\n public void bidIsLessThanHighestBidIsRejected() {\n knownUsers.login(seller.userName(), seller.password());\n knownUsers.annointSeller(seller.userName());\n\n knownUsers.login(bidder.userName(), bidder.password());\n\n Auction testAuction = new Auction(seller, item, startingPrice, startTime, endTime);\n testAuction.onStart();\n\n Bid firstBid = new Bid(bidder, startingPrice, startTime.plusMinutes(2));\n\n testAuction.submitBid(firstBid);\n\n testAuction.submitBid(firstBid);\n\n\n }", "public void withdraw(double amount) throws InsufficientFundsException {\n if (amount <= balance) {\n balance -= amount;\n \n try {\n \n Class.forName(\"net.ucanaccess.jdbc.UcanaccessDriver\");\n \n // Load Driver\n String connURL=\"jdbc:ucanaccess://c:/Users/Ellen/Documents/CIST2373/ChattBankMDB.mdb\";\n \n // Get Connection\n Connection con = DriverManager.getConnection(connURL);\n \n // Create Statement\n Statement stmt = con.createStatement();\n \n // Create sql string \n String sql = \"Update Accounts set Balance = \"+getBalance()+ \n \" where AcctNo= '\"+getAcctNo()+\"'\";\n \n // Check for properly formed sql\n System.out.println(sql);\n \n // Execute Statement\n int n = stmt.executeUpdate(sql);\n if (n == 1)\n System.out.println(\"Update was successful!\");\n else\n System.out.println(\"Update failed!\"); \n \n // Close Connection\n con.close(); \n } //end try\n \n catch (Exception err) {\n System.out.println(\"Error: \" + err);\n } //end catch\n } //end if\n else {\n throw new InsufficientFundsException(amount);\n } //end else\n }", "public void withdraw(double amount) throws \n\t\t\t\t\t\t\t\t\tBalanceTooLowException{\n\t\tif(balance >= amount){\n\t\t\tbalance -= amount;\n\t\t}\n\t\telse{\n\t\t\tdouble needs = amount - balance;\n\t throw new BalanceTooLowException(needs);\n\t\t}\n\t}", "Boolean checkAccountHasSufficientBalance(PrintWriter out, Account from, Double amount);", "@Test(expected=MissingPrice.class)\n\tpublic void testNotEnoughBought() {\n\t\tpos.setPricing(\"A\", 4, 7);\n\n\t\tpos.scan(\"A\");\n\t\tpos.total();\n\t}", "public boolean couldBeProfitable(){\n return this.priceBought < this.maximumMachineProfit;\n }", "private void withdraw() {\n userInput = 0;\n while (userInput <= 0) {\n System.out.printf(\"Din nuværende balance er: %.2f DKK\\n\" +\n \"Indtast ønsket beløb at hæve: \", balanceConverted);\n\n textMenuKey(false, \"\");\n\n if (userInput <= 0) {\n System.out.println(\"Indtast et gyldigt beløb\");\n }\n }\n\n if ((userInput * 100) <= balance) {\n moneyController(-userInput);\n mysql.transactionUpdate(customerNumber, customerName, balance, userInput, \"Withdraw\");\n } else {\n System.out.println(\"Utilstrækkelig balance på kontien\");\n }\n }", "public void withdraw (int amount) {\n if (amount >= 0) {\n balance = balance - amount;\n valueWithdrawals = valueWithdrawals + amount;\n if (balance < minimumBalance){\n minimumBalance = balance;\n }\n }\n }", "private void botTrading(){\n if(game.isCardPositive(game.getHighestSharePriceStock())){\n int numShares = player.getFunds()/(game.getHighestSharePriceStock().getSharePrice()+3);\n player.getShares().set(game.getIndex(game.getHighestSharePriceStock()), player.getShares().get(game.getIndex(game.getHighestSharePriceStock())) + numShares);\n player.setFunds(-numShares*(game.getHighestSharePriceStock().getSharePrice()+3));\n }\n }", "public int TransBroBuy(Long userid,Long compid,Long newbalance,Double amount)throws SQLException {\n\t\tjava.util.Date d=new java.util.Date();\r\n\t\tSimpleDateFormat sd=new SimpleDateFormat(\"dd-MMM-yy\");\r\n\t\tString sdate=sd.format(d);\r\n\t\tResultSet rs1=DbConnect.getStatement().executeQuery(\"select * from transaction where type='purchase' and bywhom='broker' and comp_id=\"+compid+\" and DATEOFTRANS='\"+sdate+\"' and user_id=\"+userid+\"\");\r\n\t\tif(rs1.next()==true)\r\n\t\t{\r\n\t\t\tint l=DbConnect.getStatement().executeUpdate(\"update transaction set amount=amount+\"+amount+\",SHAREAMOUNT=SHAREAMOUNT+\"+newbalance+\" where type='purchase' and bywhom='broker' and comp_id=\"+compid+\" and DATEOFTRANS='\"+sdate+\"' and user_id=\"+userid+\" \");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tint i=DbConnect.getStatement().executeUpdate(\"Insert into transaction values(trans_seq.nextval,\"+userid+\",'\"+sdate+\"',\"+amount+\",'purchase','broker',\"+compid+\",\"+newbalance+\")\");\r\n\r\n\t\t}\r\n\t\t\tResultSet rss=DbConnect.getStatement().executeQuery(\"select * from FINALALLOCATION where user_id=\"+userid+\" and comp_id=\"+compid+\" \");\r\n\t\tif(rss.next()==true)\r\n\t\t{\r\n\t\t\tint j=DbConnect.getStatement().executeUpdate(\"update FINALALLOCATION set no_share=no_share+\"+newbalance+\" where user_id=\"+userid+\" and comp_id=\"+compid+\" \");\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tint k=DbConnect.getStatement().executeUpdate(\"insert into FINALALLOCATION values(\"+userid+\",\"+compid+\",\"+newbalance+\")\");\r\n\t\t}\r\n\t\treturn 1;\r\n\t}", "public void withdraw( double amount ) throws Exception\n\t{\n\t\tif(amount >= 0.0 && amount <= balance)\n\t\t\tbalance -= amount;\n\t\t\n\t\telse\n\t\t\tthrow new Exception(\"Insufficient Balance\");\n\t}", "public boolean isOverdrawn() {\n return this.getBalance().compareTo(new BigDecimal(\"0\")) < 0;\n }", "public void withdraw(double amount)\n throws InterruptedException\n {\n balanceChangeLock.lock();\n try\n {\n while (balance < amount)\n sufficientFundsCondition.await();\n System.out.print(\"Sacando \" + amount);\n double newBalance = balance - amount;\n System.out.println(\", novo saldo igual a \" + newBalance);\n balance = newBalance;\n }\n finally\n {\n balanceChangeLock.unlock();\n }\n }", "public int hasBalance(UUID uuid, int number) {\r\n\t\tPennyGame plugin = PennyGame.getPlugin(PennyGame.class);\r\n\t\t//int previousTicketCount = getTicketCount(uuid);\r\n\t\t//number = Math.min(number, this.maxTicketCount - previousTicketCount);\r\n\t\tRegisteredServiceProvider<Economy> rsp = plugin.getServer().getServicesManager().getRegistration(Economy.class);\r\n\t\tEconomy econ = rsp.getProvider();\r\n\t\tOfflinePlayer player = Bukkit.getOfflinePlayer(uuid);\r\n\t\tdouble balance = econ.getBalance(player);\r\n\t\tnumber = (int)Math.min(number, (balance / this.ticketPrice));\r\n\t\t//number = (int)Math.min(number - (number - (balance / this.ticketPrice)), number);\r\n\t\t\r\n\t\treturn number;\t\r\n\t}", "public String transaction_pay(int reservationId) {\r\n\t\ttry {\r\n\t\t\tif (username == null){\r\n\t\t\t\treturn \"Cannot pay, not logged in\\n\";\r\n\t\t\t}\r\n\t\t\tbeginTransaction();\r\n\t\t\t\r\n\t\t\t//query for the user balance \r\n\t\t\tcheckBalanceStatement.clearParameters();\r\n\t\t\tcheckBalanceStatement.setString(1, username);\r\n\t\t\tResultSet b = checkBalanceStatement.executeQuery();\r\n\t\t\tb.next();\r\n\t\t\tint user_balance = b.getInt(\"balance\");\r\n\t\t\t\r\n\t\t\t//get the price of the first flight\r\n\t\t\tunpaidReservationStatement.clearParameters();\r\n\t\t\tunpaidReservationStatement.setString(1, username);\r\n\t\t\tunpaidReservationStatement.setInt(2, reservationId);\r\n\t\t\tResultSet unpaid = unpaidReservationStatement.executeQuery();\r\n\t\t\t\r\n\t\t\tint total_price = 0;\r\n\t\t\tif (!unpaid.next()){\r\n\t\t\t\trollbackTransaction();\r\n\t\t\t\treturn \"Cannot find unpaid reservation \"+reservationId+\" under user: \"+username+\"\\n\";\r\n\t\t\t} else {\r\n\t\t\t\t//unpaid.next() ?? maybe not sure\r\n\r\n\t\t\t\tint fid1 = unpaid.getInt(\"fid1\");\r\n\t\t\t\tint fid2 = unpaid.getInt(\"fid2\");\r\n\t\t\t\tcheckPriceStatement.clearParameters();\r\n\t\t\t\tcheckPriceStatement.setInt(1, fid1);\r\n\t\t\t\tResultSet p1 = checkPriceStatement.executeQuery();\r\n\t\t\t\tp1.next();\r\n\t\t\t\ttotal_price += p1.getInt(\"price\");\r\n\t\t\t\tp1.close();\r\n\t\t\t\t\r\n\t\t\t\t//unpaidReservationStatement2.clearParameters();\r\n\t\t\t\t//unpaidReservationStatement2.setString(1, username);\r\n\t\t\t\t//unpaidReservationStatement2.setInt(2, reservationId);\r\n\t\t\t\t//ResultSet second = unpaidReservationStatement2.executeQuery();\r\n\t\t\t\tif (fid2 != 0){\r\n\t\t\t\t\t//second fid is not null\r\n\t\t\t\t\tcheckPriceStatement.clearParameters();\r\n\t\t\t\t\tcheckPriceStatement.setInt(1, fid2);\r\n\t\t\t\t\tResultSet p2 = checkPriceStatement.executeQuery();\r\n\t\t\t\t\tp2.next();\r\n\t\t\t\t\ttotal_price += p2.getInt(\"price\");\r\n\t\t\t\t\tp2.close();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (total_price > user_balance){\r\n\t\t\t\t\trollbackTransaction();\r\n\t\t\t\t\treturn \"User has only \"+user_balance+\" in account but itinerary costs \"+total_price+\"\\n\";\r\n\t\t\t\t} else {\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tupdatePaidStatement.clearParameters();\r\n\t\t\t\t\tupdatePaidStatement.setString(1, \"true\");\r\n\t\t\t\t\tupdatePaidStatement.setInt(2, reservationId);\r\n\t\t\t\t\tupdatePaidStatement.executeUpdate();\r\n\t\t\t\t\t\r\n\t\t\t\t\tupdateBalanceStatement.clearParameters();\r\n\t\t\t\t\tupdateBalanceStatement.setInt(1, (user_balance-total_price));\r\n\t\t\t\t\tupdateBalanceStatement.setString(2, username);\r\n\t\t\t\t\tupdateBalanceStatement.executeUpdate();\r\n\t\t\t\t\t\r\n\t\t\t\t\tcommitTransaction();\r\n\t\t\t\t\treturn \"Paid reservation: \"+reservationId+\" remaining balance: \"+(user_balance-total_price)+\"\\n\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (SQLException e){\r\n\t\t\te.printStackTrace();\r\n\t\t\t//rollbackTransaction();\r\n\t\t\treturn \"Failed to pay for reservation \" + reservationId + \"\\n\";\r\n\t\t}\r\n }", "@Test\n public void testImpossible3TransferMoney() {\n Bank bank = new Bank();\n User user = new User(\"Petr\", \"0000 000000\");\n AccountOfUser acc = new AccountOfUser(1000, \"0000 0000 0000 0000\");\n bank.addUser(user);\n bank.addAccountToUser(user.getPassport(), acc);\n assertThat(bank.transferMoney(user.getPassport(), acc.getRequisites(), user.getPassport(), \"0000 0000 0000 0001\", 100), is(false));\n }", "private boolean tryPay() {\n return new Random().nextInt(100) + 1 <= 50;\n }", "public void withdraw(double dollarAmount) throws InsufficientFundsException {\r\n\t\tif (this.accountBalance - dollarAmount < 0 || this.accountBalance - dollarAmount - 1.50 < 0) {\r\n\t\t\tthrow new InsufficientFundsException();\r\n\t\t} else {\r\n\t\t\ttransactionTracker++;\r\n\t\t\tSystem.out.println(transactionTracker);\r\n\t\t\tif (transactionTracker > 4) {\r\n\t\t\t\tthis.accountBalance = this.accountBalance - dollarAmount - 1.50;\r\n\t\t\t} else {\r\n\t\t\t\tthis.accountBalance = this.accountBalance - dollarAmount;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Test\n public void testValidBalance() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 100 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(100, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "public withdrawException() {\n super(\"The Sum you entered is greater than your available money... \");\n }", "boolean check(double amount) {\n\t\treturn (balance >= amount);\n\t}", "@Override\n\tpublic void takeMoneyOut(double amount) throws NoEnoughMoneyException {\n\t\tif (this.balance - amount < 0) {\n\t\t\tthrow new NoEnoughMoneyException(\"Sorry, operation failed. \" +\n\t\t\t\t\"The amount exceeds existing balance in this account\");\n\t\t}\n\t\tthis.balance -= amount;\n\t}", "protected boolean withdraw(double amount)\n\t{\n\t\tif(amount>acc_balance)\n\t\t\treturn false;\n\t\t\n\t\t//else the deduction is done from balance and success message is passed\n\t\tacc_balance-=amount;\n\t\treturn true;\n\t}", "@Override\n protected void withdraw(int request, boolean isOverdraft){\n if(request>0){\n request += SERVICE_FEE;\n }\n //need to change both balances just in case there was a LARGE_DEPOSIT \n //making it so that the 2 balance values differ\n setBalance(getBalance() - request);\n setBalanceAvailable(getBalanceAvailable() - request);\n }", "public boolean isBalanced ();", "public long withdraw(long amount) {\n if (amount > balance) {\n long tmp = balance;\n balance = 0;\n return tmp;\n } else {\n balance -= amount;\n return amount;\n }\n }", "private boolean checkGreedyDefense() {\r\n return enTotal.get(2)+1 < myTotal.get(2) && enTotal.get(0)+1 < myTotal.get(0);\r\n }", "public double withdrawFrom(double amount)\r\n {\r\n _balance -= amount;\r\n\r\n return _balance;\r\n }", "public void withdraw(double amount)\n {\n startingBalance -= amount;\n }", "@Override\n\tpublic void withdraw(double amount) {\n\t\tif (super.getBalance() - amount > overdraftLimit) {\n\t\t\tsuper.setBalance(getBalance() - amount);\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"Amount exceeds overdraft limit.\");\n\t}", "public boolean isBancrupt(){\r\n \treturn _budget <= 0;\r\n }", "@Test\n public void test_total_balance3() {\n assertEquals(0, ao3.totalBalanceOfAccountsOwned(), EPS);\n }", "@Override\r\n\tpublic void updateBalance( Integer userid, double amount) {\n\t\tif ( getBalance( userid) < amount) {\r\n\t\t\tthrow new RuntimeException( \"用户余额不足!\");\r\n\t\t}\r\n\t\tString sql = \"UPDATE buyers SET balance = balance - ? WHERE id = ?;\";\r\n\t\tjdbcTemplate.update( sql, amount, userid);\r\n\t}", "@Test\n\tpublic void testCheckSufficientCredits_OverdraftFacility() {\n\n\t\tint creditsRequired = 11;\n\n\t\tSmsMessage msg = new SmsMessage();\n\t\tSmsTask smsTask = new SmsTask();\n\t\tsmsTask.setSakaiSiteId(SmsConstants.SMS_DEV_DEFAULT_SAKAI_SITE_ID);\n\t\tsmsTask.setSmsAccountId(account.getId());\n\t\tsmsTask.setDateCreated(new Timestamp(System.currentTimeMillis()));\n\t\tsmsTask.setDateToSend(new Timestamp(System.currentTimeMillis()));\n\t\tsmsTask.setStatusCode(SmsConst_DeliveryStatus.STATUS_PENDING);\n\t\tsmsTask.setAttemptCount(2);\n\t\tsmsTask.setMessageBody(SmsConstants.SMS_DEV_DEFAULT_SMS_MESSAGE_BODY);\n\t\tsmsTask.setSenderUserName(\"senderUserName\");\n\t\tsmsTask.setMaxTimeToLive(1);\n\t\tsmsTask.getSmsMessages().add(msg);\n\t\tsmsTask.setCreditEstimate(creditsRequired);\n\t\tmsg.setSmsTask(smsTask);\n\n\t\tboolean sufficientCredits = smsBillingImpl.checkSufficientCredits(\n\t\t\t\taccount.getId(), creditsRequired);\n\t\tAssert.assertFalse(\"Expected insufficient credit\", sufficientCredits);\n\t\thibernateLogicLocator.getSmsAccountLogic().persistSmsAccount(account);\n\t\tsufficientCredits = smsBillingImpl.checkSufficientCredits(account\n\t\t\t\t.getId(), creditsRequired);\n\t\tAssert.assertTrue(\"Expected insufficient credit\", !sufficientCredits);\n\t}", "@Test\n public void holdTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String firstPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //init and authorize second payment, but there is 700 cents of 1000 withhold - ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String secondPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n\n //confirm first payment - OK\n\n paymentDto = confirmPayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n\n //confirm second payment, which was filed on authorization - still got ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = confirmPayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n }", "public int coinNeededBU(int[] coins, int amount, int n) {\n int dp[] = new int[amount + 1];\n Arrays.fill(dp, Integer.MAX_VALUE);\n\n dp[0] = 0;\n for (int rupay = 1; rupay <= amount; rupay++) {\n\n //Iterating over Coins\n for (int i = 0; i < n; i++) {\n\n if (rupay - coins[i] >= 0) {\n int smallAnswer = dp[rupay - coins[i]];\n //if (smallAnswer != Integer.MAX_VALUE) {\n dp[rupay] = Math.min(dp[rupay], smallAnswer + 1);\n //}\n }\n }\n }\n for (int i : dp) {\n System.out.print(i + \", \");\n }\n System.out.println();\n return dp[amount];\n }", "public void withdrawMoney(double amount, boolean checkingAccount) {\n if (checkingAccount && amount <= checkingBalance) {\n checkingBalance -= amount;\n totalBalance -= amount;\n } else if (!checkingAccount && amount <= savingsBalance) {\n savingsBalance -= amount;\n totalBalance -= amount;\n } else {\n System.out.println(\"Insufficient Funds.\");\n }\n }", "public void failedWithdraw(){\n\t\tstate = ATM_State.WITHDRAWALNOTIFICATION;\n\t\tgui.setDisplay(\"Invalid withdrawal amount.\");\n\t}", "@Override\n\tpublic int withdraw(double amount) throws RaiseException {\n\t\tValidator.validateWithdraw(this.getBalance(), amount);\n\t\tif(amount <= this.getBalance()) {\n\t\t\tthis.setBalance(this.getBalance() - amount);\n\t\t\t\n\t\t\t//create a transaction and adding it to the list of transactions of this account \n\t\t\tTransaction tmpTransaction = new Transaction(amount, EnumTypeTransaction.withdraw);\n\t\t\tthis.addTransaction(tmpTransaction);\n\t\t\t\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}", "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}", "@Test\n public void test_total_balance2() {\n assertEquals(1200, ao2.totalBalanceOfAccountsOwned(), EPS);\n }", "public void sendRouletteBet() {\n\t\tif (rouletteExecutor.getAposta() == null)\n\t\t\tnew Dialeg().setWarningText(\"You must bet!\");\n\t\telse {\n\t\t\tif (bool.compareAndSet(true, false)) {\n\t\t\t\ttry {\n\t\t\t\t\tmanager.getServer().enviarTrama(new Betting(rouletteExecutor.getAposta()));\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t//// e.printStackTrace();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnew Dialeg().setWarningText(\"You can't bet to the same number\");\n\t\t\t}\n\t\t}\n\t}", "public void withdraw(double amount)\n {\n if (amount <= balance) {\n balance = balance - amount;\n }\n else {\n System.err.println(\"Transaction Declined\");\n remainder = balance - amount;\n System.out.println(\"Your balance would have been \" + remainder);\n }\n }", "public void enoughForTransfer(double amount) throws BankException {\n if (this.currentAmount + amount > MAX_AMOUNT) {\n logger.warning(\"The amount in the receiving bank account cannot exceed 9 digits\");\n throw new BankException(\"The amount in the receiving bank account cannot exceed 9 digits\");\n }\n }", "private static void withdraw(double amount) {\n double resultWithdraw = balance - amount;\r\n if (resultWithdraw < 0 || amount > 2000) {\r\n System.out.println(\"Withdrawal cannot exceed $2000. Balance cannot be reduced below $0.\");\r\n } else {\r\n System.out.println(amount + \" has been withdrawn from your bank account.\\nCurrent balance \" + resultWithdraw + \".\");\r\n }\r\n }", "@Override\n public String getMessage() {\n return \"Insufficient Funds! Current Balance: \" + balance;\n }", "public static void fullnessCalc(User user) {\n /*\n * Fullness :\n * for every attribute of the record that is missing\n * the fullness rate of the record drops by 1.\n */\n\n fullness = 11;\n if (user.getFirstName().equals(\"\")) fullness -= 1;\n if (user.getLastName().equals(\"\")) fullness -= 1;\n if (user.getEmail().equals(\"\")) fullness -= 1;\n if (user.getCompany().equals(\"\")) fullness -= 1;\n if (user.getAddressOne().equals(\"\")) fullness -= 1;\n if (user.getAddressTwo().equals(\"\")) fullness -= 1;\n if (user.getCity().equals(\"\")) fullness -= 1;\n if (user.getStateShort().equals(\"\")) fullness -= 1;\n if (user.getStateLong().equals(\"\")) fullness -= 1;\n if (user.getPhone().equals(\"\")) fullness -= 1;\n if (user.getZipCode() == 0) fullness -= 1;\n user.setFullness(fullness);\n }", "public void withdraw(int amount) throws RejectedException {\n if (amount < 0) {\n throw new RejectedException(\n \"Tried to withdraw negative value, illegal value: \" + amount + \".\" + accountInfo());\n }\n if (balance - amount < 0) {\n throw new RejectedException(\n \"Tried to overdraft, illegal value: \" + amount + \".\" + accountInfo());\n }\n balance -= amount;\n }", "public void successful(int price, int balance) {\n System.out.println(\"De vragenlijst is succesvol toegevoegd aan uw vragenlijst collectie. \" +\n \"Het aankoopbedrag is afgeschreven van uw saldo. Uw aankoopbedrag was: \"\n + price + \". Uw saldo is verlaagd van \" + (balance + price) + \" naar \" + balance);\n }", "@Test\n public void notSell() {\n Game game = Game.getInstance();\n Player player = new Player(\"ED\", 4, 4, 4,\n 4, SolarSystems.GHAVI);\n game.setPlayer(player);\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(2, Goods.Water));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(1, Goods.Food));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(0, Goods.Furs));\n CargoItem good = game.getPlayer().getShip().getShipCargo().get(2);\n \n int oldCredits = game.getPlayer().getCredits();\n good.getGood().sell(good.getGood(), 1);\n \n CargoItem water = game.getPlayer().getShip().getShipCargo().get(0);\n CargoItem food = game.getPlayer().getShip().getShipCargo().get(1);\n water.setQuantity(2);\n food.setQuantity(1);\n good.setQuantity(0);\n //int P = good.getGood().getPrice(1);\n int curr = game.getPlayer().getCredits();\n //boolean qn = water.getQuantity() == 2 && food.getQuantity() == 1 && good.getQuantity() == 0;\n boolean check = water.getQuantity() == 2;\n System.out.print(curr);\n assertEquals(curr, oldCredits);\n }", "public int withdraw() {\n\t\tif ((acc.getBalance() - keyboard.getAmt()) > acc.getMinimumBalace()) {\r\n\t\t\tif (casher.withdraw(keyboard.getAmt()) == 1) {\r\n\t\t\t\tsetNewBalance();\r\n\t\t\t\t\r\n\t\t\t\treciept.printer(acc.getAccountNumber(), acc.getBalance(), keyboard.getAmt());\r\n\t\t\t\treturn 1;\r\n\t\t\t} else\r\n\t\t\t\treturn 0;\r\n\t\t}\r\n\t\treturn 0;\r\n\r\n\t}", "public void withdraw(double amount) {\n\t\tif (amount < balance) {\n\t\t\tSystem.out.println(\"Successful withdraw: $\" + amount);\n\t\t\tbalance -= amount;\n\t\t} else {\n\t\t\tSystem.out.println(\"Withdraw Failed: Insufficient balance. The amount of $\" + amount + \" is more than your balance ($\" + balance +\").\");\n\t\t}\n\t}", "public abstract boolean isBalanced();", "@Transactional(readOnly = true)\n public boolean checkAvailableBalance(Long accountId, Double amount) {\n return getAccountBalance(accountId) < amount;\n }", "double getBalance();", "double getBalance();", "public boolean canBuy(int shares, Stock s) {\n boolean can = false;\n if (money-(shares*s.getPrice())>0){//checks if user can afford it\n can = true;\n }\n return can;\n }", "public void withdraw(double amount){\n\t\tbalance -= amount;\n\t}", "private boolean isValidTransaction(double remainingCreditLimit, double transactionAmount){\n return transactionAmount <= remainingCreditLimit;\n }", "public int withdrawCash(int cash, int ubalance)\n {\n if (ubalance <= 0)\n {\n System.out.println(\"cash is not available\");\n return 0;\n }\n else\n {\n ubalance -= cash;\n return ubalance;\n }\n }", "@Test\r\n\tpublic void testCoinRejected() {\r\n\t\tCoin coin = new Coin(7);\r\n\t\tTheCoinSlotListener csListener = new TheCoinSlotListener();\r\n\t\tcsListener.coinRejected(vend.getCoinSlot(), coin);\r\n\t\tassertEquals(csListener.getCurrentCredit(), 0);\t\t\t\r\n\t}", "public void withdraw(String accountNumber, int amount) {\n\t\tConnection conn;\n\t\tPreparedStatement ps, pp, ll;\n\t\tString url = \"jdbc:mysql://localhost:3306/mars\";\n\t\tString username = \"root\";\n\t\tString password = \"1113\";\n\t\tint lastBalance;\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\ttry{\n\t\tconn=DriverManager.getConnection(url, username, password);\n\t\tString sql = \"select balance,userId from \"+this.name+\" where accountNumber=?\";\n\t\tps= (PreparedStatement) conn.prepareStatement(sql);\n\t\tps.setString(1, accountNumber.toString());\n\t\tResultSet rs = ps.executeQuery();\n\t\tint nowBalance = 0;\n\t\tString id = \"\";\n\t\twhile(rs.next()) { \n\t\t\tnowBalance=rs.getInt(\"balance\");\n\t\t\tid = rs.getString(\"userId\");\n\t\t}\n\t\tif (nowBalance<amount) {\n\t\t\tSystem.out.println(\"No Balance\");\n\t\t\treturn;\n\t\t}\n\t\tlastBalance = nowBalance - amount;\n\t\t//System.out.println(lastBalance);\n\t\t\n\t\tString sql1 = \"UPDATE \"+this.name+\" SET balance=? where accountNumber=?\";\n\t\tpp = (PreparedStatement) conn.prepareStatement(sql1);\n\t\tpp.setInt(1, lastBalance);\n\t\tpp.setString(2, accountNumber.toString());\n\t\tpp.executeUpdate();\n\t\t\n\t\tString logs = \"withdraw : \"+ amount+\" / balance: \"+String.valueOf(lastBalance);\n\t\tString sql11 = \"insert into \"+id+\" (log) values (?)\";\n\t\tll = (PreparedStatement) conn.prepareStatement(sql11);\n\t\tll.setString(1, logs);\n\t\tll.executeUpdate();\n\t\tSystem.out.println(\"Ypu got $\"+String.valueOf(amount));\n\t\t\n\t\t}catch (SQLException e) {\n\t\t throw new IllegalStateException(\"Cannot connect the database!\", e);\n\t\t}\n\t\t\n\t}", "private static int minCoins_bottom_up_dynamic_approach(int[] coins, int amount) {\n if (coins == null || coins.length == 0) return 0;\n if (amount < 0) return 0;\n\n int memo[][] = new int[coins.length + 1][amount + 1];\n\n // populate first row\n for (int col = 0; col <= amount; col++) {\n memo[0][col] = 0;// Important. always initialize 1st row with 1s\n }\n\n // populate first col\n for (int row = 0; row < coins.length; row++) {\n memo[row][0] = 0;// Important. initialize 1st col with 1s or 0s as per your need as explained in method comment\n }\n\n /*\n populate second row\n\n if amount(col) <= coin value, then one coin is required with that value to make that amount\n if amount(col) > coin value, then\n total coins required = amount/coin_value, if remainder=0, otherwise amount/coin_value+1\n */\n for (int col = 1; col <= amount; col++) {\n if (col <= coins[0]) {\n memo[1][col] = 1;\n } else {\n int quotient = col / coins[0];\n\n memo[1][col] = quotient;\n\n int remainder = col % coins[0];\n if (remainder > 0) {\n memo[1][col] += 1;\n }\n }\n }\n\n // start iterating from second row\n for (int row = 2; row < memo.length; row++) {\n // start iterating from second col\n for (int col = 1; col < memo[row].length; col++) {\n\n int coin = coins[row - 1];\n\n // formula to find min required coins for an amount at memo[row][col]\n if (coin > col) { // if coin_value > amount\n memo[row][col] = memo[row - 1][col]; // reserve prev row's value (value determined for prev coins)\n } else {\n memo[row][col] = Math.min(memo[row - 1][col], memo[row][col - coin]) + 1; // min(value determined by prev coins - prev row, value at amount=current_amount-coin_value) + 1\n }\n }\n }\n\n printMemo(coins, memo);\n\n return memo[memo.length - 1][memo[0].length - 1]; // final value is stored in last cell\n }", "private void checkDebtTotal(Double totalDebt, Double amountInCurrencyDefault) {\n\t\tif(amountInCurrencyDefault > totalDebt) {\n\t\t\tthrow new PaymentExceedsTotalDebtException(String.format(\"El pago con monto '%1$,.2f' excede la deuda del usuario '%2$,.2f'\", amountInCurrencyDefault, totalDebt));\n\t\t}\n\t}", "public double withdraw(double withdrawalAmount) {\n\t\tdouble savingsBalance = getBalance();\n\t\tif ((savingsBalance - withdrawalAmount) >= overdraft) { // Check if balance is less than overdraft limit.\n\t\t\tsuper.withdraw(withdrawalAmount);\n\t\t}\n\t\tif ((savingsBalance - withdrawalAmount) < overdraft) {\n\t\t\tSystem.out.print(\"Cannot execute withdraw action: greater than savings withdraw limit.\\n\");\n\t\t}\n\t\treturn getBalance();\n\t}", "public void lowCredit(){\n if (getBalance() < minAmount){\n System.out.println(\"Your current account is running low on credit\");\n }\n }", "private boolean checkGreedyWinRate() {\r\n return myTotal.get(0) > enTotal.get(0)+2 && (myself.health > 50 || myself.health > opponent.health);\r\n }", "@Override\n\tvoid withdraw(double amount) {\n\t\tsuper.balance -= amount - 20;\n\t}", "public NotEnoughFundsException() {\n super(\"Not enough money rock star, try again\");\n }", "public int TransBuy(Long userid,Long compid,Long newbalance,Double amount)throws SQLException {\n\tjava.util.Date d=new java.util.Date();\r\n\tSimpleDateFormat sd=new SimpleDateFormat(\"dd-MMM-yy\");\r\n\tString sdate=sd.format(d);\r\n\tResultSet rs1=DbConnect.getStatement().executeQuery(\"select * from transaction where type='purchase' and bywhom='self' and comp_id=\"+compid+\" and DATEOFTRANS='\"+sdate+\"' and user_id=\"+userid+\"\");\r\n\tif(rs1.next()==true)\r\n\t{\r\n\t\tint l=DbConnect.getStatement().executeUpdate(\"update transaction set amount=amount+\"+amount+\",SHAREAMOUNT=SHAREAMOUNT+\"+newbalance+\" where type='purchase' and bywhom='self' and comp_id=\"+compid+\" and DATEOFTRANS='\"+sdate+\"' and user_id=\"+userid+\" \");\r\n\t}\r\n\telse\r\n\t{\r\n\t\tint i=DbConnect.getStatement().executeUpdate(\"Insert into transaction values(trans_seq.nextval,\"+userid+\",'\"+sdate+\"',\"+amount+\",'purchase','self',\"+compid+\",\"+newbalance+\")\");\r\n\r\n\t}\r\n\t\tResultSet rss=DbConnect.getStatement().executeQuery(\"select * from FINALALLOCATION where user_id=\"+userid+\" and comp_id=\"+compid+\" \");\r\n\tif(rss.next()==true)\r\n\t{\r\n\t\tint j=DbConnect.getStatement().executeUpdate(\"update FINALALLOCATION set no_share=no_share+\"+newbalance+\" where user_id=\"+userid+\" and comp_id=\"+compid+\" \");\t\r\n\t}\r\n\telse\r\n\t{\r\n\t\tint k=DbConnect.getStatement().executeUpdate(\"insert into FINALALLOCATION values(\"+userid+\",\"+compid+\",\"+newbalance+\")\");\r\n\t}\r\n\treturn 1;\r\n}", "public boolean withdrawl(double withdrawAmount) {\n\t\tif (balance-withdrawAmount < 0 || withdrawAmount < 0) return false; // Special cases: can't withdraw more than your balance; can't withdraw negative money\n\t\tbalance -= withdrawAmount;\n\t\treturn true;\n\t}", "@Override\n\tpublic void stateCheck() {\n\t\tif(balance<0 && balance>=-1000)\n\t\t{\n\t\t\tacc.setState(new YellowState(this));\n\t\t}\n\t\telse if(balance<-1000)\n\t\t{\n\t\t\tacc.setState(new RedState(this));\n\t\t}\n\t}", "public void recordPurchase(double amount)\n {\n balance = balance - amount;\n // your code here\n \n }", "int getTotalLeased();", "public void claimDollars() {\n if (totalSpent >= 5000) {\n airlineDollars += ( ((totalSpent - (totalSpent % 5000)) / 5000) * 400);\n totalSpent = totalSpent % 5000;\n }\n }", "@Test(expected=NoCoinsException.class)\n\tpublic void testNoCoin() throws Exception {\n\t\td.dispense(0, 10);\n\t}", "@Test\n\tpublic void testWithdraw(){\n\t\t\n\t\t// Arrange\n\t\tBigDecimal amountToWithdraw = new BigDecimal(10.00);\n\t\tBigDecimal expectedBalance = new BigDecimal(110.5);\n\t\tdouble delta = 1e-3;\n\t\t// Act\n\t\tcurrentAccount.withdraw(amountToWithdraw);\n\t\tBalance actualBalance = currentAccount.checkBalance();\n\t\t\n\t\t// Assert\n\t\tassertEquals(expectedBalance.doubleValue(), actualBalance.getAmount().doubleValue(), delta);\n\t}", "public void withdraw(double amount)\n\t{\n\t\tbalance -= amount;\n\t}", "@Override\n public double grantOrRefund(Player player) {\n Map<Commodity, Double> result = wants.stream()\n .collect(Collectors.toMap(Function.identity(), want -> want.grantOrRefund(player)));\n\n Map.Entry<Commodity, Double> maxRefund = Collections.max(result.entrySet(), Comparator.comparingDouble(Map.Entry::getValue));\n if (maxRefund != null && maxRefund.getValue() != 0) {\n result.forEach((want, refund)->{\n if (want != maxRefund.getKey()) {\n double refundDifference = maxRefund.getValue() - refund;\n want.multiply(refundDifference).deduct(player);\n }\n });\n return maxRefund.getValue();\n }\n return 0;\n }", "public void withdraw(double amount) {\n this.balance -= amount;\n }", "@Override\n public void transferWithoutLocking(int fromId, int toId, long amount) throws InsufficientFundsException {\n accounts.get(fromId).withdraw(amount);\n accounts.get(toId).deposit(amount);\n }", "private static boolean hasFunds(double cost)\n {\n if (Clock.getRoundNum() < 200) { //TODO edit this out if necessary\n return rc.getTeamOre() > cost;\n } else {\n return rc.getTeamOre() > cost*2;\n }\n }", "private boolean IsBust(Player player) {\n if (CalcHandSum(player, player.getHand()) > 21) {\n return true;\n } else {\n return false;\n }\n }", "public void takeoutMoney (double amount) {\n if(amount >= 2.0) {\n int numberToRemove = (int) Math.min(getToonie(), amount / 2.0);\n for(int i = 0; i < numberToRemove; i++) {\n for(int j = 0; j < coins.size(); j++) {\n if(coins.get(j).getValue() == 2.0) {\n coins.remove(j);\n break;\n }\n }\n }\n NToonie -= numberToRemove;\n amount -= 2.0 * numberToRemove;\n }\n if(amount >= 1.0) {\n int numberToRemove = (int) Math.min(getLoonie(), amount / 1.0);\n for(int i = 0; i < numberToRemove; i++) {\n for(int j = 0; j < coins.size(); j++) {\n if(coins.get(j).getValue() == 1.0) {\n coins.remove(j);\n break;\n }\n }\n }\n NLoonie -= numberToRemove;\n amount -= 1.0 * numberToRemove;\n }\n if(amount >= 0.25) {\n int numberToRemove = (int) Math.min(getQuarter(), amount / 0.25);\n for(int i = 0; i < numberToRemove; i++) {\n for(int j = 0; j < coins.size(); j++) {\n if(coins.get(j).getValue() == 0.25) {\n coins.remove(j);\n break;\n }\n }\n }\n NQuarter -= numberToRemove;\n amount -= 0.25 * numberToRemove;\n }\n if(amount >= 0.1) {\n int numberToRemove = (int) Math.min(getDime(), amount / 0.1);\n for(int i = 0; i < numberToRemove; i++) {\n for(int j = 0; j < coins.size(); j++) {\n if(coins.get(j).getValue() == 0.1) {\n coins.remove(j);\n break;\n }\n }\n }\n NDime -= numberToRemove;\n amount -= 0.1 * numberToRemove;\n }\n if(amount >= 0.05) {\n int numberToRemove = (int) Math.min(getNickel(), amount / 0.05);\n for(int i = 0; i < numberToRemove; i++) {\n for(int j = 0; j < coins.size(); j++) {\n if(coins.get(j).getValue() == 0.05) {\n coins.remove(j);\n break;\n }\n }\n }\n NNickel -= numberToRemove;\n amount -= 0.05 * numberToRemove;\n }\n }", "public BigDecimal borrow(Account acct) {\n\t\tBigDecimal amt = maxLoans.subtract(acct.loans);\n\t\tif (amt.compareTo(BigDecimal.ZERO) < 0)\n\t\t\tamt = BigDecimal.ZERO;\n\t\treturn amt;\n\t}" ]
[ "0.6080048", "0.59132975", "0.5911304", "0.59036034", "0.58996683", "0.5891628", "0.582719", "0.5785071", "0.5781725", "0.5767183", "0.5737881", "0.5736274", "0.57113403", "0.56852597", "0.5674715", "0.5674306", "0.5652039", "0.5632682", "0.56296206", "0.5590703", "0.55879396", "0.5586167", "0.5579612", "0.55783963", "0.5575916", "0.5549103", "0.55272204", "0.552527", "0.55158097", "0.55093867", "0.54885226", "0.5453336", "0.54377776", "0.543695", "0.54164916", "0.53968394", "0.53938377", "0.5389073", "0.53777105", "0.5371457", "0.5368015", "0.5361423", "0.536035", "0.5351514", "0.5348493", "0.53374326", "0.53294545", "0.53285366", "0.5327802", "0.53269553", "0.5323699", "0.532301", "0.5314034", "0.52940404", "0.52936465", "0.528791", "0.52837455", "0.5281908", "0.52759784", "0.52751756", "0.52647525", "0.52615356", "0.5251436", "0.52499264", "0.5249671", "0.52472335", "0.5239594", "0.5237365", "0.5237077", "0.52323925", "0.52316016", "0.52316016", "0.5229831", "0.5226072", "0.5224625", "0.5222442", "0.52219427", "0.5221553", "0.5216296", "0.52148384", "0.5205304", "0.5199765", "0.5197683", "0.5197107", "0.51927114", "0.51907796", "0.5186439", "0.51861334", "0.518509", "0.5183937", "0.51730764", "0.5172379", "0.51715523", "0.51593804", "0.51577145", "0.51542985", "0.5153159", "0.51478714", "0.51454806", "0.51428425", "0.51428086" ]
0.0
-1
Questions are displaying properly or not? (prerequirement coin should be greater then stake value)
public SNGTestCases Questions_TC1016() throws InterruptedException{ String flavour = "Electrical"; forDebugger(); waitForVisibilityOf(By.id("com.pointedsquares.gamy5.android:id/header_name")); try{ waitForElement(By.xpath("//android.widget.TextView[contains(@text , 'Academics') and contains(@resource-id , 'itemTitle')]") , 5); }catch(Exception ex){ driver.scrollTo("Academics"); } driver.findElement(By.xpath("//android.widget.TextView[contains(@text , 'Academics') and contains(@resource-id , 'itemTitle')]/following-sibling::android.widget.TextView[contains(@text , 'More')]")).click(); waitForElement(By.id("com.pointedsquares.gamy5.android:id/search_all"), 10); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/search_all")).click(); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/search_all")).sendKeys(flavour); driver.findElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'flavour_name_list') and contains(@text , 'Electrical Engineering')]")).click(); driver.findElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'stake_amount') and contains(@text , '500')]")).click(); waitForElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'message_text') and contains(@text , 'You are about to play Electrical Engineering game with 500 coins stake.')]"), 5); driver.findElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'message_text') and contains(@text , 'You are about to play Electrical Engineering game with 500 coins stake.')]")).click(); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/positive_button")).click(); waitForVisibilityOf(By.xpath("//android.widget.TextView[contains(@resource-id , 'response') and contains(@text , 'Finding room for you...')]")); Thread.sleep(5000); try{ waitForElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'response') and contains(@text , 'Still Waiting.....')]") , 2); }catch(Exception ex){ } waitForVisibilityOf(By.xpath("//android.widget.LinearLayout[contains(@resource-id , 'question_one_linear')]/android.webkit.WebView/android.webkit.WebView/android.view.View")); String contDesc = driver.findElement(By.xpath("//android.widget.LinearLayout[contains(@resource-id , 'question_one_linear')]/android.webkit.WebView/android.webkit.WebView/*")).getAttribute("name"); Thread.sleep(7000); return new SNGTestCases(driver); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int main()\n{\n int fa,fd,fs,sa,sd,ss,aa,ad,as;\n float famt,samt,aamt;\n cin>>fa;\n cin>>fd;\n cin>>fs;\n cin>>sa;\n cin>>sd;\n cin>>ss;\n cin>>aa;\n cin>>ad;\n cin>>as;\n famt=fa-(fd*fa)/100+fs;\n samt=sa-(sd*sa)/100+ss;\n aamt=aa-(ad*aa)/100+as;\n cout<<\"In Flipkart Rs.\"<<famt<<\"\\n\";\n cout<<\"In Snapdeal Rs.\"<<samt<<\"\\n\";\n cout<<\"In Amazon Rs.\"<<aamt<<\"\\n\";\n if(famt<=samt && famt<aamt)\n cout<<\"He will prefer Flipkart\";\n else if(samt<aamt)\n cout<<\"He will prefer Snapdeal\";\n else\n cout<<\"He will prefer Amazon\";\n \n}", "protected void checkScore () {\n if (mCurrentIndex == questions.length-1) {\n NumberFormat pct = NumberFormat.getPercentInstance();\n double result = (double) correct/questions.length;\n Toast res = new Toast(getApplicationContext());\n res.makeText(QuizActivity.this, \"Your score: \" + pct.format(result), Toast.LENGTH_LONG).show();\n correct = 0; // resets the score when you go back to first question.\n }\n }", "int main()\n{\n int f_amt,f_dis,f_shp,s_amt,s_dis,s_shp,a_amt,a_dis,a_shp,f_tot,s_tot,a_tot;\n std::cin>>f_amt>>f_dis>>f_shp>>s_amt>>s_dis>>s_shp>>a_amt>>a_dis>>a_shp;\n f_dis=(f_amt/100)*f_dis;\n s_dis=(s_amt/100)*s_dis;\n a_dis=(a_amt/100)*a_dis;\n f_tot=(f_amt-f_dis)+f_shp;\n s_tot=(s_amt-s_dis)+s_shp;\n a_tot=(a_amt-a_dis)+a_shp;\n std::cout<<\"In Flipkart Rs.\"<<f_tot;\n std::cout<<\"\\nIn Snapdeal Rs.\"<<s_tot;\n std::cout<<\"\\nIn Amazon Rs.\"<<a_tot;\n if((f_tot<s_tot)&&(f_tot<a_tot)||(f_tot==s_tot)&&(f_tot<a_tot)){\n std::cout<<\"\\nHe will prefer Flipkart\";\n }\n else if((s_tot<f_tot)&&(s_tot<a_tot)||(s_tot==a_tot)&&(s_tot<f_tot)){\n std::cout<<\"\\nHe will prefer Snapdeal\";\n \n }\n else if((a_tot<f_tot)&&(a_tot<s_tot)){\n std::cout<<\"\\nHe will prefer Amazon\";\n }\n}", "public static void main(String[] args) {\nString score = JOptionPane.showInputDialog(\"What did you get on the test\");\ndouble test = Double.parseDouble(score);\nif(test>= 80) {\n\tJOptionPane.showMessageDialog(null, \"you must've studied really hard to get a \" + test);\n}\nif(test<= 79.99999999999999999999999999999999999999999999999999999999999) {\n\tJOptionPane.showMessageDialog(null, \"Maybe you should try harder next time becuase you only got a \" + test);\n}\n\t\t\n\t\t\n\t}", "public String checkNewQuestions() {\n\t\tint numAnswers = testGenerator.getNumAnswers(questionNo);\n\t\tString question = \"\";\n\n\t\tquestion += testGenerator.getQuestionText(questionNo);\n\t\tquestion += testGenerator.getAnswerText(questionNo, 1);\n\t\tquestion += testGenerator.getAnswerText(questionNo, 2);\n\n\t\tif(numAnswers >= 3) {\n\t\t\tquestion += testGenerator.getAnswerText(questionNo, 3);\n\t\t} \n\t\tif(numAnswers == 4) {\n\t\t\tquestion += testGenerator.getAnswerText(questionNo, 4);\n\t\t}\n\t\treturn question;\n\t}", "public static boolean getAndCheckStudentAnswer(int hardness) {\n\t\t\t\tint number1 = (int)(Math.random()*hardness);\n\t\t\t\tint number2 = (int)(Math.random()*hardness);\n\t\t\t\tSystem.out.print(\"Add \" + number1 + \" and \" + number2 +\": \");\n\t\t\t\t//Scanner input = new Scanner(System.in);\n\t\t\t\t//int studentAnswer = input.nextInt();\n\t\t\t\tScanner get = new Scanner(System.in);\n\t\t\t\tint studentAnswer = get.nextInt();\n\t\t\t\tif(studentAnswer == (number1 + number2)){\n\t\t\t\t\tSystem.out.print(\"Correct. \");\n\t\t\t\t\treturn true;\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"Nice try, but the correct answer was \" \n\t\t\t\t\t\t\t+ (number1 + number2) + \".\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}", "public String checkSystem() {\r\n\t\tif(currentSheeps > totalSheeps || currentSheeps < 0) {\r\n\t\t\treturn \"inconsistent!\";\r\n\t\t}\r\n\t\telse if(currentSheeps < totalSheeps) {\r\n\t\t\treturn \"incomplete!\";\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn \"complete!\";\r\n\t\t}\r\n\t}", "public void submitQuiz(View view) {\n\n if(parentKiller()) {\n question1 = 1;\n } else{\n question1 = 0;\n }\n\n if(jokerKills()) {\n question2 = 1;\n } else {\n question2 = 0;\n }\n\n if (batCity()) {\n question3 = 1;\n } else {\n question3 = 0;\n }\n\n if (checkboxQuestion()) {\n question4 = 1;\n } else {\n question4 = 0;\n }\n\n if (nameEntry()) {\n question5 = 1;\n } else {\n question5 = 0;\n }\n\n correctPoints = question1 + question2 + question3 + question4 + question5;\n\n Toast toastScore = Toast.makeText(getApplicationContext(), \"You scored \" + correctPoints + \" points!\", Toast.LENGTH_SHORT);\n toastScore.show();\n }", "void awardPoints(){\n if (currentPoints <= 100 - POINTSGIVEN) {\n currentPoints += POINTSGIVEN;\n feedback = \"Your current rating is: \" + currentPoints + \"%\";\n }\n }", "private String submitAnswersScore(int calculatedScore) {\n String totalMessagePerfect = \"Great Job! You finished with a score of \" + calculatedScore + \" out of 6!\";\n totalMessagePerfect += \"\\nYou really know your Bears history!\";\n totalMessagePerfect += \"\\nThanks for taking my quiz!\";\n\n String totalMessageAlmost = \"Great Try! You finished with a score of \" +calculatedScore + \" out of 6.\";\n totalMessageAlmost += \"\\nThanks for taking my quiz!\";\n\n if (calculatedScore == 6) {\n return totalMessagePerfect;\n }\n else {\n return totalMessageAlmost;\n }\n }", "public void quiz() {\n\t\t\t\t\tcorrectans = 0;\n\t\t\t\t\tint k = 0;\n\t\t\t\t\tint j = 0;\n\t\t\t\t\tint M = 0;\n\t\t\t\t\tj = readDifficulty();\n\t\t\t\t\tM = readProblemType();\n\t\t\t\t\t//ask the student to solve 10 different problems, as determined by the problem type\n\t\t\t for(int i = 0; i < 10; i++ ) {\n\t\t\t \t//contain two numbers sampled from a uniform random distribution with bounds determined by the problem difficulty\n\t\t\t \tint x = rand.nextInt(j); \n\t\t\t\t int y = rand.nextInt(j);\n\t\t\t\t int O = askquestion(j, M,x,y);\n\t\t\t\t if(M == 4) {\n\t\t\t\t \t float floatans = readdivision();\n\t\t\t\t \tk = divisionsol(floatans, x, y);\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t int userin = readResponse();\n\t\t\t k = isnanswercorrect(O , userin);\n\t\t\t }\n\t\t\t if(k == 1) {\n\t\t\t \t correctans++;\n\t\t\t }\n\t\t\t }\n\t\t\t int L = 0;\n\t\t\t L = displayCompletionMessage(correctans);\n\t\t\t if ( L == 1) {\n\t\t\t \tquiz();\n\t\t\t }\n\t\t\t else {\n\t\t\t \treturn;\n\t\t\t }\n\t\t\t \n\t\t\t\t}", "public void decideResult() {\n\t\t\n\t\tif (mUser.getHandValue() < 22 && mUser.getHandValue() > mDealer.getHandValue()) {\n\t\t\tmResult = \"win\";\n\t\t}else if(mUser.getHandValue() < 22 && mUser.getHandValue() == mDealer.getHandValue()) {\n\t\t\tmResult = \"draw\";\n\t\t}else {\n\t\t\tmResult = \"lose\";\n\t\t}\n\t\t\n\t}", "public static void AdditonGameMethod() {\n\t\t\t\t\n\t\t\t\tint hardness = 5;\n\t\t\t\tint hardnessStep = 2;\n\t\t\t\tint score = 0;\n\t\t\t\t\n\t\t\t\t// Set up my for loop to go through the number of rounds\n\t\t\t\tint numberOfRounds = 3;\n\t\t\t\tfor(int roundNumber = 1; \n\t\t\t\troundNumber <= numberOfRounds; \n\t\t\t\troundNumber = roundNumber + 1){\n\t\t\t\t\t//System.out.println(\"Inside the for loop. Round: \" + roundNumber);\n\t\t\t\t\tSystem.out.print(\"Round \" + roundNumber + \" of \" + numberOfRounds + \". \");\n\t\t\t\t\tboolean isAnswerCorrect = getAndCheckStudentAnswer(hardness);\n\t\t\t\t\tif(isAnswerCorrect){\n\t\t\t\t\t\tSystem.out.print(\"Your score was \" + score + \" and is now \");\n\t\t\t\t\t\tscore = score + hardness;\n\t\t\t\t\t\tSystem.out.print(score + \". \");\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(roundNumber<numberOfRounds){\n\t\t\t\t\t\t\tSystem.out.print(\"Your hardness was \" + hardness + \" and is now \");\n\t\t\t\t\t\t\thardness = hardness * hardnessStep;\n\t\t\t\t\t\t\tSystem.out.println(hardness + \".\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tSystem.out.print(\"Your score is \" + score + \". \");\n\t\t\t\t\t\tif(roundNumber<numberOfRounds){\n\t\t\t\t\t\t\tSystem.out.print(\"Your hardness was \" + hardness + \" and is now \");\n\t\t\t\t\t\t\tif(hardness>5){\n\t\t\t\t\t\t\t\thardness = hardness / hardnessStep;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tSystem.out.println(hardness + \".\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.print(\"\\nThe game is complete. \");\n\t\t\t\tSystem.out.println(\"Your final score was \" + score );\n\t\t\t}", "public void displayCorrect(){\n textPane1.setText(\"\");\r\n generatePlayerName();\r\n textPane1.setText(\"GOOD JOB! That was the correct answer.\\n\"\r\n + atBatPlayer + \" got a hit!\\n\" +\r\n \"Press Next Question, or hit ENTER, to continue.\");\r\n SWINGButton.setText(\"Next Question\");\r\n formattedTextField1.setText(\"\");\r\n formattedTextField1.setText(\"Score: \" + score);\r\n }", "public void test(int studyReq, int points) {\r\n\t\tdouble score = 0;\r\n\t\ttotalPoints+=points;\r\n\t\tif(testReadiness >= studyReq) {\r\n\t\t\tscore = points;\r\n\t\t\tcurrentPoints+=points;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcurrentPoints+=points - (studyReq - testReadiness);\r\n\t\t\tscore = points - (studyReq - testReadiness);\r\n\t\t}\r\n\t\t\r\n\t\tgrade = currentPoints/totalPoints;\r\n\t\tif(grade < 0) {\r\n\t\t\tgrade = 0;\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"You took the test today and got \" + ((score/points) * 100) + \"%\");\r\n\t\tSystem.out.println(\"hours needed: \" + studyReq + \"\\nhours Studied: \" + testReadiness);\r\n\t\ttestReadiness = 0;\r\n\t}", "@Override\n public void onClick(View v) {\n\n if (radio_g.getCheckedRadioButtonId() == -1) {\n Toast.makeText(getApplicationContext(), \"Please select one choice\", Toast.LENGTH_SHORT).show();\n return;\n }\n RadioButton uans = (RadioButton) findViewById(radio_g.getCheckedRadioButtonId());\n String ansText = uans.getText().toString();\n// String sup[]=ansText.split(\" \");\n// int m = Integer.parseInt(sup[0]);\n int m=0;\n for (int i = 0; i < opt.length ; i++)\n {\n if(ansText.equals(opt[i])){\n m=i+1;\n break;\n }\n }\n\n ans[flag++]=m;\n// CT[pos[flag]]= CT[pos[flag]] + answers[flag];\n// c++;\n// if(pos[flag] != j)\n// {\n// j++;\n// CT[flag-1]= CT[flag-1]/(c*1.0f);\n// CS= CS + CT[flag-1];\n// c=0;\n// }\n// Toast.makeText(getApplicationContext(), ansText, Toast.LENGTH_SHORT).show();\n// if(ansText.equals(answers[flag])) {\n// correct++;\n// Toast.makeText(getApplicationContext(), \"Correct\", Toast.LENGTH_SHORT).show();\n// }\n// else {\n// wrong++;\n// Toast.makeText(getApplicationContext(), \"Wrong\", Toast.LENGTH_SHORT).show();\n// }\n\n// flag++;\n//\n// if (score != null)\n// score.setText(\"\"+m);\n\n if (flag < questions.length) {\n tv.setText(questions[flag]);\n rb1.setText(opt[0]);\n rb2.setText(opt[1]);\n rb3.setText(opt[2]);\n rb4.setText(opt[3]);\n rb5.setText(opt[4]);\n\n } else {\n for (int i = x; i < 30 ; i++)\n {\n CS = CS + ans[i];\n }\n CS = CS /y;\n// for (i = 0; i < pos.length; i++) {\n// if (pos[i] == j) {\n// CT[j] = CT[j] + ans[i];\n// c++;\n// } else {\n// CT[j] = (CT[j++]*1.0f)/ (c * 1.0f);\n// c = 0;\n// i--;\n// }\n// }\n// CT[j]=CT[j]/((c)*1.0f);\n// for (i = 0; i < 13; i++) {\n// DecimalFormat df = new DecimalFormat(\"###.##\");\n//// Login.ct = Login.ct + df.format(CT[i]) + \" \";\n// CS = Double.valueOf(df.format(CT[i])) + CS;\n// }\n// Login.ct = Login.ct + \"_\";\n// DecimalFormat df = new DecimalFormat(\"###.##\");\n// String st = \" \"+ df.format(CS);\n// Login.cs = Login.cs + \" \" + st;\n i= 0; j =0; //CS = 0;\n Intent into = new Intent(getApplicationContext(), QuizResult.class);\n startActivity(into);\n }\n radio_g.clearCheck();\n }", "public void checkScore() {\n\n whatIsTurnScore();\n\n if (turn == 1) {\n\n if ((p1.getScore() - turnScore < 0) || (p1.getScore() - turnScore == 1)) {\n newScore.setText(null);\n\n displayScore();\n\n\n Toast.makeText(this, \"Bust\", Toast.LENGTH_SHORT).show();\n } else if (p1.getScore() - turnScore > 1) {\n if ((turnScore > 99) && (turnScore < 140)) {\n p1.setHundres(p1.getHundres() + 1);\n } else if ((turnScore > 139) && (turnScore < 180)) {\n p1.setOneforties(p1.getOneforties() + 1);\n } else if (turnScore == 180) {\n p1.setOneeighties(p1.getOneeighties() + 1);\n }\n calculateScore();\n\n\n displayScore();\n } else if (p1.getScore() - turnScore == 0) {\n p1.setScore(0);\n }\n }\n\n if (turn == 2) {\n if ((p2.getScore() - turnScore < 0) || (p2.getScore() - turnScore == 1)) {\n newScore.setText(null);\n teamBCheckout.setText(checkOut(p2.getScore()));\n displayScore();\n\n\n Toast.makeText(this, \"Bust\", Toast.LENGTH_SHORT).show();\n } else if (p2.getScore() - turnScore > 1) {\n\n if ((turnScore > 99) && (turnScore < 140)) {\n p2.setHundres(p2.getHundres() + 1);\n } else if ((turnScore > 139) && (turnScore < 180)) {\n p2.setOneforties(p2.getOneforties() + 1);\n } else if (turnScore == 180) {\n p2.setOneeighties(p2.getOneeighties() + 1);\n }\n calculateScore();\n\n displayScore();\n\n } else if (p2.getScore() - turnScore == 0) {\n p2.setScore(0);\n }\n\n }\n\n\n }", "public static void takeTest(Question [] questions) {\n int score = 0;\n Scanner keyboardInput = new Scanner(System.in);\n for(int i = 0; i < questions.length; i++){\n System.out.println(questions[i].prompt);\n String answer = keyboardInput.nextLine();\n if(answer.equals(questions[i].answer)) {\n score++;\n }\n\n }\n System.out.println(\"Voce conseguiu \" + score + \"/\" + questions.length + \"pontos\");\n\n }", "@Override\n\tpublic void makeDecision() {\n\t\tint powerMax = (int)(initPower) / 100;\n\t\tint powerMin = (int)(initPower * 0.3) / 100;\n\n\t\t// The value is calculated randomly from 0 to 10% of the initial power\n\t\tRandom rand = new Random();\n\t\tint actualPower = rand.nextInt((powerMax - powerMin) + 1) + powerMin;\n\t\tanswer.setConsumption(actualPower);\n\t}", "private void checkAnswer()\r\n\t{\r\n\t\t//Submission to the model and getting 'true' if correct and 'false' otherwise\r\n\t\tboolean response = quizModel.isCorrect(group.getSelection().getActionCommand());\r\n\t\t\r\n\t\t//Updating score label based on result\r\n\t\tif (response == true)\r\n\t\t{\r\n\t\t\tscoreLabel.setText(\"<html><div style='text-align: center;'>\" + \"Score = \" + quizModel.getScore() + \"<br>Correct answer!\" + \"</div></html>\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tscoreLabel.setText(\"<html><div style='text-align: center;'>\" + \"Score = \" + quizModel.getScore() + \"<br>Incorrect answer!\" + \"</div></html>\");\r\n\t\t}\r\n\t}", "public static void hitCorrect()\n\t{\n\t\tplayersCards.add(deck.deal());\n\t\tcurrentValue();\n\t\tuserCardImg[playersCards.size()-1].setIcon(new ImageIcon(Gameplay.class.getResource(getCard(playersCards.get(playersCards.size()-1)))));\n\t\tresume();\n\t\tif(calculateHand(playersCards)>21 || playersCards.size()==4 || calculateHand(playersCards)==0)\n\t\t{\n\t\t\troundEnd();\n\t\t}\n\t\t\n\t}", "public boolean askQuestion(Question curentQuestion, int level) {\n this.level = level;\n System.out.println(\"Die \"+(1+level)*100+\" Euro Frage!\");\n System.out.println(curentQuestion.getQuestion());\n //Sets the position of the right answer so it will be random\n int positionCorrectAnswer = (int) (Math.random() * ((curentQuestion.getWrongAnswers().size()) + 1));\n curentQuestion.getWrongAnswers().add(positionCorrectAnswer, curentQuestion.getCorrectAnswer());\n for (int j = 0; j < curentQuestion.getWrongAnswers().size(); j++) {\n System.out.println(\"\\t\" + (1 + j) + \". \" + curentQuestion.getWrongAnswers().get(j));\n }\n int amountOfAnswers = curentQuestion.getWrongAnswers().size();\n if (joker) {\n System.out.println(\"\\t5. 50:50 Joker\");\n amountOfAnswers = 5;\n\n }\n return getUserInput(amountOfAnswers, positionCorrectAnswer, curentQuestion);\n\n }", "private void gameHelper(int ranNum){\n\t\tif(questionAnsweredCount>=25){\n\t\t\treturn;\n\t\t}\n\t\tSystem.out.println(\"It is \" + teams[ranNum].getName() + \"'s turn to choose a question\");\n\t\t//find category\n\t\tSystem.out.println(\"Please choose a category you would like to answer: \");\n\t\tint categoryIdx = getCategory();\n\t\t//find points\n\t\tSystem.out.println(\"Please enter the dollar value of the question you wish to answer\");\n\t\tint pointIdx = getPointsIndex();\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t//now check if the question is answer knowing dollar and cat is valid\n\t\tboolean answered = board[categoryIdx][pointIdx].answeredYet();\n\t\tif(!answered){\n\t\t\tint point = points[pointIdx];\n\t\t\tSystem.out.println(board[categoryIdx][pointIdx].getQeustion());\n\t\t\tSystem.out.println(\"Enter your answer. Remember to pose it as a question.\");\n\t\t\tString ans = sc.nextLine();\n\t\t\treadExitCommand(ans); // check if the user wants to exit any point\n\t\t\treadReplayCommand(ans);\n\t\t\tboard[categoryIdx][pointIdx].answerQuestion(ans); //ask Q\n\t\t\tif(!board[categoryIdx][pointIdx].getRight()&&board[categoryIdx][pointIdx].getWarned()){\n\t\t\t\t//not in question format. give one more chance\n\t\t\t\tans = sc.nextLine();\n\t\t\t\treadExitCommand(ans);\n\t\t\t\treadReplayCommand(ans);\n\t\t\t\tboard[categoryIdx][pointIdx].answerQuestion(ans);\n\t\t\t}\n\t\t\tif(board[categoryIdx][pointIdx].getRight()){\n\t\t\t\tSystem.out.println(\"You answered it right! \" + point + \" will be added to your total\");\n\t\t\t\tquestionAnsweredCount+= 10;\n\t\t\t\tteams[ranNum].addDollars(point);\n\t\t\t\tprintDollars();\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(\"Wrong Answer!\");\n\t\t\t\tquestionAnsweredCount++; \n\t\t\t\tteams[ranNum].minusDollars(point);\n\t\t\t\tprintDollars();\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Question already answered. Choose it again\");\n\t\t\tgameHelper(ranNum); //same team choose a question again\n\t\t}\n\t\tint nextIdx = (ranNum+1)%(teams.length);\n\t\tgameHelper(nextIdx);\n\t}", "private void checkResults() {\n\n if (Dealer.calcTotal() == p1.calcTotal()) {\n System.out.println(\"You and the dealer Tie, Here is your money back.\");\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n } else if (p1.calcTotal() > Dealer.calcTotal() && !bust) {\n System.out.println(\"You win!\");\n totalWinnings += betNum;\n p1.addPointCount(betNum);\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n } else if (Dealer.calcTotal() > 31) {\n System.out.println(\"Dealer busts. You Win!\");\n totalWinnings += betNum;\n p1.addPointCount(betNum);\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n } else if (Dealer.getTotal() > p1.calcTotal() && Dealer.getTotal() < 32) {\n System.out.println(\"Dealer Wins.\");\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n p1.subPointCount(betNum);\n }\n }", "public int trickWinner(){\n Card.NUMBER one = player1Play.getValue();\n Card.NUMBER two = player2Play.getValue();\n Card.NUMBER three = player3Play.getValue();\n Card.NUMBER four = player4Play.getValue();\n Card.SUIT oneSuit = player1Play.getSuit();\n Card.SUIT twoSuit = player2Play.getSuit();\n Card.SUIT threeSuit = player3Play.getSuit();\n Card.SUIT fourSuit = player4Play.getSuit();\n int[] value = new int[4];\n value[0] = Card.getValsVal(one, oneSuit, currentTrumpSuit);\n value[1] = Card.getValsVal(two, twoSuit, currentTrumpSuit);\n value[2] = Card.getValsVal(three, threeSuit, currentTrumpSuit);\n value[3] = Card.getValsVal(four, fourSuit, currentTrumpSuit);\n if(player1Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[0] += 10;\n }\n if(player2Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[1] += 10;\n }\n if(player3Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[2] += 10;\n }\n if(player4Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[3] += 10;\n }\n if(player1Play.getSuit() == currentTrumpSuit || value[0] == 7){\n value[0] += 20;\n }\n if(player2Play.getSuit() == currentTrumpSuit || value[1] == 7){\n value[1] += 20;\n }\n if(player3Play.getSuit() == currentTrumpSuit || value[2] == 7){\n value[2] += 20;\n }\n if(player4Play.getSuit() == currentTrumpSuit || value[3] == 7){\n value[3] += 20;\n }\n int winner = 0;\n int winVal = 0;\n for(int i = 0; i < 4; i++){\n if(value[i] > winVal){\n winVal = value[i];\n winner = i;\n }\n }\n return winner;\n }", "private static int coinFlip() {\n\t\tint num = (Math.random() <= 0.5) ? 1 : 2; \n\t\tString answer;\n\t\tif ( num == 1) {\n\t\t\tanswer = \"h\";\n\t\t}else {\n\t\t\tanswer = \"t\";\n\t\t}\n\t\t\n\t\t\n\t\tScanner input = new Scanner(System.in);\n\t\t\n System.out.print(\"Enter you guess (h = heads, t = tails):\");\n String guess = input.next();\n //change the guess to lower case to accept both capital or lower case answer\n guess.toLowerCase();\n \n //gain 50 points if win the toss\n if ( guess.equals(answer)) {\n \t//System.out.println(\"You won the toss, congratulation! +50 points\");\n \treturn 50;\n }else {\n \t //System.out.println(\"Wrong guess! 0 points\");\n \t return 0;\n }\n \n\t}", "private void validateQuestion(){\n int checkedRadioButtonId = Question.getCheckedRadioButtonId();\n\n // If the correct question has been chosen, update the score & display a toast message\n if (checkedRadioButtonId == R.id.radio4_question1) {\n score = score + 2;\n }\n }", "public int awardTriviaCoins (double pct) {\n Random r = new Random();\n int min = 1;\n if (pct > 0.75) {\n min = 15;\n } else if (pct > 0.5) {\n min = 10;\n } else if (pct > 0.25) {\n min = 5;\n }\n int winnings = min + (int)(Math.ceil(r.nextInt(10) * pct));\n this.coinCount += winnings;\n this.save();\n \n UserEvent.NewCoins message = new UserEvent.NewCoins(this.id, winnings);\n notifyMe(message);\n \n return winnings;\t \n\t}", "public void submitAnswers(View view) {\n\n int points = 0;\n\n //Question 1\n RadioButton radioButton_q1 = findViewById (R.id.optionB_q1);\n boolean firstQuestionCorrect = radioButton_q1.isChecked ();\n if (firstQuestionCorrect) {\n points += 1;\n }\n //Question 2\n RadioButton radioButton_q2 = findViewById (R.id.optionC_q2);\n boolean secondQuestionCorrect = radioButton_q2.isChecked ();\n if (secondQuestionCorrect) {\n points += 1;\n }\n\n //Question 3 - in order to get a point in Question 3, three particular boxes has to be checked\n CheckBox checkAns1_q3 = findViewById (R.id.checkbox1_q3);\n boolean thirdQuestionAnswer1 = checkAns1_q3.isChecked ();\n CheckBox checkAns2_q3 = findViewById (R.id.checkbox2_q3);\n boolean thirdQuestionAnswer2 = checkAns2_q3.isChecked ();\n CheckBox checkAns3_q3 = findViewById (R.id.checkbox3_q3);\n boolean thirdQuestionAnswer3 = checkAns3_q3.isChecked ();\n CheckBox checkAns4_q3 = findViewById (R.id.checkbox4_q3);\n boolean thirdQuestionAnswer4 = checkAns4_q3.isChecked ();\n CheckBox checkAns5_q3 = findViewById (R.id.checkbox5_q3);\n boolean thirdQuestionAnswer5 = checkAns5_q3.isChecked ();\n CheckBox checkAns6_q3 = findViewById (R.id.checkbox6_q3);\n boolean thirdQuestionAnswer6 = checkAns6_q3.isChecked ();\n CheckBox checkAns7_q3 = findViewById (R.id.checkbox7_q3);\n boolean thirdQuestionAnswer7 = checkAns7_q3.isChecked ();\n if (thirdQuestionAnswer2 && thirdQuestionAnswer3 && thirdQuestionAnswer6 && !thirdQuestionAnswer1 && !thirdQuestionAnswer4 && !thirdQuestionAnswer5 && !thirdQuestionAnswer7) {\n points = points + 1;\n }\n\n //Question 4\n RadioButton radioButton_q4 = findViewById (R.id.optionC_q4);\n boolean forthQuestionCorrect = radioButton_q4.isChecked ();\n if (forthQuestionCorrect) {\n points += 1;\n }\n\n //Question 5\n EditText fifthAnswer = findViewById (R.id.q5_answer);\n String fifthAnswerText = fifthAnswer.getText ().toString ();\n if (fifthAnswerText.equals (\"\")) {\n Toast.makeText (getApplicationContext (), getString (R.string.noFifthAnswer), Toast.LENGTH_LONG).show ();\n return;\n } else if ((fifthAnswerText.equalsIgnoreCase (getString (R.string.pacific))) || (fifthAnswerText.equalsIgnoreCase (getString (R.string.pacificOcean)))) {\n points += 1;\n }\n\n //Question 6\n RadioButton radioButton_q6 = findViewById (R.id.optionA_q6);\n boolean sixthQuestionCorrect = radioButton_q6.isChecked ();\n if (sixthQuestionCorrect) {\n points += 1;\n }\n\n //Showing the result to the user\n displayScore (points);\n }", "public static void displayQuestions() {\n System.out.println(\"1. Is your character male?\");\n System.out.println(\"2. Is your character female?\");\n System.out.println(\"3. Does your character have brown hair?\");\n System.out.println(\"4. Does your character have red hair?\");\n System.out.println(\"5. Does your character have blonde hair?\");\n System.out.println(\"6. Does your character have green eyes?\");\n System.out.println(\"7. Does your character have blue eyes?\");\n System.out.println(\"8. Does your character have brown eyes?\");\n System.out.println(\"9. Is your character wearing a green shirt?\");\n System.out.println(\"10. Is your character wearing a blue shirt?\");\n System.out.println(\"11. Is your character wearing a red shirt?\");\n }", "java.lang.String getCorrectAnswer();", "public static void main(String[] args) {\n int result = 1 + 2;\n System.out.println(result);\n\n int previousResult = result;\n\n //Minus operator takes away the number that is on the right from the number on the left\n result = result - 1;\n System.out.println(result);\n\n //Times operator multiplies the numbers on either side of the operator by each other\n result = result * 10;\n System.out.println(result);\n\n //divide operator divides the number on the left by the number on the right\n result = result / 5;\n System.out.println(result);\n\n //Remainder operator gives the amount left over when you divide the number to the left of\n // the operator by the number on the right\n result = result % 3;\n System.out.println(result);\n\n //This is shorthand to adding one to a variable\n result++;\n System.out.println(result);\n\n //This is shorthand to taking away one from a variable\n result--;\n System.out.println(result);\n\n //This is short hand for keeping the previous value of the var and adding an amount to it\n result += 2;\n System.out.println(result);\n\n //This is the same but vice versa\n result -= 2;\n System.out.println(result);\n\n Boolean isCool = false;\n\n //Is whats on the left equal to whats on the right\n if (isCool == true)\n System.out.println(\"Its not cool\");\n else\n System.out.println(\"its cool\");\n\n int topScore = 100;\n\n //Is whats on the left not equal to whats on the right\n if (topScore != 100)\n System.out.println(\"Its not equal\");\n\n //Is whats on the left greater than whats on the right\n if (topScore > 100)\n System.out.println(\"Its greater\");\n\n //Is whats on the left greater than or equal whats on the right\n if (topScore >= 100)\n System.out.println(\"Its greater than or equal\");\n\n //Is whats on the left less than whats on the right\n if (topScore < 100)\n System.out.println(\"Its less\");\n\n //Is whats on the left less than or equal whats on the right\n if (topScore <= 100)\n System.out.println(\"Its less than or equal\");\n\n int secondTopScore = 200;\n\n //the && lets you compare two things, both must be true for it to work\n if ((topScore > secondTopScore) && (topScore < 100))\n System.out.println(\"greater than top score and less than 100\");\n\n //the || lets you compare two things, only one must be true for it to work\n if ((topScore > secondTopScore) || (topScore < 100))\n System.out.println(\"greater than top score and less than 100\");\n boolean isCar = false;\n\n //If isCar equals true, return true. otherwise return false\n // If car is == to value then var will now equal value. other var will equal other value\n boolean wasCar = isCar ? true : false;\n\n\n }", "private boolean checkGreedyWinRate() {\r\n return myTotal.get(0) > enTotal.get(0)+2 && (myself.health > 50 || myself.health > opponent.health);\r\n }", "public int getAnswer() {\n return myMinCoins;\n }", "private void printResults() {\n\t\tdouble percentCorrect = (double)(correctAnswers/numberAmt) * 100;\n\t\tSystem.out.println(\"Amount of number memorized: \" + numberAmt +\n\t\t\t\t \"\\n\" + \"Amount correctly answered: \" + correctAnswers +\n\t\t\t\t \"\\n\" + \"Percent correct: \" + (int)percentCorrect);\n\t}", "@Override\r\n\tpublic void checkAnswer() {\n\t\t\r\n\t}", "@Test\n public void pickUpSomeGoldTest() {\n\tassertNotEquals(0,score);\n }", "private void Proses() {\n ti = Double.valueOf(ktinggi.getText());\n bt = Double.valueOf(kberat.getText());\n \n if(jRadioButton1.isSelected()){\n h1 = (ti - 100) * 1;\n } else if (jRadioButton2.isSelected()){\n h1 = (ti - 104) * 1;\n }\n temp = Double.toString(h1.intValue());\n \n if (h1 < bt) {\n kideal.setText(temp);\n hasil.setText(\"Maaf \" + knama.getText() + \" , Sepertinya anda Overweight :( \");\n saran.setText(\"Banyaklah berolahraga dan hindari makanan berkolesterol\");\n } else if (h1 > bt) {\n kideal.setText(temp);\n hasil.setText(\"Maaf \" + knama.getText() + \" , Sepertinya anda Underweight :(\");\n saran.setText(\"Banyaklah mengkonsumsi makanan yang berkarbohidrat\");\n } else {\n kideal.setText(temp);\n hasil.setText(\"Hallo \" + knama.getText() + \" , Berat badan anda sudah ideal :)\");\n saran.setText(\"Lanjutkan pola makan teratur dan gaya hidup sehat :)\");\n }\n \n }", "public int get_correctAnswer(){return this._correctAnswer;}", "private String createQuizSummary (int points) {\n if (points >= 4){\n String pointsMessage = getString(R.string.total_points) + \" \" + points + getString(R.string.good_job);\n return pointsMessage;\n }\n else {\n String pointsMessage = getString(R.string.total_points) + \" \" + points;\n return pointsMessage;\n }\n }", "public void q3Submit(View view) {\n\n RadioButton radioButton = (RadioButton) findViewById(R.id.q3option1);\n\n //Nested if statements to check if the answer is correct or not, then to assign 2 points if it's correct.\n if (radioButton.isChecked()) {\n if (isNotAnsweredQ3) {\n display(pointCounter += 2);\n Toast.makeText(this, getString(R.string.correct2), Toast.LENGTH_SHORT).show();\n isNotAnsweredQ3 = false;\n }\n } else {\n Toast.makeText(this, getString(R.string.thinkAgain), Toast.LENGTH_SHORT).show();\n }\n }", "public int displayCompletionMessage(int correctans) {\n\t\t\t\t\tcorrectans = ((correctans * 100) / 10);\n\t\t\t\t\tSystem.out.println(\"Your score is \"+ correctans);\n\t\t\t\t\t//display the message \"Congratulations, you are ready to go to the next level!\" if the student's score is greater than or equal to 75%\n\t\t\t\t\tif(correctans >= 75) {\n\t\t\t\t\t\tSystem.out.println(\"Congratulations, you are ready to go to the next level!\");\n\t\t\t\t\t}\n\t\t\t\t\t// display the message \"Please ask your teacher for extra help.\" if the student's score is less than 75%\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.println(\"Please ask your teacher for extra help.\");\n\t\t\t\t\t}\n\t\t\t\t\t//restart when the student agrees to solve a new problem set\n\t\t\t\t\t// shall terminate when the student declines to solve another problem set\n\t\t\t\t\tSystem.out.println(\"Want to solve a new problem set? 1 for yes/ 0 for no\");\n\t\t\t\t\t int counter = resp.nextInt();\n\t\t\t\t\t return counter;\n\t\t\t\t\t\n\t\t\t}", "public double checkPot(){\r\n\t\treturn totalPot;\r\n\t}", "@Override\r\n\tpublic boolean checkQuizAnswer(String points) {\n\t\tint score = Integer.parseInt(points);\r\n\t\tif(score >80) \r\n\t\t\treturn true;\r\n\t\telse\r\n\t\t\t\treturn false;\r\n\t}", "void compute() {\n\n if (random.nextBoolean()) {\n value = value + random.nextInt(variation);\n ask = value + random.nextInt(variation / 2);\n bid = value + random.nextInt(variation / 2);\n } else {\n value = value - random.nextInt(variation);\n ask = value - random.nextInt(variation / 2);\n bid = value - random.nextInt(variation / 2);\n }\n\n if (value <= 0) {\n value = 1.0;\n }\n if (ask <= 0) {\n ask = 1.0;\n }\n if (bid <= 0) {\n bid = 1.0;\n }\n\n if (random.nextBoolean()) {\n // Adjust share\n int shareVariation = random.nextInt(100);\n if (shareVariation > 0 && share + shareVariation < stocks) {\n share += shareVariation;\n } else if (shareVariation < 0 && share + shareVariation > 0) {\n share += shareVariation;\n }\n }\n }", "public void checkAnswer(View v) {\r\n\r\n // to show the text view (textViewSubtraction2)\r\n TextView textViewSubtraction2 = (TextView) findViewById(R.id.textViewSubtraction2);\r\n textViewSubtraction2.setVisibility(View.VISIBLE);\r\n\r\n // get the answer from the edit text (subtractionAnswer)\r\n check_input = (EditText) findViewById(R.id.subtractionAnswer);\r\n int inputAnswer = Integer.parseInt(check_input.getText().toString());\r\n\r\n // clear the edit text\r\n check_input.setText(\"\");\r\n\r\n // print the result in the text view correct_answer_subtraction\r\n TextView tv = (TextView) findViewById(R.id.correct_answer_subtraction);\r\n\r\n // if for the correct answer and else to the wrong answer\r\n if (inputAnswer == answer) {\r\n counter++;\r\n tv.setText(\"Good job, you have \" + counter + \" points\" );\r\n\r\n // to hide the start text view (textViewSubtraction)\r\n TextView textViewSubtraction = (TextView) findViewById(R.id.textViewSubtraction);\r\n textViewSubtraction.setVisibility(View.INVISIBLE);\r\n\r\n // to get new data in to the (textViewSubtraction2) in order to keep count the points\r\n TextView tv3 = (TextView) findViewById(R.id.textViewSubtraction2);\r\n Random r = new Random();\r\n i = r.nextInt(100-1)+1;\r\n a = r.nextInt(100-1)+1;\r\n\r\n // to keep the greater number first\r\n if (i >= a){\r\n answer = i - a;\r\n // print the numbers\r\n tv3.setText(Integer.toString(i) + \" - \" + Integer.toString(a));\r\n }else {\r\n answer = a - i;\r\n // print the numbers\r\n tv3.setText(Integer.toString(a) + \" - \" + Integer.toString(i));\r\n }\r\n\r\n } else {\r\n\r\n // Get instance of Vibrator from current Context\r\n Vibrator vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);\r\n // Vibrate for 1000 milliseconds\r\n vibrator.vibrate(1000);\r\n\r\n // to hide the start text view (textViewSubtraction)\r\n TextView textViewSubtraction = (TextView) findViewById(R.id.textViewSubtraction);\r\n textViewSubtraction.setVisibility(View.INVISIBLE);\r\n\r\n // to get new data in to the (textViewSubtraction2) in order to keep count the points\r\n tv.setText(\"the answer is \" + Integer.toString(answer));\r\n TextView tv3 = (TextView) findViewById(R.id.textViewSubtraction2);\r\n Random r = new Random();\r\n i = r.nextInt(100-1)+1;\r\n a = r.nextInt(100-1)+1;\r\n\r\n // to keep the greater number first\r\n if (i >= a){\r\n answer = i - a;\r\n // print the numbers\r\n tv3.setText(Integer.toString(i) + \" - \" + Integer.toString(a));\r\n }else {\r\n answer = a - i;\r\n // print the numbers\r\n tv3.setText(Integer.toString(a) + \" - \" + Integer.toString(i));\r\n }\r\n } //end of if, else\r\n }", "int getWrongAnswers();", "public void q6Submit(View view) {\n\n RadioButton radioButton = (RadioButton) findViewById(R.id.q6option1);\n\n //Nested if statements to check if the answer is correct or not, then to assign 2 points if it's correct.\n if (radioButton.isChecked()) {\n if (isNotAnsweredQ6) {\n display(pointCounter += 2);\n Toast.makeText(this, getString(R.string.correct2), Toast.LENGTH_SHORT).show();\n isNotAnsweredQ6 = false;\n }\n } else {\n Toast.makeText(this, getString(R.string.thinkAgain), Toast.LENGTH_SHORT).show();\n }\n }", "public void q5Submit(View view) {\n\n RadioButton radioButton = (RadioButton) findViewById(R.id.q5option3);\n\n //Nested if statements to check if the answer is correct or not, then to assign 2 points if it's correct.\n if (radioButton.isChecked()) {\n if (isNotAnsweredQ5) {\n display(pointCounter += 2);\n Toast.makeText(this, getString(R.string.correct2), Toast.LENGTH_SHORT).show();\n isNotAnsweredQ5 = false;\n }\n } else {\n Toast.makeText(this, getString(R.string.thinkAgain), Toast.LENGTH_SHORT).show();\n }\n }", "private void bust() {\n //Dialog box pop-up\n JOptionPane.showMessageDialog(this, this.getPlayerName() + \" busted with a value of: \" + this.getValue(), \"BUSTED!\", JOptionPane.INFORMATION_MESSAGE);\n busted = true; //Hand busted\n }", "public void setTFChoices() {\r\n Random randomGenerator = new Random();\r\n int trueFalseAnswer = randomGenerator.nextInt(2);\r\n studentAnswer.add(trueFalseAnswer);\r\n }", "private void communityChest(Player currentPlayer){\n Random rand = new Random();\n int randomNum = rand.nextInt((3 - 1) + 1) + 1;\n int nextPlayer;\n if(m_currentTurn >= m_numPlayers){\n nextPlayer = 0;\n } else {\n nextPlayer = m_currentTurn+1;\n }\n\n if(randomNum == 1){\n convertTextToSpeech(\"Your new business takes off, collect 200\");\n if(m_manageFunds) {\n Log.d(\"chance add 200\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n currentPlayer.addMoney(200);\n funds.setText(String.valueOf(currentPlayer.getMoney()));\n Log.d(\"chance add 200\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n }\n }\n if(randomNum == 2){\n convertTextToSpeech(\"Your friend hires your villa for a week, \" +\n \"collect 100 off the next player\");\n if(m_manageFunds) {\n Log.d(\"chance add 100\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n currentPlayer.addMoney(100);\n funds.setText(String.valueOf(currentPlayer.getMoney()));\n Log.d(\"chance add 100\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n\n Log.d(\"chance subtract 100\", players.get(nextPlayer).getName() +\n String.valueOf(players.get(nextPlayer).getMoney()));\n players.get(nextPlayer).subtractMoney(100);\n Log.d(\"chance subtract 100\", players.get(nextPlayer).getName() +\n String.valueOf(players.get(nextPlayer).getMoney()));\n }\n }\n if(randomNum == 3){\n convertTextToSpeech(\"You receive a tax rebate, collect 300\");\n if(m_manageFunds) {\n Log.d(\"chance add 300\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n currentPlayer.addMoney(300);\n funds.setText(String.valueOf(currentPlayer.getMoney()));\n Log.d(\"chance add 300\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n }\n }\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n System.out.println(\"Do you want to try your luck with the slot machine? Type 1 for YES or 2 for NO:\");\n int answer = sc.nextInt();\n\n\n //Create If/Else based on Yes/No response\n //Create For loop to generate numbers\n //Convert int affirmation to string value\n\n if (answer == 1)\n {\n for (int i = 0; i <= 2; i++)\n {\n double j = (Math.random() *10);\n int k = (int) j;\n System.out.print(\"[\"+k+\"]\");\n }\n }\n\n else\n {\n System.out.println(\"Maybe next time!\");\n\n }\n }", "private int getCBAnswers() {\n CheckBox cbAns1 = findViewById(R.id.multiplication);\n CheckBox cbAns2 = findViewById(R.id.subtraction);\n CheckBox cbAns3 = findViewById(R.id.addition);\n CheckBox cbAns4 = findViewById(R.id.division);\n if (cbAns2.isChecked() && cbAns3.isChecked() && cbAns4.isChecked() && !cbAns1.isChecked()) {\n return 1;\n } else {\n return 0;\n }\n }", "public void calculateHighscores(){\n if((newPlayer.getScore() > (getRecord())) && (newPlayer.getScore() > getRecord2()) && (newPlayer.getScore() > getRecord3())){\n setRecord3(getRecord2());\n setRecord2(getRecord());\n setRecord(newPlayer.getScore());\n newPlayer.resetScore();\n }\n if((newPlayer.getScore() > getRecord2()) && (newPlayer.getScore() > getRecord3()) && (newPlayer.getScore() < getRecord())){\n setRecord3(getRecord2());\n setRecord2(newPlayer.getScore());\n newPlayer.resetScore();\n }\n if((newPlayer.getScore() > getRecord3()) && newPlayer.getScore() < getRecord2()){\n setRecord3(newPlayer.getScore());\n newPlayer.resetScore();\n }else{\n newPlayer.resetScore();\n\n }\n }", "public static void main(String[] args) {\n\t\tint score = 0;\n\t\t// 2. Ask the user a question\n\t\tString q1 = JOptionPane.showInputDialog(\"what is the square root of nine ?\");\n\t\tif (q1.equals(\"three\") || q1.equals(\"3\")) {\n\t\t\tJOptionPane.showMessageDialog(null, \"you got it right!!\");\n\t\t\tscore++;\n\t\t} else {\n\t\t\tJOptionPane.showMessageDialog(null, \"sorry you were wrong\");\n\t\t}\n\t\tString q2 = JOptionPane.showInputDialog(\"12 x 12\");\n\t\tif (q2.equals(\"144\")) {\n\t\t\tJOptionPane.showMessageDialog(null, \"you got it right!!\");\n\t\t\tscore++;\n\t\t} else {\n\t\t\tJOptionPane.showMessageDialog(null, \"sorry you were wrong\");\n\t\t}\n\t\tString q3 = JOptionPane.showInputDialog(\"what is 1+2+3+4+5+6+7+8+9+10 ?\");\n\t\tif (q3.equals(\"55\")) {\n\t\t\tJOptionPane.showMessageDialog(null, \"you got it right!!\");\n\t\t\tscore++;\n\t\t} else {\n\t\t\tJOptionPane.showMessageDialog(null, \"sorry you were wrong\");\n\t\t}\n\t\tString q4 = JOptionPane.showInputDialog(\"what is the strongest substance on earth ?\");\n\t\tif (q4.equals(\"diamond\")) {\n\t\t\tJOptionPane.showMessageDialog(null, \"you got it right!!\");\n\t\t\tscore++;\n\t\t} else {\n\t\t\tJOptionPane.showMessageDialog(null, \"sorry you were wrong\");\n\t\t}\n\t\t// 3. Use an if statement to check if their answer is correct\n\n\t\t// 4. if the user's answer is correct\n\n\t\t// -- add one to their score\n\n\t\t// 5. Create more questions by repeating steps 1, 2, and 3 below.\n\n\t\t// 6. After all the questions have been asked, print the user's score\n\t\tJOptionPane.showMessageDialog(null, \"you got \" + score + \" out of 4, great job!\");\n\t}", "public double getTotalScore(){\n // System.out.print(\"\\nQUIZZ TOTAL \" + quizTotal);\n return quizTotal;\n}", "public static void main(String[] args) {\nString input=JOptionPane.showInputDialog(\"What is your test score? (0-100%)\");\ndouble score=Double.parseDouble(input);\nif (score>90) {\n\tJOptionPane.showMessageDialog(null, \"Wow! You must have studied really hard for that test!\");\n}\nif (score<70) {\n\tJOptionPane.showMessageDialog(null, \"Nice try... Study harder next time!\");\n}\nif (score<90&&score>70) {\n\tJOptionPane.showMessageDialog(null, \"Good job! ... but you can do better!\");\n}\n}", "public void confirmBooking(){\n double ticketPrice = 56.0;\n double mealPrice = 30.0;\n if (student || child )\n ticketPrice = ticketPrice/2;\n else\n ticketPrice = ticketPrice*0.8;\n \n if (child )\n mealPrice = mealPrice/2;\n else\n mealPrice = mealPrice*0.9;\n double totalPrice = ticketPrice + mealPrice;\n System.out.println(getName()+\"\\nTicket price:$\"+ticketPrice+\"\\nMeal Price:$\"+mealPrice+\"\\nTotal price:$\"+totalPrice+\"\\nConfirm booking for \"+getName()+\" (Y/N)\");\n setBooked();\n System.out.println(getBooked()+\"\\n\\n\");\n }", "boolean getCorrect();", "private void giveScords(){\n \t//bingo 題數, seconds花費秒數\n \tint totalSec = (int)seconds;\n \t\n \tif(correct){\n \t\tif(totalSec<=5){\n \t\t\tuserPoints = userPoints + 150;\n \t\t}else if(totalSec<=10){\n \t\t\tuserPoints = userPoints + 125;\n \t\t}else if(totalSec<=15){\n \t\t\tuserPoints = userPoints + 100;\n \t\t}else if(totalSec<=20){\n \t\t\tuserPoints = userPoints + 80;\n \t\t}\n \t}\n }", "public void questionGenerator()\n\t{\n\t\t//creates questions\n\t\toperation = rand.nextInt(3) + min;\n\t\t\n\t\t//makes max # 10 to make it easier for user if random generator picks multiplication problem\n\t\tif (operation == 3)\n\t\t\tmax = 10; \n\t\t\n\t\t//sets random for number1 & number2\n\t\tnumber1 = rand.nextInt(max) + min; //random number max and min\n\t\tnumber2 = rand.nextInt(max) + min; \n\t\t\t\t\n\t\t//ensures final answer of problem is not negative by switching #'s if random generator picks subtraction problem\n\t\tif (operation == 2 && number1 < number2)\n\t\t{\n\t\t\tint tempNum = number1;\n\t\t\tnumber1 = number2;\n\t\t\tnumber2 = tempNum;\n\t\t}\n\t\tanswer = 0;\n\t\t\n\t\t//randomizes operator to randomize question types\n\t\tif (operation == 1)\n\t\t{\n\t\t\toperator = '+';\n\t\t\tanswer = number1 + number2;\n\t\t}\n\t\tif (operation == 2)\n\t\t{\n\t\t\toperator = '-';\n\t\t\tanswer = number1 - number2;\n\t\t}\n\t\tif (operation == 3)\n\t\t{\n\t\t\toperator = '*';\n\t\t\tanswer = number1 * number2;\n\t\t}\n\t\t\t\n\t\t//prints question\n\t\tlabel2.setText(\"Question: \" + number1 + \" \" + operator + \" \" + number2 + \" = ?\");\n\t}", "private boolean checkGreedyDefense() {\r\n return enTotal.get(2)+1 < myTotal.get(2) && enTotal.get(0)+1 < myTotal.get(0);\r\n }", "public void setQuestion(){\n Random rand = new Random();\n a = rand.nextInt(maxRange)+1;\n b = rand.nextInt(maxRange)+1;\n int res = rand.nextInt(4);\n equation.setText(a +\"+\"+ b);\n for(int i=0; i<4; i++){\n if(i == res)\n arr[i] = a+b;\n else {\n int answer = rand.nextInt(2*maxRange)+1;\n while(answer == a+b)\n answer = rand.nextInt(2*maxRange)+1;\n arr[i] = answer;\n }\n }\n for(int i=0; i<4; i++)\n buttons[i].setText(String.valueOf(arr[i]));\n }", "public void displayRoundScore() {\n\n System.out.println(\"Round stats: \");\n System.out.println(\"Par: \" + parTotal);\n System.out.println(\"Strokes: \" + strokesTotal);\n\n if(strokesTotal > parTotal) {\n System.out.println(strokesTotal-parTotal + \" over par\\n\");\n } \n else if (strokesTotal < parTotal) {\n System.out.println(parTotal-strokesTotal + \" under par\\n\");\n }\n else {\n System.out.println(\"Making par\\n\");\n }\n }", "public int getCorrect()\n\t{\n\t\treturn correct;\t\n\t}", "public static void main(String[] args) {\n int moneyAmount = 10;\n\n int capuccinoPrice = 180;\n int lattePrice = 120;\n int espressoPrice = 80;\n int pureWaterPrise = 20;\n\n var canBuyAnything = false;\n var isMilkEnough = true;\n\n if(moneyAmount >= capuccinoPrice && isMilkEnough) {\n System.out.println(\"Вы можете купить капуччино\");\n canBuyAnything = true;\n }\n\n if(moneyAmount >= lattePrice && isMilkEnough) {\n System.out.println(\"Вы можете купить латте\");\n canBuyAnything = true;\n }\n\n if(moneyAmount >= espressoPrice) {\n System.out.println(\"Вы можете купить еспрессо\");\n canBuyAnything = true;\n }\n\n if(moneyAmount >= pureWaterPrise) {\n System.out.println(\"Вы можете купить воду\");\n canBuyAnything = true;\n }\n\n if(canBuyAnything == false) {\n System.out.println(\"Недостаточно денег\");\n }\n }", "public void showQuestion()\n\t{\n\t\tSystem.out.println(ans);\n\t\tfor(int k = 0; k<numAns; k++)\n\t\t{\n\t\t\tSystem.out.println(k+\". \"+answers[k]);\n\t\t}\n\t}", "public void tossUpForTeamB(View v) {\n\n if (questionNumber <= 19) {\n scoreTeamB = scoreTeamB + 10;\n questionNumber = questionNumber + 1;\n displayQuestionNumber(questionNumber);\n displayForTeamB(scoreTeamB);\n }\n\n if (questionNumber == 20) {\n Toast.makeText(getApplicationContext(), \"Game Over!\", Toast.LENGTH_SHORT).show();\n\n }\n\n }", "private double gradeQuiz() {\n int numCorrect = getNumberCorrect();\n double percentage = (numCorrect / numQuestions) * 100;\n return percentage;\n }", "public static void resultOfPlayAllCorrect() {\n\t\tString mark=\"null\";\n\t\ttry {\n\t\t\tmark=PlayTrivia.playAllRightAnswers();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t\tif(mark==\"Sucsses\") {\n\t\t\tSystem.out.println(\"Test end page has:\" + mark + \" Test pass\");\n\t\t}else{\n\t\t\tSystem.out.println(\"Test end page - failed\");\n\t\t}\n\t}", "@SmallTest\n\tpublic void testPeekPenalty() {\n\t\tpeek();\n\t\tassertEquals((Integer) (START_SCORE - PEEK_PENALTY), Integer.valueOf(solo.getText(1).getText().toString()));\n\t}", "static void askQuestion() {\n\t\t// Setting up a Scanner to get user input\n\t\tScanner userInput = new Scanner(System.in);\n\n\t\t// Declaring variables\n\t\tdouble num1, num2, answer, userAnswer;\n\n\t\t// GENERATING QUESTION\n\n\t\t// Getting two new random numbers, rounded to one decimal place (with numbers generation from 0 to 50)\n\t\tnum1 = Math.round((Math.random() * 50)*10.0)/10.0;\n\t\tnum2 = Math.round((Math.random() * 50)*10.0)/10.0;\n\n\t\t// Generating a random number between 1 and 4 to randomize the math operation. A switch case is used to calculate the answer based on the math operation that gets generated.\n\t\tswitch ((int) Math.round(Math.random() * 3 + 1)) {\n\t\t\tcase 1: // Similar structure for each case (and the default case), structured as follows\n\t\t\t\tSystem.out.print(num1 + \" + \" + num2 + \" = \"); // Printing the question (based on the generated operation)\n\t\t\t\tanswer = num1 + num2; // Calculating the answer (based on the generated operation)\n\t\t\t\tbreak; // Exit the switch statement\n\t\t\tcase 2:\n\t\t\t\tSystem.out.print(num1 + \" - \" + num2 + \" = \");\n\t\t\t\tanswer = num1 - num2;\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tSystem.out.print(num1 + \" / \" + num2 + \" = \");\n\t\t\t\tanswer = num1 / num2;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.print(num1 + \" * \" + num2 + \" = \");\n\t\t\t\tanswer = num1 * num2;\n\t\t\t\tbreak;\n\t\t}\n\n\t\tanswer = Math.round(answer * 10.0) / 10.0; // Rounding the answer to one decimal place\n\t\tuserAnswer = userInput.nextDouble(); // Getting the user's answer\n\n\t\tif (answer == userAnswer) System.out.println(\"That's right. Good Job!\\n\"); // If the answers match, the user is correct and the staetment is printed accordingly.\n\t\telse System.out.println(\"Incorrect. The correct answer was \" + answer + \".\\n\"); // Otherwise, show that the user's answer is incorrect and output an according statement.\n\t}", "public void q2Submit(View view) {\n\n RadioButton radioButton = (RadioButton) findViewById(R.id.q2option3);\n\n //Nested if statements to check if the answer is correct or not, then to assign 2 points if it's correct.\n if (radioButton.isChecked()) {\n if (isNotAnsweredQ2) {\n display(pointCounter += 2);\n Toast.makeText(this, getString(R.string.correct2), Toast.LENGTH_SHORT).show();\n isNotAnsweredQ2 = false;\n }\n } else {\n Toast.makeText(this, getString(R.string.thinkAgain), Toast.LENGTH_SHORT).show();\n }\n }", "private void calculateScore() {\n EditText editText1 = (EditText) findViewById(R.id.edit_text1);\n String answer1 = editText1.getText().toString().toLowerCase().trim();\n if (answer1.equals( getResources().getText(R.string.answer1))) {\n score += 3;\n } else {\n //show false\n }\n\n RadioGroup radioGroup2 = (RadioGroup) findViewById(R.id.radio_group2);\n int checkedRadioButtonId2 = radioGroup2.getCheckedRadioButtonId();\n if (checkedRadioButtonId2 == R.id.rb21) {\n score += 1;\n } else {\n //show false\n }\n\n CheckBox checkBox3b = (CheckBox) findViewById(R.id.cb32);\n CheckBox checkBox3d = (CheckBox) findViewById(R.id.cb34);\n if (checkBox3b.isChecked() && checkBox3d.isChecked()) {\n score += 2;\n } else {\n //show false\n }\n\n RadioGroup radioGroup4 = (RadioGroup) findViewById(R.id.radio_group4);\n int checkedRadioButtonId4 = radioGroup4.getCheckedRadioButtonId();\n if (checkedRadioButtonId4 == R.id.rb41) {\n score += 1;\n } else {\n //show false\n }\n }", "public void bonusForTeamA(View v) {\n\n if (questionNumber <= 19) {\n\n scoreTeamA = scoreTeamA + 5;\n displayForTeamA(scoreTeamA);\n }\n\n\n if (questionNumber == 20) {\n endOfRound = \"true\";\n }\n }", "public void CheckScore(){\n \tif(killed > highScore) {\n \t\tname = JOptionPane.showInputDialog(\"You set a HighScore!\\n What is your Name?\");\n \t\thighScore = killed;\n \t}\n }", "public void q1Submit(View view) {\n\n EditText editText = (EditText) findViewById(R.id.q1enterEditText);\n String q1answer = editText.getText().toString().trim();\n\n //Nested if statements to check if the answer is correct or not, then to assign 2 points if it's correct.\n if ((q1answer.toLowerCase().equals(getString(R.string.q1AnswerCheck1))) || (q1answer.toLowerCase().equals(getString(R.string.q1AnswerCheck2)))) {\n if (isNotAnsweredQ1) {\n display(pointCounter += 2);\n Toast.makeText(this, getString(R.string.correct1), Toast.LENGTH_SHORT).show();\n isNotAnsweredQ1 = false;\n }\n } else {\n Toast.makeText(this, getString(R.string.thinkAgain), Toast.LENGTH_SHORT).show();\n }\n }", "public void submitQuiz(View view) {\n /**\n * The following variables check to see if the correct answer was selected by the user. True if selected, false if not\n */\n boolean questionOneRightAnswer = questionOneRadioButtonC.isChecked();\n boolean questionTwoRightAnswer = questionTwoRadioButtonB.isChecked();\n boolean questionThreeRightAnswer = questionThreeRadioButtonC.isChecked();\n boolean questionFourRightAnswer = questionFourRadioButtonB.isChecked();\n boolean questionFiveRightAnswerOne = questionFiveCheckBoxA.isChecked();\n boolean questionFiveWrongAnswerOne = questionFiveCheckBoxB.isChecked();\n boolean questionFiveWrongAnswerTwo = questionFiveCheckBoxC.isChecked();\n boolean questionFiveRightAnswerTwo = questionFiveCheckBoxD.isChecked();\n boolean questionSixRightAnswer = questionSixRadioButtonC.isChecked();\n boolean questionSevenRightAnswer = questionSevenRadioButtonA.isChecked();\n boolean questionEightRightAnswer = questionEightRadioButtonB.isChecked();\n boolean questionNineRightAnswer = questionNineRadioButtonA.isChecked();\n String questionTenAnswer = questionTenEditText.getText().toString();\n\n /**\n * Declaring a score variable to store the user's score from the calculateScore method\n */\n int score = calculateScore(questionOneRightAnswer, questionTwoRightAnswer, questionThreeRightAnswer, questionFourRightAnswer, questionFiveRightAnswerOne, questionFiveWrongAnswerOne, questionFiveWrongAnswerTwo, questionFiveRightAnswerTwo, questionSixRightAnswer, questionSevenRightAnswer, questionEightRightAnswer, questionNineRightAnswer, questionTenAnswer);\n\n /**\n * If the user scores a perfect 100, the following toast will appear on screen\n */\n if (score == 100) {\n Toast toast = Toast.makeText(getApplicationContext(), \"You scored a \" + score + \"\\nCongratulations Muggle!\", Toast.LENGTH_LONG);\n toast.show();\n }\n /**\n * If the user scores >= 70 < 100, the following toast will appear on screen\n */\n else if (score >= 70) {\n Toast toast = Toast.makeText(getApplicationContext(), \"You scored a \" + score + \"\\nNot bad!\", Toast.LENGTH_LONG);\n toast.show();\n }\n /**\n * If the user scores <= 70, the following toast will appear on screen\n */\n else {\n Toast toast = Toast.makeText(getApplicationContext(), \"You scored a \" + score + \"\\nTry again Mudblood.\", Toast.LENGTH_LONG);\n toast.show();\n }\n\n /**\n * Share your score with an external app\n */\n Intent sharingIntent = new Intent();\n sharingIntent.setAction(Intent.ACTION_SEND);\n sharingIntent.setType(\"text/plain\");\n sharingIntent.putExtra(Intent.EXTRA_TEXT,\"I scored \" + score + \" on the Harry Potter Quiz App!\");\n startActivity(Intent.createChooser(sharingIntent,\"Share your score!\"));\n\n clearQuizQuestions();\n }", "public void print(TickerData lowAsk, TickerData highBid) {\n\n MarginDiffCompare marginDiffCompare = new MarginDiffCompare();\n\n //percentage of returns you will make\n BigDecimal difference = marginDiffCompare.findDiff(lowAsk,highBid);\n\n //the difference between the arbitrage margin and percentage of returns\n BigDecimal marginSubDiff = marginDiffCompare.diffWithMargin(lowAsk, highBid, getArbitrageMargin());\n\n //if the arbitrage margin - the percent difference between the highestBid and lowAsk is greater than zero arbitrage detected\n if (marginSubDiff.compareTo(BigDecimal.ZERO) > 0) {\n\n System.out.println(\"=======================================================================================\");\n System.out.println(\"=======================================================================================\");\n System.out.println();\n System.out.println(\"ARBITRAGE DETECTED!!!\"\n + \" buy on \" + lowAsk.getExchange().getDefaultExchangeSpecification().getExchangeName()\n + \" for \" + lowAsk.getAsk()\n + \" and sell on \" + highBid.getExchange().getDefaultExchangeSpecification().getExchangeName()\n + \" for \" + highBid.getBid()\n + \" and make a return (before fees) of \"\n + difference\n + \"%\");\n System.out.println();\n System.out.println(\"=======================================================================================\");\n System.out.println(\"=======================================================================================\");\n System.out.println();\n\n } else {\n System.out.println(\"=======================================================================================\");\n System.out.println(\"=======================================================================================\");\n System.out.println();\n System.out.println(\"No arbitrage found\");\n System.out.println();\n System.out.println(\"=======================================================================================\");\n System.out.println(\"=======================================================================================\");\n System.out.println();\n\n }\n }", "boolean isGoodQuestion(){\n\t\treturn goodQ;\n\t}", "private void pointsChecker(Points score) {\n boolean correct_Form=true;;\n try {\n Number = Integer.parseInt(scorefield.getText());\n\n } catch (Exception e) {\n reset(true);\n JOptionPane.showMessageDialog(frame, \"Not a correct input\");\n reset(false);\n correct_Form=false;\n\n\n }\n if (Number<0) {\n reset(false);\n JOptionPane.showMessageDialog(frame, \"Score can't be lower than 0\");\n }\n else if (Number>30) {\n reset(false);\n JOptionPane.showMessageDialog(frame, \"Score can't be greater than 30\");\n\n }\n else if (correct_Form){\n if(W.isSelected()) {\n\n score.increasePointsOfWe(Number,mee.isSelected(),tegen.isSelected());\n mee.setSelected(false);\n tegen.setSelected(false);\n }\n else if(Z.isSelected()) {\n score.increasePointsOfThem(Number,mee.isSelected(),tegen.isSelected());\n mee.setSelected(false);\n tegen.setSelected(false);\n }\n reset(true);\n JOptionPane.showMessageDialog(frame, score.toString());\n\n\n }\n }", "public int tripsTest()\n\t{\n\t\tboolean trips = false;\n\t\tint index = 0, confirm = -1;\n\t\t\n\t\twhile (index<(hand.length-2) && (!trips))\n\t\t{\n\t\t\tif ((intRep[index] == intRep[index+1]) &&\n\t\t\t\t(intRep[index+1] == intRep[index+2]) &&\n\t\t\t\t(intRep[index] == intRep[index+2]) )\n\t\t\t{\n\t\t\t\thandScore = 30000;\n\t\t\t\thandScore += 3 * (100 * intRep[index]);\n\t\t\t\ttrips = true;\n\t\t\t\tconfirm = index;\n\t\t\t}\n\t\t\telse index++;\n\t\t}\n\t\t\n\t\tif (trips)\n\t\t{\n\t\t\tswitch(index)\n\t\t\t{\n\t\t\t\tcase 0:\n\t\t\t\t\thandScore += (intRep[3] + intRep[4]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\thandScore += (intRep[0] + intRep[4]);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\thandScore += (intRep[0] + intRep[1]);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn confirm;\n\t}", "public static void main(String[] args) {\t\r\n \r\n \r\n double notaConducta= 8.5;\r\n \r\n if (notaConducta > 9 && notaConducta <= 10){\r\n System.out.println(\"Su nota en conducta es A.\");\r\n \r\n \r\n\r\n }else if (notaConducta > 8 && notaConducta <= 8.99){\r\n System.out.println(\"Su nota en conducta es B.\");\r\n \r\n \r\n \r\n }else if (notaConducta > 7 && notaConducta <= 7.99){\r\n System.out.println(\"Su nota en conducta es C.\");\r\n \r\n \r\n }else if (notaConducta > 6 && notaConducta <= 6.99){\r\n System.out.println(\"Su nota en conducta es D.\");\r\n \r\n \r\n \r\n }else if (notaConducta < 6 && notaConducta >= 0){\r\n System.out.println(\"Su nota en conducta es E.\");\r\n \r\n \r\n \r\n \r\n }else{\r\n System.out.println(\"Problema en su nota de conducta, acercarse a secretaria.\");\r\n }\r\n \r\n \r\n }", "public void gamblerGame(int stake,int trials,int goal){\r\n\t\tint bets=0;\r\n\t\tint wins=0,loose=0;\r\n\t\tint cashPrice = stake;\r\n\t\tfor(int i=0;i<trials;i++)\r\n\t\t{\r\n\t\t\tif ((cashPrice > 0) && (cashPrice < goal)) {\t\r\n\t\t\t\tbets++;\r\n\t\t\t\tif (Math.random() > 0.5){\r\n\t\t\t\t\tcashPrice++;\r\n\t\t\t\t wins++;\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tcashPrice--;\r\n\t\t\t\t loose++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\tSystem.out.println(wins+\"wins of trials:\"+trials);\r\n\t\tSystem.out.println(loose+\"loose of trials\"+trials);\r\n\t\tSystem.out.println(\"% of wins:-\"+(wins*100)/trials);\r\n\t\tSystem.out.println(\"% of loose:-\"+(loose*100)/trials);\r\n\t\t}", "public EE57SubtractionQuestion() { // constructor\n a = (int)(Math.random() * 50 + 1);\n b = (int)(Math.random() * 50);\n \n if (a < b) { // check if a < b in order to do not have a negative answer\n \t\tint temp = a;\n \t\ta = b;\n \t\tb = temp;\n }\n }", "public void checkQuiz(View view) {\n int score = computeScore();\n ((TextView) findViewById(R.id.scoreTitle)).setText(R.string.score_title);\n ((TextView) findViewById(R.id.score)).setText(score + \"/\" + getQuizCountries().size());\n }", "public double get_numCorrectAns(){return this._numCorrectAns;}", "public void dealerAskCard() {\n int dealerScore = this.getDealerHand().getActualValue();\n while (dealerScore < 17) {\n Card card = this.deck.deal(this.getDealerHand());\n dealerScore = this.getDealerHand().getActualValue();\n }\n }", "private void validateQuiz() {\n int score = 0;\n String answer1 = answerOne.getText().toString();\n int answer2 = answerTwo.getCheckedRadioButtonId();\n boolean answer3 = answerThreeOptionA.isChecked() && answerThreeOptionD.isChecked() && !answerThreeOptionB.isChecked() && !answerThreeOptionC.isChecked();\n String answer4 = answerFour.getText().toString();\n int answer5 = answerFive.getCheckedRadioButtonId();\n boolean answer6 = answerSixOptionA.isChecked() && answerSixOptionB.isChecked() && answerSixOptionD.isChecked() && !answerSixOptionC.isChecked();\n if (answer1.equalsIgnoreCase(getString(R.string.answerOne))) {\n score++;\n }\n if (answer2 == answerTwoOptionA.getId()) {\n score++;\n }\n if (answer3) {\n score++;\n }\n if (answer4.equalsIgnoreCase(getString(R.string.answerFour))) {\n score++;\n }\n if (answer5 == answerFiveOptionD.getId()) {\n score++;\n }\n if (answer6) {\n score++;\n }\n String result = getString(R.string.result, score, questionList.size());\n Toast.makeText(this, result, Toast.LENGTH_SHORT).show();\n }", "public static void displayScore(final Quiz quiz) {\n\t\tint qNumber = 0;\n\t\tint totScore = 0;\n\t\tfor (question q : quiz.getQList()) {\n\t\t\tSystem.out.println(q.qText);\n\t\t\tif (q.corrChoice.equals(quiz.getAnswers(qNumber))) {\n\t\t\t\tSystem.out.println(\" Correct Answer! - Marks Awarded: \" + q.maxMarks);\n\t\t\t\ttotScore += Integer.parseInt(q.maxMarks);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\" Wrong Answer! - Penalty: \" + q.penalty);\n\t\t\t\ttotScore += Integer.parseInt(q.penalty);\n\t\t\t}\n\t\t\tqNumber += 1;\n\t\t}\n\t\tSystem.out.println(\"Total Score: \" + totScore);\n\t}", "void setQuestion(){\n int numberRange = currentLevel * 3;\n Random randInt = new Random();\n\n int partA = randInt.nextInt(numberRange);\n partA++;//not zero\n\n int partB = randInt.nextInt(numberRange);\n partB++;//not zero\n\n correctAnswer = partA * partB;\n int wrongAnswer1 = correctAnswer-2;\n int wrongAnswer2 = correctAnswer+2;\n\n textObjectPartA.setText(\"\"+partA);\n textObjectPartB.setText(\"\"+partB);\n\n //set the multi choice buttons\n //A number between 0 and 2\n int buttonLayout = randInt.nextInt(3);\n switch (buttonLayout){\n case 0:\n buttonObjectChoice1.setText(\"\"+correctAnswer);\n buttonObjectChoice2.setText(\"\"+wrongAnswer1);\n buttonObjectChoice3.setText(\"\"+wrongAnswer2);\n break;\n\n case 1:\n buttonObjectChoice2.setText(\"\"+correctAnswer);\n buttonObjectChoice3.setText(\"\"+wrongAnswer1);\n buttonObjectChoice1.setText(\"\"+wrongAnswer2);\n break;\n\n case 2:\n buttonObjectChoice3.setText(\"\"+correctAnswer);\n buttonObjectChoice1.setText(\"\"+wrongAnswer1);\n buttonObjectChoice2.setText(\"\"+wrongAnswer2);\n break;\n }\n }", "public void checkAnswerOne() {\n RadioGroup ans1 = findViewById(R.id.radio_gr_q1);\n int radioButtonId = ans1.getCheckedRadioButtonId();\n\n if (radioButtonId == R.id.a2_q1) {\n points++;\n }\n }", "public void checkScore(View view) {\n //Question Nr. 1 radio button\n RadioButton true1AnswerOne = (RadioButton) findViewById(R.id.q1a1);\n Boolean is1OneTrue = true1AnswerOne.isChecked();\n if (is1OneTrue) {\n\n }\n\n RadioButton true1AnswerTwo = (RadioButton) findViewById(R.id.q1a2);\n Boolean is1TwoTrue = true1AnswerTwo.isChecked();\n if (is1TwoTrue) {\n\n }\n\n RadioButton true1AnswerThree = (RadioButton) findViewById(R.id.q1a3);\n Boolean is1ThreeTrue = true1AnswerThree.isChecked();\n if (is1ThreeTrue) {\n score = score + 2;\n }\n\n RadioButton true1AnswerFour = (RadioButton) findViewById(R.id.q1a4);\n Boolean is1FourTrue = true1AnswerFour.isChecked();\n if (is1FourTrue) {\n score++;\n }\n\n //Question Nr. 2 radio button\n RadioButton true2AnswerOne = (RadioButton) findViewById(R.id.q2a1);\n Boolean is2OneTrue = true2AnswerOne.isChecked();\n if (is2OneTrue) {\n\n }\n\n RadioButton true2AnswerTwo = (RadioButton) findViewById(R.id.q2a2);\n Boolean is2TwoTrue = true2AnswerTwo.isChecked();\n if (is2TwoTrue) {\n\n }\n\n RadioButton true2AnswerThree = (RadioButton) findViewById(R.id.q2a3);\n Boolean is2ThreeTrue = true2AnswerThree.isChecked();\n if (is2ThreeTrue) {\n score++;\n }\n\n RadioButton true2AnswerFour = (RadioButton) findViewById(R.id.q2a4);\n Boolean is2FourTrue = true2AnswerFour.isChecked();\n if (is2FourTrue) {\n score = score + 2;\n }\n\n //Question Nr. 3 radio button\n RadioButton true3AnswerOne = (RadioButton) findViewById(R.id.q3a1);\n Boolean is3OneTrue = true3AnswerOne.isChecked();\n if (is3OneTrue) {\n\n }\n\n RadioButton true3AnswerTwo = (RadioButton) findViewById(R.id.q3a2);\n Boolean is3TwoTrue = true3AnswerTwo.isChecked();\n if (is3TwoTrue) {\n\n }\n\n RadioButton true3AnswerThree = (RadioButton) findViewById(R.id.q3a3);\n Boolean is3ThreeTrue = true3AnswerThree.isChecked();\n if (is3ThreeTrue) {\n score++;\n }\n\n RadioButton true3AnswerFour = (RadioButton) findViewById(R.id.q3a4);\n Boolean is3FourTrue = true3AnswerFour.isChecked();\n if (is3FourTrue) {\n score = score + 2;\n }\n\n //Question Nr. 4 radio button\n RadioButton true4AnswerOne = (RadioButton) findViewById(R.id.q4a1);\n Boolean is4OneTrue = true4AnswerOne.isChecked();\n if (is4OneTrue) {\n\n }\n\n RadioButton true4AnswerTwo = (RadioButton) findViewById(R.id.q4a2);\n Boolean is4TwoTrue = true4AnswerTwo.isChecked();\n if (is4TwoTrue) {\n\n }\n\n RadioButton true4AnswerThree = (RadioButton) findViewById(R.id.q4a3);\n Boolean is4ThreeTrue = true4AnswerThree.isChecked();\n if (is4ThreeTrue) {\n score++;\n }\n\n RadioButton true4AnswerFour = (RadioButton) findViewById(R.id.q4a4);\n Boolean is4FourTrue = true4AnswerFour.isChecked();\n if (is4FourTrue) {\n score = score + 2;\n }\n\n //Question Nr. 5 radio button\n RadioButton true5AnswerOne = (RadioButton) findViewById(R.id.q5a1);\n Boolean is5OneTrue = true5AnswerOne.isChecked();\n if (is5OneTrue) {\n\n }\n\n RadioButton true5AnswerTwo = (RadioButton) findViewById(R.id.q5a2);\n Boolean is5TwoTrue = true5AnswerTwo.isChecked();\n if (is5TwoTrue) {\n score = score + 2;\n }\n\n RadioButton true5AnswerThree = (RadioButton) findViewById(R.id.q5a3);\n Boolean is5ThreeTrue = true5AnswerThree.isChecked();\n if (is5ThreeTrue) {\n score++;\n }\n\n RadioButton true5AnswerFour = (RadioButton) findViewById(R.id.q5a4);\n Boolean is5FourTrue = true5AnswerFour.isChecked();\n if (is5FourTrue) {\n\n }\n\n //Question Nr. 6 radio button\n RadioButton true6AnswerOne = (RadioButton) findViewById(R.id.q6a1);\n Boolean is6OneTrue = true6AnswerOne.isChecked();\n if (is6OneTrue) {\n score = score + 2;\n }\n\n RadioButton true6AnswerTwo = (RadioButton) findViewById(R.id.q6a2);\n Boolean is6TwoTrue = true6AnswerTwo.isChecked();\n if (is6TwoTrue) {\n score++;\n }\n\n RadioButton true6AnswerThree = (RadioButton) findViewById(R.id.q6a3);\n Boolean is6ThreeTrue = true6AnswerThree.isChecked();\n if (is6ThreeTrue) {\n\n }\n\n RadioButton true6AnswerFour = (RadioButton) findViewById(R.id.q6a4);\n Boolean is6FourTrue = true6AnswerFour.isChecked();\n if (is6FourTrue) {\n\n }\n\n //Question Nr. 7 check box\n CheckBox trueAnswerSeven1 = (CheckBox) findViewById(R.id.trueq7a1);\n Boolean isSeven1True = trueAnswerSeven1.isChecked();\n CheckBox trueAnswerSeven2 = (CheckBox) findViewById(R.id.trueq7a2);\n Boolean isSeven2True = trueAnswerSeven2.isChecked();\n CheckBox trueAnswerSeven3 = (CheckBox) findViewById(R.id.trueq7a3);\n Boolean isSeven3True = trueAnswerSeven3.isChecked();\n CheckBox trueAnswerSeven4 = (CheckBox) findViewById(R.id.trueq7a4);\n Boolean isSeven4True = trueAnswerSeven4.isChecked();\n if (isSeven1True) {\n score++;\n }\n\n if (isSeven2True) {\n score++;\n }\n\n if (isSeven3True) {\n score++;\n }\n\n if (isSeven4True) {\n score++;\n }\n\n //Question Nr. 8 edit text\n EditText trueAnswerEight = (EditText) findViewById(R.id.q8a1);\n String isEightTrue = trueAnswerEight.getText().toString();\n if (isEightTrue.equals(\"Love You\")) {\n score++;\n }\n\n //Text of the message after the Check your score button is clicked.\n if (score < 6) {\n Toast.makeText(this, \"You scored \" + score + \" points out of 17. One of you might be caught in so called \\\"Passion trap\\\" (search for it in the internet). You both need to work on your relationships to improve the balance.\", Toast.LENGTH_LONG).show();\n } else if (score < 12) {\n Toast.makeText(this, \"Good! You scored \" + score + \" points out of 17! Your relationship probably needs a bit of work to take it from good to great. Search for \\\"Relationship balance or Passion trap in the internet.\", Toast.LENGTH_LONG).show();\n } else {\n Toast.makeText(this, \"Congratulations! You scored \" + score + \" points out of 17! You seem to have a good and balanced relationship with your partner.\", Toast.LENGTH_LONG).show();\n }\n score = 0;\n }", "public void solver(View view) {\n int value = a + b;\n int val = arr[Integer.parseInt(view.getTag().toString())];\n if (val == value){\n response.setText(\"Correct :)\");\n correct++;\n }else{\n response.setText(\"Wrong :(\");\n }\n total++;\n updateScoreCard();\n setQuestion();\n }", "private void checkWinner() {\n\t\tif(player.getHandVal() == BLACKJACK && dealer.getHandVal() == BLACKJACK) {\n\t\t\tSystem.out.println(\"Both players have Blackjack!\\n\");\n\t\t\tresult = \"TIE\";\n\t\t}\n\t\telse if (player.getHandVal() == BLACKJACK) {\n\t\t\tSystem.out.println(\"The Player has Blackjack!\\n\");\n\t\t\tresult = \"PLAYER\";\n\t\t}\n\t\telse if (dealer.getHandVal() == BLACKJACK) {\n\t\t\tSystem.out.println(\"The Dealer has Blackjack!\\n\");\n\t\t\tresult = \"DEALER\";\n\t\t}\n\t\telse if(player.getHandVal() > BLACKJACK && dealer.getHandVal() > BLACKJACK) {\n\t\t\tSystem.out.println(\"Both players bust!\\n\");\n\t\t\tresult = \"DEALER\";\n\t\t}\n\t\telse if(player.getHandVal() > BLACKJACK) {\n\t\t\tSystem.out.println(\"The Player has busted!\\n\");\n\t\t\tresult = \"DEALER\";\n\t\t}\n\t\telse if(dealer.getHandVal() > BLACKJACK) {\n\t\t\tSystem.out.println(\"The Dealer has busted!\\n\");\n\t\t\tresult = \"PLAYER\";\n\t\t}\n\t\telse if(player.getHandVal() > dealer.getHandVal()) {\n\t\t\tSystem.out.println(\"The Player has a higher score!\\n\");\n\t\t\tresult = \"PLAYER\";\n\t\t}\n\t\telse if(player.getHandVal() < dealer.getHandVal()){\n\t\t\tSystem.out.println(\"The dealer has a higher score!\\n\");\n\t\t\tresult = \"DEALER\";\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Both players have the same score!\\n\");\n\t\t\tresult = \"TIE\";\n\t\t}\n\t}", "public boolean test_entry() {\n\t\tboolean t = false;\n\t\tdouble val = Double.parseDouble(numericfield.getText());\n\n\t\tif (val == opt) {\n\t\t\tt = true;\n\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\"Vous avez trouvé le bon parametre pour ce remede\");\n\t\t}\n\t\t// case init > opt ---> on doit diminuer la valeur !!!!\n\t\tif (init > opt) {\n\t\t\tif (init > val && val > opt)\n\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\"Vous allez dans le bon sens , continuez\");\n\t\t\tif (init > val && opt > val)\n\t\t\t\tJOptionPane\n\t\t\t\t\t\t.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\" Vous avez raté le parametre optimale et vous allez dans le mauvais sens\");\n\t\t\tif (val > init)\n\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\" Vous allez dans le mauvais sens\");\n\t\t}\n\n\t\t// case init < opt ---> on doit augmenter la valeur !!!!\n\t\tif (init < opt) {\n\t\t\tif (init < val && val < opt)\n\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\"Vous allez dans le bon sens , continuez\");\n\t\t\tif (init < val && opt < val)\n\t\t\t\tJOptionPane\n\t\t\t\t\t\t.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\" Vous avez raté le parametre optimale et vous allez dans le mauvais sens\");\n\t\t\tif (val < init)\n\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\" Vous allez dans le mauvais sens\");\n\t\t}\n\t\treturn t;\n\t}", "private void getCorrectAnswers() {\n\t\tfor(int i = 0; i < numberAmt; i++) {\n\t\t\tif(randomNumbers.get(i).equals(answers.get(i)))\n\t\t\t\tcorrectAnswers++;\n\t\t}\n\t}", "public static void fullProof()\r\n\t{\r\n\t\twhile(true)\r\n\t\t{\r\n\t\t\tif(choice >= 1 && choice <= 4)\r\n\t\t\t{\r\n\t\t\t\tif(choice == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tsetupShop();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\telse if (choice > 1 && choice <= 4)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"You have not set up shop yet!\");\r\n\t\t\t\t\tintro();\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(choice < 1 || choice > 4)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Do not know \" + choice);\r\n\t\t\t\tintro();\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t\tintro();\r\n\t\twhile(true)\r\n\t\t{\r\n\t\t\tif(choice >= 1 && choice <= 4)\r\n\t\t\t{\r\n\t\t\t\tif(choice == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tsetupShop();\r\n\t\t\t\t\tintro();\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif(choice == 2)\r\n\t\t\t\t{\r\n\t\t\t\t\tbuy(products);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif(choice == 3 || choice == 4)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"You have not bought anything yet!\");\r\n\t\t\t\t\tintro();\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(choice < 1 || choice > 4)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Do not know \" + choice);\r\n\t\t\t\tintro();\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t\tintro();\r\n\t\twhile(true)\r\n\t\t{\r\n\t\t\tif(choice >= 1 || choice <= 4)\r\n\t\t\t{\r\n\t\t\t\tif(choice == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tsetupShop();\r\n\t\t\t\t\tintro();\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif(choice == 2)\r\n\t\t\t\t{\r\n\t\t\t\t\tbuy(products);\r\n\t\t\t\t\tintro();\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif(choice == 3)\r\n\t\t\t\t{\r\n\t\t\t\t\tlistItems(products, prices, amount);\r\n\t\t\t\t\tintro();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif(choice == 4)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"You have not listed anything yet!\");\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(choice < 0 || choice > 4)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Do not know \" + choice);\r\n\t\t\t\tintro();\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t\twhile(true)\r\n\t\t{\r\n\t\t\tif(choice >= 1 || choice <= 4)\r\n\t\t\t{\r\n\t\t\t\tif(choice == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tsetupShop();\r\n\t\t\t\t\tintro();\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif(choice == 2)\r\n\t\t\t\t{\r\n\t\t\t\t\tbuy(products);\r\n\t\t\t\t\tintro();\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif(choice == 3)\r\n\t\t\t\t{\r\n\t\t\t\t\tlistItems(products, prices, amount);\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif(choice == 4)\r\n\t\t\t\t{\r\n\t\t\t\t\tpreTotal = subTotal(productAmounts);\r\n\t\t\t\t\tcheckout(preTotal, discount, discountRate);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Do not know \" + choice);\r\n\t\t\t\tintro();\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void fetchNewQuestion()\r\n\t{\r\n\t\t//Gets question and answers from model\r\n\t\tString[] question = quizModel.getNewQuestion();\r\n\t\t\r\n\t\t//Allocates answers to a new ArrayList then shuffles them randomly\r\n\t\tArrayList<String> answers = new ArrayList<String>();\r\n\t\tanswers.add(question[1]);\r\n\t\tanswers.add(question[2]);\r\n\t\tanswers.add(question[3]);\r\n\t\tanswers.add(question[4]);\r\n\t\tCollections.shuffle(answers);\r\n\t\t\r\n\t\t//Allocates north label to the question\r\n\t\tnorthLabel.setText(\"<html><div style='text-align: center;'>\" + question[0] + \"</div></html>\");\r\n\t\t\r\n\t\t//Allocates each radio button to a possible answer. Based on strings, so randomly generated questions...\r\n\t\t//...which by chance repeat a correct answer in two slots, either will award the user a point.\r\n\t\toption1.setText(answers.get(0));\r\n\t\toption2.setText(answers.get(1));\r\n\t\toption3.setText(answers.get(2));\r\n\t\toption4.setText(answers.get(3));\r\n\t\toption1.setActionCommand(answers.get(0));\r\n\t\toption2.setActionCommand(answers.get(1));\r\n\t\toption3.setActionCommand(answers.get(2));\r\n\t\toption4.setActionCommand(answers.get(3));\r\n\t\toption1.setSelected(true);\r\n\t\t\r\n\t\t//Update score\r\n\t\tscoreLabel.setText(\"<html><div style='text-align: center;'>\" + \"Score = \" + quizModel.getScore() + \"</div></html>\");\r\n\t}", "@Test\r\n public void testSubtractionAsReversion() {\r\n Application.loadQuestions();\r\n assertTrue(Application.allQuestions.contains(\"21 - 7 = ?\") || Application.allQuestions.contains(\"21 - 14 = ?\"));\r\n }" ]
[ "0.6106893", "0.60336614", "0.6018452", "0.5980953", "0.59559214", "0.5803686", "0.5795793", "0.5783202", "0.5781048", "0.5772267", "0.5758708", "0.57571447", "0.5749874", "0.57395494", "0.5736483", "0.5718718", "0.57129025", "0.5679995", "0.5662344", "0.5650089", "0.56486034", "0.56373096", "0.56313145", "0.562694", "0.5626602", "0.56211793", "0.56163263", "0.56076604", "0.5606317", "0.5604391", "0.55991596", "0.5592817", "0.55782634", "0.556245", "0.556099", "0.55549693", "0.5553962", "0.55530095", "0.55501544", "0.55273813", "0.5519777", "0.5519268", "0.5516646", "0.55085653", "0.5507616", "0.5505979", "0.5505667", "0.5505123", "0.5503456", "0.5502017", "0.5493607", "0.54929805", "0.54918146", "0.54886174", "0.5488329", "0.5485327", "0.54777163", "0.54703385", "0.54701585", "0.5466805", "0.5459867", "0.5450396", "0.54486716", "0.5448358", "0.54452854", "0.5442497", "0.5441581", "0.5435373", "0.54344803", "0.54232836", "0.54223835", "0.54214996", "0.54190147", "0.54178435", "0.54174495", "0.541681", "0.54129785", "0.5412244", "0.5407651", "0.540592", "0.5404618", "0.54021686", "0.53999484", "0.53936374", "0.5393626", "0.5389037", "0.53870624", "0.5386347", "0.5385768", "0.5385664", "0.53802603", "0.53800815", "0.53756654", "0.5369241", "0.5367997", "0.53658605", "0.5365535", "0.5358715", "0.53556436", "0.5348311", "0.53409797" ]
0.0
-1
Options are displaying properly or not?
public SNGTestCases Options_TC1017() throws InterruptedException{ String flavour = "Electrical"; forDebugger(); waitForElement(By.id("com.pointedsquares.gamy5.android:id/header_name"),120); try{ waitForElement(By.xpath("//android.widget.TextView[contains(@text , 'Academics') and contains(@resource-id , 'itemTitle')]") , 5); }catch(Exception ex){ driver.scrollTo("Academics"); } driver.findElement(By.xpath("//android.widget.TextView[contains(@text , 'Academics') and contains(@resource-id , 'itemTitle')]/following-sibling::android.widget.TextView[contains(@text , 'More')]")).click(); waitForElement(By.id("com.pointedsquares.gamy5.android:id/search_all"), 10); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/search_all")).click(); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/search_all")).sendKeys(flavour); driver.findElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'flavour_name_list') and contains(@text , 'Electrical Engineering')]")).click(); waitForElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'stake_amount') and contains(@text , '500')]"),5); driver.findElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'stake_amount') and contains(@text , '500')]")).click(); waitForElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'message_text') and contains(@text , 'You are about to play Electrical Engineering game with 500 coins stake.')]"), 5); driver.findElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'message_text') and contains(@text , 'You are about to play Electrical Engineering game with 500 coins stake.')]")).click(); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/positive_button")).click(); waitForVisibilityOf(By.xpath("//android.widget.TextView[contains(@resource-id , 'response') and contains(@text , 'Finding room for you...')]")); Thread.sleep(5000); try{ waitForElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'response') and contains(@text , 'Still Waiting.....')]") , 2); }catch(Exception ex){ } waitForVisibilityOf(By.id("com.pointedsquares.gamy5.android:id/choice_linear")); List<WebElement> choices = driver.findElements(By.xpath("//android.widget.LinearLayout[contains(@resource-id , 'choice_linear')]/*")); boolean noOfChoice = true; if(choices.size()!=4){ noOfChoice = false; } assertTrue(noOfChoice , "Choice not equal to 4"); Thread.sleep(7000); return new SNGTestCases(driver); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void setDisplayOptions(int options) {\n\t\t\n\t}", "public void options() {\n\n audio.playSound(LDSound.SMALL_CLICK);\n if (canViewOptions()) {\n Logger.info(\"HUD Presenter: options\");\n uiStateManager.setState(GameUIState.OPTIONS);\n }\n }", "protected void showOptions(){\n mOptionList.setClickable(true);\n mOptionList.setVisibility(View.VISIBLE);\n }", "public void showOptions() {\n\t\tCIVLTable tbl_optionTable = (CIVLTable) getComponentByName(\"tbl_optionTable\");\n\t\tDefaultTableModel optionModel = (DefaultTableModel) tbl_optionTable\n\t\t\t\t.getModel();\n\n\t\tif (optionModel.getRowCount() != 0) {\n\t\t\toptionModel.setRowCount(0);\n\t\t\ttbl_optionTable.clearSelection();\n\t\t\ttbl_optionTable.revalidate();\n\t\t}\n\n\t\tGMCSection section = currConfig.getGmcConfig().getSection(\n\t\t\t\tGMCConfiguration.ANONYMOUS_SECTION);\n\t\tObject[] opts = currConfig.getGmcConfig().getOptions().toArray();\n\t\tCollection<Option> options = currConfig.getGmcConfig().getOptions();\n\t\tIterator<Option> iter_opt = options.iterator();\n\t\tList<Object> vals = new ArrayList<Object>();\n\n\t\twhile (iter_opt.hasNext()) {\n\t\t\tOption curr = iter_opt.next();\n\t\t\tvals.add(section.getValueOrDefault(curr));\n\t\t}\n\n\t\t// Sets all of the default-ize buttons\n\t\tnew ButtonColumn(tbl_optionTable, defaultize, 2);\n\n\t\tfor (int i = 0; i < vals.size(); i++) {\n\t\t\tOption currOpt = (Option) opts[i];\n\t\t\t/*\n\t\t\t * if (currOpt.name().equals(\"sysIncludePath\")) {\n\t\t\t * optionModel.addRow(new Object[] { currOpt, \"sysIncludePath\",\n\t\t\t * \"Default\" }); }\n\t\t\t * \n\t\t\t * else if (currOpt.name().equals(\"userIncludePath\")) {\n\t\t\t * optionModel.addRow(new Object[] { currOpt, \"userIncludePath\",\n\t\t\t * \"Default\" }); }\n\t\t\t */\n\t\t\t// else {\n\t\t\toptionModel\n\t\t\t\t\t.addRow(new Object[] { currOpt, vals.get(i), \"Default\" });\n\t\t\t// }\n\t\t}\n\t}", "private void displayOptions() {\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Main System Menu\");\n\t\tSystem.out.println(\"----------------\");\n\t\tSystem.out.println(\"A)dd polling place\");\n\t\tSystem.out.println(\"C)lose the polls\");\n\t\tSystem.out.println(\"R)esults\");\n\t\tSystem.out.println(\"P)er-polling-place results\");\n\t\tSystem.out.println(\"E)liminate lowest candidate\");\n\t\tSystem.out.println(\"?) display this menu of choices again\");\n\t\tSystem.out.println(\"Q)uit\");\n\t\tSystem.out.println();\n\t}", "public void printOptions() {\n\t\t\n\t}", "@Override\n\tpublic void setDisplayOptions(int options, int mask) {\n\t\t\n\t}", "public void showOptions() {\n frame.showOptions();\n }", "@Override\n\tpublic int getDisplayOptions() {\n\t\treturn 0;\n\t}", "public short getOptions()\n {\n return field_1_options;\n }", "public void testOptions() {\n OptionsOperator optionsOper = OptionsOperator.invoke();\n optionsOper.selectEditor();\n optionsOper.selectFontAndColors();\n optionsOper.selectKeymap();\n optionsOper.selectGeneral();\n // \"Manual Proxy Setting\"\n String hTTPProxyLabel = Bundle.getStringTrimmed(\n \"org.netbeans.core.ui.options.general.Bundle\", \"CTL_Use_HTTP_Proxy\");\n new JRadioButtonOperator(optionsOper, hTTPProxyLabel).push();\n // \"HTTP Proxy:\"\n String proxyHostLabel = Bundle.getStringTrimmed(\n \"org.netbeans.core.ui.options.general.Bundle\", \"CTL_Proxy_Host\");\n JLabelOperator jloHost = new JLabelOperator(optionsOper, proxyHostLabel);\n new JTextFieldOperator((JTextField) jloHost.getLabelFor()).setText(\"www-proxy.uk.oracle.com\"); // NOI18N\n // \"Port:\"\n String proxyPortLabel = Bundle.getStringTrimmed(\n \"org.netbeans.core.ui.options.general.Bundle\", \"CTL_Proxy_Port\");\n JLabelOperator jloPort = new JLabelOperator(optionsOper, proxyPortLabel);\n new JTextFieldOperator((JTextField) jloPort.getLabelFor()).setText(\"80\"); // NOI18N\n optionsOper.ok();\n }", "public void editOptions()\n {\n System.out.println(\"\\n\\t\\t:::::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| Select Options Below : |\");\n System.out.println(\"\\t\\t:::::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| [1] Modify Actors |\");\n System.out.println(\"\\t\\t| [2] Modify Rating |\");\n System.out.println(\"\\t\\t| [3] Modify Actors & Rating |\");\n System.out.println(\"\\t\\t| [4] Back To Menu |\");\n System.out.println(\"\\t\\t===================================\");\n System.out.print(\"\\t\\t Input the option number : \");\n }", "public static void showPreviousOptions() {\r\n\t\tGameOptions.bagValue.select(Main.bagValue);\r\n\t\tGameOptions.nilValueTextField.setText(Main.nilValue);\r\n\t\tGameOptions.doubleNilValueTextField.setText(Main.doubleNilValue);\r\n\t\tGameOptions.winScoreTextField.setText(Main.winScore);\r\n\t\tGameOptions.loseScoreTextField.setText(Main.loseScore);\r\n\t}", "private void deliverOptions()\n {\n int counter = 0;\n for(Option choice : options){\n counter++;\n System.out.println(\"#\" + counter + \" \" + choice.getText());\n }\n }", "@Override\n protected void options()\n {\n super.options();\n addOption(Opt.APPLICATION_ID);\n addOption(Opt.SERVER_ID);\n addOption(Opt.CATEGORY);\n addOption(Opt.NAME, \"The name of the label\");\n }", "protected Component getOptionsPanel() {\n return _options;\n }", "private void drawOptions() {\n RadioGroup rgpOptions = (RadioGroup) findViewById(R.id.rgpOptions);\n rgpOptions.removeAllViews();\n int lastId = 0;\n for (int i = 0; i < criteriaList.get(currentCriteria).getOptionList().size(); i++) {\n RadioButton rdbtn = new RadioButton(this);\n lastId = i;\n rdbtn.setId(i);\n rdbtn.setText(criteriaList.get(currentCriteria).getOptionList().get(i).getDescription());\n rdbtn.setAllCaps(true);\n rdbtn.setTextSize(18);\n rgpOptions.addView(rdbtn);\n }\n RadioButton rdbtn = new RadioButton(this);\n rdbtn.setId(lastId + 1);\n rdbtn.setText(\"No lo se\");\n rdbtn.setAllCaps(true);\n rdbtn.setTextSize(18);\n rgpOptions.addView(rdbtn);\n rgpOptions.check(rdbtn.getId());\n }", "private static void viewOptions() {\n\t\tlog.info(\"Enter 0 to Exit.\");\n\t\tlog.info(\"Enter 1 to Login.\");\n\t}", "@SuppressWarnings(\"unused\")\n\tpublic void setOptions() {\n\t\tCIVLTable tbl_optionTable = (CIVLTable) getComponentByName(\"tbl_optionTable\");\n\t\tDefaultTableModel optionModel = (DefaultTableModel) tbl_optionTable\n\t\t\t\t.getModel();\n\n\t\tObject[] opts = currConfig.getGmcConfig().getOptions().toArray();\n\t\tGMCSection section = currConfig.getGmcConfig().getAnonymousSection();\n\n\t\tCollection<Option> options = currConfig.getGmcConfig().getOptions();\n\t\tIterator<Option> iter_opt = options.iterator();\n\t\tList<Object> vals = new ArrayList<Object>();\n\n\t\tfor (int j = 0; j < optionModel.getRowCount(); j++) {\n\t\t\tvals.add(optionModel.getValueAt(j, 1));\n\t\t}\n\n\t\tfor (int i = 0; i < vals.size(); i++) {\n\t\t\tOption currOpt = (Option) opts[i];\n\t\t\tObject val = vals.get(i);\n\n\t\t\tif (!currOpt.type().equals(OptionType.MAP)) {\n\t\t\t\tif (val instanceof String\n\t\t\t\t\t\t&& currOpt.type().equals(OptionType.INTEGER)) {\n\t\t\t\t\tInteger value = Integer.valueOf((String) val);\n\t\t\t\t\tsection.setScalarValue(currOpt, value);\n\t\t\t\t}\n\t\t\t\t/*\n\t\t\t\t * else if(val == null) { section.setScalarValue(currOpt, \"\"); }\n\t\t\t\t */\n\t\t\t\telse if (true) {\n\t\t\t\t\tSystem.out.println(\"val: \" + val);\n\t\t\t\t}\n\t\t\t\tsection.setScalarValue(currOpt, val);\n\t\t\t}\n\t\t}\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 }", "@Override\n public void onOptionsSelect(int options1, int option2, int options3) {\n vMasker.setVisibility(View.GONE);\n Toast.makeText(MainActivity.this, \"\" + twoItemsOptions1.get(options1) + \" \" + twoItemsOptions2.get(option2), Toast.LENGTH_SHORT).show();\n }", "public void setOptions(){\n System.out.println(\"¿Que operacion desea realizar?\");\n System.out.println(\"\");\n System.out.println(\"1- Consultar sus datos\");\n System.out.println(\"2- Ingresar\");\n System.out.println(\"3- Retirar\");\n System.out.println(\"4- Transferencia\");\n System.out.println(\"5- Consultar saldo\");\n System.out.println(\"6- Cerrar\");\n System.out.println(\"\");\n}", "public void showOptions()\n {\n //make the options window visible\n optionsScreen.setVisible(true);\n }", "public String getOptions() {\n return this.options;\n }", "public InfoOptions() {\n\t\tHelpOpt = new ArrayList<String>();\n\t\tDisplayOpt = new ArrayList<String>();\n\t\tNoteOpt = new ArrayList<String>();\n\t\tDelOpt = new ArrayList<String>();\n\t\tChangeNameOpt = new ArrayList<String>();\n\t\tsetDisplay();\n\t\tsetHelp();\n\t\tsetNote();\n\t\tsetDel();\n\t\tsetChangeName();\n\t}", "public void testOptions() {\n \n Classifier testClassifier = null;\n try {\n testClassifier = ((Classifier) m_Classifier.getClass()\n\t .newInstance());\n } catch (InstantiationException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n \n setOptionsWereValid(true);\n setErrorText(null);\n updateDescriptionText();\n \n try {\n testClassifier.setOptions(m_Classifier.getOptions());\n } catch (Exception e) {\n \n setOptionsWereValid(false);\n setErrorText(e.getMessage());\n }\n \n updateDescriptionText();\n }", "private void displayMenuOptions()\n {\n // display user options menu\n System.out.println(\"\");\n System.out.println(\"----------------------------------------------------\");\n System.out.println(\"\");\n System.out.println(\"COMMAND OPTIONS:\");\n System.out.println(\"\");\n System.out.println(\" 'on' to force power controller to ON state\");\n System.out.println(\" 'off' to force power controller to OFF state\");\n System.out.println(\" 'status' to see current power controller state\");\n System.out.println(\" 'sunrise' to display sunrise time.\");\n System.out.println(\" 'sunset' to display sunset time.\");\n System.out.println(\" 'next' to display next scheduled event.\");\n System.out.println(\" 'time' to display current time.\");\n System.out.println(\" 'coord' to display longitude and latitude.\");\n System.out.println(\" 'help' to display this menu.\");\n System.out.println(\"\");\n System.out.println(\"PRESS 'CTRL-C' TO TERMINATE\");\n System.out.println(\"\");\n System.out.println(\"----------------------------------------------------\");\n System.out.println(\"\");\n }", "private void showSpecificOptions (Menu mMenu, LinearLayout llCO) {\n \t\t\n \t\tArrayList<Option> _SpecificOptionList = OptionManager.getSpecificOptionList(mMenu.DB_ID);\n \t\t\n for(int i=0; i<_SpecificOptionList.size(); i++) {\n \t\n \tOption _Option = _SpecificOptionList.get(i);\n \n \tLinearLayout llEachLine = new LinearLayout(this);\n llEachLine.setLayoutParams(new LayoutParams(500,LayoutParams.WRAP_CONTENT));\n llEachLine.setPadding(0, 0, 10, 4);\n llEachLine.setOrientation(LinearLayout.HORIZONTAL);\n llEachLine.setGravity(Gravity.LEFT);\n \n int nCountId = IdManager.getSpecificOptionCountId(i);\n int nDownId = nCountId - 1000;\n int nUpId = nCountId + 1000;\n \n // option name\n \n String strTextTitle = TextFormatter.getText(_Option.NAME_ENG, _Option.NAME_OTH,26);\n \n TextView tvOptionName = new TextView(this);\n tvOptionName.setGravity(Gravity.LEFT|Gravity.CENTER);\n tvOptionName.setText(strTextTitle);\n tvOptionName.setTextSize(14);\n tvOptionName.setTextColor(0xff000000);\n tvOptionName.setHeight(50);\n tvOptionName.setWidth(270);\n \n // option count \n \n TextView tvCount = new TextView(this); \n tvCount.setGravity(Gravity.CENTER);\n tvCount.setId(nCountId);\n tvCount.setText(String.valueOf(\"0\"));\n tvCount.setTextColor(0xff000000);\n tvCount.setWidth(50);\n tvCount.setHeight(30);\n \n ResourceManager.put(nCountId, tvCount);\n ResourceManager.put(tvCount, _Option);\n \n _Option.MENU_RESOURCE_ID = mMenu.RESOURCE_ID;\n \t\n // Button Down\n \n ImageButton btDown = new ImageButton(this);\n btDown.setId(nDownId);\n btDown.setBackgroundDrawable(getResources().getDrawable(R.drawable.down));\n btDown.setLayoutParams(new LayoutParams(60,60));\n btDown.setOnClickListener(new OnClickListener() {\n \t public void onClick(View v) {\n \t \t\n \t \tint nDownId = v.getId();\n \t \tint nCountId = nDownId+1000;\n \t \tint nCount = 0;\n \t \t\n \t \tTextView tvCount = (TextView) ResourceManager.get(nCountId);\n \t \tOption _Option = (Option)ResourceManager.get(tvCount);\n \t \t\n \t\tString strCount = (String) tvCount.getText();\n \t\tnCount = Integer.valueOf(strCount);\n \t \t\n \t \tif(nCount>0) {\n \t\t\t\tnCount -= 1;\n \t \t\ttvCount.setText(String.valueOf(nCount));\n \t \t\t_Option.ORDER_COUNT = nCount;\n \t \t\tOrderManager.setOptionCount(_Option.DB_ID, nCount);\n \t \t}\n \t }\n });\n \n // Button Up\n \n ImageButton btUp = new ImageButton(this);\n btUp.setId(nUpId);\n btUp.setBackgroundDrawable(getResources().getDrawable(R.drawable.up));\n btUp.setLayoutParams(new LayoutParams(60,60));\n btUp.setOnClickListener(new OnClickListener() {\n \t public void onClick(View v) {\n \t \t\n \t \tint nUpId = v.getId();\n \t \tint nCountId = nUpId - 1000;\n \t \tint nCount = 0;\n \t \t\n \t \tTextView tvCount = (TextView) ResourceManager.get(nCountId);\n \t \tOption _Option = (Option)ResourceManager.get(tvCount);\n \t \t\t\n \t\t\tString strCount = (String) tvCount.getText();\n \t\tnCount = Integer.valueOf(strCount);\n \t \tnCount += 1;\n \t \t\n \t \ttvCount.setText(String.valueOf(nCount));\n \t\t_Option.ORDER_COUNT = nCount;\n \t\tOrderManager.setOptionCount(_Option.DB_ID, nCount);\n \t }\n });\n \n llEachLine.addView(tvOptionName);\n llEachLine.addView(tvCount);\n llEachLine.addView(btDown);\n llEachLine.addView(btUp);\n \n llCO.addView(llEachLine);\n }\n \t\t\n \t}", "public void remplireListeOptions(){\r\n bddOptions.add(\"id\");\r\n bddOptions.add(\"EnvoieMail\");\r\n bddOptions.add(\"MailPeriode\");\r\n bddOptions.add(\"PeriodeJour\");\r\n bddOptions.add(\"PeriodeHeure\");\r\n bddOptions.add(\"PeriodeLun\");\r\n bddOptions.add(\"PeriodeMar\");\r\n bddOptions.add(\"PeriodeMerc\");\r\n bddOptions.add(\"PeriodeJeu\");\r\n bddOptions.add(\"PeriodeVen\");\r\n bddOptions.add(\"PeriodeSam\");\r\n bddOptions.add(\"PeriodeDim\");\r\n }", "private void printMenu() {\n\t\tSystem.out.println(\"Select an option :\\n----------------\");\n\t\tfor (int i = 0, size = OPTIONS.size(); i < size; i++) {\n\t\t\tSystem.out.println(OPTIONS.get(i));\n\t\t}\n\t}", "protected void printAllOptions() {\n\t\tOption op = null;\n\t\tfor (int i = 0; i < options.size(); i++) {\n\t\t\top = options.get(i);\n\t\t\tSystem.out.println(i + \". \" + op.getOptionName() + \":Price \"\n\t\t\t\t\t+ String.format(\"%.2f\", op.getPrice()));\n\t\t}\n\t}", "public OPTION() {\n initComponents();\n setVisible(true);\n setBounds(500,190,575,400);\n }", "public void viewOptions()\r\n {\r\n SetupScreen setupScreen = new SetupScreen();\r\n pushScreen(setupScreen);\r\n }", "private void toggleOptions() {\r\n if (_optionsHidden) {\r\n // Update the button to \"Hide Options\"\r\n _optionsBtn.setLabel(\"Hide Options\");\r\n\r\n // Show connection options\r\n add(_optionFieldsManager);\r\n _optionsHidden = false;\r\n\r\n } else {\r\n // Update the button to \"Show Options\"\r\n _optionsBtn.setLabel(\"Show Options\");\r\n\r\n // Hide connection options\r\n delete(_optionFieldsManager);\r\n _optionsHidden = true;\r\n }\r\n }", "public abstract String[] getOptions();", "@Override\n public void onOptionsSelect(int options1, int option2, int options3) {\n Toast.makeText(MainActivity.this, \"\" + items.get(options1), Toast.LENGTH_SHORT).show();\n vMasker.setVisibility(View.GONE);\n }", "private void showCommonOptions (Menu mMenu, LinearLayout llCO) {\n \t\t\n for(int i=0; i<OptionManager.getCommonOptionSize(); i++) {\n \t\n \tOption _Option = OptionManager.getCommonOption(i);\n \t\n \tLinearLayout llEachLine = new LinearLayout(this);\n\t\t\tllEachLine.setLayoutParams(new LayoutParams(500,LayoutParams.WRAP_CONTENT));\n\t\t\tllEachLine.setPadding(0, 0, 10, 4);\n\t\t\tllEachLine.setOrientation(LinearLayout.HORIZONTAL);\n\t\t\tllEachLine.setGravity(Gravity.LEFT);\n\t\t\t \n\t\t\tint nCountId = IdManager.getCommonOptionCountId(i);\n\t\t\tint nDownId = nCountId - 1000;\n\t\t\tint nUpId = nCountId + 1000;\n\t\t\t \n\t\t\t// option name\n\t\t\t \n\t\t\tString strTextTitle = TextFormatter.getText(_Option.NAME_ENG, _Option.NAME_OTH,26);\n\t\t\t \n\t\t\tTextView tvOptionName = new TextView(this);\n\t\t\ttvOptionName.setGravity(Gravity.LEFT|Gravity.CENTER);\n\t\t\ttvOptionName.setText(strTextTitle);\n\t\t\ttvOptionName.setTextSize(14);\n\t\t\ttvOptionName.setTextColor(0xff000000);\n\t\t\ttvOptionName.setHeight(50);\n\t\t\ttvOptionName.setWidth(270);\n\t\t\t \n\t\t\t// option count \n\t\t\t \n\t\t\tTextView tvCount = new TextView(this); \n\t\t\ttvCount.setGravity(Gravity.CENTER);\n\t\t\ttvCount.setId(nCountId);\n\t\t\ttvCount.setText(String.valueOf(\"0\"));\n\t\t\ttvCount.setTextColor(0xff000000);\n\t\t\ttvCount.setWidth(50);\n\t\t\ttvCount.setHeight(30);\n\t\t\t \n\t\t\t_Option.MENU_RESOURCE_ID = mMenu.RESOURCE_ID;\n\t\t\t \n\t\t\tResourceManager.put(nCountId, tvCount);\n\t\t\tResourceManager.put(tvCount, _Option);\n\t\t\t \n\t\t\t// Button Down\n\t\t\t \n\t\t\tImageButton btDown = new ImageButton(this);\n\t\t\tbtDown.setId(nDownId);\n\t\t\tbtDown.setBackgroundDrawable(getResources().getDrawable(R.drawable.down));\n\t\t\tbtDown.setLayoutParams(new LayoutParams(Property.POPUP_ARROW_IMG_WIDTH,Property.POPUP_ARROW_IMG_HEIGHT));\n\t\t\tbtDown.setOnClickListener(new OnClickListener() {\n\t\t\t\tpublic void onClick(View v) {\n \t \t\n\t\t\t\t\tint nDownId = v.getId();\n \t \tint nCountId = nDownId+1000;\n \t \tint nCount = 0;\n \t \t\n \t \tTextView tvCount = (TextView) ResourceManager.get(nCountId);\n \t \tOption _Option = (Option)ResourceManager.get(tvCount);\n \t \t\n \t\tString strCount = (String) tvCount.getText();\n \t\tnCount = Integer.valueOf(strCount);\n \t \t\n \t \tif(nCount>0) {\n \t\t\t\tnCount -= 1;\n \t \ttvCount.setText(String.valueOf(nCount));\n \t \t_Option.ORDER_COUNT = nCount;\n \t OrderManager.setOptionCount(_Option.DB_ID, nCount);\n \t \t}\n \t }\n });\n \n // Button Up\n \n ImageButton btUp = new ImageButton(this);\n btUp.setId(nUpId);\n btUp.setBackgroundDrawable(getResources().getDrawable(R.drawable.up));\n btUp.setLayoutParams(new LayoutParams(Property.POPUP_ARROW_IMG_WIDTH,Property.POPUP_ARROW_IMG_HEIGHT));\n btUp.setOnClickListener(new OnClickListener() {\n \t public void onClick(View v) {\n \t \t\n \t \tint nUpId = v.getId();\n \t \tint nCountId = nUpId - 1000;\n \t \tint nCount = 0;\n \t \t\n \t \tTextView tvCount = (TextView) ResourceManager.get(nCountId);\n \t \tOption _Option = (Option)ResourceManager.get(tvCount);\t\n \t \t\n \t \tString strCount = (String) tvCount.getText();\n \t\tnCount = Integer.valueOf(strCount);\n \t\t\n \t \tnCount += 1;\n \t \t\n \t \ttvCount.setText(String.valueOf(nCount));\n \t \t_Option.ORDER_COUNT = nCount;\n OrderManager.setOptionCount(_Option.DB_ID, nCount);\n \t }\n });\n \n llEachLine.addView(tvOptionName);\n llEachLine.addView(tvCount);\n llEachLine.addView(btDown);\n llEachLine.addView(btUp);\n \n llCO.addView(llEachLine);\n }\n \t\t\n \t}", "public static void showOptions() {\n System.out.println(new StringJoiner(\"\\n\")\n .add(\"*************************\")\n .add(\"1- The participants' directory.\")\n .add(\"2- The RDVs' agenda.\")\n .add(\"3- Quit the app.\")\n .add(\"*************************\")\n );\n }", "private void initOption() {\r\n\t\tthis.option = new JMenu(\"Options\");\r\n\t\tthis.add(option);\r\n\t\tthis.initNewGame();\r\n\t\tthis.initNewServer();\r\n\t\tthis.initNewConnect();\r\n\t\tthis.initExitConnect();\r\n\t\tthis.initExitGame();\r\n\t}", "public String setBoxOptionString(){\n\t\tString result;\n\t\t\n\t\tif(optionsList.size() == 1){\n\t\t\tresult = optionsList.get(0);\n\t\t\toptionsList.remove(result);\n\t\t} \n\t\telse {\n\t\t\tint option = (int) (Math.random() * optionsList.size());\n\t\t\tresult = optionsList.get(option);\n\t\t\toptionsList.remove(result);\n\t\t}\n\t\treturn result;\n\t}", "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}", "@Override\n\tabstract protected List<String> getOptionsList();", "public static void options(){\n System.out.println(\"Choose from the following options \");\n System.out.println(\"0 Print the options again\");\n System.out.println(\"1 Create Student Records\");\n System.out.println(\"2 Create Teacher Records\");\n System.out.println(\"3 Edit the Records\");\n System.out.println(\"4 Get the Record Count\");\n System.out.println(\"5 Exit\");\n }", "protected abstract void addMenuOptions();", "Map getOptions();", "public String showSmallMenuOptions(){\n stringBuilder = new StringBuilder();\n menuLoader = new MenuLoader();\n int counter = 0;\n for (String key: menuLoader.getSmallMenu().keySet()) {\n counter++;\n stringBuilder.append(\" '\" + key + \"',\");\n if (counter%10 == 0){\n stringBuilder.append(\"\\n\");\n }\n }\n return stringBuilder.toString();\n }", "@DISPID(1610743816) //= 0x60020008. The runtime will prefer the VTID if present\r\n @VTID(15)\r\n int viewOptions();", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\toptionsDialog();\r\n\t\t\t}", "public String getOptionText() {\n return option;\n }", "private String optionsManager() {\n\t\tSystem.out.print(\"\\nEntrez votre choix SVP: \");\n\t\tScanner scan = new Scanner(System.in);\n\t\tString option = \"\";\n\t\toption = scan.nextLine();\n\t\t\n\t\tString etatDeHotel = this.isOuvert()? \"L'Hôtel est ouvert ! \" : \"L'Hôtel n'est pas ouvert ! \";\t\t\n\t\tString doitEtreAfficher = option.equalsIgnoreCase(\"A\")? \"\\n\"+etatDeHotel+\"\\n\" \n\t\t\t\t: option.equalsIgnoreCase(\"B\")? \"\\nLe nombre de chambres réservées est: \"+ this.chambresNonVides().size()+\"\\n\"\n\t\t\t\t: option.equalsIgnoreCase(\"C\") ? \"\\nLe nombre de chambres vides est: \"+ this.chambresVides().size()+\"\\n\"\n\t\t\t\t: option.equalsIgnoreCase(\"D\")? \"\\nLe nombre de la première chambre vide est : \"+this.chambresVides().get(0).getId()+\"\\n\"\n\t\t\t\t: option.equalsIgnoreCase(\"E\")? \"\\nLe nombre de la dernière chambre vide est : \"+this.chambresVides().get(this.chambresVides().size()-1).getId()+\"\\n\"\n\t\t\t\t: option.equalsIgnoreCase(\"H\")? \"\\n-La commande Q ou Quit sont pour arrêtrer le programe.\\n-Il faut choisir un letter pour les options.\\n-La commande O pour afficher toutes les options possibles! \"\n\t\t\t\t: option.equalsIgnoreCase(\"n\")? \"----------------------------------\\nVous avez été dirigé vers le menu principale\"\n\t\t\t\t: option.equalsIgnoreCase(\"m\")? \"\\n-----------\\nMerci\\n----------------\\n\"\n\t\t\t\t: option.equalsIgnoreCase(\"q\")? \"q\"\n\t\t\t\t: option.equalsIgnoreCase(\"quit\")? \"q\"\n\t\t\t\t: option.equalsIgnoreCase(\"o\")? \"o\"\n\t\t\t\t: option.equalsIgnoreCase(\"f\")? \"f\"\n\t\t\t\t: option.equalsIgnoreCase(\"g\")? \"g\"\n\t\t\t\t:\"x\";\n\t\treturn doitEtreAfficher;\n\t}", "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}", "@Test\n public void testGetOptions()\n {\n List<String> labels = new ArrayList<>();\n labels.add(\"option 1\");\n labels.add(\"option 2\");\n labels.add(\"option 3\");\n when(m_AttributeModel.getOptionLabels()).thenReturn(labels);\n \n List<String> values = new ArrayList<>();\n values.add(\"1\");\n values.add(\"2\");\n values.add(\"3\");\n when(m_AttributeModel.getOptionValues()).thenReturn(values);\n \n m_SUT = new ConfigPropModelImpl(m_AttributeModel);\n\n assertThat(m_SUT.getOptions().size(), is(3));\n assertThat(m_SUT.getOptions().get(0).getLabel(), is(\"option 1\"));\n assertThat(m_SUT.getOptions().get(0).getValue(), is(\"1\"));\n assertThat(m_SUT.getOptions().get(1).getLabel(), is(\"option 2\"));\n assertThat(m_SUT.getOptions().get(1).getValue(), is(\"2\"));\n assertThat(m_SUT.getOptions().get(2).getLabel(), is(\"option 3\"));\n assertThat(m_SUT.getOptions().get(2).getValue(), is(\"3\"));\n }", "public void setOptions(String value) {\n this.options = value;\n }", "@SuppressWarnings(\"rawtypes\")\n\tpublic abstract Enumeration listOptions();", "protected void synchronizeComponentsToOptions() {\r\n periodTimeComponent.setValue( new Long( periodTime ) );\r\n maxNumberOfPlayersComponent.setValue( new Integer( maxNumberOfPlayers ) );\r\n mapWidthComponent.setSelectedItem( Integer.toString( mapWidth ) );\r\n mapHeightComponent.setValue( new Integer( mapHeight ) );\r\n welcomeMessageComponent.setText( welcomeMessage );\r\n gameTypeComponent.setSelectedIndex( gameType );\r\n isKillLimitComponent.setSelected( isKillLimit );\r\n killLimitComponent.setValue( new Integer( killLimit ) );\r\n isTimeLimitComponent.setSelected( isTimeLimit );\r\n timeLimitComponent.setValue( new Integer( timeLimit ) );\r\n passwordComponent.setText( password );\r\n amountOfWallRubblesComponent.setValue( new Integer( amountOfWallRubbles ) );\r\n amountOfBloodComponent.setValue( new Integer( amountOfBlood ) );\r\n amountOfWallComponent.setValue( new Integer( amountOfWall ) );\r\n amountOfStoneComponent.setValue( new Integer( amountOfStone ) );\r\n amountOfWaterComponent.setValue( new Integer( amountOfWater ) );\r\n }", "public abstract Options getOptions();", "public void showOptionsPanel(){\n optionsPanel.showOptionsPanel();\n if(!optionsPanel.isVisible() && iconPanel.isVisible()) iconPanel.setVisible(false);\n if(optionsPanel.isVisible()&& mapTypePanel.isVisible()) mapTypePanel.setVisible(false);\n if(routePanel.isVisible()) routePanel.setVisible(false); closeDirectionList();\n canvas.repaint();\n }", "public void option() {\n ReusableActionsPageObjects.clickOnElement(driver, options, logger, \"user options.\");\n }", "public static void displayOptions(Account account) {\n\t\tSystem.out.println(\"\\nOptions:\");\n\t\tSystem.out.println(\"1. Display account details\");\n\t\tSystem.out.println(\"2. Display account balance\");\n\t\tSystem.out.println(\"3. Display monthly interest\");\n\t\tSystem.out.println(\"4. Make a withdrawal\");\n\t\tSystem.out.println(\"5. Make a deposit\");\n\n\t\tif (account instanceof CheckingAccount) {\n\t\t\tSystem.out.println(\"6. Display overdraft limit\");\n\t\t\tSystem.out.println(\"7. Change overdraft limit\");\n\t\t}\n\t\t\n\t\tSystem.out.println(\"0. To exit\");\n\t\tSystem.out.print(\"Select an option (int): \");\n\t}", "public static void showAgendaOptions() {\n System.out.println(new StringJoiner(\"\\n\")\n .add(\"*************************\")\n .add(\"1- View all scheduled RDVs\")\n .add(\"2- Add a new RDV\")\n .add(\"3- Show all RDVs between 2 dates (sorted).\")\n .add(\"4- Show all RDVs of a certain participant between 2 dates.\")\n .add(\"5- Remove an RDV\")\n .add(\"6- Return to the previous menu.\")\n .add(\"*************************\")\n );\n }", "private void testInstanceOption() {\r\n\t\t\r\n\t\tString optionAllowObjects = AFD_FSDK_Library.OPTION_ALLOW_OBJECTS;\r\n\t\tString optionCallingConvention = AFD_FSDK_Library.OPTION_CALLING_CONVENTION;\r\n\t\tString optionClassLoader = AFD_FSDK_Library.OPTION_CLASSLOADER;\r\n\t\tString optionFuncitonMapper = AFD_FSDK_Library.OPTION_FUNCTION_MAPPER;\r\n\t\tString optionInvocationMapper = AFD_FSDK_Library.OPTION_INVOCATION_MAPPER;\r\n\t\tString optionOpenFlags = AFD_FSDK_Library.OPTION_OPEN_FLAGS;\r\n\t\tString optionStringEncoding = AFD_FSDK_Library.OPTION_STRING_ENCODING;\r\n\t\tString optionStructureAlignment = AFD_FSDK_Library.OPTION_STRUCTURE_ALIGNMENT;\r\n\t\tString optionTypeMapper = AFD_FSDK_Library.OPTION_TYPE_MAPPER;\r\n\t\t\r\n\t\tSystem.out.println(\"OPTION_ALLOW_OBJECTS: \" + optionAllowObjects);\r\n\t\tSystem.out.println(\"OPTION_CALLING_CONVENTION: \" + optionCallingConvention);\r\n\t\tSystem.out.println(\"OPTION_CLASSLOADER: \" + optionClassLoader);\r\n\t\tSystem.out.println(\"OPTION_FUNCTION_MAPPER: \" + optionFuncitonMapper);\r\n\t\tSystem.out.println(\"OPTION_INVOCATION_MAPPER: \" + optionInvocationMapper);\r\n\t\tSystem.out.println(\"OPTION_OPEN_FLAGS: \" + optionOpenFlags);\r\n\t\tSystem.out.println(\"OPTION_STRING_ENCODING: \" + optionStringEncoding);\r\n\t\tSystem.out.println(\"OPTION_STRUCTURE_ALIGNMENT: \" + optionStructureAlignment);\r\n\t\tSystem.out.println(\"OPTION_TYPE_MAPPER: \" + optionTypeMapper);\r\n\t}", "@Override\n\tpublic String[] getOptions() {\n\t\treturn null;\n\t}", "public OptionsPanel() {\n initComponents();\n }", "@Override\n\tpublic Enumeration listOptions() {\n\t\treturn null;\n\t}", "public static void defaultGameOptions() {\r\n\t\tGameOptions.doubleNilValueTextField.setText(\"200\");\r\n\t\tGameOptions.winScoreTextField.setText(\"500\");\r\n\t\tGameOptions.loseScoreTextField.setText(\"-200\");\r\n\t\t\r\n\t\tMain.doubleNilValue = \"200\";\r\n\t\tMain.winScore = \"500\";\r\n\t\tMain.loseScore = \"-200\";\r\n\r\n\t\t//Use the appropriate value for bagValue when three handed.\r\n\t\tif (Main.isThreeHanded){\r\n\t\t\tGameOptions.bagValue.select(\"2\");\r\n\t\t\tGameOptions.nilValueTextField.setText(\"100\");\r\n\t\t\tGameOptions.nilAllowed.setState(true);\r\n\t\t\tGameOptions.doubleNilAllowed.setState(true);\r\n\t\t\tGameOptions.nilValueTextField.setEditable(true);\r\n\t\t\tGameOptions.doubleNilValueTextField.setEditable(true);\r\n\r\n\t\t\tMain.bagValue = \"2\";\r\n\t\t\tMain.nilValue = \"100\";\r\n\t\t\tMain.isNilAllowed = true;\r\n\t\t\tMain.isDoubleNilAllowed = true;\r\n\t\t//Use the appropriate value for bagValue when four handed single.\r\n\t\t} else if (Main.isFourHandedSingle){\r\n\t\t\tGameOptions.bagValue.select(\"1\");\r\n\t\t\tGameOptions.nilValueTextField.setText(\"50\");\r\n\t\t\tGameOptions.nilAllowed.setState(true);\r\n\t\t\tGameOptions.doubleNilAllowed.setState(false);\r\n\t\t\tGameOptions.nilValueTextField.setEditable(true);\r\n\t\t\tGameOptions.doubleNilValueTextField.setEditable(false);\r\n\r\n\t\t\tMain.bagValue = \"1\";\r\n\t\t\tMain.nilValue = \"50\";\r\n\t\t\tMain.isNilAllowed = true;\r\n\t\t\tMain.isDoubleNilAllowed = false;\r\n\t\t//Use the appropriate value for bagValue when four handed teams.\r\n\t\t} else {\r\n\t\t\tGameOptions.bagValue.select(\"1\");\r\n\t\t\tGameOptions.nilValueTextField.setText(\"50\");\r\n\t\t\tGameOptions.nilAllowed.setState(true);\r\n\t\t\tGameOptions.doubleNilAllowed.setState(true);\r\n\t\t\tGameOptions.nilValueTextField.setEditable(true);\r\n\t\t\tGameOptions.doubleNilValueTextField.setEditable(true);\r\n\r\n\t\t\tMain.bagValue = \"1\";\r\n\t\t\tMain.nilValue = \"50\";\r\n\t\t\tMain.isNilAllowed = true;\r\n\t\t\tMain.isDoubleNilAllowed = true;\r\n\t\t}\r\n\t}", "@Nullable\n/* */ public Options getOptions() {\n/* 67 */ return this.options;\n/* */ }", "public Option()\n {\n setOptionName(\"___\");\n setOptionPrice(9999.99);\n }", "private boolean canViewOptions() {\n\n return uiStateManager.getState().equals(GameUIState.WAVE_IN_PROGRESS)\n || uiStateManager.getState().equals(GameUIState.STANDBY);\n }", "protected void hideOptions(){\n mOptionList.setClickable(false);\n mOptionList.setVisibility(View.INVISIBLE);\n }", "boolean hasOptions();", "boolean hasOptions();", "boolean hasOptions();", "boolean hasOptions();", "boolean hasOptions();", "boolean hasOptions();", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tClickOption();\n\t\t\t\t\n\t\t\t}", "@Test\n\tpublic void testGetOptions_1()\n\t\tthrows Exception {\n\t\tRadioGroup fixture = new RadioGroup();\n\t\tfixture.setOptions(new ArrayList<String>());\n\n\t\tList<String> result = fixture.getOptions();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(0, result.size());\n\t}", "public String showMainCourseMenuOptions(){\n stringBuilder = new StringBuilder();\n int counter = 0;\n for (String key : menuLoader.getMainCourseMenu().keySet()) {\n counter++;\n stringBuilder.append(\" '\" + key + \"',\");\n if (counter%10 == 0){\n stringBuilder.append(\"\\n\");\n }\n }\n return stringBuilder.toString();\n }", "public void searchOptions()\n {\n System.out.println(\"\\n\\t\\t:::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| Select Options Below : |\");\n System.out.println(\"\\t\\t:::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| [1] Search by - Title |\");\n System.out.println(\"\\t\\t| [2] Search by - Directors |\");\n System.out.println(\"\\t\\t| [3] Back To Menu |\");\n System.out.println(\"\\t\\t=================================\");\n System.out.print(\"\\t\\t Input the option number : \"); \n }", "private void showBurstOptionDialog() {\n\t\t// TODO Auto-generated method stub\n\t\tCharSequence title = res.getString(R.string.setting_burst);\n\n\t\tfinal String[] burstUIString = uiDisplayResource.getBurstNumUIString();\n\t\tif (burstUIString == null) {\n\t\t\tWriteLogToDevice.writeLog(\"[Error] -- SettingView: \",\n\t\t\t\t\t\"burstUIString == null\");\n\t\t\treturn;\n\t\t}\n\t\tint length = burstUIString.length;\n\n\t\tint curIdx = 0;\n\t\tUIInfo uiInfo = reflection.refecltFromSDKToUI(\n\t\t\t\tSDKReflectToUI.SETTING_UI_BURST,\n\t\t\t\tcameraProperties.getCurrentBurstNum());\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tif (burstUIString[i].equals(uiInfo.uiStringInSetting)) {\n\t\t\t\tcurIdx = i;\n\t\t\t}\n\t\t}\n\n\t\tDialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\t\t\t\tint value = (Integer) reflection.refecltFromUItoSDK(\n\t\t\t\t\t\tUIReflectToSDK.SETTING_SDK_BURST, burstUIString[arg1]);\n\t\t\t\tcameraProperties.setCurrentBurst(value);\n\t\t\t\tpreviewHandler.obtainMessage(\n\t\t\t\t\t\tGlobalApp.MESSAGE_UPDATE_UI_BURST_ICON).sendToTarget();\n\t\t\t\targ0.dismiss();\n\t\t\t\tsettingValueList = getSettingValue();\n\t\t\t\tif (optionListAdapter == null) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\toptionListAdapter.notifyDataSetChanged();\n\t\t\t}\n\t\t};\n\t\tshowOptionDialog(title, burstUIString, curIdx, listener, true);\n\t}", "@Test(priority=5)\r\n\tpublic void displayGroupByListBox() {\r\n\t\t\r\n\t\tboolean expected=true;\r\n\t\tboolean actual=filterReturnsList.displayGroupByListboxOptions();\r\n\t\tassertEquals(actual, expected);\r\n\t}", "public void chooseMenuOption(Number[] options) {\r\n for (int i = 0; i < options.length; i++) {\r\n switch (options[i].intValue()) {\r\n case 0:\r\n //returns the entered from console Number array corresponding to specific input colour\r\n Number[] numbers = chooseParameters(INTEGER_DELIMITERS, View.INPUT_COLOUR, true);\r\n //if there are any values corresponding to the ordinal of Colour enum,\r\n // the predicate chaining is passed to the model\r\n model.setFilterPredicate(s -> findNumberInArray(numbers, s.getColour().ordinal()));\r\n break;\r\n case 1:\r\n numbers = chooseParameters(INTEGER_DELIMITERS, View.MATERIAL_RANGE, true);\r\n model.setFilterPredicate(s -> findNumberInArray(numbers, s.getMaterial().ordinal()));\r\n break;\r\n case 2:\r\n numbers = chooseParameters(INTEGER_DELIMITERS, View.CUT_RANGE, true);\r\n model.setFilterPredicate(s -> findNumberInArray(numbers, s.getCut().ordinal()));\r\n break;\r\n case 3:\r\n numbers = chooseParameters(DOUBLE_DELIMITERS, View.WEIGHT_RANGE, false);\r\n model.setFilterPredicate(s -> findNumberInArray(numbers, s.getWeight()));\r\n break;\r\n case 4:\r\n numbers = chooseParameters(INTEGER_DELIMITERS, View.CLARITY_RANGE, true);\r\n model.setTranspFilterPredicate(s -> findNumberInArray(numbers, s.getClarity()));\r\n break;\r\n case 5:\r\n view.printMessage(View.BREAK);\r\n return;\r\n }\r\n }\r\n model.build();\r\n view.printMessage(View.SELECTED_GEMS + model.getChain() +\r\n View.NECKLACE_WEIGHT + model.calculateWeight() +\r\n View.NECKLACE_PRICE + model.calculatePrice());\r\n model.sortGems();\r\n view.printMessage(View.SORT_ON_PRICE + model.getChain());\r\n\r\n }", "public Collection getOptions() {\n return options;\n\n }", "public static void listMenuOptions(){\n\n System.out.println(\"Please choose an option:\");\n System.out.println(\"(1) Add a task.\");\n System.out.println(\"(2) Remove a task.\");\n System.out.println(\"(3) Update a task.\");\n System.out.println(\"(4) List all tasks.\");\n System.out.println(\"(0) Exit\");\n }", "public void setOptions(short field_1_options)\n {\n this.field_1_options = field_1_options;\n }", "private void changedChoiceBox(){\n\t\thideLackUserPermissionsLabel();\n\t\thideShowCheckBoxes();\n\t}", "@Override\n public String[] getMenuOptions() {\n String[] options = {\"Change your username\", \"Change your password\", \"Change your email\"};\n return options;\n }", "public List getOptions() {\n\t\treturn currentOption;\n\t}", "private String addOptions() {\n\t\tStringBuilder tag = new StringBuilder();\n\t\tint OptionsNumber = Integer.parseInt(parameters[0]);\n\t\t// Nine Parameters: OptionsNumber, Option1, Option1Tag, Option2, Option2Tag, Option3, Option3Tag, Option4, Option4Tag\n\t\t// Minimum Three Parameters, Maximum Nine\n\t\t// If OptionsNumber = 1, Use Option1 and Option1Tag only. If OptionsNumber = 2, Use Option1 and Option2.\n\t\ttag.append(\"options:[\");\n\t\ttag.append(\"[\" + parameters[1] + \"|\" + parameters[2] + \"]\");\n\t\tif (OptionsNumber > 1) {\n\t\t\ttag.append(\", [\" + parameters[3] + \"|\" + parameters[4] + \"]\");\n\t\t}\n\t\tif (OptionsNumber > 2) {\n\t\t\ttag.append(\", [\" + parameters[5] + \"|\" + parameters[6] + \"]\");\n\t\t}\n\t\tif (OptionsNumber > 3) {\n\t\t\ttag.append(\", [\" + parameters[7] + \"|\" + parameters[8] + \"]\");\n\t\t}\n\t\ttag.append(\"]\");\n\t\treturn tag.toString();\n\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 }", "@Override\n public ListOptions getOptions() {\n return new ListOptions();\n }", "public void fillSpecChoices(List ChoiceMenu) {\n\n ChoiceMenu.add(\"Quadratic Koch Island 1 pg. 13\"); /* pg. 13 */\n ChoiceMenu.add(\"Quadratic Koch Island 2 pg. 14\"); /* pg. 14 */\n ChoiceMenu.add(\"Island & Lake Combo. pg. 15\"); /* pg.15 */\n ChoiceMenu.add(\"Koch Curve A pg. 16\");\n ChoiceMenu.add(\"Koch Curve B pg. 16\");\n ChoiceMenu.add(\"Koch Curve C pg. 16\");\n ChoiceMenu.add(\"Koch Curve D pg. 16\");\n ChoiceMenu.add(\"Koch Curve E pg. 16\");\n ChoiceMenu.add(\"Koch Curve F pg. 16\");\n ChoiceMenu.add(\"Mod of Snowflake pg. 14\");\n ChoiceMenu.add(\"Dragon Curve pg. 17\");\n ChoiceMenu.add(\"Hexagonal Gosper Curve pg. 19\");\n ChoiceMenu.add(\"Sierpinski Arrowhead pg. 19\");\n ChoiceMenu.add(\"Peano Curve pg. 18\");\n ChoiceMenu.add(\"Hilbert Curve pg. 18\");\n ChoiceMenu.add(\"Approx of Sierpinski pg. 18\");\n ChoiceMenu.add(\"Tree A pg. 25\");\n ChoiceMenu.add(\"Tree B pg. 25\");\n ChoiceMenu.add(\"Tree C pg. 25\");\n ChoiceMenu.add(\"Tree D pg. 25\");\n ChoiceMenu.add(\"Tree E pg. 25\");\n ChoiceMenu.add(\"Tree B pg. 43\");\n ChoiceMenu.add(\"Tree C pg. 43\");\n ChoiceMenu.add(\"Spiral Tiling pg. 70\");\n ChoiceMenu.add(\"BSpline Triangle pg. 20\");\n ChoiceMenu.add(\"Snake Kolam pg. 72\");\n ChoiceMenu.add(\"Anklets of Krishna pg. 73\");\n\n /*-----------\n Color examples \n -----------*/\n ChoiceMenu.add(\"Color1, Koch Curve B\");\n ChoiceMenu.add(\"Color2, Koch Curve B\");\n ChoiceMenu.add(\"Color X, Spiral Tiling\");\n ChoiceMenu.add(\"Color Center, Spiral Tiling\");\n ChoiceMenu.add(\"Color Spokes, Spiral Tiling\");\n ChoiceMenu.add(\"Color, Quad Koch Island 1\");\n ChoiceMenu.add(\"Color, Tree E\");\n ChoiceMenu.add(\"Color, Mod of Snowflake\");\n ChoiceMenu.add(\"Color, Anklets of Krishna\");\n ChoiceMenu.add(\"Color, Snake Kolam\");\n\n ChoiceMenu.add(\"Simple Branch\");\n\n\n }", "public OptionPanel() {\n initComponents();\n }", "private static void printOption(){\r\n System.out.println(\"Select option what you want to do\");\r\n System.out.println(\"Input plain(default) / stylish / slide\");\r\n option = scan.nextLine();\r\n try{\r\n if(option.toLowerCase().equals(\"plain\")){\r\n }\r\n else if(option.toLowerCase().equals(\"stylish\")){\r\n }\r\n else if(option.toLowerCase().equals(\"slide\")){\r\n }\r\n else if(option.toLowerCase().equals(\"\")){\r\n option = \"plain\";\r\n }\r\n else{\r\n throw new Exception(\"Check option\\n\");\r\n }\r\n } catch(Exception e){\r\n e.printStackTrace();\r\n } finally {\r\n System.out.println(\"Option : \" + option);\r\n }\r\n }", "public static void showCommandLineOptions() {\n showCommandLineOptions(new TextUICommandLine());\n }", "private void showMoreWorldOptions(boolean toggle) {\n this.inMoreWorldOptionsDisplay = toggle;\n this.btnGameMode.visible = !this.inMoreWorldOptionsDisplay;\n this.btnMapType.visible = this.inMoreWorldOptionsDisplay;\n if (WorldType.WORLD_TYPES[this.selectedIndex] == WorldType.DEBUG_ALL_BLOCK_STATES) {\n this.btnGameMode.active = false;\n if (this.field_228198_g_ == null) {\n this.field_228198_g_ = this.field_228197_f_;\n }\n\n this.func_228200_a_(CreateWorldScreen.GameMode.DEBUG);\n this.btnMapFeatures.visible = false;\n this.btnBonusItems.visible = false;\n this.btnAllowCommands.visible = false;\n this.btnCustomizeType.visible = false;\n } else {\n this.btnGameMode.active = true;\n if (this.field_228198_g_ != null) {\n this.func_228200_a_(this.field_228198_g_);\n }\n\n this.btnMapFeatures.visible = this.inMoreWorldOptionsDisplay && WorldType.WORLD_TYPES[this.selectedIndex] != WorldType.CUSTOMIZED;\n this.btnBonusItems.visible = this.inMoreWorldOptionsDisplay;\n this.btnAllowCommands.visible = this.inMoreWorldOptionsDisplay;\n this.btnCustomizeType.visible = this.inMoreWorldOptionsDisplay && WorldType.WORLD_TYPES[this.selectedIndex].hasCustomOptions();\n }\n\n this.worldSeedField.setVisible(this.inMoreWorldOptionsDisplay);\n this.worldNameField.setVisible(!this.inMoreWorldOptionsDisplay);\n if (this.inMoreWorldOptionsDisplay) {\n this.btnMoreOptions.setMessage(I18n.format(\"gui.done\"));\n } else {\n this.btnMoreOptions.setMessage(I18n.format(\"selectWorld.moreWorldOptions\"));\n }\n\n }", "String getOption();", "public static interface Option\r\n \t{public String getName (); //Name of the option that appears in menu.\r\n \tpublic byte getWidth(); //Width of the name.\r\n \tpublic void select ();}", "protected String getSettingsDialogTitle() {\r\n return \"Server options\";\r\n }", "protected int getOptionListSize() {\n\t\treturn options.size();\n\t}", "public static void listMainMenuOptions(){\n\t\tSystem.out.println(\"\\nWelcome to Vet Clinic Program. Please choose an option from the list below.\\n\");\n\t\tSystem.out.println(\"1: List all staff.\");\n\t\tSystem.out.println(\"2: List staff by category.\");\n\t\tSystem.out.println(\"3: List admin Staff performing a task.\");\n\t\tSystem.out.println(\"4: Search for a specific member of staff by name.\");\n\t\tSystem.out.println(\"5: List all animals.\");\n\t\tSystem.out.println(\"6: List animals by type.\");\n\t\tSystem.out.println(\"7: Search for a specific animal by name.\");\n\t\tSystem.out.println(\"8: See the Queue to the Veterinary\");\n\t\tSystem.out.println(\"9: Exit\");\n\t}" ]
[ "0.6765665", "0.6567044", "0.64146084", "0.6404634", "0.6341333", "0.6308282", "0.6264147", "0.62493783", "0.62464535", "0.6245679", "0.6208875", "0.6160801", "0.6157651", "0.61564445", "0.61453086", "0.6108541", "0.6104975", "0.61001164", "0.60802937", "0.60650647", "0.6057683", "0.60537434", "0.6036093", "0.60168326", "0.5998419", "0.59741503", "0.59703016", "0.5964364", "0.59564877", "0.59403956", "0.593817", "0.59296155", "0.59185493", "0.5917325", "0.59106994", "0.5878102", "0.58663183", "0.58502656", "0.5825493", "0.5800828", "0.5799574", "0.5798869", "0.57928795", "0.57838964", "0.57790506", "0.57656276", "0.5755373", "0.5754335", "0.5749173", "0.5742584", "0.57385296", "0.57377917", "0.5728474", "0.5721124", "0.57167906", "0.5712111", "0.5702095", "0.5682884", "0.5680161", "0.5665579", "0.56631476", "0.56579983", "0.5644691", "0.564397", "0.5641666", "0.5636451", "0.5634226", "0.56321573", "0.5621512", "0.56161296", "0.56161296", "0.56161296", "0.56161296", "0.56161296", "0.56161296", "0.56151813", "0.56151587", "0.5612369", "0.56090975", "0.56012213", "0.55947685", "0.55944264", "0.5590211", "0.5576392", "0.5562089", "0.5559401", "0.5553647", "0.55502605", "0.5542001", "0.5541755", "0.55365664", "0.55261666", "0.5516166", "0.5515742", "0.5515698", "0.55145955", "0.550995", "0.5508607", "0.55084574", "0.55055463", "0.55049783" ]
0.0
-1
Coins collections from all active players.
public SNGTestCases CoinsCollection_TC1014() throws InterruptedException{ String flavour = "Electrical"; forDebugger(); waitForElement(By.id("com.pointedsquares.gamy5.android:id/header_name"),120); try{ waitForElement(By.xpath("//android.widget.TextView[contains(@text , 'Academics') and contains(@resource-id , 'itemTitle')]") , 5); }catch(Exception ex){ driver.scrollTo("Academics"); } driver.findElement(By.xpath("//android.widget.TextView[contains(@text , 'Academics') and contains(@resource-id , 'itemTitle')]/following-sibling::android.widget.TextView[contains(@text , 'More')]")).click(); waitForElement(By.id("com.pointedsquares.gamy5.android:id/search_all"), 10); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/search_all")).click(); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/search_all")).sendKeys(flavour); driver.findElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'flavour_name_list') and contains(@text , 'Electrical Engineering')]")).click(); waitForElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'stake_amount') and contains(@text , '500')]"),5); driver.findElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'stake_amount') and contains(@text , '500')]")).click(); waitForElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'message_text') and contains(@text , 'You are about to play Electrical Engineering game with 500 coins stake.')]"), 5); driver.findElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'message_text') and contains(@text , 'You are about to play Electrical Engineering game with 500 coins stake.')]")).click(); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/positive_button")).click(); waitForVisibilityOf(By.xpath("//android.widget.TextView[contains(@resource-id , 'response') and contains(@text , 'Finding room for you...')]")); Thread.sleep(5000); try{ waitForElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'response') and contains(@text , 'Still Waiting.....')]") , 2); }catch(Exception ex){ } waitForVisibilityOf(By.xpath("//android.widget.RelativeLayout[contains(@resource-id , 'topL')]")); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/pool_currency_layout")); List<WebElement> playerList = driver.findElements(By.xpath("//android.widget.LinearLayout[contains(@resource-id , 'player_list')]/*")); int playerCount = 1; for(int i = 0; i < 5; i++){ try{ driver.findElement(By.id("com.pointedsquares.gamy5.android:id/player_name_"+i)); playerCount++; }catch(Exception ex){ } } System.out.println(playerCount); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/pool_amount")); Thread.sleep(7000); return new SNGTestCases(driver); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Coins getCoins(){\n return mUserResources.getCoins();\n }", "public int getCoins() {\r\n\t\treturn collectionManager.getCoins();\r\n\t}", "public BigDecimal getCoins() {\n return coins;\n }", "@Transactional(readOnly = true)\n public List<Currency> findAll() {\n log.debug(\"Request to get all Currencies\");\n return currencyRepository.findAll();\n }", "public int getCoins() {\n return coins; //XXX-CHANGE-XXX\n }", "private ArrayList<Card> getCurrentTopCards() {\n // logic to get round cards from all players\n ArrayList<Card> currentTopCards = new ArrayList<>();\n for (Player player : players) {\n player.submitActiveCard(currentTopCards);\n }\n return currentTopCards;\n }", "@Override\r\n\tpublic ArrayList<PlayerPO> getAllPlayers() {\n\t\treturn playerController.getAllPlayers();\r\n\t}", "public synchronized List<Card> getCardsInPlay(){\n cardsInPlay.clear();\r\n \r\n for(Player player: players){\r\n if(player == null){\r\n continue;\r\n }\r\n if(player.getCardsInHand().isEmpty()){\r\n continue;\r\n }\r\n for(Card card: player.getCardsInHand()){\r\n cardsInPlay.add(card);\r\n }\r\n }\r\n return cardsInPlay;\r\n }", "public void cardToAll() {\n\t\tfor(ClientThread player: players) {\n\t\t\tcardToOne(player);\n\t\t\ttry {Thread.sleep(200);}catch(Exception exc) {exc.printStackTrace();}\n\t\t}\n\t}", "public ArrayList<Pair<Integer, Integer>> getCoins(ArrayList<Pair<Integer, Integer>> target) {\r\n \tIterator<Sprite> beanCounter = coins.iterator();\r\n \ttarget.clear();\r\n \twhile (beanCounter.hasNext()) {\r\n \t\tPair<Integer, Integer> pos = beanCounter.next().getPos();\r\n \t\ttarget.add(pos);\r\n \t}\r\n \treturn target;\r\n }", "public List<PlayerItem> getAll();", "public Collection<Game> getAllActiveGames() {\n return gameRepository.findAllActive();\n }", "public java.util.List<SitbMoneyCollection> findAll();", "private Collection<Player> getPlayers() {\n\t\treturn players;\n\t}", "ArrayList<Player> getAllPlayer();", "Collection<User> players();", "public void countAllPoints() {\n\t\tfor(ClientThread player: players) {\n\t\t\tplayer.points = PointCounter.countPoint(player.clientCards);\n\t\t\tview.writeLog(player.name+\" : \"+player.points);\n\t\t}\n\t}", "public Set<UUID> getAlivePlayers() {\n return new HashSet<>(players);\n }", "public List<Player> findAllPlayers(){\n\t\treturn playerRepository.findAll();\n\t}", "List<Player> getPlayers();", "protected ClientList getCurrentPlayers() {\r\n\t\treturn this.players;\r\n\t}", "List<CurrencyDTO> getCurrencies();", "public void showBalance(){\n for(Player player: players){\n System.out.println(player + \"'s balance: \" + player.getWallet());\n }\n System.out.println();\n dealer.showProfit();\n System.out.println();\n }", "public List<Player> getAll() {\n PlayerDB pdb = new PlayerDB();\n return pdb.getAll();\n }", "public List <FootballPlayer> getAllPlayers() {\n\t\treturn market.getAllPlayers();\n\t}", "public List<Player> getAllPlayers() {\r\n // TODO fix actual order of players in the List.\r\n\r\n List<Player> players = new ArrayList<>();\r\n players.addAll(teamRed.getPlayers());\r\n players.addAll(teamBlue.getPlayers());\r\n\r\n return players;\r\n }", "private void collectCoins(Location location){\n LatLng latLng = new LatLng(location.getLatitude(),\n location.getLongitude());\n for(Coin coin : this.todayCoins){\n if(coin.getLatLng().distanceTo(latLng) <= 25){\n if(!todayCollectedID.contains(coin.getId())){\n System.out.println(\"CoinID\" + todayCollectedID.size());\n todayCollectedID.add(coin.getId());\n CollectedCoins.add(coin);\n\n long thistime = System.currentTimeMillis();\n int coinCollected = todayCollectedID.size();\n if(thistime - lastUpdateTime >= 60000 || (coinCollected - lastCoinCollected) >= 5){\n lastUpdateTime = thistime;\n lastCoinCollected = coinCollected;\n saveData();\n }\n\n }\n }\n }\n\n // Coin collected.\n\n }", "public int generateCoins() {\n\t\n Entity e = new Coin();\n\t\n int c = rand.nextInt(6) + 1;\n int r = rand.nextInt(c) + 1;\n\n int w = e.getWidth();\n int h = e.getHeight();\n\t\n int y = rand.nextInt(mMap.getBottomBound() - r * h);\n int x = 1000;\n\n e.setRelativeVelocity(mGame.getPlayer().getVelocity());\n e.setPosition(x, y);\n mGame.addEntity(e);\n\n // Generates a group of coins\n for(int i = 0; i < r; i++) {\n for(int j = 0; j < c; j++) {\n if(i == 0 && j == 0) continue;\n\n e = new Coin();\n e.setRelativeVelocity(mGame.getPlayer().getVelocity());\n e.setPosition(x + w * j, y + h * i);\n mGame.addEntity(e);\n }\n }\n\n return w * c;\n }", "private void listCurrencies() {\r\n\t\t// Test whether we already have currencies\r\n\t\tif (currencies == null) {\r\n\t\t\t// No, so complain and return\r\n\t\t\tSystem.out.println(\"There are currently no currencies in the system.\");\r\n\t\t\tSystem.out.println(\"Please add at least one currency.\");\r\n\t\t\tSystem.out.println();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// Reset the index into the currencies list\r\n\t\tcurrencies.reset();\r\n\t\tCurrency currency;\r\n\t\t// Output all currencies\r\n\t\twhile ((currency = currencies.next()) != null) {\r\n\t\t\tSystem.out.println(currency.getCode());\t\t\t\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "public void returncoins(){\r\n\t\tDS1 d= (DS1) ds;\r\n\t\tSystem.out.println(\"Coins returned : \" + d.cp + \"\\n\");\r\n\t\td.cp=0;\r\n\t}", "List<Player> findAllPlayers();", "@Override\r\n\tpublic List<CurrencyAccountCorporate> findAll() {\n\t\treturn em.createQuery(\"from CurrencyAccountCorporate\",\r\n\t\t\t\tCurrencyAccountCorporate.class).getResultList();\r\n\t}", "@Override\n protected void runOneIteration() throws Exception {\n logger.info(\"Start executing FetchCoinTask\");\n\n // Get the list of coins\n Map<String, Coin> coinMap = this.marketApiManager.getCoinDictionary();\n\n // Create the coin DAO\n CoinDAO coinDAO = new CoinDAO();\n\n // For each coin fetched from the API create or update the coin in the database\n for (Coin coin : coinMap.values()) {\n\n // Check if the coin exists in the database\n data.model.Coin coinFromDB = coinDAO.findOneByProperty(\"externalId\", coin.id);\n\n // If the coin doesn't exist then create it\n if (coinFromDB == null) {\n coinFromDB = new data.model.Coin(coin);\n coinDAO.create(coinFromDB);\n }\n // If the coin already exists then updates its property (coin can be renamed for instance)\n else {\n int id = coinFromDB.getId();\n coinFromDB = new data.model.Coin(coin);\n coinFromDB.setId(id);\n coinDAO.update(coinFromDB);\n }\n }\n\n // Count how many coins are stored in the database and log it\n logger.info(\"Coins in the database: \" + coinDAO.countRowInDatabase());\n logger.info(\"End FetchCoinTask\");\n }", "@Transactional\n public List<CourseDTO> findAll() {\n List<CourseDTO> courseList = new ArrayList<>();\n Iterable<Course> courseIter = courseDAO.findAll();\n for (Course course : courseIter) {\n CourseDTO courseDTO = courseMapper.mapFromCoursetoCourseDTO(course);\n courseList.add(courseDTO);\n }\n return courseList;\n }", "public Collection<Player> getPlayersChunk() {\n var chunk = new Chunk<Player>();\n var playersChunk = chunk.get(this.players, ALL_PLAYERS_CHUNK_SIZE, allPlayersChunkIndex);\n\n // up to ALL_PLAYERS_CHUNK_SIZE with empty players\n // to have an even view\n var startIndex = playersChunk.size();\n for (var i = startIndex; i < ALL_PLAYERS_CHUNK_SIZE; i++) {\n playersChunk.add(new Player(new Person()));\n }\n\n return playersChunk;\n }", "public TennisPlayer[] getAllPlayers() throws TennisDatabaseRuntimeException {\n\t\t \t\n\t\tTennisPlayerContainerIterator iterator = this.iterator();\n\t\t\n iterator.setInorder();\n \t\n TennisPlayer[] outputArray = new TennisPlayer[playerCount];\n \n int index = 0;\n \n while (iterator.hasNext()) {\n \t\n outputArray[index] = iterator.next();\n \n index++;\n \n }\n \n return outputArray;\n \n\t}", "@GET(\"/api/data/coinlist/\")\n Call<CoinsResponse> getCoins();", "@Override\n public List<Player> getPlayers() {\n return new ArrayList<Player>(players);\n }", "public void initializePlayers(){\r\n allPlayers = new ArrayList<Player>();\r\n currentPlayerIndex = 0;\r\n Player redPlayer = new Player(1, new Location(2, 2), Color.RED);\r\n Player bluePlayer = new Player(2, new Location(4, 2), Color.BLUE);\r\n Player whitePlayer = new Player(3, new Location(2, 4), Color.WHITE);\r\n Player yellowPlayer = new Player(4, new Location(4, 4), Color.YELLOW);\r\n allPlayers.add(redPlayer);\r\n allPlayers.add(bluePlayer);\r\n allPlayers.add(whitePlayer);\r\n allPlayers.add(yellowPlayer);\r\n }", "static List<Player> getAllPlayers() {\n\t\treturn null;\r\n\t}", "public void placeBets(){\n System.out.println();\n System.out.println(\"Let's place your bet!\");\n System.out.println();\n for(Player player: players){\n player.placeBet(minBet, maxBet);\n }\n System.out.println();\n }", "private Set<SteamUserNode> bindGames(Set<SteamUserNode> players) {\n\t\tString dest = \"http://api.steampowered.com/IPlayerService/GetOwnedGames/v0001/?\" +\r\n\t\t\t\t\"key=%s&steamid=%d&include_appinfo=1&include_played_free_games=1&format=json\";\r\n\t\tString response = \"\";\r\n\t\tfor (SteamUserNode p : players) {\r\n\t\t\ttry {\r\n\t\t\t\tthis.apiCalls += 1;\r\n\t\t\t\tString query = String.format(dest, key, p.getId());\r\n\t\t\t\tURL url = new URL(query);\r\n\t\t\t\tHttpURLConnection con = (HttpURLConnection) url.openConnection();\r\n\t\t\t\tcon.setRequestMethod(\"GET\");\r\n\t\t\t\tcon.setConnectTimeout(3000);\r\n\t\t\t\tcon.connect();\r\n\t\t\t\tint respCode = con.getResponseCode();\r\n\t\t\t\tif (respCode != 200)\r\n\t\t\t\t\tSystem.out.println(\"Status code: \" + respCode + \"\\nFor request: \" + query);\r\n\t\t\t\telse {\r\n\t\t\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(con.getInputStream()));\r\n\t\t\t\t\tresponse = reader.lines().collect(Collectors.joining());\r\n\t\t\t\t\tint numGames = new JSONObject(response).getJSONObject(\"response\").getInt(\"game_count\");\r\n\t\t\t\t\tif (numGames > 0) {\r\n\t\t\t\t\t\tJSONArray ownedGames = new JSONObject(response).getJSONObject(\"response\").getJSONArray(\"games\");\r\n\t\t\t\t\t\tfor (int i=0;i<ownedGames.length();++i) {\r\n\t\t\t\t\t\t\tJSONObject g = ownedGames.getJSONObject(i);\r\n\t\t\t\t\t\t\tlong appId = g.getLong(\"appid\");\r\n\t\t\t\t\t\t\tString name = g.getString(\"name\");\r\n\t\t\t\t\t\t\tString logoHash = g.getString(\"img_logo_url\");\r\n\t\t\t\t\t\t\tint playForever = g.getInt(\"playtime_forever\");\r\n\t\t\t\t\t\t\tint play2Wks = g.has(\"playtime_2weeks\") ? g.getInt(\"playtime_2weeks\") : 0;\r\n\t\t\t\t\t\t\tPlayedGame game = new PlayedGame(appId, name, logoHash, play2Wks, playForever);\r\n\t\t\t\t\t\t\tp.addPlayedGame(game);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (!knownGames.contains(game)) {\r\n\t\t\t\t\t\t\t\tknownGames.add((SteamGame) game);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (localWrite) {\r\n\t\t\t\t\t\t\tjsonWriter.writeOwnedGames(response, p);\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} catch (JSONException jse) {\r\n\t\t\t\tSystem.err.println(jse.getMessage());\r\n\t\t\t\tSystem.out.println(response);\r\n\t\t\t} catch (MalformedURLException mue) {\r\n\t\t\t\t//once again, this better not happen...\r\n\t\t\t\tSystem.err.println(mue.getMessage());\r\n\t\t\t} catch (IOException ioe) {\r\n\t\t\t\tSystem.err.println(ioe.getMessage());\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn players;\r\n\t}", "java.util.List<cosmos.base.v1beta1.CoinOuterClass.Coin> \n getPriceList();", "@Override\n public List<Player> getPlayers() {\n return players;\n }", "public void saveAllPlayers() {\n for (Player player : bukkitService.getOnlinePlayers()) {\n savePlayer(player);\n }\n }", "@Transactional(readOnly = true)\n public List<ChocolateDTO> findAll() {\n log.debug(\"Request to get all Chocolates\");\n return chocolateRepository.findAll().stream()\n .map(chocolateMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }", "public int getToalCoins()\n\t{\n\t\treturn CoinCount;\n\t}", "public abstract Collection<PlayerFish> getPlayers();", "public static void updatePlayerCaches() {\n\t\tfor (Player player : getOnlinePlayers()) {\n\t\t\tPlayerCache cache = getCache(player);\n\n\t\t\tcache.reloadCache();\n\t\t}\n\t}", "public int[] getCoin() {\r\n\t\treturn coin;\r\n\t}", "public List<coins> GiveInitialMoney() {\n\t\tList<coins> initialMoney= give_money(2,2,5,5,8);\n\t\treturn initialMoney;\n\t\t}", "public List<PlayerItem> getAllPlayerItemById(Player player);", "public void printAllPlayers(){\n for (Player player : players){\n player.printPlayerInfo();\n }\n }", "public List<Buy> getAll() throws PersistException;", "public static Vector<Company> getAllPrices(){\n\t\treturn all_prices;\n\t}", "public List<String> retrieveAllCurrencieNames() {\n List<String> currenciesAvailable = new ArrayList<>(2);\n getCurrencyBuilder()\n .getCurrencyModels()\n .forEach(currencyModel ->\n currenciesAvailable.add(currencyModel.getCurrencyName()));\n return currenciesAvailable;\n }", "public int getTotalCoins() {\r\n\t\treturn goods.get(Resource.COIN);\r\n\t}", "private void Managment_Coins(CoinPattern cp){\n\t\t // coin managment: collection of coins and effects\n\t\n\t\t\n\t\t \tfor (CoinData coin : cp.getCoins()){\n\t \t \t\n\t \tboolean CoinCollision = CollisionDetection(playerUser.bounds,coin.location);\n\t \tif (CoinCollision) {\n\t \t\t// if player collected the coin\n\t \t\t// change the this coin image to collected\t \t\n\t \t\t\n\t \t\tif (PauseGame) \n\t\t\t\t\t continue;\n\t \t\t\n\t \t\tif (!coin.Collected){\n\t \t\t\tcoin.Collected=true;\n\t \t\t\tlevelbuilder.gamePoints = levelbuilder.gamePoints + coin.value;\n\t \t\t\tfntScore.setBitmapText(\"Score: \" + String.valueOf(levelbuilder.gamePoints));\n\t \t\t\tcoin.PlayCoinCollectedSound();\t\n\t \t\t\t\n\t \t\t\tVector2 peCoord = new Vector2().add(coin.location.x, \n\t \t\t\t\t\tcoin.location.y+ coin.coinTexture.Height/2);\n\t \t\t\t\t\t \t\t\t\t\n\t \t\t\tcoin.pe.setPosition(coin.location.x,coin.location.y + \n\t \t\t\t\t\tcoin.coinTexture.Height/2);\t\t \t\t\t\n\t \t\t\tcoin.pe.start();\t\t\t \t\t\t \t\t\t\n\t \t\t}\t\n\t \t\t\n\t \t\tcoin.pe.update(Gdx.graphics.getDeltaTime());\n\t \t\tcoin.pe.draw(batch,Gdx.graphics.getDeltaTime());\n\t\n\t \t}\n\t \telse if (coin.Collected==false){\n\t \t\t\t \t\t\n\t\t\t\tbatch.draw(coin.coinTexture.TextureCandy,\n\t\t\t\t\t\tcoin.location.x,coin.location.y,coin.location.width,\n\t\t\t\t\t\tcoin.location.height);\t \t\t \t\n\t\t\t\t \n\t \t}\t\t \t\t\n\t }\t\t \t\t\t\t\t\n\t}", "public static Collection<? extends Player> getOnlinePlayers() {\n return Bukkit.getServer().getOnlinePlayers();\n }", "public List<Player> getAllOrdered() {\n PlayerDB pdb = new PlayerDB();\n return pdb.getAllOrdered();\n }", "List<Player> listPlayers();", "@SkipValidation\n public String getAllCurrency() {\n currencyList = currencyService.getAllCurrency();\n return SUCCESS;\n }", "public double getBitcoins(){\r\n return bitcoins;\r\n }", "@Override\n public HttpClientApiLayerEntity getCuotesByCurrencies(String currencies) {\n HttpRequest<?> req = HttpRequest.GET(uri+\"&currencies=\"+currencies);\n return (HttpClientApiLayerEntity) httpClient.retrieve(req, Argument.of(List.class, HttpClientApiLayerEntity.class)).blockingSingle().get(0);\n }", "public int getNumberOfCoins() {\n return coins;\n }", "Collection<Account> getAll();", "private void loadPlayers() {\r\n this.passive_players.clear();\r\n this.clearRoster();\r\n //Map which holds the active and passive players' list\r\n Map<Boolean, List<PlayerFX>> m = ServiceHandler.getInstance().getDbService().getPlayersOfTeam(this.team.getID())\r\n .stream().map(PlayerFX::new)\r\n .collect(Collectors.partitioningBy(x -> x.isActive()));\r\n this.passive_players.addAll(m.get(false));\r\n m.get(true).stream().forEach(E -> {\r\n //System.out.println(\"positioning \"+E.toString());\r\n PlayerRosterPosition pos = this.getPlayerPosition(E.getCapnum());\r\n if (pos != null) {\r\n pos.setPlayer(E);\r\n }\r\n });\r\n }", "public ArrayList<Entity> getPlayers() {\n ArrayList<Entity> players = new ArrayList<>();\n students.forEach(student -> players.add(student.getPlayer()));\n return players;\n }", "private void initializePlayers()\n\t{\n\t\tfor(Player player : playerList)\n\t\t{\n\t\t\t// Distribute personality cards\n\t\t\tplayer.setPersonalityCard(board.getPersonalityCardDeck().pickTopCard());\n\t\t\t\n\t\t\t// Distribute money\n\t\t\tboard.getBankAccount().transfertAmountTo(player, nbGoldStartPerPlayer, false);\n\t\t\t\n\t\t\t// Distribute minions\n\t\t\tfor(int i = 0; i < nbMinionsPerPlayer; i++)\n\t\t\t{\n\t\t\t\tplayer.addMinion(new Minion());\n\t\t\t}\n\t\t\t\n\t\t\t// Distribute buildings\n\t\t\tfor(int i = 0; i < nbBuildingsPerPlayer; i++)\n\t\t\t{\n\t\t\t\tplayer.addBuilding(new Building());\n\t\t\t}\n\t\t}\n\n\t\t// Distribute player cards\n\t\tfor(int i = 0; i < nbInitCards; i++)\n\t\t{\n\t\t\tfor(Player player : playerList)\n\t\t\t{\n\t\t\t\tplayer.getPlayerCardDeck().addCard(board.getPlayerCardDeck().pickTopCard());\n\t\t\t}\n\t\t}\n\t}", "public void countCoins() {\r\n\t\tthis.coinCount = 0;\r\n\t\tfor (int x = 0; x < WIDTH; x++) {\r\n\t\t\tfor (int y = 0; y < HEIGHT; y++) {\r\n\t\t\t\tif (this.accessType(x, y) == 'C')\r\n\t\t\t\t\tthis.coinCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public List<TransactionOutput> calculateAllSpendCandidates() {\n return calculateAllSpendCandidates(true, true);\n }", "public void requestCoinsFromChat(Player player, Trade t) {\n TradeMain.getIns().getChatRequests().requestChatInformation(player, \"INSERT_COIN_AMOUND\")\n .thenAccept((message) -> {\n int coins;\n\n try {\n\n coins = Integer.parseInt(message);\n\n } catch (NumberFormatException ex) {\n\n MainData.getIns().getMessageManager().getMessage(\"COINS_MUST_BE_NUMBER\")\n .sendTo(player);\n\n requestCoinsFromChat(player, t);\n\n return;\n }\n\n PlayerData pD = MainData.getIns().getPlayerManager().getPlayer(player.getUniqueId());\n\n MainData.getIns().getServerCurrencyHandler().removeCurrency(pD, coins)\n .thenAccept((result) -> {\n\n if (result) {\n\n t.setCoins(player.getUniqueId(), coins);\n\n Inventory tradeInventory = t.getPlayerInv(pD.getPlayerID());\n\n player.openInventory(tradeInventory);\n\n } else {\n\n MainData.getIns().getMessageManager().getMessage(\"NOT_ENOUGH_COINS\")\n .format(\"%coins%\", coins)\n .sendTo(pD);\n\n requestCoinsFromChat(player, t);\n }\n });\n });\n }", "@Override\r\n\tpublic void allScore() {\r\n\t\tallScore = new ArrayList<Integer>();\r\n\t\tallPlayer = new ArrayList<String>();\r\n\t\tConnection connection = ConnectionFactory.getConnection();\r\n try {\r\n Statement stmt = connection.createStatement();\r\n \r\n String query = \"SELECT NAME_PLAYER, SUM(SCORE) AS 'SCORE'\" +\r\n \t\t\" FROM SINGLEPLAYERDB\" +\r\n \t\t\" GROUP BY NAME_PLAYER\" +\r\n \t\t\" ORDER BY SCORE DESC\" ;\r\n ResultSet rs = stmt.executeQuery(query);\r\n \r\n \r\n while (rs.next()) {\r\n \tallPlayer.add(rs.getString(1));\r\n \tallScore.add(Integer.parseInt(rs.getString(2)));\r\n }\r\n \r\n }catch (SQLException ex) {\r\n ex.printStackTrace();\r\n }\r\n\t}", "public CompactPlayer[] getPlayers()\n {\n return players;\n }", "private void refreshPlayerList() {\n List<MarketItem> items = new ArrayList<>();\n EntityRef player = localPlayer.getCharacterEntity();\n for (int i = 0; i < inventoryManager.getNumSlots(player); i++) {\n EntityRef entity = inventoryManager.getItemInSlot(player, i);\n\n if (entity.getParentPrefab() != null) {\n MarketItem item;\n\n if (entity.hasComponent(BlockItemComponent.class)) {\n String itemName = entity.getComponent(BlockItemComponent.class).blockFamily.getURI().toString();\n item = marketItemRegistry.get(itemName, 1);\n } else {\n item = marketItemRegistry.get(entity.getParentPrefab().getName(), 1);\n }\n\n items.add(item);\n }\n }\n\n tradingScreen.setPlayerItems(items);\n }", "public void initChips() {\n\t\tfor(Player p:players) {\n\t\t\tfor(int i=0; i<7; i++) {\n\t\t\t\tp.addChip(new Chip(p));\n\t\t\t}\n\t\t}\n\t}", "@Override\n public List<Client> clientsSortedByMoneySpent(){\n log.trace(\"clientsSortedByMoneySpent -- method entered\");\n Iterable<Client> clients = clientRepository.findAll();\n List<Client> result = StreamSupport.stream(clients.spliterator(),false).sorted(Comparator.comparing(Client::getMoneySpent).reversed()).collect(Collectors.toList());\n log.trace(\"clientsSortedByMoneySpent: result={}\", result);\n return result;\n }", "public static ArrayList<Course> getAllCorsiMateria() {\n\t\ttry {\n\t\t\tRequestContent rp = new RequestContent();\n\t\t\trp.type = RequestType.GET_ALL_COURSES;\n\t\t\tReceiveContent rp1 = sendReceive(rp);\n\t\t\tArrayList<Course> lista = (ArrayList<Course>) rp1.parameters[0];\n\t\t\tfor (Course m : lista) {\n\t\t\t\n\t\t\t}\n\t\t\treturn lista;\n\t\t} catch (Exception e) {\n\t\t\tLogger.WriteError(e, \"ClientConnection\", \"GET_ALL_COURSES\");\n\t\t}\n\t\treturn new ArrayList<Course>();\n\t}", "public List<Candidates> consolidatedWinner() {\n List<Candidates> winnersFinal = new ArrayList<>();\n winnersFinal.addAll(getWinningSingleCandidates());\n winnersFinal.addAll(getMultiWinnerCandidates());\n return winnersFinal;\n }", "public void addCoins(int coins) {\r\n\t\tcollectionManager.addCoins(coins );\r\n\t}", "public void cashOut(){\n Iterator<Player> iter = players.iterator();\n while (iter.hasNext()){\n Player player = iter.next();\n if(player.cashOut()){\n iter.remove();\n System.out.println(player + \" has cashed out!\");\n }\n }\n }", "public static ArrayList<Player> getWinners(){return winners;}", "public List<Candidates> getWinningSingleCandidates() {\n List<Candidates> allCandidates = candidateService.findAll();\n Map<Integer, Integer> mandatesResults = singleService.singleWinners();\n List<Candidates> allWinningCandidates = new ArrayList<>();\n // Map<Integer, Integer> mandatesResults = new HashMap<>();\n for (Candidates candidate : allCandidates) {\n for (Integer winnerIds : mandatesResults.keySet()) {\n if (candidate.getId().equals(winnerIds)) {\n allWinningCandidates.add(candidate);\n }\n }\n }\n\n for (Candidates candidate : allWinningCandidates) {\n candidate.setCandidate_elected(\"single\");\n candidateService.saveOrUpdate(candidate);\n }\n return allWinningCandidates;\n }", "private void scoreSumUp(ArrayList<Player> players){\n for (Player player: players) {\n System.out.println(\"The Player \" + player.getUsername() + \" has total points of \" + player.getScore());\n }\n }", "public Iterable<Boat> boatsOwnedByMember(){ return this.boats; }", "@Override\r\n public void allPlayersCreateDeck() {\r\n // Loop through all players and call createNewDeck\r\n for (int i = 0; i < this.players.size(); i++) {\r\n this.playerCreateNewDeck(i);\r\n }\r\n }", "@Override\n public ArrayList<Player> getPlayers() {return steadyPlayers;}", "public List<Choosecat> FindAll_Choosecat() {\r\n\t\treturn ChoosecatService.FindAll(\"id\", JPAOp.Asc);\r\n\t}", "public void addCoins(int i) {\n coins = coins + i;\n }", "public Set<Player> getPlayers() {\n return players;\n }", "@Override\n public List<Cours> afficherTousLesCours() {\n return coursRepo.findAll();\n }", "public void collectWinnings() {\n\t\tif (hand.checkBlackjack()) {\n\t\t\tdouble win = bet * 1.5;\n\t\t\ttotalMoney += (win + bet);\n\t\t} else {\n\t\t\ttotalMoney += (bet + bet);\n\t\t}\n\t}", "java.util.List<cosmos.base.v1beta1.Coin> \n getTotalDepositList();", "public synchronized void emptyField(){\n List<Player> pList = Arrays.asList(players);\r\n \r\n Iterator<Player> pIter = pList.iterator();\r\n while(pIter.hasNext()){\r\n //for(Player player: players){\r\n Player player = pIter.next();\r\n \r\n if(player == null){\r\n continue;\r\n }\r\n System.out.println(\"NUMBER OF CARDS: \" + player.getCardsInHand().size());\r\n \r\n Iterator<Card> cardIter = player.getCardsInHand().iterator();\r\n \r\n while(cardIter.hasNext()){\r\n try{\r\n collectCard(cardIter.next());\r\n }catch(Exception ex){\r\n }\r\n \r\n }\r\n }\r\n }", "public static ArrayList<EntityPlayer> getAll() {\r\n\t\ttry {\r\n\t\t\tArrayList<EntityPlayer> players = new ArrayList<EntityPlayer>();\r\n\t\t\t\r\n\t\t\tfor (EntityPlayer player : mc.world.playerEntities) {\r\n\t\t\t\tif (!player.isEntityEqual(mc.player)) {\r\n\t\t\t\t\tplayers.add(player);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn players;\r\n\t\t} catch (NullPointerException ignored) {\r\n\t\t\treturn new ArrayList<EntityPlayer>();\r\n\t\t}\r\n\t}", "public ArrayList<Bot> getAllBots() {\n final String errorMessage = \"Error getting all bots\";\n ResultSet retrievedBots = dbConnector.selectQuery(\"SELECT c.name, bot_id, active_time, probability, activity_status\" +\n \" FROM Bots as b, Company as c WHERE b.company_id = c.company_id;\");\n ArrayList<Bot> bots = null;\n try {\n bots = new ArrayList<Bot>();\n while (retrievedBots.next()) {\n bots.add(toBot(retrievedBots));\n }\n } catch (SQLException e) {\n System.out.println(errorMessage);\n }\n return bots;\n }", "public abstract Collection<Piece> getActivePieces();", "public abstract Collection<Piece> getActivePieces();", "private static Set<String> getCurrencySet() {\n Set<String> currencySet = new HashSet<>();\n for (int i= 0; i<getDataBase().length;i++){\n currencySet.add(getDataBase()[i][0]);\n }\n return Collections.synchronizedSet(currencySet);\n }", "public List<Player> getPlayers() {\r\n return players;\r\n }", "public List<Player> getPlayers() {\r\n return players;\r\n }" ]
[ "0.6248239", "0.60937595", "0.59272635", "0.5761272", "0.5718864", "0.5674269", "0.5651599", "0.56461984", "0.56343406", "0.5579229", "0.55622524", "0.5548725", "0.5515047", "0.5511211", "0.55023247", "0.5500252", "0.5477661", "0.54712754", "0.54531276", "0.5452257", "0.5448248", "0.5444911", "0.54209876", "0.5419412", "0.53872705", "0.5380195", "0.53738385", "0.5371179", "0.5362445", "0.5356374", "0.53469515", "0.5328987", "0.52936506", "0.52906865", "0.5289658", "0.5276294", "0.52546597", "0.5253749", "0.52531594", "0.5250811", "0.5249885", "0.52257335", "0.5223089", "0.5222159", "0.5207455", "0.52022344", "0.5199684", "0.51932806", "0.51871735", "0.5182195", "0.51712626", "0.51668257", "0.5163037", "0.5149854", "0.51472896", "0.5142275", "0.5139823", "0.5136205", "0.51343626", "0.51310587", "0.51301026", "0.5127", "0.51226026", "0.51183355", "0.5117851", "0.5112915", "0.51102555", "0.51080966", "0.5108018", "0.51064706", "0.5096797", "0.50947124", "0.5093451", "0.5089581", "0.5068913", "0.5068295", "0.5067949", "0.5058658", "0.504885", "0.5045371", "0.5042278", "0.50416684", "0.5041182", "0.50281644", "0.50254226", "0.50234085", "0.50130194", "0.501063", "0.4999926", "0.49893835", "0.49890903", "0.49881214", "0.49803245", "0.4979497", "0.49747378", "0.4973356", "0.49697357", "0.49697357", "0.49687004", "0.49663308", "0.49663308" ]
0.0
-1
Checking when User exits from table..
public SNGTestCases Exit_TC1027() throws InterruptedException{ String flavour = "Electrical"; forDebugger(); waitForElement(By.id("com.pointedsquares.gamy5.android:id/header_name"),120); try{ waitForElement(By.xpath("//android.widget.TextView[contains(@text , 'Academics') and contains(@resource-id , 'itemTitle')]") , 5); }catch(Exception ex){ driver.scrollTo("Academics"); } driver.findElement(By.xpath("//android.widget.TextView[contains(@text , 'Academics') and contains(@resource-id , 'itemTitle')]/following-sibling::android.widget.TextView[contains(@text , 'More')]")).click(); waitForElement(By.id("com.pointedsquares.gamy5.android:id/search_all"), 10); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/search_all")).click(); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/search_all")).sendKeys(flavour); driver.findElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'flavour_name_list') and contains(@text , 'Electrical Engineering')]")).click(); waitForElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'stake_amount') and contains(@text , '500')]"),5); driver.findElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'stake_amount') and contains(@text , '500')]")).click(); waitForElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'message_text') and contains(@text , 'You are about to play Electrical Engineering game with 500 coins stake.')]"), 5); driver.findElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'message_text') and contains(@text , 'You are about to play Electrical Engineering game with 500 coins stake.')]")).click(); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/positive_button")).click(); waitForVisibilityOf(By.xpath("//android.widget.TextView[contains(@resource-id , 'response') and contains(@text , 'Finding room for you...')]")); Thread.sleep(5000); try{ waitForElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'response') and contains(@text , 'Still Waiting.....')]") , 2); }catch(Exception ex){ } waitForVisibilityOf(By.xpath("//android.widget.RelativeLayout[contains(@resource-id , 'topL')]")); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/pool_currency_layout")); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/exit_player")).click(); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/negative_button")).click(); waitForVisibilityOf(By.xpath("//android.widget.TextView[contains(@resource-id , 'stake_amount') and contains(@text , '500')]")); Thread.sleep(7000); return new SNGTestCases(driver); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void checkUserExist() {\n\n final DatabaseReference mUseRef;\n\n\n if (mAuth.getCurrentUser() != null) {\n final String valid_user_id = mAuth.getCurrentUser().getUid();\n mDatabase.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.hasChild(valid_user_id)) {\n Intent singinIntent = new Intent(JoinActivity.this, MainActivity.class);\n singinIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(singinIntent);\n finish();\n } else {\n Toast.makeText(JoinActivity.this, \"You have to first setup your account!\", Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n }\n }", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "public boolean hasUser(){\n return numUser < MAX_USER;\n }", "boolean hasSelectedUser();", "private void isUserExist() {\n\n if (firebaseAuth.getCurrentUser() != null) {\n\n final String user_id = firebaseAuth.getCurrentUser().getUid();\n users_database_reference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n\n if (dataSnapshot.hasChild(user_id)) {\n // sign in the user and go to main activity\n // Intent intent = new Intent(StartActivity.this, MainActivity.class);\n // intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(intent);\n } else {\n // go to profile page\n Intent intent = new Intent(MainActivity.this, Profile.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n }\n }", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "private void checkUserExists() {\n dblogin.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n showData1(dataSnapshot);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n\n }", "void leave(User user);", "@Override\n\tpublic boolean hasUser(Account acccount) {\n\n\n\n\n\n\n\n\n\n\t\t\n\t\treturn (usersHashtable.containsKey(acccount));\n\t}", "public boolean existUser(String id);", "public void userExists(){\n\n DatabaseReference rootRef = FirebaseDatabase.getInstance().getReference();\n DatabaseReference userNameRef = rootRef.child(\"users\").child(winnerName);\n ValueEventListener eventListener = new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if(!dataSnapshot.exists()) {\n createNewUser();\n }\n else{\n updateUser();\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n Log.d(\"TAG\", databaseError.getMessage()); //Don't ignore errors!\n }\n };\n userNameRef.addListenerForSingleValueEvent(eventListener);\n\n\n }", "public User userExist(User user);", "private static boolean doesUserExist () {\n String sqlRetrieveAisId = \"SELECT ais_id FROM users WHERE user_id=?\";\n \n boolean valid = false;\n try (Connection conn = Database.getConnection();\n PreparedStatement pstmt = conn.prepareStatement(sqlRetrieveAisId)) {\n \n pstmt.setInt(1, userId);\n \n ResultSet rs = pstmt.executeQuery();\n \n valid = rs.next() != false;\n } catch (SQLException se) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(1), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (IOException ioe) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (Exception e) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n }\n \n return valid;\n }", "boolean exists(User user);", "public int Rejectuser(Long id) throws SQLException {\n\tint i=DbConnect.getStatement().executeUpdate(\"delete from login where loginid=\"+id+\"\");\r\n\treturn i;\r\n\r\n}", "public boolean logoutUser(Context context){\n\t\tDatabaseHandler db = new DatabaseHandler(context);\n\t\tdb.resetTables();\n\t\treturn true;\n\t}", "public boolean logoutUser(Context context){\n DatabaseHandler db = new DatabaseHandler(context);\n db.resetTables();\n return true;\n }", "public void checkUsernameExist() {\n\n try {\n BLUser bluser = new BLUser();\n User user = new User();\n\n ResultSet rs = bluser.selectUserIdFromUsername(txt_username.getText());\n\n user.setUsername(txt_username.getText());\n bluser.setUser(user);\n\n if (bluser.checkUsernameExist()) {\n \n populateDataOnTable();\n }// end if\n else {\n JOptionPane.showMessageDialog(rootPane, \"Invalid username!\");\n }// end else \n\n }// end try\n catch (Exception ex) {\n JOptionPane.showMessageDialog(null, ex.getMessage(), \"Exception\", JOptionPane.INFORMATION_MESSAGE);\n }//end catch\n }", "boolean hasUserId();", "boolean hasUserId();", "boolean hasUserId();", "private boolean IsUserExist(){\n SignupUser user =roomDB.dao().GetUserData(et_user.getText().toString());\n if(user!=null){\n if(!user.getEmail().isEmpty()){\n Toast.makeText(this, \"User is already registered!\", Toast.LENGTH_SHORT).show();\n return true;\n }\n\n }\n return false;\n }", "@Override\n public boolean userExists(User user) {\n return DATABASE.getUsers().stream()\n .anyMatch(currentUser -> user.equals(currentUser));\n }", "private boolean existsUser(Connection con) throws SQLException {\n\t\tlog.entry();\n\t\tboolean userExists = false;\n\t\tPreparedStatement ps = con.prepareStatement(\"SELECT COUNT(*) FROM Users \"\n\t\t + \"WHERE `id`=?;\");\n\t\ttry {\n\t\t\tps.setInt(1, id);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\tif (rs.first() && rs.getInt(1) > 0) {\n\t\t\t\tuserExists = true;\n\t\t\t}\n\t\t} finally {\n\t\t\tcloseStatement(ps);\n\t\t}\n\t\tthrowSqlException();\n\t\tlog.exit();\n\t\treturn userExists;\n\t}", "private boolean isUserExists() {\n\t\treturn KliqDataStore.isUserExists(this.mobileNumber, null);\r\n\t}", "boolean hasObjUser();", "Boolean checkUserExists(Integer userId) throws AppException;", "boolean isUserExists(RegisterData data) throws DuplicateUserException;", "public int verifierUser(){\n SQLiteDatabase db = this.getReadableDatabase(); // On veut lire dans la BD\n int id = -1;\n String selectQuery = \"SELECT * FROM \" + TABLE_USER;\n Log.e(DB_NAME, selectQuery);\n Cursor cursor = db.rawQuery(selectQuery, null);\n if (cursor != null && cursor.getCount()>0) {\n cursor.moveToLast();\n do {\n id = cursor.getInt(0);\n\n } while (cursor.moveToNext());\n }\n db.close(); // Fermer la connexion\n return id;\n }", "public boolean isExistingUser() {\r\n return isExistingUser;\r\n }", "@Override\n public boolean checkExists(int userID) throws DAOException{\n\n try{\n Session session = HibernateConnectionUtil.getSession();\n UserProfile up = (UserProfile)session.get(UserProfile.class, userID);\n session.close();\n return up != null;\n }\n catch(HibernateException e){\n throw new DAOException(\"HibernateException: \" + e.getMessage());\n }\n }", "private int userAlreadyPresent() {\n System.out.printf(\"%s%n%s%n%s%n%s%n\", Notifications.getMessage(\"ERR_USER_ALREADY_PRESENT\"), Notifications.getMessage(\"SEPARATOR\"), Notifications.getMessage(\"PROMPT_PRESENT_USER_MULTIPLE_CHOICE\"), Notifications.getMessage(\"SEPARATOR\"));\n\n switch(insertInteger(1, 3)) {\n case 1:\n System.out.printf(\"%s %s%n\", Notifications.getMessage(\"MSG_EXIT_WITHOUT_SAVING\"), Notifications.getMessage(\"MSG_MOVE_TO_LOGIN\"));\n return -1;\n case 2:\n System.out.println(Notifications.getMessage(\"PROMPT_MODIFY_FIELDS\"));\n return 1;\n default:\n return 0;\n }\n }", "public boolean userExists(String user){\n boolean answer = false;\n //look into the database\n try{\n statement = connection.createStatement();\n //execute SQL query and get the data from the database\n ResultSet myResult = statement.executeQuery(\"SELECT name FROM members WHERE name = '\" + user +\"'\");\n while (myResult.next()) {\n if (myResult.getString(\"name\")!= null)\n //name exists so answer = true\n answer = true;\n }\n\n }catch (SQLException ex){ex.printStackTrace();}\n return answer;\n }", "public void checkIfUserExists(){\n refIdsOnly = database.getReference(\"ids\");\n String idText1 = idEdit.getText().toString();\n\n idListener = new ValueEventListener() {\n boolean userDoesntExist = true;\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n // removing the event listener to make sure it only happens once\n // otherwise it has time to check again for the user just created\n refIdsOnly.removeEventListener(idListener);\n if (dataSnapshot.exists()){\n for (DataSnapshot data:dataSnapshot.getChildren()){\n String id = data.getValue(String.class);\n if (idText1.equals(id)){\n userDoesntExist = false;\n }\n }\n }\n if (userDoesntExist){\n register(idText1);\n }\n else\n Toast.makeText(RegistrationActivity.this, \"duplicate id number\", Toast.LENGTH_LONG).show();\n }\n @Override\n public void onCancelled(DatabaseError databaseError) {\n Toast.makeText(RegistrationActivity.this, \"failed\", Toast.LENGTH_LONG).show();\n }\n };\n refIdsOnly.addValueEventListener(idListener);\n }", "private boolean userExists(Utente checkUser) {\n\t\tDB db = getDB();\n\t\tMap<Long, UtenteBase> users = db.getTreeMap(\"users\");\n\t\tfor(Map.Entry<Long, UtenteBase> user : users.entrySet())\n\t\t\tif(user.getValue() instanceof Utente && (((Utente)user.getValue()).getUsername().equals(checkUser.getUsername())))\n\t\t\t\treturn true;\n\t\treturn false;\n\t}", "boolean hasUserManaged();", "private static boolean verificaUser(String username) {\n String user = null;\r\n try {\r\n PreparedStatement stmt = c.prepareStatement(\"SELECT * FROM utilizador where nome=?;\");\r\n stmt.setString(1, username);\r\n ResultSet rs = stmt.executeQuery();\r\n rs.next();\r\n user = rs.getString(\"nome\");\r\n if (user.equals(username)) {\r\n return true;\r\n }\r\n } catch (SQLException e) {\r\n System.out.println(e);\r\n }\r\n return false;\r\n }", "boolean isExpired(int userId);", "private void userDidLeave() {\n DeviceSingleton deviceSingleton = DeviceSingleton.getInstance();\n deviceSingleton.setImInARoom(false);\n deviceSingleton.setJoinedChat(false);\n\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putBoolean(\"savedJoinedChat\", false);\n editor.commit();\n Intent intent2 = new Intent(ShowMapActivity.this, LoginActivity.class);\n startActivity(intent2);\n// break;\n\n }", "public boolean usersFilled() throws SQLException {\n\t\ttry {\n\t\t\tif (getUsers().last() == true) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn false;\n\t}", "@Override\r\n\tpublic boolean deleteUser() {\n\t\treturn false;\r\n\t}", "private void checkForUser(){\n if(mUserId != -1){\n return;\n }\n\n if(mPreferences == null) {\n getPrefs();\n }\n\n mUserId = mPreferences.getInt(USER_ID_KEY, -1);\n\n if(mUserId != -1){\n return;\n }\n\n //do we have any users at all?\n List<User> users = mUserDAO.getAllUsers();\n if(users.size() <= 0 ){\n User defaultUser = new User(\"din_djarin\",\"baby_yoda_ftw\");\n mUserDAO.insert(defaultUser);\n }\n }", "private void userHasBooking() throws SQLException {\n BookingModel bookingModel2 = new BookingModel();\n if (bookingModel2.checkUserBooking(employeeID)) {\n hasBooking = true;\n } else {\n hasBooking = false;\n }\n\n }", "@Override\r\n\tpublic Boolean userExist(String username) {\n\t\treturn null;\r\n\t}", "public boolean checkDb() {\n\t\t\n\t\tint userId = Auth.getCurrentUser().getId();\n\t\tString sql = \"select id from PersonalDetails where id='\"+userId+\"'\";\n\t\tint gotId;\n\t\t//connectToDb();\n\t\t\n\t\ttry(Connection conn = myDb;\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tResultSet rs = stmt.executeQuery(sql)){\n\t\t\tgotId = rs.getInt(\"id\");\n\t\t}catch(SQLException e){\n\t\t\t\n\t\t\tmyDb = null;\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(gotId == userId) {\n\t\t\treturn true;\n\t\t}else {\n\t\t\t//return false;\n\t\t\treturn false;\n\t\t}\n\n\t}", "boolean checkLogout(User user, HttpServletRequest request, HttpSession session);", "public Boolean user_exists (UserWS user) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tQuery i = null;\r\n\t\t\t\t\t\r\n\t\t\t\t\tiniciaOperacion();\r\n\t\t\t\t\ti = sesion.createQuery(\"SELECT u.id_user FROM User u WHERE u.mail = :login\"); \r\n\t\t\t\t i.setString(\"login\", user.getLogin());\r\n\t\t\t\t \r\n\t\t\t\t return (i.uniqueResult() != null);\r\n\t\t\t\t}", "@Override\n\tpublic boolean deleteUser(int userid) {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\tlogger.info(\"IN DELETE METHOD\" + userid);\n\t\t// Check if head Unit is registered with given userID\n\t\tString check_query = \"select count(1) from user where user_id = ?\";\n\t\tint result = jdbcTemplate.queryForObject(check_query, new Object[] { userid }, Integer.class);\n\t\tlogger.info(\"Result ======= \" + result);\n\t\tif (result > 0) {\n\t\t\tString query = \"delete from user where user_id= ?\";\n\t\t\tint rowdelete = jdbcTemplate.update(query, userid);\n\t\t\tlogger.info(\"Row Delete ======= \" + rowdelete);\n\t\t\tif (rowdelete > 0) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t}", "boolean userExists(HttpServletRequest request, String userId);", "public Boolean ins(User user);", "Boolean checkUserExists(String userName) throws AppException;", "public boolean doesTheUserExist(String user)\r\n\t {\r\n\t\t if (!users.get(user).equals(null))\r\n\t\t return true;\r\n\t\t return false;\r\n\t }", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t\tdatabseExecuteQuery(\"DELETE FROM userdetails where username='\"+Username+\"'\");\n\t\t\t\t//after that make verification GUI again.\n\t\t\t\tnew Verification();\n\t\t\t}", "public boolean ifHasArrangement (String userToDelete)\n {\n cursor2 = arrangement_db.rawQuery(\"SELECT * FROM \"+MyArrangementSQLiteHelper.TABLE_NAME+\" WHERE \"+MyArrangementSQLiteHelper.COLUMN_USERNAME+\"=?\",new String[] {userToDelete});\n if (cursor2!=null)\n {\n cursor2.moveToFirst();\n return true ;\n }\n return false ;\n }", "@Override\n\tpublic void onUserNeedLogout() {\n\t\t\n\t}", "@Override\n\tpublic void onUserNeedLogout() {\n\t\t\n\t}", "public int deleteExistingUser(String uname){\n\t\tif(this.connHndlr == null)\n\t\t\tthis.connHndlr = new ConnectionHandler();\n\t\tConnection conn = this.connHndlr.getConnection();\n\t\tint returnvalue = 0;\n\t\t\n\t\tuname = uname.toLowerCase();\t\t\n\t\ttry{\n\t\t\tString vfnQuery = \"select * from LoginDetails l where l.username = '\" + uname + \"'\";\n\t\t\tthis.stmt = conn.createStatement();\n\t\t\tthis.resultSet = this.stmt.executeQuery(vfnQuery);\n\t\t\tif(this.resultSet.next()){\n\t\t\t\tString delQuery = \"delete from LoginDetails where username = '\" + uname + \"'\" ;\n\t\t\t\tthis.preparedStatement = conn.prepareStatement(delQuery);\n\t\t\t\tthis.preparedStatement.executeUpdate();\n\t\t\t\treturnvalue = 1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturnvalue = 0;\n\t\t\t}\t\t\t\n\t\t}\n\t\tcatch(SQLException se){\n\t\t\tSystem.out.println(\"SQL Exception \" + se.getMessage());\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Exception \" + e.getMessage());\n\t\t}\n\t\treturn returnvalue;\n\t}", "public boolean existsUser(String username);", "public boolean isUser()\n\t{\n\t\treturn (id != -1);\n\t}", "@Test\n public void rowExists(){\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n timeListDAO.createTimeList(new TimeList(\"dummy\", 1990, 0, 60, 0, 0));\n\n assertTrue(timeListResource.rowExists(\"dummy\",1990,0));\n\n //clean up\n timeListDAO.removeTimeList(1990,0, \"dummy\");\n userDAO.removeUser(\"dummy\");\n }", "public boolean deleteUser() {\n\n //The query to send to SQLite to update a password (have to change for the proper field name\n //\n String deleteUserQuery = \"DELETE FROM UserAccount WHERE id=\" + this.ID;\n boolean updated = false;\n\n //Try / catch because when connection to database there is possible problem\n //Can handle connection problem, etc.\n try{\n //Code to delete the user\n\n\n\n if(updated){//If the updated worked\n this.userName = \"\";\n this.password = \"\";\n\n return(true);//return true\n }\n }\n catch(Exception ex)//Error in database, lost connection or something\n {\n return(false);\n }\n\n return(false);\n }", "public void IsInUse() {\n\t\tSystem.out.println(\"Table being cleaned, cannot be used.\");\n\t}", "public boolean upadte(User user);", "private void isUser() {\r\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\r\n assert user != null;\r\n String Uphonenumber = user.getPhoneNumber();\r\n final String usernumber = Objects.requireNonNull(Uphonenumber);\r\n\r\n DatabaseReference reference = FirebaseDatabase.getInstance().getReference(\"UsersData\");\r\n Query checkUser = reference.orderByChild(\"phone\").equalTo(usernumber);\r\n checkUser.addListenerForSingleValueEvent(new ValueEventListener() {\r\n @Override\r\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\r\n if (dataSnapshot.exists()){\r\n\r\n nameFromDB = dataSnapshot.child(usernumber).child(\"name\").getValue(String.class);\r\n phoneFromDB = dataSnapshot.child(usernumber).child(\"phone\").getValue(String.class);\r\n dashboardUsername.setText(nameFromDB);\r\n dashboardPhoneNumber.setText(phoneFromDB);\r\n progressBar.DismissDialog();\r\n\r\n\r\n }\r\n else{\r\n Toast.makeText(getApplicationContext(),\"User data didn't matched! \", Toast.LENGTH_LONG).show();\r\n }\r\n\r\n }//End of onDataChange method\r\n\r\n @Override\r\n public void onCancelled(@NonNull DatabaseError databaseError) {\r\n\r\n }\r\n });//End of addListenerForSingleValueEvent method\r\n\r\n\r\n }", "public Boolean deleteUser (long id){\n User user_to_be_deleted = userRepository.findById(id);\n if(user_to_be_deleted != null){\n userRepository.delete(user_to_be_deleted);\n return userRepository.existsById(id);\n }else{\n throw new UnknownUserException(\"This user doesn't exist and can therefore not be deleted\");\n }\n\n }", "@Override\r\n\tpublic boolean delUser(user user) {\n\t\tif(userdao.deleteByPrimaryKey(user.gettUserid())==1){\r\n\t\t\treturn true;}else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t}", "private Boolean isInUserBoard() {\n\t\t\tBoolean isInUserBoard;\n\t\t\t//String g = userBoard.getUser().getfName();\n\t\t\tif(userBoard.getUser().getExitCode() != null){\n if(Integer.parseInt(userBoard.getUser().getExitCode()) == 0 ){\n isInUserBoard = true;\n userSingleton.INSTANCE.setfName(userBoard.getUser().getfName());\n userSingleton.INSTANCE.setName(userBoard.getUser().getName());\n userSingleton.INSTANCE.setId(userBoard.getUser().getId());\n userSingleton.INSTANCE.setClasse(userBoard.getUser().getClasse());\n userSingleton.INSTANCE.setPassword(userBoard.getUser().getPassword());\n\n\n }\n else{\n isInUserBoard = false;\n }\n }\n else{\n isInUserBoard = false;\n }\n\n\n\n\t\t\treturn isInUserBoard;\n\t\t}", "public boolean hasUser() {\n return instance.hasUser();\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString id = UserID.getText();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tint check = db.idcheck(id);\r\n\r\n\t\t\t\t\tif (check == 1) {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(j, \"삭제되었습니다.\");\r\n\t\t\t\t\t\tdb.delete(id);\r\n\t\t\t\t\t\t로그인창 login = new 로그인창();\r\n\t\t\t\t\t\tlogin.loginpage();\r\n\t\t\t\t\t\tj.dispose();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(j, \"해당 아이디가 존재하지않습니다.\");\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (Exception 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}\r\n\t\t\t}", "boolean hasUserType();", "public User userExists(IDatabase db) {\n\t\tUser doesExist = db.userExists(model);\n\t\treturn doesExist;\n\t}", "private void deleteHocSinh() {\n\t\tString username = (String) table1\n\t\t\t\t.getValueAt(table1.getSelectedRow(), 0);\n\t\thocsinhdao.deleteUser(username);\n\t}", "@Override\r\n\tpublic int userExists(String id) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tString sql = \"SELECT COUNT(*) FROM \\\"Registration DB\\\".\\\"Userdetails\\\" where id=?\";\r\n\t\treturn jdbcTemplate.queryForObject(sql, new Object[] { id }, Integer.class);\r\n\t}", "@Override\n\tpublic boolean deleteHeadunit(int userid) {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\tlogger.info(\"IN DELETE METHOD\" + userid);\n\t\t// Check if head Unit is registered with given userID\n\t\tString check_query = \"select count(1) from user where user_id = ?\";\n\t\tint result = jdbcTemplate.queryForObject(check_query, new Object[] { userid }, Integer.class);\n\t\tlogger.info(\"Result ======= \" + result);\n\t\tif (result > 0) {\n\t\t\tString query = \"delete from user where user_id= ?\";\n\t\t\tint rowdelete = jdbcTemplate.update(query, userid);\n\t\t\tlogger.info(\"Row Delete ======= \" + rowdelete);\n\t\t\tif (rowdelete > 0) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t}", "public boolean isUsersExist(Pet pet);", "private void testUserName(){\r\n\t\t//get user with the 'test' userName\r\n\t\tString command = \"SELECT userName FROM users \"\r\n\t\t\t\t+ \"WHERE userName = \\\"\" + commandList.get(1) + \"\\\";\";\r\n\t\tSystem.out.println(command);//print command\r\n\t\ttry {//send command\r\n\t\t\trs = stmt.executeQuery(command);\r\n\t\t\t\r\n\t\t\tif(rs.next()){//if it returns user, userName exists\r\n\t\t\t\tout.println(\"exists\");\r\n\t\t\t} else {//no results returned, empty\r\n\t\t\t\tout.println(\"free\");\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\tout.println(e.getMessage());//send back error message\r\n\t\t}\r\n\t\t\r\n\r\n\t}", "@Override\n\tpublic int checkUser(User u) {\n\t\treturn userdao.checkUser(u);\n\t}", "private boolean checkUnpaidReservation(int id) throws SQLException {\n\t\tcheckUnpaidReservationStatement.clearParameters();\n\t\tcheckUnpaidReservationStatement.setInt(1, id);\n\t\tcheckUnpaidReservationStatement.setString(2, this.username);\n\t\tResultSet result = checkUnpaidReservationStatement.executeQuery();\n\t\tresult.next();\n\t\tboolean out = result.getInt(1) == 1;\n\t\tif (DEBUG) {\n\t\t\tSystem.out.println(\"checkUnpaidReservation: \"+result.getInt(1)+\"\\n\");\n\t\t}\n\t\tresult.close();\n\t\treturn out;\n\t}" ]
[ "0.64344406", "0.63356626", "0.63356626", "0.63356626", "0.63356626", "0.63356626", "0.63356626", "0.63356626", "0.6235863", "0.6199592", "0.6182359", "0.6164271", "0.6164271", "0.6164271", "0.6164271", "0.6164271", "0.6164271", "0.6164271", "0.6164271", "0.6164271", "0.6164271", "0.6164271", "0.6164271", "0.6164271", "0.6164271", "0.6164271", "0.6164271", "0.6164271", "0.6164271", "0.61574864", "0.60940456", "0.60535157", "0.60097116", "0.59945154", "0.59822583", "0.5979941", "0.5967427", "0.5961838", "0.59617186", "0.5949211", "0.59441596", "0.593668", "0.593668", "0.593668", "0.58860517", "0.5884381", "0.5879654", "0.5878421", "0.5875796", "0.58706886", "0.5852962", "0.5852495", "0.5840533", "0.5836061", "0.5831424", "0.58154076", "0.5812951", "0.57778215", "0.5754452", "0.5749582", "0.5742717", "0.5737013", "0.5703689", "0.5699401", "0.56895703", "0.56830853", "0.565421", "0.56511194", "0.5640581", "0.5623276", "0.5621389", "0.56200165", "0.5619992", "0.5611979", "0.5611775", "0.5607238", "0.56071913", "0.560534", "0.560534", "0.56000996", "0.5595918", "0.55751634", "0.557039", "0.5560845", "0.55576897", "0.5550605", "0.5545216", "0.55437815", "0.55336964", "0.55333495", "0.5528062", "0.55204576", "0.55166143", "0.55132973", "0.5506567", "0.55025077", "0.5500059", "0.5499377", "0.5495123", "0.5493217", "0.5488673" ]
0.0
-1
Checking when User exits during the message "Finding room for you".
public SNGTestCases Exit_TC1028() throws InterruptedException{ String flavour = "Electrical"; forDebugger(); waitForElement(By.id("com.pointedsquares.gamy5.android:id/header_name"),120); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/wallet_tab")).click(); waitForVisibilityOf(By.id("com.pointedsquares.gamy5.android:id/free_coins")); String coinsBefore = driver.findElement(By.id("com.pointedsquares.gamy5.android:id/free_coins")).getText().toString(); System.out.println(coinsBefore); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/sitngo_tab")).click(); waitForElement(By.id("com.pointedsquares.gamy5.android:id/header_name"),120); try{ waitForElement(By.xpath("//android.widget.TextView[contains(@text , 'Academics') and contains(@resource-id , 'itemTitle')]") , 5); }catch(Exception ex){ driver.scrollTo("Academics"); } driver.findElement(By.xpath("//android.widget.TextView[contains(@text , 'Academics') and contains(@resource-id , 'itemTitle')]/following-sibling::android.widget.TextView[contains(@text , 'More')]")).click(); waitForElement(By.id("com.pointedsquares.gamy5.android:id/search_all"), 10); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/search_all")).click(); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/search_all")).sendKeys(flavour); driver.findElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'flavour_name_list') and contains(@text , 'Electrical Engineering')]")).click(); waitForElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'stake_amount') and contains(@text , '500')]"),5); driver.findElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'stake_amount') and contains(@text , '500')]")).click(); waitForElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'message_text') and contains(@text , 'You are about to play Electrical Engineering game with 500 coins stake.')]"), 5); driver.findElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'message_text') and contains(@text , 'You are about to play Electrical Engineering game with 500 coins stake.')]")).click(); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/positive_button")).click(); waitForVisibilityOf(By.xpath("//android.widget.TextView[contains(@resource-id , 'response') and contains(@text , 'Finding room for you...')]")); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/exit_player")).click(); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/negative_button")).click(); waitForVisibilityOf(By.xpath("//android.widget.TextView[contains(@resource-id , 'stake_amount') and contains(@text , '500')]")); driver.navigate().back(); driver.navigate().back(); waitForElement(By.id("com.pointedsquares.gamy5.android:id/header_name"),120); waitForVisibilityOf(By.id("com.pointedsquares.gamy5.android:id/wallet_tab")); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/wallet_tab")).click(); waitForVisibilityOf(By.id("com.pointedsquares.gamy5.android:id/free_coins")); String coinsAfter = driver.findElement(By.id("com.pointedsquares.gamy5.android:id/free_coins")).getText().toString(); System.out.println(coinsAfter); assertTrue(coinsBefore.equals(coinsAfter) , "Coins Not Found Same After Exiting From Message \"Finding room for you\""); Thread.sleep(7000); return new SNGTestCases(driver); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void userDidLeave() {\n DeviceSingleton deviceSingleton = DeviceSingleton.getInstance();\n deviceSingleton.setImInARoom(false);\n deviceSingleton.setJoinedChat(false);\n\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putBoolean(\"savedJoinedChat\", false);\n editor.commit();\n Intent intent2 = new Intent(ShowMapActivity.this, LoginActivity.class);\n startActivity(intent2);\n// break;\n\n }", "@Override\r\n\tpublic void OnRoomUserLeave(long leaveRoomUser) {\n\t\tSomeLeaveRoom(String.valueOf(leaveRoomUser));\r\n\t}", "private void checkForGameEnd() {\n\t\tint checkWin = controller.checkForWinner();\n\t\tif(playerType == null && checkWin == 1 || (playerType != null && playerType == checkWin)) {\n\t\t\tgameFinished = true;\n\t\t\tAlert alert = new Alert(Alert.AlertType.WARNING);\n\t\t\talert.setTitle(\"VICTORY\");\n\t\t\talert.setHeaderText(\"VICTORY\");\n\t\t\talert.setContentText(\"CONGRATULATIONS! YOU WIN!\");\n\t\t\talert.showAndWait()\n\t\t .filter(response -> response == ButtonType.OK)\n\t\t .ifPresent(response -> formatSystem());\n\t\t\t\n\t\t}else if (playerType == null && checkWin == 2 || (playerType != null && playerType%2 + 1 == checkWin)) {\n\t\t\tgameFinished = true;\n\t\t\tAlert alert = new Alert(Alert.AlertType.WARNING);\n\t\t\talert.setTitle(\"DEFEAT\");\n\t\t\talert.setHeaderText(\"DEFEAT\");\n\t\t\talert.setContentText(\"SHAME! YOU LOSE!\");\n\t\t\talert.showAndWait()\n\t\t .filter(response -> response == ButtonType.OK)\n\t\t .ifPresent(response -> formatSystem());\n\t\t\t\n\t\t}else if (controller.checkForTie()) {\n\t\t\tgameFinished = true;\n\t\t\tAlert alert = new Alert(Alert.AlertType.WARNING);\n\t\t\talert.setTitle(\"STALEMATE\");\n\t\t\talert.setHeaderText(\"STALEMATE\");\n\t\t\talert.setContentText(\"ALAS! TIE GAME!\");\n\t\t\talert.showAndWait()\n\t\t .filter(response -> response == ButtonType.OK)\n\t\t .ifPresent(response -> formatSystem());\n\t\t}\n\t\t\n\t\tif(playerType != null && gameFinished) {\n\t\t\tSystem.out.println(\"closing connection\");\n\t\t\ttry {\n\t\t\t\tconnection.close();\n\t\t\t}catch (Exception e) {\n\t\t\t\tSystem.out.println(\"ERROR CLOSING\");\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void checkOutRoom() {\n\t\t\n\t}", "public void onUserLeaveHint() {\n\t\tsuper.onUserLeaveHint();\n\t\tfinish();\n\t}", "public void endGame() {\n Player player = playerManager.getWinner();\n MainActivity mainActivity = (MainActivity) this.getContext();\n updateLiveComment(\"Winner : \" + player.getName());\n mainActivity.setAlertDialog(player.getName()+\" Wins !\", \"Congratulations\", true);\n }", "void leave(User user);", "private void deathRoom()\n {\n if(currentRoom.equals(deathRoom4))\n {\n alive = false;\n }\n }", "public void endGame() {\n\t\t// If Avengers lose and Loki wins\n\t\tif (!avengersAlive()) {\n\t\t\tca_attack.setEnabled(false);\n\t\t\the_attack.setEnabled(false);\n\t\t\tbw_attack.setEnabled(false);\n\t\t\thulk_attack.setEnabled(false);\n\t\t\tthor_attack.setEnabled(false);\n\t\t\tloki_attack.setEnabled(false);\n\t\t\ttextArea.append(\"\\n G A M E O V E R \\n\");\n\t\t\ttextArea.append(\"Oh no! Avengers lost... Loki conquered earth...\");\n\t\t}\n\t\t\n\t\t// If Loki loses and Avengers win\n\t\telse if (!lokiAlive()) {\n\t\t\tca_attack.setEnabled(false);\n\t\t\the_attack.setEnabled(false);\n\t\t\tbw_attack.setEnabled(false);\n\t\t\thulk_attack.setEnabled(false);\n\t\t\tthor_attack.setEnabled(false);\n\t\t\tloki_attack.setEnabled(false);\n\t\t\ttextArea.append(\"\\n Y O U W O N \\n\");\n\t\t\ttextArea.append(\"Yay! Avengers saved the world from Loki! Nice work!\");\n\t\t}\n\t}", "public boolean quit(TBGPProtocolCallback callback) {\n\t\tif(!isActive()) {\n\t\t\tString removedPlayer = players.remove(callback);\n\t\t\tlogger.info(removedPlayer + \" left the room\");\n\t\t\tbroadcast(removedPlayer + \" left room \"+this.thisRoomName, TBGPCommand.SYSMSG);\n\t\t\treturn true;\n\t\t} else {\n\t\t\tlogger.info(\"Unable to leave room in a middle of a game\");\n\t\t\treturn false;\n\t\t}\n\t}", "static private void TalkTo() {\n if (BSChristiansen.getCurrentRoom() == currentRoom) {\n System.out.println(BSChristiansen.getDescription() + \", yet he still gives you good advice:\\n\");\n System.out.println(BSChristiansen.getDialog(0));\n System.out.println(\"\");\n woundedSurvivor();\n } else if (mysteriousCrab.getCurrentRoom() == currentRoom && inventory.getInventory().containsKey(\"Shroom\")) {\n System.out.println(mysteriousCrab.getDescription() + \"\\n\" + mysteriousCrab.getDialog(0));\n } else {\n System.out.println(\"There is nobody to communicate with in this Room\");\n }\n\n }", "public void checkGameEndState() {\n\t\tfor(MapCharacter c : friendlyMissionCriticals) {\n\t\t\tif(!friendlies.contains(c))\n\t\t\t\tthrow new PlayerLosesException();\n\t\t}\n\t\tif(getEnemies().size() == 0)\n\t\t\tthrow new PlayerWinsException();\n\t}", "public void leave()\n {\n if (chatRoomSession != null)\n { // manually close the chat room session\n // and set the chat room session to null.\n chatRoomSession.close();\n chatRoomSession = null;\n }\n\n Iterator<Entry<String, Contact>> membersSet =\n participants.entrySet().iterator();\n\n while (membersSet.hasNext())\n {\n Map.Entry<String, Contact> memberEntry = membersSet.next();\n\n Contact participant = memberEntry.getValue();\n\n fireParticipantPresenceEvent(participant,\n AdHocChatRoomParticipantPresenceChangeEvent.CONTACT_LEFT,\n \"Local user has left the chat room.\");\n }\n\n // Delete the list of members\n participants.clear();\n }", "public void resign(){\n\t\tif(Main.getInstance().getScreen() instanceof GEngine){\r\n\t\t\tPlayer user = getUserPlayer();\r\n\t\t\tPlayer winner = state.players[user.playerId == 0 ? 1 : 0];\r\n\t\t\t\r\n\t\t\tnew Popup(\"Game over\", true,\r\n\t\t\t\tnew Label(String.format(\"Player %s has won the game!\", winner.getDisplayName()), Assets.SKIN), \r\n\t\t\t\tComponentFactory.createButton(\"OK\", new ClickListener() {\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void clicked(InputEvent event, float x, float y) {\r\n\t\t\t\t\t\tMain.getInstance().setScreen(MainMenu.getInstance());\r\n\t\t\t\t\t\tPopup.getCurrentPopup().close();\r\n\t\t\t\t\t}\r\n\t\t\t\t})).show();\r\n\t\t}\r\n\t\t\r\n\t\tMain.getInstance().games.endGame(this);\r\n\t}", "boolean hasLeaveGameReqeuest();", "private void gameEnd(String loser) {\n }", "private void ExitRoom() {\n stopFirestoreListenerService();\n\n SharedPreferences roomInfo = getSharedPreferences(\"PreviousRoom\", 0);\n SharedPreferences.Editor roomInfoEditor = roomInfo.edit();\n\n roomInfoEditor.putString(\"roomID\", \"\");\n\n roomInfoEditor.apply();\n\n SelectRoomActivity.recentRooms.remove(roomId);\n }", "public boolean endGameCheck() {\r\n\r\n if (forceQuit) {\r\n // Silently quit.\r\n return true;\r\n\t\t}\r\n\r\n String[][] messages = new String[7][2];\r\n String[] theMessage = new String[2];\r\n Random randInt = new Random();\r\n boolean userSaidYes = false;\r\n\r\n // Just for comedy value :p\r\n messages[0][0] = \"Giving up already?\";\r\n messages[1][0] = \"Are you sure you want to quit?\";\r\n messages[2][0] = \"Don't you want to play some more?\";\r\n messages[2][1] = \"Confusing isn't it? :p\";\r\n messages[3][0] = \"Quit? Do you reeeeeeeealy want to do that?\";\r\n messages[4][0] = \"You want to quit? Fine be like that...\";\r\n messages[5][0] = \"Ugh, you didn't come here to quit did you?\";\r\n messages[6][0] = \"Pft, game not good enough for ya!?\";\r\n messages[6][1] = \"Oh! There goes another one ;)\";\r\n\r\n // Give the user a random message. This is an array\r\n // which has an element that tells us what polarity\r\n\t\t// the question is.\r\n theMessage = messages[randInt.nextInt(messages.length)];\r\n\r\n if (endGameSwitch) {\r\n\r\n // Just double check with the user.\r\n System.out.print(\"\\n \" + theMessage[0]);\r\n userSaidYes = saidYes(true);\r\n\r\n if ((userSaidYes == false) && (theMessage[1] == null)\r\n\t\t\t|| (userSaidYes == true) && (theMessage[1] != null)) {\r\n \r\n // Player has changed their mind! :D\r\n\t\t\t\tSystem.out.println(\" You made the right choice :)\");\r\n bluffedQuit = true;\r\n endGameSwitch = false;\r\n return false;\r\n\t\t\t}\r\n\r\n // Player is a big meanie.\r\n System.out.println(\"\\n Game Over!\");\r\n setForceQuit(true);\r\n return true;\r\n\t\t}\r\n\r\n // Don't bother the user.\r\n return false;\r\n\t}", "boolean checkEndGame() throws RemoteException;", "@Override\n public boolean shouldExecute(Guild guild, User author, MessageChannel channel, String message) {\n if (guild == null && author.getId().equals(Owner.USER)) {\n if (message.split(\" \").length != 2) {\n return false;\n }\n\n return (message.toLowerCase().startsWith(\"leave\"));\n }\n\n return false;\n }", "public boolean isFinalRoom(){\n System.out.println(\"------------------------------------------ ->\"+((EnemyRoom) room).getType());\n return ((EnemyRoom) room).getType().equals(\"Boss\");\n }", "public void Verify_UnfortunatelyMessage() throws InterruptedException\r\n\t{\r\n\t\tExplicitWait(Checkavailability);\r\n\t\tThread.sleep(3000);\r\n\t\tif(showRoomInfo.getText().contains(\"Unfortunately, there are no available rooms.\")||(showRoomInfo.getText().contains(\"Or try our partner hotels below.\"))||(showRoomInfo.getText().contains(\"Please try adjusting your search criteria.\")))\r\n\t\t{\r\n\t\t\t//System.out.println(\"After Closing the room/rate using House Control ,rooms are not showing in Booking Engine \");\r\n\t\t\tlogger.info(\"After Closing the room/rate using House Control ,rooms are not showing in Booking Engine \");\r\n\t\t\ttest.log(Status.PASS, \"After Closing the room/rate using House Control ,rooms are not showing in Booking Engine \");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tlogger.error(\"Room/rate are not closed properly in Admin\");\r\n\t\t\ttest.log(Status.FAIL, \"Room/rate are not closed properly in Admin\");\r\n\t\t}\r\n\t}", "public synchronized void exitHall(){\n\t\twhile(sessionEnded==false){\t\t\t//This is a if before once the session has ended and the customers have been \n\t\t\t\t\t\t\t\t\t\t\t//notified there is no chance the sessionEnded variable will change again so there\n\t\t\t\t\t\t\t\t\t\t\t//is no need to check.\n\t\t\ttry {\n\t\t\t\tSystem.out.println(\"The customer \"+Thread.currentThread().getId()+\" is waiting for the movie to finish.\");\n\t\t\t\twait();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tnbPlaces++;\n\t\tSystem.out.println(\"The customer \"+Thread.currentThread().getId()+\" will exit the projection hall.\");\n\t\t/**\n\t\t * This part of the code is for reinitializing the states before starting the next session.\n\t\t * The last customer changes the state before exiting.\n\t\t */\n\t\tif(nbPlaces==totalSeats){\n\t\t\tSystem.out.println(\"Last customer comes and seat number is \"+nbPlaces);\n\t\t\tallExited=true;\n\t\t\tcinemaEnded=false;//Exit\n\t\t\tsessionEnded=false;\n\t\t\tnotifyAll();\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\n\t}", "@Override\n\tpublic void onLeaveLobbyDone(LobbyEvent arg0) {\n\t\tMain.log(getClass(), \"onLeaveLobbyDone\");\n\t}", "void end(String roomId);", "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 }", "public void checkIn(Recepcionist user, List<Reservation> reservations, List<Room> rooms){\n int reservationId;\n Room room;\n reservationId = this.enterNumber(\"el numero de Reserva\");\n room = user.checkIn(reservationId,reservations,rooms);\n if(room != null){\n System.out.println(\"\\nEl check-in fue exitoso. Pueden ocupar la habitacion Nro. \"+room.getRoomNumber());\n } else {\n System.out.println(\"\\nEl numero de reserva no se encuentra en el sistema.\");\n }\n }", "@Override\n public void onPeerLeft(Room room, List<String> strings) {\n if (!mPlaying && shouldCancelGame(room)) {\n if (timer!= null)\n timer.cancel();\n if (mRoomId != null)\n Games.RealTimeMultiplayer.leave(getApiClient(), this, mRoomId);\n getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);\n if (!dialogShown)\n finish();\n }\n }", "@Override\n\tpublic void onUserJoinedRoom(RoomData arg0, String arg1) {\n\t\t\n\t}", "public void actionPerformed(ActionEvent e) {\n try {\r\n if (roomOrUser == 1) {\r\n // send message to a room\r\n sock.executeCommand(new RoomMessageCommand(new LongInteger(name), textArea_1.getText()\r\n .getBytes()));\r\n textArea_2.setText(textArea_2.getText() + textField.getText() + \": \" + textArea_1.getText()\r\n + \"\\n\");\r\n } else if (roomOrUser == 2) {\r\n // send message to a user\r\n sock.executeCommand(new UserMessageCommand(new LongInteger(name), textArea_1.getText()\r\n .getBytes(), true));\r\n textArea_2.setText(textArea_2.getText() + textField.getText() + \": \" + textArea_1.getText()\r\n + \"\\n\");\r\n }\r\n } catch (InvalidCommandException ex) {\r\n JOptionPane.showMessageDialog(null, \"Unable to join or leave room.\", \"alert\",\r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n }", "private void ChatLeave() {\n\t\t\r\n\t\tClose();\r\n\t}", "public String checkRoom() {\n\t\tString roomInput = \"\";\n\t\ttry {\n\t\t\tdo {\n\t\t\t\troomInput = (String) JOptionPane.showInputDialog(null, TextResources.enterRoom, \"Room Number\",\n\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE, roomIcon, null, \"\");\n\t\t\t\tif (roomInput == null) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t} while (roomInput.equals(\"\") || !findUserRoomNumber(roomInput));\n\t\t} catch (NumberFormatException ex) {\n\t\t\tJOptionPane.showMessageDialog(null, TextResources.wrongInput);\n\t\t\treturn null;\n\t\t}\n\t\treturn roomInput;\n\t}", "boolean isFinished() {\n\t\tif (this.currentRoom.isExit() && this.currentRoom.getMonsters().isEmpty()) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private boolean checkGameOver() {\n\t\tboolean singlePlayerWon = otherPlayer.getLife() == 0;\n\t\tboolean otherPlayerWon = singlePlayer.getLife() == 0;\n\n\t\tif (singlePlayerWon || otherPlayerWon) {\n\t\t\tthis.singlePlayer.createEndButton(singlePlayerWon);\n\t\t\tthis.singlePlayer.onGameOver();\n\t\t\tthis.otherPlayer.onGameOver();\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public static void checkFromUser() {\n\t\tif (askUser(\"Please type y to execute program and any other key to stop\").contentEquals(\"y\")) {\n\t\t\tSystem.out.println(\"Continuing\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Terminating program\");\n\t\t\tSystem.exit(0); \n\t\t}\n\t\tSystem.out.println(\"Calculating the greatest house income, the greatest income after expenditure and greatest savings from the given 3 families\");\n\t}", "void opponentInRoom();", "@Override\n public void RageQuit() {\n //They won't have a score\n timer.stopTimer();\n\n if (view.confirmRageQuit()){\n // Punish them!\n DesktopAudio.getInstance().playPunish();\n grid = game.getSolved();\n for (int i = 0; i < 9; i++){\n for (int j = 0; j < 9; j++){\n view.setGiven(i, j, grid.getNumber(i, j));\n }\n }\n if (view.confirmNewGame()){\n setNextGame();\n }\n }else{\n timer.startTimer();\n }\n }", "private void handleMangerKickUserOut() {\n String userName = EventMessageParser.extractUserName(this.message);\n SocketConnection targetConnection = SocketManager.getInstance()\n .getUserConnection(userName);\n targetConnection.send(this.message);\n }", "private void onLeaveRoom(String roomName) {\n if (roomEntries.containsKey(roomName)) {\n backBTN.setEnabled(chatController.getJoinedRooms().size() > 0);\n JPanel panel = roomEntries.get(roomName);\n panel.removeAll();\n renderRoom(roomName, panel);\n panel.revalidate();\n panel.repaint();\n }\n }", "public abstract void leaveRoom();", "private boolean checkExit(Exit exit) {\n if (currentRoom.getCreature() != null && exit.getCreatureBlocks()) {\n System.out.println(\"You attempt to leave, but the \" + currentRoom.getCreature().getName() + \" blocks the way.\");\n return false;\n }\n\n // Check if the player has the necessary Item to use the Exit\n if (exit.getRequiredItem() != null && !player.isItemInInventory(exit.getRequiredItem())) {\n System.out.println(\"You do not possess the necessary Item to pass through this Exit.\");\n return false;\n }\n\n // There's nothing preventing the player from going through the Exit. \n System.out.println(exit.getTransition());\n return true;\n }", "public boolean gameEnd(){\r\n return !hasMovements(model.getCurrentPlayer().getColor());\r\n }", "public void checkGameStatus() {\n everyTenthGoalCongrats();\n randomPopUpBecauseICan();\n }", "@Override\n\tpublic void onUserLeftRoom(RoomData arg0, String arg1) {\n\t\t\n\t}", "void endGame(String message, int player) {\n //changes the colour of the buttons back to the winner's colour (red or blue)\n if (player == 0) {\n changeColourButton(new Color(255, 0, 0));\n } else {\n changeColourButton(new Color(0, 0, 255));\n }\n //stops the game from continuing\n disableButtons();\n //saves the winner to the leaderboards\n saveGame(message, player);\n //Determmines if the message is \"It's a Tie!\". If it is the pop up has the \n //message \"It's a Tie!\". Otherwise the pop up has the message \"The winner is: \" \n //plus the winner.\n if (message.equals(\"It's a Tie!\")) {\n EndPopUp.showMessageDialog(this, message);\n } else {\n EndPopUp.showMessageDialog(this, \"The winner is: \" + message);\n }\n\n //updates leaderboard (garbage String argument)\n changeTopScores.setName(\"asdf\");\n }", "private void exitGame(){\n out.println(\"\\r\\nPress ENTER to finish\");\n in.nextLine();\n// game.playersConnected--;\n login = false;\n }", "boolean hasUserMessage();", "@Override\n public void exit()\n {\n\t ((ControllerHost)getHost()).showPopupNotification(\"Chord Buddy Exited\");\n }", "@Override\n\tpublic void onRoomDestroyed(RoomData arg0) {\n\t\t\n\t}", "public void endGameMessage() {\n gameArena.addText(endGameMsg);\n }", "public void action() \n {\n if (!hasSecondWord()) { // there is no second word\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where? Please be more specific\");\n return; \n } \n String direction = getSecondWord(); //second word found\n\n // Possible room\n Room nextRoom = player.getCurrentRoom().getExit(direction);\n\n if (nextRoom == null) {\n System.out.println(\"There is no door in that direction\");\n }\n else {\n if (!nextRoom.isLocked()) {\n enterRoom(nextRoom);\n }\n //unlock room should now be another action instead\n // else if (nextRoom.isUnlocked(null)) {\n // enterRoom(nextRoom);\n // }\n else {\n System.out.println(\"This door is locked!\");\n }\n } \n }", "public void messageToUser() {\n // show a message dialog - the message is an error message.\n JOptionPane.showMessageDialog(new JFrame(),\n \"You are missing some parameters in the level definitions, Please check it\", \"Error!\",\n JOptionPane.ERROR_MESSAGE);\n // exit the program\n System.exit(0);\n }", "boolean end() {\r\n\t\tif (this.gameOver == true)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "void gameFinished(String message) {\n leader.acknowledgeGameFinished(message);\n opponent.acknowledgeGameFinished(message);\n\n leader.requestRematch();\n opponent.requestRematch();\n }", "static String enter(Player player, Room room) {\n if (player.moveTo(room)) {\n return \"-Charlie Bot: You have entered \" + player.getLocation();\n } else {\n return \"That way appears to be blocked.\";\n }\n }", "public boolean verifyEndGame(Player gamer);", "private void doExit() {\n\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(\n BookingActivity.this);\n\n alertDialog.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //finish();\n //System.exit(0);\n goBack();\n }\n });\n\n alertDialog.setNegativeButton(\"No\", null);\n\n alertDialog.setMessage(\"Do you want to exit?\");\n alertDialog.setTitle(\" \");\n alertDialog.show();\n }", "public void lose() {\n displayErrorMessage(\"You Lose!\");\n if(controller.aiGame && !controller.loggedIn()){\n controller.switchToLogin();\n } else\n controller.switchToLobby();\n }", "public void lookAround() {\n\t\t\tdisplay(\"The room is full of gold!\");\n\t\t}", "public void giveUp(){\r\n System.out.println(\"You are such a loser. Glad that you give up!\");\r\n System.exit(0);\r\n }", "public void lose() {\n status.setText(\"You're finished\");\n gamegoing = false;\n }", "static void playerLost() {\n\n\t\tSystem.exit(0); // This code ends the program\n\t}", "public void leave() {\n FacesContext fc = FacesContext.getCurrentInstance();\n try {\n UbikeUser current = (UbikeUser) BaseBean.getSessionAttribute(\"user\");\n ExternalContext exctx = fc.getExternalContext();\n HttpServletRequest request = (HttpServletRequest) exctx.getRequest();\n long groupId = Long.parseLong(request.getParameter(\"groupId\"));\n long userId = current.getId();\n MemberShip memberShip = memberShipService.getMemberShip(userId, groupId);\n\n if (memberShip == null) {\n fc.addMessage(\"join:join_status\", new FacesMessage(FacesMessage.SEVERITY_ERROR,\n \"You are not member of this group yet\",\n \"You are not member of this group yet\"));\n return;\n }\n\n memberShipService.remove(memberShip.getId());\n fc.addMessage(\"join:join_status\", new FacesMessage(FacesMessage.SEVERITY_INFO,\n \"You leaved the group successfully!\",\n \"You leaved the group successfully!\"));\n\n List<MemberShip> members = (List<MemberShip>) BaseBean.getSessionAttribute(\"tmp_members\");\n members.remove(memberShip);\n\n } catch (Exception exp) {\n logger.log(Level.SEVERE, \"An error occurs while leaving group\", exp);\n fc.addMessage(\"join:join_status\", new FacesMessage(FacesMessage.SEVERITY_ERROR,\n \"An error occurs while processing your request\",\n \"An error occurs while processing your request\"));\n }\n }", "public void onReadyButton(View view) {\n mUser.setState(User.UserState.DoneWithNight);\n\n // NOTE!!!!!!!!!!!!!!!!!!\n // When ever the User updates,\n // Because of our event up above,\n // A check goes to see if everyone is ready.\n // If everyone is ready, then it moves to the next Lobby!\n // I hope.\n mRoom.updateUser(mUser);\n Intent intent = new Intent(this, DayMain.class);\n intent.putExtra(\"Client_Data\", mUser);\n intent.putExtra(\"Room_Data\", mRoom);\n Log.v(TAG, \"Starting day for the Villager \");\n startActivity(intent);\n\n }", "public void changeOutofService(Room room);", "protected void quitGame() {\n gameOver = true;\n }", "static void endgame() {\n System.out.println(\"MARK MY WORDS... THIS ISN'T THE END YET!\");\n System.out.println(\"Don't listen to her, she's just mad that she'll have to spend her eternal life in that black cell.\");\n enter = next.nextLine();\n System.out.println(\"The black portal gradually closes...lasting for only minutes until it exploded.\");\n System.out.println(\"The portal was gone and so was that evil witch...WAIT\");\n System.out.println(\"How about you Naga?\");\n enter = next.nextLine();\n System.out.println(\"My duty is done and I'm free from your grasp. Farewell...\");\n enter = next.nextLine();\n System.out.println(\"The black dragon creates a big black vortex that consumed Naga, his recent friend.\");\n enter = next.nextLine();\n System.out.println(\"The black dragon bids his farewell and the black portal too exploded out of sight.\");\n System.out.println(\"He was sent to accompany \" + username + \" to defeat his enemy, the witch.\");\n System.out.println(\"His job is done and he must return back to the dragon world...or whatever dimension he lived in\");\n enter = next.nextLine();\n System.out.println(\"I guess this is a lesson. Don't read wierd books...they don't end so well.\");\n System.out.println(\"/n\");\n System.out.println(\"/n\");\n System.out.println(\"Well, congratulations again \" + username + \" for defeating the boss.\");\n enter = next.nextLine();\n System.out.println(username + \" casts a purple portal and teleports to his hometown...everything looks fine\");\n enter = next.nextLine();\n System.out.println(\"OR IS IT? / 'I'm back. DID YOU MISS ME?'\");\n System.out.println(\"/n\");\n System.out.println(\"THANKS FOR PLAYING \" + username + \".\");\n gameplay = false;//end the main while loop\n }", "public void lifeLost() {\n\n\t\tif (invincipleTimer <= currentTickCount) {\n\t\t\tSystem.out.println(\"Life Lost!\");\n\n\t\t\thealth--;\n\t\t\tinvincipleTimer = currentTickCount + invicibleLength;\n\t\t}\n\t}", "public void winMessage() {\r\n\t\tSystem.out.print(\"\\n\\nCongratulations! You've won the game! :D\");\r\n\t\tSystem.exit(0);\r\n\t}", "public void didIWinOrLose() {\n\n\t}", "public static void endGame(Boolean hasWon){\n\t\tif(hasWon){\n\t\t\trun.winPopup();\n\t\t}\n\t\telse{\n\t\t\trun.losePopup();\n\t\t}\n\t}", "public void endTurn(){\n game.setNextActivePlayer();\n myTurn = false;\n\n stb.updateData(\"playerManager\", game.getPlayerManager());\n stb.updateData(\"aktivePlayer\", game.getPlayerManager().getAktivePlayer());\n stb.updateData(\"roomList\", game.getRoomManager().getRoomList());\n\n getIntent().putExtra(\"GAME\",game);\n getIntent().putExtra(\"myTurn\", false);\n finish();\n if(!game.getPlayerManager().getPlayerList().get(whoAmI).isDead())\n startActivity(getIntent());\n else\n fcm.unbindListeners();\n }", "@EventHandler\r\n\tpublic void Playerleave(PlayerQuitEvent e) {\r\n\t\tPlayer p = e.getPlayer();\r\n\t\tString pname = p.getName();\r\n\t\tp.getInventory().clear();\r\n\t\t Bukkit.broadcastMessage(\"\" + ChatColor.RED + ChatColor.WHITE + \"BMT | \" + pname + ChatColor.RESET + \"Heeft de server verlaten!\" + \"\");\r\n\t}", "public abstract void userTurnEnds(long ms);", "boolean hasGameEndedResponse();", "void endSinglePlayerGame(String message);", "public boolean canBeDoneIn(Room r) {\n\t\treturn true;\n\t}", "@Override\n\tpublic void exitThisRound(long userId) {\n\t\t\n\t}", "private void handleLose(){\n\t ButtonType goBackBtn = new ButtonType(\"Go back to menu\");\n\t Alert alert = new Alert(Alert.AlertType.INFORMATION,\n \"You've lost the game, retry?\", ButtonType.YES, goBackBtn);\n\t alert.setTitle(\"Lost\");\n Optional<ButtonType> result = alert.showAndWait();\n if(!result.isPresent())\n return;\n if(result.get() == ButtonType.YES){\n Screen screen = new Screen(stage, \"Dungeon\", \"View/DungeonPlayScreen.fxml\");\n try {\n Map reloadedMap = Map.loadFromFile(new FileInputStream(\n \"map/\" + map.getMapName() + \".dungeon\"));\n screen.display(new DungeonPlayController(stage, reloadedMap));\n } catch (FileNotFoundException e){\n e.printStackTrace();\n }\n }\n if(result.get() == goBackBtn){\n handleModeScreenButton();\n }\n }", "public boolean isGameOver() {\n return (hasHeWon(computer) || hasHeWon(user) || getAvailableStates().isEmpty());\n }", "private void endGame(){\n if (winner){\n Toast.makeText(this, \"Fin del Juego: Tu ganas\", Toast.LENGTH_SHORT).show();\n finish();\n } else {\n Toast.makeText(this, \"Fin del Juego: Tu pierdes\", Toast.LENGTH_SHORT).show();\n finish();\n }\n }", "@Test\n\t\t\tpublic void testRoomExit()\n\t\t\t{\n\t\t\t\t// One step from room\n\t\t\t\tboard.calcTargets(13, 14, 1);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(1, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(12, 14)));\n\n\t\t\t\t// Take two steps\n\t\t\t\tboard.calcTargets(13, 14, 2);\n\t\t\t\ttargets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(3, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(11, 14)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(12, 13)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(12, 15)));\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void on_room_entered(String room_door_name) {\n\n\t}", "@Test\n public void game_already_ended() {\n Player p1 = new Player(\"Player\");\n playerLobby.getGameCenter().newGame(p1, new Player(\"Opp\"));\n playerLobby.getGameCenter().setJustEnded(p1, new Player(\"Opp\"), true);\n\n when(session.attribute(\"player\")).thenReturn(new Player(\"Player\"));\n\n CuT.handle(request, response);\n assertTrue(playerLobby.getGameCenter().justEnded(p1));\n }", "private boolean askToLeave(){\n\t\tint ask_leave_prompt = JOptionPane.YES_NO_OPTION;\n\t\tint ask_leave_result = JOptionPane.showConfirmDialog(this, \"Would you like to return to main menu?\\nYou will lose all progress\", \"Return To Main Menu\", ask_leave_prompt);\n\t\tif (ask_leave_result == JOptionPane.YES_OPTION){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean endGame(String nom){\n \tif((nbFantomes==0 || players.size()==0) ||\n \t (gameMode==2 && (!live(nom) || winOfJuggernaut())))\n \t return true;\n \treturn false;\n }", "@Override\n public void onPeerDeclined(Room room, List<String> strings) {\n if (!mPlaying && shouldCancelGame(room)) {\n if (timer!= null)\n timer.cancel();\n if (mRoomId != null)\n Games.RealTimeMultiplayer.leave(getApiClient(), this, mRoomId);\n getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);\n }\n }", "private void showEndMessage()\n {\n showText(\"Time is up - you win!\", 390, 150);\n showText(\"Your final score: \" + healthLevel + \" points\", 390, 170);\n }", "boolean GameOver() {\n\t\treturn player.isDead();\n\t}", "public void handleCommand() {\n\t\tif (Client.isLoggedIn() == false)\n\t\t\treturn;\n\t\t\n\t\tClientUser user = Client.getUserByName(argument);\n\t\tif (user == Client.getThisUser()) {\n\t\t\tSystem.err.println(\"Trying to remove this user? This should never happen!\");\n\t\t}\n\t\tif (user != null) {\n\t\t\tClient.removeUser(user);\n\t\t\tClient.getMainWindow().getMainChatPanel().displayInfo(user.getName() + \" has logged off!\");\n\t\t} else {\n\t\t\tSystem.err.println(\"cquit used with a non-exisitng username!\");\n\t\t}\n\t}", "public void goRoom(Command command) \n {\n if(!command.hasSecondWord()) {\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where?\");\n return;\n }\n\n String direction = command.getSecondWord();\n\n // Try to leave current room.\n Room nextRoom = null;\n \n for(Exit e : currentRoom.getListExits()) {\n String key = e.getDirection();\n Room exit = e.getRoom();\n \n if(direction.equals(key)){\n nextRoom = exit;\n break;\n }\n }\n \n if (nextRoom == null) {\n \n }\n else {\n currentRoom = nextRoom;\n printExits ();\n }\n }", "public void onLeave()\n\t{\n\t}", "@EventHandler(priority = EventPriority.MONITOR)\n\tvoid onPlayerLeave(PlayerQuitEvent event)\n\t{\n\t\t//Remove the player from all permission groups for professions\n\t\tProfessionStats prof = new ProfessionStats(perms, data, config, event.getPlayer().getUniqueId());\n\t\tfor (String pr: prof.getProfessions())\n\t\t\tperms.playerRemove((String) null, event.getPlayer(), config.getString(\"permission_prefix\") + \".\" + pr + \".\" \n\t\t\t\t\t+ prof.getTierName(prof.getTier(pr)));\n\t}", "@FXML\n private void ConfirmLeaveLobby(ActionEvent actionEvent) throws InterruptedException, ExecutionException, LobbyException {\n PlayerController playerController = (PlayerController) ControllerRegistry.get(PlayerController.class);\n FireStoreController fireStoreController = (FireStoreController) ControllerRegistry.get(FireStoreController.class);\n\n fireStoreController.removePlayer(token, playerController.getPlayerByPlayersEnum(playerController.getClientPlayersEnum())\n .orElseThrow(() -> new LobbyException(\"PLAYERS NOT HERE HELP\", null)));\n returnToMainMenu(actionEvent);\n }", "public String checkMessage() {\n\t\tString userLatestStep = questionBot.get(owner.id());\n\n\t\t//se a amensagem comeca com '/', trata-se de um item de menu sendo acionado\n\t\tif(answerUser != null && answerUser.startsWith(\"/\"))\n\t\t\tuserLatestStep = answerUser;\n\n\t\t//busca no mapa de respostas as opcoes para o usuario\n\t\tObject options = response.get(userLatestStep);\n\n\t\t//obtem a mensagem a ser devolvida para o usuario\n\t\tString result = parseResult(options, answerUser);\n\n\t\t//mantem a ultima resposta do usuario\n\t\tuserLatestAnswer.put(owner.id(), answerUser);\n\n\t\treturn result;\n\t}", "public int onLeave( int dir )\n {\n return OK;\n }", "public boolean quitGame() {\n\t\treturn game.quitPlayer(this, \"sieler gibt auf\");\t\t\n\t}", "public String getExitString()\n {\n return (\"\\nSaída(s):\\n \" + roomExits.keySet());\n }", "public static boolean isGameFinished() {\n return mafiaIsWinner() || citizenIsWinner();\n }", "public void gameOverCheck() {\n //users\n if (tankTroubleMap.getUsers().size() != 0) {\n tankTroubleMap.setWinnerGroup(tankTroubleMap.getUsers().get(0).getGroupNumber());\n for (int i = 1; i < tankTroubleMap.getUsers().size(); i++) {\n if (tankTroubleMap.getUsers().get(i).getGroupNumber() != tankTroubleMap.getWinnerGroup())\n return;\n }\n }\n //bots\n int firstBot = 0;\n if (tankTroubleMap.getBots().size() != 0) {\n if (tankTroubleMap.getWinnerGroup() == -1) {\n firstBot = 1;\n tankTroubleMap.setWinnerGroup(tankTroubleMap.getBots().get(0).getGroupNumber());\n }\n for (int i = firstBot; i < tankTroubleMap.getBots().size(); i++) {\n if (tankTroubleMap.getBots().get(i).getGroupNumber() != tankTroubleMap.getWinnerGroup())\n return;\n }\n }\n tankTroubleMap.setGameOver(true);\n }", "@Override\n\tpublic void onCreateRoomDone(RoomEvent arg0) {\n\t\t\n\t}" ]
[ "0.68142027", "0.62841374", "0.625811", "0.6171473", "0.61255276", "0.6041364", "0.595324", "0.5931573", "0.5926616", "0.5897781", "0.5888978", "0.5831374", "0.5827765", "0.5817097", "0.5814648", "0.5787833", "0.57832307", "0.5781985", "0.57396144", "0.57342833", "0.5721245", "0.5715934", "0.5700851", "0.56840247", "0.56376386", "0.5619367", "0.5608957", "0.55994266", "0.5596416", "0.5594472", "0.55943877", "0.5581961", "0.55727166", "0.55680907", "0.5563211", "0.55631703", "0.55464387", "0.5545182", "0.5543603", "0.5535496", "0.5527073", "0.5521591", "0.5519422", "0.5518106", "0.5504876", "0.5500087", "0.54991347", "0.54974204", "0.5497047", "0.54914856", "0.5480701", "0.5469625", "0.54576963", "0.5455768", "0.5455554", "0.54531157", "0.54455775", "0.5443737", "0.5441193", "0.543283", "0.5423992", "0.54194707", "0.54034245", "0.53963107", "0.5394385", "0.53938615", "0.53935593", "0.53810203", "0.53802395", "0.53787863", "0.53766257", "0.537621", "0.53756297", "0.53711706", "0.5370362", "0.5367453", "0.5366814", "0.5366445", "0.53650296", "0.5364501", "0.53603965", "0.53559697", "0.5351492", "0.535111", "0.5343985", "0.53357726", "0.5326511", "0.5324068", "0.5322929", "0.5320744", "0.53205365", "0.53199464", "0.5318728", "0.5316219", "0.53156084", "0.5314671", "0.53075", "0.5306092", "0.5301055", "0.52987546", "0.52965623" ]
0.0
-1
User exits during the message "Game will begin in X seconds."
public SNGTestCases Exit_TC1029() throws InterruptedException{ String flavour = "Electrical"; forDebugger(); waitForElement(By.id("com.pointedsquares.gamy5.android:id/header_name"),120); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/wallet_tab")).click(); waitForVisibilityOf(By.id("com.pointedsquares.gamy5.android:id/free_coins")); String coinsBefore = driver.findElement(By.id("com.pointedsquares.gamy5.android:id/free_coins")).getText(); System.out.println(coinsBefore); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/sitngo_tab")).click(); waitForElement(By.id("com.pointedsquares.gamy5.android:id/header_name"),120); try{ waitForElement(By.xpath("//android.widget.TextView[contains(@text , 'Academics') and contains(@resource-id , 'itemTitle')]") , 5); }catch(Exception ex){ driver.scrollTo("Academics"); } driver.findElement(By.xpath("//android.widget.TextView[contains(@text , 'Academics') and contains(@resource-id , 'itemTitle')]/following-sibling::android.widget.TextView[contains(@text , 'More')]")).click(); waitForElement(By.id("com.pointedsquares.gamy5.android:id/search_all"), 10); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/search_all")).click(); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/search_all")).sendKeys(flavour); driver.findElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'flavour_name_list') and contains(@text , 'Electrical Engineering')]")).click(); waitForElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'stake_amount') and contains(@text , '500')]"),5); driver.findElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'stake_amount') and contains(@text , '500')]")).click(); waitForElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'message_text') and contains(@text , 'You are about to play Electrical Engineering game with 500 coins stake.')]"), 5); driver.findElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'message_text') and contains(@text , 'You are about to play Electrical Engineering game with 500 coins stake.')]")).click(); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/positive_button")).click(); waitForVisibilityOf(By.xpath("//android.widget.TextView[contains(@resource-id , 'response') and contains(@text , 'Finding room for you...')]")); waitForVisibilityOf(By.xpath("//android.widget.TextView[contains(@resource-id , 'response') and contains(@text , 'Waiting for Players to Join.\nPlease wait 9 seconds, approximately.')]")); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/exit_player")).click(); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/negative_button")).click(); waitForVisibilityOf(By.xpath("//android.widget.TextView[contains(@resource-id , 'stake_amount') and contains(@text , '500')]")); driver.navigate().back(); driver.navigate().back(); waitForElement(By.id("com.pointedsquares.gamy5.android:id/header_name"),120); waitForVisibilityOf(By.id("com.pointedsquares.gamy5.android:id/wallet_tab")); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/wallet_tab")).click(); waitForVisibilityOf(By.id("com.pointedsquares.gamy5.android:id/free_coins")); String coinsAfter = driver.findElement(By.id("com.pointedsquares.gamy5.android:id/free_coins")).getText(); System.out.println(coinsAfter); boolean isCoinEqual = true; if(!coinsBefore.equals(coinsAfter)){ isCoinEqual = false; } assertTrue(isCoinEqual , "Coins Not Found Same After Exiting From Message \"Finding room for you\""); Thread.sleep(7000); return new SNGTestCases(driver); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void endGame () {\n gameOver = true;\n System.out.println(\"Game over\");\n timer.cancel();\n }", "private void inGame() {\n\n if (!ingame) {\n timer.stop();\n\n }\n }", "public void endGame() {\n dispose();\n System.out.println(\"Thank you for playing\");\n System.exit(0);\n }", "void lose() {\n System.out.println(\"You have lost the game!!!\" + \"\\n\" + \"You spend: \" + Time.getSecondsPassed() + \" seconds playing the game!\");\n System.exit(0);\n\n }", "private void gameTimerOnFinish() {\n if (currentScreenGameState == GameState.PLAYING) {\n stopGame();\n }\n }", "public void exitGame() {\n System.out.println(\"Thank you and good bye!\");\n System.exit(0);\n }", "static void playerLost() {\n\n\t\tSystem.exit(0); // This code ends the program\n\t}", "private void endGame() {\n pauseTimer();\n if (!myGameOver && !myWelcome) {\n final int result = JOptionPane.showOptionDialog(null, \n \"Are you sure you want to end this game?\",\n \"End Current Game\", JOptionPane.YES_NO_OPTION,\n JOptionPane.QUESTION_MESSAGE, null, null,\n JOptionPane.NO_OPTION);\n if (result == JOptionPane.YES_OPTION) {\n myGameOver = true;\n repaint();\n } else {\n startTimer();\n }\n }\n }", "public void quitGame() {\n\t\t\tdisplay(\"Goodbye!\");\n\t\t\tSystem.exit(0);\n\t\t}", "public void quitGame() {\r\n System.out.println(\"Thanks for playing!\");\r\n }", "public void gameOver(){\n\t\tstatus.setGameStarted(false);\n\t\tstatus.setGameOver(true);\n\t\tgameScreen.doNewGame();\n\t\tsoundMan.StopMusic();\n\t\n\t\t// delay to display \"Game Over\" messa\tprivate Object rand;\n\n\t\tTimer timer = new Timer(3000, new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tstatus.setGameOver(false);\n\t\t\t}\n\t\t});\n\t\ttimer.setRepeats(false);\n\t\ttimer.start();\n\t}", "public void endGameFrame() {\r\n\t\tcreateWarning(3000, \"Time Out!\"); //show warning message\r\n\t\t\r\n\t\ttry {\t\t\t\t\t\t\t //creates a file when the game is over\r\n\t\t\tString ExitFilename = \"EXIT.txt\";\r\n\t\t\tFileWriter ExitFile = new FileWriter(\"src/Signals./\"+ExitFilename);\r\n\t\t\tExitFile.write(\"EXIT\");\r\n\t\t\tExitFile.close();\r\n\t\t} \r\n\t\t catch (IOException e) {\r\n\t\t System.out.println(\"An error occurred.\");\r\n\t\t e.printStackTrace();\r\n\t\t }\r\n\t\t//close all interface\r\n\t\tframe.setVisible(false);\r\n\t\tframe.dispose();\r\n\t\tSystem.exit(0);\r\n\t\t\r\n\t\t\r\n\t}", "public void winMessage() {\r\n\t\tSystem.out.print(\"\\n\\nCongratulations! You've won the game! :D\");\r\n\t\tSystem.exit(0);\r\n\t}", "public void gameEnded() {}", "public void finishGame(){\r\n\t\t\t\tgameStarted = false;\r\n\t\t\t}", "public static void end() {\n\t\tif(firstTime)\r\n\t\t\tfirstTime=false;\r\n\t\tif (over) {\r\n\t\t\treset();\r\n\t\t\tover = false;\r\n\t\t}\r\n\t\tGUI.panel.changeGame();\r\n\t}", "public void gameOver() {\n cls();\n displayWord();\n displayGuessedAndRemain();\n printHangman();\n System.out.println(\"Game over!\");\n System.exit(0);\n }", "void gameResumed();", "private void gameOver() {\r\n timer.stop();\r\n if (JOptionPane.showConfirmDialog(this, \r\n \"Game Over!\\nDo you want to play again?\",\r\n FORM_TITLE,JOptionPane.YES_NO_OPTION) == \r\n JOptionPane.YES_OPTION) {\r\n startGame();\r\n }\r\n else { \r\n close();\r\n }\r\n }", "public void exit() {\n\tif (hasPlayed) {\n\t hasPlayed = false;\n\t lastExit = System.currentTimeMillis(); // note the time of exit\n\t}\n }", "public void endGameMessage() {\n gameArena.addText(endGameMsg);\n }", "public void endGame() {\n \t\tisOver = true;\n \t\ttimeGameEnded = System.nanoTime();\n \t\tremoveAll();\n \t\trequestFocusInWindow();\n \t}", "private void exitGame() {\n System.exit(0);\n }", "void gameFinished();", "protected void quitGame() {\n gameOver = true;\n }", "public void triggerEndGame()\n\t{\n\t\tif(livesRemaining <= 0)\n\t\t{\n\t\t\tmP[0].stop();\n\t\t\tmP[1].stop();\n\t\t\tmP[2].stop();\n\t\t\tendGame = new Alert(AlertType.CONFIRMATION);\n\t\t\tendGame.setTitle(\"1942\");\n\t\t\tendGame.setHeaderText(null);\n\t\t\tendGame.getButtonTypes().clear();\n\t\t\tendGame.setContentText(\"You're dead! \\nYou finished with \" + p1Score + \" points. \\nWould you like to play again?\");\n\t\t\tendGame.getButtonTypes().addAll(ButtonType.YES, ButtonType.NO);\n\t\t\tendGame.setGraphic(new ImageView(new Image(\"file:images/gameOver.png\")));\n\t\t\tspawnTimerTL.stop();\n\t\t\tmainTimer.stop();\n\t\t\tp1.getNode().setImage(null); //Removes player from screen\n\t\t\tOptional<ButtonType> result = endGame.showAndWait();\n\n\t\t\tif(result.get() == ButtonType.YES)\n\t\t\t{\n\t\t\t\tlivesRemaining = 3;\n\t\t\t\thealthRemaining = 10;\n\t\t\t\tivHealthBar.setImage(imgHealth[healthRemaining]);\n\t\t\t\tivLives.setImage(imgLives[livesRemaining]);\t\n\n\t\t\t\tif (highScore < p1Score)\n\t\t\t\t\thighScore = p1Score;\n\t\t\t\ttry //Writes new high score and throws IO Exception\n\t\t\t\t{\n\t\t\t\tfileWriter = new FileWriter(highScoreSave);\n\t\t\t\tfileWriter.write(String.valueOf(highScore));\n\t\t\t\tfileWriter.close();\n\t\t\t\t}\n\t\t\t\tcatch(IOException e)\n\t\t\t\t{e.printStackTrace();}\n\t\t\t\t\n\t\t\t\tlblHighScore.setText(Integer.toString(highScore));\n\t\t\t\tp1Score = 0;\n\t\t\t\tlblp1score.setText(Integer.toString(p1Score));\n\n\t\t\t\tp1.setDead(false);\n\t\t\t\tmainTimer.start();\n\t\t\t\tspawnTimerTL.play();\n\t\t\t\t\n\t\t\t\tfor(int k = 0; k < enemyPlanes.length; k++)\n\t\t\t\t{\n\t\t\t\t\tenemyPlanes[k].toggleIsDead(true);\n\t\t\t\t\tenemyPlanes[k].setY(2000);\n\t\t\t\t\tenemyPlanes[k].getNode().setLayoutY(enemyPlanes[k].getY());\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (highScore < p1Score)\n\t\t\t\t\thighScore = p1Score;\n\t\t\t\ttry //Writes new high score and throws IO Exception\n\t\t\t\t{\n\t\t\t\tfileWriter = new FileWriter(highScoreSave);\n\t\t\t\tfileWriter.write(String.valueOf(highScore));\n\t\t\t\tfileWriter.close();\n\t\t\t\t}\n\t\t\t\tcatch(IOException e)\n\t\t\t\t{e.printStackTrace();}\n\t\t\t\tthankYou = new Alert(AlertType.INFORMATION);\n\t\t\t\tthankYou.setTitle(\"1942\");\n\t\t\t\tthankYou.setHeaderText(null);\n\t\t\t\tthankYou.setGraphic(new ImageView(new Image(\"file:images/plane.png\")));\n\t\t\t\tthankYou.setContentText(\"Thank you for playing.\\nGoodbye!\");\n\t\t\t\tthankYou.show();\n\t\t\t\tPlatform.exit();\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\n\t\t}\n\t}", "public void quit(){\n\t\tSystem.out.println(\"Quitting game\");\n\t\tSystem.exit(0);\n\t}", "public void gameEnd(){\r\n Stage gameEnd = new Stage();\r\n gameEnd.initModality(Modality.APPLICATION_MODAL);\r\n gameEnd.initStyle(StageStyle.UNDECORATED);\r\n\r\n //text\r\n Text endMessage = new Text(\"Game over. Your final score was: \" + score);\r\n endMessage.setTranslateX(180);\r\n endMessage.setTranslateY(100);\r\n endMessage.setFont(Font.font(25));\r\n\r\n Text options = new Text(\"Press 'Enter' to go on without timer. Press 'Esc' to exit game.\");\r\n options.setTranslateX(15);\r\n options.setTranslateY(220);\r\n options.setFont(Font.font(25));\r\n\r\n Pane endPane = new Pane();\r\n endPane.getChildren().addAll(endMessage, options);\r\n Scene gameEndScene = new Scene(endPane, 700, 300);\r\n\r\n gameEndScene.setOnKeyPressed(e -> keyPressed(e.getCode().toString(), gameEnd)); //handle user input\r\n gameEnd.setScene(gameEndScene);\r\n gameEnd.show();\r\n }", "void endSinglePlayerGame(String message);", "public void gameOver()\r\n {\n addObject(new Text(\"Game Over\"), 550, 300);\r\n backgroundMusic.pause();\r\n Greenfoot.stop();\r\n }", "public abstract void userActionEnds(long ms);", "private void exitGame(){\n out.println(\"\\r\\nPress ENTER to finish\");\n in.nextLine();\n// game.playersConnected--;\n login = false;\n }", "private void pauseGame() {\n\t\ttimer.cancel();\n\t}", "private void showEndMessage()\n {\n showText(\"Time is up - you win!\", 390, 150);\n showText(\"Your final score: \" + healthLevel + \" points\", 390, 170);\n }", "void gameStarted();", "void gameStarted();", "public void exit() {\n System.out.println(\"Thank you for playing Nim\");\n }", "boolean endOfGame() {\n return false;\n }", "public void game_over() {\n JOptionPane.showMessageDialog(null,\"GAME OVER\",\"Titolo finestra mettici quello che vuoi\",1);\n\n System.exit(0);\n}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\twhile(gameTimer > 0 && !Timer.this.gameScene.popUp){\n\t\t\t\t\tcountDown();\n\t\t\t\t\ttry{\n\t\t\t\t\t\tThread.sleep(10);\n\t\t\t\t\t}catch(InterruptedException e){\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\toutOfTime = true;\n\t\t\t}", "private void endGame() {\r\n\t\t// Change state (if not already done)\r\n\t\tstate = GameState.STOPPED;\r\n\t\t\r\n\t\t// End simulator\r\n\t\tsimulator.endGame();\r\n\t}", "boolean endGame() throws Exception;", "private void endGame() {\n\t\tPlatform.runLater(() -> {\n\t\t\t// sets up gameOverDialog\n\t\t\tAlert gameOverDialog = new Alert(AlertType.CONFIRMATION);\n\t\t\tgameOverDialog.setTitle(\"Game Over\");\n\n\t\t\tgameOverDialog.setHeaderText(\"Score: \" + score + \"\\n\"\n\t\t\t\t\t+ \"Mastery : \" + (int)MASTER_SCORES[difficulty] + \" points\\n\"\n\t\t\t\t\t+ \"Try Again?\");\n\n\t\t\tOptional<ButtonType> result = gameOverDialog.showAndWait();\n\n\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\n\t\t\t// updates the file with current date, score, and difficulty\n\t\t\ttry {\n\t\t\t\tsc.getCurrentUser().updateFile(GAME_CODE, dateFormat.format(new Date()), score, difficulty);\n\t\t\t}\n\t\t\t// catches IOException and informs the user\n\t\t\tcatch (IOException ex) {\n\t\t\t\tAlert errorDialog = new Alert(AlertType.ERROR);\n\t\t\t\terrorDialog.setTitle(\"Error\");\n\t\t\t\terrorDialog.setHeaderText(\"Error\");\n\t\t\t\terrorDialog.setContentText(\"File could not be saved\");\n\t\t\t\terrorDialog.showAndWait();\n\t\t\t}\n\n\t\t\t// resets if OK button is selected\n\t\t\tif (result.get() == ButtonType.OK) {\n\t\t\t\treset();\n\t\t\t}\n\n\t\t\t// quits in CANCEL button is selected\n\t\t\tif(result.get() == ButtonType.CANCEL) {\n\t\t\t\tquitBtn.fire();\n\t\t\t}\n\t\t});\n\t}", "@Override\n\tpublic void endGame() {\n\t\tsuper.endGame();\n\t}", "public void quitGame() {\n quitGame = true;\n }", "public static void endGameSequence()\n\t{\n\t\ttfBet.setEnabled(false);\n\t\tbtnPlay.setEnabled(false);\n\t\tbtnHit.setEnabled(false);\n\t\tbtnStay.setEnabled(false);\n\t\tbtnDouble.setEnabled(false);\n\t\tlblUpdate.setText(\"Game over! You are out of money!\");\n\t}", "public abstract void userTurnEnds(long ms);", "public void gameComplete() {\n if (soundToggle == true) {\n gameComplete.start();\n } // if\n }", "void waitStartGameString();", "@Override\n\tpublic void gameStopped() {\n\t}", "public void endGame() {\r\n if (state[0]) {\r\n if (state[1]) {\r\n frame.remove(pause);\r\n state[1] = false;\r\n }\r\n records.newRecord(game.map, game.end());\r\n frame.remove(game);\r\n records.saveRecords();\r\n state[0] = false;\r\n menu.setVisible(true);\r\n }\r\n }", "public void endGame() {\n\t\tSystem.out.println(\"New game (Y/N)?\");\n\t\tString buffer = scanner.next();\n\t\t\n\t\twhile(true) {\n\t\t\t\n\t\t\tif(buffer.equals(\"Y\") || buffer.equals(\"y\")) {\n\t\t\t\tSystem.out.println(\"\"); // Empty line\n\t\t\t\tnewGame = new Start();\n\t\t\t\tnewGame.begin();\n\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\n\t\t\telse if(buffer.equals(\"N\") || buffer.equals(\"n\")) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}\n\t}", "public void quitGame() {\n\t\tactive = false;\n\t}", "public void lose() {\n status.setText(\"You're finished\");\n gamegoing = false;\n }", "private void newGame ()\n {\n this.game.abort ();\n try\n {\n Thread.sleep(50);\n }catch (InterruptedException e)\n { \n Logger.getLogger(AsteroidsFrame.class.getName()).log(Level.SEVERE, \"Could not sleep before initialing a new game.\");\n }\n this.game.initGameData ();\n }", "@Override\n public void run() {\n drawingEndOfLevelUI = true;\n AI.endgameSFX.play(1.0f);\n\n }", "@Override\n public void run() {\n drawingEndOfLevelUI = true;\n AI.endgameSFX.play(1.0f);\n\n }", "public void gameOver() \n {\n Greenfoot.stop();\n }", "public void playConsole(){\n consoleWelcome();\n \n while (! finished) {\n if (gameOver) {\n Logger.Log(\"Your adventure is over...\");\n break;\n }\n Command command = parser.getCommand();\n finished = processCommand(command); \n }\n if (!gameOver) { \n Logger.Log(\"Thank you for playing. Good bye.\");\n }\n }", "public void endGameSequence()\n {\n gameOver = true;\n repaint();\n }", "public void finishGame() {\r\n gameFinished = true;\r\n }", "public void endGame(){\n updateHighscore();\n reset();\n }", "public void lose()\r\n {\r\n Alert inputConfirmation = new Alert(Alert.AlertType.INFORMATION);\r\n inputConfirmation.setTitle(\"Game Over!\");\r\n inputConfirmation.setHeaderText(\"You Lose!\");\r\n inputConfirmation.setGraphic(null);\r\n scoreBoard.gameTimer.gameTime.cancel();\r\n\r\n inputConfirmation.showAndWait();\r\n }", "public void endGame() {\n Player player = playerManager.getWinner();\n MainActivity mainActivity = (MainActivity) this.getContext();\n updateLiveComment(\"Winner : \" + player.getName());\n mainActivity.setAlertDialog(player.getName()+\" Wins !\", \"Congratulations\", true);\n }", "public void endGame() {\n\r\n\t\tplaying = false;\r\n\t\tstopShip();\r\n\t\tstopUfo();\r\n\t\tstopMissle();\r\n\t}", "private void gameEnded() {\n\t\ttimer.stop();\n\t\tlevelStartTimer.stop();\n\n\t\tfinal String name = JOptionPane.showInputDialog(null,\n\t\t\t\t\"Please enter you name: \", \"The game has ended.\", 1);\n\t\tif (name != null) {\n\t\t\tThread thread = new Thread() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tHighScoreDAO highScoreDAO = HighScoreDAOImpl.getInstance();\n\t\t\t\t\tList<HighScore> highScores = highScoreDAO.getAllHighScore();\n\t\t\t\t\thighScore.setName(name);\n\t\t\t\t\thighScore.setDate(new Date());\n\t\t\t\t\thighScores.add(highScore);\n\t\t\t\t\tCollections.sort(highScores);\n\t\t\t\t\thighScoreDAO.deleteAllHighScore();\n\t\t\t\t\tif (highScores.size() > 10)\n\t\t\t\t\t\tfor (int i = 0; i < 10; ++i)\n\t\t\t\t\t\t\thighScoreDAO.addHighScore(highScores.get(i));\n\t\t\t\t\telse\n\t\t\t\t\t\tfor (HighScore hs : highScores)\n\t\t\t\t\t\t\thighScoreDAO.addHighScore(hs);\n\t\t\t\t}\n\t\t\t};\n\t\t\tthread.start();\n\t\t}\n\n\t\t// fires a new ActionEvent indicating that the game has ended\n\t\tlistener.actionPerformed(new ActionEvent(this,\n\t\t\t\tActionEvent.RESERVED_ID_MAX + 1, \"endgame\"));\n\t}", "public void giveUp(){\r\n System.out.println(\"You are such a loser. Glad that you give up!\");\r\n System.exit(0);\r\n }", "public void Gamefinished()\n\t\t{\n\t\t\tplayers_in_game--;\n\t\t}", "@Override\n public void endGame(){\n gameOver = true;\n }", "private void beginTicks() throws IOException, InterruptedException {\n while (!game.isEnded() || endGui.getActiveWindow() != null) {\n tick();\n Thread.sleep(1000L / Game.TICKS_PER_SECOND);\n }\n\n System.exit(0);\n }", "public void end()\n\t{\n\t\tStateManager.setState(StateManager.GameState.MAINMENU);\n\t\tStateManager.setGame(null);\n\t}", "@Override\n public void RageQuit() {\n //They won't have a score\n timer.stopTimer();\n\n if (view.confirmRageQuit()){\n // Punish them!\n DesktopAudio.getInstance().playPunish();\n grid = game.getSolved();\n for (int i = 0; i < 9; i++){\n for (int j = 0; j < 9; j++){\n view.setGiven(i, j, grid.getNumber(i, j));\n }\n }\n if (view.confirmNewGame()){\n setNextGame();\n }\n }else{\n timer.startTimer();\n }\n }", "public void gameOver(){ // will be more complex in processing (like a fadey screen or whatever, more dramatic)\n System.out.println();\n System.out.println(\"Three strikes and you're out! You're FIRED!\");\n gameOver = true;\n }", "private static void gameOver() {\n\t\tSystem.out.println(\"Would you like to play again?\");\n\t\tinput.nextLine();\n\t\tuserInput = input.nextLine();\n\t\tif(userInput.contains(\"yes\")||userInput.equals(\"y\"))\n\t\t{\n\t\t\tgame();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"Stay golden.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public void run() //Called by the Timer when scheduled.\n {\n timeElapsed++;\n if (timeElapsed > 999) //999 is the highest 3 digit integer, the highest number that can\n {\t\t\t\t\t\t\t //be shown on the displays. Beyond that, the player automatically loses.\n endGame(false);\n return;\n }\n repaint();\n }", "private void gameEnd(String loser) {\n }", "public void startGame() {\n status = Status.COMPLETE;\n }", "@Override\r\n public int playGameLoop() {\r\n return 0;\r\n }", "public void display_game_start_text() {\n\n fill(150, 100);\n rect(0, 0, displayW, displayH);\n\n textFont(myFont);\n textAlign(CENTER);\n textSize(displayH/30);\n fill(255);\n text(\"Get Ready!\", displayW/2, displayH/2);\n\n mySound.play_opening_song();\n\n isKeyInputAllowed = false;\n }", "public static void endGame(){\n\t\tmainPanel.grid1.enabledGrid(false);\n\t\tif(speler.heleVlootKapot){\n\t\t\tmainPanel.melding2.setText(\"Helaas, de computer heeft gewonnen.\");\n\t\t}else{\n\t\t\tmainPanel.melding2.setText(\"Gefeliciteerd, u heeft gewonnen.\");\n\t\t}\n\t}", "private void endGame(){\n if (winner){\n Toast.makeText(this, \"Fin del Juego: Tu ganas\", Toast.LENGTH_SHORT).show();\n finish();\n } else {\n Toast.makeText(this, \"Fin del Juego: Tu pierdes\", Toast.LENGTH_SHORT).show();\n finish();\n }\n }", "public void end() {\n\t\tSystem.out.print(\"Game ends - \");\n\t\tif (player1.getPoints() > player2.getPoints()) {\n\t\t\tSystem.out.printf(\"%s wins by %d points\\n\", player1.getName(), player1.getPoints()-player2.getPoints());\n\t\t} else if (player1.getPoints() < player2.getPoints()) {\n\t\t\tSystem.out.printf(\"%s wins by %d points\\n\", player2.getName(), player2.getPoints()-player1.getPoints());\n\t\t} else {\n\t\t\tSystem.out.println(\"Game tied\");\n\t\t}\n\t}", "public void endGame()\n\t{\n\t\tbuttonPanel.endGameButton.setEnabled(false);\n\t\tstopThreads();\n\t\tsendScore();\n\t}", "public static void endGame(Boolean hasWon){\n\t\tif(hasWon){\n\t\t\trun.winPopup();\n\t\t}\n\t\telse{\n\t\t\trun.losePopup();\n\t\t}\n\t}", "private void gameOver() {\n\t\t\n\t}", "void askEndTurn();", "public static void endGame(){\n System.out.println(\"\" +\n \"######## ## ## ### ## ## ## ## ###### ######## ####### ######## \\n\" +\n \" ## ## ## ## ## ### ## ## ## ## ## ## ## ## ## ## \\n\" +\n \" ## ## ## ## ## #### ## ## ## ## ## ## ## ## ## \\n\" +\n \" ## ######### ## ## ## ## ## ##### ###### ###### ## ## ######## \\n\" +\n \" ## ## ## ######### ## #### ## ## ## ## ## ## ## ## \\n\" +\n \" ## ## ## ## ## ## ### ## ## ## ## ## ## ## ## ## \\n\" +\n \" ## ## ## ## ## ## ## ## ## ###### ## ####### ## ## \\n\\n\" +\n \"######## ## ### ## ## #### ## ## ###### #### \\n\" +\n \"## ## ## ## ## ## ## ## ### ## ## ## #### \\n\" +\n \"## ## ## ## ## #### ## #### ## ## #### \\n\" +\n \"######## ## ## ## ## ## ## ## ## ## #### ## \\n\" +\n \"## ## ######### ## ## ## #### ## ## \\n\" +\n \"## ## ## ## ## ## ## ### ## ## #### \\n\" +\n \"## ######## ## ## ## #### ## ## ###### #### \");\n\n\n }", "public static void displayEndingMessage() {\n\t\tSystem.out.println(\"Thank you for using my program!\");\n\t}", "@Override\n public void endGameAsWin()\n {\n // UPDATE THE GAME STATE USING THE INHERITED FUNCTIONALITY\n super.endGameAsWin();\n \n // RECORD THE TIME IT TOOK TO COMPLETE THE GAME\n long gameTime = endTime.getTimeInMillis() - startTime.getTimeInMillis();\n \n // RECORD IT AS A WIN\n ((MahjongSolitaireMiniGame)miniGame).getPlayerRecord().addWin(currentLevel, gameTime);\n ((MahjongSolitaireMiniGame)miniGame).savePlayerRecord();\n \n // DISPLAY THE WIN DIALOG\n miniGame.getGUIDialogs().get(WIN_DIALOG_TYPE).setState(VISIBLE_STATE); \n\n // AND PLAY THE WIN ANIMATION\n playWinAnimation();\n \n // AND PLAY THE WIN AUDIO\n miniGame.getAudio().stop(MahjongSolitairePropertyType.SPLASH_SCREEN_SONG_CUE.toString()); \n miniGame.getAudio().stop(MahjongSolitairePropertyType.GAMEPLAY_SONG_CUE.toString());\n miniGame.getAudio().play(MahjongSolitairePropertyType.WIN_AUDIO_CUE.toString(), false);\n }", "public void resign(){\n\t\tif(Main.getInstance().getScreen() instanceof GEngine){\r\n\t\t\tPlayer user = getUserPlayer();\r\n\t\t\tPlayer winner = state.players[user.playerId == 0 ? 1 : 0];\r\n\t\t\t\r\n\t\t\tnew Popup(\"Game over\", true,\r\n\t\t\t\tnew Label(String.format(\"Player %s has won the game!\", winner.getDisplayName()), Assets.SKIN), \r\n\t\t\t\tComponentFactory.createButton(\"OK\", new ClickListener() {\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void clicked(InputEvent event, float x, float y) {\r\n\t\t\t\t\t\tMain.getInstance().setScreen(MainMenu.getInstance());\r\n\t\t\t\t\t\tPopup.getCurrentPopup().close();\r\n\t\t\t\t\t}\r\n\t\t\t\t})).show();\r\n\t\t}\r\n\t\t\r\n\t\tMain.getInstance().games.endGame(this);\r\n\t}", "public abstract void systemTurnEnds(long ms);", "@Override\n\tpublic void OnGameEnd() {\n\t\tsuper.OnGameEnd();\n\t}", "protected void end() {\n Robot.shooter.Stop();\n }", "public void run() {\n\t \tif(ScorePanel.getScore() == 100){\r\n\t \t\ttimer.cancel();\r\n\t \t}\r\n\t \t//se o Tempo se esgotar, é game over!!!\r\n\t \telse if (tempo == 0){\r\n\t \t timer.cancel();\r\n \t\tAvatar.noMotion();\r\n \t\t//System.exit(0);\r\n\t }\r\n\t \t//Senão, vai contando\r\n\t \telse{\r\n\t \tlbltimer.setText(\"Tempo: \"+ --tempo);\r\n\t }\r\n\t }", "void pauseGame() {\n myGamePause = true;\n }", "public void welcomeToGame() {\r\n System.out.println(\" _____ _____ _ \\n\" +\r\n\" / ____| / ____| | | \\n\" +\r\n\" | (___ _ __ __ _ ___ ___ | | _ __ __ _ __ __ | | ___ _ __ \\n\" +\r\n\" \\\\___ \\\\ | '_ \\\\ / _` | / __| / _ \\\\ | | | '__| / _` | \\\\ \\\\ /\\\\ / / | | / _ \\\\ | '__|\\n\" +\r\n\" ____) | | |_) | | (_| | | (__ | __/ | |____ | | | (_| | \\\\ V V / | | | __/ | | \\n\" +\r\n\" |_____/ | .__/ \\\\__,_| \\\\___| \\\\___| \\\\_____| |_| \\\\__,_| \\\\_/\\\\_/ |_| \\\\___| |_| \\n\" +\r\n\" | | \\n\" +\r\n\" |_| \\n\\n\");\r\n System.out.println(\"=== WELCOME ===\\n\");\r\n System.out.println(\"Welcome to the game\\n\");\r\n System.out.println(\"Intro Blah blah blah\");\r\n System.out.println(\"Intro Blah blah blah\");\r\n System.out.println(\"Intro Blah blah blah\");\r\n System.out.println(\"Intro Blah blah blah\");\r\n }", "private void onEndGame() {\n Intent intent1 = new Intent(this, MainActivity.class);\n startActivity(intent1);\n finish();\n }", "public void endOfTurn();", "static void endgame() {\n System.out.println(\"MARK MY WORDS... THIS ISN'T THE END YET!\");\n System.out.println(\"Don't listen to her, she's just mad that she'll have to spend her eternal life in that black cell.\");\n enter = next.nextLine();\n System.out.println(\"The black portal gradually closes...lasting for only minutes until it exploded.\");\n System.out.println(\"The portal was gone and so was that evil witch...WAIT\");\n System.out.println(\"How about you Naga?\");\n enter = next.nextLine();\n System.out.println(\"My duty is done and I'm free from your grasp. Farewell...\");\n enter = next.nextLine();\n System.out.println(\"The black dragon creates a big black vortex that consumed Naga, his recent friend.\");\n enter = next.nextLine();\n System.out.println(\"The black dragon bids his farewell and the black portal too exploded out of sight.\");\n System.out.println(\"He was sent to accompany \" + username + \" to defeat his enemy, the witch.\");\n System.out.println(\"His job is done and he must return back to the dragon world...or whatever dimension he lived in\");\n enter = next.nextLine();\n System.out.println(\"I guess this is a lesson. Don't read wierd books...they don't end so well.\");\n System.out.println(\"/n\");\n System.out.println(\"/n\");\n System.out.println(\"Well, congratulations again \" + username + \" for defeating the boss.\");\n enter = next.nextLine();\n System.out.println(username + \" casts a purple portal and teleports to his hometown...everything looks fine\");\n enter = next.nextLine();\n System.out.println(\"OR IS IT? / 'I'm back. DID YOU MISS ME?'\");\n System.out.println(\"/n\");\n System.out.println(\"THANKS FOR PLAYING \" + username + \".\");\n gameplay = false;//end the main while loop\n }", "void askStartGame();", "public void playGame() {\n if (!runGame) {\n return;\n }\n if (doLeaderboard) {\n String gameOver = \"Game Over\";\n String leaderboard = \"\";\n\n int place = 1;\n for (Player player : getLeaderboard()) {\n leaderboard += \"\\n\"+(place++)+\". \"+player.name()+\" (\"+player.lives()+\" lives)\";\n }\n\n background(0, 0, 0);\n PFont f2 = createFont(\"HelveticaNeue-Bold\", 85, true);\n textAlign(CENTER);\n textFont(f2);\n fill(color(134, 244, 250));\n text(gameOver, width/2, height/2 - 50);\n\n textFont(f);\n text(leaderboard, width/2, height/2 -35); // Make text size a variable\n textAlign(BASELINE);\n this.doLeaderboard = false;\n this.runGame = false;\n noLoop();\n\n // Need a way to keep this text on the screen without it getting overwritten by setup();\n // Source for below code: https://stackoverflow.com/questions/2258066/java-run-a-function-after-a-specific-number-of-seconds\n new java.util.Timer().schedule(\n new java.util.TimerTask() {\n @Override\n public void run() {\n setup();\n this.cancel();\n }\n }\n , 2000);\n } else if (this.doRespawn) {\n if (respawnTimer > 0) {\n background(0, 0, 0);\n textFont(f, 60);\n fill(color(134, 244, 250));\n DecimalFormat df = new DecimalFormat(\"0.0\");\n textAlign(CENTER);\n text(\"Restarting In\\n\"+df.format(respawnTimer), width/2, height/2);\n textAlign(BASELINE);\n respawnTimer -= 0.1f;\n } else {\n respawnTimer = respawnTimerBackup;\n this.resetGrid();\n int count = 0;\n\n int index = 0;\n for (int i=players.size()-1; i>=0; i--) {\n Player player = players.get(i);\n if (player.lives() > 0) {\n String dir = directions.get(index++); // just assume # players <= # of directions\n player.respawn(spawns.get(dir));\n player.setDirection(dir);\n count++;\n }\n }\n\n if (count <= 1) {\n // if (ENABLE_SOUND) {\n // sfx.endGame();\n // }\n gameOver();\n return;\n }\n\n this.doRespawn = false;\n frameRate(framerate);\n return;\n }\n } else {\n int dead = 0;\n int eliminated = 0;\n\n // Draw the current ColorPicker\n for (Player player : players) {\n if (player.isAlive()) {\n player.move();\n } else {\n dead++;\n if (player.lives() == 0) {\n eliminated++;\n }\n }\n }\n\n if (players.size() - dead <= 1) {\n if (eliminated >= players.size() - 1) { // Can probably merge the two calls to setup()\n // RETURN TO MENU / PLAY AGAIN screen\n gameOver();\n return;\n }\n frameRate(10);\n doRespawn = true;\n } else {\n render();\n }\n }\n if (bar != null) {\n bar.render();\n }\n}" ]
[ "0.7219935", "0.7193667", "0.7111109", "0.70955396", "0.705881", "0.7044003", "0.6876827", "0.6875895", "0.68706316", "0.685908", "0.6837171", "0.6808321", "0.6802344", "0.6789938", "0.6784352", "0.6765472", "0.6705106", "0.670219", "0.67020655", "0.6670153", "0.66660684", "0.66642475", "0.665515", "0.6643309", "0.6637282", "0.6636854", "0.66078514", "0.66055965", "0.65964437", "0.659533", "0.6581648", "0.657899", "0.656285", "0.6561721", "0.6547826", "0.6547826", "0.65378284", "0.65360856", "0.6533464", "0.6518802", "0.64998144", "0.64981955", "0.6484798", "0.6477008", "0.6465831", "0.64615864", "0.6450512", "0.643773", "0.6431133", "0.6425598", "0.6415404", "0.64099693", "0.6408901", "0.6406695", "0.6364135", "0.63532084", "0.63532084", "0.634821", "0.6340304", "0.633491", "0.6310555", "0.6306667", "0.63054335", "0.62652427", "0.62625486", "0.626068", "0.6260481", "0.62521875", "0.62436134", "0.62115306", "0.62049496", "0.6203642", "0.62016404", "0.62006336", "0.62005746", "0.6200106", "0.61999", "0.61938226", "0.61937207", "0.6181296", "0.61795354", "0.61717135", "0.617109", "0.6170276", "0.6165985", "0.61634946", "0.61574316", "0.6155918", "0.61544585", "0.6151876", "0.6144354", "0.6143568", "0.6135462", "0.613499", "0.6116027", "0.61141425", "0.6107724", "0.6107479", "0.61073947", "0.61011344", "0.6092289" ]
0.0
-1
Checking when User doesn't respond to the questions some specific number of consecutive questions
public SNGTestCases ExitFromTheTable_TC1031() throws InterruptedException{ String flavour = "Electrical"; forDebugger(); waitForElement(By.id("com.pointedsquares.gamy5.android:id/header_name"),120); try{ waitForElement(By.xpath("//android.widget.TextView[contains(@text , 'Academics') and contains(@resource-id , 'itemTitle')]") , 5); }catch(Exception ex){ driver.scrollTo("Academics"); } driver.findElement(By.xpath("//android.widget.TextView[contains(@text , 'Academics') and contains(@resource-id , 'itemTitle')]/following-sibling::android.widget.TextView[contains(@text , 'More')]")).click(); waitForElement(By.id("com.pointedsquares.gamy5.android:id/search_all"), 10); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/search_all")).click(); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/search_all")).sendKeys(flavour); driver.findElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'flavour_name_list') and contains(@text , 'Electrical Engineering')]")).click(); waitForElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'stake_amount') and contains(@text , '500')]"),5); driver.findElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'stake_amount') and contains(@text , '500')]")).click(); waitForElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'message_text') and contains(@text , 'You are about to play Electrical Engineering game with 500 coins stake.')]"), 5); driver.findElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'message_text') and contains(@text , 'You are about to play Electrical Engineering game with 500 coins stake.')]")).click(); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/positive_button")).click(); waitForVisibilityOf(By.xpath("//android.widget.TextView[contains(@resource-id , 'response') and contains(@text , 'Finding room for you...')]")); waitForVisibilityOf(By.xpath("//android.widget.TextView[contains(@resource-id , 'response') and contains(@text , 'Waiting for Players to Join.\nPlease wait 9 seconds, approximately.')]")); Thread.sleep(4000); int noOfTest = 0; ArrayList<String> playersOnTable = new ArrayList(); ArrayList<String> seatsWithoutPlayer = new ArrayList(); for(; noOfTest < 3; noOfTest++){ try{ driver.findElement(By.id("com.pointedsquares.gamy5.android:id/player_name_1")); playersOnTable.add("one"); }catch(Exception ex){ seatsWithoutPlayer.add("one"); } try{ driver.findElement(By.id("com.pointedsquares.gamy5.android:id/player_name_2")); playersOnTable.add("two"); }catch(Exception ex){ seatsWithoutPlayer.add("two"); } try{ driver.findElement(By.id("com.pointedsquares.gamy5.android:id/player_name_3")); playersOnTable.add("three"); }catch(Exception ex){ seatsWithoutPlayer.add("three"); } try{ driver.findElement(By.id("com.pointedsquares.gamy5.android:id/player_name_4")); playersOnTable.add("four"); }catch(Exception ex){ seatsWithoutPlayer.add("four"); } try{ driver.findElement(By.id("com.pointedsquares.gamy5.android:id/player_name_5")); playersOnTable.add("five"); }catch(Exception ex){ seatsWithoutPlayer.add("five"); } try{ driver.findElement(By.id("com.pointedsquares.gamy5.android:id/player_name_6")); playersOnTable.add("six"); }catch(Exception ex){ seatsWithoutPlayer.add("six"); } try{ driver.findElement(By.xpath("//android.widget.ImageView[contains(@resource-id , 'anim_coin_one')]")); }catch(Exception ex){ } waitForVisibilityOf(By.xpath("//android.widget.LinearLayout[contains(@resource-id , 'question_one_linear')]/android.webkit.WebView/android.webkit.WebView/android.view.View")); String question = driver.findElement(By.xpath("//android.widget.LinearLayout[contains(@resource-id , 'question_one_linear')]/android.webkit.WebView/android.webkit.WebView/android.view.View")).getAttribute("name"); System.out.println(question); waitForElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'timer_value')]"),40); // waitForVisibilityOf(By.id("com.pointedsquares.gamy5.android:id/choice_linear")); // List<WebElement> choices = driver.findElements(By.xpath("//android.widget.LinearLayout[contains(@resource-id , 'choice_linear')]/*")); // boolean isFourChoice = true; // if(choices.size() != 4){ // isFourChoice = false; // } // assertTrue(isFourChoice , "Error: Question not have four choice"); // System.out.println(choices.size()); // List<WebElement> abc = driver.findElements(By.xpath("//android.widget.ImageView[contains(@resource-id , 'arc_progress')]")); // System.out.println(driver.findElement(By.id("com.pointedsquares.gamy5.android:id/progressBarHorizontal")).getAttribute("text")); // System.out.println(driver.findElement(By.id("com.pointedsquares.gamy5.android:id/progressBarHorizontal")).getAttribute("name")); // System.out.println(driver.findElement(By.id("com.pointedsquares.gamy5.android:id/arc_progress")).getAttribute("text")); // while(!driver.findElement(By.id("com.pointedsquares.gamy5.android:id/timer_value")).getAttribute("name").equals("0")){ // System.out.println(driver.findElement(By.id("com.pointedsquares.gamy5.android:id/timer_value")).getAttribute("name")); // } playersOnTable.clear(); } waitForVisibilityOf(By.xpath("//android.widget.TextView[contains(@resource-id , 'message_text') and contains(@text , 'Sorry, we have to remove you from the table because you did not answer 3 consecutive questions.')]")); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/positive_button")); waitForVisibilityOf(By.xpath("//android.widget.TextView[contains(@resource-id , 'stake_amount') and contains(@text , '500')]")); driver.navigate().back(); driver.navigate().back(); Thread.sleep(7000); return new SNGTestCases(driver); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean hasMoreQuestions() {\n return !(done);\n }", "public String checkNewQuestions() {\n\t\tint numAnswers = testGenerator.getNumAnswers(questionNo);\n\t\tString question = \"\";\n\n\t\tquestion += testGenerator.getQuestionText(questionNo);\n\t\tquestion += testGenerator.getAnswerText(questionNo, 1);\n\t\tquestion += testGenerator.getAnswerText(questionNo, 2);\n\n\t\tif(numAnswers >= 3) {\n\t\t\tquestion += testGenerator.getAnswerText(questionNo, 3);\n\t\t} \n\t\tif(numAnswers == 4) {\n\t\t\tquestion += testGenerator.getAnswerText(questionNo, 4);\n\t\t}\n\t\treturn question;\n\t}", "@Test\n public void shouldNotGiveQuestionIfAllQuestionsHaveBeenAnswered() {\n attributes.put(FinancialPlanningSpeechlet.GOAL_AMOUNT_KEY, 1000.0);\n attributes.put(FinancialPlanningSpeechlet.MONTHLY_CONTRIBUTION_KEY, 1000.0);\n attributes.put(FinancialPlanningSpeechlet.GOAL_PERIOD_KEY, 1000.0);\n String question = NextQuestionFactory.get(session);\n\n assertThat(question, Is.is(\"\"));\n }", "public boolean isMultiple()\n {\n \tif (questionNumber == 0) {\n \t\treturn false;\n \t}\n int counter = 0;\n List<Answer> answers = test.getQuestions().get(questionNumber-1).getAnswers();\n for (Answer answer : answers) {\n if (answer.getCorrect()) {\n ++counter;\n if (counter > 1) {\n return true;\n }\n }\n }\n return false;\n }", "private void checkIfQuestionUsed(int randIdx)\n\t{\n\t\t\tfor(Integer current : questionsUsed)\n\t\t\t{\n\t\t\t\tif (current == randIdx) {\n\t\t\t\t\tquestionUsed = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tquestionUsed = false;\n\t\t\t}\n\t}", "public void multipleAnswerSpecialCheck(){\n for (String q : qA.keySet()){\n List answerList = qA.get(q);\n if (answerList.size()>2 && answerList.contains(\"\")){\n answerList.remove(\"\");\n }\n }\n\n }", "public void onNextQuestionButton(View view) {\n CheckBox answerBtnA = (CheckBox) findViewById(R.id.checkbox_button_1);\n CheckBox answerBtnB = (CheckBox) findViewById(R.id.checkbox_button_2);\n CheckBox answerBtnC = (CheckBox) findViewById(R.id.checkbox_button_3);\n CheckBox answerBtnD = (CheckBox) findViewById(R.id.checkbox_button_4);\n\n checkedA = answerBtnA.isChecked();\n checkedB = answerBtnB.isChecked();\n checkedC = answerBtnC.isChecked();\n checkedD = answerBtnD.isChecked();\n\n /**\n * Check whether the User inserted the right number of answers (always 2) and\n * request them, if they had not been given\n */\n if (checkedA & checkedB | checkedA & checkedC | checkedA & checkedD | checkedB & checkedC |\n checkedB & checkedD | checkedC & checkedD){\n calculateMethod();\n } else if(checkedA | checkedB | checkedC | checkedD){\n Toast.makeText(this,R.string.noAnswer2,Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(this,R.string.noAnswer,Toast.LENGTH_SHORT).show();\n }\n }", "public void checkIfLastQuestion(){\n if(questionNumber == 50){\n endGame();\n }\n }", "private void validateQuiz() {\n int score = 0;\n String answer1 = answerOne.getText().toString();\n int answer2 = answerTwo.getCheckedRadioButtonId();\n boolean answer3 = answerThreeOptionA.isChecked() && answerThreeOptionD.isChecked() && !answerThreeOptionB.isChecked() && !answerThreeOptionC.isChecked();\n String answer4 = answerFour.getText().toString();\n int answer5 = answerFive.getCheckedRadioButtonId();\n boolean answer6 = answerSixOptionA.isChecked() && answerSixOptionB.isChecked() && answerSixOptionD.isChecked() && !answerSixOptionC.isChecked();\n if (answer1.equalsIgnoreCase(getString(R.string.answerOne))) {\n score++;\n }\n if (answer2 == answerTwoOptionA.getId()) {\n score++;\n }\n if (answer3) {\n score++;\n }\n if (answer4.equalsIgnoreCase(getString(R.string.answerFour))) {\n score++;\n }\n if (answer5 == answerFiveOptionD.getId()) {\n score++;\n }\n if (answer6) {\n score++;\n }\n String result = getString(R.string.result, score, questionList.size());\n Toast.makeText(this, result, Toast.LENGTH_SHORT).show();\n }", "private void checkAnswers() {\n\n //fetch the SolutionInts\n String[] solutionTags = currentTask.getSolutionStringArray();\n\n //fetch the userInput\n String[] userSolution = new String[solutionTags.length];\n for (int i = 0; i < solutionTags.length; i++) {\n LinearLayout linearLayout = currentView.findViewWithTag(i);\n userSolution[i] = (String) linearLayout.getChildAt(0).getTag();\n }\n\n Log.i(\"M_ORDER\",\"solutiontags: \"+ Arrays.toString(solutionTags) +\" usertags:\"+ Arrays.toString(userSolution));\n Date ended;\n if (Arrays.equals(solutionTags, userSolution)) {\n ended = Calendar.getInstance().getTime();\n String duration = progressController.calculateDuration(entered, ended);\n progressController.makeaDurationLog(getContext(),Calendar.getInstance().getTime(), \"EXERCISE_ORDER_FRAGMENT_RIGHT\", \"number: \" + currentTask.getTaskNumber() + \" section: \"+currentTask.getSectionNumber()+\" viewtype: \"+currentTask.getExerciseViewType()+\" userInput: \" + Arrays.toString(userSolution),duration);\n mListener.sendAnswerFromExerciseView(true);\n Log.i(\"M_EXERCISE_VIEW_ORDER\", \" send answer: true\");\n } else {\n Log.i(\"ANSWER\", \" was wrong\");\n ended = Calendar.getInstance().getTime();\n String duration = progressController.calculateDuration(entered, ended);\n progressController.makeaDurationLog(getContext(),Calendar.getInstance().getTime(), \"EXERCISE_ORDER_FRAGMENT_WRONG\", \"number: \" + currentTask.getTaskNumber() + \" section: \"+currentTask.getSectionNumber()+\" viewtype: \"+currentTask.getExerciseViewType()+\" userInput: \" + Arrays.toString(userSolution),duration);\n mListener.sendAnswerFromExerciseView(false);\n Log.i(\"M_EXERCISE_VIEW_ORDER\", \" send answer: false\");\n }\n }", "boolean questionsAlreadyDisplayed (int randomValue0to29){\n\t\t for (int i = 0 ; i < 10 ; i++){\n\t\t\t if (anArray2 [i] == randomValue0to29){\n\t\t\t\t return true;\t//question already displayed\n\t\t\t }\n\t\t\t\n\t\t }\n\t\t anArray2 [numberOfQuestionsDisplayedCounter] = randomValue0to29; // questionId added to array of displayed questions\n\t\t return false;\t//random number can be used as it has been used already\n\t }", "private void getAllQuestion(){\r\n\r\n if(ques.getText().toString().equals(\"\")||opt1.getText().toString().equals(\"\")||opt2.getText().toString().equals(\"\")||\r\n opt3.getText().toString().equals(\"\")||correct.getText().toString().equals(\"\")){\r\n Toast.makeText(getBaseContext(), \"Please fill all fields\", Toast.LENGTH_LONG).show();\r\n }\r\n else{\r\n\r\n int c = Integer.parseInt((correct.getText().toString()));\r\n if (c > 3) {\r\n Toast.makeText(getBaseContext(), \"Invalid Correct answer\", Toast.LENGTH_LONG).show();\r\n } else {\r\n\r\n setQuestions();\r\n }\r\n finishQuiz();\r\n }\r\n }", "@Ignore\n @Test\n public void shouldNotGiveQuestionIfAllQuestionsHaveBeenAnsweredWithInts() {\n attributes.put(FinancialPlanningSpeechlet.GOAL_AMOUNT_KEY, 1000);\n attributes.put(FinancialPlanningSpeechlet.MONTHLY_CONTRIBUTION_KEY, 1000);\n attributes.put(FinancialPlanningSpeechlet.GOAL_PERIOD_KEY, 1000);\n String question = NextQuestionFactory.get(session);\n\n assertThat(question, Is.is(\"\"));\n }", "private void validateQuestion(){\n int checkedRadioButtonId = Question.getCheckedRadioButtonId();\n\n // If the correct question has been chosen, update the score & display a toast message\n if (checkedRadioButtonId == R.id.radio4_question1) {\n score = score + 2;\n }\n }", "private void getCorrectAnswers() {\n\t\tfor(int i = 0; i < numberAmt; i++) {\n\t\t\tif(randomNumbers.get(i).equals(answers.get(i)))\n\t\t\t\tcorrectAnswers++;\n\t\t}\n\t}", "public void checkAnswers(View view){\n int result = 0;\n\n if (checkRadioButtonAnswer(R.id.first_answer, R.id.first_answer3)){\n result = result + 1;\n }\n\n if (checkTextViewAnswer(R.id.second_answer, \"lions\")){\n result = result + 1;\n }\n\n if (checkRadioButtonAnswer(R.id.third_answer, R.id.third_answer1)){\n result = result + 1;\n }\n\n if (checkRadioButtonAnswer(R.id.fourth_answer, R.id.fourth_answer3)){\n result = result + 1;\n }\n\n if (checkRadioButtonAnswer(R.id.fifth_answer, R.id.fifth_answer3)){\n result = result + 1;\n }\n\n if (checkRadioButtonAnswer(R.id.sixth_answer, R.id.sixth_answer2)){\n result = result + 1;\n }\n\n if (checkCheckBoxAnswer(R.id.seventh_answer1, true) &&\n checkCheckBoxAnswer(R.id.seventh_answer2, true) &&\n checkCheckBoxAnswer(R.id.seventh_answer3, true) &&\n checkCheckBoxAnswer(R.id.seventh_answer4, false)){\n result = result + 1;\n }\n\n /**\n * A toast message is shown which represents the scored points out of the total 7.\n */\n Toast.makeText(this, \"Result: \" + Integer.toString(result) + \"/7\", Toast.LENGTH_SHORT).show();\n }", "private void countAnswers(){\n\t\tfor(Student student: students){\n\t\t\tif(isCorrectAnswer(student.getAnswers())){\n\t\t\t\tcorrectAnswers+=1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\twrongAnswers+=1;\n\t\t\t}\n\t\t}\n\t}", "public void checkAnswers(View v) {\n int correct = 0;\n\n //Question 1 answer\n RadioButton a1 = (RadioButton) findViewById(R.id.q1_a2);\n\n if (a1.isChecked()) {\n correct++;\n } else {\n TextView q1 = (TextView) findViewById(R.id.question_1);\n q1.setTextColor(Color.RED);\n }\n\n //Question 2 answer\n RadioButton a2 = (RadioButton) findViewById(R.id.q2_a2);\n\n if (a2.isChecked()) {\n correct++;\n } else {\n TextView q2 = (TextView) findViewById(R.id.question_2);\n q2.setTextColor(Color.RED);\n }\n\n //Question 3\n CheckBox a3_1 = (CheckBox) findViewById(R.id.q3_a1);\n CheckBox a3_2 = (CheckBox) findViewById(R.id.q3_a2);\n CheckBox a3_3 = (CheckBox) findViewById(R.id.q3_a3);\n\n if (a3_1.isChecked() && a3_2.isChecked() && a3_3.isChecked()) {\n correct++;\n } else {\n TextView q3 = (TextView) findViewById(R.id.question_3);\n q3.setTextColor(Color.RED);\n }\n\n //Question 4\n EditText a4 = (EditText) findViewById(R.id.q4_a);\n\n if (a4.getText().toString().equalsIgnoreCase(getResources().getString(R.string.q4_a))) {\n correct++;\n } else {\n TextView q4 = (TextView) findViewById(R.id.question_4);\n q4.setTextColor(Color.RED);\n }\n\n //Question 5\n RadioButton a5 = (RadioButton) findViewById(R.id.q5_a3);\n\n if (a5.isChecked()) {\n correct++;\n } else {\n TextView q5 = (TextView) findViewById(R.id.question_5);\n q5.setTextColor(Color.RED);\n }\n\n //Question 6\n RadioButton a6 = (RadioButton) findViewById(R.id.q6_a1);\n\n if (a6.isChecked()) {\n correct++;\n } else {\n TextView q6 = (TextView) findViewById(R.id.question_6);\n q6.setTextColor(Color.RED);\n }\n\n //Question 7\n EditText a7 = (EditText) findViewById(R.id.q7_a);\n\n if (a7.getText().toString().equalsIgnoreCase(getResources().getString(R.string.q7_a))) {\n correct++;\n } else {\n TextView q7 = (TextView) findViewById(R.id.question_7);\n q7.setTextColor(Color.RED);\n }\n\n //Question 8\n RadioButton a8 = (RadioButton) findViewById(R.id.q8_a1);\n\n if (a8.isChecked()) {\n correct++;\n } else {\n TextView q8 = (TextView) findViewById(R.id.question_8);\n q8.setTextColor(Color.RED);\n }\n\n //Toast\n Context context = getApplicationContext();\n CharSequence text = \"Score: \" + correct + \"/8\";\n int duration = Toast.LENGTH_SHORT;\n Toast.makeText(context, text, duration).show();\n }", "@Override\n public boolean isPromptAnswered() {\n return ((mSelectedIndex >= 0 && mSelectedIndex < mChoices.size()) || (mSelectedIndex >= 0 && mSelectedIndex < mChoices\n .size() + mCustomChoices.size()));\n }", "private void showResults() {\n if (!sent) {\n if(checkAnswerOne()) {\n nbOfCorrectAnswers++;\n }\n if(checkAnswerTwo()) {\n nbOfCorrectAnswers++;\n }\n if(checkAnswerThree()) {\n nbOfCorrectAnswers++;\n }\n if(checkAnswerFour()) {\n nbOfCorrectAnswers++;\n }\n\n showResultAsToast(nbOfCorrectAnswers);\n\n } else {\n showResultAsToast(nbOfCorrectAnswers);\n }\n }", "private void checkAsk(FyQuestion q, FyAnswer a) {\n\t\treturn;\r\n\t}", "public void verifyAnswer() {\n\t\tint i=0;\n\t\tSystem.out.println(\"in verify answer function\");\n\t\tSystem.out.println(\"Number of Answers: \"+ansCount);\n\t\tSystem.out.println(\"User ans: \"+userEquation);\n\t\tif (ansCount==0)\n\t\t\tlb2.setText(\"There is no solution for this set\");\n\t\telse{\n\t\t\tint c=0;\n\t\t\t\n\t\t\twhile(c<ansCount) {\n\t\t\t\tif (solutions[i].equals(userEquation)) {\n\t\t\t\t\tSystem.out.println(\"Ans was Correct\");\n\t\t\t\t\tfinal long duration = System.nanoTime() - startTime;\n\t\t\t\t\tseconds = TimeUnit.NANOSECONDS.toSeconds(duration);\n\t\t\t\t\tlb2.setText(\"Congradulations! You took \"+seconds+\" seconds to find an answer.\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t\tc++;\n\t\t\t\tSystem.out.println(\"C: \"+c);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"Ans was not Correct\");\n\t}\n\t}", "public void setMultChoices() {\r\n Random randomGenerator = new Random();\r\n int howManyAnswer = randomGenerator.nextInt(6) + 1;\r\n for (int i = 0; i < howManyAnswer; i++) {\r\n int multipleAnswer = randomGenerator.nextInt(6);\r\n checkDuplicate(studentAnswer, multipleAnswer);\r\n\r\n }\r\n }", "public static void main(String[] args) {\n\n Scanner key = new Scanner(System.in);\n System.out.println(\"Enter yes or no\");\n String answer = key.next();\n\n boolean valid = answer.equalsIgnoreCase(\"yes\") || answer.equalsIgnoreCase(\"no\");\n\n int i = 1;\n while (!valid) {\n System.out.println(\"re=enter\");\n answer = key.next();\n i++;\n\n if (i == 3) {\n answer = answer.equalsIgnoreCase(\"yes\") ? \"you entered yes\" : \"you entered no\";\n if (!valid) {\n System.out.println(\"you have entered wrong answer 3 times. Try again later\");\n break;\n }\n }\n\n\n }\n if (answer.equalsIgnoreCase(\"yes\")) {\n System.out.println(\"you entered yes\");\n }\n if (answer.equalsIgnoreCase(\"no\")) {\n System.out.println(\"you entered no\");\n }\n\n\n }", "public void submitAnswers(View view) {\n\n int points = 0;\n\n //Question 1\n RadioButton radioButton_q1 = findViewById (R.id.optionB_q1);\n boolean firstQuestionCorrect = radioButton_q1.isChecked ();\n if (firstQuestionCorrect) {\n points += 1;\n }\n //Question 2\n RadioButton radioButton_q2 = findViewById (R.id.optionC_q2);\n boolean secondQuestionCorrect = radioButton_q2.isChecked ();\n if (secondQuestionCorrect) {\n points += 1;\n }\n\n //Question 3 - in order to get a point in Question 3, three particular boxes has to be checked\n CheckBox checkAns1_q3 = findViewById (R.id.checkbox1_q3);\n boolean thirdQuestionAnswer1 = checkAns1_q3.isChecked ();\n CheckBox checkAns2_q3 = findViewById (R.id.checkbox2_q3);\n boolean thirdQuestionAnswer2 = checkAns2_q3.isChecked ();\n CheckBox checkAns3_q3 = findViewById (R.id.checkbox3_q3);\n boolean thirdQuestionAnswer3 = checkAns3_q3.isChecked ();\n CheckBox checkAns4_q3 = findViewById (R.id.checkbox4_q3);\n boolean thirdQuestionAnswer4 = checkAns4_q3.isChecked ();\n CheckBox checkAns5_q3 = findViewById (R.id.checkbox5_q3);\n boolean thirdQuestionAnswer5 = checkAns5_q3.isChecked ();\n CheckBox checkAns6_q3 = findViewById (R.id.checkbox6_q3);\n boolean thirdQuestionAnswer6 = checkAns6_q3.isChecked ();\n CheckBox checkAns7_q3 = findViewById (R.id.checkbox7_q3);\n boolean thirdQuestionAnswer7 = checkAns7_q3.isChecked ();\n if (thirdQuestionAnswer2 && thirdQuestionAnswer3 && thirdQuestionAnswer6 && !thirdQuestionAnswer1 && !thirdQuestionAnswer4 && !thirdQuestionAnswer5 && !thirdQuestionAnswer7) {\n points = points + 1;\n }\n\n //Question 4\n RadioButton radioButton_q4 = findViewById (R.id.optionC_q4);\n boolean forthQuestionCorrect = radioButton_q4.isChecked ();\n if (forthQuestionCorrect) {\n points += 1;\n }\n\n //Question 5\n EditText fifthAnswer = findViewById (R.id.q5_answer);\n String fifthAnswerText = fifthAnswer.getText ().toString ();\n if (fifthAnswerText.equals (\"\")) {\n Toast.makeText (getApplicationContext (), getString (R.string.noFifthAnswer), Toast.LENGTH_LONG).show ();\n return;\n } else if ((fifthAnswerText.equalsIgnoreCase (getString (R.string.pacific))) || (fifthAnswerText.equalsIgnoreCase (getString (R.string.pacificOcean)))) {\n points += 1;\n }\n\n //Question 6\n RadioButton radioButton_q6 = findViewById (R.id.optionA_q6);\n boolean sixthQuestionCorrect = radioButton_q6.isChecked ();\n if (sixthQuestionCorrect) {\n points += 1;\n }\n\n //Showing the result to the user\n displayScore (points);\n }", "public void quiz() {\n\t\t\t\t\tcorrectans = 0;\n\t\t\t\t\tint k = 0;\n\t\t\t\t\tint j = 0;\n\t\t\t\t\tint M = 0;\n\t\t\t\t\tj = readDifficulty();\n\t\t\t\t\tM = readProblemType();\n\t\t\t\t\t//ask the student to solve 10 different problems, as determined by the problem type\n\t\t\t for(int i = 0; i < 10; i++ ) {\n\t\t\t \t//contain two numbers sampled from a uniform random distribution with bounds determined by the problem difficulty\n\t\t\t \tint x = rand.nextInt(j); \n\t\t\t\t int y = rand.nextInt(j);\n\t\t\t\t int O = askquestion(j, M,x,y);\n\t\t\t\t if(M == 4) {\n\t\t\t\t \t float floatans = readdivision();\n\t\t\t\t \tk = divisionsol(floatans, x, y);\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t int userin = readResponse();\n\t\t\t k = isnanswercorrect(O , userin);\n\t\t\t }\n\t\t\t if(k == 1) {\n\t\t\t \t correctans++;\n\t\t\t }\n\t\t\t }\n\t\t\t int L = 0;\n\t\t\t L = displayCompletionMessage(correctans);\n\t\t\t if ( L == 1) {\n\t\t\t \tquiz();\n\t\t\t }\n\t\t\t else {\n\t\t\t \treturn;\n\t\t\t }\n\t\t\t \n\t\t\t\t}", "int getWrongAnswers();", "public void wrongButtonIsPushed() {\n if (actualAnswer != displayedAnswer) {\n correctAnswers++;\n correctAnswer = true;\n penalty.setTextColor(Color.GREEN);\n penalty.setText(\"Answer correct!\");\n penalty.postDelayed(new Runnable() {\n public void run() {\n penalty.setText(\"\");\n }\n }, 500);\n }else {\n correctAnswer = false;\n secs+=3;\n penalty.setTextColor(Color.RED);\n penalty.setText(\"A 3 second penalty has been applied\");\n penalty.postDelayed(new Runnable() {\n public void run() {\n penalty.setText(\"\");\n }\n }, 500);\n }\n theirAnswer = false;\n afterButtonPushed();\n }", "private boolean getUserInput(int amountOfAnswers, int positionCorrectAnswer, Question curentQuestion) {\n int userAnswer = Tastatur.intInput();\n //Checks if the user input is valid\n while (userAnswer < 1 || userAnswer > amountOfAnswers) {\n System.out.println(\"Invalide Antwort\");\n userAnswer = Tastatur.intInput();\n }\n //checks if the users input is correct\n if (userAnswer == positionCorrectAnswer + 1) {\n System.out.println(\"Korrekt!\\n\");\n return true;\n // If the user uses the joker\n } else if (joker && userAnswer == 5) {\n //gets one wrong answer\n String wrongAnswer = curentQuestion.joker(positionCorrectAnswer);\n List<String> wrongAnswers = new ArrayList<>();\n wrongAnswers.add(wrongAnswer);\n //Creates a new Question Object\n Question question = new Question(curentQuestion.getQuestion(), 0, curentQuestion.getCorrectAnswer(), wrongAnswers);\n joker = false;\n //Ask the question again with only two answer possibilities\n return askQuestion(question, level);\n\n } else {\n System.out.println(\"Falsch\\n\");\n return false;\n }\n }", "public void checkAllAnswers(View view) {\n finalScore = 0;\n\n boolean answerQuestion1 = false;\n boolean check1Quest1 = checkSingleCheckBox(R.id.jupiter_checkbox_view);\n boolean check2Quest1 = checkSingleCheckBox(R.id.mars_checkbox_view);\n boolean check3Quest1 = checkSingleCheckBox(R.id.earth_checkbox_view);\n boolean check4Quest1 = checkSingleCheckBox(R.id.venus_checkbox_view);\n\n if (!check1Quest1 && !check2Quest1 && !check3Quest1 && check4Quest1) {\n finalScore = scoreCounter(finalScore);\n answerQuestion1 = true;\n }\n\n boolean answerQuestion2 = false;\n boolean check1Quest2 = checkSingleCheckBox(R.id.nasa_checkbox_view);\n boolean check2Quest2 = checkSingleCheckBox(R.id.spacex_checkbox_view);\n boolean check3Quest2 = checkSingleCheckBox(R.id.nvidia_checkbox_view);\n boolean check4Quest2 = checkSingleCheckBox(R.id.astrotech_checkbox_view);\n\n if (check1Quest2 && check2Quest2 && !check3Quest2 && check4Quest2) {\n finalScore = scoreCounter(finalScore);\n answerQuestion2 = true;\n }\n\n boolean answerQuestion3 = false;\n boolean check1Quest3 = checkSingleCheckBox(R.id.moon_checkbox_view);\n boolean check2Quest3 = checkSingleCheckBox(R.id.sun_checkbox_view);\n boolean check3Quest3 = checkSingleCheckBox(R.id.comet_checkbox_view);\n boolean check4Quest3 = checkSingleCheckBox(R.id.asteroid_checkbox_view);\n\n if (check1Quest3 && !check2Quest3 && !check3Quest3 && !check4Quest3) {\n finalScore = scoreCounter(finalScore);\n answerQuestion3 = true;\n }\n\n boolean answerQuestion4 = false;\n boolean check1Quest4 = checkSingleCheckBox(R.id.yes_checkbox_view);\n boolean check2Quest4 = checkSingleCheckBox(R.id.no_checkbox_view);\n\n if (check1Quest4 && !check2Quest4) {\n finalScore = scoreCounter(finalScore);\n answerQuestion4 = true;\n }\n\n String question1Summary = createQuestionSummary(answerQuestion1, 1, getResources().getString(R.string.venus));\n String question2Summary = createQuestionSummary(answerQuestion2, 2, getResources().getString(R.string.nasa_spacex_astrotech));\n String question3Summary = createQuestionSummary(answerQuestion3, 3, getResources().getString(R.string.moon));\n String question4Summary = createQuestionSummary(answerQuestion4, 4, getResources().getString(R.string.yes));\n\n String quizSummary = createQuizSummary(finalScore);\n\n displayQuestionSummary(question1Summary, answerQuestion1, R.id.question1_summary);\n displayQuestionSummary(question2Summary, answerQuestion2, R.id.question2_summary);\n displayQuestionSummary(question3Summary, answerQuestion3, R.id.question3_summary);\n displayQuestionSummary(question4Summary, answerQuestion4, R.id.question4_summary);\n displayQuizSummary(quizSummary);\n\n }", "private void updateQuestion()\r\n {\r\n if(noOfQuestion == 10) //last question.\r\n {\r\n //Toast.makeText(getApplicationContext(), \"Questions Limit Reached!!\", Toast.LENGTH_SHORT).show();\r\n\r\n questionsTV.setVisibility(View.GONE);\r\n questionNoTV.setVisibility(View.GONE);\r\n answer1Btn.setVisibility(View.GONE);\r\n answer2Btn.setVisibility(View.GONE);\r\n answer3Btn.setVisibility(View.GONE);\r\n viewLBBtn.setVisibility(View.VISIBLE);\r\n congratsImgView.setVisibility(View.VISIBLE);\r\n starImgView.setVisibility(View.VISIBLE);\r\n\r\n if(backgroundMusicPlayer.isPlaying()) {\r\n backgroundMusicPlayer.stop();\r\n }\r\n congratsMPlayer.start();\r\n clapSoundPlayer.start();\r\n }\r\n else\r\n {\r\n noOfQuestion++; //increment the number of question.\r\n resetButtonsPosition(answer1Btn, answer2Btn, answer3Btn, 0);\r\n\r\n //update the view with next question and answers.\r\n questionsTV.setText(questionsAndAnswersLibrary.getQuestion(questionNo));\r\n answer1Btn.setText(questionsAndAnswersLibrary.getAnswerChoice1(questionNo));\r\n answer2Btn.setText(questionsAndAnswersLibrary.getAnswerChoice2(questionNo));\r\n answer3Btn.setText(questionsAndAnswersLibrary.getAnswerChoice3(questionNo));\r\n\r\n correctAnswer = questionsAndAnswersLibrary.getCorrectAnswer(questionNo);\r\n questionNo++;\r\n\r\n moveButtons(answer1Btn);\r\n moveButtons(answer2Btn);\r\n moveButtons(answer3Btn);\r\n }\r\n }", "public void nextButton(View view) {\n Button submit = (Button) findViewById(R.id.start_and_submit_button);\n RadioGroup radioButtons = (RadioGroup) findViewById(R.id.radio_group);\n LinearLayout checkGroup = (LinearLayout) findViewById(R.id.check_group);\n EditText inputText = (EditText) findViewById(R.id.input_text);\n getUserAnswer();\n\n if (currentQueNum < maxNumOfQues) {\n currentQueNum += 1;\n optionsSelect();\n\n //this set question no 4 to checkbox view UI reply as required\n if (currentQueNum == 4) {\n radioButtons.setVisibility(View.GONE);\n checkGroup.setVisibility(View.VISIBLE);\n inputText.setVisibility(View.GONE);\n String que[] = getResources().getStringArray(R.array.questions);\n TextView questionsPane = (TextView) findViewById(R.id.questions_pane);\n questionsPane.setText(que[currentQueNum - 1]);\n }\n\n //this below block of code will set question number 7 and 10 to textView UI reply\n else if (currentQueNum == 7 || currentQueNum == 10) {\n radioButtons.setVisibility(View.GONE);\n inputText.setVisibility(View.VISIBLE);\n checkGroup.setVisibility(View.GONE);\n String que[] = getResources().getStringArray(R.array.questions);\n TextView quesDisp = (TextView) findViewById(R.id.questions_pane);\n quesDisp.setText(que[currentQueNum - 1]);\n }\n\n // this below block of code will set the view with appropriate UI for answers\n else {\n radioButtons.setVisibility(View.VISIBLE);\n inputText.setVisibility(View.GONE);\n checkGroup.setVisibility(View.GONE);\n String que[] = getResources().getStringArray(R.array.questions);\n TextView questionsPane = (TextView) findViewById(R.id.questions_pane);\n questionsPane.setText(que[currentQueNum - 1]);\n }\n }\n\n //notify the user that he/she have reach the end of test he should submit?\n else {\n Toast endOfQuiz = makeText(getApplicationContext(), \"YOU HAVE REACH THE END OF TEST, SUBMIT?\", Toast.LENGTH_SHORT);\n endOfQuiz.show();\n submit.setEnabled(true);\n }\n if (currentQueNum != maxNumOfQues) {\n inputText.setText(\"\");//clear the text field for subsequent use\n radioButtons.clearCheck();//this clear the check state of radioButtons since same object will be re used in next question\n }\n }", "private void questionValidation(Question question) throws SurveyEngineException {\r\n if (\"\".equals(question.getDescription())) {\r\n throw new SurveyEngineException(\"Question description empty or null\");\r\n }\r\n HashMap<Integer, String> answers = question.getAnswers();\r\n if (answers.size() < 2) {\r\n throw new SurveyEngineException(\"Question has less than 2 answers\");\r\n }\r\n for (int i: answers.keySet()) {\r\n if (\"\".equals(answers.get(i))) {\r\n throw new SurveyEngineException(\"Answer for a question is empty or null\");\r\n }\r\n } \r\n }", "private void checkFill(FyQuestion q, FyAnswer a) {\n\t\tList<FyQuestionItem> is = q.getItems();\r\n\t\tDouble avg = q.getScore() != 0 ? q.getScore() / is.size() : 0;\t\r\n\t\ta.setGoal(0.0);\r\n\t\tfor (int i = 0; i < is.size(); i++) {\r\n\t\t\tif (a.getAnswers()[i].equals(is.get(i).getContent())) {\r\n\t\t\t\ta.setGoal(avg + (a.getGoal() != null ? a.getGoal() : 0.0));\r\n\t\t\t}\r\n\t\t}\r\n\t\ta.setIsGrade(true);\r\n\t}", "private void updateQuestion() {\r\n\r\n //The code below resets the option\r\n mOption1.setVisibility(View.VISIBLE);\r\n mOption2.setVisibility(View.VISIBLE);\r\n mOption3.setVisibility(View.VISIBLE);\r\n mNext.setVisibility(View.INVISIBLE);\r\n\r\n int questionSize = 12;\r\n\r\n if (mQuestionNumber < questionSize) {\r\n\r\n mQuestionView.setText((questionsDB.getQuestion(mQuestionNumber)));\r\n mOption1.setText(questionsDB.getChoice1(mQuestionNumber));\r\n mOption2.setText(questionsDB.getChoice2(mQuestionNumber));\r\n mOption3.setText(questionsDB.getChoice3(mQuestionNumber));\r\n\r\n mAnswer = questionsDB.getCorrectAnswer(mQuestionNumber);\r\n mQuestionNumber++;\r\n timeLeftInMillis = COUNTDOWN_IN_MILLIS;\r\n startCountDown();\r\n\r\n\r\n } else {\r\n displayScore();\r\n }\r\n\r\n }", "private boolean validateAnswer() {\n CheckBox checkbox1 = findViewById(R.id.checkbox_1);\n CheckBox checkbox2 = findViewById(R.id.checkbox_2);\n CheckBox checkbox3 = findViewById(R.id.checkbox_3);\n\n int checkboxSelected = 0;\n\n if (checkbox1.isChecked()) {\n checkboxSelected = checkboxSelected + 1;\n }\n if (checkbox2.isChecked()) {\n checkboxSelected = checkboxSelected + 1;\n }\n if (checkbox3.isChecked()) {\n checkboxSelected = checkboxSelected + 1;\n }\n\n if (checkboxSelected == 2) {\n return true;\n }\n else{\n Toast.makeText(this, getString(R.string.message_two_correct), Toast.LENGTH_SHORT).show();\n return false;\n }\n }", "public boolean hasPendingQuestions() {\r\n try {\r\n Task[] tasks = getTasks();\r\n if (tasks == null || tasks.length == 0)\r\n return false;\r\n \r\n for (int i = 0; i < tasks.length; i++) {\r\n if (tasks[i].getPendingQuestions() != null\r\n && tasks[i].getPendingQuestions().length > 0)\r\n return true;\r\n }\r\n \r\n return false;\r\n } catch (ProcessManagerException pme) {\r\n return false;\r\n }\r\n }", "private boolean isWrong() {\n\t\treturn wrongMatches >= 5;\n\t}", "public void incorrectAnswer(View view) {\n\n // Update correct count\n deck.getCard(deckPos).setNumIncorrect(deck.getCard(deckPos).getNumIncorrect() + 1);\n\n // Set to question and update counter\n isQuestion = true;\n deckPos ++;\n\n // If not last card - Update card\n if(!(deckPos == deck.deckLength)) {\n displayCard(deck.getCard(deckPos), isQuestion);\n } else {\n finishQuiz();\n }\n\n // Set quiz counts.\n quiz.setIncorrectCount(quiz.getIncorrectCount() + 1);\n }", "public int getNumberOfCorrectAnswers() {\n int correctAnswers = (responses.size() - 1) - incorrectAnswers.size();\r\n if (correctAnswers < 0) {\r\n // FIXME: replace with proper logging?\r\n System.err.println(\"Somehow the number of responses was less than the number of incorrect answers: \"\r\n + responses + \" -- \" + incorrectAnswers);\r\n return 0;\r\n }\r\n return correctAnswers;\r\n }", "private int getNumberCorrect() {\n RadioButton rb1 = (RadioButton) findViewById(R.id.question_1_correct);\n RadioButton rb2 = (RadioButton) findViewById(R.id.question_2_correct);\n RadioButton rb3 = (RadioButton) findViewById(R.id.question_3_correct);\n RadioButton rb4 = (RadioButton) findViewById(R.id.question_4_correct);\n boolean q5Answer = checkQuestion5();\n boolean q6answer = checkQuestion6();\n ToggleButton tb7 = (ToggleButton) findViewById(R.id.question_7);\n ToggleButton tb8 = (ToggleButton) findViewById(R.id.question_8);\n boolean bool8 = !tb8.isChecked();\n ToggleButton tb9 = (ToggleButton) findViewById(R.id.question_9);\n ToggleButton tb10 = (ToggleButton) findViewById(R.id.question_10);\n\n boolean answers[] = new boolean[]{rb1.isChecked(), rb2.isChecked(), rb3.isChecked(), rb4.isChecked(),\n q5Answer, q6answer, tb7.isChecked(), bool8, tb9.isChecked(),\n tb10.isChecked()};\n return countCorrectAnswers(answers);\n }", "private int countCorrectAnswers(boolean[] answers) {\n int numberCorrect = 0;\n for (int i = 0; i < answers.length; i++) {\n if (answers[i]) {\n numberCorrect++;\n }\n }\n return numberCorrect;\n }", "private void nextQuestion() {\n\n // increment current question index\n currentQuestionIndex++;\n\n // if the current question index is smaller than the size of the quiz list\n if (currentQuestionIndex < quizList.size()) {\n\n // clear the possible answers\n possibleAnswers.clear();\n\n // grab the definition of current question, assign the correct answer variable\n // and add it to the list of possible answers.\n definition = quizList.get(currentQuestionIndex)[0];\n correctAnswer = quizMap.get(definition);\n possibleAnswers.add(correctAnswer);\n\n // while there's less than 4 possible answers, get a random answer\n // and if it hasn't already been added, add it to the list.\n while (possibleAnswers.size() < 4) {\n String answer = quizList.get(new Random().nextInt(quizList.size() - 1))[1];\n if (!possibleAnswers.contains(answer)) {\n possibleAnswers.add(answer);\n }\n }\n\n // shuffle possible answers so they display in a random order\n Collections.shuffle(possibleAnswers);\n } else {\n // if the question index is out of bounds, set quiz as finished\n quizFinished = true;\n }\n }", "public void setNumNewQuestions() {\n\t\tif(newQuestions && checkNewQuestions().equals(\"\")) {\n\t\t\tanswerChoiceList.setSelectedIndex(2);\n\t\t}\n\t\tif(newQuestions && questionNo == noOfQuestions) {\n\t\t\tnewQuestions = false;\n\t\t}\n\t}", "private void addQuestion() {\n Question q = new Question(\n \"¿Quien propuso la prueba del camino básico ?\", \"Tom McCabe\", \"Tom Robert\", \"Tom Charlie\", \"Tom McCabe\");\n this.addQuestion(q);\n\n\n Question q1 = new Question(\"¿Qué es una prueba de Caja negra y que errores desean encontrar en las categorías?\", \"Hace una cobertura de declaraciones del código, ramas, caminos y condiciones\", \"esta basada en la funcionalidad de los módulos del programa\", \" determina la funcionalidad del sistema\", \" determina la funcionalidad del sistema\");\n this.addQuestion(q1);\n Question q2 = new Question(\"¿Qué es la complejidad ciclomática es una métrica de calidad software?\", \"Hace una cobertura de declaraciones del código, ramas, caminos y condiciones\", \"esta basada en la funcionalidad de los módulos del programa\", \"basada en el cálculo del número\", \"basada en el cálculo del número\");\n this.addQuestion(q2);\n //preguntas del quiz II\n Question q3=new Question(\"Las pruebas de caja blanca buscan revisar los caminos, condiciones, \" +\n \"particiones de control y datos, de las funciones o módulos del sistema; \" +\n \"para lo cual el grupo de diseño de pruebas debe:\",\n \"Conformar un grupo de personas para que use el sistema nuevo\",\n \"Ejecutar sistema nuevo con los datos usados en el sistema actual\",\n \"Generar registro de datos que ejecute al menos una vez cada instrucción\",\n \"Generar registro de datos que ejecute al menos una vez cada instrucción\");\n this.addQuestion(q3);\n Question q4=new Question(\"¿Las pruebas unitarias son llamadas?\",\n \"Pruebas del camino\", \"Pruebas modulares\",\n \"Pruebas de complejidad\", \"Pruebas modulares\");\n this.addQuestion(q4);\n Question q5=new Question(\"¿Qué es una prueba de camino básico?\",\n \"Hace una cobertura de declaraciones del código\",\n \"Permite determinar si un modulo esta listo\",\n \"Técnica de pueba de caja blanca\",\n \"Técnica de pueba de caja blanca\" );\n this.addQuestion(q5);\n Question q6=new Question(\"Prueba de camino es propuesta:\", \"Tom McCabe\", \"McCall \", \"Pressman\",\n \"Tom McCabe\");\n this.addQuestion(q6);\n Question q7=new Question(\"¿Qué es complejidad ciclomatica?\",\"Grafo de flujo\",\"Programming\",\n \"Metrica\",\"Metrica\");\n this.addQuestion(q7);\n //preguntas del quiz III\n Question q8 = new Question(\n \"¿Se le llama prueba de regresión?\", \"Se tienen que hacer nuevas pruebas donde se han probado antes\",\n \"Manten informes detallados de las pruebas\", \"Selección de los usuarios que van a realizar las pruebas\",\n \"Se tienen que hacer nuevas pruebas donde se han probado antes\");\n this.addQuestion(q8);\n Question q9 = new Question(\"¿Cómo se realizan las pruebas de regresión?\",\n \"Selección de los usuarios que van a realizar las pruebas\",\n \"Se tienen que hacer nuevas pruebas donde se han probado antes\", \"A través de herramientas de automatización de pruebas\", \"A través de herramientas de automatización de pruebas\");\n this.addQuestion(q9);\n Question q10 = new Question(\"¿Cuándo ya hay falta de tiempo para ejecutar casos de prueba ya ejecutadas se dejan?\",\n \"En primer plano\", \"En segundo plano\", \"En tercer plano\", \"En segundo plano\");\n this.addQuestion(q10);\n //preguntas del quiz IV\n Question q11 = new Question(\n \"¿En qué se enfocan las pruebas funcionales?\",\n \"Enfocarse en los requisitos funcionales\", \"Enfocarse en los requisitos no funcionales\",\n \"Verificar la apropiada aceptación de datos\", \"Enfocarse en los requisitos funcionales\");\n this.addQuestion(q11);\n Question q12 = new Question(\"Las metas de estas pruebas son:\", \"Verificar la apropiada aceptación de datos\",\n \"Verificar el procesamiento\", \"Verificar la apropiada aceptación de datos, procedimiento y recuperación\",\n \"Verificar la apropiada aceptación de datos, procedimiento y recuperación\");\n this.addQuestion(q12);\n Question q13 = new Question(\"¿En qué estan basadas este tipo de pruebas?\",\n \"Hace una cobertura de declaraciones del código, ramas, caminos y condiciones\",\n \"Esta basada en la funcionalidad de los módulos del programa\",\n \"Técnicas de cajas negra\", \"Técnicas de cajas negra\");\n this.addQuestion(q13);\n //preguntas del quiz V\n Question q14 = new Question(\n \"¿Cúal es el objetivo de esta técnica?\", \"Identificar errores introducidos por la combinación de programas probados unitariamente\",\n \"Decide qué acciones tomar cuando se descubren problemas\",\n \"Verificar que las interfaces entre las componentes de software funcionan correctamente\",\n \"Identificar errores introducidos por la combinación de programas probados unitariamente\");\n this.addQuestion(q14);\n Question q15 = new Question(\"¿Cúal es la descripción de la Prueba?\",\n \"Hace una cobertura de declaraciones del código, ramas, caminos y condiciones\",\n \"Esta basada en la funcionalidad de los módulos del programa\",\n \"Describe cómo verificar que las interfaces entre las componentes de software funcionan correctamente\",\n \"Describe cómo verificar que las interfaces entre las componentes de software funcionan correctamente\");\n this.addQuestion(q15);\n Question q16 = new Question(\"Por cada caso de prueba ejecutado:\",\n \"Hace una cobertura de declaraciones del código, ramas, caminos y condiciones\",\n \"Esta basada en la funcionalidad de los módulos del programa\",\n \"Comparar el resultado esperado con el resultado obtenido\", \"Comparar el resultado esperado con el resultado obtenido\");\n this.addQuestion(q16);\n //preguntas del quiz VI\n Question q17 = new Question(\n \"Este tipo de pruebas sirven para garantizar que la calidad del código es realmente óptima:\",\n \"Pruebas Unitarias\", \"Pruebas de Calidad de Código\",\n \"Pruebas de Regresión\", \"Pruebas de Calidad de Código\");\n this.addQuestion(q17);\n Question q18 = new Question(\"Pruebas de Calidad de código sirven para: \",\n \"Hace una cobertura de declaraciones del código, ramas, caminos y condiciones\",\n \"Verificar que las especificaciones de diseño sean alcanzadas\",\n \"Garantizar la probabilidad de tener errores o bugs en la codificación\", \"Garantizar la probabilidad de tener errores o bugs en la codificación\");\n this.addQuestion(q18);\n Question q19 = new Question(\"Este análisis nos indica el porcentaje que nuestro código desarrollado ha sido probado por las pruebas unitarias\",\n \"Cobertura\", \"Focalización\", \"Regresión\", \"Cobertura\");\n this.addQuestion(q19);\n\n Question q20 = new Question( \"¿Qué significa V(G)?\",\n \"Número de Regiones\", \"Número de Aristas\", \"Número de Nodos\", \"Número de Regiones\");\n this.addQuestion(q20);\n\n Question q21 = new Question( \"¿Qué significa A?\",\n \"Número de Regiones\", \"Número de Aristas\", \"Número de Nodos\", \"Número de Aristas\");\n this.addQuestion(q21);\n\n Question q22 = new Question( \"¿Qué significa N?\",\n \"Número de Regiones\", \"Número de Aristas\", \"Número de Nodos\", \"Número de Nodos\");\n this.addQuestion(q22);\n\n Question q23 = new Question( \"¿Qué significa P?\",\n \"Número de Regiones\", \"Número de Aristas\", \"Número de Nodos Predicado\", \"Número de Nodos Predicado\");\n this.addQuestion(q23);\n Question q24 = new Question( \"De cuantás formas se puede calcular la complejidad ciclomatica V(G):\",\n \"3\", \"1\", \"2\", \"3\");\n this.addQuestion(q24);\n\n // END\n }", "private void callNextQuestion() {\n questionProgress++;\n\n if (questionProgress <= 10) {\n\n if (Utils.isKitkat()) {\n ContinuousSlide slide = new ContinuousSlide(Gravity.RIGHT);\n TransitionManager.beginDelayedTransition(llBody, slide);\n }\n\n btNext.setVisibility(View.GONE);\n currentQuestion = getQuestionById(questionProgress);\n ivScene.setVisibility(View.GONE);\n tvQuestion.setVisibility(View.GONE);\n\n if (tvResult != null) {\n flSceneFrame.removeView(tvResult);\n }\n ivScene.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {\n @Override\n public void onGlobalLayout() {\n ivScene.getViewTreeObserver().removeOnGlobalLayoutListener(this);\n resizeSceneArea();\n for (int i = 0; i < 4; i++) {\n positionAnswer(answerButtonList.get(i), currentQuestion.getAnswers().get(i));\n waitAnimations();\n }\n }\n });\n } else {\n questionProgress = 10;\n Intent intent = new Intent(this, ResultActivity_.class);\n startActivity(intent);\n }\n }", "@Override\n protected int getMaxPossibleAttempts(){\n int choiceCt = questionData.getChoices().size();\n //if there's one choice, it's intentionally obvious\n return (choiceCt == 1 ? 1 : choiceCt - 1);\n }", "@Override\n public void resetQuestion() {\n super.resetQuestion();\n hadSecondChance = false;\n currentTeam = null;\n originalTeam = null;\n teamHasAnswered.clear();\n //reset teamHasAnswered map so all teams get a chance to anaswer again\n for (int i = 0; i < numTeams; i++) teamHasAnswered.put(i, false);\n }", "public boolean moveToNextQuestion() {\n\n this.setGameState(GameState.AWAITING_ANSWER);\n if ((currentQuestionIndex + 1) < this.quiz.getQuestions().size()) {\n currentQuestionIndex++;\n return true;\n } else {\n logger.debug(\"no more questions... ending quiz.\");\n this.setGameState(GameState.COMPLETE);\n return false;\n }\n }", "public static void takeTest(Question [] questions) {\n int score = 0;\n Scanner keyboardInput = new Scanner(System.in);\n for(int i = 0; i < questions.length; i++){\n System.out.println(questions[i].prompt);\n String answer = keyboardInput.nextLine();\n if(answer.equals(questions[i].answer)) {\n score++;\n }\n\n }\n System.out.println(\"Voce conseguiu \" + score + \"/\" + questions.length + \"pontos\");\n\n }", "public void takeQuiz()\r\n\t{\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\tRandom generator = new Random();\r\n\t\tint question;\r\n\t\tint right = 0;\r\n\t\tString answer;\r\n\t\t\r\n\t\tfor(int i=0; i<10; i++)\r\n\t\t{\r\n\t\t\tquestion = generator.nextInt(questions.size());\r\n\t\t\t\r\n\t\t\tSystem.out.println( (i+1) + \".\" + questions.get(question).toString());\r\n\t\t\tSystem.out.println(\"Answer: \");\r\n\t\t\tanswer = in.nextLine();\r\n\t\t\t\r\n\t\t\t//checks input\r\n\t\t\twhile( !( answer.equalsIgnoreCase(\"1\") || answer.equalsIgnoreCase(\"2\") || answer.equalsIgnoreCase(\"3\") || answer.equalsIgnoreCase(\"4\") ) )\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Invalid entry. Enter again:\");\r\n\t\t\t\tanswer = in.nextLine();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif( answer.equalsIgnoreCase(questions.get(question).getCorrectAnswer()))\r\n\t\t\t{\r\n\t\t\t\tright++;\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"You got \" + right + \" questions right.\");\r\n\t}", "@Override\n\tpublic void verifyRateQuestionEnabledWithEveryQuestion() {\n\t\t\n\t}", "private boolean checkQuestion(int number){\n String answer = questionsList.get(number).getAnswer();\n return answer.equals(\"true\");\n\n }", "private void evaluateQuestions() {\n RadioGroup groupTwo = findViewById(R.id.radioGroupQ2);\n int groupTwoId = groupTwo.getCheckedRadioButtonId();\n\n // Get the ID of radio group 6 to ascertain if a radio button has been ticked\n RadioGroup groupSix = findViewById(R.id.radioGroupQ6);\n int groupSixId = groupSix.getCheckedRadioButtonId();\n\n // Get the ID of radio group 7 to ascertain if a radio button has been ticked\n RadioGroup groupSeven = findViewById(R.id.radioGroupQ7);\n int groupSevenId = groupSeven.getCheckedRadioButtonId();\n\n // Taking in the vale of any question that has been checked in question 3 and storing it\n CheckBox question3Option1 = findViewById(R.id.question_three_option1);\n boolean stateOfQuestion3_option1 = question3Option1.isChecked();\n CheckBox question3Option2 = findViewById(R.id.question_three_option2);\n boolean stateOfQuestion3Option2 = question3Option2.isChecked();\n CheckBox question3Option3 = findViewById(R.id.question_three_option3);\n boolean stateOfQuestion3Option3 = question3Option3.isChecked();\n CheckBox question3Option4 = findViewById(R.id.question_three_option4);\n boolean stateOfQuestion3Option4 = question3Option4.isChecked();\n\n // Taking in the value of any question that has been checked in question 4 and storing it\n CheckBox question4Option1 = findViewById(R.id.question_four_option1);\n boolean stateOfQuestion4Option1 = question4Option1.isChecked();\n CheckBox question4Option2 = findViewById(R.id.question_four_option2);\n boolean stateOfQuestion4Option2 = question4Option2.isChecked();\n CheckBox question4Option3 = findViewById(R.id.question_four_option3);\n boolean stateOfQuestion4Option3 = question4Option3.isChecked();\n CheckBox question4Option4 = findViewById(R.id.question_four_option4);\n boolean stateOfQuestion4Option4 = question4Option4.isChecked();\n\n // Taking in the vale of any question that has been checked in question 8 and storing it\n CheckBox question8Option1 = findViewById(R.id.question_eight_option1);\n boolean stateOfQuestion8Option1 = question8Option1.isChecked();\n CheckBox question8Option2 = findViewById(R.id.question_eight_option2);\n boolean stateOfQuestion8Option2 = question8Option2.isChecked();\n CheckBox question8Option3 = findViewById(R.id.question_eight_option3);\n boolean stateOfQuestion8Option3 = question8Option3.isChecked();\n CheckBox question8Option4 = findViewById(R.id.question_eight_option4);\n boolean stateOfQuestion8Option4 = question8Option4.isChecked();\n\n // Getting all EditText fields\n\n EditText questText1 = findViewById(R.id.question_one_field);\n String question1 = questText1.getText().toString();\n\n\n EditText questText5 = findViewById(R.id.question_five_field);\n String question5 = questText5.getText().toString();\n\n EditText questText9 = findViewById(R.id.question_nine_field);\n String question9 = questText9.getText().toString();\n\n // Variable parameters for calculateRadiobutton method\n\n RadioButton quest2_opt3 = findViewById(R.id.question_two_option3);\n boolean question2_option3 = quest2_opt3.isChecked();\n\n RadioButton quest6_opt1 = findViewById(R.id.question_six_option2);\n boolean question6_option2= quest6_opt1.isChecked();\n\n RadioButton quest7_opt1 = findViewById(R.id.question_seven_option1);\n boolean question7_option1 = quest7_opt1.isChecked();\n\n // Store all checked parameter to ascertain that at least one option was ticked in\n // question 3\n boolean question3 = stateOfQuestion3_option1 || stateOfQuestion3Option2 ||\n stateOfQuestion3Option3 || stateOfQuestion3Option4;\n\n\n // Store all checked parameter to ascertain that at least one option was ticked in\n // question 4\n boolean question4 = stateOfQuestion4Option1 || stateOfQuestion4Option2 || stateOfQuestion4Option3 ||\n stateOfQuestion4Option4;\n\n\n // Store all checked parameter to ascertain that at least one option was ticked in\n // question 8\n boolean question8 = stateOfQuestion8Option1 || stateOfQuestion8Option2 ||\n stateOfQuestion8Option3 || stateOfQuestion8Option4;\n\n // if no radio button has been checked in radio group 2 after submit button has been clicked\n if ( groupTwoId == -1) {\n Toast.makeText(this, \"Please pick an answer in question 2\",\n Toast.LENGTH_SHORT).show();\n }\n\n // if no radio button has been clicked in radio group 6 after submit button has been clicked\n else if (groupSixId == -1) {\n Toast.makeText(this, \"Please pick an answer to question 6\",\n Toast.LENGTH_SHORT).show();\n }\n\n // if no radio button has been clicked in radio group 7 after submit button has been clicked\n else if (groupSevenId == -1) {\n Toast.makeText(this, \"Please pick an answer to question 7\",\n Toast.LENGTH_SHORT).show();\n }\n\n // if no checkbox was clicked in question 3 after submit button has been clicked\n else if (!question3) {\n Toast.makeText(this, \"Please select an answer to question 3\",\n Toast.LENGTH_SHORT).show();\n }\n\n // if no checkbox was clicked in question 4 after submit button has been clicked\n else if (!question4) {\n Toast.makeText(this, \"Please select an answer to question 4\",\n Toast.LENGTH_SHORT).show();\n\n }\n\n // if no checkbox was clicked in question 8 after submit button has been clicked\n else if (!question8) {\n Toast.makeText(this, \"Please select an answer to question 8\",\n Toast.LENGTH_SHORT).show();\n }\n\n // check if the questions has been answered without hitting the reset button\n else if (checkSubmit > 0) {\n Toast.makeText(this, \"Press the reset button\",\n Toast.LENGTH_SHORT).show();\n } else {\n //Add one to checkSubmit variable to avoid the score from being recalculated and added to\n // the previous score if the submit button was pressed more than once.\n checkSubmit += 1;\n\n // calculate all checkboxes by calling calculateCheckboxes method\n calculateScoreForCheckBoxes( stateOfQuestion3_option1, stateOfQuestion3Option3,stateOfQuestion3Option4,\n stateOfQuestion4Option1, stateOfQuestion4Option2, stateOfQuestion4Option4,\n stateOfQuestion8Option1, stateOfQuestion8Option3);\n\n // calculate all radio buttons by calling calculateRadioButtons method\n calculateScoreForRadioButtons(question2_option3, question6_option2, question7_option1);\n\n // calculate all Text inputs by calling editTextAnswers method\n calculateScoreForEditTextAnswers(question1,question5, question9);\n\n displayScore(score);\n\n String grade;\n\n if (score < 10) {\n grade = \"Meh...\";\n } else if (score >=10 && score <=14) {\n grade = \"Average\";\n } else if ((score >= 15) && (19 >= score)) {\n grade = \"Impressive!\";\n } else {\n grade = \"Excellent!\";\n }\n\n // Display a toast message to show total score\n Toast.makeText(this, grade + \" your score is \" + score + \"\",\n Toast.LENGTH_SHORT).show();\n }\n }", "private void verifyQuestion(Answer answer) {\n // If is running, stop the question timer\n //(Hard mode)\n timerQuestion.stop();\n \n //if (challengeModel.getChallenge().getCurrentCorrectAnswer()) {\n if (challengeModel.getChallenge().getQuestionsList().get(challengeModel.getChallenge().getCurrentQuestionNumber()-1).getAnswer() == answer) {\n imgCenter.setIcon(Resources.getImageCorrect());\n labelAnswerResult.setText(\"Correto \");\n labelClarification.setText(\"\");\n }\n else {\n imgCenter.setIcon(Resources.getImageIncorrect());\n // Show clarification\n labelAnswerResult.setText(\"\");\n labelClarification.setText(\"<HTML><B>Esclarecimento: </B>\"+challengeModel.getChallenge().getCurrentRuleClarification()+\"</HTML>\");\n }\n \n showAnswerResult(answer);\n }", "public abstract void newGuiQuestions(long ms, int n);", "public void correctButtonIsPushed() {\n if (actualAnswer == displayedAnswer) {\n correctAnswers++;\n correctAnswer = true;\n penalty.setTextColor(Color.GREEN);\n penalty.setText(\"Answer correct!\");\n penalty.postDelayed(new Runnable() {\n public void run() {\n penalty.setText(\"\");\n }\n }, 500);\n }else {\n correctAnswer = false;\n secs+=3;\n penalty.setTextColor(Color.RED);\n penalty.setText(\"A 3 second penalty has been applied\");\n penalty.postDelayed(new Runnable() {\n public void run() {\n penalty.setText(\"\");\n }\n }, 500);\n }\n theirAnswer = true;\n afterButtonPushed();\n }", "public void finishQuiz(View view){\n if(((RadioButton) findViewById(R.id.radio_new_york_city)).isChecked()) {\n score++;\n }\n\n //Anser for question 2\n if(((RadioButton) findViewById(R.id.radio_food_cart)).isChecked()) score++;\n\n //Anser for question 3\n if(((CheckBox) findViewById(R.id.check_chicken)).isChecked()\n && ((CheckBox) findViewById(R.id.check_gyro)).isChecked()\n && !((CheckBox) findViewById(R.id.check_pork)).isChecked()) score++;\n\n //Anser for question 4\n String answer4 = ((EditText) findViewById(R.id.edit_bread)).getText().toString().toLowerCase();\n if(answer4.equals(\"pita\")) score++;\n\n //Anser for question 5\n if(((CheckBox) findViewById(R.id.check_red)).isChecked()\n && ((CheckBox) findViewById(R.id.check_yellow)).isChecked()\n && !((CheckBox) findViewById(R.id.check_white)).isChecked()) score++;\n\n\n //Anser for question 6\n if(((RadioButton) findViewById(R.id.radio_large)).isChecked()) score++;\n\n //Display the Toast\n Context context = getApplicationContext();\n\n CharSequence text;\n if(score == 6) {\n text = \"Congrats! Your Score was \" + score + \" out of 6!\";\n } else {\n text = \"You only have \" + score + \" out of 6! Try again!\";\n }\n int duration = Toast.LENGTH_LONG;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n\n //Resest score to 0\n\n score = 0;\n }", "public void nouvelleQuestion() {\n getAll();\n Random random = new Random();\n do {\n questionObjet = listeQuestions.get(random.nextInt(listeQuestions.size()));\n niveauUtil = questionObjet.getNiveau();\n }\n while (niveauUtil != niveau);\n questionUtil = questionObjet.getQuestion();\n reponseUtil = questionObjet.getReponse();\n }", "private void showResultAsToast(int nbOfCorrectAnswers) {\n String msg = \"\";\n\n if(nbOfCorrectAnswers == 4) {\n msg = \"Genius ! LOL !! \" + nbOfCorrectAnswers + \"/4\";\n } else if (nbOfCorrectAnswers < 4) {\n msg = \"You can do better than this! \" + nbOfCorrectAnswers + \"/4\";\n }\n\n // The Toast method helps to show a message that shows the number of correct answers\n Toast.makeText(this, msg, Toast.LENGTH_LONG).show();\n }", "public void checkAnswer(View view) {\n\n mButton = (Button) view;\n\n if (mButton.getText().toString().equals(questionsInList.get(0).getRightAnswer())) {\n //Toast.makeText(this, \"Correct answer\", Toast.LENGTH_SHORT).show();\n questionNumberIncrement();\n checkIfLastQuestion();\n\n mHandler.postDelayed(r, 1200);\n\n try {\n questionsInList.removeFirst();\n }catch (IllegalArgumentException e){\n e.printStackTrace();\n }\n\n countSessionPoints();\n setCurrentQuestion();\n iterator = (ListIterator) questionsInList.iterator();\n\n } else {\n Toast.makeText(this, \"Wrong answer\", Toast.LENGTH_SHORT).show();\n wrongAnswer();\n\n }\n\n\n }", "public List<Question> poseQuestions(User user, int n) {\n\t\tthis.cUser = user;\t\t\n\t\tList<Question> tba = new ArrayList<Question>();\n\t\tRandom r = new Random();\n\t\tSet<Integer> used = new HashSet<Integer>();\n\t\tint min = 0;\n\t\tint max = availableQuestions.size();\n\t\tif(max - cUser.getQuestionsAnswered().size() < n ) {\n\t\t\tcUser.getQuestionsAnswered().clear();\n\t\t}\n\t\tint i=0;\n\t\twhile( i < n ) {\n\t\t\tint ind = r.nextInt((max - min) + 1) + min;\n\t\t\tif(ind>=0 && ind < max && !used.contains(ind)) {\n\t\t\t\tQuestion q = availableQuestions.get(ind);\n\t\t\t\tused.add(ind);\n\t\t\t\tif(!cUser.getQuestionsAnswered().contains(q.getId())) {\n\t\t\t\t\ttba.add(q);\n\t\t\t\t\ti++;\t\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t}\t\n\t\t\n\t\treturn tba;\n\t}", "public static void sitExam(int stuId) {\n ExamService examService = new ExamServiceImpl();\n Scanner sc = new Scanner(System.in);\n\n int testId;\n while (true) {\n System.out.print(\"Please input the test ID: \");\n try {\n String input = sc.nextLine().trim();\n if (input.length() == 6) {\n testId = Integer.parseInt(input);\n break;\n }\n } catch (NumberFormatException ignored) {\n }\n System.out.println(\"The id should be 6 digits!\");\n }\n\n List<Question> allQuestion = examService.sitExam(stuId, testId);\n LoggerUtil.addLog(\"[Student \" + stuId + \"] take exam \" + testId);\n\n for (Question q : allQuestion) {\n if (isTimeUp(testId) == true) {\n System.out.println(\"Exam ended, please wait us upload your answer...\");\n AutoJudgeService autoJudgeService = new AutoJudgeServiceImpl();\n autoJudgeService.judgeAnExam(testId);\n break;\n }\n System.out.printf(\"QNo:%d Type:%s, Complsory:%s Score:%d \\n\", q.getqNo(), q.getType(), q.getCompulsory(),\n q.getScore());\n System.out.println(\"****************************************\");\n System.out.println(q.getqDescri());\n System.out.println(\"****************************************\");\n\n String answer;\n while (true) {\n System.out.printf(\"Input your answer(in one line): \");\n answer = sc.nextLine();\n\n boolean nextQustion = false;\n while (true) {\n System.out.println(\"Next question?(Y/N)\");\n String op = sc.nextLine().trim().toUpperCase();\n if (op.equals(\"Y\"))\n nextQustion = true;\n else if (!op.equals(\"N\"))\n continue;\n break;\n }\n if (nextQustion) {\n break;\n }\n }\n examService.answerAnQuestion(q, stuId, answer);\n }\n\n while (true) {\n System.out.println(\"You have answered all question, submit now?(Y/N)\");\n String op = sc.nextLine().trim().toUpperCase();\n if (op.equals(\"Y\")) {\n AutoJudgeService autoJudgeService = new AutoJudgeServiceImpl();\n autoJudgeService.judgeAnExam(testId);\n break;\n }\n }\n }", "public boolean gameCompleted() {\n\t\tint[] expected = {5,5,5,5,5};\n\t\tif(Arrays.equals(_answeredQuestions, expected)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private boolean checkQuestion(int number) {\n String answer = questionsList.get(number).getAnswer();\n return answer.equals(\"True\");\n }", "private int getScoreMultiple(MMObjectNode questionNode, MMObjectNode givenAnswer) {\n Vector givenAnswers = givenAnswer.getRelatedNodes(\"mcanswers\");\n Vector goodAnswers = questionNode.getRelatedNodes(\"mcanswers\");\n\n // First check if all the given answers are correct\n for (int i=0; i<givenAnswers.size(); i++) {\n if (((MMObjectNode)givenAnswers.get(i)).getIntValue(\"correct\") != 1) {\n return 0;\n }\n }\n\n // Secondly check if all the correct answers are given\n for (int i=0; i<goodAnswers.size(); i++) {\n if (((MMObjectNode)goodAnswers.get(i)).getIntValue(\"correct\") == 1) {\n if (!givenAnswers.contains(goodAnswers.get(i))) {\n return 0;\n }\n }\n }\n\n // ALl tests succeeded: answer is correct\n return 1;\n }", "public boolean askQuestion(Question curentQuestion, int level) {\n this.level = level;\n System.out.println(\"Die \"+(1+level)*100+\" Euro Frage!\");\n System.out.println(curentQuestion.getQuestion());\n //Sets the position of the right answer so it will be random\n int positionCorrectAnswer = (int) (Math.random() * ((curentQuestion.getWrongAnswers().size()) + 1));\n curentQuestion.getWrongAnswers().add(positionCorrectAnswer, curentQuestion.getCorrectAnswer());\n for (int j = 0; j < curentQuestion.getWrongAnswers().size(); j++) {\n System.out.println(\"\\t\" + (1 + j) + \". \" + curentQuestion.getWrongAnswers().get(j));\n }\n int amountOfAnswers = curentQuestion.getWrongAnswers().size();\n if (joker) {\n System.out.println(\"\\t5. 50:50 Joker\");\n amountOfAnswers = 5;\n\n }\n return getUserInput(amountOfAnswers, positionCorrectAnswer, curentQuestion);\n\n }", "private void startQuiz()\n\t{\n\t\tSystem.out.println(\"Enter the number of rounds : \");\n\t\tnoOfRounds = Utilities.scan.nextByte();\n\t\tSystem.out.println(\"Enter the time for asking question: \");\n\t\tquestionTimelimitInSeconds = Utilities.scan.nextInt();\n\t\tSystem.out.println(\"Enter the time for answering the question: \");\n\t\tAnswerTimeLimitInSeconds = Utilities.scan.nextInt();\n\t\t\n\t\t/*\n\t\t * Clean the server buffer so that all the previous packets which are accumulated in the buffer are destroyed!\n\t\t */\n\t\tSystem.out.println(\"Cleaning the server buffer\\n\");\n\t\tcleanServerBuffer();\n\t\t\n\t\tint questionSeqNo = 1234;\n\t\t\n\t\tfor(int i=0;i<noOfRounds;i++)\n\t\t{\n\t\t\t/*\n\t\t\t * Rounds\n\t\t\t */\n\t\t\tfor (int j=0;j<groups.size();j++)\n\t\t\t{\n\t\t\t\t/*\n\t\t\t\t * Turns\n\t\t\t\t */\n\t\t\t\tGroup g = groups.get(j);\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Sending the quiz start packet to the group \"+j+\" ! \");\n\t\t\t\tsendInterfacePacketBCast(g);\n\t\t\t\t/*\n\t\t\t\t * \n\t\t\t\t * Now receive the questions from active group\n\t\t\t\t */\n\t\t\t\t// Start the timer for question session\n\t\t\t\tString answer = receiveAndSendQuestions(questionSeqNo,g);\n\t\t\t\tSystem.out.println(\"\\nRecvd question!!\\n\");\n\t\t\t\tif( answer == null )\n\t\t\t\t{\n\t\t\t\t\t/*\n\t\t\t\t\t * No question is formed, make next group as active\n\t\t\t\t\t */\n\t\t\t\t\tSystem.out.println(\"OMG!!!!!!!!!!!!!!!!!!!!!!!!11\");\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tArrayList<String> answeredStuds = getResponses(questionSeqNo, answer);\n\t\t\t\tcalculateMarks(answeredStuds, groups, j);\n\t\t\t\tquestionSeqNo++;\n\t\t\t\tcleanBuffer();\n\t\t\t}\n\t\t}\n\t}", "public int isnanswercorrect(int M, int userin) {\n\t\t\t\t\tint j = 0;\n\t\t\t\t\tint random = rand.nextInt(4);\n\t\t\t\t\tif(userin == M) {\n\t\t\t\t\t\t//display a random positive message if the student provides a correct response\n\t\t\t\t\t\tdisplayCorrectResponse(random);\n\t\t\t\t\t\tj = 1;\n\t\t\t\t\t\treturn j;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t//display a random negative message if the student provides an incorrect response\n\t\t\t\t\t\tdisplayInorrectResponse(random);\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t\t}", "public void showCorrectAnswers() {\n holders.forEach(QuizViewHolder::showCorrectAnswer);\n }", "private void checkFinish() {\n if (qid < numberOfQuestions) {\n if (bolRandom) {\n currentQ = quesList.get(qid);\n }else if (Chapter1) {\n currentQ = Chapter1List.get(qid);\n }else if (Chapter2) {\n currentQ = Chapter2List.get(qid);\n }else if (Chapter3) {\n currentQ = Chapter3List.get(qid);\n }else if (Chapter4){\n currentQ = Chapter4List.get(qid);\n }else if (Chapter5){\n currentQ = Chapter5List.get(qid);\n }else if (Chapter6){\n currentQ = Chapter6List.get(qid);\n }else if (Chapter7){\n currentQ = Chapter7List.get(qid);\n }else if (Chapter8){\n currentQ = Chapter8List.get(qid);\n }else if (Chapter9){\n currentQ = Chapter9List.get(qid);\n }else if (Chapter10){\n currentQ = Chapter10List.get(qid);\n }else if (Chapter11){\n currentQ = Chapter11List.get(qid);\n }\n setQuestionView();\n } else {\n Intent intent = new Intent(MainActivity.this, GradeActivity.class);\n Bundle b = new Bundle();\n b.putInt(\"score\", score); //Your score\n intent.putExtras(b); //Put your score to your next Intent\n startActivity(intent);\n finish();\n }\n\n }", "public void submitAnswers(View view) {\n\n // Question one\n // Get String given in the first EditText field and turn it into lower case\n EditText firstAnswerField = (EditText) findViewById(R.id.answer_one);\n Editable firstAnswerEditable = firstAnswerField.getText();\n String firstAnswer = firstAnswerEditable.toString().toLowerCase();\n\n // Check if the answer given in the first EditText field is correct and if it is, add one\n // point\n if (firstAnswer.contains(\"baltic\")) {\n points++;\n }\n\n // Question two\n // Get String given in the second EditText field and turn it into lower case\n EditText secondAnswerField = (EditText) findViewById(R.id.answer_two);\n Editable secondAnswerEditable = secondAnswerField.getText();\n String secondAnswer = secondAnswerEditable.toString().toLowerCase();\n\n // Check if the answer given in the second EditText field is correct and if it is, add one\n // point\n if (secondAnswer.contains(\"basketball\")) {\n points++;\n }\n\n // Question three\n // Check if the correct answer is given\n RadioButton thirdQuestionCorrectAnswer = (RadioButton)\n findViewById(R.id.question_3_radio_button_3);\n boolean isThirdQuestionCorrectAnswer = thirdQuestionCorrectAnswer.isChecked();\n // If the correct answer is given, add one point\n if (isThirdQuestionCorrectAnswer) {\n points++;\n }\n\n // Question four\n // Check if the correct answer is given\n RadioButton fourthQuestionCorrectAnswer = (RadioButton)\n findViewById(R.id.question_4_radio_button_2);\n boolean isFourthQuestionCorrectAnswer = fourthQuestionCorrectAnswer.isChecked();\n\n // If the correct answer is given, add one point\n if (isFourthQuestionCorrectAnswer) {\n points++;\n }\n\n // Question five\n // Find check boxes\n CheckBox fifthQuestionCheckBoxOne = (CheckBox) findViewById(R.id.question_5_check_box_1);\n\n CheckBox fifthQuestionCheckBoxTwo = (CheckBox) findViewById(R.id.question_5_check_box_2);\n\n CheckBox fifthQuestionCheckBoxThree = (CheckBox) findViewById(R.id.question_5_check_box_3);\n\n CheckBox fifthQuestionCheckBoxFour = (CheckBox) findViewById(R.id.question_5_check_box_4);\n\n // If correct answers are given, add one point,\n // if incorrect answers are given, do not add points\n\n if (fifthQuestionCheckBoxThree.isChecked() && fifthQuestionCheckBoxFour.isChecked()\n && !fifthQuestionCheckBoxOne.isChecked() && !fifthQuestionCheckBoxTwo.isChecked()){\n points++;\n }\n\n // Question six\n // Find check boxes\n CheckBox sixthQuestionCheckBoxOne = (CheckBox) findViewById(R.id.question_6_check_box_1);\n\n CheckBox sixthQuestionCheckBoxTwo = (CheckBox) findViewById(R.id.question_6_check_box_2);\n\n CheckBox sixthQuestionCheckBoxThree = (CheckBox) findViewById(R.id.question_6_check_box_3);\n\n CheckBox sixthQuestionCheckBoxFour = (CheckBox) findViewById(R.id.question_6_check_box_4);\n\n // If correct answers are given, add one point,\n // if incorrect answers are given, do not add points\n if (sixthQuestionCheckBoxOne.isChecked() && sixthQuestionCheckBoxTwo.isChecked()\n && sixthQuestionCheckBoxFour.isChecked() && !sixthQuestionCheckBoxThree.isChecked()){\n points++;\n }\n\n // If the user answers all questions correctly, show toast message with congratulations\n if (points == 6){\n Toast.makeText(this, \"Congratulations! You have earned 6 points.\" +\n \"\\n\" + \"It is the maximum number of points in this quiz.\",\n Toast.LENGTH_SHORT).show();\n }\n\n // If the user does not answer all questions correctly, show users's points, total points\n // possible and advise to check answers\n else {\n Toast.makeText(this, \"Your points: \" + points + \"\\n\" + \"Total points possible: 6\" +\n \"\\n\" + \"Check your answers or spelling again.\", Toast.LENGTH_SHORT).show();\n }\n\n // Reset points to 0\n points = 0;\n }", "public Boolean questionDone() {\n Boolean questionDone = true;\n for (Boolean currentTeam : teamHasAnswered.values()) questionDone = questionDone && currentTeam;\n return questionDone;\n }", "public static void quizz(int nbOfQuestions)\n {\n \tgenerateQuizz(nbOfQuestions);\n Scanner sc = new Scanner(System.in);\n System.out.println(\"Début du quizz : \");\n for(int i = 0; i < nbOfQuestions; i++)\n {\n System.out.println(\"Question \" +(i+1) + \" : \"+nb1[i]+\" + \"+nb2[i]+ \" = ?\");\n answer[i] = sc.nextInt();\n \n if(answer[i] == nb1[i] + nb2[i])\n {\n System.out.println(\"You rock !\");\n }\n else\n {\n System.out.println(\"Too bad ! Here's the answer : \" +(nb1[i]+nb2[i]));\n }\n }\n }", "private void settingQuestion() {\n\n int[] setWord = {0, 0, 0, 0, 0};\n int[] setPos = {0, 0, 0, 0};\n int[] setBtn = {0, 0, 0, 0};\n\n Random ans = new Random();\n int wordNum = ans.nextInt(vocabularyLesson.size());\n //answer = vocabularyLesson.get(wordNum).getMean();\n word = vocabularyLesson.get(wordNum).getWord();\n vocabularyID = vocabularyLesson.get(wordNum).getId();\n answer = word;\n\n Practice practice = pc.getPracticeById(vocabularyID);\n if (practice != null) {\n Log.d(\"idVocabulary\", practice.getSentence());\n question.setText(practice.getSentence());\n }\n\n\n // Random position contain answer\n setWord[wordNum] = 1;\n Random p = new Random();\n int pos = p.nextInt(4);\n if (pos == 0) {\n word1.setText(word);\n setBtn[0] = 1;\n }\n if (pos == 1) {\n word2.setText(word);\n setBtn[1] = 1;\n }\n if (pos == 2) {\n word3.setText(word);\n setBtn[2] = 1;\n }\n if (pos == 3) {\n word4.setText(word);\n setBtn[3] = 1;\n }\n setPos[pos] = 1;\n\n // Random 3 position contain 3 answer\n for (int i = 0; i < 3; i++) {\n Random ques = new Random();\n int num = ques.nextInt(5);\n int p1 = ques.nextInt(4);\n while (setWord[num] == 1 || setPos[p1] == 1) {\n num = ques.nextInt(5);\n p1 = ques.nextInt(4);\n }\n String wordIncorrect = vocabularyLesson.get(num).getWord();\n setWord[num] = 1;\n setPos[p1] = 1;\n if (setBtn[p1] == 0 && p1 == 0) {\n word1.setText(wordIncorrect);\n setBtn[0] = 1;\n }\n if (setBtn[p1] == 0 && p1 == 1) {\n word2.setText(wordIncorrect);\n setBtn[1] = 1;\n }\n if (setBtn[p1] == 0 && p1 == 2) {\n word3.setText(wordIncorrect);\n setBtn[2] = 1;\n }\n if (setBtn[p1] == 0 && p1 == 3) {\n word4.setText(wordIncorrect);\n setBtn[3] = 1;\n }\n }\n\n }", "@FXML\n\tprivate void answerQuestion() {\n\t\tint correctAnsID = 0;\n\t\ttry {\n\t\t\tswitch (((RadioButton) answerGroup.getSelectedToggle()).getId()) {\n\t\t\tcase \"ans1Check\":\n\t\t\t\tcorrectAnsID = 1;\n\t\t\t\tbreak;\n\t\t\tcase \"ans2Check\":\n\t\t\t\tcorrectAnsID = 2;\n\t\t\t\tbreak;\n\t\t\tcase \"ans3Check\":\n\t\t\t\tcorrectAnsID = 3;\n\t\t\t\tbreak;\n\t\t\tcase \"ans4Check\":\n\t\t\t\tcorrectAnsID = 4;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\terrorLabel.setVisible(true);\n\t\t}\n\n\t\t// nothing is selected\n\t\tif (correctAnsID == 0) { \n\t\t\terrorLabel.setVisible(true);\n\t\t\t// correct answer\n\t\t} else if (question.getCorrect_ans() == correctAnsID) {\n\t\t\tcontrol.setScore(control.getScore() + question.getScore());\n\t\t\thandleAlertAndWindow(AlertType.INFORMATION, \"Congrats! :D\",\n\t\t\t\t\t\"You received \" + question.getScore() + \" points\");\n\t\t\t// wrong answer\n\t\t} else {\n\t\t\tcontrol.setScore(control.getScore() + question.getPenalty());\n\n\t\t\thandleAlertAndWindow(AlertType.ERROR, \"Uh oh! :(\",\n\t\t\t\t\t\"You lost \" + question.getPenalty() + \" points\");\n\t\t}\n\n\t\t// reset the eaten question\n\t\tViewLogic.playGameController.getControl().setQuestionEaten(null);\n\t}", "public int searchCorrectAnswer() {\n\t\tint correctAnswerNum = 0; \n\t\tboolean correctAnswer = false;\n\t\tfor(int answerNum = 1; answerNum < 5; answerNum++) {\n\t\t\tcorrectAnswer = testGenerator.isAnswerCorrect(questionNo, answerNum);\n\t\t\tif(correctAnswer) {\n\t\t\t\tcorrectAnswerNum = answerNum;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn correctAnswerNum;\n\t}", "private void checkMultipleChoice(){\n \t\t\t\n \t\t\t// this is the answer string containing all the checked answers\n \t\t\tString answer = \"\";\n \t\t\t\t\n \t\t\tif(checkboxLayout.getChildCount()>=1){\n \t\t\t\n \t\t\t\t// iterate through the child check box elements of the linear view\n \t\t\t\tfor (int i = 0; i < checkboxLayout.getChildCount();i++){\n \t\t\t\t\t\n \t\t\t\t\tCheckBox choiceCheckbox = (CheckBox) checkboxLayout.getChildAt(i);\n \t\t\t\t\t\n \t\t\t\t\t// if that check box is checked, its answer will be stored\n \t\t\t\t\tif (choiceCheckbox.isChecked()){\n \t\t\t\t\t\t\n \t\t\t\t\t\tString choiceNum = choiceCheckbox.getTag().toString();\n \t\t\t\t\t\tString choiceText = choiceCheckbox.getText().toString();\n \t\t\t\t\t\t\n \t\t\t\t\t\t// append the answer to the answer text string\n \t\t\t\t\t\tif (i == checkboxLayout.getChildCount()-1)answer = answer + choiceNum +\".\" + choiceText;\n \t\t\t\t\t\telse{ answer = answer + choiceNum +\".\"+ choiceText + \",\"; }\n \t\t\t\t\t\t\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\t\n \t\t\t//setting the response for that survey question\n \t\t\teventbean.setChoiceResponse(answer);\n \t\t\t\n \t\t\t}\n \t\t}", "boolean hasCorrectAnswer();", "private boolean verifyMessagePresence(){\n boolean overallResult = true;\n \n for(int ii = 0; ii < 3; ii = ii +1){\n if(121 == getHidden(ii)){\n overallResult = true;\n }else{\n overallResult = false;\n }\n }\n \n return overallResult;\n }", "private void study(String studyToolId) {\n String[][] questionsAndAnswers = studyToolManager.fetchQuestionsAndAnswers(studyToolId);\n String templateId = studyToolManager.getStudyToolTemplateId(studyToolId);\n TemplateManager.TemplateType templateType = templateManager.getTemplateType(Integer.parseInt(templateId));\n List<Object> timeInfo = templateManager.getTimeInfo(templateId);\n boolean isTimed = (Boolean) timeInfo.get(0);\n boolean isTimedPerQuestion = (Boolean) timeInfo.get(1);\n long timeLimitInMS = 1000 * (Integer) timeInfo.get(2);\n long quizStartTime = System.currentTimeMillis();\n int total_score = questionsAndAnswers.length;\n int curr_score = 0;\n Queue<String[]> questionsToRepeat = new LinkedList<>();\n AnswerChecker answerChecker = studyToolManager.getAnswerChecker(studyToolId);\n for (String[] qa : questionsAndAnswers) {\n long questionStartTime = System.currentTimeMillis();\n studyToolDisplayer.displayAQuestion(qa);\n regularPresenter.getAnswerPrompter(templateType);\n String answer = scanner.nextLine();\n boolean correctness = answerChecker.isCorrectAnswer(answer, qa[1]);\n if (templateType.equals(TemplateManager.TemplateType.FC) && !correctness) {\n // TODO: make this depend on template's configuration\n questionsToRepeat.add(qa);\n }\n long questionTimeElapsed = System.currentTimeMillis() - questionStartTime;\n if (isTimed && isTimedPerQuestion && (questionTimeElapsed >= timeLimitInMS)) {\n regularPresenter.ranOutOfTimeReporter();\n } else {\n curr_score += (correctness ? 1 : 0);\n regularPresenter.correctnessReporter(correctness);\n }\n regularPresenter.pressEnterToShowAnswer();\n scanner.nextLine();\n studyToolDisplayer.displayAnAnswer(qa);\n }\n //FC only, for repeating wrong questions until all is memorized\n while (!questionsToRepeat.isEmpty()) {\n String[] qa = questionsToRepeat.poll();\n studyToolDisplayer.displayAQuestion(qa);\n regularPresenter.getAnswerPrompter(templateType);\n String answer = scanner.nextLine();\n boolean correctness = answerChecker.isCorrectAnswer(answer, qa[1]);\n if (!correctness) {\n questionsToRepeat.add(qa);\n }\n regularPresenter.correctnessReporter(correctness);\n regularPresenter.pressEnterToShowAnswer();\n studyToolDisplayer.displayAnAnswer(qa);\n }\n long quizTimeElapsed = System.currentTimeMillis() - quizStartTime;\n if (isTimed && !isTimedPerQuestion && (quizTimeElapsed >= timeLimitInMS)){\n regularPresenter.ranOutOfTimeReporter();\n }\n else if (templateManager.isTemplateScored(templateId)) {\n String score = curr_score + \"/\" + total_score;\n regularPresenter.studySessionEndedReporter(score);\n }\n }", "public static int numberOfQuestions(int selection)\n\t{\n\t\t\tselection+=1;\n\t\t\tint i=0, size=0;\t\t\t\n\t\t\tquestionsExists = false;\n\n\t\t\twhile(i < questionDetails.get(0).size())\n\t\t\t{\n\t\t\t\t//uses the topic number which was passed down and looks for matches\n\t\t\t\tif(questionDetails.get(0).get(i).equals(selection+\"\"))\n {\n\t\t\t\t\tsize++; \n\t\t\t\t\tquestionsExists = true;\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t\treturn size;\n\t}", "private void answerYesOrNo() {\n List<String> Yes = additionalDB.get(\"Yes\");\n List<String> No = additionalDB.get(\"No\");\n if (random.nextBoolean())\n \tresponsesList.add(new Response(getRandomElementFromList(Yes)));\n else responsesList.add(new Response(getRandomElementFromList(No)));\n }", "private boolean checkQuestion5() {\n chkBox1_Q5 = (CheckBox) findViewById(R.id.chkBox1_Q5);\n chkBox2_Q5 = (CheckBox) findViewById(R.id.chkBox2_Q5);\n chkBox3_Q5 = (CheckBox) findViewById(R.id.chkBox3_Q5);\n if (chkBox1_Q5.isChecked() && chkBox2_Q5.isChecked() && !chkBox3_Q5.isChecked()) {\n return true;\n }\n return false;\n }", "public void checkAnswerOne() {\n RadioGroup ans1 = findViewById(R.id.radio_gr_q1);\n int radioButtonId = ans1.getCheckedRadioButtonId();\n\n if (radioButtonId == R.id.a2_q1) {\n points++;\n }\n }", "public boolean getIsValidInquiryAttempt() {\r\n if (getInvalidCardErrorCount() >= getMaxNumErrorsPerSession()) {\r\n if (getInvalidCardErrorCount() == getMaxNumErrorsPerSession()) {\r\n getGiftCardLogger().logActivity(getCurrentUserIP(), \"GIFT CARD INQUIRY\");\r\n setInvalidCardErrorCount(getInvalidCardErrorCount() + 1);\r\n }\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n }", "@Override\r\n\t\t\t\tpublic void onClick(View v) {\n\t \t checkAnswer(1);\r\n\t\t\t \r\n\t\t\t\t \tcurrentQ=quesListSci.get(qidSci);\r\n\t\t\t\t \tif(qidSci==46){\r\n\t\t\t\t \t QuizActivitySci.this.showDialog(RUN_OUT);\r\n\t\t\t\t \t \r\n\t\t\t\t }\r\n\t\t\t\t\t if(qMon%2==0 & qMon%3==0){\r\n\t\t\t\t\t\t QuizActivitySci.this\r\n\t\t\t\t\t\t .showDialog(SCORE_DIALOG);\r\n\t\t\t\t\t\t qlvl++;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t }else{\r\n\t\t\t\t\t\t setQuestionView();\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t }\r\n\t\t\t\t\t \r\n\t\t\t\t\t \r\n\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t}", "public void submit (View view) {\n score = 0;\n optionOne = findViewById(R.id.option_one);\n int idOne = optionOne.getCheckedRadioButtonId();\n //to check if the radio group was not checked so as to alert the user\n if (idOne == -1) {\n TextView targetView = findViewById(R.id.question_one);\n targetView.getParent().requestChildFocus(targetView, targetView);\n Toast.makeText(this, R.string.quest_one_err, Toast.LENGTH_SHORT).show();\n return;\n }\n // And if it is checked, score is updated\n if (idOne == R.id.option_one_d) {\n score += 1;\n }\n\n optionTwo = findViewById(R.id.option_two);\n int idTwo = optionTwo.getCheckedRadioButtonId();\n if (idTwo == -1) {\n TextView targetView = findViewById(R.id.question_two);\n targetView.getParent().requestChildFocus(targetView, targetView);\n Toast.makeText(this, R.string.quest_two_err, Toast.LENGTH_SHORT).show();\n return;\n }\n if (idTwo == R.id.option_two_b) {\n score += 1;\n }\n\n optionThree = findViewById(R.id.option_three);\n int idThree = optionThree.getCheckedRadioButtonId();\n if (idThree == -1) {\n TextView targetView = findViewById(R.id.question_three);\n targetView.getParent().requestChildFocus(targetView, targetView);\n Toast.makeText(this, R.string.quest_three_err, Toast.LENGTH_SHORT).show();\n return;\n }\n if (idThree == R.id.option_three_c) {\n score += 1;\n }\n\n questionFourAns = findViewById(R.id.question_four_ans);\n //To check if the edit text field is empty so as to alert the user\n if (TextUtils.isEmpty(questionFourAns.getText().toString().trim())) {\n TextView targetView = findViewById(R.id.question_four);\n targetView.getParent().requestChildFocus(targetView, targetView);\n Toast.makeText(this, R.string.quest_four_err, Toast.LENGTH_SHORT).show();\n return;\n }\n //Else, score is updated\n if (questionFourAns.getText().toString().equalsIgnoreCase(getString(R.string.question_four_correct_ans))) {\n score += 1;\n }\n\n questionFiveAns = findViewById(R.id.question_five_ans);\n if (TextUtils.isEmpty(questionFiveAns.getText().toString().trim())) {\n TextView targetView = findViewById(R.id.question_five);\n targetView.getParent().requestChildFocus(targetView, targetView);\n Toast.makeText(this, R.string.quest_five_err, Toast.LENGTH_SHORT).show();\n return;\n }\n if (questionFiveAns.getText().toString().equalsIgnoreCase(getString(R.string.question_five_correct_ans))) {\n score += 1;\n }\n\n optionSixA = findViewById(R.id.option_six_a);\n optionSixB = findViewById(R.id.option_six_b);\n optionSixC = findViewById(R.id.option_six_c);\n optionSixD = findViewById(R.id.option_six_d);\n optionSixE = findViewById(R.id.option_six_e);\n boolean sixA = optionSixA.isChecked();\n boolean sixB = optionSixB.isChecked();\n boolean sixC = optionSixC.isChecked();\n boolean sixD = optionSixD.isChecked();\n boolean sixE = optionSixE.isChecked();\n //To check if none of the checkboxes is checked so as to alert the user\n if (!sixA && !sixB && !sixC && !sixD && !sixE) {\n TextView targetView = findViewById(R.id.question_six);\n targetView.getParent().requestChildFocus(targetView, targetView);\n Toast.makeText(this, R.string.quest_six_err, Toast.LENGTH_SHORT).show();\n return;\n }\n // Else update score\n if (!sixA && sixB && !sixC && sixD && !sixE) {\n score += 1;\n }\n\n optionSevenA = findViewById(R.id.option_seven_a);\n optionSevenB = findViewById(R.id.option_seven_b);\n optionSevenC = findViewById(R.id.option_seven_c);\n optionSevenD = findViewById(R.id.option_seven_d);\n optionSevenE = findViewById(R.id.option_seven_e);\n boolean sevenA = optionSevenA.isChecked();\n boolean sevenB = optionSevenB.isChecked();\n boolean sevenC = optionSevenC.isChecked();\n boolean sevenD = optionSevenD.isChecked();\n boolean sevenE = optionSevenE.isChecked();\n if (!sevenA && !sevenB && !sevenC && !sevenD && !sevenE) {\n TextView targetView = findViewById(R.id.question_seven);\n targetView.getParent().requestChildFocus(targetView, targetView);\n Toast.makeText(this, R.string.quest_seven_err, Toast.LENGTH_SHORT).show();\n return;\n }\n if (!sevenA && sevenB && !sevenC && !sevenD && sevenE) {\n score += 1;\n }\n\n optionEightA = findViewById(R.id.option_eight_a);\n optionEightB = findViewById(R.id.option_eight_b);\n optionEightC = findViewById(R.id.option_eight_c);\n optionEightD = findViewById(R.id.option_eight_d);\n optionEightE = findViewById(R.id.option_eight_e);\n boolean eightA = optionEightA.isChecked();\n boolean eightB = optionEightB.isChecked();\n boolean eightC = optionEightC.isChecked();\n boolean eightD = optionEightD.isChecked();\n boolean eightE = optionEightE.isChecked();\n if (!eightA && !eightB && !eightC && !eightD && !eightE) {\n TextView targetView = findViewById(R.id.question_eight);\n targetView.getParent().requestChildFocus(targetView, targetView);\n Toast.makeText(this, R.string.quest_eight_err, Toast.LENGTH_SHORT).show();\n return;\n }\n if (!eightA && !eightB && !eightC && eightD && !eightE) {\n score += 1;\n }\n\n optionNineA = findViewById(R.id.option_nine_a);\n optionNineB = findViewById(R.id.option_nine_b);\n optionNineC = findViewById(R.id.option_nine_c);\n optionNineD = findViewById(R.id.option_nine_d);\n optionNineE = findViewById(R.id.option_nine_e);\n boolean nineA = optionNineA.isChecked();\n boolean nineB = optionNineB.isChecked();\n boolean nineC = optionNineC.isChecked();\n boolean nineD = optionNineD.isChecked();\n boolean nineE = optionNineE.isChecked();\n if (!nineA && !nineB && !nineE && !nineC && !nineD) {\n TextView targetView = findViewById(R.id.question_nine);\n targetView.getParent().requestChildFocus(targetView, targetView);\n Toast.makeText(this, R.string.quest_nine_err, Toast.LENGTH_SHORT).show();\n return;\n }\n if (nineA && nineB && nineE && !nineC && !nineD) {\n score += 1;\n }\n\n optionTenA = findViewById(R.id.option_ten_a);\n optionTenB = findViewById(R.id.option_ten_b);\n optionTenC = findViewById(R.id.option_ten_c);\n optionTenD = findViewById(R.id.option_ten_d);\n optionTenE = findViewById(R.id.option_ten_e);\n boolean tenA = optionTenA.isChecked();\n boolean tenB = optionTenB.isChecked();\n boolean tenC = optionTenC.isChecked();\n boolean tenD = optionTenD.isChecked();\n boolean tenE = optionTenE.isChecked();\n if (!tenA && !tenB && !tenC && !tenD && !tenE) {\n TextView targetView = findViewById(R.id.question_ten);\n targetView.getParent().requestChildFocus(targetView, targetView);\n Toast.makeText(this, R.string.quest_ten_err, Toast.LENGTH_SHORT).show();\n return;\n }\n if (tenA && !tenB && !tenC && !tenD && !tenE) {\n score += 1;\n }\n\n // Displays a toast for the score\n Toast.makeText(MainActivity.this, getString(R.string.result, score), Toast.LENGTH_LONG).show();\n // Displays a toast message based on the user's performance\n if (score > 7) {\n Toast.makeText(MainActivity.this, getString(R.string.fabulous), Toast.LENGTH_SHORT).show();\n } else if (score >= 5 && score <= 7) {\n Toast.makeText(MainActivity.this, getString(R.string.good_job), Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(MainActivity.this, getString(R.string.try_again), Toast.LENGTH_SHORT).show();\n }\n\n // Sets the switch view visible and ensures it's off\n mySwitch = findViewById(R.id.switch1);\n mySwitch.setChecked(false);\n mySwitch.setVisibility(View.VISIBLE);\n mySwitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n\n /** This method allows the user to receive a mail of the result if the switch is on\n * It also ensures that the name and email fields are filled and then sends an intent\n * to a mail app with a summary of the result\n */\n @Override\n public void onCheckedChanged(CompoundButton compoundButton, boolean isChecked) {\n // When the switch is on\n if (isChecked) {\n name = findViewById(R.id.name_editText);\n String nameOfUser = name.getText().toString();\n email = findViewById(R.id.email_editText);\n String[] address = {email.getText().toString()};\n String msg = returnMessage();\n //To check if the name edit text field is empty so as to alert the user\n if (TextUtils.isEmpty(name.getText().toString().trim())) {\n TextView targetView = name;\n targetView.getParent().requestChildFocus(targetView, targetView);\n Toast.makeText(MainActivity.this, R.string.name_err, Toast.LENGTH_SHORT).show();\n mySwitch.setChecked(false);\n return;\n }\n //To check if the email edit text field is empty so as to alert the user\n if (TextUtils.isEmpty(email.getText().toString().trim())) {\n TextView targetView = name;\n targetView.getParent().requestChildFocus(targetView, targetView);\n Toast.makeText(MainActivity.this, R.string.email_err, Toast.LENGTH_SHORT).show();\n mySwitch.setChecked(false);\n return;\n }\n // Sends an intent to a mail app with the necessary details\n Intent intent = new Intent(Intent.ACTION_SENDTO);\n intent.setData(Uri.parse(\"mailto:\"));\n intent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.result_email_subject, nameOfUser));\n intent.putExtra(Intent.EXTRA_EMAIL, address);\n intent.putExtra(Intent.EXTRA_TEXT, msg);\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivity(intent);\n }\n }\n }\n });\n }", "private void checkAnswer(boolean userPressedTrue) {\n boolean answerIsTrue = questions[mCurrentIndex].isAnswerTrue();\n int messageResId = 0;\n if (answerIsTrue == userPressedTrue) {\n messageResId = R.string.correct_toast;\n correct++;\n } else {\n messageResId = R.string.incorrect_toast;\n }\n Toast.makeText(QuizActivity.this, messageResId, Toast.LENGTH_SHORT).show();\n }", "@Test(expected = AnswerException.class)\n public void questionNotMatchTest()throws Exception{\n Mockito.when(paperAnswerRepository.getMaxTimes(1L,1L)).thenReturn(Optional.of(2));\n Mockito.when(paperService.getPaperInfo(1L,1L)).thenReturn(paper);\n Mockito.when(userService.getUserInfo(1L)).thenReturn(user);\n Mockito.when(courseService.getCourseInfo(1L)).thenReturn(course);\n PaperAnswer paperAnswer1 = new PaperAnswer();\n PaperAnswerPrimaryKey paperAnswerPrimaryKey = new PaperAnswerPrimaryKey(user,paper,2);\n paperAnswer1.setPaperAnswerPrimaryKey(paperAnswerPrimaryKey);\n paperAnswer1.setState(PaperAnswerState.FINISHED);\n Mockito.when(paperAnswerRepository.getOne(new PaperAnswerPrimaryKey(user,paper,2))).thenReturn(paperAnswer1);\n Mockito.when(paperAnswerRepository.save(any(PaperAnswer.class))).thenAnswer(i -> i.getArguments()[0]);\n\n Mockito.when(paperRepository.getOne(1L)).thenReturn(paper);\n\n Question question2 = new Question();\n question2.setId(2L);\n Mockito.when(questionRepository.findById(2L)).thenReturn(Optional.of(question2));\n\n QuestionAnswer questionAnswer = new QuestionAnswer(2L,\"A\");\n SubmitAnswerForm submitAnswerForm = new SubmitAnswerForm(List.of(questionAnswer),\"FINISHED\");\n paperAnswerService.submitAnswer(1L,1L,1L,submitAnswerForm);\n\n }", "public boolean InternationalUnlocked() {\n\t\tint count = 0;\n\t\tfor (int category: _answeredQuestions) {\n\t\t\tif (category == 5) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tif (count >= 2) {\n\t\t\t_internationalUnlocked = true;\n\t\t}\n\t\telse {\n\t\t\t_internationalUnlocked = false;\n\t\t}\n\t\tsaveInternationalUnlocked();\n\t\treturn _internationalUnlocked;\n\t}", "private boolean checkQuestion6() {\n chkBox3_Q6 = (CheckBox) findViewById(R.id.chkBox3_Q6);\n chkBox2_Q6 = (CheckBox) findViewById(R.id.chkBox2_Q6);\n chkBox1_Q6 = (CheckBox) findViewById(R.id.chkBox1_Q6);\n if (chkBox3_Q6.isChecked() && !chkBox1_Q6.isChecked() && chkBox2_Q6.isChecked()) {\n return true;\n }\n return false;\n }", "public boolean scoreThisWith(SortingQuiz q) {\r\n boolean succesfullyScored = false;\r\n int answrCount = 0;\r\n \r\n for(int i=1; i<8; i++) {\r\n try {\r\n Answer a = q.answers.get(this.answers.get(i));\r\n this.getScoring().weightAnswer(a);\r\n answrCount += 1;\r\n } catch (NullPointerException e) {\r\n }\r\n }\r\n \r\n if(answrCount == 7) {\r\n succesfullyScored = true;\r\n }\r\n \r\n return succesfullyScored;\r\n }", "public void startOrSubmitButton(View view) {\n Button nextButton = (Button) findViewById(R.id.next_button);\n nextButton.setEnabled(false);\n String solutions[] = getResources().getStringArray(R.array.solutions);\n Button startAndSubmitButton = (Button) findViewById(R.id.start_and_submit_button);\n RadioGroup radioButton = (RadioGroup) findViewById(R.id.radio_group);\n LinearLayout checkGroup = (LinearLayout) findViewById(R.id.check_group);\n EditText inputText = (EditText) findViewById(R.id.input_text);\n\n if (currentQueNum != 0) {\n getUserAnswer();//get the user's answer or response as the instance of submit\n startAndSubmitButton.setEnabled(true);\n for (int i = 0; i < currentQueNum; ++i) {\n if (userAnswer[i].equalsIgnoreCase(solutions[i]))\n score += 1;\n if (userAnswer[i].equalsIgnoreCase(\"skipped\"))\n noOfSkippedQues += 1;\n if (currentQueNum != maxNumOfQues)\n oops = \"\\nYou didn't reach the end of test\";\n }\n disableCheckBox();\n disableInputText();\n disableRadioButtons();\n disableStartOrSubmitButton();\n disableNextButton();\n // give toast of the overall performance\n Toast displayResult = Toast.makeText(getApplicationContext(), userName.toUpperCase() + \" you have score \" + String.valueOf(score) + \"\\nout of \" + String.valueOf(maxNumOfQues) + \" questions attempted.\", Toast.LENGTH_LONG);\n displayResult.show();\n\n //using another activity to display the quiz result and summary\n Intent intent = new Intent(MainActivity.this, QuizSummaryActivity.class);\n intent.putExtra(\"score\", String.valueOf(score));\n intent.putExtra(\"userName\", userName);\n intent.putExtra(\"oops\", oops);\n intent.putExtra(\"noOfSkippedQues\", String.valueOf(noOfSkippedQues));\n intent.putExtra(\"currentQueNum\", String.valueOf(currentQueNum));\n\n startActivity(intent);\n } else {\n currentQueNum += 1;\n radioButton.setVisibility(View.VISIBLE);\n inputText.setVisibility(View.GONE);\n checkGroup.setVisibility(View.GONE);\n String que[] = getResources().getStringArray(R.array.questions);\n TextView questionsPane = (TextView) findViewById(R.id.questions_pane);\n questionsPane.setText(que[currentQueNum - 1]);\n optionsSelect();\n startAndSubmitButton.setText(R.string.submit_button);\n nextButton.setEnabled(true);\n }\n }", "public void beginAskingQuestions() {\n if (players.size() == 0) {\n throw new GameStateInvalidException(\"You can't have a game without players!\");\n }\n setGameState(GameState.AWAITING_ANSWER);\n\n }", "private void detectQuestionType(String userMessage) {\n String firstWord = firstWord(userMessage).toLowerCase();\n List<String> answer;\n if (firstWord.equals(\"where\")) {\n answer = additionalDB.get(\"where\");\n } else if (firstWord.equals(\"when\")) {\n answer = additionalDB.get(\"when\");\n }else {\n \tanswer = additionalDB.get(\"ques\");\n }\n responsesList.add(new Response(getRandomElementFromList(answer)));\n }", "public static void questionnaire() {\n\t\tboolean flag = true;\n\t\tString a = null;\n\t\t//donor's username\n\t\tflag = true;\n\t\tdo {\n\t\t\ttry {\n\t\t\t\tusername = JOptionPane.showInputDialog(null,\"Enter your username: \", \"SIGN UP\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\tif (username.equals(\"null\")) {\n\t\t\t\t\tthrow new NullPointerException();\n\t\t }\n\t\t\t\tflag = false;\n\t\t\t} catch (NullPointerException e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Please enter a username.\", \"ALERT MESSAGE\", JOptionPane.WARNING_MESSAGE);\n\t\t flag = true;\n\t\t\t}\t\n\t\t}while (flag);\n\t\ttry {\n\t\t\tResultSet rs = Messages.connect().executeQuery(\"SELECT * FROM Questionnaire \");\n\t\t\twhile (rs.next()) {\n\t\t\t\tint qid = rs.getInt(\"Q_id\");\n\t\t\t\tString r = rs.getString(\"Question\");\n\t\t\t\tdo {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (qid == 1) {\n\t\t\t\t\t\t\tflag = true;\n \t \t\t\t\t\tObject[] opt = {\"Male\", \"Female\"};\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tint g = JOptionPane.showOptionDialog(null,\"Choose your gender: \", \"SIGN UP\", JOptionPane.YES_NO_OPTION,\n\t\t\t\t\t\t\t\t\t\t\tJOptionPane.PLAIN_MESSAGE, null, opt, null);\n\t\t\t\t\t\t\t\t\tif (g == 0) {\n\t\t\t\t\t\t\t\t\t\tgender = \"male\";\n\t\t\t\t\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t} else if (g == 1){\n\t\t\t\t\t\t\t\t\t\tgender = \"female\";\n\t\t\t\t\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tthrow new NullPointerException();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} catch (NullPointerException e1) {\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please choose your gender\", \"ALERT MESSAGE\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}while (flag);\n\t\t\t\t\t\t\ta = gender;\n\t\t\t\t\t\t} else if (((qid >= 2) && (qid<=12)) || (qid == 14)) {\n\t\t\t\t\t\t\ta = JOptionPane.showInputDialog(null, qid + \". \" + r, \"QUESTIONNAIRE\", JOptionPane.PLAIN_MESSAGE);\n\t\t\t\t\t\t\tif (a.equals(null)) {\n\t\t\t\t\t\t\t\tthrow new NullPointerException();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tint p = JOptionPane.showConfirmDialog(null, qid + \". \" + r, \"QUESTIONNAIRE\", JOptionPane.YES_NO_OPTION, JOptionPane.PLAIN_MESSAGE);\n\t\t\t\t\t\t\ta = String.valueOf(p);\n\t\t\t\t\t\t\tif (p == -1) {\n\t\t\t\t\t\t\t\tthrow new NullPointerException();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\t \t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please insert your answer\", \"ALERT MESSAGE\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\t\t\tflag = true;\n\t\t\t\t\t}\n\t\t\t\t} while (flag);\n\t\t\t\tif (checkQuestion(qid, a) == false) {\n\t\t\t\t\t//delete data from data base\n\t\t\t\t\tint d = Messages.connect().executeUpdate(\"DELETE FROM Answers WHERE B_Username ='\" + username + \"'\");\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"We regret to inform you that you are not compatible as a blood donor.\", \"ALERT MESSAGE\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t} else {\n\t\t\t\t\tinsertAnswers(username, qid, a);\n\t\t\t\t}\n\t\t\t}\n\t\t\trs.close();\n\t\t\tMessages.connect().close();\n\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t}\n\t\t}", "public void addQuestions() {\n\t\tboolean addNewQuestion = true;\n\t\tString text;\n\t\tQuestion q;\n\t\tString promptResponse;\n\t\t\n\t\twhile (addNewQuestion) {\n\t\t\tSystem.out.print(\"Enter question: \");\n\t\t\ttext = System.console().readLine();\n\t\t\tq = new QuestionImpl(questionId, text);\n\t\t\tthis.questionId++;\n\t\t\tq.addAnswers();\n\t\t\tthis.questions.add(q);\n\n\t\t\tSystem.out.print(\"Hit Return to add another question or q to quit: \");\n\t\t\tpromptResponse = System.console().readLine();\n\t\t\tif (promptResponse.equals(\"q\") ||\n\t\t\t\t\tpromptResponse.equals(\"Q\") ||\n\t\t\t\t\tpromptResponse.equals(\"quit\") ||\n\t\t\t\t\tpromptResponse.equals(\"Quit\")) {\n\t\t\t\taddNewQuestion = false;\n\t\t\t}\n\t\t}\n\t}", "public void CheckIfContinued() {\n\t\tString IsContinued = getIntent().getStringExtra(\"Continue\");\n\t\t/*\n\t\t * If IsContinued is null that means that its a new game\n\t\t */\n\t\tif (IsContinued == null) {\n\t\t}\n\t\t/*\n\t\t * If it isnt null that means the game is being Continued. The values of\n\t\t * Question, Score and Correct and then updated to the last save\n\t\t */\n\t\tif (IsContinued != null) {\n\t\t\tQuestion = getPreferences(MODE_PRIVATE).getInt(\"WhatQuestion\", 0);\n\t\t\tScore = getPreferences(MODE_PRIVATE).getInt(\"WhatScore\", 0);\n\t\t\tCorrect = getPreferences(MODE_PRIVATE).getInt(\"HowManyCorrect\", 0);\n\t\t}\n\t\tTextView SetQuestionText = (TextView) findViewById(R.id.textView5);\n\t\tSetQuestionText.setText(\"\" + Question);\n\t}", "public void onClick(View view) {\n quesCounter++;\n if (quesCounter < 4) {\n //returning a feedback saying \"correct answer\" if the user has chosen the correct answer and\n //\"incorrect answer\" otherwise\n if (question[quesNumber].isAnsTrue()) {\n Toast.makeText(TopicQuiz.this, \"Incorrect Answer\", Toast.LENGTH_SHORT).show();\n\n\n } else {\n Toast.makeText(TopicQuiz.this, \"Correct Answer\", Toast.LENGTH_SHORT).show();\n rightQuesCounter++;\n }\n //incrementing quesNumber to move to the next question\n quesNumber++;\n questionTextView.setText(question[quesNumber].getQuesStatement());\n } else {\n if (question[quesNumber].isAnsTrue()) {\n Toast.makeText(TopicQuiz.this, \"Incorrect Answer\", Toast.LENGTH_SHORT).show();\n\n\n } else {\n Toast.makeText(TopicQuiz.this, \"Correct Answer\", Toast.LENGTH_SHORT).show();\n rightQuesCounter++;\n }\n\n //Checking to see if the rightQuesCounter worked or not\n Log.d(TAG, \"You have got \" + rightQuesCounter + \" questions right!\");\n\n //Having an intent to move to the Result screen while passing the rightQuesCounter to get the result\n Intent intent = new Intent(TopicQuiz.this, Result.class);\n intent.putExtra(\"rightQuesCounter\", rightQuesCounter);\n intent.putExtra(\"language\",topic);\n\n\n startActivity(intent);\n }\n }", "public void q4Submit(View view) {\n\n CheckBox checkBox1 = (CheckBox) findViewById(R.id.q4option1cb);\n CheckBox checkBox2 = (CheckBox) findViewById(R.id.q4option2cb);\n CheckBox checkBox3 = (CheckBox) findViewById(R.id.q4option3cb);\n CheckBox checkBox4 = (CheckBox) findViewById(R.id.q4option4cb);\n\n //Nested if statements to check if the answer is correct or not, then to assign 2 points if it's correct.\n if (checkBox1.isChecked() && checkBox2.isChecked() && checkBox3.isChecked() && !checkBox4.isChecked()) {\n if (isNotAnsweredQ4) {\n display(pointCounter += 2);\n Toast.makeText(this, getString(R.string.correct1), Toast.LENGTH_SHORT).show();\n isNotAnsweredQ4 = false;\n }\n } else {\n Toast.makeText(this, getString(R.string.thinkAgain), Toast.LENGTH_SHORT).show();\n }\n }" ]
[ "0.6920762", "0.6764034", "0.631859", "0.6293705", "0.62206703", "0.6139571", "0.608934", "0.6064523", "0.6010772", "0.5993191", "0.5974428", "0.59645915", "0.5944531", "0.5940952", "0.58781254", "0.58693075", "0.5864279", "0.5855386", "0.580729", "0.5806375", "0.57848483", "0.5776799", "0.5749605", "0.5748055", "0.5724115", "0.56613535", "0.5649505", "0.56460327", "0.5643987", "0.56359625", "0.5629643", "0.5614419", "0.5596284", "0.55685115", "0.55439126", "0.55102116", "0.5504975", "0.5498379", "0.54965806", "0.5495481", "0.5493407", "0.54923683", "0.54874516", "0.54815537", "0.54769516", "0.54650646", "0.5458098", "0.5455633", "0.544901", "0.54485613", "0.54351854", "0.54319227", "0.54308814", "0.542887", "0.5426092", "0.5419081", "0.5418022", "0.539613", "0.5386545", "0.5386328", "0.5381746", "0.5379695", "0.53696513", "0.53643715", "0.5351548", "0.53496504", "0.5348797", "0.5341474", "0.53394055", "0.53307194", "0.5327643", "0.5319695", "0.53161705", "0.53097546", "0.5300623", "0.52753866", "0.52730525", "0.52724504", "0.526834", "0.5260483", "0.52553713", "0.52547085", "0.52538264", "0.52448654", "0.52393574", "0.5229192", "0.5227877", "0.5227353", "0.5226846", "0.52263397", "0.5226019", "0.52062494", "0.5202452", "0.5199342", "0.51970416", "0.519519", "0.5194769", "0.5186729", "0.5183127", "0.5182185", "0.5180092" ]
0.0
-1
Checking Rules of the Game.
public SNGTestCases RuleOfTheGame_TC1005() throws InterruptedException{ Login(); waitForVisibilityOf(By.id(commonIdPath + "/subject_image")); List subject = driver.findElements(By.id(commonIdPath + "/subject_image")); ((WebElement) subject.get(0)).click(); waitForVisibilityOf(By.id("com.pointedsquares.gamy5.android:id/info_icon")); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/info_icon")).click(); waitForVisibilityOf(By.xpath("//android.widget.TextView[contains(@resource-id , 'app_info_title')]")); return new SNGTestCases(driver); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean checkRules() {\n for (Rule rule: rules) {\n if (! rule.checkRegel(board)) { //problem with a rule\n return false;\n }\n }\n return true;\n }", "public void checkGame() {\n\n\t}", "private void actOnRules() {\r\n\r\n\t\tfor(String key: myRuleBook.keySet())\r\n\t\t{\r\n\r\n\t\t\tRule rule = myRuleBook.get(key);\r\n\t\t\tSpriteGroup[] obedients = myRuleMap.get(rule);\r\n\r\n\t\t\tif(rule.isSatisfied(obedients))\r\n\t\t\t{\r\n\t\t\t\trule.enforce(obedients);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void checkGameStatus() {\n everyTenthGoalCongrats();\n randomPopUpBecauseICan();\n }", "public void createGame() {\n boolean foundValid = false;\n\n while (! foundValid) {\n createRandomGame();\n foundValid = checkRules();\n }\n\n printBoard();\n }", "private void checkResults() {\n\t\tif (isOver()) {\n\t\t\tfor (GameListener gameListener : gameListeners) {\n\t\t\t\tgameListener.gameOverCallback();\n\t\t\t}\n\t\t}\n\t}", "private boolean checkGameStatus() {\n int res = model.getWinner();\n if (res == Model.DRAW) {\n draw();\n return false;\n } else if (res == Model.WHITE) {\n whiteScore++;\n view.getPrompt().setText(whiteName + \" win!\");\n prepareRestart();\n return false;\n } else if (res == Model.BLACK) {\n blackScore++;\n view.getPrompt().setText(blackName + \" win!\");\n prepareRestart();\n return false;\n }\n return true;\n }", "public void doChecking() {\n \tdoCheckingDump();\n \tdoCheckingMatl();\n }", "public void fireRules() throws Exception {\n if(isRulesFired.compareAndSet(false, true)) {\n this.outcome = new GameOutcome();\n List<Object> ruleInputs = new ArrayList<>();\n ruleInputs.add(player1);\n ruleInputs.add(player2);\n DrlUtilities.fireRulesForScope(SCOPE, ruleInputs, \"outcome\", this.outcome);\n }\n assertNotNull(this.outcome);\n }", "public boolean checkRequirements(PlayerBoard playerBoard);", "public boolean isValid(GameState gameState);", "public void checkGame(){\r\n\t\tif (foodCounter == 0){ // all food is gone, win\r\n\t\t\tSystem.out.println(\"You won!\");\r\n\t\t\t//stops ghosts and pacman\r\n\t\t\tpacman.speed = 0;\r\n\t\t\tg1.speed = 0;\r\n\t\t\tg2.speed = 0;\r\n\t\t\tg3.speed = 0;\r\n\t\t\tlost = true; // return to menu \r\n\t\t}\r\n\t\t// if pacman collide with ghost, lose\r\n\t\tif (collision2(pacmansprite,g1.sprite) || collision2(pacmansprite,g2.sprite) || collision2(pacmansprite,g3.sprite)){\r\n\t\t\tSystem.out.println(\"You lost\");\r\n\t\t\tlost = true;\r\n\t\t}\r\n\t}", "public void checkConditions(){\n\t\t// check game over conditions\n\t\tif(!status.isGameOver() && status.isGameStarted()){\n\t\t\tif(status.getShipsLeft() == 0){\n\t\t\n\t\t\t\tsoundMan.StopMusic3();\n\t\t\t\tsoundMan.StopMusic4();\n\t\t\t\tsoundMan.StopMusic5();\n\t\t\t\tsoundMan.StopMusic6();\n\t\t\t\tsoundMan.BackgroundMusic2();\n\t\t\t\tgameOver();\n\t\t\t\tsoundMan.StopMusic();\n\t\t\t}\n\t\t}\n\t\tif(!status.isGameOver() && status.isBossDestroyed()&& status.isGameStarted()){\n\t\t\tif(status.isBossDestroyed()){\n\t\t\t\tsoundMan.StopMusic5();\n\t\t\t\tsoundMan.BackgroundMusic4();\n\t\t\t\tgameWinner();\n\n\t\t\t}\n\n\t\t}\n\t}", "private void checkGame() {\n if (game.checkWin()) {\n rollButton.setDisable(true);\n undoButton.setDisable(true);\n this.dialogFlag = true;\n if (game.isDraw()) {\n showDrawDialog();\n return;\n }\n if (game.getWinner().getName().equals(\"Computer\")) {\n showLoserDialog();\n return;\n }\n showWinnerDialog(player1);\n }\n }", "public int gameState() {\n \tboolean check = isCheck(turn);\n \t\n \t//change this code to be some sort of checkmate detection\n \tif(check) {\n \t\t//we need to check whether there is a legal move that puts the king out of check\n \t\t//we need to loop through all pieces of the same color as the turn and make all legal moves\n \t\t//then after each move, check whether the king is still in check\n \t\t\n \t\t//first generate a list of all pieces for the turn color\n \t\tArrayList<Piece> pieces = getPieces(turn);\n \t\t\n \t\tboolean freedom;\n \t\t\n \t\t//now for each piece, check whether moving that piece can get the king out of check\n \t\tfor(int i = 0; i < pieces.size(); i++) {\n \t\t\tfreedom = simulate(pieces.get(i));\n \t\t\tif(freedom) {\n \t \t\tupdateCheckMove(false);\n \t \t\tSystem.out.println(\"Check on \" + turn + \" King!\");\n \t\t\t\treturn 2; //if the king can move, then the game isn't over yet\n \t\t\t}\n \t\t}\n \t\t\n \t\t//the game is over if we reach this far, so we can assume checkmate\n \t\t//resignation logic will probably be specific to Display class\n \t\t\n \t\tupdateCheckMove(true);\n \t\t\n \t\tif(turn == PieceColor.White) return -1; //black win if white king in check and can't move\n \t\tif(turn == PieceColor.Black) return 1;\n \t}\n \t\n \t//if all of these fail, the game isn't over yet\n \treturn 2;\n }", "void check_game_state() {\n // Game over\n if (lives <= 0){ // No lives left\n end_game();\n }\n for (Alien alien : aliens){ // Aliens reached bottom of screen\n if (alien.y_position + alien.alien_height >= ship.y_position) {\n end_game();\n break;\n }\n }\n\n // Empty board\n if (aliens.isEmpty()) { // All aliens defeated\n if (level < 3) { // Level up\n level_up();\n alien_setup();\n }\n else { // Victory\n end_game();\n }\n }\n }", "public static void checkResult() {\n\t\tint sum = PlayerBean.PLAYERONE - PlayerBean.PLAYERTWO;\n\n\t\tif (sum == 1 || sum == -2) {\n\t\t\tScoreBean.addWin();\n\t\t\tresult = \"player one wins\";\n\t\t} else {\n\t\t\tScoreBean.addLoss();\n\t\t\tresult = \"player two wins\";\n\t\t}\n\t}", "public boolean check()\n\t{\n\t\tif (kinect.isTracking())\n\t\t{\n\t\t\tboolean result = true;\n\t\t\tfor (int i = 0; i < rules.size(); ++i)\n\t\t\t{\n\t\t\t\tBodyPoseRule rule = rules.get(i);\n\t\t\t\tresult = result && rule.check();\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\treturn false;\n\t}", "void checkRule(String rule) throws IOException;", "private void checkWin() {\n // Check if a dialog is already displayed\n if (!this.gameOverDisplayed) {\n // Check left paddle\n if (Objects.equals(this.scoreL.currentScore, this.winCount) && (this.scoreL.currentScore != 0)) {\n if (twoUser) {\n gameOver(GeneralFunctions.TWO_1_WIN);\n } else {\n gameOver(GeneralFunctions.ONE_LOSE);\n }\n // Right paddle\n } else if (Objects.equals(this.scoreR.currentScore, this.winCount) && (this.scoreR.currentScore != 0)) {\n if (twoUser) {\n gameOver(GeneralFunctions.TWO_2_WIN);\n } else {\n gameOver(GeneralFunctions.ONE_WIN);\n }\n }\n }\n }", "public void checkResult(){\n\t\tif(throwNum == 0){\n\t\t\tthis.firstThrow = this.sumOfDice;\n\t\t}\n\n\t\tif((this.sumOfDice == 7 || this.sumOfDice==11) && throwNum==0){\n\t\t\tthis.game = gameStatus.WON;\n\t\t}\n\t\telse if(this.sumOfDice ==2 || this.sumOfDice== 3 ||this.sumOfDice==12){\n\t\t\tthis.game = gameStatus.LOST;\n\t\t}\n\t\telse if((this.game == gameStatus.CONTINUE && this.sumOfDice == 7)){\n\t\t\tthis.game = gameStatus.LOST;\n\t\t}\n\t\telse if((this.sumOfDice== this.firstThrow) && throwNum!=0){\n\t\t\tthis.game = gameStatus.WON;\n\t\t}\n\t\telse{\n\t\t\tthis.game = gameStatus.CONTINUE;\n\t\t}\n\t}", "private void playGame() {\n\t\tcategoryChosenChecker = new boolean[nPlayers + 1][N_CATEGORIES];\n\t\t// next one is for upper score.\n\t\tupperScore = new int[nPlayers + 1];\n\t\t// for lower score.\n\t\tlowerScore = new int[nPlayers + 1];\n\t\t// and finally, for total score.\n\t\ttotalScore = new int[nPlayers + 1];\n\t\t// here we have for loop, because we want our game to go for\n\t\t// N_SCORING_CATEGORIES times.\n\t\tfor (int i = 0; i < N_SCORING_CATEGORIES; i++) {\n\t\t\t// and here is another for loop, because each player should roll the\n\t\t\t// dice.\n\t\t\tfor (int j = 1; j <= nPlayers; j++) {\n\t\t\t\t// first roll.\n\t\t\t\tfirstRoll(j);\n\t\t\t\t// and the last for loop, because second and third rolls are\n\t\t\t\t// similar and can be written in one method and we want this\n\t\t\t\t// method to happen 2 times.\n\t\t\t\tfor (int k = 1; k <= 2; k++) {\n\t\t\t\t\t// second and third rolls.\n\t\t\t\t\totherRolls();\n\t\t\t\t}\n\t\t\t\t// after rolls, player will choose category.\n\t\t\t\tcategory(j);\n\t\t\t}\n\t\t}\n\t\t// when the game ends program will tell who is the winner.\n\t\twhoIsTheWinner();\n\t}", "@Test\n \tpublic void testCheckingAccusation() {\n \t\t//Set answer\n \t\tSolution answer = new Solution(\"Colonel Mustard\", \"Knife\", \"Library\");\n \t\tSolution guess = new Solution(\"Colonel Mustard\", \"Knife\", \"Library\");\n \t\tgame.setAnswer(answer);\n \t\t//Check correct accusation\n \t\t//correct if it contains the correct person, weapon and room\n \t\tAssert.assertTrue(game.checkAccusation(guess));\n \t\t//Check false accusation\n \t\t//not correct if the room is wrong, or if the person is wrong, if the weapon is wrong, or if all three are wrong\n \t\t//wrong room\n \t\tguess = new Solution(\"Colonel Mustard\", \"Knife\", \"Billiards Room\");\n \t\tAssert.assertFalse(game.checkAccusation(guess));\n \t\t//wrong weapon\n \t\tguess = new Solution(\"Colonel Mustard\", \"Lead Pipe\", \"Library\");\n \t\tAssert.assertFalse(game.checkAccusation(guess));\n \t\t//wrong person\n \t\tguess = new Solution(\"Ms. Peacock\", \"Knife\", \"Library\");\n \t\tAssert.assertFalse(game.checkAccusation(guess));\n \t}", "public static int getRulesPassed(){\r\n\t\treturn rulesPassed;\r\n\t}", "public boolean gameOver(){\r\n if(isGame) return (currentPlayer.getChecks() == 0 || nextPlayer.getChecks() == 0 || currentPlayer.getQueens() == 4 || nextPlayer.getQueens() == 4 || (currentPlayer.cantMove() && nextPlayer.cantMove()));\r\n return getNumChecks(WHITE) == 0 || getNumChecks(BLACK) == 0 || getNumQueens(WHITE) == 4 || getNumQueens(BLACK) == 4;\r\n }", "public static void main(String[] args) {\n String[] players = {\"Player1\",\"Player2\",\"Player3\",\"Player4\"};\n int numPlayers = players.length;\n \n System.out.println(\"Generating Deck and shuffling...\");\n Deck curDeck = new Deck();\n curDeck.generateDeck();\n //curDeck.showDeck();\n curDeck.shuffleDeck();\n \n System.out.println();\n \n Rules ruleBook = new Rules();\n \n ArrayList<Player> playersArray = new ArrayList<Player>();\n System.out.println(\"Creating Players...\");\n for(int i=0;i<numPlayers;i++) {\n playersArray.add(new Player(players[i]));\n playersArray.get(i).dealPlayersCard(curDeck);\n playersArray.get(i).createPlayerMetaData();\n }\n \n \n ArrayList<Player> winnerList = new ArrayList<Player>();\n \n checkForTrailWinners(winnerList,playersArray,ruleBook);\n \n if(winnerList.size()==1) {\n System.out.println(winnerList.get(0).getPlayerName() + \" wins!\");\n return;\n }\n \n checkForSequenceWinner(winnerList,playersArray,ruleBook);\n \n if(winnerList.size()==1) {\n System.out.println(winnerList.get(0).getPlayerName() + \" wins!\");\n return;\n }\n \n checkForPairWinner(winnerList,playersArray,ruleBook);\n \n if(winnerList.size()==1) {\n System.out.println(winnerList.get(0).getPlayerName() + \" wins!\");\n return;\n }\n if(winnerList.size()==0)\n winnerList=playersArray;\n \n ArrayList<Integer> scoreOfPlayers = new ArrayList<Integer>();\n for(int i=0;i<winnerList.size();i++) {\n scoreOfPlayers.add(winnerList.get(i).getPlayerCard(0));\n }\n \n checkForWinner(winnerList,scoreOfPlayers);\n if(winnerList.size()==1)\n return;\n \n // Each player in consideration picks up a card from the deck till winner is declared or deck has no cards\n \n drawCardsAndDeclareWinner(winnerList,curDeck);\n \n \n \n }", "public Rules(Player player) {\n this.player = player;\n categoryCheck = new boolean[13];\n\n\n\n/* For later on\n\n // length i is starting at 0, Category 1 would be 0, and so on.\n for (int i = 0; i < categoryCheck.length;i++) {\n // Counting up to .length = [13]\n // Since i less than, will start 0-12, i is not <= so we -1 from regular categories to match them\n // When returned false and not true, then the category is available for this.player to use\n categoryCheck[i] = false;\n }\n*/\n\n\n //Creating categoryScore to 13 new int's 0-12 in index form\n // We use I as an index just to replicate a for () for temp use in this method\n categoryScore = new int[13];\n for (int i = 0; i < categoryScore.length; i++) {\n categoryScore[i] = 0;\n }\n\n }", "@Override\n\tpublic boolean CheckMovingRules(Board testBoard,int target_x_pos, int target_y_pos) {\n\t\treturn ((target_x_pos-cur_x_pos==1)&&(target_y_pos-cur_y_pos==2))||((target_x_pos-cur_x_pos==2)&&(target_y_pos-cur_y_pos==1))||\n\t\t\t\t((target_x_pos-cur_x_pos==2)&&(target_y_pos-cur_y_pos==-1))||((target_x_pos-cur_x_pos==1)&&(target_y_pos-cur_y_pos==-2))||\n\t\t\t\t((target_x_pos-cur_x_pos==-1)&&(target_y_pos-cur_y_pos==2))||((target_x_pos-cur_x_pos==-1)&&(target_y_pos-cur_y_pos==-2))||\n\t\t\t\t((target_x_pos-cur_x_pos==-2)&&(target_y_pos-cur_y_pos==1))||((target_x_pos-cur_x_pos==-2)&&(target_y_pos-cur_y_pos==-1));\n\t}", "public void check(){\n check1();\n check2();\n check3();\n check4();\n check5();\n check6();\n\t}", "@Override\n\tpublic void check() throws ApiRuleException {\n\t\t\n\t}", "public static void set_checks2(){\n\t\t\n\t\t//Check if difficulty\n\t\n\t\t\t//Check if user is batting\n\t\t\tif(TossBrain.compselect.equals(\"bat\")){\n\t\t\t\tif(PlayArena2.usershot2==PlayArena2.compshot2){\n\t\t\t\t\t\n\t\t\t\t\tcheck_if_factor2=true;}\n\t\t\t\telse if(PlayArena2.usershot2==6 && (PlayArena2.compshot2==2 || PlayArena2.compshot2==3))\n\t\t\t\t\tcheck_if_factor2=true;\n\t\t\t\telse if(PlayArena2.usershot2==4 && (PlayArena2.compshot2==2 ))\n\t\t\t\t\tcheck_if_factor2=true;\n\t\t\t\telse\n\t\t\t\t\tcheck_if_factor2=false;\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(PlayArena2.usershot2==PlayArena2.compshot2){\n\t\t\t\t\t\n\t\t\t\t\tcheck_if_factor2=true;}\n\t\t\t\telse\n\t\t\t\tcheck_if_factor2=false;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t//Wicket?\nif(check_if_factor2){\n\t\t\t\t\n\t\t\t\tcheck_if_wicket2=true;\n\t\t\t\tint temp_wickets=0;\n\t\t\t\t\n\t\t\t\tif(wicket_2==2){\n\t\t\t\t\t\t temp_wickets=3;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Check Striker while wicket fell\n\t\t\tif(temp_wickets!=3)\n\t\t\t{\n\t\t\t\tif(Striker.equals(bat1))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(TossBrain.compselect.equals(\"bat\")){\n\t\t\t\t\t\t\tStriker=PlayBrain1.myteam[++list_pointer];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\tStriker=PlayBrain1.oppteam[++list_pointer];\n\t\t\t\t\t\t\t}\n\t\t\t\t\tbat1=Striker;\n\t\t\t\t\t\n\t\t\t\t//\tSystem.out.println(Striker);\n\t\t\t\t\t//System.out.println(NonStriker);\n\t\t\t\t\t//System.out.println(wicket_1);\n\t\t\t\t}\n\t\t\t\t//Else of Striker\n\t\t\t\telse{\n\t\t\t\t\tif(TossBrain.compselect.equals(\"bat\")){\n\t\t\t\t\t\tStriker=PlayBrain1.myteam[++list_pointer];\n\t\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\tStriker=PlayBrain1.oppteam[++list_pointer];\n\t\t\t\t\t\t}\n\t\t\t\tbat2=Striker;\n\t\t\t\t//System.out.println(Striker);\n\t\t\t\t//System.out.println(NonStriker);\n\t\t\t\t}\n\t\t\t\tif(over_ball_2!=5)\t\n\t\t\t\tcheck_if_strike_change2=false;\n\t\t\t\telse{\n\t\t\t\t\t//System.out.println(\"over strike change\");\n\t\t\t\t\tcheck_if_strike_change2=true;}\n\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\telse{\n\t\t\t\t//System.out.println(\"no wicket zone\");\n\t\t\t\tcheck_if_wicket2=false;\n\t\t\t\t\n\t\t\t\t//Strike Change?\n\t\t\t\tif(TossBrain.compselect.equals(\"bat\")){\n\t\t\t\t\tif(PlayArena2.usershot2%2!=0 && over_ball_2!=5){\n\t\t\t\t\t\tcheck_if_strike_change2=true;\n\t\t\t\t\t\t}\n\t\t\t\t\telse if(PlayArena2.usershot2%2==0 && over_ball_2==5){\n\t\t\t\t\t\tcheck_if_strike_change2=true;\n\t\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tcheck_if_strike_change2=false;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(PlayArena2.compshot2%2!=0 && over_ball_2!=5){\n\t\t\t\t\t\tcheck_if_strike_change2=true;\n\t\t\t\t\t}\n\t\t\t\t\telse if(PlayArena2.compshot2%2==0 && over_ball_2==5){\n\t\t\t\t\t\tcheck_if_strike_change2=true;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tcheck_if_strike_change2=false;\n\t\t\t\t}\n\t\t\t}\n\n\t}", "private void checkWalls() {\n\t\tcheckSideWalls();\n\t\tcheckTopWall();\n\t\tcheckBottomWall();\n\t}", "void check();", "void check();", "public void wizardRule(){\n for (int i=0; i<players.size(); i++){\n Player p = players.get(i);\n if(winner.getPlayCard() != null){\n if ((p.getPlayCard().getNumber() == 15 && winner.getPlayCard().getNumber() != 15) || winner.getPlayCard().getNumber() == 1) {\n setWinner(p);\n } else if(winner.getPlayCard().getNumber() != 15) {\n suitRule(p);\n }\n }\n else{\n setWinner(p);\n }\n }\n }", "public boolean isValid() {\n\t\tif (isPlayer1() && currentPit < 7 && currentPit != 6) {\n\t\t\tif (board[currentPit] == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true; // check appropriate side of board, excluding scoring\n\t\t}\n\t\t// pit\n\t\telse if (!isPlayer1() && currentPit >= 7 && currentPit != 13) {\n\t\t\tif (board[currentPit] == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public void firstGameCheck()\n {\n if(count > 0)\n {\n this.gameStart();\n System.out.println(\"Result:\");\n this.printGameResult();\n System.out.print(\"\\n\");\n }else\n {\n System.out.println(\"\\nGame Running Failed! \\n >>>>>>>>>>>>>> Please setting game first\\n\");\n }\n }", "@Override\n\tpublic void checkScore() {\n\t\t\n\t}", "public void gameOverCheck() {\n //users\n if (tankTroubleMap.getUsers().size() != 0) {\n tankTroubleMap.setWinnerGroup(tankTroubleMap.getUsers().get(0).getGroupNumber());\n for (int i = 1; i < tankTroubleMap.getUsers().size(); i++) {\n if (tankTroubleMap.getUsers().get(i).getGroupNumber() != tankTroubleMap.getWinnerGroup())\n return;\n }\n }\n //bots\n int firstBot = 0;\n if (tankTroubleMap.getBots().size() != 0) {\n if (tankTroubleMap.getWinnerGroup() == -1) {\n firstBot = 1;\n tankTroubleMap.setWinnerGroup(tankTroubleMap.getBots().get(0).getGroupNumber());\n }\n for (int i = firstBot; i < tankTroubleMap.getBots().size(); i++) {\n if (tankTroubleMap.getBots().get(i).getGroupNumber() != tankTroubleMap.getWinnerGroup())\n return;\n }\n }\n tankTroubleMap.setGameOver(true);\n }", "public void startGameState(){\n\n ArrayList<Integer> checkeredSpaces = new ArrayList<Integer>(Arrays.asList(1, 3, 5, 7, 8, 10, 12, 14, 17, 19, 21,\n 23, 24, 26, 28, 30, 33, 35, 37, 39, 41, 42, 44, 46, 48,\n 51, 53, 55, 56, 58, 60, 62));\n\n\n\n for(int i =0; i < 63; i++){\n if(!checkeredSpaces.contains(i)){\n //set all black spaces to null on the board\n mCheckerBoard.add(null);\n }\n else if(i < 24){\n //set first three rows to red checkers\n mCheckerBoard.add(new Checker((i/2), true));\n }\n else if(i < 40){\n //set middle two rows to null\n mCheckerBoard.add(null);\n }\n else{\n //set top three row to black checkers\n mCheckerBoard.add(new Checker((i/2), false));\n }\n }\n\n }", "private void checkCriteria() {\n getNextCriteria();\n if (getReferences() < 1) { // Recordar de ver que se hace con la pregunta que se ignora!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n if (firstCriteria != -1)\n firstCriteria = currentCriteria;\n drawOptions();\n if (criteriaLeft.size() == 0)\n setEndingButtons();\n return;\n } else {\n checkCriteria();\n return;\n }\n }", "@Override\r\n public void validateGame(String name, String type,\r\n String releaseYear, String availablePeriod, boolean needsDeposit)\r\n throws RemoteException, SQLException {\r\n\r\n //this is the check for everything not null. If the if is valid, which is not good,\r\n //the error message is sent\r\n\r\n String result = \"\";\r\n if (name == null || type == null || releaseYear == null\r\n || availablePeriod == null) {\r\n result += \"All fields ought to be filled out!\" + \"\\n\";\r\n property.firePropertyChange(\"validateGame\", null, result);\r\n }\r\n\r\n //In this else, the system checks for the empty fields and logic of the dates\r\n //If something fails, the error message is sent, if not, \"success\" is sent and the game is valid\r\n\r\n else {\r\n int releaseYearInt = 0;\r\n try {\r\n releaseYearInt = Integer.parseInt(releaseYear);\r\n } catch (Exception e) {\r\n result += \"Release year has to a number\" + \"\\n\";\r\n property.firePropertyChange(\"validateGame\", null, result);\r\n }\r\n int availablePeriodInt = 0;\r\n try {\r\n availablePeriodInt = Integer.parseInt(availablePeriod);\r\n } catch (Exception e) {\r\n result += \"Availability period has to be a number\" + \"\\n\";\r\n property.firePropertyChange(\"validateGame\", null, result);\r\n }\r\n\r\n //here, we created specific date object to help with the check and to also look good in the list\r\n\r\n Game game = new Game(name, type, releaseYearInt, needsDeposit,\r\n availablePeriodInt, user.getUserID());\r\n if (game.getTitle().equals(\"\") || game.getTitle().length() > 150) {\r\n result += \"Title can't be empty or longer than 150 characters.\" + \"\\n\";\r\n property.firePropertyChange(\"validateGame\", null, result);\r\n } else if (game.getType().equals(\"\") || game.getTitle().length() > 50) {\r\n result += \"Type can't be empty or longer than 50 characters\" + \"\\n\";\r\n property.firePropertyChange(\"validateGame\", null, result);\r\n } else if (!(game.getReleaseYear() > 0) || !(game.getReleaseYear() < 3000)) {\r\n result += \"Release year has to be between 0 - 3000\" + \"\\n\";\r\n property.firePropertyChange(\"validateGame\", null, result);\r\n } else if (!(game.getAvailabilityPeriod() > 0) || !(game.getAvailabilityPeriod() < 3652)) {\r\n result +=\r\n \"Availability period must be larger than a single day and less than 10 years.\" + \"\\n\";\r\n property.firePropertyChange(\"validateGame\", null, result);\r\n } else {\r\n result = \"Success\";\r\n clientAddGame(game);\r\n property.firePropertyChange(\"validateGame\", null, result);\r\n }\r\n }\r\n }", "@Before\n public void checkGameState() throws Exception {\n assertThat(game.isGameError()).isFalse();\n }", "public void checkEndGame() {\n\t\tint total = 0;\n\t\tint total2 = 0;\n\t\tfor (int i = 0; i < 6; i++) {\n\t\t\ttotal += board[i];\n\t\t}\n\t\tfor (int i = 7; i < 13; i++) {\n\t\t\ttotal2 += board[i];\n\t\t}\n\n\t\tif (total == 0 || total2 == 0) {\n\t\t\tgameOver = true;\n\t\t}\n\t}", "private void checkForGameEnd() {\n\t\tint checkWin = controller.checkForWinner();\n\t\tif(playerType == null && checkWin == 1 || (playerType != null && playerType == checkWin)) {\n\t\t\tgameFinished = true;\n\t\t\tAlert alert = new Alert(Alert.AlertType.WARNING);\n\t\t\talert.setTitle(\"VICTORY\");\n\t\t\talert.setHeaderText(\"VICTORY\");\n\t\t\talert.setContentText(\"CONGRATULATIONS! YOU WIN!\");\n\t\t\talert.showAndWait()\n\t\t .filter(response -> response == ButtonType.OK)\n\t\t .ifPresent(response -> formatSystem());\n\t\t\t\n\t\t}else if (playerType == null && checkWin == 2 || (playerType != null && playerType%2 + 1 == checkWin)) {\n\t\t\tgameFinished = true;\n\t\t\tAlert alert = new Alert(Alert.AlertType.WARNING);\n\t\t\talert.setTitle(\"DEFEAT\");\n\t\t\talert.setHeaderText(\"DEFEAT\");\n\t\t\talert.setContentText(\"SHAME! YOU LOSE!\");\n\t\t\talert.showAndWait()\n\t\t .filter(response -> response == ButtonType.OK)\n\t\t .ifPresent(response -> formatSystem());\n\t\t\t\n\t\t}else if (controller.checkForTie()) {\n\t\t\tgameFinished = true;\n\t\t\tAlert alert = new Alert(Alert.AlertType.WARNING);\n\t\t\talert.setTitle(\"STALEMATE\");\n\t\t\talert.setHeaderText(\"STALEMATE\");\n\t\t\talert.setContentText(\"ALAS! TIE GAME!\");\n\t\t\talert.showAndWait()\n\t\t .filter(response -> response == ButtonType.OK)\n\t\t .ifPresent(response -> formatSystem());\n\t\t}\n\t\t\n\t\tif(playerType != null && gameFinished) {\n\t\t\tSystem.out.println(\"closing connection\");\n\t\t\ttry {\n\t\t\t\tconnection.close();\n\t\t\t}catch (Exception e) {\n\t\t\t\tSystem.out.println(\"ERROR CLOSING\");\n\t\t\t}\n\t\t}\n\t}", "public boolean checkForEndgame() {\n\t\tCalculatePossibleMoves(true);\n\t\tint blackMoves = getNumberOfPossibleMoves();\n\t\tCalculatePossibleMoves(false);\n\t\tint redMoves = getNumberOfPossibleMoves();\n\t\t\n\t\tif (blackMoves == 0 && redMoves == 0)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "@Test\n public void TestLegalCorrectInputCheck(){\n Assert.assertEquals(player.CorrectInputCheck(\"horisontal\",5,1,1)\n ,true , \" check horisontal \"\n );\n\n //legal : check vertical spelling\n Assert.assertEquals(player.CorrectInputCheck(\"vertical\",5,1,1)\n ,true , \" check vertical \"\n );\n\n //legal : place a 5 ship horisontal at 1,1\n Assert.assertEquals(player.CorrectInputCheck(\"horisontal\",5,1,1)\n ,true , \" legal : place a 5 ship horisontal at 1,1 \"\n );\n\n // legal : place a 5 ship horisontal at 1,10\n Assert.assertEquals(player.CorrectInputCheck(\"horisontal\",5,1,10)\n ,true ,\" legal : place a 5 ship horisontal at 1,10 \"\n );\n\n // legal : place a 5 ship vertical at 1,10\n Assert.assertEquals(player.CorrectInputCheck(\"vertical\",5,1,1)\n ,true , \" legal : place a 5 ship vertical at 1,10 \"\n );\n\n // legal : place a 5 ship vertical at 1,10\n Assert.assertEquals(player.CorrectInputCheck(\"vertical\",5,10,1)\n ,true ,\"000 legal : place a 5 ship vertical at 1,10 \"\n );\n\n // legal : place a 5 ship horisontal at 6,1\n Assert.assertEquals(player.CorrectInputCheck(\"horisontal\",5,6,1)\n ,true , \" legal : place a 5 ship horisontal at 6,1 \"\n );\n\n // legal : place a 5 ship vertical at 1,6\n Assert.assertEquals(player.CorrectInputCheck(\"vertical\",5,1,6)\n ,true ,\"000 legal : place a 5 ship vertical at 10,6 \"\n );\n\n }", "public static void checkWinCondition() {\n\t\twin = false;\n\t\tif (curPlayer == 1 && arrContains(2, 4))\n\t\t\twin = true;\n\t\telse if (curPlayer == 2 && arrContains(1, 3))\n\t\t\twin = true;\n\t\tif (curPlayer == 2 && !gameLogic.Logic.arrContains(2, 4))\n\t\t\tP2P.gameLost = true;\n\t\telse if (gameLogic.Logic.curPlayer == 1 && !gameLogic.Logic.arrContains(1, 3))\n\t\t\tP2P.gameLost = true;\n\t\tif (P2P.gameLost == true) {\n\t\t\tif (gameLogic.Logic.curPlayer == 1)\n\t\t\t\tEndScreen.infoWindow.setText(\"<html><center><b><font size=25 color=black> Black player won! </font></b></center></html>\");\n\t\t\telse\n\t\t\t\tEndScreen.infoWindow.setText(\"<html><center><b><font size=25 color=black> Red player won! </font></b></center></html>\");\n\t\t}\n\t\telse\n\t\t\twin = false;\n\t}", "@Override\n\tpublic boolean canBeExecuted(IModel game) {\n\t\tMainBoardData data = game.getMainBoard().getData();\n\n\t\tif(data.getGameState().getClass() != RoundState.class)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tRoundInformationData roundInformationData = game.getRoundInformation().getData();\n\n\t\tint nDice = roundInformationData.getToolCardParameters().getNDice();\n\t\tint dbChanged = roundInformationData.getToolCardParameters().getChangedDiceDB();\n\t\tDice dice = roundInformationData.getToolCardParameters().getDice();\n\n\t\tif(dbChanged==-1 || nDice==-1 || dice==null)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn getCallerID()==game.getRoundInformation().getData().getCurrentPlayer() &&\n\t\t\t\tvalue>=1 && value<=MAX_VALUE && game.getRoundInformation().getData().getToolCardParameters().getDice()!=null;\n\n\t}", "@Test\n public void isGameOverThree() {\n this.reset();\n this.bps.startGame(this.fullDeck, false, 7, 1);\n assertFalse(this.bps.isGameOver());\n }", "private boolean checkStatus() {\r\n //\tSystem.out.println(\"Left \" + Left.getX() + \",\" + Left.getY());\r\n \t//System.out.println(\"Head \" + head.getX() + \",\" + head.getY());\r\n \tboolean result = false;\r\n \tif(Left.getX() >= -4 && Left.getX() <= -3.5f) {\r\n \t\t\r\n \t\tresult = true;\r\n \t}\r\n \tif(Left.getX() >= -2 && Left.getX() <= -0.5f) {\r\n \t\tthis.die = 1;\r\n \t\tresult = true;\r\n \t}\r\n \tif(Left.getX() >= 0 && Left.getX() <= 1.5f) {\r\n \t\tthis.die = 2;\r\n \t\tresult = true;\r\n \t}\r\n \tif(Left.getX() >= 2 && Left.getX() <= 3.5f) {\r\n \t\tthis.die = 3;\r\n \t\tresult = true;\r\n \t}\r\n \treturn result;\r\n }", "private boolean applyRules(boolean isAlive, int aliveNeighbours) {\n if (isAlive && aliveNeighbours < 2) {\n //Underpopulation\n return false;\n } else if (isAlive && aliveNeighbours > 3) {\n //Overcrowding\n return false;\n } else if (!isAlive && aliveNeighbours == 3) {\n //Creation of life\n return true;\n } else {\n // Stays the same\n return isAlive;\n }\n }", "public boolean checkState(){\r\n\t\t//Check if we have enough users\r\n\t\tfor (Map.Entry<String, Role> entry : roleMap.entrySet()){\r\n\t\t\tString rid = entry.getKey();\r\n\t\t\tRole role = roleMap.get(rid);\r\n\t\t\tlog.info(\"Veryifying \" + rid);\t\t\t\r\n\t\t\tif(!roleCount.containsKey(rid)){\r\n\t\t\t\tlog.severe(\"Unsure of game state.\" + rid + \" not found in roleCount\");\r\n\t\t\t\tSystem.exit(-1);\r\n\t\t\t\r\n\t\t\t} else if(role.getMin() > roleCount.get(rid)) {\r\n\t\t\t\t\tlog.info(\"minimum number for roleID: \" + rid + \" not achived\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t\r\n\t\t\t} else if(role.getMax() < roleCount.get(rid)) { //probably don't need this one but cycles are cheap\r\n\t\t\t\tlog.severe(\"OVER MAXIMUM number for roleID: \" + rid + \" not achived\");\r\n\t\t\t\tSystem.exit(-1);\r\n\t\t\t}\r\n\t\t}\r\n\t\t//if we do reach here we've reached a critical mass of players. But we still need them to load the screen\r\n\t\t\r\n\t\tif((this.getGameState() != GAMESTATE.RUNNING) ||(this.gameState !=GAMESTATE.READY_TO_START) ) {\r\n\t\t\tsetGameState(GAMESTATE.CRITICAL_MASS);\r\n\t\t\tlog.info(\"have enough players for game\");\r\n\t\t}\r\n\t\t//if the users are done loading their screen, let us know and then we can start\r\n\t\tif (!userReady.containsValue(false)){\r\n\t\t\tsetGameState(GAMESTATE.READY_TO_START);\r\n\t\t\tlog.info(\"Gamestate is running!!\");\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "boolean isGameComplete();", "public void openRules() {\n usingRulesScreen = true;\n myActivity.setContentView(R.layout.rules);\n Button rulesButtonToGame = myActivity.findViewById(R.id.button7);\n Button rulesButtonMoving = myActivity.findViewById(R.id.button3);\n Button rulesButtonPromotion = myActivity.findViewById(R.id.button5);\n\n rulesButtonToGame.setOnClickListener(\n new View.OnClickListener() {\n public void onClick(View v) {\n ShogiHumanPlayer.this.setAsGui(myActivity);\n usingRulesScreen = false;\n if (state != null) {\n receiveInfo(state);\n }\n }\n });\n\n rulesButtonMoving.setOnClickListener(\n new View.OnClickListener() {\n\n public void onClick(View v) {\n openMoving();\n }\n }\n\n\n );\n\n rulesButtonPromotion.setOnClickListener(\n new View.OnClickListener() {\n\n public void onClick(View v) {\n\n openPromotion();\n }\n }\n\n\n );\n\n Log.d(\"attempt to open rules\", \"open rules\");\n// myActivity.startActivity(intent);\n }", "void checkValid();", "public void checkWin(){\n boolean result = false;\n if(game.getTurn() > 3){\n Player currentPlayer = game.getPlayerTurn();\n int playernumber = currentPlayer.getPlayericon();\n result = game.winChecker(game.getBored(),playernumber);\n if(result == true) {\n setWinMsgBox(currentPlayer.getPlayerName() + \" Is victorious :)\",\"WIN\");\n }else if(game.getTurn() == 8 && result == false){\n setWinMsgBox(\"Too bad it is a draw, No one out smarted the other -_-\",\"DRAW\");\n }else{}\n }else{\n result = false;\n }\n }", "public void checkEndGame() {\n\t\t\n\t\tboolean gameFinished = false;\n\t\t//boolean playerOne = false;\n\t\t//boolean playerTwo = false;\n\t\t\n\t\t\n\t\tif (bucket[13].getnumOfRocks() == 0 && bucket[12].getnumOfRocks() == 0 && bucket[11].getnumOfRocks() == 0\n\t\t\t\t&& bucket[10].getnumOfRocks() == 0 && bucket[9].getnumOfRocks() == 0\n\t\t\t\t&& bucket[8].getnumOfRocks() == 0) {\n\n\t\t\tint left = bucket[6].getnumOfRocks() + bucket[5].getnumOfRocks() + bucket[4].getnumOfRocks()\n\t\t\t\t\t+ bucket[3].getnumOfRocks() + bucket[2].getnumOfRocks() + bucket[1].getnumOfRocks()\n\t\t\t\t\t+ bucket[0].getnumOfRocks();\n\n\t\t\tbucket[0].setnumOfRocks(left, c);\n\t\t\tbucket[6].setnumOfRocks(0, c);\n\t\t\tbucket[5].setnumOfRocks(0, c);\n\t\t\tbucket[4].setnumOfRocks(0, c);\n\t\t\tbucket[3].setnumOfRocks(0, c);\n\t\t\tbucket[2].setnumOfRocks(0, c);\n\t\t\tbucket[1].setnumOfRocks(0, c);\n\t\t\t\n\t\t\tgameFinished = true;\n\t\t}\n\n\t\tif (bucket[1].getnumOfRocks() == 0 && bucket[2].getnumOfRocks() == 0 && bucket[3].getnumOfRocks() == 0\n\t\t\t\t&& bucket[4].getnumOfRocks() == 0 && bucket[5].getnumOfRocks() == 0 && bucket[6].getnumOfRocks() == 0) {\n\n\t\t\tint right = bucket[13].getnumOfRocks() + bucket[12].getnumOfRocks() + bucket[11].getnumOfRocks();\n\t\t\tright = right + bucket[10].getnumOfRocks() + bucket[9].getnumOfRocks() + bucket[8].getnumOfRocks()\n\t\t\t\t\t+ bucket[7].getnumOfRocks();\n\n\t\t\tbucket[7].setnumOfRocks(right, c);\n\t\t\tbucket[13].setnumOfRocks(0, c);\n\t\t\tbucket[12].setnumOfRocks(0, c);\n\t\t\tbucket[11].setnumOfRocks(0, c);\n\t\t\tbucket[10].setnumOfRocks(0, c);\n\t\t\tbucket[9].setnumOfRocks(0, c);\n\t\t\tbucket[8].setnumOfRocks(0, c);\n\n\t\t\tgameFinished = true;\n\t\t}\n\t\t\n\t\t\n\t\tif(gameFinished==true){\n\t\t\tif(bucket[7].getnumOfRocks()<bucket[0].getnumOfRocks()){\n\t\t\t\tplayerOne=true;\n\t\t\t}else{\n\t\t\t\tplayerTwo=true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/*if(playerOne==true){\n\t\t\tSystem.out.println(\"Player A won\");\n\t\t}\n\t\tif(playerTwo == true){\n\t\t\tSystem.out.println(\"Player B won\");\n\t\t}\n\t\t */\n\t\t\n\t}", "@Override\r\n\tpublic void getLegalMoves() {\r\n\t\tint pawnX = this.getX();\r\n\t\tint pawnY = this.getY();\r\n\t\tchar pawnColor = getColor();\r\n\t\tTile[][] chessBoard = SimpleChess.getChessBoard();\r\n\t\tcheckInFront(chessBoard,pawnX,pawnY,pawnColor);\r\n\t\tcheckDiagonal(chessBoard,pawnX,pawnY,pawnColor);\r\n\t}", "private boolean testIfGameIsValid(ChesspairingGame game) {\n\t\tChesspairingPlayer playerA = game.getWhitePlayer();\n\t\tString keyA = playerA.getPlayerKey();\n\t\tChesspairingPlayer playerB = game.getBlackPlayer();\n\t\tString keyB = playerB.getPlayerKey();\n\t\tif (keyA.equals(keyB)) {\n\t\t\tthrow new IllegalStateException(\"You shuld never try to pare a players agains himself\");\n\t\t}\n\t\t/**\n\t\t * two players shall not meet more than once\n\t\t */\n\t\tList<String> partnersA = partnerHistory.get(keyA);\n\t\tif (partnersA.contains(keyB)) {\n\t\t\treturn false;\n\t\t}\n\t\tList<String> partnersB = partnerHistory.get(keyB);\n\t\tif (partnersB.contains(keyA)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t/**\n\t\t * the color difference is the number of games played with white minus\n\t\t * the number of games played with black\n\t\t * \n\t\t * -2 < diff < 2\n\t\t */\n\t\tint aHistoryColor = getColorDifference(keyA);\n\t\tint bHistoryColor = getColorDifference(keyB);\n\n\t\t// if a is white\n\t\tint aWhite = aHistoryColor + 1;\n\t\tint bBlach = bHistoryColor - 1;\n\t\tboolean aPlaysWite = false;\n\t\tif ((-2 < aWhite) && (aWhite < 2) && (-2 < bBlach) && (bBlach < 2)) {\n\t\t\taPlaysWite = true;\n\t\t}\n\n\t\t// if a is black\n\t\tboolean aPlaysBlack = false;\n\t\tif (!aPlaysWite) {\n\t\t\tint aBlack = aHistoryColor - 1;\n\t\t\tint bWhite = bHistoryColor + 1;\n\t\t\tif ((-2 < aBlack) && (aBlack < 2) && (-2 < bWhite) && (bWhite < 2)) {\n\t\t\t\taPlaysBlack = true;\n\t\t\t}\n\t\t}\n\n\t\tif (!aPlaysWite && !aPlaysBlack) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// basic tests have passed. time to return true\n\t\treturn true;\n\t}", "public void initGame() {\r\n\t\tConsolaText consola = new ConsolaText();\r\n\t\tconsola.displayRules();\r\n\t\t// System.out.println(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\r\n\r\n\t}", "@Override\n\tprotected boolean rulesGeneration() {\n\t\tGlobal.logger.finer(\"--------------------- S101 rulesGeneration() ----------------- \");\n\t\t//Global.logger.finer(this.toString());\t\t\n\t\tif(activationGuards()){\n\t\t\ttry {\n\t\t\t\tthis.categories.beforeFirst();\n\t\t\t\t\n\t\t\t\twhile (!this.categories.isClosed() && this.categories.next()) {\n\t\t\t\t\tgroupName = this.categories.getString(\"name\");\n\t\t\t\t\tGlobal.logger.fine(\"Creating new S102 [\" + groupName + \", \" + 1 +\"] \");\n\t\t\t\t\tcreateRule(new S102(course_ID, groupName, 1));\n\t\t\t\t\t\n\t\t\t\t\tGlobal.logger.fine(\"Creating new S103 [\" + groupName + \", study ]\");\n\t\t\t\t\tcreateRule(new S103(course_ID, groupName, \"study\"));\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\telse \n\t\t\treturn false;\n\t\treturn true;\n\t}", "public boolean runRound() {\n gameMove();\n // return/check if gameover condiation is meet\n return isGameOver();\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 }", "public void showRules(Application app){\n System.out.println(\"Here are your rules: \\n • GPA >= \" + app.getStand().getReqGPA() + \"\\n • SAT >= \" + app.getStand().getReqSAT() + \"\\n • A valid intended major, either aligned towards STEM or Humanities.\" + \"\\n • Three valid extracurriculars. \\n \\t • A valid extracurricular is defined as a productive use of time and/or a standout accomplishment. \\n \\t • It must align with the student's STEM or Humanities focus. \\n \\t • All three extracurriculars must be valid. \\n • A statement of purpose without spelling errors.\");\n System.out.println(\" • Students admitted to Harvard must have a passion for Humanities. Students admitted to MIT must have a passion for STEM. This can be determined through their intended major and extracurriculars, assuming both are valid.\");\n System.out.println(\" • All students with errors in their applications should be admitted to Greendale Community College.\");\n System.out.println();\n System.out.println(\"Good luck!\");\n }", "@Test\n public void TestIlegalCorrectInputCheck(){\n Assert.assertEquals(player.CorrectInputCheck(\"horisonaz\",5,1,1)\n ,false , \" check horisontal spelling\"\n );\n\n //illegal : check vertical\n Assert.assertEquals(player.CorrectInputCheck(\"verticles\",5,1,1)\n ,false , \" check vertical spelling\"\n );\n\n //illegal : place a 5 ship horisontal at 0,1 outside of the grid\n Assert.assertEquals(player.CorrectInputCheck(\"horisontal\",5,0,1)\n ,false,\" illegal : place a 5 ship horisontal at 0,1 outside of the grid \"\n );\n\n // illegal : place a 5 ship horisontal at 1,0 outside of the grid\n Assert.assertEquals(player.CorrectInputCheck(\"horisontal\",5,1,0)\n ,false, \" illegal : place a 5 ship horisontal at 1,0 outside of the grid \"\n );\n\n // illegal : place a 5 ship horisontal at 7,1 ship is to big it goes outside the grid\n Assert.assertEquals(player.CorrectInputCheck(\"horisontal\",5,7,1)\n ,false , \" illegal : place a 5 ship horisontal at 7,1 outside of the grid \"\n );\n\n // illegal : place a 5 ship horisontal at 1,10\n Assert.assertEquals(player.CorrectInputCheck(\"vertical\",5,1,7)\n ,false , \" illegal : place a 5 ship horisontal at 1,7 outside of the grid \"\n );\n\n\n }", "private boolean checkIfGameIsWon() {\n\n //loop through rows\n for(int i = 0; i < NUMBER_OF_ROWS; i++) {\n //gameIsWon = this.quartoBoard.checkRow(i);\n if (this.quartoBoard.checkRow(i)) {\n System.out.println(\"Win via row: \" + (i) + \" (zero-indexed)\");\n return true;\n }\n\n }\n //loop through columns\n for(int i = 0; i < NUMBER_OF_COLUMNS; i++) {\n //gameIsWon = this.quartoBoard.checkColumn(i);\n if (this.quartoBoard.checkColumn(i)) {\n System.out.println(\"Win via column: \" + (i) + \" (zero-indexed)\");\n return true;\n }\n\n }\n\n //check Diagonals\n if (this.quartoBoard.checkDiagonals()) {\n System.out.println(\"Win via diagonal\");\n return true;\n }\n\n return false;\n }", "public void checkPlay(int[][] boardState)\n {\n if(ai)\n {\n takeTurn(boardState);\n }\n }", "private void check(int[][] turns) throws Exception {\n if (turns.length < 10) throw new Exception(\"at least 10 round\");\n for (int i = 0; i < 10; i++) {\n int[] temp = turns[i];\n if (temp.length < 1) throw new Exception(\"at least one throw for each round\");\n if (temp[0] < 0 || temp[0] > 10) throw new Exception(\"illegal score\");\n if (temp[0] == 10) {\n if (temp.length != 1) throw new Exception(\"if you strike,you can only throw once\");\n } else {\n if (temp.length != 2) throw new Exception(\"if you don't strike,you have to throw twice\");\n if (temp[1] + temp[0] > 10) throw new Exception(\"illegal score\");\n }\n }\n\n if (turns[9].length == 1) {\n if (turns.length == 11) {\n if (turns[10].length != 2 || turns[10][0] < 0 || turns[10][0] > 10 || turns[10][0] + turns[10][1] > 10) {\n throw new Exception(\"last tow rounds are illegal\");\n }\n } else if (turns.length == 12) {\n if (turns[10].length != 1 || turns[10][0] != 10 || turns[11].length != 1 || turns[11][0] < 0 || turns[11][0] > 10)\n throw new Exception(\"last tow rounds are illegal\");\n } else throw new Exception(\"last tow rounds are illegal\");\n\n } else if (turns[9].length == 2 && turns[9][0] + turns[9][1] == 10) {\n if (turns.length != 11 || turns[10].length != 1 || turns[10][0] < 0 || turns[10][0] > 10)\n throw new Exception(\"last tow rounds are illegal\");\n }\n }", "public static void main(String[] args) {\n\n\n while (gameStatus) {\n if(checkRowGameWin(1) || checkColumnGameWin(1) || checkRowGameWin(2) || checkColumnGameWin(2)){\n System.out.println(\"hurray!!!!! \"+ Winplayer + \" win the game\");\n gameStatus = false;\n }else{\n getinput();\n }\n\n\n }\n }", "public void checkBounds() {\n // check that paddles stay within boundaries\n playerOnePaddle.boundCheck(topWall, bottomWall);\n playerTwoPaddle.boundCheck(topWall, bottomWall);\n\n // check if ball hits walls/paddles/goals\n if (!ball.boundCheck(playerOnePaddle.getBoundsInParent(), playerTwoPaddle.getBoundsInParent(), topWall, bottomWall.getBoundsInParent())) {\n if (ball.getBoundsInParent().intersects(leftWall.getBoundsInParent())) {\n playerTwo.newPoint();\n if (playerTwo.getPoints() < 10) {\n setVisibleScore(rightScoreGroup, playerTwo.getPoints());\n }\n reset();\n } else if (ball.getBoundsInParent().intersects(rightWall.getBoundsInParent())) {\n playerOne.newPoint();\n if (playerTwo.getPoints() < 10) {\n setVisibleScore(leftScoreGroup, playerOne.getPoints());\n }\n reset();\n }\n }\n }", "public int evaluate(int[][] gameBoard) {\n for (int r = 0; r < 3; r++) {\n if (gameBoard[r][0] == gameBoard[r][1] && gameBoard[r][1] == gameBoard[r][2]) {\n if (gameBoard[r][0] == ai)\n return +10;\n else if (gameBoard[r][0] == human)\n return -10;\n }\n }\n // Checking for Columns for victory.\n for (int c = 0; c < 3; c++) {\n if (gameBoard[0][c] == gameBoard[1][c] && gameBoard[1][c] == gameBoard[2][c]) {\n //gameLogic.getWinType();\n if (gameBoard[0][c] == ai)\n return +10;\n else if (gameBoard[0][c] == human)\n return -10;\n }\n }\n // Checking for Diagonals for victory.\n if (gameBoard[0][0] == gameBoard[1][1] && gameBoard[1][1] == gameBoard[2][2]) {\n if (gameBoard[0][0] == ai)\n return +10;\n else if (gameBoard[0][0] == human)\n return -10;\n }\n if (gameBoard[0][2] == gameBoard[1][1] && gameBoard[1][1] == gameBoard[2][0]) {\n if (gameBoard[0][2] == ai)\n return +10;\n else if (gameBoard[0][2] == human)\n return -10;\n }\n // Else if none of them have won then return 0\n return 0;\n }", "public void verifyBusinessRules(Coin Coin) throws Exception {\n\t}", "@Test\r\n\tpublic void testTournamentGamesConditions() {\r\n\t\tassertTrue(cl.checkTournamentGamesConditions(Integer.parseInt(tags[6])));\r\n\t\tassertFalse(cl.checkTournamentGamesConditions(Integer.parseInt(tags2[6])));\r\n\t}", "void checkWinner() {\n\t}", "private boolean checkIfGameIsWon() {\n\t\t//loop through rows\n\t\tfor (int i = 0; i < NUMBER_OF_ROWS; i++) {\n\t\t\t//gameIsWon = this.quartoBoard.checkRow(i);\n\t\t\tif (this.quartoBoard.checkRow(i)) {\n\t\t\t\tSystem.out.println(\"Win via row: \" + (i) + \" (zero-indexed)\");\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//loop through columns\n\t\tfor (int i = 0; i < NUMBER_OF_COLUMNS; i++) {\n\t\t\t//gameIsWon = this.quartoBoard.checkColumn(i);\n\t\t\tif (this.quartoBoard.checkColumn(i)) {\n\t\t\t\tSystem.out.println(\"Win via column: \" + (i) + \" (zero-indexed)\");\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//check Diagonals\n\t\tif (this.quartoBoard.checkDiagonals()) {\n\t\t\tSystem.out.println(\"Win via diagonal\");\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean endChk() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\tif ( rowChoice == 0 || totalPebbles == 0 ){\n\t\t\trunGame = false;\n\t\t}\n\t\treturn runGame;\n\t}", "public static void checkPlayer()\n\t{\n\t\ttry {\n\t\t\t\n\t\t\tscenarioResults = new String[127];\n\t\t\tArrayList<Integer> differences = new ArrayList<Integer>();\n\t\t\t//set scenarioResults to current result or player's bracket when not impossible\n\t\t\tfor(int i=0; i < 127; i++)\n\t\t\t{\n\t\t\t\tif(i < nextMatch){\n\t\t\t\t\tscenarioResults[i] = results[i];\n\t\t\t\t}else{\n\t\t\t\t\t//check if a pick has been disqualified by previous results. \n\t\t\t\t\t//If it is still possible, assume it happens, else add the match number to the list to iterate through.\n\t\t\t\t\tif(isValid(allPicks.get(checkIndex)[i],i)){\n\t\t\t\t\t\tscenarioResults[i] = allPicks.get(checkIndex)[i];\n\t\t\t\t\t}else{\n\t\t\t\t\t\tscenarioResults[i] = \"\";\n\t\t\t\t\t\tdifferences.add(i);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//if there aren't any matches to check specifically (i.e. no picked winners that lost in previous rounds)\n\t\t\t//\tjust check to see if they win if everything breaks right.\n\t\t\tif(differences.size() == 0)\n\t\t\t{\n\t\t\t\tif(outputScenarioWinner(\"any combination+\"))\n\t\t\t\t{\n\t\t\t\t\twriter.write(\"\\t\"+entrants[checkIndex]+\" is ALIVE\");\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(entrants[checkIndex]);\n\t\t\t\t\twriter.write(\"\\t\"+entrants[checkIndex]+\" is DEAD\");\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t//find later round matches to iterate through, where the player is already guaranteed to be wrong\n\t\t\t\twrongMatches = new int[differences.size()];\n\n\n\t\t\t\tfor(int i = 0; i < wrongMatches.length; i++)\n\t\t\t\t{\n\t\t\t\t\twrongMatches[i] = differences.get(i).intValue();\n\t\t\t\t}\n\n\t\t\t\t//recurse through results, checking from left-most first. When you reach the end of the list of matches, check scores\n\t\t\t\t//\tand print the winner for the given combination.\n\t\t\t\tboolean isAlive = checkPlayerHelper(0,\"\");\n\n\t\t\t\t//if player is the winner, end execution\n\t\t\t\tif(isAlive)\n\t\t\t\t{\n\t\t\t\t\twriter.write(\"\\t\"+entrants[checkIndex]+\" is ALIVE\");\n\t\t\t\t}else{\n\t\t\t\t\twriter.write(\"\\t\"+entrants[checkIndex]+\" is DEAD\");\n\t\t\t\t\tSystem.out.println(entrants[checkIndex]);\n\t\t\t\t}\n\t\t\t}\n\t\t\twriter.write(\"\\n\");\n\t\t\t\n\t\t}\t\n\t\tcatch (IOException e) {\n\t\t\tSystem.out.println(\"problem with output\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "private void evaluateWin(boolean finalCheck)\r\n\t{\r\n\t\t// Stores player and dealer scores in local variables, rather than repeatedly call the get methods\r\n\t\tint scoreP = player1.getTotal();\r\n\t\tint scoreD = dealer.getTotal();\r\n\t\t\r\n\t\t// first check: is the game still going? If it has ended, then no evaluation needs to be made\r\n\t\tif ( !endGame )\r\n\t\t{\r\n\t\t\t/* second check: is this the final evaluation? if not, the first block of statements executes.\r\n\t\t\tIf Player == 21 and Dealer == 21, Tie\r\n\t\t\tIf Player == 21 and Dealer != 21, Player wins\r\n\t\t\tIf Player != 21 and Dealer == 21, Dealer wins\r\n\t\t\tIf Player > 21, Dealer wins at any number\r\n\t\t\tIf Player > Dealer at the end of the game and no one has busted or hit 21, Player wins\r\n\t\t\tThe last check is performed only if finalCheck is true.\r\n\t\t\t*/\r\n\t\t\tif ( !finalCheck )\r\n\t\t\t{\r\n\t\t\t\tif (scoreP > BUST_SCORE)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"You lose...\");\r\n\t\t\t\t\tendGame = true;\r\n\t\t\t\t}\r\n\t\t\t\telse if (scoreP == BUST_SCORE)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (scoreD == BUST_SCORE)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"It's a tie.\");\r\n\t\t\t\t\t\tendGame = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"You win!\");\r\n\t\t\t\t\t\tendGame = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t} // end scoreP > BUST_SCORE\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif (scoreD == BUST_SCORE)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"You lose...\");\r\n\t\t\t\t\t\tendGame = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (scoreD > BUST_SCORE)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"You win!\");\r\n\t\t\t\t\t\tendGame = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t} // end ScoreP <= BUST SCORE\r\n\t\t\t} // end finalCheck = false\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Final victory condition check\r\n\t\t\t\tif ( dealer.getTotal() < player1.getTotal() )\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"You win!\");\r\n\t\t\t\t}\r\n\t\t\t\telse if ( dealer.getTotal() == player1.getTotal() )\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"It's a tie.\");\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"You lose...1\");\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t} // end finalCheck = true\r\n\t\t\r\n\t\t} // end endGame = false if\r\n\t\r\n\t}", "boolean winGame();", "public Boolean checkHercules() {\r\n \tBoolean flag = true;\r\n \tfor(int i = 0; i < 44; i++) {\r\n \t\tif(hercules[i] == 0) {\r\n \t\t\tflag = false;\r\n \t\t}\r\n \t}\r\n \treturn flag;\r\n }", "@Test\n public void checkValidityTest1() {\n GenericStandardDeckGame g = new GenericStandardDeckGame();\n assert (g.checkValidity(g.getDeck()));\n }", "protected boolean checkForWin() {\r\n \t\r\n if (squaresRevealed == this.width * this.height - this.mines) {\r\n finishFlags();\r\n finish(GameStateModel.WON);\r\n return true;\r\n } \t\r\n \t\r\n return false;\r\n \t\r\n }", "private void checkGameCondition(int x, int y) {\n int player = this.gameField.getValue(x, y);\n if (this.cellsClosed == this.gameField.length() * this.gameField.length()) {\n this.gameOver = true;\n }else if (horizontalMatches(player, y) || verticalMatches(player, x)\n || diagonalMatches(player, true)\n || diagonalMatches(player, false)) {\n this.gameOver = true;\n this.winnerId = player;\n }\n }", "public boolean isCheck()\n {\n Game g = Game.getInstance();\n\n for(Piece[] p1 : g.m_board.m_pieces)\n {\n for(Piece p2 : p1)\n {\n if(p2 == null){ continue; }\n if(g.containsMove(new Move(m_x, m_y), p2.getMoves()))\n return true;\n }\n }\n\n return false;\n }", "public void checkWin(){\n if(gameBoard[0][0].getText().equals(\"x\") && gameBoard[0][1].getText().equals(\"x\")\n && gameBoard[0][2].getText().equals(\"x\") && gameBoard[0][3].getText().equals(\"o\") \n && gameBoard[0][4].getText().equals(\"o\") && gameBoard[0][5].getText().equals(\"x\")\n && gameBoard[0][6].getText().equals(\"x\") && gameBoard[0][7].getText().equals(\"x\")\n && gameBoard[1][0].getText().equals(\"x\") && gameBoard[1][1].getText().equals(\"o\")\n && gameBoard[1][2].getText().equals(\"x\") && gameBoard[1][3].getText().equals(\"x\")\n && gameBoard[1][4].getText().equals(\"x\") && gameBoard[1][5].getText().equals(\"x\")\n && gameBoard[1][6].getText().equals(\"o\") && gameBoard[1][7].getText().equals(\"x\")\n && gameBoard[2][0].getText().equals(\"o\") && gameBoard[2][1].getText().equals(\"x\")\n && gameBoard[2][2].getText().equals(\"x\") && gameBoard[2][3].getText().equals(\"x\")\n && gameBoard[2][4].getText().equals(\"x\") && gameBoard[2][5].getText().equals(\"x\")\n && gameBoard[2][6].getText().equals(\"x\") && gameBoard[2][7].getText().equals(\"o\")\n && gameBoard[3][0].getText().equals(\"x\") && gameBoard[3][1].getText().equals(\"x\")\n && gameBoard[3][2].getText().equals(\"o\") && gameBoard[3][3].getText().equals(\"x\")\n && gameBoard[3][4].getText().equals(\"x\") && gameBoard[3][5].getText().equals(\"o\")\n && gameBoard[3][6].getText().equals(\"x\") && gameBoard[3][7].getText().equals(\"x\")\n && gameBoard[4][0].getText().equals(\"x\") && gameBoard[4][1].getText().equals(\"x\")\n && gameBoard[4][2].getText().equals(\"x\") && gameBoard[4][3].getText().equals(\"o\")\n && gameBoard[5][0].getText().equals(\"x\") && gameBoard[5][1].getText().equals(\"x\")\n && gameBoard[5][2].getText().equals(\"o\") && gameBoard[5][3].getText().equals(\"x\")\n && gameBoard[6][0].getText().equals(\"x\") && gameBoard[6][1].getText().equals(\"o\")\n && gameBoard[6][2].getText().equals(\"x\") && gameBoard[6][3].getText().equals(\"x\")\n && gameBoard[7][0].getText().equals(\"o\") && gameBoard[7][1].getText().equals(\"x\")\n && gameBoard[7][2].getText().equals(\"x\") && gameBoard[7][3].getText().equals(\"x\")){\n System.out.println(\"Congratulations, you won the game! ! !\");\n System.exit(0);\n } \n }", "private void startUpConditions(){\n\t\t\tString strSize = JOptionPane.showInputDialog(null, \n\t\t\t\t\t\"Pick a Board Size between 3-30.\");\n\t\t\ttry{\n\t\t\t\tselectedSize = Integer.parseInt(strSize);\n\t\t\t\t\n\t\t\tif(selectedSize < 2||selectedSize > 30){\n\t\t\t\tselectedSize = 10;\n\t\t\t\tJOptionPane.showMessageDialog(null, \"The Game has\"\n\t\t\t\t+ \" defaulted to a Board Size of 10.\");\n\t\t\t\t}\n\t\t\t\n\t\t\t}catch(NumberFormatException exception){\n\n\t\t\t\tJOptionPane.showMessageDialog(null, \"The Game has\"\n\t\t\t\t+ \" defaulted to a Board Size of 10.\"+\n\t\t\t\t\" Because you input characters other than numbers.\");\n\t\t\t\tselectedSize = 10;\t\t\t\t\n\t\t\t}\n\n\t\n\t\t//selecting the number of players within the game\n\t\t//verifying a valid input for the Players\n\t\t//It's awfully boring to play by yourself after all.\n\t\t\tString strPlay = JOptionPane.showInputDialog(null, \n\t\t\t\t\t\"Pick number of players between 2-10\");\n\t\t\ttry{\n\t\t\t\tif(strPlay==null){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"The game\"\n\t\t\t\t\t+\" has defaulted to 2 players.\");\n\t\t\t\t\tselectedPlayers = 2;\n\t\t\t\t}\n//\t\t\t\tif(input == JOptionPane.CANCEL_OPTION){\n//\t\t\t\t\tSystem.exit(1);\n//\t\t\t\t}\n\t\t\t\tif(strPlay!=null){\n\t\t\t\t\tselectedPlayers = Integer.parseInt(strPlay);\n\t\t\t\t\t\n\t\t\t\t\tif(selectedPlayers < 2||selectedPlayers > 10){\n\t\t\t\t\t\tselectedPlayers = 2;\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"The game\"\n\t\t\t\t\t\t\t+\" has defaulted to 2 players.\"\n\t\t\t\t\t\t\t+\" Because you input a number that \"\n\t\t\t\t\t\t\t+\"was out of bounds.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}catch(NumberFormatException exception){\n\t\t\t\tJOptionPane.showMessageDialog(null,\"You input \"\n\t\t\t\t\t+ \"something that was not a number.\"\n\t\t\t\t\t+ \" The game has defaulted to 2 players.\");\n\t\t\t\tselectedPlayers = 2;\n\t\t\t}\n\t\t\t\n\t\t\tString goFirst = JOptionPane.showInputDialog(null, \"Pick\"\n\t\t\t+ \" who will go first.\");\n\t\t\t\n\t\t\ttry{\n\t\t\t\tif(goFirst==null){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"The game\"\n\t\t\t\t\t+\" has defaulted to Player 1s turn.\");\n\t\t\t\t\tthis.firstTurn = 0;\n\t\t\t\t}\n\t\t\t\tif(goFirst!=null){\n\t\t\t\t\t this.firstTurn = Integer.parseInt(goFirst);\n\t\t\t\t}\n\t\t\t}catch(NumberFormatException exception){\n\t\t\t\tJOptionPane.showMessageDialog(null, \"You input \"\n\t\t\t\t+ \"something other than a number.\"\n\t\t\t\t+ \" The Game has defaulted to player 1s turn.\");\n\t\t\t\tthis.firstTurn = 0;\n\t\t\t}finally{\n\t\t\t\tJOptionPane.showMessageDialog(null, \"The game\"\n\t\t\t\t\t+\" will now begin.\");\n\t\t\t}\n\t\t\t\n\t\t}", "@Override\r\n public void validate()\r\n {\r\n List<Connection> connections = model.getConnections();\r\n List<String> connectionsRelation = new ArrayList<>();\r\n\r\n for (Connection c : connections)\r\n {\r\n StringBuilder sb = new StringBuilder();\r\n sb.append(c.getSource().getId());\r\n sb.append(\"-\");\r\n sb.append(c.getTarget().getId());\r\n connectionsRelation.add(sb.toString());\r\n }\r\n\r\n List<String> answerRelations = Arrays.asList(task.getAnswerRelations().split(\";\"));\r\n\r\n if (connectionsRelation.isEmpty())\r\n {\r\n connectionsRelation.add(\"\");\r\n }\r\n\r\n if (ModelUtils.areEqualLists(connectionsRelation, answerRelations))\r\n {\r\n quizBean.setPoints(quizBean.getPoints() + 1);\r\n }\r\n\r\n quizBean.game();\r\n }", "protected void runGame() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tthis.getRndWord(filePosition);\n\t\twhile((! this.word.isFinished()) && (this.numOfWrongGuess <= this.allowance)) {\n\t\t\tthis.showInfo();\n\t\t\tthis.tryGuess(this.getGuessLetter(sc));\n\t\t}\n\t\tif (this.word.isFinished()) {\n\t\t\tthis.showStat();\n\t\t}else {\n\t\t\tthis.showFacts();\n\t\t}\n\t\tsc.close();\n\n\n\t}", "@Test\n void testAllLegalMoves() {\n \tplayer1 = new HumanPlayer(\"Arnold\");\n player2 = new HumanPlayer(\"Intelligent Twig\");\n gameState = new GameState(Arrays.asList(player1, player2));\n board = gameState.getBoard();\n \n Set<PlayableMove> moves = Move.allLegalMoves(gameState);\n\n assertTrue(moves.stream().allMatch(e -> e.isLegal()));\n assertEquals(44, moves.size());\n }", "@Test\n public void isGameOver()\n {\n // Setup.\n final CheckersGameInjector injector = new CheckersGameInjector();\n final List<Agent> agents = createAgents(injector);\n final CheckersEnvironment environment = createEnvironment(injector, agents);\n final CheckersAdjudicator adjudicator = injector.injectAdjudicator();\n\n // Run / Verify.\n assertFalse(adjudicator.isGameOver(environment));\n }", "public void scoresForGameModes() {\r\n \tCalculateScore myScore = new CalculateScore();\r\n \tthis.score = myScore.giveScore();\r\n \tif (gamemode == 1) {\r\n \t\treturn;\r\n \t}\r\n \tif (gamemode ==2 ) {\r\n \t\tthis.score = this.score - (10 * (currentGraph.getCNumber() - set.size()));\r\n \t}\r\n \tif (gamemode ==3) {\r\n \t\tthis.score = this.score - (10 * (currentGraph.getCNumber() -set.size()));\r\n \t}\r\n }", "public static boolean processScoring() {\r\n\t\tboolean done = true;\r\n\t\tint player1Tricks = 0;\r\n\t\tint player2Tricks = 0;\r\n\t\tint player3Tricks = 0;\r\n\t\tint player4Tricks = 0;\r\n\t\t\r\n\t\t//Gets the data for three players.\r\n\t\tplayer1Tricks = FrameUtils.player1TricksTaken.getSelectedIndex();\r\n\t\tplayer2Tricks = FrameUtils.player2TricksTaken.getSelectedIndex();\r\n\t\tplayer3Tricks = FrameUtils.player3TricksTaken.getSelectedIndex();\r\n\r\n\t\t//Gets the tricks taken if playing with four players.\r\n\t\tif (!Main.isThreeHanded) {\r\n\t\t\tplayer4Tricks = FrameUtils.player4TricksTaken.getSelectedIndex();\r\n\t\t}\r\n\r\n\t\t//Check if all the choice boxes have been selected.\r\n\t\tif (player1Tricks == -1 || player1Tricks == 0) {\r\n\t\t\tdone = false;\r\n\t\t}\r\n\t\tif (player2Tricks == -1 || player2Tricks == 0) {\r\n\t\t\tdone = false;\r\n\t\t}\r\n\t\tif (player3Tricks == -1 || player3Tricks == 0) {\r\n\t\t\tdone = false;\r\n\t\t}\r\n\t\t\r\n\t\t//Don't check fourth player if playing three handed game.\r\n\t\tif (!Main.isThreeHanded) {\r\n\t\t\tif (player4Tricks == -1 || player4Tricks == 0) {\r\n\t\t\t\tdone = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//Get the value of three players tricks taken.\r\n\t\tplayer1Tricks = stringToInt(FrameUtils.player1TricksTaken.getSelectedItem());\r\n\t\tplayer2Tricks = stringToInt(FrameUtils.player2TricksTaken.getSelectedItem());\r\n\t\tplayer3Tricks = stringToInt(FrameUtils.player3TricksTaken.getSelectedItem());\r\n\t\t\r\n\t\t//Get the value of the fourth player in a four handed game.\r\n\t\tif (!Main.isThreeHanded) {\r\n\t\t\tplayer4Tricks = stringToInt(FrameUtils.player4TricksTaken.getSelectedItem());\r\n\t\t}\r\n\t\t\r\n\t\t//Check if tricks taken in a three handed game equals 17.\r\n\t\tif (Main.isThreeHanded) {\r\n\t\t\tif (player1Tricks + player2Tricks + player3Tricks != 17) {\r\n\t\t\t\tdone = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Check if tricks taken in a non-three-handed game equals 13.\r\n\t\tif (!Main.isThreeHanded) {\r\n\t\t\tif (player1Tricks + player2Tricks + player3Tricks + player4Tricks != 13) {\r\n\t\t\t\tdone = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Show dialog box reminder.\r\n\t\tif (!done) FrameUtils.showDialogBox(\"Tricks taken was entered wrong.\");\r\n\t\t\t\r\n\t\t//Save tricks taken data.\r\n\t\tsaveTricksTakenData();\r\n\t\t\r\n\t\treturn done;\r\n\t}", "private void checkVictory() {\n\t\tboolean currentWin = true;\n\t\t\n\t\t//Vertical win\n\t\tfor (int i = 0; i<DIVISIONS; i++){\n\t\t\tif (gameArray[i][yGuess] != currentPlayer){\n\t\t\t\tcurrentWin = false;\n\t\t\t}\n\t\t}\n\t\tif (currentWin){\n\t\t\tgameWon = true;\n\t\t}\n\t\t\n\t\t//Horizontal win\n\t\tcurrentWin = true;\n\t\tfor (int i = 0; i<DIVISIONS; i++){\n\t\t\tif (gameArray[xGuess][i] != currentPlayer){\n\t\t\t\tcurrentWin = false;\n\t\t\t}\n\t\t}\n\t\tif (currentWin){\n\t\t\tgameWon = true;\n\t\t}\n\t\t\n\t\t//Top left bottom right diagonal win\n\t\tcurrentWin = true;\n\t\tif (xGuess == yGuess){\n\t\tfor (int i = 0; i<DIVISIONS; i++){\n\t\t\tif (gameArray[i][i] != currentPlayer){\n\t\t\t\tcurrentWin = false;\n\t\t\t}\n\t\t}\n\t\tif (currentWin){\n\t\t\tgameWon = true;\n\t\t}\n\t\t}\n\t\t\n\t\t//Bottom left top right diagonal win\n\t\tcurrentWin = true;\n\t\tif (yGuess + xGuess == DIVISIONS - 1){\n\t\t\tfor (int i = 0; i<DIVISIONS; i++){\n\t\t\t\tif (gameArray[i][(DIVISIONS - 1) -i] != currentPlayer){\n\t\t\t\t\tcurrentWin = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (currentWin){\n\t\t\t\tgameWon = true;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void rulesOnEnter() {\n try {\n String ruleString = ruleInputField.getText().toUpperCase();\n gOL.setRuleString(ruleString);\n ruleLabel.setText(gOL.getRuleString().toUpperCase());\n ruleInputField.setText(\"\");\n\n //Checks if the input matches any predefined rules. Clears the selection if not.\n if(!chooseRulesList.contains(gOL.getRuleName())){\n chooseRulesBox.getSelectionModel().clearSelection();\n }else{\n chooseRulesBox.getSelectionModel().select(gOL.getRuleName());\n }\n\n //Produces a warning if a RulesFormatException is thrown\n } catch (RulesFormatException rfe) {\n PopUpAlerts.ruleAlert2();\n }\n }", "void checkForPlayer(boolean checkForBlacks, int i, int j) {\n\t\tcounter = 0;\n\t\tpossibleFlips.clear();\n\t\t//**Check vertical**\\\\\n\t\t// Check upwards\n\t\tfor (int n = j-1; n >= 0; --n) {\n\t\t\tif (!check(i, n, checkForBlacks))\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\tcounter = 0;\n\t\tpossibleFlips.clear();\n\t\t\n\t\t// Check downwards\n\t\tfor (int n = j+1; n < dimensions.y; ++n) {\n\t\t\tif (!check (i, n, checkForBlacks))\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\tcounter = 0;\n\t\tpossibleFlips.clear();\n\t\t\n\t\t//**Check horizontal**\\\\\n\t\t// Check to left\n\t\tfor (int n = i-1; n >=0; --n) {\n\t\t\tif (!check(n, j, checkForBlacks))\n\t\t\tbreak;\n\t\t}\n\n\t\tcounter = 0;\n\t\tpossibleFlips.clear();\n\t\t\n\t\t// Check to right\n\t\tfor (int n = i+1; n < dimensions.x; ++n) {\n\t\t\tif (!check(n, j, checkForBlacks))\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tcounter = 0;\n\t\tpossibleFlips.clear();\n\t\t\n\t\t//**Check diagonals**\\\\\n\t\t// Check North-East\n\t\tfor (int n = 1; i+n < dimensions.x && j-n >= 0; ++n) {\n\t\t\tif (!check(i+n, j-n, checkForBlacks))\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tcounter = 0;\n\t\tpossibleFlips.clear();\n\t\t\n\t\t// Check North-West\n\t\tfor (int n = 1; i-n >= 0 && j-n >= 0; ++n) {\n\t\t\tif (!check(i-n, j-n, checkForBlacks))\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tcounter = 0;\n\t\tpossibleFlips.clear();\n\t\t\n\t\t// Check South-East\n\t\tfor (int n = 1; i+n < dimensions.x && j+n < dimensions.y; ++n) {\n\t\t\tif (!check(i+n, j+n, checkForBlacks))\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tcounter = 0;\n\t\tpossibleFlips.clear();\n\t\t\n\t\t// Check South-West\n\t\tfor (int n = 1; i-n >= 0 && j+n < dimensions.y; ++n) {\n\t\t\tif (!check(i-n, j+n, checkForBlacks))\n\t\t\tbreak;\n\t\t}\n\t}", "public void checkWin() {\n if (rockList.isEmpty() && trackerRockList.isEmpty() && bigRockList.isEmpty() && bossRockList.isEmpty()) {\n if (ship.lives < 5) {\n ship.lives++;\n }\n Level++;\n LevelIntermission = true;\n LevelIntermissionCount = 0;\n }\n }", "@Test\n public void moreThanOneCheckerOnToLocation() {\n\n assertTrue(game.move(Location.R1, Location.R2));\n assertTrue(game.move(Location.R1, Location.R3));\n game.nextTurn();\n // to der gerne skulle vaere lovlige og stemme med terningerne\n assertTrue(game.move(Location.R6, Location.R5));\n assertTrue(game.move(Location.R8, Location.R6));\n game.nextTurn();\n assertTrue(game.move(Location.R2, Location.R5));\n assertTrue(game.move(Location.R3, Location.R7));\n game.nextTurn();\n // der staar nu to sorte paa R4\n assertFalse(game.move(Location.R6, Location.R3));\n }", "public void checkBehavior() {\n\t\tif (behaviorStage == 1) {\n\t\t\tif (screen.score >= 100) {\n\t\t\t\tshow();\n\t\t\t}\n\t\t\tif (active) {\n\t\t\t\tif (health <= maxHealth / 2f) {\n\t\t\t\t\tleave();\n\t\t\t\t\tbehaviorStage = 2;\n\t\t\t\t}\n\t\t\t\tif (screen.score < 100) {\n\t\t\t\t\tleave();\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (behaviorStage == 2) {\n\t\t\tif (screen.score >= 200) {\n\t\t\t\tshow();\n\t\t\t}\n\t\t\tif (active) {\n\t\t\t\tif (screen.score < 200) {\n\t\t\t\t\tleave();\n\t\t\t\t}\n\t\t\t\tif (health <= 0) {\n\t\t\t\t\tleave();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private static void play(Board chess, Scanner scan) {\r\n boolean whiteCanCastle = true;\r\n boolean blackCanCastle = true;\r\n\r\n // Get's user's choice\r\n // Split into the <old x position>, <old y position>, <new x position>, <new y position>\r\n for (int i = 0; i < 100; i++) {\r\n // Gets the user's requested move, moves the pieces (with move verification), and prints the final board\r\n int[] move = Tasks.getMove(chess, scan);\r\n boolean valid = chess.move(move[1], move[0], move[3], move[2], move[4], move[5]);\r\n if (move[4] == 99 && valid) {whiteCanCastle = false;}\r\n else if (move[4] == -99 && valid) {blackCanCastle = false;}\r\n chess.printBoard();\r\n }\r\n // System.out.println(\"50 Move Rule Exceeded!\\nGame Over!\");\r\n }", "public void playGame()\r\n\t{\r\n\t\tSystem.out.println(\"Welcome to BlackJack! \\n\");\r\n\t\t\r\n\t\t// Boolean value to tell evaluateWin() method when the final win evaluation must be made\r\n\t\tboolean finalCheck = false;\r\n\t\t\r\n\t\tcardDeck.getDeck();\r\n\t\t\r\n\t\tSystem.out.println(\"Dealing cards...\");\r\n\t\t\r\n\t\t// Each player gets 2 cards to start\r\n\t\tplayer1.hit( cardDeck.draw() );\r\n\t\tplayer1.hit( cardDeck.draw() );\r\n\t\tdealer.hit( cardDeck.draw() );\r\n\t\tdealer.hit( cardDeck.draw() );\r\n\t\t\r\n\t\t// displays current cards\r\n\t\tdisplayPlayerCards(PLAYER1_ID);\r\n\t\tdisplayPlayerCards(DEALER_ID);\r\n\t\t\r\n\t\t// checks for win\r\n\t\tevaluateWin(finalCheck);\r\n\t\t\r\n\t\t// begins player1 turns\r\n\t\tplayerTurns();\r\n\t\t\r\n\t\t// begins dealer turns\r\n\t\tdealerTurns();\r\n\t\t\r\n\t\t// instructs evaluateWin to make final victory check\r\n\t\tfinalCheck = true;\r\n\t\tevaluateWin(finalCheck);\r\n\t\t\r\n\t\t// Cleans up objects\r\n\t\tcardDeck.newDeck();\r\n\t\tplayer1.resetHand();\r\n\t\tdealer.resetHand();\r\n\t}" ]
[ "0.7369617", "0.7309908", "0.688288", "0.6666525", "0.66329217", "0.6383167", "0.6292243", "0.6273626", "0.62530416", "0.621815", "0.61968637", "0.61577374", "0.61486095", "0.6141687", "0.61195767", "0.6113211", "0.60950077", "0.60706276", "0.6067105", "0.6036711", "0.5989057", "0.5953889", "0.59411967", "0.59285325", "0.5872025", "0.5867275", "0.58530533", "0.58514726", "0.5844359", "0.5836302", "0.582422", "0.5813939", "0.58135563", "0.58135563", "0.57976586", "0.57589847", "0.57574767", "0.5754709", "0.5748362", "0.57356703", "0.5734549", "0.57231754", "0.5722797", "0.5715512", "0.571256", "0.570845", "0.57079095", "0.5686761", "0.56796455", "0.56716216", "0.5662392", "0.5650479", "0.56420285", "0.56418365", "0.5641705", "0.5638718", "0.5630908", "0.5623608", "0.5619247", "0.56150174", "0.56084114", "0.560786", "0.5596815", "0.55907756", "0.5588581", "0.5586975", "0.5581609", "0.5580894", "0.5574916", "0.55712974", "0.55634224", "0.555783", "0.5557086", "0.55570215", "0.55532837", "0.5553016", "0.5550799", "0.55378115", "0.55374503", "0.5535102", "0.5534776", "0.5527203", "0.5513026", "0.5511147", "0.54898393", "0.548942", "0.54888", "0.5485056", "0.5484623", "0.5476165", "0.5475898", "0.5474964", "0.54687023", "0.54594386", "0.54506165", "0.5449056", "0.544108", "0.5433916", "0.5433733", "0.54329383", "0.54291433" ]
0.0
-1
Checkin close button in Rules of the Game.
public SNGTestCases CloseBtnOfRule_TC1006() throws InterruptedException{ Login(); waitForVisibilityOf(By.id(commonIdPath + "/subject_image")); List subject = driver.findElements(By.id(commonIdPath + "/subject_image")); ((WebElement) subject.get(0)).click(); waitForVisibilityOf(By.id("com.pointedsquares.gamy5.android:id/info_icon")); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/info_icon")).click(); waitForVisibilityOf(By.xpath("//android.widget.TextView[contains(@resource-id , 'app_info_title')]")); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/cross_button")).click(); waitForVisibilityOf(By.xpath("//android.widget.TextView[contains(@resource-id , 'app_info_title')]")); return new SNGTestCases(driver); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void closeBtnPressed () {\r\n PCNMClientStart.switchPanels(new NetMapSCR());\r\n }", "private void close() {\r\n this.dispose();\r\n MainClass.gamesPlayed++;\r\n Examples2018.menu();\r\n }", "public void close() {\n getCloseButton().click();\n }", "public void Checkout_button() {\n\t\tthis.endUser.checkOut();\n\t\tthis.defaultSetup();\n\t}", "private void closePopin() {\n\t\tlootDisplayed = false;\n\t\tinventoryCompo.setDisplayMode(InventoryDisplayModeEnum.NONE);\n\n\t\tmainTable.remove();\n\t\t\n\t\tif (room.getNextState() == null) {\n\t\t\troom.setNextState(room.getLastInGameState());\n\t\t}\n\t}", "@Action\n public void Close() {\n // just close the Frame\n // This will cause setVisible() in the constructor to return\n setVisible(false);\n \n // show reminder to reference my paper\n String str = \"If you like this program, please cite:\\n\"\n + \"K. P. Pernstich\\n\"\n + \"Instrument Control (iC) – An Open-Source Software to Automate Test Equipment\\n\"\n + \"Journal of Research of the National Institute of Standards and Technology\\n\"\n + \"Volume 117 (2012) http://dx.doi.org/10.6028/jres.117.010\";\n \n JOptionPane.showMessageDialog(null, str,\n \"Humble request\", JOptionPane.INFORMATION_MESSAGE, m_iC_Properties.getLogoSmall());\n }", "public boolean onClose() {\n\t\topenScreen(new Noticias());\n\t\treturn true ;\n\t}", "public void closeCashDrawer(CashDrawer cd);", "public void cancel() { Common.exitWindow(cancelBtn); }", "@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\tclose();\n\t\t\t}", "public void clickOnCloseButton(){\n\t\tDynamicFramePage.dynamicFrameForPanchart();\n\t\tDynamicFramePage.switchtoFraFrame();\n\t\tSeleniumUtil.getElementWithFluentWait(panProfileCloseicon).click();\n\t}", "void close() {\n boolean closeable = true;\n if (progressPanel.getStatus() != ReportStatus.CANCELED && progressPanel.getStatus() != ReportStatus.COMPLETE && progressPanel.getStatus() != ReportStatus.ERROR) {\n closeable = false;\n }\n if (closeable) {\n actionListener.actionPerformed(null);\n } else {\n int result = JOptionPane.showConfirmDialog(this,\n NbBundle.getMessage(this.getClass(),\n \"ReportGenerationPanel.confDlg.sureToClose.msg\"),\n NbBundle.getMessage(this.getClass(),\n \"ReportGenerationPanel.confDlg.title.closing\"),\n JOptionPane.YES_NO_OPTION);\n if (result == 0) {\n progressPanel.cancel();\n actionListener.actionPerformed(null);\n }\n }\n }", "public void closeDown() {\n\t\tdispose();\n\n\t}", "public void lobbyExitButton(MouseEvent event){\n event.consume();\n Client.sendMessageToServer(new Disconnection());\n Platform.exit();\n System.exit(APP_CLOSED_BY_LOBBY_EXIT_BUTTON);\n }", "public void endGame()\r\n {\r\n for (Cell c : gameBoard.bombList)\r\n {\r\n if (c.isBomb())\r\n {\r\n if (c.getText() == \"X\")\r\n {\r\n c.setId(\"correctFlag\");\r\n }\r\n else\r\n {\r\n c.setId(\"bombClicked\");\r\n }\r\n }\r\n else if (c.getText() == \"X\")\r\n {\r\n c.setId(\"incorrectFlag\");\r\n }\r\n c.setDisable(true);\r\n }\r\n if (gameBoard.emptyRemaining == 0)\r\n {\r\n win();\r\n }\r\n else\r\n {\r\n lose();\r\n }\r\n System.out.println(\"Game Over...\");\r\n scoreBoard.resetBtn.setDisable(false);\r\n }", "public void closeActionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\n\t\tthis.dispose();\n\t\tgetJCpgUIReference().setEnabled(true);\n\t\t\n\t}", "public void closeClick() {\n timeline.stop();\n threadWorker.shutDownExecutor();\n Platform.exit();\n }", "GUI(){\r\n super(\"Chess application\");\r\n\r\n setSize(550,700);\r\n setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\r\n this.addWindowListener( new WindowAdapter(){\r\n public void windowClosing(WindowEvent e)\r\n { \r\n String windowName = \"Exit Application\";\r\n String windowInfo = \"Do you want to exit Webale application?\";\r\n int result = JOptionPane.showConfirmDialog(middlePanel, windowInfo, windowName, JOptionPane.YES_NO_OPTION);\r\n if (result == JOptionPane.YES_OPTION)\r\n setDefaultCloseOperation(EXIT_ON_CLOSE);\r\n }\r\n });\r\n \r\n }", "@Override\n\tpublic void close() {\n\t\tframe = null;\n\t\tclassic = null;\n\t\trace = null;\n\t\tbuild = null;\n\t\tbt_classic = null;\n\t\tbt_race = null;\n\t\tbt_build = null;\n\t\tGameView.VIEW.removeDialog();\n\t}", "public void onCancelButtonClick() {\n close();\n }", "void close_actionPerformed(ActionEvent e){\n\t System.exit(0);\n\t }", "void onClose();", "public synchronized void clkOnClosePopBtn() {\n\t\ttry {\n\t\t\tWebActionUtil.waitForElement(closePopUpBtn, \"close btn\", 45);\n\t\t\tWebActionUtil.clickOnWebElement(closePopUpBtn, \"close btn\", \"Unable to CLICK on close btn\");\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\t WebActionUtil.error(e.getMessage());\n\t\t\tWebActionUtil.error(\"Unable to CLICK on close btn\");\n\t\t\tAssert.fail(\"Unable to CLICK on close btn\");\n\t\t}\n\t}", "private void closeBtnMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_closeBtnMouseClicked\n System.exit(0);\n }", "boolean isCloseButtonDisplayed();", "@Override\n\tpublic void onCloseAction() {\n\n\t}", "public void closeGame(int gameID){\n\t}", "public void onCancelClicked() {\n close();\n }", "public void close() \r\n {\r\n ((GrantsByPIForm) getControlledUI()).setVisible(false);\r\n }", "public void closeCashDrawer(String campusCode);", "public void close(){\n \tisClosed = true;\n \tClawAct.set(true);\n\t\tRobot.oi.armRumble(RUMBLE_DURATION);\n }", "public void actionPerformed(ActionEvent e){\n\t\t\t\t\t\t\tClientGui.this.closeUp();\n\t\t\t\t\t\t}", "public boolean checkAutoClose();", "private void closeProgram() {\n\t\tSystem.out.println(\"Cancel Button clicked\");\n\t\tif (ConfirmBox.display( \"Exit\", \"Are you sure you want to exit?\")) {\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "private void closeActionPerformed(java.awt.event.ActionEvent evt) {\n this.dispose();\n }", "public void newGame_close(View view) {\n dialog_newGame.dismiss();\n }", "public void close()\n {\n setVisible (false);\n dispose();\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n GameWindow.this.remove(menuPanel);\n GameWindow.this.updateUI();\n checkBoolean = true;\n }", "@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tConnectionDB.connectionClose(myFrame, Crawler.CON);\n\t}", "public void buttonClick(ClickEvent event) {\n\t\t\t\t\t\t \tclose();\n\t\t\t\t\t\t }", "void CloseOkDialog();", "protected void quitGame() {\n gameOver = true;\n }", "private void closeButtonActionPerformed(java.awt.event.ActionEvent evt) {\n\t\tsetVisible(false);\n\t}", "private void actionOnClicExit() {\r\n\t\tframe.setVisible(false);\r\n\t\tframe.dispose();\r\n\t}", "void windowClosed();", "@Override\n public void closeWindow() {\n \n }", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tnew TicketCheck();\n\t\t\t\tdispose(); // 해당 프레임만 사라짐\n\t\t\t}", "public void click_click_CloseModal_Button(){\r\n\t\tclick_CloseModal_Button.click();\r\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n guiD.closeWindow(rootPanel);\n }", "public check_out() {\n initComponents();\n }", "private void EndGame() {\n\t\tButton btnBottom_left = (Button) findViewById(R.id.btnBottom_left);\n\t\tButton btnBottom_center = (Button) findViewById(R.id.btnBottom_center);\n\t\tButton btnBottom_right = (Button) findViewById(R.id.btnBottom_right);\n\t\tButton btnTop_left = (Button) findViewById(R.id.btnTop_left);\n\t\tButton btnTop_center = (Button) findViewById(R.id.btnTop_center);\n\t\tButton btnTop_right = (Button) findViewById(R.id.btnTop_right);\n\t\tButton btnCenter_left = (Button) findViewById(R.id.btnCenter_left);\n\t\tButton btnCenter_center = (Button) findViewById(R.id.btnCenter_center);\n\t\tButton btnCenter_right = (Button) findViewById(R.id.btnCenter_right);\n\t\t\n\t\tbtnBottom_left.setEnabled(false);\n\t\tbtnBottom_center.setEnabled(false);\n\t\tbtnBottom_right.setEnabled(false);\n\t\tbtnTop_left.setEnabled(false);\n\t\tbtnTop_center.setEnabled(false);\n\t\tbtnTop_right.setEnabled(false);\n\t\tbtnCenter_left.setEnabled(false);\n\t\tbtnCenter_center.setEnabled(false);\n\t\tbtnCenter_right.setEnabled(false);\n\t\tgamePlaying = false;\n\t\t\n\t\tStopMusic();\n\t}", "private void closeProgram(){\n boolean answer = ConfirmBox.display(\"Title\", \"Sure you want to exit?\");\n if(answer==true){\n window.close();\n }\n }", "@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tint reply = JOptionPane.showConfirmDialog(null, \"Are you sure you want to leave us behind, my liege?\", \"Close?\", JOptionPane.YES_NO_OPTION);\n\t\tif (reply == JOptionPane.YES_OPTION)\n\t\t{\n\t\t System.exit(0);\n\t\t}\n\t}", "void btnCloseMap();", "public void closeButtonPushed(ActionEvent actionEvent) {\n editTeamPane.setDisable(true);\n editTeamPane.setVisible(false);\n darkPane.setDisable(true);\n darkPane.setVisible(false);\n editTeamLogoFile = null;\n }", "public static void close(){\r\n if (showingCloseDialog)\r\n return;\r\n showingCloseDialog = true;\r\n int result = JOptionPane.showConfirmDialog(mainFrame, \"Close Jin?\", \"Confirm\", JOptionPane.OK_CANCEL_OPTION);\r\n showingCloseDialog = false;\r\n switch (result){\r\n case JOptionPane.CANCEL_OPTION:\r\n case JOptionPane.CLOSED_OPTION:\r\n return;\r\n case JOptionPane.OK_OPTION:\r\n Jin.exit();\r\n break;\r\n default:\r\n System.err.println(\"Unknown option type: \"+result);\r\n }\r\n }", "private void close() {\n\t\t\t\t// name.getScene().getWindow().hide();\n\t\t\t\tdialogStage.fireEvent(new WindowEvent(dialogStage,WindowEvent.WINDOW_CLOSE_REQUEST));\n\t\t\t}", "private void closeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_closeButtonActionPerformed\n Simulation.stopSimulation();\n CloudSim.abruptallyTerminate();\n \n dispose();\n }", "private void onConfirmButtonPressed() {\r\n disposeDialogAndCreateNewGame();\r\n }", "public void Exit_button() {\n\t \t Stage stage = (Stage) btnExit.getScene().getWindow();\n\t \t \n\t \t stage.close();\n\t }", "void closeApp();", "private void onCancelButtonPressed() {\r\n disposeDialogAndCreateNewGame(); // Reset board,\r\n game.setCanPlaceMarks(false); // But don't start a new game.\r\n }", "public void actionPerformed(ActionEvent e) {\r\n if(ACTION_CLOSE.equals(e.getActionCommand())) {\r\n setVisible(false);\r\n dispose();\r\n }\r\n }", "@Override\n\tpublic void onGuiClosed()\n {\n }", "public void clickClose() {\n Stage stage = (Stage) btnClose.getScene().getWindow();\n stage.close();\n }", "public void onClickCancel()\n\t{\n\t\tsetVisible(false);\n\t\tdispose();\t\n\t}", "@Override\n\tpublic void windowClose(CloseEvent e) {\n\t\t\n\t}", "@Test(groups={\"ThemeDesigner007\", \"ThemeDesigner\"})\n\tpublic void themeDesigner007_closeColorDialogWithOutsideClick(){\n\t\tWikiBasePageObject base = new WikiBasePageObject(driver);\n\t\tbase.logInCookie(credentials.userNameStaff, credentials.passwordStaff, wikiURL);\n\t\tSpecialThemeDesignerPageObject designer = new SpecialThemeDesignerPageObject(driver);\n\t\tdesigner.openSpecialDesignerPage(wikiURL);\n\t\tdesigner.selectTab(Tab.Customize);\n\t\tdesigner.verifyCustomizeTab();\n\t\tdesigner.openImagePicker();\n\t\tdesigner.clickOutsideImagePicker();\n\t\tdesigner.verifyImagePickerDisappeared();\n\t}", "public ExitMenu(){\n\t\tint n = showConfirmDialog(null,\"Exit Game\", \"Exiting Game\",JOptionPane.YES_NO_OPTION);\n\t\tif(n==0)\n\t\t\tSystem.exit(0);\t\t\n\t}", "public static void closeButtonAction(){\n Stage stage = (Stage)icon_exit.getScene().getWindow();\n // do what you have to do\n stage.close();\n System.out.println(\"Stage Closed.\");\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tdialogExit();\r\n\t\t\t}", "public void close() {\n closePopup();\n }", "public boolean onClose() {\n\t\t\n\t\t TransitionContext transition = new TransitionContext(TransitionContext.TRANSITION_SLIDE);\n\t transition.setIntAttribute(TransitionContext.ATTR_DURATION, 200);\n\t transition.setIntAttribute(TransitionContext.ATTR_DIRECTION, TransitionContext.DIRECTION_RIGHT);\n\t transition.setIntAttribute(TransitionContext.ATTR_STYLE, TransitionContext.STYLE_PUSH);\n\t \n\t UiEngineInstance engine = Ui.getUiEngineInstance();\n\t engine.setTransition(this, null, UiEngineInstance.TRIGGER_PUSH, transition);\n\t // openScreen(new Menu());\n\t\treturn true;\n\t}", "public void dama_DamaCloseButtonListener() {\n this.buttonDisabled = false;\n }", "public void onClose() {\n }", "void close() {\r\n this.setVisible(false);\r\n this.dispose();\r\n }", "@Override\r\n\tpublic void onClose() {\n\t}", "protected void ACTION_B_EXIT(ActionEvent e) {\n\t\tsetVisible(false);\r\n\t\tdispose();\r\n\t}", "private void closeApp(){\n Boolean answer = ConfirmBox.display(\"ALERT!!\", \"Sure you want to exit?\");\n if (answer)\n window.close();\n }", "private void close(){\r\n boolean saveRequired = false;\r\n String messageKey = null;\r\n updateComments();\r\n if(getFunctionType() != TypeConstants.DISPLAY_MODE && isSaveRequired()) {\r\n saveRequired = true;\r\n if(xmlGenerationRequired()){\r\n messageKey = XML_OUT_OF_SYNC;\r\n }else{\r\n messageKey = WANT_TO_SAVE_CHANGES;\r\n }\r\n }else if(getFunctionType() != TypeConstants.DISPLAY_MODE && xmlGenerationRequired()) {\r\n saveRequired = true;\r\n messageKey = XML_OUT_OF_SYNC;\r\n }\r\n \r\n if(saveRequired) {\r\n int selection = CoeusOptionPane.showQuestionDialog(coeusMessageResources.parseMessageKey(messageKey), CoeusOptionPane.OPTION_YES_NO_CANCEL, CoeusOptionPane.DEFAULT_YES);\r\n if(selection == CoeusOptionPane.SELECTION_YES){\r\n save(true);\r\n }else if(selection == CoeusOptionPane.SELECTION_NO) {\r\n subAwardDlgWindow.dispose();\r\n }\r\n }else{\r\n subAwardDlgWindow.dispose();\r\n }\r\n }", "@Override\r\n\tprotected void window_closing(WindowEvent arg0) {\n\t\tLong result = examItemService.countNull(pk.longValue());\r\n\t\tString message = \"\";\r\n\t\tif ((questionNum - result) > 0) {\r\n\t\t\tmessage = \"还有\" + (questionNum - result) + \"道题未写,确认交卷?\";\r\n\t\t} else {\r\n\t\t\tmessage = \"确认交卷?\";\r\n\t\t}\r\n\t\tint option = JOptionPane.showConfirmDialog(null, message, \"系统提示\", JOptionPane.YES_NO_OPTION);\r\n\t\tif (option == JOptionPane.YES_OPTION) {\r\n\t\t\tLong trueItem = examItemService.countTrue(pk.longValue());\r\n\t\t\tLong totalScore = eiList.get(0).getStdScore() * trueItem;\r\n\t\t\tExam exam = examService.load(pk.longValue());\r\n\t\t\texam.setTotalScore(totalScore);\r\n\t\t\tJOptionPane.showMessageDialog(null, \"考试结束,\" + totalScore + \"分\");\r\n\t\t\tif (listFrm != null) {\r\n\t\t\t\tlistFrm.setVisible(true);\r\n\t\t\t\tthis.dispose();\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}", "private void closeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_closeButtonActionPerformed\n cancelled = true;\n dispose();\n }", "public void quitGame() {\n\t\tactive = false;\n\t}", "public static void closeMe() {\n window.close();\n }", "public void endGame() {\n Player player = playerManager.getWinner();\n MainActivity mainActivity = (MainActivity) this.getContext();\n updateLiveComment(\"Winner : \" + player.getName());\n mainActivity.setAlertDialog(player.getName()+\" Wins !\", \"Congratulations\", true);\n }", "protected void closeOnBack(){\n PosNegDialog dialog = new PosNegDialog(\"אזהרה\", \"אם תלחץ על המשך, המשחק יגמר.\\nלהמשיך?\",\n \"המשך\",\"ביטול\", ()-> {\n Intent exit = new Intent(getApplicationContext(), MainActivity.class);\n initGame();\n startActivity(exit);\n }\n ,()->{});\n dialog.show(getSupportFragmentManager(),\"closeOnBack\");\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n JOptionPane.showConfirmDialog(OverCounterForm.this, \"Check this out\");\n }", "public void exitGame(View view) {\n final Dialog alertDialog = new Dialog(MythFactGame.this,android.R.style.Theme_DeviceDefault_Dialog_NoActionBar);\n alertDialog.setContentView(R.layout.exit_game_dialog);\n alertDialog.setCancelable(false);\n\n // Setting Dialog Title\n alertDialog.setTitle(\"Game Over!!\");\n Button ok=(Button)alertDialog.findViewById(R.id.exitGameDialogButtonOK);\n Button cancel=(Button)alertDialog.findViewById(R.id.exitGameDialogButtonCancel);\n ok.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n addGameScoreToMainScore();\n MythFactGame.this.finish();\n }\n });\n cancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n alertDialog.dismiss();\n }\n });\n\n // Showing Alert Message\n alertDialog.show();\n }", "public void closeWindow() {\n\t\tframeUnableToBuyPopup.dispose();\n\t}", "@Override\r\n\t\t\t\t\tpublic void onClose() {\n\t\t\t\t\t}", "void forceClose();", "public void close(){\n this.boardController.close();\n }", "public EndGame(int way, Case bloc) {\n\t\tthis.c = bloc.t;\n\t\tthis.a = bloc;\n\t\tthis.x = this.c.length;\n\t\tthis.y = this.c[0].length;\n\n\t\tGame g =(Game) this.a.getParent();\n\t\tFenêtre f =(Fenêtre) SwingUtilities.getWindowAncestor(this.a);\n\t\t\n\t\tint sizex, sizey;\n\t\tsizex =(int) (f.getWidth()*0.8);\n\t\tsizey = f.getHeight();\n\t\t\n\t\tJButton b = new JButton(\"PlayAgain?\");\n\t\tb.setPreferredSize(new Dimension(f.getWidth()-sizex,(int) (sizey*0.2)));\n\t\tb.addActionListener(new Reactif(f));\n\t\tg.panel.add(b);\n\n\t\tf.revalidate();\n\t\tf.repaint();\n\n\t\tif (way==1) {\n\t\t\tLose();\t\t\n\t\t}\n\t\telse {\n\t\t\tWin();\n\t\t}\t\n\t}", "@Override\n public void actionPerformed(ActionEvent actionEvent) {\n if (askUserYesNo(\"Do you really want to quit?\")) {\n if(askUserYesNo(\"Do you want to save game?\")){\n game.saveGame();\n }\n System.exit(0);\n }\n }", "private void closeDialog(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_closeDialog\n setVisible(false); \n actionCommand = false;\n dispose();\n }", "public abstract void windowClose(CloseEvent e);", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdispose();\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdispose();\n\t\t\t\t\n\t\t\t}", "@Override\n public void windowClosing(WindowEvent e)\n {\n gui.exitApp();\n }", "@Override\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\tdispose();\r\n\t\t\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tGUIQuit quit = new GUIQuit();\n\t\t\t\tcloseFrame();\n\t\t\t}" ]
[ "0.6887789", "0.67889583", "0.67259806", "0.6611348", "0.65638185", "0.647962", "0.647466", "0.6430556", "0.63832474", "0.6378303", "0.6372614", "0.63412386", "0.6316231", "0.63138396", "0.6298178", "0.6297937", "0.62751037", "0.62682146", "0.62656826", "0.6254317", "0.6251233", "0.6248", "0.6243862", "0.6226841", "0.6198505", "0.61740273", "0.6158626", "0.6156314", "0.615161", "0.61503965", "0.61333466", "0.61286736", "0.61276203", "0.61215717", "0.6121166", "0.60905766", "0.60751444", "0.60703045", "0.6069782", "0.6060601", "0.6054813", "0.60537213", "0.6047449", "0.6044487", "0.60407245", "0.6038187", "0.60378826", "0.6033511", "0.603313", "0.60225487", "0.602151", "0.6017881", "0.60151374", "0.60087043", "0.6007815", "0.6005952", "0.59985137", "0.5995171", "0.59946823", "0.59920925", "0.5990711", "0.5985094", "0.597784", "0.59755963", "0.59723693", "0.5970131", "0.5968778", "0.5962344", "0.59575933", "0.5953659", "0.5920615", "0.5909112", "0.590547", "0.5895878", "0.5892466", "0.5882458", "0.58806103", "0.58791", "0.5877277", "0.587212", "0.5868011", "0.5863693", "0.58625776", "0.58485156", "0.584841", "0.5847688", "0.58349025", "0.5833418", "0.5832767", "0.58325607", "0.5829733", "0.5829389", "0.5829306", "0.58282405", "0.5816593", "0.5814419", "0.58108824", "0.58108824", "0.5804068", "0.57960314", "0.5795859" ]
0.0
-1
User try to join in middle of the game(When table has less than 6 members) (NOTE : This testcase require at list one active table with at list one vacant position)
public SNGTestCases JoinInMiddleOfTheGame_TC1009() throws InterruptedException{ String flavour = "Electrical"; forDebugger(); waitForElement(By.id("com.pointedsquares.gamy5.android:id/header_name"),120); try{ waitForElement(By.xpath("//android.widget.TextView[contains(@text , 'Academics') and contains(@resource-id , 'itemTitle')]") , 5); }catch(Exception ex){ driver.scrollTo("Academics"); } driver.findElement(By.xpath("//android.widget.TextView[contains(@text , 'Academics') and contains(@resource-id , 'itemTitle')]/following-sibling::android.widget.TextView[contains(@text , 'More')]")).click(); waitForElement(By.id("com.pointedsquares.gamy5.android:id/search_all"), 10); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/search_all")).click(); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/search_all")).sendKeys(flavour); driver.findElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'flavour_name_list') and contains(@text , 'Electrical Engineering')]")).click(); waitForElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'stake_amount') and contains(@text , '500')]"),5); driver.findElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'stake_amount') and contains(@text , '500')]")).click(); waitForElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'message_text') and contains(@text , 'You are about to play Electrical Engineering game with 500 coins stake.')]"), 5); driver.findElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'message_text') and contains(@text , 'You are about to play Electrical Engineering game with 500 coins stake.')]")).click(); driver.findElement(By.id("com.pointedsquares.gamy5.android:id/positive_button")).click(); waitForVisibilityOf(By.xpath("//android.widget.TextView[contains(@resource-id , 'response') and contains(@text , 'Finding room for you...')]")); Thread.sleep(5000); waitForElement(By.xpath("//android.widget.TextView[contains(@resource-id , 'response') and contains(@text , 'Still Waiting.....')]") , 2); return new SNGTestCases(driver); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "GameJoinResult join(Player player);", "public void join() {\n FacesContext fc = FacesContext.getCurrentInstance();\n try {\n UbikeUser current = (UbikeUser) BaseBean.getSessionAttribute(\"user\");\n ExternalContext exctx = fc.getExternalContext();\n HttpServletRequest request = (HttpServletRequest) exctx.getRequest();\n long groupId = Long.parseLong(request.getParameter(\"groupId\"));\n long userId = current.getId();\n MemberShip m = memberShipService.getMemberShip(userId, groupId);\n\n if (m != null) {\n fc.addMessage(\"join:join_status\", new FacesMessage(FacesMessage.SEVERITY_ERROR,\n \"You are already member of this group\",\n \"You are already member of this group\"));\n return;\n }\n\n UbikeGroup group = groupService.find(groupId);\n m = new MemberShip(current, group, Role.Member);\n memberShipService.create(m);\n fc.addMessage(\"join:join_status\", new FacesMessage(FacesMessage.SEVERITY_INFO,\n \"You joined the group \" + group.getName() + \" successfully\",\n \"You joined the group \" + group.getName() + \" successfully\"));\n\n List<MemberShip> members = (List<MemberShip>) BaseBean.getSessionAttribute(\"tmp_members\");\n if (members == null) {\n members = new ArrayList<MemberShip>();\n BaseBean.setSessionAttribute(\"tmp_members\", members);\n }\n members.add(m);\n } catch (Exception exp) {\n logger.log(Level.SEVERE, \"An error occurs while joinning group\", exp);\n fc.addMessage(\"join:join_status\", new FacesMessage(FacesMessage.SEVERITY_ERROR,\n \"An error occurs while processing your request\",\n \"An error occurs while processing your request\"));\n }\n }", "private void joinGame(int gameId){\n\n }", "public void joinGame(int selectedRow) {\n \t\tsynchronized (lobbyManager.getAvailableGames()) {\n \t\t\ttry {\n \t\t\t\tlobbyManager.joinGame(lobbyManager.getAvailableGames().get(selectedRow));\n \t\t\t} catch (IndexOutOfBoundsException e) {\n \t\t\t\t//Just to prevent a user trying to to rejoin a game that has been quit before refreshing\n \t\t\t}\n \t\t}\n \t}", "@Test\n public void allow_joining_when_open() {\n\n Deck deck = new Deck();\n\n Game game = new Game(deck);\n\n game.join(\"john\");\n\n\n\n assertThat(game.getPlayerNames(), is(new HashSet<>(Arrays.asList(\"john\"))));\n }", "@Test\n void joinQuiz() throws Exception {\n int oldCount = quizService.findById(1L).getParticipants().size();\n quizService.JoinQuiz(\"mahnaemehjeff\", \"S3NDB0BSANDV4G3N3\");\n int newCount = quizService.findById(1L).getParticipants().size();\n\n assertNotEquals(oldCount, newCount);\n }", "private void joinLobby(ActionEvent actionEvent, String name) throws ExecutionException, InterruptedException {\n FireStoreController fireStoreController = (FireStoreController) ControllerRegistry.get(FireStoreController.class);\n PlayerController playerController = (PlayerController) ControllerRegistry.get(PlayerController.class);\n if(!fireStoreController.checkExistence(token)){\n JoinLobbyViewTokenTextField.setText(\"This lobby does not exist\");\n }\n\n if(fireStoreController.getLobbySize(token) >= 8){\n LobbyAlreadyFullPopup.setVisible(true);\n }\n\n }", "@Test\n public void hasInjuredUnitJoiningUser() {\n assertEquals(0, dao.getUnitsWithTypeJoiningUser().size());\n assertFalse(cache.hasInjuredUnitJoiningUser());\n\n // Create a peasant and two soldiers joining the user.\n RoosterDaoUtil.creditUnit(dao, GameConfig.PEASANT_ID, 1, null);\n RoosterDaoUtil.creditUnit(dao, SOLDIER_UNIT_TYPE_ID, 2, null);\n\n // Create unrelated units at buildings.\n RoosterDaoUtil.creditUnit(dao, GameConfig.PEASANT_ID, 3, wheatFieldId);\n RoosterDaoUtil.creditUnit(dao, SOLDIER_UNIT_TYPE_ID, 4, wheatFieldId);\n\n // Test code.\n resetDataCache();\n assertFalse(cache.hasInjuredUnitJoiningUser());\n\n // Injure a unit.\n List<UnitWithType> unitsWithType = dao.getUnitsWithTypeJoiningUser();\n Unit unit = unitsWithType.get(0).getUnit();\n unit.setHealth(1);\n dao.update(unit);\n\n // Test code.\n assertFalse(cache.hasInjuredUnitJoiningUser()); // Ensure cache is accessed.\n resetDataCache();\n assertTrue(cache.hasInjuredUnitJoiningUser());\n }", "void joinGame(String playeruuid);", "@Test(timeout = 4000)\n public void test077() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.innerJoin(\"hd@\", (String[]) null, \"5|.Y]x-\", \"hd@\", (String[]) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test\n\tpublic void insideRoomTests() {\n\t\t//Tests middle of room\n\t\tSet<BoardCell> testList = board.getAdjList(3, 11);\n\t\tassertEquals(0, testList.size());\n\t\t//Tests a room space that is next to a walkway space\n\t\ttestList = board.getAdjList(16, 10);\n\t\tassertEquals(0, testList.size());\n\n\t}", "@Test\n public void be_playing_when_2_players_join() {\n\n Game game = new Game(new Deck());\n\n game.join(\"john\");\n game.join(\"mary\");\n\n assertThat(game.getState(), is(Game.State.PLAYING));\n\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.leftJoin(\"8\", (String[]) null, \"6>tpBolA_iS93{\\\"H\", \"6>tpBolA_iS93{\\\"H\", (String[]) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test043() throws Throwable {\n String[] stringArray0 = new String[8];\n String[] stringArray1 = new String[1];\n // Undeclared exception!\n try { \n SQLUtil.innerJoin(\"XSRS9.S, XSRS9.S, XSRS9.S, XSRS9.S, XSRS9.S, XSRS9.S\", stringArray0, \"create table\", (String) null, stringArray1);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 1\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "public static void checkQueue(){\n if(Duel.getLobby().getQueue().size() >= 2){\n Duel.getGameManager().startingAGame();\n// for(Player player : Bukkit.getOnlinePlayers()){\n// if(Lobby.getQueue().get(0).equals(player.getUniqueId()) || Lobby.getQueue().get(1).equals(player.getUniqueId())){\n// Duel.getGameManager().startingAGame();\n// }\n// for(UUID uuid : Lobby.getQueue()){\n// Duel.getGameManager().startingAGame();\n// }\n }\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n String[] stringArray0 = new String[8];\n String string0 = SQLUtil.leftJoin(\"r45_Ruks|DMzE=\", stringArray0, \"\", \" join \", stringArray0);\n assertEquals(\"left join as join on r45_Ruks|DMzE=.null = join .null and r45_Ruks|DMzE=.null = join .null and r45_Ruks|DMzE=.null = join .null and r45_Ruks|DMzE=.null = join .null and r45_Ruks|DMzE=.null = join .null and r45_Ruks|DMzE=.null = join .null and r45_Ruks|DMzE=.null = join .null and r45_Ruks|DMzE=.null = join .null\", string0);\n }", "@Test(timeout = 4000)\n public void test035() throws Throwable {\n String[] stringArray0 = new String[9];\n String[] stringArray1 = new String[3];\n // Undeclared exception!\n try { \n SQLUtil.leftJoin(\"b>%|z7\", stringArray0, \"Zu8j\", \" from \", stringArray1);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 3\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test078() throws Throwable {\n String[] stringArray0 = new String[8];\n String[] stringArray1 = new String[5];\n // Undeclared exception!\n try { \n SQLUtil.innerJoin(\"alter materialized viewjcsh%4%|@v9\", stringArray0, \"XhrVxu4;i/.33\", \"9r?Z}4J}-/e\\\"hH$jO\", stringArray1);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 5\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test\n void should_activate_tie_break_when_two_players_reach_set_6() {\n List<Integer> setPointOrderTab = Arrays.asList(1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2); // 6-6\n\n //WHEN\n game.computePoint(setPointOrderTab, true);\n\n //THEN\n assertEquals(GameStatus.IN_PROGRESS, game.getGameStatus());\n assertTrue(game.isTiebreakIsActivated());\n }", "@Test\n\tpublic void testAdjacencyRoomExit()\n\t{\n\t\t// TEST DOORWAY RIGHT \n\t\tSet<BoardCell> testList = board.getAdjList(18, 17);\n\t\tassertEquals(1, testList.size());\n\t\tassertTrue(testList.contains(board.getCellAt(18, 18)));\n\t\t// TEST DOORWAY LEFT \n\t\ttestList = board.getAdjList(4, 14);\n\t\tassertEquals(1, testList.size());\n\t\tassertTrue(testList.contains(board.getCellAt(4, 13)));\n\t\t//TEST DOORWAY DOWN\n\t\ttestList = board.getAdjList(5, 3);\n\t\tassertEquals(1, testList.size());\n\t\tassertTrue(testList.contains(board.getCellAt(6, 3)));\n\t\t//TEST DOORWAY UP\n\t\ttestList = board.getAdjList(18, 12);\n\t\tassertEquals(1, testList.size());\n\t\tassertTrue(testList.contains(board.getCellAt(17, 12)));\n\t}", "public boolean join(String gid, String userName, String job, String packName)\n\t{\n\t\t\t\t\n\t\tString gameUpdateQuery = \"update games set username2='\"+userName + \"', job2='\"+ job + \"' where id='\"+gid+\"'\"; \n\t\t\n\t\tSystem.out.println(gameUpdateQuery);\n\t\t\t\t\n\t\t// insert 30 cards into pack\n\t\t\n\t\tList<Card> cardList2=null;\n\t\t\n\t\tif(packName.equals(\"base_pack\"))\n\t\t{\n\t\t\tCardDao cardDao=(CardDao)SpringFactory.getFactory().getBean(\"cardDao\");\n\t\t\tcardList2=cardDao.getBaseCards(job);\n\t\t\tcardList2=randomize(cardList2);\n\t\t}\n\t\t\t\t\n\t\t\n\t\tList<String> cardInsertQuerys=new ArrayList<String>();\n\t\tfor(int i=0;i<cardList2.size();i++)\n\t\t{\n\t\t\tString cid=\"g\"+(i+31);\n\t\t\t\n\t\t\tString insertQuery=\"insert into gamecards (id, gid, uid, cardname, type, state) values ('\" +\n\t\t\t\tcid +\"','\" +\n\t\t\t\tgid +\"','\" +\n\t\t\t\t\"g62\" +\"','\" +\n\t\t\t\tcardList2.get(i).getName() +\n\t\t\t\t\"','pack','')\" ;\n\t\t\t\t\n\t\t\tcardInsertQuerys.add(insertQuery);\t\n\t\t}\n\t\t\t\t\n\t\t\n\t\t\n\t\tfor(String cardInsertQuery: cardInsertQuerys)\n\t\t{\n\t\t\tSystem.out.println(cardInsertQuery);\n\t\t}\n\t\t\n\t\t// change 4 cards into hand \n\t\t\n\t\tList<String> cardUpdateQuerys=new ArrayList<String>();\n\t\t\n\t\tfor(int i=0;i<4;i++)\n\t\t{\n\t\t\tString cid=\"g\"+(i+31);\n\t\t\tString updateQuery=\"update gamecards set type='hand' where id='\"+cid+\"' and gid='\"+gid+\"'\";\n\t\t\tcardUpdateQuerys.add(updateQuery);\n\t\t}\n\t\t\t\t\n\t\t\n\t\tfor(String cardUpdateQuery: cardUpdateQuerys)\n\t\t{\n\t\t\tSystem.out.println(cardUpdateQuery);\n\t\t}\n\t\t\n\t\t// insert two hero minions into herominion\n\t\t\n\t\tString heroMinionInsertQuery1=\"insert into herominion (id, gid, job, attack, blood, guard, state) values ('\" +\n\t\t\t\"g62\" +\"','\" +\n\t\t\tgid +\"','\" +\n\t\t\tjob +\n\t\t\t\"',0,30,0,'attackcount:1')\" ;\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(heroMinionInsertQuery1);\n\t\t//System.out.println(heroMinionInsertQuery2);\n\t\t\n\t\t// insert two weapons into weapon\n\t\t\n\t\tString weaponInsertQuery1=\"insert into weapon (id,gid,uid,attack,blood,state) values ('g64','\" +\n\t\t\tgid +\"','\" +\n\t\t\t\"g62\" +\"',0,0,'')\" ;\n\t\t\t\n\t\t\t\t\t\t\n\t\tSystem.out.println(weaponInsertQuery1);\n\t\t//System.out.println(weaponInsertQuery2);\n\t\t\n\t\tboolean ret=true;\n\t\t\t\t\n\t\t\n\t\t// connect to DB\n\t\tthis.jdbcTemplate.update(gameUpdateQuery);\n\t\t\t\t\t\n\t\tfor(String cardInsertQuery: cardInsertQuerys)\n\t\t{\n\t\t\tthis.jdbcTemplate.update(cardInsertQuery);\n\t\t}\n\t\t\n\t\tfor(String cardUpdateQuery: cardUpdateQuerys)\n\t\t{\n\t\t\tthis.jdbcTemplate.update(cardUpdateQuery);\n\t\t}\n\t\t\n\t\tthis.jdbcTemplate.update(heroMinionInsertQuery1);\n\t\t\t\t\t\n\t\tthis.jdbcTemplate.update(weaponInsertQuery1);\n\t\t\t\t\t\n\t\t\n\t\t\t\t\n\t\treturn ret;\n\t}", "void join(User user);", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.join(\"9hBrz\", \"}K|sSg.Lx\", (String[]) null, \"E&\", \"9hBrz\", (String[]) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test\r\n\tpublic void testAdjacencyRoomExit()\r\n\t{\r\n\t\t// TEST DOORWAY RIGHT \r\n\t\tSet<BoardCell> testList = board.getAdjList(19, 6);\r\n\t\tassertEquals(1, testList.size());\r\n\t\tassertTrue(testList.contains(board.getCellAt(19, 7)));\r\n\t\t// TEST DOORWAY LEFT \r\n\t\ttestList = board.getAdjList(22, 19);\r\n\t\tassertEquals(1, testList.size());\r\n\t\tassertTrue(testList.contains(board.getCellAt(22, 18)));\r\n\t\t//TEST DOORWAY DOWN\r\n\t\ttestList = board.getAdjList(7, 16);\r\n\t\tassertEquals(1, testList.size());\r\n\t\tassertTrue(testList.contains(board.getCellAt(8, 16)));\r\n\t\t//TEST DOORWAY UP\r\n\t\ttestList = board.getAdjList(10, 17);\r\n\t\tassertEquals(1, testList.size());\r\n\t\tassertTrue(testList.contains(board.getCellAt(9, 17)));\r\n\t\t//TEST DOORWAY UP, WHERE THERE'S A WALKWAY TO THE LEFT\r\n\t\ttestList = board.getAdjList(12, 22);\r\n\t\tassertEquals(1, testList.size());\r\n\t\tassertTrue(testList.contains(board.getCellAt(11, 22)));\r\n\t\t\r\n\t}", "boolean hasJoinGameRequest();", "public boolean joinGame(){\n\t\tJoinGameBean resultBean = new JoinGameBean();\n\t\tresultBean.setTo(jid);\n\t resultBean.setFrom(fromJID);\n\t resultBean.setType(XMPPBean.TYPE_RESULT);\n\t connection.sendPacket(new BeanIQAdapter(resultBean));\n//\t System.out.println(\"JoinGameBean vom typ RESULT an \" + jid + \" gesendet\");\n\t return true;\n\t}", "@Test(groups ={Slingshot,Regression})\n\t\tpublic void VerifyFullUserAccessJourneys() {\n\t\t\tReport.createTestLogHeader(\"MuMv\", \" Verify the Full user is able to perform journeys\");\n\t\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"Switchtopaperlessacctspecificsdata\");\t\t\n\t\t\tnew LoginAction()\n\t\t\t.BgbnavigateToLogin()\n\t\t\t.bgbloginDetails(userProfile);\t\t\n\t\t\tnew MultiUserMultiViewAction()\n\t\t\t.ManageAccountLink(userProfile)\n\t\t\t.verifyFullAccessuserjourneyverification();\t\t\n\t\t}", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Player player0 = new Player();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"y\");\n player0.reset(true);\n Player player1 = new Player((-1817));\n player0.reset(false);\n System.setCurrentTimeMillis((short)4919);\n System.setCurrentTimeMillis((short)4919);\n player1.isJoinOK(player0, false);\n System.setCurrentTimeMillis(2413L);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.innerJoin(\"CONTAINER ~-1T&NQX{&OP~@\", (String[]) null, \"CONTAINER ~-1T&NQX{&OP~@\", \"CONTAINER ~-1T&NQX{&OP~@\", (String[]) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "public abstract boolean kickPlayerOutOfTheGame(int game_id, String username) throws SQLException;", "private void whichPlayerHasTurn() throws PlayerOutOfTurn {\n if (test.equals(lastPicked)) {\n throw (new PlayerOutOfTurn());\n }\n }", "public void checkWin() {\n if (rockList.isEmpty() && trackerRockList.isEmpty() && bigRockList.isEmpty() && bossRockList.isEmpty()) {\n if (ship.lives < 5) {\n ship.lives++;\n }\n Level++;\n LevelIntermission = true;\n LevelIntermissionCount = 0;\n }\n }", "@Test(timeout = 4000)\n public void test056() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"SELECT * FROM join SELECT * FROM as SELECT * FROM on SELECT * FROM .SELECT * FROM = SELECT * FROM .SELECT * FROM and SELECT * FROM .null = SELECT * FROM .null and SELECT * FROM .SELECT * FROM = SELECT * FROM .SELECT * FROM and SELECT * FROM .null = SELECT * FROM .null and SELECT * FROM .null = SELECT * FROM .null and SELECT * FROM .null = SELECT * FROM .null\");\n assertTrue(boolean0);\n }", "@Override\n\tpublic boolean add(int roomnum, int remain, String starttime,//这里还要判断时间冲突 ??\n\t\t\tString endtime, String uname, String describe,String members[])//怎么添加不同数量的成员\n\t\t\tthrows RemoteException {\n\t\tboolean result =true;\n\t\tif(roomnum>0&remain>0&starttime!=null&endtime!=null&uname!=null& describe!=null)//保证数据有意义\n\t\t{\tSystem.out.println(1);\n\t\t\ttry{\n\t\t\t\tConnection conn=jdbcconnect.connnect();\n\t\t\t\tStatement stmt;\n\t\t\t\tResultSet rs;\n\t\t\t\tstmt=conn.createStatement();\n\t\t\t\tSystem.out.println(2);\n\t\t\t\tString sqlroom=\"select number from roominformations where roomnumber = \"+roomnum;\n\t\t\t\trs=stmt.executeQuery(sqlroom);\n\t\t\t\trs.next();\n\t\t\t\tif(rs.getInt(\"number\")>=remain){//房间冲突\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t//SimpleDateFormat sdf= new SimpleDateFormat(\"yyyy-MM-dd HH:mm-ss\");\n\t\t\t\t\t//java.util.Date dst=sdf.parse(starttime);\n\t\t\t\t\t //java.sql.Timestamp dst2= new java.sql.Timestamp(dst.getTime());\n\t\t\t\t\tString sqlrecords=\"insert into records(remain,starttime,endtime,roomnumber,uname,describetion) values\" +\n\t\t\t\t\t\t\t\"(\"+remain+\",'\"+starttime+\"','\"+endtime+\"',\"+roomnum+\",'\"+uname+\"','\"+describe+\"')\";\n\t\t\t\t\tString sqlrecords2=\"select rid from records where starttime= '\"+starttime+\"' and endtime= '\"+endtime+\"'and roomnumber= \"+roomnum;\n\t\t\t\t\tSystem.out.println(3);\n\t\t\t\t\tSystem.out.println(sqlrecords);\n\t\t\t\t\tSystem.out.println(sqlrecords2);\n\t\t\t\t\t\t//check uname exist or not in table users \n\t\t\t\t\t\t\n\t\t\t\t\t\tstmt.executeUpdate(sqlrecords);System.out.println(4);\n\t\t\t\t\t\trs=stmt.executeQuery(sqlrecords2);System.out.println(5);\n\t\t\t\t\t\trs.next();\n\t\t\t\t\t\tint rid=rs.getInt(\"rid\");\n\t\t\t\t\t\tSystem.out.print(rid);\n\t\t\t\t\t\tSystem.out.println(\"remain= \"+remain);\n\t\t\t\t\t\tString sqlmembers[]=new String[remain];\n\t\t\t\t\t\tfor(int i=0;i<remain;i++){\n\t\t\t\t\t\t\tsqlmembers[i] = \"insert into members values(\"+rid+\",\"+members[i]+\")\";\n\t\t\t\t\t\t\tstmt.execute(sqlmembers[i]);\n\t\t\t\t\t\t\tSystem.out.println(i);\n\t\t\t\t\t\t\tSystem.out.println(sqlmembers[i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tString sqlmembersown = \"insert into members values(\"+rid+\",\"+uname+\")\";\n\t\t\t\t\t\tstmt.execute(sqlmembersown);\n\t\t\t\t}else {System.out.println(\"the number is over the remain\"); result = false;}\n\t\t\t\trs.close();\n\t\t\t\tstmt.close();\n\t\t\t\tjdbcconnect.jdbcclose();\n\t\t\t}catch(Exception e){System.out.println(e);e.printStackTrace();result=false;}\n\t\t}\n\t\treturn result;\n\t}", "public void startGame(){\n\n AgentAddress coordinatorAddressPre = getAgentWithRole(\"investment_game\", \"tout_le_monde\", \"coordinator\");\n\n if (coordinatorAddressPre==null){\n Coordinator coordinator = new Coordinator();\n\n launchAgent(coordinator);\n\n pause(1000);\n }\n\n Set<Player> players = new HashSet<Player>();\n Player primaryPlayer = null;\n\n //now launch all human player avatar agents, each of them will be initialized as agent having a GUI frame\n Iterator<GameSpecification.PlayerSpecification> playerSpecs = gameSpecification.getPlayerSpecifications().iterator();\n\n int launchedHumanPlayers = 0;\n\n while (playerSpecs.hasNext()){\n GameSpecification.PlayerSpecification spec = playerSpecs.next();\n\n if (spec instanceof GameSpecification.HumanPlayerSpecification){\n\n HumanPlayerAvatar humanPlayerAvatar = new HumanPlayerAvatar(spec.getName());\n\n launchAgent(humanPlayerAvatar,true);\n\n players.add(humanPlayerAvatar);\n\n launchedHumanPlayers++;\n\n if (null == primaryPlayer){\n primaryPlayer=humanPlayerAvatar;\n }\n\n }\n }\n\n //launch computer player agents. If no human players have been launched, the first computer player will display a GUI frame.\n playerSpecs = gameSpecification.getPlayerSpecifications().iterator();\n\n boolean first = true;\n\n while (playerSpecs.hasNext()){\n GameSpecification.PlayerSpecification spec = playerSpecs.next();\n\n if (spec instanceof GameSpecification.ComputerPlayerSpecification){\n\n ChooseAmountStrategy chooseAmountStrategy = ((GameSpecification.ComputerPlayerSpecification) spec).getChooseAmountStrategy();\n\n SelectOpponentStrategy selectOpponentStrategy = ((GameSpecification.ComputerPlayerSpecification) spec).getSelectOpponentStrategy();\n \n ComputerPlayer computerPlayer = new ComputerPlayer(spec.getName(),spec.getPictureFileName(), chooseAmountStrategy, selectOpponentStrategy);\n\n chooseAmountStrategy.setPlayer(computerPlayer);\n\n selectOpponentStrategy.setPlayer(computerPlayer);\n\n launchAgent(computerPlayer, launchedHumanPlayers == 0 && first);\n\n players.add(computerPlayer);\n\n if (null == primaryPlayer){\n primaryPlayer=computerPlayer;\n }\n\n first = false;\n\n }\n }\n\n //request new game from coordinator\n AgentAddress coordinatorAddress;\n\n while((coordinatorAddress = getAgentWithRole(\"investment_game\",\"tout_le_monde\",\"coordinator\"))==null){\n pause(750);\n }\n\n String requestGameSpec = \"<new_game> <for> \"+gameSpecification.getPlayerSpecifications().size()+\" <players> <having> \"+gameSpecification.getRounds()+\" <rounds> <invite> 0 <computer_players>\";\n\n ActMessage reply = (ActMessage)sendMessageWithRoleAndWaitForReply(coordinatorAddress,new ActMessage(\"request_game\",requestGameSpec),\"jeromes_assistant\");\n\n if (reply.getAction().equals(\"game_initialized\")){\n\n final String gameId = reply.getContent();\n\n //let players join the game\n Iterator<Player> playerIterator = players.iterator();\n\n while (playerIterator.hasNext()){\n\n final Player player = playerIterator.next();\n final boolean isPrimaryPlayer = player.equals(primaryPlayer);\n\n new Thread(){\n @Override\n public void run() {\n player.joinGame(gameId,isPrimaryPlayer,player.getPicturePath());\n }\n }.start();\n\n }\n }else{\n //TODO throw Exception\n }\n\n }", "@EventHandler(priority = EventPriority.LOWEST)\n\tpublic void tooManyLoggedInAccounts(PlayerLoginEvent event){ // Set to join because if kicked on login ip info isnt tracked.\n\t\tUUID name = event.getPlayer().getUniqueId();\n\t\tint count = 0;\n\t\tint allowed = plugin.getConfig().getInt(\"banmanager.set.altlimit\");\n\t\tif (allowed == 0) return;\n\t\tList<UUID> alts = am.getAltsListUUID(name);\n\t\tPlayer[] players = Bukkit.getOnlinePlayers();\n\t\tfor (Player p: players)\n\t\t\tif(alts.contains(p.getUniqueId())) count++;\n\t\t\n\t\tif (count > allowed){\n\t\t\tString reason = plugin.getConfig().getString(\"banmanager.set.altlimitreason\");\n\t\t\tevent.setKickMessage(reason);\n\t\t\tevent.setResult(Result.KICK_BANNED);\n\t\t}\n\t}", "@Override\n\tpublic void playerJoining(String playerID) {\n\t}", "public abstract boolean onPreJoinGame(INetHandler netHandler, S01PacketJoinGame joinGamePacket);", "@Test(timeout = 4000)\n public void test054() throws Throwable {\n String[] stringArray0 = new String[8];\n String string0 = SQLUtil.join(\"inner\", \"create tablept5qf^h^w72cnj\", stringArray0, \"Y[W,@7e}2gcxB\", \"alter tableo\", stringArray0);\n assertEquals(\"Y[W,@7e}2gcxB as alter tableo on create tablept5qf^h^w72cnj.null = alter tableo.null and create tablept5qf^h^w72cnj.null = alter tableo.null and create tablept5qf^h^w72cnj.null = alter tableo.null and create tablept5qf^h^w72cnj.null = alter tableo.null and create tablept5qf^h^w72cnj.null = alter tableo.null and create tablept5qf^h^w72cnj.null = alter tableo.null and create tablept5qf^h^w72cnj.null = alter tableo.null and create tablept5qf^h^w72cnj.null = alter tableo.null\", string0);\n }", "@Test(timeout = 4000)\n public void test038() throws Throwable {\n String[] stringArray0 = new String[1];\n String[] stringArray1 = new String[3];\n // Undeclared exception!\n try { \n SQLUtil.leftJoin(\"aT7W`oI)N(jLl^oF<HQ.null\", stringArray1, \"aT7W`oI)N(jLl^oF<HQ\", \"aT7W`oI)N(jLl^oF<HQ\", stringArray0);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 1\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test134() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.leftJoin(\"deletesetci\", (String[]) null, \"deletesetci\", \"BouncyCastleProvider\", (String[]) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "public static String isOverlappingDB(List<Section> secs, String stu_id) {\n SessionFactory sessionFactory = HibernateUtil.getSessionFactory();\n Session session = null;\n String msg = \"\";\n List<Enroll> enrolled;\n \n try {\n session = sessionFactory.openSession();\n String qs = \"from Enroll where stuId = :stuId\";\n Query q = session.createQuery(qs);\n q.setString(\"stuId\", stu_id);\n\n enrolled = q.list();\n\n if (enrolled != null) {\n for (int j = 0; j < secs.size(); j++) {\n if (secs.get(j).getDays()!= null) {\n for (int k = 0; k < enrolled.size(); k++) {\n if (enrolled.get(k).getSection().getDays() != null) {\n char[] days1 = secs.get(j).getDays().toCharArray();\n char[] days2 = enrolled.get(k).getSection().getDays().toCharArray();\n\n //Labeling this loop to break after the condition is met once\n // so the message doesn't fill in for each day of the classes\n innerLoop:\n for (char c:days1) {\n for (char c2:days2) {\n if (c == c2) {\n if (isOverlapping(secs.get(j).getStartTime(), secs.get(j).getEndTime(), enrolled.get(k).getSection().getStartTime(), enrolled.get(k).getSection().getEndTime())) {\n msg += secs.get(j).getCourse().getCourseName() + \" occurs at the same time as your previously enrolled class, \" + enrolled.get(k).getSection().getCourse().getCourseName() + \"<br><br>\";\n break innerLoop;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n } catch(Exception e) {\n msg = \"CheckoutServlet data checking error: \" + e.getMessage();\n System.out.println(\"EnrollDB data checking error: \" + e.getMessage());\n } finally {\n session.close();\n }\n return msg;\n }", "public void run() {\r\n for(int i = group; i < 64; i += 4) {\r\n if(!m_teams[i].isOut()) {\r\n setSurvivingTeam(m_teams[i]);\r\n return;\r\n }\r\n }\r\n\r\n m_botAction.sendArenaMessage(\"No one won for Base \" + (group + 1));\r\n }", "@Override\n public long getJoinPositionCount()\n {\n return 0;\n }", "public boolean connect() {\n\t\ttry {\n\t\t\tcon = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/mcecon\",\"mecon\", \"B9eCusTa\"); //Connect\n\t\t\tStatement tableStatement = con.createStatement(); //Create new statement to create the table\n\t\t\ttableStatement.executeUpdate(\"CREATE TABLE IF NOT EXISTS `sonicleaderboard` (\" +\n\t\t\t\t\t\" `player` varchar(25) NOT NULL,\" +\n\t\t\t\t\t\" `finish_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,\" +\n\t\t\t\t\t\" `finish` int(10) NOT NULL,\" +\n\t\t\t\t\t\" `checkpoint1` int(10) NOT NULL,\" +\n\t\t\t\t\t\" `checkpoint2` int(10) NOT NULL,\" +\n\t\t\t\t\t\" `checkpoint3` int(10) NOT NULL,\" +\n\t\t\t\t\t\" `checkpoint4` int(10) NOT NULL,\" +\n\t\t\t\t\t\" `checkpoint5` int(10) NOT NULL,\" +\n\t\t\t\t\t\" `jump1` int(10) NOT NULL,\" +\n\t\t\t\t\t\" `jump2` int(10) NOT NULL,\" +\n\t\t\t\t\t\" `jump3` int(10) NOT NULL,\" +\n\t\t\t\t\t\" `jump4` int(10) NOT NULL,\" +\n\t\t\t\t\t\" `jump5` int(10) NOT NULL,\" +\n\t\t\t\t\t\" PRIMARY KEY (`player`,`finish_timestamp`), KEY `finish` (`finish`)\" +\n\t\t\t\t\t\") ENGINE=InnoDB DEFAULT CHARSET=latin1;\");\t\t\n\t\t\tisAlive = true;\n\t\t\tkeepAlive = true;\n\t\t\treturn true;\n\t\t} catch (SQLException e) {\n\t\t\t_.log(Level.SEVERE, sonic.getGamemode(), \"Failed to connect with leaderboards. SQLException: \"+ e.getMessage());\n\t\t\tisAlive = false;\n\t\t\tkeepAlive = false;\n\t\t\treturn false;\n\t\t}\n\t}", "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 }", "@Test\n\t/*\n\t * Checking Stalemate by \n\t * deleteing all pieces of Player 2 except 1 pawn but keeping it trapped.\n\t * Moving the King of Player 2 to such a positon that its not a check but cannot move.\n\t * here we are using the Queen of Player 1 to achieve that situation.\n\t */\n\tvoid testCheckStalemate() {\n\t\tm_oBoard.getPositionAgent(\"a8\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"b8\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"c8\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"d8\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"j8\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"k8\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"l8\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"a7\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"c7\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"d7\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"i7\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"j7\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"k7\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"l7\").getPiece().setPosition(null);\n\n\t\tm_oBoard.getPositionAgent(\"a8\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"b8\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"c8\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"d8\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"j8\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"k8\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"l8\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"a7\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"c7\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"d7\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"i7\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"j7\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"k7\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"l7\").setPiece(null);\n\t\t\t\t\n\t\t// Setting Player 1 Pawn from b2 to b4\n\t\tIPositionAgent oSourcePositionOfPawnWhite = m_oBoard.getPositionAgent(\"b2\");\n\t\tIPositionAgent oDestinationPositionOfPawnWhite = m_oBoard.getPositionAgent(\"b4\");\n\t\t\n\t\tIRuleAgent oRulepawnWhite= (IRuleAgent)m_oBoardFactory.createRule();\t\t\n\t\toRulepawnWhite.getRuleData().setRuleType(RuleType.MOVE);\n\t\toRulepawnWhite.getRuleData().setDirection(Direction.EDGE);\n\t\toRulepawnWhite.getRuleData().setMaxRecurrenceCount(Integer.MAX_VALUE);\n\t\toRulepawnWhite.getRuleData().setFile(File.SAME);\n\t\toRulepawnWhite.getRuleData().setRank(Rank.FORWARD);\n\t\toRulepawnWhite.getRuleData().setFamily(Family.IGNORE);\n\t\toRulepawnWhite.getRuleData().setManoeuvreStrategy(Manoeuvre.FILE_AND_RANK);\n\t\toRulepawnWhite.getRuleData().setName(\"MOVE\");\n\t\toRulepawnWhite.getRuleData().setCustomName(\"\");\n\t\t\n\t\tIMoveCandidate oMoveCandidatePawnWhite = new MoveCandidate(oRulepawnWhite, oSourcePositionOfPawnWhite.getPiece(), oSourcePositionOfPawnWhite, oDestinationPositionOfPawnWhite);\n\t\tm_oRuleEngine.tryExecuteRule(m_oBoard, oMoveCandidatePawnWhite);\n\t\t\n\t\t// Setting Player 2 Pawn from b7 to b5\n\t\tIPositionAgent oSourcePositionOfPawnBlack = m_oBoard.getPositionAgent(\"b7\");\n\t\tIPositionAgent oDestinationPositionOfPawnBlack = m_oBoard.getPositionAgent(\"b5\");\n\t\t\n\t\tIRuleAgent oRulepawnBlack= (IRuleAgent)m_oBoardFactory.createRule();\t\t\n\t\toRulepawnBlack.getRuleData().setRuleType(RuleType.MOVE);\n\t\toRulepawnBlack.getRuleData().setDirection(Direction.EDGE);\n\t\toRulepawnBlack.getRuleData().setMaxRecurrenceCount(Integer.MAX_VALUE);\n\t\toRulepawnBlack.getRuleData().setFile(File.SAME);\n\t\toRulepawnBlack.getRuleData().setRank(Rank.FORWARD);\n\t\toRulepawnBlack.getRuleData().setFamily(Family.IGNORE);\n\t\toRulepawnBlack.getRuleData().setManoeuvreStrategy(Manoeuvre.FILE_AND_RANK);\n\t\toRulepawnBlack.getRuleData().setName(\"MOVE\");\n\t\toRulepawnBlack.getRuleData().setCustomName(\"\");\n\t\t\n\t\tIMoveCandidate oMoveCandidatePawnBlack = new MoveCandidate(oRulepawnWhite, oSourcePositionOfPawnBlack.getPiece(), oSourcePositionOfPawnBlack, oDestinationPositionOfPawnBlack);\n\t\tm_oRuleEngine.tryExecuteRule(m_oBoard, oMoveCandidatePawnBlack);\n\t\t\t\t\n\t\t// Setting Player 2 king from i8 to l8\n\t\tIPositionAgent oSourcePositionOfKing = m_oBoard.getPositionAgent(\"i8\");\n\t\tIPositionAgent oDestinationPositionOfKing = m_oBoard.getPositionAgent(\"l8\");\n\t\t\n\t\tIRuleAgent oRuleKing= (IRuleAgent)m_oBoardFactory.createRule();\t\t\n\t\toRuleKing.getRuleData().setRuleType(RuleType.MOVE);\n\t\toRuleKing.getRuleData().setDirection(Direction.EDGE);\n\t\toRuleKing.getRuleData().setMaxRecurrenceCount(Integer.MAX_VALUE);\n\t\toRuleKing.getRuleData().setFile(File.SAME);\n\t\toRuleKing.getRuleData().setRank(Rank.FORWARD);\n\t\toRuleKing.getRuleData().setFamily(Family.IGNORE);\n\t\toRuleKing.getRuleData().setManoeuvreStrategy(Manoeuvre.FILE_AND_RANK);\n\t\toRuleKing.getRuleData().setName(\"MOVE\");\n\t\toRuleKing.getRuleData().setCustomName(\"\");\n\t\t\n\t\tIMoveCandidate oMoveCandidateKing = new MoveCandidate(oRuleKing, oSourcePositionOfKing.getPiece(), oSourcePositionOfKing, oDestinationPositionOfKing);\n\t\tm_oRuleEngine.tryExecuteRule(m_oBoard, oMoveCandidateKing);\n\t\t\n\t\t// Setting Player 1 queen from d1 to j7\n\t\tIPositionAgent oSourcePositionOfQueen = m_oBoard.getPositionAgent(\"d1\");\n\t\tIPositionAgent oDestinationPositionOfQueen = m_oBoard.getPositionAgent(\"j7\");\n\t\t\n\t\tIRuleAgent oRuleQueen= (IRuleAgent)m_oBoardFactory.createRule();\t\t\n\t\toRuleQueen.getRuleData().setRuleType(RuleType.MOVE);\n\t\toRuleQueen.getRuleData().setDirection(Direction.VERTEX);\n\t\toRuleQueen.getRuleData().setMaxRecurrenceCount(Integer.MAX_VALUE);\n\t\toRuleQueen.getRuleData().setFile(File.SAME);\n\t\toRuleQueen.getRuleData().setRank(Rank.FORWARD);\n\t\toRuleQueen.getRuleData().setFamily(Family.IGNORE);\n\t\toRuleQueen.getRuleData().setManoeuvreStrategy(Manoeuvre.FILE_AND_RANK);\n\t\toRuleQueen.getRuleData().setName(\"MOVE\");\n\t\toRuleQueen.getRuleData().setCustomName(\"\");\n\t\t\n\t\tIMoveCandidate oMoveCandidateQueen = new MoveCandidate(oRuleQueen, oSourcePositionOfQueen.getPiece(), oSourcePositionOfQueen, oDestinationPositionOfQueen);\n\t\tm_oRuleEngine.tryExecuteRule(m_oBoard, oMoveCandidateQueen);\n\t\t\n\t\tBoolean bExpected = true;\n\t\tBoolean bActual = m_oRuleProcessor.checkStalemate(m_oBoard, oDestinationPositionOfKing.getPiece().getPlayer());\n\n\t\tassertEquals(bExpected, bActual);\n\t\t\n\t}", "private static void addGameJoinLink(GameDto gameDto) {\n if (gameDto.getPlayers()[0] == null || gameDto.getPlayers()[1] == null) {\n Link joinLink =\n linkTo(methodOn(GameController.class).join(gameDto.get_id(), null)).withRel(\"join\");\n gameDto.add(joinLink);\n }\n }", "@Test(timeout = 4000)\n public void test042() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.innerJoin(\"lx<:FnA<j|x 3)\", (String[]) null, \"|$D1C%ID/XH,\", \"0Wp5dC9\", (String[]) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test133() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.innerJoin((String) null, (String[]) null, \"a6+0S\", \"a6+0S\", (String[]) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test\n void should_first_player_win_set_and_game_still_in_progress_when_tie_break_activated() {\n List<Integer> setPointOrderTab = Arrays.asList(1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1); // 6-6 and 1-0 for firstPlayer\n\n //WHEN\n game.computePoint(setPointOrderTab, true);\n\n //THEN\n assertEquals(GameStatus.IN_PROGRESS, game.getGameStatus());\n assertTrue(game.isTiebreakIsActivated());\n }", "private void yourturn() {\n if (whosturn != 3) {\n whosturn = 3;\n displayTable();\n }\n\n // TODO mega duplication\n int top = 0;\n // testing is player has a card they can play\n if (pile.notEmpty()) {\n boolean canplay = false;\n if (hand.getCard(0) == null) { // if player only has card on the table\n if (hand.isFaceUp()) // if player has faceup card on the table\n {\n for (int n = 0; n < 3; n++) {\n if (hand.getFaceUp(n) != null) {\n if (nine && pile.topValue() == 9) {\n top = 0;\n for (int i = 0; i < 52; i++) {\n if (pile.get(i) == null) {\n canplay = true;\n break;\n }\n if (pile.get(i).getValue() == 9) top++;\n else break;\n }\n }\n if (canplay) break;\n if (seven\n && pile.get(top).getValue() == 7\n && hand.getFaceUp(n).getValue() < 7) {\n canplay = true;\n break;\n } else if (hand.getFaceUp(n).getValue() == 2\n || hand.getFaceUp(n).getValue() == 10) {\n canplay = true;\n break;\n } else if (nine && hand.getFaceUp(n).getValue() == 9) {\n canplay = true;\n break;\n } else if (!seven || pile.get(top).getValue() != 7) {\n if (pile.get(top).getValue() <= hand.getFaceUp(n).getValue()) {\n canplay = true;\n break;\n }\n }\n }\n }\n } else // if player only has facedown cards\n canplay = true;\n } else {\n for (int n = 0; n < hand.length() - 1; n++) {\n if (hand.getCard(n) == null) break;\n if (nine && pile.topValue() == 9) {\n top = 0;\n for (int i = 0; i < 52; i++) {\n if (pile.get(i) == null) {\n canplay = true;\n break;\n }\n if (pile.get(i).getValue() == 9) top++;\n else break;\n }\n }\n if (canplay) break;\n if (hand.getCard(n).getValue() == 2 || hand.getCard(n).getValue() == 10) {\n canplay = true;\n break;\n }\n if (nine && hand.getCard(n).getValue() == 9) {\n canplay = true;\n break;\n }\n if (seven && pile.get(top).getValue() == 7 && hand.getCard(n).getValue() < 7) {\n canplay = true;\n break;\n } else if (seven != true || pile.get(top).getValue() != 7) {\n if (pile.get(top).getValue() <= hand.getCard(n).getValue()) {\n canplay = true;\n break;\n }\n }\n }\n }\n if (canplay) {\n // sh.addMsg(\"Its Your Turn\");\n sh.setmyTurn(true);\n } else { // cant play then must pick up the pile\n sh.addMsg(\n \"The card played was a \"\n + pile.top().getStringValue()\n + \" you had to pick up the pile. BLAOW\");\n pile.moveToHand(hand);\n sendCommand(\"turn:pickup:\");\n nextTurn();\n displayTable();\n }\n } else {\n // sh.addMsg(\"Its Your Turn\");\n sh.setmyTurn(true);\n }\n }", "@Override\n\tpublic void onJoinFailed() {\n\n\t}", "public boolean join(){\n\t\tif (joined) return true;\n\t\t\n StructuredDocument creds = null;\n try {\n AuthenticationCredential authCred = new AuthenticationCredential(peerGroup, null, creds );\n MembershipService membership = peerGroup.getMembershipService();\n Authenticator auth = membership.apply( authCred );\n \n // Check if everything is okay to join the group\n if (auth.isReadyForJoin()){\n Credential myCred = membership.join(auth);\n StructuredTextDocument doc = (StructuredTextDocument)\n myCred.getDocument(new MimeMediaType(\"text/plain\"));\n }\n else\n log.error(\"You cannot join repository\");\n }\n catch (Exception e){\n e.printStackTrace();\n }\n\n log.info(\"Joined to Virtual Repository (low-level)\");\n //change DatabaseDiscovery\n DatabaseDiscovery dd = new DatabaseDiscovery(peerGroup.getParentGroup());\n \n try {\n\t\t\tThread.sleep(2000);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n \n //looking for cmu service\n try {\n\t\t\tmanagementModule = dd.obtainManagementServ(peerGroup.getPeerID().toString());\n\t\t} catch (GridException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n \n \n //point to discovery service in joined group\n new DatabaseDiscovery(peerGroup);\n\n this.joined = true; \n \n\t\treturn true;\n\t}", "protected void SelectTournament() {\n\t // Torneo.length -> tournament size\n\t // if (tournament size == 2) then BinaryTournament\n this.setRanking();\n\t \n\t for (int i=0; i<this.PopLength; i++) {\n\t Torneo[0] = Randint(0,this.PopLength-1);\n\t int mejor_torneo=Torneo[0];\n\t \n\t for (int j=1; j<Torneo.length; j++) {\n\t boolean repetido= false;\n\t do {\n\t Torneo[j] = Randint(0,this.PopLength-1);\n\t repetido=false;\n\t int k=0;\n\t while ((k<j) && (!repetido))\n\t if (Torneo[j]==Torneo[k])\n\t repetido=true;\n\t else\n\t k++;\n\t } while (repetido);\n\t \n\t if (OLDevaluation[Torneo[j]] < OLDevaluation[mejor_torneo])\n\t mejor_torneo=Torneo[j];\n\t }\n\t sample[i] = mejor_torneo;\n\t }\n\t // Se crea la nueva poblacion\n\t for (int n=0; n<this.PopLength; n++) {\n\t int kk=sample[n];\n\t for (int m=0; m<this.NbGenes; m++) {\n\t NEWpopulation[n][m]= OLDpopulation[kk][m];\n\t }\n\t NEWevaluation[n]= OLDevaluation[kk];\n\t NEWevalIndex[n]= OLDevalIndex[kk];\n\t }\n }", "@Test\n void should_second_player_win_match_when_he_won_tie_break() {\n List<Integer> setPointOrderTab = Arrays.asList(1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 2); // 6-6 and 1-3 for secondPlayer\n\n //WHEN\n game.computePoint(setPointOrderTab, true);\n\n //THEN\n assertEquals(GameStatus.FINISHED, game.getGameStatus());\n assertTrue(secondPlayer.isWinner());\n }", "public void testMember(){\n\r\n parser.sqltext = \"select f from t1\";\r\n assertTrue(parser.parse() == 0);\r\n assertTrue(parser.sqlstatements.get(0).joins.getJoin(0).getKind() == TBaseType.join_source_fake );\r\n assertTrue(parser.sqlstatements.get(0).joins.getJoin(0).getTable().toString().compareToIgnoreCase(\"t1\") == 0);\r\n\r\n parser.sqltext = \"select f from t as t1 join t2 on t1.f1 = t2.f1\";\r\n assertTrue(parser.parse() == 0);\r\n assertTrue(parser.sqlstatements.get(0).joins.getJoin(0).getKind() == TBaseType.join_source_table );\r\n assertTrue(parser.sqlstatements.get(0).joins.getJoin(0).getTable().toString().compareToIgnoreCase(\"t\") == 0);\r\n assertTrue(parser.sqlstatements.get(0).joins.getJoin(0).getTable().getAliasClause().toString().compareToIgnoreCase(\"t1\") == 0);\r\n\r\n\r\n parser.sqltext = \"select a_join.f1 from (a as a_alias left join a1 on a1.f1 = a_alias.f1 ) as a_join join b on a_join.f1 = b.f1;\";\r\n assertTrue(parser.parse() == 0);\r\n TJoin lcJoin = parser.sqlstatements.get(0).joins.getJoin(0);\r\n //System.out.println(lcJoin.getKind());\r\n assertTrue(lcJoin.getKind() == TBaseType.join_source_join );\r\n\r\n assertTrue(lcJoin.getJoin().toString().compareToIgnoreCase(\"(a as a_alias left join a1 on a1.f1 = a_alias.f1 )\") == 0);\r\n assertTrue(lcJoin.getJoin().getAliasClause().toString().compareToIgnoreCase(\"a_join\") == 0);\r\n assertTrue(lcJoin.getJoin().getJoinItems().getJoinItem(0).getJoinType() == EJoinType.left);\r\n\r\n assertTrue(lcJoin.getJoinItems().getJoinItem(0).getJoinType() == EJoinType.join);\r\n\r\n parser.sqltext = \"select a_join.f1 from (a as a_alias left join a1 on a1.f1 = a_alias.f1 ) as a_join\";\r\n assertTrue(parser.parse() == 0);\r\n TJoin lcJoin1 = parser.sqlstatements.get(0).joins.getJoin(0);\r\n assertTrue(lcJoin1.getKind() == TBaseType.join_source_join );\r\n assertTrue(lcJoin1.getJoin().toString().compareToIgnoreCase(\"(a as a_alias left join a1 on a1.f1 = a_alias.f1 )\") == 0);\r\n assertTrue(lcJoin1.getJoin().getAliasClause().toString().compareToIgnoreCase(\"a_join\") == 0);\r\n\r\n }", "public boolean isJoin()\r\n {\n return false;\r\n }", "@Test\n\t/*\n\t * Checking Stalemate by \n\t * deleteing all pieces of Player 2 except 1 pawn, here pawn has movement and is not trapped.\n\t * Moving the King of Player 2 to such a positon that it cannot make a movement.\n\t * here we are using the Queen of Player 1 to achieve that situation.\n\t * In this case its not a stalemate as the pawn can move.\n\t */\n\tvoid testCheckStalemateWhenKingCantMove() {\n\t\tm_oBoard.getPositionAgent(\"a8\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"b8\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"c8\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"d8\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"j8\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"k8\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"l8\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"a7\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"c7\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"d7\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"i7\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"j7\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"k7\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"l7\").getPiece().setPosition(null);\n\n\t\tm_oBoard.getPositionAgent(\"a8\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"b8\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"c8\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"d8\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"j8\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"k8\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"l8\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"a7\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"c7\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"d7\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"i7\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"j7\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"k7\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"l7\").setPiece(null);\n\t\t\t\t\n\t\t// Setting Player 1 Pawn from b2 to b4\n\t\tIPositionAgent oSourcePositionOfPawnWhite = m_oBoard.getPositionAgent(\"b2\");\n\t\tIPositionAgent oDestinationPositionOfPawnWhite = m_oBoard.getPositionAgent(\"b4\");\n\t\t\n\t\tIRuleAgent oRulepawnWhite= (IRuleAgent)m_oBoardFactory.createRule();\t\t\n\t\toRulepawnWhite.getRuleData().setRuleType(RuleType.MOVE);\n\t\toRulepawnWhite.getRuleData().setDirection(Direction.EDGE);\n\t\toRulepawnWhite.getRuleData().setMaxRecurrenceCount(Integer.MAX_VALUE);\n\t\toRulepawnWhite.getRuleData().setFile(File.SAME);\n\t\toRulepawnWhite.getRuleData().setRank(Rank.FORWARD);\n\t\toRulepawnWhite.getRuleData().setFamily(Family.IGNORE);\n\t\toRulepawnWhite.getRuleData().setManoeuvreStrategy(Manoeuvre.FILE_AND_RANK);\n\t\toRulepawnWhite.getRuleData().setName(\"MOVE\");\n\t\toRulepawnWhite.getRuleData().setCustomName(\"\");\n\t\t\n\t\tIMoveCandidate oMoveCandidatePawnWhite = new MoveCandidate(oRulepawnWhite, oSourcePositionOfPawnWhite.getPiece(), oSourcePositionOfPawnWhite, oDestinationPositionOfPawnWhite);\n\t\tm_oRuleEngine.tryExecuteRule(m_oBoard, oMoveCandidatePawnWhite);\n\t\t\n\t\t// Setting Player 2 Pawn from b7 to b5\n\t\tIPositionAgent oSourcePositionOfPawnBlack = m_oBoard.getPositionAgent(\"b7\");\n\t\tIPositionAgent oDestinationPositionOfPawnBlack = m_oBoard.getPositionAgent(\"b4\");\n\t\t\n\t\tIRuleAgent oRulepawnBlack= (IRuleAgent)m_oBoardFactory.createRule();\t\t\n\t\toRulepawnBlack.getRuleData().setRuleType(RuleType.MOVE);\n\t\toRulepawnBlack.getRuleData().setDirection(Direction.EDGE);\n\t\toRulepawnBlack.getRuleData().setMaxRecurrenceCount(Integer.MAX_VALUE);\n\t\toRulepawnBlack.getRuleData().setFile(File.SAME);\n\t\toRulepawnBlack.getRuleData().setRank(Rank.FORWARD);\n\t\toRulepawnBlack.getRuleData().setFamily(Family.IGNORE);\n\t\toRulepawnBlack.getRuleData().setManoeuvreStrategy(Manoeuvre.FILE_AND_RANK);\n\t\toRulepawnBlack.getRuleData().setName(\"MOVE\");\n\t\toRulepawnBlack.getRuleData().setCustomName(\"\");\n\t\t\n\t\tIMoveCandidate oMoveCandidatePawnBlack = new MoveCandidate(oRulepawnWhite, oSourcePositionOfPawnBlack.getPiece(), oSourcePositionOfPawnBlack, oDestinationPositionOfPawnBlack);\n\t\tm_oRuleEngine.tryExecuteRule(m_oBoard, oMoveCandidatePawnBlack);\n\t\t\t\t\n\t\t// Setting Player 2 king from i8 to l8\n\t\tIPositionAgent oSourcePositionOfKing = m_oBoard.getPositionAgent(\"i8\");\n\t\tIPositionAgent oDestinationPositionOfKing = m_oBoard.getPositionAgent(\"l8\");\n\t\t\n\t\tIRuleAgent oRuleKing= (IRuleAgent)m_oBoardFactory.createRule();\t\t\n\t\toRuleKing.getRuleData().setRuleType(RuleType.MOVE);\n\t\toRuleKing.getRuleData().setDirection(Direction.EDGE);\n\t\toRuleKing.getRuleData().setMaxRecurrenceCount(Integer.MAX_VALUE);\n\t\toRuleKing.getRuleData().setFile(File.SAME);\n\t\toRuleKing.getRuleData().setRank(Rank.FORWARD);\n\t\toRuleKing.getRuleData().setFamily(Family.IGNORE);\n\t\toRuleKing.getRuleData().setManoeuvreStrategy(Manoeuvre.FILE_AND_RANK);\n\t\toRuleKing.getRuleData().setName(\"MOVE\");\n\t\toRuleKing.getRuleData().setCustomName(\"\");\n\t\t\n\t\tIMoveCandidate oMoveCandidateKing = new MoveCandidate(oRuleKing, oSourcePositionOfKing.getPiece(), oSourcePositionOfKing, oDestinationPositionOfKing);\n\t\tm_oRuleEngine.tryExecuteRule(m_oBoard, oMoveCandidateKing);\n\t\t\n\t\t// Setting Player 1 queen from d1 to j7\n\t\tIPositionAgent oSourcePositionOfQueen = m_oBoard.getPositionAgent(\"d1\");\n\t\tIPositionAgent oDestinationPositionOfQueen = m_oBoard.getPositionAgent(\"j7\");\n\t\t\n\t\tIRuleAgent oRuleQueen= (IRuleAgent)m_oBoardFactory.createRule();\t\t\n\t\toRuleQueen.getRuleData().setRuleType(RuleType.MOVE);\n\t\toRuleQueen.getRuleData().setDirection(Direction.VERTEX);\n\t\toRuleQueen.getRuleData().setMaxRecurrenceCount(Integer.MAX_VALUE);\n\t\toRuleQueen.getRuleData().setFile(File.SAME);\n\t\toRuleQueen.getRuleData().setRank(Rank.FORWARD);\n\t\toRuleQueen.getRuleData().setFamily(Family.IGNORE);\n\t\toRuleQueen.getRuleData().setManoeuvreStrategy(Manoeuvre.FILE_AND_RANK);\n\t\toRuleQueen.getRuleData().setName(\"MOVE\");\n\t\toRuleQueen.getRuleData().setCustomName(\"\");\n\t\t\n\t\tIMoveCandidate oMoveCandidateQueen = new MoveCandidate(oRuleQueen, oSourcePositionOfQueen.getPiece(), oSourcePositionOfQueen, oDestinationPositionOfQueen);\n\t\tm_oRuleEngine.tryExecuteRule(m_oBoard, oMoveCandidateQueen);\n\t\t\n\t\tBoolean bExpected = false;\n\t\tBoolean bActual = m_oRuleProcessor.checkStalemate(m_oBoard, oDestinationPositionOfKing.getPiece().getPlayer());\n\n\t\tassertEquals(bExpected, bActual);\n\t\t\n\t}", "private static void attemptToLogin() {\n\t\tString id = null;\n\t\tString password = null;\n\t\tString role = null;\n\t\tint chances = 3;\n\t\t//User will get 3 chances to login into the system.\n\t\twhile(chances-->0){\n\t\t\tlog.info(\"Email Id:\");\n\t\t\tid = sc.next();\n\t\t\tlog.info(\"Password:\");\n\t\t\tpassword = sc.next();\n\t\t\trole = LogInAuthentication.authenticate(id, password);\n\t\t\t//If correct credentials are entered then role of user will be fetch from the database. \n\t\t\tif(role == null) {\n\t\t\t\t//If role is not fetched, error and left chances will be shown.\n\t\t\t\tlog.error(\"Invalid EmailId or password\");\n\t\t\t\tlog.info(\"Chances left: \"+chances);\n\t\t\t}\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}\n\t\t//After verifying credentials User will be on-board to its portal depending upon the role.\n\t\tonboard(id,role);\n\t}", "@Override\n @Test\n public void testQuery_advancedRankingWithJoin() throws Exception { }", "public void setJoined() {\n\t\tstate = State.JOINED;\n\t}", "@Test(timeout = 4000)\n public void test055() throws Throwable {\n String[] stringArray0 = new String[6];\n String string0 = SQLUtil.join(\"inner\", \"alter session\", stringArray0, \"inner\", \"inner\", stringArray0);\n assertEquals(\"inner as inner on alter session.null = inner.null and alter session.null = inner.null and alter session.null = inner.null and alter session.null = inner.null and alter session.null = inner.null and alter session.null = inner.null\", string0);\n }", "@org.junit.Test\n public void test_PlayerWin(){\n deck.add(new Card(Suit.Club ,2)); //player\n deck.add(new Card(Suit.Diamond, 10)); //dealer\n deck.add(new Card(Suit.Spade, 11)); //player\n deck.add(new Card(Suit.Heart, 8)); //dealer\n deck.add(new Card(Suit.Diamond, 7)); //player\n deck.add(new Card(Suit.Heart, 9)); //dealer\n\n Start start= new Start(player,dealer,deck,table);\n Assert.assertTrue(start.checkBetValidity());\n start.deal();\n Assert.assertFalse(start.checkBlackJack());\n start.hit();\n Assert.assertEquals(20,start.playerHandValue());\n start.stand();\n Assert.assertEquals(Status.Players_wins,start.getGameStatus());\n }", "@Test\n\t\t\tpublic void besidesRoomTests() {\n\t\t\t\t//Testing walkway space that is next to the kitchen with no door\n\t\t\t\tSet<BoardCell> testList = board.getAdjList(6, 1);\n\t\t\t\tassertEquals(3, testList.size());\n\t\t\t\tassertTrue(testList.contains(board.getCellAt(5, 1)));\n\t\t\t\tassertTrue(testList.contains(board.getCellAt(6, 0)));\n\t\t\t\tassertTrue(testList.contains(board.getCellAt(6, 2)));\n\t\t\t\t//Testing walkway space that is next to two kitchen spaces with no door\n\t\t\t\ttestList = board.getAdjList(6, 20);\n\t\t\t\tassertEquals(2, testList.size());\n\t\t\t\tassertTrue(testList.contains(board.getCellAt(5, 20)));\n\t\t\t\tassertTrue(testList.contains(board.getCellAt(6, 19)));\n\t\t\t\t//Testing walkway space that is between two room spaces and an edge\n\t\t\t\ttestList = board.getAdjList(20, 15);\n\t\t\t\tassertTrue(testList.contains(board.getCellAt(19, 15)));\n\t\t\t\tassertEquals(1, testList.size());\n\n\t\t\t}", "@Test(timeout = 4000)\n public void test15() throws Throwable {\n FileSystemHandling.shouldThrowIOException((EvoSuiteFile) null);\n Player player0 = new Player(4906);\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"Qw_WlDP-TE\");\n Player player1 = new Player((short)4919);\n player0.setJoinOK(player1, false);\n boolean boolean0 = player0.isJoinOK(player1, false);\n assertTrue(boolean0);\n assertEquals(0L, player1.getTimeOfDeath());\n assertFalse(player1.isDead());\n assertEquals(10.0F, player1.getX(), 0.01F);\n assertTrue(player1.isConnected());\n assertEquals(0.0F, player1.getY(), 0.01F);\n assertEquals(1, player1.getStrength());\n assertEquals(0, player1.getPictureId());\n assertEquals(\"Player4919\", player1.toString());\n assertEquals(\"0.0.0.0\", player1.getIP());\n }", "@Test(timeout = 4000)\n public void test053() throws Throwable {\n String[] stringArray0 = new String[7];\n String string0 = SQLUtil.join(\"calloeqdkmcg0dtw\", \"4$\", stringArray0, stringArray0[3], \"insert\", stringArray0);\n assertEquals(\"calloeqdkmcg0dtw join null as insert on 4$.null = insert.null and 4$.null = insert.null and 4$.null = insert.null and 4$.null = insert.null and 4$.null = insert.null and 4$.null = insert.null and 4$.null = insert.null\", string0);\n }", "public void gameOverCheck() {\n //users\n if (tankTroubleMap.getUsers().size() != 0) {\n tankTroubleMap.setWinnerGroup(tankTroubleMap.getUsers().get(0).getGroupNumber());\n for (int i = 1; i < tankTroubleMap.getUsers().size(); i++) {\n if (tankTroubleMap.getUsers().get(i).getGroupNumber() != tankTroubleMap.getWinnerGroup())\n return;\n }\n }\n //bots\n int firstBot = 0;\n if (tankTroubleMap.getBots().size() != 0) {\n if (tankTroubleMap.getWinnerGroup() == -1) {\n firstBot = 1;\n tankTroubleMap.setWinnerGroup(tankTroubleMap.getBots().get(0).getGroupNumber());\n }\n for (int i = firstBot; i < tankTroubleMap.getBots().size(); i++) {\n if (tankTroubleMap.getBots().get(i).getGroupNumber() != tankTroubleMap.getWinnerGroup())\n return;\n }\n }\n tankTroubleMap.setGameOver(true);\n }", "public int startGame() {\n\t\tint counter = 0;\n\t\twhile (true) {\n\t\t\t\n\t\t\tPlayer current = (counter % 2 == 0) ? getPlayer1() : getPlayer2();\n\t\t\tint column = current.play(getGameBoard());\n\t\t\t\n\t\t\t// Check input validity:\n\t\t\t\n\t\t\tif(column < 0) {\n\t\t\t\tSystem.out.println(current.getName()+\" tries to play a negative column number -> disqualification.\");\n\t\t\t\treturn (current == player1)? 2 : 1;\n\t\t\t}\n\t\t\t\n\t \tif(isColumnFull(column, current)) {\n\t \t\tSystem.out.println(current.getName()+\" tries to play an already full column -> disqualification.\");\n\t \t\treturn (current == player1)? 2 : 1;\n\t \t}\n\t\t\t\n\t\t\tplayColumn(column, current);\n\t\t\tcounter++;\n\t\t\t\n\t\t\tif (isGameDrawn()) {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\t// For Player 1:\n\t\t\tif (hasWon(getPlayer1())) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// For Player 2:\n\t\t\tif (hasWon(getPlayer2())) {\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t\t\n\t\t\t// continue ...\n\t\t}\n\t}", "@Test\n\t/*\n\t * Checking Stalemate by \n\t * deleteing all pieces of Player 2 except 1 pawn but keeping it trapped.\n\t * Moving the King of Player 2 to such a positon that it can make more than 1 movements.\n\t * here we are using the Queen of Player 1 to achieve that situation.\n\t * In this case its not a stalemate as the king can move.\n\t */\n\tvoid testCheckStalemateWhenKingCanMove() {\n\t\tm_oBoard.getPositionAgent(\"a8\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"b8\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"c8\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"d8\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"j8\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"k8\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"l8\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"a7\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"c7\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"d7\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"i7\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"j7\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"k7\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"l7\").getPiece().setPosition(null);\n\n\t\tm_oBoard.getPositionAgent(\"a8\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"b8\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"c8\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"d8\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"j8\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"k8\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"l8\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"a7\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"c7\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"d7\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"i7\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"j7\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"k7\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"l7\").setPiece(null);\n\t\t\t\t\n\t\t// Setting Player 1 Pawn from b2 to b4\n\t\tIPositionAgent oSourcePositionOfPawnWhite = m_oBoard.getPositionAgent(\"b2\");\n\t\tIPositionAgent oDestinationPositionOfPawnWhite = m_oBoard.getPositionAgent(\"b4\");\n\t\t\n\t\tIRuleAgent oRulepawnWhite= (IRuleAgent)m_oBoardFactory.createRule();\t\t\n\t\toRulepawnWhite.getRuleData().setRuleType(RuleType.MOVE);\n\t\toRulepawnWhite.getRuleData().setDirection(Direction.EDGE);\n\t\toRulepawnWhite.getRuleData().setMaxRecurrenceCount(Integer.MAX_VALUE);\n\t\toRulepawnWhite.getRuleData().setFile(File.SAME);\n\t\toRulepawnWhite.getRuleData().setRank(Rank.FORWARD);\n\t\toRulepawnWhite.getRuleData().setFamily(Family.IGNORE);\n\t\toRulepawnWhite.getRuleData().setManoeuvreStrategy(Manoeuvre.FILE_AND_RANK);\n\t\toRulepawnWhite.getRuleData().setName(\"MOVE\");\n\t\toRulepawnWhite.getRuleData().setCustomName(\"\");\n\t\t\n\t\tIMoveCandidate oMoveCandidatePawnWhite = new MoveCandidate(oRulepawnWhite, oSourcePositionOfPawnWhite.getPiece(), oSourcePositionOfPawnWhite, oDestinationPositionOfPawnWhite);\n\t\tm_oRuleEngine.tryExecuteRule(m_oBoard, oMoveCandidatePawnWhite);\n\t\t\n\t\t// Setting Player 2 Pawn from b7 to b5\n\t\tIPositionAgent oSourcePositionOfPawnBlack = m_oBoard.getPositionAgent(\"b7\");\n\t\tIPositionAgent oDestinationPositionOfPawnBlack = m_oBoard.getPositionAgent(\"b5\");\n\t\t\n\t\tIRuleAgent oRulepawnBlack= (IRuleAgent)m_oBoardFactory.createRule();\t\t\n\t\toRulepawnBlack.getRuleData().setRuleType(RuleType.MOVE);\n\t\toRulepawnBlack.getRuleData().setDirection(Direction.EDGE);\n\t\toRulepawnBlack.getRuleData().setMaxRecurrenceCount(Integer.MAX_VALUE);\n\t\toRulepawnBlack.getRuleData().setFile(File.SAME);\n\t\toRulepawnBlack.getRuleData().setRank(Rank.FORWARD);\n\t\toRulepawnBlack.getRuleData().setFamily(Family.IGNORE);\n\t\toRulepawnBlack.getRuleData().setManoeuvreStrategy(Manoeuvre.FILE_AND_RANK);\n\t\toRulepawnBlack.getRuleData().setName(\"MOVE\");\n\t\toRulepawnBlack.getRuleData().setCustomName(\"\");\n\t\t\n\t\tIMoveCandidate oMoveCandidatePawnBlack = new MoveCandidate(oRulepawnWhite, oSourcePositionOfPawnBlack.getPiece(), oSourcePositionOfPawnBlack, oDestinationPositionOfPawnBlack);\n\t\tm_oRuleEngine.tryExecuteRule(m_oBoard, oMoveCandidatePawnBlack);\n\t\t\t\t\n\t\t// Setting Player 2 king from i8 to l8\n\t\tIPositionAgent oSourcePositionOfKing = m_oBoard.getPositionAgent(\"i8\");\n\t\tIPositionAgent oDestinationPositionOfKing = m_oBoard.getPositionAgent(\"l8\");\n\t\t\n\t\tIRuleAgent oRuleKing= (IRuleAgent)m_oBoardFactory.createRule();\t\t\n\t\toRuleKing.getRuleData().setRuleType(RuleType.MOVE);\n\t\toRuleKing.getRuleData().setDirection(Direction.EDGE);\n\t\toRuleKing.getRuleData().setMaxRecurrenceCount(Integer.MAX_VALUE);\n\t\toRuleKing.getRuleData().setFile(File.SAME);\n\t\toRuleKing.getRuleData().setRank(Rank.FORWARD);\n\t\toRuleKing.getRuleData().setFamily(Family.IGNORE);\n\t\toRuleKing.getRuleData().setManoeuvreStrategy(Manoeuvre.FILE_AND_RANK);\n\t\toRuleKing.getRuleData().setName(\"MOVE\");\n\t\toRuleKing.getRuleData().setCustomName(\"\");\n\t\t\n\t\tIMoveCandidate oMoveCandidateKing = new MoveCandidate(oRuleKing, oSourcePositionOfKing.getPiece(), oSourcePositionOfKing, oDestinationPositionOfKing);\n\t\tm_oRuleEngine.tryExecuteRule(m_oBoard, oMoveCandidateKing);\n\t\t\n\t\t// Setting Player 1 queen from d1 to k5\n\t\tIPositionAgent oSourcePositionOfQueen = m_oBoard.getPositionAgent(\"d1\");\n\t\tIPositionAgent oDestinationPositionOfQueen = m_oBoard.getPositionAgent(\"k5\");\n\t\t\n\t\tIRuleAgent oRuleQueen= (IRuleAgent)m_oBoardFactory.createRule();\t\t\n\t\toRuleQueen.getRuleData().setRuleType(RuleType.MOVE);\n\t\toRuleQueen.getRuleData().setDirection(Direction.VERTEX);\n\t\toRuleQueen.getRuleData().setMaxRecurrenceCount(Integer.MAX_VALUE);\n\t\toRuleQueen.getRuleData().setFile(File.SAME);\n\t\toRuleQueen.getRuleData().setRank(Rank.FORWARD);\n\t\toRuleQueen.getRuleData().setFamily(Family.IGNORE);\n\t\toRuleQueen.getRuleData().setManoeuvreStrategy(Manoeuvre.FILE_AND_RANK);\n\t\toRuleQueen.getRuleData().setName(\"MOVE\");\n\t\toRuleQueen.getRuleData().setCustomName(\"\");\n\t\t\n\t\tIMoveCandidate oMoveCandidateQueen = new MoveCandidate(oRuleQueen, oSourcePositionOfQueen.getPiece(), oSourcePositionOfQueen, oDestinationPositionOfQueen);\n\t\tm_oRuleEngine.tryExecuteRule(m_oBoard, oMoveCandidateQueen);\n\t\t\n\t\tBoolean bExpected = false;\n\t\tBoolean bActual = m_oRuleProcessor.checkStalemate(m_oBoard, oDestinationPositionOfKing.getPiece().getPlayer());\n\n\t\tassertEquals(bExpected, bActual);\n\t\t\n\t}", "@Test\n public void testFullGameOwinMinor() throws AuthenticationException {\n Map<String, String> data = gameInitializationService.createGame();\n Integer gameId = Integer.parseInt(data.get(GAME_ID));\n final String tokenPlayerX = data.get(TOKEN);\n final String tokenPlayerO = gameInitializationService.joinGame(gameId);\n Assertions.assertTrue(gamePlayService.playGame(gameId, \"A1\", tokenPlayerO), \"Test game - O is playing A1.\");\n Assertions.assertTrue(gamePlayService.playGame(gameId, \"B1\", tokenPlayerX), \"Test game - X is playing B1.\");\n Assertions.assertTrue(gamePlayService.playGame(gameId, \"B2\", tokenPlayerO), \"Test game - O is playing B2.\");\n Assertions.assertTrue(gamePlayService.playGame(gameId, \"A2\", tokenPlayerX), \"Test game - X is playing A2.\");\n Assertions.assertTrue(gamePlayService.playGame(gameId, \"C3\", tokenPlayerO), \"Test game - O is playing C3.\");\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n FileSystemHandling.shouldThrowIOException((EvoSuiteFile) null);\n Player player0 = new Player(4906);\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"Qw_WlDP-TE\");\n Player player1 = new Player(4906);\n Player player2 = new Player((-1098));\n player0.setJoinOK(player2, false);\n player1.setJoinOK(player0, true);\n player0.isJoinOK(player2, true);\n System.setCurrentTimeMillis(4906);\n }", "boolean shouldStartGame(Room room) {\n int connectedPlayers = 0;\n for (Participant p : room.getParticipants()) {\n if (p.isConnectedToRoom()) ++connectedPlayers;\n }\n return connectedPlayers >= MIN_PLAYERS;\n }", "public void tryAct() {\n\n List<Player> onCardPlayers = new ArrayList<Player>();\n List<Player> offCardPlayers = new ArrayList<Player>();\n if (currentPlayer.isEmployed() == true) {\n if(!currentPlayer.getHasPlayed()){\n onCardPlayers = findPlayers(currentPlayer.getLocation().getOnCardRoles());\n offCardPlayers = findPlayers(currentPlayer.getLocation().getOffCardRoles());\n currentPlayer.act(onCardPlayers, offCardPlayers);\n refreshPlayerPanel();\n }\n else{\n view.showPopUp(currentPlayer.isComputer(), \"You've already moved, rehearsed or acted this turn. Try a different command or click `end turn` to end your turn.\");\n }\n }\n else {\n view.showPopUp(currentPlayer.isComputer(), \"You're not employed, so you need to take a role before you can act.\");\n }\n view.updateSidePanel(playerArray);\n }", "@Test\n public void testFullGameOwinMajor() throws AuthenticationException {\n Map<String, String> data = gameInitializationService.createGame();\n Integer gameId = Integer.parseInt(data.get(GAME_ID));\n final String tokenPlayerX = data.get(TOKEN);\n final String tokenPlayerO = gameInitializationService.joinGame(gameId);\n Assertions.assertTrue(gamePlayService.playGame(gameId, \"A3\", tokenPlayerO), \"Test game - O is playing A3.\");\n Assertions.assertTrue(gamePlayService.playGame(gameId, \"B1\", tokenPlayerX), \"Test game - X is playing B1.\");\n Assertions.assertTrue(gamePlayService.playGame(gameId, \"B2\", tokenPlayerO), \"Test game - O is playing B2.\");\n Assertions.assertTrue(gamePlayService.playGame(gameId, \"A1\", tokenPlayerX), \"Test game - X is playing A1.\");\n Assertions.assertTrue(gamePlayService.playGame(gameId, \"C1\", tokenPlayerO), \"Test game - O is playing C1.\");\n }", "@Test\n\t\t\tpublic void testRoomEntry()\n\t\t\t{\n\t\t\t\t// two steps from a room two steps away\n\t\t\t\tboard.calcTargets(13, 10, 2);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(14, 9)));\n\t\t\t\t\n\t\t\t\t//Test entering a door when steps are greater than distance to room\n\t\t\t\tboard.calcTargets(8, 7, 8);\n\t\t\t\ttargets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(12, 6)));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "@Override\r\n public void isLeader() {\n }", "@Test(timeout = 4000)\n public void test027() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.leftJoin((String) null, (String[]) null, \")xz0-CV0i;\", \"call\", (String[]) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "public void testTableroLleno( )\n {\n setupEscenario2( );\n for( int i = 1; i <= 9; i++ )\n {\n triqui.marcarCasilla( i, marcaJugador1 );\n }\n assertTrue( triqui.tableroLleno( ) );\n }", "public void tryUpgrade() {\n int maxLevel = 6;\n if(currentPlayer.getLocation().getName().equals(\"office\")){\n if(currentPlayer.getRank() < maxLevel){ // player not at max level, allow upgrade\n upgrade();\n \n refreshPlayerPanel();\n view.changeCurrentPlayer(currentPlayer.getName(), currentPlayer.getPlayerDiePath(), numDays);\n }\n else{\n view.showPopUp(currentPlayer.isComputer(), \"You are already max level: \" + maxLevel);\n }\n \n }\n else{\n view.showPopUp(currentPlayer.isComputer(), \"You are not located in the office, move to the office\");\n }\n view.updateSidePanel(playerArray);\n }", "void opponentInRoom();", "public boolean joinHelper(Person p){\n\t return false;\n\t}", "@FXML\n private void fastMatch() {\n if (Client.getUser().getState() != Type.UserState.IDLE) {\n JOptionPane.showMessageDialog(null, \"您已经在房间中\");\n return;\n }\n Room match = null;\n for (Room room : Client.roomsMap.values()) {\n if (room.hasSeat()) {\n match = room;\n Client.getUser().setRoom(match.getId());\n Client.getUser().setState(Type.UserState.READY);\n Client.updateUser();\n match.setState(Type.RoomState.READY);\n if (match.getPlayer1() == null || match.getPlayer1().isEmpty()) {\n match.setPlayer1(Client.getUser().getAccount());\n Client.updateRoom(room, Type.UpdateRoom.PLAYER1IN);\n } else {\n match.setPlayer2(Client.getUser().getAccount());\n Client.updateRoom(room, Type.UpdateRoom.PLAYER2IN);\n }\n break;\n }\n }\n if (match != null) {\n client.gotoGame(match);\n } else {\n int res = JOptionPane.showConfirmDialog(null, \"暂时找不到匹配的房间哦,是否要自己创建一个呢?\", \"未找到匹配的房间\", JOptionPane.YES_NO_OPTION);\n if (res == JOptionPane.YES_OPTION) {\n client.gotoCreateRoom();\n }\n }\n }", "public abstract boolean inviteFriendToPlay(int game_id, String username1, String username2) throws SQLException;", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n String[] stringArray0 = new String[0];\n String string0 = SQLUtil.innerJoin(\" zELECT l `kROM&\", stringArray0, \" zELECT l `kROM&\", \" zELECT l `kROM&\", stringArray0);\n assertEquals(\" zELECT l `kROM& as zELECT l `kROM& on \", string0);\n }", "long getLobbyJoinTimeMs();", "@Test\n\tpublic void testAdjacencyWalkways()\n\t{\n\t\t// Test on top edge of board, just one walkway piece\n\t\tSet<BoardCell> testList = board.getAdjList(22, 9);\n\t\tassertTrue(testList.contains(board.getCellAt(21, 9)));\n\t\tassertEquals(1, testList.size());\n\n\t\t// Test left edge of board, edge of room\n\t\ttestList = board.getAdjList(16, 0);\n\t\tassertTrue(testList.contains(board.getCellAt(17, 0)));\n\t\tassertTrue(testList.contains(board.getCellAt(16, 1)));\n\t\tassertEquals(2, testList.size());\n\n\t\t// Test on left edge of board, three walkway pieces\n\t\ttestList = board.getAdjList(6, 0);\n\t\tassertTrue(testList.contains(board.getCellAt(5, 0)));\n\t\tassertTrue(testList.contains(board.getCellAt(6, 1)));\n\t\tassertTrue(testList.contains(board.getCellAt(7, 0)));\n\t\tassertEquals(3, testList.size());\n\n\t\t// Test surrounded by 4 walkways\n\t\ttestList = board.getAdjList(16,19);\n\t\tassertTrue(testList.contains(board.getCellAt(15, 19)));\n\t\tassertTrue(testList.contains(board.getCellAt(17, 19)));\n\t\tassertTrue(testList.contains(board.getCellAt(16, 20)));\n\t\tassertTrue(testList.contains(board.getCellAt(16, 18)));\n\t\tassertEquals(4, testList.size());\n\n\t\t// Test on bottom edge of board, next to 1 room piece\n\t\ttestList = board.getAdjList(22, 15);\n\t\tassertTrue(testList.contains(board.getCellAt(21, 15)));\n\t\tassertTrue(testList.contains(board.getCellAt(22, 16)));\n\t\tassertEquals(2, testList.size());\n\n\n\t\t// Test on walkway next to door that is not in the needed\n\t\t// direction to enter\n\t\ttestList = board.getAdjList(9, 6);\n\t\tassertTrue(testList.contains(board.getCellAt(8, 6)));\n\t\tassertTrue(testList.contains(board.getCellAt(9, 7)));\n\t\tassertTrue(testList.contains(board.getCellAt(10, 6)));\n\t\tassertEquals(3, testList.size());\n\t}", "public int performDuel(){\n Random rand = new Random();\n int intRand;\n intRand = rand(6);\n while(this.engine.getGameInformation().cards[intRand][intRand] == 0 ){\n intRand = rand(6);\n }\n return intRand;\n }", "@Override\r\n\tpublic void join(MemberBean bean, HttpServletResponse response, HttpServletRequest request) throws Exception {\n\t\tint result = 0;\r\n\t\ttry {\r\n\t\tresult = memberdao.join(bean);\r\n\t\t} catch(Exception e) {\r\n\t\t\tserviceutil.AccessDenial(response, \"가입실패\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tPrintWriter out = response.getWriter();\r\n\t\tif(result!=1) {\r\n\t\t\t\r\n\t\t\tout.println(\"<script>\");\r\n\t\t\tout.println(\"alert('가입 실패');\");\r\n\t\t\tout.println(\"history.go(-1);\");\r\n\t\t\tout.println(\"</script>\");\r\n\t\t} else if(result==1) {\r\n\t\t\tout.println(\"<script>\");\r\n\t\t\tout.println(\"alert('가입 성공');\");\r\n\t\t\tout.println(\"location.assign(\"+\"location.hostname+location.port\"+request.getContextPath()+\");\");\r\n\t\t\tout.println(\"</script>\");\r\n\t\t}\r\n\t}", "public SNGTestCases PlayerJoin_TC1007() throws InterruptedException{\n \tString flavour = \"Electrical\";\n \t\n \ttry{\n \t\twaitForVisibilityOf(By.id(\"com.pointedsquares.gamy5.android:id/debug_cancel\"));\n \t\tdriver.findElement(By.id(\"com.pointedsquares.gamy5.android:id/debug_cancel\")).click();\n \t}catch(Exception ex){\n \t\t\n \t}\n \ttry{\n \t\twaitForElement(By.xpath(\"//android.widget.TextView[contains(@text , 'Academics') and contains(@resource-id , 'itemTitle')]\") , 40);\n \t}catch(Exception ex){\n \t\tdriver.scrollTo(\"Academics\");\n \t}\n \tdriver.findElement(By.xpath(\"//android.widget.TextView[contains(@text , 'Academics') and contains(@resource-id , 'itemTitle')]/following-sibling::android.widget.TextView[contains(@text , 'More')]\")).click();\n \twaitForElement(By.id(\"com.pointedsquares.gamy5.android:id/search_all\"), 10);\n \tdriver.findElement(By.id(\"com.pointedsquares.gamy5.android:id/search_all\")).click();\n \tdriver.findElement(By.id(\"com.pointedsquares.gamy5.android:id/search_all\")).sendKeys(flavour);\n \tdriver.findElement(By.xpath(\"//android.widget.TextView[contains(@resource-id , 'flavour_name_list') and contains(@text , 'Electrical Engineering')]\")).click();\n \tdriver.findElement(By.xpath(\"//android.widget.TextView[contains(@resource-id , 'stake_amount') and contains(@text , '500')]\")).click();\n \twaitForElement(By.xpath(\"//android.widget.TextView[contains(@resource-id , 'message_text') and contains(@text , 'You are about to play Electrical Engineering game with 500 coins stake.')]\"), 5);\n \tdriver.findElement(By.xpath(\"//android.widget.TextView[contains(@resource-id , 'message_text') and contains(@text , 'You are about to play Electrical Engineering game with 500 coins stake.')]\")).click();\n \tdriver.findElement(By.id(\"com.pointedsquares.gamy5.android:id/positive_button\")).click();\n \twaitForVisibilityOf(By.xpath(\"//android.widget.TextView[contains(@resource-id , 'response') and contains(@text , 'Finding room for you...')]\"));\n \treturn new SNGTestCases(driver);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n String[] stringArray0 = new String[8];\n String string0 = SQLUtil.leftJoin(\"@H VqbTNp872Q\", stringArray0, (String) null, \"\\nLIMIT \", stringArray0);\n assertEquals(\"left join null as \\nLIMIT on @H VqbTNp872Q.null = \\nLIMIT .null and @H VqbTNp872Q.null = \\nLIMIT .null and @H VqbTNp872Q.null = \\nLIMIT .null and @H VqbTNp872Q.null = \\nLIMIT .null and @H VqbTNp872Q.null = \\nLIMIT .null and @H VqbTNp872Q.null = \\nLIMIT .null and @H VqbTNp872Q.null = \\nLIMIT .null and @H VqbTNp872Q.null = \\nLIMIT .null\", string0);\n }", "public boolean isJoining(Train train){\n\t\treturn join==train;\n\t}", "@Test\r\n public void testToevoegenVriendschap() {\r\n try{\r\n accountDB.toevoegenAccount(account);\r\n accountDB.toevoegenAccount(vriend);\r\n vriendDB.toevoegenVriendschap(account.getLogin(), vriend.getLogin());\r\n \r\n Vriendschap ophaalVriendschap = vriendDB.zoekVriendschap(account.getLogin(), vriend.getLogin());\r\n Account ophaalAcc = accountDB.zoekAccountOpLogin(ophaalVriendschap.getAccountlogin());\r\n Account ophaalVriend = accountDB.zoekAccountOpLogin(ophaalVriendschap.getAccountvriendlogin());\r\n \r\n assertEquals(\"Defoort\", ophaalAcc.getNaam());\r\n assertEquals(\"Mieke\", ophaalAcc.getVoornaam());\r\n assertEquals(\"miekedefoort\", ophaalAcc.getLogin());\r\n assertEquals(\"wachtwoord123\", ophaalAcc.getPaswoord());\r\n assertEquals(\"miekedefoort@hotmail.com\", ophaalAcc.getEmailadres());\r\n assertEquals(Geslacht.V, ophaalAcc.getGeslacht());\r\n \r\n assertEquals(\"Petersen\", ophaalVriend.getNaam());\r\n assertEquals(\"Peter\", ophaalVriend.getVoornaam());\r\n assertEquals(\"peterpetersen\", ophaalVriend.getLogin());\r\n assertEquals(\"wachtwoord12345\", ophaalVriend.getPaswoord());\r\n assertEquals(\"peter@hotmail.com\", ophaalVriend.getEmailadres());\r\n assertEquals(Geslacht.M, ophaalVriend.getGeslacht());\r\n \r\n vriendDB.verwijderenVriendschap(account.getLogin(), vriend.getLogin());\r\n }catch(DBException ex){\r\n System.out.println(\"testToevoegenVriendschap - \" + ex);\r\n }\r\n }", "private boolean attempt2GetPlayerFromHomeSucceds(Player player)\n {\n boolean blu = false;\n boolean red = false;\n boolean green = false;\n boolean yellow = false;\n if (player.getSteps_moved() == 0 && getValue_from_die() == 6)\n {\n if (getPerson_to_play() == 1)\n {\n blu = try2GetBluePlayerFromHome(player);\n if (blu)\n {\n BlueEatsPlayer(player);\n }\n }\n else if (getPerson_to_play() == 2)\n {\n red = try2GetRedPlayerFromHome(player);\n if (red)\n {\n RedEatsPlayer(player);\n }\n }\n else if (getPerson_to_play() == 3)\n {\n green = try2GetGreenPlayerFromHome(player);\n if (green)\n {\n GreenEatsPlayer(player);\n }\n }\n else if (getPerson_to_play() == 4)\n {\n yellow = try2GetYellowPlayerFromHome(player);\n if (yellow)\n {\n YellowEatsPlayer(player);\n }\n }\n\n\n if (blu || red || green || yellow)\n {\n value_from_die = 0;\n ludo.setDrawScoreAllowed(false);\n playPlayerHasMovedMusic();\n return true;\n }\n }\n return false;\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n String[] stringArray0 = new String[0];\n String string0 = SQLUtil.join(\"K6kxVa6gh&)z\", \"exec\", stringArray0, \"insertwrite\", \"/c]<m\", stringArray0);\n assertEquals(\"K6kxVa6gh&)z join insertwrite as /c]<m on \", string0);\n }", "public boolean checkState(){\r\n\t\t//Check if we have enough users\r\n\t\tfor (Map.Entry<String, Role> entry : roleMap.entrySet()){\r\n\t\t\tString rid = entry.getKey();\r\n\t\t\tRole role = roleMap.get(rid);\r\n\t\t\tlog.info(\"Veryifying \" + rid);\t\t\t\r\n\t\t\tif(!roleCount.containsKey(rid)){\r\n\t\t\t\tlog.severe(\"Unsure of game state.\" + rid + \" not found in roleCount\");\r\n\t\t\t\tSystem.exit(-1);\r\n\t\t\t\r\n\t\t\t} else if(role.getMin() > roleCount.get(rid)) {\r\n\t\t\t\t\tlog.info(\"minimum number for roleID: \" + rid + \" not achived\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t\r\n\t\t\t} else if(role.getMax() < roleCount.get(rid)) { //probably don't need this one but cycles are cheap\r\n\t\t\t\tlog.severe(\"OVER MAXIMUM number for roleID: \" + rid + \" not achived\");\r\n\t\t\t\tSystem.exit(-1);\r\n\t\t\t}\r\n\t\t}\r\n\t\t//if we do reach here we've reached a critical mass of players. But we still need them to load the screen\r\n\t\t\r\n\t\tif((this.getGameState() != GAMESTATE.RUNNING) ||(this.gameState !=GAMESTATE.READY_TO_START) ) {\r\n\t\t\tsetGameState(GAMESTATE.CRITICAL_MASS);\r\n\t\t\tlog.info(\"have enough players for game\");\r\n\t\t}\r\n\t\t//if the users are done loading their screen, let us know and then we can start\r\n\t\tif (!userReady.containsValue(false)){\r\n\t\t\tsetGameState(GAMESTATE.READY_TO_START);\r\n\t\t\tlog.info(\"Gamestate is running!!\");\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public boolean evaluateDataDBHeavy() {\n // reset labels\n resetLabels();\n\n // create Map with player-name and count how often he participates\n Map<String, Integer> nameToPart = new HashMap<>();\n for (String playerName : playerNameList) {\n if (nameToPart.containsKey(playerName)) {\n nameToPart.put(playerName, nameToPart.get(playerName) + 1);\n } else {\n nameToPart.put(playerName, 1);\n }\n }\n\n // open conn\n if (!dbAccess.openConn()) {\n showAlertDBError();\n return false;\n }\n\n // get List with all games that finished (end_time != null) and have\n // the right number of each participant -> goes to totalGames\n String strSQL = \"SELECT max_turn.game, max_turn.turn, players.name, participants.winner FROM max_turn INNER JOIN participants ON max_turn.game = participants.game \" +\n \"INNER JOIN players ON participants.player = players.id \" +\n \"INNER JOIN games ON games.id = max_turn.game WHERE end_time IS NOT null GROUP BY max_turn.game \" +\n \"HAVING \";\n // add criteria of how often a player participates in a game in a loop (for every player)\n int counter = 0;\n for (Map.Entry<String, Integer> entry : nameToPart.entrySet()) {\n if (counter != 0)\n strSQL += \"AND \";\n strSQL += \"(SELECT COUNT(participants.player) FROM participants INNER JOIN players ON players.id = participants.player WHERE participants.game = max_turn.game AND players.name = '\";\n strSQL += entry.getKey() + \"') = \";\n strSQL += entry.getValue() + \" \";\n counter++;\n }\n // add criteria total amount of participants in game (numberOfParticipants)\n strSQL += \"AND (SELECT COUNT(participants.player) FROM participants INNER JOIN players ON players.id = participants.player \" +\n \"WHERE participants.game = max_turn.game) = \" + numberOfParticipants +\";\";\n // do select on db\n List<Map<String, Object>> resultList = dbAccess.selectSQL(strSQL);\n // check for dbError\n if(resultList == null){\n showAlertDBError();\n return false;\n }\n totalGames = resultList.size();\n\n\n // first new map to save wins - copy names from nameToPart\n nameToWins = new HashMap<>();\n for(Map.Entry<String, Integer> entry : nameToPart.entrySet()){\n nameToWins.put(entry.getKey(), 0);\n }\n\n // get list with winners and average turns - iterate through resultList of all games WITH A WINNER and the max turns\n strSQL = \"SELECT max_turn.game, max_turn.turn, players.name, participants.winner FROM max_turn INNER JOIN participants ON max_turn.game = participants.game \" +\n \"INNER JOIN players ON participants.player = players.id \" +\n \"INNER JOIN games ON games.id = max_turn.game WHERE end_time IS NOT null AND winner = 1 \" +\n \"HAVING \";\n // add criteria of how often a player participates in a game in a loop (for every player)\n counter = 0;\n for (Map.Entry<String, Integer> entry : nameToPart.entrySet()) {\n if (counter != 0)\n strSQL += \"AND \";\n strSQL += \"(SELECT COUNT(participants.player) FROM participants INNER JOIN players ON players.id = participants.player WHERE participants.game = max_turn.game AND players.name = '\";\n strSQL += entry.getKey() + \"') = \";\n strSQL += entry.getValue() + \" \";\n counter++;\n }\n // add criteria total amount of participants in game (numberOfParticipants)\n strSQL += \"AND (SELECT COUNT(participants.player) FROM participants INNER JOIN players ON players.id = participants.player \" +\n \"WHERE participants.game = max_turn.game) = \" + numberOfParticipants +\";\";\n // do select on db\n resultList = dbAccess.selectSQL(strSQL);\n // check for dbError\n if(resultList == null){\n showAlertDBError();\n return false;\n }\n\n // close conn\n dbAccess.closeConn();\n\n // iterate resultList with winners, write winners, sum up turns\n int turnSum = 0;\n for(Map<String, Object> row : resultList){\n String name = (String) row.get(\"name\");\n nameToWins.put(name, nameToWins.get(name) + 1);\n int maxTurn = (int) row.get(\"turn\");\n turnSum += maxTurn;\n }\n // until now nameToWins only holds winners - adding players without wins to the map with (with 0 as wins)\n for(Map.Entry<String, Integer> entry : nameToPart.entrySet()){\n if(!nameToWins.containsKey(entry.getKey()))\n nameToWins.put(entry.getKey(), 0);\n }\n\n // calculate games without winner\n int gamesWithWinner = resultList.size();\n gamesWithoutWinner = totalGames-gamesWithWinner;\n // calculate average turns\n if(gamesWithWinner > 0){\n averageTurns = Math.round(turnSum/gamesWithWinner);\n }else{\n averageTurns = 0;\n }\n // update gui and end\n updateGUI();\n return true;\n }", "public void join(Player player) {\n\t\tGamePlayer gamePlayer = new GamePlayer(player);\n\t\tthis.gamePlayers.add(gamePlayer);\n\n\t\tif (getEmptyPad() != null) ß{\n\t\t\tPad pad = getEmptyPad();\n\t\t\tgamePlayer.setPad(pad);\n\t\t\tpad.setFree(false);\n\t\t\tLocation loc = pad.getLocation();\n\n\t\t\tplayer.teleport(new Location(loc.getWorld(), loc.getX(), loc.getY(), loc.getZ()));\n\t\t\tsetupPlayerInventory(player);\n\t\t\tplayer.sendMessage(\"You have joined the game\");\n\t\t} else {\n\t\t\tSystem.out.println(\"Not enough room for \" + player.getName() + \" to join. Kicking...\");\n\t\t\tplayer.kickPlayer(\"Game Full\");\n\t\t}\n\t}", "private void joinGame() {\n\t\tgame.connect(list.getSelectedValue());\n\t\tdispose();\n\t}", "public boolean checkWithFragmentingWarhead ()\n {\n List<Player> players = new ArrayList<>();\n\n for (Player playerIterate : player.playerThatSee(player.getSquare().getGameBoard()))\n {\n if (playerIterate.getSquare() != player.getSquare())\n players.add(playerIterate);\n }\n\n for (Player playerIterate : players)\n {\n if (playerIterate.getSquare().getPlayerList().size()>1)\n return true;\n }\n\n return false;\n }" ]
[ "0.58494604", "0.5838052", "0.5808608", "0.5624914", "0.5576303", "0.55552554", "0.5541307", "0.5475901", "0.544991", "0.54471946", "0.5440475", "0.5420419", "0.5416849", "0.53947484", "0.53529793", "0.5333083", "0.5321461", "0.5321191", "0.53197765", "0.5319164", "0.53060883", "0.53042144", "0.5263359", "0.5260916", "0.5250906", "0.5250713", "0.5239064", "0.52270955", "0.52253854", "0.52175146", "0.5213727", "0.521264", "0.5210333", "0.5208662", "0.52054083", "0.5204672", "0.5201554", "0.5198967", "0.51982313", "0.5189384", "0.51866627", "0.51760864", "0.5172797", "0.5163836", "0.5154811", "0.5148078", "0.5139818", "0.5138203", "0.51313233", "0.5130033", "0.5125739", "0.5124005", "0.51171815", "0.51094764", "0.5105396", "0.51052725", "0.509974", "0.5093824", "0.5087616", "0.5083237", "0.5081232", "0.50754744", "0.50729614", "0.5071886", "0.5067006", "0.50642484", "0.50607", "0.50502944", "0.50324285", "0.50307804", "0.5028925", "0.5021801", "0.5018299", "0.5015709", "0.50122994", "0.5009921", "0.5008919", "0.50027853", "0.5002516", "0.5001746", "0.5000853", "0.49976683", "0.49970892", "0.4994651", "0.49910498", "0.49891782", "0.4986219", "0.49843267", "0.49753377", "0.49727646", "0.4969513", "0.49671805", "0.4966902", "0.49605545", "0.49583343", "0.4957964", "0.495645", "0.4955475", "0.49496505", "0.4948818" ]
0.49567342
96
First try getting the default.
@Test public void defaultValueTest() { String[] commandLine = new String[0]; parsingEngine.addArgumentSource( DefaultValueArgProvider.class ); parsingEngine.parse( commandLine ); parsingEngine.validate(); DefaultValueArgProvider argProvider = new DefaultValueArgProvider(); parsingEngine.loadArgumentsIntoObject( argProvider ); Assert.assertEquals(argProvider.value.intValue(), 42, "Default value is not correctly initialized"); // Then try to override it. commandLine = new String[] { "--value", "27" }; parsingEngine.parse( commandLine ); parsingEngine.validate(); parsingEngine.loadArgumentsIntoObject( argProvider ); Assert.assertEquals(argProvider.value.intValue(), 27, "Default value is not correctly initialized"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getDefault();", "String getDefaultValue();", "String getDefaultValue();", "public String getDefault(){\n return _default;\n }", "public Object getDefaultValue();", "public Object getDefaultValue();", "static public Object getDefaultObject () {\n return defaultObject;\n }", "public Type getDefault() {\n if (!loaded) loadPanic();\n return defaultValue;\n }", "public Type getDefault()\n\t{\n\t\treturn m_default;\n\t}", "T getDefaultValue();", "public void returnDefault();", "Object getDefaultValue(String key);", "@Override\n\tpublic ISpecies getDefault() {\n\t\treturn null;\n\t}", "static public String getDefaultString () {\n return defaultString;\n }", "private DefaultSetting getSampleDefaultSetting() {\n DefaultSetting setting = new DefaultSetting(\"\",\n \"\",\n 5,\n Token.DIGIT,\n \"d\",\n 1,\n true,\n true,\n true);\n\n return setting;\n }", "static public int getDefaultInt () {\n return defaultInt;\n }", "String getDefaultPreference(String preferenceName) throws OntimizeJEERuntimeException;", "public static ULocale getDefault() {\n/* 160 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test\n public void getDefaultValueForSetting_noPlatformPropertyForKeyDefined_propertyHasDefault()\n throws Throwable {\n clearAllPlatformSettings();\n\n runTX(new Callable<Void>() {\n @Override\n public Void call() throws Exception {\n String value = ldapSettingsMgmtSvc\n .getDefaultValueForSetting(SettingType.LDAP_CONTEXT_FACTORY);\n assertEquals(\"Returned value must correspond to default value\",\n SettingType.LDAP_CONTEXT_FACTORY.getDefaultValue(),\n value);\n return null;\n }\n });\n }", "public String getDefaultName()\r\n {\r\n System.out.println(\"returning default name: \" + m_default );\r\n return m_default;\r\n }", "public Object getDefault() {\n\t\treturn defaultField;\n\t}", "public IDatatype getDefaultValue() { \n\t\treturn myDefaultValue;\n\t}", "public T getDefaultValue() {\n return defaultValue.orNull();\n }", "String getDefaultType();", "public static DefaultExpression default_() { throw Extensions.todo(); }", "public int getDefault(){\n return number;\n }", "public T getDefault() {\r\n return dflt;\r\n }", "public Settings loadDefault() {\n return new Settings();\n }", "public static DocumentationSettings getDefault(){\n return INSTANCE;\n }", "public boolean isDefault();", "boolean isDefault();", "boolean isDefault();", "public static Activator getDefault() {\n \t\treturn plugin;\n \t}", "public static ULocale getDefault(Category category) {\n/* 169 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public @NotNull T getDefaultValue() {\n return defaultValue;\n }", "public static Activator getDefault() {\n\treturn plugin;\n }", "public String getDefaultValue() {\n return type.getDefaultValue();\n }", "com.google.protobuf.Value getDefaultValue();", "public String getDefaultValue() {\n return defaultValue;\n }", "public Account getDefaultAccount() {\n return getNemesisAccount1();\n }", "public Object get(String aName, Object aDefault)\n{\n Object value = get(aName);\n return value!=null? value : aDefault;\n}", "public Boolean get_is_default()\r\n\t{\r\n\t\treturn this.is_default;\r\n\t}", "private Default()\n {}", "@Deprecated\n public Object getDefault(String path) {return defaultConfig.get(path); }", "protected PortalObject getDefaultChild()\n {\n String portalName = getDeclaredProperty(PORTAL_PROP_DEFAULT_OBJECT_NAME);\n if (portalName == null)\n {\n portalName = DEFAULT_OBJECT_NAME;\n }\n return getChild(portalName);\n }", "public boolean isDefault() {\n return _default;\n }", "public Integer getDefaultNumber() {\n return defaultNumber;\n }", "T defaultValue();", "public static InstallerRegistry getDefault() {\n InstallerRegistry regs = defaultInstance.get();\n if (regs != null)\n return regs;\n regs = new InstallerRegistry();\n defaultInstance = new WeakReference<InstallerRegistry>(regs);\n return regs;\n }", "protected void SetDefault() {\r\n\t\tBrickFinder.getDefault().setDefault();\t\t\r\n\t}", "PreferenceDefaultValueAttribute getDefaultValue();", "public String getDefaultValue () {\n return defaultValue;\n }", "public static Activator getDefault() {\r\n\t\treturn plugin;\r\n\t}", "public static Activator getDefault() {\r\n\t\treturn plugin;\r\n\t}", "public Player getDefaultPlayer(){\n return jugPorDef;\n }", "@Override\r\n\tpublic Database getDefaultDatabase() {\r\n\t\treturn databases.getDatabase( \"default\" );\r\n\t}", "public static HomeFactory getDefault() {\n if (Utilities.isWindows()) {\n return getDefaultWindows();\n } else if (Utilities.isMac()) {\n return getDefaultMac();\n } else {\n return getDefaultUx();\n }\n }", "public static Activator getDefault() {\n\t\treturn plugin;\n\t}", "public static Activator getDefault() {\n\t\treturn plugin;\n\t}", "public static Activator getDefault() {\n\t\treturn plugin;\n\t}", "public static Activator getDefault() {\n\t\treturn plugin;\n\t}", "public static Activator getDefault() {\n\t\treturn plugin;\n\t}", "public static Activator getDefault() {\n\t\treturn plugin;\n\t}", "public static Activator getDefault() {\n\t\treturn plugin;\n\t}", "public static Activator getDefault() {\n\t\treturn plugin;\n\t}", "final Truerandomness defaultInstance() {\n\n\t\ttry {\n\t\t\treturn newInstance();\n\t\t} catch (Throwable t) {\n\t\t\t// hide\n\t\t}\n\n\t\t// not supported\n\t\treturn null;\n\t}", "protected abstract S createDefault();", "public boolean isDefault() {\n return m_Default;\n }", "public String getDefaultValue() {\n return defaultValue;\n }", "public String getDefaultFromAddress() {\n\t\treturn myDefaultFromAddress;\n\t}", "public static Activator getDefault()\r\n\t{\r\n\t\treturn plugin;\r\n\t}", "public boolean isIsDefault() {\n return isDefault;\n }", "public IDevice getDefaultDevice() {\n\t\tif (defaultDevice==null) {\n\t\t\ttry {\n\t\t\t\tdefaultDevice = (IDevice) getObjectInstance(\"com.console.springernature.paint.model.Device\");\n\t\t\t} catch (ClassCastException e) {\n\t\t\t\tlogger.error(\"(ClassCastException) Unable to instanziate the default device ...\", e);\n\t\t\t} catch (Throwable e) {\n\t\t\t\tlogger.error(\"(Generic Exception) Unable to instanziate the default device ...\", e);\n\t\t\t}\n\t\t}\n\t\treturn defaultDevice;\n\t}", "private static ORB getDefaultOrb(Hashtable env) {\n\treturn CorbaUtils.getOrb(null, -1, env);\n }", "public static XML getDefaultXML() {\r\n try {\r\n return (XML) Class.forName(defaultXMLName).newInstance();\r\n }\r\n catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n return null;\r\n }", "public static TDSUIActivator getDefault() {\n\t\treturn plugin;\n\t}", "public static InfoPlugin getDefault() {\n return plugin;\n }", "Object getDefaultLabel() {\n return null;\n }", "public static BalanceRequest defaultInstance() {\n return DEFAULT;\n }", "static public boolean getDefaultBoolean() {\n return defaultBoolean;\n }", "public String getDefaultValue() {\n\t\t\treturn null;\r\n\t\t}", "public String getDefaultValue() {\n\t\t\treturn null;\r\n\t\t}", "public static IssUiActivator getDefault() {\r\n\t\treturn plugin;\r\n\t}", "public Integer getIsDefault() {\n return isDefault;\n }", "public Integer getIsDefault() {\n return isDefault;\n }", "public Template getDefaultTemplate() {\r\n\t\treturn templateDao.findAll().iterator().next();\r\n\t}", "public T getDefault() {\n List<T> defaultValues = this.defaultValues;\n return defaultValues.get(defaultValues.size() - 1);\n }", "ParameterableElement getDefault();", "private String defaultString(String sValue, String sDefault) {\n if (sValue == null || sValue.length() == 0)\n return sDefault;\n\n return sValue;\n }", "public static synchronized CatalogSettings getDefault() {\n if (instance == null) {\n instance = Lookup.getDefault().lookup(CatalogSettings.class);\n }\n return instance;\n }", "public double getDefault(){\n return number;\n }", "protected <T> T getValue(String key, T defaultVal) {\r\n return getValue(key, defaultVal, RestartReqs.NONE);\r\n }", "static public double getDefaultDouble () {\n return defaultDouble;\n }", "String getDefaultRemote(String _default_) throws GitException, InterruptedException;", "public static AiPersona pickDefaultPersona(){\n \treturn AiList.get(0);\n }", "@Test\n public void getDefaultValueForSetting_platformPropertyForKeyDefined_propertyHasNoDefault()\n throws Throwable {\n runTX(new Callable<Void>() {\n @Override\n public Void call() throws Exception {\n createAndStorePlatformSetting(SettingType.LDAP_ATTR_LAST_NAME,\n \"Smith\");\n return null;\n }\n });\n\n runTX(new Callable<Void>() {\n @Override\n public Void call() throws Exception {\n String value = ldapSettingsMgmtSvc\n .getDefaultValueForSetting(SettingType.LDAP_ATTR_LAST_NAME);\n assertEquals(\n \"Returned value must be empty String so that property is linked to platform setting\",\n \"\", value);\n return null;\n }\n });\n }", "public String getOrElse(String key, String defaultValue) {\n\t\tInstant start = Instant.now();\n\t\tString result;\n\t\ttry {\n\t\t\tresult = get(key);\n\t\t} catch (ConfigException e) {\n\t\t\tLOGGER.warn(\"No value was found for key {}: the default value {} will be returned\", key, defaultValue);\n\t\t\tresult = defaultValue;\n\t\t}\n\t\tLOGGER.debug(\"Access to config {} to getOrElse {} took {}\", uniqueInstance.instanceUUID, key, Duration.between(start, Instant.now()));\t\t\n\t\treturn result;\t\t\n\t}", "public static RAPCorePlugin getDefault() {\n\t\treturn plugin;\n\t}", "public void testDefaultValue() {\n if(referenceDefault == null) {\n System.out.println(\"Default value of any reference variable is null!\");\n }\n }", "@Override public String getParamDefault(final String param) {\n final String common = getDrbdInfo().getParamSaved(param);\n if (common != null) {\n return common;\n }\n return getBrowser().getDrbdXML().getParamDefault(param);\n }", "public Object defaultResult() {\n return null;\n }" ]
[ "0.7422242", "0.7398129", "0.7398129", "0.7395234", "0.7149922", "0.7149922", "0.7137234", "0.7045389", "0.6909792", "0.68731266", "0.68587416", "0.68280417", "0.6760209", "0.67526066", "0.67466927", "0.67326677", "0.67116696", "0.67106545", "0.66793793", "0.66154224", "0.6602127", "0.6598452", "0.65863395", "0.6580364", "0.65701085", "0.6563534", "0.65437454", "0.6527436", "0.6520017", "0.6509462", "0.6505022", "0.6505022", "0.6457831", "0.64402", "0.6421697", "0.64118016", "0.6402257", "0.64013356", "0.63808644", "0.6361101", "0.63528097", "0.63400835", "0.63388747", "0.63127863", "0.6300536", "0.62946534", "0.62810075", "0.627052", "0.6268404", "0.62654924", "0.626549", "0.62593055", "0.6241352", "0.6241352", "0.62410605", "0.6240648", "0.62387204", "0.6225137", "0.6225137", "0.6225137", "0.6225137", "0.6225137", "0.6225137", "0.6225137", "0.6225137", "0.6212011", "0.6208808", "0.62063205", "0.6203508", "0.6202472", "0.6202457", "0.6187941", "0.6184557", "0.6177353", "0.6153732", "0.6150071", "0.61460334", "0.61378336", "0.6122197", "0.6115816", "0.61150587", "0.61150587", "0.6114877", "0.61141324", "0.61141324", "0.611365", "0.61048824", "0.61019117", "0.60973734", "0.6088266", "0.6086893", "0.60825044", "0.60738", "0.60725754", "0.6067614", "0.6066516", "0.6061745", "0.605764", "0.6048139", "0.6045918", "0.60443944" ]
0.0
-1
Passing only foo should work fine...
@Test(expectedExceptions=ArgumentsAreMutuallyExclusiveException.class) public void mutuallyExclusiveArgumentsTest() { String[] commandLine = new String[] {"--foo","5"}; parsingEngine.addArgumentSource( MutuallyExclusiveArgProvider.class ); parsingEngine.parse( commandLine ); parsingEngine.validate(); MutuallyExclusiveArgProvider argProvider = new MutuallyExclusiveArgProvider(); parsingEngine.loadArgumentsIntoObject( argProvider ); Assert.assertEquals(argProvider.foo.intValue(), 5, "Argument is not correctly initialized"); // But when foo and bar come together, danger! commandLine = new String[] {"--foo","5","--bar","6"}; parsingEngine.parse( commandLine ); parsingEngine.validate(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void foo() {\r\n\t}", "@NeverInline\n public void foo(Object obj, int argumentUnused) {\n B.foo(obj);\n }", "public abstract boolean foo();", "int foo(int a, int b);", "public void bar(java.util.List<java.lang.Integer> foo) { return; }", "public static void foo() {\n\t\t\tSystem.out.println(\"Sub foo....\");\n\t\t}", "public static void noninlinable(OtherClass foo) {\n if (foo != null && foo.outer != null && foo.outer.getHello() != null) {\n noninlinable(foo);\n }\n }", "public int foo(int i) {\n return i + b.bar();\n }", "public void test17_33() throws Exception {\n helperPass(new String[] { \"p.Foo\" }, \"getX\", \"p.Foo\", 14, 17, 14, 21);\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tSystem.out.println(foo(4, 2));\r\n\t}", "public A doFoo() {\n\t\treturn b.foo();\n\t}", "public int foo()\n {\n }", "protected void a(int paramInt1, int paramInt2, boolean paramBoolean, yz paramyz) {}", "@Override\n public int bar(int a, int b) {\n return a * b + 1;\n }", "public void filesNotFound(File... f) { }", "public void filesNotFound(File... f) { }", "public String a(String paramString, int paramInt)\r\n/* 512: */ {\r\n/* 513:512 */ return a(paramString, paramInt, false);\r\n/* 514: */ }", "static void bar(Employee emp){\n\n\n\n}", "@Override\n\tpublic void some() {\n\t\t\n\t}", "public static void main(String[] args)\n {\n new Bar().bar(class); // bad param list\n }", "static void badMethod() {\n doStuff();\n }", "public boolean enoughToFilter() {\n/* 468 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void g() {\n <caret>f(null, null);\n }", "public static void main(String[] args) {\n System.out.println(foo());\n }", "@Test\n\tpublic void testExoticGood() {\n\t\tassertNoException(\"int foo(int a) { return a; }\", \"(a)\");\n\t\tassertNoException(\"int foo(int a) { { int b = 42; } return a; }\", \"(a (b))\");\n\t\tassertNoException(\"int foo(int a) { int c = -1; { int b = a; c = b + 3; } return c; }\", \"(a, c (b))\");\n\t\tassertNoException(\"int foo(int a) { a = 42; return a; }\", \"(a)\");\n\t\tassertNoException(\"int foo(int a) { { int a = 42; } return a; }\", \"(a (a))\");\n\t}", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public scala.Function1 foo() { return null; }", "static int type_of_out(String passed){\n\t\treturn 1;\n\t}", "@Override\n\tpublic void foo() {\n\t\tSystem.out.println(\"Foo from B\");\n\t}", "static int type_of_call(String passed){\n\t\treturn 1;\n\t}", "public void test17() throws Exception {\n helper1(new String[] {\"b\", \"i\"}\r\n , new String[] {\"I\", \"Z\"}\r\n , false, 0);\r\n }", "public void method_191() {}", "@Test\n public void testInvokingExtraSafeMethod() throws Exception {\n robot.kick(height(7));\n\n // will not compile becuase height is mandatory here\n // robot.kick();\n\n // will not compile because isRoundKick() is boolean\n // robot.kick(isRoundKick(true));\n\n // will not compile becuase speed() is a punch parameter\n // robot.kick(speed(10))\n\n\n // all these are equivalent\n robot.kick(height(12), isRoundKick(true));\n robot.kick(height(12), isRoundKick()); // param constructor with default value\n robot.kick(height(12), isRoundKick); // this is really a constant\n\n // will not compile because here we've statically imported the force from punch\n // robot.kick(height(3), force(10));\n\n robot.kick(height(3), KickParam.force(100)); // we need to be explicit in this case\n }", "public abstract int f(int i2);", "public int a(String paramString, float paramFloat1, float paramFloat2, int paramInt)\r\n/* 234: */ {\r\n/* 235:243 */ return a(paramString, paramFloat1, paramFloat2, paramInt, true);\r\n/* 236: */ }", "public void test18() throws Exception {\n helper1(new String[] {\"b\", \"i\"}\r\n , new String[] {\"I\", \"Z\"}\r\n , false, 0);\r\n }", "public void method_4270() {}", "static void return_unconditionally(String passed){\n\t\tcomplete_return_requirements();\n\t}", "private void handleActionFoo(String param1, String param2){\n\t// TODO: Handle action Foo\n\tthrow new UnsupportedOperationException(\"Not yet implemented\");\n }", "static void call_without_condition(String passed){\n\t\tcomplete_call_req(passed.substring(5));\n\t}", "protected void doSomethingElse()\r\n {\r\n \r\n }", "protected void a(bug parambug)\r\n/* 35: */ {\r\n/* 36:36 */ this.j.a((bxf)null);\r\n/* 37: */ }", "public void test19() throws Exception {\n helper1(new String[] {\"b\", \"i\"}\r\n , new String[] {\"I\", \"Z\"}\r\n , false, 0);\r\n }", "public void doTheFaultyThing();", "public static void dummyTest(){}", "public static void dummyTest(){}", "public void method_217(boolean var1) {}", "@Override\n public int f() {\n return 0;\n }", "public void func_70305_f() {}", "public void smell() {\n\t\t\n\t}", "@Override\n\tpublic void test(String t) {\n\t\t\n\t}", "public int a_(int paramInt)\r\n/* 594: */ {\r\n/* 595:636 */ return 0;\r\n/* 596: */ }", "boolean method_103(int var1, int var2);", "abstract int pregnancy();", "private static void a(Object param0, Class<?> param1) {\n }", "protected void a(char paramChar, int paramInt) {}", "boolean method_107(boolean var1, class_81 var2);", "public void woke(){\n\n //TODO\n\n }", "private void handleActionBaz(String param1, String param2){\n\t// TODO: Handle action Baz\n\tthrow new UnsupportedOperationException(\"Not yet implemented\");\n }", "default boolean isSpecial() { return false; }", "public void method_213(String var1) {}", "public abstract boolean method_1028(class_44 var1);", "public void method_206() {}", "public void method_201() {}", "boolean isMoreSpecific (MethodType type) throws OverloadingAmbiguous {\r\n boolean status = false;\r\n\r\n try {\r\n for (int i = 0, size = arguments.size (); i < size; i++) {\r\n\tIdentifier this_arg = (Identifier) arguments.elementAt (i);\r\n\tIdentifier target_arg = (Identifier) type.arguments.elementAt (i);\r\n\r\n\tint type_diff = this_arg.type.compare (target_arg.type);\r\n\tif (type_diff == 0)\r\n\t continue;\r\n\telse if (type_diff > 0) {\r\n\t if (status == true) throw new OverloadingAmbiguous ();\r\n\t} else {\r\n\t if (i != 0) throw new OverloadingAmbiguous ();\r\n\t status = true;\r\n\t}\r\n }\r\n } catch (OverloadingAmbiguous ex) {\r\n throw ex;\r\n } catch (TypeMismatch ex) {\r\n throw new OverloadingAmbiguous ();\r\n }\r\n\r\n return status;\r\n }", "private void handleActionFoo(String param1, String param2) {\n // TODO: Handle action Foo\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "private void handleActionFoo(String param1, String param2) {\n // TODO: Handle action Foo\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "private void handleActionFoo(String param1, String param2) {\n // TODO: Handle action Foo\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "private void handleActionFoo(String param1, String param2) {\n // TODO: Handle action Foo\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "@Test\n public void testCaseOfClassNotMatchingWithPredicate() {\n Object o = \"Boo\";\n match(o).caseOf(Integer.class, s -> {\n fail();\n return false;\n }, s -> fail());\n }", "@SuppressWarnings(\"unchecked\")\n\t@Test\n\tpublic void test_process_some_stage_operation()\n\t{\n\t}", "@SideOnly(Side.CLIENT)\n/* */ public void func_75137_b(int par1, int par2) {}", "private static interface Base {\n\n public void foo();\n }", "public void method_200() {}", "void method16(int aOne)\n {\n }", "public void b(int paramInt1, int paramInt2) {}", "public void b(int paramInt1, int paramInt2) {}", "@Override\n\tpublic void test(Object t) {\n\t\t\n\t}", "@Override\n\tpublic void test(Object t) {\n\t\t\n\t}", "public abstract void a(b paramb, int paramInt1, int paramInt2);", "public void method_115() {}", "public static void func() {\n }", "@Test\n\tpublic void test_returnBooleanFoo_false() {\n\t}", "public void andThisIsAMethodName(){}", "public abstract void\n bypassValidation_();", "@Override\r\n\tpublic void doSomething(int i, double x) {\n\t\tdidItWork(1, 1.1, \"a\");\r\n\t}", "boolean ignoreInner();", "abstract public boolean argsNotFull();", "private void handleActionBaz(String param1, String param2) {\n // TODO: Handle action Baz\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "private void handleActionBaz(String param1, String param2) {\n // TODO: Handle action Baz\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "private void handleActionBaz(String param1, String param2) {\n // TODO: Handle action Baz\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "private void handleActionBaz(String param1, String param2) {\n // TODO: Handle action Baz\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "private void handleActionBaz(String param1, String param2) {\n // TODO: Handle action Baz\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "public abstract void mo4377b(int i, int i2);", "public int a_(int paramInt)\r\n/* 166: */ {\r\n/* 167:189 */ return 0;\r\n/* 168: */ }", "public void testInvalidNoType() { assertInvalid(\"a\"); }", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "static int type_of_ret(String passed){\n\t\treturn 1;\n\t}", "void foo1(Integer p) {\n System.out.println(p.toString());\n }", "@Test\n void include() {\n DocServiceFilter include = (plugin, service, method) -> true;\n DocServiceFilter exclude = (plugin, service, method) -> false;\n Map<String, ServiceInfo> services = services(include, exclude);\n assertThat(services).containsOnlyKeys(FOO_NAME, HELLO_NAME);\n\n // 2. Exclude specified.\n exclude = DocServiceFilter.ofMethodName(FOO_NAME, \"bar2\");\n services = services(include, exclude);\n assertThat(services).containsOnlyKeys(FOO_NAME, HELLO_NAME);\n List<String> methods = methods(services);\n\n assertThat(methods).containsExactlyInAnyOrder(\"bar1\", \"bar3\", \"bar4\", \"bar5\", \"bar6\");\n\n // 3-1. Include serviceName specified.\n include = DocServiceFilter.ofServiceName(FOO_NAME);\n // Set the exclude to the default.\n exclude = (plugin, service, method) -> false;\n services = services(include, exclude);\n assertThat(services).containsOnlyKeys(FOO_NAME);\n\n methods = methods(services);\n assertThat(methods).containsExactlyInAnyOrder(\"bar1\", \"bar2\", \"bar3\", \"bar4\", \"bar5\", \"bar6\");\n\n // 3-2. Include methodName specified.\n include = DocServiceFilter.ofMethodName(FOO_NAME, \"bar2\");\n services = services(include, exclude);\n assertThat(services).containsOnlyKeys(FOO_NAME);\n\n methods = methods(services);\n assertThat(methods).containsOnlyOnce(\"bar2\");\n\n // 4-1. Include and exclude specified.\n include = DocServiceFilter.ofServiceName(FOO_NAME);\n exclude = DocServiceFilter.ofMethodName(FOO_NAME, \"bar2\").or(DocServiceFilter.ofMethodName(\"bar3\"));\n services = services(include, exclude);\n assertThat(services).containsOnlyKeys(FOO_NAME);\n\n methods = methods(services);\n assertThat(methods).containsExactlyInAnyOrder(\"bar1\", \"bar4\", \"bar5\", \"bar6\");\n\n // 4-2. Include and exclude specified.\n include = DocServiceFilter.ofMethodName(FOO_NAME, \"bar2\");\n exclude = DocServiceFilter.ofServiceName(FOO_NAME);\n services = services(include, exclude);\n assertThat(services.size()).isZero();\n }" ]
[ "0.6019262", "0.5895461", "0.5782946", "0.5753743", "0.5643967", "0.54085803", "0.53894943", "0.53582025", "0.53191423", "0.5308013", "0.52360845", "0.52031505", "0.5164976", "0.51296806", "0.51282847", "0.51282847", "0.51280636", "0.5112111", "0.50340426", "0.50249785", "0.4954031", "0.494152", "0.49246782", "0.49208984", "0.49082142", "0.49017626", "0.49017626", "0.49001896", "0.48561856", "0.48544338", "0.48538387", "0.48413736", "0.48379278", "0.4824897", "0.48208797", "0.48137695", "0.4807278", "0.48067746", "0.47974682", "0.4787765", "0.478468", "0.47832012", "0.478121", "0.47774583", "0.47743767", "0.4773205", "0.4773205", "0.47638118", "0.47589022", "0.4757604", "0.47558263", "0.47466952", "0.47442502", "0.47438532", "0.47405562", "0.4738239", "0.47162068", "0.47085035", "0.47059986", "0.4703943", "0.46954104", "0.4687724", "0.4686832", "0.46520153", "0.46514004", "0.4649699", "0.4649662", "0.4649662", "0.4649662", "0.4649662", "0.46455896", "0.46435064", "0.4635411", "0.46264517", "0.46233964", "0.46216476", "0.4618773", "0.4618773", "0.4606827", "0.4606827", "0.46066093", "0.46017933", "0.46009636", "0.4598167", "0.4584852", "0.45811006", "0.45789915", "0.45706117", "0.45572895", "0.45567262", "0.45567262", "0.45567262", "0.45567262", "0.45567262", "0.45542085", "0.45528892", "0.45503455", "0.45485914", "0.4547489", "0.45451543", "0.45446235" ]
0.0
-1
Passing only foo should work fine...
@Test(expectedExceptions=InvalidArgumentValueException.class) public void argumentValidationTest() { String[] commandLine = new String[] {"--value","521"}; parsingEngine.addArgumentSource( ValidatingArgProvider.class ); parsingEngine.parse( commandLine ); parsingEngine.validate(); ValidatingArgProvider argProvider = new ValidatingArgProvider(); parsingEngine.loadArgumentsIntoObject( argProvider ); Assert.assertEquals(argProvider.value.intValue(), 521, "Argument is not correctly initialized"); // Try some invalid arguments commandLine = new String[] {"--value","foo"}; parsingEngine.parse( commandLine ); parsingEngine.validate(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void foo() {\r\n\t}", "@NeverInline\n public void foo(Object obj, int argumentUnused) {\n B.foo(obj);\n }", "public abstract boolean foo();", "int foo(int a, int b);", "public void bar(java.util.List<java.lang.Integer> foo) { return; }", "public static void foo() {\n\t\t\tSystem.out.println(\"Sub foo....\");\n\t\t}", "public static void noninlinable(OtherClass foo) {\n if (foo != null && foo.outer != null && foo.outer.getHello() != null) {\n noninlinable(foo);\n }\n }", "public int foo(int i) {\n return i + b.bar();\n }", "public void test17_33() throws Exception {\n helperPass(new String[] { \"p.Foo\" }, \"getX\", \"p.Foo\", 14, 17, 14, 21);\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tSystem.out.println(foo(4, 2));\r\n\t}", "public A doFoo() {\n\t\treturn b.foo();\n\t}", "public int foo()\n {\n }", "protected void a(int paramInt1, int paramInt2, boolean paramBoolean, yz paramyz) {}", "public String a(String paramString, int paramInt)\r\n/* 512: */ {\r\n/* 513:512 */ return a(paramString, paramInt, false);\r\n/* 514: */ }", "@Override\n public int bar(int a, int b) {\n return a * b + 1;\n }", "public void filesNotFound(File... f) { }", "public void filesNotFound(File... f) { }", "static void bar(Employee emp){\n\n\n\n}", "@Override\n\tpublic void some() {\n\t\t\n\t}", "public static void main(String[] args)\n {\n new Bar().bar(class); // bad param list\n }", "static void badMethod() {\n doStuff();\n }", "public boolean enoughToFilter() {\n/* 468 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void g() {\n <caret>f(null, null);\n }", "public static void main(String[] args) {\n System.out.println(foo());\n }", "@Test\n\tpublic void testExoticGood() {\n\t\tassertNoException(\"int foo(int a) { return a; }\", \"(a)\");\n\t\tassertNoException(\"int foo(int a) { { int b = 42; } return a; }\", \"(a (b))\");\n\t\tassertNoException(\"int foo(int a) { int c = -1; { int b = a; c = b + 3; } return c; }\", \"(a, c (b))\");\n\t\tassertNoException(\"int foo(int a) { a = 42; return a; }\", \"(a)\");\n\t\tassertNoException(\"int foo(int a) { { int a = 42; } return a; }\", \"(a (a))\");\n\t}", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public scala.Function1 foo() { return null; }", "static int type_of_out(String passed){\n\t\treturn 1;\n\t}", "static int type_of_call(String passed){\n\t\treturn 1;\n\t}", "@Override\n\tpublic void foo() {\n\t\tSystem.out.println(\"Foo from B\");\n\t}", "public void test17() throws Exception {\n helper1(new String[] {\"b\", \"i\"}\r\n , new String[] {\"I\", \"Z\"}\r\n , false, 0);\r\n }", "public void method_191() {}", "@Test\n public void testInvokingExtraSafeMethod() throws Exception {\n robot.kick(height(7));\n\n // will not compile becuase height is mandatory here\n // robot.kick();\n\n // will not compile because isRoundKick() is boolean\n // robot.kick(isRoundKick(true));\n\n // will not compile becuase speed() is a punch parameter\n // robot.kick(speed(10))\n\n\n // all these are equivalent\n robot.kick(height(12), isRoundKick(true));\n robot.kick(height(12), isRoundKick()); // param constructor with default value\n robot.kick(height(12), isRoundKick); // this is really a constant\n\n // will not compile because here we've statically imported the force from punch\n // robot.kick(height(3), force(10));\n\n robot.kick(height(3), KickParam.force(100)); // we need to be explicit in this case\n }", "public abstract int f(int i2);", "public int a(String paramString, float paramFloat1, float paramFloat2, int paramInt)\r\n/* 234: */ {\r\n/* 235:243 */ return a(paramString, paramFloat1, paramFloat2, paramInt, true);\r\n/* 236: */ }", "public void test18() throws Exception {\n helper1(new String[] {\"b\", \"i\"}\r\n , new String[] {\"I\", \"Z\"}\r\n , false, 0);\r\n }", "public void method_4270() {}", "static void return_unconditionally(String passed){\n\t\tcomplete_return_requirements();\n\t}", "static void call_without_condition(String passed){\n\t\tcomplete_call_req(passed.substring(5));\n\t}", "private void handleActionFoo(String param1, String param2){\n\t// TODO: Handle action Foo\n\tthrow new UnsupportedOperationException(\"Not yet implemented\");\n }", "protected void a(bug parambug)\r\n/* 35: */ {\r\n/* 36:36 */ this.j.a((bxf)null);\r\n/* 37: */ }", "protected void doSomethingElse()\r\n {\r\n \r\n }", "public void test19() throws Exception {\n helper1(new String[] {\"b\", \"i\"}\r\n , new String[] {\"I\", \"Z\"}\r\n , false, 0);\r\n }", "public static void dummyTest(){}", "public static void dummyTest(){}", "public void doTheFaultyThing();", "public void method_217(boolean var1) {}", "@Override\n public int f() {\n return 0;\n }", "public void func_70305_f() {}", "public void smell() {\n\t\t\n\t}", "@Override\n\tpublic void test(String t) {\n\t\t\n\t}", "public int a_(int paramInt)\r\n/* 594: */ {\r\n/* 595:636 */ return 0;\r\n/* 596: */ }", "boolean method_103(int var1, int var2);", "abstract int pregnancy();", "private static void a(Object param0, Class<?> param1) {\n }", "protected void a(char paramChar, int paramInt) {}", "boolean method_107(boolean var1, class_81 var2);", "public void woke(){\n\n //TODO\n\n }", "private void handleActionBaz(String param1, String param2){\n\t// TODO: Handle action Baz\n\tthrow new UnsupportedOperationException(\"Not yet implemented\");\n }", "default boolean isSpecial() { return false; }", "public abstract boolean method_1028(class_44 var1);", "public void method_213(String var1) {}", "public void method_206() {}", "boolean isMoreSpecific (MethodType type) throws OverloadingAmbiguous {\r\n boolean status = false;\r\n\r\n try {\r\n for (int i = 0, size = arguments.size (); i < size; i++) {\r\n\tIdentifier this_arg = (Identifier) arguments.elementAt (i);\r\n\tIdentifier target_arg = (Identifier) type.arguments.elementAt (i);\r\n\r\n\tint type_diff = this_arg.type.compare (target_arg.type);\r\n\tif (type_diff == 0)\r\n\t continue;\r\n\telse if (type_diff > 0) {\r\n\t if (status == true) throw new OverloadingAmbiguous ();\r\n\t} else {\r\n\t if (i != 0) throw new OverloadingAmbiguous ();\r\n\t status = true;\r\n\t}\r\n }\r\n } catch (OverloadingAmbiguous ex) {\r\n throw ex;\r\n } catch (TypeMismatch ex) {\r\n throw new OverloadingAmbiguous ();\r\n }\r\n\r\n return status;\r\n }", "public void method_201() {}", "private void handleActionFoo(String param1, String param2) {\n // TODO: Handle action Foo\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "private void handleActionFoo(String param1, String param2) {\n // TODO: Handle action Foo\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "private void handleActionFoo(String param1, String param2) {\n // TODO: Handle action Foo\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "private void handleActionFoo(String param1, String param2) {\n // TODO: Handle action Foo\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "@Test\n public void testCaseOfClassNotMatchingWithPredicate() {\n Object o = \"Boo\";\n match(o).caseOf(Integer.class, s -> {\n fail();\n return false;\n }, s -> fail());\n }", "@SuppressWarnings(\"unchecked\")\n\t@Test\n\tpublic void test_process_some_stage_operation()\n\t{\n\t}", "@SideOnly(Side.CLIENT)\n/* */ public void func_75137_b(int par1, int par2) {}", "private static interface Base {\n\n public void foo();\n }", "public void method_200() {}", "void method16(int aOne)\n {\n }", "public void b(int paramInt1, int paramInt2) {}", "public void b(int paramInt1, int paramInt2) {}", "@Override\n\tpublic void test(Object t) {\n\t\t\n\t}", "@Override\n\tpublic void test(Object t) {\n\t\t\n\t}", "public abstract void a(b paramb, int paramInt1, int paramInt2);", "public static void func() {\n }", "public void method_115() {}", "@Test\n\tpublic void test_returnBooleanFoo_false() {\n\t}", "public void andThisIsAMethodName(){}", "public abstract void\n bypassValidation_();", "@Override\r\n\tpublic void doSomething(int i, double x) {\n\t\tdidItWork(1, 1.1, \"a\");\r\n\t}", "boolean ignoreInner();", "abstract public boolean argsNotFull();", "private void handleActionBaz(String param1, String param2) {\n // TODO: Handle action Baz\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "private void handleActionBaz(String param1, String param2) {\n // TODO: Handle action Baz\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "private void handleActionBaz(String param1, String param2) {\n // TODO: Handle action Baz\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "private void handleActionBaz(String param1, String param2) {\n // TODO: Handle action Baz\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "private void handleActionBaz(String param1, String param2) {\n // TODO: Handle action Baz\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "public abstract void mo4377b(int i, int i2);", "public int a_(int paramInt)\r\n/* 166: */ {\r\n/* 167:189 */ return 0;\r\n/* 168: */ }", "public void testInvalidNoType() { assertInvalid(\"a\"); }", "static int type_of_ret(String passed){\n\t\treturn 1;\n\t}", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "@Test\n void include() {\n DocServiceFilter include = (plugin, service, method) -> true;\n DocServiceFilter exclude = (plugin, service, method) -> false;\n Map<String, ServiceInfo> services = services(include, exclude);\n assertThat(services).containsOnlyKeys(FOO_NAME, HELLO_NAME);\n\n // 2. Exclude specified.\n exclude = DocServiceFilter.ofMethodName(FOO_NAME, \"bar2\");\n services = services(include, exclude);\n assertThat(services).containsOnlyKeys(FOO_NAME, HELLO_NAME);\n List<String> methods = methods(services);\n\n assertThat(methods).containsExactlyInAnyOrder(\"bar1\", \"bar3\", \"bar4\", \"bar5\", \"bar6\");\n\n // 3-1. Include serviceName specified.\n include = DocServiceFilter.ofServiceName(FOO_NAME);\n // Set the exclude to the default.\n exclude = (plugin, service, method) -> false;\n services = services(include, exclude);\n assertThat(services).containsOnlyKeys(FOO_NAME);\n\n methods = methods(services);\n assertThat(methods).containsExactlyInAnyOrder(\"bar1\", \"bar2\", \"bar3\", \"bar4\", \"bar5\", \"bar6\");\n\n // 3-2. Include methodName specified.\n include = DocServiceFilter.ofMethodName(FOO_NAME, \"bar2\");\n services = services(include, exclude);\n assertThat(services).containsOnlyKeys(FOO_NAME);\n\n methods = methods(services);\n assertThat(methods).containsOnlyOnce(\"bar2\");\n\n // 4-1. Include and exclude specified.\n include = DocServiceFilter.ofServiceName(FOO_NAME);\n exclude = DocServiceFilter.ofMethodName(FOO_NAME, \"bar2\").or(DocServiceFilter.ofMethodName(\"bar3\"));\n services = services(include, exclude);\n assertThat(services).containsOnlyKeys(FOO_NAME);\n\n methods = methods(services);\n assertThat(methods).containsExactlyInAnyOrder(\"bar1\", \"bar4\", \"bar5\", \"bar6\");\n\n // 4-2. Include and exclude specified.\n include = DocServiceFilter.ofMethodName(FOO_NAME, \"bar2\");\n exclude = DocServiceFilter.ofServiceName(FOO_NAME);\n services = services(include, exclude);\n assertThat(services.size()).isZero();\n }", "void foo1(Integer p) {\n System.out.println(p.toString());\n }" ]
[ "0.60178375", "0.58958817", "0.5781687", "0.57539845", "0.5642874", "0.5408037", "0.5387481", "0.5358609", "0.5321226", "0.5308163", "0.5236437", "0.52017593", "0.51657987", "0.51307034", "0.5130346", "0.5127853", "0.5127853", "0.5111116", "0.50341225", "0.5024618", "0.49540752", "0.4942484", "0.49277475", "0.49213025", "0.49087894", "0.49015242", "0.49015242", "0.49005964", "0.48570594", "0.48557782", "0.48551556", "0.48428887", "0.48378634", "0.4825164", "0.48222518", "0.48157215", "0.48087102", "0.4807214", "0.47995266", "0.47874412", "0.47874218", "0.47845274", "0.47823393", "0.47788864", "0.47753233", "0.47753233", "0.47733477", "0.4764912", "0.4761782", "0.47606426", "0.47558528", "0.4748277", "0.47456074", "0.47439128", "0.47399366", "0.47384003", "0.4716298", "0.47090557", "0.47050396", "0.47040293", "0.46971038", "0.46872792", "0.46872586", "0.4651846", "0.46516496", "0.46507558", "0.46495065", "0.46495065", "0.46495065", "0.46495065", "0.46458793", "0.46449316", "0.4636193", "0.46257013", "0.46239126", "0.46215498", "0.4619992", "0.4619992", "0.46087152", "0.46087152", "0.46081734", "0.46024653", "0.46021518", "0.45987752", "0.45851925", "0.45811024", "0.4578578", "0.45717353", "0.4557848", "0.45570135", "0.45570135", "0.45570135", "0.45570135", "0.45570135", "0.45549536", "0.45541623", "0.4549592", "0.45487943", "0.45481637", "0.454804", "0.45443997" ]
0.0
-1
These tests succeed if no exception is thrown, since no constraints have been violated
@Test(dataProvider = "NumericRangeWithoutConstraintViolationDataProvider") public void testNumericRangeWithoutConstraintViolation( final String[] commandLine ) { runNumericArgumentRangeTest(commandLine); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test11() throws Throwable {\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n // Undeclared exception!\n try { \n SQLUtil.constraintSpec((DBConstraint) null, nameSpec0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test034() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.containsMandatoryColumn((DBConstraint) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test044() throws Throwable {\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n // Undeclared exception!\n try { \n SQLUtil.createConstraintSpecBuilder((DBConstraint) null, nameSpec0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test056() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n String[] stringArray0 = new String[4];\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, \"org.databene.commons.condition.CompositeCondition\", true, stringArray0);\n // Undeclared exception!\n try { \n DBUtil.containsMandatoryColumn(dBUniqueConstraint0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Column 'null' not found in table 'null'\n //\n verifyException(\"org.databene.jdbacl.model.DefaultDBTable\", e);\n }\n }", "@Test(timeout = 4000)\n public void test098() throws Throwable {\n NameSpec nameSpec0 = NameSpec.IF_REPRODUCIBLE;\n // Undeclared exception!\n try { \n SQLUtil.constraintSpec((DBConstraint) null, nameSpec0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test104() throws Throwable {\n NameSpec nameSpec0 = NameSpec.IF_REPRODUCIBLE;\n // Undeclared exception!\n try { \n SQLUtil.constraintSpec((DBConstraint) null, nameSpec0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test046() throws Throwable {\n NameSpec nameSpec0 = NameSpec.IF_REPRODUCIBLE;\n // Undeclared exception!\n try { \n SQLUtil.createConstraintSpecBuilder((DBConstraint) null, nameSpec0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n NameSpec nameSpec0 = NameSpec.NEVER;\n // Undeclared exception!\n try { \n SQLUtil.ukSpec((DBUniqueConstraint) null, nameSpec0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test46() throws Throwable {\n PipedWriter pipedWriter0 = new PipedWriter();\n PipedReader pipedReader0 = new PipedReader();\n Boolean boolean0 = Boolean.FALSE;\n SQLUtil.isQuery(\"selectntowrong c|ck\");\n Boolean.valueOf(true);\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"selectntowrong c|ck\");\n // Undeclared exception!\n try { \n defaultDBTable0.getUniqueConstraint(\"^h=wZ>:9%}Pj6(#%M\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.model.DefaultDBTable\", e);\n }\n }", "@Test\n\tpublic void testValidInvalidEstimtes() {\n\t\tProject project = new Project();\n\t\tproject.setEstimates(-1);\n\t\tproject.setType(\"DOCSMANAGE\");\n\t\tSet<ConstraintViolation<Project>> constraintViolations = validator.validate(project);\n\t\tassertEquals(constraintViolations.size(), 1);\n\t}", "@Test\n public void checkValidEntity() {\n cleanEntity0();\n entity0 = EntityUtil.getSampleRole();\n final Set<ConstraintViolation<Object>> cv = PersistenceValidation.validate(entity0);\n assertTrue(cv.isEmpty());\n }", "@Test(timeout = 4000)\n public void test105() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n String[] stringArray0 = new String[9];\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, \"Ron?<[u:{U\", false, stringArray0);\n // Undeclared exception!\n try { \n DBUtil.equivalent(dBUniqueConstraint0, (DBPrimaryKeyConstraint) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test045() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.constraintName((DBConstraint) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test047() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.constraintName((DBConstraint) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n NameSpec nameSpec0 = NameSpec.NEVER;\n // Undeclared exception!\n try { \n SQLUtil.ukSpec((DBUniqueConstraint) null, nameSpec0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test057() throws Throwable {\n DBSchema dBSchema0 = new DBSchema(\"Er\");\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"Er\", dBSchema0);\n String[] stringArray0 = new String[0];\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, \"e/ \", false, stringArray0);\n boolean boolean0 = DBUtil.containsMandatoryColumn(dBUniqueConstraint0);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test079() throws Throwable {\n NameSpec nameSpec0 = NameSpec.IF_REPRODUCIBLE;\n // Undeclared exception!\n try { \n SQLUtil.createConstraintSpecBuilder((DBConstraint) null, nameSpec0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test030() throws Throwable {\n NameSpec nameSpec0 = NameSpec.NEVER;\n // Undeclared exception!\n try { \n SQLUtil.pkSpec((DBPrimaryKeyConstraint) null, nameSpec0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test081() throws Throwable {\n StringBuilder stringBuilder0 = new StringBuilder();\n NameSpec nameSpec0 = NameSpec.NEVER;\n // Undeclared exception!\n try { \n SQLUtil.appendConstraintName((DBConstraint) null, stringBuilder0, nameSpec0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test080() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.constraintName((DBConstraint) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test\n public void testCheckValidity_InvalidFields() throws Exception {\n expectCheckValidityFailure(msg -> msg.setSource(null));\n \n // null protocol\n expectCheckValidityFailure(msg -> msg.setProtocol(null));\n \n // null or empty topic\n expectCheckValidityFailure_NullOrEmpty((msg, value) -> msg.setTopic(value));\n \n // null payload\n expectCheckValidityFailure(msg -> msg.setPayload(null));\n \n // empty payload should NOT throw an exception\n Forward forward = makeValidMessage();\n forward.setPayload(\"\");\n forward.checkValidity();\n \n // null or empty requestId\n expectCheckValidityFailure_NullOrEmpty((msg, value) -> msg.setRequestId(value));\n \n // invalid hop count\n expectCheckValidityFailure(msg -> msg.setNumHops(-1));\n }", "@Test\n\tpublic void testValidInvalidEstimtesFib() {\n\t\tProject project = new Project();\n\t\tproject.setEstimates(10);\n\t\tproject.setType(\"DOCSMANAGE\");\n\t\tSet<ConstraintViolation<Project>> constraintViolations = validator.validate(project);\n\t\tassertEquals(constraintViolations.size(), 1);\n\t}", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.addRequiredCondition(\"\", (StringBuilder) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test101() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n String[] stringArray0 = new String[3];\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, (String) null, false, stringArray0);\n NameSpec nameSpec0 = NameSpec.NEVER;\n StringBuilder stringBuilder0 = SQLUtil.createConstraintSpecBuilder(dBUniqueConstraint0, nameSpec0);\n StringBuilder stringBuilder1 = stringBuilder0.append('8');\n SQLUtil.addRequiredCondition(\"Unknown constraint type: \", stringBuilder1);\n assertEquals(\"8 and Unknown constraint type: \", stringBuilder1.toString());\n assertEquals(\"8 and Unknown constraint type: \", stringBuilder0.toString());\n }", "@Test(timeout = 4000)\n public void test046() throws Throwable {\n StringBuilder stringBuilder0 = new StringBuilder();\n NameSpec nameSpec0 = NameSpec.NEVER;\n // Undeclared exception!\n try { \n SQLUtil.appendConstraintName((DBConstraint) null, stringBuilder0, nameSpec0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.addRequiredCondition((String) null, (StringBuilder) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(expected = IllegalArgumentException.class)\n public void testCheckPositiveFailure() {\n Helper.checkPositive(0, \"obj\", \"method\", LogManager.getLog());\n }", "@Test\r\n public void testZeroLengthException(){\r\n boolean result = false;\r\n try{\r\n new TimeCell(\r\n LocalDateTime.now(),\r\n LocalDateTime.now(),\r\n LocalDateTime.now(),\r\n new Manager(\"James\"), \r\n new Worker(\"Fred\", TypeOfWork.ANY) {},\r\n TypeOfWork.ANY);\r\n }catch(ZeroLengthException ex){\r\n result = true;\r\n }catch(EndBeforeStartException ex){\r\n result = false;\r\n }\r\n assertTrue(result);\r\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.addRequiredCondition((String) null, (StringBuilder) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test\n\tpublic void testValidInvalid() {\n\t\tProject project = new Project();\n\t\tproject.setEstimates(5);\n\t\tproject.setType(\"DOCSMANAGEYY\");\n\t\tSet<ConstraintViolation<Project>> constraintViolations = validator.validate(project);\n\t\tassertEquals(constraintViolations.size(), 1);\n\t}", "@Test\r\n void enoughFunds() {\n BankAccount account = new BankAccount(100);\r\n \r\n // Assertion for no exceptions\r\n assertDoesNotThrow(() -> account.withdraw(100));\r\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.addRequiredCondition(\" AND \", (StringBuilder) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test047() throws Throwable {\n StringBuilder stringBuilder0 = new StringBuilder();\n // Undeclared exception!\n try { \n SQLUtil.appendConstraintName((DBConstraint) null, stringBuilder0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test139() throws Throwable {\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n // Undeclared exception!\n try { \n SQLUtil.ukSpec((DBUniqueConstraint) null, nameSpec0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n // Undeclared exception!\n try { \n SQLUtil.appendConstraintName((DBConstraint) null, (StringBuilder) null, nameSpec0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n NameSpec nameSpec0 = NameSpec.IF_REPRODUCIBLE;\n // Undeclared exception!\n try { \n SQLUtil.pkSpec((DBPrimaryKeyConstraint) null, nameSpec0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test067() throws Throwable {\n NameSpec nameSpec0 = NameSpec.IF_REPRODUCIBLE;\n // Undeclared exception!\n try { \n SQLUtil.pkSpec((DBPrimaryKeyConstraint) null, nameSpec0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test\n void test004_addValidFriendshipWhereAtLeastOneBuddEIsNotInNetwork() {\n try {\n // Special case: if there is no existing user that correspond to any given\n // * name, then add the user(s) first and then add friendship between\n // them.\n christmasBuddENetwork.addUser(\"grinch\");\n christmasBuddENetwork.addFriendship(\"grinch\", \"santa\");\n\n Set<User> allChristmasBuddEs = christmasBuddENetwork.getAllUsers();\n ArrayList<String> allChristmasBuddEsList = new ArrayList<String>();\n for (User i : allChristmasBuddEs) {\n allChristmasBuddEsList.add(i.getName());\n }\n // please make sure that the size of the network is 2\n if ((!allChristmasBuddEsList.contains(\"grinch\"))\n || (!allChristmasBuddEsList.contains(\"santa\"))) {\n fail(\"test004_addValidFriendshipWhereAtLeastOneBuddEIsNotInNetwork(): \"\n + \"FAILED! :( Did NOT add Santa to the network when trying to add \"\n + \"a friendship where Santa was not in the network.\");\n }\n\n int numChristmasbuddEs = allChristmasBuddEs.size();\n if ((numChristmasbuddEs != 2)) {\n fail(\"test004_addValidFriendshipWhereAtLeastOneBuddEIsNotInNetwork(): \"\n + \"FAILED! :( Did NOT have a size of 2 for the \"\n + \"christmasBuddENetwork but instead had a size of \"\n + numChristmasbuddEs);\n }\n\n\n // Set<User> getAllUsers();\n\n } catch (IllegalNullArgumentException e1) {\n fail(\"test004_addValidFriendshipWhereAtLeastOneBuddEIsNotInNetwork(): \"\n + \"FAILED! :( Incorrectly threw an IllegalNullArgumentException.\");\n\n\n // IllegalNullArgumentException, DuplicateUserException\n // DuplicateFriendshipException\n } catch (DuplicateUserException e2) {\n fail(\"test004_addValidFriendshipWhereAtLeastOneBuddEIsNotInNetwork(): \"\n + \"FAILED! :( Incorrectly threw a DuplicateUserException.\");\n\n } catch (DuplicateFriendshipException e3) {\n fail(\"test004_addValidFriendshipWhereAtLeastOneBuddEIsNotInNetwork(): \"\n + \"FAILED! :( Incorrectly threw a DuplicateFriendshipException.\");\n\n }\n\n }", "public final void testValidate() {\r\n\r\n Errors errors;\r\n\r\n // Validate a command. Validate with errors.\r\n errors = new BindException(sampleValidatableCommand,\r\n \"sampleValidatableCommand\");\r\n commandValidator.validate(sampleValidatableCommand, errors);\r\n assertEquals(1, errors.getErrorCount());\r\n\r\n // Validate without errors.\r\n errors = new BindException(\r\n sampleValidatableCommand, \"sampleValidatableCommand\");\r\n sampleValidatableCommand.setField(\"Not empty field\");\r\n commandValidator.validate(sampleValidatableCommand, errors);\r\n assertEquals(0, errors.getErrorCount());\r\n\r\n // Validate a validatable. Validate with errors.\r\n errors = new BindException(sampleValidatable, \"sampleValidatable\");\r\n commandValidator.validate(sampleValidatable, errors);\r\n assertEquals(1, errors.getErrorCount());\r\n\r\n // Validate without errors.\r\n errors = new BindException(sampleValidatable, \"sampleValidatable\");\r\n sampleValidatable.setField(\"Not empty field\");\r\n commandValidator.validate(sampleValidatable, errors);\r\n assertEquals(0, errors.getErrorCount());\r\n }", "@Override\n\tpublic void test00500Add_Validate_ExistingRecord() throws Exception\n\t{\n\t}", "@Test\n\tpublic void testInvalidValidators() {\n\t\tProject project = new Project();\n\t\tproject.setEstimates(76);\n\t\tproject.setType(\"DOCSMANAGEYY\");\n\t\tSet<ConstraintViolation<Project>> constraintViolations = validator.validate(project);\n\t\tassertEquals(constraintViolations.size(), 2);\n\t}", "@Test\n void checkEcritureComptable_ecritureComptableDoesNotRespectValidationConstraint_returnFunctionalExceptionWithCorrectMessage() {\n sampleEcritureComptable.getListLigneEcriture().clear();\n sampleEcritureComptable.getListLigneEcriture().add(new LigneEcritureComptable(new CompteComptable(1),\n null, new BigDecimal(123),\n null));\n\n Assertions.assertThatThrownBy(() -> objectToTest.checkEcritureComptable(sampleEcritureComptable))\n .isInstanceOf(FunctionalException.class)\n .hasMessageContaining(Constant.ECRITURE_COMPTABLE_MANAGEMENT_RULE_ERRORMSG);\n }", "@Test\n void shouldRaiseNoConstraintViolationWithDefault() {\n\n CD cd = new CD().title(\"Kind of Blue\").price(12.5f);\n\n Set<ConstraintViolation<CD>> violations = validator.validate(cd);\n assertEquals(0, violations.size());\n }", "@Test(timeout = 4000)\n public void test073() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.isQuery((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test094() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"org.apache.derby.iapi.sql.execute.ExecutionCntext\");\n String[] stringArray0 = new String[4];\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \"mX7CQGqPX\", true, stringArray0);\n // Undeclared exception!\n try { \n SQLUtil.appendConstraintName((DBConstraint) dBPrimaryKeyConstraint0, (StringBuilder) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test075() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.isDML((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test\n public void isCorrectTest(){\n BuyCard cardErr = new BuyCard(12,0);\n\n thrown.expect(IllegalArgumentException.class);\n thrown.expectMessage(\"Row index out of bounds.\");\n cardErr.isCorrect();\n }", "@Override\n public void verifyDeterministic() throws NonDeterministicException {\n }", "@Test(timeout = 4000)\n public void test076() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.isDDL((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test\r\n public void testEndBeforeStartException() {\r\n boolean result = false;\r\n try {\r\n new TimeCell(\r\n LocalDateTime.now(),\r\n LocalDateTime.now().minusDays(1),\r\n LocalDateTime.now(),\r\n new Manager(\"James\"),\r\n new Worker(\"Fred\", TypeOfWork.ANY),\r\n TypeOfWork.ANY);\r\n } catch (ZeroLengthException ex) {\r\n result = false;\r\n } catch (EndBeforeStartException ex) {\r\n result = true;\r\n }\r\n assertTrue(result);\r\n }", "@Test(timeout = 4000)\n public void test065() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.querySingleRow(\")\", (Connection) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }", "public boolean isValidated() throws Exception\r\n {\n return false;\r\n }", "public void performValidation() {\n/* 623 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n NameSpec nameSpec0 = NameSpec.IF_REPRODUCIBLE;\n // Undeclared exception!\n try { \n SQLUtil.fkSpec((DBForeignKeyConstraint) null, nameSpec0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "private void assertValidity() {\n if (latitudes.size() != longitudes.size()) {\n throw new IllegalStateException(\"GIS location needs equal number of lat/lon points.\");\n }\n if (!(latitudes.size() == 1 || latitudes.size() >= 3)) {\n throw new IllegalStateException(\"GIS location needs either one point or more than two.\");\n }\n }", "@Test\n public void testCheckExists()\n throws SQLException, ClassNotFoundException, InstantiationException,\n IllegalAccessException\n {\n int existingQuizId = 2;\n int unexistingQuizId = 945273;\n try {\n QuizModel.checkExists(existingQuizId);\n }\n catch (NoQuizFoundException e) {\n fail(\"A quiz should have been found.\");\n }\n try {\n QuizModel.checkExists(unexistingQuizId);\n fail(\"NO quiz should have been found.\");\n }\n catch (NoQuizFoundException e) {\n \n }\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.mutatesDataOrStructure((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test095() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n String[] stringArray0 = new String[3];\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, (String) null, false, stringArray0);\n NameSpec nameSpec0 = NameSpec.NEVER;\n StringBuilder stringBuilder0 = SQLUtil.createConstraintSpecBuilder(dBUniqueConstraint0, nameSpec0);\n SQLUtil.appendConstraintName((DBConstraint) dBUniqueConstraint0, stringBuilder0);\n assertEquals(\"\", stringBuilder0.toString());\n }", "@Override\n boolean canFail() {\n return true;\n }", "@Test(timeout = 4000)\n public void test037() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.mutatesDataOrStructure((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n // Undeclared exception!\n try { \n SQLUtil.fkSpec((DBForeignKeyConstraint) null, nameSpec0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n Object object0 = new Object();\n // Undeclared exception!\n try { \n Range.of((Range.CoordinateSystem) null, 1226L, 2776L);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // CoordinateSystem can not be null\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "@Test(timeout = 4000)\n public void test034() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.mutatesDataOrStructure((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "public void validate () { throw new RuntimeException(); }", "@Test\n /**\n * Do not allow delete of record in parent table that will cause orphan records in child tables of the database.\n */\n void dataIntegrityViolationExceptionThrownWhenDelete() {\n }", "@Test\n public void tr4()\n {\n Graph graph = new Graph(2);\n assertThrows(IllegalArgumentException.class, () -> graph.reachable(null, null));\n }", "@Test(timeout = 4000)\n public void test100() throws Throwable {\n DBCheckConstraint dBCheckConstraint0 = new DBCheckConstraint((String) null, true, \"sXV\", \"sXV\");\n String string0 = SQLUtil.ownerDotComponent(dBCheckConstraint0);\n assertEquals(\"null\", string0);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.queryString((PreparedStatement) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test064() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.checkReadOnly((String) null, true);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test\n void test008_addValidUsers() {\n // adding new user (check that allUsers has increased).\n\n // (Adding same user name but to different networks shouldnt throw any\n // exception.\n\n try {\n christmasBuddENetwork.addUser(\"Santa Claus\");\n christmasBuddENetwork.addUser(\"Grinch\");\n christmasBuddENetwork.addUser(\"Comet\");\n christmasBuddENetwork.addUser(\"Rudolph\");\n christmasBuddENetwork.addUser(\"Prancer\");\n christmasBuddENetwork.addUser(\"Blitzen\");\n christmasBuddENetwork.addUser(\"Donder\");\n christmasBuddENetwork.addUser(\"Vixen\");\n christmasBuddENetwork.addUser(\"Dancer\");\n christmasBuddENetwork.addUser(\"Cupid\");\n\n Set<User> allUsersChristmasSet = christmasBuddENetwork.getAllUsers();\n int numUsersChristmas = allUsersChristmasSet.size();\n if (numUsersChristmas != 10) {\n fail(\"test008_addValidUsers(): FAILED! Did NOT return 10 users for \"\n + \"the network, but instead: \" + numUsersChristmas);\n }\n\n\n } catch (Exception e) {\n fail(\"test008_addValidUsers(): FAILED! Threw an improper exception! :(\");\n\n }\n\n\n }", "private void validCheck ()\n\t{\n\t\tassert allButLast != null || cachedFlatListOrMore != null;\n\t}", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.isDDL((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n // Undeclared exception!\n try { \n Range.of(3253L, 1198L);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "@Test(timeout = 4000)\n public void test018() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.prepareStatement((Connection) null, \"Expected exactly one row, found more.\", true);\n fail(\"Expecting exception: IllegalStateException\");\n \n } catch(IllegalStateException e) {\n //\n // Tried to mutate a database with read-only settings: Expected exactly one row, found more.\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }", "@Test\r\n public void validatingEstateWhenEstateIsValidShouldNotThrowException() throws InvalidEstateException {\n estateValidator.validate(estateDto);\r\n\r\n // Then no exception is thrown\r\n }", "@Test\r\n\t public void feelingLucky() {\r\n\t \t Assert.fail();\r\n\t Assert.fail();\r\n\t }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.addOptionalCondition(\"\", (StringBuilder) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test\n\tpublic void testCase2()\n\t{\n\t\tint numberOfCases=-1;\n\t\t\n\t\t//checking number of case is positive or not\n\t\tboolean valid=BillEstimation.numberOfCaseValidation(numberOfCases);\n\t\tassertFalse(valid);\n\t\t\n\t}", "@Test(timeout = 4000)\n public void test016() throws Throwable {\n Range.Builder range_Builder0 = new Range.Builder();\n // Undeclared exception!\n try { \n range_Builder0.contractBegin(2147483647L);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "@Test(timeout = 4000)\n public void test135() throws Throwable {\n NameSpec nameSpec0 = NameSpec.IF_REPRODUCIBLE;\n // Undeclared exception!\n try { \n SQLUtil.fkSpec((DBForeignKeyConstraint) null, nameSpec0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"\");\n String[] stringArray0 = new String[6];\n DBForeignKeyConstraint dBForeignKeyConstraint0 = new DBForeignKeyConstraint(\"oq\", false, defaultDBTable0, stringArray0, defaultDBTable0, stringArray0);\n NameSpec nameSpec0 = NameSpec.NEVER;\n StringBuilder stringBuilder0 = SQLUtil.createConstraintSpecBuilder(dBForeignKeyConstraint0, nameSpec0);\n assertEquals(\"\", stringBuilder0.toString());\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.dependencyOrderedTables((TableHolder) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test29() throws Throwable {\n DynamicSelectModel dynamicSelectModel0 = new DynamicSelectModel();\n // Undeclared exception!\n try { \n dynamicSelectModel0.validate();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Could not create DynamicSelection model. Collection attribute was null or not an el-expression.\n //\n verifyException(\"wheel.util.DynamicSelectModel\", e);\n }\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.addOptionalCondition(\"A*RX\", (StringBuilder) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Override\n public boolean preconditionsSatisfied() {\n return true;\n }", "@Test(timeout = 4000)\n public void test080() throws Throwable {\n Range range0 = Range.ofLength(0L);\n range0.getEnd();\n long long0 = 0L;\n // Undeclared exception!\n try { \n range0.isSubRangeOf((Range) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // range can not be null\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "@Test\n void test009_addUsersIllegalNullArgumentException() {\n // null addUser or empty string addUser --> IllegalNullArgumentException\n try {\n christmasBuddENetwork.addUser(\"Santa Claus\");\n christmasBuddENetwork.addUser(\"Grinch\");\n christmasBuddENetwork.addUser(\"Comet\");\n christmasBuddENetwork.addUser(\"Rudolph\");\n christmasBuddENetwork.addUser(\"Prancer\");\n christmasBuddENetwork.addUser(\"Blitzen\");\n christmasBuddENetwork.addUser(\"Donder\");\n christmasBuddENetwork.addUser(\"Vixen\");\n christmasBuddENetwork.addUser(\"Dancer\");\n christmasBuddENetwork.addUser(\"Cupid\");\n christmasBuddENetwork.addUser(null);\n // if we get here, then we did NOT throw an illegalNullArgumentException\n // when we should have! :(\n fail(\"test009_addUsersIllegalNullArgumentException(): FAILED! :( Did NOT\"\n + \" throw an IllegalNullArgumentException when adding a null user\");\n } catch (IllegalNullArgumentException e1) {\n try {\n christmasBuddENetwork.addUser(\"\");\n } catch (IllegalNullArgumentException e1a) {\n } catch (Exception e2) {\n fail(\"test009_addUsersIllegalNullArgumentException(): FAILED! :( Did \"\n + \"NOT throw an IllegalNullArgumentException when adding an empty \"\n + \"string user\");\n }\n\n\n } catch (Exception e2) {\n fail(\"test009_addUsersIllegalNullArgumentException(): FAILED! :( Threw \"\n + \"the wrong exception!\");\n }\n\n\n\n }", "@Test(timeout = 4000)\n public void test069() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.mutatesStructure((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test032() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.ownerDotComponent((DBObject) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test032() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.ownerDotComponent((DBObject) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test101() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.countRows(\"6vyv%@\\\":8OZvgeq:\", (Connection) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }", "@Test\n void testErrorValidation() {\n jdbcTemplate.execute(\"update obligor set name = null where id = '25410'\");\n assertThatThrownBy(() -> obligorJpaService.findObligorById(25410)).isInstanceOf(ConstraintViolationException.class)\n .hasMessageContaining(\"findObligorById.<return value>.name:\");\n }", "@Test(timeout = 4000)\n public void test044() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.isDDL((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test\r\n public void testErrors() {\r\n try {\r\n isPalindrome(null);\r\n fail(\"Checking null to see if it's a palindrome should throw IllegalArgumentException!\");\r\n } catch (IllegalArgumentException iae) {\r\n /* Test Passed! */ }\r\n }", "@Test\n @ExpectedException(BusinessRuleException.class)\n public final void testMinLengthValidation() {\n\n SimpleCustomerDto customer = new SimpleCustomerDto();\n customer.setFirstName(\"Alfred\");\n customer.setLastName(\"Sloan\");\n customer.setCustomerNr(-1);\n customer.setUsername(\"a\"); // violates minlength = 3 constraint\n customer.setBirthDate(new DateTime(2008, 1, 1, 1, 1, 0, 0));\n\n customerServiceModelService.createCustomer(customer);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.closeResultSetAndStatement((ResultSet) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test42() throws Throwable {\n JSTerm jSTerm0 = new JSTerm();\n JSTerm jSTerm1 = new JSTerm();\n JSSubstitution jSSubstitution0 = new JSSubstitution();\n // Undeclared exception!\n try { \n jSTerm0.matches((JSPredicateForm) jSTerm1, jSSubstitution0);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 0 >= 0\n //\n verifyException(\"java.util.Vector\", e);\n }\n }", "public void testCtor1Accuracy() {\n ContestEligibilityValidatorException exception = new ContestEligibilityValidatorException();\n assertNotNull(\"Unable to instantiate ContestEligibilityValidatorException.\", exception);\n }", "public void testPreConditions() {\r\n\t //fail(\"Precondition check not implemented!\");\r\n\t assertEquals(true,true);\r\n\t }", "public void testCanCreateInvoice() throws Exception {\n try {\n invoiceSessionBean.canCreateInvoice(-1);\n fail(\"Should throw IllegalArgumentException\");\n } catch (IllegalArgumentException e) {\n // expected\n }\n }", "@Test\n public void testProductMatchingExceptionThrown() throws Exception {\n service.loadFiles(); \n\n Order newOrder = new Order();\n newOrder.setCustomerName(\"Jake\");\n newOrder.setState(\"OH\");\n newOrder.setProductType(\"Reptile\");\n newOrder.setArea(new BigDecimal(\"233\"));\n\n boolean correctExceptionThrown = false;\n try {\n service.calculateNewOrderDataInput(newOrder);\n } catch (FlooringValidationException e) {\n correctExceptionThrown = true;\n }\n\n Assert.assertTrue(\"Must Match Products\", correctExceptionThrown);\n\n }" ]
[ "0.71249944", "0.7044787", "0.7020675", "0.7009074", "0.6988415", "0.6948544", "0.6911631", "0.68704927", "0.6863675", "0.68176144", "0.6808021", "0.67558205", "0.6688988", "0.6683993", "0.6675556", "0.66754055", "0.6654435", "0.66248167", "0.66198057", "0.6607618", "0.65895325", "0.65827996", "0.65746915", "0.65543514", "0.655058", "0.6516816", "0.6506076", "0.6500392", "0.6494206", "0.64817065", "0.64651275", "0.6441461", "0.6432519", "0.6416344", "0.63824195", "0.6377972", "0.63718545", "0.6369855", "0.6351283", "0.63474965", "0.63363165", "0.63004065", "0.6300367", "0.62795305", "0.6264843", "0.6263424", "0.6260918", "0.6256012", "0.62332666", "0.6228703", "0.62220407", "0.62156355", "0.62116235", "0.6210018", "0.62099063", "0.6197258", "0.6189915", "0.61851496", "0.61779296", "0.6169764", "0.61682403", "0.6166726", "0.61635846", "0.61633307", "0.61610514", "0.61606437", "0.6160357", "0.6160334", "0.6157646", "0.61533546", "0.61430746", "0.61399597", "0.61285365", "0.6123881", "0.6121766", "0.61211336", "0.61210203", "0.6116651", "0.61128587", "0.61120343", "0.6111956", "0.6106967", "0.61053795", "0.6101205", "0.61007833", "0.60913557", "0.6090495", "0.6086949", "0.6080146", "0.6080146", "0.6077047", "0.60728645", "0.6070259", "0.60682696", "0.6063489", "0.6063037", "0.6061753", "0.6060136", "0.60576665", "0.6054939", "0.60515594" ]
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_home, container, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\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 View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\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\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\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 }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\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 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(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\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, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\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 }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\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 View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\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_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\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_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\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 }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\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\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.6625158", "0.66195583", "0.66164845", "0.6608733", "0.6596594", "0.65928894", "0.6585293", "0.65842897", "0.65730995", "0.6571248", "0.6569152", "0.65689117", "0.656853", "0.6566686", "0.65652984", "0.6553419", "0.65525705", "0.65432084", "0.6542382", "0.65411425", "0.6538022", "0.65366334", "0.65355957", "0.6535043", "0.65329415", "0.65311074", "0.65310687", "0.6528645", "0.65277404", "0.6525902", "0.6524516", "0.6524048", "0.65232015", "0.65224624", "0.65185034", "0.65130377", "0.6512968", "0.65122765", "0.65116245", "0.65106046", "0.65103024", "0.6509013", "0.65088093", "0.6508651", "0.6508225", "0.6504662", "0.650149", "0.65011525", "0.6500686", "0.64974767", "0.64935696", "0.6492234", "0.6490034", "0.6487609", "0.6487216", "0.64872116", "0.6486594", "0.64861935", "0.6486018", "0.6484269", "0.648366", "0.6481476", "0.6481086", "0.6480985", "0.6480396", "0.64797544", "0.647696", "0.64758915", "0.6475649", "0.6474114", "0.6474004", "0.6470706", "0.6470275", "0.64702207", "0.6470039", "0.6467449", "0.646602", "0.6462256", "0.64617974", "0.6461681", "0.6461214" ]
0.0
-1
return a number between min and max
public double rand (double min, double max) { double r = rand(); r = min + (max - min) * r; return r; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public int between(int min, int max) {\n return super.between(min, max);\n }", "private int randomIntRange(int min, int max) {\r\n Random random = new Random();\r\n if (min < 0 || max < 0) {\r\n return (random.nextInt(Math.abs(max - min)) + Math.abs(min) + 1) * -1;\r\n }\r\n return random.nextInt(max - min) + min + 1;\r\n }", "public int getNumber(int min, int max) {\n return (int)(Math.random()* (max-min+1)) + min;\n }", "private int clamp(int value, int min, int max) {\n return Math.max(min, Math.min(value, max));\n }", "private int getRandomNumberInRange(int min, int max) {\n Random rand = new Random();\n return rand.nextInt((max - min) + 1) + min;\n }", "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}", "public static int nextInt (int min, int max) {\n int x = get().nextInt(max-min+1);\n return x+min;\n }", "public static double limitRange( double val , double max , double min )\n {\n //If number is greater than maximum, it becomes the maximum.\n if( val > max )\n {\n val = max; \n }\n else if( val < min )//Else if the number is less than minimum, it becomes the minimum.\n {\n val = min;\n }\n \n //Returns the limited number.\n return val;\n }", "static int Limit(int val, int max, int min) {\n if (val > max) {\n val = max;\n } else if (val < min) {\n val = min;\n }\n\n return val;\n }", "int randomIntInRange(int min, int max) {\n\t\tRandom rand = new Random();\n\t\treturn rand.nextInt(max + 1 - min) + min;\n\t}", "private static int getRandomNumber(int min, int max) \n { //generates a random number within a range\n return (min + rand.nextInt((max - min) + 1));\n }", "int getMin( int min );", "public int randint(int max, int min)\n {\n Random rand = new Random();\n int randomNum = rand.nextInt((max - min) + 1) + min;\n return randomNum;\n }", "private static int randInt(int min, int max) {\n Random rand = new Random();\n\n // nextInt is normally exclusive of the top value,\n // so add 1 to make it inclusive\n int randomNum = rand.nextInt((max - min) + 1) + min;\n\n return randomNum;\n }", "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}", "private int getRandomNumberInRange(int min, int max) {\r\n\r\n\t\tRandom r = new Random();\r\n\t\treturn ((r.nextInt(max - min) + 1) + min)*40;\r\n\t}", "private static int getRandomNumberInRange(int min, int max) {\n\n if (min >= max) {\n throw new IllegalArgumentException(\"max must be greater than min\");\n }\n Random r = new Random();\n return r.nextInt((max - min) + 1) + min;\n }", "static int getRandint(int min, int max) {\r\n\t\tRandom r = new Random();\r\n\t\treturn r.nextInt((max - min) + 1) + min;\r\n\t}", "public int originalgetRandomPositiveInt(int min, int max){\r\n int number = getRandomPositiveInt(); \r\n return (int)number%(max - min + 1)+min;\r\n }", "private int randomRange(int min, int max) {\n\t\tRandom random = new Random();\n\t\treturn random.nextInt((max - min) + 1) + min;\n\t}", "public static int clamp(int value, int min, int max)\n {\n return value < min ? min : value > max ? max : value;\n }", "@Override\n public double between(double min, double max) {\n return super.between(min, max);\n }", "public static double clamp(final int value, final int min, final int max) {\r\n return (value < min) ? min : ((value > max) ? max : value);\r\n }", "int getMax( int max );", "public static int clamp(int var, int min, int max){\n\n if(var >= max){return var = max;}\n else if(var <= min){return var = min;}\n else return var;\n\n }", "private static int randInt(final int min, final int max) {\n // nextInt is normally exclusive of the top value,\n // so add 1 to make it inclusive\n return rand.nextInt((max - min) + 1) + min;\n }", "public static int randomInt(int min, int max) {\n Random rand = new Random();\n int randomNum = rand.nextInt((max - min) + 1) + min;\n return randomNum;\n }", "public static int generateIntRange(int min, int max) {\n return random.nextInt(max - min + 1) + min;\n }", "public static int getRandomNumber(int min, int max){\r\n Random r = new Random();\r\n return r.nextInt((max - min) +1) + min;\r\n }", "protected static int randBetween(int min, int max) {\n\t\tRandom rand = new Random();\n\t\treturn rand.nextInt(max - (min + 1)) + min;\n\t}", "public static int RandomNumber(int min, int max){\n Random random = new Random();\n int randomNum = random.nextInt((max - min)+1)+min;\n return randomNum;\n }", "public static int getRandom(int min, int max){\n\t int x = (int)(Math.random()*((max-min)+1))+min;\n\t return x;\n\t}", "private static int generateRandomNumber(int min, int max) {\n return (int)Math.floor(Math.random() * (max - min + 1)) + min;\n }", "public int randomInt(int min, int max) {\n\t\t\t\t // NOTE: Usually this should be a field rather than a method\n\t\t\t\t // variable so that it is not re-seeded every call.\n\t\t\t\t Random rand = new Random();\n\t\t\t\t // nextInt is normally exclusive of the top value,\n\t\t\t\t // so add 1 to make it inclusive\n\t\t\t\t int randomNum = rand.nextInt((max - min) + 1) + min;\n\t\t\t\t return randomNum;\n\t\t\t\t}", "static public double lim(double x,double min,double max) {\r\n\t\t if(x<min) return min;\r\n\t\t if(x>max) return max;\r\n\t\t return x;\r\n\t}", "public static int randInt(int min, int max) {\r\n\t Random rand = new Random();\r\n\t int randomNum = rand.nextInt((max - min) + 1) + min;\r\n\t return randomNum;\r\n\t}", "public static int randInt(int min, int max) {\n\n // NOTE: Usually this should be a field rather than a method\n // variable so that it is not re-seeded every call.\n Random rand = new Random();\n\n // nextInt is normally exclusive of the top value,\n // so add 1 to make it inclusive\n int randomNum = rand.nextInt((max - min) + 1) + min;\n\n return randomNum;\n }", "public static int randInt(int min, int max) {\n int randomNum = random.nextInt((max - min) + 1) + min;\n return randomNum;\n }", "public static int getValidInteger(int min, int max) {\n\n int userInput = getValidInteger();\n\n while (userInput < min || userInput > max) {\n System.out.printf(\"Please enter a number within %d and %d!\", min, max);\n userInput = getValidInteger();\n }\n\n return userInput;\n }", "public static int randomRangeBound(int minDigits, int maxDigits) {\r\n int digitBoundDiff = maxDigits - minDigits + 1;\r\n int i = rn.nextInt() % digitBoundDiff;\r\n if (i < 0) {\r\n i = -i;\r\n }\r\n return minDigits + i;\r\n }", "private static int randomInt(int min, int max) {\n if (min >= max) {\n throw new IllegalArgumentException(\"max must be greater than min\");\n }\n\n Random r = new Random();\n return r.nextInt(max - min) + min;\n }", "public int randInt(int min, int max) {\n\t\tint randomNum = rand.nextInt((max - min) + 1) + min;\n\n\t\treturn randomNum;\n\t}", "public int getMaxFloor();", "public int randInt(int min, int max) {\n\t Random rand = new Random();\n\n\t // nextInt is normally exclusive of the top value,\n\t // so add 1 to make it inclusive\n\t int randomNum = rand.nextInt((max - min) + 1) + min;\n\n\t return randomNum;\n\t }", "private int generateWholoeNumInRange( int min, int max ) {\r\n\r\n // Evaluate random number from min to max including min and max\r\n return (int)(Math.random()*(max - min + 1) + min);\r\n\r\n }", "public static int getRandomNumberInRange(int min, int max) {\n\n if (min > max) {\n throw new IllegalArgumentException(\"max must be greater than min\");\n }\n\n Random r = new Random();\n return r.nextInt((max - min) + 1) + min;\n }", "public static int randInt(int min, int max) {\n Random rand = new Random();\n\n // nextInt is normally exclusive of the top value,\n // so add 1 to make it inclusive\n int randomNum = rand.nextInt((max - min) + 1) + min;\n\n return randomNum;\n }", "public static int randInt(int min, int max) {\n Random rand = new Random();\n\n // nextInt is normally exclusive of the top value,\n // so add 1 to make it inclusive\n int randomNum = rand.nextInt((max - min) + 1) + min;\n\n return randomNum;\n }", "public static int randInt(int min, int max) {\n\n // Usually this can be a field rather than a method variable\n Random rand = new Random();\n\n // nextInt is normally exclusive of the top value,\n // so add 1 to make it inclusive\n int randomNum = rand.nextInt((max - min) + 1) + min;\n\n return randomNum;\n }", "public static int getRandomNumberInRange(int min, int max) {\r\n\t\tif (min >= max) {\r\n\t\t\tthrow new IllegalArgumentException(\"max must be greater than min\");\r\n\t\t}\r\n\t\tRandom r = new Random();\r\n\t\treturn r.nextInt((max - min) + 1) + min;\r\n\t}", "public static void main(String[] args) {\n int min=100;\n int max=999;\n int random = (int) (min + Math.random() * (max - min));\n int a=random%10;\n int a1=(random/10)%10;\n int a2=(random/100)%10;\n System.out.println(\"Число = \" +random +\" наибольшее число = \" +Math.max(a, Math.max(a1,a2)));\n}", "public static int randInt(int min, int max) \n\t{\n\t Random rand = new Random();\n\n\t // nextInt is normally exclusive of the top value,\n\t // so add 1 to make it inclusive\n\t int randomNum = rand.nextInt((max - min) + 1) + min;\n\n\t return randomNum;\n\t}", "private static int random(int min, int max) {\r\n\t\tRandom rand = java.util.concurrent.ThreadLocalRandom.current();\r\n\t\treturn min + (int) (rand.nextDouble()*(max-min));\r\n\t}", "public static int pseudo(int min, int max) {\n int value = generator.nextInt();\n return value < 0 ? (-value) % (max - min + 1) + min : value % (max - min + 1) + min;\n }", "public static int randInt(int min, int max) {\n\t\t// nextInt is normally exclusive of the top value,\n\t\t// so add 1 to make it inclusive\n\t\tint randomNum = rd.nextInt((max - min) + 1) + min;\n\n\t\treturn randomNum;\n\t}", "public int randInt(int min, int max) {\n Random rand = new Random();\n\n // nextInt is normally exclusive of the top value,\n // so add 1 to make it inclusive\n int randomNum = rand.nextInt((max - min) + 1) + min;\n\n return randomNum;\n}", "public static int randInt(int min, int max) {\n\t Random rand = new Random();\n\n\t // nextInt is normally exclusive of the top value,\n\t // so add 1 to make it inclusive\n\t int randomNum = rand.nextInt((max - min) + 1) + min;\n\n\t return randomNum;\n\t}", "public static int randInt(int min, int max) {\n\t Random rand = new Random();\n\n\t // nextInt is normally exclusive of the top value,\n\t // so add 1 to make it inclusive\n\t int randomNum = rand.nextInt((max - min) + 1) + min;\n\n\t return randomNum;\n\t}", "public static int randInt(int min, int max) {\n\t Random rand = new Random();\n\n\t // nextInt is normally exclusive of the top value,\n\t // so add 1 to make it inclusive\n\t int randomNum = rand.nextInt((max - min) + 1) + min;\n\n\t return randomNum;\n\t}", "public static int nextInt(int minVal, int maxVal) {\n\t\treturn minVal + Utilities.rand.nextInt((maxVal - minVal));\n\t}", "public static int clamp(int var, int min, int max) {\n\n // Clamping means literally in this instance.\n //// it's used to restrict a value to a given range\n if (var >= max) {\n return var = max;\n } else if (var <= min) {\n return var = min;\n } else {\n return var;\n }\n }", "public static int clamp(int min, int max, int val) {\n return (val < min) ? min : (val > max) ? max : val;\n }", "public static boolean between( int value, int min, int max ) {\n return value >= min && value <= max;\n }", "public static int randInt(int min, int max) {\n Random rand = new Random();\n return rand.nextInt((max - min) + 1) + min;\n }", "public static int randInt(int min, int max) {\n\t\trand = new Random();\n\n\t\t// nextInt is normally exclusive of the top value,\n\t\t// so add 1 to make it inclusive\n\t\tint randomNum = rand.nextInt((max - min) + 1) + min;\n\n\t\treturn randomNum;\n\t}", "public static int randInt(int min, int max) {\n\t\tRandom rand = new Random();\n\n\t\t// nextInt is normally exclusive of the top value,\n\t\t// so add 1 to make it inclusive\n\t\tint randomNum = rand.nextInt((max - min) + 1) + min;\n\n\t\treturn randomNum;\n\t}", "public static int randInt(int min, int max) {\n\t\tRandom rand = new Random();\n\n\t\t// nextInt is normally exclusive of the top value,\n\t\t// so add 1 to make it inclusive\n\t\tint randomNum = rand.nextInt((max - min) + 1) + min;\n\n\t\treturn randomNum;\n\t}", "public static int randInt(int min, int max) {\r\n\r\n\t\t\t// Usually this can be a field rather than a method variable\r\n\t\t\tRandom rand = new Random();\r\n\r\n\t\t\t// nextInt is normally exclusive of the top value,\r\n\t\t\t// so add 1 to make it inclusive\r\n\t\t\tint randomNum = rand.nextInt((max - min) + 1) + min;\r\n\r\n\t\t\treturn randomNum;\r\n\t\t}", "public static int randInt(int min, int max) {\n Random rand = new Random();\n\n // nextInt is normally exclusive of the top value,\n // so add 1 to make it inclusive\n\n return rand.nextInt((max - min) + 1) + min;\n }", "public static int getRandomInt(int min, int max) {\n return getInstance().rand.nextInt((max - min) + 1) + min;\n }", "public static int random(int min, int max) {\r\n\t\tint diff = max - min + 1;\r\n\t\treturn ((int) (Math.random() * diff)) + min;\r\n\t}", "int getMaxInt();", "public static int getInteger(int min, int max) {\n Scanner scanner = new Scanner(System.in);\n System.out.print(\"Enter a number between 1 and 10: \");\n String userInput = scanner.next();\n int userNum = Integer.parseInt(userInput);\n boolean valid = true;\n\n if (userNum < min || userNum > max) {\n do {\n System.out.print(\"Enter a number between 1 and 10: \");\n userInput = scanner.next();\n userNum = Integer.parseInt(userInput);\n if (userNum < min || userNum > max) {\n valid = false;\n } else {\n valid = true;\n }\n } while (!valid);\n }\n return userNum;\n }", "private double clamp(double v, double min, double max) { return (v < min ? min : (v > max ? max : v)); }", "public int randomInt(int min, int max) {\r\n\t\treturn (int)(Math.random()*(max-min))+min;\r\n\t}", "public static int randint(int min, int max) {\n return (int) ((((Math.random()) * 100) % (max - min + 1)) + min);\n }", "public static int generatRandomPositiveNegitiveValue(int max , int min) {\n\t int ii = -min + (int) (Math.random() * ((max - (-min)) + 1));\n\t return ii;\n\t}", "public static int random(int min, int max) {\n return (int) Math.floor(Math.random() * (max - min + 1) + min);\n }", "public int randomValueFromClosedInterval(int min, int max, MersenneTwisterFast random)\n {\n if (max - min < 0) // we had an overflow\n {\n int l = 0;\n do l = random.nextInt();\n while(l < min || l > max);\n return l;\n }\n else return min + random.nextInt(max - min + 1);\n }", "private double generateRandomValue(int min, int max) {\n\t\tdouble number = (Math.random() * max * 100) / 100 + min;\n\t\treturn number;\n\t}", "public static int randNum(int min, int max) {\r\n\t\treturn ThreadLocalRandom.current().nextInt(min, max + 1);\r\n\t}", "public static int randomNumber(){\r\n int max = 10;\r\n int min = 0;\r\n int range = max-min+1;\r\n \r\n int randNum = (int)(Math.random()*range) + min;\r\n \r\n return randNum;\r\n }", "public static int generate(int min, int max) {\n\t\n\treturn min + (int) (Math.random() * ((max - min) + 1));\n\t\n\t}", "public static int clamp(int iValue, int min, int max) {\n int result;\n if (iValue < min) {\n result = min;\n } else if (iValue > max) {\n result = max;\n } else {\n result = iValue;\n }\n\n return result;\n }", "private static int getInRangeInt(Scanner scan, int min, int max) {\n int value = -9999;\n while (value < min || value > max) {\n System.out.println(\"Must be a integer between \" + min + \" and \" + max + \" : \");\n while (!scan.hasNextInt()) {\n System.out.println(\"Must be a integer between \" + min + \" and \" + max + \" : \");\n scan.next();\n }\n value = scan.nextInt();\n }\n return value;\n }", "public int getRandomNumberInInterval() {\n\t\treturn getRandomNumberUsingNextInt(min, max);\n\t}", "public static int createRandom(int min, int max){\n\t\tif (min == max){\n\t\t\treturn min;\n\t\t}\n\t\telse{\t\t\t\n\t\t\treturn (int)(Math.random() * (max - min) + min); \n\t\t}\n\t}", "public static int randIntDigits(int min, int max) {\n\t\tRandom rand = new Random();\n\t\tint randomNum = (rand.nextInt((max - min) + 1) + rand.nextInt((max - min) + 1)) / 2;\n\t\treturn randomNum;\n\t}", "public int GetMinVal();", "public static int getInt (String ask, int min, int max)\r\n {\r\n int value = 0;\r\n do {\r\n value = getInt(ask + \" (\" + min + \" - \" + max + \")\");\r\n } while (value < min || value > max);\r\n return value;\r\n }", "private static int randomBetween(Random r, int min, int max) {\n return r.nextInt(max - min) + min;\n }", "public int getMinIntValue();", "public static int randInt() {\n\t\tint min = 10;\n\t\tint max = 99999999;\n\t\tRandom rand = new Random();\n\t\tint randomNum = (rand.nextInt((max - min) + 1) + rand.nextInt((max - min) + 1)) / 2;\n\t\treturn randomNum;\n\t}", "int getMax();", "public int coordinateGenerator(int max, int min) {\n\t\tRandom r = new Random();\n\t\tint a =r.nextInt(max - min) + min;\n\t\treturn a;\n\t}", "public static int getValidInt(int min, int max) {\n\t\tint choice;\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\ttry {\r\n\t\t\tdo {\r\n\t\t\t\tSystem.out.println(String.format(\"Please enter a choice between %d and %d\", min, max));\r\n\t\t\t\tchoice = scan.nextInt();\r\n\t\t\t} while (choice < min || choice > max);\r\n\t\t}\r\n\t\tcatch (java.util.InputMismatchException e) {\r\n\t\t\tSystem.out.println(\"Invalid input. Entry must be an integer\");\r\n\t\t\treturn getValidInt(min, max);\r\n\t\t}\r\n\t\treturn choice;\r\n\t}", "public int generateRandomNumber(int min, int max) {\n\t\tif (min >= max) {\n\t\t\tthrow new IllegalArgumentException(\"max must be greater than min\");\n\t\t}\n\t\tRandom r = new Random();\n\t\treturn (r.nextInt((max - min) + 1) + min);\n\t}", "public static double rng(double min, double max) {\r\n\r\n return (Math.random() * ((max - min) + 1)) + min;\r\n }", "protected int random(int min, int max) {\n\t\treturn this.rand.nextInt(max-min) + min;\n\t}", "private int _getRandomFromRange(int min, int max) {\n\t \n return min + random_.nextInt(max - min + 1);\n }", "private int readNumber(int min, int max) {\n\t\tSystem.out.print(\"Please enter a number between \" + min + \" and \" + max + \": \");\n\t\t\n\t\tBufferedReader keyboard = new BufferedReader(new InputStreamReader(System.in));\n\t\tboolean readNumber = false;\n\t\tint number = 0;\n\n\t\twhile (!readNumber) {\n\t\t\ttry {\n\t\t\t\tString readLine = keyboard.readLine();\n\t\t\t\tnumber = Integer.parseInt(readLine);\n\t\t\t\tif (number >= min && number <= max) {\n\t\t\t\t\treadNumber = true;\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.print(\"Please enter a number from \" + min + \"-\" + max + \": \");\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tSystem.out.print(\"Please enter a number from \" + min + \"-\" + max + \": \");\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t\treturn number;\n\t}" ]
[ "0.75773203", "0.7456583", "0.7443707", "0.7386446", "0.7318289", "0.73099506", "0.72925174", "0.7283362", "0.7261413", "0.7258065", "0.7242469", "0.7241673", "0.7235789", "0.7234347", "0.72060347", "0.7205205", "0.72009945", "0.71861386", "0.71786106", "0.7176849", "0.7157432", "0.71468", "0.7134575", "0.713017", "0.71011037", "0.7094394", "0.70788425", "0.707067", "0.7066202", "0.70648146", "0.706203", "0.70582145", "0.70534647", "0.70410526", "0.7038869", "0.70365715", "0.7024395", "0.70204395", "0.7009888", "0.7009261", "0.70090646", "0.699904", "0.69812506", "0.6972676", "0.69686204", "0.695839", "0.6956394", "0.6956394", "0.6952681", "0.6948213", "0.6947937", "0.6947139", "0.69450337", "0.6944418", "0.6934702", "0.69267637", "0.6920095", "0.6920095", "0.6920095", "0.69094276", "0.6903048", "0.6897791", "0.6895676", "0.6894553", "0.68844974", "0.68723494", "0.68723494", "0.6868633", "0.6853371", "0.68480694", "0.683429", "0.6818343", "0.6807198", "0.6802253", "0.68003243", "0.67935735", "0.6792551", "0.6759686", "0.67582875", "0.6755964", "0.6748432", "0.67470545", "0.67395014", "0.67364055", "0.67294943", "0.67277586", "0.6726002", "0.6725322", "0.66925156", "0.66822046", "0.6680568", "0.66666365", "0.6664915", "0.6663643", "0.66492534", "0.6622165", "0.6620396", "0.6617795", "0.66161317", "0.66132873", "0.66116464" ]
0.0
-1
Autoboxing: assigning primitive value to wrapper class un=boxing: assign wrapper class value to primitive all wrapper classes are prented in "java.land"
public static void main(String[] args) { Integer num1 = 100; double num2 = num1; System.out.println(num2); float f = 0.5f; Float fl = f; System.out.println(fl); System.out.println(Byte.MAX_VALUE); // parse method --> converting String value to primitives, returne primitive // valueOf --> converting String to Wrapper class, return Wrapper class String str1 = "123"; int result = Integer.parseInt(str1); System.out.println(result+1); String str2 = "true"; boolean r1 = Boolean.parseBoolean(str2); System.out.println(r1); // parse method not case sencetive String str3 = "FaLse"; // it is work boolean r2 = Boolean.parseBoolean(str3); System.out.println(r2); String s1 = "100.5"; Double c1 = Double.parseDouble(s1); System.out.println(c1 + 1); // it is call auto boxing Double c2 = Double.valueOf(s1); // this in not auto and not unboxing System.out.println(c1); System.out.println(c2); String s2 = "TrUe"; Boolean b1 = Boolean.valueOf(s2); System.out.println(b1); // no sensetive Double [] arr = new Double[3]; System.out.println(Arrays.toString(arr)); // default value of wrapper class always --> null, null, null String name = "string"; String name1 = new String("string"); Integer I1 = new Integer("123"); System.out.println(addNum(12,13)); System.out.println(addNum(15.3,7.4)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\n\tint i=100;\n\tInteger j=i; // auto boxing\n\t\n\tDouble d=34.2;\n\t\n\tboolean b=true;\n\tboolean b2=b;\n\t\n\tList<Integer>nums=new ArrayList<>();\n\tnums.add(433);\n\tint p=555;\n\tnums.add(p);\n\tnums.add(new Integer(77));\n\t\n\tSystem.out.println(nums);\n\t // UnBoxing == takind the wrapper class object and converting into primitive and happens automatically\n\tint r = nums.get(0);\n\t\n\tboolean bool= new Boolean(false);\n\tboolean boolprim=bool;\n\tSystem.out.println(boolprim);\n\t\n\tCharacter chObj='^'; //autoboxing\n\tchar chPrim=chObj;\n\t\n\tchar myChar='^';\n\tCharacter chObj2=myChar; // autoboxing\n\t\n\tchar chprim=chObj; // unboxing from character object\n\t\n\tInteger intValue = new Integer (400);\n\t\n\tif(intValue==400) { // unboxing \n\t\tSystem.out.println(\"Pass\");\n\t}else {\n\t\tSystem.out.println(\"Fail\");\n\t}\n\t\n\t\n\tString word=\"java\";\n\tword=word.toUpperCase();\n\tword=word+\"programminng\";\n\tSystem.out.println(word);\n}", "public static void main(String[] args) {\n int a=I;\n System.out.println(\"Auto_unboxing\"+a);\n Integer b=new Integer(a);\n System.out.println(\"Auto_boxing\"+b);\n\t}", "public abstract JType unboxify();", "@Test\r\n public void testWrapperToPrimitive() {\n final Class<?>[] primitives = {\r\n Boolean.TYPE, Byte.TYPE, Character.TYPE, Short.TYPE,\r\n Integer.TYPE, Long.TYPE, Float.TYPE, Double.TYPE\r\n };\r\n for (Class<?> primitive : primitives) {\r\n Class<?> wrapperCls = Classes.primitiveToWrapper(primitive);\r\n assertFalse(\"Still primitive\", wrapperCls.isPrimitive());\r\n assertEquals(wrapperCls + \" -> \" + primitive, primitive,\r\n Classes.wrapperToPrimitive(wrapperCls));\r\n }\r\n }", "public static void main(String[] args) {\n\t\t\n\t\tInteger obj= new Integer(10);\n\t\t\n\t\tint value=obj.intValue();\n\t\t\n\t\tint data=obj; //auto unboxing\n\t\t//int data=obj.intValue();\n\t\t\n\t\tobj=200; //autoboxing\n\t\t//obj=new Integer(200);\n\n\t}", "public static void main (String[] args){\n\n ArrayList<Integer> studentNumbers1 = new ArrayList<>();\n studentNumbers1.add(25);\n System.out.println(studentNumbers1.get(0)); // <- unboxing\n /**\n * solution 2 : create custom wrapper class - intWrapper\n */\n ArrayList<intWrapper> studentNumbers2 = new ArrayList<>();\n /**\n * studentNumbers2.add(12); <- Autoboxing\n * java is automatically boxing primitive data type to Object\n * error : intWrapper class does not have any add function so, we can do \"Boxing\" in the parameter\n * with create new object with int value\n */\n studentNumbers2.add(new intWrapper(12)); // <- Boxing\n System.out.println(studentNumbers2.get(0).getIntValue()); // <-Unboxing\n\n\n /**\n * Autoboxing testing with Double\n */\n ArrayList<Double> demoList = new ArrayList<>();\n demoList.add(25.5);\n demoList.add(new Double(25.2));\n /**\n * Java compiler convert the code like below.\n * Below command is done while autoboxing\n */\n demoList.add(Double.valueOf(10.3));\n System.out.println(demoList.get(0)); // <-Autoboxing\n System.out.println(demoList.get(0).doubleValue()); // <- command is done while autoboxing\n\n }", "public static void main(String[] args) {\n\tint age = 56;\n\tInteger age2 = age;\n\tboolean raining = false;\n\tBoolean raining2 = raining;\n\tint i = 10;\n\tList<Integer> ages = new ArrayList<>();\n\tages.add(34);\n\t\n\t//valueO\n\t//If Integer gets converted to int type then its Unboxing\n}", "public static void main(String[] args) {\n\t\tint i = 100;\n\t\t//Integer iobj = Integer.valueOf(i);\n\t\t//System.out.println(iobj);\n\t\tInteger iobj = i; //This is Autoboxing where the compiler takes care of Integer class converting the Primitive type int. without the above step\n\t\tSystem.out.println(iobj);\n\t\t\n\t\t//Unboxing: converting wrapper class obj into primitive data type\n\t\tInteger iobj1 = new Integer(200);\n\t\t//int j = iobj1.intValue();\n\t\t//System.out.println(j);\n\t\tint j = iobj1; //This is Unboxing where the compiler takes care of Integer class converting into the Primitive type int. without the above step\n\t\tSystem.out.println(j);\n\n\t}", "public static void main(String[] args) {\n\n int a = 5; // premitive data type\n\n Integer ii1 = new Integer(a); // boxing or wrapping\n System.out.println(\"ii1=\"+ii1);\n\n Integer ii2 = new Integer(10);\n System.out.println(\"ii2=\"+ii2);\n\n Integer ii3 = a;\n Integer ii4 = 15; // autoboxing or autowrapping\n System.out.println(\"ii3=\"+ii3);\n System.out.println(\"ii4=\"+ii4);\n\n // Integer ii1 = new Integer(a);\n // converting non premitive into premitive\n int a1 = ii1.intValue();// unboxing or unwrapping\n int a2 = ii1;// autounboxing or autounwrapping\n\n }", "public static void main(String[] args) {\r\n\t\r\n\t int numInt=10;\r\n\t Integer numInteger=10;\r\n\t \r\n\t double numdouble=5.5;\r\n\t Double numDouble=5.5;\r\n\t \r\n\t long longnum=20l;\r\n\t Long Longnum=longnum; //auto-boxing\r\n\t \r\n\t System.out.println(longnum);\r\n\t System.out.println(Longnum);\r\n\t \r\n\t Boolean Booleanresult=false;\r\n\t boolean boolresult=Booleanresult; //unboxing\r\n\t \r\n//\t Methods for wrapper classes:\r\n //max_value: returns the max value of the primitive\r\n\t char maximumChar=Character.MAX_VALUE;\r\n\t System.out.println(maximumChar);\r\n\t \r\n\t//min_value: returns the minimum value of primitive.\r\n\t \r\n\t int minimum=Integer.MIN_VALUE;\r\n\t System.out.println(minimum);\r\n\t \r\n\t byte miniByte=Byte.MIN_VALUE;\r\n\t System.out.println(miniByte);\r\n\t \r\n\t//parse methods: converts String values to primitives, nad returns values as primitives.\r\n\t \r\n\t //parseInt(\"strValue\"):takes the String and converts it to int.\r\n\t \r\n\t Integer num1=Integer.parseInt(\"123\"); //auto-boxing\r\n\t System.out.println(num1+1); //124\r\n\t \r\n\t //parseByte(\"strValue\"):takes a string value and converts it to primitive returning a byte value.\r\n\t \r\n\t int num3=Byte.parseByte(\"19\");\r\n\t System.out.println(num3+1); //20\r\n\t \r\n\t //parseShort(\"strValue\"):takes a string value and converts it to primitive returning a short value.\r\n\t \r\n\t short num4=Short.parseShort(\"123\");\r\n\t System.out.println(num4+5); //128\r\n\t \r\n\t //parseBoolean(\"strValue\"): takes string value and converts it to boolean primitive.\r\n\t boolean A=Boolean.parseBoolean(\"CybertekBatch12\"); //any string value other than true, it will return false\r\n\t System.out.println(A); //false\r\n\t \r\n\t boolean B=Boolean.parseBoolean(\"TrUe\");\r\n\t System.out.println(B); //parseBoolean method ignores the case sensitivity in this case.\r\n\t \r\n\t \r\n//\t ValueOf methods: converts String value to Wrapper class value.\r\n\t \r\n\t int z=Integer.valueOf(\"1234\");\r\n\t System.out.println(z);\r\n\t \r\n\t boolean result1=Boolean.valueOf(\"TRUE\"); //this method also ignores the case sensitivity and \r\n\t //since the result is primitive, it prints out the exact one as the string\r\n\t System.out.println(result1);\r\n\t \r\n\t \r\n\t int totalNum=100;\r\n\t \r\n}", "public static void main(String[] args) {\n byte primitiveByte = 127;\n Byte aByte = primitiveByte; // autoboxing\n byte unboxedByte = aByte; // unboxing\n\n short primitiveShort = 1234;\n Short aShort = primitiveShort;\n short unboxedShort = aShort;\n\n int primitiveInt = 123123;\n Integer anInteger = primitiveInt;\n int unboxedInt = anInteger;\n\n long primitiveLong = 1231241241l;\n Long aLong = primitiveLong;\n long unboxedLong = aLong;\n\n float primitiveFloat = 123.3F;\n Float aFloat = primitiveFloat;\n float unboxedFloat = aFloat;\n\n double pritiveDouble = 123.3;\n Double aDouble = pritiveDouble;\n double unboxedDouble = aDouble;\n\n boolean primitiveBolean = true;\n Boolean aBoolean = primitiveBolean;\n boolean unboxedBolean = aBoolean;\n\n char primitiveChar = 'A';\n Character aCharacter = primitiveChar;\n char unboxedChar = aCharacter;\n\n Character aNullCharacter = null;\n char unboxedNullChar = aNullCharacter;\n System.out.println(unboxedNullChar); //NullPointerException\n }", "private static void LessonBoxUnboxCast() {\n int x = 10;\n Object o = x;\n //System.out.println(o + o); //since o is an object you can't uses the + operator\n //LessonReflectionAndGenerics(o.getClass());\n\n // Example Unboxing (this is casting, explicit casting)\n int y = (int) o;\n System.out.println(y);\n\n // Example Implicit casting you can go from smaller data type to a bigger data type\n //But not the other way around unless you use explicit casting\n int i = 100;\n double d = i;\n System.out.println(d);\n\n // Example of tryin to cast a bigger data type into a smaller data type\n double a = 1.92;\n //int b = a; //gets and error\n //need to be explicit\n int b = (int) a;\n System.out.println(b);\n }", "public static void main(String[] args) {\n\t\tint i = 10;\n\t\tInteger I = Integer.valueOf(i);\n\t\tSystem.out.println(I);\n\t\t\n\t\t//Un boxing : Conversion of Wrapper class to Primitive type\n\t\t\n\t\t//Auto boxing\n\t\tI = 100;\n\t\tString S = Integer.toString(1290);\n\t\t\n\t}", "public static void main(String[] args) {\n int x = 20;\n Object obj = x; // an object will be allocated on HEAP with this value(20)\n\n\n /* Unboxing\n * (Conversion process of an Object reference type to a compatible Object \"value type (tipo valor)\")\n */\n\n int y = (int) obj; // a box will be created on STACK with this value(20)\n\n\n /* Wrapper classes do the boxing and unboxing naturally (better use Wrapper classes in Entities classes\n *\n *\n * Wrapper Classes - Primitive\n * Double double\n * Integer int\n * Boolean boolean\n */\n\n }", "public static void main(String[] args) {\n\t\tInteger i =new Integer(10);\r\n\t\tInteger i1=new Integer(\"10\");\r\n\t\tSystem.out.println(\" \" +i+ +i1);\r\n\t\tBoolean b= new Boolean(true);\r\n\t\tBoolean b1 =new Boolean(\"true\");\r\n\t\tSystem.out.println( b +\"\"+b1);\r\n\t\tint iii=new Integer(10);//Auto-unboxing\r\nInteger iiiii =10;//Auto-boxing\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tint a = 100;\n\t\tInteger b = a;//autoboxing\n\t\tint c=b.intValue();//unboxing\n\t\tSystem.out.println(a);\n\t\tSystem.out.println(b);\n\t\tSystem.out.println(c);\n\t}", "@Test\n\tpublic void testBoxedPrimitive() throws Exception {\n\t\ttestWith(new TestClassBoxedPrimitive(123));\n\t\ttestWith(new TestClassBoxedPrimitive(null));\n\t}", "public static void main(String[] args) {\n\r\n\t\tInteger obj = new Integer(10);\r\n\t\t\r\n\t\t//Converting Wrapper object to primitive data type\r\n\t\t\r\n\t\tint num = obj.intValue();\r\n\t\t\r\n\t\tSystem.out.println(num+ \" \"+ obj);\r\n\r\n\t}", "public interface Value {\n Word asWord();\n\n int toSInt();\n\n BigInteger toBInt();\n\n short toHInt();\n\n byte toByte();\n\n double toDFlo();\n\n float toSFlo();\n\n Object toArray();\n\n Record toRecord();\n\n Clos toClos();\n\n MultiRecord toMulti();\n\n boolean toBool();\n\n char toChar();\n\n Object toPtr();\n\n Env toEnv();\n\n <T> T toJavaObj();\n\n public class U {\n static public Record toRecord(Value value) {\n if (value == null)\n return null;\n else\n return value.toRecord();\n }\n\n public static Value fromBool(boolean b) {\n return new Bool(b);\n }\n\n public static Value fromSInt(int x) {\n return new SInt(x);\n }\n\n public static Value fromArray(Object x) {\n return new Array(x);\n }\n\n public static Value fromBInt(BigInteger x) {\n return new BInt(x);\n }\n\n public static Value fromPtr(Object o) {\n return new Ptr(o);\n }\n\n public static Value fromSFlo(float o) {\n return new SFlo(o);\n }\n\n public static Value fromDFlo(double o) {\n return new DFlo(o);\n }\n\n public static Value fromChar(char o) {\n return new Char(o);\n }\n\n public static Value fromByte(byte o) {\n return new Byte(o);\n }\n\n public static Value fromHInt(short o) {\n return new HInt(o);\n }\n\n\tpublic static <T> Value fromJavaObj(T obj) {\n\t return new JavaObj<T>(obj);\n\t}\n }\n}", "public abstract Number getPrimitiveType();", "public static void main(String[] args) {\n\n\t\tint x = 100;\n\n\t\t// boxing\n\t\tInteger iobj = new Integer(x);\n\t\tSystem.out.println(iobj);\n\n\t\t// unboxing\n\t\tint y = iobj.intValue();\n\t\tSystem.out.println(y);\n\t}", "public Class<?> getPrimitiveType();", "@Override\r\n\tpublic Class<?> mapPrimitive2Wrapper(Class<?> pri) {\n\t\treturn _DefUtil.primitiveTypeMap.get(pri);\r\n\t}", "public interface ScalarType extends java.io.Serializable\n{\n /** create a clone of this scalar's value. It is important to note that you should return a copy here unless you really want \n scalars of your scalar type to be passed by reference. */\n public ScalarType copyValue(); \n\n /** convert the scalar to an int */\n public int intValue();\n\n /** convert the scalar to a long */\n public long longValue();\n\n /** convert the scalar to a double */\n public double doubleValue();\n\n /** convert the scalar to a string */\n public String toString();\n\n /** convert the scalar to an object value *shrug* */\n public Object objectValue();\n\n /** returns the Class type of this ScalarType. Use this instead of getClass to allow other functions to wrap ScalarType's without breaking\n functionality */\n public Class getType();\n}", "public PrimObject primitive351(PrimContext context) {\n final Integer value = (Integer) this.javaValue;\n final PrimObject argument = context.argumentAt(0);\n final PrimClass argClass = argument.selfClass();\n if (argClass.equals(resolveObject(\"Integer\"))) {\n Integer argValue = (Integer) context.argumentJavaValueAt(0);\n return smalltalkBoolean(value.equals(argValue));\n }\n else {\n //Converet types using next smalltalk code:\n // <code> (aNumber adaptInteger: self) = aNumber adaptToInteger </code>\n PrimObject leftOperand = argument.perform0(\"adaptInteger\", this);\n PrimObject rightOperand = argument.perform0(\"adaptInteger\");\n return leftOperand.perform0(\"=\", rightOperand);\n }\n }", "private static int unbox(Integer i) {\n\t\treturn (i == null) ? 0 : i;\n\t}", "Int(int v){\n val = v;\n }", "PrimitiveType createPrimitiveType();", "IntegerValue getValueObject();", "@Test\r\n public void testIsPrimitiveWrapper() {\n assertTrue(\"Boolean.class\", Classes.isPrimitiveWrapper(Boolean.class));\r\n assertTrue(\"Byte.class\", Classes.isPrimitiveWrapper(Byte.class));\r\n assertTrue(\"Character.class\", Classes.isPrimitiveWrapper(Character.class));\r\n assertTrue(\"Short.class\", Classes.isPrimitiveWrapper(Short.class));\r\n assertTrue(\"Integer.class\", Classes.isPrimitiveWrapper(Integer.class));\r\n assertTrue(\"Long.class\", Classes.isPrimitiveWrapper(Long.class));\r\n assertTrue(\"Double.class\", Classes.isPrimitiveWrapper(Double.class));\r\n assertTrue(\"Float.class\", Classes.isPrimitiveWrapper(Float.class));\r\n \r\n // test primitive classes\r\n assertFalse(\"boolean\", Classes.isPrimitiveWrapper(Boolean.TYPE));\r\n assertFalse(\"byte\", Classes.isPrimitiveWrapper(Byte.TYPE));\r\n assertFalse(\"char\", Classes.isPrimitiveWrapper(Character.TYPE));\r\n assertFalse(\"short\", Classes.isPrimitiveWrapper(Short.TYPE));\r\n assertFalse(\"int\", Classes.isPrimitiveWrapper(Integer.TYPE));\r\n assertFalse(\"long\", Classes.isPrimitiveWrapper(Long.TYPE));\r\n assertFalse(\"double\", Classes.isPrimitiveWrapper(Double.TYPE));\r\n assertFalse(\"float\", Classes.isPrimitiveWrapper(Float.TYPE));\r\n \r\n // others\r\n assertFalse(\"null\", Classes.isPrimitiveWrapper(null));\r\n assertFalse(\"Void.class\", Classes.isPrimitiveWrapper(Void.class));\r\n assertFalse(\"Void.TYPE\", Classes.isPrimitiveWrapper(Void.TYPE));\r\n assertFalse(\"String.class\", Classes.isPrimitiveWrapper(String.class));\r\n assertFalse(\"this.getClass()\", Classes.isPrimitiveWrapper(this.getClass()));\r\n }", "default boolean isPrimitive() {\n return false;\n }", "public static void main(String[] args) {\n\n\t\tint x=10;\n\t\tInteger y =x; //Auto Boxing\n\t\t\n\t\tint z =y;\n\t}", "private JavaType(C_PTR primitivePointerType) {\n this.primitivePointerType = primitivePointerType;\n }", "@Override\n public boolean isPrimitive() {\n return true;\n }", "public static interface UnboxingResponsible {\n\n /**\n * Attempts to unbox the represented type in order to assign the unboxed value to the given target type\n * while using the assigner that is provided by the method call.\n *\n * @param targetType The type that is the desired outcome of the assignment.\n * @param assigner The assigner used to assign the unboxed type to the target type.\n * @param considerRuntimeType If {@code true}, unsafe castings are allowed for this assignment.\n * @return A stack manipulation representing this assignment if such an assignment is possible. An illegal\n * assignment otherwise.\n */\n StackManipulation assignUnboxedTo(TypeDescription targetType, Assigner assigner, boolean considerRuntimeType);\n }", "@FunctionalInterface\npublic interface IntegerToLongAccessPrimitive extends LongAccessPrimitive<Integer>, IntToLongFunction, IntFunction<Long> {\n \n // == Constructor ==\n public static IntegerToLongAccessPrimitive of(IntegerToLongAccessPrimitive accessToValue) {\n return accessToValue;\n }\n \n @Override\n public default IntegerToLongAccessPrimitive newAccess(Function<Integer, Long> accessToValue) {\n return accessToValue::apply;\n }\n \n // == abstract functionalities ==\n public long applyIntToLong(int host);\n \n public default long applyAsLong(int operand) {\n return applyIntToLong(operand);\n }\n \n public default long applyAsLong(Integer host) {\n return applyIntToLong(host);\n }\n \n @Override\n public default Long apply(int host) {\n return applyIntToLong(host);\n }\n \n @Override\n public default Long apply(Integer input) {\n return LongAccessPrimitive.super.apply(input);\n }\n \n // -- conversion --\n public default LongAccessBoxed<Integer> boxed() {\n return host -> apply(host);\n }\n \n @Override\n public default IntegerToIntegerAccessPrimitive asInteger() {\n return asInteger(Integer.MIN_VALUE, Integer.MAX_VALUE);\n }\n \n public default IntegerToIntegerAccessPrimitive asInteger(int overflowValue) {\n return asInteger(overflowValue);\n }\n \n public default IntegerToIntegerAccessPrimitive asInteger(int negativeOverflowValue, int positiveOverflowValue) {\n return host -> {\n val value = accessPrimitive(this, host);\n if (value < Integer.MIN_VALUE)\n return negativeOverflowValue;\n if (value > Integer.MAX_VALUE)\n return positiveOverflowValue;\n return (int) Math.round(value);\n };\n }\n \n @Override\n public default IntegerToLongAccessPrimitive asLong() {\n return host -> accessPrimitive(this, host);\n }\n \n @Override\n public default IntegerToDoubleAccessPrimitive asDouble() {\n return host -> accessPrimitive(this, host);\n }\n \n @Override\n public default IntegerToStringAccessPrimitive asString() {\n return host -> \"\" + accessPrimitive(this, host);\n }\n \n @Override\n public default IntegerToStringAccessPrimitive asString(String template) {\n return host -> {\n val value = accessPrimitive(this, host);\n return String.format(template, value);\n };\n }\n \n // -- Equality --\n @Override\n public default IntegerToBooleanAccessPrimitive that(LongPredicate checker) {\n return host -> {\n val value = accessPrimitive(this, host);\n return checker.test(value);\n };\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatIs(long anotherValue) {\n return host -> {\n val value = accessPrimitive(this, host);\n return value == anotherValue;\n };\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatIs(LongSupplier anotherSupplier) {\n return host -> {\n val value = accessPrimitive(this, host);\n val anotherValue = getPrimitive(anotherSupplier);\n return value == anotherValue;\n };\n }\n \n public default IntegerToBooleanAccessPrimitive thatIs(LongToIntegerAccessPrimitive anotherAccess) {\n return host -> {\n val value = accessPrimitive(this, host);\n val anotherValue = accessPrimitive(anotherAccess, host);\n return value == anotherValue;\n };\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatIsNot(long anotherValue) {\n return host -> {\n val value = accessPrimitive(this, host);\n return value != anotherValue;\n };\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatIsNot(LongSupplier anotherSupplier) {\n return host -> {\n val value = accessPrimitive(this, host);\n val anotherValue = getPrimitive(anotherSupplier);\n return value != anotherValue;\n };\n }\n \n public default IntegerToBooleanAccessPrimitive thatIsNot(LongToIntegerAccessPrimitive anotherAccess) {\n return host -> {\n val value = accessPrimitive(this, host);\n val anotherValue = accessPrimitive(anotherAccess, host);\n return value != anotherValue;\n };\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatIsAnyOf(long... otherValues) {\n return host -> {\n val value = accessPrimitive(this, host);\n for (val anotherValue : otherValues) {\n if (value == anotherValue) {\n return true;\n }\n }\n return false;\n };\n }\n \n // @Override\n // public default IntegerToBooleanAccessPrimitive thatIsAnyOf(LongFuncList otherValues) {\n // return host -> {\n // val value = accessPrimitive(this, host);\n // return otherValues.anyMatch(anotherValue -> value == anotherValue);\n // };\n // }\n @Override\n public default IntegerToBooleanAccessPrimitive thatIsNoneOf(long... otherValues) {\n return host -> {\n val value = accessPrimitive(this, host);\n for (val anotherValue : otherValues) {\n if (value == anotherValue) {\n return false;\n }\n }\n return true;\n };\n }\n \n // @Override\n // public default IntegerToBooleanAccessPrimitive thatIsNoneOf(LongFuncList otherValues) {\n // return host -> {\n // val value = accessPrimitive(this, host);\n // return otherValues.noneMatch(anotherValue -> value == anotherValue);\n // };\n // }\n @Override\n public default IntegerToBooleanAccessPrimitive thatIsOne() {\n return thatIs(1);\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatIsZero() {\n return thatIs(0);\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatIsMinusOne() {\n return thatIs(-1);\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatIsFourtyTwo() {\n return thatIs(42);\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatIsNotOne() {\n return thatIsNot(1);\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatIsNotZero() {\n return thatIsNot(0);\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatIsNotMinusOne() {\n return thatIsNot(-1);\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatIsPositive() {\n return host -> {\n val value = accessPrimitive(this, host);\n return value > 0;\n };\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatIsNegative() {\n return host -> {\n val value = accessPrimitive(this, host);\n return value < 0;\n };\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatIsNotPositive() {\n return host -> {\n val value = accessPrimitive(this, host);\n return value <= 0;\n };\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatIsNotNegative() {\n return host -> {\n val value = accessPrimitive(this, host);\n return value >= 0;\n };\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatEquals(long anotherValue) {\n return host -> {\n val value = accessPrimitive(this, host);\n return value == anotherValue;\n };\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatEquals(LongSupplier anotherSupplier) {\n return host -> {\n val value = accessPrimitive(this, host);\n val anotherValue = getPrimitive(anotherSupplier);\n return value == anotherValue;\n };\n }\n \n public default IntegerToBooleanAccessPrimitive thatEquals(LongToIntegerAccessPrimitive anotherAccess) {\n return host -> {\n val value = accessPrimitive(this, host);\n val anotherValue = accessPrimitive(anotherAccess, host);\n return value == anotherValue;\n };\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive eq(long anotherValue) {\n return thatEquals(anotherValue);\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive eq(LongSupplier anotherSupplier) {\n return thatEquals(anotherSupplier);\n }\n \n public default IntegerToBooleanAccessPrimitive eq(LongToIntegerAccessPrimitive anotherAccess) {\n return thatEquals(anotherAccess);\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatNotEquals(long anotherValue) {\n return host -> {\n val value = accessPrimitive(this, host);\n return value != anotherValue;\n };\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatNotEquals(LongSupplier anotherSupplier) {\n return host -> {\n val value = accessPrimitive(this, host);\n val anotherValue = getPrimitive(anotherSupplier);\n return value != anotherValue;\n };\n }\n \n public default IntegerToBooleanAccessPrimitive thatNotEquals(LongToIntegerAccessPrimitive anotherAccess) {\n return host -> {\n val value = accessPrimitive(this, host);\n val anotherValue = accessPrimitive(anotherAccess, host);\n return value != anotherValue;\n };\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive neq(long anotherValue) {\n return thatNotEquals(anotherValue);\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive neq(LongSupplier anotherSupplier) {\n return thatNotEquals(anotherSupplier);\n }\n \n public default IntegerToBooleanAccessPrimitive neq(LongToIntegerAccessPrimitive anotherAccess) {\n return thatNotEquals(anotherAccess);\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatEqualsOne() {\n return thatEquals(1);\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatEqualsZero() {\n return thatEquals(0);\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatEqualsMinusOne() {\n return thatEquals(-1);\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatEqualsFourtyTwo() {\n return thatEquals(42);\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatNotEqualsOne() {\n return thatEquals(1);\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatNotEqualsZero() {\n return thatEquals(0);\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatNotEqualsMinusOne() {\n return thatEquals(-1);\n }\n \n // -- Compare --\n @Override\n public default IntComparator inOrder() {\n return (a, b) -> {\n val aValue = accessPrimitive(this, a);\n val bValue = accessPrimitive(this, b);\n return comparePrimitive(aValue, bValue);\n };\n }\n \n @Override\n public default IntComparator inReverseOrder() {\n return (a, b) -> {\n val aValue = accessPrimitive(this, a);\n val bValue = accessPrimitive(this, b);\n return comparePrimitive(bValue, aValue);\n };\n }\n \n @Override\n public default IntegerToIntegerAccessPrimitive compareTo(long anotherValue) {\n return host -> {\n val value = accessPrimitive(this, host);\n val compare = comparePrimitive(value, anotherValue);\n return compare;\n };\n }\n \n @Override\n public default IntegerToIntegerAccessPrimitive compareTo(LongSupplier anotherSupplier) {\n return host -> {\n val value = accessPrimitive(this, host);\n val anotherValue = getPrimitive(anotherSupplier);\n val compare = comparePrimitive(value, anotherValue);\n return compare;\n };\n }\n \n public default IntegerToIntegerAccessPrimitive compareTo(LongToIntegerAccessPrimitive anotherAccess) {\n return host -> {\n val value = accessPrimitive(this, host);\n val anotherValue = accessPrimitive(anotherAccess, host);\n val compare = comparePrimitive(value, anotherValue);\n return compare;\n };\n }\n \n @Override\n public default IntegerToIntegerAccessPrimitive cmp(long anotherValue) {\n return compareTo(anotherValue);\n }\n \n @Override\n public default IntegerToIntegerAccessPrimitive cmp(LongSupplier anotherSupplier) {\n return compareTo(anotherSupplier);\n }\n \n public default IntegerToIntegerAccessPrimitive cmp(LongToIntegerAccessPrimitive anotherAccess) {\n return compareTo(anotherAccess);\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatGreaterThan(long anotherValue) {\n return host -> {\n val value = accessPrimitive(this, host);\n return value > anotherValue;\n };\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatGreaterThan(LongSupplier anotherSupplier) {\n return host -> {\n val value = accessPrimitive(this, host);\n val anotherValue = getPrimitive(anotherSupplier);\n return value > anotherValue;\n };\n }\n \n public default IntegerToBooleanAccessPrimitive thatGreaterThan(LongToIntegerAccessPrimitive anotherAccess) {\n return host -> {\n val value = accessPrimitive(this, host);\n val anotherValue = accessPrimitive(anotherAccess, host);\n return value > anotherValue;\n };\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive gt(long anotherValue) {\n return thatGreaterThan(anotherValue);\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive gt(LongSupplier anotherSupplier) {\n return thatGreaterThan(anotherSupplier);\n }\n \n public default IntegerToBooleanAccessPrimitive gt(LongToIntegerAccessPrimitive anotherAccess) {\n return thatGreaterThan(anotherAccess);\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatLessThan(long anotherValue) {\n return host -> {\n val value = accessPrimitive(this, host);\n return value < anotherValue;\n };\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatLessThan(LongSupplier anotherSupplier) {\n return host -> {\n val value = accessPrimitive(this, host);\n val anotherValue = getPrimitive(anotherSupplier);\n return value < anotherValue;\n };\n }\n \n public default IntegerToBooleanAccessPrimitive thatLessThan(LongToIntegerAccessPrimitive anotherAccess) {\n return host -> {\n val value = accessPrimitive(this, host);\n val anotherValue = accessPrimitive(anotherAccess, host);\n return value < anotherValue;\n };\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive lt(long anotherValue) {\n return thatLessThan(anotherValue);\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive lt(LongSupplier anotherSupplier) {\n return thatLessThan(anotherSupplier);\n }\n \n public default IntegerToBooleanAccessPrimitive lt(LongToIntegerAccessPrimitive anotherAccess) {\n return thatLessThan(anotherAccess);\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatGreaterThanOrEqualsTo(long anotherValue) {\n return host -> {\n val value = accessPrimitive(this, host);\n return value >= anotherValue;\n };\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatGreaterThanOrEqualsTo(LongSupplier anotherSupplier) {\n return host -> {\n val value = accessPrimitive(this, host);\n val anotherValue = getPrimitive(anotherSupplier);\n return value >= anotherValue;\n };\n }\n \n public default IntegerToBooleanAccessPrimitive thatGreaterThanOrEqualsTo(LongToIntegerAccessPrimitive anotherAccess) {\n return host -> {\n val value = accessPrimitive(this, host);\n val anotherValue = accessPrimitive(anotherAccess, host);\n return value >= anotherValue;\n };\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive gteq(long anotherValue) {\n return thatGreaterThanOrEqualsTo(anotherValue);\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive gteq(LongSupplier anotherSupplier) {\n return thatGreaterThanOrEqualsTo(anotherSupplier);\n }\n \n public default IntegerToBooleanAccessPrimitive gteq(LongToIntegerAccessPrimitive anotherAccess) {\n return thatGreaterThanOrEqualsTo(anotherAccess);\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatLessThanOrEqualsTo(long anotherValue) {\n return host -> {\n val value = accessPrimitive(this, host);\n return value <= anotherValue;\n };\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatLessThanOrEqualsTo(LongSupplier anotherSupplier) {\n return host -> {\n val value = accessPrimitive(this, host);\n val anotherValue = getPrimitive(anotherSupplier);\n return value <= anotherValue;\n };\n }\n \n public default IntegerToBooleanAccessPrimitive thatLessThanOrEqualsTo(LongToIntegerAccessPrimitive anotherAccess) {\n return host -> {\n val value = accessPrimitive(this, host);\n val anotherValue = accessPrimitive(anotherAccess, host);\n return value <= anotherValue;\n };\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive lteq(long anotherValue) {\n return thatLessThanOrEqualsTo(anotherValue);\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive lteq(LongSupplier anotherSupplier) {\n return thatLessThanOrEqualsTo(anotherSupplier);\n }\n \n public default IntegerToBooleanAccessPrimitive lteq(LongToIntegerAccessPrimitive anotherAccess) {\n return thatLessThanOrEqualsTo(anotherAccess);\n }\n \n // -- Min+Max --\n @Override\n public default IntegerToLongAccessPrimitive min(long anotherValue) {\n return host -> {\n val value = accessPrimitive(this, host);\n return Math.min(value, anotherValue);\n };\n }\n \n @Override\n public default IntegerToLongAccessPrimitive min(LongSupplier valueSupplier) {\n return host -> {\n val value = accessPrimitive(this, host);\n val anotherValue = getPrimitive(valueSupplier);\n return Math.min(value, anotherValue);\n };\n }\n \n public default IntegerToLongAccessPrimitive min(IntegerToLongAccessPrimitive anotherAccess) {\n return host -> {\n val value = accessPrimitive(this, host);\n val anotherValue = accessPrimitive(anotherAccess, host);\n return Math.min(value, anotherValue);\n };\n }\n \n @Override\n public default IntegerToLongAccessPrimitive max(long anotherValue) {\n return host -> {\n val value = accessPrimitive(this, host);\n return Math.max(value, anotherValue);\n };\n }\n \n @Override\n public default IntegerToLongAccessPrimitive max(LongSupplier valueSupplier) {\n return host -> {\n val value = accessPrimitive(this, host);\n val anotherValue = getPrimitive(valueSupplier);\n return Math.max(value, anotherValue);\n };\n }\n \n public default IntegerToLongAccessPrimitive max(IntegerToLongAccessPrimitive anotherAccess) {\n return host -> {\n val value = accessPrimitive(this, host);\n val anotherValue = accessPrimitive(anotherAccess, host);\n return Math.max(value, anotherValue);\n };\n }\n \n // -- Math --\n @Override\n public default IntegerToBooleanAccessPrimitive thatIsOdd() {\n return host -> {\n val value = accessPrimitive(this, host);\n return value % 2 != 0;\n };\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatIsEven() {\n return host -> {\n val value = accessPrimitive(this, host);\n return value % 2 == 0;\n };\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatIsDivisibleBy(long anotherValue) {\n return host -> {\n val value = accessPrimitive(this, host);\n return value % anotherValue == 0;\n };\n }\n \n @Override\n public default IntegerToBooleanAccessPrimitive thatIsDivisibleBy(LongSupplier anotherAccess) {\n return host -> {\n val value = accessPrimitive(this, host);\n val anotherValue = getPrimitive(anotherAccess);\n return value % anotherValue == 0;\n };\n }\n \n public default IntegerToBooleanAccessPrimitive thatIsDivisibleBy(LongToIntegerAccessPrimitive anotherAccess) {\n return host -> {\n val value = accessPrimitive(this, host);\n val anotherValue = accessPrimitive(anotherAccess, host);\n return value % anotherValue == 0;\n };\n }\n \n @Override\n public default IntegerToLongAccessPrimitive abs() {\n return host -> {\n val value = accessPrimitive(this, host);\n return (value < 0) ? -value : value;\n };\n }\n \n @Override\n public default IntegerToLongAccessPrimitive negate() {\n return host -> {\n val value = accessPrimitive(this, host);\n return -value;\n };\n }\n \n @Override\n public default IntegerToLongAccessPrimitive signum() {\n return host -> {\n val value = accessPrimitive(this, host);\n return (value == 0) ? 0 : (value < 0) ? -1 : 1;\n };\n }\n \n @Override\n public default IntegerToLongAccessPrimitive plus(long anotherValue) {\n return host -> {\n val value = accessPrimitive(this, host);\n return value + anotherValue;\n };\n }\n \n @Override\n public default IntegerToLongAccessPrimitive plus(LongSupplier valueSupplier) {\n return host -> {\n val value = accessPrimitive(this, host);\n val anotherValue = getPrimitive(valueSupplier);\n return value + anotherValue;\n };\n }\n \n public default IntegerToLongAccessPrimitive plus(IntegerToLongAccessPrimitive anotherAccess) {\n return host -> {\n val value = accessPrimitive(this, host);\n val anotherValue = accessPrimitive(anotherAccess, host);\n return value + anotherValue;\n };\n }\n \n @Override\n public default IntegerToLongAccessPrimitive minus(long anotherValue) {\n return host -> {\n val value = accessPrimitive(this, host);\n return value - anotherValue;\n };\n }\n \n @Override\n public default IntegerToLongAccessPrimitive minus(LongSupplier valueSupplier) {\n return host -> {\n val value = accessPrimitive(this, host);\n val anotherValue = getPrimitive(valueSupplier);\n return value - anotherValue;\n };\n }\n \n public default IntegerToLongAccessPrimitive minus(IntegerToLongAccessPrimitive anotherAccess) {\n return host -> {\n val value = accessPrimitive(this, host);\n val anotherValue = accessPrimitive(anotherAccess, host);\n return value - anotherValue;\n };\n }\n \n @Override\n public default IntegerToLongAccessPrimitive time(long anotherValue) {\n return host -> {\n val value = accessPrimitive(this, host);\n return value * anotherValue;\n };\n }\n \n @Override\n public default IntegerToLongAccessPrimitive time(LongSupplier valueSupplier) {\n return host -> {\n val value = accessPrimitive(this, host);\n val anotherValue = getPrimitive(valueSupplier);\n return value * anotherValue;\n };\n }\n \n public default IntegerToLongAccessPrimitive time(IntegerToLongAccessPrimitive anotherAccess) {\n return host -> {\n val value = accessPrimitive(this, host);\n val anotherValue = accessPrimitive(anotherAccess, host);\n return value * anotherValue;\n };\n }\n \n @Override\n public default IntegerToDoubleAccessPrimitive dividedBy(long anotherValue) {\n return host -> {\n val value = accessPrimitive(this, host);\n return 1.0 * value / anotherValue;\n };\n }\n \n @Override\n public default IntegerToDoubleAccessPrimitive dividedBy(LongSupplier valueSupplier) {\n return host -> {\n val value = accessPrimitive(this, host);\n val anotherValue = getPrimitive(valueSupplier);\n return 1.0 * value / anotherValue;\n };\n }\n \n public default IntegerToDoubleAccessPrimitive dividedBy(IntegerToLongAccessPrimitive anotherAccess) {\n return host -> {\n val value = accessPrimitive(this, host);\n val anotherValue = accessPrimitive(anotherAccess, host);\n return 1.0 * value / anotherValue;\n };\n }\n \n @Override\n public default IntegerToLongAccessPrimitive remainderBy(long anotherValue) {\n return host -> {\n val value = accessPrimitive(this, host);\n return value % anotherValue;\n };\n }\n \n @Override\n public default IntegerToLongAccessPrimitive remainderBy(LongSupplier valueSupplier) {\n return host -> {\n val value = accessPrimitive(this, host);\n val anotherValue = getPrimitive(valueSupplier);\n return value % anotherValue;\n };\n }\n \n public default IntegerToLongAccessPrimitive remainderBy(IntegerToLongAccessPrimitive anotherAccess) {\n return host -> {\n val value = accessPrimitive(this, host);\n val anotherValue = accessPrimitive(anotherAccess, host);\n return value % anotherValue;\n };\n }\n \n public default IntegerToDoubleAccessPrimitive inverse() {\n return host -> {\n val value = access(this, host);\n return 1 / (value * 1.0);\n };\n }\n \n @Override\n public default IntegerToLongAccessPrimitive square() {\n return host -> {\n val value = accessPrimitive(this, host);\n return value * value;\n };\n }\n \n @Override\n public default IntegerToDoubleAccessPrimitive squareRoot() {\n return host -> {\n val value = accessPrimitive(this, host);\n return Math.sqrt(value);\n };\n }\n \n @Override\n public default IntegerToLongAccessPrimitive factorial() {\n return host -> {\n val value = accessPrimitive(this, host);\n if (value <= 0) {\n return 1;\n }\n return factorialRef.get().applyAsLong(value);\n };\n }\n \n // TODO - Make this Long once we are ready.\n @Override\n public default IntegerToLongAccessPrimitive pow(long anotherValue) {\n return host -> {\n val value = accessPrimitive(this, host);\n return (long) Math.pow(value, anotherValue);\n };\n }\n \n @Override\n public default IntegerToLongAccessPrimitive pow(LongSupplier valueSupplier) {\n return host -> {\n val value = accessPrimitive(this, host);\n val anotherValue = getPrimitive(valueSupplier);\n return (long) Math.pow(value, anotherValue);\n };\n }\n \n public default IntegerToLongAccessPrimitive pow(IntegerToLongAccessPrimitive anotherAccess) {\n return host -> {\n val value = accessPrimitive(this, host);\n val anotherValue = accessPrimitive(anotherAccess, host);\n return (long) Math.pow(value, anotherValue);\n };\n }\n}", "public static void main(String[] args) {\n\t\tint a=10;\r\n\t\t\r\n\t\tInteger i=Integer.valueOf(a);// converting int into integer\t\r\n\t\tInteger j=a;// autoboxing,now compiler will write Integer.valueOf(a) internally \r\n\t\t\r\n\t\tSystem.out.println(a+\" \"+i+\" \"+j);\r\n\r\n\t}", "public ScalarType copyValue();", "public PrimitiveType getPrimitiveType();", "public void quickBoxIfNecessary(ClassNode type, MethodVisitor mv) {\n String descr = getTypeDescription(type);\n if (type == boolean_TYPE) {\n boxBoolean(mv);\n } else if (isPrimitiveType(type) && type != VOID_TYPE) {\n ClassNode wrapper = TypeUtil.wrapSafely(type);\n String internName = getClassInternalName(wrapper);\n mv.visitTypeInsn(Opcodes.NEW, internName);\n mv.visitInsn(Opcodes.DUP);\n if (type == double_TYPE || type == long_TYPE) {\n mv.visitInsn(Opcodes.DUP2_X2);\n mv.visitInsn(Opcodes.POP2);\n } else {\n mv.visitInsn(Opcodes.DUP2_X1);\n mv.visitInsn(Opcodes.POP2);\n }\n mv.visitMethodInsn(Opcodes.INVOKESPECIAL, internName, \"<init>\", \"(\" + descr + \")V\");\n }\n }", "public static ClassReference fromPrimitive(Primitive primitive) {\n\t\tswitch (primitive) {\n\t\tcase BOOLEAN:\n\t\t\treturn BOOLEAN;\n\t\tcase BYTE:\n\t\t\treturn BYTE;\n\t\tcase CHAR:\n\t\t\treturn CHAR;\n\t\tcase SHORT:\n\t\t\treturn SHORT;\n\t\tcase INT:\n\t\t\treturn INT;\n\t\tcase LONG:\n\t\t\treturn LONG;\n\t\tcase FLOAT:\n\t\t\treturn FLOAT;\n\t\tcase DOUBLE:\n\t\t\treturn DOUBLE;\n\t\tcase REFERENCE:\n\t\t\treturn OBJECT;\n\t\tdefault:\n\t\t\treturn null;\n\t\t}\n\t}", "private void tryCallWithPrimitives() {\n int primitiveType = 10;\n // the method call will take a copy of primitiveType variable value, the original value will not changed\n callMethod(primitiveType);\n // the value is just 100\n System.out.println(primitiveType);\n }", "public TypeNativePrimitiveObjectWrapperRuntimeImpl(TypeNativePrimitiveObjectWrapperImpl typeDec,Class javaClass,boolean isPrimary,RuntimeContext ctx)\n {\n super(typeDec,javaClass,isPrimary,ctx);\n }", "@Test\r\n public void testPrimitive()\r\n {\r\n test(int.class);\r\n }", "public T caseIntegerValue(IntegerValue object) {\n\t\treturn null;\n\t}", "public long longValue();", "int mo16689b(T t);", "public Number(final T theVal)\n {\n if (theVal instanceof Integer) {\n myInt = (Integer) theVal;\n isInt = true;\n } else if (theVal instanceof Double) {\n myDouble = (Double) theVal;\n isDouble = true;\n } else if (theVal instanceof Float) {\n myFloat = (Float) theVal;\n isFloat = true;\n } else if (theVal instanceof Long) {\n myLong = (Long) theVal;\n isLong = true;\n }\n }", "int applyAsInt(T value);", "public Int(int value) { \n this.value = value; \n }", "public PrimitiveType getPrimitiveType() {\n return primitiveType;\n }", "public interface IUnsafe {\n\n byte getByte(long address);\n\n void putByte(long address, byte x);\n\n short getShort(long address);\n\n void putShort(long address, short x);\n\n char getChar(long address);\n\n void putChar(long address, char x);\n\n int getInt(long address);\n\n void putInt(long address, int x);\n\n long getLong(long address);\n\n void putLong(long address, long x);\n\n float getFloat(long address);\n\n void putFloat(long address, float x);\n\n double getDouble(long address);\n\n void putDouble(long address, double x);\n\n int getInt(Object o, long address);\n\n void putInt(Object o, long address, int x);\n\n Object getObject(Object o, long address);\n\n void putObject(Object o, long address, Object x);\n\n boolean getBoolean(Object o, long address);\n\n void putBoolean(Object o, long address, boolean x);\n\n byte getByte(Object o, long address);\n\n void putByte(Object o, long address, byte x);\n\n short getShort(Object o, long address);\n\n void putShort(Object o, long address, short x);\n\n char getChar(Object o, long address);\n\n void putChar(Object o, long address, char x);\n\n long getLong(Object o, long address);\n\n void putLong(Object o, long address, long x);\n\n float getFloat(Object o, long address);\n\n void putFloat(Object o, long address, float x);\n\n double getDouble(Object o, long address);\n\n void putDouble(Object o, long address, double x);\n\n\n\n long getAddress(long address);\n\n void putAddress(long address, long x);\n\n long allocateMemory(long bytes);\n\n long reallocateMemory(long address, long bytes);\n\n void setMemory(Object o, long offset, long bytes, byte value);\n\n default void setMemory(long address, long bytes, byte value) {\n setMemory(null, address, bytes, value);\n }\n\n void copyMemory(Object srcBase, long srcOffset, Object destBase, long destOffset, long bytes);\n\n default void copyMemory(long srcAddress, long destAddress, long bytes) {\n copyMemory(null, srcAddress, null, destAddress, bytes);\n }\n\n void freeMemory(long address);\n \n}", "protected void record2object(String tableAlias, Object obj, Database db, ResultSet results, int position)\r\n throws SQLException, ReflectiveOperationException {\r\n Object dbValue = record2object(tableAlias, results, position);\r\n if (results.wasNull()) {\r\n dbValue = null;\r\n }\r\n dbValue = db.unformatValue(dbValue, fieldAccess.typeFromSetter());\r\n if (dbValue == null && isPrimitive)\r\n throw new SQLException(\"Attempt to assign NULL from \" + databaseFieldName + \" to a primitive\");\r\n fieldAccess.set(obj, dbValue);\r\n }", "public static Object unboxAll(Class<?> type, Object src, int srcPos, int len) {\n switch (tId(type)) {\n case I_BOOLEAN: return unboxBooleans(src, srcPos, len);\n case I_BYTE: return unboxBytes(src, srcPos, len);\n case I_CHARACTER: return unboxCharacters(src, srcPos, len);\n case I_DOUBLE: return unboxDoubles(src, srcPos, len);\n case I_FLOAT: return unboxFloats(src, srcPos, len);\n case I_INTEGER: return unboxIntegers(src, srcPos, len);\n case I_LONG: return unboxLongs(src, srcPos, len);\n case I_SHORT: return unboxShorts(src, srcPos, len);\n }\n throw new IllegalArgumentException(\"No primitive/box: \" + type);\n }", "@ZenCodeType.Caster\n @ZenCodeType.Method\n default long asLong() {\n \n return notSupportedCast(BasicTypeID.LONG);\n }", "IntegerValue createIntegerValue();", "IntegerValue createIntegerValue();", "private void setupPrimitiveTypes()\n {\n primitiveTypes.add(INTEGER_TYPE);\n primitiveTypes.add(FLOAT_TYPE);\n primitiveTypes.add(DOUBLE_TYPE);\n primitiveTypes.add(STRING_TYPE);\n primitiveTypes.add(BOOL_TYPE);\n primitiveTypes.add(TIMESTAMP_TYPE);\n }", "public abstract JClass boxify();", "public void mo1184a(Object obj) {\n if (obj != null && obj.getClass() == Integer.class) {\n this.f4517d = ((Integer) obj).intValue();\n this.c = true;\n }\n }", "public abstract Object adjust(Object value, T type);", "@Test\r\n public void testIsPrimitiveOrWrapper() {\n assertTrue(\"Boolean.class\", Classes.isPrimitiveOrWrapper(Boolean.class));\r\n assertTrue(\"Byte.class\", Classes.isPrimitiveOrWrapper(Byte.class));\r\n assertTrue(\"Character.class\", Classes.isPrimitiveOrWrapper(Character.class));\r\n assertTrue(\"Short.class\", Classes.isPrimitiveOrWrapper(Short.class));\r\n assertTrue(\"Integer.class\", Classes.isPrimitiveOrWrapper(Integer.class));\r\n assertTrue(\"Long.class\", Classes.isPrimitiveOrWrapper(Long.class));\r\n assertTrue(\"Double.class\", Classes.isPrimitiveOrWrapper(Double.class));\r\n assertTrue(\"Float.class\", Classes.isPrimitiveOrWrapper(Float.class));\r\n \r\n // test primitive classes\r\n assertTrue(\"boolean\", Classes.isPrimitiveOrWrapper(Boolean.TYPE));\r\n assertTrue(\"byte\", Classes.isPrimitiveOrWrapper(Byte.TYPE));\r\n assertTrue(\"char\", Classes.isPrimitiveOrWrapper(Character.TYPE));\r\n assertTrue(\"short\", Classes.isPrimitiveOrWrapper(Short.TYPE));\r\n assertTrue(\"int\", Classes.isPrimitiveOrWrapper(Integer.TYPE));\r\n assertTrue(\"long\", Classes.isPrimitiveOrWrapper(Long.TYPE));\r\n assertTrue(\"double\", Classes.isPrimitiveOrWrapper(Double.TYPE));\r\n assertTrue(\"float\", Classes.isPrimitiveOrWrapper(Float.TYPE));\r\n assertTrue(\"Void.TYPE\", Classes.isPrimitiveOrWrapper(Void.TYPE));\r\n \r\n // others\r\n assertFalse(\"null\", Classes.isPrimitiveOrWrapper(null));\r\n assertFalse(\"Void.class\", Classes.isPrimitiveOrWrapper(Void.class));\r\n assertFalse(\"String.class\", Classes.isPrimitiveOrWrapper(String.class));\r\n assertFalse(\"this.getClass()\", Classes.isPrimitiveOrWrapper(this.getClass()));\r\n }", "public native void set(T value);", "public void Convert() {\n value = value;\n }", "public V cast(Object object) {\n return valueClass.cast(object);\n }", "protected static Object createValue(Class type)\n {\n Object rv = null;\n\n if (type.isPrimitive()) {\n if (type == Boolean.TYPE)\n rv = new Boolean(false);\n \n else if (type == Byte.TYPE)\n rv = new Byte((byte)0);\n \n else if (type == Character.TYPE)\n rv = new Character((char)0);\n \n else if (type == Short.TYPE)\n rv = new Short((short)0);\n \n else if (type == Integer.TYPE)\n rv = new Integer(0);\n \n else if (type == Long.TYPE)\n rv = new Long(0);\n \n else if (type == Float.TYPE)\n rv = new Float(0);\n \n else if (type == Double.TYPE)\n rv = new Double(0);\n \n else if (type == Void.TYPE)\n rv = null;\n \n else \n throw new Error(\"unreachable\");\n }\n\n return rv;\n }", "public static void main(String args[]) {\n\t\t \n\t\t // lets define some variables and try to insert other data type value\n\t\t int x = 23;\n\t\t double y ;\n\t\t y = x ; // here we are storing int to double ie. smaller to larger . So no error\n\t\t System.out.println(y);\n\t\t System.out.println(x);\n\t\t \n\t\t double a = 25.28;\n\t\t int b ;\n\t\t //b = a; // Here we can see error since we are trying to store double to int i.e larger to smaller w/o casting\n\t\t \n\t\t // lets do casting and store \n\t\t b = (int) a;\n\t\t System.out.println(b);\n\t\t \n\t\t boolean bool = true ;\n\t\t int num = bool; // not possible as we know boolean data type cannot be typecast;\n\t\t \n\t\t //int to long\n\t\t int value = 34;\n\t\t long value1 ;\n\t\t \n\t\t value1 = value;\n\t\t System.out.println(value1);\n\t\t value = value1; // trying longer to smaller w/o casting which is not possible;\n\t\t System.out.println(value);\n\t\t \n\t\t value = (int) value1;\n\t\t \n\t\t // long to float \n\t\t \n\t\t long value2 = 678;\n\t\t float value3; \n\t\t value3 = value2; // works fine since smaller to larger\n\t\t System.out.println(value3);\n\t\t value2 = value3 ; // trying longer to smaller w/o casting which is not possible;\n\t\t \n\t\t // so to assign value3 to value2 we need Explicitly type cast\n\t\t value2 = (long) value3;\n\t\t \n\t\t // float to long and vice versa \n\t\t \n\t\t float value4 = 567.78f;\n\t\t double value5 ;\n\t\t value5 = value4 ; // works fine since assigning smaller type to larger type\n\t\t System.out.println(value5);\n\t\t value4 = value5 ; // trying longer to smaller w/o casting which is not possible;\n\t\t \n\t\t // Also we can explicit cast for storing larger (double) to long/int/short\n\t\t double value6 = 3564.8;\n\t\t int value7 ;\n\t\t \n\t\t value7 = (int) value6;\n\t\t System.out.println(value7);\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t }", "PrimitiveTypeSourceReference createPrimitiveTypeSourceReference();", "LspType(int val) {\n value = val;\n }", "long getLongValue();", "long getLongValue();", "public Object convertValue(Field field) throws IllegalAccessException\n {\n if (field.getType().equals(Boolean.TYPE))\n {\n return (field.getBoolean(this) ? Boolean.TRUE : Boolean.FALSE);\n }\n if (field.getType().equals(Integer.TYPE))\n {\n return new Integer(field.getInt(this));\n }\n if (field.getType().equals(Short.TYPE))\n {\n return new Short(field.getShort(this));\n }\n if (field.getType().equals(Float.TYPE))\n {\n return new Double(field.getFloat(this));\n }\n if (field.getType().equals(Double.TYPE))\n {\n return new Double(field.getDouble(this));\n }\n //System.out.println(\"ohoh...\");\n return null; //and good luck with it :-) ...\n }", "public interface CalcPrimitive<T extends Number> {\n\t/**\n\t * Basic arithmetic operation which adds two numbers\n\t * \n\t * @param first\n\t * the addition operand\n\t * @param second\n\t * the addition operand\n\t * @return first + second\n\t */\n\tpublic T sum(T first, T second);\n\n\t/**\n\t * Basic arithmetic operation which subtracts two numbers\n\t * \n\t * @param first\n\t * the subtraction operand\n\t * @param second\n\t * the subtraction operand\n\t * @return first - second\n\t */\n\tpublic T sub(T first, T second);\n\n\t/**\n\t * Basic arithmetic operation which multiplies two numbers\n\t * \n\t * @param first\n\t * the multiplication operand\n\t * @param second\n\t * the multiplication operand\n\t * @return first * second\n\t */\n\tpublic T mul(T first, T second);\n\n\t/**\n\t * Basic arithmetic operation which divides two numbers\n\t * \n\t * @param first\n\t * the division operand\n\t * @param second\n\t * the division operand\n\t * @return first / second\n\t */\n\tpublic T div(T first, T second);\n\n\t/**\n\t * Basic operation which calculates the cosine of the value\n\t * \n\t * @param value\n\t * the operand of the cosine function in radians\n\t * @return the cosine of the value\n\t */\n\tpublic T cos(T value);\n\n\t/**\n\t * Basic operation which calculates the (value)^e\n\t * \n\t * @param value\n\t * the operand of the calculation\n\t * @return (value)^e\n\t */\n\tpublic T exp(T value);\n\n\t/**\n\t * Basic operation which calculates the square root of a value.\n\t * \n\t * @param value\n\t * the operand of the square root function\n\t * @return the square root of value\n\t */\n\tpublic T sqrt(T value);\n\n\t/**\n\t * Convert a String to a T value\n\t * \n\t * @param str\n\t * a String for converting\n\t * @return the value of the specified String as a T\n\t * @throws NumberFormatException\n\t * when str is incorrect\n\t */\n\tpublic T getFromString(String str) throws NumberFormatException;\n\n\t/**\n\t * Check a String on a possibility of converting\n\t * \n\t * @param str\n\t * a String for check\n\t * @return true for correct str and false for incorrect\n\t */\n\tpublic boolean isCorrect(String str);\n\n\t/**\n\t * Convert a T value to a String\n\t * \n\t * @param value\n\t * a T object to converting\n\t * @return the value of the specified number as a String\n\t */\n\tpublic String getString(T value);\n}", "private static Class<?> getWrapperClass(Class<?> primitiveClass) {\n return WrapperClassGenerator.wrapperClassMap.get(primitiveClass.getName());\n }", "public static void main(String[] args) {\n Integer obj1 = Integer.valueOf(23);\n Double obj2 = Double.valueOf(5.55);\n Boolean obj3 = Boolean.valueOf(true);\n\n // converts into prinitive types\n int var1 = obj1.intValue();\n double var2 = obj2.intValue();\n boolean var3 = obj3.booleanValue();\n\n // print the primitive values\n System.out.println(\"The value of int variable: \" + var1);\n System.out.println(\"The value of double variable: \" + var2);\n System.out.println(\"The value of boolean variable: \" + var3);\n }", "public T casePrimitiveDefinition(PrimitiveDefinition object)\n {\n return null;\n }", "public native T get();", "private static Object nullOrDefaultFor(final Class<?> type) {\r\n return defaultByPrimitiveType.get(type);\r\n }", "public static void main(String[] args) {\n\t\tString number = \"100\";\n\t\tint e = Integer.parseInt(number); // Convenience Method\n\t\tLong t = 1000l;\n\t\tbyte rr = t.byteValue(); // Convenience Method\n\t\tint bb = t.intValue();\n\t\tfloat cc = t.floatValue(); // xxxValue method\n\t\tlong r = 1000L;\n\t\tint r1 = (int)r;\n\t\t\n\t\t//********************************\n\t\tint r3 = 1000;\n\t\tInteger r4 = new Integer(r3); // Old Way Boxing\n\t\tint r6 = r4.intValue(); // Old Way UnBoxing\n\t\tr6++; // Increment\n\t\tr4 = new Integer(r6); // Old Way boxing\n\t\t\n\t\tInteger r5 = r3; // New Way Boxing\n\t\tr5++; // Unboxing , Increment , Boxing\n\t\tLinkedList l = new LinkedList();\n\t\tl.add(1000);\n\t\tint p1 = 1000; \n\t\tInteger p2 = 128; //-128 to 127\n\t\tInteger p3 = 128;\n\t\tif(p2==p3){\n\t\t\tSystem.out.println(\"Same Ref\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"Not Same Ref\");\n\t\t}\n\n\t}", "public final JavaliParser.primitiveType_return primitiveType() throws RecognitionException {\n\t\tJavaliParser.primitiveType_return retval = new JavaliParser.primitiveType_return();\n\t\tretval.start = input.LT(1);\n\n\t\tObject root_0 = null;\n\n\t\tToken tok=null;\n\n\t\tObject tok_tree=null;\n\t\tRewriteRuleTokenStream stream_92=new RewriteRuleTokenStream(adaptor,\"token 92\");\n\t\tRewriteRuleTokenStream stream_90=new RewriteRuleTokenStream(adaptor,\"token 90\");\n\t\tRewriteRuleTokenStream stream_86=new RewriteRuleTokenStream(adaptor,\"token 86\");\n\n\t\ttry {\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:561:2: (tok= 'int' -> Identifier[$tok, $tok.text] |tok= 'float' -> Identifier[$tok, $tok.text] |tok= 'boolean' -> Identifier[$tok, $tok.text] )\n\t\t\tint alt40=3;\n\t\t\tswitch ( input.LA(1) ) {\n\t\t\tcase 92:\n\t\t\t\t{\n\t\t\t\talt40=1;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 90:\n\t\t\t\t{\n\t\t\t\talt40=2;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 86:\n\t\t\t\t{\n\t\t\t\talt40=3;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\tnew NoViableAltException(\"\", 40, 0, input);\n\t\t\t\tthrow nvae;\n\t\t\t}\n\t\t\tswitch (alt40) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:561:4: tok= 'int'\n\t\t\t\t\t{\n\t\t\t\t\ttok=(Token)match(input,92,FOLLOW_92_in_primitiveType2636); \n\t\t\t\t\tstream_92.add(tok);\n\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: \n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 562:3: -> Identifier[$tok, $tok.text]\n\t\t\t\t\t{\n\t\t\t\t\t\tadaptor.addChild(root_0, (Object)adaptor.create(Identifier, tok, (tok!=null?tok.getText():null)));\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:563:5: tok= 'float'\n\t\t\t\t\t{\n\t\t\t\t\ttok=(Token)match(input,90,FOLLOW_90_in_primitiveType2651); \n\t\t\t\t\tstream_90.add(tok);\n\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: \n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 564:7: -> Identifier[$tok, $tok.text]\n\t\t\t\t\t{\n\t\t\t\t\t\tadaptor.addChild(root_0, (Object)adaptor.create(Identifier, tok, (tok!=null?tok.getText():null)));\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:565:4: tok= 'boolean'\n\t\t\t\t\t{\n\t\t\t\t\ttok=(Token)match(input,86,FOLLOW_86_in_primitiveType2669); \n\t\t\t\t\tstream_86.add(tok);\n\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: \n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 566:3: -> Identifier[$tok, $tok.text]\n\t\t\t\t\t{\n\t\t\t\t\t\tadaptor.addChild(root_0, (Object)adaptor.create(Identifier, tok, (tok!=null?tok.getText():null)));\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t\tretval.stop = input.LT(-1);\n\n\t\t\tretval.tree = (Object)adaptor.rulePostProcessing(root_0);\n\t\t\tadaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n\t\t}\n\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\tthrow re;\n\t\t}\n\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn retval;\n\t}", "private Expr boxingUpcastIfNeeded(Expr a, Type fType) {\n if (a instanceof NullLit_c) {\n return makeCast(a.position(), a, fType);\n }\n \n if (Types.baseType(fType) instanceof FunctionType) {\n return upcastToFunctionType(a, (FunctionType)Types.baseType(fType), true);\n }\n \n if (ts.isObjectType(a.type(), context) && ts.isObjectType(fType, context)) {\n // implicit C++ level upcast is good enough (C++ and X10 have same class hierarchy structure)\n return a;\n }\n \n if (!ts.typeDeepBaseEquals(fType, a.type(), context)) {\n Position pos = a.position();\n return makeCast(a.position(), a, fType);\n } else {\n return a;\n }\n }", "public PrimObject primitive350(PrimContext context) {\n final Integer value = (Integer) this.javaValue;\n final PrimObject argument = context.argumentAt(0);\n final PrimClass argClass = argument.selfClass();\n if (argClass.equals(resolveObject(\"Integer\"))) {\n Integer argValue = (Integer) context.argumentJavaValueAt(0);\n return smalltalkBoolean(value < argValue);\n }\n else {\n //Converet types using next smalltalk code:\n // <code> (aNumber adaptInteger: self) < aNumber adaptToInteger </code>\n PrimObject leftOperand = argument.perform0(\"adaptInteger\", this);\n PrimObject rightOperand = argument.perform0(\"adaptInteger\");\n return leftOperand.perform0(\"<\", rightOperand);\n }\n }", "Object getConvertedValue() throws ConversionException;", "public Object elConvertType(Object value);", "public final void value(Object o) {\n value(objectToInt(o));\n valueType = OBJECT_TYPE;\n }", "public Int(int v) {\n value = v;\n }", "public static void main(String args[])\r\n\t{\n\t\tbyte byteVal = 10;\r\n\t\tshort shortVal = 20;\r\n\t\t\r\n\t\tByte firstByteObj = new Byte(byteVal);\r\n\t\tByte secondByteObj = new Byte(\"10\");\r\n\t\tSystem.out.println(\"Byte Created using Primitive - \" + firstByteObj);\r\n\t\tSystem.out.println(\"Byte Created using String - \" + secondByteObj);\r\n\t\t\r\n\t\tShort firstShortObj = new Short(shortVal);\r\n\t\tShort secondShortObj = new Short(\"20\");\r\n\t\tSystem.out.println(\"Short Created using primitive - \" + firstShortObj);\r\n\t\tSystem.out.println(\"Short Created using String - \" + secondShortObj);\r\n\t\t\r\n\t\tInteger firstIntegerObj = new Integer(100);\r\n\t\tInteger secondIntegerObj = new Integer(\"100\");\r\n\t\tSystem.out.println(\"Integer Created using primitive - \" + firstIntegerObj);\r\n\t\tSystem.out.println(\"Integer Created using String - \" + secondIntegerObj);\r\n\t\t\r\n\t\tLong firstLongObj = new Long(1000l);\r\n\t\tLong secondLongObj = new Long(\"1000\");\r\n\t\t//Long thirdLongObj = new Long(\"1000l\"); // throws java.lang.NumberFormatException: For input string: \"1000l\"\r\n\t\tSystem.out.println(\"Long Created using primitive - \" + firstLongObj);\r\n\t\tSystem.out.println(\"Long Created using String - \" + secondLongObj);\r\n\t\t//System.out.println(\"Long Created using String with convension - \" + thirdLongObj);\r\n\t\t\r\n\t\tFloat firstFloatObj = new Float(10.5f);\r\n\t\tFloat secondFloatObj = new Float(\"10.5f\");\r\n\t\tFloat thirdFloatObj = new Float(\"10.5\");\r\n\t\tFloat fourthFloatObj = new Float(10.5);\r\n\t\tSystem.out.println(\"Float created using primitive - \" + firstFloatObj);\r\n\t\tSystem.out.println(\"Float created using String with convension - \" + secondFloatObj);\r\n\t\tSystem.out.println(\"Float Created using String - \" + thirdFloatObj);\r\n\t\tSystem.out.println(\"Float created using Double - \" + fourthFloatObj);\r\n\t\t\r\n\t\tDouble firstDoubleObj = new Double(123.34);\r\n\t\tDouble secondDoubleObj = new Double(\"321.34\");\r\n\t\tSystem.out.println(\"Double Created using Double - \" + firstDoubleObj);\r\n\t\tSystem.out.println(\"Double Created using String - \" + secondDoubleObj);\r\n\t\t\r\n\t\tCharacter firstCharObj = new Character('a');\r\n\t\t// Character secondCharObj = new Character(\"a\"); // Cant create a Character wrapper using String\r\n\t\tSystem.out.println(\"Character created using primitive - \" + firstCharObj);\r\n\t\t\r\n\t\tBoolean firstBooleanObj = new Boolean(true);\r\n\t\tBoolean secondBooleanObj = new Boolean(false);\r\n\t\tBoolean thirdBooleanObj = new Boolean(\"true\");\r\n\t\tBoolean fourthBooleanObj = new Boolean(\"True\");\r\n\t\tBoolean fifthBooleanObj = new Boolean(\"TRUE\");\r\n\t\tBoolean sixthBooleanObj = new Boolean(\"false\");\r\n\t\tBoolean seventhBooleanObj = new Boolean(\"Baskar\");\r\n\t\t\r\n\t\tSystem.out.println(\"Boolean created using primitive - \" + firstBooleanObj); //true\r\n\t\tSystem.out.println(\"Boolean created using primitive - \" + secondBooleanObj); //false`\r\n\t\tSystem.out.println(\"Boolean created using String - \" + thirdBooleanObj); //true\r\n\t\tSystem.out.println(\"Boolean created using String - \" + fourthBooleanObj); // true\r\n\t\tSystem.out.println(\"Boolean created using String - \" + fifthBooleanObj); //true\r\n\t\tSystem.out.println(\"Boolean created using String - \" + sixthBooleanObj); //false\r\n\t\tSystem.out.println(\"Boolean created using String - \" + seventhBooleanObj); //false //default value is false\r\n\t}", "public static void unbox(Class type, MethodVisitor mv) {\n if (type.isPrimitive() && type != Void.TYPE) {\n String returnString = \"(Ljava/lang/Object;)\" + getTypeDescription(type);\n mv.visitMethodInsn(\n Opcodes.INVOKESTATIC,\n getClassInternalName(DefaultTypeTransformation.class.getName()),\n type.getName() + \"Unbox\",\n returnString);\n }\n }", "private static void increasePrimitive(int value) {\n value++;\n }", "public void puzzle4(){\n\t\tshort x = 0;\n\t\tint i = 123456;\n\t\tx += i; // narrowing primitive conversion [JLS 5.1.3]\n\t\t//x = x + i; // wont compile:possible loss of precision\n\t\tSystem.out.println(\"Value of x \"+x);\n\t}", "public static void main(String[] args) {\n\t\tBox<Integer> box1 = Util.<Integer>boxing(100);\r\n//\t\tBox<Integer> box3 = Util.boxing(100);\r\n\t\tint intValue = box1.get();\r\n\t\tSystem.out.println(intValue);\r\n\t\t\r\n\t\tBox<String> box2 = Util.boxing(\"홍길동\");\r\n\t\tString strValue = box2.get();\r\n\t\tSystem.out.println(strValue);\r\n\t}", "public static LazyPrimitive<?, ?> createLazyPrimitiveClass(PrimitiveObjectInspector oi) {\n PrimitiveCategory p = oi.getPrimitiveCategory();\n switch (p) {\n case BOOLEAN:\n return new LazyBoolean((LazyBooleanObjectInspector) oi);\n case BYTE:\n return new LazyByte((LazyByteObjectInspector) oi);\n case SHORT:\n return new LazyShort((LazyShortObjectInspector) oi);\n case INT:\n return new LazyInteger((LazyIntObjectInspector) oi);\n case LONG:\n return new LazyLong((LazyLongObjectInspector) oi);\n case FLOAT:\n return new LazyFloat((LazyFloatObjectInspector) oi);\n case DOUBLE:\n return new LazyDouble((LazyDoubleObjectInspector) oi);\n case STRING:\n return new LazyString((LazyStringObjectInspector) oi);\n default:\n throw new RuntimeException(\"Internal error: no LazyObject for \" + p);\n }\n }", "PrimitiveType(String name) {\n\tthis.primitiveElem = new PrimitiveElem(name);\n\t\n }", "public T caseInteger(sensorDeploymentLanguage.Integer object) {\n\t\treturn null;\n\t}", "public IntType asInt(){\n return TypeFactory.getIntType(this.toInt(this.getValue()));\n }", "private void functionalInterfacesForDoubleIntLong() {\n double d = 1.0;\n DoubleToIntFunction f1 = x -> 1;\n f1.applyAsInt(d);\n\n }", "public int intValue();", "@java.lang.Override\n public long getLongValue() {\n if (typeCase_ == 3) {\n return (java.lang.Long) type_;\n }\n return 0L;\n }", "public BuiltInAtomicType getPrimitiveType() {\n return BuiltInAtomicType.NOTATION;\n }", "public interface BoxedDoubleToBooleanFunction extends ObjectToBooleanFunction<Double> {\n\n}" ]
[ "0.7217121", "0.6942113", "0.6863131", "0.668947", "0.6673198", "0.66408557", "0.6630847", "0.6601766", "0.6484856", "0.64580315", "0.6451678", "0.6443912", "0.63775426", "0.63206255", "0.61723465", "0.6170196", "0.6120766", "0.6013012", "0.5990323", "0.59506196", "0.5896357", "0.5861695", "0.58607817", "0.58247256", "0.5802953", "0.5781114", "0.5776852", "0.57539856", "0.57030874", "0.5685684", "0.56722283", "0.5647553", "0.5616393", "0.5609878", "0.55790526", "0.5559495", "0.55403286", "0.55306077", "0.5522757", "0.54614985", "0.5442337", "0.5373264", "0.5367645", "0.53227293", "0.53218424", "0.5321436", "0.53137934", "0.53025705", "0.5289572", "0.52871746", "0.5278726", "0.52772945", "0.5275699", "0.5274483", "0.5270744", "0.5247302", "0.5247302", "0.5241536", "0.52405584", "0.523858", "0.5227637", "0.52258444", "0.52241075", "0.52191174", "0.5209541", "0.51938456", "0.5186596", "0.5179634", "0.5162573", "0.51576674", "0.51576674", "0.51403785", "0.51394534", "0.5138079", "0.5135878", "0.51255983", "0.5113043", "0.5111232", "0.510857", "0.51039857", "0.5100515", "0.50954366", "0.50945866", "0.50925976", "0.50880903", "0.5086592", "0.5065345", "0.5063825", "0.5062716", "0.5061734", "0.5057065", "0.505597", "0.50442797", "0.50399756", "0.50384986", "0.5022502", "0.5022311", "0.5017756", "0.5015899", "0.5010745" ]
0.56677103
31
skip inner, it will never break outside code
public void visit(BinCITypesDefStatement x) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean ignoreInner();", "@Override\n\tpublic void skip() {\n\t}", "@Test(groups = {\"unreachable\"})\n\tpublic void testUnreachableNestedBraceless()\n\t{\n\t\tString[] src = {\n\t\t\t\"(function() {\",\n\t\t \" var x;\",\n\t\t \" if (!x)\",\n\t\t \" return function() {\",\n\t\t \" if (!x) x = 0;\",\n\t\t \" return;\",\n\t\t \" };\",\n\t\t \" return;\",\n\t\t \"}());\"\n\t\t};\n\t\t\n\t th.test(src);\n\t}", "void skip();", "public void testUnconditionalBreakDirective()\n {\n assertEvalEquals(\"1\", \"#foreach($i in [1..5])$i#break #end\");\n }", "public void skip()\n {\n skip(1);\n }", "public boolean eliminateLoop(){ return false; }", "private void skip(XmlPullParser parser) throws XmlPullParserException, IOException {\n\t\tif (parser.getEventType() != XmlPullParser.START_TAG) {\n\t\t\tthrow new IllegalStateException();\n\t\t}\n\t\tint depth = 1;\n\t\twhile (depth != 0) {\n\t\t\tswitch (parser.next()) {\n\t\t\tcase XmlPullParser.END_TAG:\n\t\t\t\tdepth--;\n\t\t\t\tbreak;\n\t\t\tcase XmlPullParser.START_TAG:\n\t\t\t\tdepth++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public static void main(String args[])\n\t{\n\t\tfrom_here :for(int i=0;i<10;i++)\n\t\t{\n\t\t\tfor(int j=0;j<10;j++)\n\t\t\t{\n\t\t\t\tSystem.out.println(i+ \" \"+j) ;\n\t\t\t\tif(j==6)\n\t\t\t\t\tbreak ;//from_here ;\n\t\t\t}\n\t\t\tSystem.out.println(\"This is hidden from the continue \") ;\n\t\t}\n\t}", "private void skip(XmlPullParser parser) throws XmlPullParserException, IOException {\n if (parser.getEventType() != XmlPullParser.START_TAG) {\n throw new IllegalStateException();\n }\n int depth = 1;\n while (depth != 0) {\n switch (parser.next()) {\n case XmlPullParser.END_TAG:\n depth--;\n break;\n case XmlPullParser.START_TAG:\n depth++;\n break;\n }\n }\n }", "private void skip(XmlPullParser parser) throws XmlPullParserException, IOException {\n if (parser.getEventType() != XmlPullParser.START_TAG) {\n throw new IllegalStateException();\n }\n int depth = 1;\n while (depth != 0) {\n switch (parser.next()) {\n case XmlPullParser.END_TAG:\n depth--;\n break;\n case XmlPullParser.START_TAG:\n depth++;\n break;\n }\n }\n }", "private void skipObject() {\r\n\t\tint depth = 0;\r\n\t\twhile (this.in.readToTag()) {\r\n\t\t\tfinal Type type = this.in.getTag().getType();\r\n\r\n\t\t\tswitch (type) {\r\n\t\t\tcase END:\r\n\t\t\t\tif (depth == 0) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tdepth--;\r\n\t\t\t\tbreak;\r\n\t\t\tcase BEGIN:\r\n\t\t\t\tdepth++;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void traverseExcludeSelf(INext<T> next){\n if(next==null){\n return;\n }\n traverse(this,next,false);\n }", "private static void skip(XmlPullParser parser) throws XmlPullParserException, IOException {\r\n if (parser.getEventType() != XmlPullParser.START_TAG) {\r\n throw new IllegalStateException();\r\n }\r\n int depth = 1;\r\n while (depth != 0) {\r\n switch (parser.next()) {\r\n case XmlPullParser.END_TAG:\r\n depth--;\r\n break;\r\n case XmlPullParser.START_TAG:\r\n depth++;\r\n break;\r\n }\r\n }\r\n }", "private void doStuff() {\n if (shouldContinue == false) {\n stopSelf();\n return;\n }\n\n // continue doing something\n\n // check the condition\n if (shouldContinue == false) {\n stopSelf();\n return;\n }\n\n // put those checks wherever you need\n }", "public void a() {\n block8 : {\n block9 : {\n var1_1 = this.f();\n var2_2 = false;\n if (var1_1) break block8;\n this.j.c();\n var6_3 = this.k;\n var7_4 = this.b;\n var8_5 = (l)var6_3;\n var9_6 = var8_5.a(var7_4);\n if (var9_6 != null) break block9;\n this.a(false);\n var2_2 = true;\n ** GOTO lbl30\n }\n if (var9_6 != n.b) ** GOTO lbl26\n this.a(this.g);\n var11_7 = this.k;\n var12_8 = this.b;\n var13_9 = (l)var11_7;\n try {\n block10 : {\n var2_2 = var13_9.a(var12_8).d();\n break block10;\nlbl26: // 1 sources:\n var10_10 = var9_6.d();\n var2_2 = false;\n if (!var10_10) {\n this.b();\n }\n }\n this.j.g();\n }\n finally {\n this.j.d();\n }\n }\n if ((var3_12 = this.c) == null) return;\n if (var2_2) {\n var4_13 = var3_12.iterator();\n while (var4_13.hasNext()) {\n ((d)var4_13.next()).a(this.b);\n }\n }\n e.a(this.h, this.j, this.c);\n }\n\n /*\n * Exception decompiling\n */\n public final void a(ListenableWorker.a var1_1) {\n // This method has failed to decompile. When submitting a bug report, please provide this stack trace, and (if you hold appropriate legal rights) the relevant class file.\n // org.benf.cfr.reader.util.ConfusedCFRException: Tried to end blocks [4[TRYBLOCK]], but top level block is 10[WHILELOOP]\n // org.benf.cfr.reader.b.a.a.j.a(Op04StructuredStatement.java:432)\n // org.benf.cfr.reader.b.a.a.j.d(Op04StructuredStatement.java:484)\n // org.benf.cfr.reader.b.a.a.i.a(Op03SimpleStatement.java:607)\n // org.benf.cfr.reader.b.f.a(CodeAnalyser.java:692)\n // org.benf.cfr.reader.b.f.a(CodeAnalyser.java:182)\n // org.benf.cfr.reader.b.f.a(CodeAnalyser.java:127)\n // org.benf.cfr.reader.entities.attributes.f.c(AttributeCode.java:96)\n // org.benf.cfr.reader.entities.g.p(Method.java:396)\n // org.benf.cfr.reader.entities.d.e(ClassFile.java:890)\n // org.benf.cfr.reader.entities.d.b(ClassFile.java:792)\n // org.benf.cfr.reader.b.a(Driver.java:128)\n // org.benf.cfr.reader.a.a(CfrDriverImpl.java:63)\n // com.njlabs.showjava.decompilers.JavaExtractionWorker.decompileWithCFR(JavaExtractionWorker.kt:61)\n // com.njlabs.showjava.decompilers.JavaExtractionWorker.doWork(JavaExtractionWorker.kt:130)\n // com.njlabs.showjava.decompilers.BaseDecompiler.withAttempt(BaseDecompiler.kt:108)\n // com.njlabs.showjava.workers.DecompilerWorker$b.run(DecompilerWorker.kt:118)\n // java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)\n // java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)\n // java.lang.Thread.run(Thread.java:919)\n throw new IllegalStateException(\"Decompilation failed\");\n }\n\n public final void a(String string) {\n LinkedList linkedList = new LinkedList();\n linkedList.add((Object)string);\n while (!linkedList.isEmpty()) {\n String string2 = (String)linkedList.remove();\n if (((l)this.k).a(string2) != n.f) {\n k k2 = this.k;\n n n2 = n.d;\n String[] arrstring = new String[]{string2};\n ((l)k2).a(n2, arrstring);\n }\n linkedList.addAll((Collection)((a.i.r.p.c)this.l).a(string2));\n }\n }\n\n /*\n * Enabled aggressive block sorting\n * Enabled unnecessary exception pruning\n * Enabled aggressive exception aggregation\n */\n public final void a(boolean bl) {\n this.j.c();\n k k2 = this.j.k();\n l l2 = (l)k2;\n List list = l2.a();\n ArrayList arrayList = (ArrayList)list;\n boolean bl2 = arrayList.isEmpty();\n if (bl2) {\n f.a(this.a, RescheduleReceiver.class, false);\n }\n this.j.g();\n this.p.c((Object)bl);\n return;\n finally {\n this.j.d();\n }\n }\n\n public final void b() {\n this.j.c();\n k k2 = this.k;\n n n2 = n.a;\n String[] arrstring = new String[]{this.b};\n l l2 = (l)k2;\n l2.a(n2, arrstring);\n k k3 = this.k;\n String string = this.b;\n long l3 = System.currentTimeMillis();\n l l4 = (l)k3;\n l4.b(string, l3);\n k k4 = this.k;\n String string2 = this.b;\n l l5 = (l)k4;\n try {\n l5.a(string2, -1L);\n this.j.g();\n return;\n }\n finally {\n this.j.d();\n this.a(true);\n }\n }\n\n public final void c() {\n this.j.c();\n k k2 = this.k;\n String string = this.b;\n long l2 = System.currentTimeMillis();\n l l3 = (l)k2;\n l3.b(string, l2);\n k k3 = this.k;\n n n2 = n.a;\n String[] arrstring = new String[]{this.b};\n l l4 = (l)k3;\n l4.a(n2, arrstring);\n k k4 = this.k;\n String string2 = this.b;\n l l5 = (l)k4;\n l5.f(string2);\n k k5 = this.k;\n String string3 = this.b;\n l l6 = (l)k5;\n try {\n l6.a(string3, -1L);\n this.j.g();\n return;\n }\n finally {\n this.j.d();\n this.a(false);\n }\n }\n\n public final void d() {\n k k2 = this.k;\n String string = this.b;\n n n2 = ((l)k2).a(string);\n if (n2 == n.b) {\n h h2 = h.a();\n String string2 = s;\n Object[] arrobject = new Object[]{this.b};\n h2.a(string2, String.format((String)\"Status for %s is RUNNING;not doing any work and rescheduling for later execution\", (Object[])arrobject), new Throwable[0]);\n this.a(true);\n return;\n }\n h h4 = h.a();\n String string3 = s;\n Object[] arrobject = new Object[]{this.b, n2};\n h4.a(string3, String.format((String)\"Status for %s is %s; not doing any work\", (Object[])arrobject), new Throwable[0]);\n this.a(false);\n }\n\n public void e() {\n this.j.c();\n this.a(this.b);\n a.i.e e2 = ((ListenableWorker.a.a)this.g).a;\n k k2 = this.k;\n String string = this.b;\n l l2 = (l)k2;\n try {\n l2.a(string, e2);\n this.j.g();\n return;\n }\n finally {\n this.j.d();\n this.a(false);\n }\n }\n\n public final boolean f() {\n if (this.r) {\n h h2 = h.a();\n String string = s;\n Object[] arrobject = new Object[]{this.o};\n h2.a(string, String.format((String)\"Work interrupted for %s\", (Object[])arrobject), new Throwable[0]);\n k k2 = this.k;\n String string2 = this.b;\n n n2 = ((l)k2).a(string2);\n if (n2 == null) {\n this.a(false);\n return true;\n }\n this.a(true ^ n2.d());\n return true;\n }\n return false;\n }\n\n /*\n * Loose catch block\n * Enabled aggressive block sorting\n * Enabled unnecessary exception pruning\n * Enabled aggressive exception aggregation\n * Lifted jumps to return sites\n */\n public void run() {\n int n2;\n block42 : {\n block41 : {\n i i2;\n Cursor cursor;\n block48 : {\n block46 : {\n ListenableWorker listenableWorker;\n block47 : {\n a.i.e e2;\n block44 : {\n g g2;\n block45 : {\n block40 : {\n boolean bl;\n Iterator iterator;\n j j2;\n StringBuilder stringBuilder;\n block43 : {\n a.i.r.p.n n3 = this.m;\n String string = this.b;\n o o2 = (o)n3;\n if (o2 == null) throw null;\n n2 = 1;\n i i3 = i.a((String)\"SELECT DISTINCT tag FROM worktag WHERE work_spec_id=?\", (int)n2);\n if (string == null) {\n i3.bindNull(n2);\n } else {\n i3.bindString(n2, string);\n }\n o2.a.b();\n Cursor cursor2 = a.f.l.a.a(o2.a, (a.g.a.e)i3, false);\n ArrayList arrayList = new ArrayList(cursor2.getCount());\n while (cursor2.moveToNext()) {\n arrayList.add((Object)cursor2.getString(0));\n }\n this.n = arrayList;\n stringBuilder = new StringBuilder(\"Work [ id=\");\n stringBuilder.append(this.b);\n stringBuilder.append(\", tags={ \");\n iterator = arrayList.iterator();\n bl = true;\n break block43;\n finally {\n cursor2.close();\n i3.b();\n }\n }\n while (iterator.hasNext()) {\n String string = (String)iterator.next();\n if (bl) {\n bl = false;\n } else {\n stringBuilder.append(\", \");\n }\n stringBuilder.append(string);\n }\n stringBuilder.append(\" } ]\");\n this.o = stringBuilder.toString();\n if (this.f()) {\n return;\n }\n this.j.c();\n k k2 = this.k;\n String string = this.b;\n l l2 = (l)k2;\n this.e = j2 = l2.d(string);\n if (j2 == null) {\n h h2 = h.a();\n String string2 = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.b;\n h2.b(string2, String.format((String)\"Didn't find WorkSpec for id %s\", (Object[])arrobject), new Throwable[0]);\n this.a(false);\n return;\n }\n if (j2.b != n.a) {\n this.d();\n this.j.g();\n h h4 = h.a();\n String string3 = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.e.c;\n h4.a(string3, String.format((String)\"%s is not in ENQUEUED state. Nothing more to do.\", (Object[])arrobject), new Throwable[0]);\n return;\n }\n if (j2.d() || this.e.c()) {\n long l3 = System.currentTimeMillis();\n boolean bl2 = this.e.n == 0L;\n if (!bl2 && l3 < this.e.a()) {\n h h5 = h.a();\n String string4 = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.e.c;\n h5.a(string4, String.format((String)\"Delaying execution for %s because it is being executed before schedule.\", (Object[])arrobject), new Throwable[0]);\n this.a((boolean)n2);\n return;\n }\n }\n this.j.g();\n if (!this.e.d()) break block40;\n e2 = this.e.e;\n break block44;\n }\n g2 = g.a(this.e.d);\n if (g2 != null) break block45;\n h h6 = h.a();\n String string = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.e.d;\n h6.b(string, String.format((String)\"Could not create Input Merger %s\", (Object[])arrobject), new Throwable[0]);\n break block46;\n }\n ArrayList arrayList = new ArrayList();\n arrayList.add((Object)this.e.e);\n k k3 = this.k;\n String string = this.b;\n l l4 = (l)k3;\n if (l4 == null) throw null;\n i2 = i.a((String)\"SELECT output FROM workspec WHERE id IN (SELECT prerequisite_id FROM dependency WHERE work_spec_id=?)\", (int)n2);\n if (string == null) {\n i2.bindNull(n2);\n } else {\n i2.bindString(n2, string);\n }\n l4.a.b();\n cursor = a.f.l.a.a(l4.a, (a.g.a.e)i2, false);\n ArrayList arrayList2 = new ArrayList(cursor.getCount());\n while (cursor.moveToNext()) {\n arrayList2.add((Object)a.i.e.b(cursor.getBlob(0)));\n }\n arrayList.addAll((Collection)arrayList2);\n e2 = g2.a((List<a.i.e>)arrayList);\n }\n a.i.e e3 = e2;\n UUID uUID = UUID.fromString((String)this.b);\n List<String> list = this.n;\n WorkerParameters.a a2 = this.d;\n int n5 = this.e.k;\n a.i.b b2 = this.h;\n WorkerParameters workerParameters = new WorkerParameters(uUID, e3, list, a2, n5, b2.a, this.i, b2.c);\n if (this.f == null) {\n this.f = this.h.c.a(this.a, this.e.c, workerParameters);\n }\n if ((listenableWorker = this.f) != null) break block47;\n h h7 = h.a();\n String string = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.e.c;\n h7.b(string, String.format((String)\"Could not create Worker %s\", (Object[])arrobject), new Throwable[0]);\n break block46;\n }\n if (!listenableWorker.isUsed()) break block48;\n h h8 = h.a();\n String string = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.e.c;\n h8.b(string, String.format((String)\"Received an already-used Worker %s; WorkerFactory should return new instances\", (Object[])arrobject), new Throwable[0]);\n }\n this.e();\n return;\n }\n this.f.setUsed();\n this.j.c();\n k k4 = this.k;\n String string = this.b;\n l l5 = (l)k4;\n if (l5.a(string) != n.a) break block41;\n k k5 = this.k;\n n n7 = n.b;\n String[] arrstring = new String[n2];\n arrstring[0] = this.b;\n l l6 = (l)k5;\n l6.a(n7, arrstring);\n k k6 = this.k;\n String string5 = this.b;\n l l7 = (l)k6;\n try {\n l7.e(string5);\n break block42;\n }\n finally {\n cursor.close();\n i2.b();\n }\n catch (Throwable throwable) {\n throw throwable;\n }\n finally {\n this.j.d();\n }\n }\n n2 = 0;\n }\n this.j.g();\n if (n2 != 0) {\n if (this.f()) {\n return;\n }\n c c2 = new c();\n ((a.i.r.q.m.b)this.i).c.execute((Runnable)new a.i.r.k(this, c2));\n c2.a((Runnable)new a.i.r.l(this, c2, this.o), ((a.i.r.q.m.b)this.i).a);\n return;\n }\n this.d();\n return;\n finally {\n this.j.d();\n }\n }\n\n public static class a {\n public Context a;\n public ListenableWorker b;\n public a.i.r.q.m.a c;\n public a.i.b d;\n public WorkDatabase e;\n public String f;\n public List<d> g;\n public WorkerParameters.a h = new WorkerParameters.a();\n\n public a(Context context, a.i.b b2, a.i.r.q.m.a a2, WorkDatabase workDatabase, String string) {\n this.a = context.getApplicationContext();\n this.c = a2;\n this.d = b2;\n this.e = workDatabase;\n this.f = string;\n }\n }\n\n}", "@Override\n\tpublic boolean isNotBreak() {\n\t\treturn false;\n\t}", "static void skipStatement() {\r\n // Add first identifier to the intermediate stack\r\n if(!token.equals(\"IF\")) {\r\n //stack.add(lexeme);\r\n //index++;\r\n\r\n // Add assignment operator to the intermediate stack\r\n lex();\r\n //stack.add(lexeme);\r\n //index++;\r\n\r\n lex();\r\n while (!token.equals(\"END\")) {\r\n\r\n if (lexeme.equals(\"(\")) {\r\n skipParen();\r\n } else if (token.equals(\"PLUS\") || token.equals(\"MINUS\") || token.equals(\"STAR\") || token.equals(\"DIVOP\") || token.equals(\"MOD\")) {\r\n //stack.add(index, lexeme);\r\n //index++;\r\n\r\n lex();\r\n if (lexeme.equals(\"(\")) {\r\n skipParen();\r\n } else {\r\n //index--;\r\n //stack.add(index, lexeme);\r\n //index++;\r\n //index++;\r\n }\r\n } else {\r\n //index--;\r\n //stack.add(index, lexeme);\r\n //index++;\r\n }\r\n\r\n lex();\r\n\r\n if (token.equals(\"END\"))\r\n break;\r\n\r\n if (token.equals(\"IDENTIFIER\")) {\r\n //index++;\r\n break;\r\n }\r\n\r\n if (token.equals(\"IF\")) {\r\n //index++;\r\n break;\r\n }\r\n }\r\n\r\n if (!token.equals(\"END\")) {\r\n translate();\r\n }\r\n }\r\n\r\n // IF STATEMENTS\r\n else {\r\n if(skipIF())\r\n translate();\r\n else\r\n skipStatement();\r\n }\r\n }", "@Override\r\n\tpublic void skip() {\n\t\tSystem.out.println(\"Skip\");\r\n\t}", "@Test\n public void testCase4() {\n throw new SkipException(\"Skipping test case\"); \n }", "protected final void validateNotBuildingInner()\n {\n Validate.stateIsNull(myInner,What.INNERBLOCK);\n }", "private static void removeBreakPoint() {\n for (int i=1;i<=dvm.getSourceCodeLength();i++) {\n dvm.setBreakPoint(i-1, false);\n }\n }", "public void nestedForLoopStatementWithoutContinue() {\n FIRST_CHAR_LOOP:\n for (int a = 1; a <= 4; a++) {\n for (char x = 'a'; x <= 'c'; x++) {\n if (a == 2 || x == 'b') {\n //continue;\n }\n System.out.print(\" \" + a + x); //1a 1b 1c 2a 2b 2c 3a 3b 3c 4a 4b 4c\n }\n }\n }", "public void nestedForLoopStatementWithOnlyContinue() {\n FIRST_CHAR_LOOP:\n for (int a = 1; a <= 4; a++) {\n for (char x = 'a'; x <= 'c'; x++) {\n if (a == 2 || x == 'b') {\n continue; //FIRST_CHAR_LOOP;\n }\n System.out.print(\" \" + a + x); //1a 1c 3a 3c 4a 4c\n }\n }\n }", "void blackhole(){ if (zzAtBOL) return; }", "@Override\n\tpublic void onSkipInRead(Throwable t) {\n\t\t\n\t}", "void branchingStatements()\n{\t\nSystem.out.println(\"***************inside unlabeled break************* \");\n//Break :forceful exit from current loop\nfor(int i=0; i<100; i++) \n\t{\t\n\t\tif(i == 10) \n\t\tbreak; \n\n\t\t\t\t/*when i will become 10. it will exit\n\t\t\t\t from loop and go to next immediate\n\t\t\t\t line out of loops body to execute*/\n\tSystem.out.println(\"value of i is\" + i);\n\t}\n\n\nSystem.out.println(\"***************inside labeled loop************* \");\n\n outer:\t\n\t\tfor(int i=0; i<3; i++)\n\t\t{\n\t\tSystem.out.println(\"Outer loop value of i is \"+ i);\n\t\t\tinner:\n\t\t \tfor(int j=0; j<3; j++)\n\t\t\t{\n\t\t\t System.out.println(\"Inner loop value of i is \"+j);\n\t\t\t if(i== j+1)\n\t\t\t break outer;\t\t \n\t\t\t System.out.println(\"Bye\");\t\n\t\t\t}\n\t\t }\n\n\n//continue:skip the execution of current iteration and start the next one\nSystem.out.println(\"***************inside unlabeled continue.************* \");\nString str = \"she saw a ship in the sea\"; \n\t\tint size = str.length(); \n\t\tint count = 0; \n\t\tfor (int i = 0; i < size; i++) \n\t\t { \n\t\t\tif (str.charAt(i) != 's') \t\n\t\t\t continue;\n\t\t\tcount++; \n\t\t } \nSystem.out.println(\"Number of s in \"+ str + \" = \"+ count); \n\n\nSystem.out.println(\"***************inside labeled continue.************* \"); \nouter: for (int i=0; i<3; i++) \n\t{\n\t\tfor(int j=0; j<3; j++)\n\t\t {\n\t\t\tif(j > i) \n\t\t\t{\n\t\t\tSystem.out.println(\"Hi\");\n\t\t\tcontinue outer; \n\t\t\t}\n\t\t\tSystem.out.print(\" \" + (i * j));\n\t\t}\n\t}\n}", "protected boolean skip(Annotation annotation) {\n \t\treturn false;\n \t}", "protected int handleNext(int position) {\n/* 283 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\n\tpublic void wantToGoOnBreak() {\n\t\t\n\t}", "public void subIgnore() {\n\t\tignoreT--; // subtract 1 from ignoreT\n\t}", "protected boolean inSomeBlock() {\n return !enclosingBlocks.isEmpty();\n }", "public static void main(String[] args) {\n\t\tfor (int i = 1; i <= 10; i++) \r\n\t\t{\r\n\t\t\tSystem.out.println(i);\r\n\t\t\tif(i==4)\r\n\t\t\t{\r\n\t\t\t\tbreak; \r\n\t\t\t}\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//Skip Iteration on Perticular condition\r\n\t\tfor (int i = 1; i <= 10; i++) \r\n\t\t{\r\n\t\t\t\t\r\n\t\t\t\tif(i==5 || i==7) // || [or]\r\n\t\t\t\t{\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(i);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t}", "public static void failUnexpectedToReachThis()\r\n\t{\r\n\t\tfail( \"Unexpected to hit this line, as the previous statement should thrown an exception\" ); \r\n\t}", "public static void main(String[] args) {\n\t\touter:\r\n\t\t //label for outer loop\r\n\t\t for (int i = 0; i < 10; i++) { \r\n\t\t for (int j = 0; j < 10; j++) {\r\n\t\t if (j == 1)\r\n\t\t break outer;\r\n\t\t System.out.println(\" value of j = \" + j);\r\n\t\t }\r\n\t\t } //end of outer loop\r\n\t\t \r\n\t\t System.out.println(\"clear\");\r\n\t\t System.out.println(Integer.MAX_VALUE);\r\n\t}", "public void skipToNext() {\n try {\n mSessionBinder.next(mContext.getPackageName(), mCbStub);\n } catch (RemoteException e) {\n Log.wtf(TAG, \"Error calling next.\", e);\n }\n }", "public void skipPrint()\n {\n skipPrint(0);\n }", "void skipNextPlayer() {\n endTurn();\n }", "public boolean shouldContinue() {\n return !shouldBreak;\n }", "@Override\n public Boolean skip(final ServerWebExchange exchange) {\n return false;\n }", "static void jump_without_condition(String passed){\n\t\tcomplete_jump_req(passed.substring(4));\n\t}", "public static void main(String[] args) {\r\n\t\tfor (int i=1;i<10;i++)\r\n\t\t{\r\n\t\t\tif (i==5)\r\n\t\t\t{\r\n\t\t\t\t//System.out.println(i);\t\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(i);\r\n\t\t\t}\r\n\t\t}\r\n\r\n \r\n\t}", "public void run() {\n /*\n r8 = this;\n r1 = com.umeng.commonsdk.proguard.b.b;\t Catch:{ Throwable -> 0x00c9 }\n monitor-enter(r1);\t Catch:{ Throwable -> 0x00c9 }\n r0 = r8.a;\t Catch:{ all -> 0x00c6 }\n if (r0 == 0) goto L_0x00c4;\n L_0x0009:\n r0 = r8.b;\t Catch:{ all -> 0x00c6 }\n if (r0 == 0) goto L_0x00c4;\n L_0x000d:\n r0 = com.umeng.commonsdk.proguard.b.a;\t Catch:{ all -> 0x00c6 }\n if (r0 != 0) goto L_0x00c4;\n L_0x0013:\n r0 = 1;\n com.umeng.commonsdk.proguard.b.a = r0;\t Catch:{ all -> 0x00c6 }\n r0 = \"walle-crash\";\n r2 = 1;\n r2 = new java.lang.Object[r2];\t Catch:{ all -> 0x00c6 }\n r3 = 0;\n r4 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00c6 }\n r4.<init>();\t Catch:{ all -> 0x00c6 }\n r5 = \"report thread is \";\n r4 = r4.append(r5);\t Catch:{ all -> 0x00c6 }\n r5 = com.umeng.commonsdk.proguard.b.a;\t Catch:{ all -> 0x00c6 }\n r4 = r4.append(r5);\t Catch:{ all -> 0x00c6 }\n r4 = r4.toString();\t Catch:{ all -> 0x00c6 }\n r2[r3] = r4;\t Catch:{ all -> 0x00c6 }\n com.umeng.commonsdk.statistics.common.e.a(r0, r2);\t Catch:{ all -> 0x00c6 }\n r0 = r8.b;\t Catch:{ all -> 0x00c6 }\n r0 = com.umeng.commonsdk.proguard.c.a(r0);\t Catch:{ all -> 0x00c6 }\n r2 = android.text.TextUtils.isEmpty(r0);\t Catch:{ all -> 0x00c6 }\n if (r2 != 0) goto L_0x00c4;\n L_0x0045:\n r2 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00c6 }\n r2.<init>();\t Catch:{ all -> 0x00c6 }\n r3 = r8.a;\t Catch:{ all -> 0x00c6 }\n r3 = r3.getFilesDir();\t Catch:{ all -> 0x00c6 }\n r2 = r2.append(r3);\t Catch:{ all -> 0x00c6 }\n r3 = \"/\";\n r2 = r2.append(r3);\t Catch:{ all -> 0x00c6 }\n r3 = \"stateless\";\n r2 = r2.append(r3);\t Catch:{ all -> 0x00c6 }\n r3 = \"/\";\n r2 = r2.append(r3);\t Catch:{ all -> 0x00c6 }\n r3 = \"umpx_internal\";\n r3 = r3.getBytes();\t Catch:{ all -> 0x00c6 }\n r4 = 0;\n r3 = android.util.Base64.encodeToString(r3, r4);\t Catch:{ all -> 0x00c6 }\n r2 = r2.append(r3);\t Catch:{ all -> 0x00c6 }\n r2 = r2.toString();\t Catch:{ all -> 0x00c6 }\n r3 = r8.a;\t Catch:{ all -> 0x00c6 }\n r4 = 10;\n com.umeng.commonsdk.stateless.f.a(r3, r2, r4);\t Catch:{ all -> 0x00c6 }\n r2 = new com.umeng.commonsdk.stateless.UMSLEnvelopeBuild;\t Catch:{ all -> 0x00c6 }\n r2.<init>();\t Catch:{ all -> 0x00c6 }\n r3 = r8.a;\t Catch:{ all -> 0x00c6 }\n r3 = r2.buildSLBaseHeader(r3);\t Catch:{ all -> 0x00c6 }\n r4 = new org.json.JSONObject;\t Catch:{ JSONException -> 0x00cb }\n r4.<init>();\t Catch:{ JSONException -> 0x00cb }\n r5 = \"content\";\n r4.put(r5, r0);\t Catch:{ JSONException -> 0x00cb }\n r0 = \"ts\";\n r6 = java.lang.System.currentTimeMillis();\t Catch:{ JSONException -> 0x00cb }\n r4.put(r0, r6);\t Catch:{ JSONException -> 0x00cb }\n r0 = new org.json.JSONObject;\t Catch:{ JSONException -> 0x00cb }\n r0.<init>();\t Catch:{ JSONException -> 0x00cb }\n r5 = \"crash\";\n r0.put(r5, r4);\t Catch:{ JSONException -> 0x00cb }\n r4 = new org.json.JSONObject;\t Catch:{ JSONException -> 0x00cb }\n r4.<init>();\t Catch:{ JSONException -> 0x00cb }\n r5 = \"tp\";\n r4.put(r5, r0);\t Catch:{ JSONException -> 0x00cb }\n r0 = r8.a;\t Catch:{ JSONException -> 0x00cb }\n r5 = \"umpx_internal\";\n r0 = r2.buildSLEnvelope(r0, r3, r4, r5);\t Catch:{ JSONException -> 0x00cb }\n if (r0 == 0) goto L_0x00c4;\n L_0x00bc:\n r2 = \"exception\";\n r0 = r0.has(r2);\t Catch:{ JSONException -> 0x00cb }\n if (r0 != 0) goto L_0x00c4;\n L_0x00c4:\n monitor-exit(r1);\t Catch:{ all -> 0x00c6 }\n L_0x00c5:\n return;\n L_0x00c6:\n r0 = move-exception;\n monitor-exit(r1);\t Catch:{ all -> 0x00c6 }\n throw r0;\t Catch:{ Throwable -> 0x00c9 }\n L_0x00c9:\n r0 = move-exception;\n goto L_0x00c5;\n L_0x00cb:\n r0 = move-exception;\n goto L_0x00c4;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.umeng.commonsdk.proguard.bb.run():void\");\n }", "@org.junit.Test(timeout = 10000)\n public void testEmptyFooInner2_cf36313_failAssert8_add36622() throws java.lang.Exception {\n // AssertGenerator generate try/catch block with fail statement\n try {\n java.util.ArrayList<io.protostuff.Bar> bars = new java.util.ArrayList<io.protostuff.Bar>();\n io.protostuff.Bar bar = new io.protostuff.Bar();\n bar.setSomeBaz(new io.protostuff.Baz());\n bars.add(bar);\n java.util.ArrayList<io.protostuff.Foo> foos = new java.util.ArrayList<io.protostuff.Foo>();\n io.protostuff.Foo foo = new io.protostuff.Foo();\n foo.setSomeBar(bars);\n foos.add(foo);\n java.io.ByteArrayOutputStream out = new java.io.ByteArrayOutputStream();\n // AssertGenerator replace invocation\n int o_testEmptyFooInner2_cf36313_failAssert8_add36622__18 = // MethodCallAdder\nwriteListTo(out, foos, io.protostuff.SerializableObjects.foo.cachedSchema());\n // AssertGenerator add assertion\n org.junit.Assert.assertEquals(o_testEmptyFooInner2_cf36313_failAssert8_add36622__18, 6);\n writeListTo(out, foos, io.protostuff.SerializableObjects.foo.cachedSchema());\n byte[] data = out.toByteArray();\n java.io.ByteArrayInputStream in = new java.io.ByteArrayInputStream(data);\n java.util.List<io.protostuff.Foo> parsedFoos = parseListFrom(in, io.protostuff.SerializableObjects.foo.cachedSchema());\n // StatementAdderOnAssert create null value\n io.protostuff.DelimiterTest vc_8322 = (io.protostuff.DelimiterTest)null;\n // AssertGenerator add assertion\n org.junit.Assert.assertNull(vc_8322);\n // StatementAdderMethod cloned existing statement\n vc_8322.testFoo();\n // MethodAssertGenerator build local variable\n Object o_29_0 = (parsedFoos.size()) == (foos.size());\n int i = 0;\n for (io.protostuff.Foo f : parsedFoos)\n io.protostuff.SerializableObjects.assertEquals(foos.get((i++)), f);\n \n org.junit.Assert.fail(\"testEmptyFooInner2_cf36313 should have thrown NullPointerException\");\n } catch (java.lang.NullPointerException eee) {\n }\n }", "public void breaker() \r\n\t{\n\t\t\r\n\t}", "SkipStatement createSkipStatement();", "public static void main(String[] args) {\n loop_1:\n for(int i = 0; i < 10; i++) {\n loop_2:\n while(i < 5) {\n loop_3:\n do {\n break loop_2; // will stop loop_2, but loop_1 is running/executing/iterating without stop\n } while(i < 3);\n }\n }\n }", "void skipnew() {\n\t\tint oldline;\n\t\tprintstatus = idle;\n\t\tfor (;;) {\n\t\t\tif (++printnewline > newinfo.maxLine)\n\t\t\t\tbreak; /* end of file */\n\t\t\toldline = newinfo.other[printnewline];\n\t\t\tif (oldline < 0)\n\t\t\t\tbreak; /* end of block */\n\t\t\tif (blocklen[oldline] != 0)\n\t\t\t\tbreak; /* start of another */\n\t\t}\n\t}", "static void ignore() {\n }", "void a(bu var1_1, f var2_2, Map var3_3, double var4_4, double var6_5) {\n block6 : {\n var14_6 = fj.z;\n var8_7 = M.b();\n var9_8 = var2_2.a();\n while (var9_8.f()) {\n var10_9 = var9_8.a();\n if (var14_6) break block6;\n if (!var10_9.e() || var1_1.i((y.c.d)var10_9).bendCount() > 1) ** GOTO lbl-1000\n var11_10 = var1_1.i((y.c.d)var10_9);\n var12_11 = var11_10.getSourceRealizer();\n if (var1_1.i((y.c.d)var10_9).bendCount() == 0) {\n var11_10.appendBend(var11_10.getSourcePort().a(var12_11), var11_10.getSourcePort().b(var12_11) - 20.0 - var12_11.getHeight());\n }\n this.a(var1_1, var4_4, var6_5, (y.c.d)var10_9, true, false, false, var10_9.c());\n if (var14_6) lbl-1000: // 2 sources:\n {\n var8_7.a(var10_9, true);\n var8_7.a((Object)var3_3.get(var10_9), true);\n }\n var9_8.g();\n if (!var14_6) continue;\n }\n var1_1.a(as.a, var8_7);\n }\n var9_8 = new as();\n var9_8.a(5.0);\n var9_8.b(false);\n var9_8.a(true);\n try {\n var10_9 = new bI(1);\n var10_9.a(false);\n var10_9.b(true);\n var10_9.d().a(true);\n var10_9.a(var1_1, (ah)var9_8);\n return;\n }\n finally {\n var1_1.d_(as.a);\n }\n }", "protected void runBeforeIteration() {}", "void skipold() {\n\t\tprintstatus = idle;\n\t\tfor (;;) {\n\t\t\tif (++printoldline > oldinfo.maxLine)\n\t\t\t\tbreak; /* end of file */\n\t\t\tif (oldinfo.other[printoldline] < 0)\n\t\t\t\tbreak; /* end of block */\n\t\t\tif (blocklen[printoldline] != 0)\n\t\t\t\tbreak; /* start of another */\n\t\t}\n\t}", "protected void runTest() throws Throwable {\n\t\t\t\t\t\t\t\tthrow e;\n\t\t\t\t\t\t\t}", "protected void extraExplosions_EM() {\n }", "public abstract void blockNext();", "@org.junit.Test(timeout = 10000)\n public void testEmptyBarInner_cf15625_failAssert6_add15826() throws java.lang.Exception {\n // AssertGenerator generate try/catch block with fail statement\n try {\n io.protostuff.Bar bar = new io.protostuff.Bar();\n bar.setSomeBaz(new io.protostuff.Baz());\n java.util.ArrayList<io.protostuff.Bar> bars = new java.util.ArrayList<io.protostuff.Bar>();\n bars.add(bar);\n java.io.ByteArrayOutputStream out = new java.io.ByteArrayOutputStream();\n // AssertGenerator replace invocation\n int o_testEmptyBarInner_cf15625_failAssert6_add15826__12 = // MethodCallAdder\nwriteListTo(out, bars, io.protostuff.SerializableObjects.bar.cachedSchema());\n // AssertGenerator add assertion\n org.junit.Assert.assertEquals(o_testEmptyBarInner_cf15625_failAssert6_add15826__12, 4);\n writeListTo(out, bars, io.protostuff.SerializableObjects.bar.cachedSchema());\n byte[] data = out.toByteArray();\n java.io.ByteArrayInputStream in = new java.io.ByteArrayInputStream(data);\n java.util.List<io.protostuff.Bar> parsedBars = parseListFrom(in, io.protostuff.SerializableObjects.bar.cachedSchema());\n // StatementAdderOnAssert create null value\n io.protostuff.DelimiterTest vc_3590 = (io.protostuff.DelimiterTest)null;\n // AssertGenerator add assertion\n org.junit.Assert.assertNull(vc_3590);\n // StatementAdderMethod cloned existing statement\n vc_3590.testBarTooLarge3();\n // MethodAssertGenerator build local variable\n Object o_23_0 = (parsedBars.size()) == (bars.size());\n int i = 0;\n for (io.protostuff.Bar b : parsedBars)\n io.protostuff.SerializableObjects.assertEquals(bars.get((i++)), b);\n \n org.junit.Assert.fail(\"testEmptyBarInner_cf15625 should have thrown NullPointerException\");\n } catch (java.lang.NullPointerException eee) {\n }\n }", "@Override\n public boolean step() {\n return false;\n }", "@Ignore\n\t public void ignoreTest() {\n\t System.out.println(\"in ignore test\");\n\t }", "@org.junit.Test(timeout = 10000)\n public void testEmptyFooInner_cf31700_failAssert7_add31989() throws java.lang.Exception {\n // AssertGenerator generate try/catch block with fail statement\n try {\n java.util.ArrayList<io.protostuff.Bar> bars = new java.util.ArrayList<io.protostuff.Bar>();\n bars.add(new io.protostuff.Bar());\n java.util.ArrayList<io.protostuff.Foo> foos = new java.util.ArrayList<io.protostuff.Foo>();\n io.protostuff.Foo foo = new io.protostuff.Foo();\n foo.setSomeBar(bars);\n foos.add(foo);\n java.io.ByteArrayOutputStream out = new java.io.ByteArrayOutputStream();\n // AssertGenerator replace invocation\n int o_testEmptyFooInner_cf31700_failAssert7_add31989__15 = // MethodCallAdder\nwriteListTo(out, foos, io.protostuff.SerializableObjects.foo.cachedSchema());\n // AssertGenerator add assertion\n org.junit.Assert.assertEquals(o_testEmptyFooInner_cf31700_failAssert7_add31989__15, 4);\n writeListTo(out, foos, io.protostuff.SerializableObjects.foo.cachedSchema());\n byte[] data = out.toByteArray();\n java.io.ByteArrayInputStream in = new java.io.ByteArrayInputStream(data);\n java.util.List<io.protostuff.Foo> parsedFoos = parseListFrom(in, io.protostuff.SerializableObjects.foo.cachedSchema());\n // StatementAdderOnAssert create null value\n io.protostuff.DelimiterTest vc_7288 = (io.protostuff.DelimiterTest)null;\n // AssertGenerator add assertion\n org.junit.Assert.assertNull(vc_7288);\n // StatementAdderMethod cloned existing statement\n vc_7288.testBaz();\n // MethodAssertGenerator build local variable\n Object o_26_0 = (parsedFoos.size()) == (foos.size());\n int i = 0;\n for (io.protostuff.Foo f : parsedFoos)\n io.protostuff.SerializableObjects.assertEquals(foos.get((i++)), f);\n \n org.junit.Assert.fail(\"testEmptyFooInner_cf31700 should have thrown NullPointerException\");\n } catch (java.lang.NullPointerException eee) {\n }\n }", "public void skip() {\n if (!keepPlaying) {\n return;\n }\n keepPlaying = false;\n\n for (int i = currentPlaybackStrokeIndex; i < strokes.size(); i++) {\n while (!strokes.get(i).step(drawView)) {\n Log.d(TAG, \"Turboing\");\n }\n }\n doEndOfReplay();\n\n activity.onPlaybackEnded();\n }", "public static void skip(String message) {\r\n\t\tExtentManager.getExtentTest().skip(message);\r\n\t}", "protected void skipTestIfScopesNotSupported() {\n\t}", "public void continueDebugStep() {\n \tthis.continueDebug = true;\n }", "IEmpleado next();", "public void skip(){\n if (!this.hasNext()) return;\n \n this.checkNext();\n \n if (!this.allStatesIterator.hasNext()){\n this.allStatesIterator = new IntegerIterator(1);\n this.allStatesIterator.skip();\n \n if(!this.allSubsetsIterator.hasNext()){\n this.allSubsetsIterator = new SubsetIterator(this.numberOfStates);\n this.currentFinalStatesIds = this.allSubsetsIterator.next();\n this.currentTransitions = this.allTransitionsIterator.next();\n }\n else{\n this.currentFinalStatesIds = this.allSubsetsIterator.next();\n }\n }\n else{\n this.currentInitialStateId = this.allStatesIterator.next();\n }\n }", "@BeforeTest\n\t\t\tpublic void checkTestSkip(){\n\t\t\t\t\n\t\t\t\tif(!TestUtil.isTestCaseRunnable(suiteCxls,this.getClass().getSimpleName())){\n\t\t\t\t\tAPP_LOGS.debug(\"Skipping Test Case\"+this.getClass().getSimpleName()+\" as runmode set to NO\");//logs\n\t\t\t\t\tthrow new SkipException(\"Skipping Test Case\"+this.getClass().getSimpleName()+\" as runmode set to NO\");//reports\n\t\t\t\t}\n\t\t\t\t\t\t}", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tno();\n\t\t\t\t}", "private Token source_skipline(boolean white)\r\n throws IOException,\r\n LexerException {\r\n // (new Exception(\"skipping line\")).printStackTrace(System.out);\r\n Source s = getSource();\r\n Token tok = s.skipline(white);\r\n /* XXX Refactor with source_token() */\r\n if (tok.getType() == EOF && s.isAutopop()) {\r\n // System.out.println(\"Autopop \" + s);\r\n Token mark = pop_source(true);\r\n if (mark != null)\r\n return mark;\r\n }\r\n return tok;\r\n }", "@Test(timeout = 10000)\n public void innerStaticInGenericType_sd27375_failAssert1() throws Exception {\n // AssertGenerator generate try/catch block with fail statement\n try {\n Method staticInGeneric = getClass().getDeclaredMethod(\"testNestedNonGeneric\");\n // StatementAdd: generate variable from return value\n TypeName __DSPOT_invoc_4 = TypeName.get(staticInGeneric.getReturnType());\n TypeName typeName = TypeName.get(staticInGeneric.getGenericReturnType());\n // StatementAdd: add invocation of a method\n __DSPOT_invoc_4.unbox();\n org.junit.Assert.fail(\"innerStaticInGenericType_sd27375 should have thrown UnsupportedOperationException\");\n } catch (UnsupportedOperationException eee) {\n }\n }", "private void fixInnerParent(BaleElement be)\n{\n BaleAstNode sn = getAstChild(be);\n while (cur_parent != cur_line && sn == null) {\n cur_parent = cur_parent.getBaleParent();\n cur_ast = cur_parent.getAstNode();\n sn = getAstChild(be);\n }\n\n // now see if there are any internal elements that should be used\n while (sn != null && sn != cur_ast && sn.getLineLength() == 0) {\n BaleElement.Branch nbe = createInnerBranch(sn);\n if (nbe == null) break;\n addElementNode(nbe,0);\n nbe.setAstNode(sn);\n cur_parent = nbe;\n cur_ast = sn;\n sn = getAstChild(be);\n }\n}", "public static void main(String[] args) {\n for (int i = 0; i < 5; i++) {\n System.out.println(\"i = \" + i);\n if (i == 3) {\n break;\n }\n System.out.println(\"Outside the loop!\");\n }\n }", "public void testConditionalBreakDirective()\n {\n assertEvalEquals(\"1, 2, 3, 4, 5\",\n \"#foreach($i in [1..10])$i#if($i > 4)#break#end, #end\");\n }", "public void skipValue() {\n switch (peek()) {\n case BOOLEAN:\n nextBoolean();\n break;\n\n case NAME:\n nextName();\n break;\n\n case NULL:\n nextNull();\n break;\n\n case NUMBER:\n nextNumber();\n break;\n\n case START_COLLECTION:\n beginArray();\n while (hasNext()) {\n skipValue();\n }\n endArray();\n break;\n\n case START_MAP:\n beginObject();\n while (hasNext()) {\n nextName();\n skipValue();\n }\n endObject();\n break;\n\n case STRING:\n nextString();\n break;\n\n default:\n throw new JsonException(\"Cannot skip \" + peek() + \". \" + input);\n }\n }", "boolean hasCustomBreak();", "protected int handlePrevious(int position) {\n/* 289 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public static void noninlinable(OtherClass foo) {\n if (foo != null && foo.outer != null && foo.outer.getHello() != null) {\n noninlinable(foo);\n }\n }", "Break createBreak();", "@Ignore\r\n\tpublic void ignoreTest() {\r\n\t\tSystem.out.println(\"in ignore test\");\r\n\t}", "public static void main(String args[]) {\n\t\tfor (int i = 0; i < 7; i++) {\n\t\t\t if (i == 4) {\n\t\t\t break;\n\t\t\t }\n\t\t\t System.out.print(i+\" \");\n\t\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\t\n\t\t\n\t\t// it will pass when arrive 4 | 0.1.2.3.5.6 |\n\t\tfor (int i = 0; i < 7; i++) {\n\t\t\t if (i == 4) {\n\t\t\t continue;\n\t\t\t }\n\t\t\t System.out.print(i+\" \");\n\t\t\t}\n\t\t\n\t\t\n\t}", "private void m4807c() {\n LogUtil.d(f3850h, \"ReceiverAndConverterThreadInternal stopThreadInner\");\n this.f3835a = false;\n f3853k.m4891v();\n f3853k.m4836C();\n }", "public long skip(long r1) throws java.io.IOException {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: com.android.org.conscrypt.OpenSSLBIOSource.ByteBufferInputStream.skip(long):long, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.conscrypt.OpenSSLBIOSource.ByteBufferInputStream.skip(long):long\");\n }", "public boolean blockEmpty()\r\n/* 72: */ {\r\n/* 73: 60 */ return false;\r\n/* 74: */ }", "@Override\r\n\tprotected void doNext() {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tfor (int i = 0; i < 10; i++) {\n\n\t\t\tif (i == 2) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println(i);\n\t\t}\n\t\tSystem.out.println(\"**********************\");\n\n\t\t// continue - it will skip CURRENT iteration\n\n\t\tfor (int i = 1; i <= 5; i++) {\n\n\t\t\tif (i == 3 || i == 4) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tSystem.out.println(i);\n\t\t}\n\t\tSystem.out.println(\"*******************\");\n\t\t// I want to print nums from 1 to 20 except 5,6,7\n\t\tfor (int a = 1; a <= 20; a++) {//5\n\t\t\tif (a >=5 && a<=17) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tSystem.out.println(a);\n\t\t}\n\t}", "public void swrap() throws NoUnusedObjectExeption;", "public static void exceptionCase(Robot r)\n {\n r.turnLeft();\n if(r.frontIsClear() == false) // If after traversing street x forward and street y backward\n { // the front is not clear (i.e. the robot has traversed the entire square area),\n stopCase(r); // then stop the program/robot by invoking the stopCase method\n }\n else\n {\n // If the front is clear (i.e. the entire square area has not been fully traversed yet), continue\n r.move();\n pickAllThings(r);\n r.turnLeft();\n traverseTwoStreets(r); // Invoke traverseTwoStreets method [traverse street1 forward and street2 backwards]\n }\n }", "public void skip(boolean b) {\n skip = b;\n }", "void whileIncomplete();", "@RunMe(2)\n private void dontTestThis() {\n System.out.println(\"dontTestThis\");\n }", "public Code visitSkipNode(StatementNode.SkipNode node) {\n beginGen(\"Skip\");\n Code code = new Code();\n endGen(\"Skip\");\n return code;\n }", "public boolean startsInnerScope() {\n return false;\n }", "@Override\r\n\tpublic boolean runAgain(CompilationUnit unit) {\n\t\treturn false;\r\n\t}", "public void continueRun() {\n pause = false;\n }", "public void runBare() throws Throwable {\n Throwable exception= null;\n setUp();\n try {\n runTest();\n } catch (Throwable running) {\n exception= running;\n }\n finally {\n try {\n tearDown();\n } catch (Throwable tearingDown) {\n if (exception == null) exception= tearingDown;\n }\n }\n if (exception != null) throw exception;\n }", "private void skip(int aSkip){\r\n \r\n assert aSkip>=0;\r\n assert iMessage!=null;\r\n assert iIndex>=0;\r\n assert iIndex<=iMessage.length();\r\n\r\n iIndex+=aSkip;//advance index by the skip distance\r\n if (iIndex>=iMessage.length()) iIndex=iMessage.length();//if beyond end then set index at end of message\r\n \r\n }", "private static void askForContinue() {\n\t\t\t\n\t\t}", "public static void skipWhile() {\n Observable.fromIterable(sData)\n .skipWhile((item) -> {\n System.out.println(\"item = \" + item);\n return item.equalsIgnoreCase(\"abc\");\n }).subscribe(new MyObserver<>());\n }", "@Override\n public String visit(ContinueStmt n, Object arg) {\n return null;\n }", "@Override\n\tpublic void onTestSkipped(ITestResult result) {\n\t\t\n\t}", "@Override\n\tpublic void onTestSkipped(ITestResult result) {\n\t\t\n\t}", "@Override\n\tpublic void onTestSkipped(ITestResult result) {\n\t\t\n\t}" ]
[ "0.67573375", "0.6547434", "0.606692", "0.60394436", "0.6034715", "0.60257983", "0.60110915", "0.60099053", "0.59802717", "0.59524035", "0.59524035", "0.595063", "0.5893455", "0.58876294", "0.5878129", "0.58568454", "0.58410466", "0.58048475", "0.57990265", "0.57925016", "0.5781535", "0.57134336", "0.5702659", "0.5625247", "0.5610157", "0.56061983", "0.56057996", "0.55859655", "0.551463", "0.5508168", "0.55003726", "0.547906", "0.5452801", "0.5417062", "0.5402528", "0.54018784", "0.5387187", "0.5363334", "0.53529817", "0.5339504", "0.53199625", "0.5301596", "0.52656716", "0.5258461", "0.52557695", "0.52392954", "0.52372897", "0.52300465", "0.5229822", "0.52257556", "0.5200857", "0.5198041", "0.5187146", "0.51809156", "0.517927", "0.5172943", "0.516964", "0.51681435", "0.51649064", "0.5160967", "0.5153828", "0.51528525", "0.5139875", "0.5135991", "0.5132778", "0.5131834", "0.51296616", "0.5122917", "0.5119491", "0.5113439", "0.51128775", "0.51060665", "0.50927943", "0.5085672", "0.50851446", "0.5085062", "0.5063807", "0.5044687", "0.5040031", "0.5030894", "0.5026668", "0.5017773", "0.5013022", "0.50020933", "0.49963313", "0.49952197", "0.4993529", "0.49882025", "0.49751228", "0.4974982", "0.49691704", "0.49651176", "0.4964272", "0.49596596", "0.49539143", "0.49512106", "0.4949166", "0.49488273", "0.49391517", "0.49391517", "0.49391517" ]
0.0
-1
TODO Autogenerated method stub
@Override public void mouseMoved(MouseEvent e) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void mouseReleased(MouseEvent e) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
TODO Autogenerated method stub
@Override public void mouseExited(MouseEvent e) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void mouseEntered(MouseEvent e) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
don't do anything, force user to hit android home button or exit button
@Override public void onBackPressed() { return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View v) {\n System.exit(0);\n }", "public void onClick(View v) {\n\n Intent intent = new Intent(Intent.ACTION_MAIN);\n intent.addCategory(Intent.CATEGORY_HOME);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n\n //android.os.Process.killProcess(android.os.Process.myPid());\n //System.exit(1);\n\n //finish();\n }", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\tSystem.exit(0);\n\t\t}", "@Override\n\tpublic void onClick(View arg0) {\n\t\tSystem.exit(0);\n\n\t}", "public void onBackPressed() {\n // do nothing. We want to force user to stay in this activity and not drop out.\n }", "@Override\n public void onClick(View v) {\n finish();\n System.exit(0);\n }", "@Override\n public void onClick(View v) {\n finish();\n System.exit(0);\n }", "public void onExit() {\n Intent homeIntent = new Intent(Intent.ACTION_MAIN);\n homeIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n homeIntent.addCategory(Intent.CATEGORY_HOME);\n startActivity(homeIntent);\n finish();\n }", "public void onClick(DialogInterface arg0, int arg1) {\n finishAffinity();\n System.exit(0);\n }", "@Override\n public void onClick(DialogInterface dialog, int which)\n {\n\n\n Intent intent = new Intent(Intent.ACTION_MAIN);\n intent.addCategory(Intent.CATEGORY_HOME);\n startActivity(intent);\n int pid = android.os.Process.myPid();\n android.os.Process.killProcess(pid);\n }", "@Override\n public void onBackPressed() {\n confirmExit();\n }", "@Override\n\tpublic void onBackPressed() {\n\t\tIntent intent = new Intent(Intent.ACTION_MAIN);\n intent.addCategory(Intent.CATEGORY_HOME);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n finish();\n System.exit(0);\n\t}", "@Override\n\tpublic void onBackPressed() {\n \t//Reference: http://stackoverflow.com/questions/11495188/how-to-put-application-to-background\n \t//; last accessed: 14 April 2015, answer by: JavaCoderEx\n \tIntent i = new Intent(Intent.ACTION_MAIN);\n i.addCategory(Intent.CATEGORY_HOME);\n startActivity(i); \n }", "@Override\n public void onClick(DialogInterface dialog, int which)\n {\n\n Intent intent = new Intent(Intent.ACTION_MAIN);\n intent.addCategory(Intent.CATEGORY_HOME);\n startActivity(intent);\n int pid = android.os.Process.myPid();\n android.os.Process.killProcess(pid);\n }", "@Override\r\n\tprotected void onPause() {\n\t\tif (SystemCheckTools.isApplicationSentToBackground(AppStartToMainActivity.this) == true) {\r\n\t\t\tExitApp.getInstance().exit();\r\n\t\t}\r\n\t\tsuper.onPause();\r\n\t}", "@Override\r\n\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\t\t\tswitch(arg1)\r\n\t\t\t{\r\n\t\t\tcase AlertDialog.BUTTON_POSITIVE:\r\n\t\t\t\t{\r\n\t\t\t\t\tfinish();\r\n\t\t\t\t\tSystem.exit(0);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase AlertDialog.BUTTON_NEGATIVE:\r\n\t\t\t\thideSystemUI();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}", "@Override\n\tpublic void onBackPressed() {\n\t\texitApplication().onClick(null);\n\t\tsuper.onBackPressed();\n\t}", "public void pressHomeButton() {\n System.out.println(\"TV is already on the home screen\\n\");\n }", "public void onClick(View v) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}", "@Override\n public void onPositiveClick() {\n quitThisActivity();\n }", "@Override\n\tpublic void onClick(View arg0) {\n\t\tIntent intent2 = new Intent(getApplicationContext(), MainActivity.class);\n\t\tintent2.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\t\tstartActivity(intent2);\n\t\tthis.finish();\n\t\tIntent intent = new Intent(Intent.ACTION_MAIN);\n\t\tintent.addCategory(Intent.CATEGORY_HOME);\n\t\tintent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\tstartActivity(intent);\n\t\t\n\t\t//Intent intent2 = new Intent(getApplicationContext(), MainActivity.class);\n\t\t//intent2.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\t\t//startActivity(intent2);t2);\n\t}", "@Override\n public void onBackPressed() {\n Intent intent = new Intent(Intent.ACTION_MAIN);\n intent.addCategory(Intent.CATEGORY_HOME);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "@Override\n public void onBackPressed() {\n Intent intent = new Intent(Intent.ACTION_MAIN);\n intent.addCategory(Intent.CATEGORY_HOME);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "public void Exit() {\r\n \tsuper.onBackPressed();\r\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(GuideActivity.this,MainActivity.class);\r\n\t\t\t\tintent.setFlags(Intent.FLAG_ACTIVITY_NO_USER_ACTION);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t\tMyApplication.getApp().getSysSpUtil().setIsFirstTime(false);\r\n\t\t\t\tfinish();\r\n\t\t\t}", "public void onBackPressed()\n {\n hideSystemUI(activity);\n }", "@Override\n\t\t\tpublic void onClick(View view) {\n\t\t\t\t\n\t\t\t\tfinish();\n\t\t\t\t\n\t\t\t\tmApplication.exit();\n\t\t\t}", "@Override\n public void pressHomeButton() {\n System.out.println(\"TV is already on the home screen\\n\");\n tv.setState(tv.getHomeState());\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\texit();\r\n\t\t\t}", "@Override\n public void onClick(DialogInterface dialog,\n int which) {\n Intent intent = new Intent(\n Intent.ACTION_MAIN);\n intent.addCategory(Intent.CATEGORY_HOME);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "@Override\n public void onBackPressed() {\n\n Intent homeIntent = new Intent(Intent.ACTION_MAIN);\n homeIntent.addCategory( Intent.CATEGORY_HOME );\n homeIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(homeIntent);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\r\n\tpublic boolean onKeyDown(int keyCode, KeyEvent event) {\r\n\t\t//handle click on back button\r\n\t if (keyCode == KeyEvent.KEYCODE_BACK) {\r\n\t \t//return to previous screen\r\n\t \treturnToPriviousActivityWithoutDevice();\r\n\t }\r\n\t return super.onKeyDown(keyCode, event);\r\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\tIntent homeIntent = new Intent(Intent.ACTION_MAIN);\n\t\thomeIntent.addCategory(Intent.CATEGORY_HOME);\n\t\thomeIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\tstartActivity(homeIntent);\n\t}", "public void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(Intent.ACTION_MAIN);\n \t\tintent.addCategory(Intent.CATEGORY_HOME);\n \t\tintent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n \t\tstartActivity(intent);\n//========================================================================================================================= \t\t\n\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tIntent intent = new Intent(Intent.ACTION_MAIN);\n\t\t\t\t\t\tintent.addCategory(Intent.CATEGORY_HOME);\n\t\t\t\t\t\tintent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\t\t\t_context.startActivity(intent);\n\t\t\t\t\t\t// System.exit(0);\n\t\t\t\t\t}", "private void checkIfForceKill() {\n SharedPreferences settings = PreferenceManager\n .getDefaultSharedPreferences(this);\n boolean forceKill = settings.getBoolean(\n FORCE_EXIT_APPLICATION, false);\n\n if (forceKill) {\n //CLEAR THE FORCE_EXIT SETTINGS\n SharedPreferences.Editor editor = settings.edit();\n editor.putBoolean(FORCE_EXIT_APPLICATION, false);\n // Commit the edits!\n editor.apply();\n //HERE STOP ALL YOUR SERVICES\n finish();\n }\n }", "public void onBackPresed() {\n\t\t\tandroid.os.Process.killProcess(android.os.Process.myPid());\n\t\t\t\n\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t\tHomeView.home_pressed=\"disable\";\r\n\t\r\n\t}", "@Override\n public void onBackPressed() {\n // Do nothing\n }", "@Override\r\n\tprotected void onPause() {\n\t\tsuper.onPause();\r\n\t\tLog.d(\"alex\", \"on Pause\");\r\n\t\tHomeView.home_pressed = \"wait\";\r\n\t\t}", "@Override\n\tpublic boolean onBackPressed() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onBackPressed() {\n\t\treturn false;\n\t}", "public void onClick(DialogInterface dialog,\n int id) {\n finishAffinity();\n System.exit(0);\n }", "public void unlockDevice() {\n ((AndroidDriver) getDriver()).pressKey(new KeyEvent().withKey(AndroidKey.HOME));\n }", "@Override\r\n public void onClickHome(View view) {\r\n \t// if user is performing an IMCI or CCM assessment then \r\n \t// display a confirmation dialog to confirm that the user wishes \r\n \t// to exit the patient assessment\r\n \texitAssessmentDialogHandler();\r\n }", "@Override\n\tpublic boolean onKeyDown(int keyCode, KeyEvent event) {\n\t\t if (keyCode == KeyEvent.KEYCODE_BACK) {\n\t\t\t ManagerActivity.getAppManager().finishAllActivity();\n\t\t return true;\n\t\t }\n\t\t return super.onKeyDown(keyCode, event);\n\t}", "public void pauseApp() {\n\t\t//do nothing\n\t}", "@Override\n\tpublic boolean onKeyDown(int keyCode,KeyEvent event){\n\t\tif(keyCode == KeyEvent.KEYCODE_BACK && event.getAction() == KeyEvent.ACTION_DOWN){\n\t\t\tif((System.currentTimeMillis() - exitTime) > 2000){\n\t\t\t\tToast.makeText(getApplicationContext(), \"再按一次退出程序\", Toast.LENGTH_SHORT).show();\n\t\t\t\texitTime = System.currentTimeMillis();\n\t\t\t}else{\n\t\t\t\tfinish();\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onKeyDown(keyCode, event);\n\t}", "@Override\n public boolean onKeyDown(int keyCode, KeyEvent event) {\n if (event.getKeyCode() == KeyEvent.KEYCODE_BACK) {\n if (needExit()) {\n finish();\n } else {\n back();\n }\n return true;\n }\n return super.onKeyDown(keyCode, event);\n }", "@Override\n\tpublic void onBackPressed() {\n\t\treturn;\n\t}", "@Override\n public void onBackPressed() {\n getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);\n if (back_pressed + 2000 > System.currentTimeMillis()) {\n\n super.onBackPressed();\n this.finish();\n\n } else\n Toast.makeText(getBaseContext(), \"Press once again to exit!\", Toast.LENGTH_SHORT).show();\n back_pressed = System.currentTimeMillis();\n }", "@Override\n\tpublic void LeftButtonClick() {\n\t\tfinish();\n\t}", "@Override\r\n public void onClick(DialogInterface arg0, int arg1) {\n finish();\r\n System.exit(0);\r\n }", "@Override\n\t\tpublic boolean handleBackPressed() {\n\t\t\treturn false;\n\t\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {\n finishAffinity();\n } else {\n finish();\n }\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {\n finishAffinity();\n } else {\n finish();\n }\n }", "private void onBack() {\n\t\tIntent startMain = new Intent(Intent.ACTION_MAIN);\r\n\t\tstartMain.addCategory(Intent.CATEGORY_HOME);\r\n\t\tstartMain.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); // //FLAG_ACTIVITY_NEW_TASK\r\n\t\tstartActivity(startMain);\r\n\t}", "@SuppressLint(\"ResourceType\")\n @Override\n public boolean onKeyDown(int keyCode, KeyEvent event) {\n if ((keyCode == KeyEvent.KEYCODE_BACK)) {\n AlertDialog.Builder alertbox = new AlertDialog.Builder(AdminHomePage.this);\n alertbox.setIcon(R.drawable.exit);\n alertbox.setIconAttribute(90);\n alertbox.setTitle(\"Do You Want To Exit ?\");\n alertbox.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface arg0, int arg1) {\n // finish used for destroyed activity\n finishAffinity();\n System.exit(0);\n }\n });\n\n alertbox.setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface arg0, int arg1) {\n // Nothing will be happened when clicked on no button\n // of Dialog\n }\n });\n alertbox.show();\n }\n return super.onKeyDown(keyCode, event);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n public void run() {\n doubleBackToExitPressedOnce=false;\n }", "@Override\n public void onBackPressed() {\n if (exit) {\n System.exit(0);\n } else {\n Toast.makeText(this, \"Press Back again to Exit.\",\n Toast.LENGTH_SHORT).show();\n exit = true;\n new Handler().postDelayed(new Runnable() { //3 sn içinde iki defa basıldı mı kontrolu için\n @Override\n public void run() {\n exit = false;\n }\n }, 3 * 1000);\n }\n }", "@Override\n public void onBackPressed() {\n finishAffinity();\n }", "@Override\n\tpublic void onBackPressed() {\n\treturn;\n\t}", "@Override\r\n public void onClick(DialogInterface dialogInterface, int i) {\n Intent intent = new Intent(Intent.ACTION_MAIN);\r\n intent.addCategory(Intent.CATEGORY_HOME);\r\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n startActivity(intent);\r\n }", "public void onClick(DialogInterface arg0, int arg1) {\n finishAffinity();//FIM\r\n }", "@Override\r\n public void onClick(View arg0) {\n new Thread() {\r\n public void run() {\r\n try {\r\n Instrumentation inst = new Instrumentation();\r\n inst.sendKeyDownUpSync(KeyEvent.KEYCODE_BACK);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }.start();\r\n\r\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdoExit();\r\n\t\t\t}", "@Override\n public void onBackPressed()\n {\n if(backButtonCount >= 1)\n {\n Intent intent = new Intent(Intent.ACTION_MAIN);\n intent.addCategory(Intent.CATEGORY_HOME);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }\n else\n {\n Toast.makeText(this, \"Press the back button once again to close the application.\", Toast.LENGTH_SHORT).show();\n backButtonCount++;\n }\n }", "@Override\n public void onBackPressed() {\n if (!mTouchAnyWhere) {\n super.onBackPressed();\n return;\n }\n\n goBackDialog();\n }", "public void graceFullyExit() {\n Log.e(\"NET\", \"No network.\");\n final AlertDialog.Builder myBuild = new AlertDialog.Builder(Start.this);\n myBuild.setTitle(R.string.noNetworkTitle);\n myBuild.setMessage(R.string.noNetworkText);\n myBuild.setNeutralButton(\"OK\", new DialogInterface.OnClickListener() {\n\n\n public void onClick(DialogInterface dialog, int which) {\n Log.i(\"Start\", \"Kommit hit\");\n finish();\n }\n });\n myBuild.show();\n }", "@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}", "@Override\n public void onBackPressed() {\n /*startAppAd.onBackPressed();\n super.onBackPressed();*/\n\n if(blnExit)\n {\n super.onBackPressed();\n return;\n }\n this.blnExit = true;\n // startAppAd.onBackPressed();\n\n\n Toast.makeText(ActHome.this,\"Please click BACK again to EXIT.\",Toast.LENGTH_SHORT).show();\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n blnExit = false;\n }\n },2000);\n }", "protected void pauseApp() {\n\r\n\t}", "public void quitnow(View view){\n finish();\n System.exit(0);\n }", "private void programShutdown(){\n\n am.finishAllActivity();\n activity .moveTaskToBack(true);\n activity .finish();\n android.os.Process.killProcess(android.os.Process.myPid());\n System.exit(0);\n\n\n }", "public void exitButtonClicked() {\r\n\t\tSystem.exit(0); \r\n\t\treturn;\r\n\t}", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tgoHome();\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "public void onBackPressed(){\n super.onBackPressed();\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {\n finishAffinity();\n\n }else {\n finish();\n }\n }", "@Override\r\n\tpublic void onBackPressed() {\n\t\tfinish();\r\n\t}", "@Override\r\n\tpublic void onBackPressed() {\n\t\tfinish();\r\n\t}", "@Override\r\n\tpublic boolean onKeyDown(int keyCode, KeyEvent event) {\r\n \t\r\n \t// Handle back button\r\n \tif (keyCode == KeyEvent.KEYCODE_BACK) {\r\n \t\tnew AlertDialog.Builder(this)\r\n \t\t.setTitle(R.string.quit_title)\r\n .setIcon(android.R.drawable.ic_dialog_alert)\r\n .setMessage(R.string.quit_text)\r\n .setPositiveButton(R.string.quit_yes, new DialogInterface.OnClickListener() {\r\n \t\r\n \t@Override\r\n public void onClick(DialogInterface dialog, int which) {\r\n\r\n //Stop the activity\r\n Main.this.finish(); \r\n }})\r\n .setNegativeButton(R.string.quit_no, null)\r\n .show();\r\n \t\t\r\n \t\treturn true;\r\n }\r\n else\r\n return super.onKeyDown(keyCode, event);\r\n\t}", "@Override\n\t\tpublic boolean onTouch(View arg0, MotionEvent arg1) {\n\t\t\tfinish();\n\t\t\t\n\t\t\treturn false;\n\t\t}", "public abstract boolean onBackPressed(boolean isSystemBackKey);", "@Override\r\n\tpublic boolean onKeyDown(int keyCode, KeyEvent event) {\n\t\tswitch (keyCode) {\r\n\t\tcase KeyEvent.KEYCODE_BACK:\r\n\t\t\tif (flag == true) {\r\n\t\t\t\t//Log.i(\"msg\", \"assssssssssd\");\r\n\t\t\t\tTabHo.this.finish();\r\n\t\t\t} else {\r\n\t\t\t\tToast.makeText(TabHo.this, \"再按一下返回键退出程序\", Toast.LENGTH_SHORT)\r\n\t\t\t\t\t\t.show();\r\n\t\t\t\tflag = true;\r\n\t\t\t\tnew Thread() {\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tThread.sleep(1500);\r\n\t\t\t\t\t\t\tflag = false;\r\n\t\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\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};\r\n\t\t\t\t}.start();\r\n\t\t\t}\r\n\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\treturn super.onKeyDown(keyCode, event);\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}", "protected void pauseApp() {\n\t\t\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }", "public void onClick(DialogInterface dialog, int id) {\n Intent homeIntent = new Intent(Intent.ACTION_MAIN);\n homeIntent.addCategory( Intent.CATEGORY_HOME );\n homeIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(homeIntent);\n }", "@Override\r\n public boolean onKeyDown(int keyCode, KeyEvent event) {\r\n if ((keyCode == KeyEvent.KEYCODE_BACK)) {\r\n \tfinish();\r\n \t\r\n return true;\r\n }\r\n return super.onKeyDown(keyCode, event);\r\n }", "@Override\n public void onBackPressed() {\n showQuitDialog();\n }", "@Override\n\t public void onClick(View arg0) {\n\t\tfinish();\n\t }", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\treturn;\n\t}", "@Override\n\tpublic void onBackPressed()\n\t{\n\t\tUtilidades.Aplicativo.minizarAplicativo(this);\n\t\t\n\t\t\n\t\t\n//\t\tIntent intent = new Intent(Intent.ACTION_MAIN);\n//\t\tintent.addCategory(Intent.CATEGORY_HOME);\n//\t\tintent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n//\t\tstartActivity(intent);\n//\t\tgetApplicationContext().startActivity(intent);\n\t}", "@Override\n public boolean onKeyDown(int keyCode, KeyEvent event) {\n if (keyCode == KeyEvent.KEYCODE_BACK) {\n finish();\n Intent intent = new Intent(this, KabinAdmin.class);\n startActivity(intent);\n }\n return true;\n }", "public void onClickExit(View view) {\n BYPASS_LOGIN = false;\n\n //finish activity\n super.finish();\n\n //close all activities\n ActivityCompat.finishAffinity(this);\n\n //log out of google play services\n super.signOut();\n }", "@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tIntent i = new Intent(Intent.ACTION_MAIN);\n\t\t\t\t\t\t\ti.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\t\t\t\ti.addCategory(Intent.CATEGORY_HOME);\n\t\t\t\t\t\t\tstartActivity(i);\n\n\t\t\t\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tfinish();\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tfinish();\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tfinish();\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tfinish();\r\n\t\t\t}", "@Override\n public void onExitAmbient() {\n\n Toast.makeText(getApplicationContext(), \"Exit\", Toast.LENGTH_LONG).show();\n }" ]
[ "0.7141426", "0.7129949", "0.70875597", "0.70556986", "0.7035462", "0.6931645", "0.6931645", "0.6902836", "0.6859449", "0.68572515", "0.68435884", "0.6822248", "0.6800526", "0.6796093", "0.6770823", "0.66979635", "0.66886115", "0.6686193", "0.6674549", "0.6664585", "0.6654043", "0.6652291", "0.6652291", "0.66304785", "0.6627688", "0.66234994", "0.66213995", "0.65898204", "0.65881526", "0.6575462", "0.65754014", "0.6574794", "0.6574731", "0.6572859", "0.65603495", "0.6551834", "0.65394497", "0.65375185", "0.6529287", "0.65215915", "0.6506881", "0.65066195", "0.65066195", "0.6501789", "0.6500534", "0.6492865", "0.6490092", "0.6487097", "0.64715016", "0.6447363", "0.6444544", "0.64334583", "0.64254147", "0.64250386", "0.6418688", "0.64121026", "0.64121026", "0.64066106", "0.640346", "0.63922346", "0.6386626", "0.63853467", "0.6366786", "0.6366223", "0.63612396", "0.63603795", "0.6358194", "0.6355924", "0.6354151", "0.6347072", "0.63452584", "0.63412666", "0.63318855", "0.6330438", "0.6323379", "0.63221484", "0.63178575", "0.63172305", "0.631517", "0.6312033", "0.6312033", "0.6310799", "0.63082445", "0.6306402", "0.63047737", "0.6304257", "0.6299466", "0.62968194", "0.62947124", "0.6293219", "0.628213", "0.62819004", "0.62811595", "0.6277551", "0.62759537", "0.62718046", "0.627047", "0.627047", "0.627047", "0.627047", "0.62651867" ]
0.0
-1
no need to bypass login in the future
public void onClickExit(View view) { BYPASS_LOGIN = false; //finish activity super.finish(); //close all activities ActivityCompat.finishAffinity(this); //log out of google play services super.signOut(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void login() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void login() {\n\t\t\r\n\t}", "@Override\n\tprotected void checkLoginRequired() {\n\t\treturn;\n\t}", "@Override\n\tprotected void login() {\n\t\tsuper.login();\n\t}", "@Override\r\n\tpublic void login() {\n\r\n\t}", "@Override\r\n\tpublic boolean checkLogin() {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean checkLogin() {\n\t\treturn false;\r\n\t}", "protected synchronized void login() {\n\t\tauthenticate();\n\t}", "private void userLogin(HttpServletRequest request, HttpServletResponse response) {\n\t\t\n\t}", "private void loggedInUser() {\n\t\t\n\t}", "public static void Login() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void credite() {\n\t\t\n\t}", "public static void forceLogin() {\n forcedLogin = true;\n }", "@Override\n public void doWhenNetworkCame() {\n doLogin();\n }", "private void tryLogin() {\n AsyncTask<String, Void, Boolean> task = new AsyncTask<String, Void, Boolean>(){\n @Override\n protected Boolean doInBackground(String... ci_session) {\n boolean isValid = PwcatsRequester.isValidCiSession(ci_session[0]);\n return isValid;\n }\n @Override\n protected void onPostExecute(Boolean isValid) {\n isLogined = isValid;\n showOrHideLogInOut(isLogined);\n if (!isValid)\n authLogout();\n TextView mNavAuthLogin = (TextView) findViewById(R.id.nav_auth_login);\n TextView mNavAuthLogout = (TextView) findViewById(R.id.nav_auth_logout);\n }\n };\n String ci_session = prefs.getString(getString(R.string.ci_session), null);\n task.execute(ci_session);\n }", "@Before(unless = { \"signin\", \"doLogin\" })\n\tprivate static void checkAuthentification() {\n\t\t// get ID from secure social plugin\n\t\tString uid = session.get(PLAYUSER_ID);\n\t\tif (uid == null) {\n\t\t\tsignin(null);\n\t\t}\n\n\t\t// get the user from the store. TODO Can also get it from the cache...\n\t\tUser user = null;\n\t\tif (Cache.get(uid) == null) {\n\t\t\ttry {\n\t\t\t\tuser = UserClient.getUserFromID(uid);\n\t\t\t\tCache.set(uid, user);\n\t\t\t} catch (ApplicationException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tflash.error(\"Problem while getting user from store...\");\n\t\t\t}\n\t\t} else {\n\t\t\tuser = (User) Cache.get(uid);\n\t\t}\n\n\t\tif (user == null) {\n\t\t\tflash.error(\"Problem while getting user from store...\");\n\t\t\tAuthentifier.logout();\n\t\t}\n\n\t\tif (user.avatarURL == null) {\n\t\t\tuser.avatarURL = Gravatar.get(user.email, 100);\n\t\t}\n\n\t\t// push the user object in the request arguments for later display...\n\t\trenderArgs.put(PLAYUSER, user);\n\t}", "@Override\n protected void afterAuthenticating() {\n }", "public void LogIn() {\n\t\t\r\n\t}", "protected Response login() {\n return login(\"\");\n }", "private void loadLogin(){\n }", "Login() { \n }", "@Override\n\tpublic void loginUser() {\n\t\t\n\t}", "private void checkUser() {\n\t\tloginUser = mySessionInfo.getCurrentUser();\n\t}", "private static void postLoginPage() {\n post(\"/login\", \"application/json\", (req, res) -> {\n HomerAccount loggedInAccount = homerAuth.login(req.body());\n if(loggedInAccount != null) {\n req.session().attribute(\"account\", loggedInAccount);\n res.redirect(\"/team\");\n } else {\n res.redirect(\"/login\");\n }\n return null;\n });\n }", "private LogIn() {}", "@Override\n\tpublic String login_request() {\n\t\treturn null;\n\t}", "public void login () {\n\t\tGPPSignIn.sharedInstance().authenticate();\n\t}", "public void login() {\n\t\tloggedIn = true;\n\t}", "public login() {\r\n\t\tsuper();\r\n\t}", "public LoginResult login() {\n\t\tif (!auth.isLoggedIn())\n\t\t\treturn LoginResult.MAIN_LOGOUT;\n\n\t\ttry {\n\t\t\tHttpURLConnection conn = Utility.getGetConn(FUND_INDEX);\n\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\tArrayList<Cookie> tmpCookies = Cookie.getCookies(conn);\n\t\t\taws = Cookie.getCookie(tmpCookies, \"AWSELB\");\n\t\t\tphp = Cookie.getCookie(tmpCookies, \"PHPSESSID\");\n\t\t\t\n\t\t\tconn = Utility.getGetConn(FUND_LOGIN);\n\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(aws, php));\n\t\t\tString location = Utility.getLocation(conn);\n\t\t\t\n\t\t\t// https://webapps.itsd.ttu.edu/shim/getfunds/index.php/login?service=https%3A%2F%2Fget.cbord.com%2Fraidercard%2Ffull%2Flogin.php\n\t\t\tconn = Utility.getGetConn(location);\n\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\t// TODO: future speed optimization\n\t\t\t//if (auth.getPHPCookie() == null) {\n\t\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(auth.getELCCookie()));\n\t\t\t\tCookie phpCookie = Cookie.getCookie(Cookie.getCookies(conn), \"PHPSESSID\");\n\t\t\t\t// saves time for Blackboard and retrieveProfileImage().\n\t\t\t\tauth.setPHPCookie(phpCookie);\n\t\t\t\t\n\t\t\t\tconn = Utility.getGetConn(Utility.getLocation(conn));\n\t\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(auth.getERaiderCookies()));\n\t\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\t\t\n\t\t\t\tlocation = Utility.getLocation(conn);\n\t\t\t\tif (location.startsWith(\"signin.aspx\"))\n\t\t\t\t\tlocation = \"https://eraider.ttu.edu/\" + location;\n\t\t\t\tconn = Utility.getGetConn(location);\n\t\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(auth.getERaiderCookies()));\n\t\t\t\t// might need to set ESI and ELC here. If other areas are bugged, this is why.\n\t\t\t/*} else {\n\t\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(auth.getELCCookie(), auth.getPHPCookie()));\n\t\t\t\t/// TODO This is in retirevProfileImage, maybe Mobile Login, and Blackboard!!!\n\t\t\t\tthrow new NullPointerException(\"Needs implementation!\");\n\t\t\t}*/\n\t\t\t\n\t\t\t// https://webapps.itsd.ttu.edu/shim/getfunds/index.php?elu=XXXXXXXXXX&elk=XXXXXXXXXXXXXXXX\n\t\t\tconn = Utility.getGetConn(Utility.getLocation(conn));\n\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(auth.getPHPCookie(), auth.getELCCookie()));\n\t\t\t\n\t\t\t// https://webapps.itsd.ttu.edu/shim/getfunds/index.php/login?service=https%3A%2F%2Fget.cbord.com%2Fraidercard%2Ffull%2Flogin.php\n\t\t\tconn = Utility.getGetConn(Utility.getLocation(conn));\n\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(auth.getPHPCookie(), auth.getELCCookie()));\n\t\t\t\n\t\t\t// https://get.cbord.com/raidercard/full/login.php?ticket=ST-...\n\t\t\tconn = Utility.getGetConn(Utility.getLocation(conn));\n\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(aws, php));\n\t\t\t\n\t\t\t// https://get.cbord.com/raidercard/full/funds_home.php\n\t\t\tlocation = Utility.getLocation(conn);\n\t\t\tif (location.startsWith(\"index.\")) {\n\t\t\t\tlocation = \"https://get.cbord.com/raidercard/full/\" + location;\n\t\t\t}\n\t\t\tconn = Utility.getGetConn(location);\n\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(aws, php));\n\t\t\tUtility.readByte(conn);\n\t\t} catch (IOException e) {\n\t\t\tTTUAuth.logError(e, \"raiderfundlogin\", ErrorType.Fatal);\n\t\t\treturn LoginResult.OTHER;\n\t\t} catch (Throwable t) {\n\t\t\tTTUAuth.logError(t, \"raiderfundlogingeneral\", ErrorType.APIChange);\n\t\t\treturn LoginResult.OTHER;\n\t\t}\n\n\t\tloggedIn = true;\n\n\t\treturn LoginResult.SUCCESS;\n\t}", "@Override\n\tpublic boolean isLogin() {\n\t\treturn false;\n\t}", "public void doLogin() {\n\t\tSystem.out.println(\"loginpage ----dologin\");\n\t\t\n\t}", "@Override\n\tpublic boolean login(Map<String, Object> map) {\n\t\treturn false;\n\t}", "public void load() {\n setRemoteUser(\"\");\n setAuthCode(AuthSource.DENIED); \n \n if(pageContext==null) {\n return;\n }\n \n session=(HttpSession)getPageContext().getSession();\n setRemoteUser(Utilities.nvl((String)session.getAttribute(\"remoteUser\"), \"\"));\n setAuthCode(Utilities.nvl((String)session.getAttribute(\"authCode\"), AuthSource.DENIED));\n }", "Login.Req getLoginReq();", "private void loginFlow() {\n\t\tActiveUserModel userController = ActiveUserModel.getInstance();\n\n\t\tif (userController.isLoggedIn()) {\n\t\t\t// continue\n\t\t} else {\n\t\t\tIntent intent = new Intent(this, LoginActivity.class);\n\t\t\tstartActivityForResult(intent, LOGIN_ACTIVITY);\n\t\t}\n\t}", "@Override\n public boolean check() {\n return GlobalParams.isLogin();\n }", "void loginDone();", "public void testLogin() throws Exception {\n super.login();\n }", "boolean authNeeded();", "public void verifyLogin(){\n\n //Verifica que haya conexion de internet\n networkManager = (ConnectivityManager) this.getSystemService(\n Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = networkManager.getActiveNetworkInfo();\n boolean isConnected = networkInfo != null && networkInfo.isConnectedOrConnecting();\n\n if (PreferenceUtils.getEmail (this) != null) { //Verifica que hay una session abierta.\n showSplash ();\n if(isConnected){\n\n //Checa el tipo de session\n if(PreferenceUtils.getSession (this))\n //Facebook session\n new LoadDataLoginFacebook (this).execute(\n PreferenceUtils.getName (this),\n PreferenceUtils.getEmail (this),\n PreferenceUtils.getPassword (this));\n else\n //Manual session\n new LoadDataLogin (this).execute (\n PreferenceUtils.getEmail (this),\n PreferenceUtils.getPassword (this));\n }\n else{ //Si no hay internet pasa directo a la session abierta.\n Intent intent = new Intent (AccessActivity.this, MainActivity.class);\n startActivity (intent);\n }\n }\n }", "private static void attemptToLogin() {\n\t\tString id = null;\n\t\tString password = null;\n\t\tString role = null;\n\t\tint chances = 3;\n\t\t//User will get 3 chances to login into the system.\n\t\twhile(chances-->0){\n\t\t\tlog.info(\"Email Id:\");\n\t\t\tid = sc.next();\n\t\t\tlog.info(\"Password:\");\n\t\t\tpassword = sc.next();\n\t\t\trole = LogInAuthentication.authenticate(id, password);\n\t\t\t//If correct credentials are entered then role of user will be fetch from the database. \n\t\t\tif(role == null) {\n\t\t\t\t//If role is not fetched, error and left chances will be shown.\n\t\t\t\tlog.error(\"Invalid EmailId or password\");\n\t\t\t\tlog.info(\"Chances left: \"+chances);\n\t\t\t}\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}\n\t\t//After verifying credentials User will be on-board to its portal depending upon the role.\n\t\tonboard(id,role);\n\t}", "@Override\r\n\tprotected void onLoginSuccess() {\n\t\t\r\n\t}", "boolean hasLoginapiavgrtt();", "private void action_login_utente(HttpServletRequest request, HttpServletResponse response) throws IOException{\n //recupero credenziali di login\n String email = SecurityLayer.addSlashes(request.getParameter(\"email\").toLowerCase());\n email = SecurityLayer.sanitizeHTMLOutput(email);\n String password = SecurityLayer.addSlashes(request.getParameter(\"password\"));\n password = SecurityLayer.sanitizeHTMLOutput(password);\n if(!email.isEmpty() && !password.isEmpty()){\n try {\n //recupero utente dal db\n Utente u = ((PollwebDataLayer)request.getAttribute(\"datalayer\")).getUtenteDAO().getUtenteByEmail(email);\n //controllo che l'utente esista\n if(u != null){\n //controllo i parametri\n if(u.getEmail().equalsIgnoreCase(email) && new BasicPasswordEncryptor().checkPassword(password, u.getPassword())){\n //se l'utente esiste ed è lui\n\n request.setAttribute(\"userName\", u.getNome());\n request.setAttribute(\"user_id\", u.getId());\n System.out.println(u.getId());\n\n SecurityLayer.createSession(request, u.getId());\n\n if (request.getParameter(\"referrer\") != null) {\n response.sendRedirect(request.getParameter(\"referrer\"));\n } else {\n response.sendRedirect(\"/home\");\n }\n }else{\n if(request.getAttribute(\"referrer\") != null){\n response.sendRedirect(\"/login?referrer=\" + URLEncoder.encode(((String)request.getAttribute(\"referrer\")), \"UTF-8\"));\n }else{\n request.setAttribute(\"error\", \"Credenziali errate\");\n response.sendRedirect(\"/login?error=100\");\n }\n }\n\n }else{\n\n if(request.getAttribute(\"referrer\") != null){\n response.sendRedirect(\"/login?referrer=\" + URLEncoder.encode(((String)request.getAttribute(\"referrer\")), \"UTF-8\"));\n }else{\n response.sendRedirect(\"/login&error=102\");\n }\n }\n }catch (DataException ex) {\n //TODO Handle Exception\n\n }\n } else {\n\n if(request.getAttribute(\"referrer\") != null){\n response.sendRedirect(\"/login?referrer=\" + URLEncoder.encode(((String)request.getAttribute(\"referrer\")), \"UTF-8\"));\n }else{\n response.sendRedirect(\"/login?error=101\");\n }\n }\n }", "private void login(String username,String password){\n\n }", "public void login() {\n if (!areFull()) {\n return;\n }\n\n // Get the user login info\n loginInfo = getDBQuery(nameField.getText());\n if (loginInfo.equals(\"\")) {\n return;\n }\n\n // Get password and check if the entered password is true\n infoArray = loginInfo.split(\" \");\n String password = infoArray[1];\n if (!passField.getText().equals(password)) {\n errorLabel.setText(\"Wrong Password!\");\n return;\n }\n\n continueToNextPage();\n }", "private void login() {\n AnonimoTO dati = new AnonimoTO();\n String username = usernameText.getText();\n String password = passwordText.getText();\n\n if (isValidInput(username, password)) {\n dati.username = username;\n dati.password = password;\n\n ComplexRequest<AnonimoTO> request =\n new ComplexRequest<AnonimoTO>(\"login\", RequestType.SERVICE);\n request.addParameter(dati);\n\n SimpleResponse response =\n (SimpleResponse) fc.processRequest(request);\n\n if (!response.getResponse()) {\n if (ShowAlert.showMessage(\n \"Username o password non corretti\", AlertType.ERROR)) {\n usernameText.clear();\n passwordText.clear();\n }\n }\n }\n\n }", "private void byPassLogin(String email) {\n User user = new User(123, email, Grade.A, 100, 9999991, 50f, 25f);\n Login(user);\n }", "private void loginAsAdmin() {\n vinyardApp.navigateToUrl(\"http://localhost:8080\");\n vinyardApp.fillUsername(\"admin\");\n vinyardApp.fillPassord(\"321\");\n vinyardApp.clickSubmitButton();\n }", "@Override\n\tpublic void goToLogin() {\n\t\t\n\t}", "private void adminLogin() {\n\t\tdriver.get(loginUrl);\r\n\t\t// fill the form\r\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(USERNAME);\r\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(PASSWORD);\r\n\t\t// submit login\r\n\t\tdriver.findElement(By.name(\"btn_submit\")).click();\r\n\t}", "private void LoginOwner() {\n Transaksi.setEnabled(false);\n Transaksi.setVisible(false);\n }", "private static void logedIn(Request req, Response res, CloudService cloud) {\r\n\t\t\tif (cloud.getKorisnici().get(req.cookie(\"userID\")) == null) {\r\n\t\t\t\tString[] params = req.splat();\r\n\t\t\t\tString path;\r\n\t\t\t\tif(params.length == 0)\r\n\t\t\t\t\tpath = \"\";\r\n\t\t\t\telse\r\n\t\t\t\t\tpath = params[0];\r\n\t\t\t\tif(path.equals(\"checkLogin\") || path.equals(\"favicon.ico\"))\r\n\t\t\t\t\treturn;\r\n\t\t\t\tres.redirect(\"/login.html\");\r\n\t\t\t\thalt(302);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif(req.session().attribute(\"user\") == null) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tKorisnik k = cloud.getKorisnici().get(req.cookie(\"userID\"));\r\n\t\t\t\t\treq.session().attribute(\"user\", k); // postavi mu korisnika za sesiju\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "private boolean isLoggedInUser(){\n return true;\n }", "public void StartLogIn(){\n\t}", "final String loginAsAutoUser() {\r\n \treturn loginAsAutoUser(false);\r\n }", "private void authorize() {\r\n\r\n\t}", "private void attemptLogin() {\r\n if (mAuthTask != null) {\r\n return;\r\n }\r\n\r\n\r\n // Store values at the time of the login attempt.\r\n String email = mEmailView.getText().toString();\r\n String password = mPasswordView.getText().toString();\r\n\r\n boolean cancel = false;\r\n View focusView = null;\r\n\r\n // Check for a valid password, if the user entered one.\r\n\r\n // Check for a valid email address.\r\n if (TextUtils.isEmpty(email)) {\r\n mEmailView.setError(getString(R.string.error_field_required));\r\n focusView = mEmailView;\r\n cancel = true;\r\n } else if (!isEmailValid(email)) {\r\n mEmailView.setError(getString(R.string.error_invalid_email));\r\n focusView = mEmailView;\r\n cancel = true;\r\n }\r\n mAuthTask = new UserLoginTask(email, password);\r\n try {\r\n Boolean logStatus = mAuthTask.execute(\"http://shubhamgoswami.me/login\").get();\r\n if(logStatus){\r\n SQLiteDatabase db = openOrCreateDatabase(\"adharShila\",MODE_PRIVATE, null);\r\n db.execSQL(\"UPDATE LOGSTATUS SET USERNAME=\\\"\"+mEmailView.getText()+\"\\\", STATUS=1 WHERE ENTRY=1\");\r\n db.close();\r\n Intent i = new Intent(getApplicationContext(), MainActivity.class);\r\n i.putExtra(\"username\", mEmailView.getText());\r\n i.putExtra(\"password\", password);\r\n startActivity(i);\r\n }\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n } catch (ExecutionException e) {\r\n e.printStackTrace();\r\n }\r\n }", "private ServicioLogin() {\n super();\n }", "public abstract boolean isLoginRequired();", "public void loginAsUser() {\n vinyardApp.navigateToUrl(\"http://localhost:8080\");\n vinyardApp.fillUsername(\"user\");\n vinyardApp.fillPassord(\"123\");\n vinyardApp.clickSubmitButton();\n }", "@Test(priority = 1)\n\tpublic void login() {\n\t\tlp.loginToApp();\n\t}", "RequestResult loginRequest() throws Exception;", "@Override\n\t\t\t\t\tpublic boolean loginWithGoogle(String userName, String password) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}", "@Override\n\tpublic boolean login(Credentials cred) {\n\t\treturn true;\n\t}", "public void doLogin() {\r\n\t\tif(this.getUserName()!=null && this.getPassword()!=null) {\r\n\t\t\tcdb=new Connectiondb();\r\n\t\t\tcon=cdb.createConnection();\r\n\t\t\ttry {\r\n\t\t\t\tps=con.prepareStatement(\"Select idUser,nom,prenom,userName,type,tel from t_user where userName=? and pass=? and status=?\");\r\n\t\t\t\tps.setString(1, this.getUserName());\r\n\t\t\t\tps.setString(2, this.getPassword());\r\n\t\t\t\tif(rs.next()) {\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"idUser\", rs.getInt(\"idUser\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"nom\", rs.getString(\"nom\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"prenom\", rs.getString(\"prenom\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"userName\", rs.getString(\"userName\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"type\", rs.getString(\"type\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"tel\", rs.getString(\"tel\"));\r\n\t\t\t\t\tFacesContext.getCurrentInstance().getExternalContext().redirect(\"view/welcome.xhtml\");\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\tnew Message().error(\"echec de connexion\");\r\n\t\t\t}finally {\r\n\t\t\t\tcdb.closeConnection(con);\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\tnew Message().warnig(\"Nom d'utilisateur ou mot de passe incorrecte\");\r\n\t\t}\r\n\t}", "public void doLoginClod()\r\n {\r\n this.executeLoginAttemp(this.loginForForm, this.passwordForForm);\r\n String navigateResult = this.navigateAfterLoginAttemp();\r\n if (!navigateResult.equals(\"/\")) redirectSession(\"/clodwar/index.xhtml\");\r\n }", "private void checkForSavedLogin() {\n\t\taccessToken = getAccessToken();\n\t\tif (accessToken==null) return;\t//if there are no credentials stored then return to usual activity\n\n\t\t// initialize Twitter4J\n\t\ttwitter.setOAuthAccessToken(accessToken);\n\t}", "public abstract boolean login(String email, String passwaord) throws CouponSystemException;", "@Override\r\n\tpublic void MemberLogin() {\n\r\n\t}", "@Override\n\tpublic void loginEnsure(String userName) {\n\t\t\n\t}", "private boolean login()\n {\n System.out.print(\"Enter your username: \");\n String userName = keyboard.nextLine().toLowerCase();\n currentUser = fs.getUser(userName);\n System.out.println();\n\n return currentUser != null;\n }", "@Override\r\n\tpublic boolean needsCredentials() {\n\t\treturn false;\r\n\t}", "private Boolean authorize() {\n\n return Session.getInstance().login(user.getText(), password.getText());\n }", "private void signIn() {\n }", "private void checkLogin(String email, String password) {\n final Context ctx = getApplicationContext();\n\n processor.checkLoginCredentials(email, password, ctx, new FetchDataListener() {\n @Override\n public void onFetchComplete(JSONObject data) {\n Boolean resp = (Boolean) data.get(\"response\");\n if (resp) {\n // go to home page\n Intent goToHome = new Intent(ctx, MainActivity.class);\n goToHome.putExtra(\"user\", etEmail.getText().toString());\n goToHome.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(goToHome);\n\n // finish prevents people from going back to login without logging out\n finish();\n } else {\n displayLoginError(\"Couldn't log in\");\n etEmail.setText(\"\");\n etPassword.setText(\"\");\n }\n }\n\n @Override\n public void onFetchFailure(String msg) {\n Log.d(TAG, msg);\n displayLoginError(\"Error connecting to server\");\n }\n\n @Override\n public void onFetchStart() {\n // do nothing\n }\n });\n\n }", "boolean hasLogin();", "boolean hasLogin();", "protected boolean login() {\n\t\tString Id = id.getText();\n\t\tif (id.equals(\"\")){\n\t\t\tJOptionPane.showMessageDialog(null, \"请输入用户名!\",\"\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tUserVO user = bl.findUser(Id);\n\t\tif (user == null){\n\t\t\tJOptionPane.showMessageDialog(null, \"该用户不存在!\",\"\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (! user.getPassword().equals(String.valueOf(key.getPassword()))){\n\t\t\tSystem.out.println(user.getPassword());\n\t\t\tJOptionPane.showMessageDialog(null, \"密码错误!\",\"\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tsimpleLoginPanel.this.setVisible(false);\n\t\tUserblService user2 = new Userbl(Id);\n\t\tReceiptsblService bl = new Receiptsbl(user2);\n\t\tClient.frame.add(new simpleMainPanel(user2,bl));\n\t\tClient.frame.repaint();\n\t\t\n\t\treturn true;\n\t\t\n\t}", "@Override\n\tpublic ActionResult login(PortalForm form, HttpServletRequest request) throws SQLException {\n\t\treturn null;\n\t}", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n String login = req.getParameter(\"login\");\n String password = req.getParameter(\"password\");\n if (logic.isExisting(login, password)) {\n HttpSession session = req.getSession();\n session.setAttribute(\"login\", login);\n if (logic.isAdmin(login)) {\n session.setAttribute(\"role\", \"admin\");\n }\n resp.sendRedirect(String.format(\"%s/\", req.getContextPath()));\n } else {\n req.setAttribute(\"error\", \"Credentional is invalid\");\n doGet(req, resp);\n }\n }", "private void checkLogin() {\n SharedPref sp = new SharedPref(this);\n if (!sp.readLoginStatus()) {\n Intent i = new Intent(this, LoginActivity.class);\n i.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);\n startActivity(i);\n }\n }", "public LoginJudge() {\n\t\tsuper();\n\t}", "private void login() {\n User user;\n SharedPreferences preferences = context.getSharedPreferences(context.getString(R.string.user_shared_preferences), MODE_PRIVATE);\n preferences.edit().putLong(context.getString(R.string.user_id), -1).apply();\n if(preferences.getLong(context.getString(R.string.user_id), -1) != -1){\n user = User.getUser();\n }\n else{\n Globals.showDialog(\"New User\",\"Choose a user name\", LoginActivity.this);\n\n }\n user = new User();\n\n HttpUserService userService = new HttpUserService();\n Call<User> call = userService.login(user.getId());\n\n call.enqueue(new Callback<User>() {\n @Override\n public void onResponse(Call<User> call, Response<User> response) {\n asyncLogin(response);\n\n\n }\n\n @Override\n public void onFailure(Call<User> call, Throwable t) {\n Globals.showConnectionDialog(LoginActivity);\n\n }\n });\n }", "public String execute(){\n\t\tint p=loginService.canLogin(uid, pwd);\n\t\tif(p==-1){\n\t\t\ttry {\n\t\t\t\tgetResponse().getWriter().write(\"{\\\"error:1\\\",\\\"reason\\\":\\\"invalidate password\\\"}\");\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\treturn null;\n\t\t}else if(p==-2){\n\t\t\ttry {\n\t\t\t\tgetResponse().getWriter().write(\"{\\\"error\\\":1,\\\"reason\\\":\\\"invalidate username\\\"}\");\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\treturn null;\n\t\t}else if (p==0||p==1){\n\t\t\tgetSession().setAttribute(\"id\", uid);\n\t\t\tgetWriter().write(\"{\\\"error\\\":0,\\\"redirect\\\":\\\"project.html\\\"}\");\n\t\t\treturn null;\n\t\t}else{\n\t\t\tgetSession().setAttribute(\"id\", uid);\n\t\t\tgetWriter().write(\"{\\\"error\\\":0,\\\"redirect\\\":\\\"myself.html\\\"}\");\n\t\t\treturn null;\n\t\t}\n\t}", "private void attemptUsernamePasswordLogin()\n {\n if (mAuthTask != null)\n {\n return;\n }\n\n if(mLogInButton.getText().equals(getResources().getString(R.string.logout)))\n {\n mAuthTask = new RestCallerPostLoginTask(this,mStoredToken,MagazzinoService.getAuthenticationHeader(this),true);\n mAuthTask.execute(MagazzinoService.getLogoutService(this));\n return;\n }\n // Reset errors.\n mUsernameView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mUsernameView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password))\n {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email))\n {\n mUsernameView.setError(getString(R.string.error_field_required));\n focusView = mUsernameView;\n cancel = true;\n }\n else if (!isUsernameOrEmailValid(email))\n {\n mUsernameView.setError(getString(R.string.error_invalid_email));\n focusView = mUsernameView;\n cancel = true;\n }\n\n if (cancel)\n {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n return;\n }\n\n mAuthTask = new RestCallerPostLoginTask(this,email, password);\n mAuthTask.execute(MagazzinoService.getLoginService(this));\n\n }", "public void login() {\n\n String username = usernameEditText.getText().toString();\n String password = passwordEditText.getText().toString();\n regPresenter.setHost(hostEditText.getText().toString());\n regPresenter.login(username, password);\n }", "private void authorize(){\n\t\t\n\t\tURL authURL = null;\n\t\tURL homeURL = null;\n\t\tURLConnection homeCon = null;\n\t\t\n\t\tString loginPage = GG.GG_LOGIN+\"?ACCOUNT=\"+GG.GG_UID\n\t\t\t+\"&PASSWORD=\"+GG.GG_PASS;\n\t\tString cookieString = \"\";\n\t\tString cookieString1 = \"\";\n\t\t\n\t\ttry{\n\t\t\thomeURL = new URL(GG.GG_HOME);\n\t\t\thomeCon = homeURL.openConnection();\n\t\t\t\n\t\t\t// Look At the headers\n\t\t\tMap headerMap = homeCon.getHeaderFields();\n\t\t\t\n\t\t\t// Look for the Cookie\n\t\t\tif(headerMap.containsKey(\"Set-Cookie\")){\n\t\t\t\t\n\t\t\t\t// this gets the exact value of the header\n\t\t\t\t// otherwise gets some formatted string\n\t\t\t\tcookieString = homeCon.getHeaderField(\"Set-Cookie\");\n\t\t\t\t//log.finest(\"cookie1: \"+cookieString);\n\t\t\t\t\n\t\t\t\tauthURL = new URL(loginPage);\n\t\t\t\tHttpURLConnection.setFollowRedirects(false);\n\t\t\t\tHttpURLConnection loginCon = (HttpURLConnection) authURL.openConnection();\n\t\t\t\t\n\t\t\t\t// doOutput must be set before connecting\n\t\t\t\tloginCon.setAllowUserInteraction(true);\n\t\t\t\tloginCon.setUseCaches(false);\n\t\t\t\tloginCon.setDoOutput(true);\n\t\t\t\tloginCon.setRequestProperty(\"Cookie\", cookieString);\n\t\t\t\tloginCon.connect();\n\t\t\t\t\n\t\t\t\t// Look At the headers\n\t\t\t\tMap headerMap1 = loginCon.getHeaderFields();\n\t\t\t\t\n\t\t\t\tcookieString1 = loginCon.getHeaderField(\"Set-Cookie\");\n\t\t\t\t//log.finest(\"cookie2: \"+cookieString1);\n\t\t\t\tif(!Pattern.matches(\".*\\\\.\"+GG.GG_UID+\"\\\\.\\\\d+.*\", cookieString1)){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tString location = loginCon.getHeaderField(\"Location\");\n\t\t\t\tURL gotURL = new URL(location);\n\t\t\t\tHttpURLConnection gotCon = (HttpURLConnection) gotURL.openConnection();\n\t\t\t\t// doOutput must be set before connecting\n\t\t\t\tgotCon.setAllowUserInteraction(true);\n\t\t\t\tgotCon.setUseCaches(false);\n\t\t\t\tgotCon.setDoOutput(true);\n\t\t\t\tgotCon.setRequestProperty(\"Cookie\", cookieString);\n\t\t\t\tgotCon.setRequestProperty(\"Cookie\", cookieString1);\n\t\t\t\t\n\t\t\t\tgotCon.connect();\n\t\t\t\t\n\t\t\t\t// Got the Cookies\n\t\t\t\tcookies[0] = cookieString;\n\t\t\t\tcookies[1] = cookieString1;\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tlog.info(\"Unable to find the Cookie\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t\tauthorized = true;\n\t}", "private void checkAccessAndLoggIn() {\n // Make sure we have access\n ConnectionChecker connectionHelper = new ConnectionChecker(this);\n boolean haveAccess = connectionHelper.canConnectInternet();\n if (haveAccess) {\n // Check if user is logged in\n final ParseUser user = ParseUser.getCurrentUser();\n boolean isLoggedIn = (user != null);\n Log.d(TAG, \"User logged in = \" + isLoggedIn);\n checkLogIn(isLoggedIn);\n } else {\n // Alert user we need access to internet\n Toast.makeText(this, \"We are unable to access Good Feed. Please check your connection\", Toast.LENGTH_LONG).show();\n }\n }", "public static void login() {\n\t\trender();\n\t}", "public abstract User login(User data);", "public Page_Home doDefaultLogin() {\n\t\tLogStatus.info(\"Logging in with username :: \\'\" + TestUtils.getValue(\"username\") + \"\\' and password :: \\'\"\n\t\t\t\t+ TestUtils.getValue(\"password\") + \"\\'\");\n\t\tDriverManager.getDriver().findElement(By.name(\"username\")).sendKeys(TestUtils.getValue(\"username\"));\n\t\tDriverManager.getDriver().findElement(By.name(\"password\")).sendKeys(TestUtils.getValue(\"password\"));\n\t\tDriverManager.getDriver().findElement(By.id(\"Registration Desk\")).click();\n\t\tDriverManager.getDriver().findElement(By.id(\"loginButton\")).click();\n\n\t\treturn new Page_Home();\n\n\t}", "@Override\n\tpublic boolean login(String username, String password) {\n\t\treturn false;\n\t}", "public static void userLogin(Context context)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t\r\n\t\t\r\n\t\t\tString username = context.formParam(\"myUsername\");\r\n\t\t\tString password = context.formParam(\"myPassword\");\r\n\t\t\t\r\n\t\t\tif(myAccountServ.attemptLoginServiceLayer(username, password)) //if true then get user account from DB\r\n\t\t\t{\r\n\t//\t\t\tSystem.out.println(myAccountServ.getMyAccountFromDatabase(username, password));\r\n\t\t\t\tcontext.sessionAttribute(\"currentUser\", myAccountServ.getMyAccountFromDatabase(username, password)); //set session to user account info\r\n\t//\t\t\tSystem.out.println(((Account)context.sessionAttribute(\"currentUser\")));\r\n\t//\t\t\tSystem.out.println(((Account)context.sessionAttribute(\"currentUser\")).getRoleId() == 1);\r\n\t\t\t\tif(((Account)context.sessionAttribute(\"currentUser\")).getRoleId() == 1)//check user role id if they employeee\r\n\t\t\t\t{\r\n\t\t\t\t\t//take me to the employee page\r\n\t\t\t\t\tcontext.redirect(\"/html/employee-page.html\");\r\n\t\t\t\t}\r\n\t\t\t\telse if(((Account)context.sessionAttribute(\"currentUser\")).getRoleId() == 0) // or if they manager\r\n\t\t\t\t{\r\n\t\t\t\t\tcontext.redirect(\"/html/manager-page.html\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse//if we failed login attempt... send us back to login page aka \"/index.html\"\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"not correct credentials\");\r\n\t\t\t\tcontext.redirect(\"/index.html\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tLogging.error(e);\r\n\t\t}\r\n\t\t\r\n//\t\tSystem.out.println(\"username: \" + username);\r\n//\t\tSystem.out.println(\"pssword: \" + password);\r\n\t}", "public boolean loginUser();", "@Override\n\tpublic void onLoginSuccess() {\n\t\t\n\t}", "private void startAuth() {\n if (ConnectionUtils.getSessionInstance().isLoggedIn()) {\n ConnectionUtils.getSessionInstance().logOut();\n } else {\n ConnectionUtils.getSessionInstance().authenticate(this);\n }\n updateUiForLoginState();\n }", "public Login() {\r\n\t\tinitialize();\r\n\t}", "@Override\n protected boolean tryAlreadyLoginOrRememberMe(LoginHandlingResource resource) {\n if (super.tryAlreadyLoginOrRememberMe(resource)) { // if hybrid with session\n return true;\n }\n return requestManager.getHeader(\"x-authorization\").flatMap(token -> {\n return findByAuthToken(token).map(member -> {\n syncCheckLoginSessionIfNeeds(createUserBean(member)); // sometimes synchronize with database\n saveLoginInfoToSession(member); // if hybrid with session\n return true;\n });\n }).orElse(false);\n }", "@Override\n\tpublic boolean login(MemberBean param) {\n\t\treturn false;\n\t}" ]
[ "0.7708861", "0.73063153", "0.7237998", "0.7152882", "0.70903283", "0.70550424", "0.70550424", "0.6999502", "0.6829988", "0.6827714", "0.6807779", "0.6798334", "0.6795381", "0.6719181", "0.6708878", "0.66512173", "0.6649326", "0.6625599", "0.66065085", "0.6606169", "0.65772754", "0.6555914", "0.6538069", "0.6522523", "0.6515436", "0.6499461", "0.64587015", "0.64540833", "0.6451134", "0.6443073", "0.6424285", "0.6375714", "0.6365964", "0.63654095", "0.6358069", "0.6337596", "0.6333175", "0.63318145", "0.6320645", "0.63148487", "0.63097095", "0.63096553", "0.6309444", "0.6305689", "0.6288072", "0.6279135", "0.6274455", "0.6260188", "0.6259478", "0.62585706", "0.6257896", "0.62558734", "0.6252462", "0.62416685", "0.6239354", "0.6224224", "0.62156165", "0.62148166", "0.62073725", "0.6204574", "0.62043506", "0.61986506", "0.6195947", "0.6192542", "0.6189774", "0.6170494", "0.61687714", "0.61659867", "0.6163531", "0.6147419", "0.6146462", "0.6146345", "0.6137678", "0.61363983", "0.6133407", "0.6124532", "0.61124504", "0.61120653", "0.61120653", "0.60972583", "0.6094698", "0.6090597", "0.6089982", "0.6084903", "0.6071148", "0.606893", "0.6064633", "0.60635316", "0.60520685", "0.6046508", "0.6044118", "0.6042931", "0.60393447", "0.6033072", "0.60258245", "0.60239285", "0.60193926", "0.60141474", "0.6013574", "0.60062385", "0.6003078" ]
0.0
-1
UtilityHelper.displayMessage(this, "Google Play login worked!");
@Override public void onSignInSucceeded() { if (ACCESS_ACHIEVEMENT) { //if we just came from achievements button and are now signed in, display ui displayAchievementUI(); //flag back false ACCESS_ACHIEVEMENT = false; } //don't bypass auto login BYPASS_LOGIN = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void displayWelcomeMsg();", "void showSignInInterstitial();", "@Override\n public void showSignInScreen() {\n Toast.makeText(this, \"Taking user to the sign in screen\", Toast.LENGTH_SHORT).show();\n }", "void showAlert(String message);", "public void showErrorMessage(){\n Toast.makeText(context, R.string.generic_error_message, Toast.LENGTH_LONG).show();\n }", "@Override\n public void onSuccess(AuthResult authResult) {\n Toast.makeText(Login1.this, \"Successfully Login\", Toast.LENGTH_SHORT).show();\n\n }", "void displayErrorMessage(String message);", "@Override\n\t\t\tpublic void onClick(View v)\n\t\t\t{\n\t\t\t\tToast.makeText(getApplicationContext(), \"Please Sign in to continue.\", Toast.LENGTH_SHORT).show();\n\t\t\t}", "private void showLoginFailed() {\n try {\n Toast.makeText(getApplicationContext(), \"Login Failed\", Toast.LENGTH_SHORT).show();\n } catch (Exception e) {\n Looper.prepare();\n Toast.makeText(getApplicationContext(), \"Login Failed\", Toast.LENGTH_SHORT).show();\n Looper.loop();\n }\n }", "void showSyncFailMessage();", "public void showAlert(){\n MainActivity.this.runOnUiThread(new Runnable() {\n public void run() {\n AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);\n builder.setTitle(\"Login Error.\");\n builder.setMessage(\"User not Found.\")\n .setCancelable(false)\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n }\n });\n }", "private void handleSignInFailure( String statusMessage ) {\n\t\tgpAccessToken = null;\n\t\tString msg = \"Unsuccessful login.\\nStatus message:\\n\" + statusMessage;\n\t\tsocialAccountInfo.setTextColor(getColor(android.R.color.holo_red_dark));\n\t\tsocialAccountInfo.setText(msg);\n\t\tisLoggedInGoogle = false;\n\t}", "public void run() {\n Intent intent = new Intent(SignupActivity.this, HomeActivity.class);\n SignupActivity.this.startActivity(intent);\n\n Context context = getApplicationContext();\n CharSequence text = \"welcome \" + email;\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n finish();\n\n // onLoginFailed();\n progressDialog.dismiss();\n }", "public void displayMessage()\n {\n // getCourseName gets the name of the course\n System.out.printf( \"Welcome to the grade book for\\n%s!\\n\\n\",\n getCourseName() );\n }", "@Override\n\t\t\tpublic void onClick(View v)\n\t\t\t{\n\t\t\t\tToast.makeText(getApplicationContext(), \"Please Sign in to continue.\", Toast.LENGTH_SHORT).show();\n\n\t\t\t}", "public static void displayMsg() {\n\t}", "@Override\n public void showAuthScreen() {\n }", "private void success() {\n showMessage(\"Congratulations!\", \"success\");\n }", "@Override\n\tpublic void loginGPGS() {\n\t\ttry {\n\t\t\trunOnUiThread(new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tgameHelper.beginUserInitiatedSignIn();\n\t\t\t\t}\n\t\t\t});\n\t\t} catch (final Exception ex) {\n\t\t}\n\n\t}", "@Override\n public void onLogin() {\n toast(\"You are logged in\");\n }", "@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tToast.makeText(activity, \"登录成功\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}", "void displayMessage(String message);", "public void gotoCoachLogin(){ application.gotoCoachLogin(); }", "private void signInResultHandler(GoogleSignInResult result) {\n if (result.isSuccess()) {\n acct = result.getSignInAccount();\n m_tvStatus.setText(R.string.status_signedin);\n try {\n m_tvDispName.setText(acct.getDisplayName());\n m_tvEmail.setText(acct.getEmail());\n }\n catch (NullPointerException e) {\n Log.d(TAG, \"Error retrieving some account information\");\n Toast.makeText(MainActivity.this, \"Oops! Please double check your account info.\", Toast.LENGTH_SHORT).show();\n }\n\n checkAGWALoginStatus(acct);\n Account_Email = acct.getEmail();\n\n }\n else {\n Status status = result.getStatus();\n int statusCode = status.getStatusCode();\n\n // Constant Value: 12501 (API)\n if (statusCode == GoogleSignInStatusCodes.SIGN_IN_CANCELLED) {\n m_tvStatus.setText(R.string.status_signincancelled);\n }\n\n // Constant Value: 12500 (API)\n else if (statusCode == GoogleSignInStatusCodes.SIGN_IN_FAILED) {\n m_tvStatus.setText(R.string.status_signinfail);\n }\n else {\n m_tvStatus.setText(R.string.status_nullresult);\n }\n }\n }", "@Override\n protected void notifyUserOnPlayServicesUnavailable() {\n final View rootView = findViewById(R.id.root_layout);\n if (rootView == null) return;\n Snackbar.make(rootView, R.string.google_play_services_error, Snackbar.LENGTH_LONG)\n .show();\n }", "void successLogin();", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == REQUEST_CODE_LOGIN) {\n if (resultCode == RESULT_OK) {\n Intent mainIntent = new Intent(getApplicationContext(), MainActivity.class);\n startActivity(mainIntent);\n } else {\n String action = getApplicationContext().getResources().getString(R.string.message_action_failure, \"login\");\n Toast.makeText(this, action, Toast.LENGTH_SHORT).show();\n }\n }\n }", "@Override\n public void onClick(View arg0) {\n Log.i(\"\", \"google button is clicked\");\n if (cd.isConnectingToInternet()) {\n\n mGoogleApiClient.connect();\n signInWithGplus();\n } else {\n String connection_alert = getResources().getString(\n R.string.alert_no_internet);\n Constant.showAlertDialog(mContext, connection_alert, false);\n }\n }", "private void onClickSignIn(){\n if(checkValidation()){\n //if Validation is ok\n submitForm();\n }\n else{\n //Something went wrong...\n Toast.makeText(LauncherActivity.this, \"Form contains error!\", Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void errorLogin(String msg) {\n JOptionPane.showMessageDialog(this, msg);\n }", "public void signInExistingUser(View v) {\n attemptLogin();\n\n }", "private void displayMessage(String message) {\n Log.d(\"Method\", \"displayMessage()\");\n Toast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT).show();\n }", "void displayUserTakenError(){\n error.setVisible(true);\n }", "public void showAlert(){\n Loguin.this.runOnUiThread(new Runnable() {\n public void run() {\n AlertDialog.Builder builder = new AlertDialog.Builder(Loguin.this);\n builder.setTitle(\"Login Error.\");\n builder.setMessage(\"User not Found.\")\n .setCancelable(false)\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n }\n });\n }", "private void userSignIn() {\n GoogleSignInAccount account = GoogleSignIn.getLastSignedInAccount(this);\n if (GoogleSignIn.hasPermissions(account, new Scope(SCOPES))) {\n updateUI(account);\n mAccount = account.getAccount();\n Intent intent = new Intent(this, HomeActivity.class);\n intent.putExtra(ACCOUNT, mAccount);\n startActivity(intent);\n System.out.println(\"Exit Intent !!!!!!!!!!!!!!!!\");\n\n findViewById(R.id.disconnect_button).setVisibility(View.VISIBLE);\n\n } else {\n updateUI(null);\n }\n }", "public void showToast(Boolean usernameTaken) {\n String action = \"\";\n if (usernameTaken) {\n action = \"Username is already taken\";\n } else {\n action = \"An error has occurred. Please try again.\";\n }\n Toast t = Toast.makeText(this, action,\n Toast.LENGTH_SHORT);\n t.setGravity(Gravity.TOP, Gravity.CENTER, 150);\n t.show();\n }", "@Override\n public void failure(TwitterException e) {\n Toast.makeText(SignInActivity.this, \"Failed to authenticate. Please try again.\", Toast.LENGTH_SHORT).show();\n }", "public void gotoGmail(){\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n\n Log.i(TAG,\"An error occurred\" +e.getMessage());\n String exception=e.getMessage();\n int index=exception.indexOf(\":\");\n String data=exception.substring(index+1).trim();\n showMessage(\"Error\",data,R.drawable.ic_error_dialog);\n Toast.makeText(getApplicationContext(), \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n progressBar.setVisibility(View.GONE);\n\n }", "@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tMessage message = new Message(); \r\n\t\t\t\t\t\tmessage.what = LoginActivity.LOGIN_FAILURE;\r\n\t\t\t\t\t\tLoginActivity.mHandler.sendMessage(message);\r\n\t\t\t\t\t}", "@Then(\"^Message displayed Login Successfully$\")\r\n\tpublic void message_displayed_Login_Successfully() throws Throwable {\n\t\tSystem.out.println(\"Login Successfully\");\r\n\t}", "private void displayMessage(String message) {\n }", "@Override\n public void failure(TwitterException e) {\n Toast.makeText(getActivity().getApplicationContext(), \"Failed to authenticate. Please try again.\", Toast.LENGTH_SHORT).show();\n }", "void displayLoadingErrorMessage();", "void showSuccess(String message);", "public void DisplayMessage(String massage);", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tString url = mAuth.getAuthUrl();\n\t\t\t\tshowPopUp(url);\n\t\t\t}", "@Override\n public void onFailure(int arg0, String arg1) {\n login_success = false;\n toast(R.string.activity_login_fail, arg1);\n }", "public void checkLogin() {\n String username = ((EditText) findViewById(R.id.Username)).getText().toString();\n String password = ((EditText) findViewById(R.id.Password)).getText().toString();\n final TextView feedback = (TextView) findViewById(R.id.feedback);\n mAuth.signInWithEmailAndPassword(username, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n Log.d(\"LOG IN\", \"signInWithEmail:success\");\n FirebaseUser user = mAuth.getCurrentUser();\n startActivity(new Intent(LoginActivity.this, HomeScreen.class));\n } else {\n // If sign in fails, display a message to the user.\n Log.w(\"LOGIN\", \"signInWithEmail:failure\", task.getException());\n Toast.makeText(LoginActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n feedback.setText(\"FAIL!\");\n }\n\n // ...\n }\n });\n\n\n }", "public void taketoLoginActivity(View view) {\n Toast.makeText(getApplicationContext(), \"Feature will be added in future\",\n Toast.LENGTH_LONG).show();\n }", "private void sendToCatEd()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Education'\", Toast.LENGTH_SHORT).show();\n }", "public static void showSuccessSneaker(Context context, String msg) {\n\n if(!msg.endsWith(\".\")){\n msg=msg+\".\";\n }\n\n try {\n Sneaker.with((Activity) context)\n .setTitle(context.getString(R.string.app_name))\n .setMessage(msg)\n .sneakSuccess();\n }catch (Exception e){e.printStackTrace();}\n }", "void displayMessage(){\r\n Toast toast = Toast.makeText(this, getString(R.string.congratz_message, String.valueOf(playerScore)), Toast.LENGTH_SHORT);\r\n toast.show();\r\n }", "void showErrorMsg(String string);", "private void showErrorToast() {\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 }", "public void authenticate(View view) {\n String email = email_tf.getText().toString();\n String password = password_tf.getText().toString();\n\n // validating if email and password has been entered in the required data fields\n if (!validateInputs(email, password))\n return;\n\n Log.d(TAG, \"loginAccount:\" + email);\n\n // creating instance of prompt for showing prompts to user\n final Prompt prompt = new Prompt(this);\n\n // prompt user for login in\n prompt.showProgress(\"Sign In\", \"Login in...\");\n\n // authenticating email and password\n FirebaseController.getAuthInstance().signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n prompt.hideProgress();\n\n // if login was successful\n if (task.isSuccessful()) {\n Log.d(TAG, \"loginWithEmail:success\");\n\n // show short wait prompt for login successful\n prompt.showSuccessMessagePrompt(\"Login successful\");\n SASTools.wait(SASConstants.PROMPT_DISPLAY_WAIT_SHORT, new Runnable() {\n @Override\n public void run() {\n prompt.hidePrompt();\n\n // starting main activity\n startActivity(new Intent(EmailLoginActivity.this, MainActivity.class)\n .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK));\n\n // finishing this email login activity\n EmailLoginActivity.this.finish();\n }\n }\n );\n }\n\n // if login was not successful\n else {\n Log.w(TAG, \"loginWithEmail:failure\", task.getException());\n\n // show long wait prompt to user about login failure and provide the reason\n prompt.showFailureMessagePrompt(\"Login not successful\\n\" + Objects.requireNonNull(task.getException()).getMessage());\n SASTools.wait(SASConstants.PROMPT_DISPLAY_WAIT_LONG, new Runnable() {\n @Override\n public void run() {\n prompt.hidePrompt();\n }\n });\n }\n }\n });\n }", "public void showMessage(String message);", "@Override\n public void failure(TwitterException exception) {\n Toast.makeText(MainActivity.this, \"Authentication Failed!\", Toast.LENGTH_LONG).show();\n }", "public String _login_click() throws Exception{\n_login();\n //BA.debugLineNum = 155;BA.debugLine=\"End Sub\";\nreturn \"\";\n}", "@Override\n public void onFailure(int code, String msg) {\n toast(\"第三方登陆失败:\"+msg);\n }", "@Override\n\tpublic void onLoginSuccess() {\n\t\t\n\t}", "@Override\n public void onSuccess(AuthResult authResult) {\n if(!mAuth.getCurrentUser().isEmailVerified()){\n PopupEmailVerification popupEmailVerification = new PopupEmailVerification(StartPage.this);\n popupEmailVerification.show();\n }\n else{\n //User found & ready for next page\n Toast.makeText(StartPage.this, \"Sign in successful\", Toast.LENGTH_LONG).show();\n startActivity(new Intent(StartPage.this, CenterPage.class));\n finish();\n }\n\n }", "@Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(LogInActivity.this, \"Email is send\", Toast.LENGTH_SHORT).show();\n }", "public void emailCollisionError(){\n String[] options = {\"Proceed with Login\",\"Stay Here\"};\n AlertDialog.Builder builder = new AlertDialog.Builder(LoginActivity.this)\n .setTitle(\"You are a registered user, try logging in!\")\n .setItems(options, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n if(which == 0){\n\n startActivity(new Intent(LoginActivity.this, RegisteredUserLogin.class));\n LoginActivity.this.finish();\n\n }\n }\n });\n builder.show();\n\n }", "public void onClick(DialogInterface dialog, int id) {\n\r\n Context context = getApplicationContext();\r\n CharSequence text = \"Welcome \" + name + \"! Signing up...\";\r\n int duration = Toast.LENGTH_SHORT;\r\n\r\n Toast toast = Toast.makeText(context, text, duration);\r\n toast.show();\r\n }", "@Override\n public void loginBtnClk(View view) {\n isRegisteredOnGCM(1);\n }", "void showToast(String message);", "void showToast(String message);", "private void sendToCatTheater()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Theater'\", Toast.LENGTH_SHORT).show();\n }", "public interface LoginView extends BaseView {\n\n void onLoginError(String message);\n\n void firebaseAuthWithGoogle(AuthCredential credential);\n}", "public void showMessage(String msg){\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();\n }", "private void signInWithGoogle() {\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, ConstantValue.GOOGLE_SIGN_IN);\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(LogInActivity.this, \"Unable to send the email\"+e.getMessage(), Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onSuccess() {\n login_success = true;\n showInfoAndGoto();\n }", "void onSignInButtonClicked();", "public void callLogin(View view) {\n /*\n if (email.isEmpty() || password.isEmpty()) {\n Toast.makeText(this, \"Ingrese campos\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n loginPanel.setVisibility(View.GONE);\n progressBar.setVisibility(View.VISIBLE);\n\n mAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(TAG, \"Inicio sesion correcto: \" + task.isSuccessful());\n Log.d(TAG, \"Inicio sesion correcto: \" + task.isComplete());\n\n if (!task.isSuccessful()) {\n loginPanel.setVisibility(View.VISIBLE);\n progressBar.setVisibility(View.GONE);\n Log.d(TAG, \"Inicio sesion malo: \" + task.getException());\n Log.d(TAG, \"Inicio sesion malo: \" + task.getResult());\n Toast.makeText(LoginActivity.this, \"Email o Contraseña Incorrectos\", Toast.LENGTH_SHORT).show();\n }\n }\n });*/\n }", "private void handleSignInResult(GoogleSignInResult result) {\n if (result.isSuccess()) {\n // Signed in successfully, show authenticated UI.\n GoogleSignInAccount acct = result.getSignInAccount();\n test = (TextView) findViewById(R.id.tvTest);\n //ImageView prof = (ImageView) findViewById(R.id.iv_profile_icon);\n String personName = acct.getDisplayName();\n String personEmail = acct.getEmail();\n String personId = acct.getId();\n Uri personPhoto = acct.getPhotoUrl();\n\n test.setText(\"Logged in as: \" + personName);\n\n currentUser = new User(personName);\n if(currentUser == null) {\n Snackbar snackbar = Snackbar.make(\n coordinatorLayout, \"Logged in as \"+personName+\", but User class is NULL\",\n Snackbar.LENGTH_LONG);\n snackbar.show();\n }else{\n Snackbar snackbar = Snackbar.make(\n coordinatorLayout, \"Logged in as \"+personName+\". Welcome!\",\n Snackbar.LENGTH_LONG);\n snackbar.show();\n if (service != null) {\n service.setUserID(currentUser.getName());\n }\n }\n\n //mStatusTextView.setText(getString(R.string.signed_in_fmt, acct.getDisplayName()));\n //updateUI(true);\n } else {\n test = (TextView) findViewById(R.id.tvTest);\n test.setText(\"Please login with Google Login\");\n }\n }", "@Override\n public void displayError() {\n Toast.makeText(this, \"Incorrect username or password.\", Toast.LENGTH_LONG).show();\n password.setText(\"\");\n }", "private void handleSignInResult(GoogleSignInResult result) {\n if (result.isSuccess()) {\n // Signed in successfully, show authenticated UI.\n GoogleSignInAccount acct = result.getSignInAccount();\n// mStatusTextView.setText(getString(R.string.signed_in_fmt, acct.getDisplayName()));\n// updateUI(true);\n }\n }", "@Override\r\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tloading.dismiss();\r\n\t\t\t\t\t\t\t\tif(result.equals(\"0\"))\r\n\t\t\t\t\t\t\t\t\tT.mToast(SignUpActivity.this, \"Error\");\r\n\t\t\t\t\t\t\t\tif(result.equals(\"1\"))\r\n\t\t\t\t\t\t\t\t\tT.mToast(SignUpActivity.this,\r\n\t\t\t\t\t\t\t\t\t\t\t\"Sign in successfully\");\r\n\t\t\t\t\t\t\t\tif(result.equals(\"2\"))\r\n\t\t\t\t\t\t\t\t\tT.mToast(SignUpActivity.this, \"This user exists\");\r\n\t\t\t\t\t\t\t\tif(result.equals(\"3\"))\r\n\t\t\t\t\t\t\t\t\tT.mToast(SignUpActivity.this, \"Error\");\r\n\t\t\t\t\t\t\t}", "@Override\n\n public void onVerificationFailed(FirebaseException e) {\n\n Toast.makeText(otpsignin.this,\"Something went wrong\",Toast.LENGTH_SHORT).show();\n\n }", "private void RegisterGoogleSignup() {\n\n\t\ttry {\n\t\t\tLocalData data = new LocalData(SplashActivity.this);\n\n\t\t\tArrayList<String> asName = new ArrayList<String>();\n\t\t\tArrayList<String> asValue = new ArrayList<String>();\n\n\t\t\tasName.add(\"email\");\n\t\t\tasName.add(\"firstname\");\n\t\t\tasName.add(\"gender\");\n\t\t\tasName.add(\"id\");\n\t\t\tasName.add(\"lastname\");\n\t\t\tasName.add(\"name\");\n\t\t\t// asName.add(\"link\");\n\n\t\t\tasName.add(\"device_type\");\n\t\t\tasName.add(\"device_id\");\n\t\t\tasName.add(\"gcm_id\");\n\t\t\tasName.add(\"timezone\");\n\n\t\t\tasValue.add(data.GetS(LocalData.EMAIL));\n\t\t\tasValue.add(data.GetS(LocalData.FIRST_NAME));\n\t\t\tasValue.add(data.GetS(LocalData.GENDER));\n\t\t\tasValue.add(data.GetS(LocalData.ID));\n\t\t\tasValue.add(data.GetS(LocalData.LAST_NAME));\n\t\t\tasValue.add(data.GetS(LocalData.NAME));\n\t\t\t// asValue.add(data.GetS(LocalData.LINK));\n\n\t\t\tasValue.add(\"A\");\n\n\t\t\tString android_id = Secure\n\t\t\t\t\t.getString(SplashActivity.this.getContentResolver(),\n\t\t\t\t\t\t\tSecure.ANDROID_ID);\n\n\t\t\tasValue.add(android_id);\n\n\t\t\tLocalData data1 = new LocalData(SplashActivity.this);\n\t\t\tasValue.add(data1.GetS(\"gcmId\"));\n\t\t\tasValue.add(Main.GetTimeZone());\n\t\t\tString sURL = StringURLs.getQuery(StringURLs.GOOGLE_LOGIN, asName,\n\t\t\t\t\tasValue);\n\n\t\t\tConnectServer connectServer = new ConnectServer();\n\t\t\tconnectServer.setMode(ConnectServer.MODE_POST);\n\t\t\tconnectServer.setContext(SplashActivity.this);\n\t\t\tconnectServer.setListener(new ConnectServerListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onServerResponse(String sJSON, JSONObject jsonObject) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\tLog.d(\"JSON DATA\", sJSON);\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\tif (sJSON.length() != 0) {\n\t\t\t\t\t\t\tJSONObject object = new JSONObject(sJSON);\n\t\t\t\t\t\t\tJSONObject response = object\n\t\t\t\t\t\t\t\t\t.getJSONObject(JSONStrings.JSON_RESPONSE);\n\t\t\t\t\t\t\tString sResult = response\n\t\t\t\t\t\t\t\t\t.getString(JSONStrings.JSON_SUCCESS);\n\n\t\t\t\t\t\t\tif (sResult.equalsIgnoreCase(\"1\") == true) {\n\n\t\t\t\t\t\t\t\tString user_id = response.getString(\"userid\");\n\n\t\t\t\t\t\t\t\tLocalData data = new LocalData(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this);\n\t\t\t\t\t\t\t\tdata.Update(\"userid\", user_id);\n\t\t\t\t\t\t\t\tdata.Update(\"name\", response.getString(\"name\"));\n\n\t\t\t\t\t\t\t\tGetNotificationCount();\n\n\t\t\t\t\t\t\t} else if (sResult.equalsIgnoreCase(\"0\") == true) {\n\n\t\t\t\t\t\t\t\tString msgcode = jsonObject.getJSONObject(\n\t\t\t\t\t\t\t\t\t\t\"response\").getString(\"msgcode\");\n\n\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\t\t\tSplashActivity.this, msgcode),\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\t\tSplashActivity.this, \"c100\"),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} catch (Exception exp) {\n\n\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this, \"c100\"),\n\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tconnectServer.execute(sURL);\n\n\t\t} catch (Exception exp) {\n\n\t\t\tToast.makeText(SplashActivity.this,\n\t\t\t\t\tMain.getStringResourceByName(SplashActivity.this, \"c100\"),\n\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t}\n\t}", "public void showNetErrorMessage() {\n showMessage(R.string.ic_net_error_tipinfo);\n }", "private void onSignInClicked() {\n mState.enableConnection();\n mState.mShouldResolve = true;\n mState.mSignInClicked = true;\n mState.connectGoogleGames();\n\n // Show a message to the user that we are signing in.\n status.setText(\"Connecting...\");\n }", "@Override\n public void onClick(View view) {\n attemptLogin();\n }", "@Override\r\n\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"个人中心\", Toast.LENGTH_LONG).show();\r\n\t\t\t\t}", "@Override\n public void onLoginFailure() {\n\n }", "private void showErrorDialog(int errorCode) {\n\t\t\n }", "@Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(getApplicationContext(), \"Success!\",\n Toast.LENGTH_LONG).show();\n }", "private void showMessage(String string) {\n\n }", "void showActiveGames() {\n\t\tif(gameHelper == null){return;}\n\t\tif (gameHelper.getApiClient().isConnected()) {\n\t\t\tIntent i = Games.TurnBasedMultiplayer.getInboxIntent(gameHelper\n\t\t\t\t\t.getApiClient());\n\t\t\tstartActivityForResult(i, RC_INVITATION_BOX);\n\t\t} else if (gameHelper.isConnecting()) {\n\t\t\tToast.makeText(getActivity(), R.string.wait_connecting_to_google,\n\t\t\t\t\tToast.LENGTH_LONG).show();;\n\t\t}\n\t}", "private void sendToCatLit()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Literary'\", Toast.LENGTH_SHORT).show();\n }", "public final void signInWithGoogle() {\n ActivityResult.startGoogleLogin(activity, googleApiClient);\n }", "@Override\n public void failure(TwitterException exception) {\n Toast.makeText(getApplicationContext(), \"Fail Logged.....ٍ\", Toast.LENGTH_LONG).show();\n\n }", "@Override\n\t\t\t\t\tpublic void onFail() {\n\t\t\t\t\t\tToast.makeText(RegisterActivity.this, \"Username already exists!\", Toast.LENGTH_SHORT).show();\n\t\t\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 }", "@Override\n public void onFailure(int code, String msg) {\n Toast.makeText(RegisterActivity.this,\"登录失败:\"+msg,Toast.LENGTH_SHORT).show();\n }", "public void displayMessage(){\n //getCouseName obtém o nome do curso\n System.out.printf(\"Welcome to the grade book for \\n%s!\\n\\n\", getCouseName());\n }" ]
[ "0.62106985", "0.6106611", "0.60806507", "0.6066584", "0.59925854", "0.598984", "0.5981035", "0.59731364", "0.59589523", "0.59549904", "0.5931595", "0.59280914", "0.5921947", "0.58985645", "0.58915466", "0.58752716", "0.5857614", "0.58556557", "0.5840992", "0.58365047", "0.58142656", "0.5813485", "0.58117586", "0.5808001", "0.5781062", "0.576597", "0.5747351", "0.57448405", "0.57389194", "0.5730607", "0.5729199", "0.572167", "0.5719886", "0.571596", "0.5714047", "0.5711086", "0.5699257", "0.5698398", "0.5695216", "0.56929046", "0.5692344", "0.56886196", "0.5687454", "0.56854373", "0.5685342", "0.5674832", "0.5673144", "0.5667131", "0.56663257", "0.5653365", "0.56520814", "0.5647699", "0.564655", "0.56414425", "0.56382567", "0.5636669", "0.5630053", "0.5626267", "0.5624796", "0.5624729", "0.56221974", "0.5620872", "0.56192654", "0.5609772", "0.5598477", "0.5587129", "0.5579074", "0.55750924", "0.55750924", "0.55708647", "0.55701786", "0.55689216", "0.55495924", "0.5548575", "0.55432236", "0.55430216", "0.5539326", "0.5535693", "0.55339205", "0.5532677", "0.5521367", "0.55192304", "0.5519019", "0.5509286", "0.5507739", "0.5505635", "0.55040836", "0.55032885", "0.5502181", "0.54997313", "0.5497539", "0.54907894", "0.54897374", "0.5485826", "0.54789835", "0.54789746", "0.5478647", "0.5478647", "0.5478647", "0.5476281", "0.5475574" ]
0.0
-1
UtilityHelper.displayMessage(this, "Google play login failed!"); bypass auto login
@Override public void onSignInFailed() { BYPASS_LOGIN = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showLoginFailed() {\n try {\n Toast.makeText(getApplicationContext(), \"Login Failed\", Toast.LENGTH_SHORT).show();\n } catch (Exception e) {\n Looper.prepare();\n Toast.makeText(getApplicationContext(), \"Login Failed\", Toast.LENGTH_SHORT).show();\n Looper.loop();\n }\n }", "private void handleSignInFailure( String statusMessage ) {\n\t\tgpAccessToken = null;\n\t\tString msg = \"Unsuccessful login.\\nStatus message:\\n\" + statusMessage;\n\t\tsocialAccountInfo.setTextColor(getColor(android.R.color.holo_red_dark));\n\t\tsocialAccountInfo.setText(msg);\n\t\tisLoggedInGoogle = false;\n\t}", "private void showLoginFailedAlertDialog(String message) {\r\n showLoginAlertDialog(getApplicationContext(), message, false);\r\n }", "@Override\n\tpublic void loginGPGS() {\n\t\ttry {\n\t\t\trunOnUiThread(new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tgameHelper.beginUserInitiatedSignIn();\n\t\t\t\t}\n\t\t\t});\n\t\t} catch (final Exception ex) {\n\t\t}\n\n\t}", "@Override\n public void onLoginFailure() {\n\n }", "@Override\n public void onFailure(int arg0, String arg1) {\n login_success = false;\n toast(R.string.activity_login_fail, arg1);\n }", "@Override\n\t\t\t\t\tpublic boolean loginWithGoogle(String userName, String password) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}", "@Override\n public void onFailure(@NonNull Exception e) {\n\n Log.i(TAG,\"An error occurred\" +e.getMessage());\n String exception=e.getMessage();\n int index=exception.indexOf(\":\");\n String data=exception.substring(index+1).trim();\n showMessage(\"Error\",data,R.drawable.ic_error_dialog);\n Toast.makeText(getApplicationContext(), \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n progressBar.setVisibility(View.GONE);\n\n }", "public void unauthorized() {\n super.unauthorized();\n LoginFragment.this.getTracker().send(new HitBuilders.EventBuilder().setCategory(\"sign_in\").setAction(\"incorrect\").setLabel(\"incorrect\").build());\n Answers.getInstance().logLogin(new LoginEvent().putSuccess(false));\n new AlertDialog.Builder(LoginFragment.this.getActivity()).setMessage(R.string.incorrect_email_or_password).setPositiveButton(17039370, (DialogInterface.OnClickListener) null).show();\n }", "@Override\r\n\t\t\t\t\tpublic void onFailed(String failReason) {\n\t\t\t\t\t\tTypeSDKLogger.d(\"LOGIN_FAIL\");\r\n\t\t\t\t\t\tTypeSDKLogger.d(failReason);\r\n//\t\t\t\t\t\tyoukuLogin();\r\n\t\t\t\t\t}", "private void attemptLogin() {\n String email = text_email.getText().toString();\n String password = text_password.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(password)) {\n text_password.setError(getString(R.string.error_field_required));\n focusView = text_password;\n cancel = true;\n }\n if (!isPasswordValid(password)) {\n text_password.setError(getString(R.string.error_invalid_password));\n focusView = text_password;\n cancel = true;\n }\n\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n text_email.setError(getString(R.string.error_field_required));\n focusView = text_email;\n cancel = true;\n } else if (!isEmailValid(email)) {\n text_email.setError(getString(R.string.error_invalid_email));\n focusView = text_email;\n cancel = true;\n }\n\n if (cancel) {\n focusView.requestFocus();\n } else {\n //showProgress(true);\n login(USER_NORMAL);\n }\n }", "public void onLoginFailed() {\n Toast.makeText(getBaseContext(), \"Login failed\", Toast.LENGTH_LONG).show();\n bLogin.setEnabled(true);\n }", "@Override\n\tpublic void onLoginFailure(Exception arg0) {\n\t\t\n\t}", "@Override\n protected void notifyUserOnPlayServicesUnavailable() {\n final View rootView = findViewById(R.id.root_layout);\n if (rootView == null) return;\n Snackbar.make(rootView, R.string.google_play_services_error, Snackbar.LENGTH_LONG)\n .show();\n }", "@Override\n\t\t\tpublic void onClick(View v)\n\t\t\t{\n\t\t\t\tToast.makeText(getApplicationContext(), \"Please Sign in to continue.\", Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n public void onFailure(int code, String msg) {\n toast(\"第三方登陆失败:\"+msg);\n }", "public void attemptLogin() {\n\t\t// Reset errors.\n\t\temailTextView.setError(null);\n\t\tpasswordTextView.setError(null);\n\n\t\t// Store values at the time of the login attempt.\n\t\temail = emailTextView.getText().toString();\n\t\tpassword = passwordTextView.getText().toString();\n\n\t\tboolean cancel = false;\n\n\t\t// Check for a valid email address.\n\t\tcancel = Validate.PresenceOf(emailTextView);\n\t\tif (!cancel) cancel = Validate.PatternOf(emailTextView, Patterns.EMAIL_ADDRESS);\n\t\t\n\t\t// check valid password\n\t\tif (!cancel) cancel = Validate.PresenceOf(passwordTextView);\t\t\n\n\t\tif (!cancel) {\t\n\t\t\tKeyboard.hide(getActivity());\n\t\t\tlogin();\n\t\t}\n\t}", "@Override\n\t\t\tpublic void onClick(View v)\n\t\t\t{\n\t\t\t\tToast.makeText(getApplicationContext(), \"Please Sign in to continue.\", Toast.LENGTH_SHORT).show();\n\n\t\t\t}", "@Override\n public void failure(TwitterException e) {\n Toast.makeText(SignInActivity.this, \"Failed to authenticate. Please try again.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n\tpublic void onLoginFailure(Exception e) {\n\t\te.printStackTrace();\n\t}", "private void attemptLogin() {\n if (isLoggingIn) {\n return;\n }\n\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!Utils.isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (TextUtils.isEmpty(password)) {\n mPasswordView.setError(getString(R.string.error_field_required));\n focusView = mPasswordView;\n cancel = true;\n } else if (!Utils.isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n if (!HttpUtils.isNetworkAvailable(this.getApplicationContext())) {\n Toast.makeText(this.getApplicationContext(), \"No internet\", Toast.LENGTH_SHORT).show();\n cancel = true;\n }\n\n if (cancel) {\n focusView.requestFocus();\n } else {\n InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(mPasswordView.getWindowToken(), 0);\n\n LoginApi.executeLogin(this, email, password);\n }\n }", "@Override\n public void errorLogin(String msg) {\n JOptionPane.showMessageDialog(this, msg);\n }", "private void attemptLogin() {\r\n if (mAuthTask != null) {\r\n return;\r\n }\r\n\r\n\r\n // Store values at the time of the login attempt.\r\n String email = mEmailView.getText().toString();\r\n String password = mPasswordView.getText().toString();\r\n\r\n boolean cancel = false;\r\n View focusView = null;\r\n\r\n // Check for a valid password, if the user entered one.\r\n\r\n // Check for a valid email address.\r\n if (TextUtils.isEmpty(email)) {\r\n mEmailView.setError(getString(R.string.error_field_required));\r\n focusView = mEmailView;\r\n cancel = true;\r\n } else if (!isEmailValid(email)) {\r\n mEmailView.setError(getString(R.string.error_invalid_email));\r\n focusView = mEmailView;\r\n cancel = true;\r\n }\r\n mAuthTask = new UserLoginTask(email, password);\r\n try {\r\n Boolean logStatus = mAuthTask.execute(\"http://shubhamgoswami.me/login\").get();\r\n if(logStatus){\r\n SQLiteDatabase db = openOrCreateDatabase(\"adharShila\",MODE_PRIVATE, null);\r\n db.execSQL(\"UPDATE LOGSTATUS SET USERNAME=\\\"\"+mEmailView.getText()+\"\\\", STATUS=1 WHERE ENTRY=1\");\r\n db.close();\r\n Intent i = new Intent(getApplicationContext(), MainActivity.class);\r\n i.putExtra(\"username\", mEmailView.getText());\r\n i.putExtra(\"password\", password);\r\n startActivity(i);\r\n }\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n } catch (ExecutionException e) {\r\n e.printStackTrace();\r\n }\r\n }", "private void attemptLogin() {\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_email_is_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!mPresenter.isEmailValid(email)) {\n //mEmailView.setError(getString(R.string.error_invalid_email));\n customConfirmDialog(getString(R.string.message_incorrect_email), getString(R.string.message_require_format_email));\n focusView = mEmailView;\n cancel = true;\n }else if (!TextUtils.isEmpty(password) && !mPresenter.isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n //customConfirmDialog(getString(R.string.message_incorrect_password), getString(R.string.message_please_insert_valid_password));\n focusView = mPasswordView;\n cancel = true;\n }else if(TextUtils.isEmpty(password))\n {\n customConfirmDialog(getString(R.string.message_incorrect_password), getString(R.string.message_please_insert_valid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n if (isNetworkOffline()) {\n return;\n }\n showLoadingDialog(getString(R.string.message_please_wait));\n mPresenter.doLoginByEmail(email, password);\n }\n }", "@Override\n\tpublic boolean onTaskFailed(Appstart arg0, Exception arg1) {\n\t\tnew AlertDialog.Builder(getContext())\n\t\t.setIcon(getContext().getResources().getDrawable(R.drawable.login_error_icon))\n\t\t.setTitle(\"Sorry\").setMessage(arg1.getMessage()+\"!\")\n\t\t\t.setPositiveButton(\"OK\", new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.dismiss();\n\t\t\t\tgetContext().openActivity(PrepLogin.class); //AppManager.getInstance().AppExit(getContext());//System.exit(0);\n\t\t\t}\n\t\t})\n\t\t.create().show();\n\t\treturn true;\n\t}", "private void userSignIn() {\n GoogleSignInAccount account = GoogleSignIn.getLastSignedInAccount(this);\n if (GoogleSignIn.hasPermissions(account, new Scope(SCOPES))) {\n updateUI(account);\n mAccount = account.getAccount();\n Intent intent = new Intent(this, HomeActivity.class);\n intent.putExtra(ACCOUNT, mAccount);\n startActivity(intent);\n System.out.println(\"Exit Intent !!!!!!!!!!!!!!!!\");\n\n findViewById(R.id.disconnect_button).setVisibility(View.VISIBLE);\n\n } else {\n updateUI(null);\n }\n }", "@Override\n public void onFailure(int code, String msg) {\n Toast.makeText(RegisterActivity.this,\"登录失败:\"+msg,Toast.LENGTH_SHORT).show();\n }", "public void failedLogin(){\n\t\tstate = ATM_State.LOGINID;\n\t\tgui.setDisplay(\"ID does not exist. \\n\"\n\t\t\t\t+ \"Enter your account ID: \\n\");\n\t}", "@Override\n public void onClick(View view) {\n attemptLogin();\n }", "@Override\n public void onFailure(Call<org.tsofen.ourstory.model.api.User> call, Throwable t) {\n passErrorText.setVisibility(View.VISIBLE);\n passErrorText.setText(\"The password you've entered is incorrect\");\n }", "@Override\n public void onClick(View arg0) {\n Log.i(\"\", \"google button is clicked\");\n if (cd.isConnectingToInternet()) {\n\n mGoogleApiClient.connect();\n signInWithGplus();\n } else {\n String connection_alert = getResources().getString(\n R.string.alert_no_internet);\n Constant.showAlertDialog(mContext, connection_alert, false);\n }\n }", "public void verifyFalseLogin() {\n alertElement.waitForState().present(30);\n alertElement.assertContains().text(\"Please Enter a Valid User ID\");\n }", "private void attemptLogin() {\n\n final String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n if (email.isEmpty())\n if (email.equals(\"\") || password.equals(\"\")) return;\n Toast.makeText(this, \"Login in progress...\", Toast.LENGTH_SHORT).show();\n\n\n mAuth.signInWithEmailAndPassword(email, password).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n //Log.d(\"Memorization Game\", \"signInWithEmail() onComplete: \" + task.isSuccessful());\n\n if (!task.isSuccessful()) {\n //Log.d(\"Memorization Game\", \"Problem signing in: \" + task.getException());\n showErrorDialog(\"There was a problem signing in\");\n } else {\n //SharedPreferences mpreference = getSharedPreferences(\"user_email\", Context.MODE_PRIVATE);\n //mpreference.edit().putString(\"email\",email).apply();\n Intent intent = new Intent(Activity_login.this, Home.class);\n finish();\n startActivity(intent);\n }\n\n }\n });\n\n\n }", "public void clickLogin() {\n\t\tcontinueButton.click();\n\t}", "private void tryLogin() {\n AsyncTask<String, Void, Boolean> task = new AsyncTask<String, Void, Boolean>(){\n @Override\n protected Boolean doInBackground(String... ci_session) {\n boolean isValid = PwcatsRequester.isValidCiSession(ci_session[0]);\n return isValid;\n }\n @Override\n protected void onPostExecute(Boolean isValid) {\n isLogined = isValid;\n showOrHideLogInOut(isLogined);\n if (!isValid)\n authLogout();\n TextView mNavAuthLogin = (TextView) findViewById(R.id.nav_auth_login);\n TextView mNavAuthLogout = (TextView) findViewById(R.id.nav_auth_logout);\n }\n };\n String ci_session = prefs.getString(getString(R.string.ci_session), null);\n task.execute(ci_session);\n }", "public String Login_without_textfields_entered() {\n\tLoginButton.click();\n\twait.TextToBe_Wait(\"//div[text()='Invalid Email or Password']\", \"Invalid Email or Password\");\n\tString text=ErrorMessage.getText();\n\treturn text;\n\t}", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n if (!task.isSuccessful()) {\n // there was an error\n if (password.length() < 6) {\n //inputPassword.setError(getString(R.string.minimum_password));\n } else {\n Toast.makeText(MessageFeedActivity.this, \"Login failed\", Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(MessageFeedActivity.this, \"Login successful!\", Toast.LENGTH_LONG).show();\n //finish();\n }\n }", "@Override\n\tprotected void onResume()\n\t{\n\t\tsuper.onResume();\n\n\t\tint resCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getApplicationContext());\n\t\tif (resCode != ConnectionResult.SUCCESS)\n\t\t{\n\t\t\tGooglePlayServicesUtil.getErrorDialog(resCode, this, 1);\n\t\t}\n\t}", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (!task.isSuccessful()) {\n tvOopsWrongPassword.setVisibility(View.VISIBLE);\n }\n }", "public void signInExistingUser(View v) {\n attemptLogin();\n\n }", "@Override\n public void failure(TwitterException e) {\n Toast.makeText(getActivity().getApplicationContext(), \"Failed to authenticate. Please try again.\", Toast.LENGTH_SHORT).show();\n }", "public String Login_by_entering_credentials_which_do_not_exsist() {\n\temailtextbox.sendKeys(\"User\"+random.nextInt(100000)+\"@gmail.com\");\n\tpasswordtextbox.sendKeys(\"password\"+random.nextInt(100000));\n\tLoginButton.click();\n\twait.TextToBe_Wait(\"//div[text()='Invalid Email or Password']\", \"Invalid Email or Password\");\n\tString text=ErrorMessage.getText();\n\treturn text;\n\t}", "private void signInWithGoogle() {\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, ConstantValue.GOOGLE_SIGN_IN);\n }", "@Override\n public void failure(TwitterException exception) {\n Toast.makeText(MainActivity.this, \"Authentication Failed!\", Toast.LENGTH_LONG).show();\n }", "@Override\n public void displayError() {\n Toast.makeText(this, \"Incorrect username or password.\", Toast.LENGTH_LONG).show();\n password.setText(\"\");\n }", "@Override\n\tpublic void onSignInFailed() {\n\n\t}", "@Override\n public void showAuthScreen() {\n }", "public void onClickLogin(View v){\n //If the login was correct\n if (checkLogIn()) {\n // If the loggin is successfoul, save the user as a logged user into a shared preferences\n\n String username=etUser.getText().toString();\n SharedPreferences.Editor editor = sharedpreferences.edit();\n editor.putString(\"username\", username);\n editor.commit();\n\n //Create and launch a new activity\n Intent myIntent = new Intent(getApplicationContext(), EmMessage1.class);\n startActivity(myIntent);\n }\n //Wrong login\n else {\n //Change the retries text view\n tvFailLogin.setVisibility(View.VISIBLE);\n tvFailLogin.setBackgroundColor(Color.RED);\n retriesLogin--;\n tvFailLogin.setText(Integer.toString(retriesLogin));\n //If retries==0, set the login button to not enabled\n if (retriesLogin == 0) {\n bLogin.setEnabled(false);\n }\n }\n }", "private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.kkkkkkkkl[]/\\]\n\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n mAuthTask = new UserLoginTask(email, password);\n mAuthTask.execute((Void) null);\n\n // Intent signInActivityIntent= new Intent(this,UserProfileActivity.class);\n // startActivity(signInActivityIntent);\n }\n }", "@Override\n public void onFailure(Call<ApiResponse> call, Throwable t) {\n Log.d(\"warehouse:password\", t.getMessage());\n if (getActivity() != null) {\n hideLoader();\n }\n\n\n }", "void displayLoginError(Boolean display) {\n\t\ttvError.setVisibility(display ? View.VISIBLE : View.INVISIBLE);\n\t}", "public final void signInWithGoogle() {\n ActivityResult.startGoogleLogin(activity, googleApiClient);\n }", "@Override\n\t\t\t\t\t\t\tpublic void onError(Exception e) {\n\t\t\t\t\t\t\t\tToast.makeText(mActivity, \"登录失败\",\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\tPlatformJinliLoginAndPay.getInstance().isLogined = false;\n\t\t\t\t\t\t\t}", "private void attemptLogin() {\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n final String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n\n if(isOnline()){\n try {\n ApiRequests.POST(\"login/\", new Callback() {\n @Override\n public void onFailure(Call call, final IOException e) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Log.e(\"error:\", \"burda\");\n }\n });\n }\n\n @Override\n public void onResponse(Call call, final Response response) throws IOException {\n\n try {\n processTheResponse(response.body().string());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n }, email, password);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n else {\n InternetConnectionError();\n }\n }\n }", "void onOnlineLoginFail(User user);", "void showSignInInterstitial();", "@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tMessage message = new Message(); \r\n\t\t\t\t\t\tmessage.what = LoginActivity.LOGIN_FAILURE;\r\n\t\t\t\t\t\tLoginActivity.mHandler.sendMessage(message);\r\n\t\t\t\t\t}", "private void countDownToLogin() {\n\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n if (isOnline()) {\n if (sharedPreferences.getBoolean(Constant.AUTO_LOGIN, false)) {\n String userEmail = sharedPreferences.getString(Constant.USER_EMAIL, \"\");\n String userPw = sharedPreferences.getString(Constant.USER_PW, \"\");\n if (!userEmail.equals(\"\") && !userPw.equals(\"\")) {\n new LoginPresenter(SplashActivity.this).login(userEmail, userPw);\n } else {\n onLoginFail(null);\n }\n } else {\n onLoginFail(null);\n }\n } else {\n// startActivity(new Intent(context, DisconnectActivity.class));\n// finish();\n //Go to DisconnectActivity\n }\n\n }\n }, SPLASH_TIME);\n }", "private void attemptLogin() {\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !validateUtil.isPasswordValid(password)) {\n mPasswordView.setError(getString(net.iquesoft.android.seedprojectchat.R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(net.iquesoft.android.seedprojectchat.R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!validateUtil.isEmailValid(email)) {\n mEmailView.setError(getString(net.iquesoft.android.seedprojectchat.R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n presenter.onLoginButtonClicked(mEmailView.getText().toString(), mPasswordView.getText().toString(), rememberPassword.isChecked(), (LoginActivity) getActivity(), updateCurentUser);\n }\n }", "private void attemptLogin() {\n\n // Reset errors.\n trylogin = false;\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(\"Invalid Password\");\n focusView = mPasswordView;\n cancel = true;\n }\n\n if(email.equals(null) || password.equals(null)) {\n mPasswordView.setError(\"Invalid Password\");\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(\"Please enter something\");\n focusView = mEmailView;\n cancel = true;\n }\n\n else if (TextUtils.isEmpty(password)) {\n mPasswordView.setError(\"Please enter something\");\n focusView = mPasswordView;\n cancel = true;\n }\n\n else if (!isEmailValid(email)) {\n mEmailView.setError(\"Invalid Email\");\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n\n dialog.setMessage(\"Registering user...\");\n dialog.show();\n\n firebaseAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(MainActivity.this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n dialog.hide();\n if(task.isSuccessful()) {\n //trylogin = true;\n Toast.makeText(MainActivity.this, \"Login Successful!\", Toast.LENGTH_SHORT).show();\n Intent i = new Intent(MainActivity.this, FoodActivity.class);\n startActivity(i);\n }\n else {\n Toast.makeText(MainActivity.this, \"Login Failed!\", Toast.LENGTH_SHORT).show();\n\n }\n }\n });\n }\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 }", "@Override\n public void loginBtnClk(View view) {\n isRegisteredOnGCM(1);\n }", "private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n mUsrView.setError(null);\n mPasswordView.setError(null);\n\n String usr = mUsrView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n Tuple<String, String> creds = /*getCredentials()*/ SERVER_CREDENTIALS;\n\n boolean cancel = false;\n View focusView = null;\n\n if (!TextUtils.isEmpty(password)) {\n if (!mPasswordView.getText().toString().equals(creds.y)) {\n if (Util.D) Log.i(\"attemptLogin\", \"pwd was \" + mPasswordView.getText().toString());\n mPasswordView.setError(getString(R.string.error_incorrect_creds));\n cancel = true;\n }\n focusView = mPasswordView;\n }\n\n if (TextUtils.isEmpty(usr)) {\n mUsrView.setError(getString(R.string.error_field_required));\n focusView = mUsrView;\n cancel = true;\n } else if (!usr.equals(creds.x)) {\n mUsrView.setError(getString(R.string.error_incorrect_creds));\n focusView = mUsrView;\n cancel = true;\n }\n\n if (cancel) {\n focusView.requestFocus();\n } else {\n if (prefs != null)\n prefs.edit().putBoolean(getString(R.string.settingAuthorized), true);\n showProgress(true);\n mAuthTask = new UserLoginTask(usr, password);\n mAuthTask.execute((Void) null);\n }\n }", "private void authFailed() {\n Toast.makeText(LoginActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n }", "public void loginAsAdmin() {\n mAuth.signInWithEmailAndPassword(\"admin@gmail.com\", \"password\")\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (! task.isSuccessful()) {\n alert(\"Firebase\", \"ERROR: Invalid username or password!\");\n return;\n }\n\n authenticationDone = true;\n if (splashTimeoutFinished) {\n Intent intent = new Intent(getApplicationContext(), MainActivity.class);\n startActivity(intent);\n }\n }\n });\n }", "public void emailCollisionError(){\n String[] options = {\"Proceed with Login\",\"Stay Here\"};\n AlertDialog.Builder builder = new AlertDialog.Builder(LoginActivity.this)\n .setTitle(\"You are a registered user, try logging in!\")\n .setItems(options, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n if(which == 0){\n\n startActivity(new Intent(LoginActivity.this, RegisteredUserLogin.class));\n LoginActivity.this.finish();\n\n }\n }\n });\n builder.show();\n\n }", "private void attemptLogin() {\n if (mAuth == null) {\n return;\n }\n showIndicator();\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n mEmailView.requestFocus();\n hideIndicator();\n return;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n mEmailView.requestFocus();\n hideIndicator();\n return;\n }\n\n // Check for nonempty password\n if (TextUtils.isEmpty(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n mPasswordView.requestFocus();\n hideIndicator();\n return;\n }\n\n // TODO is it a good idea to move this to function? will it show in memory?????\n mAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n hideIndicator();\n Intent intent = new Intent(LoginActivity.this, ItemListActivity.class);\n startActivity(intent);\n } else {\n hideIndicator();\n // show error\n Toast.makeText(LoginActivity.this, task.getException().getMessage(), Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "private void startGoogleGamesSignIn () {\n\t\tfinal GPPSignIn s = GPPSignIn.sharedInstance();\n\t\tGPGManager m = GPGManager.sharedInstance();\n\n\t\tgamesAuthBlock = new GPGReAuthenticationBlock() {\n\t\t\t@Override\n\t\t\tpublic void invoke (boolean requiresKeychainWipe, NSError error) {\n\t\t\t\t// If you hit this, auth has failed and you need to authenticate.\n\t\t\t\t// Most likely you can refresh behind the scenes\n\t\t\t\tif (requiresKeychainWipe) {\n\t\t\t\t\ts.signOut();\n\t\t\t\t}\n\t\t\t\ts.authenticate();\n\t\t\t}\n\t\t};\n\n\t\t// pass the GPPSignIn to the GPGManager.\n\t\tm.signIn(s, gamesAuthBlock);\n\t}", "@Override\n public void onLoginGoogle(Activity activity, final ILoginModelListener modelListener) {\n if (NetworkUtils.isNetworkAvailable(activity)){\n GoogleSignInClient mGoogleSignInClient;\n GoogleApiClient googleApiClient;\n GoogleSignInOptions googleSignInOptions= GoogleSignInOptionUtils.getGoogleSignInOptions(activity);\n\n mGoogleSignInClient = GoogleSignIn.getClient(activity,googleSignInOptions);\n\n googleApiClient = new GoogleApiClient.Builder(activity)\n .enableAutoManage((FragmentActivity) activity, new GoogleApiClient.OnConnectionFailedListener() {\n @Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n modelListener.onLoginFailed(\"No Internet\");\n }\n\n })\n\n .build();\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(googleApiClient);\n activity.startActivityForResult(signInIntent, LoginActivity.REQUEST_CODE_GOOGLE);\n\n } else {\n modelListener.onLoginFailed(\"No Internet! Please check your connect\");\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n progressBar.setVisibility(View.GONE);\n if (!task.isSuccessful()) {\n // there was an error\n if (password.length() < 6) {\n inputPassword.setError(getString(R.string.minimum_password));\n } else {\n Toast.makeText(LoginActivity.this, getString(R.string.auth_failed), Toast.LENGTH_LONG).show();\n }\n } else {\n Intent intent = new Intent(LoginActivity.this, MainActivity.class);\n startActivity(intent);\n finish();\n }\n }", "private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mPasswordView.setError(null);\n usernameView.setError(null);\n\n // Store values at the time of the login attempt.\n String username = usernameView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n/*\nTODO: Move this to register area to see if email is a valid email address\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n */\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n //showProgress(true);\n HashMap<String, String> map = new HashMap<>();\n map.put(\"username\", username);\n map.put(\"pass\", password);\n mAuthTask = new httpUrlConn(map, \"http://hive.sewanee.edu/evansdb0/android1/scripts/hotPartyLogin.php\");\n\n mAuthTask.execute();\n\n try {\n if(mAuthTask.get().contains(\"true\")) {\n String r = mAuthTask.get().replace(\"true // \",\"\");\n Log.i(\"response\", r.toString());\n Toast.makeText(getApplicationContext(),r,Toast.LENGTH_SHORT).show();\n Intent i = new Intent(this, chooseEvent.class);\n i.putExtra(\"username\", username);\n startActivity(i);\n\n }\n else {\n String[] resp = response.split(\",\");\n // for(String i: resp)\n //Toast.makeText(getApplicationContext(),i,Toast.LENGTH_SHORT).show();\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (ExecutionException e) {\n e.printStackTrace();\n }\n\n if (mAuthTask == null || mAuthTask.getStatus().equals(AsyncTask.Status.FINISHED)) {\n mAuthTask = null;\n }\n }\n }", "private void googleSignIn() {\n\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }", "@Override\n\t\t\t\t\tpublic void onFail() {\n\t\t\t\t\t\tToast.makeText(RegisterActivity.this, \"Username already exists!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}", "@Override\n public void handleAuthTokenException(final Exception e) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (e instanceof GooglePlayServicesAvailabilityException) {\n // The Google Play services APK is old, disabled, or not present.\n // Show a dialog created by Google Play services that allows\n // the user to update the APK\n int statusCode = ((GooglePlayServicesAvailabilityException) e)\n .getConnectionStatusCode();\n /*Dialog dialog = GooglePlayServicesUtil.getErrorDialog(statusCode,\n HelloActivity.this,\n REQUEST_CODE_RECOVER_FROM_PLAY_SERVICES_ERROR);\n dialog.show(); */\n Toast.makeText(LoginActivity.this, \"Play services error.\", Toast.LENGTH_LONG).show();\n Log.d(this.getClass().getSimpleName(), \"Play services error: \" + statusCode);\n } else if (e instanceof UserRecoverableAuthException) {\n // Unable to authenticate, such as when the user has not yet granted\n // the app access to the account, but the user can fix this.\n // Forward the user to an activity in Google Play services.\n Intent intent = ((UserRecoverableAuthException) e).getIntent();\n startActivityForResult(intent, REQUEST_CODE_RECOVER_FROM_PLAY_SERVICES_ERROR);\n }\n }\n });\n }", "private void showRequestLoginForm() {\n final LayoutInflater li = LayoutInflater.from(FinishGameActivity.this);\n final View loginView = li.inflate(R.layout.popup_login_confirm, null);\n final AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(FinishGameActivity.this);\n final ImageView loginBtn = (ImageView) loginView.findViewById(R.id.login_confirm_button);\n mUsernameView = (EditText) loginView.findViewById(R.id.login_confirm_username);\n mPasswordView = (EditText) loginView.findViewById(R.id.login_confirm_password);\n final AlertDialog loginAlertDialog = alertDialogBuilder.create();\n loginAlertDialog.setView(loginView);\n loginBtn.setOnTouchListener(motionButtonListener);\n loginBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n v.postOnAnimation(new Runnable() {\n @Override\n public void run() {\n if (GeneralHelper.hasConnection()) {\n attemptLogin(loginAlertDialog);\n } else {\n final AlertDialog alertDialog = new AlertDialog.Builder(FinishGameActivity.this, AlertDialog.THEME_HOLO_DARK).create();\n // Setting Dialog Title\n alertDialog.setTitle(\"ASEAN Game\");\n alertDialog.setMessage(\"No Internet connection!\");\n alertDialog.setButton(DialogInterface.BUTTON_NEGATIVE, \"Close\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // Invokes inserting bundled data into the database.\n alertDialog.cancel();\n }\n });\n alertDialog.show();\n }\n }\n });\n }\n });\n loginAlertDialog.show();\n }", "@Override\n public void onFailure(Auth0Exception error) {\n showNextActivity();\n }", "private void googleSignIn() {\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, SIGN_IN);\n }", "private void signInResultHandler(GoogleSignInResult result) {\n if (result.isSuccess()) {\n acct = result.getSignInAccount();\n m_tvStatus.setText(R.string.status_signedin);\n try {\n m_tvDispName.setText(acct.getDisplayName());\n m_tvEmail.setText(acct.getEmail());\n }\n catch (NullPointerException e) {\n Log.d(TAG, \"Error retrieving some account information\");\n Toast.makeText(MainActivity.this, \"Oops! Please double check your account info.\", Toast.LENGTH_SHORT).show();\n }\n\n checkAGWALoginStatus(acct);\n Account_Email = acct.getEmail();\n\n }\n else {\n Status status = result.getStatus();\n int statusCode = status.getStatusCode();\n\n // Constant Value: 12501 (API)\n if (statusCode == GoogleSignInStatusCodes.SIGN_IN_CANCELLED) {\n m_tvStatus.setText(R.string.status_signincancelled);\n }\n\n // Constant Value: 12500 (API)\n else if (statusCode == GoogleSignInStatusCodes.SIGN_IN_FAILED) {\n m_tvStatus.setText(R.string.status_signinfail);\n }\n else {\n m_tvStatus.setText(R.string.status_nullresult);\n }\n }\n }", "public void attemptLogin() {\n\n\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n mEmail = mEmailView.getText().toString();\n mPassword = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password.\n if (TextUtils.isEmpty(mPassword)) {\n mPasswordView.setError(getString(R.string.error_field_required));\n focusView = mPasswordView;\n cancel = true;\n } else if (mPassword.length() < 4) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(mEmail)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!mEmail.contains(\"@\")) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n mLoginStatusMessageView.setText(R.string.login_progress_signing_in);\n showProgress(true);\n mAuthTask = new UserLoginTask();\n mAuthTask.execute((Void) null);\n }\n }", "private void checkLogin() {\n SharedPref sp = new SharedPref(this);\n if (!sp.readLoginStatus()) {\n Intent i = new Intent(this, LoginActivity.class);\n i.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);\n startActivity(i);\n }\n }", "@Override\n public void failure(TwitterException exception) {\n Toast.makeText(getApplicationContext(), \"Fail Logged.....ٍ\", Toast.LENGTH_LONG).show();\n\n }", "private void signInFeature() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestEmail()\n .build();\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .enableAutoManage(this, this)\n .addApi(Auth.GOOGLE_SIGN_IN_API, gso)\n .build();\n\n Button signInButton = (Button) findViewById(R.id.login_button);\n signInButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n signIn();\n }\n });\n }", "private void onSignUpFailed()\n\t{\n\t\tToast.makeText(SignupPersonalActivity.this, \"Signup failed.\",\n\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t_signupButton.setEnabled(true);\n\t}", "private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(password)) {\n mPasswordView.setError(getString(R.string.error_field_required));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n mAuthTask = new UserLoginTask(email.replace(\" \", \"%20\"), password.replace(\" \", \"%20\"));\n mAuthTask.execute((Void) null);\n }\n }", "private boolean checkPlayServices()\n {\n\tint resultCode=-5000;\n\ttry {\n\t\tresultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n\t} catch (Exception e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\tif (resultCode != ConnectionResult.SUCCESS)\n\t{\n\t if (GooglePlayServicesUtil.isUserRecoverableError(resultCode))\n\t {\n\t \tLog.i(Globals.TAG, \"dialog gorunecek\");\n\t \tGooglePlayServicesUtil.getErrorDialog(resultCode, this, PLAY_SERVICES_RESOLUTION_REQUEST).show();\n\t \tLog.i(Globals.TAG, \"dialog kapandi\");\n\t }\n\t else\n\t {\n\t\t\tLog.i(Globals.TAG, \"This device is not supported.\");\n\t\t\tint RQS_GooglePlayServices = 1;\n\t\t\t GooglePlayServicesUtil.getErrorDialog(resultCode, this, RQS_GooglePlayServices);\n\t\t\tfinish();\n\t }\n\t return false;\n\t}\n\treturn true;\n }", "public void showPasswordPrompt();", "@Override\r\n\tpublic boolean checkLogin() {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean checkLogin() {\n\t\treturn false;\r\n\t}", "private void attemptLogin(){\n //reset error\n et_email.setError(null);\n et_password.setError(null);\n\n // Store values at the time of the login attempt.\n final String email = et_email.getText().toString();\n final String password = et_password.getText().toString();\n final boolean finish = false;\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n et_password.setError(getString(R.string.error_invalid_password));\n focusView = et_password;\n cancel = true;\n }else if (!isEmailValid(email)) {\n et_email.setError(getString(R.string.error_invalid_email));\n focusView = et_email;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n JSONObject json = new JSONObject();\n\n try {\n json.put(\"ctrl\", \"login\");\n json.put(\"email\", email);\n json.put(\"password\", password);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n String requete = json.toString();\n Log.v(\"req\", requete);\n HttpQuery login = new HttpQuery(requete, this);\n login.execute();\n }\n\n\n }", "public void toggleLoginError() {\n TextView loginErrorTextView = findViewById(R.id.login_error);\n if (loginErrorTextView.getText().toString().equals(\"\")) {\n loginErrorTextView.setText(R.string.incorrectUsernamePassword);\n }\n }", "private void attemptLogin() {\n\n String username = mEmailView.getText().toString().trim();\n String idNumber = mIdNumber.getText().toString().trim();\n String password = mPasswordView.getText().toString().trim();\n\n if (TextUtils.isEmpty(username)) {\n// usernameView.setError(errorMessageUsernameRequired);\n// errorView = usernameView;\n }\n\n if (TextUtils.isEmpty(password)) {\n// password.setError(errorMessagePasswordRequired);\n// if (errorView == null) {\n// errorView = passwordView;\n// }\n }\n\n final User user = new User();\n ((DealerManager)getApplication()).setUser(user);\n navigateTo(R.id.nav_home);\n }", "@OnClick(R.id.login_login_btn)\r\n protected void login(View view) {\n String username = StringsOperations.getTextFromEditText(mUsername);\r\n if (!GenericDialogs.isFieldValidAndShowValidMessage(username, R.string.validate_email, mContext)) {\r\n return;\r\n }\r\n\r\n String password = StringsOperations.getTextFromEditText(mPassword);\r\n if (!GenericDialogs.isFieldValidAndShowValidMessage(password, R.string.validate_password, mContext)) {\r\n return;\r\n }\r\n\r\n LoginDto loginDto = new LoginDto(username, password);\r\n mCustomProgressBar.showHideProgressBar(true, getString(R.string.loading_login));\r\n mLoginService.loginWithEmail(new ResponseCallBackHandler() {\r\n @Override\r\n public void returnResponse(ResponseHandler responseHandler) {\r\n mCustomProgressBar.showHideProgressBar(false, null);\r\n if (responseHandler.isExecuted()) {\r\n mUserSession.login((User) responseHandler.getValue());\r\n ChangeActivityHelper.changeActivityClearStack((Activity) mContext, HomeActivity.class, true);\r\n return;\r\n }\r\n\r\n // Not verified\r\n if (getString(R.string.email_not_verified).equalsIgnoreCase(responseHandler.getMessage())) {\r\n GenericDialogs.getGenericConfirmDialog(mContext, \"\", getString(R.string.login_service_failed),\r\n \"Verify Email\", GenericDialogs.OK, false, new GenericConfirmationDialogBoxCallback() {\r\n @Override\r\n public void PositiveMethod(DialogInterface dialog, int id) {\r\n Uri uri = Uri.parse(\"https://mysnsi.scubasnsi.com/verify-email\"); // missing 'http://' will cause crashed\r\n Intent intent = new Intent(Intent.ACTION_VIEW, uri);\r\n startActivity(intent);\r\n dialog.dismiss();\r\n\r\n }\r\n\r\n @Override\r\n public void NegativeMethod(DialogInterface dialog, int id) {\r\n dialog.dismiss();\r\n }\r\n });\r\n } else {\r\n //Wrong username password\r\n GenericDialogs.showInformativeDialog(responseHandler.getMessage(), mContext);\r\n }\r\n\r\n }\r\n }, loginDto);\r\n\r\n }", "public void onSignUpFailed() {\n Toast.makeText(this, getString(R.string.account_creation_failed), Toast.LENGTH_LONG).show();\n mSignUpButton.setEnabled(true);\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(LogInActivity.this, \"Unable to send the email\"+e.getMessage(), Toast.LENGTH_SHORT).show();\n }", "public void attemptLogin() {\r\n\t\tif (mAuthTask != null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Reset errors.\r\n\t\tthis.activity.getmEmailView().setError(null);\r\n\t\tthis.activity.getmPasswordView().setError(null);\r\n\r\n\t\t// Store values at the time of the login attempt.\r\n\t\tmEmail = this.activity.getmEmailView().getText().toString();\r\n\t\tmPassword = this.activity.getmPasswordView().getText().toString();\r\n\r\n\t\tboolean cancel = false;\r\n\t\tView focusView = null;\r\n\r\n\t\t// Check for a valid password.\r\n\t\tif (TextUtils.isEmpty(mPassword)) {\r\n\t\t\tthis.activity.getmPasswordView().setError(this.activity.getString(R.string.error_field_required));\r\n\t\t\tfocusView = this.activity.getmPasswordView();\r\n\t\t\tcancel = true;\r\n\t\t} else if (mPassword.length() < 4) {\r\n\t\t\tthis.activity.getmPasswordView().setError(this.activity.getString(R.string.error_invalid_password));\r\n\t\t\tfocusView = this.activity.getmPasswordView();\r\n\t\t\tcancel = true;\r\n\t\t}\r\n\r\n\t\t// Check for a valid email address.\r\n\t\tif (TextUtils.isEmpty(mEmail)) {\r\n\t\t\tthis.activity.getmEmailView().setError(this.activity.getString(R.string.error_field_required));\r\n\t\t\tfocusView = this.activity.getmEmailView();\r\n\t\t\tcancel = true;\r\n\t\t} else if (!mEmail.contains(\"@\")) {\r\n\t\t\tthis.activity.getmEmailView().setError(this.activity.getString(R.string.error_invalid_email));\r\n\t\t\tfocusView = this.activity.getmEmailView();\r\n\t\t\tcancel = true;\r\n\t\t}\r\n\r\n\t\tif (cancel) {\r\n\t\t\t// There was an error; don't attempt login and focus the first\r\n\t\t\t// form field with an error.\r\n\t\t\tfocusView.requestFocus();\r\n\t\t} else {\r\n\t\t\t// Show a progress spinner, and kick off a background task to\r\n\t\t\t// perform the user login attempt.\r\n\t\t\tthis.activity.getmLoginStatusMessageView().setText(R.string.login_progress_signing_in);\r\n\t\t\tthis.activity.showProgress(true);\r\n\t\t\tmAuthTask = new UserLoginTask();\r\n\t\t\tmAuthTask.execute((Void) null);\r\n\t\t}\r\n\t}", "public void continueWithGoogle(View view) {\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, 99);\n }", "@OnClick(R.id.btnLogin)\n public void doLogin(View view) {\n email.setError(null);\n password.setError(null);\n\n if(email.getText().length() == 0){\n email.setError(getString(R.string.you_must_provide_your_email));\n return;\n }\n\n if(password.getText().length() == 0){\n password.setError(getString(R.string.you_must_provide_your_password));\n return;\n }\n\n // check if user && password match\n User user = User.login(email.getText().toString(), password.getText().toString());\n if(user == null){\n Toast.makeText(this, R.string.user_and_password_do_not_match, Toast.LENGTH_LONG).show();\n return;\n }\n\n // create session and start main\n startMain(user);\n }", "private void attemptLogin() {\n // Reset errors.\n mEmailView.setError(null);\n\n // Store values at the time of the login attempt.\n final String email = mEmailView.getText().toString();\n \n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to perform the user login attempt.\n showProgress(true);\n\n // Register user to server.\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"userId\", email);\n params.put(\"gcmToken\", UserManager.getUserGcmToken(this));\n new HttpClientAsyncTask(Constants.APP_SERVER_USER_CREATE_URL, HttpClientCallable.POST, params) {\n @Override\n protected void onPostExecute(String response) {\n showProgress(false);\n\n try {\n if (response != null) {\n JSONObject responseObj = new JSONObject(response);\n Log.d(Constants.TAG, \"User login server response: \" + responseObj);\n String errorMsg = responseObj.getString(\"error\");\n if (errorMsg.isEmpty()) {\n UserManager.setUserLoggedIn(LoginActivity.this, true);\n UserManager.setUserId(LoginActivity.this, email);\n Log.d(Constants.TAG, \"Successfully logged in. Directing to MainActivity.\");\n startActivity(new Intent(LoginActivity.this, MainActivity.class));\n finish();\n } else {\n Toast.makeText(LoginActivity.this, \"Email registration was rejected.\", Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(LoginActivity.this, \"Server response was unexpected.\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n Log.e(Constants.TAG, e.getMessage());\n Toast.makeText(LoginActivity.this, \"Error while communicating with server.\", Toast.LENGTH_LONG).show();\n }\n }\n }.execute();\n }\n }", "public void onLoginClick()\n {\n user.setEmail(email.getValue());\n user.setPassword(password.getValue());\n\n if(!user.isValidEmail())\n {\n Toast.makeText(context, \"Invalid Email\", Toast.LENGTH_SHORT).show();\n }\n\n else if(!user.isValidPassword())\n {\n Toast.makeText(context, \"Password Should be Minimum 6 Characters\", Toast.LENGTH_SHORT).show();\n }\n\n else if(user.isValidCredential())\n {\n getBusy().setValue(View.VISIBLE);\n\n doLogin(user.getEmail(),user.getPassword());\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run()\n {\n getBusy().setValue(View.GONE);\n\n // Toast.makeText(context, \"Login Successful\", Toast.LENGTH_SHORT).show();\n /* Intent intent = new Intent(context, NewsActivity.class);\n intent.putExtra(\"USER_OBJ\", user);\n context.startActivity(intent);\n */\n\n\n }\n }, 500);\n }\n\n else\n {\n Toast.makeText(context, \"Invalid Credentials\", Toast.LENGTH_SHORT).show();\n }\n }", "private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n\n // Sets up a new login task with the provide login form\n mAuthTask = new UserLoginTask(email, password);\n try {\n // Executes login task\n mAuthTask.execute();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }" ]
[ "0.6576499", "0.6448913", "0.63233775", "0.6263588", "0.6206105", "0.61829334", "0.6136233", "0.608633", "0.6079334", "0.60729134", "0.60696626", "0.6064483", "0.60624814", "0.6043552", "0.6039163", "0.6034352", "0.601184", "0.59833634", "0.59723717", "0.59703004", "0.5925328", "0.58984774", "0.58919555", "0.58899", "0.58884865", "0.58871883", "0.5881214", "0.58806646", "0.58782136", "0.58765906", "0.58725625", "0.5868425", "0.58489716", "0.5844609", "0.5844257", "0.58435374", "0.58417094", "0.5824042", "0.5815663", "0.57832295", "0.577523", "0.57719296", "0.57692736", "0.576698", "0.5755455", "0.575097", "0.57490677", "0.57485545", "0.574209", "0.5740017", "0.5736515", "0.57354885", "0.57334", "0.5732395", "0.57318276", "0.5728903", "0.5727163", "0.57255566", "0.5707212", "0.5706365", "0.5705404", "0.5698197", "0.5689341", "0.56764084", "0.56734216", "0.56720513", "0.56711394", "0.5668941", "0.5659381", "0.56561166", "0.5650591", "0.56433666", "0.5641103", "0.56381893", "0.5632487", "0.56322694", "0.5629766", "0.5621867", "0.5621354", "0.5614188", "0.5610325", "0.5609041", "0.5605741", "0.56032324", "0.5598621", "0.5597844", "0.559452", "0.559452", "0.55933577", "0.55932146", "0.55886513", "0.55881953", "0.5587403", "0.5585512", "0.5583414", "0.55811083", "0.55806166", "0.55729413", "0.55719554", "0.5568272" ]
0.61785793
6
String JDBC_DRIVER = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
@Before public void before() { _repository = Create(); if (_repository != null) { _repository.beginTransaction(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Connection getConnection() {\r\n try {\r\n Class.forName(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\");\r\n String url = \"jdbc:sqlserver://localhost:1433;databaseName=NMCNPM;user=sa;password=12345\";\r\n// Class.forName(resourceBundle.getString(\"driverName\"));\r\n// String url = resourceBundle.getString(\"url\");\r\n Connection connection = DriverManager.getConnection(url);\r\n return connection;\r\n } catch (SQLException | ClassNotFoundException e) {\r\n return null;\r\n }\r\n }", "public static Connection getConnection() throws SQLException {\n Connection c = DriverManager.getConnection(\"jdbc:sqlserver://localhost:1433;Database=finaldb;integratedSecurity=true;\");\n return c;\n }", "String getJdbcDriverClassName();", "public Connection xcon(){\n Connection cn =null;\n try{\n Class.forName(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\");\n cn = DriverManager.getConnection(\"jdbc:sqlserver://10.60.41.30:1433;databaseName=Northwind;\",\"idat\",\"123456\");\n if(cn!=null){\n JOptionPane.showMessageDialog(null, \"Estás conectado\");\n }\n }catch(Exception error){\n JOptionPane.showMessageDialog(null, error);\n }\n \n return cn;\n }", "public static Connection connect() {\n\n\t\t// Create a variable for the connection string.\n\t\tString connectionUrl = \"jdbc:sqlserver://localhost:1433;\"\n\t\t\t\t+ \"databaseName=SwaziBankIntranet2016;user=intranetUser;password=12345678=I\";\n\n\t\t// Declare the JDBC objects.\n\n\t\ttry {\n\t\t\t// Establish the connection.\n\t\t\tClass.forName(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\");\n\t\t\tcon = (Connection) DriverManager.getConnection(connectionUrl);\n\t\t}\n\t\t// Handle any errors that may have occurred.\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn con;\n\t}", "private void connect() {\n try {\n Class.forName(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\");\n cnt = DriverManager.getConnection(hosting, user, pass);\n } catch (Exception e) {\n e.printStackTrace();\n JOptionPane.showMessageDialog(this, \"lỗi kết nối\");\n }\n }", "public static Connection createConnection() throws SQLException {\n\t\t// DriverManager.setLogStream( System.out );\n\t\ttry {\n\t\t\tClass.forName(\"smallsql.jdbc.SSDriver\");\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn DriverManager.getConnection(JDBC_URL + \"?create=true;locale=en\");\n\t}", "public String getJdbcDriver() {\n if(isJakartaNamespace()) {\n return \"jakarta.persistence.jdbc.driver\";\n }\n return \"javax.persistence.jdbc.driver\";\n }", "public DBConn(){\n\t\t//Create a variable for the connection string.\n\t\tthis.connectionUrl = \"jdbc:sqlserver://localhost:1433;\" +\n\t\t \"databaseName=CSE132B; username=sa; password=cse132b\";\t\t//Daniel: integratedSecurity=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Kalvin: username=sa; password=cse132b\n\n\t\t// Declare the JDBC objects.\n\t\tthis.conn = null;\n\t\tthis.stmt = null;\n\t\tthis.rs = null;\n\t}", "public String getDriver() {\n return jdbcDriver;\n }", "public static void openCon() throws ClassNotFoundException, SQLException {\r\n\t\tClass.forName(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\");\r\n\r\n\t\tconn = DriverManager.getConnection(AGlobalComponents.dbConString);\r\n\t\tif (conn != null) {\r\n\t\t\tSystem.out.println(\"Successfully: Connected to Database\");\r\n\t\t} else\r\n\t\t\tSystem.out.println(\"Connection returned null!\");\r\n\t}", "public DataBaseConnector()\n {\n dataSource = new SQLServerDataSource();\n dataSource.setServerName(\"EASV-DB2\");\n dataSource.setPortNumber(1433);\n dataSource.setDatabaseName(\"AutistMovies\");\n dataSource.setUser(\"CS2017A_15\");\n dataSource.setPassword(\"Bjoernhart1234\");\n }", "public Connection getConnection() {\n {\n Connection connection = null;\n String hostName = \"learntogether.database.windows.net\"; // update me\n String dbName = \"LearnTogether\"; // update me\n String user = \"ysanson\"; // update me\n String password = \"LearnTogether1\"; // update me\n String url = String.format(\"jdbc:sqlserver://%s:1433;database=%s;user=%s;password=%s;encrypt=true;\"\n + \"hostNameInCertificate=*.database.windows.net;loginTimeout=30;\", hostName, dbName, user, password);\n try {\n connection = DriverManager.getConnection(url);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return connection;\n }\n }", "public interface JdbcDrivers {\r\n\r\n\tpublic static final String DERBY_EMBEDDED = \"org.apache.derby.jdbc.EmbeddedDriver\";\r\n\tpublic static final String MYSQL = \"com.mysql.jdbc.Driver\";\r\n}", "public void setDriverDobj(JdbcDriver driver)\n {\n _driver = driver;\n }", "public String getJdbcDriver()\n {\n return getDriverDobj() == null ? \"\" : getDriverDobj().getDriver();\n }", "public void setDriver(String driver) throws BuildException {\n jdbcDriver = driver;\n }", "public Connection getConnection() throws ClassNotFoundException, SQLException\n\t{\n\t /* Class.forName(\"org.postgresql.Driver\");*/\n\t\tcon=dataSource.getConnection();\n\t\treturn con;\t\n\t}", "private SQLConnector() throws IOException, SQLException {\n\t\tProperties props = readProperties();\n\t\tString drivers = props.getProperty(\"jdbc.drivers\");\n\t\tif (drivers != null) System.setProperty(\"jdbc.drivers\", drivers);\n\t\tString url = props.getProperty(\"jdbc.url\");\n\t\tString username = props.getProperty(\"jdbc.username\");\n\t\tString password = props.getProperty(\"jdbc.password\");\n\n\t\tconnection = DriverManager.getConnection( url, username, password);\n\t}", "private static void getConnection() throws ClassNotFoundException, SQLException {\n\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\tconnection = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/yuechu\", \"root\", \"1\");\n\t}", "private static Connection connect() throws SQLException {\n\t\tConnection con = null;\r\n\t\ttry {\r\n\t\t\t \r\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\r\n\t\t\tcon = DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:xe\", \"system\", \"1234\");\r\n\t\t\treturn con;\r\n\t\t\r\n\t\t\t \r\n\t\t }\r\n\t catch (ClassNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\nreturn con;\r\n}", "private static void loadDriver() {\n\t\ttry {\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void setJDBCDriver(Driver jdbcDriver)\n throws SQLException\n {\n DriverConfig driver;\n \n if (_driverList.size() > 0)\n driver = _driverList.get(0);\n else\n driver = createDriver();\n \n driver.setDriver(jdbcDriver);\n }", "public java.sql.Driver getDriver() throws SQLException\n\t{\n\t\tif (s_driver == null)\n\t\t{\n\t\t\ts_driver = new org.postgresql.Driver();\n\t\t\tDriverManager.registerDriver (s_driver);\n\t\t\tDriverManager.setLoginTimeout (Database.CONNECTION_TIMEOUT);\n\t\t}\n\t\treturn s_driver;\n\t}", "void getConnectiondb() throws SQLException, ClassNotFoundException{\n // TODO code application logic here\n \n String user = \"root\";\n String pass = \"test\";\n\n myConn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/aud_jdbms\", user, pass);\n \n\n \n }", "private static Connection connect(String url) throws SQLException {\n\ttry {\r\n\t\tDatabaseUtil.loadDatabaseDriver(url);\r\n\t} catch (ClassNotFoundException e) {\r\n\t\tlog.error(\"Could not find JDBC driver class.\", e);\r\n\t\tthrow (SQLException) e.fillInStackTrace();\r\n\t}\r\n\r\n\t// Step 2: Establish the connection to the database.\r\n\tString username = Context.getRuntimeProperties().getProperty(\r\n\t\"connection.username\");\r\n\tString password = Context.getRuntimeProperties().getProperty(\r\n\t\"connection.password\");\r\n\tlog.debug(\"connecting to DATABASE: \" + OpenmrsConstants.DATABASE_NAME\r\n\t\t\t+ \" USERNAME: \" + username + \" URL: \" + url);\r\n\treturn DriverManager.getConnection(url, username, password);\r\n}", "@Override\n\tpublic void connect() throws SQLException {\n if (jdbcConnection == null || jdbcConnection.isClosed()) {\n try {\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\n } catch (ClassNotFoundException e) {\n throw new SQLException(e);\n }\n jdbcConnection = DriverManager.getConnection(\n jdbcURL, jdbcUsername, jdbcPassword);\n }\t\t \n\t\t\n\t}", "public static Connection loadDriver() throws SQLException {\r\n try {\r\n Class.forName(Driver);\r\n } catch (ClassNotFoundException ex) {\r\n System.out.println(ex.getMessage());\r\n }\r\n con = DriverManager.getConnection(ConnectionString, user, pwd);\r\n return con;\r\n }", "public Connection getConnection() throws SQLException, ClassNotFoundException{\n\t\t\t Class.forName(\"com.mysql.jdbc.Driver\");\n\t\t\t System.out.println(\"MySQL JDBC Driver Registered\");\n\t\t\t return connection = DriverManager.getConnection(\"jdbc:mysql://www.papademas.net:3306/510labs?\", \"db510\",\"510\");\n\t}", "public static Connection getConnection() throws SQLException {\n\t\tString url = ConnectionCredentials.link;\n\t\tString user = ConnectionCredentials.username;\n\t\tString pass = ConnectionCredentials.password;\n\t\t\n\t\t/*Class.forName(\"org.postgresql.Driver\");\n\t\t//Two lines of recommended code\n\t\tDriver PostgresDriver = new Driver();\n\t\tDriverManager.registerDriver(PostgresDriver);*/\n\t\t\n\t\treturn DriverManager.getConnection(url, user, pass);\n\t}", "public interface JDBCConnectionInfo {\n\tstatic final String CONNECTIONINFO = \"jdbc:mysql://sql9.freemysqlhosting.net:3306/sql9378764?useSSL=false\";\n\tstatic final String LOGIN = \"sql9378764\";\n\tstatic final String PASSWORD = \"rrXgstV3nB\";\n\n\tstatic final String MOVIETABLE = \"MOVIE\";\n\tstatic final String REGISTEREDUSERTABLE = \"REGISTEREDUSER\";\n\tstatic final String SHOWTIMETABLE = \"SHOWTIME\";\n\tstatic final String TICKETTABLE = \"TICKET\";\n\tstatic final String VOUCHERTABLE = \"VOUCHER\";\n\tstatic final String THEATRETABLE = \"THEATRE\";\n}", "@Override\n public void initializeConnection() throws SQLException, ClassNotFoundException {\n \n Class.forName(\"com.mysql.jdbc.Driver\");\n //setConnection(DriverManager.getConnection(\"jdbc:mysql://localhost/rabidusDB\",\"root\",\"password\"));\n setConnection(DriverManager.getConnection( host + \":3306/\" + databaseName, user, password));\n \n }", "public static Connection getConnection() throws ClassNotFoundException, SQLException {\r\n\t\tString username=\"root\";\r\n\t\tString password=\"123\";\r\n\t\tClass.forName(\"com.mysql.cj.jdbc.Driver\");\r\n\t\tConnection connection = DriverManager.getConnection(\"jdbc:mysql://localhost:3308/bkdb?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC\", username, password);\r\n\t\treturn connection;\r\n\t}", "public static Connection fetchDBConnection() throws ClassNotFoundException,SQLException\n\t{\n\t//load type IV MySql supplies JDBC driver class, under method area(meta space)\n\t\tClass.forName(\"com.mysql.cj.jdbc.Driver\");\n\t\t//get the fix connection to DB\n\t\tString url=\"jdbc:mysql://localhost:3306/acts?useSSl=false\";\n\t\treturn DriverManager.getConnection(url, \"root\", \"manoj1997\");\n\t}", "public static Connection initializeDatabase()\n throws SQLException, ClassNotFoundException\n {\n \t\n \tString dbDriver = \"com.mysql.cj.jdbc.Driver\";\n String dbURL = \"jdbc:mysql://localhost:3306/\";\n // Database name, database user and password to access\n String dbName = \"jaltantra_db\";\n String dbUsername = \"root\";\n String dbPassword = \"jaldb@2050\";\n \n Class.forName(dbDriver);\n Connection conn = DriverManager.getConnection(dbURL + dbName ,dbUsername, dbPassword);\n return conn;\n }", "public static synchronized Connection getConnection() throws SQLException {\r\n if (driver == null) {\r\n try {\r\n Class jdbcDriverClass = Class.forName(DRIVER);\r\n driver = (Driver) jdbcDriverClass.newInstance();\r\n DriverManager.registerDriver(driver);\r\n } catch (Exception e) {\r\n System.out.println(\"Fallo en cargar el driver jdbc\");\r\n }\r\n }\r\n return DriverManager.getConnection(URL, USUARIO, PASS);\r\n }", "public static Connection getConnection() {\n Connection con = null;\n try {\n Class.forName(\"org.hsqldb.jdbcDriver\");\n con = DriverManager.getConnection(\n \"jdbc:hsqldb:mem:avdosdb\", \"sa\", \"\");\n } catch(Exception e) {\n e.printStackTrace();\n }\n return con;\n }", "public static void dbConnect() throws SQLException, ClassNotFoundException {\n try {\n Class.forName(JDBC_DRIVER);\n } catch (ClassNotFoundException e) {\n System.out.println(\"Where is your MySQL JDBC Driver?\");\n e.printStackTrace();\n throw e;\n }\n\n try {\n conn = DriverManager.getConnection(url, userName, password);\n } catch (SQLException e) {\n System.out.println(\"Connection Failed! Check output console\" + e);\n e.printStackTrace();\n throw e;\n }\n }", "public void setDriverClassName(String driverClassName) {\n this.driverClassName = driverClassName;\n }", "protected Connection getConnectionDrive() throws SQLException {\n\t\treturn DriverManager.getConnection(settings.sqlConnectionString, settings.userName, settings.password);\n\t}", "Connection getConnection(String database, String schema, String jdbcURL, String jdbcURLParameters, String user, String password, boolean createDB, boolean createSchema, boolean dropDBIfExist) throws Exception;", "private Connection getConnection() throws SQLException {\n return DriverManager.getConnection(\"jdbc:hsqldb:file:\" + this.path + \";shutdown=true\", \"SA\", \"\");\n }", "Connection getConnection() throws SQLException;", "Connection getConnection() throws SQLException;", "private Connection openConnection() throws SQLException, ClassNotFoundException {\n DriverManager.registerDriver(new oracle.jdbc.OracleDriver());\n\n String host = \"localhost\";\n String port = \"1521\";\n String dbName = \"xe\"; //\"coen280\";\n String userName = \"temp\";\n String password = \"temp\";\n\n // Construct the JDBC URL \n String dbURL = \"jdbc:oracle:thin:@\" + host + \":\" + port + \":\" + dbName;\n return DriverManager.getConnection(dbURL, userName, password);\n }", "public Connection getConnection() throws ClassNotFoundException, SQLException {\n logger.info(\"Create DB connection\");\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\n return DriverManager.getConnection(\n \"jdbc:mysql://localhost:3306/prod\",\"root\",\"rootroot\");\n }", "public static Connection getConnection() throws SQLException, ClassNotFoundException{\n \tClass.forName(\"com.mysql.jdbc.Driver\");\n return DriverManager.getConnection(databaseUrl, databaseUsername, databasePassword);\n }", "public static Connection createConnection() throws SQLException, ClassNotFoundException, NamingException {\n\n DriverManager.registerDriver (new oracle.jdbc.OracleDriver());\n //Class.forName(\"oracle.jdbc.driver.OracleDriver\");\n return DriverManager.getConnection(URL,USER_LOGIN,USER_PASS);\n\n }", "public DbConnection() throws SQLException, ClassNotFoundException {\r\n\t\tClass.forName (DRIVER);\r\n\t\tconn = DriverManager.getConnection(CONNECTION, \"JavaDev\", \"password\");\r\n\t\tstmt = conn.createStatement();\r\n\t}", "public MyDriver() throws SQLException {\n }", "private static void connectDatabase(){\n\t\t// register the driver\n\t\ttry{\n\t\t\tClass.forName(DRIVER).newInstance();\n\t\t\tconnection = DriverManager.getConnection(CONNECTION_URL);\n\t\t} catch (IllegalAccessException | InstantiationException | ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "private static Connection getConnection() throws SQLException, IOException {\n Properties properties = new Properties();\n properties.setProperty(\"user\", \"root\");\n properties.setProperty(\"password\", \"bulgariavarna\");\n\n return DriverManager.getConnection(CONNECTION_STRING + \"minions_db\", properties);\n }", "public static String getDatabaseDriverName() throws SQLException {\n Connection connection = APIMgtDBUtil.getConnection();\n String databaseType;\n\n if (connection.getMetaData().getDriverName().contains(\"MySQL\")) {\n databaseType = \"MYSQL\";\n } else if (connection.getMetaData().getDriverName().contains(\"MS SQL\") || connection.getMetaData().getDriverName().contains(\"Microsoft\")) {\n databaseType = \"MSSQL\";\n } else if (connection.getMetaData().getDriverName().contains(\"H2\")) {\n databaseType = \"H2\";\n } else if (connection.getMetaData().getDriverName().contains(\"PostgreSQL\")) {\n databaseType = \"POSTGRESQL\";\n } else {\n databaseType = \"ORACLE\";\n }\n return databaseType;\n }", "public static Connection getConnection() {\n Connection conn = null;\n try {\n Class.forName(\"org.hsqldb.jdbcDriver\");\n //conn = DriverManager.getConnection(\"jdbc:hsqldb:hsql://localhost/bancodb\", \"sa\", \"\");\n conn = DriverManager.getConnection(\"jdbc:hsqldb:hsql://localhost/paciente2db\", \"sa\", \"\");\n } catch (SQLException e) {\n System.out.println(\"Problemas ao conectar no banco de dados\");\n } catch (ClassNotFoundException e) {\n System.out.println(\"O driver não foi configurado corretamente\");\n }\n\n return conn;\n }", "public static Connection getInstance (){\n\tString url =\"jdbc:informix-sqli://192.168.10.18:4526/teun0020:informixserver=aix2;DB_LOCALE=zh_tw.utf8;CLIENT_LOCALE=zh_tw.utf8;GL_USEGLU=1\";\r\n\tString username = \"srismapp\";\r\n\tString password =\"ris31123\";\r\n\tString driver = \"com.informix.jdbc.IfxDriver\";\t\r\n\tConnection conn=null;\r\n\ttry {\r\n\t Class.forName(driver);\r\n\t conn = DriverManager.getConnection(url, username, password);\r\n\t} catch (SQLException e) {\r\n\t e.printStackTrace();\r\n\t} catch (ClassNotFoundException e) {\r\n\t e.printStackTrace();\r\n\t}\r\n\treturn conn;\r\n }", "public StudentDAO() throws SQLException {\n studentConn = DriverManager.getConnection(jdbcURL, jdbcUsername, jdbcPassword);\n }", "private String createMSSqlConnString(String[] paramArray)\n\t\t\tthrows AFTException {\n\n\t\tLOGGER.debug(\"User passed MsSql DB type\");\n\n\t\tString connString = null;\n\n\t\tString[] connPropertyNames = new String[] { \"host\", \"port\", \"database\",\n\t\t\t\t\"uid\", \"pwd\" };\n\n\t\tString paramList = Arrays.asList(paramArray).toString();\n\n\t\t// if user has not provide name of a database on sql server\n\t\tif (!paramList.toLowerCase().contains(\"database\")) {\n\t\t\terrorMessage = \"Parameters does not include database name. \"\n\t\t\t\t\t+ \"Please refer to wiki FAQ on how to create connection string for MS Sql database\";\n\t\t\tLOGGER.error(errorMessage);\n\t\t\tthrow new AFTException(errorMessage);\n\t\t}\n\n\t\tMap<String, String> connPropertyValues = new HashMap<String, String>();\n\n\t\tconnPropertyValues = extractPropertyValues(paramArray,\n\t\t\t\tconnPropertyNames);\n\n\t\tconnString = \"jdbc:sqlserver://\";\n\n\t\tif (connPropertyValues.containsKey(\"host\")) {\n\t\t\tconnString = connString + connPropertyValues.get(\"host\");\n\t\t} else {\n\t\t\tconnString = connString + \"localhost\";\n\t\t}\n\n\t\tif (connPropertyValues.containsKey(\"port\")) {\n\t\t\tconnString = connString + \":\" + connPropertyValues.get(\"port\")\n\t\t\t\t\t+ \";\";\n\t\t} else {\n\t\t\tconnString = connString + \";\";\n\t\t}\n\n\t\tif (connPropertyValues.containsKey(\"database\")) {\n\t\t\tconnString = connString + \"database=\"\n\t\t\t\t\t+ connPropertyValues.get(\"database\") + \";\";\n\t\t}\n\n\t\tif (connPropertyValues.containsKey(\"uid\")) {\n\n\t\t\tconnString = connString + \"user=\" + connPropertyValues.get(\"uid\")\n\t\t\t\t\t+ \";\";\n\t\t\tconnUidPwdProp.setProperty(\"user\", connPropertyValues.get(\"uid\"));\n\n\t\t\tconnString = connString + \"password=\"\n\t\t\t\t\t+ connPropertyValues.get(\"pwd\");\n\t\t\tconnUidPwdProp.setProperty(\"pwd\", connPropertyValues.get(\"pwd\"));\n\n\t\t}\n\n\t\tconnPropertyValues.clear();\n\n\t\treturn connString;\n\t}", "public interface SqlServerIntegrationTest {\n}", "private static void connect() {\n\t\ttry {\n\t\t\tif (connection == null) {\n\t\t\t\tClass.forName(\"org.mariadb.jdbc.Driver\");\n\t\t\t\tconnection = DriverManager.getConnection(url, user, password);\n\t\t\t\tconnection.setAutoCommit(false);\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\n\t\t}\n\t}", "public void connectToDB(){\n\ttry {\n\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\tconnection=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/patient\",\"root\",\"7417899737\");\n\t} catch (ClassNotFoundException e) {\n\t\t\n\t\te.printStackTrace();\n\t} catch (SQLException e) {\n\t\t\n\t\te.printStackTrace();\n\t}\n\t\n}", "private static void setConnection(){\n try{\n Class.forName(\"com.mysql.jdbc.Driver\");\n con = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/novel_rental\",\"root\",\"\");\n } catch (Exception e) {\n Logger.getLogger(NovelRepository.class.getName()).log(Level.SEVERE, null, e);\n System.out.println(e.getMessage());\n }\n }", "private static Connection getConnection() throws SQLException {\n return DriverManager.getConnection(\n Config.getProperty(Config.DB_URL),\n Config.getProperty(Config.DB_LOGIN),\n Config.getProperty(Config.DB_PASSWORD)\n );\n }", "public Connection connect(){\n try{\n Class.forName(\"com.mysql.jdbc.Driver\");\n System.out.println(\"Berhasil koneksi ke JDBC Driver MySQL\");\n }catch(ClassNotFoundException ex){\n System.out.println(\"Tidak Berhasil Koneksi ke JDBC Driver MySQL\");\n }\n //koneksi ke data base\n try{\n String url=\"jdbc:mysql://localhost:3306/enginemounting\";\n koneksi=DriverManager.getConnection(url,\"root\",\"\");\n System.out.println(\"Berhasil koneksi ke Database\");\n }catch(SQLException e){\n System.out.println(\"Tidak Berhasil Koneksi ke Database\");\n }\n return koneksi;\n}", "public Login() throws SQLException, ClassNotFoundException {\n DriverManager.registerDriver(new com.mysql.jdbc.Driver());\n Class.forName(\"com.mysql.jdbc.Driver\");\n conn = DriverManager.getConnection(\"jdbc:mysql://localhost/adminDB\", \"root\", \"\");\n }", "public apilfixer() {\n\n try {\n System.out.print(\"Connection to Informix Driver \\n\");\n Class.forName(\"com.informix.jdbc.IfxDriver\");\n // Class.forName(\"sun.jdbc.odbc.JdbcOdbcDriver\");\n ConnectionURL = DriverManager.getConnection(INFORMX_URL, INFORMX_USERID,INFORMX_USERPASS);\n } catch (Exception e) {\n System.err.println( \"Unable to locate class \\n\" );\n e.printStackTrace();\n System.exit(1);\n }\n\n\n}", "public Connection getConexion() throws IOException {\n Connection cn = null;\n // Properties prop = new Properties();\n //prop.load(Propiedades.class.getResourceAsStream(\"configuracion.properties\"));\n\n String TextObt = \"\" , sUsuario = \"\" , sPass = \"\" , sStringConect = \"\" , sDB = \"\" , sServer=\"\" ; \n Properties propiedades = new Properties();\n InputStream entrada = null;\n Path currentRelativePath = Paths.get(\"\");\n String pathF = currentRelativePath.toAbsolutePath().toString();\n \n try {\n entrada = new FileInputStream(pathF+ File.separator +\"webapps\"+File.separator+\"LysWsRest\"+ File.separator+\"propiedades\"+File.separator+\"configuracion.properties\");\n propiedades.load(entrada);\n sDB= propiedades.getProperty(\"database\");\n sServer = propiedades.getProperty(\"server\");\n sUsuario = propiedades.getProperty(\"usuario\");\n sPass = propiedades.getProperty(\"password\");\n \n url =\"jdbc:sqlserver://\"+sServer+\";databaseName=\"+sDB; // cambiar\n // url=\"jdbc:sqlserver://ibserver_29;databaseName=pprodmant\";\n \n } catch (FileNotFoundException ex) {\n Logger.getLogger(SOAPLYS.class.getName()).log(Level.SEVERE, null, ex);\n TextObt = ex.getMessage();\n } catch (IOException ex) {\n Logger.getLogger(SOAPLYS.class.getName()).log(Level.SEVERE, null, ex);\n TextObt = ex.getMessage();\n }\n \n\n try {\n Class.forName(driver).newInstance();\n cn = DriverManager.getConnection(url,sUsuario,sPass); // cambiar\n //cn = DriverManager.getConnection(url,\"desarrollador2\",\"@desit39\");\n //System.out.println(\"test\");\n } catch (SQLException e) {\n System.out.println(e.toString());\n cn = null;\n } catch (Exception e) {\n System.out.println(e.toString());\n cn = null;\n }\n\n return cn;\n }", "private void connectToDB() {\n try {\n Class.forName(\"org.postgresql.Driver\");\n this.conn = DriverManager.getConnection(prs.getProperty(\"url\"),\n prs.getProperty(\"user\"), prs.getProperty(\"password\"));\n } catch (SQLException e1) {\n e1.printStackTrace();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n }", "public static Connection getConnection() throws SQLException {\n\t\t// Create a connection reference var\n\t\tConnection con = null;\n\n\t\t// Int. driver obj from our dependency, connect w/ JDBC\n\t\tDriver postgresDriver = new Driver();\n\t\tDriverManager.registerDriver(postgresDriver);\n\n\t\t// Get database location/credentials from environmental variables\n\t\tString url = System.getenv(\"db_url\");\n\t\tString username = System.getenv(\"db_username\");\n\t\tString password = System.getenv(\"db_password\");\n\t\t\n\t\t// Connect to db and assign to con var.\n\t\tcon = DriverManager.getConnection(url, username, password);\n\n\t\t// Return con, allowing calling class/method etc to use the connection\n\t\treturn con;\n\t}", "private static Connection connect(){\n Connection conn = null;\n try{\n Class.forName(\"org.sqlite.JDBC\");\n conn = DriverManager.getConnection(\"jdbc:sqlite:devices.db\");\n } catch (ClassNotFoundException | SQLException e){\n System.out.println(e.toString());\n }\n return conn;\n }", "public static void main(String[] args) throws SQLException {\n String username = \"root\";\n String password = \"\";\n Connection connection = null;\n \n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tconnection=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/sqdl\",\"root\",\"\");\n System.out.println(\"Opened database successfully\");\n \n } catch (ClassNotFoundException e) {\n System.out.println(\"ERROR: Unable to load SQLServer JDBC Driver\");\n e.printStackTrace();\n return;\n }\n \n try {\n connection = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/sqdl\", username, password);\n } catch (SQLException e) {\n System.out.println(\"ERROR: Unable to establish a connection with the database!\");\n e.printStackTrace();\n return;\n }\n \n try {\n if (connection != null) {\n DatabaseMetaData metadata = connection.getMetaData();\n System.out.println(\"nList of Tables Available for 'dbo'...n\");\n System.out.format(\"%-15s %-10s %-20s %-10sn\", \"DATABASE\", \"SCHEMA\", \"TABLE NAME\", \"TYPE\");\n System.out.format(\"%-15s %-10s %-20s %-10sn\", \"-------------\", \"--------\", \"----------------\", \"-----\");\n ResultSet rs = metadata.getTables(\"sqdl\", \"aa\", \"%\", null);\n while (rs.next()) {\n System.out.format(\"%-15s %-10s %-20s %-10sn\", rs.getString(1), rs.getString(2), \n rs.getString(3), rs.getString(4));\n }\n \n } else {\n System.out.println(\"ERROR: Unable to make a database connection!\");\n }\n \n \n } catch (SQLException e) {\n e.printStackTrace();\n return;\n } finally {\n if (connection != null) connection.close();\n }\n }", "private static void dbConnect() {\r\n\t\tif (conn == null)\r\n\t\t\ttry {\r\n\t\t\t\tconn = DriverManager.getConnection(\"jdbc:mysql://localhost/sims?user=root&password=12345&useSSL=true\");\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t}", "private static void loadDriver() {\n\t\ttry {\n\t\t\tClass.forName(\"org.postgresql.Driver\").newInstance();\n\t\t} catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {\n\t\t\tSystem.err.println(\"Canít load driver. Verify CLASSPATH\");\n\t\t\tSystem.err.println(e.getMessage());\n\t\t}\n\n\t}", "public static Connection getConnection()\n throws SQLException, IOException\n { \n Properties props = new Properties();\n FileInputStream in = new FileInputStream(\"database.properties\");\n props.load(in);\n in.close();\n\n String drivers = props.getProperty(\"jdbc.drivers\");\n if (drivers != null) System.setProperty(\"jdbc.drivers\", drivers);\n String url = props.getProperty(\"jdbc.url\");\n String username = props.getProperty(\"jdbc.username\");\n String password = props.getProperty(\"jdbc.password\");\n\n return DriverManager.getConnection(url, username, password);\n }", "public void conexaoL() {\n try {\n System.setProperty(\"jdbc.Drivers\", driver);\n con = DriverManager.getConnection(caminho, usuario, senha);\n //JOptionPane.showMessageDialog(null, \"Conectou\");\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Falha ao se conectar com banco de Dados:\\n\" + ex);\n new ArquivoLog(\"...Erros 1\"+ex);\n }\n }", "public Connection getSQLConnection() throws SQLException {\n WorkReportSQLApplication app = adaptersAPI.getJaxRsApplication(WorkReportSQLApplication.class);\n return app.dataSource.getConnection();\n }", "private void baueVerbindung() throws SQLException, ClassNotFoundException\n\t{\n\t\tClass.forName(\"com.mysql.cj.jdbc.Driver\");\n\t\tconnec = DriverManager.getConnection(url+datenbank,user,password);\n\t}", "public static void createConnection() {\n\n try{\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\n connection = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/mydb\", \"tobymac208\", \"Sparta_!3712\");\n // Database how now been successfully connected.\n System.err.println(\"Database was successfully connected.\");\n }catch (ClassNotFoundException e) {\n System.err.println(\"Class not found.\");\n }catch (SQLException e) {\n System.err.println(\"SQL exception thrown.\");\n }\n }", "private Database() throws SQLException, ClassNotFoundException {\r\n Class.forName(\"org.postgresql.Driver\");\r\n con = DriverManager.getConnection(\"jdbc:postgresql://localhost:5432/postgres\", \"postgres\", \"kuka\");\r\n }", "private Connection getConnection() throws SQLException{\n return DriverManager.getConnection(\"jdbc:h2:file:./target/db/testdb;MODE=MYSQL\", \"anonymous\", \"\");\n }", "private JDBCConnection() {\n System.out.println(\"Created JDBC Connection Object\");\n \n try {\n // Connect to JDBC data base\n connection = DriverManager.getConnection(DATABASE_URL, DATABASE_USERNAME, DATABASE_PASSWORD);\n } catch (SQLException e) {\n // If there is an error, lets just print the error\n System.err.println(e.getMessage());\n }\n }", "private Connection connect() throws SQLException {\n\t\treturn DriverManager.getConnection(\"jdbc:sqlite:database/scddata.db\");\n\t}", "private void loadDriver() \n\t{\n\t\ttry \n\t\t{\n\t\t\t Class.forName(\"org.postgresql.Driver\");\n\t\t} \n\t\tcatch(ClassNotFoundException cnfe) \n\t\t{\n\t\t\tDBErrorHandler.handle(\"DriverLoad\");\n\t\t}\n\t}", "private static Connection connectToDB() {\n\t\t\tConnection con = null;\n\t\t\ttry {\n\t\t\t\t// Carichiamo un driver di tipo 1 (bridge jdbc-odbc).\n\t\t\t\t//String driver = \"sun.jdbc.odbc.JdbcOdbcDriver\";\n\t\t\t\tClass.forName(DRIVER);\n\t\t\t\t// Creiamo la stringa di connessione.\n\t\t\t\t// Otteniamo una connessione con username e password.\n\t\t\t\tcon = DriverManager.getConnection (URL, USER, PSW);\n\t\t\t\t\n\t\t\t\t\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn con;\n\t\t}", "public static java.sql.Statement getConnectionStatement ( ) throws InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException {\n\t\t/** Definition of mysql instance for JDBC **/\n\t\t// TODO: Remove Class.forName(\"com.mysql.cj.jdbc.Driver\").getDeclaredConstructor().newInstance();\n\t\t \n\t\t/** Database connection String **/\n\t\tConnection conn = DriverManager.getConnection ( \n\t\t\t\t \"jdbc:mysql://\" \n\t\t\t\t\t\t + settings.Config.DB_CONNECTION_SERVER + \"/\" \n\t\t\t\t\t\t + settings.Config.DB_CONNECTION_DBNAME \n\t\t\t\t\t\t + \"?useSSL=false\" \n\t\t\t\t\t\t + \"&user=\" + settings.Config.DB_CONNECTION_DBUSERNAME \n\t\t\t\t\t\t + \"&password=\" + settings.Config.DB_CONNECTION_DBPASSWORD \n\t\t\t\t\t\t );\n\t\t\n\t\treturn conn.createStatement ( );\n\t}", "@SuppressWarnings(\"unchecked\")\npublic final void initDatabase()throws SQLException {\n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n con =(Connection) DriverManager.getConnection(\"jdbc:mysql://localhost:3306/yajnab?zeroDateTimeBehavior=convertToNull\",\"root\",\"11\"); \n } \n catch (ClassNotFoundException | SQLException e) {\n }\n }", "public static Connection getConnectionToDB() {\n\t\tProperties properties = getProperties();\n\n\t\ttry {\n\t\t\tmyConnection = DriverManager.getConnection(JDBC_URL, properties);\n\t\t\treturn myConnection;\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "public static void initConnection() throws SQLException, InstantiationException, IllegalAccessException, ClassNotFoundException{\r\n\t\t//create database connection only once\r\n\t\tif(dbCon == null){\t\r\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\r\n\t\t\tdbCon = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/wip?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC\",\"root\",\"\");\r\n\t\t}\r\n\t}", "private void loadDatabaseDrivers () throws ClassNotFoundException\n\t{\n\t\tClass.forName(\"nl.cwi.monetdb.jdbc.MonetDriver\");\n\t\tClass.forName(\"net.sourceforge.jtds.jdbc.Driver\");\n\t\tClass.forName(\"org.postgresql.Driver\");\n\t}", "@SuppressWarnings(\"finally\")\n\tprivate static Connection openConnection() throws SQLException\n\t{\n\t\tConnection conn = null;\n\t\ttry\n\t\t{\n\t\t\tString url = Constants.getDatabaseConnectionURL();\n\t\t\tString username = Constants.getDatabaseUserName();\n\t\t\tString password = Constants.getDatabasePassword();\t\n\t\t\tClass.forName(k_driver);\n\t\t\t\t\n\t\t\tconn = DriverManager.getConnection(url, username, password);\n\t\t\t\n\t\t\tcurrSession = conn;\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tSystem.out.println(\"Class Loader Exception!\");\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\treturn conn;\n\t\t}\n\t}", "public static Statement getConnection(){\n\t\tConnection jdbc = null;\n\t\tStatement stmt = null;\n\t\ttry {\n\t Class.forName(\"org.postgresql.Driver\");\n\t jdbc = DriverManager\n\t .getConnection(\"jdbc:postgresql://localhost:5432/MA\",\n\t \"postgres\", \"\");\n\t stmt = jdbc.createStatement();\n\t\t}\n\t catch ( Exception e ) {\n\t System.err.println( e.getClass().getName()+\": \"+ e.getMessage() );\n\t System.exit(0);\n\t }\n\t\t\n\t\treturn stmt;\n\t}", "public static void setUpConnection()\n\t{\n\t\ttry{\n\t\t\t//The information necessary to create a connection to the database, need to figure out what this will be\n\t\n\t\t\n\t\t\t// Register driver by finding the class that corresponds do it \n\t\t\tString driverName = \"oracle.jdbc.OracleDriver\"; \n\t\t\tClass.forName(driverName);\n\t\t\n\t\t\tconn = DriverManager.getConnection(URL, USR, PWD);\n\t\t\n\t\t\tSystem.out.println(\"Connected to C325.\");\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public String getJdbcUrl()\n {\n return m_jdbcUrl;\n }", "protected void openConnection() throws SQLException {\n connection = DriverManager.getConnection(\"jdbc:mysql://stusql.dcs.shef.ac.uk/team021\", \"team021\", \"5f4306d9\");\n }", "public void test() throws SQLException{\n /*try {\n Class.forName(\"org.sqlite.JDBC\");\n //DriverManager.registerDriver(new org.sqlite.JDBC());\n\n String dbURL=\"JDBC:sqlite://data/data/com.example.boris.myandroidapp/databases/myapp\";\n Connection conn=DriverManager.getConnection(dbURL);\n if(conn!=null){\n System.out.println(\"Connected to the database\");\n DatabaseMetaData dm=(DatabaseMetaData)conn.getMetaData();\n System.out.println(\"Driver name: \"+dm.getDriverName());\n System.out.println(\"Driver version: \"+dm.getDriverVersion());\n System.out.println(\"Product name: \"+dm.getDatabaseProductName());\n System.out.println(\"Product version: \"+dm.getDatabaseProductVersion());\n conn.close();\n }\n }\n catch (ClassNotFoundException e) {\n e.printStackTrace();}\n catch(SQLException ex){\n ex.printStackTrace();\n }*/\n\n }", "public Connection getConnection() throws SQLServerException\n {\n return dataSource.getConnection();\n }", "public static void closeCon() throws ClassNotFoundException, SQLException {\r\n\t\tClass.forName(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\");\r\n\r\n\t\tconn = DriverManager.getConnection(AGlobalComponents.dbConString);\r\n\t\tif (conn != null) {\r\n\t\t\tconn.close();\r\n\t\t\tSystem.out.println(\"Successfully: Disconnected to Database\");\r\n\t\t} else\r\n\t\t\tSystem.out.println(\"Connection returned null!\");\r\n\t}", "public DBHandler() {\n\n driverName = \"com.mysql.jdbc.Driver\";\n url = \"jdbc:mysql://us-cdbr-azure-southcentral-e.cloudapp.net/newsstand\";\n userId = (String) \"ba7e286a39ae9e\";\n password = (String) \"d89b6d9b\";\n \n }", "public static Connection getConnection() throws SQLException, ClassNotFoundException{\n Class.forName(\"com.mysql.jdbc.Driver\");\n\n //STEP 3: Open a connection\n conn = DriverManager.getConnection(DB_URL,USER,PASS);\n \n return conn;\n }", "private void setupDB(){\n try {\n Class.forName(\"oracle.jdbc.driver.OracleDriver\");\n String url = \"jdbc:oracle:thin:@localhost:1521:orcl\";\n String username = \"sys as sysdba\"; //Provide username for your database\n String password = \"oracle\"; //provide password for your database\n\n con = DriverManager.getConnection(url, username, password);\n }\n catch(Exception e){\n System.out.println(e);\n }\n }", "public interface SQL_CONSTANTS {\n\t\tstatic final String JDBC_DRIVER = \"com.mysql.jdbc.Driver\";\n\t\tstatic final String DB_URL = \"jdbc:mysql://localhost/EMP\";\n\t\tstatic final String USER = \"username\";\n\t\tstatic final String PASSWORD = \"password\";\n\t}", "public static Connection getConnection() throws SQLException {\n\t\ttry {\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\"); //registering Oracle Driver\n\t\t}\n\t\tcatch(ClassNotFoundException ex) {\n\t\t\tex.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\tString url = System.getenv(\"DB_URL\"); // best not to hard code in your db credentials ! \n\t\tString username = System.getenv(\"DB_USERNAME\");\n\t\tString password = System.getenv(\"DB_PASSWORD\");\n\t\tif(connection == null || connection.isClosed()) {\n\t\t\tconnection = DriverManager.getConnection(url, username, password);\n\t\t\tSystem.out.println(connection.getMetaData().getDriverName());\n\t\t}\n\t\treturn connection;\n\t}" ]
[ "0.70841295", "0.6586853", "0.65623605", "0.6548804", "0.6455945", "0.6395668", "0.63835996", "0.63375103", "0.6315529", "0.630985", "0.6295745", "0.6254231", "0.62394124", "0.61435217", "0.61151326", "0.6101915", "0.60913426", "0.60295653", "0.6009903", "0.5997974", "0.5997376", "0.59919214", "0.5982619", "0.5939051", "0.5886476", "0.58537394", "0.58038574", "0.57895905", "0.5782038", "0.5777965", "0.57600594", "0.57552767", "0.57550895", "0.5750707", "0.5744589", "0.5698509", "0.5690974", "0.568883", "0.56857836", "0.56828135", "0.5675508", "0.56751007", "0.5657923", "0.5657923", "0.5652684", "0.56424534", "0.5641794", "0.56374335", "0.5632281", "0.5631876", "0.5623961", "0.5623609", "0.5617663", "0.5611281", "0.557894", "0.5576183", "0.5573929", "0.5569219", "0.55653363", "0.5544488", "0.552952", "0.55245835", "0.55147445", "0.55106777", "0.55105895", "0.55092794", "0.55048466", "0.5501583", "0.5498416", "0.5495679", "0.5489006", "0.5485664", "0.54778796", "0.54760575", "0.54750955", "0.54692346", "0.5464938", "0.54540795", "0.5452065", "0.54510427", "0.5450744", "0.54417", "0.5436898", "0.54317224", "0.54299784", "0.5429108", "0.5428303", "0.5424234", "0.5422358", "0.541457", "0.54132605", "0.5411443", "0.5409161", "0.54081786", "0.5402493", "0.53984094", "0.5397988", "0.5391945", "0.5379758", "0.53734446", "0.53701377" ]
0.0
-1
Add the directory recursively into a zip file
private static void addDirectory(ZipOutputStream zout, File fileSource, File sourceDir) { // get sub-folder/files list File[] files = fileSource.listFiles(); for (int i = 0; i < files.length; i++) { try { String name = files[i].getAbsolutePath(); name = name.substring((int) sourceDir.getAbsolutePath().length()); // if the file is directory, call the function recursively if (files[i].isDirectory()) { addDirectory(zout, files[i], sourceDir); continue; } /* * we are here means, its file and not directory, so * add it to the zip file */ // create object of FileInputStream FileInputStream fin = new FileInputStream(files[i]); zout.putNextEntry(new ZipEntry(name)); IOUtils.copy(fin, zout); zout.closeEntry(); // close the InputStream fin.close(); } catch (IOException ioe) { ioe.printStackTrace(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addDirContents( ZipOutputStream output, File dir, String prefix, boolean compress ) throws IOException {\n String[] contents = dir .list();\n for ( int i = 0; i < contents .length; ++i ) {\n String name = contents[i];\n File file = new File( dir, name );\n if ( file .isDirectory() ) {\n addDirContents( output, file, prefix + name + '/', compress );\n }\n else {\n addFile( output, file, prefix, compress );\n }\n }\n }", "public void addDir(File dirObj, ZipOutputStream out) throws IOException {\n\t\t File[] files = dirObj.listFiles();\n\t\t byte[] tmpBuf = new byte[1024];\n\t\t for (int i = 0; i < files.length; i++) {\n\t\t if (files[i].isDirectory()) {\n\t\t addDir(files[i], out);\n\t\t continue;\n\t\t }\n\t \t FileInputStream in = new FileInputStream(files[i].getAbsolutePath());\n\t\t System.out.println(\" Adding: \" + files[i].getAbsolutePath());\n\t\t out.putNextEntry(new ZipEntry(files[i].getAbsolutePath()));\n\t\t int len;\n\t\t while ((len = in.read(tmpBuf)) > 0) { out.write(tmpBuf, 0, len); }\n\t\t out.closeEntry();\n\t\t in.close();\n\t\t }\n\t\t }", "private static void recurseFiles(File file)\r\n throws IOException, FileNotFoundException\r\n {\r\n if (file.isDirectory()) {\r\n //Create an array with all of the files and subdirectories \r\n //of the current directory.\r\nString[] fileNames = file.list();\r\n if (fileNames != null) {\r\n //Recursively add each array entry to make sure that we get\r\n //subdirectories as well as normal files in the directory.\r\n for (int i=0; i<fileNames.length; i++){ \r\n \trecurseFiles(new File(file, fileNames[i]));\r\n }\r\n }\r\n }\r\n //Otherwise, a file so add it as an entry to the Zip file. \r\nelse {\r\n byte[] buf = new byte[1024];\r\n int len;\r\n //Create a new Zip entry with the file's name. \r\n\r\n\r\nZipEntry zipEntry = new ZipEntry(file.toString());\r\n //Create a buffered input stream out of the file \r\n\r\n\r\n//we're trying to add into the Zip archive. \r\n\r\n\r\nFileInputStream fin = new FileInputStream(file);\r\n BufferedInputStream in = new BufferedInputStream(fin);\r\n zos.putNextEntry(zipEntry);\r\n //Read bytes from the file and write into the Zip archive. \r\n\r\n\r\nwhile ((len = in.read(buf)) >= 0) {\r\n zos.write(buf, 0, len);\r\n }\r\n //Close the input stream. \r\n\r\n\r\n in.close();\r\n //Close this entry in the Zip stream. \r\n\r\n\r\n zos.closeEntry();\r\n }\r\n }", "private void addToZip(File directoryToZip, File file, ZipOutputStream zos) throws IOException {\r\n final int BUFFER_SIZE = 1024;\r\n FileInputStream fis = new FileInputStream(file);\r\n // we want the zipEntry's path to be a relative path that is relative\r\n // to the directory being zipped, so chop off the rest of the path\r\n String zipFilePath = file.getCanonicalPath().substring(\r\n (directoryToZip.getCanonicalPath().length() - directoryToZip.getName().length()),\r\n file.getCanonicalPath().length());\r\n ZipEntry zipEntry = new ZipEntry(zipFilePath);\r\n zos.putNextEntry(zipEntry);\r\n byte[] bytes = new byte[BUFFER_SIZE];\r\n int length;\r\n while ((length = fis.read(bytes)) >= 0) {\r\n zos.write(bytes, 0, length);\r\n }\r\n zos.closeEntry();\r\n fis.close();\r\n }", "public static void makeZip(String fileName)\r\n throws IOException, FileNotFoundException\r\n {\r\n File file = new File(fileName);\r\n zos = new ZipOutputStream(new FileOutputStream(file + \".zip\"));\r\n //Call recursion.\r\n\r\n\r\nrecurseFiles(file);\r\n //We are done adding entries to the zip archive,\r\n\r\n\r\n//so close the Zip output stream.\r\n\r\n\r\nzos.close();\r\n }", "protected static void zipDir(File zipDir, ZipOutputStream zos, String archiveSourceDir)\n throws IOException {\n String[] dirList = zipDir.list();\n byte[] readBuffer = new byte[40960];\n int bytesIn;\n //loop through dirList, and zip the files\n if (dirList != null) {\n for (String aDirList : dirList) {\n File f = new File(zipDir, aDirList);\n //place the zip entry in the ZipOutputStream object\n zos.putNextEntry(new ZipEntry(getZipEntryPath(f, archiveSourceDir)));\n if (f.isDirectory()) {\n //if the File object is a directory, call this\n //function again to add its content recursively\n zipDir(f, zos, archiveSourceDir);\n //loop again\n continue;\n }\n //if we reached here, the File object f was not a directory\n //create a FileInputStream on top of f\n try (FileInputStream fis = new FileInputStream(f)) {\n //now write the content of the file to the ZipOutputStream\n while ((bytesIn = fis.read(readBuffer)) != -1) {\n zos.write(readBuffer, 0, bytesIn);\n }\n }\n }\n }\n }", "public AddFileToZip recursive() {\n\t\t\tthis.recursive = true;\n\t\t\treturn this;\n\t\t}", "private static void zipFolder(ZipOutputStream out, File folder) throws IOException {\n\n final int BUFFER = 2048;\n\n File[] fileList = folder.listFiles();\n BufferedInputStream origin;\n\n for (File file : fileList) {\n if (file.isDirectory()) {\n zipFolder(out, file);\n } else {\n byte data[] = new byte[BUFFER];\n\n String unmodifiedFilePath = file.getPath();\n FileInputStream fi = new FileInputStream(unmodifiedFilePath);\n\n origin = new BufferedInputStream(fi, BUFFER);\n ZipEntry entry = new ZipEntry(file.getName());\n\n out.putNextEntry(entry);\n\n int count;\n while ((count = origin.read(data, 0, BUFFER)) != -1) {\n out.write(data, 0, count);\n }\n\n out.closeEntry();\n origin.close();\n }\n }\n\n // Finish the zip stream and close it\n out.finish();\n out.close();\n }", "private static void createFiles(String destDirectory, ZipInputStream zipIn, ZipEntry entry, boolean recursive) throws IOException {\n\n String filePath = destDirectory + File.separator + entry.getName();\n\n if (!entry.isDirectory()) {\n\n boolean isZipFile = filePath.endsWith(\".zip\");\n boolean isJavaFile = filePath.endsWith(\".java\");\n\n if (isZipFile || isJavaFile) {\n\n writeFile(zipIn, filePath);\n\n if (recursive) {\n File file = new File(filePath);\n\n String parts[] = entry.getName().split(\"/\");\n String studentName;\n\n if (parts.length > 1) {\n studentName = parts[1].split(\"_\")[0];\n } else {\n studentName = entry.getName().split(\"_\")[0];\n }\n\n String studentDir = file.getParentFile().getAbsolutePath() + \"/\" + studentName;\n File dir = new File(studentDir);\n dir.mkdir();\n\n students.add(new Student(studentName, studentDir));\n\n unzip(filePath, studentDir, false, false);\n }\n }\n\n } else {\n File dir = new File(filePath);\n dir.mkdir();\n }\n }", "public static void addToZip(String path, ZipOutputStream myZip, File f) throws FileNotFoundException, IOException{\n\t\tif(f.isDirectory()){\n\t\t\tfor(File subF : f.listFiles()){\n\t\t\t\taddToZip(path + File.separator + f.getName() , myZip, subF);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tZipEntry e = new ZipEntry(path + File.separator + f.getName());\n\t\t\tmyZip.putNextEntry(e);\n\t\t\ttry (InputStream is = new FileInputStream(f.getAbsolutePath())) {\n\t\t\t\tIOUtils.copyLarge(is, myZip);\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n protected void addPath(File path, int depth) throws SAXException {\r\n List<ZipEntry> contents = new ArrayList<ZipEntry>();\r\n if (depth > 0) {\r\n ZipFile zipfile = null;\r\n try {\r\n zipfile = new ZipFile(path, Charset.forName(\"UTF-8\"));\r\n Enumeration<? extends ZipEntry> entries = zipfile.entries();\r\n while (entries.hasMoreElements()) contents.add((ZipEntry)entries.nextElement());\r\n } catch (ZipException e) {\r\n throw new SAXException(e);\r\n } catch (IOException e) {\r\n throw new SAXException(e);\r\n } finally {\r\n if (zipfile != null) {\r\n try {\r\n zipfile.close();\r\n } catch (IOException e) {\r\n }\r\n }\r\n } // finally\r\n } // if depth > 0\r\n startNode(DIR_NODE_NAME, path);\r\n processZipEntries(contents, \"\", depth);\r\n endNode(DIR_NODE_NAME);\r\n }", "public static void packToZip(String sourceDirPath, String zipFilePath) throws IOException {\n Path p;\n p = Files.createFile(Paths.get(zipFilePath));\n try (ZipOutputStream zs = new ZipOutputStream(Files.newOutputStream(p))) {\n Path pp = Paths.get(sourceDirPath);\n Files.walk(pp)\n .filter(path -> !Files.isDirectory(path))\n .forEach(path -> {\n if (!path.toString().endsWith(\".zip\")) {\n ZipEntry zipEntry = new ZipEntry(pp.relativize(path).toString());\n try {\n zs.putNextEntry(zipEntry);\n Files.copy(path, zs);\n zs.closeEntry();\n } catch (IOException e) {\n System.err.println(e);\n }\n }\n });\n }\n }", "public static void compressDir(String path) throws Exception {\n\t\tFile compressDir = new File(path);\n\t\t// The output compressed file\n\t\tFile outputZip = new File(compressDir.getPath() + \".zip\");\n\n\t\t// Compressed file(.zip) output file stream\n\t\tFileOutputStream zipFileOutputStream = new FileOutputStream(outputZip);\n\n\t\t// ZipOutputStream used for compressing\n\t\tZipOutputStream zipOutputStream = new ZipOutputStream(\n\t\t\t\tzipFileOutputStream);\n\n\t\t// Do compress recursively\n\t\trecursionZip(compressDir, zipOutputStream, compressDir.getParent()\n\t\t\t\t+ \"/\");\n\n\t\t// Close ZipOutputStream\n\t\tzipOutputStream.close();\n\t\t// Close FileOutputStream\n\t\tzipFileOutputStream.close();\n\t}", "private static String createZipFile(String directory, String zipFilename, List<File> filesToAdd)\n throws IOException {\n String zipFilePath = String.format(\"%s/%s\", directory, zipFilename);\n File zipFile = new File(zipFilePath);\n if (zipFile.exists()) {\n if (zipFile.delete()) {\n log.info(\"Zipfile existed and was deleted: \" + zipFilePath);\n } else {\n log.warn(\"Zipfile exists but was not deleted: \" + zipFilePath);\n }\n }\n\n // Create and add files to zip file\n addFilesToZip(zipFile, filesToAdd);\n\n return zipFilePath;\n }", "private void compress()\n\t{\n\t\ttry\n\t\t{\n\t\t\tZipOutputStream rfoFile = new ZipOutputStream(new FileOutputStream(path + fileName)); \n\t\t\tFile dirToZip = new File(rfoDir); \n\t\t\tString[] fileList = dirToZip.list(); \n\t\t\tbyte[] buffer = new byte[4096]; \n\t\t\tint bytesIn = 0; \n\n\t\t\tfor(int i=0; i<fileList.length; i++) \n\t\t\t{ \n\t\t\t\tFile f = new File(dirToZip, fileList[i]); \n\t\t\t\tFileInputStream fis = new FileInputStream(f); \n\t\t\t\tString zEntry = f.getPath();\n\t\t\t\t//System.out.println(\"\\n\" + zEntry);\n\t\t\t\tint start = zEntry.indexOf(uniqueName);\n\t\t\t\tzEntry = zEntry.substring(start + uniqueName.length() + 1, zEntry.length());\n\t\t\t\t//System.out.println(tempDir);\n\t\t\t\t//System.out.println(zEntry + \"\\n\");\n\t\t\t\tZipEntry entry = new ZipEntry(zEntry); \n\t\t\t\trfoFile.putNextEntry(entry); \n\t\t\t\twhile((bytesIn = fis.read(buffer)) != -1) \n\t\t\t\t\trfoFile.write(buffer, 0, bytesIn); \n\t\t\t\tfis.close();\n\t\t\t}\n\t\t\trfoFile.close();\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tDebug.e(\"RFO.compress(): \" + e);\n\t\t}\n\t}", "private static void zipSubFolder(ZipOutputStream out, File folder,\n\t\t\tint basePathLength) throws IOException {\n\n\t\tFile[] fileList = folder.listFiles();\n\t\tBufferedInputStream origin = null;\n\t\tfor (File file : fileList) {\n\t\t\tif (file.isDirectory()) {\n\t\t\t\tzipSubFolder(out, file, basePathLength);\n\t\t\t} else {\n\t\t\t\tbyte data[] = new byte[BUFFER_SIZE];\n\t\t\t\tString unmodifiedFilePath = file.getPath();\n\t\t\t\tString relativePath = unmodifiedFilePath\n\t\t\t\t\t\t.substring(basePathLength);\n\t\t\t\tLog.i(\"ZIP SUBFOLDER\", \"Relative Path : \" + relativePath);\n\t\t\t\tFileInputStream fi = new FileInputStream(unmodifiedFilePath);\n\t\t\t\torigin = new BufferedInputStream(fi, BUFFER_SIZE);\n\t\t\t\tZipEntry entry = new ZipEntry(relativePath);\n\t\t\t\tout.putNextEntry(entry);\n\t\t\t\tint count;\n\t\t\t\twhile ((count = origin.read(data, 0, BUFFER_SIZE)) != -1) {\n\t\t\t\t\tout.write(data, 0, count);\n\t\t\t\t}\n\t\t\t\torigin.close();\n\t\t\t}\n\t\t}\n\t}", "void addFileToZip(File file, Zipper z, SynchronizationRequest req) \n throws IOException {\n\n if (file.isFile()) {\n z.setBaseDirectory(req.getTargetDirectory());\n z.addFileToZip(file, _out);\n } else if (file.isDirectory()) {\n z.setBaseDirectory(req.getTargetDirectory());\n z.addDirectoryToZip(file, _out);\n } else {\n assert false;\n }\n }", "public void zip(String directoryInZip, \n String filePath) throws Exception\n {\n File thisFile = new File(filePath);\n\n if (thisFile.exists()) {\n\n try {\n FileInputStream fi = new FileInputStream(thisFile);\n\n origin = new BufferedInputStream(fi, BUFFER);\n\n ZipEntry entry = new ZipEntry(directoryInZip + File.separator\n + thisFile.getName());\n out.putNextEntry(entry);\n\n int count;\n while ((count = origin.read(data, 0, BUFFER)) != -1) {\n out.write(data, 0, count);\n }\n origin.close();\n\n } catch (FileNotFoundException e) {\n logger.error(\"File \" + filePath + \" not found !!\", e);\n } catch (IOException e) {\n logger.error(\"Could not write to Zip File \", e);\n throw new Exception(\"Could not write to Zip File \", e);\n }\n\n } else {\n // Log message if file does not exist\n logger.info(\"File \" + thisFile.getName()\n + \" does not exist on file system\");\n\n } \t\t\n }", "private void zipDirectoryToOutputStream(File dirToZip, OutputStream outStream)\n throws IOException {\n if (!dirToZip.isDirectory()) {\n throw new IOException(\"zip directory does not exist\");\n }\n Log.v(TAG, \"zipping directory \" + dirToZip.getAbsolutePath());\n\n File[] listFiles = dirToZip.listFiles();\n try (ZipOutputStream zipStream = new ZipOutputStream(new BufferedOutputStream(outStream))) {\n for (File file : listFiles) {\n if (file.isDirectory()) {\n continue;\n }\n String filename = file.getName();\n // only for the zipped output file, we add individual entries to zip file.\n if (filename.equals(OUTPUT_ZIP_FILE) || filename.equals(EXTRA_OUTPUT_ZIP_FILE)) {\n ZipUtils.extractZippedFileToZipStream(file, zipStream);\n } else {\n ZipUtils.addFileToZipStream(file, zipStream);\n }\n }\n } finally {\n outStream.close();\n }\n // Zipping successful, now cleanup the temp dir.\n FileUtils.deleteDirectory(dirToZip);\n }", "private void addToZipStream(Path file, ZipOutputStream zipStream, String dirName)\r\n throws Exception {\r\n String inputFileName = file.toFile().getPath();\r\n try (FileInputStream inputStream = new FileInputStream(inputFileName)) {\r\n\r\n // create a new ZipEntry, which is basically another file\r\n // within the archive. We omit the path from the filename\r\n Path directory = Paths.get(dirName);\r\n ZipEntry entry = new ZipEntry(directory.relativize(file).toString());\r\n\r\n zipStream.putNextEntry(entry);\r\n\r\n // Now we copy the existing file into the zip archive. To do\r\n // this we write into the zip stream, the call to putNextEntry\r\n // above prepared the stream, we now write the bytes for this\r\n // entry. For another source such as an in memory array, you'd\r\n // just change where you read the information from.\r\n byte[] readBuffer = new byte[2048];\r\n int amountRead;\r\n int written = 0;\r\n\r\n while ((amountRead = inputStream.read(readBuffer)) > 0) {\r\n zipStream.write(readBuffer, 0, amountRead);\r\n written += amountRead;\r\n }\r\n } catch (IOException e) {\r\n throw new Exception(\"Unable to process \" + inputFileName, e);\r\n }\r\n }", "public static void zipFile(final Path path, final Path baseForName, final ZipOutputStream zio, \n\t\t\tfinal boolean recursive, final Predicate<Path> filter) throws IOException {\n\t\tif (Files.isRegularFile(path) && (filter == null || filter.test(path))) {\n\t\t\tString name = baseForName == null ? path.toString() : baseForName.relativize(path).toString() ;\n\t\t\tname = name.replace('\\\\', '/');\n\t\t\tfinal ZipEntry entry = new ZipEntry(name); \n\t\t\tzio.putNextEntry(entry);\n\t\t\tfinal byte[] buffer = new byte[4096];\n\t\t\tint length;\n\t\t\ttry (final InputStream in = Files.newInputStream(path)) {\n\t\t\t\twhile ((length = in.read(buffer)) >= 0) {\n\t\t\t\t\tzio.write(buffer, 0 , length);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!recursive || !Files.isDirectory(path))\n\t\t\treturn;\n\t\tFiles.walkFileTree(path, new java.nio.file.SimpleFileVisitor<Path>() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\n\t\t\t\tif (filter != null && Files.isDirectory(file)) {\n\t\t\t\t\tif (!filter.test(file))\n\t\t\t\t\t\treturn FileVisitResult.SKIP_SUBTREE;\n\t\t\t\t\telse\n\t\t\t\t\t\treturn FileVisitResult.CONTINUE;\n\t\t\t\t}\n\t\t\t\tif (!Files.isRegularFile(file) || (filter != null && !filter.test(file)))\n\t\t\t\t\treturn FileVisitResult.CONTINUE;\n\t\t\t\tfinal Path relativeBase = baseForName != null ? baseForName : path;\n\t\t\t\tfinal Path relativePath = relativeBase.relativize(file);\n\t\t\t\tfinal ZipEntry entry = new ZipEntry(relativePath.toString().replace('\\\\', '/')); // TODO check\n\t\t\t\tzio.putNextEntry(entry);\n\t\t\t\tfinal byte[] buffer = new byte[4096];\n\t\t\t\tint length;\n\t\t\t\ttry (final InputStream in = Files.newInputStream(file)) {\n\t\t\t\t\twhile ((length = in.read(buffer)) >= 0) {\n\t\t\t\t\t\tzio.write(buffer, 0 , length);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn FileVisitResult.CONTINUE;\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {\n\t\t\t\tLoggerFactory.getLogger(ZipUtils.class).warn(\"File visit failed: {}\"\n\t\t\t\t\t\t+ \". {}\", file, exc.toString());\n\t\t\t\treturn FileVisitResult.CONTINUE;\n\t\t\t}\n\t\t\t\n\t\t});\n\t}", "private String writeZipFile(File directoryToZip, List<File> fileList, String zipName) throws IOException{\r\n // If the zip name is null then provide the name of the directory\r\n if(zipName == null){\r\n zipName = directoryToZip.getName();\r\n }\r\n // Store the file name\r\n String fileName = zipName;\r\n // Create the zip file\r\n FileOutputStream fos = new FileOutputStream(fileName);\r\n ZipOutputStream zos = new ZipOutputStream(fos);\r\n for (File file : fileList) {\r\n if (!file.isDirectory()) { // we only zip files, not directories\r\n // Add files that are not in the skip list\r\n if(!isFileToSkip(file.getName())) {\r\n addToZip(directoryToZip, file, zos);\r\n }\r\n }\r\n }\r\n zos.close();\r\n fos.close();\r\n // Return the full name of the file\r\n return fileName;\r\n }", "private void addFileToTarGz(TarArchiveOutputStream tOut, String path, String base) throws IOException {\n File f = new File(path);\n String entryName = base + f.getName();\n TarArchiveEntry tarEntry = new TarArchiveEntry(f, entryName);\n tOut.putArchiveEntry(tarEntry);\n Platform.runLater(() -> fileLabel.setText(\"Processing \" + f.getPath()));\n\n if (f.isFile()) {\n FileInputStream fin = new FileInputStream(f);\n IOUtils.copy(fin, tOut);\n fin.close();\n tOut.closeArchiveEntry();\n } else {\n tOut.closeArchiveEntry();\n File[] children = f.listFiles();\n if (children != null) {\n for (File child : children) {\n addFileToTarGz(tOut, child.getAbsolutePath(), entryName + \"/\");\n }\n }\n }\n }", "public static void compressFolder(String dirPath, String zipFileName) throws Exception {\n\t\tFile destination = new File(zipFileName);\n\t\tFile source = new File(dirPath);\n\t\tOutputStream archiveStream = new FileOutputStream(destination);\n\t\tArchiveOutputStream archive = new ArchiveStreamFactory().createArchiveOutputStream(ArchiveStreamFactory.ZIP,\n\t\t\t\tarchiveStream);\n\n\t\tCollection<File> fileList = FileUtils.listFiles(source, null, true);\n\n\t\t//loop through all files and add them one by one to the archive\n\t\tfor (File file : fileList) {\n\t\t\tString entryName = getEntryName(source, file);\n\t\t\tZipArchiveEntry entry = new ZipArchiveEntry(entryName);\n\t\t\tarchive.putArchiveEntry(entry);\n\n\t\t\tBufferedInputStream input = new BufferedInputStream(new FileInputStream(file));\n\n\t\t\tIOUtils.copy(input, archive);\n\t\t\tinput.close();\n\t\t\tarchive.closeArchiveEntry();\n\t\t}\n\n\t\tarchive.finish();\n\t\tarchiveStream.close();\n\t}", "protected File createZipArchive(File directoryToZip, String modpackName, String workspace) throws Exception {\n zipName = LocalDateTime.now().format(DateTimeFormatter.ofPattern(\"yyyy-MM-dd-HH-mm-ss\")) + \"--\" + modpackName + \".zip\";\n uploadStatus = \"Creating Zipfile from Directory\";\n File zipFile = new File(workspace + \"\\\\\" + zipName);\n try {\n ProgressBarLogic progressBarLogic = new ProgressBarLogic(directoryToZip);\n ZipUtil.pack(directoryToZip, zipFile, name -> {\n uploadStatus = \"Adding file: \" + name + \" to the zip\";\n progressBarLogic.progressPercentage = 0;\n progressBarLogic.progress.add(name);\n progressBarLogic.calculateProgress(progressBarLogic.progress);\n notifyObserver();\n return name;\n });\n } catch (ZipException e) {\n throw e;\n } catch (Exception e) {\n System.out.println(e);\n }\n return zipFile;\n }", "private void unzipDownloadedFile(String zipFile) throws ZipException, IOException{\n\t int BUFFER = 2048;\n\t \n\t // get zip file\n\t File file = new File(zipFile);\n\t ZipFile zip = new ZipFile(file);\n\t \n\t // unzip to directory of the same name\n\t // When sip is a directory, this gets two folders\n\t //String newPath = zipFile.substring(0, zipFile.length() - 4);\n\t //new File(newPath).mkdir();\n\t \n\t // unzip to parent directory of the zip file\n\t // This is assuming zip if of a directory\n\t String newPath = file.getParent();\n\t \n\t // Process each entry\n\t Enumeration<? extends ZipEntry> zipFileEntries = zip.entries();\n\t while (zipFileEntries.hasMoreElements())\n\t {\n\t // grab a zip file entry\n\t ZipEntry entry = (ZipEntry) zipFileEntries.nextElement();\n\t String currentEntry = entry.getName();\n\t File destFile = new File(newPath, currentEntry);\n\t File destinationParent = destFile.getParentFile();\n\n\t // create the parent directory structure if needed\n\t destinationParent.mkdirs();\n\n\t if (!entry.isDirectory())\n\t {\n\t BufferedInputStream is = new BufferedInputStream(zip.getInputStream(entry));\n\t int currentByte;\n\t // establish buffer for writing file\n\t byte data[] = new byte[BUFFER];\n\n\t // write the current file to disk\n\t FileOutputStream fos = new FileOutputStream(destFile);\n\t BufferedOutputStream dest = new BufferedOutputStream(fos,\n\t BUFFER);\n\n\t // read and write until last byte is encountered\n\t while ((currentByte = is.read(data, 0, BUFFER)) != -1) {\n\t dest.write(data, 0, currentByte);\n\t }\n\t dest.flush();\n\t dest.close();\n\t is.close();\n\t }\n\n\t if (currentEntry.endsWith(\".zip\"))\n\t {\n\t // found a zip file, try to open\n\t \tunzipDownloadedFile(destFile.getAbsolutePath());\n\t }\n\t }\n\t zip.close();\n\t}", "public static void zip(BasicShell shell, File archive, List<File> filesToZip) {\n\t\ttry {\n\t\t\tshell.printOut(\"Creating archive '\" + archive.getPath() + \"'.\");\n\t\t\tfinal BufferedOutputStream archiveStream = new BufferedOutputStream(new FileOutputStream(archive));\n\t\t\tZipOutputStream zipStream = new ZipOutputStream(archiveStream);\n\t\t\tzipStream.setLevel(7);\n\t\t\t\n\t\t\tString pwd = shell.pwd().getPath();\n\t\t\tfor ( File file : filesToZip) {\n\t\t\t\tString name = file.getPath();\n\t\t\t\tif (name.equals(pwd)) continue;\n\t\t\t\t\n\t\t\t\tif ( name.startsWith(pwd) ) {\n\t\t\t\t\tname = name.substring(pwd.length()+1);\n\t\t\t\t}\n\t\t\t\tZipEntry entry = new ZipEntry(name);\n\t\t\t\tzipStream.putNextEntry(entry);\n\t\t\t\tif ( file.isFile() ) {\n\t\t\t\t\tBufferedInputStream fileStream = new BufferedInputStream(new FileInputStream(file));\n\t\t\t\t\tbyte[] buffer = new byte[2048];\n\t\t\t\t\tint count = fileStream.read(buffer);\n\t\t\t\t\twhile ( count > -1 ) {\n\t\t\t\t\t\tzipStream.write(buffer, 0, count);\n\t\t\t\t\t\tcount = fileStream.read(buffer);\n\t\t\t\t\t}\n\t\t\t\t\tfileStream.close();\n\t\t\t\t}\n\t\t\t\tshell.printOut(\"File '\" + entry.getName() + \"' added.\");\n\t\t\t}\n\t\t\tzipStream.close();\n\t\t} catch (Exception e) {\n\t\t\tshell.getErrorHandler().handleError(Diagnostic.ERROR, e.getClass().getSimpleName() + \": \"+ e.getMessage());\n\t\t}\n\t}", "public static void writeZipFile(File directoryToZip, String fileName, List<File> fileList) {\r\n\t\ttry {\r\n\t\t\t//FileOutputStream fos = new FileOutputStream(directoryToZip.getName() + \".zip\");\r\n\t\t\tFileOutputStream fos = new FileOutputStream(directoryToZip +\"\\\\\"+ fileName+\".zip\");\r\n\t\t\tZipOutputStream zos = new ZipOutputStream(fos);\r\n\r\n\t\t\tfor (File file : fileList) {\r\n\t\t\t\tif (!file.isDirectory()) { // we only zip files, not directories\r\n\t\t\t\t\taddToZip(directoryToZip, file, zos);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tzos.close();\r\n\t\t\tfos.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tlogger.error(e.getMessage());\t\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\tlogger.error(e.getMessage());\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private static void extract (Path zipPath, Path destination)\n\t\tthrows IOException\n\t{\n\t\tif (Files.isDirectory (zipPath))\n\t\t{\n\t\t\ttry (DirectoryStream<Path> directoryStream = Files\n\t\t\t\t.newDirectoryStream (zipPath);)\n\t\t\t{\n\t\t\t\tfor (Path file : directoryStream)\n\t\t\t\t{\n\t\t\t\t\textract (file, destination);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tPath fileOutZip = destination\n\t\t\t\t.resolve (\"./\" + zipPath.normalize ().toString ()).normalize ();\n\t\t\tFiles.createDirectories (fileOutZip.getParent ());\n\t\t\tFiles.copy (zipPath, fileOutZip, Utils.COPY_OPTION);\n\t\t}\n\t}", "public void addJARFolder() {\n btAddJARFolder().push();\n }", "private void addFilesToZip(List<File> files,String outputPath) throws IOException \r\n\t{\r\n\t\t// create a zip output stream\r\n\t\tString zipFileName = outputPath + File.separator + Constants.name + zipIndex + Constants.zipExtension;\r\n\t\tOutputStreamWithLength chunkedFile = new OutputStreamWithLength(zipFileName);\r\n\t\tzipOutputStream = new ZipOutputStream(chunkedFile);\r\n\t\tdouble totalBytesRead = 0L;\r\n\t\tint count = 10; \r\n\t\tfor(File file:files)\r\n\t\t{\r\n\t\t\t// reset the file index\r\n\t\t\tfileIndex = 0;\r\n\t\t\tString zipEntryPath = file.getAbsolutePath().substring(basePath.length() + 0);\r\n\t\t\t\r\n\t\t\tif(file.isDirectory())\r\n\t\t\t{\r\n\t\t\t\tZipEntry entry =new ZipEntry(zipEntryPath+\"/\");\r\n\t\t\t\tzipOutputStream.putNextEntry(entry);\r\n\t\t\t\tzipOutputStream.closeEntry();\r\n\t\t\t\tcontinue;\r\n\t\t\t}\t\t\t\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tzipEntryPath = zipEntryPath + Constants.fragmentLabel + fileIndex++;\r\n\t\t\t}\t\t\t\r\n\r\n\t\t\t// add the current file to the zip\r\n\t\t\tZipEntry entry =new ZipEntry(zipEntryPath);\r\n\t\t\tzipOutputStream.putNextEntry(entry);\r\n\r\n\t\t\tbyte[] buffer = new byte[1024]; \t \r\n\r\n\t\t\tFileInputStream inputFileStream = new FileInputStream(file);\r\n\t\t\tint len; \r\n\t\t\twhile ((len = inputFileStream.read(buffer)) > 0) \r\n\t\t\t{ \r\n\t\t\t\tif((chunkedFile.getCurrentWriteLength() + len ) > maxSplitSize){\r\n\t\t\t\t\t// close current zip output stream\r\n\t\t\t\t\tzipOutputStream.closeEntry();\r\n\t\t\t\t\tzipOutputStream.finish();\r\n\t\t\t\t\t\r\n\t\t\t\t\t// reset the write length\r\n\t\t\t\t\tchunkedFile.setCurrentWriteLength(0);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// create new zip output stream\r\n\t\t\t\t\tzipIndex += 1;\r\n\t\t\t\t\tzipFileName = outputPath+ File.separator + Constants.name + zipIndex + Constants.zipExtension;\r\n\t\t\t\t\tchunkedFile = new OutputStreamWithLength(zipFileName);\r\n\t\t\t\t\tzipOutputStream = new ZipOutputStream(chunkedFile);\r\n\r\n\t\t\t\t\t// add the current file to write remaining bytes\r\n\t\t\t\t\tzipEntryPath = file.getAbsolutePath().substring(basePath.length() + 0);\r\n\t\t\t\t\tzipEntryPath = zipEntryPath + Constants.fragmentLabel + fileIndex++;\r\n\t\t\t\t\tentry = new ZipEntry(zipEntryPath);\r\n\t\t\t\t\tzipOutputStream.putNextEntry(entry);\r\n\r\n\t\t\t\t\t// write the bytes to the zip output stream\r\n\t\t\t\t\tzipOutputStream.write(buffer, 0, len);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t// write the bytes to the zip output stream\r\n\t\t\t\t\tzipOutputStream.write(buffer, 0, len);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//Show progress\r\n\t\t\t\ttotalBytesRead += len;\r\n\t\t\t\tdouble progress = totalBytesRead / totalBytes;\r\n\t\t\t\tif (progress*100 > 10)\r\n\t\t\t\t{\r\n\t\t\t\t\ttotalBytesRead = 0L;\r\n\t\t\t\t\tcount += 10;\r\n\t\t\t\t\tSystem.out.println(\"Finished \" + count +\"%\");\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\t\t\t\r\n\t\t\tinputFileStream.close();\r\n\t\t}\r\n\r\n\t\tzipOutputStream.closeEntry();\r\n\t\tzipOutputStream.finish();\r\n\t}", "public void zip() {\n\t\tif (zipFile != null) {\n\t\t\tlong start = System.currentTimeMillis();\n\t\t\ttry (ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(zipFile))) {\n\t\t\t\tzos.setLevel(ZipOutputStream.STORED);\n\t\t\t\tbyte[] buffer = new byte[4096];\n\t\t\t\tFiles.list(Paths.get(tool_builddir))\n\t\t\t\t\t\t.forEach(x -> {\n\t\t\t\t\t\t\tFile f = x.toFile();\n\t\t\t\t\t\t\tif (f.isFile() && !f.getName().contains(\".\")) {\n\t\t\t\t\t\t\t\ttry (FileInputStream fis = new FileInputStream(f)) {\n\t\t\t\t\t\t\t\t\tZipEntry zipEntry = new ZipEntry(f.getName());\n\t\t\t\t\t\t\t\t\tzos.putNextEntry(zipEntry);\n\t\t\t\t\t\t\t\t\tint count;\n\t\t\t\t\t\t\t\t\twhile ((count = fis.read(buffer)) >= 0) {\n\t\t\t\t\t\t\t\t\t\tzos.write(buffer, 0, count);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tzos.closeEntry();\n\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\tout.println(\"Zipped to '\" + zipFile + \"' - \" + Duration.ofMillis(System.currentTimeMillis() - start));\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t}", "public static boolean generateZipFile(ArrayList<String> sourcesFilenames, String destinationDir, String zipFilename){\n byte[] buf = new byte[1024]; \r\n\r\n try \r\n {\r\n // VER SI HAY QUE CREAR EL ROOT PATH\r\n boolean result = (new File(destinationDir)).mkdirs();\r\n\r\n String zipFullFilename = destinationDir + \"/\" + zipFilename;\r\n\r\n System.out.println(result);\r\n\r\n // Create the ZIP file \r\n ZipOutputStream out = new ZipOutputStream(new FileOutputStream(zipFullFilename)); \r\n \r\n // Compress the files \r\n for (String filename: sourcesFilenames) { \r\n FileInputStream in = new FileInputStream(filename); \r\n // Add ZIP entry to output stream. \r\n File file = new File(filename); //\"Users/you/image.jpg\"\r\n out.putNextEntry(new ZipEntry(file.getName())); //\"image.jpg\" \r\n // Transfer bytes from the file to the ZIP file \r\n int len; \r\n while ((len = in.read(buf)) > 0) { \r\n out.write(buf, 0, len); \r\n } \r\n // Complete the entry \r\n out.closeEntry(); \r\n in.close(); \r\n } // Complete the ZIP file \r\n out.close();\r\n\r\n return true;\r\n } \r\n catch (Exception e) \r\n { \r\n System.out.println(e);\r\n return false;\r\n } \r\n }", "private void tarFolder( String parent, String path, TarOutputStream out ) \n throws IOException \n {\n BufferedInputStream origin = null;\n File f = new File( path );\n String files[] = f.list();\n if (files == null) \n {\n files = new String[1];\n files[0] = f.getName();\n }\n parent = ( ( parent == null ) ? ( f.isFile() ) ? \"\" \n : f.getName() + \"/\" : parent + f.getName() + \"/\" );\n for (int i = 0; i < files.length; i++) \n {\n File fe = f;\n byte data[] = new byte[BUFFER];\n \n if (f.isDirectory()) {\n fe = new File( f, files[i] );\n }\n \n if (fe.isDirectory()) {\n String[] fl = fe.list();\n if (fl != null && fl.length != 0)\n tarFolder( parent, fe.getPath(), out );\n else \n {\n TarEntry entry = new TarEntry( fe, parent + files[i] + \"/\" );\n out.putNextEntry( entry );\n }\n continue;\n }\n FileInputStream fi = new FileInputStream( fe );\n origin = new BufferedInputStream( fi );\n TarEntry entry = new TarEntry( fe, parent + files[i] );\n out.putNextEntry( entry );\n int count;\n //int bc=0;\n while ( (count=origin.read(data)) != -1 ) \n {\n out.write( data, 0, count );\n //bc+=count;\n }\n //System.out.println(\"Wrote \"+bc+\" bytes from \"+files[i]+\" to out\");\n out.flush();\n origin.close();\n }\n }", "public void convertToZip(String input, String output) throws ZipException {\n\t\tZipFile zip = new ZipFile(output); \n\t ZipParameters parameters = new ZipParameters();\n parameters.setCompressionMethod(Zip4jConstants.COMP_DEFLATE);\n parameters.setCompressionLevel(Zip4jConstants.DEFLATE_LEVEL_NORMAL); \n\t zip.addFolder(input, parameters);\n\t}", "public static void writeZipOneFile(File directoryToZip, String fileName) {\r\n\t\ttry {\r\n\t\t\t//FileOutputStream fos = new FileOutputStream(directoryToZip.getName() + \".zip\");\r\n\t\t\tFileOutputStream fos = new FileOutputStream(directoryToZip +\"\\\\\"+ fileName.replace(\".xls\", \"\")+\".zip\");\r\n\t\t\tZipOutputStream zos = new ZipOutputStream(fos);\r\n\r\n\t\t\tFile file = new File(directoryToZip + \"\\\\\"+ fileName);\r\n\t\t\taddToZip(directoryToZip, file, zos);\r\n\r\n\t\t\tzos.close();\r\n\t\t\tfos.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tlogger.error(e.getMessage());\t\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\tlogger.error(e.getMessage());\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void tozip() {\r\n\t\t//session.setAttribute(Constant.USER_SESSION_KEY, null);\r\n\t\tList<Netlog> result = null;\r\n\t\tInteger total = null;\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t\tresult = (List<Netlog>)netlogDao.findNetlogByPage(1,10000);\r\n\t\t\t\ttotal= result.size();\r\n\t\t\t\t//total= netlogDao.findNetlogCount();\r\n\t\t\t\r\n\t\t} catch (SQLException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\tNetlogs netlogs = new Netlogs(result);\r\n\t\tString path = this.getClass().getClassLoader().getResource(\"\").getPath();\r\n\t\tSystem.out.println(path);\r\n\t\tpath = path.replace(\"WEB-INF/classes/\", \"\");\r\n\t\tString path1 = path + \"netlog/\";\r\n\t\tLong time = System.currentTimeMillis()/1000;\r\n\t\tXml2Java.beanToXML(netlogs,path1+\"145-330000-\"+time.toString()+\"-00001-WA-SOURCE_NETLOG_0001-0.xml\");\r\n\r\n\t\tZipUtil.ZipMultiFile(path1, path+\"145-353030334-330300-330300-netlog-00001.zip\");\r\n\t}", "static void unzip(String zipFilePath, String destDirectory, boolean recursive, boolean teacherZip) throws IOException {\n\n if (students == null) {\n students = new ArrayList<Student>();\n }\n\n ZipInputStream zipIn = null;\n\n try {\n zipIn = new ZipInputStream(new FileInputStream(zipFilePath));\n ZipEntry entry = zipIn.getNextEntry();\n\n // iterates over entries in the zip file\n while (entry != null) {\n createFiles(destDirectory, zipIn, entry, recursive);\n\n zipIn.closeEntry();\n entry = zipIn.getNextEntry();\n }\n\n } catch (IOException e) {\n System.err.println(e.getMessage());\n Errors.setUnzipperError(true);\n\n } finally {\n if (zipIn != null) {\n zipIn.close();\n }\n }\n }", "private void downloadZippedDirectory(String selectedFolder) {\n if (selectedFolder != null) {\n File file = getFile(selectedFolder);\n StreamSource zipSource = getZipSource(file);\n getMainWindow().open(new VaadinFileDownloadResource(zipSource, selectedFolder+\".zip\", 0, getMainWindow().getApplication()), \"_self\");\n }\n }", "private void addPackageDirFiles(WebFile aDir, List aList)\n{\n boolean hasNonPkgFile = false;\n for(WebFile child : aDir.getFiles())\n if(child.isDir() && child.getType().length()==0)\n addPackageDirFiles(child, aList);\n else hasNonPkgFile = true;\n if(hasNonPkgFile || aDir.getFileCount()==0) aList.add(aDir);\n}", "private void addModule(ZipOutputStream out, File file) throws IOException\n\t{\n\t\tif (file.isDirectory())\n\t\t{\n\t\t\tfor (File f : file.listFiles())\n\t\t\t{\n\t\t\t\t// FIXME: remove MainModule.java\n\t\t\t\tif (!f.getName().equals(\"MainModule.java\"))\n\t\t\t\t{\n\t\t\t\t\taddModule(out, f);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tString fileName = \"/src/main/java/modules/\" + file.getName();\n\t\t\t\n\t\t\tcreateZipEntry(out, fileName, Files.readAllBytes(Paths.get(file.getAbsolutePath())));\t\t}\n\t}", "void makeZip(String zipFilePath, String srcFilePaths[], ZipMainFrame f) {\n ...\n for (int i = 0; i < srcFilePaths.length; i++) {\n f.setStatusBarText(\"Zipping \"+srcFilePaths[i]);\n //add the file srcFilePaths[i] into the zip file.\n ...\n }\n }", "void makeZip(String zipFilePath, String srcFilePaths[],\n\t\t\tMessageDisplay msgDisplay) {\n\t\t...\n\t\tfor (int i = 0; i < srcFilePaths.length; i++) {\n\t\t\tmsgDisplay.showMessage(\"Zipping \"+srcFilePaths[i]);\n\t\t\t//add the file srcFilePaths[i] into the zip file.\n\t\t\t...\n\t\t}\n\t}", "private static Vector addFiles(ZipOutputStream out, String target, String filter, boolean usePath, boolean recurse, Vector includeList) throws IOException {\r\n byte[] buf = new byte[1024];\r\n File[] fileList = null;\r\n File targetFile = new File(target);\r\n if (targetFile.isDirectory()) {\r\n fileList = targetFile.listFiles(); \r\n } else {\r\n fileList = new File[1];\r\n fileList[0] = new File(target);\r\n }\r\n if (fileList != null && fileList.length > 0) {\r\n for (int i=0; i<fileList.length; i++) {\r\n if (fileList[i].isFile()) {\r\n if (filter != null && filter.length() == 0) {\r\n if (!fileList[i].getName().endsWith(filter))\r\n continue;\r\n }\r\n FileInputStream in = new FileInputStream(fileList[i].getAbsolutePath());\r\n if (!usePath) {\r\n out.putNextEntry(new ZipEntry(fileList[i].getName()));\r\n } else {\r\n out.putNextEntry(new ZipEntry(fileList[i].getAbsolutePath()));\r\n }\r\n int len;\r\n while ((len = in.read(buf)) > 0) {\r\n out.write(buf, 0, len);\r\n }\r\n out.closeEntry();\r\n in.close();\r\n includeList.add(fileList[i].getAbsolutePath());\r\n } else if (fileList[i].isDirectory() && recurse) {\r\n includeList = ZipUtil.addFiles(out, fileList[i].getAbsolutePath(), filter, true, true, includeList);\r\n }\r\n }\r\n }\r\n return includeList;\r\n }", "public void extractPackage(String zipPath, String destPath) throws IOException {\n File destDir = new File(destPath);\n if(!destDir.exists()) {\n destDir.mkdir();\n }\n ZipInputStream zipIn = new ZipInputStream(new FileInputStream((zipPath)));\n ZipEntry entry = zipIn.getNextEntry();\n while(entry != null) {\n String filePath = destPath+File.separator+entry.getName();\n //filePath = filePath.replaceAll(\" \",\"_\");\n if(!entry.isDirectory()) {\n Log.i(\"extract\",\"Package Name: \"+entry.getName());\n Log.i(\"extract\",filePath);\n String[] temp = entry.getName().split(\"\\\\.\");\n if(validExtension(temp[temp.length-1].toLowerCase())) {\n extractFile(zipIn,filePath);\n }\n //extractFile(zipIn,filePath);\n } else {\n File dir = new File(filePath);\n dir.mkdirs();\n }\n zipIn.closeEntry();;\n entry = zipIn.getNextEntry();\n }\n zipIn.close();\n }", "private static void buildDir (File dir) \n\t\tthrows Exception\n\t{\n\t\tFile[] contents = dir.listFiles();\n\t\tfor (int i = 0; i < contents.length; i++) {\n\t\t\tFile file = contents[i];\n\t\t\tif (file.isDirectory()) {\n\t\t\t\tbuildDir(file);\n\t\t\t} else if (file.getName().endsWith(\".xml\")) {\n\t\t\t\tbuildFile(file);\n\t\t\t}\n\t\t}\n\t}", "public void link() throws Exception {\n ZipOutputStream output = new ZipOutputStream( new FileOutputStream( outfile ) );\n if ( compression ) {\n output .setMethod( ZipOutputStream .DEFLATED );\n output .setLevel( Deflater .DEFAULT_COMPRESSION );\n } else {\n output .setMethod( ZipOutputStream .STORED );\n }\n Enumeration merges = mergefiles .elements();\n while ( merges .hasMoreElements() ) {\n String path = (String) merges .nextElement();\n File f = new File( path );\n if ( f.getName().endsWith( \".jar\" ) || f.getName().endsWith( \".zip\" ) ) {\n //Do the merge\n mergeZipJarContents( output, f );\n }\n else {\n //Add this file to the addfiles Vector and add it \n //later at the top level of the output file.\n addAddFile( path );\n }\n }\n Enumeration adds = addfiles .elements();\n while ( adds .hasMoreElements() ) {\n String name = (String) adds .nextElement();\n File f = new File( name );\n if ( f .isDirectory() ) {\n //System.out.println(\"in jlink: adding directory contents of \" + f.getPath());\n addDirContents( output, f, f.getName() + '/', compression );\n }\n else {\n addFile( output, f, \"\", compression );\n }\n }\n if ( output != null ) {\n try {\n output .close();\n } catch( IOException ioe ) {}\n }\n }", "private void addFolder(){\n }", "private void createDir(){\n\t\tPath path = Path.of(this.dir);\n\t\ttry {\n\t\t\tFiles.createDirectories(path);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void zip(File destFile, File[] files) throws IOException {\n BufferedInputStream origin = null;\n FileOutputStream dest = new FileOutputStream(destFile);\n ZipOutputStream out = new ZipOutputStream(new BufferedOutputStream(dest));\n out.setMethod(ZipOutputStream.DEFLATED);\n byte[] data = new byte[BUFFER_SIZE];\n for (int i = 0; i < files.length; i++) {\n if (log.isDebugEnabled()) {\n log.debug(\"Adding: \" + files[i].getName());\n }\n if (files[i].isDirectory()) {\n if (log.isDebugEnabled()) {\n log.debug(\"Skipping directory: \" + files[i]);\n }\n continue;\n }\n FileInputStream fi = new FileInputStream(files[i]);\n origin = new BufferedInputStream(fi, BUFFER_SIZE);\n ZipEntry entry = new ZipEntry(files[i].getName());\n out.putNextEntry(entry);\n int count;\n while ((count = origin.read(data, 0, BUFFER_SIZE)) != -1) {\n out.write(data, 0, count);\n }\n origin.close();\n }\n out.flush();\n out.close();\n }", "public static void PackageArchive(File directoryName, File fileName) throws IOException\r\n {\r\n final String ARCHIVE_XML = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-16\\\"?>\\n<archive major_version=\\\"0\\\" minor_version=\\\"1\\\" />\";\r\n\r\n TarArchiveWriter archive = new TarArchiveWriter(new GZIPOutputStream(new FileOutputStream(fileName)));\r\n\r\n // Create the archive.xml file\r\n archive.writeFile(\"archive.xml\", ARCHIVE_XML);\r\n\r\n // Add the assets\r\n File dir = new File(directoryName, ArchiveConstants.ASSETS_PATH);\r\n String[] files = dir.list();\r\n for (String file : files)\r\n archive.writeFile(ArchiveConstants.ASSETS_PATH + FilenameUtils.getName(file), FileUtils.readFileToByteArray(new File(dir, file)));\r\n\r\n // Add the objects\r\n dir = new File(directoryName, ArchiveConstants.OBJECTS_PATH);\r\n files = dir.list();\r\n for (String file : files)\r\n archive.writeFile(ArchiveConstants.OBJECTS_PATH + FilenameUtils.getName(file), FileUtils.readFileToByteArray(new File(dir, file)));\r\n\r\n // Add the terrain(s)\r\n dir = new File(directoryName, ArchiveConstants.TERRAINS_PATH);\r\n files = dir.list();\r\n for (String file : files)\r\n archive.writeFile(ArchiveConstants.TERRAINS_PATH + FilenameUtils.getName(file), FileUtils.readFileToByteArray(new File(dir, file)));\r\n\r\n // Add the parcels(s)\r\n dir = new File(directoryName, ArchiveConstants.LANDDATA_PATH);\r\n files = dir.list();\r\n for (String file : files)\r\n archive.writeFile(ArchiveConstants.LANDDATA_PATH + FilenameUtils.getName(file), FileUtils.readFileToByteArray(new File(dir, file)));\r\n\r\n // Add the setting(s)\r\n dir = new File(directoryName, ArchiveConstants.SETTINGS_PATH);\r\n files = dir.list();\r\n for (String file : files)\r\n archive.writeFile(ArchiveConstants.SETTINGS_PATH + FilenameUtils.getName(file), FileUtils.readFileToByteArray(new File(dir, file)));\r\n\r\n archive.close();\r\n }", "public static void zipFiles(List<String> srcFiles, String directoryPath) throws FileNotFoundException, IOException {\n DateTimeFormatter dtf = DateTimeFormatter.ofPattern(\"dd-MM-yyyy-HHmmss\");\r\n LocalDateTime now = LocalDateTime.now();\r\n String d = dtf.format(now);\r\n FileOutputStream fos = new FileOutputStream(directoryPath + \"\\\\\" + \"backupRexs\" + d + \".zip\");\r\n ZipOutputStream zipOut = new ZipOutputStream(fos);\r\n for (String srcFile : srcFiles) {\r\n File fileToZip = new File(srcFile);\r\n FileInputStream fis = new FileInputStream(fileToZip);\r\n ZipEntry zipEntry = new ZipEntry(fileToZip.getName());\r\n zipOut.putNextEntry(zipEntry);\r\n\r\n byte[] bytes = new byte[1024];\r\n int length;\r\n while ((length = fis.read(bytes)) >= 0) {\r\n zipOut.write(bytes, 0, length);\r\n }\r\n fis.close();\r\n fileToZip.delete();\r\n }\r\n zipOut.close();\r\n fos.close();\r\n }", "public void addDirectories( File base ) {\n if( base.isDirectory() ) {\n repository.add( base );\n File[] files = base.listFiles();\n\n for( int i = 0; i < files.length; i++ ) {\n addDirectories( files[i] );\n }\n }\n }", "public FilesArchived(File rootDir, String zip) {\n this.root = rootDir;\n this.compression = (\"zstd\".equals(zip)) ? Compression.ZSTD : Compression.GZIP;\n rescan();\n Thread thread = new Thread(this::run);\n thread.setDaemon(true);\n thread.setName(\"FilesArchived-maintainer\");\n thread.start();\n }", "private void addLibrary(ZipOutputStream out, File file) throws IOException\n\t{\n\t\tString groupId = DEFAULT_LIBRARY_GROUPID; // FIXME\n\t\tString version = DEFAULT_LIBRARY_VERSION; // FIXME\n\t\tString artifactId = file.getName().substring(0, file.getName().lastIndexOf(\".\")); // remove file extension\n\t\t\n\t\tString fileName = \"/localrepo/\" + groupId + \"/\" + artifactId + \"/\" + version + \"/\" + artifactId + \"-\" + version + \".jar\";\n\n\t\tcreateZipEntry(out, fileName, Files.readAllBytes(Paths.get(file.getAbsolutePath())));\n\t}", "public void zipDirectory(String sourceDirectoryPath, String zipOutputPath, Boolean ifAbsolutePath, Boolean ifProtect, int maxZipMbSizeToProtect) throws Exception {\t\t \n\t\t if(ifAbsolutePath) { zipOutputPath = zipDirectoryFullPath(sourceDirectoryPath, zipOutputPath); }\n\t\t else { zipOutputPath = zipDirectoryInternalPath(sourceDirectoryPath, zipOutputPath); }\t\t \n\t\t if(fileSizeMB(zipOutputPath) < maxZipMbSizeToProtect) {\n\t\t\t if(ifProtect){ fileRename(zipOutputPath,zipOutputPath.replace(\".zip\",\".renameToZip\")); }\n\t\t\t }\n\t\t }", "private static void decompressJarFile(String destDirectory, String jarFilePath) throws IOException {\n File destDir = new File(destDirectory);\n if (!destDir.exists()) {\n destDir.mkdir();\n }\n JarInputStream jarIn = new JarInputStream(new FileInputStream(jarFilePath));\n JarEntry entry = jarIn.getNextJarEntry();\n // iterates over all the entries in the jar file\n while (entry != null) {\n String filePath = destDirectory + \"/\" + entry.getName();\n if (!entry.isDirectory()) {\n new File(filePath).getParentFile().mkdirs();\n // if the entry is a file, extracts it\n extractFile(jarIn, filePath);\n }/* else {\n System.out.println(\"New dir: \" + filePath);\n // if the entry is a directory, make the directory\n File dir = new File(filePath);\n dir.mkdir();\n System.out.println(dir.canWrite());\n }*/\n jarIn.closeEntry();\n entry = jarIn.getNextJarEntry();\n }\n jarIn.close();\n }", "protected void getFile(ZipEntry e) throws IOException {\n String zipName = e.getName();\n switch (mode) {\n case EXTRACT:\n if (zipName.startsWith(\"/\")) {\n if (!warnedMkDir)\n System.out.println(\"Ignoring absolute paths\");\n warnedMkDir = true;\n zipName = zipName.substring(1);\n }\n // if a directory, just return. We mkdir for every file,\n // since some widely-used Zip creators don't put out\n // any directory entries, or put them in the wrong place.\n if (zipName.endsWith(\"/\")) {\n return;\n }\n // Else must be a file; open the file for output\n // Get the directory part.\n int ix = zipName.lastIndexOf('/');\n if (ix > 0) {\n //String dirName = zipName.substring(0, ix);\n String fileName = zipName.substring(ix + 1, zipName.length());\n zipName = fileName;\n\n }\n String targetFile = this.unzipFileTargetLocation;\n File file = new File(targetFile);\n if (!file.exists())\n file.createNewFile();\n FileOutputStream os = null;\n InputStream is = null;\n try {\n os = new FileOutputStream(targetFile);\n is = zippy.getInputStream(e);\n int n = 0;\n while ((n = is.read(b)) > 0)\n os.write(b, 0, n);\n\n } finally {\n if (is != null) {\n try {\n is.close();\n } catch (Exception ee) {\n ee.printStackTrace();\n }\n }\n if (os != null) {\n try {\n os.close();\n } catch (Exception ee) {\n ee.printStackTrace();\n }\n }\n }\n break;\n case LIST:\n // Not extracting, just list\n if (e.isDirectory()) {\n System.out.println(\"Directory \" + zipName);\n } else {\n System.out.println(\"File \" + zipName);\n }\n break;\n default:\n throw new IllegalStateException(\"mode value (\" + mode + \") bad\");\n }\n }", "public final void addDirectory(String dir) {\n addDirectory(Paths.get(dir));\n }", "protected void addPrefixedFiles(Vector v, ZipOutputStream zOut)\n throws IOException {\n for (int i=0; i<v.size(); i++) {\n PrefixedFileSet fs = (PrefixedFileSet) v.elementAt(i);\n DirectoryScanner ds = fs.getDirectoryScanner(project);\n String prefix = fs.getPrefix();\n if (prefix.length() > 0 \n && !prefix.endsWith(\"/\")\n && !prefix.endsWith(\"\\\\\")) {\n prefix += \"/\";\n }\n zipDir(null, zOut, prefix);\n addFiles(ds, zOut, prefix);\n }\n }", "private void addFile( ZipOutputStream output, File file, String prefix, boolean compress) throws IOException {\n //Make sure file exists\n long checksum = 0;\n if ( ! file .exists() ) {\n return ;\n }\n ZipEntry entry = new ZipEntry( getEntryName( file, prefix ) );\n entry .setTime( file .lastModified() );\n entry .setSize( file .length() );\n if (! compress){\n entry.setCrc(calcChecksum(file));\n }\n FileInputStream input = new FileInputStream( file );\n addToOutputStream(output, input, entry);\n }", "public String zipDirectoryFullPath(String sourceDirectoryPath, String zipOutputPath) throws Exception {\n \t // DECLARATION:\n \t if(sourceDirectoryPath.endsWith(\"\\\\\")) { sourceDirectoryPath = sourceDirectoryPath.substring(0, sourceDirectoryPath.length() - 1); }\n \t sourceDirectoryPath = sourceDirectoryPath.replace(\"\\\\\", \"/\");\n \t zipOutputPath = zipOutputPath.replace(\"\\\\\", \"/\");\n \t // MESSAGE:\n \t fileWriterPrinter(\"\\nSOURCE DIRECTORY: \" + sourceDirectoryPath);\n \t fileWriterPrinter(\" ZIP OUTPUT PATH: \" + zipOutputPath + \"\\n\");\n\t\t \n\t\t File dirObj = new File(sourceDirectoryPath);\n\t\t ZipOutputStream out = new ZipOutputStream(new FileOutputStream(zipOutputPath));\n\t\t System.out.println(\"Creating : \" + zipOutputPath);\n\t\t addDir(dirObj, out);\n\t\t out.close();\n\t\t return zipOutputPath;\n\t\t }", "public static Path setupArchiveFile( final Configuration conf, final int count, boolean isJar ) throws IOException {\r\n\t\tFile tmpDir = File.createTempFile(\"tmpDir\", \"\");\r\n\t\tif (!tmpDir.delete()) {\r\n\t\t\tthrow new IOException(\"Can not delete recently created tmpFile\");\r\n\t\t}\r\n\t\tif (!tmpDir.mkdirs()) {\r\n\t\t\tthrow new IOException(\"Can not create tmp directory \" + tmpDir);\r\n\t\t}\r\n\t\t\r\n\t\tfinal Path tmpDirPath = new Path(tmpDir.getName());\r\n\t\tList<Path> files = createSimpleDirectory(conf, tmpDirPath, count, null);\r\n\t\tfinal Path zipFile = tmpDirPath.suffix(isJar?\".jar\":\".zip\");\r\n\t\tcreateArchiveFile(conf, zipFile, files, 1, isJar, null);\r\n\t\t/** Now clean up the tmpDir. */\r\n\t\tFileSystem fs = tmpDirPath.getFileSystem(conf);\r\n\t\tfs.delete( tmpDirPath, true);\r\n\t\treturn zipFile;\r\n\t}", "private static void createTree(TreeItem<FilePath> rootItem) throws IOException {\n\n try (DirectoryStream<Path> directoryStream = Files\n .newDirectoryStream(rootItem.getValue().getPath())) {\n\n for (Path path : directoryStream) {\n TreeItem<FilePath> newItem = new TreeItem<FilePath>(new FilePath(path));\n newItem.setExpanded(true);\n\n rootItem.getChildren().add(newItem);\n\n if (Files.isDirectory(path)) {\n createTree(newItem);\n }\n }\n } catch (AccessDeniedException ignored) {\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "public static void extractZipArchive(byte[] zipFileData, String directory) throws IOException {\n new File(directory).mkdirs();\n // get the zip file content\n ZipInputStream inputStream = new ZipInputStream(new ByteArrayInputStream(zipFileData));\n // get the zipped file list entry\n ZipEntry zipEntry = inputStream.getNextEntry();\n byte[] buffer = new byte[BUFFER_SIZE];\n while (zipEntry != null) {\n if (!zipEntry.isDirectory()) {\n String fileName = zipEntry.getName();\n File newFile = new File(directory + File.separator + fileName);\n new File(newFile.getParent()).mkdirs();\n\n FileOutputStream fos = new FileOutputStream(newFile);\n\n int len;\n while ((len = inputStream.read(buffer)) > 0) {\n fos.write(buffer, 0, len);\n }\n\n fos.close();\n\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"File unzipped: \" + newFile.getAbsoluteFile());\n }\n }\n zipEntry = inputStream.getNextEntry();\n }\n inputStream.closeEntry();\n inputStream.close();\n }", "private static void writeFile(ZipInputStream zipIn, String filePath) throws IOException {\n\n String parent = filePath.replace(filePath.substring(filePath.lastIndexOf('/')), \"\");\n createParents(parent);\n\n BufferedOutputStream bos = null;\n\n try {\n bos = new BufferedOutputStream(new FileOutputStream(filePath));\n byte[] bytesIn = new byte[BUFFER_SIZE];\n\n int read = 0;\n while ((read = zipIn.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n\n } catch (IOException e) {\n System.err.println(e.getMessage());\n Errors.setUnzipperError(true);\n\n } finally {\n if (bos != null) {\n bos.close();\n }\n }\n }", "public boolean createDirectoryInJarFolder(String folderName){\r\n \r\n path = getPathToJarFolder();\r\n \r\n // add folder to path and make directory\r\n path += folderName;\r\n File file = new File(path);\r\n return file.mkdir();\r\n }", "List<File> compress(File directory, int size);", "public AddFileToZip add(final File source) {\n\t\treturn new AddFileToZip(source);\n\t}", "public String zipDirectoryInternalPath(String sourceDirectoryPath, String zipOutputPath) throws IOException {\n\t\t \t // DECLARATION:\n\t\t \t if(sourceDirectoryPath.endsWith(\"\\\\\")) { sourceDirectoryPath = sourceDirectoryPath.substring(0, sourceDirectoryPath.length() - 1); }\n\t\t \t sourceDirectoryPath = sourceDirectoryPath.replace(\"\\\\\", \"/\");\n\t\t \t zipOutputPath = zipOutputPath.replace(\"\\\\\", \"/\");\n\t\t \t // MESSAGE:\n\t\t \t fileWriterPrinter(\"\\nSOURCE DIRECTORY: \" + sourceDirectoryPath);\n\t\t \t fileWriterPrinter(\" ZIP OUTPUT PATH: \" + zipOutputPath + \"\\n\");\n\t\t \t \n\t\t File dir = new File(sourceDirectoryPath);\n\t\t File file = new File(zipOutputPath);\n\t\t // System.out.println(mydir.toURI().relativize(myfile.toURI()).getPath());\t\n\t\t zip(dir, file);\n\t\t return zipOutputPath;\n\t\t\t}", "public void unZip(String apkFile) throws Exception \r\n\t{\r\n\t\tLog.p(tag, apkFile);\r\n\t\tFile file = new File(apkFile);\r\n\t\r\n\t\t/*\r\n\t\t * Create the Base Directory, whose name should be same as Zip file name.\r\n\t\t * All decompressed contents will be placed under this folder.\r\n\t\t */\r\n\t\tString apkFileName = file.getName();\r\n\t\t\r\n\t\tif(apkFileName.indexOf('.') != -1)\r\n\t\t\tapkFileName = apkFileName.substring(0, apkFileName.indexOf('.'));\r\n\t\t\r\n\t\tLog.d(tag, \"Folder name: \"+ apkFileName);\r\n\t\t\r\n\t\tFile extractFolder = new File((file.getParent() == null ? \"\" : file.getParent() + File.separator) + apkFileName);\r\n\t\tif(!extractFolder.exists())\r\n\t\t\textractFolder.mkdir();\r\n\t\t\r\n\t\t/*\r\n\t\t * Read zip entries.\r\n\t\t */\r\n\t\tFileInputStream fin = new FileInputStream(apkFile);\r\n\t\tZipInputStream zin = new ZipInputStream(new BufferedInputStream(fin));\r\n\t\t\r\n\t\t/*\r\n\t\t * Zip InputStream shifts its index to every Zip entry when getNextEntry() is called.\r\n\t\t * If this method returns null, Zip InputStream reaches EOF.\r\n\t\t */\r\n\t\tZipEntry ze = null;\r\n\t\tBufferedOutputStream dest;\r\n\t\t\r\n\t\twhile((ze = zin.getNextEntry()) != null)\r\n\t\t{\r\n\t\t\tLog.d(tag, \"Zip entry: \" + ze.getName() + \" Size: \"+ ze.getSize());\r\n\t\t\t/*\r\n\t\t\t * Create decompressed file for each Zip entry. A Zip entry can be a file or directory.\r\n\t\t\t * ASSUMPTION: APK Zip entry uses Unix style File seperator- \"/\"\r\n\t\t\t * \r\n\t\t\t * 1. Create the prefix Zip Entry folder, if it is not yet available\r\n\t\t\t * 2. Create the individual Zip Entry file.\r\n\t\t\t */\r\n\t\t\tString zeName = ze.getName();\r\n\t\t\tString zeFolder = zeName;\r\n\t\t\t\r\n\t\t\tif(ze.isDirectory())\r\n\t\t\t{\r\n\t\t\t\tzeName = null; // Don't create Zip Entry file\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tif(zeName.indexOf(\"/\") == -1) // Zip entry uses \"/\"\r\n\t\t\t\t\tzeFolder = null; // It is File. don't create Zip entry Folder\r\n\t\t\t\telse {\r\n\t\t\t\t\tzeFolder = zeName.substring(0, zeName.lastIndexOf(\"/\"));\r\n\t\t\t\t\tzeName = zeName.substring( zeName.lastIndexOf(\"/\") + 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tLog.d(tag, \"zeFolder: \"+ zeFolder +\" zeName: \"+ zeName);\r\n\t\t\t\r\n\t\t\t// Create Zip Entry Folder\r\n\t\t\tFile zeFile = extractFolder;\r\n\t\t\tif(zeFolder != null)\r\n\t\t\t{\r\n\t\t\t\tzeFile = new File(extractFolder.getPath() + File.separator + zeFolder);\r\n\t\t\t\tif(!zeFile.exists())\r\n\t\t\t\t\tzeFile.mkdirs();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Create Zip Entry File\r\n\t\t\tif(zeName == null)\r\n\t\t\t\tcontinue;\r\n\t\t\t\r\n\t\t\t// Keep track of XML files, they are in Android Binary XML format\r\n\t\t\tif(zeName.endsWith(\".xml\"))\r\n\t\t\t\txmlFiles.add(zeFile.getPath() + File.separator + zeName);\r\n\t\t\t\r\n\t\t\t// Keep track of the Dex/ODex file. Need to convert to Jar\r\n\t\t\tif(zeName.endsWith(\".dex\") || zeName.endsWith(\".odex\"))\r\n\t\t\t\tdexFile = zeFile.getPath() + File.separator + zeName;\r\n\t\t\t\r\n\t\t\t// Keep track of Resources.arsc file- resources.arsc\r\n\t\t\tif(zeName.endsWith(\".arsc\"))\r\n\t\t\t\tresFile = zeFile.getPath() + File.separator + zeName;\r\n\t\t\t\r\n\t\t\t// Write Zip entry File to the disk\r\n\t\t\tint count;\r\n\t\t\tbyte data[] = new byte[BUFFER];\r\n\t\t\t\r\n\t\t\tFileOutputStream fos = new FileOutputStream(zeFile.getPath() + File.separator + zeName);\r\n\t\t\tdest = new BufferedOutputStream(fos, BUFFER);\r\n\r\n\t\t\twhile ((count = zin.read(data, 0, BUFFER)) != -1) \r\n\t\t\t{\r\n\t\t\t\tdest.write(data, 0, count);\r\n\t\t\t}\r\n\t\t\tdest.flush();\r\n\t\t\tdest.close();\r\n\t\t}\r\n\r\n\t\t// Close Zip InputStream\r\n\t\tzin.close();\r\n\t\tfin.close();\r\n\t}", "public String addDirectory(String dir)\n\t{\n\t\tString dirn= this.sysdir + File.separator + dir;\n\t\tFile f= new File(dirn);\n\t\tif( !f.exists() )\n\t\t\tf.mkdirs();\n\t\t\n\t\tsynchronized( syncFiles ) // get Intermediate-Data access for the key \n\t\t{\n\t\t\twhile( syncFileswait )\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tsyncFiles.wait();\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tsyncFileswait= true;\n\t\t\t\n\t\t\tfiles.put(dir, dirn);\n\t\t\t\n\t\t\tsyncFileswait= false;\n\t\t\tsyncFiles.notifyAll();\n\t\t}\n\t\t\n\t\treturn dirn;\n\t}", "public static final void unzip(String zipfileName, String baseOutputDir) {\r\n Enumeration entries;\r\n ZipFile zipFile;\r\n try {\r\n zipFile = new ZipFile(zipfileName);\r\n entries = zipFile.entries();\r\n while (entries.hasMoreElements()) {\r\n ZipEntry entry = (ZipEntry) entries.nextElement();\r\n String entryName = entry.getName();\r\n String theName = baseOutputDir + '/' + entryName;\r\n if (entry.isDirectory()) {\r\n // Assume directories are stored parents first then children.\r\n System.out.println(\"Extracting directory: \" + entry.getName());\r\n // This is not robust, just for demonstration purposes.\r\n (new File(theName)).mkdirs();\r\n continue;\r\n }\r\n //(new File(theName)).mkdirs();\r\n forceParentDirectories(theName);\r\n System.out.println(\"Extracting file: \" + theName);\r\n copyInputStream(zipFile.getInputStream(entry), new BufferedOutputStream(new FileOutputStream(theName)));\r\n }\r\n zipFile.close();\r\n } catch (Exception ioe) {\r\n System.err.println(\"Unhandled exception:\");\r\n ioe.printStackTrace();\r\n return;\r\n }\r\n }", "public static void zip(File src, File destDir, String charSetName, boolean includeSrc) throws IOException {\n\t\tString fileName = src.getName();\n\t\tif (!src.isDirectory()) {\n\t\t\tint pos = fileName.lastIndexOf(\".\");\n\t\t\tif (pos > 0) {\n\t\t\t\tfileName = fileName.substring(0, pos);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfileName += \".zip\";\n\t\tensureDirectory(destDir);\n\t\t\n\t\tFile zippedFile = new File(destDir, fileName);\n\t\tif (!zippedFile.exists())\n\t\t\tzippedFile.createNewFile();\n\t\t\n\t\tzip(src, new FileOutputStream(zippedFile), charSetName, includeSrc);\n\t}", "public AddContentToZip path(final String path) {\n\t\t\tthis.path = path;\n\t\t\treturn this;\n\t\t}", "private static void rAddFilesToArray(File workingDirectory, ArrayList<File> result) {\n File[] fileList = workingDirectory.listFiles();\n if (fileList == null) return;\n for (File file : fileList) {\n String name = file.getName();\n int lastDotIndex = name.lastIndexOf('.');\n String ext = (lastDotIndex == -1) ? \"\" : name.substring(lastDotIndex + 1);\n if (file.isDirectory())\n rAddFilesToArray(file, result);\n if (!file.equals(remainderFile) && ext.equals(\"xml\")) {\n result.add(file);\n }\n }\n }", "public void unzip(File f) throws Exception {\r\n String destDir = workplace + \"/temp/\";\r\n File tmp = new File(destDir);\r\n if(!tmp.exists())tmp.mkdir();\r\n byte b[] = new byte [1024];\r\n int length;\r\n \r\n ZipFile zipFile;\r\n zipFile = new ZipFile(f);\r\n Enumeration enumeration = zipFile.entries();\r\n ZipEntry zipEntry = null ;\r\n OutputStream outputStream = null;\r\n InputStream inputStream = null;\r\n while (enumeration.hasMoreElements()) {\r\n zipEntry = (ZipEntry) enumeration.nextElement();\r\n File loadFile = new File(destDir + zipEntry.getName());\r\n if (zipEntry.isDirectory()) {\r\n // 这段都可以不要,因为每次都貌似从最底层开始遍历的\r\n loadFile.mkdirs();\r\n }else{\r\n if (!loadFile.getParentFile().exists())\r\n loadFile.getParentFile().mkdirs();\r\n outputStream = new FileOutputStream(loadFile);\r\n inputStream = zipFile.getInputStream(zipEntry);\r\n while ((length = inputStream.read(b)) > 0)\r\n outputStream.write(b, 0, length);\r\n }\r\n }\r\n outputStream.flush();\r\n outputStream.close();\r\n inputStream.close();\r\n }", "private static void createZipOrXmlFile(Document createdDocument) {\n if(attachmentList.size() > 0){\n File zipFile = new File(OUTPUT_ZIP_PATH);\n ZipOutputStream zipOutputStream = null;\n String fileName;\n byte[] decoded;\n\n try {\n zipOutputStream = new ZipOutputStream(new FileOutputStream(zipFile));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n for (Attachment attachment : attachmentList) {\n try {\n //create a new zip entry\n //add the zip entry and write the decoded data\n assert zipOutputStream != null;\n fileName = attachment.filename;\n decoded = attachment.data;\n ZipEntry imageOutputStream = new ZipEntry(ImportUtils.PHOTO_FILE_PATH + fileName);\n zipOutputStream.putNextEntry(imageOutputStream);\n zipOutputStream.write(decoded);\n\n } catch (IllegalArgumentException | IOException e) {\n e.printStackTrace();\n }\n }\n //add the xml after the attachments have been added\n ZipEntry xmlOutputStream = new ZipEntry(ImportUtils.GENERATED_XML_FILENAME);\n try {\n zipOutputStream.putNextEntry(xmlOutputStream);\n zipOutputStream.write(Entry.toBytes(createdDocument));\n //closing the stream\n //! not closing the stream can result in malformed zip files\n zipOutputStream.finish();\n zipOutputStream.flush();\n zipOutputStream.closeEntry();\n } catch (IOException e) {\n e.printStackTrace();\n\n }\n }else{\n //if no attachments found\n // add the xml file only\n OutputFormat format = OutputFormat.createPrettyPrint();\n try {\n OutputStream outputStream = new FileOutputStream(OUTPUT_XML_PATH);\n XMLWriter writer = new XMLWriter(outputStream, format);\n writer.write(createdDocument);\n } catch (IOException e ) {\n e.printStackTrace();\n }\n }\n }", "protected void addFiles(Vector v, ZipOutputStream zOut, String prefix)\n throws IOException {\n for (int i=0; i<v.size(); i++) {\n FileSet fs = (FileSet) v.elementAt(i);\n DirectoryScanner ds = fs.getDirectoryScanner(project);\n addFiles(ds, zOut, prefix);\n }\n }", "public static boolean zipFiles(String folder, OutputStream os) {\n\n String look1 = folder + File.separator + SHARED_FOLDER;\n List<File> fileList = new ArrayList<File>();\n getAllFiles(new File(look1), fileList);\n\n\n /**\n * Zip to output stream (could be File or Drive)\n */\n try {\n ZipOutputStream zos = new ZipOutputStream(os);\n\n for (File file : fileList) {\n if (!file.isDirectory()) { // we only zip files, not directories\n\n // put files starting from app's top level folder\n FileInputStream fis = new FileInputStream(file);\n String filetoSave = SHARED_FOLDER + File.separator + file.getName();\n ZipEntry zipEntry = new ZipEntry(filetoSave);\n zos.putNextEntry(zipEntry);\n\n byte[] bytes = new byte[4096];\n int length;\n while ((length = fis.read(bytes)) >= 0) {\n zos.write(bytes, 0, length);\n }\n\n zos.closeEntry();\n fis.close();\n }\n }\n zos.close();\n } catch (Exception e) {\n return false;\n }\n return true;\n }", "@Override\n protected NodeInfo createDirectoryEntry(NodeInfo parentEntry, Path dir) throws IOException {\n return drive.createFolder(parentEntry.getId(), toFilenameString(dir));\n }", "public static void saveToZip(String path) throws FileNotFoundException, IOException {\n //File and Zip Outoput Streams \n FileOutputStream fos = new FileOutputStream(path);\n ZipOutputStream zipOS = new ZipOutputStream(fos);\n //For every image, we create a temporally jpeg file\n //Then, with the createFileToZip function, we include it to the output zip file\n //Finally, we delete the jpeg image\n for (int i =0; i< imageNames.size(); i++) {\n File tempImage = new File(\"image_\"+Integer.toString(i)+\".jpg\");\n ImageIO.write(imageDict.get(imageNames.get(i)),\"jpg\",tempImage);\n createFileToZip(imageDict.get(imageNames.get(i)),\"image_\",i,zipOS);\n tempImage.delete();\n }\n zipOS.finish(); //Good practice!\n zipOS.close();\n }", "public void zipFiles() {\r\n byte[] buffer = new byte[1024];\r\n try {\r\n\r\n // On rare occasions, there will be a semi colon in the title name,\r\n // ruining everything while zipping the file.\r\n if (title.contains(\":\") || title.contains(\".\")) {\r\n String temp = \"\";\r\n for (int i = 0; i < title.length(); i++) {\r\n \r\n if (title.charAt(i) == ':' || title.charAt(i) == '.') {\r\n \r\n } else {\r\n temp += title.charAt(i);\r\n }\r\n }\r\n title = temp;\r\n }\r\n System.out.println(\"File name: \" + title);\r\n \r\n FileOutputStream fos = new FileOutputStream(savePath + \"\\\\\" + title + \".zip\");\r\n ZipOutputStream zos = new ZipOutputStream(fos);\r\n \r\n for (String fileName : fileNames) {\r\n \r\n System.out.println(\"zipping file: \" + fileName);\r\n \r\n fileName = savePath + \"\\\\\" + fileName;\r\n File srcFile = new File(fileName);\r\n FileInputStream fis;\r\n if (srcFile.exists()) {\r\n fis = new FileInputStream(srcFile);\r\n \r\n zos.putNextEntry(new ZipEntry(srcFile.getName()));\r\n int length;\r\n while ((length = fis.read(buffer)) > 0) {\r\n zos.write(buffer, 0, length);\r\n }\r\n zos.closeEntry();\r\n fis.close();\r\n \r\n boolean success = (new File(fileName)).delete();\r\n }\r\n }\r\n zos.close();\r\n \r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"File not found!\");\r\n } catch (IOException ex) {\r\n }\r\n }", "@Override\r\n public void pack() {\r\n super.pack();\r\n JkFileTree.of(this.classDir()).exclude(\"**/*.jar\").zip().to(packer().jarFile(\"lean\"));\r\n distrib();\r\n }", "private static void createZipArchiv(String xmlStream, String path, String name) {\r\n\t\ttry {\r\n\t\t\tFile file = new File(path, name + \".xml\");\r\n\t\t\tif (!file.exists()) {\r\n\t\t\t\tfile.createNewFile();\r\n\t\t\t}\r\n\t\t\t//XMLStream in Datei schreiben\r\n\t\t\tPrintWriter writer = new PrintWriter(file);\r\n\t\t\twriter.write(xmlStream);\r\n\t\t\twriter.close();\r\n\t\t\t\r\n\t\t\t//Commando für die Shell um ein Tgz zu erstellen.\r\n\t\t\tString[] str = new String[] {\r\n\t\t\t\t\t\"/bin/bash\",\r\n\t\t\t\t\t\"-c\",\r\n\t\t\t\t\t\"tar cfvz \" + path + \"/\" + name + \".tgz -C \" + path + \" \" + name\r\n\t\t\t\t\t\t\t+ \".xml -C \" + path + \" \" + name + \".pdf\" };\r\n\r\n\t\t\t//Shell Aufruf\r\n\t\t\tProcess p = Runtime.getRuntime().exec(str);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tint timeout = 10;\r\n\t\t\twhile (!new File(path + name + \".tgz\").exists() && timeout != 0) {\r\n\t\t\t\t//warten bis Datei erstellt wurde oder 10 sec vergangen sind\r\n\t\t\t\ttry {\r\n\t\t\t\t\ttimeout--;\r\n\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t} catch (InterruptedException 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}\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}", "@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 void addDirectory(String name, IDirectory parent) {\r\n Directory newDir = new Directory(name, (Directory) parent);\r\n ((Directory) parent).addItem(newDir);\r\n }", "public void addFile(String name, IDirectory parent) {\r\n // Create a new file\r\n File newFile = new File(name, (Directory) parent);\r\n ((Directory) parent).addItem(newFile);\r\n }", "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}", "private void getAllJarFiles(File dir, ArrayList fileList)\n\t{\n\t\tif (dir.exists() && dir.isDirectory())\n\t\t{\n\t\t\tFile[] files = dir.listFiles();\n\t\t\tif (files == null)\n\t\t\t\treturn;\n\n\t\t\tfor (int i = 0; i < files.length; i++)\n\t\t\t{\n\t\t\t\tFile file = files[i];\n\t\t\t\tif (file.isFile())\n\t\t\t\t{\n\t\t\t\t\tif (file.getName().endsWith(\".jar\")) //$NON-NLS-1$\n\t\t\t\t\t\tfileList.add(file);\n\t\t\t\t}\n\t\t\t\telse if (file.isDirectory())\n\t\t\t\t{\n\t\t\t\t\tgetAllJarFiles(file, fileList);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private static LinkedList<String> addAllSubDirs(File dir, LinkedList<String> list) {\n\t\tString [] dirListing = dir.list();\n\t\tfor (String subDirName : dirListing) {\n\t\t\tFile subdir = new File(dir.getPath() + System.getProperty(\"file.separator\") + subDirName);\n\t\t\tif (subdir.isDirectory()) {\n\t\t\t\tif (containsJavaFiles(subdir))\n\t\t\t\t\tlist.add(subdir.getPath());\n\t\t\t\tlist = addAllSubDirs(subdir, list);\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "public static ZipOutputStream zipFolder(final Path baseFolder, final OutputStream out) throws IOException {\n\t\tfinal ZipOutputStream zio = new ZipOutputStream(out);\n\t\tzipFile(baseFolder, null, zio, Files.isDirectory(baseFolder), null);\n\t\treturn zio;\n\t}", "public static void generateZip(File file) {\r\n\t\t\r\n\t\tFile zipfile=new File(file.toString().replaceAll(\".xlsx\",\".zip\" ));\r\n\t\tFileOutputStream fos=null;\r\n\t\tZipOutputStream zos=null;\r\n\t\tFileInputStream fin=null;\r\n\t\tZipEntry ze=null; \r\n\t\t\t\r\n\t\tif(!zipfile.exists()){\r\n\t\t\ttry {\r\n\t\t\t\tzipfile.createNewFile();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t//create ZipOutputStream to write to the zipfile\r\n fos=new FileOutputStream(zipfile);\r\n\t\t\t zos=new ZipOutputStream(fos);\r\n\t\t\t \r\n\t\t//add a new Zip Entry to the ZipOutPutStream \r\n\t\t\t ze=new ZipEntry(file.getName());\r\n\t\t\t zos.putNextEntry(ze);\r\n\t\t\t \r\n\t\t//read the file and write to the ZipOutPutStream\t \r\n\t\t\t fin=new FileInputStream(file);\r\n\t\t\t int i;\r\n\t\t\t \r\n\t\t\t while((i=fin.read())!=-1){\r\n\t\t\t\t zos.write(i);\r\n\t\t\t }\r\n\t\t\t\r\n\t\t\t \r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\r\n\t\t\te.printStackTrace();\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}finally{\r\n\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\tif(zos!=null && fos!=null && fin!=null){\r\n\t\t\t\t\ttry {\r\n\t\t\t\t //close the zip entry to write to to zip file\r\n\t\t\t\t\t\tzos.closeEntry();\r\n\t\t\t\t\t//close Resources.\t\r\n\t\t\t\t\t\tzos.close();\r\n\t\t\t\t\t\tfos.close();\r\n\t\t\t\t\t\tfin.close();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t\t\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}", "private File exportAndZip(String siteId, String webappDir) throws Exception {\r\n\tlog.info(\"user [\" + sessionManager.getCurrentSession().getUserEid()\r\n\t\t+ \"] exports site: [\" + siteId + \"]\");\r\n\r\n\t// opening a new temporary zipfile\r\n\tFile zipFile = File.createTempFile(\"osyl-package-export\", \".zip\");\r\n\tZipOutputStream zos =\r\n\t\tnew ZipOutputStream(new FileOutputStream(zipFile));\r\n\r\n\t// retrieving the xml file\r\n\tCOSerialized coSerialized =\r\n\t\tosylSiteService.getCourseOutlineForExport(siteId, webappDir);\r\n\r\n\tbyte[] xmlBytes = coSerialized.getContent().getBytes(\"UTF-8\");\r\n\twriteToZip(zos, OsylManagerService.CO_XML_FILENAME, xmlBytes);\r\n\r\n\t// retrieving other resources\r\n\tString resourceDir = contentHostingService.getSiteCollection(siteId);\r\n\r\n\ttry {\r\n\t ContentCollection workContent =\r\n\t\t contentHostingService.getCollection(resourceDir);\r\n\t // recursively retrieve all files\r\n\t retrieveFiles(zos, workContent, resourceDir);\r\n\t} catch (Exception e) {\r\n\t log.error(e);\r\n\t e.printStackTrace();\r\n\t throw new Exception(\"Cannot retrieve files in site for zipping\", e);\r\n\t}\r\n\tzos.close();\r\n\treturn zipFile;\r\n }", "private static void createDirectory(Path path) throws IOException {\n\t\ttry {\n\t\t\tFiles.createDirectory(path);\n\t\t} catch (FileAlreadyExistsException e) {\n\t\t\tif (!Files.isDirectory(path)) {\n\t\t\t\tthrow e;\n\t\t\t}\n\t\t}\n\t}", "private void createDirectory(String path) throws IOException {\n\t\tfinal Path p = Paths.get(path);\n\t\tif (!fileExists(p)) {\n\t\t\tFiles.createDirectory(p);\n\t\t}\n\t}", "public static void zipFilesTo(File[] files, String destDir, String destFile) throws FileNotFoundException, IOException {\n\n\t\tFile dirFile = new File(destDir);\n\n\t\tif (!dirFile.exists()) {\n\t\t\tdirFile.mkdirs();\n\t\t}\n\n\t\tString[] strs = new String[files.length];\n\n\t\tfor (int i = 0; i < strs.length; i++) {\n\t\t\tstrs[i] = files[i].getAbsolutePath();\n\t\t}\n\n\t\tCompressFile.instance.zip(strs, destDir + destFile + \".zip\");\n\t}", "public static void m97139a(File file, ZipOutputStream zipOutputStream, String str) throws IOException {\n if (file.exists()) {\n if (file.isDirectory()) {\n String name = file.getName();\n if (!name.endsWith(File.separator)) {\n name = name + File.separator;\n }\n if (!TextUtils.isEmpty(str)) {\n name = str + name;\n }\n File[] listFiles = file.listFiles();\n if (listFiles == null || listFiles.length <= 0) {\n zipOutputStream.putNextEntry(new ZipEntry(name));\n zipOutputStream.closeEntry();\n return;\n }\n for (File file2 : listFiles) {\n m97139a(file2, zipOutputStream, name);\n }\n return;\n }\n zipOutputStream.putNextEntry(new ZipEntry(TextUtils.isEmpty(str) ? file.getName() : str + file.getName()));\n FileInputStream fileInputStream = new FileInputStream(file);\n byte[] bArr = new byte[4096];\n while (true) {\n int read = fileInputStream.read(bArr);\n if (read != -1) {\n zipOutputStream.write(bArr, 0, read);\n } else {\n zipOutputStream.flush();\n fileInputStream.close();\n zipOutputStream.closeEntry();\n return;\n }\n }\n } else {\n return;\n }\n throw th;\n }", "protected void createFile (ZipFile file, ZipEntry entry, File target)\n {\n if (_buffer == null) {\n _buffer = new byte[COPY_BUFFER_SIZE];\n }\n\n // make sure the file's parent directory exists\n File pdir = target.getParentFile();\n if (!pdir.exists() && !pdir.mkdirs()) {\n log.warning(\"Failed to create parent for '\" + target + \"'.\");\n }\n\n try (InputStream in = file.getInputStream(entry);\n FileOutputStream fout = new FileOutputStream(target)) {\n\n int total = 0, read;\n while ((read = in.read(_buffer)) != -1) {\n total += read;\n fout.write(_buffer, 0, read);\n updateProgress(total);\n }\n\n } catch (IOException ioe) {\n log.warning(\"Error creating '\" + target + \"': \" + ioe);\n }\n }", "public void unzip(String zipFilePath, String destDirectory) throws IOException {\n File destDir = new File(destDirectory);\n if (!destDir.exists()) {\n destDir.mkdir();\n }\n ZipInputStream zipIn = new ZipInputStream(new FileInputStream(zipFilePath));\n ZipEntry entry = zipIn.getNextEntry();\n // iterates over entries in the zip file\n while (entry != null) {\n String filePath = destDirectory + \"\\\\\" + entry.getName();\n if (!entry.isDirectory()) {\n // if the entry is a file, extracts it\n extractFile(zipIn, filePath);\n } else {\n // if the entry is a directory, make the directory\n File dir = new File(filePath);\n dir.mkdir();\n }\n zipIn.closeEntry();\n entry = zipIn.getNextEntry();\n }\n zipIn.close();\n }" ]
[ "0.7360323", "0.7290416", "0.7046738", "0.7038398", "0.6905904", "0.6853367", "0.66323924", "0.653444", "0.6530506", "0.6503569", "0.63899386", "0.63875747", "0.63197666", "0.6286412", "0.6237979", "0.62353516", "0.62337846", "0.62147176", "0.6121039", "0.61187696", "0.6110642", "0.609375", "0.6048085", "0.60458183", "0.59584266", "0.59411925", "0.58523965", "0.58488137", "0.5835937", "0.5808555", "0.58059484", "0.5800091", "0.57576144", "0.5734085", "0.57301235", "0.5723968", "0.5706991", "0.57038504", "0.56991404", "0.5697004", "0.5657227", "0.5624932", "0.56069756", "0.5596743", "0.55745274", "0.5561545", "0.55494195", "0.5549077", "0.5546999", "0.55211383", "0.5487999", "0.5461193", "0.5425088", "0.5376581", "0.537315", "0.53550166", "0.53546804", "0.5350712", "0.5318323", "0.53015995", "0.5293083", "0.52874804", "0.52823037", "0.5271563", "0.52661794", "0.52628094", "0.5235529", "0.521221", "0.5196111", "0.51945454", "0.51770914", "0.51691836", "0.5146337", "0.5131067", "0.5127897", "0.51253617", "0.5093327", "0.50931805", "0.5084163", "0.5083566", "0.50765634", "0.50745076", "0.5071199", "0.50705236", "0.5069441", "0.5066395", "0.5054952", "0.50535905", "0.5044537", "0.5039353", "0.5035893", "0.50318253", "0.50241166", "0.5021958", "0.500801", "0.50069046", "0.5003813", "0.50023687", "0.49805805", "0.49688303" ]
0.7073343
2
Unzip a zipFile into a directory
public static void unzip(File targetDir,File zipFile) throws ZipException, IOException{ ZipFile zip = new ZipFile(zipFile); @SuppressWarnings("unchecked") Enumeration<ZipEntry> z = (Enumeration<ZipEntry>) zip.entries(); while(z.hasMoreElements()){ ZipEntry entry = z.nextElement(); File f = new File(targetDir, entry.getName()); if(f.isDirectory()){ if(!f.exists()) f.mkdirs(); }else{ f.getParentFile().mkdirs(); InputStream in = zip.getInputStream(entry); if(f.getPath().contains("__MACOSX")) continue; BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(f)); IOUtils.copy(in, out); in.close(); out.flush(); out.close(); } } zip.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void unzipDownloadedFile(String zipFile) throws ZipException, IOException{\n\t int BUFFER = 2048;\n\t \n\t // get zip file\n\t File file = new File(zipFile);\n\t ZipFile zip = new ZipFile(file);\n\t \n\t // unzip to directory of the same name\n\t // When sip is a directory, this gets two folders\n\t //String newPath = zipFile.substring(0, zipFile.length() - 4);\n\t //new File(newPath).mkdir();\n\t \n\t // unzip to parent directory of the zip file\n\t // This is assuming zip if of a directory\n\t String newPath = file.getParent();\n\t \n\t // Process each entry\n\t Enumeration<? extends ZipEntry> zipFileEntries = zip.entries();\n\t while (zipFileEntries.hasMoreElements())\n\t {\n\t // grab a zip file entry\n\t ZipEntry entry = (ZipEntry) zipFileEntries.nextElement();\n\t String currentEntry = entry.getName();\n\t File destFile = new File(newPath, currentEntry);\n\t File destinationParent = destFile.getParentFile();\n\n\t // create the parent directory structure if needed\n\t destinationParent.mkdirs();\n\n\t if (!entry.isDirectory())\n\t {\n\t BufferedInputStream is = new BufferedInputStream(zip.getInputStream(entry));\n\t int currentByte;\n\t // establish buffer for writing file\n\t byte data[] = new byte[BUFFER];\n\n\t // write the current file to disk\n\t FileOutputStream fos = new FileOutputStream(destFile);\n\t BufferedOutputStream dest = new BufferedOutputStream(fos,\n\t BUFFER);\n\n\t // read and write until last byte is encountered\n\t while ((currentByte = is.read(data, 0, BUFFER)) != -1) {\n\t dest.write(data, 0, currentByte);\n\t }\n\t dest.flush();\n\t dest.close();\n\t is.close();\n\t }\n\n\t if (currentEntry.endsWith(\".zip\"))\n\t {\n\t // found a zip file, try to open\n\t \tunzipDownloadedFile(destFile.getAbsolutePath());\n\t }\n\t }\n\t zip.close();\n\t}", "public void toUnzip(String zipFile, String targetDir) {\n\n\t\tMessage message = new Message();\n\t\tmessage.what = SUCCESS;\n\n\t\tint SIZE = 4096; // buffer size: 4KB\n\t\tString strEntry; // each zip entry name\n\t\ttry {\n\t\t\tBufferedOutputStream dest = null; // buffer output stream\n\t\t\tFileInputStream fis = new FileInputStream(zipFile);\n\t\t\tZipInputStream zis = new ZipInputStream(\n\t\t\t\t\tnew BufferedInputStream(fis));\n\t\t\tZipEntry entry; // each zip entry\n\t\t\twhile ((entry = zis.getNextEntry()) != null) {\n\t\t\t\ttry {\n\t\t\t\t\tint count;\n\t\t\t\t\tbyte data[] = new byte[SIZE];\n\t\t\t\t\tstrEntry = entry.getName();\n\n\t\t\t\t\tFile entryFile = new File(targetDir + strEntry);\n\t\t\t\t\tFile entryDir = new File(entryFile.getParent());\n\t\t\t\t\tif (!entryDir.exists()) {\n\t\t\t\t\t\tentryDir.mkdirs();\n\t\t\t\t\t}\n\n\t\t\t\t\tFileOutputStream fos = new FileOutputStream(entryFile);\n\t\t\t\t\tdest = new BufferedOutputStream(fos, SIZE);\n\t\t\t\t\twhile ((count = zis.read(data, 0, SIZE)) != -1) {\n\t\t\t\t\t\tdest.write(data, 0, count);\n\n\t\t\t\t\t\tMessage msg = Message.obtain();\n\t\t\t\t\t\tmsg.what = PROGRESS;\n\t\t\t\t\t\tmsg.obj = count;\n\t\t\t\t\t\thandler.sendMessage(msg);\n\t\t\t\t\t}\n\t\t\t\t\tdest.flush();\n\t\t\t\t\tdest.close();\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\tmessage.what = ERROR;\n\t\t\t\t\tmessage.obj = ex.getMessage();\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tzis.close();\n\t\t\tFile fileszipe = new File(zipFile);\n\t\t\tfileszipe.delete();\n\t\t} catch (Exception cwj) {\n\t\t\tmessage.what = ERROR;\n\t\t\tmessage.obj = cwj.getMessage();\n\t\t\tcwj.printStackTrace();\n\t\t}\n\t\thandler.sendMessage(message);\n\t}", "public static final void unzip(String zipfileName, String baseOutputDir) {\r\n Enumeration entries;\r\n ZipFile zipFile;\r\n try {\r\n zipFile = new ZipFile(zipfileName);\r\n entries = zipFile.entries();\r\n while (entries.hasMoreElements()) {\r\n ZipEntry entry = (ZipEntry) entries.nextElement();\r\n String entryName = entry.getName();\r\n String theName = baseOutputDir + '/' + entryName;\r\n if (entry.isDirectory()) {\r\n // Assume directories are stored parents first then children.\r\n System.out.println(\"Extracting directory: \" + entry.getName());\r\n // This is not robust, just for demonstration purposes.\r\n (new File(theName)).mkdirs();\r\n continue;\r\n }\r\n //(new File(theName)).mkdirs();\r\n forceParentDirectories(theName);\r\n System.out.println(\"Extracting file: \" + theName);\r\n copyInputStream(zipFile.getInputStream(entry), new BufferedOutputStream(new FileOutputStream(theName)));\r\n }\r\n zipFile.close();\r\n } catch (Exception ioe) {\r\n System.err.println(\"Unhandled exception:\");\r\n ioe.printStackTrace();\r\n return;\r\n }\r\n }", "private void unzip(File zipFile, File targetDirectory) throws LpException {\n try {\n final ZipFile zip = new ZipFile(zipFile);\n if (zip.isEncrypted()) {\n throw new LpException(\"File is encrypted: {}\",\n zipFile.getName());\n }\n zip.extractAll(targetDirectory.toString());\n } catch (ZipException ex) {\n throw new LpException(\"Extraction failure: {}\",\n zipFile.getName(), ex);\n }\n }", "public static void unZip(String zipFilePath, String outPath) throws Exception {\n unZip(new FileInputStream(zipFilePath), outPath);\n }", "public void unzip(String _zipFile, String _targetLocation) {\n dirChecker(_targetLocation);\n\n try {\n FileInputStream fin = new FileInputStream(_zipFile);\n ZipInputStream zin = new ZipInputStream(fin);\n ZipEntry ze = null;\n while ((ze = zin.getNextEntry()) != null) {\n\n //create dir if required while unzipping\n if (ze.isDirectory()) {\n dirChecker(ze.getName());\n } else {\n FileOutputStream fout = new FileOutputStream(_targetLocation + ze.getName());\n for (int c = zin.read(); c != -1; c = zin.read()) {\n fout.write(c);\n }\n\n zin.closeEntry();\n fout.close();\n }\n\n }\n zin.close();\n } catch (Exception e) {\n System.out.println(e);\n }\n }", "public void unzip(String zipFilePath, String destDirectory) throws IOException {\n File destDir = new File(destDirectory);\n if (!destDir.exists()) {\n destDir.mkdir();\n }\n ZipInputStream zipInputStream = new ZipInputStream(new FileInputStream(zipFilePath));\n ZipEntry ZipEntry = zipInputStream.getNextEntry();\n\t\twhile (ZipEntry != null) {\n String fileName = ZipEntry.getName();\n\t\t\tString filePath = destDirectory + File.separator + fileName;\n if (!ZipEntry.isDirectory() && fileName.endsWith(\".jar\")) {\n extractFile(zipInputStream, filePath);\n } \n zipInputStream.closeEntry();\n ZipEntry = zipInputStream.getNextEntry();\n }\n zipInputStream.close();\n }", "public void unzip(String zipFilePath, String destDirectory) throws IOException {\n File destDir = new File(destDirectory);\n if (!destDir.exists()) {\n destDir.mkdir();\n }\n ZipInputStream zipIn = new ZipInputStream(new FileInputStream(zipFilePath));\n ZipEntry entry = zipIn.getNextEntry();\n // iterates over entries in the zip file\n while (entry != null) {\n String filePath = destDirectory + \"\\\\\" + entry.getName();\n if (!entry.isDirectory()) {\n // if the entry is a file, extracts it\n extractFile(zipIn, filePath);\n } else {\n // if the entry is a directory, make the directory\n File dir = new File(filePath);\n dir.mkdir();\n }\n zipIn.closeEntry();\n entry = zipIn.getNextEntry();\n }\n zipIn.close();\n }", "public void unZip(String fileName, String unZipTarget) throws IOException {\n this.unzipFileTargetLocation = unZipTarget;\n dirsMade = new TreeSet();\n zippy = new ZipFile(fileName);\n Enumeration all = zippy.entries();\n while (all.hasMoreElements()) {\n getFile((ZipEntry) all.nextElement());\n }\n }", "public static void unzip(File zipFile, File destDir) throws IOException {\n BufferedOutputStream dest = null;\n FileInputStream fis = new FileInputStream(zipFile);\n ZipInputStream zis = new ZipInputStream(new BufferedInputStream(fis));\n ZipEntry entry;\n while ((entry = zis.getNextEntry()) != null) {\n if (log.isDebugEnabled()) {\n log.debug(\"Extracting: \" + entry);\n }\n int count;\n byte[] data = new byte[BUFFER_SIZE];\n FileOutputStream fos = new FileOutputStream(destDir.getAbsolutePath() + \"/\" + entry.getName());\n dest = new BufferedOutputStream(fos, BUFFER_SIZE);\n while ((count = zis.read(data, 0, BUFFER_SIZE)) != -1) {\n dest.write(data, 0, count);\n }\n dest.flush();\n dest.close();\n }\n zis.close();\n }", "public static void unzip(String zipFilePath, String destDirectory) throws IOException {\n File destDir = new File(destDirectory);\n if (!destDir.exists()) {\n destDir.mkdir();\n }\n ZipInputStream zipIn = new ZipInputStream(new FileInputStream(zipFilePath));\n ZipEntry entry = zipIn.getNextEntry();\n // iterates over entries in the zip file\n while (entry != null) {\n String filePath = destDirectory + File.separator + entry.getName();\n if (!entry.isDirectory()) {\n // if the entry is a file, extracts it\n extractFile(zipIn, filePath);\n } else {\n // if the entry is a directory, make the directory\n File dir = new File(filePath);\n dir.mkdir();\n }\n zipIn.closeEntry();\n entry = zipIn.getNextEntry();\n }\n zipIn.close();\n }", "public static void unzip(String zipFilePath, String destDirectory) throws IOException {\n File destDir = new File(destDirectory);\n if (!destDir.exists()) {\n destDir.mkdir();\n }\n ZipInputStream zipIn = new ZipInputStream(new FileInputStream(zipFilePath));\n ZipEntry entry = zipIn.getNextEntry();\n // iterates over entries in the zip file\n while (entry != null) {\n String filePath = destDirectory + File.separator + entry.getName();\n if (!entry.isDirectory()) {\n // if the entry is a file, extracts it\n extractFile(zipIn, filePath);\n } else {\n // if the entry is a directory, make the directory\n File dir = new File(filePath);\n dir.mkdir();\n }\n zipIn.closeEntry();\n entry = zipIn.getNextEntry();\n }\n zipIn.close();\n }", "public static void extractZipArchive(byte[] zipFileData, String directory) throws IOException {\n new File(directory).mkdirs();\n // get the zip file content\n ZipInputStream inputStream = new ZipInputStream(new ByteArrayInputStream(zipFileData));\n // get the zipped file list entry\n ZipEntry zipEntry = inputStream.getNextEntry();\n byte[] buffer = new byte[BUFFER_SIZE];\n while (zipEntry != null) {\n if (!zipEntry.isDirectory()) {\n String fileName = zipEntry.getName();\n File newFile = new File(directory + File.separator + fileName);\n new File(newFile.getParent()).mkdirs();\n\n FileOutputStream fos = new FileOutputStream(newFile);\n\n int len;\n while ((len = inputStream.read(buffer)) > 0) {\n fos.write(buffer, 0, len);\n }\n\n fos.close();\n\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"File unzipped: \" + newFile.getAbsoluteFile());\n }\n }\n zipEntry = inputStream.getNextEntry();\n }\n inputStream.closeEntry();\n inputStream.close();\n }", "public void unZip(String apkFile) throws Exception \r\n\t{\r\n\t\tLog.p(tag, apkFile);\r\n\t\tFile file = new File(apkFile);\r\n\t\r\n\t\t/*\r\n\t\t * Create the Base Directory, whose name should be same as Zip file name.\r\n\t\t * All decompressed contents will be placed under this folder.\r\n\t\t */\r\n\t\tString apkFileName = file.getName();\r\n\t\t\r\n\t\tif(apkFileName.indexOf('.') != -1)\r\n\t\t\tapkFileName = apkFileName.substring(0, apkFileName.indexOf('.'));\r\n\t\t\r\n\t\tLog.d(tag, \"Folder name: \"+ apkFileName);\r\n\t\t\r\n\t\tFile extractFolder = new File((file.getParent() == null ? \"\" : file.getParent() + File.separator) + apkFileName);\r\n\t\tif(!extractFolder.exists())\r\n\t\t\textractFolder.mkdir();\r\n\t\t\r\n\t\t/*\r\n\t\t * Read zip entries.\r\n\t\t */\r\n\t\tFileInputStream fin = new FileInputStream(apkFile);\r\n\t\tZipInputStream zin = new ZipInputStream(new BufferedInputStream(fin));\r\n\t\t\r\n\t\t/*\r\n\t\t * Zip InputStream shifts its index to every Zip entry when getNextEntry() is called.\r\n\t\t * If this method returns null, Zip InputStream reaches EOF.\r\n\t\t */\r\n\t\tZipEntry ze = null;\r\n\t\tBufferedOutputStream dest;\r\n\t\t\r\n\t\twhile((ze = zin.getNextEntry()) != null)\r\n\t\t{\r\n\t\t\tLog.d(tag, \"Zip entry: \" + ze.getName() + \" Size: \"+ ze.getSize());\r\n\t\t\t/*\r\n\t\t\t * Create decompressed file for each Zip entry. A Zip entry can be a file or directory.\r\n\t\t\t * ASSUMPTION: APK Zip entry uses Unix style File seperator- \"/\"\r\n\t\t\t * \r\n\t\t\t * 1. Create the prefix Zip Entry folder, if it is not yet available\r\n\t\t\t * 2. Create the individual Zip Entry file.\r\n\t\t\t */\r\n\t\t\tString zeName = ze.getName();\r\n\t\t\tString zeFolder = zeName;\r\n\t\t\t\r\n\t\t\tif(ze.isDirectory())\r\n\t\t\t{\r\n\t\t\t\tzeName = null; // Don't create Zip Entry file\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tif(zeName.indexOf(\"/\") == -1) // Zip entry uses \"/\"\r\n\t\t\t\t\tzeFolder = null; // It is File. don't create Zip entry Folder\r\n\t\t\t\telse {\r\n\t\t\t\t\tzeFolder = zeName.substring(0, zeName.lastIndexOf(\"/\"));\r\n\t\t\t\t\tzeName = zeName.substring( zeName.lastIndexOf(\"/\") + 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tLog.d(tag, \"zeFolder: \"+ zeFolder +\" zeName: \"+ zeName);\r\n\t\t\t\r\n\t\t\t// Create Zip Entry Folder\r\n\t\t\tFile zeFile = extractFolder;\r\n\t\t\tif(zeFolder != null)\r\n\t\t\t{\r\n\t\t\t\tzeFile = new File(extractFolder.getPath() + File.separator + zeFolder);\r\n\t\t\t\tif(!zeFile.exists())\r\n\t\t\t\t\tzeFile.mkdirs();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Create Zip Entry File\r\n\t\t\tif(zeName == null)\r\n\t\t\t\tcontinue;\r\n\t\t\t\r\n\t\t\t// Keep track of XML files, they are in Android Binary XML format\r\n\t\t\tif(zeName.endsWith(\".xml\"))\r\n\t\t\t\txmlFiles.add(zeFile.getPath() + File.separator + zeName);\r\n\t\t\t\r\n\t\t\t// Keep track of the Dex/ODex file. Need to convert to Jar\r\n\t\t\tif(zeName.endsWith(\".dex\") || zeName.endsWith(\".odex\"))\r\n\t\t\t\tdexFile = zeFile.getPath() + File.separator + zeName;\r\n\t\t\t\r\n\t\t\t// Keep track of Resources.arsc file- resources.arsc\r\n\t\t\tif(zeName.endsWith(\".arsc\"))\r\n\t\t\t\tresFile = zeFile.getPath() + File.separator + zeName;\r\n\t\t\t\r\n\t\t\t// Write Zip entry File to the disk\r\n\t\t\tint count;\r\n\t\t\tbyte data[] = new byte[BUFFER];\r\n\t\t\t\r\n\t\t\tFileOutputStream fos = new FileOutputStream(zeFile.getPath() + File.separator + zeName);\r\n\t\t\tdest = new BufferedOutputStream(fos, BUFFER);\r\n\r\n\t\t\twhile ((count = zin.read(data, 0, BUFFER)) != -1) \r\n\t\t\t{\r\n\t\t\t\tdest.write(data, 0, count);\r\n\t\t\t}\r\n\t\t\tdest.flush();\r\n\t\t\tdest.close();\r\n\t\t}\r\n\r\n\t\t// Close Zip InputStream\r\n\t\tzin.close();\r\n\t\tfin.close();\r\n\t}", "static void unzip(String zipFilePath, String destDirectory, boolean recursive, boolean teacherZip) throws IOException {\n\n if (students == null) {\n students = new ArrayList<Student>();\n }\n\n ZipInputStream zipIn = null;\n\n try {\n zipIn = new ZipInputStream(new FileInputStream(zipFilePath));\n ZipEntry entry = zipIn.getNextEntry();\n\n // iterates over entries in the zip file\n while (entry != null) {\n createFiles(destDirectory, zipIn, entry, recursive);\n\n zipIn.closeEntry();\n entry = zipIn.getNextEntry();\n }\n\n } catch (IOException e) {\n System.err.println(e.getMessage());\n Errors.setUnzipperError(true);\n\n } finally {\n if (zipIn != null) {\n zipIn.close();\n }\n }\n }", "private static void extract (Path zipPath, Path destination)\n\t\tthrows IOException\n\t{\n\t\tif (Files.isDirectory (zipPath))\n\t\t{\n\t\t\ttry (DirectoryStream<Path> directoryStream = Files\n\t\t\t\t.newDirectoryStream (zipPath);)\n\t\t\t{\n\t\t\t\tfor (Path file : directoryStream)\n\t\t\t\t{\n\t\t\t\t\textract (file, destination);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tPath fileOutZip = destination\n\t\t\t\t.resolve (\"./\" + zipPath.normalize ().toString ()).normalize ();\n\t\t\tFiles.createDirectories (fileOutZip.getParent ());\n\t\t\tFiles.copy (zipPath, fileOutZip, Utils.COPY_OPTION);\n\t\t}\n\t}", "public static void unzip(Context context, InputStream zipFile) {\n try (BufferedInputStream bis = new BufferedInputStream(zipFile)) {\n try (ZipInputStream zis = new ZipInputStream(bis)) {\n ZipEntry ze;\n int count;\n byte[] buffer = new byte[DEFAULT_BUFFER_SIZE];\n while ((ze = zis.getNextEntry()) != null) {\n try (FileOutputStream fout = context.openFileOutput(ze.getName(), Context.MODE_PRIVATE)) {\n while ((count = zis.read(buffer)) != -1)\n fout.write(buffer, 0, count);\n }\n }\n }\n } catch (IOException | NullPointerException ex) {\n Log.v(MainActivity.TAG, \"Zip not opened.\\n\"+ex.getMessage());\n }\n }", "public static void unzipArchive(File archive, String outputDir) throws IOException {\n\t\tZipFile zipfile = new ZipFile(archive);\n\t\tfor (Enumeration<?> e = zipfile.entries(); e.hasMoreElements();) {\n\t\t\tZipEntry entry = (ZipEntry) e.nextElement();\n\t\t\tunzipEntry(zipfile, entry, outputDir);\n\t\t}\n\t}", "public void unarchive(String baseDir) throws MojoExecutionException {\n try (FileInputStream fis = new FileInputStream(archive);\n ZipArchiveInputStream zipIn = new ZipArchiveInputStream(fis)) {\n ZipArchiveEntry zipEnry = zipIn.getNextZipEntry();\n while (zipEnry != null) {\n // Create a file for this tarEntry\n final File destPath = new File(baseDir + File.separator + zipEnry.getName());\n if (zipEnry.isDirectory()) {\n destPath.mkdirs();\n }\n else {\n destPath.createNewFile();\n try (BufferedOutputStream bout = new BufferedOutputStream(new FileOutputStream(destPath))) {\n IOUtils.copy(zipIn, bout);\n }\n }\n zipEnry = zipIn.getNextZipEntry();\n }\n }\n catch (IOException ex) {\n throw new MojoExecutionException(\"Could not extract archive: \" + archive.getAbsolutePath(), ex);\n }\n\n // delete archive after extraction\n archive.delete();\n }", "public static void unzip(File fileToUnzip, File outputFolder)\n\t\t\tthrows IOException {\n\t\tZipFile zipFile = new ZipFile(fileToUnzip);\n\t\tEnumeration<?> enu = zipFile.entries();\n\t\tunzipingFileSize = 0;\n\t\tunzipingLen = 0;\n\t\twhile (enu.hasMoreElements())\n\t\t\tunzipingFileSize += (long)((ZipEntry) enu.nextElement()).getSize();\n\t\tenu = zipFile.entries();\n\t\twhile (enu.hasMoreElements()) {\n\t\t\tZipEntry zipEntry = (ZipEntry) enu.nextElement();\n\t\t\tString name = zipEntry.getName();\n\t\t\tFile file = new File(outputFolder, name);\n\t\t\tdownloadingFile = file;\n\t\t\tif (name.endsWith(\"/\")) {\n\t\t\t\tfile.mkdirs();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tFile parent = file.getParentFile();\n\t\t\tif (parent != null)\n\t\t\t\tparent.mkdirs();\n\t\t\tInputStream is = zipFile.getInputStream(zipEntry);\n\t\t\tFileOutputStream fos = new FileOutputStream(file);\n\t\t\tbyte[] bytes = new byte[1024];\n\t\t\tint length;\n\t\t\twhile ((length = is.read(bytes)) >= 0) {\n\t\t\t\tfos.write(bytes, 0, length);\n\t\t\t\tunzipingLen += length;\n\t\t\t}\n\t\t\tis.close();\n\t\t\tfos.close();\n\t\t}\n\t\tzipFile.close();\n\t\tremove(new File(outputFolder, \"__MACOSX/\"));\n\t}", "public Result unzip() {\n MultipartFormData<File> body = request().body().asMultipartFormData();\n MultipartFormData.FilePart<File> fileInput = body.getFile(\"inputFile\");\n String filename = fileInput.getFilename();\n if (fileInput != null) {\n File file = (File) fileInput.getFile();\n File nf = new File(ZIP_URL + filename);\n boolean rst = file.renameTo(nf);\n String destDir = ZipUtils.unZip(ZIP_URL + filename, ZIP_URL);\n File dir = new File(ZIP_URL);\n String[] dirList = dir.list();\n return ok(afterUpload.render(Arrays.asList(dirList)));\n } else {\n return badRequest(\"error\");\n }\n }", "public static boolean UnzipFile(ZipFile zf, String filepathinzip, File fileinfiledir) {\r\n BufferedOutputStream Output_fos = null;\r\n BufferedInputStream bufbr = null;\r\n try {\r\n ZipEntry ze = zf.getEntry(filepathinzip);\r\n if (ze != null) {\r\n BufferedOutputStream Output_fos2 = new BufferedOutputStream(new FileOutputStream(fileinfiledir));\r\n try {\r\n byte[] buf = new byte[65536];\r\n BufferedInputStream bufbr2 = new BufferedInputStream(zf.getInputStream(ze));\r\n while (true) {\r\n try {\r\n int readlen = bufbr2.read(buf);\r\n if (readlen < 0) {\r\n break;\r\n }\r\n Output_fos2.write(buf, 0, readlen);\r\n } catch (Exception e) {\r\n e = e;\r\n bufbr = bufbr2;\r\n Output_fos = Output_fos2;\r\n } catch (Throwable th) {\r\n th = th;\r\n bufbr = bufbr2;\r\n Output_fos = Output_fos2;\r\n if (Output_fos != null) {\r\n try {\r\n Output_fos.close();\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e2) {\r\n e2.printStackTrace();\r\n return false;\r\n }\r\n }\r\n } catch (IOException e3) {\r\n e3.printStackTrace();\r\n if (bufbr == null) {\r\n return false;\r\n }\r\n try {\r\n bufbr.close();\r\n return false;\r\n } catch (IOException e4) {\r\n e4.printStackTrace();\r\n return false;\r\n }\r\n } finally {\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e5) {\r\n e5.printStackTrace();\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n throw th;\r\n }\r\n }\r\n if (Output_fos2 != null) {\r\n try {\r\n Output_fos2.close();\r\n if (bufbr2 != null) {\r\n try {\r\n bufbr2.close();\r\n } catch (IOException e6) {\r\n e6.printStackTrace();\r\n BufferedInputStream bufferedInputStream = bufbr2;\r\n BufferedOutputStream bufferedOutputStream = Output_fos2;\r\n return false;\r\n }\r\n }\r\n } catch (IOException e7) {\r\n e7.printStackTrace();\r\n if (bufbr2 != null) {\r\n try {\r\n bufbr2.close();\r\n } catch (IOException e8) {\r\n e8.printStackTrace();\r\n BufferedInputStream bufferedInputStream2 = bufbr2;\r\n BufferedOutputStream bufferedOutputStream2 = Output_fos2;\r\n return false;\r\n }\r\n }\r\n BufferedInputStream bufferedInputStream3 = bufbr2;\r\n BufferedOutputStream bufferedOutputStream3 = Output_fos2;\r\n return false;\r\n } finally {\r\n if (bufbr2 != null) {\r\n try {\r\n bufbr2.close();\r\n } catch (IOException e9) {\r\n e9.printStackTrace();\r\n BufferedInputStream bufferedInputStream4 = bufbr2;\r\n BufferedOutputStream bufferedOutputStream4 = Output_fos2;\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n BufferedInputStream bufferedInputStream5 = bufbr2;\r\n BufferedOutputStream bufferedOutputStream5 = Output_fos2;\r\n return true;\r\n } catch (Exception e10) {\r\n e = e10;\r\n Output_fos = Output_fos2;\r\n try {\r\n e.printStackTrace();\r\n if (Output_fos == null) {\r\n return false;\r\n }\r\n try {\r\n Output_fos.close();\r\n if (bufbr == null) {\r\n return false;\r\n }\r\n try {\r\n bufbr.close();\r\n return false;\r\n } catch (IOException e11) {\r\n e11.printStackTrace();\r\n return false;\r\n }\r\n } catch (IOException e12) {\r\n e12.printStackTrace();\r\n if (bufbr == null) {\r\n return false;\r\n }\r\n try {\r\n bufbr.close();\r\n return false;\r\n } catch (IOException e13) {\r\n e13.printStackTrace();\r\n return false;\r\n }\r\n } finally {\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e14) {\r\n e14.printStackTrace();\r\n return false;\r\n }\r\n }\r\n }\r\n } catch (Throwable th2) {\r\n th = th2;\r\n if (Output_fos != null) {\r\n }\r\n throw th;\r\n }\r\n } catch (Throwable th3) {\r\n th = th3;\r\n Output_fos = Output_fos2;\r\n if (Output_fos != null) {\r\n }\r\n throw th;\r\n }\r\n } else if (Output_fos == null) {\r\n return false;\r\n } else {\r\n try {\r\n Output_fos.close();\r\n if (bufbr == null) {\r\n return false;\r\n }\r\n try {\r\n bufbr.close();\r\n return false;\r\n } catch (IOException e15) {\r\n e15.printStackTrace();\r\n return false;\r\n }\r\n } catch (IOException e16) {\r\n e16.printStackTrace();\r\n if (bufbr == null) {\r\n return false;\r\n }\r\n try {\r\n bufbr.close();\r\n return false;\r\n } catch (IOException e17) {\r\n e17.printStackTrace();\r\n return false;\r\n }\r\n } finally {\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e18) {\r\n e18.printStackTrace();\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n } catch (Exception e19) {\r\n e = e19;\r\n }\r\n }", "public static void extractFile(String zipFilePath, String inZipFilePath, String destDirectory) throws IOException {\n ZipInputStream zipIn = new ZipInputStream(new FileInputStream(zipFilePath));\n ZipEntry entry = zipIn.getNextEntry();\n // iterates over entries in the zip file\n while (entry != null) {\n if (!entry.isDirectory() && inZipFilePath.equals(entry.getName())) {\n String filePath = entry.getName();\n int separatorIndex = filePath.lastIndexOf(File.separator);\n if (separatorIndex > -1)\n filePath = filePath.substring(separatorIndex + 1, filePath.length());\n filePath = destDirectory + File.separator + filePath;\n extractFile(zipIn, filePath);\n break;\n }\n zipIn.closeEntry();\n entry = zipIn.getNextEntry();\n }\n zipIn.close();\n }", "private boolean unZipFileFromUrl(final String zipUrl, final File unzipFolder)\n {\n // cleanup left over files\n FileUtils.deleteFile(unzipFolder);\n FileUtils.createDirectories(unzipFolder);\n\n final URL downloadUrl;\n\n try {\n downloadUrl = new URL(zipUrl);\n\n } catch (final MalformedURLException e) {\n LOGGER.error(String.format(FishStatJFileConstants.DOWNLOAD_ERROR, zipUrl), e);\n return false;\n }\n\n try\n (InputStream urlInputStream = downloadUrl.openStream();\n ZipInputStream zipStream = new ZipInputStream(urlInputStream)) {\n\n // iterate through the files of the zip input stream\n while (true) {\n final ZipEntry entry = zipStream.getNextEntry();\n\n if (entry == null)\n break;\n\n // open streams for writing files to disk\n try\n (OutputStream fileOut = Files.newOutputStream(new File(unzipFolder, entry.getName()).toPath());\n BufferedOutputStream bufferedFileOut = new BufferedOutputStream(fileOut, FishStatJFileConstants.ZIP_EXTRACT_BUFFER_SIZE)) {\n\n // write the file from the stream to disk\n final byte[] fileOutBuffer = new byte[FishStatJFileConstants.ZIP_EXTRACT_BUFFER_SIZE];\n\n while (true) {\n final int readByteCount = zipStream.read(fileOutBuffer, 0, fileOutBuffer.length);\n\n if (readByteCount == -1)\n break;\n else\n bufferedFileOut.write(fileOutBuffer, 0, readByteCount);\n }\n\n bufferedFileOut.flush();\n }\n }\n\n return true;\n\n } catch (final ZipException e) {\n LOGGER.error(String.format(FishStatJFileConstants.UNZIP_ERROR, zipUrl), e);\n\n } catch (final IOException e) {\n LOGGER.error(String.format(FishStatJFileConstants.DOWNLOAD_ERROR, zipUrl), e);\n }\n\n return false;\n }", "public static boolean unZipFile(String _location, String _zipFile) {\n boolean unzipped = false;\n try {\n FileInputStream fin = new FileInputStream(_location + \"/\" + _zipFile);\n ZipInputStream zin = new ZipInputStream(fin);\n ZipEntry ze;\n while ((ze = zin.getNextEntry()) != null) {\n if (ze.isDirectory()) {\n File f = new File(_location + \"/\" + ze.getName());\n if(!f.isDirectory()) {\n f.mkdirs();\n }\n } else {\n FileOutputStream fOut = new FileOutputStream(_location + \"/\" + ze.getName());\n BufferedOutputStream bufOut = new BufferedOutputStream(fOut);\n byte[] buffer = new byte[1024];\n int read;\n while ((read = zin.read(buffer)) != -1) {\n bufOut.write(buffer, 0, read);\n }\n bufOut.close();\n zin.closeEntry();\n fOut.close();\n }\n }\n zin.close();\n unzipped = true;\n } catch (Exception e) {\n writeLog(LOG_LEVEL.ERROR, \"Unzipping failed - \" + e.getLocalizedMessage());\n }\n return unzipped;\n }", "private static void extractFile(ZipInputStream inStreamZip, FSDataOutputStream destDirectory) throws IOException {\n BufferedOutputStream bos = new BufferedOutputStream(destDirectory);\n byte[] bytesIn = new byte[BUFFER_SIZE];\n int read = 0;\n while ((read = inStreamZip.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n bos.close();\n }", "protected void getFile(ZipEntry e) throws IOException {\n String zipName = e.getName();\n switch (mode) {\n case EXTRACT:\n if (zipName.startsWith(\"/\")) {\n if (!warnedMkDir)\n System.out.println(\"Ignoring absolute paths\");\n warnedMkDir = true;\n zipName = zipName.substring(1);\n }\n // if a directory, just return. We mkdir for every file,\n // since some widely-used Zip creators don't put out\n // any directory entries, or put them in the wrong place.\n if (zipName.endsWith(\"/\")) {\n return;\n }\n // Else must be a file; open the file for output\n // Get the directory part.\n int ix = zipName.lastIndexOf('/');\n if (ix > 0) {\n //String dirName = zipName.substring(0, ix);\n String fileName = zipName.substring(ix + 1, zipName.length());\n zipName = fileName;\n\n }\n String targetFile = this.unzipFileTargetLocation;\n File file = new File(targetFile);\n if (!file.exists())\n file.createNewFile();\n FileOutputStream os = null;\n InputStream is = null;\n try {\n os = new FileOutputStream(targetFile);\n is = zippy.getInputStream(e);\n int n = 0;\n while ((n = is.read(b)) > 0)\n os.write(b, 0, n);\n\n } finally {\n if (is != null) {\n try {\n is.close();\n } catch (Exception ee) {\n ee.printStackTrace();\n }\n }\n if (os != null) {\n try {\n os.close();\n } catch (Exception ee) {\n ee.printStackTrace();\n }\n }\n }\n break;\n case LIST:\n // Not extracting, just list\n if (e.isDirectory()) {\n System.out.println(\"Directory \" + zipName);\n } else {\n System.out.println(\"File \" + zipName);\n }\n break;\n default:\n throw new IllegalStateException(\"mode value (\" + mode + \") bad\");\n }\n }", "public static void extractZip(String archiveFile, String destinationPath) {\n\t\tFile targetDir = new File(destinationPath);\n\t\ttry (InputStream is = new FileInputStream(new File(archiveFile));\n\t\t\t\tArchiveInputStream i = new ArchiveStreamFactory().createArchiveInputStream(ArchiveStreamFactory.ZIP, is);) {\n\t\t\tArchiveEntry entry = null;\n\t\t\twhile ((entry = i.getNextEntry()) != null) {\n\t\t\t\tif (!i.canReadEntryData(entry)) {\n\t\t\t\t\tlog.error(\"entry cannot be read!! \" + entry.getName());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (entry.isDirectory()) {\n\t\t\t\t\t// ignore dirs as we don't want to extract any directories (non will exist in this case)\n\t\t\t\t} else {\n\t\t\t\t\t//no point in unzipping empty files\n\t\t\t\t\tif(entry.getSize() > 0) {\n\t\t\t\t\t\tString name = entry.getName();\n\t\t\t\t\t\t//in case the file was a child to a folder, we remove the parent name\n\t\t\t\t\t\tif(name.lastIndexOf(\"/\")!=-1) {\n\t\t\t\t\t\t\tname = name.substring(name.lastIndexOf(\"/\")+1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tFile f = new File(targetDir + \"/\" + name);\n\t\t\t\t\t\tOutputStream o = Files.newOutputStream(f.toPath());\n\t\t\t\t\t\tIOUtils.copy(i, o);\n\t\t\t\t\t\to.close();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlog.fatal(\"Exception thrown while zipping\", e);\n\t\t}\n\t}", "public void extractFile(ZipModel zipModel, String outputPath, UnzipParameters unzipParameters, String newFileName,\r\n ProgressMonitor progressMonitor, boolean runInThread, char[] password) throws ZipException {\r\n if (zipModel == null) {\r\n throw new ZipException(\"input zipModel is null\");\r\n }\r\n\r\n if (!Zip4jUtil.checkOutputFolder(outputPath)) {\r\n throw new ZipException(\"Invalid output path\");\r\n }\r\n\r\n if (this == null) {\r\n throw new ZipException(\"invalid file header\");\r\n }\r\n\r\n UnzipEngine unzipEngine = new UnzipEngine(zipModel, progressMonitor, password);\r\n unzipEngine.extractFile(this, outputPath, newFileName, runInThread, unzipParameters);\r\n }", "private void extractFile(ZipInputStream zipIn, String filePath) throws IOException {\n BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));\n byte[] bytesIn = new byte[BUFFER_SIZE];\n int read = 0;\n while ((read = zipIn.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n bos.close();\n }", "private void extractFile(ZipInputStream zipIn, String filePath) throws IOException {\n BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));\n byte[] bytesIn = new byte[BUFFER_SIZE];\n int read = 0;\n while ((read = zipIn.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n bos.close();\n }", "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 void extractFile(ZipInputStream zipIn, String filePath) throws IOException {\n final int BUFFER_SIZE = (int) 1e8;\n BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));\n byte[] bytesIn = new byte[BUFFER_SIZE];\n int read = 0;\n while ((read = zipIn.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n bos.close();\n }", "public void unzip(File f) throws Exception {\r\n String destDir = workplace + \"/temp/\";\r\n File tmp = new File(destDir);\r\n if(!tmp.exists())tmp.mkdir();\r\n byte b[] = new byte [1024];\r\n int length;\r\n \r\n ZipFile zipFile;\r\n zipFile = new ZipFile(f);\r\n Enumeration enumeration = zipFile.entries();\r\n ZipEntry zipEntry = null ;\r\n OutputStream outputStream = null;\r\n InputStream inputStream = null;\r\n while (enumeration.hasMoreElements()) {\r\n zipEntry = (ZipEntry) enumeration.nextElement();\r\n File loadFile = new File(destDir + zipEntry.getName());\r\n if (zipEntry.isDirectory()) {\r\n // 这段都可以不要,因为每次都貌似从最底层开始遍历的\r\n loadFile.mkdirs();\r\n }else{\r\n if (!loadFile.getParentFile().exists())\r\n loadFile.getParentFile().mkdirs();\r\n outputStream = new FileOutputStream(loadFile);\r\n inputStream = zipFile.getInputStream(zipEntry);\r\n while ((length = inputStream.read(b)) > 0)\r\n outputStream.write(b, 0, length);\r\n }\r\n }\r\n outputStream.flush();\r\n outputStream.close();\r\n inputStream.close();\r\n }", "public static boolean unzip(String unZipFile, String saveFilePath) {\n boolean succeed = true;\n ZipInputStream zin = null;\n ZipEntry entry;\n try {\n // zip file path\n File olddirec = new File(unZipFile);\n zin = new ZipInputStream(new FileInputStream(unZipFile));\n // iterate ZipEntry in zip\n while ((entry = zin.getNextEntry()) != null) {\n // if folder,create it\n if (entry.isDirectory()) {\n File directory = new File(olddirec.getParent(),\n entry.getName());\n if (!directory.exists()) {\n if (!directory.mkdirs()) {\n System.out.println(\"Create foler in \"\n + directory.getAbsoluteFile() + \" failed\");\n }\n }\n zin.closeEntry();\n }\n // if file,unzip it\n if (!entry.isDirectory()) {\n File myFile = new File(saveFilePath);\n FileOutputStream fout = null;\n DataOutputStream dout = null;\n try {\n fout = new FileOutputStream(myFile);\n dout = new DataOutputStream(fout);\n byte[] b = new byte[1024];\n int len = 0;\n while ((len = zin.read(b)) != -1) {\n dout.write(b, 0, len);\n }\n } finally {\n if (dout != null) {\n try {\n dout.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n if (fout != null) {\n try {\n fout.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n zin.closeEntry();\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n succeed = false;\n System.out.println(e);\n } finally {\n if (null != zin) {\n try {\n zin.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n if (succeed)\n System.out.println(\"File unzipped successfully!\");\n else\n System.out.println(\"File unzipped with failure!\");\n return succeed;\n }", "private static void extractFile(ZipInputStream zipIn, String filePath) throws IOException {\n BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));\n byte[] bytesIn = new byte[BUFFER_SIZE];\n int read = 0;\n while ((read = zipIn.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n bos.close();\n }", "void onUnzipCompleted(String output);", "public void extractFile(ZipModel zipModel, String outputPath, UnzipParameters unzipParameters,\r\n ProgressMonitor progressMonitor, boolean runInThread, char[] password) throws ZipException {\r\n extractFile(zipModel, outputPath, unzipParameters, null, progressMonitor, runInThread, password);\r\n }", "public static int unzip(String srcZipFile, String specifiedFile, String targetDirectory, String passwd) {\n File srcFile = new File(srcZipFile);\n if (!srcFile.exists() || srcFile.isDirectory()) {\n System.out.println(\"[JZip] Source file does not exist or correct.\");\n return SOURCE_FILE_ERROR;\n }\n \n // Check target directory\n File destDir = new File(targetDirectory);\n destDir.mkdir();\n if (!destDir.isDirectory()) {\n System.out.println(\"[JZip] targetDirectory should be directory.\");\n return TARGET_DIR_ERROR;\n }\n \n // Init and set password\n ZipFile zipFile;\n try {\n zipFile = new ZipFile(srcZipFile);\n \n if (zipFile.isEncrypted()) {\n if (passwd != null && !passwd.isEmpty()) {\n zipFile.setPassword(passwd.toCharArray());\n }\n else {\n System.out.println(\"[JZip] No password indicated for a password-protected file.\");\n return PASSWORD_NOT_FOUND;\n }\n }\n else {\n System.out.println(\"[JZip] This zip file should has password but it doesn't.\");\n return SOURCE_SHOULD_HAS_PASSWORD;\n }\n }\n catch (ZipException e) {\n System.out.println(\"[JZip] Create zip object or set password causes cexception.\");\n return ZIP_INITIAL_ERROR;\n }\n \n // Check content and extract\n String targetFile = targetDirectory + (targetDirectory.endsWith(File.separator) ? \"\" : File.separator) + specifiedFile;\n try {\n \tList<?> fileHeaderList = zipFile.getFileHeaders();\n for (int i = 0; i < fileHeaderList.size(); i++) {\n \tFileHeader fileHeader = (FileHeader)fileHeaderList.get(i);\n \tif (fileHeader != null && fileHeader.getFileName().equals(specifiedFile)) {\n \t\tzipFile.extractFile(specifiedFile, targetDirectory);\n \t\tbreak;\n \t}\n }\n if (!new File(targetFile).isFile()) {\n \tSystem.out.println(\"[JZip] Input zip file does not have correct content.\");\n \treturn SOURCE_CONTENT_ERROR;\n }\n }\n catch (ZipException e) {\n System.out.println(\"[JZip] Extract zip file causes exception.\");\n // It will extract a zero-size file when password is incorrect, should be deleted\n new File(targetFile).delete();\n return EXTRACT_FILE_ERROR;\n }\n \n return NO_ERROR;\n }", "public void extractPackage(String zipPath, String destPath) throws IOException {\n File destDir = new File(destPath);\n if(!destDir.exists()) {\n destDir.mkdir();\n }\n ZipInputStream zipIn = new ZipInputStream(new FileInputStream((zipPath)));\n ZipEntry entry = zipIn.getNextEntry();\n while(entry != null) {\n String filePath = destPath+File.separator+entry.getName();\n //filePath = filePath.replaceAll(\" \",\"_\");\n if(!entry.isDirectory()) {\n Log.i(\"extract\",\"Package Name: \"+entry.getName());\n Log.i(\"extract\",filePath);\n String[] temp = entry.getName().split(\"\\\\.\");\n if(validExtension(temp[temp.length-1].toLowerCase())) {\n extractFile(zipIn,filePath);\n }\n //extractFile(zipIn,filePath);\n } else {\n File dir = new File(filePath);\n dir.mkdirs();\n }\n zipIn.closeEntry();;\n entry = zipIn.getNextEntry();\n }\n zipIn.close();\n }", "public static File unpackArchive(File theFile, File targetDir)\n\t\t\tthrows IOException {\n\t\tif (!theFile.exists()) {\n\t\t\tthrow new IOException(theFile.getAbsolutePath() + \" does not exist\");\n\t\t}\n\t\tif (!buildDirectory(targetDir)) {\n\t\t\tthrow new IOException(\"Could not create directory: \" + targetDir);\n\t\t}\n\t\tZipFile zipFile = new ZipFile(theFile);\n\t\tfor (Enumeration<? extends ZipEntry> entries = zipFile.entries(); entries.hasMoreElements();) {\n\t\t\tZipEntry entry = (ZipEntry) entries.nextElement();\n\t\t\tFile file = new File(targetDir, File.separator + entry.getName());\n\t\t\tif (!buildDirectory(file.getParentFile())) {\n\t\t\t\tthrow new IOException(\"Could not create directory: \"\n\t\t\t\t\t\t+ file.getParentFile());\n\t\t\t}\n\t\t\tif (!entry.isDirectory()) {\n\t\t\t\tcopyInputStream(zipFile.getInputStream(entry),\n\t\t\t\t\t\tnew BufferedOutputStream(new FileOutputStream(file)));\n\t\t\t} else {\n\t\t\t\tif (!buildDirectory(file)) {\n\t\t\t\t\tthrow new IOException(\"Could not create directory: \" + file);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tzipFile.close();\n\t\treturn theFile;\n\t}", "public static void unzip(InputStream is, String outdir) throws IOException {\r\n\r\n\t\tbyte[] buffer = new byte[buffSize];\r\n\r\n\t\tjava.util.zip.ZipInputStream zis = new java.util.zip.ZipInputStream(new BufferedInputStream(is));\r\n\r\n\t\tjava.util.zip.ZipEntry entry;\r\n\r\n\t\ttry {\r\n\t\t\twhile ((entry = zis.getNextEntry()) != null) {\r\n\r\n\t\t\t\tFile of = new File(outdir + File.separator + entry.getName());\r\n\r\n\t\t\t\tif (entry.isDirectory()) {\r\n\t\t\t\t\tof.mkdirs();\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tFile xx = new File(of.getParent());\r\n\t\t\t\t\tif (!xx.exists()) {\r\n\t\t\t\t\t\tStack<String> todo = new Stack<String>();\r\n\t\t\t\t\t\tdo {\r\n\t\t\t\t\t\t\ttodo.push(xx.getAbsolutePath());\r\n\t\t\t\t\t\t\txx = new File(xx.getParent());\r\n\t\t\t\t\t\t} while (!xx.exists());\r\n\t\t\t\t\t\twhile (todo.size() > 0) {\r\n\t\t\t\t\t\t\txx = new File(todo.pop());\r\n\t\t\t\t\t\t\tif (!xx.exists()) {\r\n\t\t\t\t\t\t\t\txx.mkdirs();\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\r\n\t\t\t\tBufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(of), buffer.length);\r\n\r\n\t\t\t\tcpio(new BufferedInputStream(zis), bos, \"unzip:\" + entry.getName());\r\n\r\n\t\t\t\tbos.flush();\r\n\t\t\t\tbos.close();\r\n\t\t\t}\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t\t// problem with chars in entry name likely\r\n\t\t}\r\n\t\tzis.close();\r\n\r\n\t}", "public StreamUnzipper(InputStream zipStream, File destDir)\n {\n if (zipStream == null)\n throw new IllegalArgumentException(\"zip stream cannot be null\");\n this.zis = new ZipInputStream(zipStream);\n this.destDir = destDir;\n }", "public static void extractAndSaveFile(ZipInputStream zip,\n \t\t\tFileOutputStream destinationFile) throws IOException {\n \t\tByteArrayOutputStream out = readZipEntry(zip);\n \t\tdestinationFile.write(out.toByteArray());\n \t\tout.close();\n \t\tdestinationFile.close();\n \t}", "public static void unzip(File archive, File directory) throws IOException\n {\n ZipFile zip = null;\n\n if (directory.exists()) {\n if (!directory.isDirectory()) {\n throw new IOException(\"Directory is not a directory: \" + directory);\n }\n }\n else {\n if (!directory.mkdirs()) {\n throw new IOException(\"Could not create directory: \" + directory);\n }\n }\n try {\n zip = new ZipFile(archive);\n for (Enumeration entries = zip.entries(); entries.hasMoreElements();) {\n ZipEntry entry = (ZipEntry)entries.nextElement();\n File f = new File(directory, entry.getName());\n if (entry.isDirectory()) {\n if (!f.mkdirs()) {\n throw new IOException(\"Could not create directory: \" + f);\n }\n }\n else {\n if (zip != null) {\n InputStream is = zip.getInputStream(entry);\n OutputStream os = new BufferedOutputStream(new FileOutputStream(f));\n IOUtils.copy(is, os);\n IOUtils.closeQuietly(is);\n IOUtils.closeQuietly(os);\n }\n }\n }\n }\n finally {\n if (zip != null) {\n zip.close();\n }\n }\n }", "@Override\r\n public void extractArchive(ArchiveExtractor decompressor) throws ArcException {\r\n\r\n\tString fileName = ManipString.substringAfterFirst(this.idSource, \"_\");\r\n\r\n\tboolean uncompressInProgress=false;\r\n\tFile dir = new File(this.archiveChargement + \".dir\");\r\n\tif (!dir.exists()) {\r\n\t\ttry {\r\n\t\t if (dir.mkdir())\r\n\t\t {\r\n\t\t \tStaticLoggerDispatcher.debug(LOGGER,\"$$\"+Thread.currentThread().getId()+\" is decompressing \"+dir.getAbsolutePath());\r\n\t\t \tdecompressor.extract(this.archiveChargement);\r\n\t\t \tuncompressInProgress=true;\r\n\t\t }\r\n\t\t}\r\n\t\t catch (Exception ex)\r\n\t\t{\r\n\t\t\t throw new ArcException(ex, ArcExceptionMessage.FILE_EXTRACT_FAILED, this.archiveChargement).logFullException();\r\n\t\t}\r\n\t}\r\n\t\r\n\tif (!uncompressInProgress) {\r\n\t\t\t// check if file exists\r\n\t File toRead = new File(dir + File.separator + ManipString.redoEntryName(fileName));\r\n\t while (!toRead.exists()) {\r\n\t \ttry {\r\n\t\t\t\tThread.sleep(MILLISECOND_UNCOMPRESSION_CHECK_INTERVAL);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\tThread.currentThread().interrupt();\r\n\t\t\t StaticLoggerDispatcher.error(LOGGER, \"Error in thread sleep extractArchive()\");\r\n\t\t\t}\r\n\t \ttoRead = new File(dir + File.separator + ManipString.redoEntryName(fileName));\r\n\t }\r\n\t}\r\n\r\n\r\n\t\r\n }", "public void extractFile(ZipModel zipModel, String outputPath, ProgressMonitor progressMonitor,\r\n boolean runInThread, char[] password) throws ZipException {\r\n extractFile(zipModel, outputPath, null, progressMonitor, runInThread, password);\r\n }", "public static void unzip(BasicShell shell, File archive, File destination) {\n\t\ttry {\n\t\t\tshell.printOut(\"Extracting files from archive '\" + archive.getPath() + \"'.\");\n\t\t\tZipFile zipFile = new ZipFile(archive);\n\t\t\tEnumeration<? extends ZipEntry> e = zipFile.entries();\n\t\t\twhile (e.hasMoreElements() ) {\n\t\t\t\tZipEntry entry = e.nextElement();\n\t\t\t\tFile entryFile = new File(destination, entry.getName());\n\t\t\t\tif ( entry.isDirectory() ) {\n\t\t\t\t\tentryFile.mkdirs();\n\t\t\t\t} else {\n\t\t\t\t\tentryFile.getParentFile().mkdirs();\n\t\t\t\t\t\n\t\t\t\t\tInputStream entryStream = zipFile.getInputStream(entry);\n\t\t\t\t\tBufferedOutputStream outStream = new BufferedOutputStream(new FileOutputStream(entryFile));\n\t\t\t\t\tbyte[] buffer = new byte[2048];\n\t\t\t\t\tint count = entryStream.read(buffer);\n\t\t\t\t\twhile ( count > -1 ) {\n\t\t\t\t\t\toutStream.write(buffer, 0, count);\n\t\t\t\t\t\tcount = entryStream.read(buffer);\n\t\t\t\t\t}\n\t\t\t\t\toutStream.flush();\n\t\t\t\t\toutStream.close();\n\t\t\t\t\tentryStream.close();\n\t\t\t\t}\n\t\t\t\tshell.printOut(\"Extracted file '\" + entry.getName() + \"'.\") ;\n\t\t\t}\n\t\t\tzipFile.close();\n\t\t} catch (Exception e) {\n\t\t\tshell.getErrorHandler().handleError(Diagnostic.ERROR, e.getClass().getSimpleName() + \": \"+ e.getMessage());\n\t\t}\n\n\t\t\n\t}", "public void zip(String directoryInZip, \n String filePath) throws Exception\n {\n File thisFile = new File(filePath);\n\n if (thisFile.exists()) {\n\n try {\n FileInputStream fi = new FileInputStream(thisFile);\n\n origin = new BufferedInputStream(fi, BUFFER);\n\n ZipEntry entry = new ZipEntry(directoryInZip + File.separator\n + thisFile.getName());\n out.putNextEntry(entry);\n\n int count;\n while ((count = origin.read(data, 0, BUFFER)) != -1) {\n out.write(data, 0, count);\n }\n origin.close();\n\n } catch (FileNotFoundException e) {\n logger.error(\"File \" + filePath + \" not found !!\", e);\n } catch (IOException e) {\n logger.error(\"Could not write to Zip File \", e);\n throw new Exception(\"Could not write to Zip File \", e);\n }\n\n } else {\n // Log message if file does not exist\n logger.info(\"File \" + thisFile.getName()\n + \" does not exist on file system\");\n\n } \t\t\n }", "protected static void zipDir(File zipDir, ZipOutputStream zos, String archiveSourceDir)\n throws IOException {\n String[] dirList = zipDir.list();\n byte[] readBuffer = new byte[40960];\n int bytesIn;\n //loop through dirList, and zip the files\n if (dirList != null) {\n for (String aDirList : dirList) {\n File f = new File(zipDir, aDirList);\n //place the zip entry in the ZipOutputStream object\n zos.putNextEntry(new ZipEntry(getZipEntryPath(f, archiveSourceDir)));\n if (f.isDirectory()) {\n //if the File object is a directory, call this\n //function again to add its content recursively\n zipDir(f, zos, archiveSourceDir);\n //loop again\n continue;\n }\n //if we reached here, the File object f was not a directory\n //create a FileInputStream on top of f\n try (FileInputStream fis = new FileInputStream(f)) {\n //now write the content of the file to the ZipOutputStream\n while ((bytesIn = fis.read(readBuffer)) != -1) {\n zos.write(readBuffer, 0, bytesIn);\n }\n }\n }\n }\n }", "private static void unzip(EmailTypes collection) {\n File dir = new File(destDir);\n // create output directory if it doesn't exist\n if(!dir.exists()) {\n dir.mkdirs();\n }\n FileInputStream fis;\n //buffer for read and write data to file\n byte[] buffer = new byte[1024];\n try {\n fis = new FileInputStream(sourceFiles.get(collection).getPath());\n ZipInputStream is = new ZipInputStream(fis);\n ZipEntry zipEntry = is.getNextEntry();\n System.out.println(\"Unzipping set: \" + collection.getCollection() + \".\");\n while(zipEntry != null){\n String fileName = zipEntry.getName();\n File newFile = new File(unpackedFiles.get(collection) + File.separator + fileName);\n new File(newFile.getParent()).mkdirs();\n FileOutputStream fos = new FileOutputStream(newFile);\n int len;\n while ((len = is.read(buffer)) > 0) {\n fos.write(buffer, 0, len);\n }\n fos.close();\n is.closeEntry();\n zipEntry = is.getNextEntry();\n }\n is.closeEntry();\n is.close();\n fis.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void packToZip(String sourceDirPath, String zipFilePath) throws IOException {\n Path p;\n p = Files.createFile(Paths.get(zipFilePath));\n try (ZipOutputStream zs = new ZipOutputStream(Files.newOutputStream(p))) {\n Path pp = Paths.get(sourceDirPath);\n Files.walk(pp)\n .filter(path -> !Files.isDirectory(path))\n .forEach(path -> {\n if (!path.toString().endsWith(\".zip\")) {\n ZipEntry zipEntry = new ZipEntry(pp.relativize(path).toString());\n try {\n zs.putNextEntry(zipEntry);\n Files.copy(path, zs);\n zs.closeEntry();\n } catch (IOException e) {\n System.err.println(e);\n }\n }\n });\n }\n }", "private void zipDirectoryToOutputStream(File dirToZip, OutputStream outStream)\n throws IOException {\n if (!dirToZip.isDirectory()) {\n throw new IOException(\"zip directory does not exist\");\n }\n Log.v(TAG, \"zipping directory \" + dirToZip.getAbsolutePath());\n\n File[] listFiles = dirToZip.listFiles();\n try (ZipOutputStream zipStream = new ZipOutputStream(new BufferedOutputStream(outStream))) {\n for (File file : listFiles) {\n if (file.isDirectory()) {\n continue;\n }\n String filename = file.getName();\n // only for the zipped output file, we add individual entries to zip file.\n if (filename.equals(OUTPUT_ZIP_FILE) || filename.equals(EXTRA_OUTPUT_ZIP_FILE)) {\n ZipUtils.extractZippedFileToZipStream(file, zipStream);\n } else {\n ZipUtils.addFileToZipStream(file, zipStream);\n }\n }\n } finally {\n outStream.close();\n }\n // Zipping successful, now cleanup the temp dir.\n FileUtils.deleteDirectory(dirToZip);\n }", "public static void parseZipFile(final Path zipFile, final Consumer<Path> fileListener) throws IOException {\n\t\ttry (FileSystem fs = FileSystems.newFileSystem(zipFile, (ClassLoader) null)) {\n\t\t\tfinal Path root = fs.getPath(\"/\");\n\t\t\t// the more convenient Files.walk method sometimes fails with funny IOExceptions... \n\t\t\t// see https://stackoverflow.com/questions/14654737/nosuchfileexception-while-walking-files-tree-inside-a-zip-using-java-nio\n\t\t\tFiles.walkFileTree(root, EnumSet.noneOf(FileVisitOption.class), Integer.MAX_VALUE, new java.nio.file.SimpleFileVisitor<Path>() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\n\t\t\t\t\tif (Files.isRegularFile(file)) {\n\t\t\t\t\t\tfileListener.accept(file);\n\t\t\t\t\t}\n\t\t\t\t\treturn FileVisitResult.CONTINUE;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {\n\t\t\t\t\tLoggerFactory.getLogger(ZipUtils.class).warn(\"File visit failed: {}. {}\", file,exc.toString());\n\t\t\t\t\treturn FileVisitResult.CONTINUE;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t});\n\t\t}\n\t}", "public File extractTo (File destination) throws IOException\n\t{\n\t\ttry (DirectoryStream<Path> directoryStream = Files\n\t\t\t.newDirectoryStream (zipfs.getPath (\"/\"));)\n\t\t{\n\t\t\tfor (Path file : directoryStream)\n\t\t\t{\n\t\t\t\textract (file, destination.toPath ());\n\t\t\t}\n\t\t}\n\t\treturn destination;\n\t}", "private static void decompressJarFile(String destDirectory, String jarFilePath) throws IOException {\n File destDir = new File(destDirectory);\n if (!destDir.exists()) {\n destDir.mkdir();\n }\n JarInputStream jarIn = new JarInputStream(new FileInputStream(jarFilePath));\n JarEntry entry = jarIn.getNextJarEntry();\n // iterates over all the entries in the jar file\n while (entry != null) {\n String filePath = destDirectory + \"/\" + entry.getName();\n if (!entry.isDirectory()) {\n new File(filePath).getParentFile().mkdirs();\n // if the entry is a file, extracts it\n extractFile(jarIn, filePath);\n }/* else {\n System.out.println(\"New dir: \" + filePath);\n // if the entry is a directory, make the directory\n File dir = new File(filePath);\n dir.mkdir();\n System.out.println(dir.canWrite());\n }*/\n jarIn.closeEntry();\n entry = jarIn.getNextJarEntry();\n }\n jarIn.close();\n }", "private void addToZipStream(Path file, ZipOutputStream zipStream, String dirName)\r\n throws Exception {\r\n String inputFileName = file.toFile().getPath();\r\n try (FileInputStream inputStream = new FileInputStream(inputFileName)) {\r\n\r\n // create a new ZipEntry, which is basically another file\r\n // within the archive. We omit the path from the filename\r\n Path directory = Paths.get(dirName);\r\n ZipEntry entry = new ZipEntry(directory.relativize(file).toString());\r\n\r\n zipStream.putNextEntry(entry);\r\n\r\n // Now we copy the existing file into the zip archive. To do\r\n // this we write into the zip stream, the call to putNextEntry\r\n // above prepared the stream, we now write the bytes for this\r\n // entry. For another source such as an in memory array, you'd\r\n // just change where you read the information from.\r\n byte[] readBuffer = new byte[2048];\r\n int amountRead;\r\n int written = 0;\r\n\r\n while ((amountRead = inputStream.read(readBuffer)) > 0) {\r\n zipStream.write(readBuffer, 0, amountRead);\r\n written += amountRead;\r\n }\r\n } catch (IOException e) {\r\n throw new Exception(\"Unable to process \" + inputFileName, e);\r\n }\r\n }", "public String execute(File directoryToZip, String zipName) {\r\n String fileName = null;\r\n if(directoryToZip != null){\r\n try{\r\n List<File> fileList = new ArrayList<File>();\r\n getAllFiles(directoryToZip, fileList);\r\n fileName = writeZipFile(directoryToZip, fileList, zipName);\r\n } catch(Exception e){\r\n e.printStackTrace();\r\n }\r\n }\r\n return fileName;\r\n }", "public void clean()\r\n {\r\n // DO NOT TOUCH\r\n // System.out.println(unzipedFilePath);\r\n\r\n // only clean if there was a successful unzipping\r\n if (success)\r\n {\r\n // only clean if the file path to remove matches the zipped file.\r\n if (unzippedFilePath.equals(zippedFilePath.substring(0,\r\n zippedFilePath.length() - 4)))\r\n {\r\n // System.out.println(\"to be implmented\");\r\n for (File c : outputDir.listFiles())\r\n {\r\n // System.out.println(c.toString());\r\n if (!c.delete())\r\n {\r\n System.out.println(\"failed to delete\" + c.toString());\r\n }\r\n }\r\n outputDir.delete();\r\n outputDir = null;\r\n }\r\n }\r\n }", "public String execute(File directoryToZip) {\r\n return execute(directoryToZip,null);\r\n }", "@SuppressWarnings(\"unchecked\")\n private boolean unzipFolder(File archiveFile, long compressedSize, File unzipDestFolder, String description, String[] outZipRootFolder, ITaskMonitor monitor) {\n description += \" (%1$d%%)\";\n ZipFile zipFile = null;\n try {\n zipFile = new ZipFile(archiveFile);\n boolean usingUnixPerm = SdkConstants.CURRENT_PLATFORM == SdkConstants.PLATFORM_DARWIN || SdkConstants.CURRENT_PLATFORM == SdkConstants.PLATFORM_LINUX;\n long incStep = compressedSize / NUM_MONITOR_INC;\n long incTotal = 0;\n long incCurr = 0;\n int lastPercent = 0;\n byte[] buf = new byte[65536];\n Enumeration<ZipArchiveEntry> entries = zipFile.getEntries();\n while (entries.hasMoreElements()) {\n ZipArchiveEntry entry = entries.nextElement();\n String name = entry.getName();\n name = name.replace('\\\\', '/');\n int pos = name.indexOf('/');\n if (pos < 0 || pos == name.length() - 1) {\n continue;\n } else {\n if (outZipRootFolder[0] == null && pos > 0) {\n outZipRootFolder[0] = name.substring(0, pos);\n }\n name = name.substring(pos + 1);\n }\n File destFile = new File(unzipDestFolder, name);\n if (name.endsWith(\"/\")) {\n if (!destFile.isDirectory() && !destFile.mkdirs()) {\n monitor.setResult(\"Failed to create temp directory %1$s\", destFile.getPath());\n return false;\n }\n continue;\n } else if (name.indexOf('/') != -1) {\n File parentDir = destFile.getParentFile();\n if (!parentDir.isDirectory()) {\n if (!parentDir.mkdirs()) {\n monitor.setResult(\"Failed to create temp directory %1$s\", parentDir.getPath());\n return false;\n }\n }\n }\n FileOutputStream fos = null;\n try {\n fos = new FileOutputStream(destFile);\n int n;\n InputStream entryContent = zipFile.getInputStream(entry);\n while ((n = entryContent.read(buf)) != -1) {\n if (n > 0) {\n fos.write(buf, 0, n);\n }\n }\n } finally {\n if (fos != null) {\n fos.close();\n }\n }\n if (usingUnixPerm && destFile.isFile()) {\n int mode = entry.getUnixMode();\n if ((mode & 0111) != 0) {\n setExecutablePermission(destFile);\n }\n }\n for (incTotal += entry.getCompressedSize(); incCurr < incTotal; incCurr += incStep) {\n monitor.incProgress(1);\n }\n int percent = (int) (100 * incTotal / compressedSize);\n if (percent != lastPercent) {\n monitor.setDescription(description, percent);\n lastPercent = percent;\n }\n if (monitor.isCancelRequested()) {\n return false;\n }\n }\n return true;\n } catch (IOException e) {\n monitor.setResult(\"Unzip failed: %1$s\", e.getMessage());\n } finally {\n if (zipFile != null) {\n try {\n zipFile.close();\n } catch (IOException e) {\n }\n }\n }\n return false;\n }", "@Override\r\n\tpublic String unZip(String localFilePath, boolean remLocal) throws FileSystemUtilException {\r\n\t\tthrow new FileSystemUtilException(\"000000\", null, Level.ERROR, null);\r\n\r\n\t}", "public FilesArchived(File rootDir, String zip) {\n this.root = rootDir;\n this.compression = (\"zstd\".equals(zip)) ? Compression.ZSTD : Compression.GZIP;\n rescan();\n Thread thread = new Thread(this::run);\n thread.setDaemon(true);\n thread.setName(\"FilesArchived-maintainer\");\n thread.start();\n }", "private boolean extractSettingsZip(File fSettingsZip, String destDir, int index)\n {\n boolean result = false;\n try\n {\n //m_logWriter.write(\"Unzipping to destination: \"+destDir+\"\\n\");\n //m_logWriter.flush();\n \tboolean backFavFile = false;\n \tFile dest = new File(destDir);\n \tif (dest.exists()) {\n \t\tString userPath = destDir + \"/userdata/\";\n \t\tFile userFile = new File(userPath);\n \t\tString favDir = userPath + Update.FavouriteFile;\n \t\tFile favFile = new File(favDir);\n \t\tif (userFile.exists() && favFile.exists()) {\n \t\t\tCopyFile(userPath, Update.FavouriteFile, Update.pathSD);\n \t\t\tbackFavFile = true;\n \t\t}\n \t\t\n \t\tDeleteDir(destDir);\n \t}\n \telse\n \t\tdest.mkdirs();\n \t\n publishProgress(PROGRESS_EXTRACT, (int)(0.5 * index));\n // open the zip\n ZipFile zip = new ZipFile(fSettingsZip);\n int count=0;\n int zipSize = zip.size();\n Enumeration<? extends ZipEntry> entries = zip.entries();\n //while(entries.hasMoreElements())\n while (true)\n {\n if (isCancelled()) {\n \tresult = false;\n \tm_ErrorCode = 4;\n break;\n }\n\n if (m_DownloadStop)\n \tcontinue;\n \n if (!entries.hasMoreElements())\n \tbreak;\n \n // todo: update progress\n ZipEntry ze = (ZipEntry)entries.nextElement();\n count++;\n String entryName = ze.getName();\n String destFullpath = destDir+\"/\"+entryName;\n //m_logWriter.write(\"Extracting: \"+destFullpath+\"\\n\");\n File fDestPath = new File(destFullpath);\n if (ze.isDirectory())\n {\n fDestPath.mkdirs();\n publishProgress(PROGRESS_EXTRACT, (int)(0.5 * (index + count*100/zipSize)));\n continue;\n }\n fDestPath.getParentFile().mkdirs();\n\n // write file\n try {\n InputStream is = zip.getInputStream(ze);\n BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(destFullpath));\n int n=0;\n byte buf[] = new byte[4096];\n while((n = is.read(buf, 0, 4096)) > -1)\n {\n bos.write(buf, 0, n);\n }\n // close\n is.close();\n bos.close();\n } catch(IOException ioe) {\n \tm_ErrorCode = 5;\n //m_logWriter.write(\"Could not write, error: \"+ioe.toString());\n }\n\n // update progress\n //publishProgress(PROGRESS_EXTRACT, (count*100/zipSize));\n }\n\n // close zip and bail\n zip.close();\n //m_logWriter.write(\"Successfully extracted: \"+fSettingsZip.getName()+\"\\n\");\n //m_logWriter.flush();\n if (backFavFile) {\n \t\tString userPath = destDir + \"/userdata/\";\n \t\tFile userFile = new File(userPath);\n \t\tif (!userFile.exists())\n \t\t\tuserFile.mkdirs();\n \t\t\n \t\tFile inputFile = new File(Update.pathSD + Update.FavouriteFile);\n \t\tif (inputFile.exists())\n \t\t\tCopyFile(Update.pathSD, Update.FavouriteFile, userPath);\n }\n \n result = !isCancelled();\n }\n catch(Exception e)\n {\n //Log.e(\"SettingsDownloader\", \"Error: \"+e.toString());\n result = false;\n m_ErrorCode = 6;\n }\n\n return result;\n }", "private File downloadAndUnzipCollection(final Document collectionPage)\n {\n // look for a link-element for downloading a zip-file\n final Element zipLinkElement = collectionPage.selectFirst(FishStatJSourceConstants.ZIP_LINKS_SELECTION);\n\n if (zipLinkElement == null)\n return null;\n\n // retrieve URL from link-element\n final String zipUrl = zipLinkElement.attr(FishStatJSourceConstants.HREF_ATTRIBUTE);\n\n if (zipUrl == null)\n return null;\n\n // unzip file\n final File unzipRootFolder = EventSystem.sendSynchronousEvent(new GetCacheFolderEvent());\n final File unzipFolder = new File(unzipRootFolder, FishStatJFileConstants.UNZIP_FOLDER + zipLinkElement.text().replaceAll(\"\\\\W\", \"\"));\n final boolean isUnzipped = unZipFileFromUrl(zipUrl, unzipFolder);\n\n if (!isUnzipped)\n return null;\n\n return unzipFolder;\n }", "private void downloadZippedDirectory(String selectedFolder) {\n if (selectedFolder != null) {\n File file = getFile(selectedFolder);\n StreamSource zipSource = getZipSource(file);\n getMainWindow().open(new VaadinFileDownloadResource(zipSource, selectedFolder+\".zip\", 0, getMainWindow().getApplication()), \"_self\");\n }\n }", "public static boolean SafeUnzipFile(ZipFile zf, String filepathinzip, File fileinfiledir, long crc) {\r\n BufferedOutputStream Output_fos = null;\r\n BufferedInputStream bufbr = null;\r\n try {\r\n ZipEntry ze = zf.getEntry(filepathinzip);\r\n if (ze == null) {\r\n if (Output_fos != null) {\r\n try {\r\n Output_fos.close();\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n return false;\r\n }\r\n }\r\n } catch (IOException e2) {\r\n e2.printStackTrace();\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e3) {\r\n e3.printStackTrace();\r\n return false;\r\n }\r\n }\r\n return false;\r\n } finally {\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e4) {\r\n e4.printStackTrace();\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n if (crc != 0) {\r\n if (ze.getCrc() == crc) {\r\n if (Output_fos != null) {\r\n try {\r\n Output_fos.close();\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e5) {\r\n e5.printStackTrace();\r\n return false;\r\n }\r\n }\r\n } catch (IOException e6) {\r\n e6.printStackTrace();\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e7) {\r\n e7.printStackTrace();\r\n return false;\r\n }\r\n }\r\n return false;\r\n } finally {\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e8) {\r\n e8.printStackTrace();\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n }\r\n byte[] buf = UnzipFile(zf, ze);\r\n if (1 != 0) {\r\n BufferedOutputStream Output_fos2 = new BufferedOutputStream(new FileOutputStream(fileinfiledir));\r\n try {\r\n Output_fos2.write(buf, 0, buf.length);\r\n Output_fos = Output_fos2;\r\n } catch (Exception e9) {\r\n e = e9;\r\n Output_fos = Output_fos2;\r\n try {\r\n e.printStackTrace();\r\n if (Output_fos != null) {\r\n try {\r\n Output_fos.close();\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e10) {\r\n e10.printStackTrace();\r\n return false;\r\n }\r\n }\r\n } catch (IOException e11) {\r\n e11.printStackTrace();\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e12) {\r\n e12.printStackTrace();\r\n return false;\r\n }\r\n }\r\n return false;\r\n } finally {\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e13) {\r\n e13.printStackTrace();\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n return false;\r\n } catch (Throwable th) {\r\n th = th;\r\n if (Output_fos != null) {\r\n }\r\n throw th;\r\n }\r\n } catch (Throwable th2) {\r\n th = th2;\r\n Output_fos = Output_fos2;\r\n if (Output_fos != null) {\r\n try {\r\n Output_fos.close();\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e14) {\r\n e14.printStackTrace();\r\n return false;\r\n }\r\n }\r\n } catch (IOException e15) {\r\n e15.printStackTrace();\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e16) {\r\n e16.printStackTrace();\r\n return false;\r\n }\r\n }\r\n return false;\r\n } finally {\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e17) {\r\n e17.printStackTrace();\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n throw th;\r\n }\r\n }\r\n if (Output_fos != null) {\r\n try {\r\n Output_fos.close();\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e18) {\r\n e18.printStackTrace();\r\n return false;\r\n }\r\n }\r\n } catch (IOException e19) {\r\n e19.printStackTrace();\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e20) {\r\n e20.printStackTrace();\r\n return false;\r\n }\r\n }\r\n return false;\r\n } finally {\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e21) {\r\n e21.printStackTrace();\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n return true;\r\n } catch (Exception e22) {\r\n e = e22;\r\n }\r\n }", "public static void compressFolder(String dirPath, String zipFileName) throws Exception {\n\t\tFile destination = new File(zipFileName);\n\t\tFile source = new File(dirPath);\n\t\tOutputStream archiveStream = new FileOutputStream(destination);\n\t\tArchiveOutputStream archive = new ArchiveStreamFactory().createArchiveOutputStream(ArchiveStreamFactory.ZIP,\n\t\t\t\tarchiveStream);\n\n\t\tCollection<File> fileList = FileUtils.listFiles(source, null, true);\n\n\t\t//loop through all files and add them one by one to the archive\n\t\tfor (File file : fileList) {\n\t\t\tString entryName = getEntryName(source, file);\n\t\t\tZipArchiveEntry entry = new ZipArchiveEntry(entryName);\n\t\t\tarchive.putArchiveEntry(entry);\n\n\t\t\tBufferedInputStream input = new BufferedInputStream(new FileInputStream(file));\n\n\t\t\tIOUtils.copy(input, archive);\n\t\t\tinput.close();\n\t\t\tarchive.closeArchiveEntry();\n\t\t}\n\n\t\tarchive.finish();\n\t\tarchiveStream.close();\n\t}", "public CombineArchive (File zipFile)\n\t\tthrows IOException,\n\t\t\tJDOMException,\n\t\t\tParseException,\n\t\t\tCombineArchiveException\n\t{\n\t\tinit (zipFile, false);\n\t}", "public ZipEntry decompress(File compressedFile, File outputDirectory) throws IOException {\n\t\tObjects.requireNonNull(compressedFile);\n\t\tObjects.requireNonNull(outputDirectory);\n\t\tZipEntry ret = null;\n\t\tif (!outputDirectory.exists()) {\n\t\t\toutputDirectory.mkdirs();\n\t\t}\n\t\tZipInputStream input = new ZipInputStream(new FileInputStream(compressedFile));\n\t\tfor (ZipEntry entry = input.getNextEntry(); Objects.nonNull(entry); entry = input.getNextEntry()) {\n\t\t\tif (Objects.isNull(ret)) {\n\t\t\t\tret = entry;\n\t\t\t}\n\n\t\t\tString fileName = entry.getName();\n\t\t\tFile newFile = new File(outputDirectory + File.separator + fileName);\n\n\t\t\t(new File(newFile.getParent())).mkdirs();\n\n\t\t\tif (entry.isDirectory()) {\n\t\t\t\tnewFile.mkdirs();\n\t\t\t} else {\n\t\t\t\tstoreFile(input, newFile);\n\t\t\t}\n\n\t\t}\n\t\tinput.closeEntry();\n\t\tinput.close();\n\t\treturn ret;\n\t}", "@Override\r\n\tpublic void zipFile(ZipFileDetails zipFileDetails) throws FileSystemUtilException {\r\n\t\tthrow new FileSystemUtilException(\"000000\", null, Level.ERROR, null);\r\n\r\n\t}", "private void addToZip(File directoryToZip, File file, ZipOutputStream zos) throws IOException {\r\n final int BUFFER_SIZE = 1024;\r\n FileInputStream fis = new FileInputStream(file);\r\n // we want the zipEntry's path to be a relative path that is relative\r\n // to the directory being zipped, so chop off the rest of the path\r\n String zipFilePath = file.getCanonicalPath().substring(\r\n (directoryToZip.getCanonicalPath().length() - directoryToZip.getName().length()),\r\n file.getCanonicalPath().length());\r\n ZipEntry zipEntry = new ZipEntry(zipFilePath);\r\n zos.putNextEntry(zipEntry);\r\n byte[] bytes = new byte[BUFFER_SIZE];\r\n int length;\r\n while ((length = fis.read(bytes)) >= 0) {\r\n zos.write(bytes, 0, length);\r\n }\r\n zos.closeEntry();\r\n fis.close();\r\n }", "void importDivision(Connection con, ZipFile zip) throws Exception;", "private static void writeFile(ZipInputStream zipIn, String filePath) throws IOException {\n\n String parent = filePath.replace(filePath.substring(filePath.lastIndexOf('/')), \"\");\n createParents(parent);\n\n BufferedOutputStream bos = null;\n\n try {\n bos = new BufferedOutputStream(new FileOutputStream(filePath));\n byte[] bytesIn = new byte[BUFFER_SIZE];\n\n int read = 0;\n while ((read = zipIn.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n\n } catch (IOException e) {\n System.err.println(e.getMessage());\n Errors.setUnzipperError(true);\n\n } finally {\n if (bos != null) {\n bos.close();\n }\n }\n }", "protected File createZipArchive(File directoryToZip, String modpackName, String workspace) throws Exception {\n zipName = LocalDateTime.now().format(DateTimeFormatter.ofPattern(\"yyyy-MM-dd-HH-mm-ss\")) + \"--\" + modpackName + \".zip\";\n uploadStatus = \"Creating Zipfile from Directory\";\n File zipFile = new File(workspace + \"\\\\\" + zipName);\n try {\n ProgressBarLogic progressBarLogic = new ProgressBarLogic(directoryToZip);\n ZipUtil.pack(directoryToZip, zipFile, name -> {\n uploadStatus = \"Adding file: \" + name + \" to the zip\";\n progressBarLogic.progressPercentage = 0;\n progressBarLogic.progress.add(name);\n progressBarLogic.calculateProgress(progressBarLogic.progress);\n notifyObserver();\n return name;\n });\n } catch (ZipException e) {\n throw e;\n } catch (Exception e) {\n System.out.println(e);\n }\n return zipFile;\n }", "private static void extractArchive(Path sourcePath, Path targetPath) throws IOException {\n\n // TODO: janv_capgemini check if sourcePath is an archive and throw exception if not\n FileSystem fs = FileSystems.newFileSystem(sourcePath, null);\n\n Path path = fs.getPath(\"/\");\n Files.walkFileTree(path, new SimpleFileVisitor<Path>() {\n @Override\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\n\n Path relativePath = path.relativize(file);\n Path targetPathResolved = targetPath.resolve(relativePath.toString());\n Files.deleteIfExists(targetPathResolved);\n Files.createDirectories(targetPathResolved.getParent());\n Files.copy(file, targetPathResolved);\n return FileVisitResult.CONTINUE;\n }\n\n @Override\n public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {\n\n // Log errors but do not throw an exception\n LOG.warn(\"An IOException occurred while reading a file on path {} with message: {}\", file, exc.getMessage());\n LOG.debug(\"An IOException occurred while reading a file on path {} with message: {}\", file,\n LOG.isDebugEnabled() ? exc : null);\n return FileVisitResult.CONTINUE;\n }\n });\n\n }", "private boolean unarchive(String osSdkRoot, File archiveFile, SdkManager sdkManager, ITaskMonitor monitor) {\n boolean success = false;\n Package pkg = getParentPackage();\n String pkgName = pkg.getShortDescription();\n String pkgDesc = String.format(\"Installing %1$s\", pkgName);\n monitor.setDescription(pkgDesc);\n monitor.setResult(pkgDesc);\n String pkgKind = pkg.getClass().getSimpleName();\n File destFolder = null;\n File unzipDestFolder = null;\n File oldDestFolder = null;\n try {\n unzipDestFolder = createTempFolder(osSdkRoot, pkgKind, \"new\");\n if (unzipDestFolder == null) {\n monitor.setResult(\"Failed to find a temp directory in %1$s.\", osSdkRoot);\n return false;\n }\n if (!unzipDestFolder.mkdirs()) {\n monitor.setResult(\"Failed to create directory %1$s\", unzipDestFolder.getPath());\n return false;\n }\n String[] zipRootFolder = new String[] { null };\n if (!unzipFolder(archiveFile, getSize(), unzipDestFolder, pkgDesc, zipRootFolder, monitor)) {\n return false;\n }\n if (!generateSourceProperties(unzipDestFolder)) {\n return false;\n }\n destFolder = pkg.getInstallFolder(osSdkRoot, zipRootFolder[0], sdkManager);\n if (destFolder == null) {\n monitor.setResult(\"Failed to compute installation directory for %1$s.\", pkgName);\n return false;\n }\n if (!pkg.preInstallHook(this, monitor, osSdkRoot, destFolder)) {\n monitor.setResult(\"Skipping archive: %1$s\", pkgName);\n return false;\n }\n boolean move1done = false;\n boolean move2done = false;\n while (!move1done || !move2done) {\n File renameFailedForDir = null;\n if (!move1done) {\n if (destFolder.isDirectory()) {\n if (oldDestFolder == null) {\n oldDestFolder = createTempFolder(osSdkRoot, pkgKind, \"old\");\n }\n if (oldDestFolder == null) {\n monitor.setResult(\"Failed to find a temp directory in %1$s.\", osSdkRoot);\n return false;\n }\n if (!destFolder.renameTo(oldDestFolder)) {\n monitor.setResult(\"Failed to rename directory %1$s to %2$s.\", destFolder.getPath(), oldDestFolder.getPath());\n renameFailedForDir = destFolder;\n }\n }\n move1done = (renameFailedForDir == null);\n }\n if (move1done && !move2done) {\n if (renameFailedForDir == null && !unzipDestFolder.renameTo(destFolder)) {\n monitor.setResult(\"Failed to rename directory %1$s to %2$s\", unzipDestFolder.getPath(), destFolder.getPath());\n renameFailedForDir = unzipDestFolder;\n }\n move2done = (renameFailedForDir == null);\n }\n if (renameFailedForDir != null) {\n if (SdkConstants.CURRENT_PLATFORM == SdkConstants.PLATFORM_WINDOWS) {\n String msg = String.format(\"-= Warning ! =-\\n\" + \"A folder failed to be renamed or moved. On Windows this \" + \"typically means that a program is using that folder (for example \" + \"Windows Explorer or your anti-virus software.)\\n\" + \"Please momentarily deactivate your anti-virus software.\\n\" + \"Please also close any running programs that may be accessing \" + \"the directory '%1$s'.\\n\" + \"When ready, press YES to try again.\", renameFailedForDir.getPath());\n if (monitor.displayPrompt(\"SDK Manager: failed to install\", msg)) {\n continue;\n }\n }\n return false;\n }\n break;\n }\n unzipDestFolder = null;\n success = true;\n pkg.postInstallHook(this, monitor, destFolder);\n return true;\n } finally {\n deleteFileOrFolder(oldDestFolder);\n deleteFileOrFolder(unzipDestFolder);\n if (!success) {\n pkg.postInstallHook(this, monitor, null);\n }\n }\n }", "private static void zipFolder(ZipOutputStream out, File folder) throws IOException {\n\n final int BUFFER = 2048;\n\n File[] fileList = folder.listFiles();\n BufferedInputStream origin;\n\n for (File file : fileList) {\n if (file.isDirectory()) {\n zipFolder(out, file);\n } else {\n byte data[] = new byte[BUFFER];\n\n String unmodifiedFilePath = file.getPath();\n FileInputStream fi = new FileInputStream(unmodifiedFilePath);\n\n origin = new BufferedInputStream(fi, BUFFER);\n ZipEntry entry = new ZipEntry(file.getName());\n\n out.putNextEntry(entry);\n\n int count;\n while ((count = origin.read(data, 0, BUFFER)) != -1) {\n out.write(data, 0, count);\n }\n\n out.closeEntry();\n origin.close();\n }\n }\n\n // Finish the zip stream and close it\n out.finish();\n out.close();\n }", "protected void unpack( File file, File location )\n throws MojoExecutionException, NoSuchArchiverException\n {\n String archiveExt = FileUtils.getExtension( file.getAbsolutePath() ).toLowerCase();\n\n try\n {\n UnArchiver unArchiver = this.archiverManager.getUnArchiver( archiveExt );\n\n unArchiver.setSourceFile( file );\n\n unArchiver.setDestDirectory( location );\n\n unArchiver.extract();\n }\n catch ( IOException e )\n {\n throw new MojoExecutionException( \"Error unpacking file: \" + file + \"to: \" + location, e );\n }\n catch ( ArchiverException e )\n {\n throw new MojoExecutionException( \"Error unpacking file: \" + file + \"to: \" + location, e );\n }\n }", "public static void unzip(InputStream inputStream, UnzipCallback unzipListener) throws IOException {\r\n\t\tZipInputStream zis = new ZipInputStream(inputStream);\r\n\t\t\r\n\t\tfor(ZipEntry zipEntry = zis.getNextEntry(); zipEntry != null; zipEntry = zis.getNextEntry()) {\r\n\t\t\tunzipListener.newZipEntry(zipEntry, zis);\r\n\t\t\tzis.closeEntry();\r\n\t\t}\r\n\t}", "public String zipDirectoryInternalPath(String sourceDirectoryPath, String zipOutputPath) throws IOException {\n\t\t \t // DECLARATION:\n\t\t \t if(sourceDirectoryPath.endsWith(\"\\\\\")) { sourceDirectoryPath = sourceDirectoryPath.substring(0, sourceDirectoryPath.length() - 1); }\n\t\t \t sourceDirectoryPath = sourceDirectoryPath.replace(\"\\\\\", \"/\");\n\t\t \t zipOutputPath = zipOutputPath.replace(\"\\\\\", \"/\");\n\t\t \t // MESSAGE:\n\t\t \t fileWriterPrinter(\"\\nSOURCE DIRECTORY: \" + sourceDirectoryPath);\n\t\t \t fileWriterPrinter(\" ZIP OUTPUT PATH: \" + zipOutputPath + \"\\n\");\n\t\t \t \n\t\t File dir = new File(sourceDirectoryPath);\n\t\t File file = new File(zipOutputPath);\n\t\t // System.out.println(mydir.toURI().relativize(myfile.toURI()).getPath());\t\n\t\t zip(dir, file);\n\t\t return zipOutputPath;\n\t\t\t}", "@Test\r\n public void testUnzipArchive() throws Exception {\r\n\r\n\r\n (new ZipUtils(\"Cp866\")).unzipArchive(\r\n \"src/test/resources/archive/testfile.zip\",\r\n \"target/test-classes/import/archive\"\r\n );\r\n\r\n File [] files = (new File(\"target/test-classes/import/archive\")).listFiles();\r\n\r\n boolean found = false;\r\n \r\n for (File file : files) {\r\n if (file.getAbsolutePath().contains(\"Привет, я файло.txt\")) {\r\n found = true;\r\n break;\r\n }\r\n }\r\n assertTrue(found);\r\n\r\n\r\n }", "private static String createZipFile(String directory, String zipFilename, List<File> filesToAdd)\n throws IOException {\n String zipFilePath = String.format(\"%s/%s\", directory, zipFilename);\n File zipFile = new File(zipFilePath);\n if (zipFile.exists()) {\n if (zipFile.delete()) {\n log.info(\"Zipfile existed and was deleted: \" + zipFilePath);\n } else {\n log.warn(\"Zipfile exists but was not deleted: \" + zipFilePath);\n }\n }\n\n // Create and add files to zip file\n addFilesToZip(zipFile, filesToAdd);\n\n return zipFilePath;\n }", "public static byte[] getUnzippedFile(byte[] aZippedBytes) throws IOException {\r\n byte[] result = null;\r\n\r\n ByteArrayInputStream bais = new ByteArrayInputStream(aZippedBytes);\r\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\r\n BufferedInputStream bis = new BufferedInputStream(new GZIPInputStream(bais));\r\n BufferedOutputStream bos = new BufferedOutputStream(baos);\r\n int read = -1;\r\n while ((read = bis.read()) != -1) {\r\n bos.write(read);\r\n }\r\n bos.flush();\r\n baos.flush();\r\n result = baos.toByteArray();\r\n bos.close();\r\n bis.close();\r\n bais.close();\r\n baos.close();\r\n\r\n return result;\r\n }", "private String writeZipFile(File directoryToZip, List<File> fileList, String zipName) throws IOException{\r\n // If the zip name is null then provide the name of the directory\r\n if(zipName == null){\r\n zipName = directoryToZip.getName();\r\n }\r\n // Store the file name\r\n String fileName = zipName;\r\n // Create the zip file\r\n FileOutputStream fos = new FileOutputStream(fileName);\r\n ZipOutputStream zos = new ZipOutputStream(fos);\r\n for (File file : fileList) {\r\n if (!file.isDirectory()) { // we only zip files, not directories\r\n // Add files that are not in the skip list\r\n if(!isFileToSkip(file.getName())) {\r\n addToZip(directoryToZip, file, zos);\r\n }\r\n }\r\n }\r\n zos.close();\r\n fos.close();\r\n // Return the full name of the file\r\n return fileName;\r\n }", "public static ZipFile zip(File zip, File fileToAdd, String password)\r\n\t\t\tthrows ZipException {\n\t\tZipFile zipFile = new ZipFile(zip);\r\n\r\n\t\tZipParameters parameters = new ZipParameters();\r\n\t\tparameters.setCompressionMethod(Zip4jConstants.COMP_DEFLATE);\r\n\t\tparameters.setCompressionLevel(Zip4jConstants.DEFLATE_LEVEL_NORMAL);\r\n\t\tif (!StringUtil.isEmpty(password)) {\r\n\t\t\tparameters.setEncryptFiles(true);\r\n\t\t\tparameters.setEncryptionMethod(Zip4jConstants.ENC_METHOD_STANDARD);\r\n\t\t\tparameters.setPassword(password);\r\n\t\t}\r\n\t\tzipFile.addFile(fileToAdd, parameters);\r\n\t\treturn zipFile;\r\n\t}", "public void readZip(File f) {\r\n try {\r\n unzip(f);\r\n File file = new File(workplace + \"/temp/USQ_IMAGE\");\r\n File old = new File(workplace + \"/old\");\r\n if(!old.exists())old.mkdir();\r\n if(old.exists()&&old.isFile())old.mkdir();\r\n File files[] = file.listFiles();\r\n for(int i=0 ; i<files.length ; i++){\r\n readFile(files[i]);\r\n }\r\n //new session\r\n createSes(f);\r\n } catch (Exception ex) {\r\n JOptionPane.showMessageDialog(null, \"read zip file failed.\", \"System Message\", JOptionPane.ERROR_MESSAGE);\r\n ex.printStackTrace();\r\n }\r\n }", "protected void deleteZipAndFiles() throws IOException {\n FileUtils.deleteDirectory(new File(workspace + \"\\\\\" + zipName.replace(\".zip\", \"\")));\n FileUtils.forceDelete(new File(workspace + \"\\\\\" + zipName));\n uploadStatus = \"Cleaning up :)\";\n System.out.println(\"Done!\");\n }", "private ZipEntry processEntry( ZipFile zip, ZipEntry inputEntry ) throws IOException{\n /*\n First, some notes.\n On MRJ 2.2.2, getting the size, compressed size, and CRC32 from the\n ZipInputStream does not work for compressed (deflated) files. Those calls return -1.\n For uncompressed (stored) files, those calls do work.\n However, using ZipFile.getEntries() works for both compressed and \n uncompressed files.\n \n Now, from some simple testing I did, it seems that the value of CRC-32 is\n independent of the compression setting. So, it should be easy to pass this \n information on to the output entry.\n */\n String name = inputEntry .getName();\n if ( ! (inputEntry .isDirectory() || name .endsWith( \".class\" )) ) {\n try {\n InputStream input = zip.getInputStream( zip .getEntry( name ) );\n String className = ClassNameReader .getClassName( input );\n input .close();\n if ( className != null ) {\n name = className .replace( '.', '/' ) + \".class\";\n }\n } catch( IOException ioe ) {}\n }\n ZipEntry outputEntry = new ZipEntry( name );\n outputEntry.setTime(inputEntry .getTime() );\n outputEntry.setExtra(inputEntry.getExtra());\n outputEntry.setComment(inputEntry.getComment());\n outputEntry.setTime(inputEntry.getTime());\n if (compression){\n outputEntry.setMethod(ZipEntry.DEFLATED);\n //Note, don't need to specify size or crc for compressed files.\n } else {\n outputEntry.setMethod(ZipEntry.STORED);\n outputEntry.setCrc(inputEntry.getCrc());\n outputEntry.setSize(inputEntry.getSize());\n }\n return outputEntry;\n }", "private static FileSystem openZip(Path zipPath) throws IOException, URISyntaxException{\n\t Map<String, String> providerProps = new HashMap<>();\r\n\t\tproviderProps.put(\"create\", \"true\");\r\n\t\t\r\n\t\t// Um ZipFiles zu erstellen benötigt man URIs, deswegen werden sie hier erstellt\r\n\t\tURI zipUri = new URI(\"jar:file\", zipPath.toUri().getPath(), null);\r\n\t\tFileSystem zipFs = FileSystems.newFileSystem(zipUri, providerProps); // Statische Methode wird hier angewendet\r\n\t\t\r\n\t\treturn zipFs;\r\n\t}", "private void loadZipFile(String zipFileName, String classIndex)\n {\n InputStream trainSource = null, testSource = null;\n //The instance file is a zipped file containing a file called 'train' and one called 'test'\n try {\n ZipFile zipFile = new ZipFile(zipFileName);\n Enumeration entries = zipFile.entries();\n while(entries.hasMoreElements()) {\n ZipEntry entry = (ZipEntry)entries.nextElement();\n\n String name = entry.getName();\n if (name.equals(\"train.arff\"))\n {\n trainSource = zipFile.getInputStream(entry);\n }\n else if(name.equals(\"test.arff\"))\n {\n testSource = zipFile.getInputStream(entry);\n }\n else\n {\n //What is this?\n throw new RuntimeException(\"Unknown file in zip dataset '\" + name + \"'\");\n }\n }\n } catch (java.io.IOException e) {\n throw new RuntimeException(\"IO Operation failed\", e);\n }\n\n //Get the training data\n try {\n mTraining = Util.loadDataSource(trainSource);\n if (mTraining.classIndex() == -1){\n if(classIndex.equals(\"last\"))\n mTraining.setClassIndex(mTraining.numAttributes() - 1);\n else\n mTraining.setClassIndex(Integer.parseInt(classIndex));\n }\n } catch(Exception e) {\n throw new RuntimeException(\"Failed to load training data provided in zip\", e);\n }\n\n //Get the testing data\n try {\n mTesting = Util.loadDataSource(testSource);\n if (mTesting.classIndex() == -1){\n if(classIndex.equals(\"last\"))\n mTesting.setClassIndex(mTesting.numAttributes() - 1);\n else\n mTesting.setClassIndex(Integer.parseInt(classIndex));\n }\n } catch(Exception e) {\n throw new RuntimeException(\"Failed to load testing data provided in zip\", e);\n }\n\n }", "public static void Descomprimir(String ficheroZip, String directorioSalida) throws Exception {\n\t\t\n\t\tfinal int TAM_BUFFER = 4096;\n\t\tbyte[] buffer = new byte[TAM_BUFFER];\n\n\t\tZipInputStream flujo = null;\n\t\ttry {\n\t\t flujo = new ZipInputStream(new BufferedInputStream(new FileInputStream(ficheroZip)));\n\t\t \n\t\t ZipEntry entrada;\n\t\t while ((entrada = flujo.getNextEntry()) != null) {\n\t\t\tString nombreSalida = directorioSalida + File.separator + entrada.getName();\n\t\t\tif (entrada.isDirectory()) {\n\t\t\t File directorio = new File(nombreSalida);\n\t\t\t directorio.mkdir();\n\t\t\t} else {\n\t\t\t BufferedOutputStream salida = null;\n\t\t\t try {\n\t\t\t\tint leido;\n\t\t\t\tsalida = new BufferedOutputStream(new FileOutputStream(nombreSalida), TAM_BUFFER);\n\t\t\t\twhile ((leido = flujo.read(buffer, 0, TAM_BUFFER)) != -1) {\n\t\t\t\t salida.write(buffer, 0, leido);\n\t\t\t\t}\n\t\t\t } finally {\n\t\t\t\tif (salida != null) {\n\t\t\t\t salida.close();\n\t\t\t\t}\n\t\t\t }\n\t\t\t}\n\t\t }\n\t\t} finally {\n\t\t if (flujo != null) {\n\t\t\tflujo.close();\n\t\t }\n\n\t\t}\n\t}", "public static void readZip(String zipPath, boolean sort) throws IOException {\n // Load zip and its entries\n ZipFile zip = new ZipFile(new File(zipPath));\n Enumeration<? extends ZipEntry> entries = zip.entries();\n // Read every entry and load it to the HashMap\n while(entries.hasMoreElements()) {\n ZipEntry zipEntry = entries.nextElement();\n InputStream entryStream = zip.getInputStream(zipEntry);\n //Used only for the decoding mode\n //Compressed file that contains the Coded Data\n if(\"codedData.gz\".equals(zipEntry.getName())){\n FileInputStream in = new FileInputStream(\"codedData.gz\");\n GZIPInputStream gis = new GZIPInputStream(in);\n ObjectInputStream ois = new ObjectInputStream(gis);\n try {\n dataList = (ArrayList<CodedData>) (ois.readObject());\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(ProjectePractiques.class.getName()).log(Level.SEVERE, null, ex);\n }\n }else{\n BufferedImage image = ImageIO.read(entryStream);\n imageNames.add(zipEntry.getName()); \n imageDict.put(zipEntry.getName(), image);\n }\n }\n zip.close();\n // Sort the image names list\n if(sort){\n Collections.sort(imageNames, (String f1, String f2) -> f1.compareTo(f2)); \n }\n }", "public void newZipEntry(ZipEntry zipEntry, InputStream inputStream);", "public void zipDirectory(String sourceDirectoryPath, String zipOutputPath, Boolean ifAbsolutePath, Boolean ifProtect, int maxZipMbSizeToProtect) throws Exception {\t\t \n\t\t if(ifAbsolutePath) { zipOutputPath = zipDirectoryFullPath(sourceDirectoryPath, zipOutputPath); }\n\t\t else { zipOutputPath = zipDirectoryInternalPath(sourceDirectoryPath, zipOutputPath); }\t\t \n\t\t if(fileSizeMB(zipOutputPath) < maxZipMbSizeToProtect) {\n\t\t\t if(ifProtect){ fileRename(zipOutputPath,zipOutputPath.replace(\".zip\",\".renameToZip\")); }\n\t\t\t }\n\t\t }", "public List<File> unzipSubtitle(File zipFile, File targetDirectory) throws IOException {\n List<File> subtitles = new ArrayList<File>();\n ZipInputStream zis = new ZipInputStream(\n new BufferedInputStream(new FileInputStream(zipFile)));\n try {\n ZipEntry ze;\n byte[] buffer = new byte[2048];\n while ((ze = zis.getNextEntry()) != null) {\n File file = new File(targetDirectory, ze.getName());\n File dir = ze.isDirectory() ? file : file.getParentFile();\n if (!dir.isDirectory() && !dir.mkdirs())\n throw new FileNotFoundException(\"Failed to ensure directory: \" +\n dir.getAbsolutePath());\n if (ze.isDirectory())\n continue;\n String ext = FilenameUtils.getExtension(ze.getName());\n if(ext.equalsIgnoreCase(\"srt\") || ext.equalsIgnoreCase(\"vtt\") ) {\n FileOutputStream fout = new FileOutputStream(file);\n BufferedOutputStream bufout = new BufferedOutputStream(fout);\n int count;\n try {\n while ((count = zis.read(buffer)) != -1)\n bufout.write(buffer, 0, count);\n } finally {\n subtitles.add(file);\n bufout.close();\n fout.close();\n }\n }\n\n }\n } finally {\n zis.close();\n }\n\n\n return subtitles;\n }", "public byte[] getUnzippedFile() throws IOException {\r\n byte[] result = null;\r\n\r\n byte[] zipped = super.getFile();\r\n ByteArrayInputStream bais = new ByteArrayInputStream(zipped);\r\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\r\n BufferedInputStream bis = new BufferedInputStream(new GZIPInputStream(bais));\r\n BufferedOutputStream bos = new BufferedOutputStream(baos);\r\n int read = -1;\r\n while ((read = bis.read()) != -1) {\r\n bos.write(read);\r\n }\r\n bos.flush();\r\n baos.flush();\r\n result = baos.toByteArray();\r\n bos.close();\r\n bis.close();\r\n bais.close();\r\n baos.close();\r\n\r\n return result;\r\n }", "private static void processZip(File zip_name, final Histogram class_use, final Histogram method_use) {\n ZipFile zip_file;\n try {\n zip_file = new ZipFile(zip_name);\n } catch (Exception e) {\n throw new IllegalStateException(\"while reading archive '\"+zip_name+\"': \"+e);\n }\n final Enumeration< ? extends ZipEntry> en = zip_file.entries();\n while (en.hasMoreElements()) {\n final ZipEntry e = en.nextElement();\n final String e_name = e.getName();\n if (e.isDirectory()) continue;\n if (e_name.endsWith(\".class\")){\n try {\n final InputStream object_stream=zip_file.getInputStream(e);\n MethodCallEnumerator.analyzeClass(object_stream,class_use,method_use);\n object_stream.close();\n } catch (Exception ex) {\n throw new IllegalStateException(\"while processing: \"+ ex);\n }\n } \n }\n try {\n zip_file.close();\n } catch (Exception e) {\n throw new IllegalStateException(\"while reading archive: \" + e);\n }\n }", "private void renameFileInZip(final File zipFilePath, final String fileNameToRename,\n final String newFileName) throws IOException {\n Map<String, String> zip_properties = new HashMap<>();\n /* We want to read an existing ZIP File, so we set this to False */\n zip_properties.put(\"create\", \"false\");\n\n /* Specify the path to the ZIP File that you want to read as a File System */\n URI zip_disk = URI.create(\"jar:file:///\" + zipFilePath);\n\n /* Create ZIP file System */\n try (FileSystem zipfs = FileSystems.newFileSystem(zip_disk, zip_properties)) {\n /* Access file that needs to be renamed */\n Path pathInZipfile = zipfs.getPath(fileNameToRename);\n /* Specify new file name */\n Path renamedZipEntry = zipfs.getPath(newFileName);\n /* Execute rename */\n Files.move(pathInZipfile, renamedZipEntry, ATOMIC_MOVE);\n //System.out.println(pathInZipfile + \"File successfully renamed to \" + renamedZipEntry);\n }\n\n }", "public void setUnzippedFile(byte[] aBytes) throws IOException {\r\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\r\n GZIPOutputStream gos = new GZIPOutputStream(baos);\r\n BufferedOutputStream bos = new BufferedOutputStream(gos);\r\n ByteArrayInputStream bais = new ByteArrayInputStream(aBytes);\r\n BufferedInputStream bis = new BufferedInputStream(bais);\r\n int read = -1;\r\n while ((read = bis.read()) != -1) {\r\n bos.write(read);\r\n }\r\n bos.flush();\r\n baos.flush();\r\n gos.finish();\r\n super.setFile(baos.toByteArray());\r\n bis.close();\r\n bos.close();\r\n gos.close();\r\n bais.close();\r\n baos.close();\r\n }" ]
[ "0.77831817", "0.7593731", "0.75126123", "0.74985635", "0.74563664", "0.7454772", "0.74349326", "0.7381682", "0.7293289", "0.7279349", "0.7268242", "0.7268242", "0.7185685", "0.70724946", "0.6920682", "0.6825003", "0.682425", "0.67306745", "0.67265046", "0.67222416", "0.6669713", "0.6664455", "0.66575325", "0.6631785", "0.6591223", "0.6587907", "0.64788157", "0.64376175", "0.6401164", "0.63606304", "0.63606304", "0.6333074", "0.63084024", "0.6298236", "0.6243282", "0.62272394", "0.62111855", "0.62040234", "0.6196252", "0.61931413", "0.61866486", "0.61767393", "0.6147072", "0.6066985", "0.60263985", "0.6022495", "0.59933025", "0.5957536", "0.5917331", "0.5913763", "0.5890177", "0.58726466", "0.5847142", "0.58358437", "0.58325934", "0.58193487", "0.5765853", "0.575769", "0.56737703", "0.56299883", "0.5628047", "0.5579059", "0.5570303", "0.55295414", "0.5506148", "0.54857445", "0.546368", "0.54632145", "0.54575473", "0.54399186", "0.54351175", "0.5434778", "0.5432657", "0.538377", "0.5346513", "0.53246284", "0.5307435", "0.53066033", "0.52919614", "0.5291094", "0.5286661", "0.5281619", "0.52709234", "0.52708894", "0.5241457", "0.5240514", "0.52046436", "0.5191057", "0.51775146", "0.51627547", "0.515232", "0.51283157", "0.5125169", "0.5101705", "0.5082155", "0.5073151", "0.50718343", "0.505517", "0.50541204", "0.50534326" ]
0.72439265
12
TODO Autogenerated method stub
@Override public int compare(WritableComparable a, WritableComparable b) { OrderBean aa=(OrderBean)a; OrderBean bb=(OrderBean)b; return aa.getOrderId().compareTo(bb.getOrderId()); }
{ "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
Map loginMap = ContextListener.loginMap;
@Override public void destroy() { // Do nothing }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Map<String, Object> getContext();", "@Override\n public void listenForLogins() {\n }", "public HashMap<?, ?> adminLoginService(Login loginValues);", "@Override\n public void onLoggedIn() {\n\n }", "@Override\r\n\t\t\tpublic void onLogin(String username, String password) {\n\r\n\t\t\t}", "private void loadLogin(){\n }", "protected String toContextMapKey(ClassLoader loader) {\n/* 52 */ return \"AsyncContext@\" + Integer.toHexString(System.identityHashCode(loader));\n/* */ }", "public abstract void onLogin();", "public Map<String, Object> getContextMap(MessageInfo messageInfo) {\n Map<String, Object> internalMap = (Map<String, Object>) messageInfo.getMap()\n .get(AuthenticationFramework.ATTRIBUTE_AUTH_CONTEXT);\n\n if (internalMap == null) {\n internalMap = new HashMap<>();\n messageInfo.getMap().put(AuthenticationFramework.ATTRIBUTE_AUTH_CONTEXT, internalMap);\n }\n\n return internalMap;\n }", "private LoginContext kinit(String principal) throws LoginException {\n LoginContext lc = new LoginContext(this.getClass().getSimpleName(), new CallbackHandler() {\n public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {\n for (Callback c : callbacks) {\n //if(c instanceof )\n if (c instanceof NameCallback)\n ((NameCallback) c).setName(principal);\n if (c instanceof PasswordCallback)\n ((PasswordCallback) c).setPassword(\"\".toCharArray()); // empty password -- use keytab ?\n }\n }\n });\n lc.login();\n return lc;\n }", "public interface LoginInteractor {\n interface OnLoginFinishesListener {\n void onUserNameError();\n\n void onPasswordError();\n\n void onSuccess();\n }\n\n void Login(String username, String password, OnLoginFinishesListener listener, Context context);\n}", "default void onLogon(SessionID sessionID) {\n }", "public interface OnLoginListener {\n public void loginStatus(boolean status, String desc);\n}", "public void StartLogIn(){\n\t}", "public interface OnLoginListener {\n public void loginStatus(boolean status);\n}", "public interface OnLoginListener {\nvoid onUserNameError();\nvoid onUserPasswordError();\nvoid onSuccess(String id);\nvoid onFailure();\n}", "@Override\n\tpublic boolean login(Map<String, Object> map) {\n\t\treturn false;\n\t}", "Map getConnectionManagerMap();", "CTX_Context getContext();", "public interface OnLoginListener {\n void onAuthenticated(String companyName);\n }", "default void onConnect(SessionID sessionID) {\n }", "private AttributeMapBindingEvent getContextBindingEvent(HttpSessionBindingEvent event) {\r\n\t\treturn new AttributeMapBindingEvent(new LocalAttributeMap(sessionMap), event.getName(), listener);\r\n\t}", "@Override\r\n\tpublic void login() {\n\r\n\t}", "public interface OnLoginListener {\n void onSuccess();\n void onError();\n}", "public interface LoginStateListener {\n\n\n void login();\n\n void directNext();\n\n void start();\n}", "@Override\n\tpublic void onLoginSuccess() {\n\t\t\n\t}", "@Override\n default ManagerPrx ice_context(java.util.Map<String, String> newContext)\n {\n return (ManagerPrx)_ice_context(newContext);\n }", "@Override\n public void onConnected(Bundle arg0) {\n setupMap();\n\n\n }", "public interface ListenersFabric {\n ActionResultListener provideLoginActionListener(final SignInView view);\n}", "public static Map<String, String> getPassMap() {\r\n return passMap;\r\n }", "public interface OnLoginListener {\n void loginSuccess ( User user );\n\n void loginFailed ();\n}", "public interface DeviceContextChangeListener {\n\n /**\n * Notification about start phase in device context, right after successful handshake\n * @param nodeId\n * @param success or failure\n */\n void deviceStartInitializationDone(final NodeId nodeId, final boolean success);\n\n /**\n * Notification about start phase in device context, after all other contexts initialized properly\n * @param nodeId\n * @param success\n */\n void deviceInitializationDone(final NodeId nodeId, final boolean success);\n\n}", "Context getContext();", "public interface LoginCallBack {\n void onLogin();\n void onLogout();\n}", "public UserContext getUserContext();", "public interface OnLoginListener {\n void loginSuccess(User user);\n void loginFailed();\n}", "@Override\n public void init() {\n ServletContext context = getServletContext();\n KeyLoader loader = new KeyLoader();\n\n context.setAttribute(\"translateKey\", loader.getKey(TRANSLATE));\n context.setAttribute(\"authKey\", loader.getKeyBytes(AUTH));\n context.setAttribute(\"servletRoles\", getServletRoles());\n }", "public interface OnLoginListener {\n void loginSuccess(User user);\n\n void loginFailed();\n}", "public interface OnLoginFinishedListener {\n\n void onUsernameError();\n\n void onPasswordError();\n\n void onSuccess();\n}", "@Override\n\tpublic Map<InetSocketAddress, AuthInfo> getAuthInfoMap() {\n\t\treturn null;\n\t}", "@Override\n public void onLoginSuccessful() {\n\n }", "public abstract ApplicationLoader.Context context();", "@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n listener = (LoginFragment.LoginFragmentListener) context;\n }", "private void initializePermissionsMap() {\n }", "public interface OnLoginStatusChangeListener {\n\t\tpublic void onLoginStatusChanged(Boolean isLogedIn, String username, String password);\n\t}", "public interface LoginCallback {\n\n void onLoginSuccess();\n}", "Login.Req getLoginReq();", "@Override\n public void onLoging() {\n }", "public BackingMapManagerContext getContext();", "public interface OnLoginListener {\n void loginSuccess(User user);\n\n void loginFail(int code, String msg);\n}", "public void start()\n/* 354: */ {\n/* 355:434 */ onStartup();\n/* 356: */ }", "public void init(BackingMapManagerContext context);", "ApplicationContext getAppCtx();", "@Override\r\n\tpublic void MemberLogin() {\n\r\n\t}", "@Override\r\n\tpublic void login() {\n\t\t\r\n\t}", "int getLoginFlag();", "public abstract I_Authenticate getSecurityCtx();", "private LogIn() {}", "public void authenticate(LoginRequest loginRequest) {\n\n }", "@SuppressWarnings(\"unchecked\")\n public Map<String, String> getMapContextPath() {\n FacesContext facesContext = FacesContext.getCurrentInstance();\n ExternalContext extenalContext = facesContext.getExternalContext();\n HttpServletRequest request = (HttpServletRequest) extenalContext.getRequest();\n return (Map<String, String>) request.getSession().getAttribute(\"MAP_CONTEXT_PATH\");\n //xxx_temp end\n }", "public interface OnRequestDetailsListen {\n}", "@Override\r\n\tpublic int LoginState(Context _in_context) {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic int LoginState(Context _in_context) {\n\t\treturn 0;\r\n\t}", "public interface SecurityContext {\n\n}", "private void loggedInUser() {\n\t\t\n\t}", "public LoginService() {\n users.put(\"johndoe\", \"John Doe\");\n users.put(\"janedoe\", \"Jane Doe\");\n users.put(\"jguru\", \"Java Guru\");\n }", "SessionManager get();", "public Map getSessionMap() {\r\n\t\treturn sessionMap;\r\n\t}", "public GeoServerHttpSessionListenerProxy() {\n }", "public interface VerifyAccessCodeCallback {\n void onAccessCode(String username);\n}", "public interface INetworkListener extends IListener {\n\n /**\n * Called when a use logs out from the server\n *\n * @param loggedIn if the user is loggedIn\n */\n void onLogout(boolean loggedIn);\n\n}", "static void init() {\n\t\tuserDatabase = new HashMap<String, User>();\n\t}", "private void initListeners() {\n appCompatButtonLogin.setOnClickListener(this);\n }", "public interface IntentListenerAccess {\n void onIntentListenerAcces(HashMap<String,Boolean> booleanHashMap);\n void onFragmentAccess(List<AccessFragment> accessFragmentList);\n}", "private void getUserInfo() {\n\t}", "@Override\r\n\tprotected void onLoginSuccess() {\n\t\t\r\n\t}", "public interface OnCallbackAuthenticationListener {\n void onSuccess();\n\n void onFailed();\n}", "public interface LoginActivityView {\n String getUserid();\n String getPassword();\n void setUserInfo(String userid, String password);\n void clear();\n void UseridRequestFocus();\n void PasswordRequestFocus();\n void UseridUnMatchRegex();\n void PasswordUnMatchRegex();\n void CheckUserid();\n LoginActivity getContext();\n\n}", "public interface BaseMapActivityInterface {\n\n void onMapReadyNext();\n\n int initMapType();\n\n int initContainerId();\n}", "public interface LoginCallback {\n\n /**\n * Method to manage user login online success\n * @param user\n */\n void onOnlineLoginSuccess(User user);\n\n /**\n * Method to manage user login offline success\n * @param user\n */\n void onOfflineLoginSuccess(User user);\n\n /**\n * Method to manage user login online fail\n */\n void onOnlineLoginFail(User user);\n\n /**\n * Method to manage user login offline fail\n */\n void onOfflineLoginFail(int errorMessage);\n\n}", "public LoginService getLoginService()\n {\n return loginService;\n }", "private void myOnAttach(Context context) {\n\n if (context instanceof LoginFragmentInteractionListener) {\n mListener = (LoginFragmentInteractionListener) context;\n } else {\n throw new RuntimeException(context.toString()\n + \" must implement LoginFragmentInteractionListener\");\n }\n }", "@Component(modules = LoginApplicationModule.class)\n@Singleton\npublic interface LoginApplicationComponent {\n Context exposeContext();\n}", "@Override\n public void onContext() {\n }", "public Map<String, Object> context() {\n return unmodifiableMap(context);\n }", "public interface MapReadyListener {\n\n void mapIsReady();\n}", "public interface LoginProvider {\n\n /**\n * Log in the user given the username and password, and returns a login context.\n *\n * @param username the username\n * @param password the password\n * @return the login context\n * @throws LoginException if the user cannot be logged in\n */\n LoginContext login(String username, String password) throws LoginException;\n\n}", "public interface LoginModule {\n void login(String username, String password, forBackListener forBackListener);\n void Regist(String username,String password,String rePassword,registListener forBackListener);\n}", "long getCurrentContext();", "public interface ILoginCallBack {\n public void onLogSuccess();\n public void onLogFailed();\n}", "@Override\r\n\tpublic ThirdLogin getLoginInfoByUid(Map<String, Object> map) {\n\t\treturn this.thirdDao.selectLoginInfoByUid(map);\r\n\t}", "public interface IAsynAuthenticationCallbackListener\r\n{\r\n void authenticate(G60002Bean g60002Bean);\r\n}", "public interface LoginCallback {\n\n void onLoginSuccess(User user);\n\n void onLoginFailure(String error);\n\n}", "public LoginManager() {\r\n }", "public interface AuthenticationServiceListener {\n void onUserLoginFailed(Exception exception);\n void onRegistrationFailed(Exception exception);\n}", "public interface OnLoginListener {\n public void success(Bean bean);\n public void failed();\n}", "Login() { \n }", "public Map getServicesInUseMap() {\n \t\tsynchronized (contextLock) {\n \t\t\treturn servicesInUse;\n \t\t}\n \t}", "protected abstract void initKeyNameMapping(Context context, HashMap<String, RemoteKey> keyMapping);", "@Override\r\npublic void setSession(Map<String, Object> arg0) {\n\t\r\n}", "Login.Res getLoginRes();" ]
[ "0.62397915", "0.62260896", "0.60817933", "0.58728766", "0.585065", "0.5799613", "0.5727144", "0.56815016", "0.5656837", "0.5635175", "0.5628445", "0.56283957", "0.5600471", "0.5542225", "0.55362344", "0.5524253", "0.5522827", "0.5503631", "0.5496458", "0.5491305", "0.54810697", "0.54776216", "0.54518354", "0.54489946", "0.5445707", "0.5438445", "0.54216164", "0.53954357", "0.53938586", "0.5386405", "0.5384566", "0.5383181", "0.53757566", "0.5364051", "0.5356957", "0.53543055", "0.5343973", "0.5338208", "0.532878", "0.5321889", "0.5316052", "0.5300899", "0.5288553", "0.5281608", "0.528019", "0.52792615", "0.5273667", "0.52734387", "0.52731", "0.526958", "0.5214086", "0.5213224", "0.52052176", "0.5194338", "0.5194121", "0.51782835", "0.51744026", "0.51701546", "0.5168163", "0.5133041", "0.5130976", "0.5130287", "0.5130287", "0.51213634", "0.5111948", "0.5110083", "0.5109127", "0.5098762", "0.5095856", "0.50949925", "0.50932556", "0.50929207", "0.50925314", "0.50857013", "0.5082013", "0.50776327", "0.5075792", "0.5068999", "0.5058057", "0.50536996", "0.50489205", "0.50471795", "0.5044645", "0.5039818", "0.50391424", "0.5035933", "0.50335807", "0.502939", "0.5029264", "0.50279504", "0.5027017", "0.50265837", "0.50162435", "0.5012323", "0.5005542", "0.5004561", "0.50025934", "0.50017023", "0.49939045", "0.49916843", "0.49907655" ]
0.0
-1
TODO Autogenerated method stub
@Override public void init(FilterConfig arg0) throws ServletException { }
{ "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
write your code here
public static void main(String[] args) { date d1 = new date(8, 11, 2018);// integer date d2 = new date(); date d3 = new date(15, 9, 1965); date d4 = new date("18.9.2019"); // type of string date d5 = new date(18, 9, 2019); System.out.println(d1.toString()); System.out.println(d2.toString()); System.out.println(d3.getD() + "." + d3.getM() + "." + d3.getY()); System.out.println(d4.dateSplit()); d5.equals(d2); if (d5.equals(d2) == true) { System.out.println("match"); } else { System.out.println("Unmatch"); } //ask from the user Scanner sc = new Scanner(System.in); System.out.println("What is the day?"); String s = sc.nextLine(); System.out.println("You entered string: " + s); date user = new date(s); //compare d3.equals(user); // System.out.println(d3.equals(user)); if (d3.equals(user) == true) { System.out.println("Match"); } else { System.out.println("Unmatch"); } System.out.println("enter a month: "); String monthh = sc.nextLine(); System.out.println(date.getMonthNumber(monthh)); date d7 = new date(11, 2, 2019); System.out.println(d7.returnLongForm()); //Assignment3.1 ArrayList<date> Date = new ArrayList<>(); Scanner input = new Scanner(System.in); System.out.println("What is the day you want to add?"); int i; boolean empty = true; while (input.hasNextLine()) { String datee = input.nextLine(); if (datee.isEmpty()) { System.out.println("Stop adding!"); break; } else { Date.add(new date(datee)); System.out.println("What is the day you want to add?"); empty = false; } if (empty) { System.out.println("No valid date"); } } System.out.println("All the dates you have entered: \n "); for (i = 0; i < Date.size(); i++) { System.out.println(Date.toString()); } while (true) { System.out.println("The user give a date: "); String DATE = input.nextLine(); if (DATE.isEmpty()) { System.out.println("Stop searching!"); break; } date a = new date(DATE); boolean check = false; for (int j = 0; j < Date.size(); j++) { if (a.equals(Date.get(j))) { System.out.println("The index of the date is " + j); check = true; break; } } if (!check) System.out.println("Date not found"); // check == false } while (true) { System.out.println("What year you want to search: (Enter <=0 to stop searching!) "); int year = input.nextInt(); if (year <= 0) { System.out.println("Stop searching!"); boolean check = false; break; } boolean check = true; //date YEAR = new date(year); for (int j = 0; j < Date.size(); j++) { if (year == Date.get(j).getY()) { System.out.println(Date.get(j).toString()); check = false; } } if (check) { System.out.println("No valid year"); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void logic(){\r\n\r\n\t}", "public static void generateCode()\n {\n \n }", "@Override\n\tprotected void logic() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "void pramitiTechTutorials() {\n\t\n}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public void ganar() {\n // TODO implement here\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 }", "CD withCode();", "private stendhal() {\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tpublic void runn() {\n\t\t\r\n\t}", "public void genCode(CodeFile code) {\n\t\t\n\t}", "public void hello(){\n\t\t\r\n \t\r\n\t\t\r\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public void baocun() {\n\t\t\n\t}", "public void mo38117a() {\n }", "public void furyo ()\t{\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private void strin() {\n\n\t}", "public void themesa()\n {\n \n \n \n \n }", "Programming(){\n\t}", "@Override\n\tvoid output() {\n\t\t\n\t}", "private void yy() {\n\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "void rajib () {\n\t\t \n\t\t System.out.println(\"Rajib is IT Eng\");\n\t }", "private void kk12() {\n\n\t}", "public void edit() {\n\t\tSystem.out.println(\"编写java笔记\");\r\n\t}", "public static void main(String[] args) {\n\t// write your code here\n }", "private static void ThridUmpireReview() {\n\t\tSystem.out.println(\" Umpier Reviews the Score Board\");\n\t\t \n\t\t\n\t}", "@Override\r\n\t\tpublic void doDomething() {\r\n\t\t\tSystem.out.println(\"I am here\");\r\n\t\t\t\r\n\t\t}", "protected void mo6255a() {\n }", "public void gen(CodeSeq code, ICodeEnv env) {\n\r\n\t}", "@Override\n\tpublic void function() {\n\t\t\n\t}", "public void working()\n {\n \n \n }", "@Override\n\tprotected void postRun() {\n\n\t}", "public void perder() {\n // TODO implement here\n }", "public void smell() {\n\t\t\n\t}", "protected void execute() {\n\t\t\n\t}", "public void mo55254a() {\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void orgasm() {\n\t\t\n\t}", "public void cocinar(){\n\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "@Override\n\tprotected void interr() {\n\t}", "public void run() {\n\t\t\t\t\n\t\t\t}", "protected void execute() {\n\n\n \n }", "@Override\n public void execute() {\n \n \n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\r\n\tpublic void crawl_data() {\n\t\t\r\n\t}", "@Override\n public void memoria() {\n \n }", "public static void main(String args[]) throws Exception\n {\n \n \n \n }", "@Override\r\n\tpublic void code() {\n\t\tus.code();\r\n\t\tSystem.out.println(\"我会java...\");\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "protected void display() {\n\r\n\t}", "private void sout() {\n\t\t\n\t}", "private static void oneUserExample()\t{\n\t}", "public void nhapdltextlh(){\n\n }", "public void miseAJour();", "protected void additionalProcessing() {\n\t}", "private void sub() {\n\n\t}", "@Override\n\tpublic void view() {\n\t\t\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\r\n\tpublic void engine() {\r\n\t\t// TODO Auto-generated method stub\t\t\r\n\t}", "@Override\r\n\tpublic void code() {\n\t\tSystem.out.println(\"我会C语言....\");\r\n\t}", "void mo67924c();", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "@Override\r\n public void run() {\n basicEditor.createEdge(); // replaced Bibianas method with Moritz Roidl, Orthodoxos Kipouridis\r\n }", "public void mo5382o() {\n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "public void mo3376r() {\n }", "public static void main(String[] args)\r\n {\n System.out.println(\"Mehedi Hasan Nirob\");\r\n //multiple line comment\r\n /*\r\n At first printing my phone number\r\n then print my address \r\n then print my university name\r\n */\r\n System.out.println(\"01736121659\\nJamalpur\\nDhaka International University\");\r\n \r\n }", "void kiemTraThangHopLi() {\n }", "public void skystonePos5() {\n }", "public final void cpp() {\n }", "public final void mo51373a() {\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"This is the main class of this project\");\r\n\t\tSystem.out.println(\"how about this\");\r\n\r\n\t\t\r\n\t\tSystem.out.println(\"new push\");\r\n\r\n\t\t//how to update this line\r\n\t\t\r\n\t\tSystem.out.println(\"hello there\");\r\n\r\n\t\tSystem.out.println(\"zen me shuoXXXXXXXXXXXKKKKkKKKKKKXXXXXXXX\");\r\n\r\n\t\tSystem.out.println(\"eventually we succeeded!\");\r\n\t\t//wa!!!\r\n\t\t\r\n\r\n\r\n\t\t//hen shu fu !\r\n\t\t\r\n\t\t//it is a good day\r\n\t\t\r\n\t\t//testing\r\n\r\n\t\t\r\n\t\tSystem.out.println(\"hope it works\");\r\n\t\t\r\n\r\n\t\t\r\n\r\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}" ]
[ "0.61019534", "0.6054925", "0.58806974", "0.58270746", "0.5796887", "0.56999695", "0.5690986", "0.56556827", "0.5648637", "0.5640487", "0.56354505", "0.56032085", "0.56016207", "0.56006724", "0.5589654", "0.5583692", "0.55785793", "0.55733466", "0.5560209", "0.55325305", "0.55133164", "0.55123806", "0.55114794", "0.5500045", "0.5489272", "0.5482718", "0.5482718", "0.5477585", "0.5477585", "0.54645246", "0.5461012", "0.54548836", "0.5442613", "0.5430592", "0.5423748", "0.5419415", "0.5407118", "0.54048806", "0.5399331", "0.539896", "0.5389593", "0.5386248", "0.5378453", "0.53751254", "0.5360644", "0.5357343", "0.5345515", "0.53441405", "0.5322276", "0.5318302", "0.53118485", "0.53118485", "0.53085434", "0.530508", "0.53038436", "0.5301922", "0.5296964", "0.52920514", "0.52903354", "0.5289583", "0.5287506", "0.52869135", "0.5286737", "0.5286737", "0.5286737", "0.5286737", "0.5286737", "0.5286737", "0.5286737", "0.52859664", "0.52849185", "0.52817136", "0.52791214", "0.5278664", "0.5278048", "0.5276269", "0.52728665", "0.5265451", "0.526483", "0.526005", "0.5259683", "0.52577406", "0.5257731", "0.5257731", "0.52560073", "0.5255759", "0.5255707", "0.5250705", "0.5246863", "0.5243053", "0.52429926", "0.5242727", "0.52396125", "0.5239378", "0.5232576", "0.5224529", "0.52240705", "0.52210563", "0.52203166", "0.521787", "0.52172214" ]
0.0
-1
Constructors Create a detached EpOrganClassChildRecord
public EpOrganClassChildRecord() { super(EpOrganClassChild.EP_ORGAN_CLASS_CHILD); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public EpOrganClassChildRecord(Long id, Long classId, Long childId, Long orderId, Integer honorNum, Integer scheduleCommentNum, Integer bespeakedScheduleNum, Boolean courseCommentFlag, Timestamp createAt, Timestamp updateAt, String remark, Boolean delFlag, Long version) {\n super(EpOrganClassChild.EP_ORGAN_CLASS_CHILD);\n\n set(0, id);\n set(1, classId);\n set(2, childId);\n set(3, orderId);\n set(4, honorNum);\n set(5, scheduleCommentNum);\n set(6, bespeakedScheduleNum);\n set(7, courseCommentFlag);\n set(8, createAt);\n set(9, updateAt);\n set(10, remark);\n set(11, delFlag);\n set(12, version);\n }", "public PedidoRecord() {\n super(Pedido.PEDIDO);\n }", "public EmployeeRecord(){}", "protected ChildType() {/* intentionally empty block */}", "public PersonRecord() {}", "public AvroPerson() {}", "public FileDicomBaseInner() {}", "public ChildType(int addr, TOP_Type type) {\n super(addr, type);\n readObject();\n }", "public HierarchyChildVORowImpl() {\r\n }", "public BookRecord() {\n super(Book.BOOK);\n }", "public FamilyDetails() {\n super();\n }", "private ChildContract() {}", "protected TreeChild () {\n }", "public DoctorRecord() {\n super(Doctor.DOCTOR);\n }", "public CommAreaRecord() {\n\t}", "public LargeObjectAvro() {}", "public Relationship() {\r\n\t}", "public Family(){\n super();\n }", "private Employee(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public ARecord() {\n super(A.A);\n }", "public AuthorRecord() {\n super(Author.AUTHOR);\n }", "public VehicleInfoAvro() {}", "public Parent() {\n super();\n }", "protected TreeChild (TreeChild child) {\n super (child);\n }", "private static void LessonInheritance() {\n Employee employee1 = new Employee();\n\n //Set Id , firstName and lastName of Employee from Person Class and BaseBO\n employee1.setId(13);\n employee1.setFirstName(\"Jordan(e)\");\n employee1.setLastName(\"Walker(e)\");\n\n //Print info out\n System.out.println(\"Id#\" + employee1.getId() + \" \" + employee1.getFirstName() + \" \" + employee1.getLastName());\n\n //create a Person object and inherit from BaseBO class Id\n Person person3 = new Person();\n person3.setId(7);\n person3.setFirstName(\"Jordan(p)\");\n person3.setLastName(\"Walker(p)\");\n\n System.out.println(\"Id#\" + person3.getId() + \" \" + person3.getFirstName() + \" \" + person3.getLastName());\n }", "public Related() {\n }", "public StudentRecord() {}", "public EntityHierarchyItem() {\n }", "public SubSectionDetail() {\r\n\t}", "public OfcRecordRecord() {\n\t\tsuper(org.openforis.collect.persistence.jooq.tables.OfcRecord.OFC_RECORD);\n\t}", "public Child() {\n\t\tsuper(20);\n\t}", "public abstract Individual makeChild(Individual otherIndividual);", "public BaseBoard (\n\t\tjava.lang.Integer _id,\n\t\tcom.redsaga.hibnatesample.step2.User _createBy,\n\t\tcom.redsaga.hibnatesample.step2.Board _parent,\n\t\tjava.util.Date _createTime,\n\t\tjava.lang.String _name) {\n\n\t\tthis.setId(_id);\n\t\tthis.setCreateBy(_createBy);\n\t\tthis.setParent(_parent);\n\t\tthis.setCreateTime(_createTime);\n\t\tthis.setName(_name);\n\t\tinitialize();\n\t}", "public FObj(FONode parent) {\n super(parent);\n \n // determine if isOutOfLineFODescendant should be set\n if (parent != null && parent instanceof FObj) {\n if (((FObj)parent).getIsOutOfLineFODescendant()) {\n isOutOfLineFODescendant = true;\n } else {\n int foID = getNameId();\n if (foID == FO_FLOAT || foID == FO_FOOTNOTE\n || foID == FO_FOOTNOTE_BODY) {\n isOutOfLineFODescendant = true;\n }\n }\n }\n }", "public TextObjectBaseRecord(short id, short size, byte [] data, int offset)\n {\n super(id, size, data, offset);\n \n }", "@Override\n public Animal newChild() {\n return new Fox(0);\n }", "private Builder(com.politrons.avro.AvroPerson other) {\n super(com.politrons.avro.AvroPerson.SCHEMA$);\n if (isValidValue(fields()[0], other.id)) {\n this.id = data().deepCopy(fields()[0].schema(), other.id);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.username)) {\n this.username = data().deepCopy(fields()[1].schema(), other.username);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.email_address)) {\n this.email_address = data().deepCopy(fields()[2].schema(), other.email_address);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.phone_number)) {\n this.phone_number = data().deepCopy(fields()[3].schema(), other.phone_number);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.first_name)) {\n this.first_name = data().deepCopy(fields()[4].schema(), other.first_name);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.last_name)) {\n this.last_name = data().deepCopy(fields()[5].schema(), other.last_name);\n fieldSetFlags()[5] = true;\n }\n }", "public Department(){}", "public Event(String descendant, String personID){\n eventID = UUID.randomUUID().toString();\n this.descendant = descendant;\n this.personID = personID;\n latitude = 0.00;\n longitude = 0.00;\n }", "public Large_Employee(\n String quarantineLocation,\n int employeeID,\n String covidDose1Attach,\n String covidDose2Attach,\n String covidDoseDate1,\n String covidDoseDate2\n ){\n this.quarantineLocation = quarantineLocation;\n this.covidDose1Attach = covidDose1Attach;\n this.covidDose2Attach = covidDose2Attach;\n this.covidDoseDate1 = covidDoseDate1;\n this.covidDoseDate2 = covidDoseDate2;\n this.employeeID = employeeID;\n }", "public RelationshipElement (RelationshipElement.Impl impl, \n\t\tPersistenceClassElement declaringClass)\n\t{\n\t\tsuper(impl, declaringClass);\n\t}", "public EmployerRecord() {\n super(Employer.EMPLOYER);\n }", "public Large_Employee(\n String houseNum,\n int employeeID,\n String houseName,\n String houseAddress,\n String bedID) {\n this.employeeID = employeeID;\n this.houseNum = houseNum;\n this.houseName = houseName;\n this.houseAddress = houseAddress;\n this.bedID = bedID;\n }", "private DataObject(Builder builder) {\n super(builder);\n }", "public BaseDto() {\n }", "protected File(SleuthkitCase db, long objId, long fsObjId, \n\t\t\tTSK_FS_ATTR_TYPE_ENUM attrType, short attrId, String name, long metaAddr, \n\t\t\tTSK_FS_NAME_TYPE_ENUM dirType, TSK_FS_META_TYPE_ENUM metaType, \n\t\t\tTSK_FS_NAME_FLAG_ENUM dirFlag, short metaFlags, \n\t\t\tlong size, long ctime, long crtime, long atime, long mtime, \n\t\t\tshort modes, int uid, int gid, String md5Hash, FileKnown knownState, String parentPath) {\n\t\tsuper(db, objId, fsObjId, attrType, attrId, name, metaAddr, dirType, metaType, dirFlag, metaFlags, size, ctime, crtime, atime, mtime, modes, uid, gid, md5Hash, knownState, parentPath);\n\t}", "public dcPDO(dcPDO other) {\n if (other.isSetRowkey()) {\n this.rowkey = other.rowkey;\n }\n if (other.isSetStartTime()) {\n this.startTime = other.startTime;\n }\n if (other.isSetEndTime()) {\n this.endTime = other.endTime;\n }\n if (other.isSetDeviceName()) {\n this.deviceName = other.deviceName;\n }\n if (other.isSetMaterialName()) {\n this.materialName = other.materialName;\n }\n if (other.isSetGroup()) {\n this.group = other.group;\n }\n if (other.isSetShfit()) {\n this.shfit = other.shfit;\n }\n if (other.isSetItems()) {\n java.util.List<dcDetail> __this__items = new java.util.ArrayList<dcDetail>(other.items.size());\n for (dcDetail other_element : other.items) {\n __this__items.add(new dcDetail(other_element));\n }\n this.items = __this__items;\n }\n }", "public BookInfoDO() {\n super();\n }", "public GO_RecordType() {\n }", "public LesserDemandDetail() {\n //For serialization.\n }", "private AttendantDatabase() {}", "public Hierarchy() {\n }", "public CalificacionDetailDTO(CalificacionEntity entity) {\n super(entity);\n if(entity.getHospedaje()!= null){\n this.hospedaje = new HospedajeDTO(entity.getHospedaje());\n }\n else {\n entity.setHospedaje(null);\n } \n if(entity.getEstudiante()!= null){\n this.estudiante = new EstudianteDTO(entity.getEstudiante());\n }\n else {\n entity.setEstudiante(null);\n } \n }", "public ExcursionEntity() {\n\t}", "public SchoolPerson() {\n }", "public PersonAddressBuilderDFB(PersonDFB person){\n //only one person we are building up but need a reference to it in every sub builder\n this.person = person;\n }", "public Record(Record other) {\n if (other.isSetAttrs()) {\n List<AttrVal> __this__attrs = new ArrayList<AttrVal>(other.attrs.size());\n for (AttrVal other_element : other.attrs) {\n __this__attrs.add(new AttrVal(other_element));\n }\n this.attrs = __this__attrs;\n }\n }", "public static Record newInstance(Table tableParent, long lRecord, RecordType rt) throws IOException\n\t{\n\t\treturn new RecordImpl(tableParent, lRecord, rt);\n\t}", "private ExchangeRecord(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }", "public FamilyTree(){\r\n super();\r\n }", "ChildBot( String className, String creator, Session bot ) {\n m_bot = bot;\n m_creator = creator;\n m_className = className;\n }", "private Builder(com.opentext.bn.converters.avro.entity.DocumentEvent other) {\n super(SCHEMA$);\n if (isValidValue(fields()[0], other.businessDocumentId)) {\n this.businessDocumentId = data().deepCopy(fields()[0].schema(), other.businessDocumentId);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.containingParentId)) {\n this.containingParentId = data().deepCopy(fields()[1].schema(), other.containingParentId);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.containingParentType)) {\n this.containingParentType = data().deepCopy(fields()[2].schema(), other.containingParentType);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.containingParentLevel)) {\n this.containingParentLevel = data().deepCopy(fields()[3].schema(), other.containingParentLevel);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.controlNumber)) {\n this.controlNumber = data().deepCopy(fields()[4].schema(), other.controlNumber);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.controlNumberLevel1)) {\n this.controlNumberLevel1 = data().deepCopy(fields()[5].schema(), other.controlNumberLevel1);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.controlNumberLevel2)) {\n this.controlNumberLevel2 = data().deepCopy(fields()[6].schema(), other.controlNumberLevel2);\n fieldSetFlags()[6] = true;\n }\n if (isValidValue(fields()[7], other.contentKeys)) {\n this.contentKeys = data().deepCopy(fields()[7].schema(), other.contentKeys);\n fieldSetFlags()[7] = true;\n }\n if (isValidValue(fields()[8], other.documentId)) {\n this.documentId = data().deepCopy(fields()[8].schema(), other.documentId);\n fieldSetFlags()[8] = true;\n }\n if (isValidValue(fields()[9], other.documentStandard)) {\n this.documentStandard = data().deepCopy(fields()[9].schema(), other.documentStandard);\n fieldSetFlags()[9] = true;\n }\n if (isValidValue(fields()[10], other.documentStandardVersion)) {\n this.documentStandardVersion = data().deepCopy(fields()[10].schema(), other.documentStandardVersion);\n fieldSetFlags()[10] = true;\n }\n if (isValidValue(fields()[11], other.documentType)) {\n this.documentType = data().deepCopy(fields()[11].schema(), other.documentType);\n fieldSetFlags()[11] = true;\n }\n if (isValidValue(fields()[12], other.envelopeVersion)) {\n this.envelopeVersion = data().deepCopy(fields()[12].schema(), other.envelopeVersion);\n fieldSetFlags()[12] = true;\n }\n if (isValidValue(fields()[13], other.eventId)) {\n this.eventId = data().deepCopy(fields()[13].schema(), other.eventId);\n fieldSetFlags()[13] = true;\n }\n if (isValidValue(fields()[14], other.eventTimestamp)) {\n this.eventTimestamp = data().deepCopy(fields()[14].schema(), other.eventTimestamp);\n fieldSetFlags()[14] = true;\n }\n if (isValidValue(fields()[15], other.fileInfo)) {\n this.fileInfo = data().deepCopy(fields()[15].schema(), other.fileInfo);\n fieldSetFlags()[15] = true;\n }\n this.fileInfoBuilder = null;\n if (isValidValue(fields()[16], other.introspectionSource)) {\n this.introspectionSource = data().deepCopy(fields()[16].schema(), other.introspectionSource);\n fieldSetFlags()[16] = true;\n }\n if (isValidValue(fields()[17], other.introspectionType)) {\n this.introspectionType = data().deepCopy(fields()[17].schema(), other.introspectionType);\n fieldSetFlags()[17] = true;\n }\n if (isValidValue(fields()[18], other.processId)) {\n this.processId = data().deepCopy(fields()[18].schema(), other.processId);\n fieldSetFlags()[18] = true;\n }\n if (isValidValue(fields()[19], other.receiverAddress)) {\n this.receiverAddress = data().deepCopy(fields()[19].schema(), other.receiverAddress);\n fieldSetFlags()[19] = true;\n }\n if (isValidValue(fields()[20], other.senderAddress)) {\n this.senderAddress = data().deepCopy(fields()[20].schema(), other.senderAddress);\n fieldSetFlags()[20] = true;\n }\n if (isValidValue(fields()[21], other.sentDate)) {\n this.sentDate = data().deepCopy(fields()[21].schema(), other.sentDate);\n fieldSetFlags()[21] = true;\n }\n if (isValidValue(fields()[22], other.sentTime)) {\n this.sentTime = data().deepCopy(fields()[22].schema(), other.sentTime);\n fieldSetFlags()[22] = true;\n }\n if (isValidValue(fields()[23], other.taskId)) {\n this.taskId = data().deepCopy(fields()[23].schema(), other.taskId);\n fieldSetFlags()[23] = true;\n }\n if (isValidValue(fields()[24], other.transactionId)) {\n this.transactionId = data().deepCopy(fields()[24].schema(), other.transactionId);\n fieldSetFlags()[24] = true;\n }\n if (isValidValue(fields()[25], other.senderAddressEnvelopeLevel1)) {\n this.senderAddressEnvelopeLevel1 = data().deepCopy(fields()[25].schema(), other.senderAddressEnvelopeLevel1);\n fieldSetFlags()[25] = true;\n }\n if (isValidValue(fields()[26], other.receiverAddressEnvelopeLevel1)) {\n this.receiverAddressEnvelopeLevel1 = data().deepCopy(fields()[26].schema(), other.receiverAddressEnvelopeLevel1);\n fieldSetFlags()[26] = true;\n }\n if (isValidValue(fields()[27], other.functionalCodeEnvelopeLevel1)) {\n this.functionalCodeEnvelopeLevel1 = data().deepCopy(fields()[27].schema(), other.functionalCodeEnvelopeLevel1);\n fieldSetFlags()[27] = true;\n }\n if (isValidValue(fields()[28], other.senderAddressEnvelopeLevel2)) {\n this.senderAddressEnvelopeLevel2 = data().deepCopy(fields()[28].schema(), other.senderAddressEnvelopeLevel2);\n fieldSetFlags()[28] = true;\n }\n if (isValidValue(fields()[29], other.receiverAddressEnvelopeLevel2)) {\n this.receiverAddressEnvelopeLevel2 = data().deepCopy(fields()[29].schema(), other.receiverAddressEnvelopeLevel2);\n fieldSetFlags()[29] = true;\n }\n if (isValidValue(fields()[30], other.functionalCodeEnvelopeLevel2)) {\n this.functionalCodeEnvelopeLevel2 = data().deepCopy(fields()[30].schema(), other.functionalCodeEnvelopeLevel2);\n fieldSetFlags()[30] = true;\n }\n }", "public Employee() {\n\t\tsuper();\n\t}", "public FamilyDetails(final String reportId, final Long seqNum) {\n super();\n this.reportId = reportId;\n this.seqNum = seqNum;\n }", "public Bid() {}", "public BlogDetailDTO (BlogEntity entity) \r\n {\r\n super(entity);\r\n if(entity.getCliente()!=null)cliente = new ClienteDTO(entity.getCliente());\r\n if(entity.getEvento()!=null)evento = new EventoDTO(entity.getEvento());\r\n \r\n }", "public AbstractEntity() {\r\n\t}", "public Employee(EmployeeDto e) {\n\t\tthis.id = e.getId();\n\t\tthis.firstName = e.getFirstName();\n this.lastName = e.getLastName();\n\t\tthis.dateOfBirth = e.getDateOfBirth();\n\t\tthis.gender = e.getGender();\n\t\tthis.startDate = e.getStartDate();\n\t\tthis.endDate = e.getEndDate();\n\t\tthis.position = e.getPosition();\n this.monthlySalary = e.getMonthlySalary();\n this.hourSalary = e.getHourSalary();\n this.area = e.getArea();\n this.createdAt = e.getCreatedAt();\n this.modifiedAt = e.getModifiedAt();\n\t}", "public SalesRecords() {\n super();\n }", "public Partage() {\n }", "private PassageRecord(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public Detail() {\n }", "public PersistentChildToken() {\n this.Id = UUID.randomUUID();\n this.owner = \"\";\n this.issuer = \"\";\n this.amount = 0;\n this.persistentToken = null;\n this.childProof = \"I am a child\";\n this.listOfPersistentGrandChildTokens = null;\n }", "public AbstractPurchaseSubCategory()\r\n {\r\n }", "public AssociationClass(UmlClass lc, Relationship r) {\n\t // Initialize the values\n id = lc.getId();\n logicalClass = lc;\n relationship = r;\n\t}", "public IidbSubcommentsRecord() {\n\t\tsuper(org.jooq.util.ingres.ingres.tables.IidbSubcomments.IIDB_SUBCOMMENTS);\n\t}", "private EmployeeInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private Builder() {\n super(com.politrons.avro.AvroPerson.SCHEMA$);\n }", "public Builder setChildIdBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n\n childId_ = value;\n onChanged();\n return this;\n }", "private PhysicalSchema(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private Person(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public Employe() {\r\n this(NOM_BIDON, null);\r\n }", "public PendantExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public static <T extends Structure> T CreateInstance(String resourceLocation, Class<? extends Structure> child) {\n T structure = null;\n\n Gson file = new GsonBuilder().excludeFieldsWithoutExposeAnnotation().create();\n structure = (T) file.fromJson(ZipUtil.decompressResource(resourceLocation), child);\n\n return structure;\n }", "public PaymentDetailPojo() {\n }", "public RecordRecord() {\n\t\tsuper(org.jooq.examples.cubrid.demodb.tables.Record.RECORD);\n\t}", "public Employee(String id) {\n super(id);\n }", "public PropertySellerDetailDTO() {\n\n\t}", "public XMLEntry(Recordable parent) {\r\n this.parent = parent;\r\n this.atributes = new HashMap<String, String>();\r\n this.children = new ArrayList<XMLEntry>();\r\n}", "private Vehicle(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public Department(int depID, String name, String adress, int dNo, String postCode, String city, String phone) {\n\t\tsuper(name);\n\t\tthis.depID = depID;\n\t\tthis.adress = adress;\n\t\tthis.dNo = dNo;\n\t\tthis.postCode = postCode;\n\t\tthis.city = city;\n\t\tthis.phone = phone;\n\t\tcl = new ArrayList<CompositeLine>();\n\t}", "public\r\nMBRecord(Name name, int dclass, long ttl, Name mailbox) {\r\n\tsuper(name, Type.MB, dclass, ttl, mailbox, \"mailbox\");\r\n}", "public ActHiDetailRecord() {\n super(ActHiDetail.ACT_HI_DETAIL);\n }", "public VehicleTypeTO()\r\n {\r\n }", "public Group(){\n\n }", "public Person(){\r\n\t\tsuper();\r\n\t}", "public abstract ExternalRecord createExternalRecord()\r\n\t\t\tthrows Exception;", "public Large_Employee(int employeeID,\n String hireDate,\n String pay_rate,\n String still_active,\n String mex_code,\n String bankID,\n String bankAccountNum,\n String givenName,\n String surName,\n String dateOfBirth,\n String passportNumber,\n String passportExpiration,\n String SII,\n String visaNumber,\n String healthCardNum,\n String arrivalDate,\n String departureDate,\n String txtEmail,\n String medInsurance,\n String txtMobile,\n String nickName,\n String txtNotes,\n String bedID,\n String houseNum,\n String houseName,\n String houseAddress,\n String workPermit,\n String benefitCard,\n String employmentAgreement,\n String withholdAgreement,\n String quarantineLocation,\n String emailPassword,\n String covidDose1Attach,\n String covidDose2Attach,\n String covidDoseDate1,\n String covidDoseDate2,\n String corpPhoneNumber,\n String corpPhoneType) {\n this.employeeID = employeeID;\n this.hireDate = hireDate;\n this.pay_rate = pay_rate;\n this.still_active = still_active;\n this.mex_code = mex_code;\n this.bankID = bankID;\n this.bankAccountNum = bankAccountNum;\n this.givenName = givenName;\n this.surName = surName;\n this.name = givenName +\" \"+surName;\n this.dateOfBirth = dateOfBirth;\n this.passportNumber = passportNumber;\n this.passportExpiration = passportExpiration;\n this.SII = SII;\n this.visaNumber = visaNumber;\n this.healthCardNum = healthCardNum;\n this.arrivalDate = arrivalDate;\n this.departureDate = departureDate;\n this.txtEmail = txtEmail;\n this.medInsurance = medInsurance;\n this.txtMobile = txtMobile;\n this.nickName = nickName;\n this.txtNotes = txtNotes;\n this.bedID = bedID;\n this.houseNum = houseNum;\n this.houseName = houseName;\n this.houseAddress = houseAddress;\n this.workPermit = workPermit;\n this.benefitCard = benefitCard;\n this.employmentAgreement = employmentAgreement;\n this.withholdAgreement = withholdAgreement;\n this.quarantineLocation = quarantineLocation;\n this.emailPassword = emailPassword;\n this.covidDose1Attach = covidDose1Attach;\n this.covidDose2Attach = covidDose2Attach;\n this.covidDoseDate1 = covidDoseDate1;\n this.covidDoseDate2 = covidDoseDate2;\n this.corpPhoneNumber = corpPhoneNumber;\n this.corpPhoneType = corpPhoneType;\n }", "public Item_Record() {\n super(Item_.ITEM_);\n }", "public CD() {}" ]
[ "0.6781819", "0.55603695", "0.55547357", "0.5367167", "0.5253346", "0.5236399", "0.5181656", "0.51706076", "0.5168489", "0.51582474", "0.51523113", "0.5129358", "0.5095306", "0.50935453", "0.50512004", "0.50068736", "0.49948508", "0.49788392", "0.4969064", "0.49518746", "0.49344304", "0.49331948", "0.49043083", "0.4893812", "0.48598555", "0.48556215", "0.48476937", "0.48242", "0.4813109", "0.4812462", "0.4794248", "0.47598585", "0.47546992", "0.4754481", "0.47482735", "0.4738937", "0.4731829", "0.47272882", "0.47270793", "0.4722942", "0.47209096", "0.4718953", "0.47177958", "0.4716327", "0.4715324", "0.4687478", "0.46838585", "0.46756795", "0.46713498", "0.46675405", "0.46542346", "0.46531948", "0.46521324", "0.46416575", "0.4630846", "0.4625378", "0.46179095", "0.46128207", "0.46107486", "0.46104133", "0.46016982", "0.4601036", "0.45973873", "0.4596578", "0.45955035", "0.45890406", "0.45723844", "0.45713535", "0.45692718", "0.45664868", "0.45616907", "0.45560107", "0.45540303", "0.4553285", "0.45521724", "0.45518225", "0.4549103", "0.45480654", "0.45464352", "0.4540748", "0.4537498", "0.45363346", "0.4530462", "0.45217618", "0.45157886", "0.4514999", "0.45119414", "0.45110294", "0.45063937", "0.45008782", "0.45002767", "0.449845", "0.4495816", "0.4495586", "0.44927272", "0.44877705", "0.44873905", "0.44834435", "0.4482575", "0.44824246" ]
0.7545959
0
Create a detached, initialised EpOrganClassChildRecord
public EpOrganClassChildRecord(Long id, Long classId, Long childId, Long orderId, Integer honorNum, Integer scheduleCommentNum, Integer bespeakedScheduleNum, Boolean courseCommentFlag, Timestamp createAt, Timestamp updateAt, String remark, Boolean delFlag, Long version) { super(EpOrganClassChild.EP_ORGAN_CLASS_CHILD); set(0, id); set(1, classId); set(2, childId); set(3, orderId); set(4, honorNum); set(5, scheduleCommentNum); set(6, bespeakedScheduleNum); set(7, courseCommentFlag); set(8, createAt); set(9, updateAt); set(10, remark); set(11, delFlag); set(12, version); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public EpOrganClassChildRecord() {\n super(EpOrganClassChild.EP_ORGAN_CLASS_CHILD);\n }", "protected ChildType() {/* intentionally empty block */}", "public EmployeeRecord(){}", "public HierarchyChildVORowImpl() {\r\n }", "public void testInheritanceEditMetadataEditChildWithUnsavedParent()\r\n\t{\r\n\r\n\t\tEntityManagerInterface entityManagerInterface = EntityManager.getInstance();\r\n\t\tDomainObjectFactory factory = DomainObjectFactory.getInstance();\r\n\t\tEntityInterface specimen = null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Step 1 \r\n\t\t\tspecimen = factory.createEntity();\r\n\t\t\tspecimen.setName(\"specimen\");\r\n\t\t\tspecimen.setAbstract(true);\r\n\t\t\tAttributeInterface barcode = factory.createStringAttribute();\r\n\t\t\tbarcode.setName(\"barcode\");\r\n\t\t\tspecimen.addAbstractAttribute(barcode);\r\n\r\n\t\t\t//Step 2\r\n\t\t\tEntityInterface tissueSpecimen = factory.createEntity();\r\n\t\t\ttissueSpecimen.setName(\"tissueSpecimen\");\r\n\t\t\tAttributeInterface quantityInCellCount = factory.createIntegerAttribute();\r\n\t\t\tquantityInCellCount.setName(\"quantityInCellCount\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(quantityInCellCount);\r\n\r\n\t\t\t//Step 3\r\n\t\t\tEntityInterface savedTissueSpecimen = entityManagerInterface\r\n\t\t\t\t\t.persistEntity(tissueSpecimen);\r\n\t\t\t//Step 4\r\n\t\t\tsavedTissueSpecimen.setParentEntity(specimen);\r\n\t\t\t//Step 5\r\n\t\t\tsavedTissueSpecimen = entityManagerInterface.persistEntity(tissueSpecimen);\r\n\r\n\t\t}\r\n\t\tcatch (DynamicExtensionsApplicationException e1)\r\n\t\t{\r\n\t\t\tLogger.out.info(\"Application exception is expected to be thrown here\");\r\n\t\t\tassertNull(specimen.getTableProperties());\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tLogger.out.debug(DynamicExtensionsUtility.getStackTrace(e));\r\n\t\t\te.printStackTrace();\r\n\t\t\tfail();\r\n\t\t}\r\n\t}", "public PedidoRecord() {\n super(Pedido.PEDIDO);\n }", "private static void LessonInheritance() {\n Employee employee1 = new Employee();\n\n //Set Id , firstName and lastName of Employee from Person Class and BaseBO\n employee1.setId(13);\n employee1.setFirstName(\"Jordan(e)\");\n employee1.setLastName(\"Walker(e)\");\n\n //Print info out\n System.out.println(\"Id#\" + employee1.getId() + \" \" + employee1.getFirstName() + \" \" + employee1.getLastName());\n\n //create a Person object and inherit from BaseBO class Id\n Person person3 = new Person();\n person3.setId(7);\n person3.setFirstName(\"Jordan(p)\");\n person3.setLastName(\"Walker(p)\");\n\n System.out.println(\"Id#\" + person3.getId() + \" \" + person3.getFirstName() + \" \" + person3.getLastName());\n }", "private void populateNewChildDirectory(DirectoryEntry newEntry) {\n try (ClusterStream stream = new ClusterStream(fileSystem,\n FileAccess.Write,\n newEntry.getFirstCluster(),\n 0xffffffff)) {\n // First is the self-referencing entry...\n DirectoryEntry selfEntry = new DirectoryEntry(newEntry);\n selfEntry.setName(FileName.SelfEntryName);\n selfEntry.writeTo(stream);\n // Second is a clone of our self entry (i.e. parent) - though dates\n // are odd...\n DirectoryEntry parentEntry = new DirectoryEntry(getSelfEntry());\n parentEntry.setName(FileName.ParentEntryName);\n parentEntry.setCreationTime(newEntry.getCreationTime());\n parentEntry.setLastWriteTime(newEntry.getLastWriteTime());\n parentEntry.writeTo(stream);\n } catch (IOException e) {\n throw new dotnet4j.io.IOException(e);\n }\n }", "public FamilyDetails() {\n super();\n }", "private ChildContract() {}", "public ChildType(int addr, TOP_Type type) {\n super(addr, type);\n readObject();\n }", "public void testInheritanceEditMetadataCreateChildWithEditedParent()\r\n\t{\r\n\r\n\t\tEntityManagerInterface entityManagerInterface = EntityManager.getInstance();\r\n\t\tDomainObjectFactory factory = DomainObjectFactory.getInstance();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Step 1 \r\n\t\t\tEntityInterface specimen = factory.createEntity();\r\n\t\t\tspecimen.setName(\"specimen\");\r\n\t\t\tspecimen.setAbstract(true);\r\n\t\t\tAttributeInterface barcode = factory.createStringAttribute();\r\n\t\t\tbarcode.setName(\"barcode\");\r\n\t\t\tspecimen.addAbstractAttribute(barcode);\r\n\t\t\t//Step 2 \t\t\t\r\n\t\t\tEntityInterface savedSpecimen = entityManagerInterface.persistEntity(specimen);\r\n\t\t\t//Checking step 2\r\n\t\t\tResultSetMetaData metaData = executeQueryForMetadata(\"select * from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tassertEquals(noOfDefaultColumns + 1, metaData.getColumnCount());\r\n\t\t\t//Step 3\r\n\t\t\tAttributeInterface label = factory.createStringAttribute();\r\n\t\t\tlabel.setName(\"label\");\r\n\t\t\tsavedSpecimen.addAbstractAttribute(label);\r\n\t\t\t//Step 4\r\n\t\t\tEntityInterface tissueSpecimen = factory.createEntity();\r\n\t\t\ttissueSpecimen.setName(\"tissueSpecimen\");\r\n\t\t\tAttributeInterface quantityInCellCount = factory.createIntegerAttribute();\r\n\t\t\tquantityInCellCount.setName(\"quantityInCellCount\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(quantityInCellCount);\r\n\t\t\t//Step 5\r\n\t\t\ttissueSpecimen.setParentEntity(savedSpecimen);\r\n\t\t\t//Step 6\r\n\t\t\tEntityInterface savedTissueSpecimen = entityManagerInterface\r\n\t\t\t\t\t.persistEntity(tissueSpecimen);\r\n\t\t\tassertEquals(savedTissueSpecimen.getParentEntity(), savedSpecimen);\r\n\t\t\t//Step 7\r\n\t\t\tmetaData = executeQueryForMetadata(\"select * from \"\r\n\t\t\t\t\t+ savedSpecimen.getTableProperties().getName());\r\n\t\t\tassertEquals(noOfDefaultColumns + 2, metaData.getColumnCount());\r\n\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tLogger.out.debug(DynamicExtensionsUtility.getStackTrace(e));\r\n\t\t\te.printStackTrace();\r\n\t\t\tfail();\r\n\t\t}\r\n\t}", "public abstract ExternalRecord createExternalRecord()\r\n\t\t\tthrows Exception;", "public void testInsertDataForInheritanceParentNoData()\r\n\t{\r\n\r\n\t\tEntityManagerInterface entityManagerInterface = EntityManager.getInstance();\r\n\t\tDomainObjectFactory factory = DomainObjectFactory.getInstance();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// Step 1\r\n\t\t\tEntityInterface specimen = factory.createEntity();\r\n\t\t\tspecimen.setName(\"specimen\");\r\n\t\t\tspecimen.setAbstract(true);\r\n\t\t\tAttributeInterface barcode = factory.createStringAttribute();\r\n\t\t\tbarcode.setName(\"barcode\");\r\n\t\t\tspecimen.addAbstractAttribute(barcode);\r\n\r\n\t\t\tAttributeInterface label = factory.createStringAttribute();\r\n\t\t\tlabel.setName(\"label\");\r\n\t\t\tspecimen.addAbstractAttribute(label);\r\n\r\n\t\t\tEntityInterface tissueSpecimen = factory.createEntity();\r\n\t\t\ttissueSpecimen.setParentEntity(specimen);\r\n\r\n\t\t\tspecimen = entityManagerInterface.persistEntity(specimen);\r\n\r\n\t\t\ttissueSpecimen.setName(\"tissueSpecimen\");\r\n\r\n\t\t\tAttributeInterface quantityInCellCount = factory.createIntegerAttribute();\r\n\t\t\tquantityInCellCount.setName(\"quantityInCellCount\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(quantityInCellCount);\r\n\r\n\t\t\tAttributeInterface arivalDate = factory.createDateAttribute();\r\n\t\t\tarivalDate.setName(\"arivalDate\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(arivalDate);\r\n\r\n\t\t\t//step 2\r\n\t\t\ttissueSpecimen = entityManagerInterface.persistEntity(tissueSpecimen);\r\n\r\n\t\t\tMap dataValue = new HashMap();\r\n\t\t\t//dataValue.put(barcode, \"123456\");\r\n\t\t\t//dataValue.put(label, \"specimen parent label\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"45\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-12-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\r\n\t\t\t//step 3\r\n\t\t\tLong recordId = entityManagerInterface.insertData(tissueSpecimen, dataValue);\r\n\r\n\t\t\t//step 4\r\n\t\t\tResultSet resultSet = executeQuery(\"select * from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(4));\r\n\r\n\t\t\tresultSet = executeQuery(\"select * from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(4));\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tLogger.out.debug(DynamicExtensionsUtility.getStackTrace(e));\r\n\t\t\tfail();\r\n\t\t}\r\n\t}", "public FileDicomBaseInner() {}", "public PersonRecord() {}", "public void testInheritanceEditMetadataForMakeParentNullWithData()\r\n\t{\r\n\r\n\t\tEntityManagerInterface entityManagerInterface = EntityManager.getInstance();\r\n\t\tDomainObjectFactory factory = DomainObjectFactory.getInstance();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//step 1\r\n\t\t\tEntityInterface specimen = factory.createEntity();\r\n\t\t\tspecimen.setName(\"specimen\");\r\n\t\t\tspecimen.setAbstract(true);\r\n\t\t\tAttributeInterface barcode = factory.createStringAttribute();\r\n\t\t\tbarcode.setName(\"barcode\");\r\n\t\t\tspecimen.addAbstractAttribute(barcode);\r\n\r\n\t\t\t//step 2\t\t\t\r\n\t\t\tspecimen = entityManagerInterface.persistEntity(specimen);\r\n\r\n\t\t\t//step 3\r\n\t\t\tEntityInterface tissueSpecimen = factory.createEntity();\r\n\t\t\ttissueSpecimen.setName(\"tissueSpecimen\");\r\n\t\t\tAttributeInterface quantityInCellCount = factory.createIntegerAttribute();\r\n\t\t\tquantityInCellCount.setName(\"quantityInCellCount\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(quantityInCellCount);\r\n\r\n\t\t\ttissueSpecimen.setParentEntity(specimen);\r\n\r\n\t\t\t//step 4\r\n\t\t\tEntityInterface savedTissueSpecimen = entityManagerInterface\r\n\t\t\t\t\t.persistEntity(tissueSpecimen);\r\n\r\n\t\t\t//step 5\t\t\t\r\n\t\t\tMap dataValue = new HashMap();\r\n\t\t\tdataValue.put(barcode, \"123456\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"45\");\r\n\r\n\t\t\tentityManagerInterface.insertData(tissueSpecimen, dataValue);\r\n\r\n\t\t\t//step 6\r\n\t\t\ttissueSpecimen.setParentEntity(null);\r\n\t\t\tsavedTissueSpecimen = entityManagerInterface.persistEntity(tissueSpecimen);\r\n\r\n\t\t\t//step 7\r\n\t\t\tfail();\r\n\t\t}\r\n\t\tcatch (DynamicExtensionsApplicationException e)\r\n\t\t{\r\n\t\t\tassertTrue(true);\r\n\t\t\tLogger.out.info(\"Application exception is expected to be thrown here\");\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tLogger.out.debug(DynamicExtensionsUtility.getStackTrace(e));\r\n\t\t\tfail();\r\n\t\t}\r\n\t}", "public Relationship createRelationship(RelationshipType rt, String parentId, String childId, String familyId) throws Exception;", "public void testInsertDataForInheritance()\r\n\t{\r\n\r\n\t\tEntityManagerInterface entityManagerInterface = EntityManager.getInstance();\r\n\t\tDomainObjectFactory factory = DomainObjectFactory.getInstance();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// Step 1\r\n\t\t\tEntityInterface specimen = factory.createEntity();\r\n\t\t\tspecimen.setName(\"specimen\");\r\n\t\t\tspecimen.setAbstract(true);\r\n\t\t\tAttributeInterface barcode = factory.createStringAttribute();\r\n\t\t\tbarcode.setName(\"barcode\");\r\n\t\t\tspecimen.addAbstractAttribute(barcode);\r\n\r\n\t\t\tAttributeInterface label = factory.createStringAttribute();\r\n\t\t\tlabel.setName(\"label\");\r\n\t\t\tspecimen.addAbstractAttribute(label);\r\n\r\n\t\t\tEntityInterface tissueSpecimen = factory.createEntity();\r\n\t\t\ttissueSpecimen.setParentEntity(specimen);\r\n\r\n\t\t\tspecimen = entityManagerInterface.persistEntity(specimen);\r\n\r\n\t\t\ttissueSpecimen.setName(\"tissueSpecimen\");\r\n\r\n\t\t\tAttributeInterface quantityInCellCount = factory.createIntegerAttribute();\r\n\t\t\tquantityInCellCount.setName(\"quantityInCellCount\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(quantityInCellCount);\r\n\r\n\t\t\tAttributeInterface arivalDate = factory.createDateAttribute();\r\n\t\t\tarivalDate.setName(\"arivalDate\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(arivalDate);\r\n\r\n\t\t\ttissueSpecimen = entityManagerInterface.persistEntity(tissueSpecimen);\r\n\r\n\t\t\tMap dataValue = new HashMap();\r\n\t\t\tdataValue.put(barcode, \"123456\");\r\n\t\t\tdataValue.put(label, \"specimen parent label\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"45\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-12-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\r\n\t\t\tLong recordId = entityManagerInterface.insertData(tissueSpecimen, dataValue);\r\n\r\n\t\t\tResultSet resultSet = executeQuery(\"select * from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(4));\r\n\r\n\t\t\tresultSet = executeQuery(\"select * from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(4));\r\n\r\n\t\t\tEntityInterface advanceTissueSpecimenA = factory.createEntity();\r\n\t\t\tadvanceTissueSpecimenA.setParentEntity(tissueSpecimen);\r\n\t\t\tadvanceTissueSpecimenA.setName(\"advanceTissueSpecimenA\");\r\n\r\n\t\t\tAttributeInterface newAttribute = factory.createIntegerAttribute();\r\n\t\t\tnewAttribute.setName(\"newAttributeA\");\r\n\t\t\tadvanceTissueSpecimenA.addAbstractAttribute(newAttribute);\r\n\r\n\t\t\tEntityInterface advanceTissueSpecimenB = factory.createEntity();\r\n\t\t\tadvanceTissueSpecimenB.setParentEntity(tissueSpecimen);\r\n\t\t\tadvanceTissueSpecimenB.setName(\"advanceTissueSpecimenB\");\r\n\r\n\t\t\tAttributeInterface newAttributeB = factory.createIntegerAttribute();\r\n\t\t\tnewAttributeB.setName(\"newAttributeB\");\r\n\t\t\tadvanceTissueSpecimenB.addAbstractAttribute(newAttributeB);\r\n\t\t\tAttributeInterface newAttributeB2 = factory.createIntegerAttribute();\r\n\t\t\tnewAttributeB2.setName(\"newAttributeB2\");\r\n\t\t\tadvanceTissueSpecimenB.addAbstractAttribute(newAttributeB2);\r\n\r\n\t\t\tadvanceTissueSpecimenA = entityManagerInterface.persistEntity(advanceTissueSpecimenA);\r\n\r\n\t\t\tdataValue.clear();\r\n\t\t\tdataValue.put(barcode, \"869\");\r\n\t\t\tdataValue.put(label, \"specimen parent label\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"45\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-12-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\t\t\tdataValue.put(newAttribute, \"12\");\r\n\r\n\t\t\trecordId = entityManagerInterface.insertData(advanceTissueSpecimenA, dataValue);\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(2, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(2, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ advanceTissueSpecimenA.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tLogger.out.debug(DynamicExtensionsUtility.getStackTrace(e));\r\n\t\t\tfail();\r\n\t\t}\r\n\t}", "@Override\n public Animal newChild() {\n return new Fox(0);\n }", "public AvroPerson() {}", "public void testInheritanceEditMetadataForMakeParentNullNoData()\r\n\t{\r\n\r\n\t\tEntityManagerInterface entityManagerInterface = EntityManager.getInstance();\r\n\t\tDomainObjectFactory factory = DomainObjectFactory.getInstance();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//step 1\r\n\t\t\tEntityInterface specimen = factory.createEntity();\r\n\t\t\tspecimen.setName(\"specimen\");\r\n\t\t\tspecimen.setAbstract(true);\r\n\t\t\tAttributeInterface barcode = factory.createStringAttribute();\r\n\t\t\tbarcode.setName(\"barcode\");\r\n\t\t\tspecimen.addAbstractAttribute(barcode);\r\n\r\n\t\t\t//step 2\t\t\t\r\n\t\t\tspecimen = entityManagerInterface.persistEntity(specimen);\r\n\r\n\t\t\t//step 3\r\n\t\t\tEntityInterface tissueSpecimen = factory.createEntity();\r\n\t\t\ttissueSpecimen.setName(\"tissueSpecimen\");\r\n\t\t\tAttributeInterface quantityInCellCount = factory.createIntegerAttribute();\r\n\t\t\tquantityInCellCount.setName(\"quantityInCellCount\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(quantityInCellCount);\r\n\r\n\t\t\ttissueSpecimen.setParentEntity(specimen);\r\n\r\n\t\t\t//step 4\r\n\t\t\tEntityInterface savedTissueSpecimen = entityManagerInterface\r\n\t\t\t\t\t.persistEntity(tissueSpecimen);\r\n\r\n\t\t\t//step 5\t\t\t\r\n\t\t\tsavedTissueSpecimen = entityManagerInterface.getEntityByIdentifier(savedTissueSpecimen\r\n\t\t\t\t\t.getId().toString());\r\n\t\t\tsavedTissueSpecimen = entityManagerInterface.getEntityByIdentifier(savedTissueSpecimen\r\n\t\t\t\t\t.getId());\r\n\t\t\tassertEquals(savedTissueSpecimen.getParentEntity(), specimen);\r\n\r\n\t\t\t//step 6\r\n\t\t\ttissueSpecimen.setParentEntity(null);\r\n\t\t\tsavedTissueSpecimen = entityManagerInterface.persistEntity(tissueSpecimen);\r\n\r\n\t\t\t//step 7\r\n\t\t\tassertTrue(true);\r\n\t\t\tsavedTissueSpecimen = entityManagerInterface.getEntityByIdentifier(savedTissueSpecimen\r\n\t\t\t\t\t.getId());\r\n\t\t\tassertNull(savedTissueSpecimen.getParentEntity());\r\n\r\n\t\t\tMap dataValue = new HashMap();\r\n\t\t\tdataValue.put(quantityInCellCount, \"45\");\r\n\r\n\t\t\tentityManagerInterface.insertData(tissueSpecimen, dataValue);\r\n\r\n\t\t\tResultSet resultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(0, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tLogger.out.debug(DynamicExtensionsUtility.getStackTrace(e));\r\n\t\t\tfail();\r\n\t\t}\r\n\t}", "public void testInheritanceEditMetadataCreateChildWithParent()\r\n\t{\r\n\r\n\t\tEntityManagerInterface entityManagerInterface = EntityManager.getInstance();\r\n\t\tDomainObjectFactory factory = DomainObjectFactory.getInstance();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tEntityInterface specimen = factory.createEntity();\r\n\t\t\tspecimen.setName(\"specimen\");\r\n\t\t\tspecimen.setAbstract(true);\r\n\t\t\tAttributeInterface barcode = factory.createStringAttribute();\r\n\t\t\tbarcode.setName(\"barcode\");\r\n\t\t\tspecimen.addAbstractAttribute(barcode);\r\n\r\n\t\t\tspecimen = entityManagerInterface.persistEntity(specimen);\r\n\r\n\t\t\tEntityInterface tissueSpecimen = factory.createEntity();\r\n\t\t\ttissueSpecimen.setName(\"tissueSpecimen\");\r\n\t\t\tAttributeInterface quantityInCellCount = factory.createIntegerAttribute();\r\n\t\t\tquantityInCellCount.setName(\"quantityInCellCount\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(quantityInCellCount);\r\n\r\n\t\t\ttissueSpecimen.setParentEntity(specimen);\r\n\r\n\t\t\tEntityInterface savedTissueSpecimen = entityManagerInterface\r\n\t\t\t\t\t.persistEntity(tissueSpecimen);\r\n\r\n\t\t\tsavedTissueSpecimen = entityManagerInterface.getEntityByIdentifier(savedTissueSpecimen\r\n\t\t\t\t\t.getId().toString());\r\n\t\t\tassertEquals(savedTissueSpecimen.getParentEntity(), specimen);\r\n\r\n\t\t\tEntityInterface savedSpecimen = entityManagerInterface.getEntityByIdentifier(specimen\r\n\t\t\t\t\t.getId());\r\n\t\t\tCollection childColelction = entityManagerInterface.getChildrenEntities(savedSpecimen);\r\n\t\t\tassertEquals(childColelction.size(), 1);\r\n\t\t\tchildColelction.contains(savedTissueSpecimen);\r\n\r\n\t\t\tResultSetMetaData metaData = executeQueryForMetadata(\"select * from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tassertEquals(noOfDefaultColumns + 1, metaData.getColumnCount());\r\n\r\n\t\t\tmetaData = executeQueryForMetadata(\"select * from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tassertEquals(noOfDefaultColumns + 1, metaData.getColumnCount());\r\n\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tLogger.out.debug(DynamicExtensionsUtility.getStackTrace(e));\r\n\t\t\te.printStackTrace();\r\n\t\t\tfail();\r\n\t\t}\r\n\t}", "private Persons createFather(Persons child, String spouse)\n {\n Persons dad = new Persons();\n dad.setPersonFirstName(nameGenerator.generateMaleName());\n dad.setPersonGender(\"m\");\n dad.setPersonSpouseID(spouse);\n dad.setDescendantID(userName);\n\n if (child.getPersonGender().equals(\"m\")) {\n dad.setPersonLastName(child.getPersonLastName());\n }\n else {\n dad.setPersonLastName(nameGenerator.generateLastName());\n }\n\n return dad;\n }", "protected TreeChild () {\n }", "public BookRecord() {\n super(Book.BOOK);\n }", "public Relationship() {\r\n\t}", "@Override\n public boolean createDefendant(AuthContext context, Defendant defendant) throws DSException {\n\n isContextValidFor(context, roleId -> { if(roleId == -1) throw new DSAuthException(\"Invalid Context\"); }, 2);\n try {\n insert(\"TblDefendants\", defendant);\n return true;\n }catch (SQLException e) {\n throw new DSFormatException(e.getMessage());\n }\n }", "public VehicleInfoAvro() {}", "public RelationshipElement (RelationshipElement.Impl impl, \n\t\tPersistenceClassElement declaringClass)\n\t{\n\t\tsuper(impl, declaringClass);\n\t}", "private AttendantDatabase() {}", "public void toChildXmlElement(final @NotNull Element parentEl) {\n final Element element = parentEl.getOwnerDocument().createElement(DynXmlObjLoader.XML_TAG);\n parentEl.appendChild(element);\n element.setAttribute(DynXmlObjLoader.XML_ATTR_CLASS, this.getClass().getName());\n element.setAttribute(DynXmlObjLoader.XML_ATTR_NAME, m_strName);\n // this is the MapNatural specific stuff\n if ((null != m_mtl) && (m_mtl instanceof IDynXmlObject)) {\n ((IDynXmlObject) m_mtl).toChildXmlElement(element);\n }\n }", "public abstract Individual makeChild(Individual otherIndividual);", "public Family(){\n super();\n }", "public void testInheritanceEditMetadataForChangeParentWithNoData()\r\n\t{\r\n\r\n\t\tEntityManagerInterface entityManagerInterface = EntityManager.getInstance();\r\n\t\tDomainObjectFactory factory = DomainObjectFactory.getInstance();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//step 1\r\n\t\t\tEntityInterface specimen = factory.createEntity();\r\n\t\t\tspecimen.setName(\"specimen\");\r\n\t\t\tspecimen.setAbstract(true);\r\n\t\t\tAttributeInterface barcode = factory.createStringAttribute();\r\n\t\t\tbarcode.setName(\"barcode\");\r\n\t\t\tspecimen.addAbstractAttribute(barcode);\r\n\r\n\t\t\t//step 2\t\t\t\r\n\t\t\tspecimen = entityManagerInterface.persistEntity(specimen);\r\n\r\n\t\t\t//step 3\r\n\t\t\tEntityInterface tissueSpecimen = factory.createEntity();\r\n\t\t\ttissueSpecimen.setName(\"tissueSpecimen\");\r\n\t\t\tAttributeInterface quantityInCellCount = factory.createIntegerAttribute();\r\n\t\t\tquantityInCellCount.setName(\"quantityInCellCount\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(quantityInCellCount);\r\n\r\n\t\t\ttissueSpecimen.setParentEntity(specimen);\r\n\r\n\t\t\t//step 4\r\n\t\t\tEntityInterface savedTissueSpecimen = entityManagerInterface\r\n\t\t\t\t\t.persistEntity(tissueSpecimen);\r\n\r\n\t\t\t//step 5\r\n\t\t\tEntityInterface newSpecimen = factory.createEntity();\r\n\t\t\tnewSpecimen.setName(\"newSpecimen\");\r\n\t\t\tnewSpecimen.setAbstract(true);\r\n\t\t\tAttributeInterface barcodeOfNewSpecimen = factory.createStringAttribute();\r\n\t\t\tbarcodeOfNewSpecimen.setName(\"barcodeOfNewSpecimen\");\r\n\t\t\tnewSpecimen.addAbstractAttribute(barcodeOfNewSpecimen);\r\n\r\n\t\t\t//step 6\r\n\t\t\tnewSpecimen = entityManagerInterface.persistEntity(newSpecimen);\r\n\r\n\t\t\t//step 6\r\n\t\t\ttissueSpecimen.setParentEntity(newSpecimen);\r\n\t\t\tsavedTissueSpecimen = entityManagerInterface.persistEntity(tissueSpecimen);\r\n\r\n\t\t\t//step 7\r\n\t\t\tassertTrue(true);\r\n\t\t\tsavedTissueSpecimen = entityManagerInterface.getEntityByIdentifier(savedTissueSpecimen\r\n\t\t\t\t\t.getId());\r\n\t\t\tassertEquals(savedTissueSpecimen.getParentEntity(), newSpecimen);\r\n\r\n\t\t\tMap dataValue = new HashMap();\r\n\t\t\tdataValue.put(barcodeOfNewSpecimen, \"123456\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"45\");\r\n\r\n\t\t\tentityManagerInterface.insertData(tissueSpecimen, dataValue);\r\n\r\n\t\t\tResultSet resultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(0, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ newSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tLogger.out.debug(DynamicExtensionsUtility.getStackTrace(e));\r\n\t\t\tfail();\r\n\t\t}\r\n\t}", "public CommAreaRecord() {\n\t}", "public EntityHierarchyItem() {\n }", "public FObj(FONode parent) {\n super(parent);\n \n // determine if isOutOfLineFODescendant should be set\n if (parent != null && parent instanceof FObj) {\n if (((FObj)parent).getIsOutOfLineFODescendant()) {\n isOutOfLineFODescendant = true;\n } else {\n int foID = getNameId();\n if (foID == FO_FLOAT || foID == FO_FOOTNOTE\n || foID == FO_FOOTNOTE_BODY) {\n isOutOfLineFODescendant = true;\n }\n }\n }\n }", "@Override\n\tprotected Entity createNewEntity(final Object baseObject) {\n\t\tProductAssociation productAssociation = getBean(ContextIdNames.PRODUCT_ASSOCIATION);\n\t\tproductAssociation.setGuid(new RandomGuidImpl().toString());\n\t\tproductAssociation.setCatalog(this.getImportJob().getCatalog());\n\t\treturn productAssociation;\n\t}", "public BaseBoard (\n\t\tjava.lang.Integer _id,\n\t\tcom.redsaga.hibnatesample.step2.User _createBy,\n\t\tcom.redsaga.hibnatesample.step2.Board _parent,\n\t\tjava.util.Date _createTime,\n\t\tjava.lang.String _name) {\n\n\t\tthis.setId(_id);\n\t\tthis.setCreateBy(_createBy);\n\t\tthis.setParent(_parent);\n\t\tthis.setCreateTime(_createTime);\n\t\tthis.setName(_name);\n\t\tinitialize();\n\t}", "private Employee(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public AssociationClass(UmlClass lc, Relationship r) {\n\t // Initialize the values\n id = lc.getId();\n logicalClass = lc;\n relationship = r;\n\t}", "ContactGroup createUnresolvedContactGroup(String groupUID, String persistentData, ContactGroup parentGroup);", "public OfcRecordRecord() {\n\t\tsuper(org.openforis.collect.persistence.jooq.tables.OfcRecord.OFC_RECORD);\n\t}", "public XMLEntry(Recordable parent) {\r\n this.parent = parent;\r\n this.atributes = new HashMap<String, String>();\r\n this.children = new ArrayList<XMLEntry>();\r\n}", "public void createClassManyManyBIENDSub(final ClassManyManyBIENDSub classManyManyBIENDSub) throws DaoException {\n\t\tLOG.debug(\"Create a new ClassManyManyBIENDSub entity\");\n\t\ttry {\n\t\t\tSession session = HibernateUtil.currentSession();\n\t\t\tsession.save(classManyManyBIENDSub);\n\t\t} catch (HibernateException e) {\n\t\t\tthrow new DaoException(e);\n\t\t}\n\t}", "@Override\n\t\tpublic void findChild(ITargetNode child, ITargetNode parent) {\n\t\t\tchild.setParent(parent);\n\n\t\t\t// create temp object\n\n\t\t\tif (child instanceof Tar_namespace) {\n\t\t\t\tTar_namespace tar = (Tar_namespace) child;\n\t\t\t\tMyTempNS tmpNS = new MyTempNS(tar);\n\t\t\t\tString tid = tar.getTargetId();\n\t\t\t\tMyBpnsFactory.this.mTempNsMap.put(tid, tmpNS);\n\n\t\t\t\tString name = tar.getNamespaceURI();\n\t\t\t\tMyBpnsFactory.this.mTempNsMap.put(name, tmpNS);\n\n\t\t\t\t// System.out.println(\"new ns : \" + tar);\n\n\t\t\t} else if (child instanceof Tar_class) {\n\t\t\t\tTar_class tar = (Tar_class) child;\n\t\t\t\tMyTempClass tmpCls = new MyTempClass(tar);\n\t\t\t\tString tid = tar.getTargetId();\n\t\t\t\tMyBpnsFactory.this.mTempClassMap.put(tid, tmpCls);\n\n\t\t\t\tString name = tar.getName();\n\t\t\t\tMyTempNS tmpNS = tmpCls.getNS();\n\t\t\t\ttmpNS.mTempClassMap.put(name, tmpCls);\n\t\t\t\tMyBpnsFactory.this.mTempClassMap.put(name, tmpCls);\n\n\t\t\t\t// System.out.println(\"new cls : \" + tar);\n\t\t\t}\n\n\t\t}", "@SuppressWarnings(\"unchecked\")\n protected synchronized T newChild() {\n try {\n T t = ((Class<T>)getClass()).newInstance();\n t.isRootNode = false;\n \n if( ! isRootNode ) {\n if( children == null ) children = new ArrayList<T>();\n children.add( t );\n }\n \n return t;\n } catch( Exception ex ) {\n throw new RuntimeException(ex);\n }\n }", "protected void initializeChild() {\n\t}", "public Event(String descendant, String personID){\n eventID = UUID.randomUUID().toString();\n this.descendant = descendant;\n this.personID = personID;\n latitude = 0.00;\n longitude = 0.00;\n }", "public abstract String createNewObject(OwResource resource_p, String strObjectClassName_p, OwPropertyCollection properties_p, OwPermissionCollection permissions_p, OwContentCollection content_p, OwObject parent_p, String strMimeType_p,\r\n String strMimeParameter_p) throws Exception;", "public LargeObjectAvro() {}", "Contact createUnresolvedContact(String address, String persistentData, ContactGroup parentGroup);", "public DoctorRecord() {\n super(Doctor.DOCTOR);\n }", "public Builder setChildIdBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n\n childId_ = value;\n onChanged();\n return this;\n }", "public PersistentGrandChildToken() {\n this.Id = UUID.randomUUID();\n this.owner = \"\";\n this.issuer = \"\";\n this.amount = 0;\n this.persistentChildToken = null;\n this.childProof = \"I am a child\";\n }", "public PersistentChildToken() {\n this.Id = UUID.randomUUID();\n this.owner = \"\";\n this.issuer = \"\";\n this.amount = 0;\n this.persistentToken = null;\n this.childProof = \"I am a child\";\n this.listOfPersistentGrandChildTokens = null;\n }", "protected abstract ENTITY createEntity();", "B createB();", "public ARecord() {\n super(A.A);\n }", "private RecordImpl(Table tableParent, long lRecord, URI uriTemporaryLobFolder) throws IOException\n\t{\n\t\t_tableParent\t\t\t= tableParent;\n\t\t_lRecord\t\t\t\t= lRecord;\n\t\t_uriTemporaryLobFolder\t= uriTemporaryLobFolder;\n\t\tsetRecordType(_of.createRecordType());\n\t}", "CsticGroupModel createInstanceOfCsticGroupModel();", "public AttachedPartsStruct()\n\t{\n\t\tthis.station = new EnumHolder<>( StationEnum32.Nothing_Empty );\n\t\tthis.storeType = new EntityTypeStruct();\n\t\t\n\t\t// Add to the elements in the parent so that it can do its generic fixed-record stuff\n\t\tsuper.add( station );\n\t\tsuper.add( storeType );\n\t}", "@Override\n\tpublic EntityAgeable createChild(EntityAgeable mate) {\n\t\treturn getReproductionHelper().createChild(mate);\n\t}", "protected abstract EntityBase createEntity() throws Exception;", "private EntityDef createEntityDef(Class<?> entityClass)\n {\n\t\tif (entityClass.isAnnotationPresent(InheritanceSingleTable.class)) {\n return new SingleTableSubclass.SingleTableSuperclass(entityClass);\n } else if (entityClass.getSuperclass().isAnnotationPresent(InheritanceSingleTable.class)) {\n return new SingleTableSubclass(entityClass);\n } else {\n return new EntityDef(entityClass);\n }\n\t}", "public void reproduce() {\n\t\tOrganism newOrg;\n\t\t\n\t\tfor (int i=0; i < Utils.between(_nChildren,1,8); i++) {\n\t\t\tnewOrg = new Organism(_world);\n\t\t\tif (newOrg.inherit(this, i==0)) {\n\t\t\t\t// It can be created\n\t\t\t\t_nTotalChildren++;\n\t\t\t\t_world.addOrganism(newOrg,this);\n\t\t\t\t_infectedGeneticCode = null;\n\t\t\t}\n\t\t\t_timeToReproduce = 20;\n\t\t}\n\t}", "public Parent() {\n super();\n }", "public static MotherBed createEntity(EntityManager em) {\n MotherBed motherBed = new MotherBed()\n .value(DEFAULT_VALUE)\n .status(DEFAULT_STATUS);\n // Add required entity\n Nursery nursery = NurseryResourceIntTest.createEntity(em);\n em.persist(nursery);\n em.flush();\n motherBed.setNursery(nursery);\n return motherBed;\n }", "public SubSectionDetail() {\r\n\t}", "protected File(SleuthkitCase db, long objId, long fsObjId, \n\t\t\tTSK_FS_ATTR_TYPE_ENUM attrType, short attrId, String name, long metaAddr, \n\t\t\tTSK_FS_NAME_TYPE_ENUM dirType, TSK_FS_META_TYPE_ENUM metaType, \n\t\t\tTSK_FS_NAME_FLAG_ENUM dirFlag, short metaFlags, \n\t\t\tlong size, long ctime, long crtime, long atime, long mtime, \n\t\t\tshort modes, int uid, int gid, String md5Hash, FileKnown knownState, String parentPath) {\n\t\tsuper(db, objId, fsObjId, attrType, attrId, name, metaAddr, dirType, metaType, dirFlag, metaFlags, size, ctime, crtime, atime, mtime, modes, uid, gid, md5Hash, knownState, parentPath);\n\t}", "public GO_RecordType() {\n }", "protected <T extends IInternalElement> T createInternalElement(\n\t\t\tIInternalElement parent, IInternalElementType<T> childType) throws RodinDBException {\n\n\t\treturn parent.createChild(childType, null, null);\n\t}", "public PersonAddressBuilderDFB(PersonDFB person){\n //only one person we are building up but need a reference to it in every sub builder\n this.person = person;\n }", "private void createClassSQLContract(){\n //---------------------------------------------------------------------------\n buffer=new StringBuffer();\n createGetColumnPropertiesHash();\n createGetPrimaryKeyVector();\n createGetTableName();\n createSetFKParent();\n\t}", "public void testEditDataForInheritance()\r\n\t{\r\n\r\n\t\tEntityManagerInterface entityManagerInterface = EntityManager.getInstance();\r\n\t\tDomainObjectFactory factory = DomainObjectFactory.getInstance();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// Step 1\r\n\t\t\tEntityInterface specimen = factory.createEntity();\r\n\t\t\tspecimen.setName(\"specimen\");\r\n\t\t\tspecimen.setAbstract(true);\r\n\t\t\tAttributeInterface barcode = factory.createStringAttribute();\r\n\t\t\tbarcode.setName(\"barcode\");\r\n\t\t\tspecimen.addAbstractAttribute(barcode);\r\n\r\n\t\t\tAttributeInterface label = factory.createStringAttribute();\r\n\t\t\tlabel.setName(\"label\");\r\n\t\t\tspecimen.addAbstractAttribute(label);\r\n\r\n\t\t\tEntityInterface tissueSpecimen = factory.createEntity();\r\n\t\t\ttissueSpecimen.setParentEntity(specimen);\r\n\r\n\t\t\tspecimen = entityManagerInterface.persistEntity(specimen);\r\n\r\n\t\t\ttissueSpecimen.setName(\"tissueSpecimen\");\r\n\r\n\t\t\tAttributeInterface quantityInCellCount = factory.createIntegerAttribute();\r\n\t\t\tquantityInCellCount.setName(\"quantityInCellCount\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(quantityInCellCount);\r\n\r\n\t\t\tAttributeInterface arivalDate = factory.createDateAttribute();\r\n\t\t\tarivalDate.setName(\"arivalDate\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(arivalDate);\r\n\r\n\t\t\ttissueSpecimen = entityManagerInterface.persistEntity(tissueSpecimen);\r\n\r\n\t\t\tEntityInterface advanceTissueSpecimenA = factory.createEntity();\r\n\t\t\tadvanceTissueSpecimenA.setParentEntity(tissueSpecimen);\r\n\t\t\tadvanceTissueSpecimenA.setName(\"advanceTissueSpecimenA\");\r\n\r\n\t\t\tAttributeInterface newAttribute = factory.createIntegerAttribute();\r\n\t\t\tnewAttribute.setName(\"newAttributeA\");\r\n\t\t\tadvanceTissueSpecimenA.addAbstractAttribute(newAttribute);\r\n\r\n\t\t\tEntityInterface advanceTissueSpecimenB = factory.createEntity();\r\n\t\t\tadvanceTissueSpecimenB.setParentEntity(tissueSpecimen);\r\n\t\t\tadvanceTissueSpecimenB.setName(\"advanceTissueSpecimenB\");\r\n\r\n\t\t\tAttributeInterface newAttributeB = factory.createIntegerAttribute();\r\n\t\t\tnewAttributeB.setName(\"newAttributeB\");\r\n\t\t\tadvanceTissueSpecimenB.addAbstractAttribute(newAttributeB);\r\n\t\t\tAttributeInterface newAttributeB2 = factory.createIntegerAttribute();\r\n\t\t\tnewAttributeB2.setName(\"newAttributeB2\");\r\n\t\t\tadvanceTissueSpecimenB.addAbstractAttribute(newAttributeB2);\r\n\r\n\t\t\tadvanceTissueSpecimenA = entityManagerInterface.persistEntity(advanceTissueSpecimenA);\r\n\r\n\t\t\t//Step 2\r\n\t\t\tMap dataValue = new HashMap();\r\n\t\t\tdataValue.put(barcode, \"123456\");\r\n\t\t\tdataValue.put(label, \"specimen parent label\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"45\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-12-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\r\n\t\t\tLong recordId = entityManagerInterface.insertData(tissueSpecimen, dataValue);\r\n\r\n\t\t\tResultSet resultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t\t// Step 3\r\n\t\t\tdataValue.put(barcode, \"870\");\r\n\t\t\tdataValue.put(label, \"specimen parent label123\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"4546\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-11-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\r\n\t\t\tentityManagerInterface.editData(tissueSpecimen, dataValue, recordId);\r\n\r\n\t\t\t// step 4\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t\tdataValue.clear();\r\n\t\t\tdataValue = entityManagerInterface.getRecordById(tissueSpecimen, recordId);\r\n\r\n\t\t\tassertEquals(\"870\", dataValue.get(barcode));\r\n\t\t\tassertEquals(\"specimen parent label123\", dataValue.get(label));\r\n\t\t\tassertEquals(\"4546\", dataValue.get(quantityInCellCount));\r\n\r\n\t\t\t//Step 5\r\n\t\t\tdataValue.clear();\r\n\t\t\tdataValue.put(barcode, \"869\");\r\n\t\t\tdataValue.put(label, \"specimen parent label\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"45\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-12-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\t\t\tdataValue.put(newAttribute, \"12\");\r\n\r\n\t\t\trecordId = entityManagerInterface.insertData(advanceTissueSpecimenA, dataValue);\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(2, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(2, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ advanceTissueSpecimenA.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t\t//Step 6\r\n\t\t\tdataValue.clear();\r\n\t\t\tdataValue.put(barcode, \"875\");\r\n\t\t\tdataValue.put(label, \"New Label\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"454647\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-11-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\t\t\tdataValue.put(newAttribute, \"1223\");\r\n\r\n\t\t\tentityManagerInterface.editData(advanceTissueSpecimenA, dataValue, recordId);\r\n\r\n\t\t\t//Step 7\r\n\t\t\tdataValue.clear();\r\n\t\t\tdataValue = entityManagerInterface.getRecordById(advanceTissueSpecimenA, recordId);\r\n\r\n\t\t\tassertEquals(\"875\", dataValue.get(barcode));\r\n\t\t\tassertEquals(\"New Label\", dataValue.get(label));\r\n\t\t\tassertEquals(\"454647\", dataValue.get(quantityInCellCount));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(2, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(2, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ advanceTissueSpecimenA.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tLogger.out.debug(DynamicExtensionsUtility.getStackTrace(e));\r\n\t\t\tfail();\r\n\t\t}\r\n\t}", "public Event createEvent(String descendant, String personID, double latitude,\n double longitude, String country, String city,\n String eventType, int year)\n throws DatabaseException, InvalidValuesException {\n\n String eventID = UUID.randomUUID().toString();\n\n Event event = new Event(\n eventID,\n descendant,\n personID,\n latitude,\n longitude,\n country,\n city,\n eventType,\n year\n );\n\n addEvent(event);\n\n return event;\n }", "public AuthorRecord() {\n super(Author.AUTHOR);\n }", "public void testInheritanceEditMetadataEditChildWithEditedParent()\r\n\t{\r\n\r\n\t\tEntityManagerInterface entityManagerInterface = EntityManager.getInstance();\r\n\t\tDomainObjectFactory factory = DomainObjectFactory.getInstance();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Step 1 \r\n\t\t\tEntityInterface specimen = factory.createEntity();\r\n\t\t\tspecimen.setName(\"specimen\");\r\n\t\t\tspecimen.setAbstract(true);\r\n\t\t\tAttributeInterface barcode = factory.createStringAttribute();\r\n\t\t\tbarcode.setName(\"barcode\");\r\n\t\t\tspecimen.addAbstractAttribute(barcode);\r\n\t\t\t//Step 2 \t\t\t\r\n\t\t\tEntityInterface savedSpecimen = entityManagerInterface.persistEntity(specimen);\r\n\r\n\t\t\t//Step 3\r\n\t\t\tEntityInterface tissueSpecimen = factory.createEntity();\r\n\t\t\ttissueSpecimen.setName(\"tissueSpecimen\");\r\n\r\n\t\t\tAttributeInterface quantityInCellCount = factory.createIntegerAttribute();\r\n\t\t\tquantityInCellCount.setName(\"quantityInCellCount\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(quantityInCellCount);\r\n\t\t\ttissueSpecimen.setParentEntity(savedSpecimen);\r\n\r\n\t\t\t//Step 4\t\t\t\r\n\t\t\tEntityInterface savedTissueSpecimen = entityManagerInterface\r\n\t\t\t\t\t.persistEntity(tissueSpecimen);\r\n\t\t\tassertEquals(savedTissueSpecimen.getParentEntity(), savedSpecimen);\r\n\t\t\t//Check for step 4\r\n\t\t\tResultSetMetaData metaData = executeQueryForMetadata(\"select * from \"\r\n\t\t\t\t\t+ savedTissueSpecimen.getTableProperties().getName());\r\n\t\t\tassertEquals(noOfDefaultColumns + 1, metaData.getColumnCount());\r\n\r\n\t\t\tmetaData = executeQueryForMetadata(\"select * from \"\r\n\t\t\t\t\t+ savedSpecimen.getTableProperties().getName());\r\n\t\t\tassertEquals(noOfDefaultColumns + 1, metaData.getColumnCount());\r\n\r\n\t\t\t//Step 5\r\n\t\t\tAttributeInterface label = factory.createStringAttribute();\r\n\t\t\tlabel.setName(\"label\");\r\n\t\t\tsavedSpecimen.addAbstractAttribute(label);\r\n\t\t\t//Step 6\r\n\t\t\tAttributeInterface tissueCode = factory.createStringAttribute();\r\n\t\t\ttissueCode.setName(\"Tissue code\");\r\n\t\t\tsavedTissueSpecimen.addAbstractAttribute(tissueCode);\r\n\r\n\t\t\t//Step 7\r\n\t\t\tsavedTissueSpecimen = entityManagerInterface.persistEntity(tissueSpecimen);\r\n\t\t\t//Step 8\r\n\t\t\tmetaData = executeQueryForMetadata(\"select * from \"\r\n\t\t\t\t\t+ savedTissueSpecimen.getTableProperties().getName());\r\n\t\t\tassertEquals(noOfDefaultColumns + 2, metaData.getColumnCount());\r\n\r\n\t\t\tmetaData = executeQueryForMetadata(\"select * from \"\r\n\t\t\t\t\t+ savedTissueSpecimen.getParentEntity().getTableProperties().getName());\r\n\t\t\tassertEquals(noOfDefaultColumns + 2, metaData.getColumnCount());\r\n\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tLogger.out.debug(DynamicExtensionsUtility.getStackTrace(e));\r\n\t\t\te.printStackTrace();\r\n\t\t\tfail();\r\n\t\t}\r\n\t}", "public Related() {\n }", "public Builder clearChildId() {\n\n childId_ = getDefaultInstance().getChildId();\n onChanged();\n return this;\n }", "public EmployerRecord() {\n super(Employer.EMPLOYER);\n }", "public ExcursionEntity() {\n\t}", "protected void childInit()\n {\n }", "private void initData() {\n Author steinbeck = new Author(\"John\", \"Steinbeck\");\n Publisher p1 = new Publisher(\"Covici Friede\", \"111 Main Street\", \"Santa Cruz\", \"CA\", \"95034\");\n Book omam = new Book(\"Of Mice And Men\", \"11234\", p1);\n \n publisherRepository.save(p1);\n\n steinbeck.getBooks().add(omam);\n omam.getAuthors().add(steinbeck);\n authorRepository.save(steinbeck);\n bookRepository.save(omam);\n\n // Create Crime & Punishment\n Author a2 = new Author(\"Fyodor\", \"Dostoevsky\");\n Publisher p2 = new Publisher( \"The Russian Messenger\", \"303 Stazysky Rao\", \"Rustovia\", \"OAL\", \"00933434-3943\");\n Book b2 = new Book(\"Crime and Punishment\", \"22334\", p2);\n a2.getBooks().add(b2);\n b2.getAuthors().add(a2);\n\n publisherRepository.save(p2);\n authorRepository.save(a2);\n bookRepository.save(b2);\n }", "public static Record newInstance(Table tableParent, long lRecord, RecordType rt) throws IOException\n\t{\n\t\treturn new RecordImpl(tableParent, lRecord, rt);\n\t}", "@Override\n public PASerializable newActor(Mailbox mailbox, Ancestor parent)\n throws Exception {\n PASerializable a = instantiateActor();\n ((IncDesImpl) a.getDurable()).initialize(mailbox, parent, this);\n return a;\n }", "protected void openParent(Object childInfo, OpenableMap newElements,\n\t\t\tIProgressMonitor pm) throws RodinDBException {\n\n\t\tif (parent == null)\n\t\t\treturn;\n\t\tfinal Openable openableParent = parent.getOpenable();\n\t\tif (!openableParent.isOpen()) {\n\t\t\topenableParent.generateInfos(openableParent.createElementInfo(),\n\t\t\t\t\tnewElements, pm);\n\t\t}\n\t}", "@Override\r\n\tprotected CodeSyncElement createModelElementChild(EObject object, View child) {\n\t\treturn null;\r\n\t}", "public RXA(Group parent, ModelClassFactory factory) {\r\n super(parent, factory);\r\n init(factory);\r\n }", "private RecordImpl(Table tableParent, long lRecord, RecordType rt) throws IOException\n\t{\n\t\t_tableParent\t= tableParent;\n\t\t_lRecord\t\t= lRecord;\n\t\tif (rt.getAny().size() > 0)\n\t\t{\n\t\t\tElement el = (Element) rt.getAny().get(0);\n\t\t\tif (el.getOwnerDocument() != getDocument())\n\t\t\t{\n\t\t\t\t_doc = el.getOwnerDocument();\n\t\t\t}\n\t\t}\n\t\tsetRecordType(rt);\n\t}", "protected abstract D createData();", "private void createSetFKParent(){\n Hashtable table=sqlTagsGeneratorTable.getImportedForeignKeyHash();\n Enumeration enum=table.keys();\n\n buffer.append(\" /**\\n\");\n buffer.append(\" * The <b><code>setFKParent</code></b> method is \");\n buffer.append(\"used to initializes Foreign\\n\");\n buffer.append(\" * Key columns within the HCYP_EVENTS table.\\n\");\n buffer.append(\" * @author Booker Northington II\\n\");\n buffer.append(\" * @version 1.0\\n\");\n buffer.append(\" * @param depth how many levels to initialize.\\n\");\n buffer.append(\" * @return none\\n\");\n buffer.append(\" * @since JDK1.3\\n\");\n buffer.append(\" */\\n\");\n buffer.append(spacer);\n buffer.append(\" public void setFKParent(int depth){\\n\");\n buffer.append(spacer);\n buffer.append(\" if(depth>0){\\n\");\n\n for(;enum.hasMoreElements();){\n String key=(String)enum.nextElement();\n SQLTagsGeneratorForeignKey object=(SQLTagsGeneratorForeignKey)\n table.get(key);\n String fkName=object.getFkName();\n buffer.append(\" \"+fkName+\"_PARENT=get\"+fkName+\"_PARENT\");\n buffer.append(\"(depth-1);\\n\");\n }\n buffer.append(\" }\\n\");\n buffer.append(\" return;\\n\");\n buffer.append(\" }// setFKParent() ENDS\\n\");\n }", "public void testGetDataForInheritance()\r\n\t{\r\n\r\n\t\tEntityManagerInterface entityManagerInterface = EntityManager.getInstance();\r\n\t\tDomainObjectFactory factory = DomainObjectFactory.getInstance();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// Step 1\r\n\t\t\tEntityInterface specimen = factory.createEntity();\r\n\t\t\tspecimen.setName(\"specimen\");\r\n\t\t\tspecimen.setAbstract(true);\r\n\t\t\tAttributeInterface barcode = factory.createStringAttribute();\r\n\t\t\tbarcode.setName(\"barcode\");\r\n\t\t\tspecimen.addAbstractAttribute(barcode);\r\n\r\n\t\t\tAttributeInterface label = factory.createStringAttribute();\r\n\t\t\tlabel.setName(\"label\");\r\n\t\t\tspecimen.addAbstractAttribute(label);\r\n\r\n\t\t\tEntityInterface tissueSpecimen = factory.createEntity();\r\n\t\t\ttissueSpecimen.setParentEntity(specimen);\r\n\r\n\t\t\tspecimen = entityManagerInterface.persistEntity(specimen);\r\n\r\n\t\t\ttissueSpecimen.setName(\"tissueSpecimen\");\r\n\r\n\t\t\tAttributeInterface quantityInCellCount = factory.createIntegerAttribute();\r\n\t\t\tquantityInCellCount.setName(\"quantityInCellCount\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(quantityInCellCount);\r\n\r\n\t\t\tAttributeInterface arivalDate = factory.createDateAttribute();\r\n\t\t\tarivalDate.setName(\"arivalDate\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(arivalDate);\r\n\r\n\t\t\t//step 2\r\n\t\t\ttissueSpecimen = entityManagerInterface.persistEntity(tissueSpecimen);\r\n\r\n\t\t\tEntityInterface advanceTissueSpecimenA = factory.createEntity();\r\n\t\t\tadvanceTissueSpecimenA.setParentEntity(tissueSpecimen);\r\n\t\t\tadvanceTissueSpecimenA.setName(\"advanceTissueSpecimenA\");\r\n\r\n\t\t\tAttributeInterface newAttribute = factory.createIntegerAttribute();\r\n\t\t\tnewAttribute.setName(\"newAttributeA\");\r\n\t\t\tadvanceTissueSpecimenA.addAbstractAttribute(newAttribute);\r\n\r\n\t\t\tEntityInterface advanceTissueSpecimenB = factory.createEntity();\r\n\t\t\tadvanceTissueSpecimenB.setParentEntity(tissueSpecimen);\r\n\t\t\tadvanceTissueSpecimenB.setName(\"advanceTissueSpecimenB\");\r\n\r\n\t\t\tAttributeInterface newAttributeB = factory.createIntegerAttribute();\r\n\t\t\tnewAttributeB.setName(\"newAttributeB\");\r\n\t\t\tadvanceTissueSpecimenB.addAbstractAttribute(newAttributeB);\r\n\t\t\tAttributeInterface newAttributeB2 = factory.createIntegerAttribute();\r\n\t\t\tnewAttributeB2.setName(\"newAttributeB2\");\r\n\t\t\tadvanceTissueSpecimenB.addAbstractAttribute(newAttributeB2);\r\n\r\n\t\t\tadvanceTissueSpecimenA = entityManagerInterface.persistEntity(advanceTissueSpecimenA);\r\n\t\t\tadvanceTissueSpecimenB = entityManagerInterface.persistEntity(advanceTissueSpecimenB);\r\n\r\n\t\t\t/*\r\n\t\t\t * Test getData method\r\n\t\t\t */\r\n\r\n\t\t\t//step 3\t\t\t\r\n\t\t\tMap dataValue = new HashMap();\r\n\t\t\tdataValue.put(barcode, \"123456\");\r\n\t\t\tdataValue.put(label, \"specimen parent label\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"45\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-12-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\r\n\t\t\tLong recordId = entityManagerInterface.insertData(tissueSpecimen, dataValue);\r\n\r\n\t\t\tMap outputMap = entityManagerInterface.getRecordById(tissueSpecimen, recordId);\r\n\r\n\t\t\t//step 4\t\r\n\t\t\tassertEquals(4, outputMap.size());\r\n\t\t\tassertEquals(\"123456\", outputMap.get(barcode));\r\n\t\t\tassertEquals(\"specimen parent label\", outputMap.get(label));\r\n\t\t\tassertEquals(\"45\", outputMap.get(quantityInCellCount));\r\n\t\t\tassertEquals(\"11-12-1982\", outputMap.get(arivalDate));\r\n\r\n\t\t\t//step 5\t\r\n\t\t\tdataValue.clear();\r\n\t\t\tdataValue.put(barcode, \"869\");\r\n\t\t\tdataValue.put(label, \"specimen parent label\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"46\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-11-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\t\t\tdataValue.put(newAttribute, \"12\");\r\n\r\n\t\t\trecordId = entityManagerInterface.insertData(advanceTissueSpecimenA, dataValue);\r\n\r\n\t\t\toutputMap = entityManagerInterface.getRecordById(advanceTissueSpecimenA, recordId);\r\n\t\t\t//step 6\t\t\t\r\n\t\t\tassertEquals(5, outputMap.size());\r\n\t\t\tassertEquals(\"869\", outputMap.get(barcode));\r\n\t\t\tassertEquals(\"specimen parent label\", outputMap.get(label));\r\n\t\t\tassertEquals(\"46\", outputMap.get(quantityInCellCount));\r\n\t\t\tassertEquals(\"11-11-1982\", outputMap.get(arivalDate));\r\n\r\n\t\t\t//step 7\t\t\t\t\r\n\t\t\tdataValue.clear();\r\n\t\t\tdataValue.put(barcode, \"1001\");\r\n\t\t\tdataValue.put(label, \"specimen parent label new\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"411\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"01-11-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\t\t\tdataValue.put(newAttributeB, \"40\");\r\n\t\t\tdataValue.put(newAttributeB2, \"41\");\r\n\r\n\t\t\trecordId = entityManagerInterface.insertData(advanceTissueSpecimenB, dataValue);\r\n\t\t\toutputMap = entityManagerInterface.getRecordById(advanceTissueSpecimenB, recordId);\r\n\t\t\t//step 8\t\t\t\t\r\n\t\t\tassertEquals(6, outputMap.size());\r\n\t\t\tassertEquals(\"1001\", outputMap.get(barcode));\r\n\t\t\tassertEquals(\"specimen parent label new\", outputMap.get(label));\r\n\t\t\tassertEquals(\"411\", outputMap.get(quantityInCellCount));\r\n\t\t\tassertEquals(\"01-11-1982\", outputMap.get(arivalDate));\r\n\t\t\tassertEquals(\"40\", outputMap.get(newAttributeB));\r\n\t\t\tassertEquals(\"41\", outputMap.get(newAttributeB2));\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tLogger.out.debug(DynamicExtensionsUtility.getStackTrace(e));\r\n\t\t\tfail();\r\n\t\t}\r\n\t}", "public void newOrg()\r\n {\r\n\t\tint[] genes={1,1,1,1,1,1,1,1,1,1,1}; //Setting the gene values to the basic, default values\r\n\t\tOrganism parent=new Organism(genes,1); //Creating the organism with the specified set of genes, and as the first generation\r\n\t\te.setParent(parent); //Setting the curent parent organism to the default starting organism\r\n\t\tArrayList<Organism> treeTemp=new ArrayList<Organism>(); \r\n\t\te.setTree(treeTemp); //Setting new succession tree to an empty tree\r\n\t\trepaint();\r\n }", "@Override\r\n\tpublic void makeChildcare() {\n\t\t\r\n\t}", "public void doExecute() {\n\t\tparent.requestChange(new ModelChangeRequest(this.getClass(), parent,\n\t\t\t\t\"create\") {\n\t\t\t@Override\n\t\t\tprotected void _execute() throws Exception {\n\t\t\t\ttry {\n\t\t\t\t\tCompositeEntity parentModel = (CompositeEntity) parent;\n\t\t\t\t\tString componentName = null;\n\t\t\t\t\tif (model == null) {\n\t\t\t\t\t\tcomponentName = ModelUtils.findUniqueName(parentModel,\n\t\t\t\t\t\t\t\t\t\t clazz,\n\t\t\t\t\t\t\t\t\t\t name.equalsIgnoreCase(\"INPUT\") ? DEFAULT_INPUT_PORT : DEFAULT_OUTPUT_PORT,\n\t\t\t\t\t\t\t\t\t\t name);\n\t\t\t\t\t\tcomponentName = ModelUtils.getLegalName(componentName);\n\t\t\t\t\t\tClass constructorClazz = CompositeEntity.class;\n\t\t\t\t\t\tif (clazz.getSimpleName().equals(\"TypedIOPort\")) {\n\t\t\t\t\t\t\tconstructorClazz = ComponentEntity.class;\n\t\t\t\t\t\t} else if (clazz.getSimpleName().equals(\n\t\t\t\t\t\t\t\t\"TextAttribute\")) {\n\t\t\t\t\t\t\tconstructorClazz = NamedObj.class;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (clazz.getSimpleName().equals(\"Vertex\")) {\n\t\t\t\t\t\t\tTypedIORelation rel = new TypedIORelation(\n\t\t\t\t\t\t\t\t\tparentModel, componentName);\n\t\t\t\t\t\t\tchild = new Vertex(rel, \"Vertex\");\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tConstructor constructor = clazz.getConstructor(\n\t\t\t\t\t\t\t\t\tconstructorClazz, String.class);\n\n\t\t\t\t\t\t\tchild = (NamedObj) constructor.newInstance(\n\t\t\t\t\t\t\t\t\tparentModel, componentName);\n\t\t\t\t\t\t\tif (child instanceof TypedIOPort) {\n\t\t\t\t\t\t\t\tboolean isInput = name\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"INPUT\");\n\t\t\t\t\t\t\t\t((TypedIOPort) child).setInput(isInput);\n\t\t\t\t\t\t\t\t((TypedIOPort) child).setOutput(!isInput);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (model instanceof TypedIOPort) {\n\t\t\t\t\t\t\tname = ((TypedIOPort) model).isInput() ? DEFAULT_INPUT_PORT\n\t\t\t\t\t\t\t\t\t: DEFAULT_OUTPUT_PORT;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcomponentName = ModelUtils.findUniqueName(parentModel, model.getClass(), name, name);\n\t\t\t\t\t\tcomponentName = ModelUtils.getLegalName(componentName);\n\t\t\t\t\t\tif (model instanceof Vertex) {\n\t\t\t\t\t\t\tTypedIORelation rel = new TypedIORelation(\n\t\t\t\t\t\t\t\t\tparentModel, componentName);\n\t\t\t\t\t\t\tchild = new Vertex(rel, \"Vertex\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tchild = (NamedObj) model\n\t\t\t\t\t\t\t\t\t.clone(((CompositeEntity) parentModel)\n\t\t\t\t\t\t\t\t\t\t\t.workspace());\n\t\t\t\t\t\t\tchild.setName(componentName);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tComponentUtility.setContainer(child, parentModel);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tcreateDefaultValues(child);\n\t\t\t\t\t\n\t\t\t\t\tif (location != null) {\n\t\t\t\t\t\tModelUtils.setLocation(child, location);\n\t\t\t\t\t}\n\t\t\t\t\tsetChild(child);\n\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tgetLogger().error(\"Unable to create component\", e);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t});\n\t}", "private Node addChild(Node parent, NodeTypes type, String name, String indexName) {\r\n Node child = null;\r\n child = neo.createNode();\r\n child.setProperty(INeoConstants.PROPERTY_TYPE_NAME, type.getId());\r\n // TODO refactor 2 property with same name!\r\n child.setProperty(INeoConstants.PROPERTY_NAME_NAME, name);\r\n child.setProperty(INeoConstants.PROPERTY_SECTOR_NAME, indexName);\r\n luceneInd.index(child, NeoUtils.getLuceneIndexKeyByProperty(getNetworkNode(), INeoConstants.PROPERTY_NAME_NAME, type),\r\n indexName);\r\n if (parent != null) {\r\n parent.createRelationshipTo(child, NetworkRelationshipTypes.CHILD);\r\n debug(\"Added '\" + name + \"' as child of '\" + parent.getProperty(INeoConstants.PROPERTY_NAME_NAME));\r\n }\r\n return child;\r\n }", "public Model(CoreSession session, String parentPath, String title)\n throws ClientException {\n \tthis.session = session;\n this.doc = session.createDocumentModel(parentPath, title,\n PAGENAV.type());\n this.doc.setPropertyValue(\"dc:title\", title);\n }", "private Builder(com.politrons.avro.AvroPerson other) {\n super(com.politrons.avro.AvroPerson.SCHEMA$);\n if (isValidValue(fields()[0], other.id)) {\n this.id = data().deepCopy(fields()[0].schema(), other.id);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.username)) {\n this.username = data().deepCopy(fields()[1].schema(), other.username);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.email_address)) {\n this.email_address = data().deepCopy(fields()[2].schema(), other.email_address);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.phone_number)) {\n this.phone_number = data().deepCopy(fields()[3].schema(), other.phone_number);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.first_name)) {\n this.first_name = data().deepCopy(fields()[4].schema(), other.first_name);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.last_name)) {\n this.last_name = data().deepCopy(fields()[5].schema(), other.last_name);\n fieldSetFlags()[5] = true;\n }\n }" ]
[ "0.7315672", "0.51521564", "0.49117008", "0.4911307", "0.490609", "0.48717904", "0.48676494", "0.4860535", "0.4829106", "0.48254782", "0.48109755", "0.48003164", "0.47947577", "0.4787509", "0.47784588", "0.4766679", "0.4766141", "0.47492558", "0.47282496", "0.47114423", "0.47053388", "0.46950224", "0.4689723", "0.46753952", "0.46660447", "0.46652424", "0.46642897", "0.4660441", "0.46555677", "0.46495524", "0.46453786", "0.46289533", "0.46026462", "0.4591007", "0.45844072", "0.45701212", "0.4569802", "0.45687905", "0.4563395", "0.45590925", "0.45517874", "0.45510778", "0.45486572", "0.45437407", "0.4535236", "0.45287523", "0.45143196", "0.45138627", "0.45112407", "0.45014048", "0.4490378", "0.4487445", "0.44869214", "0.4481021", "0.44536087", "0.44527447", "0.44526526", "0.44480455", "0.444584", "0.44448194", "0.4438703", "0.44375268", "0.44367445", "0.44300133", "0.44284835", "0.4422501", "0.4419525", "0.4413231", "0.44111583", "0.44085184", "0.4407886", "0.44012457", "0.4400875", "0.4400675", "0.43908557", "0.43884695", "0.4387809", "0.43815532", "0.4373017", "0.43697032", "0.43659362", "0.43548957", "0.43519345", "0.43497536", "0.43481153", "0.434675", "0.43466312", "0.433801", "0.43353528", "0.4330308", "0.43252942", "0.43247598", "0.43227148", "0.4322079", "0.43218547", "0.43210235", "0.43204018", "0.43195623", "0.4316169", "0.4312914" ]
0.6535435
1
Audit logs for INFO level
public static void auditInfo(Logger logger, String event, String cwsRef, Supplier<String> logData) { audit(logger, Level.INFO, event, cwsRef, logData); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void _logInfo ()\n {\n System.err.println (\"Logging is enabled using \" + log.getClass ().getName ());\n }", "public static boolean isAuditEnabled() {\n\n return debugLogger.isInfoEnabled();\n }", "public void LogIt(ExtentTest logger,String StepInfo){\r\n logger.log(Status.INFO,StepInfo);\r\n }", "@Override\n\tpublic void audit(String id) throws Exception {\n\t\t\n\t}", "@Override\n public void logs() {\n \n }", "private void logInfo(String msgText) {\n System.out.println (\"[INFO] \" + msgText);\n \n }", "public void audit( String message )\n {\n _getAuditLogger().info( ILogger.EVENT_CODE.TRANSACTION, message );\n }", "public static void audit(Object arg0) {\n MDC.put(INVOCATION_ID, MDC.get(MDC_KEY_REQUEST_ID));\n MDC.put(STATUS_CODE, COMPLETE_STATUS);\n MDC.put(RESPONSE_CODE, \"0\");\n MDC.put(classNameProp, \"\");\n auditLogger.info(\"{}\", arg0);\n }", "public static void logInfo(String message)\n {\n log(IStatus.INFO, message);\n }", "public void logInfo(boolean logInfo)\r\n {\r\n if (logInfo != infoLevelHandler.getBoolean())\r\n {\r\n infoLevelHandler.setBoolean(logInfo);\r\n fireConfigUpdated();\r\n }\r\n }", "public AuditInfo getAuditInfo() {\n return null;\n }", "private void logDeviceInfo() {\n logDeviceLevel();\n }", "private void logDeviceInfo() {\n logDeviceLevel();\n }", "public void infoLog(String testStep,ExtentReports report,ExtentTest logger)\n\t{\n\t\tcurrentTestStep = testStep;\n\t\tlogger.log(Status.INFO, \"Step: \"+(++i)+\" \"+testStep );\n\t\treport.flush();\n\t}", "public static void logExtentReport(String s1){\n\t\t test.get().log(Status.INFO, s1);\n\t}", "public void setAuditOn(boolean flag)\n {\n this.setProperty(GUILoggerSeverityProperty.AUDIT, flag);\n }", "void printHellow() {\n logger.debug(\"hellow world begin....\");\n logger.info(\"it's a info message\");\n logger.warn(\"it's a warning message\");\n loggerTest.warn(\"from test1 :....\");\n loggerTest.info(\"info from test1 :....\");\n\n // print internal state\n LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();\n StatusPrinter.print(lc);\n }", "@Override\n public void log()\n {\n }", "public void logDeviceEnterpriseInfo() {\n Callback<OwnedState> callback = (result) -> {\n recordManagementHistograms(result);\n };\n\n getDeviceEnterpriseInfo(callback);\n }", "public void logData(){\n }", "public void viewLogs() {\n\t}", "public void info(String msg) {\n log(INFO, msg);\n }", "@Test\n public void testAuditLogger() throws IOException {\n Configuration conf = new HdfsConfiguration();\n conf.set(DFSConfigKeys.DFS_NAMENODE_AUDIT_LOGGERS_KEY, TestAuditLogger.DummyAuditLogger.class.getName());\n MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build();\n try {\n cluster.waitClusterUp();\n Assert.assertTrue(TestAuditLogger.DummyAuditLogger.initialized);\n TestAuditLogger.DummyAuditLogger.resetLogCount();\n FileSystem fs = cluster.getFileSystem();\n long time = System.currentTimeMillis();\n fs.setTimes(new Path(\"/\"), time, time);\n Assert.assertEquals(1, TestAuditLogger.DummyAuditLogger.logCount);\n } finally {\n cluster.shutdown();\n }\n }", "@Override\r\n\tpublic void writeAudit(AuditWriter w) throws JSONException {\n\r\n\t}", "public static void log4jExample() {\n\t\tnewLogger.warn(\"This is the info level\");\n\t\t\n\t}", "private void infoLog(String msg) {\n Log.i(\"ActivityTransitions\", TAG + \" --> \" + msg);\n }", "private static void log(IStatus status) {\n\t getDefault().getLog().log(status);\n\t}", "public static void audit(String message, Object... arguments) {\n if (!auditLogger.isInfoEnabled()) {\n return;\n }\n MDC.put(INVOCATION_ID, postMdcInfoForEvent(null));\n MDC.put(STATUS_CODE, COMPLETE_STATUS);\n MDC.put(RESPONSE_CODE, \"0\");\n if (arguments.length == 1 && !OnapLoggingUtils.isThrowable(arguments[0])) {\n MDC.put(classNameProp, message);\n auditLogger.info(\"{}\", arguments[0] == null ? \"\" : arguments[0].toString());\n return;\n }\n\n MDC.put(classNameProp, \"\");\n auditLogger.info(message, arguments);\n }", "public static synchronized void setAuditLevel(String newAuditLevel) {\n\n if (overrideLogbackLevel) {\n if (\"OFF\".equalsIgnoreCase(newAuditLevel)) {\n PolicyLogger.auditLevel = Level.OFF;\n auditLogger.setLevel(auditLevel);\n } else {\n // --- set default value\n auditLogger.setLevel(Level.INFO);\n PolicyLogger.auditLevel = Level.INFO;\n }\n }\n }", "public static void info(String msg){\n\t\tconsole(msg);\n\t\tlogger.info(msg);\n\t}", "public void sub() {\n\t\tlog.severe(\"severe level\");// <= (1)\n\t\tlog.warning(\"warning level\");// <= (2)\n\t\tlog.info(\"info level\");// <= (3)\n\t\tlog.config(\"config level\");// <= (4)\n\t\tlog.fine(\"fine level\");// <= (5)\n\t\tlog.finer(\"finer level\");// <= (6)\n\t\tlog.finest(\"finest level\");// <= (7)\n\n\t}", "public void info(String msg) {\n\t\tif (this.logLevel <= BackupLogger.INFO) {\n\t\t\twrite(\"INFO \" + msg);\n\t\t\tSystem.out.println(\"INFO \" + msg);\n\t\t}\n\t}", "@Around(\"execution(* *(..)) && @annotation(audit)\")\n\tpublic Object audit(ProceedingJoinPoint jp, Audit audit) throws Throwable {\n\t\tObject[] args = jp.getArgs();\n\n\t\t// Step. Print execution information\n\t\tthis.printBar();\n\t\tthis.print(\"[executing] \" + (props.getInfo().toLowerCase().equals(\"short\") ? jp.getSignature().getName() : jp.getSignature() ));\n\n\t\t// Step. Print arguments if any\n\t\tswitch (audit.value()) {\n\t\tcase BEFORE:\n\t\tcase BEFORE_AND_AFTER:\n\t\t\tthis.printArgs(args);\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\n\t\t// Step. Proceed\n\t\tObject obj = jp.proceed(args);\n\n\t\t// Step. Print result if needed\n\t\tswitch (audit.value()) {\n\t\tcase AFTER:\n\t\tcase BEFORE_AND_AFTER:\n\t\t\tthis.print(\"[result] \" + obj);\n\t\tdefault:\n\t\t\tthis.printBar();\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\t// Step. Return\n\t\treturn obj;\n\t}", "public boolean logInfo()\r\n {\r\n return infoLevelHandler.getBoolean();\r\n }", "public void logInfo( String msg ) {\r\n\t\tlogger.log( Level.INFO, logPrefix + \" \" + msg );\r\n\t}", "public boolean isAuditable() {\n\t\treturn true;\n\t}", "public static void logInfo(String info, int level) {\n\t\tif (!m_bDebug && level < 1) return;\n\t\tm_Logger.info(\"[OrbitalStrike] \" + info);\n\t}", "public void renderAudit(CoreSession session) throws ClientException;", "protected void info(String msg) {\n log.log(Level.INFO, msg);\n }", "@Override\r\n public void info() {\n System.out.println(\"开始介绍\");\r\n }", "public boolean isInfoLoggable() {\n return logger.isLoggable(Level.INFO);\n }", "@Before(\"pointcut()\") //pointcut names must match\n public void log(){\n logger.info(\"-------LOG INFO first------\");\n }", "public void info(String msg) {\n log(Level.INFO, msg, null);\n }", "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 LogStepMonitorHandler ()\r\n {\r\n setFilter(new LogLevelsFilter(Level.INFO));\r\n }", "public int getAuditId();", "public void info(String msg) {\n LOGGER_BASE.info(msg);\n }", "public void doLog() {\n SelfInvokeTestService self = (SelfInvokeTestService)context.getBean(\"selfInvokeTestService\");\n self.selfLog();\n //selfLog();\n }", "public void writeLog() {\n\n\t}", "public void writeLog() {\n\n\t}", "public void writeLog() {\n\n\t}", "public void logToConsole(){\n logger.trace(\"Records total: \" + employees.size());\n }", "abstract protected void _log(TrackingActivity activity) throws Exception;", "public void enableLogging();", "Response<Void> logCustomStat(int index);", "@Override\n public void info(String message) {\n if (Level.INFO.getPriority() <= level.getPriority()) {\n print(\"INFO: \" + message);\n }\n }", "public void updateLog(String newName){\r\n\t\tString timeStamp = new SimpleDateFormat(\"yyyy/MM/dd HH:mm.ss\").format(new java.util.Date());\r\n\t\tlogger.log(Level.SEVERE,\"Previous name:{0}, New Name: {1}, Date: {2}\", new Object[] {name, newName,timeStamp});\r\n\t}", "public void log(String message) {\n log(message, MSG_INFO);\n }", "public static void logStatus(){\r\n\t\tLogger log = Logger.getLogger(LOGGER_NAME);\r\n\t\tStringBuilder logString = new StringBuilder(\"\\n*** PlugIn Status ***\\n\");\r\n\t\t\r\n\t\tList<String> storagePlugins = getPluginsByType(PluginType.STORAGE);\r\n\t\tlogString.append(\"Storage PlugIns: \"+storagePlugins.size()+\"\\n\");\r\n\t\t\r\n\t\tlog.info(logString.toString());\r\n\t\treturn;\r\n\t}", "public void globalLog() {\n\t\tIterator iter = myCommit.entrySet().iterator();\n\t\twhile (iter.hasNext()) {\n\t\t\tMap.Entry entry = (Map.Entry) iter.next();\n\t\t\tVersion currVersion = (Version) entry.getValue();\n\t\t\tcurrVersion.log();\n\t\t}\n\t}", "@Override\n\tpublic void info(Message msg) {\n\n\t}", "@Test\r\n\tpublic void logTest() {\r\n\t\tlogger.info(\"Testando info\");\r\n\t\tlogger.debug(\"nao sera logado\" + \"Nice\");\r\n\t\tlogger.error(\"This is Error message\", new Exception(\"Testing\"));\r\n\t}", "void log();", "public static void logInteresting(){\n\t\tSleepPhase currentPhase=ZeoData.currentNight().displayPhase(-1);\n\t\tSleepPhase previousPhase=ZeoData.currentNight().displayPhase(-2);\n\t\t\n\t\t//Log what phase we wake from\n\t\tif (currentPhase==SleepPhase.WAKE){\n\t\t\tif (previousPhase!=SleepPhase.WAKE && previousPhase!=SleepPhase.UNDEFINED){\n\t\t\t\tZeoData.Log(\"Waking from \" + previousPhase);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Log the more rare light-deep phase\n\t\t//if (currentPhase.containsLightDeep()){\n\t\t//\tZeoData.Log(\"Phase detail contaings light-deep: \" + currentPhase);\n\t\t//}\n\t\t\n\t\t\n\t\t\n\t}", "@Override\n\tpublic String audit() throws Throwable {\n\t\treturn null;\n\t}", "LogTailer startTailing();", "abstract void initiateLog();", "private void doIt() {\n\t\tlogger.debug(\"hellow this is the first time I use Logback\");\n\t\t\n\t}", "public LogScrap() {\n\t\tconsumer = bin->Conveyor.LOG.debug(\"{}\",bin);\n\t}", "public void log(HttpServletRequest request, HttpServletResponse response) {\n\t\tObjectNode ecs = getLoggableMessage(request, response);\n\t\tlog.info(new ObjectMessage(ecs));\n\t}", "public void info(Object message)\n/* */ {\n/* 145 */ if (message != null) {\n/* 146 */ getLogger().info(String.valueOf(message));\n/* */ }\n/* */ }", "public static void audit(String nume_op) {\n try (FileWriter fileWriter = new FileWriter(\"audit.csv\",true)) {\r\n fileWriter.append(nume_op+\": \"+ LocalDate.now().toString()+'\\n');\r\n } catch (IOException e) {\r\n System.out.println(\"Something went wrong in writeUsingFileWriter method\");\r\n }\r\n }", "public static void info(String stepName, String description) \n\t{\n\t\ttry{\n\t\t\ttest.log(LogStatus.INFO, stepName, description);\n\t\t\t\n\t\t}catch(Exception e){fnPrintException(e);}\t\n\t}", "public void info()\n {\n System.out.println(toString());\n }", "private void logToFile() {\n }", "public void renderAudit(CoreSession session, DocumentModel doc) throws ClientException;", "public static void printInfo(){\n }", "@Override\n @Transactional\n public List<AuditLog> logs() {\n\tCompany company = this.authHelper.getAuth().getCompany();\n\tLong companyID = company == null ? null : company.getId();\n\tList<AuditLog> logs = this.companyDAO.logs(companyID);\n\tfor (AuditLog log : logs) {\n\t log.setAuditAction(AuditAction.of(log.getAction()));\n\t}\n\treturn logs;\n }", "public final boolean isAuditOn()\n {\n return this.getPropertyValue(GUILoggerSeverityProperty.AUDIT);\n }", "public static void logInfo(Context context,String message){\n if(logging){\n String tag = context.getClass().getName();\n android.util.Log.i(tag, message);\n }\n }", "public Byte getEnterpriseInfoAuditStatus() {\n return enterpriseInfoAuditStatus;\n }", "@Test\n\t@Transactional\n\tpublic void testAudit() throws Exception {\n\t\tProvider provider = providerRepository.findOne(160L);\n\t\tSystem.out.println(\"Status: \" + provider.getStatus());\n\t\tprovider.setStatus(ProviderStatoEnum.ACCREDITATO_PROVVISORIAMENTE);\n\t\tauditReportProviderService.auditAccreditamentoProvider(provider);\n\n\t}", "private void log() {\n\t\t\n//\t\tif (trx_loggin_on){\n\t\t\n\t\tif ( transLogModelThreadLocal.get().isTransLoggingOn() ) {\n\t\t\t\n\t\t\tTransLogModel translog = transLogModelThreadLocal.get();\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesConText().entrySet()) {\n\t\t\t\tMDC.put(entry.getKey().toString(), ((entry.getValue() == null)? \"\":entry.getValue()));\n\t\t\t}\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesOnce().entrySet()) {\n\t\t\t\tMDC.put(entry.getKey().toString(), ((entry.getValue() == null)? \"\":entry.getValue()));\n\t\t\t}\n\t\t\ttransactionLogger.info(\"\"); // don't really need a msg here\n\t\t\t\n\t\t\t// TODO MDC maybe conflic with existing MDC using in the project\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesConText().entrySet()) {\n\t\t\t\tMDC.remove(entry.getKey().toString());\n\t\t\t}\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesOnce().entrySet()) {\n\t\t\t\tMDC.remove(entry.getKey().toString());\n\t\t\t}\n\t\t\t\n\t\t\ttranslog.getAttributesOnce().clear();\n\t\t}\n\t\t\n\t}", "@SuppressWarnings(\"unused\")\n protected void info(String msg) {\n if (this.getContainer() != null && this.getContainer().getLogger().isInfoEnabled()) {\n this.getContainer().getLogger().info(msg);\n }\n }", "public static void info(String msg) {\n\t\tlog.info(\"[iCart] \" + msg);\n\t}", "public boolean isInfoLoggingOn() {\n return verbose || !quiet;\n }", "void setupFileLogging();", "public static void addInfoToReport(String message) {\n String messageWithStepNumber = addMessageToReport(message);\n ExtentTestManager.getTest().log(Status.INFO, messageWithStepNumber);\n }", "public void printInfo(){\n\t}", "public void printInfo(){\n\t}", "public static void info(String msg) {\n\t\tlogger.log(Level.INFO, msg);\n\t}", "Appendable getLog();", "public void setLogfileInfo(LogfileInfo info) {\n logfileInfo = info;\n }", "public Boolean includeAudit() {\n return includeAudit;\n }", "@Override\n public void information() {\n System.out.println(\"\");\n System.out.println(\"Dog :\");\n System.out.println(\"Age : \" + getAge());\n System.out.println(\"Name : \" + getName());\n System.out.println(\"\");\n }", "private static void seTimeStamps() {\n MDC.put(MDC_INSTANCE_UUID, \"\");\n MDC.put(MDC_ALERT_SEVERITY, \"\");\n\n var startTime = Instant.now();\n var endTime = Instant.now();\n\n seTimeStamps(startTime, endTime);\n\n MDC.put(PARTNER_NAME, \"N/A\");\n\n MDC.put(STATUS_CODE, COMPLETE_STATUS);\n MDC.put(RESPONSE_CODE, \"N/A\");\n MDC.put(RESPONSE_DESCRIPTION, \"N/A\");\n\n }", "@Around(\"execution(public * com.infotech.isg.service.ISGService.topup(..))\")\n public Object auditTopupLog(ProceedingJoinPoint joinPoint) throws Throwable {\n\n // get start time\n Date start = new Date();\n\n // invoke the operation\n Object result = joinPoint.proceed();\n\n long responseTime = System.currentTimeMillis() - start.getTime();\n\n // get request/response\n ISGServiceResponse response = (com.infotech.isg.service.ISGServiceResponse) result;\n String username = String.valueOf(joinPoint.getArgs()[0]);\n String bankCode = String.valueOf(joinPoint.getArgs()[2]);\n String amount = String.valueOf(joinPoint.getArgs()[3]);\n String channel = String.valueOf(joinPoint.getArgs()[4]);\n String state = String.valueOf(joinPoint.getArgs()[5]);\n String bankReceipt = String.valueOf(joinPoint.getArgs()[6]);\n String orderId = String.valueOf(joinPoint.getArgs()[7]);\n String consumer = String.valueOf(joinPoint.getArgs()[8]);\n String customerIp = String.valueOf(joinPoint.getArgs()[9]);\n String terminalId = null;\n if (customerIp != null) {\n String[] tokens = customerIp.split(\"-\");\n terminalId = ((tokens != null) && (tokens.length > 0)) ? tokens[0] : null;\n }\n String remoteIp = String.valueOf(joinPoint.getArgs()[10]);\n String action = String.valueOf(joinPoint.getArgs()[11]);\n String customerName = String.valueOf(joinPoint.getArgs()[12]);\n String vendor = String.valueOf(joinPoint.getArgs()[13]);\n int operatorId = ((com.infotech.isg.service.ISGService)joinPoint.getThis()).getOperatorId();\n\n // audit log in file\n LOG.info(\"\\u001B[32m{}\\u001B[0m {} for [{},{}] from [{},{},{},T({}),RRN({}),{}] => [{}{}\\u001B[0m,{}({}),{}{}\\u001B[0m,{}] in {} msec\",\n Operator.getName(operatorId), // operator name\n action, // action name\n consumer, // consumer\n amount, // amount\n username, // username\n remoteIp, // remote Ip\n channel, // channel\n terminalId, // customer IP, first part\n bankReceipt, // RRN, Refnum, bank receipt => unique code from payment switch\n vendor, // infotech by default \n (response.getStatus().equals(\"OK\")) ? \"\\u001B[32m\" : \"\\u001B[31m\", response.getStatus(),\n ErrorCodes.toString((int)response.getISGDoc()), response.getISGDoc(),\n ((response.getOPRDoc() != null) && (response.getOPRDoc().startsWith(\"-\"))) ? \"\\u001B[31m\" : \"\\u001B[0m\", response.getOPRDoc(),\n response.getMessage(),\n responseTime);\n\n // audit log in DB\n auditService.log(username, bankCode, amount, channel, state, bankReceipt, orderId,\n consumer, customerIp, remoteIp, action, operatorId,\n response.getStatus(), response.getISGDoc(), response.getOPRDoc(),\n start, responseTime, vendor);\n\n return result;\n }", "public Date getAuditDate() {\n return auditDate;\n }", "public void info( String methodName, String message )\n {\n getLogger().info( methodName + \"():\" + message );\n }", "@Override\n\t\t\t\t\t\t\tpublic void log(String msg, int level, Date date, StackTraceElement trace) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}" ]
[ "0.643944", "0.6324387", "0.62893444", "0.6134047", "0.60262764", "0.5972152", "0.5960371", "0.5890792", "0.58687425", "0.5866437", "0.58599055", "0.58169115", "0.58169115", "0.5795984", "0.5790704", "0.57819474", "0.57675886", "0.57613635", "0.57192063", "0.56874496", "0.5675771", "0.56661195", "0.5663265", "0.5634915", "0.55988085", "0.5595358", "0.55826455", "0.55694866", "0.5517781", "0.5517108", "0.5509543", "0.55081004", "0.5507553", "0.5490327", "0.5463306", "0.5457825", "0.5448601", "0.54452276", "0.5432136", "0.54199547", "0.54161716", "0.5416019", "0.5415125", "0.5413228", "0.5410589", "0.5393733", "0.5391562", "0.538168", "0.5380944", "0.5380944", "0.5380944", "0.537256", "0.53584146", "0.53419507", "0.5337319", "0.5335699", "0.5335697", "0.53274715", "0.53001016", "0.52958953", "0.52950466", "0.5290582", "0.5284404", "0.52815545", "0.5257509", "0.5256537", "0.52553016", "0.52531487", "0.5252753", "0.5244708", "0.5239918", "0.5239838", "0.5239283", "0.52246773", "0.5222858", "0.52154297", "0.52061456", "0.5205154", "0.51998675", "0.519836", "0.51941496", "0.5189952", "0.51870894", "0.5185383", "0.5184613", "0.518152", "0.51784223", "0.5173831", "0.51714134", "0.51714134", "0.5156914", "0.51514125", "0.5147711", "0.51467705", "0.51375186", "0.5137045", "0.51332825", "0.5132979", "0.5127514", "0.5125957" ]
0.5509999
30
Audit logs for ERROR level
public static void auditError(Logger logger, String event, String cwsRef, Supplier<String> logData) { audit(logger, Level.ERROR, event, cwsRef, logData); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void logError(Exception e);", "abstract void errorLogCustom(String tag, String message);", "abstract void initiateErrorLog();", "public static void logGenericUserError() {\n\n }", "abstract void logError(String error);", "abstract void errorLogError(String error);", "public void log(ErrorLevel el, String message, Throwable t);", "static void logError(Throwable t) {\n }", "@Override\r\n\tpublic void err(ServiceStatistics serviceStatistics) {\n\t\t\r\n\t}", "public void error(Context cxt) {\n recordEnhanced(ERROR, cxt);\n }", "private void logError(String msgText) {\n System.out.println (\"[ERROR] \" + msgText);\n \n }", "@Override\n\t\tpublic void onError(Throwable e) {\n\t\t\tSystem.out.println(\"onError\");\n\t\t}", "@Override\n public void onError(Throwable t) {\n t.printStackTrace();\n }", "@Override\n public void onError(Throwable t) {\n\n }", "@Override\n public void onError(Throwable t) {\n\n }", "@Override\r\n\tprotected void logError(String message, Throwable throwable) {\n\t\t\r\n\t}", "@Override\n\t\t\t\t\t\t\tpublic void error(Exception e) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "@Override\n public void onError(Throwable e) {\n\n }", "@Override\n public void onError(Throwable error) {\n Log.e(\"REALM\", \" ERROR .\" + error.toString());\n }", "@Override\n public void onError(Throwable e) {\n }", "public void error(EcompErrorConfiguration.EcompErrorSeverity errorLevel,\n EcompLoggerErrorCode errorCodeEnum,\n String serviceName,\n String targetEntity,\n String errorDescription, Object... params) {\n if (isErrorEnabled()) {\n error.log(errorLevel, errorCodeEnum, serviceName, targetEntity, errorDescription, params);\n }\n }", "public void error(String msg) {\n boolean doit = level == Level.NONE || level == Level.INFO;\n if (log != System.err || !doit) {\n System.err.println(msg);\n }\n if (!doit) return;\n write(\"ERROR\", msg); \n }", "@Override\n public void onError(Throwable error) {\n }", "private void logError(String msg)\n {\n GlobeRedirector.errorLog.write(msg);\n }", "public void logErr(String msg) {\r\n if (this.logger != null) {\r\n logger.severe(msg);\r\n }\r\n }", "public void error(Throwable error) {\n\n }", "public void error(Throwable error) {\n\n }", "protected void onError(I i, Exception e)\n/* */ throws Exception\n/* */ {\n/* 95 */ log.error(\"Error occurred while processing input on pipeline [{}]\", printableName(), e);\n/* */ }", "void appendStderr(String line);", "@ExceptionHandler(Exception.class)\n public void logErrors(Exception e) {\n errorLogger.logError(e.getMessage(), e);\n }", "void error() {\n status = ERROR;\n System.out.println(\"error\");\n stateChanged();\n }", "private final void prtlnErr(String s) {\n\n\t\tSystem.err.println(getDateStamp() + \" \" + s);\n\n\t}", "@Override\r\n public void onError(CameraEvent ev) {\n Log.p(ev.getMessage() + \" : \" + ev.getExceptionMessage());\r\n }", "public void error(String loggerFqcn, Object message, Throwable t)\n/* */ {\n/* 71 */ this.logger.error(loggerFqcn, message, t);\n/* */ }", "private static void error(@NotNull final org.slf4j.Logger logger, @NotNull @NotBlank @NotEmpty final String key,\r\n\t\t\tfinal Throwable exp, final Object... args) {\r\n\t\tif (logger.isErrorEnabled()) {\r\n\t\t\tfinal String message = format(key, args);\r\n\t\t\tif (null == exp) {\r\n\t\t\t\tlogger.error(message);\r\n\t\t\t} else {\r\n\t\t\t\t// Distinguish from JVM error and Defined error\r\n\t\t\t\tif (exp instanceof AbstractException) {\r\n\t\t\t\t\tfinal AbstractException error = (AbstractException) exp;\r\n\t\t\t\t\tlogger.error(\"[ *** ERROR\" + error.getErrorCode() + \" *** ] \" + message);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tlogger.error(\"[ *** JVM ERROR *** ]: \" + message);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void k2h_set_debug_level_error();", "@Override\n public void onError(Status status) {\n }", "public void error(EcompLoggerErrorCode errorCodeEnum,\n String serviceName,\n String targetEntity,\n String errorDescription, Object... params) {\n if (isErrorEnabled()) {\n error.log(LogLevel.ERROR, errorCodeEnum, serviceName, targetEntity, errorDescription, params);\n }\n }", "@Override\n\tpublic void audit(String id) throws Exception {\n\t\t\n\t}", "abstract void errorLogMessage(String message);", "@Override\r\n\t\t\tpublic void onError(Throwable e) {\n\r\n\t\t\t}", "@Override\n public void onError(Throwable e) {\n }", "private void log() {\n logger.error(\"insert queue (last {}, current {}, change {}/minute)\",\n insertQueueLast, insertQueueCurrent,\n insertQueueDelta);\n logger.error(\"commits (last {}, current {}, change {}/minute)\",\n commitLast, commitCurrent, commitDelta);\n logger.error(\"dropped (last {}, current {}, change {}/minute)\",\n droppedLast, droppedCurrent, droppedDelta);\n logger.error(\"total memory {}; free memory {}\",\n Runtime.getRuntime().totalMemory(),\n Runtime.getRuntime().freeMemory());\n }", "protected static void errorLog(float error){\n\n\t\tString logString = error + \"\\n\";\n\t\ttry {\n\t\t\tFiles.write(Paths.get(\"errorLog.txt\"), logString.getBytes(), StandardOpenOption.APPEND);\n\t\t}catch (IOException e) {\n\t\t\t//exception handling left as an exercise for the reader\n\t\t}\n\t}", "public static void e(Throwable t) {\n log(ERROR, null, t, \"\");\n }", "@Override\n public void onError(Exception e) {\n }", "@Override\n\tpublic void error(Message msg, Throwable t) {\n\n\t}", "public void error(Object message, Throwable t)\n/* */ {\n/* 213 */ if (message != null) {\n/* 214 */ getLogger().error(String.valueOf(message), t);\n/* */ }\n/* */ }", "@Override\n public void onError(Status status) {\n }", "@Override\n public void onError(Status status) {\n }", "@Override\n public void onError(Status status) {\n }", "@Override\n\tpublic String audit() throws Throwable {\n\t\treturn null;\n\t}", "@Test\r\n\tpublic void logTest() {\r\n\t\tlogger.info(\"Testando info\");\r\n\t\tlogger.debug(\"nao sera logado\" + \"Nice\");\r\n\t\tlogger.error(\"This is Error message\", new Exception(\"Testing\"));\r\n\t}", "@Override\r\n public void onError(Exception e) {\n }", "@Override\n public void onError(Exception e) {\n\n }", "private void logException(TestStepRunner testStepRunner)\n\t\t\tthrows AFTException {\n\t\tLOGGER.error(errorMessage);\n\n\t\tString onDbErrorValue = setOnDbErrorValue(testStepRunner);\n\n\t\tLOGGER.info(\"User has defined '\"\n\t\t\t\t+ ConfigProperties.ONERROR_DB_CONNECTION\n\t\t\t\t+ \"' to [\"\n\t\t\t\t+ onDbErrorValue\n\t\t\t\t+ \"]. This test case execution will be stopped and test execution will continue as per '\"\n\t\t\t\t+ ConfigProperties.ONERROR_DB_CONNECTION + \"' configuration.\");\n\t\tthrow new AFTException(errorMessage);\n\t}", "@Override\n public void onError() {\n\n }", "@Override\n\t\t\t\t\tpublic void onError(Throwable p1) {\n\t\t\t\t\t}", "public static void logError(String message)\n {\n log(IStatus.ERROR, message);\n }", "private void log(Throwable t) {\r\n StringWriter sw = new StringWriter();\r\n PrintWriter w = new PrintWriter(sw);\r\n t.printStackTrace(w);\r\n w.close();\r\n log(sw.toString(), Project.MSG_ERR);\r\n }", "private void logError(String message, Throwable error, boolean alertUser){\n // always log the error\n log.e(TAG, message, error);\n // alert the user to avoid silent errors\n if (alertUser){\n Toast.makeText(getApplicationContext(), message, Toast.LENGTH_LONG).show();\n\n }\n\n }", "private static void err(String msg) {\n System.err.println(PerfCakeAgent.class.getSimpleName() + \" > ERROR: \" + msg);\n }", "@Override\r\n\tpublic void onError(String err) {\n\t\t\r\n\t}", "public void error(Object message)\n/* */ {\n/* 199 */ if (message != null) {\n/* 200 */ getLogger().error(String.valueOf(message));\n/* */ }\n/* */ }", "@Override\n\tpublic void onError(int error, String msg) {\n\t\t\n\t}", "@Override\n\tpublic void onError(ErrorResponse errorResponse) {\n\t\t\n\t}", "public void error(IN[] ins, Throwable error) {\n\n }", "@Override\n\t\t\tpublic void onError(Object error) {\n\n\t\t\t}", "public static void logServiceError(AmazonServiceException ase) {\n\t\tlogger.error(\"Caught an AmazonServiceException, which means your request made it \"\n\t\t\t\t+ \"to Amazon , but was rejected with an error response for some reason.\");\n\t\tlogger.error(\"Error Message: \" + ase.getMessage());\n\t\tlogger.error(\"HTTP Status Code: \" + ase.getStatusCode());\n\t\tlogger.error(\"AWS Error Code: \" + ase.getErrorCode());\n\t\tlogger.error(\"Error Type: \" + ase.getErrorType());\n\t\tlogger.error(\"Request ID: \" + ase.getRequestId());\n\t}", "public void error(Exception e);", "@Override\n public void onError(@NonNull Status status) {\n Log.i(\"ss\", \"An error occurred: \" + status);\n }", "private void dumpRecordedOutErr(\n EventHandler eventHandler, Action action, FileOutErr outErrBuffer) {\n Event event = Event.info(\"From \" + action.describe() + \":\");\n dumpRecordedOutErr(eventHandler, event, outErrBuffer);\n }", "public GecAppender() {\n setThreshold(Level.ERROR);\n this.passthroughExceptions = new HashSet<Class<? extends Throwable>>();\n this.passthroughExceptions.add(InvocationTargetException.class);\n }", "public void error(Throwable e);", "@DISPID(97)\r\n\t// = 0x61. The runtime will prefer the VTID if present\r\n\t@VTID(95)\r\n\tjava.lang.String stdErrLogFilename();", "@Override\n public void onError(Error error) {\n }", "public void setErr(PrintStream err);", "@Override\n\tpublic void error(Object message, Throwable t) {\n\n\t}", "@Override\r\n\t\t\tpublic void onError(int error) {\n\r\n\t\t\t}", "public void error();", "@Override\r\n\t\t\tpublic void onError(Object error) {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\t\t\tpublic void onError(int i, String s) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onError(int i, String s) {\n\t\t\t\t\n\t\t\t}", "private void sendNotificationError(Exception e) {\n logger.error(e.getMessage());\n \n }", "public void error(String msg) {\n LOGGER_BASE.error(msg);\n }", "@Override\n\tpublic void log(Level level, Message msg, Throwable t) {\n\n\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\r\n\t\t\tpublic void onError(int error) {\n\t\t\t\t\r\n\t\t\t}", "public String getErrorLog()\n {\n return errorLog;\n }", "protected abstract void error(String err);", "private void addError(final SAMValidationError error) {\n if (this.errorsToIgnore.contains(error.getType())) return;\n \n if (this.ignoreWarnings && error.getType().severity == SAMValidationError.Severity.WARNING) return;\n \n this.errorsByType.increment(error.getType());\n if (verbose) {\n out.println(error);\n out.flush();\n if (this.errorsByType.getCount() >= maxVerboseOutput) {\n throw new MaxOutputExceededException();\n }\n }\n }", "@Override\n\tpublic void onError(Throwable throwable) {\n\t\tthrowable.printStackTrace();\n\t}", "abstract void consoleError(String error);", "@Override\n\tpublic void log(Level level, Object message, Throwable t) {\n\n\t}", "@Bean\r\n\tpublic IntegrationFlow errorFlow() {\r\n\t\treturn IntegrationFlows.from(INTEGRATION_ERROR_CHANNEL)\r\n\t\t\t\t.handle(System.out::println)\r\n\t\t\t\t.get();\r\n\t}", "@Override\n public void error(String message) {\n if (Level.ERROR.getPriority() <= level.getPriority()) {\n print(\"ERROR: \" + message);\n }\n }", "@Override\n public void onError(int code, String msg) {\n }", "protected void error(String msg) {\n log.log(Level.SEVERE, msg);\n }", "private static final void log(Throwable e) {\n\t\tlog.println(e);\n\t}", "public void error(IN ins[], Throwable error) {\n\n }" ]
[ "0.6432965", "0.6235512", "0.6117177", "0.6102256", "0.6096861", "0.601069", "0.59243226", "0.5825976", "0.5764031", "0.5730818", "0.5703491", "0.5699702", "0.5674761", "0.5663053", "0.5663053", "0.56179154", "0.5582676", "0.55786794", "0.55744934", "0.5573071", "0.55490255", "0.55282855", "0.55025166", "0.55005884", "0.5498841", "0.5492843", "0.5492843", "0.5489162", "0.5487419", "0.5486343", "0.5458165", "0.5448997", "0.5448048", "0.54441524", "0.5441033", "0.54336977", "0.5430051", "0.5425872", "0.5409898", "0.5407046", "0.5405355", "0.53929096", "0.53850424", "0.53703314", "0.5360706", "0.5350738", "0.53504443", "0.5348508", "0.5339956", "0.5339956", "0.53360146", "0.53306067", "0.5330426", "0.5327314", "0.5325085", "0.53170663", "0.5303489", "0.5289358", "0.527689", "0.52764887", "0.52719384", "0.52671987", "0.52572334", "0.52553254", "0.5241902", "0.5239047", "0.5233475", "0.5232673", "0.5227775", "0.52258456", "0.5224512", "0.52232766", "0.52227825", "0.5213128", "0.5211581", "0.52061576", "0.5199088", "0.51978594", "0.5192767", "0.5181671", "0.5177593", "0.5173512", "0.5173512", "0.51699644", "0.51620775", "0.5160957", "0.5160911", "0.5157625", "0.5156551", "0.5156193", "0.5155794", "0.5147269", "0.51420176", "0.5141153", "0.51365453", "0.513273", "0.5129647", "0.51265407", "0.5123773", "0.5122497" ]
0.5750619
9
Main entry of this application.
public static void run() throws TwitterException, SQLException, IOException { // just fill this ConfigurationBuilder cb = new ConfigurationBuilder(); cb.setDebugEnabled(true) .setOAuthConsumerKey("*") .setOAuthConsumerSecret( "*") .setOAuthAccessToken( "*-*") .setOAuthAccessTokenSecret( "*"); AWSCredentials credentials = new PropertiesCredentials( TweetGet.class.getResourceAsStream("AwsCredentials.properties")); MysqlDataSource dataSource = new MysqlDataSource(); dataSource.setUser("*"); dataSource.setPassword("*"); dataSource.setPort(3306); dataSource.setDatabaseName("TwitterDB"); dataSource .setServerName("*.rds.amazonaws.com"); Connection conn = null; try { conn = dataSource.getConnection(); } catch (SQLException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } final Statement sqlStatement = conn.createStatement(); try { System.out.println(); System.out.println("==========================================="); System.out.println("Connecting to Twitter"); System.out.println("===========================================\n"); TwitterStream twitterStream = new TwitterStreamFactory(cb.build()) .getInstance(); StatusListener listener = new StatusListener() { @Override public void onStatus(Status status) { if (status.getLang().equals("en")) { String user_id = String.valueOf(status.getUser().getId()); String created_at = String.valueOf(status.getCreatedAt()); GeoLocation geo = status.getGeoLocation(); if (geo != null) { String lon = String.valueOf(geo.getLongitude()); String lat = String.valueOf(geo.getLatitude()); String lon_lat = lon+","+lat; String originaltext = status.getText(); String[] words = originaltext.split("\\s"); StringBuffer message = new StringBuffer(); for(String word:words){ if (word.contains("@") || word.contains("#") || word.contains("http")){ } else { if(word.contains("'")){ word = word.replace("'", ""); } word = word.replaceAll("[^A-Za-z0-9 ]", ""); message.append(word); message.append(" "); } } String query = "INSERT INTO tweets (tweet_id,coordinates,created_at,tweet_text) VALUES ('" + user_id + "','" + lon_lat + "','" + created_at + "','" + message.toString() + "')"; String queueMessage = user_id + "_" + message; try { int sqlResult = sqlStatement.executeUpdate(query); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } //sqs.sendMessage(new SendMessageRequest(myQueueUrl,queueMessage)); System.out.println(query); System.out.println(message.toString()); System.out.println(status.getLang()); System.out.println(status.getGeoLocation() .getLatitude() + " " + status.getGeoLocation().getLongitude()); } // } } } @Override public void onDeletionNotice( StatusDeletionNotice statusDeletionNotice) { // System.out.println("Got a status deletion notice id:" + // statusDeletionNotice.getStatusId()); } @Override public void onTrackLimitationNotice(int numberOfLimitedStatuses) { // System.out.println("Got track limitation notice:" + // numberOfLimitedStatuses); } @Override public void onScrubGeo(long userId, long upToStatusId) { // System.out.println("Got scrub_geo event userId:" + userId + // " upToStatusId:" + upToStatusId); } @Override public void onStallWarning(StallWarning warning) { System.out.println("Got stall warning:" + warning); } @Override public void onException(Exception ex) { ex.printStackTrace(); } }; twitterStream.addListener(listener); twitterStream.sample(); } catch (AmazonServiceException ase) { System.out .println("Caught an AmazonServiceException, which means your request made it " + "to Amazon SQS, but was rejected with an error response for some reason."); System.out.println("Error Message: " + ase.getMessage()); System.out.println("HTTP Status Code: " + ase.getStatusCode()); System.out.println("AWS Error Code: " + ase.getErrorCode()); System.out.println("Error Type: " + ase.getErrorType()); System.out.println("Request ID: " + ase.getRequestId()); } catch (AmazonClientException ace) { System.out .println("Caught an AmazonClientException, which means the client encountered " + "a serious internal problem while trying to communicate with SQS, such as not " + "being able to access the network."); System.out.println("Error Message: " + ace.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String arg[]) {\n\n\t\tUtility.runApplication();\n\t}", "public static void main(String[] args)\n { \n // Create a new instance of the application and make the currently\n \tEntryPoint theApp = new EntryPoint(); \n \t// running thread the application's event dispatch thread.\n theApp.enterEventDispatcher();\n }", "public static void main(String[] args) {\n\t\trunApplication();\n\t}", "public static void main( String[] args )\n\t{\n\t\trunApp();\n\t}", "public static void main(String[] args) {\n\t\tnew App();\r\n\t}", "public static void main() {\n \n }", "public static void main(String[] args) {\n App.main(args);\n }", "public static void main(String[] args){\n\n MyApp myApp = new MyApp(); //1\n myApp.runMyApp(); //2\n System.out.println(\"End of Program\"); //3\n }", "public static void main(String[] args) {\n startApplication();\n }", "public static void main(String... args) {\n doMain().run();\n }", "public static void main(String[] args) {\n new MyApp();\n }", "public Main() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\r\n\t}", "public static void main(String[] args) {\r\n \t\r\n // Creates new controller named the main controller\r\n GlobalResources.MainControl = new Control();\r\n // Starts main application\r\n GlobalResources.MainControl.StartApplication();\r\n }", "private Main() {\n\n super();\n }", "public static void main(final String... args) {\n\n Application.launch();\n }", "public static void main(String[] args) {\n Startup.main(args);\n }", "public static void main(String[] args) {\n // TODO code application logic here\n // some testing? or actually we can't run it standalone??\n }", "public static void main(String args[]){\n\n createConnection();\n\n if (conn == null) {\n System.err.println(\"Failed to establish connection!\");\n }\n\n new App();\n\n }", "public static void main(String[] args) {\n new Main().run();\n }", "public MainEntryPoint() {\r\n\r\n }", "public Main() {\n\t\tsuper();\n\t}", "public static void main(String[] args) {\n // Start App\n EventQueue.invokeLater(new Runnable() {\n @Override\n public void run() { new App(); }\n });\n }", "public static void main(String[] args) {\n InitStart.Init();\r\n new MainMenuView().displayMenu();\r\n\r\n }", "public static void main(String[] args)\n {\n new Launcher();\n }", "public static void main(String[] args) {\r\n\t\t/* application object */\r\n\t\tCustomersApp myAp = new CustomersApp();\r\n\t\t/* run the application */\r\n\t\tmyAp.run();\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tnew LoipeApp();\n\t}", "public static void main (String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n Application.launch(App.class, args);\n }", "public static void main(String[] args) {\r\n SunSpotHostApplication app = new SunSpotHostApplication();\r\n app.run();\r\n }", "public static void main(String[] args) {\n Application.launch(args);\n }", "public static void main(String[] args) {\n\n Application.launch(args);\n }", "public Main() {\n \n \n }", "public static void main(String[] args) {\n SimpleUserInterface app = new SimpleUserInterface();\n app.start();\n }", "public static void main() {\n }", "public static void main(String[] args) {\n DatabaseController.login();\r\n\r\n //Log in to email\r\n Email.login();\r\n\r\n //Update local database - in real deployment this would run twice per day, not every startup\r\n SyncMain.main(new String[]{});\r\n\r\n //Load cached data\r\n CSVController.loadFiles();\r\n\r\n //Start GUI\r\n launch(args);\r\n\r\n }", "public static void main(String[] args) {\n launch(args);\r\n \r\n }", "public static void main()\n\t{\n\t}", "public static void main(String[] args) {\n\t\tApplication.launch(args); // Not needed for running from the command line\n\t}", "public static void main(String[] args)\n {\n MyApp theApp = new MyApp(); \n theApp.enterEventDispatcher();\n }", "public static void main(String[] args) {\r\n BibliotecaApp app = new BibliotecaApp();\r\n boolean quit = false;\r\n while (!quit) {\r\n quit = app.displayMenu();\r\n }\r\n }", "public static void main(String[] args) {\n\t\tAbstractDataHandlerFactory dataHandlerFactory = DataHandler.getDataHandlerInstance(); \n\t\t\n\t\t// Create a Controller object to begin the application and control code flow \n\t\tController control = new Controller(dataHandlerFactory);\t\n\t}", "public static void main(String[] args) {\n new Main().doMain(args);\n }", "public static void main(String[] args) {\n\r\n Starter starter = new Starter();\r\n starter.start();\r\n\r\n\r\n }", "public static void main(String[] args) {\n new GraphicStudyApp();\n }", "public static void main(String[] args) {\r\n\t\tUserInterface.instance().process();\r\n\t}", "public static void main(String[] args) {\n //launch it\n launch();\n }", "public static void main(String[] args) {\n\t \t\n\t \t\n\t }", "public static void main(String[] args) {\n // Create the system.\n Application.launch( args );\n }", "public static void main(String [] args){\n Main m = new Main(args);\n }", "public static void main(String[] args) {\n\n UIController.getInstance().setMain(new SelectionMenuUI());\n UIController.getInstance().startUI();\n\n }", "public static void main(String[] args) {\n \n \n \n \n }", "public static void main(String[] args) {\n new Main(args).run();\n }", "public static void main(String[] args) throws ClassNotFoundException, IOException, ParseException {\n\t\tEntryPoint entry= new EntryPoint();\n\t\t\t\n\t entry.mainMenu();\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n Run();\n }", "public MainEntry() {\n\t\tthis.taskController = new Controller();\n\t}", "@Override public void run(ApplicationArguments args) {\n }", "public static void main(String[] args)\r\n {\r\n Ipoki app = new Ipoki();\r\n app.enterEventDispatcher();\r\n }", "public static void main(String[] args) {\n\t\tApplication.launch(Main.class, args);\n\t}", "public static void main(String[] args) {\n\t\thandler();\r\n\r\n\t}", "public static void main(String[] args) {\n \n\n }", "public static void main(){\n\t}", "public static void main(String[] args)\n {\n \n ArmyMgr am = new ArmyMgr();\n am.start();\n }", "public static void main (String[]args) throws IOException {\n }", "public static void main(String[] args) {\n if (Config.Api.URL.contains(\"localhost\")) {\n Server.main(new String[0]);\n }\n Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration();\n config.setTitle(Config.Game.TITLE);\n config.setWindowedMode(Config.Game.WIDTH, Config.Game.HEIGHT);\n config.setWindowIcon(Config.Game.ICON);\n config.setResizable(false);\n new Lwjgl3Application(new BubbleSpinner(), config);\n }", "public static void main(String[] args) {\n\t\t\n\t\tnew Main();\n\t\t\n\t}", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main (String []args){\n }", "public static void main(String[] args) {\n Main main = new Main();\n main.begin();\n }", "public static void main(String[] args){\r\n\t\tstart();\r\n\t}", "public static void main(String[] args) {\n launch(args);\r\n }", "public static void main(String[] args) {\n launch(args);\r\n }", "public static void main(String[] args) {\n launch(args);\r\n }", "public static void main(final String[] args) {\n\n System.setProperty(\"org.restlet.engine.loggerFacadeClass\", \"org.restlet.ext.slf4j.Slf4jLoggerFacade\");\n\n // Start application with the command line arguments\n Bootstrapper.launchApp(new OImaging(args));\n }", "public static void main(String[] args)\n {\n Injector guice = Guice.createInjector(new DiscountGuiceModule());\n\n // Inject the application which contains a separate object graph which contains all the business logic\n // When we call the top level class, BasicApplication, guice will inject every static dependency that we request\n // via @Inject\n BasicApplication basicApplication = guice.getInstance(BasicApplication.class);\n\n // now start the application\n basicApplication.start();\n }", "public static void main(String[] args) {\n \n \n \n\t}", "public static void main(String[] args) {\n // This is how a javafx class is run.\n // This will cause the start method to run.\n // You don't need to change main.\n launch(args);\n }", "public static void main(String[] args) {\n launch(GretellaApp.class, args);\n }", "public static void main(String[] args) {\n\t launch(args);\n\t }", "public static void main(String[] args) {\n\t launch(args);\n\t }", "public static void main(String[] args) {\n\t\tfinal Levelre level = new Levelre();\n\t\tMainUI mainui = new MainUI(level);\n\t\t\n\t}", "public static void main(String[] args) {\n try {\n new Main().run(args);\n } catch (Exception e) {\n throw new IllegalStateException(\"Application failed with an exception.\", e);\n }\n }", "public static void main(String[] args) {\n InputHandler.inputs();\n }", "public static void main(String[] args) throws Exception {\n\n Application.launch(sample.Main.class, args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }" ]
[ "0.73068553", "0.7269202", "0.7263561", "0.7251666", "0.7220342", "0.7218209", "0.7212571", "0.71615624", "0.71432745", "0.71325415", "0.7104769", "0.70989513", "0.70879143", "0.70459116", "0.70096225", "0.6978652", "0.69592226", "0.69500256", "0.6949924", "0.6949741", "0.6936175", "0.68928623", "0.68795097", "0.68770707", "0.68729895", "0.68572146", "0.6851941", "0.684578", "0.6844153", "0.684057", "0.6828267", "0.6817508", "0.68068355", "0.6803955", "0.68022746", "0.6794234", "0.6792122", "0.67819893", "0.6773586", "0.67700005", "0.67675406", "0.67629594", "0.6761138", "0.6753041", "0.67520475", "0.6749026", "0.6744114", "0.67438304", "0.6738503", "0.67383295", "0.673519", "0.6735076", "0.6730354", "0.67239845", "0.67166215", "0.6712797", "0.6712724", "0.6704307", "0.66898394", "0.6687621", "0.66825426", "0.6680981", "0.6672887", "0.667035", "0.6668441", "0.6666055", "0.6666055", "0.6666055", "0.6666055", "0.6666055", "0.6666055", "0.6664873", "0.6662392", "0.6661735", "0.66595775", "0.66595775", "0.66595775", "0.6650909", "0.6649693", "0.66475695", "0.6642867", "0.66417146", "0.66372126", "0.66372126", "0.66350585", "0.6634008", "0.66327214", "0.66319144", "0.6629039", "0.6629039", "0.6629039", "0.6629039", "0.6629039", "0.6629039", "0.6629039", "0.6629039", "0.6629039", "0.6629039", "0.6629039", "0.6629039", "0.6629039" ]
0.0
-1
System.out.println("Got a status deletion notice id:" + statusDeletionNotice.getStatusId());
@Override public void onDeletionNotice( StatusDeletionNotice statusDeletionNotice) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void onDeletionNotice(StatusDeletionNotice arg0) {\n\r\n }", "@Override\r\n public void onDeletionNotice(StatusDeletionNotice arg0) {\n\r\n }", "@Override\r\n public void onDeletionNotice(StatusDeletionNotice statusDeletionNotice) {\n }", "@Override\r\n public void onDeletionNotice(StatusDeletionNotice statusDeletionNotice) {\n }", "public void onDeletionNotice(StatusDeletionNotice arg0) { }", "public void onDeletionNotice(StatusDeletionNotice statusDeletionNotice) {\n }", "@Override\n public void onDeletionNotice(StatusDeletionNotice statusDeletionNotice) {\n }", "public void onDeletionNotice(\n \t\t\t\t\tStatusDeletionNotice statusDeletionNotice) {\n \t\t\t}", "@Override\n public void onDeletionNotice(StatusDeletionNotice arg0) {\n }", "@Override\n\tpublic void onDeletionNotice(StatusDeletionNotice arg0) {\n\t\t\n\t}", "@Override\n\t\tpublic void onDeletionNotice(StatusDeletionNotice arg0) {\n\t\t\t\n\t\t}", "@Override\n\tpublic void onDeletionNotice(StatusDeletionNotice arg0) \n\t{\n\t}", "@Override\n\t\t\tpublic void onDeletionNotice(\n\t\t\t\t\tStatusDeletionNotice statusDeletionNotice) {\n\t\t\t}", "@Override\n\t\t\tpublic void onDeletionNotice(StatusDeletionNotice arg0) {\n\n\t\t\t}", "public String getDeleteStatus() {\n return deleteStatus;\n }", "public int getStatusId() {\n return _statusId;\n }", "void showDataDeletedMsg();", "public long getStatusId();", "public String getIdStatus() {\n return idStatus;\n }", "@Override\n\t\tpublic void onDeletionNotice(long arg0, long arg1) {\n\t\t\t\n\t\t}", "String getOldStatusId();", "public void operationDelete() {\n\r\n\t\tstatusFeldDelete();\r\n\t}", "public String getStatus() { return status; }", "String getStatusMessage( );", "int deleteByExample(SysNoticeExample example);", "public abstract long getStatusId();", "@Override\n\tpublic int deleteNotice(int id) throws Exception {\n\t\treturn -1;//res;\n\t}", "@Override\n public void deleteStatus(Status s) {\n }", "String getStatusMessage();", "public long getDossierStatusId();", "int deleteByExample(StatusRepliesExample example);", "public int getStatus()\n {\n return status;\n }", "public void printStatus();", "@Override\n\tpublic long getId() {\n\t\treturn _dmGtStatus.getId();\n\t}", "int logicalDeleteByExample(@Param(\"example\") SysNoticeExample example);", "private void getStatus() {\n\t\t\n\t}", "@Override\n public String toPrint(String s) {\n\n return s+\"Delete: \" + id + \"\\n\";\n }", "@Override\n\tpublic void onDeletionNotice(long directMessageId, long userId) {\n\n\t}", "private void showDeleteSuccess() {\n Notification notification = Notification.show(\"Your Advert Has Been Deleted \");\n notification.addThemeVariants(NotificationVariant.LUMO_ERROR);\n UI.getCurrent().getPage().reload();\n }", "public String getStatus() {\r\n return status;\r\n }", "public String getStatus() {\r\n return status;\r\n }", "public String getStatus(){\r\n\t\treturn status;\r\n\t}", "public int status() {\n return status;\n }", "public Status getStatus(){\n return status;\n }", "public String getStatus () {\r\n return status;\r\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public int getStatus() {\n return status_;\n }", "public int getStatus() {\n return status_;\n }", "public int getStatus() {\n return status_;\n }", "public int getStatus() {\n return status_;\n }", "public int getStatus() {\n return status_;\n }", "public int getStatus() {\n return status_;\n }", "public int getStatus() {\n return status_;\n }", "public int getStatus() {\n return status_;\n }", "public int getStatus() {\n return status_;\n }", "public String getStatusId() {\n return getProperty(Property.STATUS_ID);\n }", "public int getStatus ()\n {\n return status;\n }", "public int getStatus ()\n {\n return status;\n }", "public abstract String getStatusMessage();", "@Override\n\t\t\t\t\tpublic String getTitle() {\n\t\t\t\t\t\treturn item + \" deleted\";\n\t\t\t\t\t}", "public int getStatus() {\n return status;\n }", "public int getStatus() {\n return status;\n }", "public int getStatus() {\n return status;\n }", "public int getStatus() {\n return status;\n }", "public int getStatus() {\n return status;\n }", "public int getStatusOrdinal() { return status.ordinal(); }", "public String getStatus() {\n return this.status;\n }", "public String getStatus() {\n return this.status;\n }", "public String getStatus() {\n return this.status;\n }", "public long getUpdatedStatusId() {\r\n return updatedStatusId;\r\n }", "public String getStatus() {\r\n return status;\r\n }", "public String getStatus() {\r\n return status;\r\n }", "public String getStatus() {\r\n return status;\r\n }", "public String getStatus() {\r\n return status;\r\n }", "public String getStatus() {\r\n return status;\r\n }", "public long getStatus() {\r\n return status;\r\n }", "public String getStatusDetails() { return statusDetails; }", "public String status() {\n return this.status;\n }", "public String status() {\n return this.status;\n }", "messages.Statusmessage.StatusMessage getStatus();", "String status();", "String status();", "@Test\n public void givenStatus_whenDeleteById_ThenReturnStatus() {\n int id = 1;\n\n given(threeDao.deleteById(1)).willReturn(Status.OK);\n\n StatusEntity status = threeService.deleteById(id);\n\n assertEquals(Status.OK.getName(), status.getStatus());\n }", "public String getStatus() {\n return _status;\n }", "public String getStatus(){\n\n //returns the value of the status field\n return this.status;\n }", "public String getSTATUS() {\r\n return STATUS;\r\n }", "public String getSTATUS() {\r\n return STATUS;\r\n }", "public String getSTATUS() {\r\n return STATUS;\r\n }", "public String getSTATUS() {\r\n return STATUS;\r\n }", "public String getSTATUS() {\r\n return STATUS;\r\n }", "void showdelete() {\n\t\tif (printstatus != delete)\n\t\t\tprintln(\">>>> DELETE AT <br/>\" + printoldline);\n\t\tprintstatus = delete;\n\t\toutput+=oldinfo.symbol[printoldline].showSymbol();\n\t\toutput+=\"<br/>\";\n\t\tanyprinted = true;\n\t\tprintoldline++;\n\t}", "public void printSuccessfulDeletion(String taskDetails) {\n Task.reduceNumberOfTaskInList();\n System.out.println(String.format(\"Removed the task:\\n %s\", taskDetails));\n System.out.println(String.format(\"Now you have %d tasks in the list!\",\n Task.getNumberOfTasksInList()));\n }", "public synchronized String getStatus(){\n\t\treturn status;\n\t}", "public String showStatus();", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }" ]
[ "0.71483403", "0.71483403", "0.70293283", "0.70293283", "0.69664085", "0.6957001", "0.6921821", "0.68954843", "0.6793293", "0.6736574", "0.672733", "0.67065555", "0.66544384", "0.65335643", "0.63575894", "0.62936234", "0.62498385", "0.62166816", "0.6179999", "0.610488", "0.6086847", "0.6064608", "0.60603607", "0.6056145", "0.6054865", "0.60175717", "0.60151255", "0.5978278", "0.5969201", "0.5965565", "0.59534746", "0.5882428", "0.58420306", "0.5832331", "0.5821344", "0.5809154", "0.5807085", "0.5804415", "0.5793521", "0.5792532", "0.5792532", "0.5774432", "0.5772852", "0.57682914", "0.5759333", "0.57528687", "0.57528687", "0.57528687", "0.57358855", "0.57358855", "0.57358855", "0.57358855", "0.57358855", "0.57358855", "0.57358855", "0.57358855", "0.57358855", "0.57308495", "0.5723332", "0.5723332", "0.5717701", "0.5716012", "0.5714399", "0.5714399", "0.5714399", "0.5714399", "0.5714399", "0.57124716", "0.5700547", "0.5700547", "0.5700547", "0.5695998", "0.5690865", "0.5690865", "0.5690865", "0.5690865", "0.5690865", "0.5666895", "0.5666545", "0.5658229", "0.5658229", "0.56505173", "0.5641539", "0.5641539", "0.5628866", "0.5628709", "0.5612155", "0.56106097", "0.56106097", "0.56106097", "0.56106097", "0.56106097", "0.5609025", "0.5605401", "0.56044734", "0.5595809", "0.5594598", "0.5594598", "0.5594598", "0.5594598" ]
0.66889536
12
System.out.println("Got track limitation notice:" + numberOfLimitedStatuses);
@Override public void onTrackLimitationNotice(int numberOfLimitedStatuses) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onTrackLimitationNotice(int numberOfLimitedStatuses) {\n \t\t\t}", "@Override\r\n public void onTrackLimitationNotice(int numberOfLimitedStatuses) {\n }", "@Override\r\n public void onTrackLimitationNotice(int numberOfLimitedStatuses) {\n }", "public int getCountRequests() {\n/* 415 */ return this.countRequests;\n/* */ }", "@Override\r\n public void onTrackLimitationNotice(int arg0) {\n\r\n }", "public void onTrackLimitationNotice(int arg0) { }", "@Override\n public void onTrackLimitationNotice(int arg0) {\n }", "public int getVoiceMaxResults() {\n/* 223 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\n\t\tpublic void onTrackLimitationNotice(int arg0) {\n\t\t\t\n\t\t}", "public static void printTimelimit() {\n\t\n\tSystem.out.println(\"Time Limit \" + timeLimit);\n\t\n}", "int getStatusCount();", "@Override\n\t\t\tpublic void onTrackLimitationNotice(int arg0) {\n\n\t\t\t}", "public int getAvailableCount();", "@Override\n public void onTrackCount(int trackCount) {\n sleep();\n isTrackCountSet = true;\n }", "int getAchieveInfoCount();", "int getLimit();", "int getLimit();", "public int getCallsNb();", "public long count() {\n/* 154 */ return this.count;\n/* */ }", "public static int count(){\n return getVideoRequestCount;\n }", "public int getMaxUploads() {\n return 0;\r\n }", "int getNewlyAvailableQuestsCount();", "int getProgressCount();", "int getProgressCount();", "int getProgressCount();", "public double getLimit() {return limit;}", "int getCompletedTutorialsCount();", "public int capturedLimit() {\n return this.limit.get();\n }", "public int getLimit(){\r\n return limit;\r\n\r\n }", "int getTruckstatusCount();", "long getRequestsCount();", "public int getMaxCalls();", "int getDeliveredCount();", "public int getBatchDownloadWaitTime()\n {\n return 1000; \n }", "@Override\n\tpublic int getNumberOfTracks() {\n\t\treturn 6;\n\t}", "public void printStatus() {\n\t\tSystem.out.println(\"Current : \"+current+\"\\n\"\n\t\t\t\t+ \"Tour restant : \"+nb_rounds+\"\\n\"\n\t\t\t\t\t\t+ \"Troupe restant : \"+nb_to_train);\n\t}", "int getStatsCount();", "int getStatsCount();", "int getStatsCount();", "public String dlMaxFailures();", "int getActionLogCount();", "public int GetCurrentTrack();", "int getRequestsCount();", "int getRequestsCount();", "public static void main(String... args) {\n List<Integer> data = new ArrayList<Integer>();\n data.add(1);\n data.add(1);\n data.add(1);\n data.add(1);\n data.add(2);\n data.add(2);\n data.add(3);\n data.add(4);\n data.add(4);\n data.add(4);\n data.add(4);\n data.add(5);\n data.add(5);\n data.add(5);\n data.add(5);\n data.add(6);\n data.add(6);\n data.add(7);\n data.add(7);\n data.add(7);\n data.add(8);\n data.add(9);\n data.add(10);\n data.add(10);\n data.add(10);\n data.add(10);\n data.add(10);\n data.add(11);\n data.add(12);\n data.add(12);\n\n int count = droppedRequests(data);\n System.out.println(count);\n }", "public int getLimit() {\r\n return limit;\r\n }", "pb4server.MaxPrisonBuffAskReq getMaxPrisonBuffAskReq();", "private void viewPendingRequests() {\n\n\t}", "public void A_showTrackStatus(ListOfParameterLists parameterLists) {\n // enumerate all tracks in the system\n\n\n if(debug)\n System.out.println(\"\\n\\nAction_Rule 4: Show all the tracks' status\");\n\n Track.analystLogger.log(\" \");\n Track.analystLogger.log(TrackUtilities.printTimeValue(Constant.SHOW_TRACK_EVERY_X_MINS)+\" since last check on \"+trackNumber);\n\n Constant.alertOutput.println(\" \");\n Constant.alertOutput.println (TrackUtilities.printTimeValue(Constant.SHOW_TRACK_EVERY_X_MINS)+\" since last check on \"+trackNumber);\n Constant.alertOutput.flush ();\n }", "int getSnInfoCount();", "int getSnInfoCount();", "int getSnInfoCount();", "long getNumberOfComparisons();", "public String method_1457() {\r\n return String.format(\"count=%d\", new Object[]{Integer.valueOf(this.field_1677.size())});\r\n }", "long getTotalAcceptCount();", "public int getNumberOfAvailableGenotypeCalls();", "@Test\n\tpublic void activeHires()\n\t{\t\t\n\t\tassertTrue(controller.getReport().getNoOfActiveHires() == 1);\n\t}", "@Test\n\tpublic void completeHires()\n\t{\t\t\n\t\tassertTrue(controller.getReport().getNoOfCompleteHires() == 2);\n\t}", "int getQuotaMetricsCount();", "public int getLimit() {\n\treturn Limit;\n }", "public void count() {\n APIlib.getInstance().addJSLine(jsBase + \".count();\");\n }", "public int getLimit() {\n return limit;\n }", "public int getLimit() {\n return limit;\n }", "public int getLimit() {\n return limit;\n }", "int getWpaCount();", "boolean isLimited();", "public final int getPendingCount()\n/* */ {\n/* 508 */ return this.pending;\n/* */ }", "private int getCurrentLimit(){\n\t\treturn this.LIMIT;\n\t}", "private static int getFlightTakeOffCount()\r\n\t{\r\n\t\treturn flightTakeOffCounter;\r\n\t}", "@Test\n\tpublic void bikesAvailable()\n\t{\t\t\n\t\tassertTrue(controller.getReport().getNoOfBikesAvailable() == 1);\n\t}", "int getInfoCount();", "int getInfoCount();", "int getInfoCount();", "long getCount();", "long getCount();", "public int GetResends() { return resends; }", "int getChannelStatisticsCount();", "public int getMaxRequestUrlsReported() {\n return maxRequestUrlsReported;\n }", "public int getStatusCount() {\n return status_.size();\n }", "public int getLimit() {\n return limit;\n }", "public int getAmountOfVideosThatWillBeSaved(){\n\t\treturn (int) (Math.ceil((videoLength/videoIterationLength)));\n\t}", "public int getBatchDownloadFailureCountdown()\n {\n return 0; \n }", "Integer backlogCapacity();", "private int getLatestWickets() {\n // return 2 for simplicity\n return 2;\n }", "public int getReportCount ()\n {\n return reportCount;\n }", "int getNoticeListCount();", "public boolean getIsLimited() {\n return isLimited_;\n }", "public void addNumOfActionTaken() {\n this.numOfActionTaken++;\n }", "public int getPlayerCount() {\n return 0;\n }", "@Override\n public int status() {\n if (currentLoad <= maxLoad && currentLoad >= 0.6 * maxLoad) return GOOD;\n if (currentLoad < 0.6 * maxLoad && currentLoad >= 0.1 * maxLoad) return CHECK;\n else return BAD;\n }", "public int getWaveOrdersTaken() {\n return waveOrdersTaken;\n }", "public void checkOdlOpenflowMeterstats2(String x) throws SnmpStatusException;", "int getMaxRecordingMillis();", "public int getMissedCallsCount();", "int getUserQuestJobsCount();", "public int listSize(){\r\n return counter;\r\n }", "private void getStatus() {\n\t\t\n\t}", "public static int count() {\n\treturn errorCount;\n }", "long getMaxItemFindings();", "private static int gainStatPoints(int statPoints){\r\n statPoints++;\r\n System.out.println(\"You have \" + statPoints + \" stat points available.\");\r\n return statPoints;\r\n }" ]
[ "0.7757124", "0.77326196", "0.77326196", "0.618921", "0.6184794", "0.6160929", "0.6093982", "0.60851926", "0.6056417", "0.6050257", "0.59661436", "0.5895794", "0.5839625", "0.5834131", "0.5811931", "0.57965624", "0.57965624", "0.5795892", "0.5785723", "0.57765037", "0.5768554", "0.5734453", "0.57322437", "0.57322437", "0.57322437", "0.5728522", "0.5724197", "0.57223797", "0.5705102", "0.57032603", "0.56797093", "0.567588", "0.5671742", "0.5666153", "0.56630915", "0.565913", "0.56582713", "0.56582713", "0.56582713", "0.5656664", "0.56559104", "0.5604317", "0.5597057", "0.5597057", "0.5593696", "0.55916935", "0.5581258", "0.55811584", "0.55695736", "0.556134", "0.556134", "0.556134", "0.555431", "0.55508345", "0.5542352", "0.55418587", "0.55370146", "0.5536713", "0.5530552", "0.5528961", "0.55258745", "0.5523104", "0.5523104", "0.5523104", "0.55227745", "0.55183715", "0.5515287", "0.55057305", "0.55010325", "0.54983205", "0.5496744", "0.5496744", "0.5496744", "0.5490275", "0.5490275", "0.5488894", "0.5483243", "0.54751945", "0.5472766", "0.5466012", "0.5459956", "0.5453967", "0.54499346", "0.54484224", "0.5438256", "0.54372096", "0.54306287", "0.54273844", "0.54162604", "0.5403342", "0.54009545", "0.5393939", "0.53912354", "0.53885186", "0.5388327", "0.538684", "0.53854775", "0.5383549", "0.5372333", "0.53658485" ]
0.7608933
3
System.out.println("Got scrub_geo event userId:" + userId + " upToStatusId:" + upToStatusId);
@Override public void onScrubGeo(long userId, long upToStatusId) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onScrubGeo(long userId, long upToStatusId) \n {\n System.out.println(\"Got scrub_geo event userId:\" + userId + \" upToStatusId:\" + upToStatusId);\n }", "public void onScrubGeo(long userId, long upToStatusId) {\n \t\t\t}", "@Override\r\n public void onScrubGeo(long userId, long upToStatusId) {\n }", "@Override\r\n public void onScrubGeo(long userId, long upToStatusId) {\n }", "public static void main(String[] args) throws Exception {\n ConfigurationBuilder cb = new ConfigurationBuilder();\n cb\n .setOAuthConsumerKey(\"uAlvehs52GY9lWBDWfETms0Vs\")\n .setOAuthConsumerSecret(\"KYLNKxP2Rq6HPVc49z4qcBvMIJEiKU62JDBLvfuho8XXqiMzuA\")\n .setOAuthAccessToken(\"2847226595-6MYimsk1SK8W1xqEcAI5rOzOmaeQC4RYexBonGy\")\n .setOAuthAccessTokenSecret(\"KO0AXstVC7V4A0PgvWW4cnTzQ9wOA9SIMfnF6PDU747Er\");\n\n TwitterStreamFactory fact = new TwitterStreamFactory(cb.build());\n TwitterStream twitterStream = fact.getInstance();\n String filename = \".\";\n final PrintWriter writer = new PrintWriter(new FileOutputStream(new File(filename + \"/twitter.data\"), true));\n\n StatusListener listener = new StatusListener() {\n\n public void onStatus(Status status) {\n for (String s : getHashTags(status.toString())) {\n writer.println(s);\n writer.flush();\n }\n }\n\n\n public void onDeletionNotice(StatusDeletionNotice statusDeletionNotice) {\n //System.out.println(\"Got a status deletion notice id:\" + statusDeletionNotice.getStatusId());\n }\n\n\n public void onTrackLimitationNotice(int numberOfLimitedStatuses) {\n System.out.println(\"Got track limitation notice:\" + numberOfLimitedStatuses);\n }\n\n\n public void onScrubGeo(long userId, long upToStatusId) {\n System.out.println(\"Got scrub_geo event userId:\" + userId + \" upToStatusId:\" + upToStatusId);\n }\n\n\n public void onStallWarning(StallWarning warning) {\n System.out.println(\"Got stall warning:\" + warning);\n }\n\n\n public void onException(Exception ex) {\n ex.printStackTrace();\n }\n };\n twitterStream.addListener(listener);\n twitterStream.sample();\n\n }", "public void onStatus(Status status) {\n String userName = status.getUser().getScreenName();\n String userId = Long.toString(status.getUser().getId());\n String messageTweet = status.getText();\n String imageUrl = status.getUser().getProfileImageURL();\n String lang = status.getUser().getLang();\n String timeZone = status.getUser().getTimeZone();\n String userLocation = status.getUser().getLocation();\n String time = tweetTime();\n\n makeJson(userId,userName,messageTweet,imageUrl, lang, timeZone, userLocation, time);\n \n}", "@Override\r\n public void onScrubGeo(long arg0, long arg1) {\n\r\n }", "@Override\r\n public void onScrubGeo(long arg0, long arg1) {\n\r\n }", "public void printVenueCharges (Event _event) {\n\t}", "@Override\r\n public void onStatusUpdate(String arg0, int arg1, String arg2) {\n\r\n }", "public void A_noChangeInLocation(ListOfParameterLists parameterLists){\n ParameterList paramList = parameterLists.getFirst();\n String ts =\"\";\n try {\n Track eventInstance = (Track) paramList.getEventInstance();\n\t ts = (String) paramList.getObject(\"TimeStamp\");\n if(debug)\n System.out.println(\"TEST show the timestamp\"+ts);\n }\n\t catch (Exception e) {\n\t }\n\n\n\n if(debug)\n System.out.println(\"Action_Rule5 :: No update on track-\"+trackNumber+\" for 1 minutes.\");\n analystLogger.log (\" \");\n analystLogger.log (\"Alert for \"+trackNumber);\n analystLogger.log (\"No change in location of \"+trackNumber+\" for \"+TrackUtilities.printTimeValue (Constant.NO_CHANGE_IN_LOCATION_FOR_X_MINS) +\" form \"+ts);\n\n\n Constant.alertOutput.println (\" \");\n Constant.alertOutput.println (\"Alert for \"+trackNumber);\n Constant.alertOutput.println (\"No change in location of \"+trackNumber+\" for \"+TrackUtilities.printTimeValue (Constant.NO_CHANGE_IN_LOCATION_FOR_X_MINS) +\" form \"+ts);\n Constant.alertOutput.flush ();\n\n\n\n // Future Plan for Rule5\n // Add code to alert analyst here\n }", "void rsvp(int eventId, String rsvp);", "public void addUsersAtVenueListener(String venueName, double latitude, double longitude, double radius) {\r\n\tStatusListener listener = new StatusListener() { \r\n\t\t@Override public void onStatus(Status status) {\r\n\t\t\t// If the shutdown time is after the current time, record the tweet, otherwise close the connection\r\n\t\t\tif (Calendar.getInstance().getTime().before( shutdownTime.getTime() )) {\r\n\t\t\t\ttweets.add(status);\t\t\r\n\t\t\t} else {\r\n\t\t\t\tLOGGER.log(Level.FINE, \"Shutting down Twitter stream..\");\r\n\t\t\t\tclearLists();\r\n\t\t\t\tshutdown = true;\r\n\t\t\t\ttwitterStream.shutdown();\r\n\t\t\t}\r\n\t\t} \r\n\t\t@Override public void onDeletionNotice(StatusDeletionNotice statusDeletionNotice) {} \r\n\t\t@Override public void onTrackLimitationNotice(int numberOfLimitedStatuses) {} \r\n\t\t@Override public void onScrubGeo(long userId, long upToStatusId) {} \r\n\t\t@Override public void onStallWarning(StallWarning warning) {}\r\n\t\t@Override public void onException(Exception ex) { ex.printStackTrace(); }\r\n\t\t};\r\n\t\ttwitterStream.addListener(listener);\r\n\r\n\t\tint count = 0;\r\n\t\tlong[] idToFollow = null; \r\n\t\tString[] stringsToTrack = null;\r\n\t\tdouble[][] locationsToTrack = null;\r\n\t\t\r\n\t\t// If a geolocation is given, calculate the bounding box for that location and use as a filter,\r\n\t\t// otherwise listen for tweets that contain the venue name\r\n\t\tif (!Double.isNaN(latitude) && !Double.isNaN(longitude) && !Double.isNaN(radius)) {\r\n\t\t\t// Calculate geo bounding box from lat/lon coordinates and radius\r\n\t\t\tdouble oneKmDeg = 90/10001.965729;\r\n\t\t\tdouble radiusAdjustDeg = oneKmDeg*radius;\r\n\t\t\tdouble lat1 = latitude - radiusAdjustDeg;\r\n\t\t\tdouble lon1 = longitude - radiusAdjustDeg;\r\n\t\t\tdouble lat2 = latitude + radiusAdjustDeg;\r\n\t\t\tdouble lon2 = longitude + radiusAdjustDeg;\r\n\t\t\tlocationsToTrack = new double[][]{{lon1, lat1}, {lon2, lat2}};\r\n\t\t} else {\r\n\t\t\tstringsToTrack = new String[]{venueName};\r\n\t\t}\t\t\t\t\r\n\t\ttwitterStream.filter(new FilterQuery(count, idToFollow, stringsToTrack, locationsToTrack));\r\n\t}", "public void printStatus();", "protected void onGetWaterHeaterStatus(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}", "void inProcessing(String statusMsg);", "@Override\n public void onStatus(Status status) {\n // The EventBuilder is used to build an event using the headers and\n // the raw JSON of a tweet\n // shouldn't log possibly sensitive customer data\n //logger.debug(\"tweet arrived\");\n\n headers.put(\"timestamp\",String.valueOf(status.getCreatedAt().getTime()));\n\n Event event1;\n event1 = EventBuilder.withBody(TwitterObjectFactory.getRawJSON(status).getBytes(),headers);\n //event2 = EventBuilder.withBody(Integer.toString(status.getRetweetCount()),(Charset)headers);\n //event3 = EventBuilder.withBody(status.getText().getBytes(), headers);\n channel.processEvent(event1);\n //channel.processEvent(event2);\n\n }", "public void Print_event_value(String v)\n {\n\n System.out.println(v + \": \" + event_value);\n }", "public void onScrubGeo(long arg0, long arg1) { }", "void mo9949a(StatusListener eVar);", "@Override\r\n public void onGpsStatusChanged(int event) {\n\r\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n Log.e(\"i m in Broadcast recive\", \"i m in Broadcast recive\");\n Double latitude = intent.getDoubleExtra(\"latitude\",0.0);\n Double longitude = intent.getDoubleExtra(\"longitude\",0.0);\n int pendingPoints = intent.getIntExtra(\"pendingPoints\",0);\n String timeStamp = intent.getStringExtra(\"lastUpdated\");\n boolean isBulkUpload = intent.getBooleanExtra(\"isBulkUpload\",false);\n\n\n textViewLastUpdatedTime.setText(\"Last Updated On: \"+timeStamp);\n textViewPointsCount.setText(\"Pending Points: \"+pendingPoints);\n if(getAddress(latitude,longitude).isEmpty()){\n textview_tracking_updates.setText(\"Updating Details: \\n\"+latitude+\" / \"+longitude );\n }else{\n textview_tracking_updates.setText(\"Updating Details: \\n\\nLast Updated Location is : \"+getAddress(latitude,longitude));\n }\n\n\n }", "public void addUserVenuesListener(long userId) {\r\n\tStatusListener listener = new StatusListener() { \r\n\t\t@Override public void onStatus(Status status) {\r\n\t\t\t// If the shutdown time is after the current time, record the tweet, otherwise close the connection\r\n\t\t\tif (Calendar.getInstance().getTime().before( shutdownTime.getTime() )) {\r\n\t\t\t\ttweets.add(status);\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tLOGGER.log(Level.FINE, \"Shutting down Twitter stream..\");\r\n\t\t\t\tclearLists();\r\n\t\t\t\tshutdown = true;\r\n\t\t\t\ttwitterStream.shutdown();\r\n\t\t\t}\r\n\t\t} \r\n\t\t@Override public void onDeletionNotice(StatusDeletionNotice statusDeletionNotice) {} \r\n\t\t@Override public void onTrackLimitationNotice(int numberOfLimitedStatuses) {} \r\n\t\t@Override public void onScrubGeo(long userId, long upToStatusId) {} \r\n\t\t@Override public void onStallWarning(StallWarning warning) {}\r\n\t\t@Override public void onException(Exception ex) { ex.printStackTrace(); }\r\n\t\t};\r\n\t\ttwitterStream.addListener(listener);\r\n\t\t\r\n\t\t// Filter the listener to tweets from the given user\r\n\t\tint count = 0;\r\n\t\tlong[] idToFollow = new long[1];\r\n\t\tidToFollow[0] = userId; \r\n\t\tString[] stringsToTrack = null;\r\n\t\tdouble[][] locationsToTrack = null;\r\n\t\ttwitterStream.filter(new FilterQuery(count, idToFollow, stringsToTrack, locationsToTrack));\r\n\t}", "private static void printOp(User u){\n\t\tSystem.out.println(\"Hello \"+u.getUserName()+\", type:\\n\"\n\t\t\t\t + \"- request\\n\"\n\t\t\t\t\t+ \"- confirm\\n\"\n\t\t\t\t\t+ \"- search\\n\"\n\t\t\t\t\t+ \"- post\\n\"\n\t\t\t\t\t+ \"- follow\\n\"\n\t\t\t\t\t+ \"- listPosts\\n\"\n\t\t\t\t\t+ \"- listFriends\\n\"\n\t\t\t\t\t+ \"- listRequests\\n\"\n\t\t\t\t\t+ \"- listFollowed\\n\"\n\t\t\t\t\t+ \"- logout\");\n\t}", "@Override\r\n\tpublic String getCpQueryStatusLine(int asCuu) {\r\n\t\treturn String.format(\"TAPE %03X ON TAPE %03X\", asCuu, asCuu);\r\n\t}", "@Override\r\n\tprotected void processTakeout() {\n\r\n\t}", "@Override\r\n\tprotected void processTakeout() {\n\r\n\t}", "@Override\n public void onReceiveLocation(BDLocation location) {\n if (null != location && location.getLocType() != BDLocation.TypeServerError) {\n StringBuffer sb = new StringBuffer(256);\n sb.append(\"time : \");\n /**\n * 时间也可以使用systemClock.elapsedRealtime()方法 获取的是自从开机以来,每次回调的时间;\n * location.getTime() 是指服务端出本次结果的时间,如果位置不发生变化,则时间不变\n */\n sb.append(location.getTime());\n sb.append(\"\\nlocType : \");// 定位类型\n sb.append(location.getLocType());\n sb.append(\"\\nlocType description : \");// *****对应的定位类型说明*****\n sb.append(location.getLocTypeDescription());\n sb.append(\"\\nlatitude : \");// 纬度\n sb.append(location.getLatitude());\n sb.append(\"\\nlontitude : \");// 经度\n sb.append(location.getLongitude());\n sb.append(\"\\nradius : \");// 半径\n sb.append(location.getRadius());\n sb.append(\"\\nCountryCode : \");// 国家码\n sb.append(location.getCountryCode());\n sb.append(\"\\nCountry : \");// 国家名称\n sb.append(location.getCountry());\n sb.append(\"\\ncitycode : \");// 城市编码\n sb.append(location.getCityCode());\n sb.append(\"\\ncity : \");// 城市\n sb.append(location.getCity());\n sb.append(\"\\nDistrict : \");// 区\n sb.append(location.getDistrict());\n sb.append(\"\\nStreet : \");// 街道\n sb.append(location.getStreet());\n sb.append(\"\\naddr : \");// 地址信息\n sb.append(location.getAddrStr());\n sb.append(\"\\nUserIndoorState: \");// *****返回用户室内外判断结果*****\n sb.append(location.getUserIndoorState());\n sb.append(\"\\nDirection(not all devices have value): \");\n sb.append(location.getDirection());// 方向\n sb.append(\"\\nlocationdescribe: \");\n sb.append(location.getLocationDescribe());// 位置语义化信息\n sb.append(\"\\nPoi: \");// POI信息\n if (location.getPoiList() != null && !location.getPoiList().isEmpty()) {\n for (int i = 0; i < location.getPoiList().size(); i++) {\n Poi poi = (Poi) location.getPoiList().get(i);\n sb.append(poi.getName() + \";\");\n }\n }\n if (location.getLocType() == BDLocation.TypeGpsLocation) {// GPS定位结果\n sb.append(\"\\nspeed : \");\n sb.append(location.getSpeed());// 速度 单位:km/h\n sb.append(\"\\nsatellite : \");\n sb.append(location.getSatelliteNumber());// 卫星数目\n sb.append(\"\\nheight : \");\n sb.append(location.getAltitude());// 海拔高度 单位:米\n sb.append(\"\\ngps status : \");\n sb.append(location.getGpsAccuracyStatus());// *****gps质量判断*****\n sb.append(\"\\ndescribe : \");\n sb.append(\"gps定位成功\");\n } else if (location.getLocType() == BDLocation.TypeNetWorkLocation) {// 网络定位结果\n // 运营商信息\n if (location.hasAltitude()) {// *****如果有海拔高度*****\n sb.append(\"\\nheight : \");\n sb.append(location.getAltitude());// 单位:米\n }\n sb.append(\"\\noperationers : \");// 运营商信息\n sb.append(location.getOperators());\n sb.append(\"\\ndescribe : \");\n sb.append(\"网络定位成功\");\n } else if (location.getLocType() == BDLocation.TypeOffLineLocation) {// 离线定位结果\n sb.append(\"\\ndescribe : \");\n sb.append(\"离线定位成功,离线定位结果也是有效的\");\n\n } else if (location.getLocType() == BDLocation.TypeServerError) {\n sb.append(\"\\ndescribe : \");\n sb.append(\"服务端网络定位失败,可以反馈IMEI号和大体定位时间到loc-bugs@baidu.com,会有人追查原因\");\n } else if (location.getLocType() == BDLocation.TypeNetWorkException) {\n sb.append(\"\\ndescribe : \");\n sb.append(\"网络不同导致定位失败,请检查网络是否通畅\");\n\n } else if (location.getLocType() == BDLocation.TypeCriteriaException) {\n sb.append(\"\\ndescribe : \");\n sb.append(\"无法获取有效定位依据导致定位失败,一般是由于手机的原因,处于飞行模式下一般会造成这种结果,可以试着重启手机\");\n }\n// logMsg(sb.toString());\n slatitude = String.valueOf(location.getLatitude());\n Log.i(\"slatitude::::\", slatitude);\n slongitude = String.valueOf(location.getLongitude());\n Log.i(\"slongitude::::\", slongitude);\n sname = String.valueOf(location.getAddrStr());\n Log.i(\"sname::::\", sname);\n UserLocationInfo.myAddress = location.getAddrStr();\n UserLocationInfo.myLatitude = location.getLatitude();\n UserLocationInfo.myLongitude = location.getLongitude();\n UserLocationInfo.myCity = location.getCity();\n UserLocationInfo.cityCode = location.getCityCode();\n UserLocationInfo.altitude = location.getAltitude();\n }\n }", "@Override\n public void onLocationChanged(Location location) {\n\n clientlat = location.getLatitude();\n clientlon = location.getLongitude();\n System.out.println(\"latitude is \"+clientlat);\n System.out.println(\"longitude is \"+clientlon);\n }", "@Override\n\t\tpublic void run() {\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tLog.d(\"location\",\"location now\"+lat+\" \"+lng);\n\t\t\t\n\t\t\tMessage myMessage = new Message();\n\t\t\tBundle databundle = new Bundle();\n\t\t\tdatabundle.putBoolean(\"delete\", true);\n\t\t\tmyMessage.setData(databundle);\n\t\t\t\n\t\t\thandler.sendMessage(myMessage);\t\n\t\t}", "@Test\n public void testNear()\n {\n String sName = \"near-client-listener\";\n generateEvents(sName);\n checkEvents(true, false);\n }", "void onStatusUpdate(int status);", "private void getStatus() {\n\t\t\n\t}", "private void handleDump(IndentingPrintWriter pw) {\n if (mNetworkLoggingNotificationUserId != UserHandle.USER_NULL) {\n pw.println(\"mNetworkLoggingNotificationUserId: \" + mNetworkLoggingNotificationUserId);\n }\n }", "protected String getStatus()\n { return call_state; \n }", "Long getUserUpdated();", "@Override\n\t\tpublic void onStatusChanged(String provider, int status, Bundle extras) {\n\t\t\tSystem.out.println(status);\n\t\t}", "void asyncEventPing();", "public static void main(String[] args) throws TwitterException, IOException {\n\t\tfinal long count = 10;\n\n\t\t// Twitter Conf.\n\t\tConfigurationBuilder cb = new ConfigurationBuilder();\n\t\tcb.setDebugEnabled(true).setOAuthConsumerKey(CONSUMER_KEY)\n\t\t\t\t.setOAuthConsumerSecret(CONSUMER_SECRET)\n\t\t\t\t.setOAuthAccessToken(ACCESS_KEY)\n\t\t\t\t.setOAuthAccessTokenSecret(ACCESS_SECRET);\n\n\t\tfinal TwitterStream twitterStream = new TwitterStreamFactory(cb.build())\n\t\t\t\t.getInstance();\n\n\t\tStatusListener listener = new StatusListener() {\n\t\t\tprivate long counter = 0;\n\n\t\t\t@Override\n\t\t\tpublic void onStatus(Status status) {\n//\t\t\t\tSystem.out.println(status.getUser().getName());\n//\t\t\t\twriter.println(TwitterObjectFactory.getRawJSON(status)+\",\");\n\t\t\t\tTweet tweet = new Tweet(status);\n\t\t\t\ttry {\n\t\t\t\t\tHBaseHelper.put(tweet);\n\t\t\t\t} catch (IOException | JSONException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcounter++;\n\t\t\t\tSystem.out.println(counter);\n//\t\t\t\tif (counter >= count) {\n//\t\t\t\t\ttwitterStream.shutdown();\n//\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onDeletionNotice(\n\t\t\t\t\tStatusDeletionNotice statusDeletionNotice) {\n\t\t\t\t// System.out.println(statusDeletionNotice.toString());\n\t\t\t\t// System.out.println(\"Got a status deletion notice id:\" +\n\t\t\t\t// statusDeletionNotice.getStatusId());\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onTrackLimitationNotice(int numberOfLimitedStatuses) {\n\t\t\t\tSystem.out.println(\"Got track limitation notice:\"\n\t\t\t\t\t\t+ numberOfLimitedStatuses);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onScrubGeo(long userId, long upToStatusId) {\n\t\t\t\tSystem.out.println(\"Got scrub_geo event userId:\" + userId\n\t\t\t\t\t\t+ \" upToStatusId:\" + upToStatusId);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onStallWarning(StallWarning warning) {\n\t\t\t\tSystem.out.println(\"Got stall warning:\" + warning);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onException(Exception ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t};\n\t\ttwitterStream.addListener(listener);\n\t\tFilterQuery fq = new FilterQuery();\n\t\tString keywords[] = { \"#nosql\" };\n\t\tfq.track(keywords);\n\n\t\ttwitterStream.sample();\n\t}", "public static void analyzeEventsQueriesAmounts() throws SQLException\r\n\t{\r\n\t\tStatement stat = conn.createStatement();\r\n \r\n ResultSet result = stat.executeQuery(\"SELECT * FROM fraud.afm_fraudeventrecord;\");\r\n \r\n while (result.next())\r\n {\r\n \tString event = result.getString(\"eventType\");\r\n \tString user = result.getString(\"userId\");\r\n \t\r\n \tif (\r\n \t\t\t(event.contains(\"LOAD\"))\r\n \t&& \t\t(user.equals(\"user40\"))\r\n \t\t\t\r\n \t\t\t){\r\n \tSystem.out.print(new Date(result.getInt(\"timestamp\")));\r\n \tSystem.out.print(\" User : \" + user);\r\n \tSystem.out.print(\" Event : \" + event);\r\n \t\r\n \tString recordId = result.getString(\"fraudScoreRecordId\");\r\n \t\r\n \tif (recordId != null)\r\n \t{\r\n \t\tStatement stat2 = conn.createStatement();\r\n \t\tResultSet s = stat2.executeQuery(\"SELECT * FROM fraud.afm_fraudscorerecord where recordId='\"+recordId+\"';\");\r\n \t\twhile (s.next())\r\n \t\t{\r\n \t\t\tSystem.out.print(\" Query Type: \" + s.getString(\"queryType\"));\r\n \t\t\tSystem.out.print(\" Amount: \" + s.getDouble(\"transactionAmount\"));\r\n \t\t}\r\n \t}\r\n \t\r\n \t\r\n \tSystem.out.println();\r\n \t} \t\r\n }\r\n stat.close();\r\n\t}", "@Override\n\tpublic void onStatusChanged(String provider, int status,Bundle extras){\n\t\tLog.i(\"gps\", \"Provider Status: \" + status);\n\t}", "com.google.speech.logs.timeline.InputEvent.Event getEvent();", "public static void main(String[] args) {\n\n User me = new User(\"Elliot Hogg\", \"08/08/1992\", \"elliothogg@live.com\", \"07548377122\");\n Establishment e1 = new Establishment(\"Wembley Arena\", \"1 Wembley Road\", \"WM1 4AS\", 90000);\n\n Event ev1 = new Event(me, LocalDateTime.now(), 2, e1);\n\n System.out.println(ev1.getEventInfo());\n System.out.println();\n System.out.println(ev1.getPartyNumber());\n System.out.println(ev1.getEstablishment());\n System.out.println(ev1.getEventTime());\n System.out.println(ev1.getEventDate());\n System.out.println(ev1.getUser());\n }", "private static void checkStatus() {\n\r\n\t\tDate date = new Date();\r\n\t\tSystem.out.println(\"Checking at :\"+date.toString());\r\n\t\tString response = \"\";\r\n\t\ttry {\r\n\t\t\tresponse = sendGET(GET_URL_COVAXIN);\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\t//System.out.println(response.toString());\r\n\t\tArrayList<Map> res = formatResponse(response);\r\n\r\n\t\tres = checkAvailability(res);\r\n\t\tif(res.size()>0)\r\n\t\t\tnotifyUser(res);\r\n\t\t//System.out.println(emp.toString());\r\n\t}", "void print_statistics(long tot_arrived, long tot_processed, Double end_time){\n\n CloudEvent cloudEvent = new CloudEvent();\n CloudletEvent cletEvent = new CloudletEvent();\n PrintFile print = new PrintFile();\n\n\n // System response time & throughput\n\n float system_response_time = (float)(sum_service_times1_clet+ sum_service_times1_cloud + sum_service_times2_clet+ sum_service_times2_cloud)/ tot_processed;\n float response_time_class1 = (float) ((sum_service_times1_clet+ sum_service_times1_cloud)/ (completition_clet_type1 + completition_cloud_type1));\n float response_time_class2 = (float) ((sum_service_times2_clet+ sum_service_times2_cloud)/ (completition_clet_type2 + completition_cloud_type2));\n\n float lambda_tot = (float) (tot_arrived/end_time);\n float lambda_1 = (float)((arrival_type1_clet+arrival_type1_cloud)/end_time);\n float lambda_2 = (float)((arrival_type2_clet+arrival_type2_cloud)/end_time);\n\n\n // per-class effective cloudlet throughput\n\n float task_rate_clet1 = (float) ((float)completition_clet_type1 / end_time);\n float task_rate_clet2 = (float) ((float)completition_clet_type2 / end_time);\n\n\n // per-class cloud throughput\n\n float lambda_cloud1 = (float) ((arrival_type1_cloud)/end_time);\n float lambda_cloud2 = (float) ((arrival_type2_cloud)/end_time);\n\n\n // class response time and mean population\n\n float response_time_cloudlet = (float) (sum_service_times1_clet+ sum_service_times2_clet)/ (completition_clet_type1 + completition_clet_type2);\n float response_time_cloudlet1 = (float) sum_service_times1_clet/ completition_clet_type1;\n float response_time_cloudlet2 = (float) (sum_service_times2_clet/ completition_clet_type2);\n\n float response_time_cloud = (float) ((sum_service_times1_cloud+ sum_service_times2_cloud)/ (completition_cloud_type1 + completition_cloud_type2));\n float response_time_cloud1 = (float) (sum_service_times1_cloud/ completition_cloud_type1);\n float response_time_cloud2 = (float) (sum_service_times2_cloud/ completition_cloud_type2);\n\n // E[N] cloudlet\n float mean_cloudlet_jobs = cletEvent.mean_cloudlet_jobs_number();\n // E[N] class 1 cloudlet\n float mean_cloudlet_jobs1 = cletEvent.mean_cloudlet_jobs_number1();\n // E[N] class 2 cloudlet\n float mean_cloudlet_jobs2 = cletEvent.mean_cloudlet_jobs_number2();\n\n // E[N] cloud\n float mean_cloud_jobs = cloudEvent.mean_cloud_jobs_number();\n // E[N] class 1 cloud\n float mean_cloud_jobs1 = cloudEvent.mean_cloud_jobs_number1();\n // E[N] class 2 cloud\n float mean_cloud_jobs2 = cloudEvent.mean_cloud_jobs_number2();\n\n\n // Altre statistiche di interesse\n\n float lambda_clet = (float) ((arrival_type1_clet+ arrival_type2_clet)/end_time);\n float lambda_clet1 = (float) ((arrival_type1_clet)/end_time);\n float lambda_clet2 = (float) ((arrival_type2_clet)/end_time);\n float lambda_cloud = (float) ((arrival_type1_cloud+ arrival_type2_cloud)/end_time);\n\n double rate1_clet = mean_cloudlet_jobs1*0.45;\n double rate2_clet = mean_cloudlet_jobs2*0.27;\n\n\n\n NumberFormat numForm = NumberFormat.getInstance();\n numForm.setMinimumFractionDigits(6);\n numForm.setMaximumFractionDigits(6);\n numForm.setRoundingMode(RoundingMode.HALF_EVEN);\n\n\n System.out.println(\"\\n\\n\\n 1) SYSTEM RESPONSE TIME & THROUGHPUT \" + \"(GLOBAL & PER-CLASS)\");\n\n System.out.println(\"\\n Global System response time ...... = \" + numForm.format( system_response_time));\n System.out.println(\" Response time class 1 ...... = \" + numForm.format( response_time_class1));\n System.out.println(\" Response time class 2 ...... = \" + numForm.format( response_time_class2));\n\n System.out.println(\"\\n Global System throughput ...... = \" + numForm.format( lambda_tot));\n System.out.println(\" Throughput class 1 ...... = \" + numForm.format( lambda_1));\n System.out.println(\" Throughput class 2 ...... = \" + numForm.format( lambda_2));\n\n\n System.out.println(\"\\n\\n\\n 2) PER_CLASS EFFECTIVE CLOUDLET THROUGHPUT \");\n System.out.println(\" Task-rate cloudlet class 1 ...... = \" + numForm.format( rate1_clet));\n System.out.println(\" Task-rate cloudlet class 2 ...... = \" + numForm.format( rate2_clet));\n\n\n System.out.println(\"\\n\\n\\n 3) PER_CLASS CLOUD THROUGHPUT \");\n System.out.println(\" Throughput cloud class 1 ...... = \" + numForm.format( lambda_cloud1));\n System.out.println(\" Throughput cloud class 2 ...... = \" + numForm.format( lambda_cloud2));\n\n\n System.out.println(\"\\n\\n\\n 4) CLASS RESPONSE TIME & MEAN POPULATION \" + \"(CLOUDLET & CLOUD)\");\n\n System.out.println(\"\\n Response Time class 1 cloudlet ...... = \" + numForm.format( response_time_cloudlet1));\n System.out.println(\" Response Time class 2 cloudlet ...... = \" + numForm.format(response_time_cloudlet2));\n System.out.println(\" Response Time class 1 cloud ...... = \" + numForm.format( response_time_cloud1));\n System.out.println(\" Response Time class 2 cloud ...... = \" + numForm.format( response_time_cloud2));\n\n System.out.println(\"\\n Mean Population class 1 cloudlet ...... = \" + numForm.format( mean_cloudlet_jobs1));\n System.out.println(\" Mean Population class 2 cloudlet ...... = \" + numForm.format( mean_cloudlet_jobs2));\n System.out.println(\" Mean Population class 1 cloud ...... = \" + numForm.format( mean_cloud_jobs1));\n System.out.println(\" Mean Population class 2 cloud ...... = \" + numForm.format( mean_cloud_jobs2));\n\n }", "@Override\n\tpublic void onStatusUpdate(String arg0, int arg1, String arg2) {\n\t}", "private void responseMonitor(List<User> returnedUsers, User returnedUserFromEdit){\n String USER_NAME= returnedUserFromEdit.getName();\n String USER_EMAIL = returnedUserFromEdit.getEmail();\n Long UserID = returnedUserFromEdit.getId();\n Toast.makeText(this,getString(R.string.returned)+ USER_NAME+ \" , \"+ USER_EMAIL+\" , \"+ UserID,Toast.LENGTH_LONG).show();\n }", "public void processSurveyAck( UserSurvey userSurvey,String status);", "@Test\n public void testNearBack()\n {\n String sName = \"near-back-listener\";\n generateEvents(sName);\n checkEvents(false, true);\n BackingMapListener.INSTANCE.assertContext();\n }", "public void printStatus(){\n System.out.println();\n System.out.println(\"Status: \");\n System.out.println(currentRoom.getLongDescription());\n currentRoom.printItems();\n System.out.println(\"You have made \" + moves + \" moves so far.\");\n }", "@Override\n public void onScrubGeo(long arg0, long arg1) {\n }", "@Override\r\n\t\t\tpublic void onScrubGeo(long arg0, long arg1) {\n\r\n\t\t\t}", "private static void debugMessage(GuildMessageReceivedEvent event) {\n String preface = \"[Discord IDs] \";\n\n System.out.println(\"====== PING COMMAND ======\");\n System.out.println(preface + \"`!ping` SENDER:\");\n System.out.println(\n \"\\t{USER} ID: \" + event.getAuthor().getId() +\n \"\\tName: \" + event.getMember().getEffectiveName() +\n \" (\" + event.getAuthor().getAsTag() + \")\");\n\n System.out.println(preface + \"BOT ID:\\t\" + event.getJDA().getSelfUser().getId());\n System.out.println(preface + \"GUILD ID:\\t\" + event.getGuild().getId());\n\n System.out.println(preface + \"ROLES:\");\n event.getGuild().getRoles().forEach(role -> {\n System.out.println(\"\\t{ROLES} ID: \" + role.getId() + \"\\tName: \" + role.getName());\n });\n\n System.out.println(preface + \"MEMBERS:\");\n event.getGuild().getMembers().forEach(member -> {\n System.out.println(\n \"\\t{MEMEBERS} ID: \" + member.getUser().getId() +\n \"\\tName: \" + member.getEffectiveName() +\n \" (\" + member.getUser().getAsTag() + \")\");\n });\n\n System.out.println(preface + \"Categories:\");\n event.getGuild().getCategories().forEach(category -> {\n System.out.println(\"\\t{CATEGORY} ID: \" + category.getId() + \"\\tName: \" + category.getName());\n category.getChannels().forEach(guildChannel -> {\n System.out.println(\n \"\\t\\t:\" + guildChannel.getType().name().toUpperCase() + \":\" +\n \"\\tID: \" + guildChannel.getId() +\n \"\\tName: \" + guildChannel.getName() +\n \"\\tlink: \" + \"https://discord.com/channels/\" + Settings.GUILD_ID + \"/\" + guildChannel.getId());\n });\n });\n System.out.println(\"==== PING COMMAND END ====\");\n }", "@Override\n public void onOffportRequestCompleted(int requestId) {\n\n }", "public void sampleInvestigate ()\r\n {\r\n Query query = new Query(\"Hawker\");\r\n query.setCount(100);\r\n query.setGeoCode(new GeoLocation(1.423844, 103.776921), 5, Query.MILES);\r\n query.setSince(\"2016-12-1\");\r\n try {\r\n QueryResult result = twitter.search(query);\r\n System.out.println(\"Count : \" + result.getTweets().size()) ;\r\n for (Status tweet : result.getTweets()) {\r\n System.out.println(\"@\"+tweet.getUser().getName()+ \": \" + tweet.getText()); \r\n }\r\n } \r\n catch (TwitterException e) {\r\n e.printStackTrace();\r\n } \r\n System.out.println(); \r\n }", "public void onReportSunny(View view) {\n Location userLoc = LocationServices.FusedLocationApi.getLastLocation(\n MapsActivity.mGoogleApiClient);\n\n new AsyncPostRequest().execute(userLoc.getLatitude(), userLoc.getLongitude(), 0.0);\n }", "@Override\r\n\t\tpublic void onStatus(Map<String, Object> arg0) {\n\t\t\tSystem.out.println(\"Method createMeetiong status: \" + arg0);\r\n\t\t}", "@Override\r\n public void status(String strVar)\r\n {\r\n System.out.println(strVar);\r\n }", "public Long getEventID()\n/* */ {\n/* 111 */ return this.eventID;\n/* */ }", "public void testEventStatusFilter(final String programName) throws ParseException;", "private static void logEvent(Object ev, boolean uiEvent) {\n String bus;\n if (uiEvent) {\n bus = \"UI_BUS\";\n } else {\n bus = \"BUS\";\n }\n if (verbose) {\n Log.i(LOG_TAG, \"posting \" + ev.getClass().getSimpleName() + \" of type \" + ev.getClass().getAnnotation(Event.class).type() + \" on \" + bus);\n }\n }", "@Override\n\tpublic void onScrubGeo(long arg0, long arg1) \n\t{\n\t}", "public String updateGpsStatus(int event, GpsStatus status) {\n StringBuilder sb2 = new StringBuilder(\"\");\n if (status == null) {\n sb2.append(\"0\");\n } else if (event == 4) {\n int maxSatellites = status.getMaxSatellites();\n Iterator<GpsSatellite> it = status.getSatellites().iterator();\n this.numSatelliteList.clear();\n int count = 0;\n int calibration = 0;\n while (it.hasNext() && count <= maxSatellites) {\n GpsSatellite s = (GpsSatellite) it.next();\n if (s.getSnr() != 0.0f) {\n Log.e(\"getSnr\", \" 信噪比\" + s.getSnr());\n this.numSatelliteList.add(s);\n count++;\n if (s.getSnr() > 35.0f) {\n calibration++;\n }\n }\n }\n sb2.append(this.numSatelliteList.size());\n }\n if (this.numSatelliteList.size() > 3) {\n if (isAdded()) {\n this.iv_gps.setBackground(getResources().getDrawable(R.drawable.gps_on));\n this.gps_count.setTextColor(getResources().getColor(android.R.color.white));\n }\n } else if (isAdded()) {\n this.iv_gps.setBackground(getResources().getDrawable(R.drawable.gps_off));\n this.gps_count.setTextColor(getResources().getColor(android.R.color.holo_red_dark));\n }\n this.gps_count.setText(this.numSatelliteList.size() + \"\");\n return sb2.toString();\n }", "private void updateAccountStatus() {\n\r\n }", "@Override\n\t\tpublic void onScrubGeo(long arg0, long arg1) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void onScrubGeo(long arg0, long arg1) {\n\t\t\t\n\t\t}", "@Override\n public void onStatusChange(int status) {\n }", "@Override\n public String getServiceEventCod() {\n return \"userphone.locate\";\n }", "private void geofenceTriggeredMessageToMaps(List<String> geofenceEnterTransitionDetails, int geofenceTransition) {\n // Send the geofence trigger message to the GMaps fragment\n for (String id : geofenceEnterTransitionDetails) {\n Intent intent;\n // Check if the other user is now local (enter or dwell triggers) or no longer local (exit trigger)\n if(geofenceTransition == Geofence.GEOFENCE_TRANSITION_ENTER ||\n geofenceTransition == Geofence.GEOFENCE_TRANSITION_DWELL) {\n // Send details to GMapFragment to display local user\n intent = new Intent(getString(R.string.geofence_enter_trigger));\n }\n else {\n // Send details to GMapFragment to remove user\n intent = new Intent(getString(R.string.geofence_exit_trigger));\n }\n intent.putExtra(Constants.geofenceUserId, id);\n LocalBroadcastManager.getInstance(this).sendBroadcast(intent);\n }\n }", "public void filterRequestStatus(String _status) {\n\t\tsleep(3);\n\t\tclickByJavaScript(By.xpath(\".//*[@id='projection-management']/div[1]/div[6]/span[1]/span[1]/span[2]/span[1]\"));\n\t\tsleep(1);\n\t\tclickOnElement(driver.findElement(By.xpath(\".//li[@data-offset-index = '\"+_status+\"']\")));\t\t\n\t}", "public static void logRealtimeInventoryCheckInfo(NMProfile profile, NMCommerceItem item, int stocklevel, boolean isOldCheckout) {\r\n \r\n try {\r\n String pipe = \"|\";\r\n \r\n StringBuffer message = new StringBuffer();\r\n \r\n message.append(\"REQUESTED INVENTORY UNAVAILABLE:[\");\r\n \r\n message.append(\"TIME:\" + (new SimpleDateFormat(\"MM-dd-yyyy HH:mm:ss\")).format(Calendar.getInstance().getTime()));\r\n message.append(pipe);\r\n \r\n DynamoHttpServletRequest request = ServletUtil.getCurrentRequest();\r\n if (request != null) {\r\n message.append(\"USER-AGENT:\" + request.getHeader(\"User-Agent\"));\r\n message.append(pipe);\r\n if (request.getSession() != null) {\r\n message.append(\"SESSION:\" + request.getSession().getId());\r\n message.append(pipe);\r\n }\r\n }\r\n \r\n if (profile != null) {\r\n message.append(\"PROFILE:\" + profile.getRepositoryId());\r\n message.append(pipe);\r\n }\r\n \r\n if (item != null) {\r\n message.append(\"PRODUCT:\" + item.getProductId());\r\n message.append(pipe);\r\n \r\n message.append(\"PRODUCT_NAME:\" + item.getProduct().getDisplayName());\r\n message.append(pipe);\r\n \r\n message.append(\"CMOS_ID:\" + item.getCmosCatalogId() + \"_\" + item.getCmosItemCode());\r\n message.append(pipe);\r\n \r\n message.append(\"SKU:\" + item.getSkuNumber());\r\n message.append(pipe);\r\n \r\n message.append(\"REQUESTED:\" + item.getQuantity());\r\n message.append(pipe);\r\n \r\n message.append(\"AVAILABLE:\" + stocklevel);\r\n message.append(pipe);\r\n }\r\n \r\n if (isOldCheckout) {\r\n message.append(\"VERSION:Ajax\");\r\n } else {\r\n message.append(\"VERSION:Responsive\");\r\n }\r\n message.append(pipe);\r\n \r\n message.append(\"SITE:\" + CommonComponentHelper.getSystemSpecs().getProductionSystemCode());\r\n \r\n message.append(\"]\");\r\n \r\n CommonComponentHelper.getLogger().info(message.toString());\r\n \r\n } catch (Exception e) {\r\n // should never occur, but this is short order, so to ensure no issues within checkout catch all issues.\r\n System.out.println(\"Unexpected error while logging LogginUtil#logRealtimeInventoryCheckInfo \" + e.getMessage());\r\n }\r\n \r\n }", "private void handleGeofenceStatus(Context context, Intent intent) {\n\n }", "@Override\n\tpublic void onScrubGeo(long arg0, long arg1) {\n\t\t\n\t}", "public String _setuser(b4a.HotelAppTP.types._user _u) throws Exception{\n_types._currentuser.username = _u.username;\n //BA.debugLineNum = 168;BA.debugLine=\"Types.currentuser.password = u.password\";\n_types._currentuser.password = _u.password;\n //BA.debugLineNum = 169;BA.debugLine=\"Types.currentuser.available = u.available\";\n_types._currentuser.available = _u.available;\n //BA.debugLineNum = 170;BA.debugLine=\"Types.currentuser.ID = u.ID\";\n_types._currentuser.ID = _u.ID;\n //BA.debugLineNum = 171;BA.debugLine=\"Types.currentuser.TypeOfWorker = u.TypeOfWorker\";\n_types._currentuser.TypeOfWorker = _u.TypeOfWorker;\n //BA.debugLineNum = 172;BA.debugLine=\"Types.currentuser.CurrentTaskID = u.CurrentTaskID\";\n_types._currentuser.CurrentTaskID = _u.CurrentTaskID;\n //BA.debugLineNum = 173;BA.debugLine=\"End Sub\";\nreturn \"\";\n}", "private void location(String[] command) {\n\t\tSystem.out\n\t\t\t\t.println(\"Sending last known location information via Twitter.\");\n\t\tTwitterComm.sendDirectMessage(Constants.AUTH_USER,\n\t\t\t\tConstants.CH_LOCATIONTEXT + \"\\n\"\n\t\t\t\t\t\t+ Alfred.getLocation().toString());\n\t}", "@Override\n\tpublic void doPostStatus(LoginDetails loginDetails) {\n\t\tSystem.out.println(\"Boomer post status\");\t\n\t\t\t\n\t}", "private void handleGeofenceStatus(Context context, Intent intent) {\n }", "@Override\n\t\tpublic void onReceiveLocation(BDLocation arg0) {\n\t\t\tlat = \"\" + arg0.getLatitude();\n\t\t\tlon = \"\" + arg0.getLongitude();\n\t\t\tSystem.out.println(\"lat ---> \" + lat);\n\t\t\tSystem.out.println(\"lon ---> \" + lon);\n\t\t\tlocationService.unregisterListener(mListener); // 注销掉监听\n\t\t\tlocationService.stop(); // 停止定位服务\n\t\t\t// System.out.println(\"des ---> \" + describe);\n\t\t\t// System.out.println(\"error ---> \" + arg0.getLocType());\n\t\t\t// System.out.println(\"District ---> \" + arg0.getDistrict());\n\t\t\t// System.out.println(\"Street ---> \" + arg0.getStreet());\n\t\t\t// System.out.println(\"getStreetNumber ---> \" +\n\t\t\t// arg0.getStreetNumber());\n\t\t\t// System.out.println(\"address ---> \" +\n\t\t\t// arg0.getAddress().streetNumber);\n\t\t\t// System.out.println(\"addressStr ---> \" + arg0.getAddrStr());\n\t\t\t// System.out.println(\"getBuildingID ---> \" + arg0.getBuildingID());\n\t\t\t// System.out.println(\"getBuildingName ---> \" +\n\t\t\t// arg0.getBuildingName());\n\t\t\t// System.out.println(\"getFloor ---> \" + arg0.getFloor());\n\t\t}", "@Override\r\n\t\tpublic void processTask(TaskEventProcessor taskEvent,Users WindowUser) {\n\t\t\tSystem.out.println(productType);\r\n\t\t\tSystem.out.println(\"Task\" + taskEvent.getUserID());\r\n\t\t\tSystem.out.println(\" WindowUser \" + WindowUser.getId());\r\n\t\t}", "@Override\n\t\t\t\tpublic void onResponse(String arg0) {\n\t\t\t\t\tSystem.out.println(arg0);\n\t\t\t\t\t\n\t\t\t\t}", "public static void captureAddressInformation(){\r\n\t\ttestInfo.log(Status.INFO, \"Capture Address Information\");\r\n\t\tIWanna.selectFromDropdown(\"ddStatus\", red.getCellData(\"TestData\", \"ResStatus\", currentRow));\r\n\t\tIWanna.type(\"tbResidentialLine1\", red.getCellData(\"TestData\", \"ResLine1\", currentRow));\r\n\t\tIWanna.type(\"tbResidentialLine2\", red.getCellData(\"TestData\", \"ResLine2\", currentRow));\r\n\t\tIWanna.type(\"tbResidentialSuburb\", red.getCellData(\"TestData\", \"ResSuburb\", currentRow));\r\n\t\tIWanna.click(\"btnSearchResidentialSuburb\");\r\n\t\tIWanna.wait(1);\r\n\t\tIWanna.selectFromDropdown(\"ddResidentialSuburb\", 1);\t\r\n\t\tIWanna.type(\"tbResidentialCity\", red.getCellData(\"TestData\", \"ResCity\", currentRow));\r\n\t\tIWanna.click(\"btnResidentialCitySearch\");\r\n\t\tIWanna.selectFromDropdown(\"ddResidentialCity\", 1);\r\n\t\tIWanna.type(\"tbYYatThisAddress\", red.getCellData(\"TestData\", \"PeriodYY\", currentRow));\r\n\t\tIWanna.type(\"tbMMatThisAddress\", red.getCellData(\"TestData\", \"PeriodMM\", currentRow));\r\n\t\t\r\n\t\tString sameAsPostal = red.getCellData(\"TestData\", \"SameAsPostal\", currentRow);\r\n\t\tif (sameAsPostal.equalsIgnoreCase(\"Yes\")){\r\n\t\t\tIWanna.click(\"rbSameAsPostalYes\");\r\n\t\t}\r\n\t\telse if(sameAsPostal.equalsIgnoreCase(\"No\")){\r\n\t\t\tIWanna.type(\"tbPostalLine1\", red.getCellData(\"TestData\", \"PostalLine1\", currentRow));\r\n\t\t\tIWanna.type(\"tbPostalLine2\", red.getCellData(\"TestData\", \"PostalLine2\", currentRow));\r\n\t\t\tIWanna.type(\"tbPostalSuburb\", red.getCellData(\"TestData\", \"PostalSuburb\", currentRow));\r\n\t\t\tIWanna.click(\"btnSearchPostalSuburb\");\r\n\t\t\tIWanna.selectFromDropdown(\"ddPostalSuburb\", 1);\t\r\n\t\t\tIWanna.type(\"tbPostalCity\", red.getCellData(\"TestData\", \"PostalCity\", currentRow));\r\n\t\t\tIWanna.click(\"btnSearchPostalCity\");\r\n\t\t\tIWanna.selectFromDropdown(\"ddPostalCity\", 1);\r\n\t\t}\r\n\t}", "private void dumpEvent(MotionEvent event) {\n String names[] = {\"DOWN\", \"UP\", \"MOVE\", \"CANCEL\", \"OUTSIDE\", \"POINTER_DOWN\", \"POINTER_UP\", \"7?\", \"8?\", \"9?\"};\n StringBuilder sb = new StringBuilder();\n int action = event.getAction();\n int actionCode = action & MotionEvent.ACTION_MASK;\n sb.append(\"event ACTION_\").append(names[actionCode]);\n\n if (actionCode == MotionEvent.ACTION_POINTER_DOWN || actionCode == MotionEvent.ACTION_POINTER_UP) {\n sb.append(\"(pid \").append(action >> MotionEvent.ACTION_POINTER_ID_SHIFT);\n sb.append(\")\");\n }\n\n sb.append(\"[\");\n for (int i = 0; i < event.getPointerCount(); i++) {\n sb.append(\"#\").append(i);\n sb.append(\"(pid \").append(event.getPointerId(i));\n sb.append(\")=\").append((int) event.getX(i));\n sb.append(\",\").append((int) event.getY(i));\n if (i + 1 < event.getPointerCount())\n sb.append(\";\");\n }\n\n\n\n }", "private void dumpEvent(MotionEvent event) \n {\n String names[] = { \"DOWN\", \"UP\", \"MOVE\", \"CANCEL\", \"OUTSIDE\",\"POINTER_DOWN\", \"POINTER_UP\", \"7?\", \"8?\", \"9?\" };\n StringBuilder sb = new StringBuilder();\n int action = event.getAction();\n int actionCode = action & MotionEvent.ACTION_MASK;\n sb.append(\"event ACTION_\").append(names[actionCode]);\n\n if (actionCode == MotionEvent.ACTION_POINTER_DOWN || actionCode == MotionEvent.ACTION_POINTER_UP) \n {\n sb.append(\"(pid \").append(action >> MotionEvent.ACTION_POINTER_ID_SHIFT);\n sb.append(\")\");\n }\n\n sb.append(\"[\");\n for (int i = 0; i < event.getPointerCount(); i++) \n {\n sb.append(\"#\").append(i);\n sb.append(\"(pid \").append(event.getPointerId(i));\n sb.append(\")=\").append((int) event.getX(i));\n sb.append(\",\").append((int) event.getY(i));\n if (i + 1 < event.getPointerCount())\n sb.append(\";\");\n }\n\n sb.append(\"]\");\n Log.d(\"Touch Events ---------\", sb.toString());\n }", "@Override\n\t\t\tpublic void onStatus(Status status) {\n\n\t\t\t\tUser user = status.getUser();\n\t\t\t\t/*String username = status.getUser().getName();// name\n\t\t\t\tString location = user.getLocation();// location\n\t\t\t\tString content = status.getText();// tweet\n\t\t\t\tint followers_count = status.getUser().getFollowersCount();\n\t\t\t\tint friends_count = status.getUser().getFriendsCount();\n\t\t\t\tDate created_at = status.getCreatedAt();\n\t\t\t\tlong retweet_count = status.getRetweetCount();*/\n\t\t\t\t\n\t\t\t\tentry = new BasicDBObject();\n\t\t\t\t\tentry.append(\"username\", status.getUser().getName());\n\t\t\t\t\tentry.append(\"location\", user.getLocation());\n\t\t\t\t\tentry.append(\"content\", status.getText());\n\t\t\t\t\tentry.append(\"followers_count\", status.getUser().getFollowersCount());\n\t\t\t\t\tentry.append(\"friends_count\", status.getUser().getFriendsCount());\n\t\t\t\t\tentry.append(\"created_at\", status.getCreatedAt());\n\t\t\t\t\tentry.append(\"retweet_count\", status.getRetweetCount());\n\t\t\t\t\tentry.append(\"lang\", status.getUser().getLang());\n\t\t\t\t\tcollection.insert(entry);\n\t\t\t\t\t//System.out.println(\"name\");\n\t\t\t\t\tentry=null;\n\t\t\t\t\t\n\t\t\t}", "@Test\n public void testReplicatedBm()\n {\n generateEvents(\"repl-bm-test\");\n checkEvents(false, true);\n BackingMapListener.INSTANCE.assertContext();\n }", "public void onReportWeakRain(View view) {\n Location userLoc = LocationServices.FusedLocationApi.getLastLocation(\n MapsActivity.mGoogleApiClient);\n\n new AsyncPostRequest().execute(userLoc.getLatitude(), userLoc.getLongitude(), 1.0);\n }", "String getStatusMessage( );", "public void onReportStrongRain(View view) {\n Location userLoc = LocationServices.FusedLocationApi.getLastLocation(\n MapsActivity.mGoogleApiClient);\n\n new AsyncPostRequest().execute(userLoc.getLatitude(), userLoc.getLongitude(), 2.0);\n }", "private void getUserInfo() {\n\t}", "public String toString()\n {\n return this.getGeoEvent().toString();\n }", "void track(String sender, String additionalInfo);", "@Override\n\t\t\t\t\t\t\tpublic void status(HBCIPassport passport, int statusTag, Object[] o) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "public static void main(String[] args) throws UnknownHostException, IOException\n\t{\n\t\t Socket clientSocket = new Socket(\"localhost\", 6789);\n\t\t clientSocket.setSoTimeout(5000);\n\n\t\t DataOutputStream outToServer = new DataOutputStream(clientSocket.getOutputStream());\n\t\t BufferedReader inFromServer = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));\n\t\t outToServer.writeBytes(\"queryState\" + '\\n'); // warningClear , stopRequest, startRequest, queryState\n\t\t String clientMess = inFromServer.readLine();\n\t\t System.out.println(\"FROM SERVER: \" + clientMess);\n\t\t clientSocket.close();\n\t\t String mess = null;\n\t\t if(clientMess.equals(\"ON\"))\n\t\t {\n\t\t\t mess = \"stopRequest\";\n\t\t }\n\t\t else if(clientMess.equals(\"OFF\"))\n\t\t\t mess = \"startRequest\";\n\t\t Socket clientSocket2 = new Socket(\"localhost\", 6789);\n\t\t DataOutputStream outToServer2 = new DataOutputStream(clientSocket2.getOutputStream());\n\t\t BufferedReader inFromServer2 = new BufferedReader(new InputStreamReader(clientSocket2.getInputStream()));\n\t\t outToServer2.writeBytes(mess + '\\n'); // warningClear , stopRequest, startRequest, queryState\n\t\t System.out.println(\"FROM SERVER: \" +inFromServer2.readLine() );\n\t\t clientSocket2.close();\n\t\t \n\t}", "protected void trackLoginStatus(String ipAddress, String username, int status) {\n\t\tJdbcTemplate template = new JdbcTemplate( dataSource);\n\t\tString sql = \"INSERT INTO login_track_tbl (ip_address, login_status, username) VALUES (?,?,?)\";\n\t\t\n\t\ttemplate.update(sql, new Object[] { ipAddress, status, username });\n\t}", "public void OnRtcLiveApplyLine(String strPeerId, String strUserName, String strBrief);", "private void handleGeofenceError(Context context, Intent intent) {\n String msg = intent.getStringExtra(GeofenceUtils.EXTRA_GEOFENCE_STATUS);\n Log.e(GeofenceUtils.APPTAG, msg);\n Toast.makeText(context, msg, Toast.LENGTH_LONG).show();\n }", "@Override\n\t\tpublic void onMapStatusChange(MapStatus arg0) {\n\n\t\t}", "public void onBattleMessage(BattleMessageEvent e) {\n//\t\tSystem.out.println(\"Msg> \" + e.getMessage());\n\t}", "@Override\n\tpublic void onEvent() {\n\t\tSystem.out.println(\"Performing callback after synchronous task!\");\n\t}", "@Override\n public void addStatusEvent(Status status) {\n }" ]
[ "0.802064", "0.6498152", "0.6488317", "0.6488317", "0.5682672", "0.5285626", "0.52141947", "0.52141947", "0.51991636", "0.5192433", "0.50765204", "0.5069035", "0.50390375", "0.50322455", "0.5021028", "0.49935672", "0.4987066", "0.4949546", "0.49289227", "0.48988494", "0.48872834", "0.4879072", "0.48645106", "0.48361725", "0.48232114", "0.4822341", "0.4822341", "0.481316", "0.48101503", "0.48026806", "0.48011652", "0.48009464", "0.4799643", "0.47862667", "0.47820193", "0.4776541", "0.47637627", "0.47604162", "0.47553355", "0.4745629", "0.4742343", "0.47310346", "0.4719188", "0.4713974", "0.47073722", "0.47061586", "0.4696267", "0.46894252", "0.4687023", "0.46862873", "0.46638474", "0.46590602", "0.46551365", "0.46510157", "0.46482202", "0.4644849", "0.4641109", "0.4634539", "0.46298662", "0.46206954", "0.4618148", "0.46175757", "0.46160868", "0.46063727", "0.45965397", "0.45965397", "0.4595294", "0.4594314", "0.45917654", "0.4588903", "0.45855355", "0.45814946", "0.4579311", "0.45699263", "0.45666504", "0.45597237", "0.45559445", "0.4554682", "0.45517087", "0.45476627", "0.45457253", "0.45442834", "0.45396218", "0.453686", "0.4536599", "0.45347264", "0.45338017", "0.45332077", "0.4532921", "0.4531866", "0.45289928", "0.4525881", "0.45243606", "0.452314", "0.45229828", "0.45222405", "0.45194447", "0.45188627", "0.4515856", "0.4515231" ]
0.6229998
4
If your preview can change or rotate, take care of those events here. Make sure to stop the preview before resizing or reformatting it.
private void changeCalculatePreviewOrientation() { if (mHolder.getSurface() == null) { // preview surface does not exist Log.d(TAG, "Preview surface does not exist"); return; } // stop preview before making changes stopCamera(); int orientation = calculatePreviewOrientation(mCameraInfo, mDisplayOrientation); mCamera.setDisplayOrientation(orientation); startCamera(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {\n try {\n if (previewRunning)\n camera.stopPreview();\n\n Display display = ((WindowManager) getSystemService(WINDOW_SERVICE)).getDefaultDisplay();\n\n switch (display.getRotation()) {\n case Surface.ROTATION_0:\n camera.setDisplayOrientation(90);\n break;\n case Surface.ROTATION_90:\n camera.setDisplayOrientation(0);\n break;\n case Surface.ROTATION_180:\n camera.setDisplayOrientation(270);\n break;\n case Surface.ROTATION_270:\n camera.setDisplayOrientation(180);\n break;\n }\n\n camera.setPreviewDisplay(holder);\n camera.startPreview();\n previewRunning = true;\n } catch (Exception ignored) {\n }\n }", "public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {\n if (preview) {\n Cam.stopPreview();\n preview = false;\n }\n // stop preview before making changes\n try {\n mCamera.setPreviewDisplay(holder);\n setCameraDisplayOrientation(mCamera);\n mCamera.startPreview();\n preview = true;\n } catch (Exception e) {\n // ignore: tried to stop a non-existent preview\n Log.d(TAG, \"Error starting camera preview 1: \" + e.getMessage());\n\n }\n\n // set preview size and make any resize, rotate or\n // reformatting changes here\n // start preview with new settings\n }", "@Override\n\tpublic void componentResized(ComponentEvent e) {\n\t\tif (getSize().width < ACCESSORY_WIDTH && showAccessory) {\n\t\t\tsetAccessory(null);\n\t\t\tremovePropertyChangeListener(\n\t\t\t\t\tJFileChooser.SELECTED_FILE_CHANGED_PROPERTY, previewPanel);\n\n\t\t\tshowAccessory = false;\n\t\t\tvalidate();\n\t\t} else if (getSize().width > ACCESSORY_WIDTH && !showAccessory) {\n\t\t\tsetAccessory(previewPanel);\n\t\t\taddPropertyChangeListener(\n\t\t\t\t\tJFileChooser.SELECTED_FILE_CHANGED_PROPERTY, previewPanel);\n\n\t\t\t// fire an event that the selected file has changed to update the\n\t\t\t// preview image\n\t\t\tpreviewPanel.propertyChange(null);\n\n\t\t\tshowAccessory = true;\n\t\t\tvalidate();\n\t\t}\n\t}", "protected void previewStarted() {\n\n }", "@Override\n public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {\n Log.i(TAG, \"surface changed\");\n\n if (mHolder.getSurface() == null) {\n // preview surface does not exist\n return;\n }\n\n // stop preview before making changes\n try {\n mCamera.stopPreview();\n } catch (Exception e) {\n // ignore: tried to stop a non-existent preview\n }\n\n // start preview with new settings\n try {\n mCamera.setPreviewCallback(this);\n mCamera.setPreviewDisplay(mHolder);\n mCamera.startPreview();\n Log.i(TAG, \"surface changed\");\n } catch (Exception e) {\n Log.e(TAG, \"Error starting camera preview: \" + e.getMessage());\n }\n }", "public void surfaceChanged(SurfaceHolder holder, int format, int width,\n int height) {\n if(previewing){\n camera.stopPreview();\n previewing = false;\n }\n\n if (camera != null){\n try {\n camera.setPreviewDisplay(surfaceHolder);\n camera.startPreview();\n previewing = true;\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n }", "public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {\n\n if (mHolder.getSurface() == null){\n // preview surface does not exist\n return;\n }\n\n // stop preview before making changes\n try {\n \tCameraActivity.mCamera.stopPreview();\n } catch (Exception e){\n // ignore: tried to stop a non-existent preview\n }\n\n // set preview size and make any resize, rotate or\n // reformatting changes here\n\n // start preview with new settings\n try {\n \tCameraActivity.mCamera.setPreviewDisplay(mHolder);\n \tCameraActivity.mCamera.startPreview();\n } catch (Exception e){\n Log.d(TAG, \"Error starting camera preview: \" + e.getMessage());\n }\n }", "public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {\n\n if (mHolder.getSurface() == null){\n // preview surface does not exist\n return;\n }\n\n // stop preview before making changes\n try {\n mCamera.stopPreview();\n } catch (Exception e){\n // ignore: tried to stop a non-existent preview\n }\n\n // set preview size and make any resize, rotate or\n // reformatting changes here\n\n // start preview with new settings\n try {\n mCamera.setPreviewDisplay(mHolder);\n mCamera.startPreview();\n\n } catch (Exception e){\n Log.d(\"Preview\", \"Error starting camera preview: \" + e.getMessage());\n }\n }", "public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {\n if (mHolder.getSurface() == null){\n // preview surface does not exist\n return;\n }\n // stop preview before making changes\n try {\n mCamera.stopPreview();\n } catch (Exception e){\n // ignore: tried to stop a non-existent preview\n }\n // set preview size and make any resize, rotate or\n // reformatting changes here\n // start preview with new settings\n try {\n Camera.Parameters parameters = getOptimalPreviewSize(mCamera);\n \n this.setLayoutParams(getLayoutParams(parameters.getPreviewSize()));\n \n parameters.setFlashMode(Camera.Parameters.FLASH_MODE_AUTO);\n \n parameters.setWhiteBalance(Camera.Parameters.WHITE_BALANCE_AUTO);\n \n parameters.setFocusMode(Camera.Parameters.FOCUS_MODE_AUTO);\n\n mCamera.setDisplayOrientation(90);\n \n mCamera.setParameters(parameters);\n mCamera.setPreviewDisplay(mHolder);\n mCamera.startPreview();\n } catch (Exception e){\n Log.d(\"CameraView\", \"Error starting camera preview: \" + e.getMessage());\n }\n }", "void previewSized();", "@Override\n public void surfaceChanged(SurfaceHolder holder, int format, int width, int height)\n {\n this.setCameraParameters(mcCamera);\n\n if (mcCamera != null)\n mcCamera.startPreview();\n }", "public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {\n\n\t\tif (mHolder.getSurface() == null) {\n\t\t\t// preview surface does not exist\n\t\t\treturn;\n\t\t}\n\n\t\t// stop preview before making changes\n\t\ttry {\n\t\t\tmCamera.stopPreview();\n\t\t} catch (Exception e) {\n\t\t\t// camera does not exist or is not previewing\n\t\t}\n\n\t\t// Once rotation is enabled, code for that will go here\n\n\t\t// start preview with new settings\n\t\ttry {\n\t\t\tmCamera.setPreviewDisplay(mHolder);\n\t\t\tmCamera.startPreview();\n\n\t\t} catch (Exception e) {\n\t\t\tLog.d(VIEW_LOG_TAG,\n\t\t\t\t\t\"Error starting camera preview: \" + e.getMessage());\n\t\t}\n\t}", "@Override\n\tpublic void surfaceChanged(SurfaceHolder holder, int format, int width,\n\t\t\tint height) {\n\t\tLog.e(TAG,\"SurfaceChanged\");\n\t\ttry{\n\t\t\tif(mPreviewRunning){\n\t\t\t\tcamera.stopPreview();\n\t\t\t\tmPreviewRunning = false;\n\t\t\t}\n\t\t\t\n\t\t\tCamera.Parameters p = camera.getParameters();\n\t\t\tp.setPreviewSize(width,height);\n\t\t\t\n\t\t\tcamera.setParameters(p);\n\t\t\tcamera.setPreviewDisplay(holder);\n\t\t\tcamera.startPreview();\n\t\t\tmPreviewRunning = true;\n\t\t}catch(Exception e){\n\t\t\tLog.d(\"\",e.toString());\n\t\t}\n\t}", "@Override\n public void onCameraPreviewStopped() {\n }", "public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {\n\n\t\tif (mHolder.getSurface() == null){\n\t\t\t// preview surface does not exist\n\t\t\treturn;\n\t\t}\n\n\t\t// stop preview before making changes\n\t\ttry {\n\t\t\tmCamera.stopPreview();\n\t\t} catch (Exception e){\n\t\t\t// ignore: tried to stop a non-existent preview\n\t\t}\n\n\t\t// set preview size and make any resize, rotate or\n\t\t// reformatting changes here\n\n\t\t// start preview with new settings\n\t\ttry {\n\t\t\tmCamera.setPreviewDisplay(mHolder);\n\t\t\tCamera.Size size = getCameraPreviewSize(mCamera);\n\t\t\tCamera.Parameters params = setMaxCameraSize(mCamera);\n\t\t\tCamera.CameraInfo info = new Camera.CameraInfo();\n\t\t\tandroid.hardware.Camera.getCameraInfo(0, info);\n\t\t\tint rotation = this.getDisplay().getRotation();\n\t\t\tint degrees = 0;\n\t\t\tswitch (rotation) {\n\t\t\tcase Surface.ROTATION_0: degrees = 0; break;\n\t\t\tcase Surface.ROTATION_90: degrees = 90; break;\n\t\t\tcase Surface.ROTATION_180: degrees = 180; break;\n\t\t\tcase Surface.ROTATION_270: degrees = 270; break;\n\t\t\t}\n\n\t\t\tint result;\n\t\t\tif (info.facing == Camera.CameraInfo.CAMERA_FACING_FRONT) {\n\t\t\t\tresult = (info.orientation + degrees) % 360;\n\t\t\t\tresult = (360 - result) % 360; // compensate the mirror\n\t\t\t} else { // back-facing\n\t\t\t\tresult = (info.orientation - degrees + 360) % 360;\n\t\t\t}\n\t\t\tmCamera.setDisplayOrientation(result);\n\t\t\tparams.setRotation(result);\n\t\t\tparams.setPreviewSize(size.width, size.height);\n\t\t\tmCamera.setParameters(params);\n\t\t\tmCamera.startPreview();\n\t\t\tmCamera.autoFocus(null);\n\t\t} catch (Exception e){\n\n\t\t}\n\t}", "@Override\n public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {\n if (LOGGING) Log.d(LOG_TAG, \"surfaceChanged(\" + width + \", \" + height + \")\");\n mRenderCallback.onResized(width, height);\n }", "@Override\n public void surfaceChanged(\n SurfaceHolder holder, int format, int width, int height) {\n if (LOGGING) Log.d(LOG_TAG, \"surfaceChanged(\" + width + \", \" + height + \")\");\n mRenderCallback.onResized(width, height);\n }", "public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {\n\n if (this.holder.getSurface() == null){\n // preview surface does not exist\n return;\n }\n\n stopCamera();\n startCamera(holder);\n }", "@Override\n\t\t\tpublic void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {\n\t\t\t}", "private void controlResized() {\n disposeBackBuffer();\n initializeBackBuffer();\n\n redraw();\n }", "public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {\n\t\tCamera.Parameters parameters = camera.getParameters();\r\n\t\tList<Size> sizes = parameters.getSupportedPreviewSizes();\r\n\t\tSize optimalSize = getOptimalPreviewSize(sizes, w, h);\r\n\t\tparameters.setPreviewSize(optimalSize.width, optimalSize.height);\r\n\t\tcamera.setParameters(parameters);\r\n\t\tcamera.startPreview();\r\n\t\t\r\n\t\tCamera.Parameters p = camera.getParameters();\r\n\t\tint zoom = p.getZoomRatios().get(p.getZoom()).intValue();\r\n\t\tCamera.Size sz = p.getPreviewSize();\r\n\t\tdouble aspect = (double) sz.width / (double) sz.height;\r\n\t\tdouble thetaV = Math.toRadians(p.getVerticalViewAngle());\r\n\t\tdouble thetaH = 2d * Math.atan(aspect * Math.tan(thetaV / 2));\r\n\t\tthetaV = 2d * Math.atan(100d * Math.tan(thetaV / 2d) / zoom);\r\n\t\tthetaH = 2d * Math.atan(100d * Math.tan(thetaH / 2d) / zoom);\r\n\t\t\r\n\t\t\r\n\t\tvCameraAngle = Math.toDegrees(thetaH);\r\n\t}", "@Override\n public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {\n }", "@Override\n public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {\n if (holder.getSurface() == null) {\n Log.d(TAG, \"holder.getSurface() == null\");\n return;\n }\n\n mSurfaceHolder = holder;\n\n if (mPausing) {\n // We're pausing, the screen is off and we already stopped\n // video recording. We don't want to start the camera again\n // in this case in order to conserve power.\n // The fact that surfaceChanged is called _after_ an onPause appears\n // to be legitimate since in that case the lockscreen always returns\n // to portrait orientation possibly triggering the notification.\n return;\n }\n\n // The mCameraDevice will be null if it is fail to connect to the\n // camera hardware. In this case we will show a dialog and then\n // finish the activity, so it's OK to ignore it.\n if (mCameraDevice == null) {\n return;\n }\n\n // Set preview display if the surface is being created. Preview was\n // already started.\n if (holder.isCreating()) {\n setPreviewDisplay(holder);\n } else {\n restartPreview();\n }\n }", "@Override\r\n\t\tpublic void surfaceChanged(SurfaceHolder holder, int format, int width,\r\n\t\t\t\tint height) {\n\t\t\t\r\n\t\t}", "public void onPreviewStarted() {\n Log.w(TAG, \"KPI video preview started\");\n this.mAppController.setShutterEnabled(true);\n this.mAppController.onPreviewStarted();\n this.mUI.clearEvoPendingUI();\n if (this.mFocusManager != null) {\n this.mFocusManager.onPreviewStarted();\n }\n if (isNeedStartRecordingOnSwitching()) {\n onShutterButtonClick();\n }\n }", "@Override\r\n public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {\n }", "@Override\n public void surfaceChanged(SurfaceHolder holder, int format, int width,\n int height) {\n\n }", "@Override\r\n public void changedUpdate(DocumentEvent e) {\n HayCambio();\r\n }", "@Override\n public void surfaceChanged(SurfaceHolder holder, int format, int width,\n int height) {\n if (holder.getSurface() == null) {\n Log.d(TAG, \"holder.getSurface() == null\");\n return;\n }\n\n // We need to save the holder for later use, even when the mCameraDevice\n // is null. This could happen if onResume() is invoked after this\n // function.\n mSurfaceHolder = holder;\n\n // The mCameraDevice will be null if it fails to connect to the camera\n // hardware. In this case we will show a dialog and then finish the\n // activity, so it's OK to ignore it.\n if (mCameraDevice == null)\n return;\n\n // Sometimes surfaceChanged is called after onPause or before onResume.\n // Ignore it.\n if (mPausing || isFinishing())\n return;\n\n // Set preview display if the surface is being created. Preview was\n // already started. Also restart the preview if display rotation has\n // changed. Sometimes this happens when the device is held in portrait\n // and camera app is opened. Rotation animation takes some time and\n // display rotation in onCreate may not be what we want.\n if (mCameraState == PREVIEW_STOPPED) {\n startPreview();\n } else {\n if (Util.getDisplayRotation(this) != mDisplayRotation) {\n setDisplayOrientation();\n }\n if (holder.isCreating()) {\n // Set preview display if the surface is being created and\n // preview\n // was already started. That means preview display was set to\n // null\n // and we need to set it now.\n setPreviewDisplay(holder);\n }\n }\n\n // If first time initialization is not finished, send a message to do\n // it later. We want to finish surfaceChanged as soon as possible to let\n // user see preview first.\n if (!mFirstTimeInitialized) {\n mHandler.sendEmptyMessage(FIRST_TIME_INIT);\n } else {\n initializeSecondTime();\n }\n }", "@Override\r\n\tpublic void surfaceChanged(SurfaceHolder holder, int format, int width,\r\n\t\t\tint height) {\n\t\t\r\n\t}", "public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {\n refreshCamera();\n }", "@Override\n\tpublic void settings() {\n\t\tpreviewRect = WallGeometry.scaleRectangleRounded(WallGeometry.getInstance().getWallGeometry(), Preview.SCALE);\n\t\tsize(previewRect.width, previewRect.height, P3D);\n\t}", "@Override\r\n\tpublic void surfaceChanged(SurfaceHolder holder, int format, int width,\r\n\t\t\tint height) {\n\t\tif(myCamera!=null){\r\n\t\t\tCamera.Parameters parameters = myCamera.getParameters();//得到initial參數\r\n\t\t\tmyCamera.setParameters(parameters);\r\n\t\t\tmyCamera.startPreview();\r\n\t\t}\r\n\t}", "@Override\n\tpublic void surfaceChanged(SurfaceHolder holder, int format, int width,\n\t\t\tint height) {\n\t\t\n\t}", "@Override\n\tpublic void surfaceChanged(SurfaceHolder holder, int format, int width,\n\t\t\tint height) {\n\t\t\n\t}", "@Override\n\tpublic void surfaceChanged(SurfaceHolder holder, int format, int width,\n\t\t\tint height) {\n\t\t\n\t}", "protected void updatePreviewDisplayRotation(Size previewSize, TextureView textureView) {\n int rotationDegrees = 0;\n MCameraActivity activity = mCameraActivity;\n int displayRotation = activity.getWindowManager().getDefaultDisplay().getRotation();\n Configuration config = activity.getResources().getConfiguration();\n // Get UI display rotation\n switch (displayRotation) {\n case Surface.ROTATION_0:\n rotationDegrees = 0;\n break;\n case Surface.ROTATION_90:\n rotationDegrees = 90;\n break;\n case Surface.ROTATION_180:\n rotationDegrees = 180;\n break;\n case Surface.ROTATION_270:\n rotationDegrees = 270;\n break;\n }\n // Get device natural orientation\n int deviceOrientation = Configuration.ORIENTATION_PORTRAIT;\n if ((rotationDegrees % 180 == 0 &&\n config.orientation == Configuration.ORIENTATION_LANDSCAPE) ||\n ((rotationDegrees % 180 != 0 &&\n config.orientation == Configuration.ORIENTATION_PORTRAIT))) {\n deviceOrientation = Configuration.ORIENTATION_LANDSCAPE;\n }\n // Rotate the buffer dimensions if device orientation is portrait.\n int effectiveWidth = previewSize.getWidth();\n int effectiveHeight = previewSize.getHeight();\n if (deviceOrientation == Configuration.ORIENTATION_PORTRAIT) {\n effectiveWidth = previewSize.getHeight();\n effectiveHeight = previewSize.getWidth();\n }\n // Find and center view rect and buffer rect\n Matrix transformMatrix = textureView.getTransform(null);\n int viewWidth = textureView.getWidth();\n int viewHeight = textureView.getHeight();\n RectF viewRect = new RectF(0, 0, viewWidth, viewHeight);\n RectF bufRect = new RectF(0, 0, effectiveWidth, effectiveHeight);\n float centerX = viewRect.centerX();\n float centerY = viewRect.centerY();\n bufRect.offset(centerX - bufRect.centerX(), centerY - bufRect.centerY());\n // Undo ScaleToFit.FILL done by the surface\n transformMatrix.setRectToRect(viewRect, bufRect, Matrix.ScaleToFit.FILL);\n // Rotate buffer contents to proper orientation\n transformMatrix.postRotate((360 - rotationDegrees) % 360, centerX, centerY);\n if ((rotationDegrees % 180) == 90) {\n int temp = effectiveWidth;\n effectiveWidth = effectiveHeight;\n effectiveHeight = temp;\n }\n // Scale to fit view, cropping the longest dimension\n float scale =\n Math.max(viewWidth / (float) effectiveWidth, viewHeight / (float) effectiveHeight);\n transformMatrix.postScale(scale, scale, centerX, centerY);\n Handler handler = new Handler(Looper.getMainLooper());\n class TransformUpdater implements Runnable {\n TextureView mView;\n Matrix mTransformMatrix;\n\n TransformUpdater(TextureView view, Matrix matrix) {\n mView = view;\n mTransformMatrix = matrix;\n }\n\n @Override\n public void run() {\n mView.setTransform(mTransformMatrix);\n }\n }\n handler.post(new TransformUpdater(textureView, transformMatrix));\n }", "@Override\n public void surfaceDestroyed(SurfaceHolder holder) {\n stopPreview();\n }", "@Override\n\tpublic void surfaceChanged(SurfaceHolder holder, int format, int width,\n\t\t\tint height) {\n\n\t}", "public void onPreviewStarted() {\n if (!this.mPaused) {\n Log.w(TAG, \"KPI photo preview started\");\n this.mAppController.onPreviewStarted();\n this.mAppController.setShutterEnabled(true);\n this.mAppController.setShutterButtonLongClickable(this.mIsImageCaptureIntent ^ 1);\n this.mAppController.getCameraAppUI().enableModeOptions();\n this.mUI.clearEvoPendingUI();\n if (this.mEvoFlashLock != null) {\n this.mAppController.getButtonManager().enableButtonWithToken(0, this.mEvoFlashLock.intValue());\n this.mEvoFlashLock = null;\n }\n if (this.mCameraState == 7) {\n setCameraState(5);\n } else {\n setCameraState(1);\n }\n if (isCameraFrontFacing()) {\n this.mUI.setZoomBarVisible(false);\n } else {\n this.mUI.setZoomBarVisible(true);\n }\n if (this.mActivity.getCameraAppUI().isNeedBlur() || onGLRenderEnable()) {\n new Handler().postDelayed(new Runnable() {\n public void run() {\n PhotoModule.this.startFaceDetection();\n }\n }, 1500);\n } else {\n startFaceDetection();\n }\n BoostUtil.getInstance().releaseCpuLock();\n if (this.mIsGlMode) {\n this.mActivity.getCameraAppUI().hideImageCover();\n if (this.mActivity.getCameraAppUI().getBeautyEnable()) {\n this.mActivity.getCameraAppUI().getCameraGLSurfaceView().queueEvent(new Runnable() {\n public void run() {\n PhotoModule.this.mActivity.getButtonManager().setSeekbarProgress((int) PhotoModule.this.mActivity.getCameraAppUI().getBeautySeek());\n PhotoModule.this.updateBeautySeek(PhotoModule.this.mActivity.getCameraAppUI().getBeautySeek() / 20.0f);\n }\n });\n }\n if (this.mActivity.getCameraAppUI().getEffectEnable()) {\n this.mActivity.getCameraAppUI().getCameraGLSurfaceView().queueEvent(new Runnable() {\n public void run() {\n if (TextUtils.isEmpty(PhotoModule.this.mActivity.getCameraAppUI().getCurrSelect())) {\n BeaurifyJniSdk.preViewInstance().nativeDisablePackage();\n } else {\n BeaurifyJniSdk.preViewInstance().nativeChangePackage(PhotoModule.this.mActivity.getCameraAppUI().getCurrSelect());\n }\n }\n });\n }\n }\n }\n }", "@Override\r\n\tpublic void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {\n\t\tOnSurfaceChanged(holder.getSurface());\r\n\t}", "@Override\n\tpublic void onResize(int width, int height) {\n\t}", "@Override\r\n\tprotected void userDefinedViewUpdate() {\r\n\t\tvideoUtil.captureVideoImage();\r\n\t\tgetModel()._readFromViewAfterUpdate();\r\n\t}", "@Override\n protected void onSizeChanged(int w, int h, int oldw, int oldh) {\n super.onSizeChanged(w, h, oldw, oldh);\n viewMatrix = null;\n }", "public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {\n\t\t\tif (DEBUG>=2) Log.d(TAG, \"surfaceChange'd\");\n\t\t\ttry{\n\t\t\t\t// I found this on http://pastebin.com/06FunF5k and thought it may\n\t\t\t\t// be a benefit. \n\t\t\t\tif (SHOWING_PREVIEW) {\n\t\t\t\t\tSHOWING_PREVIEW = false;\n\t\t\t\t\tmCamera.stopPreview();\n\t\t\t\t}\n\n\t\t\t\tif (IS_PAUSING == NO) {\n\t\t\t\t\tCamera.Parameters p = mCamera.getParameters();\n\t\t\t\t\t\n\t\t\t\t\tCamera.Size s = p.getPreviewSize();\n\t\t\t\t\t//Log.d(TAG, \"fmt:\" + Integer.toString(p.getPreviewFormat()));\n\t\t\t\t\t\n\t\t\t\t\t//\t!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t\t\t//\t\tWHEN I CAUSED AN ARRAY OUT OF BOUNDS ERR HERE, ERROR BEING THROWN\n\t\t\t\t\t//\t\tCAUSED APP TO HANG ON THE \"Calibrating...\" MESSAGE JUST LIKE THE\n\t\t\t\t\t//\t\tMOTOROLA CAMERA PROBLEM.\n\t\t\t\t\t//\t!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t\t\t\n\t\t\t\t\tint PICTURE_FORMAT = ImageFormat.JPEG;\n\t List<Integer> piF = p.getSupportedPictureFormats();\n\t PICTURE_FORMAT = piF.get(0); // FIXME - use something like fr.get(fr[ fr.size() ])\n\t p.setPictureFormat(PICTURE_FORMAT);\n\t\t\t\t\t\n\t\t\t\t\tint PREVIEW_FORMAT = ImageFormat.JPEG;\n\t List<Integer> prF = p.getSupportedPreviewFormats();\n\t PREVIEW_FORMAT = prF.get(0); // FIXME - use something like fr.get(fr[ fr.size() ])\n\t p.setPreviewFormat(PREVIEW_FORMAT);\n\t\t\t\t\t\t \t\t\t\n\t\t\t\t\t// Set preview size for yuv - This must be set before p.setPreviewSize().\n\t\t\t\t\tview_w = s.width;\n\t\t\t\t\tview_h = s.height;\n\t \t\t\tp.setPreviewSize(w, h);\n\t\t\t\t\t\n\t\t\t\t\t// Set supported frame rate\n\t\t\t\t\tint FRAME_RATE = 1;\n\t List<Integer> fr = p.getSupportedPreviewFrameRates();\n\t \tFRAME_RATE = fr.get(0); // FIXME - use something like fr.get(fr[ fr.size() ])\n\t p.setPreviewFrameRate(FRAME_RATE);\n\t \n\t mCamera.setParameters(p);\n\n\t if (DEBUG>=2) Log.d(TAG, \"Starting preview\");\n\t\t\t\t\tSHOWING_PREVIEW = true;\n\t\t\t\t\tmCamera.startPreview();\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\t\t\t\n\t\t}", "@Override\n protected void onLayout(boolean changed, int l, int t, int r, int b) {\n\n int frameWidth = getWidth();\n int frameHeight = getHeight();\n int horizontalPadding = mPreviewHMarging;\n int verticalPadding = mPreviewVMarging;\n// FrameLayout f = mFrame;\n\n // Ignore the vertical paddings, so that we won't draw the frame on the\n // top and bottom sides\n int previewHeight = frameHeight - verticalPadding;\n int previewWidth = frameWidth - horizontalPadding;\n\n // resize frame and preview for aspect ratio\n if (previewHeight > previewWidth * mAspectRatio) {\n previewHeight = (int) (previewWidth * mAspectRatio + .5);\n } else {\n previewWidth = (int) (previewHeight / mAspectRatio + .5);\n }\n // limit the previewWidth large than minimalWidth\n if (previewWidth < mPreviewMinWidth){\n previewWidth = mPreviewMinWidth;\n previewHeight = (int)(previewWidth * mAspectRatio + .5);\n }\n\n frameWidth = previewWidth + mPreviewHMarging;\n frameHeight = previewHeight + mPreviewVMarging;\n\n int hSpace = ((r - l) - frameWidth) / 2;\n int vSpace = ((b - t) - frameHeight);\n\n // calc the tPads\n int tPads = 0;\n\n if (vSpace > 0) {\n // calc the bottom control bar width for special density\n int bottomHeight = 0;\n switch (mMetrics.densityDpi){\n case DisplayMetrics.DENSITY_HIGH:\n bottomHeight = mHdpiBottomHeight;\n break;\n case DisplayMetrics.DENSITY_MEDIUM:\n bottomHeight = mMdpiBottomHeight;\n break;\n case DisplayMetrics.DENSITY_LOW:\n bottomHeight = mMdpiBottomHeight * DisplayMetrics.DENSITY_LOW / DisplayMetrics.DENSITY_MEDIUM;\n break;\n case DisplayMetrics.DENSITY_XHIGH:\n bottomHeight = mHdpiBottomHeight * DisplayMetrics.DENSITY_XHIGH / DisplayMetrics.DENSITY_HIGH;\n break;\n default:\n bottomHeight = mHdpiBottomHeight * mMetrics.densityDpi / DisplayMetrics.DENSITY_HIGH;\n break;\n }\n\n int tmp = vSpace - bottomHeight;\n if (tmp > 0) {\n /*int cameraId = ((CameraActivity)mActivity).mCameraId;\n if (Compatible.instance().mIsIriverMX100 && cameraId == Const.CAMERA_FRONT){\n tPads = vSpace/2;\n }\n else if (!RotationUtil.calcNeedRevert(cameraId)) {\n //large-screen preview align with the up edge of control bar\n tPads = tmp;\n }\n else {*///small-screen preview vertical center the screen\n tPads = vSpace/2;\n //}\n }else {\n tPads = 0;\n }\n }\n if (mIsGifMode) { // GIF mode preview size is specified\n int width = (int) (mMetrics.widthPixels * 0.9);//(int)getResources().getDimension(R.dimen.gif_mode_preview_width);\n /*\n * FIX BUG: 5484\n * FIX COMMENT: some devices the width is larger than height,so these devices's ratio value is width divided height\n * DATE: 2013-12-05\n */\n double ratio = mAspectRatio;\n if(ratio < 1) {\n ratio = 1 / ratio;\n }\n int height = (int) (width * ratio);//(int)getResources().getDimension(R.dimen.gif_mode_preview_height);\n int frontPaddingTop = (int)getResources().getDimension(R.dimen.gif_mode_preview_padding_top);\n int backPaddingLeft = (mMetrics.widthPixels - width)/2;\n int backPaddingTop = frontPaddingTop - (height - width)/2;\n mFrame.measure(\n MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY),\n MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY));\n if (!mGifModeFrontCamera) {\n mFrame.layout(backPaddingLeft, backPaddingTop, width+backPaddingLeft, height+backPaddingTop);\n }else {\n mFrame.layout(0, frontPaddingTop, height, frontPaddingTop+width);\n }\n } else {\n mFrame.measure(\n MeasureSpec.makeMeasureSpec(frameWidth, MeasureSpec.EXACTLY),\n MeasureSpec.makeMeasureSpec(frameHeight, MeasureSpec.EXACTLY));\n mFrame.layout(l + hSpace, t + tPads, r - hSpace, b - vSpace + tPads);\n int[] layoutPars = new int[4];\n layoutPars[0] = l + hSpace;\n layoutPars[1] = t + tPads;\n layoutPars[2] = r - hSpace;\n layoutPars[3] = b - vSpace + tPads;\n setmFrameLayoutParas(layoutPars);\n }\n\n\n /*if (mFocus != null) {\n int size = mFocus.getWidth()/2;\n int x = mFocus.getTouchIndexX();\n int y = mFocus.getTouchIndexY();\n if ((x >= 0)&&( y >= 0)){\n // touchafaec mode\n mFocus.layout(x - size, y - size,x + size,y + size);\n }else{\n mFocus.setPosition(frameWidth/2, frameHeight/2);\n }\n }*/\n\n if (mSizeListener != null) {\n mSizeListener.onSizeChanged();\n }\n\n if (mIsRatioChanged) {/*\n mIsRatioChanged = false;\n if (mActivity instanceof CameraActivity){\n Handler handler = ((CameraActivity)mActivity).getHandler();\n// handler.sendEmptyMessage(Camera.MULTI_PIC_INITIALIZE);\n handler.sendEmptyMessage(Camera.UPDATE_SPLITE_LINE);\n if (Camera.mCurrentCameraMode == Camera.CAMERA_MODE_MAGIC_LENS\n || Camera.mCurrentCameraMode == Camera.CAMERA_MODE_PIP) {\n handler.sendEmptyMessage(Camera.RESTART_PREVIEW);\n }\n *//**\n * FIX BUG: 1348\n * FIX COMMENT: let layout adaptive.\n * DATE: 2012-07-30\n *//*\n Message message = new Message();\n message.what = Camera.UPDATE_REVIEW_EDIT_BAR_SIZE;\n message.arg1 = tPads;\n handler.handleMessage(message);\n }\n */}\n /*\n View view = mActivity.findViewById(R.id.top_menu_root);\n int topviewHeight = (view != null)?view.getHeight():0;\n // initialize the original top bar height\n if ((mInitTopBarHeight == 0) && (topviewHeight > 0)){\n mInitTopBarHeight = topviewHeight;\n }\n\n if (mInitTopBarHeight != 0) {\n // reset the height of top bar view\n\n int nHeight = 0;\n if (tPads > mInitTopBarHeight){\n nHeight = tPads;\n }\n else{\n nHeight = mInitTopBarHeight;\n }\n\n if (mActivity instanceof CameraActivity){\n Handler handler = ((CameraActivity)mActivity).getHandler();\n Message m = handler.obtainMessage(VideoCamera.RELAYOUT_TOP_BAR, nHeight, 0, null);\n handler.sendMessage(m);\n }else{\n ViewGroup.LayoutParams layoutParams = view.getLayoutParams();\n layoutParams.width = LayoutParams.FILL_PARENT;\n layoutParams.height = nHeight;\n view.setLayoutParams(layoutParams);\n }\n }\n */\n }", "@Override\r\npublic void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {\n\t\r\n}", "@Override\n protected void onDestroy() {\n super.onDestroy();\n if (mPreview != null) {\n mPreview.release();\n }\n }", "@Override\n protected void onDestroy() {\n super.onDestroy();\n if (mPreview != null) {\n mPreview.release();\n }\n }", "@Override\n protected void sizeChanged () {\n }", "private void onCameraModeChangedTo(int n) {\n Camera.Parameters parameters = this.mStateMachine.getCurrentCameraParameters(false);\n if (!(parameters != null && this.isHeadUpDesplayReady())) {\n return;\n }\n int n2 = parameters.getPreviewSize().width;\n int n3 = parameters.getPreviewSize().height;\n Rect rect = LayoutDependencyResolver.getSurfaceRect((Activity)this.mActivity, (float)n2 / (float)n3);\n PositionConverter.getInstance().setSurfaceSize(rect.width(), rect.height());\n PositionConverter.getInstance().setPreviewSize(n2, n3);\n this.mFocusRectangles.updateDevicePreviewSize(n2, n3);\n this.mFocusRectangles.clearExceptTouchFocus();\n switch (n) {\n default: {\n throw new IllegalArgumentException(\"ViewFinder.onCameraModeChangedTo():[INVALID]\");\n }\n case 1: {\n super.setupCapturingModeSelectorButton(BaseFastViewFinder.HeadUpDisplaySetupState.PHOTO_STANDBY);\n super.updateViewFinderCaptureAreaTouchEventHandling(this.mTouchCapture, BaseFastViewFinder.HeadUpDisplaySetupState.PHOTO_STANDBY);\n this.mSettingDialogStack.showShortcutTray();\n super.setupZoomBar(BaseFastViewFinder.HeadUpDisplaySetupState.PHOTO_STANDBY);\n break;\n }\n case 2: {\n super.setupCapturingModeSelectorButton(BaseFastViewFinder.HeadUpDisplaySetupState.VIDEO_RECORDING);\n super.updateViewFinderCaptureAreaTouchEventHandling(this.mTouchCapture, BaseFastViewFinder.HeadUpDisplaySetupState.VIDEO_STANDBY);\n this.mSettingDialogStack.showShortcutTray();\n super.setupZoomBar(BaseFastViewFinder.HeadUpDisplaySetupState.VIDEO_STANDBY);\n }\n }\n this.setOrientation(this.getOrientation());\n }", "public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {\n }", "@Override\r\n\tpublic void surfaceChanged(SurfaceHolder holder, int format, int width,\r\n\t\t\tint height) {\n\t\tLog.w(TAG, \"->> in surface chandeg\");\r\n\r\n\t}", "@Override\n\t\t\tpublic void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {\n\t\t\t\tviewState.set(ViewState.RESIZE);\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void onCameraViewStopped() {\n\n\t}", "protected void reshapeEditorLater() {\n reshapeEditor();\n SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n reshapeEditor();\n }\n });\n }", "void onPDFViewVisibilityChanged(int prevVisibility, int currVisibility);", "public void refresh() {\n\t\tif (render != null) render.cancel();\n\n\t\tif (preview != null) {\n\t\t\tneedsPreview = true;\n\n\t\t} else {\n\t\t\tpreview = new Iterator(transformations, plotter.get(), 100000, RESET_INTERVAL);\n\t\t\tneedsPreview = false;\n\n\t\t\tpreview.setOnSucceeded(event -> {\n\t\t\t\tshowImg(preview.getValue());\n\t\t\t\tpreview = null;\n\n\t\t\t\tif (needsPreview) {\n\t\t\t\t\trefresh(); // generate the next preview\n\t\t\t\t} else {\n\t\t\t\t\trender(1);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tpreview.threadRun();\n\t\t}\n\n\n\t}", "public void repaintImagePreviewPane(Graphics g) {\r\n\t\tGraphics2D g2d = (Graphics2D) g;\r\n\t\tg2d.setBackground(XONImageMaker.m_PanelColor);\r\n\t\tRectangle visibleRect = m_ThumbnailPane.getVisibleRect();\r\n\t\tDimension panelSize = new Dimension((int) visibleRect.getWidth(),\r\n\t\t\t\t(int) visibleRect.getHeight());\r\n\t\tg.clearRect(0, 0, panelSize.width, panelSize.height);\r\n\t\t// RGPTLogger.logToConsole(\"Panel Size: \"+panelSize);\r\n\t\tint panelWt = RGPTParams.getIntVal(\"ImageMakerEastPanelWidth\");\r\n\t\tint thumbImgWt = RGPTParams.getIntVal(\"ThumbviewImageWidth\");\r\n\t\tint thumbImgHt = RGPTParams.getIntVal(\"ThumbviewImageHeight\");\r\n\t\tint vGap = RGPTParams.getIntVal(\"ThumbviewVerticalGap\");\r\n\t\tint arc = RGPTParams.getIntVal(\"ThumbviewRoundRectArc\");\r\n\t\tint frameMargin = RGPTParams.getIntVal(\"FrameMargin\");\r\n\t\tif (THUMB_SCALED_IMAGE_MAKER_ICON == null) {\r\n\t\t\tTHUMB_SCALED_IMAGE_MAKER_ICON = ImageUtils.scaleImage(\r\n\t\t\t\t\tTHUMB_IMAGE_MAKER_ICON, thumbImgWt, thumbImgHt, true);\r\n\t\t\tTHUMB_SCALED_IMAGE_MAKER_ICON = ImageUtils.fillTransparentPixels(\r\n\t\t\t\t\tTHUMB_SCALED_IMAGE_MAKER_ICON, Color.WHITE);\r\n\t\t}\r\n\t\tBufferedImage thumbImg = THUMB_SCALED_IMAGE_MAKER_ICON;\r\n\t\tint y = vGap, w = thumbImg.getWidth(), h = thumbImg.getHeight();\r\n\t\tdouble x = (double) (panelSize.width - w) / (double) 2;\r\n\t\tif (m_ShowXONImagePane == SHOW_XON_ICON) {\r\n\t\t\tdrawImagePreview(g2d, thumbImg, x, y);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// if (m_ShowXONImagePane == SHOW_IMAGE_PANEL)\r\n\t\t// Displaying the main Image\r\n\t\tthumbImg = (BufferedImage) m_OrigImageHolder.m_ThumbviewImage;\r\n\t\ty = vGap;\r\n\t\tw = thumbImg.getWidth();\r\n\t\th = thumbImg.getHeight();\r\n\t\tx = (double) (panelSize.width - w) / (double) 2;\r\n\t\tRectangle imgRect = drawImagePreview(g2d, thumbImg, x, y);\r\n\r\n\t\t// Displaying the transformed images\r\n\t\tImageTransformHolder imtTransHldr = null;\r\n\t\tVector<ImageTransformHolder> imgTransHldrList = null;\r\n\t\timgTransHldrList = m_OrigImageHolder.m_ImageTransformHolder;\r\n\t\tfor (int i = 0; i < imgTransHldrList.size(); i++) {\r\n\t\t\timtTransHldr = imgTransHldrList.elementAt(i);\r\n\t\t\ty = (int) imgRect.height + vGap + 2 * frameMargin;\r\n\t\t\tthumbImg = imtTransHldr.m_ThumbPreviewImage;\r\n\t\t\tw = thumbImg.getWidth();\r\n\t\t\th = thumbImg.getHeight();\r\n\t\t\tx = (double) (panelSize.width - w) / (double) 2;\r\n\t\t\timgRect = drawImagePreview(g2d, thumbImg, x, y);\r\n\t\t\timtTransHldr.m_ScreenRect = imgRect;\r\n\t\t}\r\n\t}", "@Override\n\tpublic void onPreviewFrame(byte[] bytes, Camera camera) {\n\n\t}", "@Override\r\n\t\tpublic void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {\n\t\t\tUtils.printLog(\"mSubtiteHolder callback\", \"surfaceChanged\");\r\n\t\t}", "public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {\n Log.v(\"TAG\", \"----surfaceChanged-----\");\n\n if (mHolder.getSurface() == null) {\n // preview surface does not exist\n return;\n }\n\n }", "public void setupPreview() {\n Log.i(TAG, \"setupPreview\");\n this.mFocusManager.resetTouchFocus();\n if (this.mAppController.getCameraProvider().isBoostPreview()) {\n this.mActivity.clearBoost();\n }\n startPreview();\n }", "@Override\n \t\t\tpublic void inputChanged(Viewer viewer, Object oldInput, Object newInput) {\n \n \t\t\t}", "void onResized(int width, int height);", "@Override\n public void onSlideChanged() {\n }", "@SuppressLint(\"NewApi\")\n protected void updatePreview() {\n if(null == mCameraDevice) {\n Log.e(TAG, \"updatePreview error, return\");\n }\n\n mPreviewBuilder.set(CaptureRequest.CONTROL_MODE, CameraMetadata.CONTROL_MODE_AUTO);\n HandlerThread thread = new HandlerThread(\"CameraPreview\");\n thread.start();\n Handler backgroundHandler = new Handler(thread.getLooper());\n\n try {\n mPreviewSession.setRepeatingRequest(mPreviewBuilder.build(), null, backgroundHandler);\n } catch (CameraAccessException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "private void updateTransform() {\n Matrix matrix = new Matrix();\n float centerX = dataBinding.viewFinder.getWidth() / 2f;\n float centerY = dataBinding.viewFinder.getHeight() / 2f;\n int rotation = dataBinding.viewFinder.getDisplay().getRotation();\n int rotationDegrees = 0;\n switch (rotation) {\n case Surface.ROTATION_0:\n rotationDegrees = 0;\n break;\n case Surface.ROTATION_90:\n rotationDegrees = 90;\n break;\n case Surface.ROTATION_180:\n rotationDegrees = 180;\n break;\n case Surface.ROTATION_270:\n rotationDegrees = 270;\n break;\n default:\n }\n matrix.postRotate(-rotationDegrees, centerX, centerY);\n }", "public void pause() {\n // This must be safe to call multiple times.\n Util.validateMainThread();\n Log.d(TAG, \"pause()\");\n\n openedOrientation = -1;\n if (cameraInstance != null) {\n cameraInstance.close();\n cameraInstance = null;\n previewActive = false;\n }\n if (currentSurfaceSize == null && surfaceView != null) {\n SurfaceHolder surfaceHolder = surfaceView.getHolder();\n surfaceHolder.removeCallback(surfaceCallback);\n }\n if(currentSurfaceSize == null && textureView != null && Build.VERSION.SDK_INT >= 14) {\n textureView.setSurfaceTextureListener(null);\n }\n\n this.containerSize = null;\n this.previewSize = null;\n this.previewFramingRect = null;\n rotationListener.stop();\n\n fireState.previewStopped();\n }", "public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {\n\t\t}", "@Override\n public void onUpdated(Preview.PreviewOutput output){\n ViewGroup parent = (ViewGroup) textureView.getParent();\n parent.removeView(textureView);\n parent.addView(textureView, 0);\n\n textureView.setSurfaceTexture(output.getSurfaceTexture());\n updateTransform();\n }", "private void prepareDrawingSwiping() {\n if (controlView != null) {\n controlView.setVisibility(View.VISIBLE);\n controlSize = vertical ? controlView.getWidth() : controlView.getHeight();\n } else controlSize = Float.MAX_VALUE;\n }", "@Override\n\tpublic void editingStopped(ChangeEvent arg0) {\n\n\t}", "public String _base_resize(double _width,double _height) throws Exception{\n_cvs.Resize((float) (_width),(float) (_height));\n //BA.debugLineNum = 86;BA.debugLine=\"pnl.SetLayoutAnimated(0, 0, 0, Width, Height)\";\n_pnl.SetLayoutAnimated((int) (0),(int) (0),(int) (0),(int) (_width),(int) (_height));\n //BA.debugLineNum = 87;BA.debugLine=\"If thumb.IsInitialized = False Then CreateThumb\";\nif (_thumb.IsInitialized()==__c.False) { \n_createthumb();};\n //BA.debugLineNum = 88;BA.debugLine=\"CircleRect.Initialize(ThumbSize + stroke, ThumbSi\";\n_circlerect.Initialize((float) (_thumbsize+_stroke),(float) (_thumbsize+_stroke),(float) (_width-_thumbsize-_stroke),(float) (_height-_thumbsize-_stroke));\n //BA.debugLineNum = 89;BA.debugLine=\"xlbl.SetLayoutAnimated(0, CircleRect.Left, Circle\";\n_xlbl.SetLayoutAnimated((int) (0),(int) (_circlerect.getLeft()),(int) (_circlerect.getTop()),(int) (_circlerect.getWidth()),(int) (_circlerect.getHeight()));\n //BA.debugLineNum = 90;BA.debugLine=\"Draw\";\n_draw();\n //BA.debugLineNum = 91;BA.debugLine=\"End Sub\";\nreturn \"\";\n}", "@Override\n\tpublic void onTransformationEvent(TransformationEvent e)\n\t{\n\t\tthis.lastevent = e;\n\t\thandleObjects();\n\t}", "public static void OnPreviewKeyDown(Object sender, KeyEventArgs e) \r\n { \r\n if (e.Key != Key.ImeProcessed)\r\n { \r\n return;\r\n }\r\n\r\n RichTextBox richTextBox = sender as RichTextBox; \r\n\r\n if (richTextBox == null) \r\n { \r\n return;\r\n } \r\n\r\n TextEditor This = richTextBox.TextEditor;\r\n\r\n if (This == null || !This._IsEnabled || This.IsReadOnly || !This._IsSourceInScope(e.OriginalSource)) \r\n {\r\n return; \r\n } \r\n\r\n // Ignore repeated events generated when the key is hold down for long time \r\n if (e.IsRepeat)\r\n {\r\n return;\r\n } \r\n\r\n if (This.TextStore == null || \r\n This.TextStore.IsComposing) \r\n {\r\n return; \r\n }\r\n\r\n if (richTextBox.Selection.IsEmpty)\r\n { \r\n return;\r\n } \r\n\r\n This.SetText(This.Selection, String.Empty, InputLanguageManager.Current.CurrentInputLanguage);\r\n\r\n // NB: we do not handle the event. We want the IME to handle it.\r\n }", "@SuppressLint({\"NewApi\"})\n public void setUpPreview() {\n try {\n if (this.mPreview.getOutputClass() == SurfaceHolder.class) {\n boolean z = this.mShowingPreview && Build.VERSION.SDK_INT < 14;\n if (z) {\n this.mCamera.stopPreview();\n }\n this.mCamera.setPreviewDisplay(this.mPreview.getSurfaceHolder());\n if (z) {\n this.mCamera.startPreview();\n return;\n }\n return;\n }\n this.mCamera.setPreviewTexture((SurfaceTexture) this.mPreview.getSurfaceTexture());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "@Override\r\n\tpublic void surfaceChanged(SurfaceHolder holder, int format, int width,\r\n\t\t\tint height) {\n\t\tLog.v(LOGTAG, \"surfaceChanged Called\");\r\n\t}", "public void surfaceCreated(SurfaceHolder holder) {\n try {\n mCamera.setPreviewDisplay(mImageCapture.mSurfaceHolder);\n setCameraDisplayOrientationByCameraSelected();\n } catch (IOException e) {\n Log.d(TAG, \"Error setting camera preview: \" + e.getMessage());\n }\n }", "private void previewCapturedImage() {\n try {\n imageProfile.setVisibility(View.VISIBLE);\n Log.d(\"preview\", currentPhotoPath);\n final Bitmap bitmap = CameraUtils.scaleDownAndRotatePic(currentPhotoPath);\n imageProfile.setImageBitmap(bitmap);\n } catch (NullPointerException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void surfaceCreated(SurfaceHolder holder)\n {\n try\n {\n if (mCamera != null)\n {\n mCamera.setPreviewDisplay(holder);\n mCamera.setDisplayOrientation(90);\n }\n }\n catch (IOException e)\n {\n Log.e(\"ProfileCamera\", \"Error setting up preview display\", e);\n }\n }", "@Override\n public void keyPressed(KeyEvent e) {\n int code = e.getKeyCode();\n if ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0) {\n switch (code) {\n case KeyEvent.VK_V: // Ctrl-v or Ctrl-V\n System.out.println(\"-- CTRL-V\" );\n paste_image();\n viewer.repaint(); \n break;\n case KeyEvent.VK_I: // Ctrl-i or Ctrl-I\n viewer.BGImageInvert();\n break;\n case KeyEvent.VK_ADD:\n case KeyEvent.VK_PLUS: // Ctrl-+\n case KeyEvent.VK_PAGE_UP:\n viewer.BGImageContrastInc();\n break;\n case KeyEvent.VK_SUBTRACT:\n case KeyEvent.VK_MINUS: // Ctrl--\n case KeyEvent.VK_PAGE_DOWN:\n viewer.BGImageContrastDec();\n break;\n case KeyEvent.VK_HOME:\n viewer.BGImageBrighten();\n break;\n case KeyEvent.VK_END:\n viewer.BGImageDarken();\n break;\n default:\n }\n } else if ((e.getModifiers() & KeyEvent.SHIFT_MASK) != 0) {\n } else {\n switch (code) {\n case KeyEvent.VK_T: // top view\n mesh_z_angle = 0;\n mesh_x_angle = -90;\n perspective = false;\n viewer.repaint();\n break;\n case KeyEvent.VK_F: // front view\n mesh_z_angle = -90;\n mesh_x_angle = 0;\n perspective = false;\n viewer.repaint();\n break;\n case KeyEvent.VK_S: // side view\n mesh_z_angle = 0;\n mesh_x_angle = 0;\n perspective = false;\n viewer.repaint();\n break;\n case KeyEvent.VK_SPACE: // toggle edit mode\n if (mesh_edit_mode) {\n // dump part chords spec\n // String spec = current_part.name + \":\" + current_part.make_spec();\n // System.out.println(spec);\n }\n mesh_edit_mode = !mesh_edit_mode;\n break;\n case KeyEvent.VK_UP:\n case KeyEvent.VK_A: // so the left hand can press it\n mesh_edit_mode = true;\n mesh_active_chord++;\n mesh_active_chord %= current_part.mesh_LE.length;\n // handle up \n break;\n case KeyEvent.VK_DOWN:\n case KeyEvent.VK_Z: // so the left hand can press it\n mesh_edit_mode = true;\n mesh_active_chord += current_part.mesh_LE.length-1;\n mesh_active_chord %= current_part.mesh_LE.length;\n // handle down \n break;\n case KeyEvent.VK_LEFT:\n break;\n case KeyEvent.VK_RIGHT :\n break;\n default:\n }\n }\n }", "public void surfaceCreated(SurfaceHolder holder) {\n try {\n \tCamera.Parameters parameters = getOptimalPreviewSize(mCamera);\n \t\n \tthis.setLayoutParams(getLayoutParams(parameters.getPreviewSize()));\n \n parameters.setFlashMode(Camera.Parameters.FLASH_MODE_AUTO);\n \n parameters.setWhiteBalance(Camera.Parameters.WHITE_BALANCE_AUTO);\n \n parameters.setFocusMode(Camera.Parameters.FOCUS_MODE_AUTO);\n\n mCamera.setDisplayOrientation(90);\n \n mCamera.setParameters(parameters);\n mCamera.setPreviewDisplay(holder);\n mCamera.startPreview();\n } catch (IOException e) {\n Log.d(\"CameraView\", \"Error setting camera preview: \" + e.getMessage());\n }\n }", "@Override\n\tpublic void resized() {\n\t}", "@Override\n\tpublic void surfaceChanged(SurfaceHolder holder, int format, int width,\n\t\t\tint height) {\n\t\trequestRender();\n\t\t\n\t}", "public interface PreviewImpl {\n void ilog(String msg);\n void ierror(String msg);\n void record(int i,boolean isRecord);\n void capture(String path);\n void iToast(String msg);\n void showBattery(int i);\n void isConnect(boolean isConnect);\n void setAngleAnimation(RotateAnimation ra_swing, RotateAnimation ra_picth, RotateAnimation ra_roll, RotateAnimation ra_head);\n void stop();\n\n void setEnvironmentData(EnvironmentInfo environmentData);\n\n}", "@Override\r\n\t\t\tpublic void componentResized(ComponentEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n public boolean onTouch(View arg0, MotionEvent event) {\n switch(event.getAction())\r\n {\r\n case MotionEvent.ACTION_DOWN:\r\n mImgView.setImageBitmap(null);\r\n mImgView.setImageBitmap(mFaceEditor.getOriginalImage());\r\n break;\r\n case MotionEvent.ACTION_UP:\r\n mImgView.setImageBitmap(null);\r\n mImgView.setImageBitmap(mFaceEditor.getDisplayImage());\r\n break;\r\n default:\r\n break;\r\n }\r\n return false;\r\n }", "@Override\n\tpublic void onPreviewFrame(byte[] data, Camera c) { \n\t\tif(sendBitmap){\n\t Camera.Parameters p = c.getParameters();\n\t int width = p.getPreviewSize().width;\n\t int height = p.getPreviewSize().height;\n\t \n\t sendBitmap=true;\n\t \n\t mask = AlphaMake.makeSimpleMask(data, height, width, mRotVec);\n\t mRotOld=mRotVec.clone();\n\t mRenderer.setTextures(data, mask);\n\t mRenderer.setChange(changeInRot());\n\t\t}\n\t}", "abstract void setPreviewCallback(android.hardware.Camera.PreviewCallback cb);", "protected abstract void onResize(int width, int height);", "protected void auditPreview() {\n\t\t// Log the preview if not Java\n\t\tif (currentViewer != null && !currentViewer.equals(\"Java\")) { //$NON-NLS-1$\n\t\t\tJaspersoftStudioPlugin.getInstance().getUsageManager().audit(currentViewer,\n\t\t\t\t\tUsageStatisticsIDs.CATEGORY_PREVIEW_FORMAT);\n\t\t\t// Log the language used by the report\n\t\t\tif (jrContext != null && jrContext.getJasperDesign() != null) {\n\t\t\t\tString reportLanguage = jrContext.getJasperDesign().getLanguage();\n\t\t\t\tif (reportLanguage != null) {\n\t\t\t\t\tJaspersoftStudioPlugin.getInstance().getUsageManager().audit(\"ReportLanguage\" + reportLanguage, //$NON-NLS-1$\n\t\t\t\t\t\t\tUsageStatisticsIDs.CATEGORY_REPORT);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void setPreview(boolean preview) {\r\n this.preview = preview;\r\n }", "@Override\n public void componentResized(ComponentEvent e) {\n }", "public void onBoundsChange(Rect rect) {\n super.onBoundsChange(rect);\n this.f413n = true;\n }", "@Override\n protected void onLayout(boolean changed, int l, int t, int r, int b) {\n }", "@Override\n public void onClick(View v) {\n if (camera != null && previewing) {\n camera.stopPreview();\n camera.release();\n camera = null;\n\n previewing = false;\n }\n }", "private void rotationChanged() {\n if(isActive() && getDisplayRotation() != openedOrientation) {\n pause();\n resume();\n }\n }", "private void orientationChanged(int change) {\n orientation += change;\n if (orientation > 4) {\n orientation = orientation - 4;\n }\n }", "public void onResized(Integer width,Integer height);" ]
[ "0.6528673", "0.6440714", "0.64311105", "0.6429141", "0.6390834", "0.63415575", "0.63181365", "0.6305058", "0.62373114", "0.6149749", "0.6092977", "0.6088578", "0.6086855", "0.60691726", "0.6051747", "0.59811085", "0.59789336", "0.5957624", "0.5957234", "0.593612", "0.58878624", "0.587222", "0.5867324", "0.5847341", "0.5841192", "0.5834216", "0.5813816", "0.58034563", "0.5789656", "0.5764955", "0.57213855", "0.5711179", "0.5704807", "0.56951636", "0.56951636", "0.56951636", "0.5689561", "0.56807417", "0.5675811", "0.56733245", "0.56646156", "0.5647685", "0.56415963", "0.563817", "0.56228024", "0.56030583", "0.5594943", "0.5585376", "0.5585376", "0.5581525", "0.5581173", "0.5576021", "0.5569516", "0.5567315", "0.5563264", "0.55336994", "0.5525072", "0.5522034", "0.54935414", "0.5484562", "0.54752094", "0.54718256", "0.5461172", "0.54580253", "0.5457441", "0.54380333", "0.54370046", "0.5436805", "0.5424781", "0.54156685", "0.5413555", "0.5408092", "0.54032344", "0.5393131", "0.53770655", "0.5375989", "0.5375913", "0.53748363", "0.5374538", "0.5362611", "0.5351783", "0.5348617", "0.53380626", "0.53365666", "0.5327466", "0.53237784", "0.530959", "0.52847695", "0.52824265", "0.5278777", "0.52761203", "0.52737993", "0.5271967", "0.5260911", "0.52597886", "0.5250485", "0.5245814", "0.5245454", "0.52402955", "0.52396095" ]
0.63971376
4
pour la popup de creation
@AfterCompose public void afterCompose(@ExecutionArgParam("utilisateurCreation") Utilisateur uti) { if (uti != null) { setUtilisateur(uti); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createPopupWindow() {\r\n \t//\r\n }", "protected Popup() {}", "private void popUp() {\n\tpop = new RoomPopUp(this);\n\tnoPopUp = false;\n }", "public void triggerPopup();", "@Override\n public List<UpdatableItem> createPopup() {\n final List<UpdatableItem> items = new ArrayList<UpdatableItem>();\n \n /* host wizard */\n final MyMenuItem newHostWizardItem =\n new MyMenuItem(Tools.getString(\"EmptyBrowser.NewHostWizard\"),\n HOST_ICON,\n null,\n new AccessMode(ConfigData.AccessType.RO, false),\n new AccessMode(ConfigData.AccessType.RO, false)) {\n private static final long serialVersionUID = 1L;\n \n @Override\n public String enablePredicate() {\n return null;\n }\n \n @Override\n public void action() {\n final AddHostDialog dialog = new AddHostDialog(new Host());\n dialog.showDialogs();\n }\n };\n items.add(newHostWizardItem);\n Tools.getGUIData().registerAddHostButton(newHostWizardItem);\n return items;\n }", "public void open() {\n popupWindow = new Window(getTypeCaption());\n popupWindow.addStyleName(\"e-export-form-window\");\n popupWindow.addStyleName(\"opaque\");\n VerticalLayout layout = (VerticalLayout) popupWindow.getContent();\n layout.setMargin(true);\n layout.setSpacing(true);\n layout.setSizeUndefined();\n popupWindow.setSizeUndefined();\n popupWindow.setModal(false);\n popupWindow.setClosable(true);\n\n popupWindow.addComponent(this);\n getMainApplication().getMainWindow().addWindow(popupWindow);\n\n onDisplay();\n }", "public void getPopup() {\n\t\t\tglobal.btnClick(popup);\n\t\t}", "@Listen(\"onClick=#createEntryButton\")\n public void createEntryButtonOnClick(){\n Window window = (Window) Executions.createComponents(\"entry.zul\", phonePageWindow, new HashMap());\n window.doModal();\n }", "private void popupModify2te() {\n\t\tRolle rolle = (Rolle) this;\n\t\taufzugschacht.mainFrameShowOptionsFrame(rolle.getRolle2teUmschlingung(), true);\n\t}", "public void showGenPopup() {\n\t\ttv_popupTitle.setText(R.string.title3);\n\t\ttv_popupInfo.setText(R.string.description3);\n\t\t\n\t\t// The code below assumes that the root container has an id called 'main'\n\t\t popup.showAtLocation(findViewById(R.id.anchor), Gravity.CENTER, 0, 0);\n\t}", "public void popupAdd() {\n builder = new AlertDialog.Builder(getView().getContext());\n View views = getLayoutInflater().inflate(R.layout.departmentpopup, (ViewGroup) null);\n DepartmentName = (EditText) views.findViewById(R.id.department_name);\n DepartmentId = (EditText) views.findViewById(R.id.department_id);\n pbar =views.findViewById(R.id.departmentProgress);\n Button button =views.findViewById(R.id.save_depart);\n saveButton = button;\n button.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n addDeparatments();\n }\n });\n builder.setView(views);\n AlertDialog create =builder.create();\n dialog = create;\n create.show();\n }", "private void popupModify() {\n\t\tboolean doNotShow = false;\n\t\tif (this instanceof Umlenkrolle && ((Umlenkrolle) this).isFree()) {\n\t\t\tdoNotShow = true;\n\t\t} else if (this instanceof DoppelUmlenkrolle) {\n\t\t\tdoNotShow = true;\n\t\t}\n\t\taufzugschacht.mainFrameShowOptionsFrame(this, doNotShow);\n\t}", "public void createEditEmployeePopup() {\n createPopupResources();\n getCancelButton().setOnAction((event -> popupStage.close()));\n setupPopupLayout();\n mainBox.setPrefSize(PREFERRED_POPUP_WIDTH, PREFERRED_POPUP_HEIGHT);\n popupStage.setScene(scene);\n popupStage.initModality(Modality.APPLICATION_MODAL);\n popupStage.show();\n }", "public void createPopupMenu() {\n\t\tJPopupMenu popup = new JPopupMenu();\r\n\t\tmenuItem = new JMenuItem(\"刷新频道\");\r\n\t\tmenuItem.addActionListener(this);\r\n\t\tpopup.add(menuItem);\r\n\r\n\t\thideMenuItem = new JMenuItem(\"隐藏公共频道\");\r\n\t\thideMenuItem.addActionListener(this);\r\n\t\tpopup.add(hideMenuItem);\r\n\t\t// Add listener to the text area so the popup menu can come up.\r\n\t\tMouseListener popupListener = new PopupListener(popup);\r\n\t\tcommonArea.addMouseListener(popupListener);\r\n\t\tmyMsgArea.addMouseListener(popupListener);\r\n\t}", "@Override\n public void onClick(View view) {\n if (mAddDialog == null) {\n mAddDialog = new XPopup.Builder(MainActivity.this)\n .asInputConfirm(getString(R.string.add_random_title)\n , getString(R.string.add_random_content)\n , new OnInputConfirmListener() {\n @Override\n public void onConfirm(String text) {\n if (mAdapter != null) {\n mAdapter.addData(new BaseModel(text, 1));\n }\n }\n }).show();\n } else {\n mAddDialog.show();\n }\n }", "public InspectionModal createNewInspection(){\n waitForLoading();\n clickElement(createNewInspectionButton);\n return new InspectionModal(super.driver); // return pop ap\n }", "private void initDialog() {\n Window subWindow = new Window(\"Sub-window\");\n \n FormLayout nameLayout = new FormLayout();\n TextField code = new TextField(\"Code\");\n code.setPlaceholder(\"Code\");\n \n TextField description = new TextField(\"Description\");\n description.setPlaceholder(\"Description\");\n \n Button confirm = new Button(\"Save\");\n confirm.addClickListener(listener -> insertRole(code.getValue(), description.getValue()));\n\n nameLayout.addComponent(code);\n nameLayout.addComponent(description);\n nameLayout.addComponent(confirm);\n \n subWindow.setContent(nameLayout);\n \n // Center it in the browser window\n subWindow.center();\n\n // Open it in the UI\n UI.getCurrent().addWindow(subWindow);\n\t}", "@Command\n public void nuevaMateria() {\n\t\t\n\t\tWindow window = (Window)Executions.createComponents(\n \"/WEB-INF/include/Mantenimiento/Materias/vtnMaterias.zul\", null, null);\n window.doModal();\n }", "public InfoPopup() {\n initComponents();\n }", "public Popup makeEditPopup() {\n Popup popup = new Popup();\n popup.setY(0);\n popup.setX(0);\n GridPane pane = new GridPane();\n setUpPopupTexts();\n pane.setVgap(8);\n pane.setHgap(8);\n addColumn0(pane);\n addColumn1(pane);\n popup.getContent().add(pane);\n return popup;\n }", "public ActorPopup() {\n\t\tsuper(false);\n\t\tCSS.ensureInjected();\n\t\tcreateActions();\n\t\tsetWidget(createContent());\n\t\tsetStylePrimaryName(AbstractField.CSS.cbtAbstractPopup());\n\t}", "@Override\n\t\t\tpublic void onClickedPopup(int arg0) {\n\t\t\t\t\n\t\t\t}", "public void popAddHeritage()throws IOException {\n final Stage dialog = new Stage();\n dialog.setTitle(\"Agregar herencia\");\n \n Parent root = FXMLLoader.load(getClass().getResource(\"/view/PopAddHeritage.fxml\"));\n \n Scene xscene = new Scene(root);\n \n dialog.setResizable(false);\n dialog.initModality(Modality.APPLICATION_MODAL);\n dialog.initOwner((Stage) root.getScene().getWindow());\n \n dialog.setScene(xscene);\n dialog.showAndWait();\n dialog.setResizable(false);\n dialog.resizableProperty().setValue(Boolean.FALSE);\n dialog.close(); \n \n }", "private void popupWindowOfOptions(View v) {\n \t \n \t\tOrderManager.clearOption();\n \t\t\n \t\tint nOrderBoardTextId = v.getId();\n \tOrder _Order = (Order) ResourceManager.get(nOrderBoardTextId);\n \tint nMenuDbId = _Order.MENU_ID;\n \tint nMenuResourceId = MenuManager.getResourceIdByDbId(nMenuDbId);\n \tMenu mMenu = MenuManager.getMenuByResourceId(nMenuResourceId);\n \t\n \tint nTempIdForCurrentOrder = IdManager.getRandomId();\n \tIdManager.setTemporaryId(nTempIdForCurrentOrder);\n \tResourceManager.put(nTempIdForCurrentOrder, _Order);\n \t\n try {\n \t\n \tint nPopupHeight = 760;\n \t\tint nPopupWith = 520;\n \t\n \tint nSubTitleHeight = 40;\n \tint nOptionListLayoutHeight = 210;\n \t\n \tString strMenuNameEng = mMenu.NAME_ENG;\n \tString strMenuNameOth = mMenu.NAME_OTH;\n \t\n \t// Popup layout\n LinearLayout popLayout = new LinearLayout(this);\n popLayout.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));\n popLayout.setGravity(Gravity.CENTER);\n popLayout.setBackgroundColor(0x22000000);\n \n \t // Inner layout\n \t LinearLayout innerLayout = new LinearLayout(this);\n \t innerLayout.setLayoutParams(new LayoutParams(nPopupWith-20,nPopupHeight-20));\n \t innerLayout.setPadding(10,10,10,10);\n \t innerLayout.setOrientation(LinearLayout.VERTICAL);\n \t innerLayout.setGravity(Gravity.CENTER);\n \t innerLayout.setBackgroundColor(0xddffffff);\n \t\t \n \t\t // title eng\n \t\t TextView tvTitleEng = new TextView(this);\n \t\t tvTitleEng.setGravity(Gravity.CENTER);\n \t\t tvTitleEng.setText(strMenuNameEng);\n \t\t tvTitleEng.setTextColor(0xff000000);\n \t\t tvTitleEng.setTextSize(23);\n \t\t tvTitleEng.setHeight(50);\n \t\t tvTitleEng.setWidth(470);\n \t\t \n \t\t // title oth\n \t\t TextView tvTitleOth = new TextView(this);\n \t\t tvTitleOth.setGravity(Gravity.TOP|Gravity.CENTER);\n \t\t tvTitleOth.setText(strMenuNameOth);\n \t\t tvTitleOth.setTextColor(0xff000000);\n \t\t tvTitleOth.setTextSize(13);\n \t\t tvTitleOth.setHeight(55);\n \t\t tvTitleOth.setWidth(470);\n \t\t \n \t\t // common option title\n \t\t TextView tvCO = new TextView(this);\n \t\t tvCO.setText(\"* Common Option\");\n \t\t tvCO.setPadding(10,0,0,0);\n \t\t tvCO.setTextSize(15);\n \t\t tvCO.setTextColor(0xff5f2d09);\n \t\t tvCO.setHeight(nSubTitleHeight);\n \t\t tvCO.setWidth(470);\n \t\t \n \t\t // common option layout\n \t\t ScrollView svCO = new ScrollView(this);\n \t\t svCO.setLayoutParams(new LayoutParams(470,nOptionListLayoutHeight));\n \t\t \n \t\t LinearLayout llCO = new LinearLayout(this);\n \t\t llCO.setLayoutParams(new LayoutParams(470,LayoutParams.WRAP_CONTENT));\n \t\t llCO.setPadding(15,10,10,10);\n \t\t llCO.setOrientation(LinearLayout.VERTICAL);\n \t\t llCO.setGravity(Gravity.TOP);\n \t\t \n \t\t showCommonOptions (mMenu, llCO);\n \t\t \t\n \t\t \tsvCO.addView(llCO);\n \t\t \t\n \t\t\t // specific option title\n \t\t\t \n \t\t TextView tvSO = new TextView(this);\n \t\t tvSO.setPadding(10,0,0,0);\n \t\t tvSO.setText(\"* Specific Option\");\n \t\t tvSO.setTextSize(15);\n \t\t tvSO.setTextColor(0xff5f2d09);\n \t\t tvSO.setHeight(nSubTitleHeight);\n \t\t tvSO.setWidth(470);\n \t \n \t\t ScrollView svSO = new ScrollView(this);\n \t\t svSO.setLayoutParams(new LayoutParams(470,nOptionListLayoutHeight));\n \t\t \n \t\t LinearLayout llSO = new LinearLayout(this);\n \t\t llSO.setLayoutParams(new LayoutParams(470,nOptionListLayoutHeight));\n \t\t llSO.setPadding(15,10,10,10);\n \t\t llSO.setOrientation(LinearLayout.VERTICAL);\n \t\t llSO.setGravity(Gravity.TOP);\n \t\n \t\t showSpecificOptions (mMenu, llSO);\n \t\t \n \t\t svSO.addView(llSO);\n \t\t \n \t\t // button group\n \t\t \n \t\t int nButtonHeight = 50;\n \t\t int nButtonWidth = 100;\n \t\t \n \t\t LinearLayout llButtonGroup = new LinearLayout(this);\n \t\t llButtonGroup.setLayoutParams(new LayoutParams(470,80));\n \t\t llButtonGroup.setPadding(10, 0, 10, 4);\n \t\t llButtonGroup.setOrientation(LinearLayout.HORIZONTAL);\n \t\t llButtonGroup.setGravity(Gravity.CENTER|Gravity.BOTTOM);\n \t\t \n \t\t // confirm button\n \t \n \t \tint nConfirmId = IdManager.getRandomId();\n \t\t Button btnConfirm = new Button(this);\n \t\t btnConfirm.setId(nConfirmId);\n \t\t btnConfirm.setBackgroundResource(R.drawable.color_button_basic);\n \t\t btnConfirm.setLayoutParams(new LayoutParams(nButtonWidth,nButtonHeight));\n \t\t btnConfirm.setText(CaptionManager.getCaption().CONFIRM);\n \t\t btnConfirm.setTextSize(13);\n \t\t \n \t\t // add options to an order\n \t\t btnConfirm.setOnClickListener(new OnClickListener() {\n \t\t\t public void onClick(View v) {\n \t\t\t \t\n \t\t\t \tOrder currentOrder = (Order)ResourceManager.get(IdManager.getTemporaryId());\n \t\t\t \t\n \t\t\t \tArrayList<Order> orderList = addOptionsToOrder(currentOrder);\n \t\t\t \tOrderManager.requestUpdateOptions(currentOrder,orderList);\n \t \t\t\t\tloadOrderBoard();\n \t \t\t\t\tOrderManager.clearOption();\n \t \t\t\t\t_PopupWindowOfOptions.dismiss();\n \t\t\t }\n \t\t });\n \t\t \n \t\t // cancel button\n \t\t Button btnCancel = new Button(this);\n \t\t btnCancel.setBackgroundResource(R.drawable.color_button_basic);\n \t\t btnCancel.setLayoutParams(new LayoutParams(nButtonWidth,nButtonHeight));\n \t\t btnCancel.setText(CaptionManager.getCaption().CANCEL);\n \t\t btnCancel.setTextSize(13);\n \t\t btnCancel.setOnClickListener(new OnClickListener() {\n \t\t\t public void onClick(View v) {\n \t\t\t \tOrderManager.clearOption();\n \t\t\t \t_PopupWindowOfOptions.dismiss();\n \t\t\t }\n \t\t });\n \t\t \n \t\t // detail button\n \t\t final int nTempId = 808080;\n \t\t Mapper.put(Integer.valueOf(nTempId), mMenu);\n \t\t \n \t\t Button btnDetail = new Button(this);\n \t\t btnDetail.setBackgroundResource(R.drawable.color_button_basic);\n \t\t btnDetail.setLayoutParams(new LayoutParams(nButtonWidth,nButtonHeight));\n \t\t btnDetail.setText(CaptionManager.getCaption().DETAIL);\n \t\t btnDetail.setTextSize(13);\n \t\t btnDetail.setOnClickListener(new OnClickListener() {\n \t\t\t public void onClick(View v) {\n \t\t\t \n \t\t\t \tMenu menu = (Menu)Mapper.get(Integer.valueOf(808080));\n \t\t\t \tint nMenuRscId = menu.RESOURCE_ID;\n \t\t\t \tpopupWindowDetail(nMenuRscId);\n \t\t\t }\n \t\t });\n \t\t\t \n \t llButtonGroup.addView(btnConfirm);\n \t llButtonGroup.addView(btnCancel);\n \t llButtonGroup.addView(btnDetail);\n \t \n \t\t innerLayout.addView(tvTitleEng);\n \t innerLayout.addView(tvTitleOth);\n \t innerLayout.addView(tvCO);\n \t innerLayout.addView(svCO);\n \t innerLayout.addView(tvSO);\n \t innerLayout.addView(svSO);\n \t innerLayout.addView(llButtonGroup);\n \t \n popLayout.addView(innerLayout);\n\n // show popup\n _PopupWindowOfOptions = new PopupWindow(popLayout, nPopupWith, nPopupHeight, true);\n _PopupWindowOfOptions.showAtLocation(popLayout, Gravity.CENTER, 0, 0);\n \t\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void actionPerformed(ActionEvent e) {\r\n\t\t\t\tpopup.show(mainpanel , 660, 40);\r\n\t\t\t}", "public JPopupButton() {\n initComponents();\n }", "@Override\n public void showLorenzoActionPopUp(String string) {\n\n }", "@Override\r\n\tprotected final void createAppWindows() {\r\n \t//Instantiate only DD-specific windows. SFDC-scope windows (such as mainWindow) are static\r\n \t// objects in the EISTestBase class\r\n \tmyDocumentsPopUp = createWindow(\"WINDOW_MY_DOCUMENTS_POPUP_PROPERTIES_FILE\");\r\n }", "void makeDialog()\n\t{\n\t\tfDialog = new ViewOptionsDialog(this.getTopLevelAncestor());\n\t}", "public void clickCreate() {\n\t\tbtnCreate.click();\n\t}", "private void resourceActionWindow (ButtonImage button){\n JPopupMenu depositList = new JPopupMenu(\"Deposits\");\n DepositMenu subMenu = new DepositMenu(gui, \"Send to\", selectedResource, Command.SEND_DEPOSIT_ID, 0);\n depositList.add(subMenu);\n button.addMouseListener(new MouseAdapter() {\n public void mouseClicked(MouseEvent e) {\n depositList.show(button , e.getX(), e.getY());\n }\n });\n }", "@Override\r\n\t\t\tpublic void buttonClick(ClickEvent event) \r\n\t\t\t{\n\t\t\t\tif(((NavigatorUI) UI.getCurrent()).getMainView().equals(\"Cibernauta\"))\r\n\t\t\t\t{\r\n\r\n\t\t\t\t\tsubWindow.setModal(true);\r\n\t\t\t\t\tsubWindow.setResizable(false);\r\n\t\t\t\t\tsubWindow.setContent(new Contratar_cibernauta(canalL.getValue()));\r\n\t\t\t\t\tUI.getCurrent().addWindow(subWindow);\r\n\t\t\t\t\t\r\n\t\t\t\t}else if(((NavigatorUI) UI.getCurrent()).getMainView().equals(\"Vista_Cliente\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tcontratacion = comprobarContratacion();\r\n\t\t\t\t\t\r\n\t\t\t\t\tsubWindow.setModal(true);\r\n\t\t\t\t\tsubWindow.setResizable(false);\r\n\t\t\t\t\tsubWindow.setContent(new Contratar_vista_usuario(canalL.getValue(), contratacion, idModalidad));\r\n\t\t\t\t\tUI.getCurrent().addWindow(subWindow);\r\n\t\t\t\t\t\r\n\t\t\t\t}else if(((NavigatorUI) UI.getCurrent()).getMainView().equals(\"Cliente\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tcontratacion = comprobarContratacion();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(contratacion || idModalidad.isEmpty())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tsubWindow.setModal(true);\r\n\t\t\t\t\t\tsubWindow.setResizable(false);\r\n\t\t\t\t\t\tsubWindow.setContent(new Contratar_cliente(canalL.getValue()));\r\n\t\t\t\t\t\tUI.getCurrent().addWindow(subWindow);\r\n\t\t\t\t\t}else\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdoNavigate(Crear_incidencia.VIEW_NAME + \"/\" + \"contratacion\" +\";\" +canalL.getValue());\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}", "public void crearDialogo() {\r\n final PantallaCompletaDialog a2 = PantallaCompletaDialog.a(getString(R.string.hubo_error), getString(R.string.no_hay_internet), getString(R.string.cerrar).toUpperCase(), R.drawable.ic_error);\r\n a2.f4589b = new a() {\r\n public void onClick(View view) {\r\n a2.dismiss();\r\n }\r\n };\r\n a2.show(getParentFragmentManager(), \"TAG\");\r\n }", "public void clickedPresentationNew() {\n\t\t\n\t}", "void createWindow();", "public CustomPopUp(String lblText, String titleText, String btnText, int height, int width) \r\n {\r\n \r\n stage = new Stage();\r\n btn = new Button(btnText);\r\n prompt = new Label(lblText);\r\n pane = new VBox();\r\n pane.getChildren().addAll(prompt,btn);\r\n pane.setAlignment(Pos.CENTER);\r\n scene = new Scene(pane,height,width);\r\n stage.setTitle(titleText);\r\n stage.setScene(scene);\r\n \r\n btn.setOnAction(event ->\r\n {\r\n this.stage.close();\r\n }); \r\n \r\n }", "public void makeNew() {\n\t\towner.switchMode(WindowMode.ITEMCREATE);\n\t}", "boolean isPopUpOpened();", "public static void initializePopup(){\n\n popup = new PopupMenu();\n\n // Initialize menu items\n MenuItem exitItem = new MenuItem(\"Exit\");\n MenuItem pauseItem = new MenuItem(\"Pause\");\n MenuItem resumeItem = new MenuItem(\"Resume\");\n\n // Exit listener\n exitItem.addActionListener(arg0 -> System.exit(0));\n\n // Pause listener\n pauseItem.addActionListener(arg0 -> {\n paused = true;\n pauseItem.setEnabled(false);\n resumeItem.setEnabled(true);\n });\n\n // Resume listener\n resumeItem.addActionListener(arg0 -> {\n paused = false;\n pauseItem.setEnabled(true);\n resumeItem.setEnabled(false);\n });\n\n resumeItem.setEnabled(false);\n\n popup.add(resumeItem);\n popup.add(pauseItem);\n popup.add(exitItem);\n }", "void generar_dialog_preguntas();", "public BillPopup() {\n initComponents();\n }", "private void popupMenuAbout() {\n\t\t//\n\t\t// Display the dialog\n\t\t//\n\t\tAboutDialog aboutDialog = new AboutDialog(parent.getShell(), SWT.APPLICATION_MODAL | SWT.DIALOG_TRIM);\n\t\taboutDialog.open();\n\t}", "@Override\r\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\t\r\n\t\t\t\tvenEditarPacks.init(\"NEW\",null);\r\n\t\t\t\tUI.getCurrent().addWindow(venEditarPacks);\r\n\t\t\t\t\r\n\t\t\t}", "protected void createContextMenu() {\n\t\t// TODO : XML Editor 에서 Query Editor 관련 Action 삭제~~\n\t\tMenuManager contextMenu = new MenuManager(\"#PopUp\"); //$NON-NLS-1$\n\t\tcontextMenu.add(new Separator(\"additions\")); //$NON-NLS-1$\n\t\tcontextMenu.setRemoveAllWhenShown(true);\n\t\tcontextMenu.addMenuListener(new NodeActionMenuListener());\n\t\tMenu menu = contextMenu.createContextMenu(getControl());\n\t\tgetControl().setMenu(menu);\n\t\t// makeActions();\n\t\t// hookSingleClickAction();\n\n\t}", "@Override\r\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\r\n\t\t\t\t\t\tvenObjectsByPack.init(\"NEW\");\r\n\t\t\t\t\t\tUI.getCurrent().addWindow(venObjectsByPack);\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t}", "public void OnDeleteRecipe (View View)\n {\n \t\tImageView darkenScreen = (ImageView) findViewById(R.id.darkenScreen);\n \t\tLayoutParams darkenParams = darkenScreen.getLayoutParams();\n \t\tdarkenParams.height = 1000;\n \t\tdarkenParams.width = 1000;\n \t\tdarkenScreen.setLayoutParams(darkenParams);\n \t\t//make the popup\n \t\tLinearLayout layout = new LinearLayout(this);\n \t\tLayoutInflater inflater = LayoutInflater.from(this);\n \t\tpopUp = new PopupWindow(inflater.inflate(R.layout.popup_delete_recipe, null, false),300,150,true);\n \t\tpopUp.showAtLocation(layout, Gravity.CENTER, 0, 0);\n \t\t\n \t\t//Log.d(\"what\", \"what\");\n \t\t//popUp.update(50, 50, 300, 80);\n \t\t\n \n }", "public void open(Plugin plugin, SpoutPlayer splayer) {\n\n GenericPopup popup = new GenericPopup();\n int width = splayer.getMainScreen().getMaxWidth();\n int height = splayer.getMainScreen().getMaxHeight();\n pluginLeg.log(\"aight\" + width + \"\" + height);\n\n// int width = splayer.getCurrentScreen().getWidth();\n// int height = splayer.getCurrentScreen().getHeight();\n\n //title of the screen\n GenericLabel topLabel = new GenericLabel(\"Clan-Invitation\");\n topLabel.setScale(1);\n\n topLabel.setWidth(topLabel.getText().length() * 8 * (int) topLabel.getScale()).setHeight((int) topLabel.getScale() * 15);\n\n topLabel.setX(width / 2 - topLabel.getWidth() / 2);\n topLabel.setY(topLabel.getHeight() / 2 + 5);\n popup.attachWidget(plugin, topLabel);\n\n //title of the screen\n String questionString = \"&2You are invited to \"+clan.getName()+\". Do you want to join?\";\n GenericLabel questionLabel = new GenericLabel(LegendaryClans.parseColor(questionString));\n questionLabel.setScale(1);\n questionLabel.setWidth(questionLabel.getText().length() * 5 * (int) questionLabel.getScale());\n questionLabel.setHeight((int) questionLabel.getScale() * 15);\n\n questionLabel.setX(width / 2 - questionLabel.getWidth() / 2);\n questionLabel.setY(height / 2 - questionLabel.getHeight() / 2);\n popup.attachWidget(plugin, questionLabel);\n\n //Accept Button\n LegendaryButton acceptButton = new LegendaryButton(LegendaryClans.parseColor(\"&2Accept!\"), popup) {\n\n @Override\n public void onButtonClick(ButtonClickEvent event) {\n if (pluginLeg.getClanManager().getClanByPlayer(clan.getLeaders().get(0)) != null && askedPlayer != null) {\n clan.addMember(askedPlayer);\n } \n getPopup().close();\n }\n };\n\n\n acceptButton.setWidth(acceptButton.getText().length() * 8 * (int) acceptButton.getScale()).setHeight((int) acceptButton.getScale() * 15);;\n acceptButton.setX(width / 2 + width / 4 - acceptButton.getWidth() / 2).setY(height / 2 + height / 4 - acceptButton.getHeight() / 2);\n\n\n popup.attachWidget(plugin, acceptButton);\n //deny button\n LegendaryButton denieButton = new LegendaryButton(LegendaryClans.parseColor(\"&4Deny!\"), popup) {\n\n @Override\n public void onButtonClick(ButtonClickEvent event) {\n clan.broadcastMessage(\"&4\" + askedPlayer.getName() + \" denied invitation!\");\n getPopup().close();\n }\n };\n\n denieButton.setWidth(acceptButton.getText().length() * 8 * (int) acceptButton.getScale());\n denieButton.setHeight((int) denieButton.getScale() * 15);\n// \n// ((LegendaryClans)plugin).log(\"\"+width+\",\"+height);\n// denieButton.setX(denieButton.getX()+denieButton.getWidth()/2 +10);\n\n denieButton.setX(width / 4 - denieButton.getWidth() / 2);\n denieButton.setY(height / 2 + height / 4 - denieButton.getHeight() / 2);\n popup.attachWidget(plugin, denieButton);\n\n splayer.closeActiveWindow();\n splayer.getMainScreen().attachPopupScreen(popup);\n }", "@Override\r\n\t\tpublic void create() {\n\t\t\tsuper.create();\r\n\t\t\tsuper.getOKButton().setEnabled(false);\r\n\t\t\tsuper.setTitle(Messages.MoveUnitsWizardPage1_Topolog__2);\r\n\t\t\tsuper.setMessage(Messages.MoveUnitsWizardPage1_Select_a_name_source_folder_and_a_);\r\n\t\t\tsuper.getShell().setText(Messages.MoveUnitsWizardPage1_Topolog__2);\r\n\t\t}", "public void showOxPopup() {\n\t\ttv_popupTitle.setText(R.string.title1);\n\t\ttv_popupInfo.setText(R.string.description1);\n\t\t\n\t\t// The code below assumes that the root container has an id called 'main'\n\t\t popup.showAtLocation(findViewById(R.id.anchor), Gravity.CENTER, 0, 0);\n\t}", "void doNew() {\r\n\t\t\r\n\t\tNewResizeDialog dlg = new NewResizeDialog(labels, true);\r\n\t\tdlg.setLocationRelativeTo(this);\r\n\t\tdlg.setVisible(true);\r\n\t\tif (dlg.success) {\r\n\t\t\tsetTitle(TITLE);\r\n\t\t\tcreatePlanetSurface(dlg.width, dlg.height);\r\n\t\t\trenderer.repaint();\r\n\t\t\tsaveSettings = null;\r\n\t\t\tundoManager.discardAllEdits();\r\n\t\t\tsetUndoRedoMenu();\r\n\t\t}\r\n\t}", "private void showPopUpWindow() {\n Log.d(TwoPlayersActivity.LOG_TAG, \"show popup\");\n LayoutInflater layoutInflater = (LayoutInflater) this\n .getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\n View popupView = layoutInflater.inflate(R.layout.pop_up,\n (ViewGroup) findViewById(R.id.pop_up));\n\n popupWindow = new PopupWindow(popupView,\n LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT, true);\n\n popupWindow.showAtLocation(popupView, Gravity.CENTER, 0, 0);\n\n Button btnDismiss = (Button)popupView.findViewById(R.id.dismiss);\n\n btnDismiss.setOnClickListener(new Button.OnClickListener() {\n @Override\n public void onClick(View v) {\n popupWindow.dismiss();\n }\n });\n }", "private void showPopWindow() {\n\t\tfinal PointerPopupWindow p = new PointerPopupWindow(this,\n\t\t\t\tgetResources().getDimensionPixelSize(R.dimen.popup_width));\n\t\tView convertView = setClickListener(p);\n\n\t\tp.setContentView(convertView);\n\t\tp.setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.pop_window_back)));\n\t\tp.setPointerImageRes(R.drawable.ic_popup_pointer);\n\t\tp.setAlignMode(PointerPopupWindow.AlignMode.CENTER_FIX);\n\t\tp.showAsPointer(photo);\n\t}", "public void popup(String a){\n pop.setLayout(null);\n ControlAction c = new ControlAction();\n pop.setBounds(420, 320, 460, 160);\n pop.setBorder(new LineBorder(Color.BLACK, 2));\n //condition for showing popup message\n if(a.startsWith(\"1\")){\n mas.setText(\"Selamat Anda Telah Melakukan Peminjaman\");\n nolocker.setText(\"No. Locker Anda Yaitu 17\");\n yes.setVisible(false);\n no.setVisible(false);\n nolocker.setVisible(true);\n }else if(a.equals(WARN1)){\n mas.setText(\"Maaf Anda Telah Melakukan Peminjaman\");\n yes.setVisible(false);\n no.setVisible(false);\n nolocker.setVisible(false);\n }else if(a.equals(WARN2)){\n mas.setText(\"Maaf Anda Belum Melakukan Peminjaman\");\n yes.setVisible(false);\n no.setVisible(false);\n nolocker.setVisible(false);\n }else if(a.contains(\"BUKA\")){\n mas.setText(\"Anda Ingin Mengakhiri Peminjaman ?\");\n yes.setVisible(true);\n String key = a.substring(4);\n yes.setActionCommand(\"YES\"+key);\n no.setVisible(true);\n nolocker.setVisible(false);\n }else if(a.equals(NO)){\n mas.setText(\"Loker Anda Telah Terbuka\");\n yes.setVisible(false);\n no.setVisible(false);\n nolocker.setVisible(false);\n } \n mas.setFont(new Font(\"arial\", Font.BOLD, 20));\n mas.setOpaque(false);\n mas.setForeground(Color.BLACK);\n Dimension si1 = mas.getPreferredSize();\n mas.setBounds(10, 40, si1.width, si1.height);\n nolocker.setFont(new Font(\"arial\", Font.BOLD, 20));\n nolocker.setOpaque(false);\n nolocker.setForeground(Color.BLACK);\n Dimension si3 = nolocker.getPreferredSize();\n nolocker.setBounds(10, 70, si3.width, si3.height);\n //close button handling\n close.addActionListener(c);\n close.setActionCommand(EXIT);\n Dimension si2 = close.getPreferredSize();\n close.setBounds(420, 10, si2.width, si2.height);\n close.setBorder(BorderFactory.createEmptyBorder());\n close.setContentAreaFilled(false);\n //yes button handling\n yes.addActionListener(c);\n Dimension si4 = yes.getPreferredSize();\n yes.setBounds(100, 100, si4.width, si4.height);\n yes.setBorder(BorderFactory.createEmptyBorder());\n yes.setContentAreaFilled(false);\n //no button handling\n no.addActionListener(c);\n no.setActionCommand(NO);\n Dimension si5 = no.getPreferredSize();\n no.setBounds(250, 100, si5.width, si5.height);\n no.setBorder(BorderFactory.createEmptyBorder());\n no.setContentAreaFilled(false);\n //add to card3 top most layer\n card3.add(pop,6,0);\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n helpPopUp();\n }", "@Override\n public void onClick(View v) {\n ((CreateDocketActivityPart2) activity).openPopUpForWorkDone(position);\n }", "public void clickCreateButton() {\n this.action.click(this.createButton);\n }", "private void createContents() {\r\n\t\tshell = new Shell(getParent(), SWT.TITLE);\r\n\r\n\t\tgetParent().setEnabled(false);\r\n\r\n\t\tshell.addShellListener(new ShellAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void shellClosed(ShellEvent e) {\r\n\t\t\t\tgetParent().setEnabled(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tshell.setImage(SWTResourceManager.getImage(LoginInfo.class, \"/javax/swing/plaf/metal/icons/ocean/warning.png\"));\r\n\r\n\t\tsetMidden(397, 197);\r\n\r\n\t\tshell.setText(this.windows_name);\r\n\t\tshell.setLayout(null);\r\n\r\n\t\tLabel label = new Label(shell, SWT.NONE);\r\n\t\tlabel.setFont(SWTResourceManager.getFont(\"Microsoft YaHei UI\", 11, SWT.NORMAL));\r\n\t\tlabel.setBounds(79, 45, 226, 30);\r\n\t\tlabel.setAlignment(SWT.CENTER);\r\n\t\tlabel.setText(this.label_show);\r\n\r\n\t\tButton button = new Button(shell, SWT.NONE);\r\n\t\tbutton.setBounds(150, 107, 86, 30);\r\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tshell.close();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbutton.setText(\"确定\");\r\n\r\n\t}", "private void createResultPopup() {\r\n resultDialog = new JDialog(parentFrame);\r\n resultDialog.setLayout(new BoxLayout(resultDialog.getContentPane(), BoxLayout.Y_AXIS));\r\n resultDialog.setAlwaysOnTop(true);\r\n Utilities.centerWindowTo(resultDialog, parentFrame);\r\n resultDialog.add(createResultLabel());\r\n resultDialog.add(createButtonDescription());\r\n resultDialog.add(createConfirmationButtons());\r\n resultDialog.pack();\r\n resultDialog.setVisible(true);\r\n }", "public void showDialog() {\n mDialogInfoWithTwoButtons = new DialogInfoWithTwoButtons(mContext,\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n saveTemplate(mToastEdited);\n mDialogInfoWithTwoButtons.getDialog().dismiss();\n }\n }, new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mTemplateId = mDatabaseManager.getTemplateNewId();\n mPreferenceManager.setTemplateId(mTemplateId);\n saveTemplate(mToastCreated);\n mDialogInfoWithTwoButtons.getDialog().dismiss();\n }\n }, mTitle, mMessage, mTitleButtonOne, mTitleButtonTwo);\n mDialogInfoWithTwoButtons.getDialog().show();\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 InfoDialog() {\r\n\t\tcreateContents();\r\n\t}", "@FXML\n private void openComposeWindow() {\n try {\n ComposeEmailWindow cew = new ComposeEmailWindow(\"\", \"\", \"\", \"\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void onButtonShowPopupWindowClick(View view) {\n LayoutInflater inflater = (LayoutInflater)\n getSystemService(LAYOUT_INFLATER_SERVICE);\n View popupView = inflater.inflate(R.layout.activity_pop_up_time, null);\n\n // create the popup window\n int width = LinearLayout.LayoutParams.WRAP_CONTENT;\n int height = LinearLayout.LayoutParams.WRAP_CONTENT;\n boolean focusable = true; // lets taps outside the popup also dismiss it\n final PopupWindow popupWindow = new PopupWindow(popupView, width, height, focusable);\n\n // show the popup window\n // which view you pass in doesn't matter, it is only used for the window tolken\n popupWindow.showAtLocation(view, Gravity.CENTER, 0, 0);\n\n Button close = (Button) popupView.findViewById(R.id.confirmBtn);\n close.setOnClickListener(new View.OnClickListener() {\n\n public void onClick(View popupView) {\n popupWindow.dismiss();\n }\n });\n }", "public void createNewSoundBoard() {\n\n dialogCreateSoundBoard = new Dialog(this);\n dialogCreateSoundBoard.setContentView(R.layout.soundboard_create);\n dialogCreateSoundBoard.setTitle(\"Create board\");\n dialogCreateSoundBoard.setCancelable(true);\n\n\n sbName = (EditText) dialogCreateSoundBoard.findViewById(R.id.textfieldcreatesoundboardname);\n sbName.setHint(\"Name\");\n Button createOkButton = (Button) dialogCreateSoundBoard.findViewById(R.id.createSoundBoardButton);\n createOkButton.setOnClickListener(createSoundBoardListener);\n\n Button createCancelButton = (Button) dialogCreateSoundBoard.findViewById(R.id.cancelSoundBoardButton);\n createCancelButton.setOnClickListener(cancelButtonCreateSoundBoardListener);\n\n dialogCreateSoundBoard.show();\n }", "public static void showNew() {\n\t\tif (DIALOG == null) {\n\t\t\tDIALOG = new NewDialog();\n\t\t}\n\t\tDIALOG.setVisible(true);\n\t\tDIALOG.toFront();\n\t}", "@Override\n public void onClick(View arg0) {\n ((CreateDocketActivityPart2) activity).openPopUpForSpareParts(position);\n }", "public void initPopupLayout() {\n popup = new BackToMainScreenPopup(this.getContext(), getActivity());\n popup.showPopupWindow();\n }", "public void showCreatePickUPTutorial() {\n ShowcaseView mShowcaseViewCreatePickup = new ShowcaseView.Builder(getActivity())\n .setTarget(new ViewTarget(createpickup))\n .setContentText(getResources().getString(R.string.tutorial_msg_create_pickup))\n .setContentTextPaint(Utility.getTextPaint(getActivity()))\n .singleShot(AppConstants.TUTORIAL_CREATE_PICK_UP_ID)\n .hideOnTouchOutside()\n .setStyle(R.style.CustomShowcaseTheme2)\n .build();\n\n RelativeLayout.LayoutParams lps = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n lps.addRule(RelativeLayout.ALIGN_PARENT_TOP);\n lps.addRule(RelativeLayout.ALIGN_PARENT_LEFT);\n int margin = ((Number) (getResources().getDisplayMetrics().density * 12)).intValue();\n lps.setMargins(margin, margin, margin, margin);\n mShowcaseViewCreatePickup.setButtonPosition(lps);\n mShowcaseViewCreatePickup.setButtonText(getResources().getString(R.string.tutorial_got_it));\n }", "public static String _btncerrarpopup_click() throws Exception{\nmostCurrent._panelpopups_1.RemoveView();\n //BA.debugLineNum = 117;BA.debugLine=\"butPatas.Visible = True\";\nmostCurrent._butpatas.setVisible(anywheresoftware.b4a.keywords.Common.True);\n //BA.debugLineNum = 118;BA.debugLine=\"butColor.Visible = True\";\nmostCurrent._butcolor.setVisible(anywheresoftware.b4a.keywords.Common.True);\n //BA.debugLineNum = 119;BA.debugLine=\"lblFondo.RemoveView\";\nmostCurrent._lblfondo.RemoveView();\n //BA.debugLineNum = 120;BA.debugLine=\"End Sub\";\nreturn \"\";\n}", "public void popAddEntity()throws IOException {\n final Stage dialog = new Stage();\n dialog.setTitle(\"Agregar entidad\");\n \n Parent root = FXMLLoader.load(getClass().getResource(\"/view/PopAddEntity.fxml\"));\n \n Scene xscene = new Scene(root);\n \n dialog.setResizable(false);\n dialog.initModality(Modality.APPLICATION_MODAL);\n dialog.initOwner((Stage) root.getScene().getWindow());\n //dialog.resizableProperty().setValue(Boolean.FALSE);\n \n dialog.setScene(xscene);\n dialog.showAndWait();\n dialog.setResizable(false);\n dialog.close();\n\n }", "private void initDialog() {\n }", "protected void createPopupMenu() {\n\t\tJPopupMenu popup = new JPopupMenu();\n\t\tJMenuItem menuItem = new JMenuItem(\"Clear\");\n\t\tmenuItem.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tclear();\n\t\t\t}\n\t\t});\n\t\tpopup.add(menuItem);\n\t\ttextArea.addMouseListener(new PopupShower(popup));\n\t}", "private void crear_popup(final TextBox toFill, final Calendario calendar) {\n\t calendar.addValueChangeHandler(new ValueChangeHandler<String>() {\n\t \t@Override\n\t\tpublic void onValueChange(ValueChangeEvent<String> event) {\n\t \t toFill.setText(calendar.getStringDate());\n\t \t hide();\n\t\t}\n\t });\n\t add(calendar);\n\t}", "private void onNew() {\r\n\t\tnewPark.setOnAction(e -> {\r\n\t\t\tif (inAction.booleanValue() == false) {\r\n\t\t\t\tinAction = true;\r\n\t\t\t\tVBox vbox = new VBox();\r\n\t\t\t\tLabel popLabel = new Label(\"This will delete your current work. Do you want to save?\");\r\n\t\t\t\tdoIt = new Button(\"Proceed\");\r\n\t\t\t\tpopLabel.setFont(Font.font(\"Calibri\",20));\r\n\t\t\t\t\r\n\t\t\t\tvbox.getChildren().addAll(popLabel, doIt);\r\n\t\t\t\tvbox.setAlignment(Pos.CENTER);\r\n\t\t\t\tvbox.setSpacing(20);\r\n\t\r\n\t\t\t\tStage popStage = new Stage();\r\n\t\t\t\tpopStage.setAlwaysOnTop(true);\r\n\t\t\t\tpopStage.setTitle(\"WARNING\");\r\n\t\t\t\tScene popScene = new Scene(vbox, 500, 100);\r\n\t\t\t\tpopStage.setScene(popScene);\r\n\t\t\t\tpopStage.showAndWait();\r\n\t\t\t\tinAction = false;\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public void mmCreateClick(ActionEvent event) throws Exception{\r\n displayCreateProfile();\r\n }", "@Override\n public void onClick(View v) {\n switch (v.getId()){\n case R.id.aaa:\n popupWindow.showAtLocation(contentView, Gravity.BOTTOM, 0, 0);\n break;\n case R.id.button_ok:\n Toast(\"拍照\");\n break;\n case R.id.button_delete:\n Toast(\"相册\");\n break;\n case R.id.button_return:\n if(popupWindow!=null&&popupWindow.isShowing()){\n popupWindow.dismiss();\n }\n break;\n default:break;\n }\n }", "@Override\n protected void onPostExecute(Void curVoid) {\n super.onPostExecute(curVoid);\n popupWindow.showAtLocation(parent, Gravity.CENTER, 50, -30);\n }", "private AssignFSADialog() {\r\n super(Hub.getMainWindow(), Hub.string(\"TD_assignFSATitle\"));\r\n addWindowListener(new WindowAdapter() {\r\n @Override\r\n public void windowClosing(WindowEvent e) {\r\n onEscapeEvent();\r\n }\r\n });\r\n this.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);\r\n this.setMinimumSize(new Dimension(300, 10));\r\n\r\n Box mainBox = Box.createHorizontalBox();\r\n mainBox.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));\r\n Box newBox = Box.createVerticalBox();\r\n newBox.add(new JLabel(\" \"));\r\n newBox.add(new JButton(new NewFSAAction()));\r\n mainBox.add(newBox);\r\n\r\n mainBox.add(Box.createRigidArea(new Dimension(5, 0)));\r\n\r\n openModelsCombo = new JComboBox();\r\n openModelsCombo.setRenderer(new JLabelListRenderer());\r\n Box modelsBox = Box.createVerticalBox();\r\n Box titleBox = Box.createHorizontalBox();\r\n titleBox.add(new JLabel(Hub.string(\"TD_openModels\")));\r\n titleBox.add(Box.createHorizontalGlue());\r\n modelsBox.add(titleBox);\r\n modelsBox.add(openModelsCombo);\r\n mainBox.add(modelsBox);\r\n\r\n mainBox.add(Box.createRigidArea(new Dimension(5, 0)));\r\n\r\n templatesCombo = new JComboBox();\r\n templatesCombo.setRenderer(new JLabelListRenderer());\r\n Box templatesBox = Box.createVerticalBox();\r\n titleBox = Box.createHorizontalBox();\r\n titleBox.add(new JLabel(Hub.string(\"TD_templates\")));\r\n titleBox.add(Box.createHorizontalGlue());\r\n templatesBox.add(titleBox);\r\n templatesBox.add(templatesCombo);\r\n mainBox.add(templatesBox);\r\n\r\n getContentPane().add(mainBox);\r\n\r\n }", "void createGebruikersBeheerPanel() {\n frame.add(gebruikersBeheerView.createGebruikersBeheerPanel());\n frame.setTitle(gebruikersBeheerModel.getTitle());\n }", "private static void createWindow(final Serializable object) {\n\t\tDIALOG.setVisible(false);\n\t\tFrameFactory.createFrame(object);\n\t}", "@Override\n public void onItemClick(View view, Medal obj, int position) {\n TextView txt;\n final Dialog dialog = new Dialog(getContext());\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); // before\n dialog.setContentView(R.layout.popup_medals);\n txt = dialog.findViewById(R.id.titlePop);\n txt.setText(obj.title);\n dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));\n dialog.setCancelable(true);\n dialog.show();\n }", "@Override\n public void projectOpened() {\n ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(project);\n JPanel myContentPanel = new JPanel(new BorderLayout());\n ShareToolWin toolWin = new ShareToolWin();\n myContentPanel.add(toolWin.getRootPanel(), BorderLayout.CENTER);\n ToolWindow toolWindow = toolWindowManager.registerToolWindow(TOOL_WINDOW_ID, false, ToolWindowAnchor.LEFT);\n toolWindow.getComponent().add(myContentPanel);\n }", "protected void initializePopup() {\r\n\t popup = new JPopupMenu();\r\n\t popup.setBorder(BorderFactory.createLineBorder(Color.black));\r\n\t popup.setLayout(new BorderLayout());\r\n\t popup.addPopupMenuListener(this);\r\n\t popup.add(panel, BorderLayout.CENTER);\r\n\t}", "@Override\n public void onClick(View v) {\n if (popupWindow == null) {\n showPopWindow();\n } else {\n closePopWindow();\n }\n }", "public void open(){\n dialog.setLocation\n (parent.getLocation().x + 10, parent.getLocation().y + 10);\n dialog.setSize(PREF_SIZE);\n dialog.setResizable(false);\n dialog.setVisible(true);\n dialog.setResizable(true);\n }", "@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tConfirmDialog.show(UI.getCurrent(), MESSAGE_1,\"\",\"Aceptar\",\"Crear mas Usuarios\",\n\t\t\t\t new ConfirmDialog.Listener() {\n\n\t\t\t\t public void onClose(ConfirmDialog dialog) {\t\n\t\t\t\t \tent= false;\n\t\t\t\t if (dialog.isConfirmed()) {\n\t\t\t\t // Confirmed to continue\t\n\t\t\t\t \tc.navegar((StartView.VIEW_NAME));\n\t\t\t\t } else {\n\t\t\t\t // User did not confirm\t\t\t \n\t\t\t\t \t//c.crearWindow(RegistrarUser.VIEW_NAME);\n\t\t\t\t \tc.navegar((StartView.VIEW_NAME));\n\t\t\t\t \n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t });\n\t\t\t\t\n\t\t\t\t//Notification nota= new Notification(\"Registro Exitoso!\",Notification.Type.HUMANIZED_MESSAGE);\n\t\t\t\t//nota.setDelayMsec(-1);\n\t\t\t\t//nota.show(Page.getCurrent());\t\n\t\t\t\t\n\t\t\t\tclose();\t\t\t\n\t\t\t}", "@Override\n public void onClick(View view) {\n PopupMenu popup = new PopupMenu(context, holder.threeDots);\n popup.inflate(R.menu.popup_menu_options_edit_flashcard);\n popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {\n @Override\n public boolean onMenuItemClick(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.popupDelete:\n\n flashcardActivity.handleDeleteClick(p);\n break;\n\n case R.id.popupEdit:\n\n flashcardActivity.handleRenameClick(p);\n break;\n\n }\n return false;\n }\n });\n popup.show();\n }", "public CreateProjectPanel() {\n isFinished = true;\n }", "private void createEvents() {\n\t\tbtnRetour.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tdispose();\r\n\t\t\t\tDashboard_Preteur dashboard_Preteur = new Dashboard_Preteur(currentPreteur);\r\n\t\t\t\tdashboard_Preteur.setVisible(true);\r\n\t\t\t\tdashboard_Preteur.setResizable(false);\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public static JPopupMenu createPopupMenu() {\n final JPopupMenu popup = new JPopupMenu();\n popup.setBackground(GUI.themeColorTwo);\n\n JMenuItem deleteItem = new JMenuItem(new AbstractAction(\"Delete\") {\n @Override\n public void actionPerformed(ActionEvent e) {\n JOptionPane.showMessageDialog(GUI.frame, \"Delete selected\");\n System.out.println(\"deleting item\");\n }\n });\n deleteItem.setBackground(GUI.themeColor);\n deleteItem.setForeground(Color.white);\n popup.add(deleteItem);\n JMenuItem pinItem = new JMenuItem(new AbstractAction(\"Pin\") {\n @Override\n public void actionPerformed(ActionEvent e) {\n JOptionPane.showMessageDialog(GUI.frame, \"Pin selected\");\n System.out.println(\"pinning item\");\n }\n });\n pinItem.setBackground(GUI.themeColorTwo);\n pinItem.setForeground(Color.white);\n popup.add(pinItem);\n\n return popup;\n }", "public void suppTeacherWindow(){\n JFrame suppFrame = new JFrame();\n\n JButton jButtonCanceled = new JButton(\"Annuler\");\n jButtonCanceled.setBounds(380, 120, 100, 28);\n JButton jButtonSupp = new JButton(\"Supprimer\");\n jButtonSupp.setBounds(490, 120, 100, 28);\n\n JLabel jLabelIdCourse = new JLabel(\"Saissisez l'ID du professeur à supprimer : \");\n jLabelIdCourse.setBounds(20, 50, 270, 28);\n\n JTextField jTextFieldId = new JTextField();\n jTextFieldId.setBounds(300, 50, 200, 28);\n\n suppFrame.add(jButtonCanceled);\n suppFrame.add(jButtonSupp);\n suppFrame.add(jLabelIdCourse);\n suppFrame.add(jTextFieldId);\n\n jButtonCanceled.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n suppFrame.dispose();\n }\n });\n\n jButtonSupp.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n try {\n Teacher teacher = new Teacher();\n if(teacher.alreadyExist(jTextFieldId.getText())){\n teacher.deleteTeacher(jTextFieldId.getText());\n }\n else {\n AlertePopUp alertePopUp = new AlertePopUp();\n alertePopUp.DeleteFail.setVisible(true);\n System.out.println(\"Erreur l'Id saisie n'existe pas\");}\n } catch (SQLException | ClassNotFoundException throwables) {\n throwables.printStackTrace();\n }\n suppFrame.dispose();\n }\n });\n\n suppFrame.setTitle(\"Suppression d'un professeur\");\n suppFrame.setSize(600,180);\n suppFrame.setLocation(200, 100);\n suppFrame.setLayout(null);\n suppFrame.setVisible(true);\n }", "protected void createContents() {\n\t\tshell = new Shell(shell,SWT.SHELL_TRIM|SWT.APPLICATION_MODAL);\n\t\tshell.setImage(SWTResourceManager.getImage(\"C:\\\\Users\\\\Administrator\\\\Desktop\\\\GupiaoNo4\\\\Project\\\\GupiaoNo4\\\\data\\\\chaogushenqi.png\"));\n\t\tshell.setSize(467, 398);\n\t\tshell.setText(\"\\u5356\\u7A7A\");\n\t\t\n\t\ttext_code = new Text(shell, SWT.BORDER);\n\t\ttext_code.setBounds(225, 88, 73, 23);\n\t\t\n\t\ttext_uprice = new Text(shell, SWT.BORDER | SWT.READ_ONLY);\n\t\ttext_uprice.setBounds(225, 117, 73, 23);\n\t\t\n\t\ttext_downprice = new Text(shell, SWT.BORDER | SWT.READ_ONLY);\n\t\ttext_downprice.setBounds(225, 146, 73, 23);\n\t\t\n\t\ttext_price = new Text(shell, SWT.BORDER);\n\t\ttext_price.setBounds(225, 178, 73, 23);\n\t\t\n\t\ttext_num = new Text(shell, SWT.BORDER);\n\t\ttext_num.setBounds(225, 207, 73, 23);\n\t\t\n\t\t//下单,取消按钮\n\t\tButton btnNewButton = new Button(shell, SWT.NONE);\n\t\tbtnNewButton.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\tpaceoder();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setBounds(116, 284, 58, 27);\n\t\tbtnNewButton.setText(\"\\u4E0B\\u5355\");\n\t\t\n\t\tButton btnNewButton_1 = new Button(shell, SWT.NONE);\n\t\tbtnNewButton_1.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\tshell.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_1.setBounds(225, 284, 58, 27);\n\t\tbtnNewButton_1.setText(\"\\u53D6\\u6D88\");\n\t\t\n\t\tLabel lbl_code = new Label(shell, SWT.NONE);\n\t\tlbl_code.setBounds(116, 91, 60, 17);\n\t\tlbl_code.setText(\"股票代码:\");\n\t\t\n\t\tLabel lbl_upprice = new Label(shell, SWT.NONE);\n\t\tlbl_upprice.setBounds(116, 120, 60, 17);\n\t\tlbl_upprice.setText(\"涨停价格:\");\n\t\t\n\t\tLabel lbl_downprice = new Label(shell, SWT.NONE);\n\t\tlbl_downprice.setBounds(116, 152, 60, 17);\n\t\tlbl_downprice.setText(\"跌停价格:\");\n\t\t\n\t\tLabel lbl_price = new Label(shell, SWT.NONE);\n\t\tlbl_price.setBounds(116, 181, 60, 17);\n\t\tlbl_price.setText(\"委托价格:\");\n\t\t\n\t\tLabel lbl_num = new Label(shell, SWT.NONE);\n\t\tlbl_num.setBounds(116, 210, 60, 17);\n\t\tlbl_num.setText(\"委托数量:\");\n\t\t\n\t\tLabel lbl_date = new Label(shell, SWT.NONE);\n\t\tlbl_date.setBounds(116, 243, 61, 17);\n\t\tlbl_date.setText(\"日 期:\");\n\t\t\n\t\ttext_dateTime = new DateTime(shell, SWT.BORDER);\n\t\ttext_dateTime.setBounds(225, 237, 88, 24);\n\t\t\n\t\tlbl_notice = new Label(shell, SWT.BORDER);\n\t\tlbl_notice.setBounds(316, 333, 125, 17);\n\t\t\n\t\tif (information == null) {\n\n\t\t\tfinal Label lbl_search = new Label(shell, SWT.NONE);\n\t\t\tlbl_search.addMouseListener(new MouseAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void mouseDown(MouseEvent e) {\n\n\t\t\t\t\tlbl_searchEvent();\n\t\t\t\t}\n\t\t\t});\n\t\t\tlbl_search.addMouseTrackListener(new MouseTrackAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void mouseEnter(MouseEvent e) {\n\t\t\t\t\tlbl_search.setBackground(Display.getCurrent()\n\t\t\t\t\t\t\t.getSystemColor(SWT.COLOR_GREEN));\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void mouseExit(MouseEvent e) {\n\t\t\t\t\tlbl_search\n\t\t\t\t\t\t\t.setBackground(Display\n\t\t\t\t\t\t\t\t\t.getCurrent()\n\t\t\t\t\t\t\t\t\t.getSystemColor(\n\t\t\t\t\t\t\t\t\t\t\tSWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT));\n\t\t\t\t}\n\t\t\t});\n\t\t\tlbl_search\n\t\t\t\t\t.setImage(SWTResourceManager\n\t\t\t\t\t\t\t.getImage(\"C:\\\\Users\\\\Administrator\\\\Desktop\\\\GupiaoNo4\\\\Project\\\\GupiaoNo4\\\\data\\\\检查.png\"));\n\t\t\tlbl_search.setBounds(354, 91, 18, 18);\n\n\t\t\ttext_place = new Text(shell, SWT.BORDER);\n\t\t\ttext_place.setBounds(304, 88, 32, 23);\n\n\t\t} else {\n\t\t\ttrade_shortsell();// 显示文本框内容\n\t\t}\n\t\t\n\t}", "protected void createContents() {\n\t\tshlMenu = new Shell();\n\t\tshlMenu.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/File-delete-icon.png\"));\n\t\tshlMenu.setBackground(SWTResourceManager.getColor(255, 102, 0));\n\t\tshlMenu.setSize(899, 578);\n\t\tshlMenu.setText(\"MENU\");\n\t\t\n\t\tMenu menu = new Menu(shlMenu, SWT.BAR);\n\t\tshlMenu.setMenuBar(menu);\n\t\t\n\t\tMenuItem mnętmBookLists = new MenuItem(menu, SWT.NONE);\n\t\tmnętmBookLists.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call booklist frame \n\t\t\t\tBookListFrame window = new BookListFrame();\n\t\t\t\twindow.open();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tmnętmBookLists.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Business-Todo-List-icon.png\"));\n\t\tmnętmBookLists.setText(\"Book Lists\");\n\t\t\n\t\tMenuItem mnętmMemberList = new MenuItem(menu, SWT.NONE);\n\t\tmnętmMemberList.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call memberlistframe\n\t\t\t\tMemberListFrame window = new MemberListFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmnętmMemberList.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Misc-User-icon.png\"));\n\t\tmnętmMemberList.setText(\"Member List\");\n\t\t\n\t\tMenuItem mnętmNewItem = new MenuItem(menu, SWT.NONE);\n\t\tmnętmNewItem.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call rent list\n\t\t\t\tRentListFrame rlf=new RentListFrame();\n\t\t\t\trlf.open();\n\t\t\t}\n\t\t});\n\t\tmnętmNewItem.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Time-And-Date-Calendar-icon.png\"));\n\t\tmnętmNewItem.setText(\"Rent List\");\n\t\t\n\t\tButton btnNewButton = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call booksettingsframe\n\t\t\t\tBookSettingsFrame window = new BookSettingsFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Printing-Books-icon.png\"));\n\t\tbtnNewButton.setBounds(160, 176, 114, 112);\n\t\t\n\t\tButton btnNewButton_1 = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call membersettingsframe\n\t\t\t\tMemberSettingsFrame window = new MemberSettingsFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_1.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton_1.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Add-User-icon.png\"));\n\t\tbtnNewButton_1.setBounds(367, 176, 114, 112);\n\t\t\n\t\tButton btnNewButton_2 = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tRentingFrame rf=new RentingFrame();\n\t\t\t\trf.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_2.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton_2.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Business-Statistics-icon.png\"));\n\t\tbtnNewButton_2.setBounds(567, 176, 114, 112);\n\n\t}", "@Override\n\tprotected void initializePopupFields(Owner data) {\n\t}", "@Override\n public void Create() {\n\n initView();\n }", "public void showOptions() {\n this.popupWindow.showAtLocation(this.layout, 17, 0, 0);\n this.customview.findViewById(R.id.dialog).setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n DiscussionActivity.this.popupWindow.dismiss();\n }\n });\n this.pdf.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n DiscussionActivity discussionActivity = DiscussionActivity.this;\n discussionActivity.type = \"pdf\";\n discussionActivity.showPdfChooser();\n DiscussionActivity.this.popupWindow.dismiss();\n }\n });\n this.img.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n DiscussionActivity discussionActivity = DiscussionActivity.this;\n discussionActivity.type = ContentTypes.EXTENSION_JPG_1;\n discussionActivity.showImageChooser();\n DiscussionActivity.this.popupWindow.dismiss();\n }\n });\n this.cancel.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n DiscussionActivity.this.popupWindow.dismiss();\n }\n });\n }", "private void createContents() {\r\n\t\tshlOProgramie = new Shell(getParent().getDisplay(), SWT.DIALOG_TRIM\r\n\t\t\t\t| SWT.RESIZE);\r\n\t\tshlOProgramie.setBackground(SWTResourceManager.getColor(255, 255, 255));\r\n\t\tshlOProgramie.setText(\"O programie\");\r\n\t\tshlOProgramie.setSize(386, 221);\r\n\t\tint x = 386;\r\n\t\tint y = 221;\r\n\t\t// Get the resolution\r\n\t\tRectangle pDisplayBounds = shlOProgramie.getDisplay().getBounds();\r\n\r\n\t\t// This formulae calculate the shell's Left ant Top\r\n\t\tint nLeft = (pDisplayBounds.width - x) / 2;\r\n\t\tint nTop = (pDisplayBounds.height - y) / 2;\r\n\r\n\t\t// Set shell bounds,\r\n\t\tshlOProgramie.setBounds(nLeft, nTop, x, y);\r\n\t\tsetText(\"O programie\");\r\n\r\n\t\tbtnZamknij = new Button(shlOProgramie, SWT.PUSH | SWT.BORDER_SOLID);\r\n\t\tbtnZamknij.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseUp(MouseEvent e) {\r\n\t\t\t\tshlOProgramie.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnZamknij.setBounds(298, 164, 68, 23);\r\n\t\tbtnZamknij.setText(\"Zamknij\");\r\n\r\n\t\tText link = new Text(shlOProgramie, SWT.READ_ONLY);\r\n\t\tlink.setBackground(SWTResourceManager.getColor(230, 230, 250));\r\n\t\tlink.setBounds(121, 127, 178, 13);\r\n\t\tlink.setText(\"Kontakt: wtrocki@gmail.com\");\r\n\r\n\t\tCLabel lblNewLabel = new CLabel(shlOProgramie, SWT.BORDER\r\n\t\t\t\t| SWT.SHADOW_IN | SWT.SHADOW_OUT | SWT.SHADOW_NONE);\r\n\t\tlblNewLabel.setBackground(SWTResourceManager.getColor(230, 230, 250));\r\n\t\tlblNewLabel.setBounds(118, 20, 248, 138);\r\n\t\tlblNewLabel\r\n\t\t\t\t.setText(\" Kalkulator walut ver 0.0.2 \\r\\n -------------------------------\\r\\n Program umo\\u017Cliwiaj\\u0105cy pobieranie\\r\\n aktualnych kurs\\u00F3w walut ze strony nbp.pl\\r\\n\\r\\n Copyright by Wojciech Trocki.\\r\\n\");\r\n\r\n\t\tLabel lblNewLabel_1 = new Label(shlOProgramie, SWT.NONE);\r\n\t\tlblNewLabel_1.setBackground(SWTResourceManager.getColor(255, 255, 255));\r\n\t\tlblNewLabel_1.setImage(SWTResourceManager.getImage(\"images/about.gif\"));\r\n\t\tlblNewLabel_1.setBounds(10, 20, 100, 138);\r\n\t}", "public void showLifeCycleDialog() {\n\t\t\tlifeCycleDialogBox = new DialogBox(true);\n\t\t\tlifeCycleDialogBox.setGlassEnabled(true);\n\t\t\tlifeCycleDialogBox.setText(\"Seguimiento del Documento\");\n\n\t\t\t// Vertical Panel\n\t\t\tVerticalPanel vp = new VerticalPanel();\n\t\t\tvp.setSize(\"100%\", \"100%\");\n\t\t\tvp.add(lifeCycleCellTree);\n\t\t\tvp.add(new HTML(\"&nbsp;\"));\n\t\t\tvp.add(lifeCycleCloseButton);\n\n\t\t\t// Scroll Panel\n\t\t\tScrollPanel scrollPanel = new ScrollPanel();\n\t\t\tif (getUiParams().isMobile())\n\t\t\t\tscrollPanel.setSize(Window.getClientWidth() + \"px\", Window.getClientHeight() + \"px\");\n\t\t\telse\n\t\t\t\tscrollPanel.setSize(Window.getClientWidth() * .4 + \"px\", Window.getClientHeight() * .3 + \"px\");\n\t\t\tscrollPanel.setWidget(vp);\n\t\t\tlifeCycleDialogBox.setWidget(scrollPanel);\n\n\t\t\tDouble d = Window.getClientWidth() * .3;\n\t\t\tif (!getUiParams().isMobile()) \n\t\t\t\tlifeCycleDialogBox.setPopupPosition(d.intValue(), UiTemplate.NORTHSIZE * 3);\n\n\t\t\tlifeCycleDialogBox.show();\n\t\t}", "@Override\n public void onSureClick(final String pwd) {\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, pwd);\n }\n });\n numPadPopWindow.show();\n\n\n }", "public PopupButton() {\r\n super(null);\r\n \r\n setAction(new AbstractAction() {\r\n\r\n \tprivate static final long serialVersionUID = 1L;\r\n\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n showPopup();\r\n }\r\n });\r\n \r\n String javaVersion = System.getProperties().getProperty(\r\n \"java.specification.version\");\r\n if (javaVersion.equals(\"1.3\")) {\r\n setBorderPainted(false);\r\n // This is needed specifically for JDK1.3 on Windows & Motif\r\n setMargin(new Insets(0,0,0,0));\r\n }\r\n }", "public void actionPerformed(ActionEvent evt) {\r\n super.actionPerformed(evt);\r\n createDialog().show();\r\n }" ]
[ "0.83576405", "0.74009454", "0.7306269", "0.7052009", "0.70131314", "0.69473904", "0.68138343", "0.68043387", "0.6760074", "0.6714683", "0.6696917", "0.6658852", "0.66218406", "0.65606934", "0.65552527", "0.65133345", "0.6492371", "0.64739877", "0.64393646", "0.6421206", "0.6390909", "0.6333371", "0.63315", "0.6327369", "0.63064694", "0.6281246", "0.6278249", "0.6271723", "0.62690884", "0.62585336", "0.624835", "0.62451005", "0.62442315", "0.6234424", "0.6214921", "0.6198159", "0.61957777", "0.6181976", "0.61807126", "0.6161485", "0.61590457", "0.61444795", "0.6130774", "0.61220556", "0.6120069", "0.61074686", "0.61069524", "0.60860085", "0.60841674", "0.60795444", "0.6077", "0.6074714", "0.60744953", "0.60580516", "0.60537946", "0.60457623", "0.6045261", "0.6019941", "0.60152155", "0.6011096", "0.60094744", "0.600862", "0.59985477", "0.59737986", "0.59644204", "0.59643036", "0.5958773", "0.59510696", "0.5941475", "0.59379995", "0.59317493", "0.59218067", "0.5920262", "0.5918771", "0.5907861", "0.59074295", "0.5903581", "0.5900951", "0.58856463", "0.58819467", "0.58787835", "0.5874672", "0.58746046", "0.5873577", "0.58718485", "0.58692884", "0.58596176", "0.5858488", "0.58555794", "0.58548975", "0.585109", "0.58496845", "0.5848654", "0.5848394", "0.5845893", "0.5843764", "0.5842547", "0.5841607", "0.58337206", "0.583256", "0.5832218" ]
0.0
-1
~ Methods DOCUMENT ME!
@Bean public RestTemplate createRestTemplate() { RestTemplate restTemplate = new RestTemplate(); List<HttpMessageConverter<?>> converters = new ArrayList<>(); MappingJackson2HttpMessageConverter jsonConverter = new MappingJackson2HttpMessageConverter(); jsonConverter.setObjectMapper(objectMapper); converters.add(jsonConverter); restTemplate.setMessageConverters(converters); return restTemplate; }
{ "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\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "private stendhal() {\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public void mo4359a() {\n }", "public void mo38117a() {\n }", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void smell() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "public void mo55254a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\n protected void getExras() {\n }", "public void Tyre() {\n\t\t\r\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "private void kk12() {\n\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "public void furyo ()\t{\n }", "@Override\n\tpublic void function() {\n\t\t\n\t}", "@Override\n public int describeContents() { return 0; }", "public void method_4270() {}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public void mo21793R() {\n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "private void getStatus() {\n\t\t\n\t}", "public void mo21877s() {\n }", "@Override\n protected void prot() {\n }", "public void mo21779D() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void mo21825b() {\n }", "public void mo21791P() {\n }", "public void mo97908d() {\n }", "public void Data(){\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override public int describeContents() { return 0; }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "private void m50366E() {\n }", "public void mo6081a() {\n }", "private void strin() {\n\n\t}", "public void mo21785J() {\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "public void mo9848a() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "public void mo21782G() {\n }", "public void mo115190b() {\n }", "protected void mo6255a() {\n }", "public void mo21794S() {\n }", "public void mo21878t() {\n }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "public void mo12930a() {\n }", "public void m23075a() {\n }", "private Rekenhulp()\n\t{\n\t}", "public void mo3376r() {\n }", "Constructor() {\r\n\t\t \r\n\t }", "private void poetries() {\n\n\t}", "public abstract void mo70713b();", "public void mo21795T() {\n }", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "public void stg() {\n\n\t}", "public void mo21792Q() {\n }", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "void mo57277b();", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "public abstract void mo56925d();", "public void identify() {\n\n\t}", "public void skystonePos4() {\n }" ]
[ "0.6693163", "0.6599193", "0.65452605", "0.6457111", "0.6457111", "0.6390346", "0.6386034", "0.6386034", "0.63794714", "0.6378607", "0.6368326", "0.6349912", "0.63292307", "0.6307504", "0.62783766", "0.6277054", "0.6269651", "0.62534136", "0.61828816", "0.61726457", "0.61420083", "0.61359733", "0.6131429", "0.61008805", "0.6100184", "0.60858166", "0.60858166", "0.60858166", "0.60858166", "0.60858166", "0.60858166", "0.60858166", "0.60794365", "0.6069071", "0.60608625", "0.6034", "0.60212934", "0.6011048", "0.6000283", "0.5999676", "0.599751", "0.5993218", "0.5990004", "0.5983952", "0.5981126", "0.5969214", "0.59680736", "0.59674126", "0.5963391", "0.5962", "0.59477496", "0.59463364", "0.5945176", "0.5933149", "0.59243906", "0.59234196", "0.59099764", "0.5901718", "0.58877367", "0.58798414", "0.5879506", "0.5878493", "0.5876043", "0.5868485", "0.5860574", "0.5860177", "0.58567315", "0.58554065", "0.585395", "0.5850714", "0.5850714", "0.58422333", "0.58404446", "0.58384854", "0.5828948", "0.58242226", "0.58235466", "0.58196217", "0.5816851", "0.58167326", "0.5811513", "0.5808128", "0.58030844", "0.5802169", "0.57908404", "0.5786926", "0.5775084", "0.57707703", "0.57635635", "0.575375", "0.5744366", "0.5742925", "0.5741012", "0.5734858", "0.57296145", "0.57227504", "0.57224405", "0.5721165", "0.5715295", "0.5714262", "0.571196" ]
0.0
-1
Iterable Ot = this.orderImesRepository.findAll(); items.forEach(item> System.out.println(item));
public List<Register> testTimeQuery(){ NativeSearchQueryBuilder queryBuilder = new NativeSearchQueryBuilder(); queryBuilder.withQuery(QueryBuilders.rangeQuery("order_time").gt("2016-11-01T00:00:00.000Z")); // 初始化分页参数 int page =50; int size =3000; // 设置分页参数 queryBuilder.withPageable(PageRequest.of(page, size)); // 执行搜索,获取结果 Page<OrderImes> Ot = this.orderImesRepository.search(queryBuilder.build()); List<Register> Rt = new ArrayList<Register>(); System.out.println(Ot.getTotalElements()); // List<Page<Test>> Lt=new ArrayList<Page<Test> >(); // Page<JtSelfRegisterDay> Jt = this.jtSelfRegisterDayRepository.search(queryBuilder.build()); for (OrderImes O:Ot) { SearchQuery searchQuery1=new NativeSearchQueryBuilder().withQuery(QueryBuilders.matchQuery("meid",O.getImes())).build(); //System.out.println(J.getRow_id().getClass()); List<Register> Te = elasticsearchTemplate.queryForList(searchQuery1, Register.class); //System.out.println(Te.size()); for (int i = 0; i <Te.size() ; i++) { Rt.add(Te.get(i)); } } System.out.println(Rt.size()); return Rt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n // @Ignore\r\n public void showOrders()\r\n {\r\n System.out.println(\"----- showOrders -----\");\r\n\r\n OrderRepository orderRepository = new OrderRepository();\r\n orderRepository.entityManager = this.entityManager;\r\n\r\n List<Order> orders = orderRepository.findAll();\r\n for (Order order : orders)\r\n {\r\n System.out.println(order.toDebugString());\r\n for (OrderLine orderLine : order.getOrderLines())\r\n {\r\n System.out.println(\" \" + orderLine.toDebugString());\r\n }\r\n }\r\n }", "public List<MainItemOrdered> findAll();", "public List<OrderItem> findAllOrderItem(){\n List<OrderItem> orderItems=findAll();\n return orderItems;\n }", "List<Order> findAll();", "List<ItemPedido> findAll();", "public void testFindByEstado() {\n// Iterable<Servico> servicos = repo.findByEstado(EstadoEspecificacao.INCOMPLETO, NrMecanografico.valueOf(\"1001\"));\n// servicos.forEach(s -> System.out.println(s.identity()));\n }", "@Test\n public void testJPA3ListAll (){\n Iterable<TruckInfo> trucklist = truckRepo.findAll();\n\n\n\n\n }", "public List<TodoItemEntity> findAll(){\n return todoItemRepository.findAll();\n }", "Iterable<T> findAll();", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\t\n\tpublic List<Orderi> findAll() {\n\t\treturn (List<Orderi>)getHibernateTemplate()\n\t\t.find(\"from Orderi\");\n\t}", "@Test\n void contextLoads() {\n\n List<BrandEntity> list=brandService.list(new QueryWrapper<BrandEntity>().eq(\"brand_id\",1));\n list.stream().forEach(item->{\n System.out.println(item);\n });\n }", "@Test\n public void sTest(){\n List<Account> accounts = as.findAllAccount ();\n for (Account account : accounts) {\n System.out.println (account);\n }\n }", "public abstract List<CustomerOrder> findAll();", "List<T> findAll() ;", "public List<OrderItem> findAllOrderItems()\n\t{\n\t\tList<OrderItem> list=orderItemDAO.findAll();\n\t\treturn list;\n\t}", "@Test\r\n public void testGetALL() {\r\n CategoriaDAO instance = new CategoriaDAO();\r\n List<Categoria> result = instance.getALL();\r\n Categoria itera = new Categoria();\r\n Iterator it = result.iterator();\r\n while (it.hasNext()) {\r\n itera = (Categoria) it.next();\r\n System.out.println(itera.getIdcategoria() + \" \" + itera.getDescricao());\r\n }\r\n }", "@Transactional(readOnly = true)\n public List<OrderItems> findAll() {\n log.debug(\"Request to get all OrderItems\");\n return orderItemsRepository.findAll();\n }", "@Override\n\tpublic void run(String... args) throws Exception {\n\t\tproduitRepository.findAll().forEach(p ->{\n\t\t\tSystem.out.println(p.getDesignation());\n\t\t});\n\t\t\n\t}", "public List<E> findAll() ;", "List<E> findAll();", "List<E> findAll();", "List<E> findAll();", "public interface ItemRepository extends CrudRepository<Item, Integer> {\n\n Iterable<Item> findByDescription(String description);\n}", "@Test\n\tpublic void findAll() {\n\t\tList<Farm> list = (List<Farm>) farmRepository.findAll();\n\n\t\tSystem.out.println(\"info:\"+ list);\n\t\tassert(true);\n\n\t}", "@Test\n public void testFindAll() {\n List<Item> items = repository.findAll();\n assertEquals(3, items.size());\n }", "@PostConstruct\r\n public void init() {\n\r\n System.out.println(repository.findAll());\r\n\r\n }", "public static void main(String[] args) {\n ProductsDAO pdao = new ProductsDAO();\n\n //System.out.println(odao.findOrderById(new BigDecimal(112968)).getProduct());\n Products p = pdao.findBroductsById(\"2A45C\");\n System.out.println(p);\n p.getOrders().forEach(System.out::println);\n }", "public List<E> findAll();", "@Test\n public void test3FindAll() {\n SpecialityFactory factory = new MysqlSpecialityDAOFactry();\n SpecialityDAO dao = factory.create();\n List<SpecialityDTO> lista=(List<SpecialityDTO>)dao.findAll(); \n System.out.println(lista);\n assertTrue(!lista.isEmpty());\n }", "@Test\n public void findAll() {\n // SalesRep:\n List<SalesRep> salesRepList = salesRepRepository.findAll();\n assertEquals(2, salesRepList.size());\n assertEquals(\"Pepe\", salesRepList.get(0).getName());\n // Leads:\n List<Lead> leadList = leadRepository.findAll();\n assertEquals(3, leadList.size());\n assertEquals(\"María\", leadList.get(0).getName());\n // Opportunities:\n List<Opportunity> opportunityList = opportunityRepository.findAll();\n assertEquals(3, opportunityList.size());\n assertEquals(5, opportunityList.get(0).getQuantity());\n // Account:\n List<Account> accountList = accountRepository.findAll();\n assertEquals(2, accountList.size());\n assertEquals(20, accountList.get(0).getEmployeeCount());\n }", "List<T> findAll();", "List<T> findAll();", "List<T> findAll();", "@Transactional(readOnly = true) \r\n public List<OsiMenuEntriesDTO> findAll() {\r\n log.debug(\"Request to get all OsiMenuEntries\");\r\n /* List<OsiMenuEntriesDTO> result = osiMenuEntriesRepository.findAll().stream()\r\n .map(osiMenuEntriesMapper::osiMenuEntriesToOsiMenuEntriesDTO)\r\n .collect(Collectors.toCollection(LinkedList::new));\r\n\r\n return result;*/\r\n return null;\r\n }", "public java.util.List<SitbMoneyCollection> findAll();", "public List<Persona> todasLasPersonas(){\n\n Iterable<Persona> ite=repo.findAll();\n Iterator<Persona> it=ite.iterator();\n List<Persona> actualList = new ArrayList<Persona>();\n while (it.hasNext()) {\n actualList.add(it.next());\n }\n\n return actualList;\n }", "List<Product> findAll();", "List<Product> findAll();", "private void printAllItems() {\n Set<ClothingItem> items = ctrl.getAllItems();\n items.stream().forEach(System.out::println);\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}", "@Test\r\n\t@Transactional\r\n\tpublic void test(){\n\t\t\r\n\t\tList<Foo> foos = dao.findAll();\r\n\t\tfor (Foo foo : foos) {\r\n\t\t\tSystem.out.println( foo.getName() );\r\n\t\t}\r\n\t}", "List<ItemStockDO> selectAll();", "Collection<T> findAll();", "@Test\n public void testFindAll()\n {\n final List<Invoice> invoices = invoiceRepository.findAll();\n\n Assert.assertFalse(invoices.isEmpty());\n\n for (final Invoice invoice : invoices)\n {\n Assert.assertNotNull(invoice.getDate());\n Assert.assertNotNull(invoice.getID());\n Assert.assertNotNull(invoice.getTotal());\n }\n }", "Collection<T> findAll(Iterable<I> ids);", "List<Book> findAll();", "public List<Item> getAll() {\r\n List<Item> list = new ArrayList<Item>();\r\n //Transaction trans = null;\r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n\r\n try {\r\n //trans = session.beginTransaction();\r\n\r\n list = session.createQuery(\"from Item\").list();\r\n\r\n //trans.commit();\r\n } catch (HibernateException e) {\r\n //if (trans != null) { trans.rollback(); }\r\n e.printStackTrace();\r\n } finally {\r\n //session.flush();\r\n session.close();\r\n }\r\n return list;\r\n }", "List<Bill> findAll();", "Collection<Order> getAll();", "List<BInformation> findAll();", "public List<TypeGlazing> findAllOrderById() throws GenericPersistenceEAOException;", "public List<Product> findAll();", "public java.util.List<Todo> findAll();", "Iterable<Person> getList() throws DataAccessException;", "public List<CbmCItemFininceItem> findAll();", "List<OrderPO> selectAll();", "List<T> findAll() throws Exception;", "@Override\n public List<Promocion> findAll() {\n return promocionRepository.findAll();\n }", "@Test\n public void getAllTest() {\n Mockito.when(this.repo.findAll()).thenReturn(publisherList);\n Iterable<Publisher> resultFromService = this.publisherService.findAll();\n Publisher resultFromIterator = resultFromService.iterator().next();\n assertThat(resultFromIterator.getName()).isEqualTo(\"What The What\");\n Mockito.verify(this.repo, Mockito.times(1)).findAll();\n }", "public void listar()\n\t{\n\t\tdatabase.list().forEach(\n\t\t\t(entidade) -> { IO.println(entidade.print() + \"\\n\"); }\n\t\t);\n\t}", "@Override\npublic List<Cart> selectAllOrder() {\n return cartDao.selectAllOrder();\n}", "@Override\n public Iterator<Item> findAll(Context context) throws SQLException\n {\n return itemDAO.findAll(context, true);\n }", "List<Price> findAll();", "public void listOrders() {\n\t\tSystem.out.println(\"\\nMostrant tots els orders\");\n\t\tObjectSet<Order> orders = db.query(Order.class);\n\t\torders.stream()\n\t\t\t.peek(System.out::println)\n\t\t\t.flatMap(o -> o.getDetails().stream())\n\t\t\t.forEach(System.out::println);\n\t}", "@Override\n\tpublic List<item> findAll() {\n\t\treturn donkyClientFeign.lista().stream().map(p -> new item(p,1)).collect(Collectors.toList());\n\t}", "List<Chofer> findAll();", "@Transactional(readOnly = true)\n public List<OrderDto> findAll() {\n var orders = repository.findOrdersWithProducts();\n return orders.stream().map(order -> new OrderDto(order)).collect(Collectors.toList());\n }", "@Override\n\tpublic List<Item> findItemList() {\n\t\tCriteriaBuilder cb=entityManager.getCriteriaBuilder();\n\t\tCriteriaQuery<Item> query = cb.createQuery(Item.class); \n // Root<Item> item = query.from(Item.class);\n List<Item> itemList= entityManager.createQuery(query).getResultList();\n\t\treturn itemList;\n\t}", "public interface OrderDao {\n List<Order> findAllOrders();\n}", "List<Order> getAll();", "public List<Employee> listAll(){\n return employeeRepository.findAll();\n }", "List<CheckoutProduct> findAll();", "public void retrieveOrderContentById_Order(int i) {\n\t\tSystem.out.println(\"\\nMostrat detalls del Order \" + i);\n\t\tObjectSet result = db.queryByExample(new Order(i, null, null, null, null));\n\t\t\n\t\tOrder aConsultar = (Order) result.next();\n\t\taConsultar.getDetails().stream()\n\t\t\t\t.forEach(System.out::println);\n\t}", "public List<Article> findAll();", "public interface OrderItemRepository extends JpaRepository<OrderItem, Integer>, JpaSpecificationExecutor {\n\t@Query(\"SELECT oi FROM OrderItem oi WHERE oi.order.orderId = ?1\")\n\tList<OrderItem> findByOrderId(String orderId);\n}", "Foreach createForeach();", "List<E> findAll(Iterable<ID> identifiers);", "@GetMapping(\"\")\n public Iterable<Donut> returAllDonuts(){\n\n return this.donutRepository.findAll();\n\n }", "public Items[] findAll() throws ItemsDaoException;", "public void consultarEditorialesDAO() {\n Collection<Editorial> editoriales = em.createQuery(\"SELECT e\"\n + \" FROM Editorial e\").getResultList();\n\n //Iteramos entre autores\n for (Editorial e : editoriales) {\n\n System.out.println(e.getNombre());\n\n }\n\n }", "@Override\n\tpublic Iterable<Sach> findAll() {\n\t\treturn sachRepository.findAll();\n\t}", "public Collection findAll() throws InfrastructureException {\r\n\t\tCollection col;\r\n\t\ttry {\r\n\t\t\tlogger.debug(\"findAll ini\");\r\n\t\t\tcol = getHibernateTemplate().find(\"from Trasllat as tdi order by tdi.id\");\t\t\t\r\n\t\t} catch (HibernateException ex) {\r\n\t\t\tlogger.error(\"findAll failed\", ex);\r\n\t\t\tthrow new InfrastructureException(ex);\r\n\t\t}\r\n\t\tlogger.debug(\"findAll fin\");\r\n\t\treturn col;\r\n\t}", "@Override\n\tList<Item> findAll(Sort sort);", "public static void main(String[] args) {\n String quey = \"select * from places p, branches b where b.place = p.id_place and p.place_name like 'TUNJA' \";\n //String quey = \"select * from branches \";\n List list = ModuleQueryController.findData(quey);\n \n for (Object l : list){\n System.out.println(l);\n //if(l instanceof Branch){\n // Branch p = (Branch) l;\n // System.out.println(p);\n //}\n //Object yourObject = (Object) SerializationUtils.deserialize(l);\n }\n System.out.println(list);\n }", "@Override\r\npublic List<Order> getallorders() {\n\treturn productdao.getalloderds();\r\n}", "@Test\n public void test2(){\n\n List<FitActivity> upper = fitActivityRepository.findAllByBodyPart(\"Upper\");\n for (FitActivity fitActivity : upper) {\n System.out.println(fitActivity.getName());\n\n }\n\n }", "@Test\n public void selectAll() {\n List<ProductCategory>productCategories=categoryService.selectAll();\n for (ProductCategory productCategory:productCategories\n ) {\n System.out.println(productCategory);\n }\n }", "List<StockList> fetchAll();", "public TireList findOrderedItems(){\n \n try{\n sql = \"Select * From OrderedItems Where OrderID = \" + getOrderID();\n ResultSet resultSetOrder = db.SelectDB(sql);\n \n Tire orderedTire;\n while(resultSetOrder.next()){\n orderedTire = new Tire();\n orderedTire.setQuantity(resultSetOrder.getInt(\"Quantity\"));\n ResultSet resultSetTire = db.SelectDB(\"Select * From Tire Where TireID = \" + resultSetOrder.getString(\"TireID\"));\n while(resultSetTire.next()){\n orderedTire.setStockID(resultSetTire.getString(\"TireID\"));\n orderedTire.setType(resultSetTire.getString(\"TireType\"));\n orderedTire.setSize(resultSetTire.getString(\"TireSize\"));\n orderedTire.setBrand(resultSetTire.getString(\"Brand\"));\n orderedTire.setStock(resultSetTire.getString(\"Stock\"));\n orderedTire.setPrice(resultSetTire.getString(\"Price\"));\n orderedTire.setVehicleType(resultSetTire.getString(\"VehicleType\"));\n orderedItems.addItem(orderedTire);\n }\n }\n }\n catch(SQLException e){\n System.out.println(\"Error generating list of Orders: \" + e);\n }\n return orderedItems;\n }", "public List<Employee> listAllCrud(){\n return employeeCrudRepository.findAll();\n }", "public static List<Item> findAll() {\n\t\treturn getPersistence().findAll();\n\t}", "public interface ItemDAO extends DSpaceObjectDAO<Item> {\n\n public Iterator<Item> findAll(Context context, boolean archived) throws SQLException;\n\n public Iterator<Item> findAll(Context context, boolean archived, boolean withdrawn) throws SQLException;\n\n public Iterator<Item> findBySubmitter(Context context, EPerson eperson) throws SQLException;\n\n public Iterator<Item> findByMetadataField(Context context, MetadataField metadataField, String value, boolean inArchive) throws SQLException;\n\n public Iterator<Item> findByAuthorityValue(Context context, MetadataField metadataField, String authority, boolean inArchive) throws SQLException;\n\n public Iterator<Item> findArchivedByCollection(Context context, Collection collection, Integer limit, Integer offset) throws SQLException;\n\n public Iterator<Item> findAllByCollection(Context context, Collection collection) throws SQLException;\n\n}", "@Override\n public List<Order> findOrders() {\n return orderRepository.findAll(Sort.by(Sort.Direction.DESC, \"created\")).stream()\n .filter(t -> t.getOrder_state().equals(\"ACTIVE\"))\n .map(mapper::toDomainEntity)\n .collect(toList());\n }", "@Override\n public Iterator<Entity> iterator() {\n return entities.iterator();\n }", "@Override\n @Transactional(readOnly = true)\n public List<OrdreDTO> findAll() {\n log.debug(\"Request to get all Ordres\");\n return ordreRepository.findAll().stream()\n .map(ordreMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }", "public static void main(String[] args) {\n\n DAOManager m = new DAOManager();\n ArrayList<Person> pList = m.selectPerson1();\n\n\n\n for (Person person : pList) {\n System.out.println(person.toString());\n\n }\n }", "@Override\r\n public List<Product> findAll() {\r\n return productRepository.findAll();\r\n }", "public interface AuditoriumRepository {\n Collection<Auditorium> getAll();\n}", "@Override\n\tpublic List<Item> findItemListByQuery() {\n\t\tCriteriaBuilder cb=entityManager.getCriteriaBuilder();\n\t//\tCriteriaQuery<Item> query = cb.createQuery(Item.class); \n // Root<Item> item = query.from(Item.class);\n TypedQuery<Item> iquery=entityManager.createQuery(\"select i from Item i\", Item.class);\n\t\treturn iquery.getResultList();\n\t\t\n\t}", "List<InvoiceDTO> fetchAll();", "@Override\n\tpublic Iterable<Oglas> findAll() {\n\t\treturn repository.findAll();\n\t}" ]
[ "0.7101327", "0.70441365", "0.67661476", "0.6667541", "0.65792465", "0.6569895", "0.6548855", "0.64692616", "0.6468109", "0.63889927", "0.6382064", "0.6356192", "0.632856", "0.6325102", "0.63055724", "0.6290366", "0.6290293", "0.62473553", "0.62322706", "0.623176", "0.623176", "0.623176", "0.62163204", "0.6199928", "0.617412", "0.6147943", "0.61190784", "0.60602033", "0.6052696", "0.6049583", "0.6049559", "0.6049559", "0.6049559", "0.6045984", "0.6033643", "0.6023061", "0.6021769", "0.6021769", "0.6019732", "0.60166234", "0.60129845", "0.60100687", "0.60065436", "0.60057974", "0.5993226", "0.59815854", "0.5967248", "0.59663683", "0.59532416", "0.59432626", "0.5941386", "0.5922074", "0.59188735", "0.5914453", "0.58926004", "0.5887458", "0.5881125", "0.5879011", "0.58784795", "0.58698213", "0.5865041", "0.5858583", "0.5850579", "0.58424807", "0.58316916", "0.5812356", "0.58097714", "0.5801658", "0.57998365", "0.57984567", "0.57978386", "0.57965434", "0.57931167", "0.57913077", "0.5783423", "0.57807773", "0.57619447", "0.5760854", "0.57587075", "0.57499635", "0.5746616", "0.57438046", "0.57402074", "0.573972", "0.5733902", "0.57251567", "0.5720832", "0.57198745", "0.5719502", "0.57180375", "0.571587", "0.57078594", "0.57023335", "0.56960905", "0.5695999", "0.5688652", "0.56868094", "0.56809705", "0.5674402", "0.56737375", "0.56589174" ]
0.0
-1
This method is the entry point for the program Here I create a engine and set the EngineOptions needed by the constructor of the engine return the engine to the environment
@Override public Engine onLoadEngine(){ mEngine=new Engine(new EngineOptions(true, ScreenOrientation.PORTRAIT, new FillResolutionPolicy(), new Camera(0, 0, MoveBackground.WIDTH, MoveBackground.height))); return mEngine; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void initEngine() {\n \n }", "@Override\n public void initEngine() {\n \n }", "public Engine() {\n super(0,0,0,0,null, \"ENGINE\");\n }", "public void setEngine(Engine engine);", "public static void main(String[] args) {\n \t\tnew CoreEngine();\n \t}", "void start() throws EngineException;", "private Engine() {\n\n }", "public void setEngine(Engine engine) {\n this.engine = engine;\n }", "private void initializeEngine() {\n engine.setDecayDelay(emotionalAgent.decayTimeMillis());\n\n // Get decay steps parameter from ADF if exists and set decay steps in engine\n engine.setDecaySteps(emotionalAgent.decayStepsToMin());\n\n // Set engine initialized\n engine.setInitialized(true);\n }", "public void gameEngineInitializer() {\n\t\t\r\n\t\tthis.sputacchioGameEngine = new SputacchioGameEngine(supportDeck, mainDeck, mainBoard, players, gamestate, playerDoingTurnNumber);// da implementare alla fine\r\n\t\tthis.classicGameEngine = new ClassicGameEngine(supportDeck, mainDeck, mainBoard, players, gamestate, playerDoingTurnNumber, engineUtility, filter);\r\n\t\t\r\n\t\tthis.gamestate.setCurrentGameType(GameType.CLASSICGAME);//si dovrebbe iniziare dal cucù ma facciamo dopo\r\n\t\tthis.gamestate.setCurrentHandNumber(INITIALHANDNUMBER);\r\n\t\tthis.givePersonalJolly();\r\n\t\t\r\n\t\tthis.classicGameEngine.distributeHands();//queste due si fanno all'inizio di ogni mano, non sono da fare solo la prima volta e basta\r\n\t\tthis.classicGameEngine.substituteJolly();\r\n\t\t\r\n\t\tmainEngine();\r\n\t\t//TODO ci vuole un metodo che, a parte la prima chiamata di Server Room, chiama il sotto-engine giusto in base a game type. Se classic game engine fa una return per segnalare\r\n\t\t//che la mano è finita perchè nessuno ha carte in mano, game engine deve ridare le 6 carte o settare l'ultima mano, o la mano della scala obbligatoria, e cambiare chi inizia a cucù.\r\n\t\t//Poi penso che debba chiamare Filter per mostrare a entrambi cosa accade, stampare le nuove carte e dichiarare l'inizio del cucù.\r\n\t}", "@Override\r\n\tpublic void engine() {\n\t\t\r\n\t}", "void init(@NotNull final AIEngine engine);", "private WrappedEngine() {\n logger = new ONDEXCoreLogger();\n addONDEXListener(logger);\n pluginLogger = new ONDEXPluginLogger();\n EnvironmentVariable ev = new EnvironmentVariable(\"ONDEX VAR=\" + Config.ondexDir);\n ev.setLog4jLevel(Level.INFO);\n fireEventOccurred(ev);\n }", "public void startEngine(){\r\n isEngineRunning = true;\r\n System.out.println(\"[i] Engine is running.\");\r\n }", "public StartupHandler(){\r\n\t\tloadGameFiles();\r\n\t\tnew Engine();\r\n\t}", "public static Engine getEngineInstance(String from, String to)\r\n\t\t\tthrows InitializeException {\r\n\t\tif (engineInstance == null) {\r\n\t\t\tEngineContext context = new EngineContext();\r\n\t\t\tProperties prop = loadConfig();\r\n\t\t\tcontext.config(prop);\r\n\t\t\tcontext.init(from, to);\r\n\t\t\tengineInstance = new Engine(context);\r\n\t\t}\r\n\t\treturn engineInstance;\r\n\t}", "public Engine() throws Exception {\n\t\t// User interface initialization\n\t\tif (Setting.LOCAL_MODE) {\n\t\t\ttry {\n\t\t\t\tSystem.out.println(\"Initializing the user interface\");\n\t\t\t\tui = new UserInterface(this);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\t// Scenario initialization\n\t\tscenario = new Scenario(ui);\n\n\t\t// load tool, drug and patient through scenario\n\t\tTool[] tools = scenario.readTool();\n\t\tDrug[] drugMap = scenario.readDrug();\n\t\tPatient patient = scenario.readPatient();\n\t\tif (Setting.LOCAL_MODE) {\n\t\t\tfor (Tool tool : tools) {\n\t\t\t\tui.addTool(tool);\n\t\t\t}\n\t\t\tui.addDrug(drugMap);\n\t\t\tui.setPatientInfo(patient);\n\t\t}\n\n\t\t// set simulator and evaluator\n\t\tsimulator = new Simulator(patient);\n\t\tevaluator = new Evaluator(this);\n\t\t// Start looping\n\t\ttimer.scheduleAtFixedRate(new CoreTimerTask(1000, this), 0, 1000);\n\t}", "public void setEngine(String engine) {\n this.engine = engine;\n }", "public static void main(String[] args) {\n Engine ry = new Engine();\n ry.interactWithKeyboard();\n // ry.interactWithKeyboard();\n\n }", "public void engine() {\n\t\tSystem.out.println(\"Follow engine guidelines\");\n\t}", "public void init() {\n\t\tif (!Rengine.versionCheck()) {\n\t\t System.err.println(\"** Version mismatch - Java files don't match library version.\");\n\t\t System.exit(1);\n\t\t}\n\t\t\n\t\tString[] args = {\"--vanilla\"};\n\t\tre = new Rengine(args, false, new TextConsole());\n\t\t\n\t\t// the engine creates R is a new thread, so we should wait until it's ready\n if (!re.waitForR()) {\n System.out.println(\"Cannot load R\");\n return;\n }\n\t\t\n\t}", "public static Engine getEngine(){\n Engine engine = null;\n try {\n engine = mapper.readValue(new File(Constants.ENGINE_FILE_PATH), Engine.class);\n } catch ( Exception e ) {\n e.printStackTrace();\n }\n return engine;\n }", "private void initializeEngine() {\n try {\n mRtcEngine = RtcEngine.create(getBaseContext(), getString(R.string.agora_app_id), mRtcEventHandler);\n } catch (Exception e) {\n Log.e(\"VIDEO.CALL\", Log.getStackTraceString(e));\n throw new RuntimeException(\"NEED to check rtc sdk init fatal error\\n\" + Log.getStackTraceString(e));\n }\n }", "public Main() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\r\n\t}", "private void testInitializeEngine() {\r\n\t\r\n\t\t/*\tInitialization of variables\t*/\r\n\t\tPointerByReference phEngine = new PointerByReference();\r\n\t\tint nScale = 16;\r\n\t\tint nMaxFace = 10;\r\n\t\tPointer pWorkMem = C_Library.INSTANCE.malloc(WORKBUF_SIZE);\r\n\t\t\r\n\t\t/*\tInitialization of engine\t*/\r\n\t\tNativeLong nRet = AFD_FSDK_Library.INSTANCE.AFD_FSDK_InitialFaceEngine(\r\n\t\t\t\tAPPID, SDKKey, pWorkMem, WORKBUF_SIZE, phEngine, \r\n\t\t\t\t_AFD_FSDK_OrientPriority.AFD_FSDK_OPF_0_HIGHER_EXT, nScale, nMaxFace\r\n\t\t);\r\n\t\t\r\n\t\t/*\tEngine assignment\t*/\r\n\t\tthis.phEngineFD = phEngine;\r\n\t\t\r\n\t\t/*\tPrint information\t*/\r\n\t\tSystem.out.println(\"Result of initialization of engine: \" + nRet.longValue());\r\n\t\tSystem.out.println(phEngine);\r\n\t\tSystem.out.println(phEngine.getPointer());\r\n\t\tSystem.out.println(phEngine.getValue());\r\n\t}", "private VelocityEngine createEngine(boolean withConversionsHandler)\n throws Exception\n {\n VelocityEngine ve = new VelocityEngine();\n ve.setProperty( Velocity.VM_PERM_INLINE_LOCAL, Boolean.TRUE);\n ve.setProperty(Velocity.RUNTIME_LOG_INSTANCE, log);\n ve.setProperty(RuntimeConstants.RESOURCE_LOADER, \"file\");\n ve.setProperty(RuntimeConstants.FILE_RESOURCE_LOADER_PATH, TEST_COMPARE_DIR + \"/conversion\");\n if (withConversionsHandler)\n {\n ve.setProperty(RuntimeConstants.EVENTHANDLER_METHODEXCEPTION, PrintException.class.getName());\n }\n else\n {\n ve.setProperty(RuntimeConstants.CONVERSION_HANDLER_CLASS, \"none\");\n }\n ve.init();\n\n return ve;\n }", "public Engine getEngine() {\n return engine;\n }", "@Override\r\n\tpublic void engine() {\r\n\t\t// TODO Auto-generated method stub\t\t\r\n\t}", "public static void main(String[] args) {\n \t// store the args\n \tcommandLineArgs = args;\n // the main routine is only here so I can also run the app from the command line\n engineLauncherInstance.initialize();\n Scanner sc = new Scanner(System.in);\n // wait until receive stop command from keyboard\n System.out.printf(\"Enter 'stop' to halt: \");\n while(!sc.nextLine().toLowerCase().equals(\"stop\"));\n if (!stopped.get()) {\n engineLauncherInstance.terminate();\n }\n sc.close();\n }", "public Engine(){\n name = \"Basic Engine\";\n moveDeduction = 1;\n }", "public static void main(String[] args) {\n\t\tEASE application = new EASE();\n\t}", "@Override\r\n public EngineInjection createEngineInjection() {\r\n return new Turbofan();\r\n }", "@Test\n\tpublic void addEngine_Test() throws Exception {\n\t\t\n\t\tif (Configuration.featureamp &&\n\t\t\t\tConfiguration.playengine &&\n\t\t\t\tConfiguration.choosefile &&\n\t\t\t\tConfiguration.mp3 &&\n\t\t\t\tConfiguration.gui &&\n\t\t\t\tConfiguration.skins &&\n\t\t\t\tConfiguration.light &&\n\t\t\t\tConfiguration.filesupport &&\n\t\t\t\tConfiguration.showtime &&\n\t\t\t\tConfiguration.tracktime \n\t\t\t\t) {\n\t\t\tstart();\n\t\t\t\n\t\t\tgui.addEngine();\t\n\t\t}\n\t}", "public interface Engine {\n\n String run();\n\n}", "protected TKExecutable(Engine pEngine) {\n\t\tsuper(pEngine);\n\t}", "@Test\n\tpublic void createJmeterEngine() {\n\t\ttry {\n\t\t\tString currentPath = new File(jmeterHomePath).getCanonicalPath();\n\t\t\tJMeterUtils.setJMeterHome(currentPath);\n\t\t\tSystem.out.println(\"Setting Jmeter Home: \" + currentPath);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.setProperty(JMeter.JMETER_NON_GUI, \"true\");\n\t\tjEngine = new StandardJMeterEngine();\n\t\tassertNotNull(jEngine);\n // jmeter.properties\n JMeterUtils.loadJMeterProperties(jmeterPropertiesFile);\n \t\tJMeterUtils.initLogging();// you can comment this line out to see extra log messages of i.e. DEBUG level\n\t\tJMeterUtils.initLocale();\n //return jEngine;\n\t}", "public void engineOn(){\n engine = true;\n }", "Analytics_Engine createAnalytics_Engine();", "public void init(GameEngine engine) throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException {\n\t\tif(this.engine != null) {\n\t\t\tthrow new IllegalStateException(\"The world has already been initialised.\");\n\t\t} else {\n\t\t\tthis.engine = engine;\n\t\t\tthis.eventManager = new EventManager(engine);\n\t\t\tthis.tickManager = new TickManager();\n\t\t\tthis.registerGlobalEvents();\n\t\t\tthis.loadConfiguration();\n\t\t}\n\t}", "private void startR() {\n\t\tif (!Rengine.versionCheck()) {\n\t\t\tSystem.err.println(\"** Version mismatch - Java files don't match library=version.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tSystem.out.println(\"Creating Rengine\");\n\t\tString[] Rargs = {\"--vanilla\"};\n\t\tre= new Rengine(Rargs, false, null);//new TextConsole());\n\t\tSystem.out.println(\"Rengine created, waiting for R\");\n\t\t// the engine creates R is a new thread, so we should wait until it's ready\n\t\tif (!re.waitForR()) {\n\t\t\tSystem.out.println(\"Cannot load R\");\n\t\t\treturn;\n\t\t}\n\t}", "public void EngineInit() {\n TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() {\n public X509Certificate[] getAcceptedIssuers() {\n return new X509Certificate[] {};\n }\n\n public void checkClientTrusted(X509Certificate[] chain,\n String authType) throws CertificateException {\n }\n\n public void checkServerTrusted(X509Certificate[] chain,\n String authType) throws CertificateException {\n }\n } };\n\n try {\n\n\n //取得SSL的SSLContext实例\n SSLContext sslContext = SSLContext.getInstance(\"TLS\");\n sslContext.init(null,trustAllCerts,new java.security.SecureRandom());\n sslEngine = sslContext.createSSLEngine();\n sslEngine.setUseClientMode(true);\n\n } catch(NoSuchAlgorithmException e) {\n } catch(KeyManagementException e) {\n }\n SSLSession session = sslEngine.getSession();\n int appBufferMax = session.getApplicationBufferSize();\n int netBufferMax = session.getPacketBufferSize();\n Log.i(\"123\", \"EngineInit: appBufferMax:\"+appBufferMax + \"netBufferMax:\"+netBufferMax);\n ByteBuffer mTunSSRAppData = ByteBuffer.allocate(appBufferMax);\n ByteBuffer mTunSSRWrapData = ByteBuffer.allocate(netBufferMax);\n ByteBuffer peerAppData = ByteBuffer.allocate(appBufferMax);\n ByteBuffer peerNetData = ByteBuffer.allocate(netBufferMax);\n }", "public String getEngine() {\n return this.engine;\n }", "public static void main(String[] args) {\n AbstractFactory engineFactory = getFactory(\"ENGINE\");\n IEngines engine1 = engineFactory.getEngine(\"DIESEL\");\n engine1.installEngine();\n IEngines engine2 = engineFactory.getEngine(\"OTTO\");\n engine2.installEngine();\n IEngines engine3 = engineFactory.getEngine(\"ELECTRIC\");\n engine3.installEngine();\n IEngines engine4 = engineFactory.getEngine(\"TURBO\");\n engine4.installEngine();\n\n // This part of code checks the installation procedure of all types of tires which have been implemented;\n // Several variables are being declared and initialized;\n AbstractFactory tireFactory = getFactory(\"TIRES\");\n ITires tire1 = tireFactory.getTires(\"WINTER\");\n tire1.installTires();\n ITires tire2 = tireFactory.getTires(\"CASUAL\");\n tire2.installTires();\n ITires tire3 = tireFactory.getTires(\"RACING\");\n tire3.installTires();\n\n\n }", "public static void main(String[] argv) {\n\t\tlog.info(String.format(\"Started EPCAssistant (v.%s)\", getProperty(AppProperties.APP_VERSION)));\n\t\t\n\t\tJDBCManager.registerOracleDriver();\n\t\t\n\t\tqMgr.loadQueriesFromXML();\t\t\n\t\tqMgr.readQueryParamsFromInput();\n\n\t\ttry {\n\t\t\tqueryEnvironments();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static Engine getInstance() {\n if (engineInstance == null) {\n synchronized (Engine.class) {\n if (engineInstance == null) {\n engineInstance = new Engine();\n }\n }\n }\n return engineInstance;\n }", "private void initEngineAndJoinChannel() {\n // Join and start call\n initializeEngine();\n setupVideoConfig();\n setupLocalVideo();\n joinChannel();\n }", "public static void main(String[] args) {\n\n System.out.println(\"Welcome to TEAM-11 Game\");\n new GameEngine().start();\n }", "public static void init() {\n if (initialized) {\n return;\n }\n initialized = true;\n DebugOptions.DEV_ROOT_PATH = \"engine/src/main/resources/\";\n GL20 mockGL = new MockGL();\n Gdx.gl = mockGL;\n Gdx.gl20 = mockGL;\n\n ServiceRegistry serviceRegistry = new ServiceRegistry();\n serviceRegistry\n .with(FacadeModuleConfig.class)\n .lifetime(Lifetime.Singleton)\n .use(TestModuleConfig::new);\n serviceRegistry\n .with(ModulePathScanner.class)\n .lifetime(Lifetime.Singleton);\n\n final HeadlessApplication application = new HeadlessApplication(new SolApplication(100, serviceRegistry), new HeadlessApplicationConfiguration());\n game = ((SolApplication) application.getApplicationListener()).getGame();\n }", "public EngineClass(EngineClass inEngine)\n {\n cyl = inEngine.getCyl();\n fuel = inEngine.getFuel();\n }", "void setEngine(ImpotEngine engine) {\n this.engine = engine;\n }", "public RenderEngine() {\n\t\twindow = Window.getInstance();\n\t\t\n\t\ttestEntity = new Entity(\"skull/skull.obj\", \"./res/models/skull/skull.png\", new Vector3f(0,0,0), new Vector3f(0,0,0));\n\t\ttestEntity.getWorldTransform().setScaling(new Vector3f(0.01f,0.01f,0.01f));\n\t\t\n\t\ttestEntity2 = new Entity(\"dummy/dummy.obj\", \"./res/models/dummy/dummy.jpg\", new Vector3f(0,8,0), new Vector3f(0,0,0));\n\t\ttestEntity2.getWorldTransform().setScaling(new Vector3f(0.05f,0.05f,0.05f));\n\t\t\n\t\ttestLight = new Light(new Vector3f(-5,5,-5), new Vector3f(1,1,1));\n\t\ttestLight.getWorldTransform().setScaling(new Vector3f(0.1f,0.1f,0.1f));\n\t\t\n\t\tsky = new SkyDome();\n\t\t\n\t}", "private TracingEngine getEngine() {\n try {\n return engine.get(\"\", reloadEngine());\n } catch (final ExecutionException e) {\n return new NoopTracingEngine();\n }\n }", "public WizardEngine(GameOptions go) {\r\n\t\tsuper();\r\n\t\tthis.go = go;\r\n\t\tcardFinder = new WizardCardFinder();\r\n\t\t//cardFinder = new PokerCardFinder();\r\n\t}", "public void run() {\n if (engine == 0) {\n byte buf[] = new byte[1024];\n AIEngine.aiengine_get_device_id(buf, getApplicationContext());\n\n String deviceId = new String(buf).trim();\n Log.d(TAG, \"deviceId: \" + deviceId);\n\n InputStream is = null;\n String provisionPath = \"\";\n\n try {\n is = getAssets().open(\"aiengine.provision\");\n File provisionFile = new File(AiUtil.externalFilesDir(context), \"aiengine.provision\");\n AiUtil.writeToFile(provisionFile, is);\n is.close();\n provisionPath = provisionFile.getAbsolutePath();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n Log.d(TAG, \"provisionPath:\" + provisionPath);\n\n String cfg = String.format(\"{\\\"appKey\\\": \\\"%s\\\", \\\"secretKey\\\": \\\"%s\\\", \\\"cloud\\\": {\\\"server\\\": \\\"%s\\\"}, \\\"provision\\\": \\\"%s\\\"}\",\n ChivoxOptions.APP_KEY, ChivoxOptions.SECRET_KEY, ChivoxOptions.SERVER, provisionPath);\n\n engine = AIEngine.aiengine_new(cfg, context);\n Log.d(TAG, \"aiengine: \" + engine);\n }\n\t\t\t\t/* create airecorder instance */\n if (recorder == null) {\n recorder = AIRecorder.getInstance();\n Log.d(TAG, \"airecorder: \" + recorder);\n }\n }", "private ClientExecutorEngine() {\n ClientConfigReader.readConfig();\n DrillConnector.initConnection();\n HzConfigReader.readConfig();\n }", "public static void main(String[] args) {\n QAEngineer qaEngineer = new QAEngineer(\"John\", 120000, \"Some Company\", 10000);\n System.out.println(\n \"Name: \" + qaEngineer.getName() +\n \"\\nSalary: \" + qaEngineer.getSalary() +\n \"\\nCompany name: \" + qaEngineer.getCompany() +\n \"\\nSign In bonus: \" + qaEngineer.getSignInBonus()\n );\n }", "public Engine build() {\n this.extensions.add(new CoreExtension());\n \n // load extensions\n this.extensions.forEach(extension -> {\n this.renderers.putAll(extension.getRenderers());\n this.directives.putAll(extension.getDirectives());\n this.nodeParsers.putAll(extension.getNodeParsers());\n this.filters.putAll(extension.getFilters());\n this.tests.putAll(extension.getTests());\n this.unaryOperators.putAll(extension.getUnaryOperators());\n this.binaryOperators.putAll(extension.getBinaryOperators());\n this.factories.addAll(extension.getNodeVisitorFactories());\n this.safeNodes.addAll(extension.getSafeNodes());\n });\n \n // create an operator token parser\n TokenParser unaryOperatorParser = TokenParser.in(TokenType.OPERATOR, this.unaryOperators.keySet().toArray(new String[]{}));\n TokenParser binaryOperatorParser = TokenParser.in(TokenType.OPERATOR, this.binaryOperators.keySet().toArray(new String[]{}));\n TokenParser operatorParser = unaryOperatorParser.or(binaryOperatorParser);\n \n // create a execute token parser\n TokenParser executeOpenParser = TokenParser.from(TokenType.EXECUTE_OPEN, compile(quote(this.executeOpen)), false);\n TokenParser executeCloseParser = TokenParser.from(TokenType.EXECUTE_CLOSE, compile(quote(this.executeClose)), false);\n TokenParser executeParser = executeOpenParser.then(NAME).then(operatorParser.or(EXPRESSION).until(executeCloseParser));\n this.starts.add(this.executeOpen);\n \n // create a print token parser\n TokenParser printOpenParser = TokenParser.from(TokenType.PRINT_OPEN, compile(quote(this.printOpen)), false);\n TokenParser printCloseParser = TokenParser.from(TokenType.PRINT_CLOSE, compile(quote(this.printClose)), false);\n TokenParser printParser = printOpenParser.then(operatorParser.or(EXPRESSION).until(printCloseParser));\n this.starts.add(this.printOpen);\n \n // create a comment token parser\n TokenParser commentOpenParser = TokenParser.from(TokenType.COMMENT_OPEN, compile(quote(this.commentOpen)), false);\n TokenParser commentCloseParser = TokenParser.from(TokenType.COMMENT_CLOSE, compile(quote(this.commentClose)), false);\n TokenParser commentInner = TokenParser.until(TokenType.TEXT, this.commentClose);\n TokenParser commentParser = commentOpenParser.then(commentInner.optional()).then(commentCloseParser);\n this.starts.add(this.commentOpen);\n \n // create a text token parser\n TokenParser leadingText = TokenParser.until(TokenType.TEXT, this.starts);\n TokenParser text = TokenParser.from(TokenType.TEXT, Pattern.compile(\"^.*\", Pattern.DOTALL | Pattern.MULTILINE), false);\n \n TokenParser principal = commentParser.or(executeParser).or(printParser).or(leadingText).zeroOrMore().then(text.optional()).then(EOF);\n this.tokenizerBuilder.parser(principal);\n Tokenizer tokenizer = this.tokenizerBuilder.build();\n \n ExpressionParser expressionParser = new ExpressionParser(this.unaryOperators, this.binaryOperators);\n \n Engine engine = new Engine(this.environment, expressionParser,\n renderers, directives, nodeParsers, \n filters, tests, factories, safeNodes,\n tokenizer);\n return engine;\n }", "public interface PolicyEngine extends Startable, Lockable, TopicListener {\n\n /**\n * Boot the engine.\n *\n * @param cliArgs command line arguments\n */\n void boot(String[] cliArgs);\n\n /**\n * configure the policy engine according to the given properties.\n *\n * @param properties Policy Engine properties\n * @throws IllegalArgumentException when invalid or insufficient properties are provided\n */\n void configure(Properties properties);\n\n /**\n * updates the Policy Engine with the given configuration.\n *\n * @param configuration the configuration\n * @return success or failure\n * @throws IllegalArgumentException if invalid argument provided\n * @throws IllegalStateException if the system is in an invalid state\n */\n boolean configure(PdpdConfiguration configuration);\n\n /**\n * open the Policy Engine to external configuration systems.\n *\n * @return success or failure\n */\n boolean open();\n\n\n /**\n * configure the engine's environment. General lab installation configuration is made available\n * to the Engine. Typically, custom lab installation that may be needed by arbitrary drools\n * applications are made available, for example network component and database host addresses.\n * Multiple environments can be passed in and tracked by the engine.\n *\n * @param properties an environment properties\n */\n void setEnvironment(Properties properties);\n\n /**\n * gets the engine's environment.\n *\n * @return properties object\n */\n Properties getEnvironment();\n\n /**\n * gets an environment's value, by 1) first from the engine's environment, and 2) from the OS\n * environment.\n *\n * @param key environment key\n * @return environment value or null if absent\n */\n String getEnvironmentProperty(String key);\n\n /**\n * sets an engine's environment property.\n *\n * @param key key\n * @param value value\n * @return property string\n */\n String setEnvironmentProperty(String key, String value);\n\n /**\n * Gets the hostname used by this PDP-D.\n */\n String getHostName();\n\n /**\n * Gets the cluster name as configured in $CLUSTER_NAME,\n * otherwise it will assume an UUID as the cluster name.\n */\n String getClusterName();\n\n /**\n * Gets the PDP Name from hostname and $CLUSTER_NAME,\n * otherwise if CLUSTER_NAME is not set, the PdpName\n * will be the concatenation of the hostname and a\n * UUID.\n */\n String getPdpName();\n\n /**\n * registers a new Policy Controller with the Policy Engine initialized per properties.\n *\n * @param properties properties to initialize the Policy Controller\n * @return the newly instantiated Policy Controller\n * @throws IllegalArgumentException when invalid or insufficient properties are provided\n * @throws IllegalStateException when the engine is in a state where this operation is not\n * permitted.\n */\n PolicyController createPolicyController(String name, Properties properties);\n\n /**\n * updates a set of Policy Controllers with configuration information.\n *\n * @param configuration list of configurations\n * @return list of controllers\n * @throws IllegalArgumentException exception\n * @throws IllegalStateException exception\n */\n List<PolicyController> updatePolicyControllers(List<ControllerConfiguration> configuration);\n\n /**\n * updates an already existing Policy Controller with configuration information.\n *\n * @param configuration configuration\n * @return the updated Policy Controller\n * @throws IllegalArgumentException in the configuration is invalid\n * @throws IllegalStateException if the controller is in a bad state\n */\n PolicyController updatePolicyController(ControllerConfiguration configuration);\n\n /**\n * removes the Policy Controller identified by its name from the Policy Engine.\n *\n * @param name name of the Policy Controller\n */\n void removePolicyController(String name);\n\n /**\n * removes a Policy Controller from the Policy Engine.\n *\n * @param controller the Policy Controller to remove from the Policy Engine\n */\n void removePolicyController(PolicyController controller);\n\n /**\n * returns a list of the available Policy Controllers.\n *\n * @return list of Policy Controllers\n */\n List<PolicyController> getPolicyControllers();\n\n\n /**\n * get policy controller names.\n *\n * @return list of controller names\n */\n List<String> getPolicyControllerIds();\n\n /**\n * get unmanaged sources.\n *\n * @return unmanaged sources\n */\n List<TopicSource> getSources();\n\n /**\n * get unmanaged sinks.\n *\n * @return unmanaged sinks\n */\n List<TopicSink> getSinks();\n\n /**\n * get unmmanaged http servers list.\n *\n * @return http servers\n */\n List<HttpServletServer> getHttpServers();\n\n /**\n * Gets a thread pool that can be used to execute background tasks.\n */\n ScheduledExecutorService getExecutorService();\n\n /**\n * get properties configuration.\n *\n * @return properties objects\n */\n Properties getProperties();\n\n /**\n * get features attached to the Policy Engine.\n *\n * @return list of features\n */\n List<PolicyEngineFeatureApi> getFeatureProviders();\n\n /**\n * get named feature attached to the Policy Engine.\n *\n * @return the feature\n */\n PolicyEngineFeatureApi getFeatureProvider(String featureName);\n\n /**\n * get features attached to the Policy Engine.\n *\n * @return list of features\n */\n List<String> getFeatures();\n\n /**\n * get domain maker.\n *\n * @return the domain maker\n */\n DomainMaker getDomainMaker();\n\n /**\n * get statistics for this PDP.\n *\n * @return statistics\n */\n PolicyStatsManager getStats();\n\n /**\n * Attempts the dispatching of an \"event\" object.\n *\n * @param topic topic\n * @param event the event object to send\n * @return true if successful, false if a failure has occurred.\n * @throws IllegalArgumentException when invalid or insufficient properties are provided\n * @throws IllegalStateException when the engine is in a state where this operation is not\n * permitted (ie. locked or stopped).\n */\n boolean deliver(String topic, Object event);\n\n /**\n * Attempts the dispatching of an \"event\" object over communication infrastructure \"busType\".\n *\n * @param topic topic\n * @param event the event object to send\n * @return true if successful, false if a failure has occurred.\n * @throws IllegalArgumentException when invalid or insufficient properties are provided\n * @throws IllegalStateException when the engine is in a state where this operation is not\n * permitted (ie. locked or stopped).\n * @throws UnsupportedOperationException when the engine cannot deliver due to the functionality\n * missing (ie. communication infrastructure not supported.\n */\n boolean deliver(String busType, String topic, Object event);\n\n /**\n * Attempts the dispatching of an \"event\" object over communication infrastructure \"busType\".\n *\n * @param topic topic\n * @param event the event object to send\n * @return true if successful, false if a failure has occurred.\n * @throws IllegalArgumentException when invalid or insufficient properties are provided\n * @throws IllegalStateException when the engine is in a state where this operation is not\n * permitted (ie. locked or stopped).\n * @throws UnsupportedOperationException when the engine cannot deliver due to the functionality\n * missing (ie. communication infrastructure not supported.\n */\n boolean deliver(CommInfrastructure busType, String topic, Object event);\n\n /**\n * Attempts delivering of an String over communication infrastructure \"busType\".\n *\n * @param topic topic\n * @param event the event object to send\n * @return true if successful, false if a failure has occurred.\n * @throws IllegalArgumentException when invalid or insufficient properties are provided\n * @throws IllegalStateException when the engine is in a state where this operation is not\n * permitted (ie. locked or stopped).\n * @throws UnsupportedOperationException when the engine cannot deliver due to the functionality\n * missing (ie. communication infrastructure not supported.\n */\n boolean deliver(CommInfrastructure busType, String topic, String event);\n\n /**\n * Requests a lock on a resource. Typically, the lock is not immediately granted,\n * though a \"lock\" object is always returned. Once the lock has been granted (or\n * denied), the callback will be invoked to indicate the result.\n *\n * <p/>\n * Notes:\n * <dl>\n * <li>The callback may be invoked <i>before</i> this method returns</li>\n * <li>The implementation need not honor waitForLock={@code true}</li>\n * </dl>\n *\n * @param resourceId identifier of the resource to be locked\n * @param ownerKey information identifying the owner requesting the lock\n * @param holdSec amount of time, in seconds, for which the lock should be held once\n * it has been granted, after which it will automatically be released\n * @param callback callback to be invoked once the lock is granted, or subsequently\n * lost; must not be {@code null}\n * @param waitForLock {@code true} to wait for the lock, if it is currently locked,\n * {@code false} otherwise\n * @return a new lock\n */\n Lock createLock(String resourceId, String ownerKey, int holdSec, LockCallback callback,\n boolean waitForLock);\n\n /**\n * Invoked when the host goes into the active state.\n */\n void activate();\n\n /**\n * Invoked when the host goes into the standby state.\n */\n void deactivate();\n\n /**\n * produces a default telemetry configuration.\n *\n * @return policy engine configuration\n */\n Properties defaultTelemetryConfig();\n\n /**\n * Track a policy execution metric.\n *\n * @param controllerName controller name\n * @param policyName policy name\n * @param metric metric\n */\n void metric(String controllerName, String policyName, Metric metric);\n\n /**\n * Track a policy execution transaction.\n *\n * @param controllerName controller name\n * @param policyName policy name\n * @param transaction transaction\n */\n void transaction(String controllerName, String policyName, Metric transaction);\n}", "public static IXccdfEngine createEngine(IPlugin plugin) {\r\n \treturn new OEMEngine(plugin, SystemEnumeration.ANY);\r\n }", "Program createProgram();", "Program createProgram();", "Program createProgram();", "public MainEntryPoint() {\r\n\r\n }", "public static void main(String[] args) throws Exception\n {\n TinySearchEngineBase searchEngine = new TinySearchEngine();\n MyDriver d = new MyDriver();\n d.run(searchEngine);\n }", "@Override\n protected void postProcessEngineInitialisation() {\n }", "@Override\r\n\tpublic EngineOptions onCreateEngineOptions() {\r\n\t\tmCamera = new Camera(0, 0, WIDTH, HEIGHT);\r\n\t\t\r\n\t\tEngineOptions engineOptions = new EngineOptions(true, ScreenOrientation.LANDSCAPE_FIXED, new FillResolutionPolicy(), mCamera);\r\n\t\t\r\n\t\tengineOptions.setWakeLockOptions(WakeLockOptions.SCREEN_ON);\r\n\t\t\r\n\t\tmEngine = new FixedStepEngine(engineOptions, 60);\r\n\t\t\r\n\t\treturn engineOptions;\r\n\t}", "public static synchronized Engine resetEngine() {\n if (engineInstance != null) {\n engineInstance = new Engine();\n }\n return engineInstance;\n }", "@Override\n\tpublic void testEngine() {\n\t\t\n\t}", "public Main() {\n \n \n }", "public static void initializeHandler() {\n\t\t\n\t\t//Check not already initialized\n\t\tif(cepRT == null) {\n\t\t\t\n\t\t\t//The Configuration is meant only as an initialization-time object.\n\t\t Configuration cepConfig = new Configuration();\n\t\t \n\t\t /*\n\t\t * Basic EVENTS\n\t\t */\n\t\t addEventTypes(cepConfig);\n\t\t \n\t\t // We setup the engine\n\t\t EPServiceProvider cep = EPServiceProviderManager.getProvider(\"myCEPEngine\", cepConfig);\n\t\t \n\t\t cepRT = cep.getEPRuntime();\n\t\t cepAdm = cep.getEPAdministrator();\n\t\t \n\t\t /*\n\t\t * Additional EVENTS\n\t\t */\n\t\t EsperStatements.defineAnomalyEvents(cepAdm);\n\t\t EsperStatements.defineSystemEvents(cepAdm);\n\t\t \n\t\t /*\n\t\t * TABLES and NAMED WINDOWS\n\t\t */\n\t\t // TRACES WINDOW (traceId PK)\n\t\t EsperStatements.defineTracesWindow(cepAdm, retentionTime);\n\t\t // PROCESSES TABLE (hashProcess PK, process)\n\t\t EsperStatements.defineProcessesTable(cepAdm);\n\t\t // SPANS WINDOW (span, hashProcess, serviceName)\n\t\t EsperStatements.defineSpansWindow(cepAdm, retentionTime);\n\t\t // DEPENDENCIES WINDOW (traceIdHexFrom, spanIdFrom, traceIdHexTo, spanIdTo)\n\t\t EsperStatements.defineDependenciesWindow(cepAdm, retentionTime);\n\t\t \n\t\t // MEAN DURATION PER OPERATION TABLE (serviceName PK, operationName PK, meanDuration, m2, counter)\n\t\t //Welford's Online algorithm to compute running mean and variance\n\t\t EsperStatements.defineMeanDurationPerOperationTable(cepAdm);\n\t//\t EsperStatements.defineMeanDurationPerOperationTableResetCounter(cepAdm, 1000);\n\t\t \n\t\t //TRACES TO BE SAMPLED WINDOW (traceId)\n\t\t EsperStatements.defineTracesToBeSampledWindow(cepAdm, retentionTime);\n\t\t \n\t\t /*\n\t\t * STATEMENTS\n\t\t */\n\t//\t EsperStatements.gaugeRequestsPerHostname(cepAdm, retentionTime);\n\t//\t EsperStatements.errorLogs(cepAdm);\n\t\t \n\t//\t EsperStatements.topKOperationDuration(cepAdm, \"10\");\n\t//\t EsperStatements.perCustomerDuration(cepAdm);\n\t\t \n\t\t // RESOURCE USAGE ATTRIBUTION\n\t\t // CE -> Contained Event Selection\n\t//\t EsperStatements.resourceUsageCustomerCE(cepAdm, retentionTime);\n\t//\t EsperStatements.resourceUsageCustomer(cepAdm, retentionTime);\n\t//\t EsperStatements.resourceUsageSessionCE(cepAdm, retentionTime);\n\t//\t EsperStatements.resourceUsageSession(cepAdm, retentionTime);\n\t\t \n\t\t // ANOMALIES DETECTION\n\t\t // Three-sigma rule to detect anomalies (info https://en.wikipedia.org/wiki/68–95–99.7_rule)\n\t\t EsperStatements.highLatencies(cepAdm);\n\t\t EsperStatements.reportHighLatencies(cepAdm, \"./anomalies.csv\");\n\t\t EsperStatements.insertProcessCPUHigherThan80(cepAdm);\n\t\t \n\t\t // TAIL SAMPLING\n\t\t EsperStatements.tailSampling(cepAdm, \"./sampled.txt\"); \n\t\t \n\t\t //PATTERN\n\t\t EsperStatements.anomalyAfterCommit(cepAdm, \"15min\");\n\t\t EsperStatements.highCPUandHighLatencySameHost(cepAdm, \"10sec\");\n\t\t \n\t\t /*\n\t\t * EVENTS\n\t\t */\n\t\t EsperStatements.insertCommitEvents(cepAdm); \n\t\t EsperStatements.systemEvents(cepAdm);\n\t\t \n\t\t /*\n\t\t * DEBUG socket\n\t\t */\n\t\t EsperStatements.debugStatements(cepAdm);\n\t\t \n\t\t /*\n\t\t * START API\n\t\t */\n\t\t Thread APIThread = new Thread(new Runnable() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tKaijuAPI.initAPI();\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t});\n\t\t \n\t\t APIThread.run();\n\t\t}\n\t \n\t}", "public static EngineBuilderFactory getInstance() {\n if (instance == null) {\n instance = new EngineBuilderFactory();\n }\n\n return instance;\n }", "public RobotEngine (){\r\n\t\tthis.fuel = 100;\r\n\t\tthis.recycledMaterial = 0;\r\n\t\tthis.container = new ItemContainer ();\r\n\t\tthis.direction = Direction.NORTH;\r\n\t\tthis.navega = new NavigationModule();\r\n\t}", "public static void main(final String[] args) throws BindException, InjectionException {\n // TODO : build LocalRuntimeConfiguration\n\n /*\n final Tang tang = Tang.Factory.getTang();\n\n final JavaConfigurationBuilder cb = tang.newConfigurationBuilder();\n\n try {\n new CommandLine(cb)\n .registerShortNameOfClass(Local.class)\n .registerShortNameOfClass(TimeOut.class)\n .registerShortNameOfClass(LinearSGD_REEF.InputDir.class)\n .processCommandLine(args);\n\n } catch (final IOException ex) {\n LOG.log(Level.SEVERE, \"Configuration error: cannot load data\", ex);\n throw new RuntimeException(\"Configuration error: cannot load data\", ex);\n }\n\n final Injector injector = tang.newInjector(cb.build());\n\n final boolean isLocal = injector.getNamedInstance(Local.class);\n final int jobTimeout = injector.getNamedInstance(TimeOut.class);\n final String inputDir = injector.getNamedInstance(LinearSGD_REEF.InputDir.class);\n\n final Configuration runtimeConfiguration;\n if (isLocal) {\n LOG.log(Level.INFO, \"Running on the local runtime\");\n runtimeConfiguration = LocalRuntimeConfiguration.CONF\n .set(LocalRuntimeConfiguration.NUMBER_OF_THREADS, NUM_LOCAL_THREADS).build();\n } else {\n LOG.log(Level.INFO, \"Running on YARN\");\n runtimeConfiguration = YarnClientConfiguration.CONF.build();\n }\n\n final EvaluatorRequest computeRequest = EvaluatorRequest.newBuilder()\n .setNumber(NUM_COMPUTE_EVALUATORS)\n .setMemory(1024)\n .setNumberOfCores(4)\n .build();\n\n final Configuration dataLoadConfiguration = new DataLoadingRequestBuilder()\n .setMemoryMB(1024)\n .setInputFormatClass(TextInputFormat.class)\n .setInputPath(inputDir)\n .setNumberOfDesiredSplits(NUM_SPLITS)\n .setComputeRequest(computeRequest)\n .setDriverConfigurationModule(DriverConfiguration.CONF\n .set(DriverConfiguration.GLOBAL_LIBRARIES, EnvironmentUtils.getClassLocation(LinearSGD_Driver.class))\n .set(DriverConfiguration.ON_CONTEXT_ACTIVE, LinearSGD_Driver.ContextActiveHandler.class)\n .set(DriverConfiguration.ON_TASK_COMPLETED, LinearSGD_Driver.TaskCompletedHandler.class)\n .set(DriverConfiguration.DRIVER_IDENTIFIER, \"DataLoadingREEF\"))\n .build();\n\n final LauncherStatus status = run(runtimeConfiguration, JOB_TIMEOUT);\n */\n final Configuration runtimeConfiguration = LocalRuntimeConfiguration.CONF\n .set(LocalRuntimeConfiguration.NUMBER_OF_THREADS, NUM_LOCAL_THREADS)\n .build();\n final LauncherStatus status = run(runtimeConfiguration, TIMEOUT);\n LOG.log(Level.INFO, \"REEF job completed: {0}\", status);\n }", "public static void main(String[] args) {\n Engine engine = new Engine(\"suzuki\", 100, 0, 887, 500);\r\n Boing747 aircraft = new Boing747(engine);\r\n aircraft.fly(1_000_000);\r\n if (engine.doesEngineNeedsRestart()) {\r\n System.out.println(\"take engine to repair...\");\r\n }\r\n }", "public void setEngineId(String engineId)\n {\n this.engineId = engineId;\n }", "public static void setup(String[] args) {\n\t\tif (parametersContains(\"classpath\", args)) {\r\n\t\t\tRESOURCE_TYPE = RessourceType.CLASSPATH;\r\n\t\t\tCobra2DEngine.setupEnvironment(RESOURCE_TYPE);\r\n\t\t\tROOT_PATH_STR = \"./src/main/resources/\";\r\n\t\t} else if (parametersContains(\"currentDir\", args)) {\r\n\t\t\tRESOURCE_TYPE = RessourceType.INSTALL_DIR;\r\n\t\t\tCobra2DEngine.setupEnvironment(RESOURCE_TYPE);\r\n\t\t\tROOT_PATH_STR = \".\";\r\n\t\t} else {\r\n\t\t\tSystem.out\r\n\t\t\t\t\t.println(\"Start this runtime environment with option -classpath to load all resources from your classpath or with -currentDir to load all resources from current directory ./game-resources/.\");\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\r\n\t\tROOT_PATH = new File(ROOT_PATH_STR);\r\n\t\tRESOURCE_PATH = new File(ROOT_PATH_STR + File.separator\r\n\t\t\t\t+ RESOURCE_PATH_STR);\r\n\t\tIMAGE_RESOURCE_PATH = new File(ROOT_PATH_STR + File.separator\r\n\t\t\t\t+ RESOURCE_PATH_STR + File.separator + IMAGE_FOLDER_STR);\r\n\r\n\t\tlog.info(\"Setting up path settings for runtime.\");\r\n\t\tlog.info(\"Resource loading strategy : \" + RESOURCE_TYPE);\r\n\t\tlog.info(\"Root path (path): \" + ROOT_PATH.getPath());\r\n\t\tlog.info(\"Root path (absolute): \"\r\n\t\t\t\t+ ROOT_PATH.getAbsolutePath());\r\n\t\tlog.info(\"Resource path (path): \" + RESOURCE_PATH.getPath());\r\n\t\tlog.info(\"Resource path (absolute): \"\r\n\t\t\t\t+ RESOURCE_PATH.getAbsolutePath());\r\n\t\tlog.info(\"Image resource path (path): \"\r\n\t\t\t\t+ IMAGE_RESOURCE_PATH.getPath());\r\n\t\tlog.info(\"Image resource path (absolute): \"\r\n\t\t\t\t+ IMAGE_RESOURCE_PATH.getAbsolutePath());\r\n\t}", "private static void initSPARQLAnythingEngine() {\n\t\t// Register the JSON-LD parser factory for extension .json\n\t\tReaderRIOTFactory parserFactoryJsonLD = new RiotUtils.ReaderRIOTFactoryJSONLD();\n\t\tRDFParserRegistry.registerLangTriples(RiotUtils.JSON, parserFactoryJsonLD);\n\t\t// Setup FX executor\n\t\tJenaSystem.init();\n\t\tQC.setFactory(ARQ.getContext(), FacadeX.ExecutorFactory);\n\t}", "public void setExecutionEngine(ExecutionEngine executionEngine)\n\t{\n\t\tthis.executionEngine = executionEngine;\n\t}", "Environment createEnvironment();", "Environment createEnvironment();", "public void setEngineOn();", "public Main() {\n\t\tsuper();\n\t}", "public void setEndogenousEngine(EnvironmentEndogenousEngine engine) {\n\t\tthis.endogenousEngine = engine;\n\t}", "public Game() { \n // Create the new environment. Must be done in the same\n // method as the game loop\n env = new Env();\n \n // Sets up the camera\n env.setCameraXYZ(25, 50, 55);\n env.setCameraPitch(pitch);\n\n // Turn off the default controls\n env.setDefaultControl(false);\n\n // Make the room 50 x 50.\n env.setRoom(new Room());\n creatures = new ArrayList<Creature>();\n }", "public Engine toEngine(SbiEngines hibEngine){\r\n\t\tEngine eng = new Engine();\r\n\t\teng.setCriptable(new Integer(hibEngine.getEncrypt().intValue()));\r\n\t\teng.setDescription(hibEngine.getDescr());\r\n\t\teng.setDirUpload(hibEngine.getObjUplDir());\r\n\t\teng.setDirUsable(hibEngine.getObjUseDir());\r\n\t\teng.setDriverName(hibEngine.getDriverNm());\r\n\t\teng.setId(hibEngine.getEngineId());\r\n\t\teng.setName(hibEngine.getName());\r\n\t\teng.setLabel(hibEngine.getLabel());\r\n\t\teng.setSecondaryUrl(hibEngine.getSecnUrl());\r\n\t\teng.setUrl(hibEngine.getMainUrl());\r\n\t\teng.setLabel(hibEngine.getLabel());\r\n\t\treturn eng;\r\n\t}", "private void initMapEngine() {\n String path = new File(m_activity.getExternalFilesDir(null), \".here-map-data\")\n .getAbsolutePath();\n // This method will throw IllegalArgumentException if provided path is not writable\n com.here.android.mpa.common.MapSettings.setDiskCacheRootPath(path);\n\n MapEngine.getInstance().init(new ApplicationContext(m_activity), new OnEngineInitListener() {\n @Override\n public void onEngineInitializationCompleted(Error error) {\n if (error == Error.NONE) {\n /*\n * Similar to other HERE Android SDK objects, the MapLoader can only be\n * instantiated after the MapEngine has been initialized successfully.\n */\n getMapPackages();\n } else {\n Log.e(TAG, \"Failed to initialize MapEngine: \" + error);\n new AlertDialog.Builder(m_activity).setMessage(\n \"Error : \" + error.name() + \"\\n\\n\" + error.getDetails())\n .setTitle(R.string.engine_init_error)\n .setNegativeButton(android.R.string.cancel,\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(\n DialogInterface dialog,\n int which) {\n m_activity.finish();\n }\n }).create().show();\n }\n }\n });\n }", "@Override\n\tpublic Engine onLoadEngine() {\n\t\tthis.mCamera = new Camera(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT);\n\t\treturn new Engine(new EngineOptions(true, ScreenOrientation.LANDSCAPE, new RatioResolutionPolicy(CAMERA_WIDTH, CAMERA_HEIGHT), this.mCamera));\n\t}", "public JseBaseSynthesizer(final SynthesizerMode engineMode) {\n super(engineMode);\n }", "@Override\n public void turnOnEngine() {\n engine.on();\n System.out.println(\"Engine is turned on.\");\n }", "@Override\n\tprotected void setupScene(Engine engine, SceneManager sceneManager) throws IOException {\n\t\tif (inputManager == null)\n\t\t\tinputManager = new GenericInputManager();\n\n\t\tif (textureManager == null)\n\t\t\ttextureManager = engine.getTextureManager();\n\n\t\tif (renderSystem == null)\n\t\t\trenderSystem = (GL4RenderSystem) engine.getRenderSystem();\n\n\t\t// initialize zState\n\t\tzState = (ZBufferState) renderSystem.createRenderState(RenderState.Type.ZBUFFER);\n\t\tzState.setEnabled(true);\n\n\t\t// initialize script engine\n\t\tScriptEngineManager factory = new ScriptEngineManager();\n\t\tjava.util.List<ScriptEngineFactory> list = factory.getEngineFactories();\n\t\tjsEngine = factory.getEngineByName(\"js\");\n\t\tInvocable invocableEngine = (Invocable) jsEngine;\n\n\t\t// initialize game\n\t\tsetupTerrain(engine, sceneManager, invocableEngine);\n\t\tsetupSkybox(engine, sceneManager, invocableEngine);\n\t\tsetupPlayer(engine, sceneManager);\n\t\tsetupLights(engine, sceneManager, invocableEngine);\n\t\tsetupNetwork();\n\t\tsetupInputs(sceneManager);\n\t\tsetupNpc(engine, sceneManager);\n\t\tsetupPhysics();\n\t\tsetupPhysicsWorld();\n\t\tsetupOrbitCameras(engine, sceneManager);\n\t\tsetupAudio(engine, sceneManager, invocableEngine);\n\t}", "private PhysicsEngine() {\n\n }", "public static void main (String[] args) \n {\n runAsApplication(new TurtleWorld(), \"TurtleWorld\"); \n }", "private Main() {\n\n super();\n }", "public void initialize() {\n // Get our home directory\n String homeStr = System.getProperty(\"DTDANALYZER_HOME\");\n if (homeStr == null) homeStr = \".\";\n home = new File(homeStr);\n\n // Read the package properties file\n Properties props = new Properties();\n try {\n props.load(new FileInputStream( new File(homeStr, \"app.properties\") ));\n version = props.getProperty(\"version\");\n buildtime = props.getProperty(\"buildtime\");\n } \n catch (IOException e) {\n System.err.println(\n \"Warning: failed to read app.properties file. This should exist in \" +\n \"the DtdAnalyzer installation directory.\"\n );\n }\n\n // Merge the common and custom options into activeOpts. Custom ones with the same\n // name will override the common ones.\n for (int i = 0; i < optList.length; ++i) {\n String optName = optList[i];\n //System.err.println(\" option \" + optName);\n Option opt = (Option) customOpts.get(optName);\n if (opt == null) opt = (Option) commonOpts.get(optList[i]);\n if (opt == null) {\n System.err.println(\"Strange, undefined command line option '\" + optName +\n \"'. This should never \" +\n \"happen; please create an issue on GitHub.\");\n System.exit(1);\n }\n \n activeOpts.addOption(opt);\n }\n\n // Set System properties for parsing and transforming\n if ( System.getProperty(App.SAX_DRIVER_PROPERTY) == null )\n System.setProperty(App.SAX_DRIVER_PROPERTY, App.SAX_DRIVER_DEFAULT);\n\n if ( System.getProperty(App.TRANSFORMER_FACTORY_PROPERTY) == null )\n System.setProperty(App.TRANSFORMER_FACTORY_PROPERTY, App.TRANSFORMER_FACTORY_DEFAULT);\n\n // Initialize all of the dtd specifiers\n dtdSpecifiers = new DtdSpecifier[numDtds];\n for (int i = 0; i < numDtds; ++i) {\n dtdSpecifiers[i] = new DtdSpecifier();\n }\n numDtdsFound = 0;\n numTitlesFound = 0;\n \n // Parse the command line arguments\n CommandLineParser clp = new PosixParser();\n try {\n line = clp.parse( activeOpts, args );\n\n // Loop through the given command-line options, in the order they were given.\n Option[] lineOpts = line.getOptions();\n for (int i = 0; i < lineOpts.length; ++i) {\n Option opt = lineOpts[i];\n String optName = opt.getLongOpt();\n\n if (!optHandler.handleOption(opt)) {\n // The application didn't know what to do with it, so it\n // must be a common opt, for us to handle.\n handleOption(opt);\n }\n }\n\n \n // Now loop through any left-over arguments, and if we still\n // expect dtd specifiers, then use them up. If there's one extra, and \n // wantOutput is true, then we'll use that for the output filename.\n String[] rest = line.getArgs();\n for (int i = 0; i < rest.length; ++i) {\n //System.err.println(\"looking at \" + rest[i] + \", numDtdsFound is \" + numDtdsFound +\n // \", numDtds is \" + numDtds + \", wantOutput is \" + wantOutput);\n if (numDtdsFound < numDtds) {\n // Use this to initialize a dtd; assume it is a system id.\n dtdSpecifiers[numDtdsFound].idType = 's';\n dtdSpecifiers[numDtdsFound].idValue = rest[i];\n numDtdsFound++;\n }\n else if (wantOutput && output == null) {\n // Use this to initialize the output\n output = new StreamResult(new File(rest[i]));\n }\n else {\n usageError(\"Too many arguments\");\n }\n }\n\n // If we still don't have all the input dtds specified, complain.\n if (numDtdsFound < numDtds) {\n usageError(\"Expected at least \" + numDtds + \" DTD specifier\" + \n (numDtds > 1 ? \"s\" : \"\") + \"!\");\n }\n\n // Default output is to write to standard out\n if (wantOutput && output == null) {\n output = new StreamResult(System.out);\n }\n\n // Validate each dtd specifier object. This also causes dummy XML documents\n // to be created for -s or -p specifiers.\n for (int i = 0; i < numDtds; ++i) {\n dtdSpecifiers[i].validate();\n }\n\n // If no --xslt option was specified, then set the transformer to the\n // identity transformer\n if (xslt == null) {\n try {\n // If no xslt was specified, use the identity transformer\n TransformerFactory f = TransformerFactory.newInstance();\n xslt = f.newTransformer();\n xslt.setOutputProperty(OutputKeys.INDENT, \"yes\");\n }\n catch (TransformerConfigurationException e) {\n System.err.println(\"Error configuring xslt transformer: \" + e.getMessage());\n System.exit(1);\n }\n }\n \n\n }\n catch( ParseException exp ) {\n usageError(exp.getMessage());\n }\n }", "public static void main (String[] args) {\n\n Config config = ConfigUtils.loadConfig(\"/home/gregor/git/matsim/examples/scenarios/pt-tutorial/0.config.xml\");\n// config.controler().setLastIteration(0);\n// config.plans().setHandlingOfPlansWithoutRoutingMode(PlansConfigGroup.HandlingOfPlansWithoutRoutingMode.useMainModeIdentifier);\n// Scenario scenario = ScenarioUtils.loadScenario(config);\n// Controler controler = new Controler(scenario);\n// controler.run();\n\n\n// Config config = this.utils.loadConfig(IOUtils.extendUrl(ExamplesUtils.getTestScenarioURL(\"pt-tutorial\"), \"0.config.xml\"));\n config.controler().setLastIteration(1);\n config.plans().setHandlingOfPlansWithoutRoutingMode(PlansConfigGroup.HandlingOfPlansWithoutRoutingMode.useMainModeIdentifier);\n\n\n// try {\n Controler controler = new Controler(config);\n// final EnterVehicleEventCounter enterVehicleEventCounter = new EnterVehicleEventCounter();\n// final StageActivityDurationChecker stageActivityDurationChecker = new StageActivityDurationChecker();\n// controler.addOverridingModule( new AbstractModule(){\n// @Override public void install() {\n// this.addEventHandlerBinding().toInstance( enterVehicleEventCounter );\n// this.addEventHandlerBinding().toInstance( stageActivityDurationChecker );\n// }\n// });\n controler.run();\n }", "public Engine getEngine_test() {\n\t\treturn engine;\n\t}", "public void initializeEngines() {\n\t\tfor (int i=0; i < _engineNumber; i++) {\n\t\t\tengineList.add(new Engine(\"Engine_\" + i, \"\", 0.0, 0.0, 0.0, _theAircraft));\n\t\t}\n\t}", "private static FreeMarkerEngine createEngine() {\n Configuration config = new Configuration();\n File templates = new File(\"src/main/resources/spark/template/freemarker\");\n try {\n config.setDirectoryForTemplateLoading(templates);\n } catch (IOException ioe) {\n System.out.printf(\"ERROR: Unable use %s for template loading.%n\", templates);\n System.exit(1);\n }\n return new FreeMarkerEngine(config);\n }", "public static IXccdfEngine createEngine(IPlugin plugin, SystemEnumeration... systems) {\r\n \treturn new OEMEngine(plugin, systems);\r\n }", "@Override\n\tpublic EngineOptions onCreateEngineOptions() {\n\t\t\n\t\t// Device properties & dimensions\n\t\tDisplay display = getWindowManager().getDefaultDisplay();\n\t\tPoint size = new Point();\n\t\tdisplay.getSize(size);\n\t\tint width = size.x;\n\t\tint height = size.y;\n\t\t\n\t\tCAMERA_WIDTH = width;\n\t\tCAMERA_HEIGHT = height;\n\t\t\n\t\tfinal Camera camera = new Camera(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT);\n\n\t\treturn new EngineOptions(true, ScreenOrientation.LANDSCAPE_FIXED, new RatioResolutionPolicy(CAMERA_WIDTH, CAMERA_HEIGHT), camera);\n\t}", "public static void main(String[] args) {\n Injector guice = Guice.createInjector(new DiscountGuiceModule());\n\n // Creates separate object graph with business logic, etc. Instantiate the main object on that\n MainAppWithCustomFactory application = guice.getInstance(MainAppWithCustomFactory.class);\n\n // Start your app\n application.start();\n }" ]
[ "0.68537736", "0.68537736", "0.6806099", "0.66580707", "0.66183686", "0.661039", "0.65211874", "0.6377065", "0.6368758", "0.6354912", "0.6312696", "0.62742275", "0.6249885", "0.6212976", "0.62064475", "0.61779684", "0.61586136", "0.60875624", "0.6075624", "0.6059117", "0.6033891", "0.60098445", "0.5993324", "0.596931", "0.595667", "0.59331065", "0.5927528", "0.59201264", "0.5912851", "0.5901506", "0.58843887", "0.5877479", "0.58664817", "0.5854493", "0.583607", "0.58065194", "0.57691866", "0.575294", "0.5723542", "0.57190114", "0.57175016", "0.5707898", "0.56832814", "0.56745017", "0.56599206", "0.56555486", "0.5654032", "0.56513965", "0.56507", "0.56442714", "0.56347203", "0.5632305", "0.5620451", "0.56147486", "0.55830705", "0.5573479", "0.5572707", "0.5566592", "0.5556422", "0.55481917", "0.55481917", "0.55481917", "0.5541305", "0.55251896", "0.5510955", "0.5508474", "0.550799", "0.549544", "0.5475291", "0.5468474", "0.5455096", "0.5450318", "0.543841", "0.5421469", "0.542054", "0.54198277", "0.54194915", "0.5418815", "0.5416826", "0.5416826", "0.5410839", "0.5409242", "0.54077566", "0.5407035", "0.54058754", "0.5401472", "0.5388784", "0.5387036", "0.5384335", "0.53787065", "0.5372783", "0.5357739", "0.5345573", "0.53435415", "0.5337381", "0.53288454", "0.5328094", "0.53233165", "0.53214765", "0.53193915", "0.5316585" ]
0.0
-1
/ This class loads resources such as sound,text,image etc. Here it simple loads the asset path, then it create two atlas objects One for the background and other for the foreground Then we create regions on the atlas and finally load the both TextureAtlas objects
@Override public void onLoadResources() { BitmapTextureAtlasTextureRegionFactory.setAssetBasePath("gfx/"); mBitmapParralaxTextureAtlas=new BitmapTextureAtlas(1024,1024); mBitmapTextureAtlas=new BitmapTextureAtlas(512, 512); mTextureRegion=BitmapTextureAtlasTextureRegionFactory.createFromAsset(mBitmapParralaxTextureAtlas, this, "parallax_background_layer_back.png", 0, 0); bananaRegion=BitmapTextureAtlasTextureRegionFactory.createTiledFromAsset(mBitmapTextureAtlas, this, "banana_tiled.png", 0, 0, 4,2); mEngine.getTextureManager().loadTextures(mBitmapParralaxTextureAtlas,mBitmapTextureAtlas); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void loadResource() {\n\t\ttry {\n\t\t\ttarmacTexture = scaleResourceImagePaint(\"/textures/tarmac2.jpg\", 300, 300);\n\t\t\tgrassTexture = scaleResourceImagePaint(\"/textures/grass.jpg\", 300, 300);\n\t\t\tstopwayTexture = scaleResourceImagePaint(\"/textures/stopway.jpg\", 300, 300);\n\t\t} catch (IOException e) {\n\t\t\tsetUsingTextures(false);\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void initTextures() {\n\n\t\ttextureManager.loadTexture(\"PNG\", \"menu_bg\", \"res/menu_bg.png\");\n\t\ttextureManager.loadTexture(\"PNG\", \"mountain_bg\", \"res/mountain_bg.png\");\n\t\ttextureManager.loadTexture(\"PNG\", \"ball\", \"res/ball_sm.png\");\n\t\ttextureManager.loadTexture(\"PNG\", \"inner_bg1\", \"res/inner_bg1.png\");\r\n\t\ttextureManager.loadSheet(\"stand_still\", \"res/stand_still.png\", 32, 64);\n\t\ttextureManager.loadSheet(\"testAnim\", \"res/testAnim.png\", 32, 64);\n\t\ttextureManager.loadSheet(\"tileSet\", \"res/tileset_small.png\", 32, 32);\n\t\ttextureManager.loadSheet(\"walking\", \"res/walking.png\", 32, 64);\r\n\t\ttextureManager.loadSheet(\"jumping\", \"res/jumping.png\", 32, 64);\n\t\ttextureManager.loadSheet(\"slime_still\", \"res/slime_still_small.png\", 32, 32);\n\t}", "private void loadAssets()\n {\n assetManager.setErrorListener(this);\n // load texture atlas\n assetManager.load(Constants.TEXTURE_ATLAS_OBJECTS, TextureAtlas.class);\n // start loading assets and wait until finished\n assetManager.finishLoading();\n\n // load texture atlas\n assetManager.load(Constants.TEXTURE_ATLAS_OBJECTS_02, TextureAtlas.class);\n // start loading assets and wait until finished\n assetManager.finishLoading();\n\n // Load strings resource file\n assetManager.load(Constants.I18N_BUNDLE, I18NBundle.class);\n // start loading assets and wait until finished\n assetManager.finishLoading();\n\n Gdx.app.debug(TAG, \"# of assets loaded: \" + assetManager.getAssetNames().size);\n }", "public void preLoadContent(AssetManager manager) {\n\t\tif (worldAssetState != AssetState.EMPTY) {\n\t\t\treturn;\n\t\t}\n\n\t\tworldAssetState = AssetState.LOADING;\n\n\t\tmanager.load(KOI_TEXTURE, Texture.class);\n\t\tassets.add(KOI_TEXTURE);\n\n\t\tmanager.load(ENEMY_TEXTURE, Texture.class);\n\t\tassets.add(ENEMY_TEXTURE);\n\n\t\tmanager.load(LILY_TEXTURE, Texture.class);\n\t\tassets.add(LILY_TEXTURE);\n\t\t\n\t\tmanager.load(LILY_TEXTURE_N, Texture.class);\n\t\tassets.add(LILY_TEXTURE_N);\n\t\t\n\t\tmanager.load(LILY_TEXTURE_S, Texture.class);\n\t\tassets.add(LILY_TEXTURE_S);\n\n\t\tmanager.load(LANTERN_TEXTURE, Texture.class);\n\t\tassets.add(LANTERN_TEXTURE);\n\n\t\tmanager.load(LIGHTING_TEXTURE, Texture.class);\n\t\tassets.add(LIGHTING_TEXTURE);\n\n\t\tmanager.load(SHADOW_TEXTURE, Texture.class);\n\t\tassets.add(SHADOW_TEXTURE);\n\n\t\tmanager.load(GOAL_TEXTURE, Texture.class);\n\t\tassets.add(GOAL_TEXTURE);\n\n\t\tmanager.load(EARTH_FILE,Texture.class);\n\t\tassets.add(EARTH_FILE);\n\n\t\tmanager.load(EARTH_FILE_D,Texture.class);\n\t\tassets.add(EARTH_FILE_D);\n\t\tmanager.load(EARTH_FILE_N,Texture.class);\n\t\tassets.add(EARTH_FILE_N);\n\t\tmanager.load(EARTH_FILE_S,Texture.class);\n\t\tassets.add(EARTH_FILE_S);\n\t\tmanager.load(SHORE_FILE,Texture.class);\n\t\tassets.add(SHORE_FILE);\n\n\t\tmanager.load(ROCK_FILE_D,Texture.class);\n\t\tassets.add(ROCK_FILE_D);\n\t\tmanager.load(ROCK_FILE_N,Texture.class);\n\t\tassets.add(ROCK_FILE_N);\n\t\tmanager.load(ROCK_FILE_S,Texture.class);\n\t\tassets.add(ROCK_FILE_S);\n\n\t\tmanager.load(WHIRLPOOL_TEXTURE, Texture.class);\n\t\tassets.add(WHIRLPOOL_TEXTURE);\n\t\t\n\t\tmanager.load(ENERGYBAR_TEXTURE, Texture.class);\n\t\tassets.add(ENERGYBAR_TEXTURE);\n\n\t\tmanager.load(UI_FLOWER, Texture.class);\n\t\tassets.add(UI_FLOWER);\n\n\t\tmanager.load(OVERLAY, Texture.class);\n\t\tassets.add(OVERLAY);\n\n\t\tmanager.load(BACKGROUND_FILE_N, Texture.class);\n\t\tassets.add(BACKGROUND_FILE_N);\n\n\t\tmanager.load(BACKGROUND_FILE_D, Texture.class);\n\t\tassets.add(BACKGROUND_FILE_D);\n\n\t\tmanager.load(BACKGROUND_FILE_S, Texture.class);\n\t\tassets.add(BACKGROUND_FILE_S);\n\t\t\n\t\t\n\n\t\tmanager.load(OVERLAY_FILE, Texture.class);\n\t\tassets.add(OVERLAY_FILE);\n\n\t\tmanager.load(KOI_ARROW, Texture.class);\n\t\tassets.add(KOI_ARROW);\n\t\tmanager.load(WHIRL_ARROW, Texture.class);\n\t\tassets.add(WHIRL_ARROW);\n\t\t\n\t\tmanager.load(TUTORIAL_TEXTURE1, Texture.class);\n\t\tassets.add(TUTORIAL_TEXTURE1);\n\t\tmanager.load(TUTORIAL_TEXTURE2, Texture.class);\n\t\tassets.add(TUTORIAL_TEXTURE2);\n\t\tmanager.load(TUTORIAL_TEXTURE3, Texture.class);\n\t\tassets.add(TUTORIAL_TEXTURE3);\n\t\tmanager.load(TUTORIAL_TEXTURE4, Texture.class);\n\t\tassets.add(TUTORIAL_TEXTURE4);\n\t\tmanager.load(TUTORIAL_TEXTURE5, Texture.class);\n\t\tassets.add(TUTORIAL_TEXTURE5);\n\t\tmanager.load(TUTORIAL_TEXTURE6, Texture.class);\n\t\tassets.add(TUTORIAL_TEXTURE6);\n\t\t\n\t\tmanager.load(HELP_TEXTURE, Texture.class);\n\t\tassets.add(HELP_TEXTURE);\n\t\t\n\n\t\treferenceC.a = 0f;\n\n\t\t// Load the font\n\t\tFreetypeFontLoader.FreeTypeFontLoaderParameter size2Params = new FreetypeFontLoader.FreeTypeFontLoaderParameter();\n\t\tsize2Params.fontFileName = FONT_FILE;\n\t\tsize2Params.fontParameters.size = FONT_SIZE;\n\t\tmanager.load(FONT_FILE, BitmapFont.class, size2Params);\n\t\tassets.add(FONT_FILE);\n\n\t\tFreetypeFontLoader.FreeTypeFontLoaderParameter size3Params = new FreetypeFontLoader.FreeTypeFontLoaderParameter();\n\t\tsize3Params.fontFileName = FONT_FILE2;\n\t\tsize3Params.fontParameters.size = FONT_SIZE2;\n\t\tmanager.load(FONT_FILE2, BitmapFont.class, size3Params);\n\t\tassets.add(FONT_FILE2);\n\t\t\n\t\t\n\t}", "public interface IGameAsset {\n\t\n\t/**\n\t * abstract method for load all game's resources in startup time.\n\t */\n\tpublic void load();\n\n\t/**\n\t * Dispose the resources in game asset when exiting game\n\t */\n\tpublic void dispose();\n\t\n\t/**\n\t * load a bitmap font by font file (*.fnt) and font image file\n\t * @param fileFont font\n\t * @param fileImage font image\n\t * @return\n\t */\n\tpublic BitmapFont loadBitmapFont(String fileFont, String fileImage);\n\t/**\n\t * Load a Music by filepath name\n\t * @param fileName music filepath to load.\n\t * @param isLoop set audio is looping\n\t * @param volumn the Volumn (0f -> 1f)\n\t * @return the Music\n\t */\n\tpublic Music loadMusic(String fileName, boolean isLoop, float volumn);\n\t/**\n\t * Load Music by filepath name\n\t * @param fileName music filepath to load.\n\t * @return\n\t */\n\tpublic Music loadMusic(String fileName);\n\t/**\n\t * Load a Music by filepath name\n\t * @param fileName music filepath to load.\n\t * @param volumn the Volumn (0f -> 1f)\n\t * @return\n\t */\n\tpublic Music loadMusic(String fileName, float volume);\n\t/**\n\t * Load a Sound from filepath\n\t * @param file File to load\n\t * @return the Sound\n\t */\n\tpublic Sound loadSound(String file);\n\n\t/**\n\t * Load a shader from shader-vs and shader-fs from file path\n\t * @param vsProcess\n\t * @param fsProcess\n\t * @return ShaderProgram\n\t */\n\tpublic ShaderProgram loadShader(String vsProcess, String fsProcess);\n\n\t/**\n\t * Load a Model for object 3D from file path\n\t * @param filepath\n\t * @return\n\t */\n\tpublic StillModel loadModel(String filepath);\n\t/**\n\t * Load texture from file path\n\t * @param file File to load\n\t * @return The texture\n\t */\n\tpublic Texture loadTexture(String file, Format format, boolean useMipMap);\n\n//\t/**abstract method for load TextureRegion\n//\t * @param filepath File to load\n//\t * @param format format of texture\n//\t * @param useMipMap\n//\t * @param rec \n//\t * @return\n//\t */\n//\tTextureRegion loadTextureRegion(String filepath, Format format,\n//\t\t\tboolean useMipMap, Rectangle rec);\n\n\t/**abstract method for load TextureRegion\n\t * @param texture texture of TextureRegion\n\t * @param rec rectangle used to specify the region on texture\n\t * @return\n\t */\n\tpublic TextureRegion loadTextureRegion(Texture texture, Rectangle rec);\n\t/**\n\t * load a bitmap font by font file (*.fnt) and font image file\n\t * @param fileFont font\n\t * @param fileImage font image\n\t * @param flip Flip the font for axis-y down\n\t * @return\n\t */\n\tpublic BitmapFont loadBitmapFont(String fileFont, String fileImage, boolean flip);\n\n\tpublic TextureRegion loadTextureRegion(Texture t);\n\n\tTextureRegion loadTextureRegion(String textureFile, Rectangle rec);\n\n\tTextureRegion loadTextureRegion(String textureFile);\n\n\tTexture loadTexture(String filepath);\n\n\tBitmapFont loadBitmapFont(String fileFont);\n\n\tShaderProgram loadShader(String vsFilePath);\n}", "private static void initResources() {\n\t\tString[] res = new String[4];\r\n\t\tres[0] = \"res/entity/spaceshipv1.png\";\r\n\t\tres[1] = \"res/entity/prob.png\";\r\n\t\tres[2] = \"res/dot.png\";\r\n\t\tres[3] = \"res/entity/spaceshipv2.png\";\r\n\t\tSResLoader.addSpriteArray(res);\r\n\t}", "public static void loadBg() {\n bg = new Texture (Gdx.files.internal(\"data/bbb.png\"));\n textureBg =new TextureRegion(bg);\n player = new Texture (Gdx.files.internal(\"data/nave2.png\"));\n texturePlayer =new TextureRegion(player);\n gameOver = new Texture (Gdx.files.internal(\"data/gameOver.png\"));\n textureGameOver =new TextureRegion(gameOver);\n textureGameOver.flip(false, true);\n laser= new Texture (Gdx.files.internal(\"data/disparo_sprite.png\"));\n textureLaser = new TextureRegion(laser);\n obstacle= new Texture (Gdx.files.internal(\"data/square.gif\"));\n textureObstacle = new TextureRegion(obstacle);\n title= new Texture (Gdx.files.internal(\"data/invadpt2.png\"));\n textureTitle = new TextureRegion(title);\n win = new Texture (Gdx.files.internal(\"data/win.png\"));\n textureWin =new TextureRegion(win);\n textureWin.flip(false, true);\n ranking = new Texture (Gdx.files.internal(\"data/ranking.png\"));\n textureRanking =new TextureRegion(ranking);\n textureRanking.flip(false, true);\n ranking1 = new Texture (Gdx.files.internal(\"data/ranking1.png\"));\n textureRanking1 =new TextureRegion(ranking1);\n textureRanking1.flip(false, true);\n ranking2 = new Texture (Gdx.files.internal(\"data/ranking2.png\"));\n textureRanking2 =new TextureRegion(ranking2);\n textureRanking2.flip(false, true);\n superEnemy= new Texture (Gdx.files.internal(\"data/superEnemy.png\"));\n textureSuperEnemy = new TextureRegion(superEnemy);\n textureSuperEnemy.flip(false, true);\n\n text1=new Texture(Gdx.files.internal(\"data/bg.jpg\"));\n text2 = new TextureRegion(text1);\n text= new TextureAtlas();\n text.addRegion(\"text\",text2);\n text.addRegion(\"text\",text1,0,0,20,30);\n loadColorInvaders();\n\n\n }", "public static void preloadAllAssets() {\r\n\t\tbackground = new Image(fileURL(\"./assets/gifs/background.gif\"));\r\n\r\n\t\tbackgroundGif = new Background(new BackgroundImage(background, BackgroundRepeat.NO_REPEAT, BackgroundRepeat.NO_REPEAT, BackgroundPosition.DEFAULT, BackgroundSize.DEFAULT));\r\n\r\n\t\t//Michael Bay Mode gifs\r\n\t\tcollisionGif = new Image(fileURL(\"./assets/gifs/collision.gif\"));\r\n\t\trunAwayGif = new Image(fileURL(\"./assets/gifs/run_away.gif\"));\r\n\r\n\t\t//Regular Simulation Images \r\n\t\tearthImage = new ImagePattern(new Image(fileURL(\"./assets/images/earth.png\")));\r\n\t\tneptuneImage = new ImagePattern(new Image(fileURL(\"./assets/images/neptune.png\")));\r\n\t\tsunImage = new ImagePattern(new Image(fileURL(\"./assets/images/sun.png\")));\r\n\t\tstarImage = new ImagePattern(new Image(fileURL(\"./assets/images/star.png\")));\r\n\t\tmarsImage = new ImagePattern(new Image(fileURL(\"./assets/images/mars.png\")));\r\n\t\tmoonImage = new ImagePattern(new Image(fileURL(\"./assets/images/moon.png\")));\r\n\t\tasteroidImage = new ImagePattern(new Image(fileURL(\"./assets/images/asteroid.png\")));\r\n\r\n\t\t//Michael Bay mode images\r\n\t\tmichaelBayExplosionImage = new ImagePattern(new Image(fileURL(\"./assets/images/bay_explosion.jpg\")));\r\n\t\tmichaelBayPointingImage = new Image(fileURL(\"./assets/images/bay_pointing.jpg\"));\r\n\t\tmichaelBayGangsterImage = new ImagePattern(new Image(fileURL(\"./assets/images/bay_gangster.jpg\")));\r\n\t\tgenericExplosionImage = new ImagePattern(new Image(fileURL(\"./assets/images/generic_explosion.png\")));\r\n\t\tusaFlagImage = new Image(fileURL(\"./assets/images/usa_flag.jpg\"));\r\n\t\tusaBackground = new Background(new BackgroundImage(usaFlagImage, BackgroundRepeat.NO_REPEAT, BackgroundRepeat.NO_REPEAT, BackgroundPosition.DEFAULT, BackgroundSize.DEFAULT));\r\n\t}", "public static void load() {\n\t\tspritesheet = new Spritesheet(\"src/de/kaffeeliebhaber/assets/pyxel/voland_spritesheet_new.png\", 32, 32);\n\t\tspritesheet.load();\n\t\t\n\t\t// load player\n\t\tAssetsLoader.loadPlayerAssets();\n\t\t\n\t\t// load crate\n\t\tAssetsLoader.loadCrates();\n\t\t\n\t\t// load item spritesheet \n\t\tspritesheetInventory = new Spritesheet(Config.ITEM_SPRITESHEET, Config.ITEM_SIZE, Config.ITEM_SIZE);\n\t\tspritesheetInventory.load();\n\t\t\n\t\t// load font \n\t\tloadFonts();\n\t\t\n\t\t// ui\n\t\timageUI = ImageLoader.loadImage(\"src/de/kaffeeliebhaber/assets/ui/ui.png\");\n\t\t\n\t\tAssetsLoader.loadInfoPaneAssets();\n\t\t\n\t\t// npc\n\t\tspritesheetNPC = new Spritesheet(\"src/de/kaffeeliebhaber/assets/AH_SpriteSheet_People1.png\", 16, 16);\n\t\tspritesheetNPC.load();\n\t\t\n\t\t// fox\n\t\tspritesheetNPCFox = new Spritesheet(\"src/de/kaffeeliebhaber/assets/imgs/72c68863962b7a6b5a9f5f5bcc5afb16.png\", 32, 32);\n\t\tspritesheetNPCFox.load();\n\n\t\t// *** LOAD NPCs\n\t\tAssetsLoader.loadFoxAssets();\n\t\t\n\t\tAssetsLoader.loadNPCs();\n\t\t\n\t\tspritesheetFemale = new Spritesheet(\"src/de/kaffeeliebhaber/assets/imgs/Female 01-1.png\", 32, 32);\n\t\tspritesheetFemale.load();\n\t}", "public void loadContent(AssetManager manager) {\n\t\tif (ragdollAssetState != AssetState.LOADING) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tcrosshairTexture = createTexture(manager,CROSS_FILE,false);\n\t\tbackgroundTexture = createTexture(manager,BACKG_FILE,false);\n\t\tforegroundTexture = createTexture(manager,FOREG_FILE,false);\n\t\t\n\t\tbubbleTexture = createTexture(manager,BUBBLE_FILE,false);\n\t\tbodyTextures = new TextureRegion[RAGDOLL_FILES.length];\n\t\tfor(int ii = 0; ii < RAGDOLL_FILES.length; ii++) {\n\t\t\tbodyTextures[ii] = createTexture(manager,RAGDOLL_FILES[ii],false);\n\t\t}\n\t\tfor(int ii = 0; ii < BUBBLE_SOUNDS.length; ii++) {\n\t\t\tSoundController.getInstance().allocate(manager, BUBBLE_SOUNDS[ii]);\n\t\t}\n\n\t\tsuper.loadContent(manager);\n\t\tragdollAssetState = AssetState.COMPLETE;\n\t}", "public void load(String path) {\n try {\n texId = new TextureId(path);\n BufferedImage image = ImageIO.read(new FileInputStream(\"resources\" + texId.getPath()));\n createImage(image);\n } catch (Exception e) {\n e.printStackTrace();\n unload();\n }\n }", "private void loadGraphics() {\n\t\ttopAtlas = new BitmapTextureAtlas(this.activity.getTextureManager(), 1024, 1024);\r\n\t\ttopRegion = BitmapTextureAtlasTextureRegionFactory.createFromAsset(topAtlas, activity, \"pizza_top.png\", 0, 0);\r\n\t\ttopAtlas.load();\r\n\t\t\r\n\t\t\r\n\t\tbottomAtlas = new BitmapTextureAtlas(this.activity.getTextureManager(), 1024, 1024);\r\n\t\tbottomRegion = BitmapTextureAtlasTextureRegionFactory.createFromAsset(bottomAtlas, activity, \"pizza_bottom.png\", 0, 0);\r\n\t\tbottomAtlas.load();\t\r\n\t\t\t\t\t\t\r\n\t\t\r\n\t\tbalanceAtlas = new BuildableBitmapTextureAtlas(engine.getTextureManager(), 1024, 512);\r\n\t\trod = BitmapTextureAtlasTextureRegionFactory.createFromAsset(balanceAtlas, activity, \"baserod.png\");\r\n\t\tbase = BitmapTextureAtlasTextureRegionFactory.createFromAsset(balanceAtlas, activity, \"balancebase.png\");\r\n\t\tbalanceRod = BitmapTextureAtlasTextureRegionFactory.createFromAsset(balanceAtlas, activity, \"balancerod.png\");\r\n\t\tchain = BitmapTextureAtlasTextureRegionFactory.createFromAsset(balanceAtlas, activity, \"chain.png\");\r\n\t\tpan = BitmapTextureAtlasTextureRegionFactory.createFromAsset(balanceAtlas, activity, \"pan.png\");\r\n\t\tok = BitmapTextureAtlasTextureRegionFactory.createFromAsset(balanceAtlas, activity, \"OK.png\");\r\n\t\twinner = BitmapTextureAtlasTextureRegionFactory.createFromAsset(balanceAtlas, activity, \"winner.png\");\r\n\t\ticon = BitmapTextureAtlasTextureRegionFactory.createFromAsset(balanceAtlas, activity, \"icon.png\");\r\n\t\t\r\n\t\tweight = BitmapTextureAtlasTextureRegionFactory.createFromAsset(balanceAtlas, activity, \"w.png\");\r\n\t\t\r\n\t\ttry {\r\n\t\t\tbalanceAtlas.build(new BlackPawnTextureAtlasBuilder<IBitmapTextureAtlasSource, BitmapTextureAtlas>(0, 1, 1));\r\n\t\t} catch (TextureAtlasBuilderException e) {\r\n\t\t\tLog.e(\"PLAYSCENE\", \"ERROR BUILDING BALANCEATLAS\");\r\n\t\t}\r\n\t\tbalanceAtlas.load();\r\n\t\t\r\n\t}", "@Override\n\t\tpublic TextureAtlas<String> load(JSONObject root) throws IOException {\n\t\t\tfinal JSONArray array = root.getJSONArray(\"atlas\");\n\n\t\t\t// Load texture atlas\n\t\t\treturn StreamSupport\n\t\t\t\t\t.stream(array.spliterator(), false)\n\t\t\t\t\t.map(JSONObject.class::cast)\n\t\t\t\t\t.map(Loader::entry)\n\t\t\t\t\t.collect(collectingAndThen(toMap(Entry::getKey, Entry::getValue), TextureAtlas::of));\n\t\t}", "public void loadResources();", "public static void load(){\n for(TextureHandler t : textures){\n if(t.texture!=null)t.texture.dispose();\n }\n textures.clear();\n \n //if the textures are corrupt or just arent there then the error TextureHandler will\n //be a placeholder which is generated programatically so it is always there\n int size = 64;\n Pixmap pixmap = new Pixmap(size,size, Format.RGBA8888 );\n pixmap.setColor(1f,0f,0f,1f);\n pixmap.fillCircle(size/2,size/2,size/2);\n pixmap.setColor(0f,0f,0f,1f);\n pixmap.fillCircle(size/2,size/2,(size/2)-2);\n pixmap.setColor(1f,0f,0f,1f);\n int offset = size/6;\n int length = (size+size)/3;\n pixmap.drawLine(offset,offset,offset+length,offset+length);\n pixmap.drawLine(offset+length,offset,offset,offset+length);\n error = new Texture(pixmap);\n pixmap.dispose();\n //things that get rendered the most get put at the top so theyre the first in the list\n textures.add(new TextureHandler(\"Block\" ,\"Block.png\",true));\n textures.add(new TextureHandler(\"Block1\",\"Block1.png\",true));\n textures.add(new TextureHandler(\"Block2\",\"Block2.png\",true));\n textures.add(new TextureHandler(\"Block3\",\"Block3.png\",true));\n textures.add(new TextureHandler(\"Block4\",\"Block4.png\",true));\n textures.add(new TextureHandler(\"GameBackground\",\"GameBackground.png\",true));\n \n textures.add(new TextureHandler(\"Hints\",\"Hints.png\",false));\n textures.add(new TextureHandler(\"Left\" ,\"ButtonLeft.png\",true));\n textures.add(new TextureHandler(\"Right\" ,\"ButtonRight.png\",true));\n textures.add(new TextureHandler(\"Rotate\",\"ButtonRotate.png\",true));\n textures.add(new TextureHandler(\"Pause\" ,\"ButtonPause.png\",true));\n textures.add(new TextureHandler(\"Label\" ,\"TextBox.png\",true));\n \n textures.add(new TextureHandler(\"Locked\",\"levels/Locked.png\",false));\n textures.add(new TextureHandler(\"Timer\",\"levels/Clock.png\",false));\n \n textures.add(new TextureHandler(\"PauseSelected\",\"SelectedPause.png\",true));\n textures.add(new TextureHandler(\"LeftSelected\",\"SelectedLeft.png\",true));\n textures.add(new TextureHandler(\"RightSelected\",\"SelectedRight.png\",true));\n textures.add(new TextureHandler(\"RotateSelected\",\"SelectedRotate.png\",true));\n \n textures.add(new TextureHandler(\"Background\",\"Background.png\",false));\n textures.add(new TextureHandler(\"Title\",\"MainMenuTitle.png\",false));\n\n }", "private void loadBackground() {\n\t\ttry {\n\t\t\timgBackground[0] = ImageIO.read(new File(System.getProperty(\"user.dir\")+\"/assets/Background1.jpg\")); // attempts to load the three\n\t\t\timgBackground[1] = ImageIO.read(new File(System.getProperty(\"user.dir\")+\"/assets/Background2.jpg\")); // default backgrounds from the\n\t\t\timgBackground[2] = ImageIO.read(new File(System.getProperty(\"user.dir\")+\"/assets/Background3.jpg\")); // assets folder\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void load(){\r\n\t \ttry {\r\n\t \t\t// load and set all sprites\r\n\t\t\t\tsetBlueGarbage(ImageIO.read(classPath.getResourceAsStream(\"/images/blueGarbage.png\")));\r\n\t\t\t\tsetRank(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/rank.png\")));\r\n\t\t\t\tsetRedGarbage(ImageIO.read(classPath.getResourceAsStream(\"/images/redGarbage.png\")));\r\n\t\t\t\tsetYellowGarbage(ImageIO.read(classPath.getResourceAsStream(\"/images/yellowGarbage.png\")));\r\n\t\t\t\tsetGreenGarbage(ImageIO.read(classPath.getResourceAsStream(\"/images/greenGarbage.png\")));\r\n\t\t\t\tsetBlueSnakeBodyPart(ImageIO.read(classPath.getResourceAsStream(\"/images/blueSnakeBodyPart.png\")));\r\n\t\t\t\tsetRedSnakeBodyPart(ImageIO.read(classPath.getResourceAsStream(\"/images/redSnakeBodyPart.png\")));\r\n\t\t\t\tsetYellowSnakeBodyPart(ImageIO.read(classPath.getResourceAsStream(\"/images/yellowSnakeBodyPart.png\")));\r\n\t\t\t\tsetGreenSnakeBodyPart(ImageIO.read(classPath.getResourceAsStream(\"/images/greenSnakeBodyPart.png\")));\r\n\t\t\t\tsetHeart(ImageIO.read(classPath.getResourceAsStream(\"/images/heart.png\")));\r\n\t\t\t\tsetGameScreenBackground(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/gameScreenBackground.png\")));\r\n\t\t\t\tsetGameScreenHeader(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/gameScreenHeader.png\")));\r\n\t\t\t\tsetGameOver(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/gameOver.png\")));\r\n\t\t\t\tsetHitsOwnBody(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/hitsOwnBody.png\")));\r\n\t\t\t\tsetHitsWall(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/hitsWall.png\")));\r\n\t\t\t\tsetWrongColor(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/wrongColor.png\")));\r\n\t\t\t\tsetHelpScreenBackground(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/helpScreenBackground.png\")));\r\n\t\t\t \tsetWarningScreenBackground(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/warningScreenBackground.png\")));\r\n\t\t\t \tsetOkButton(ImageIO.read(classPath.getClass().getResource(\"/images/okButton.png\")));\r\n\t\t\t \tsetMenuScreenBackground(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/menuScreenBackground.png\")));\r\n\t\t\t\tsetStartButton(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/startButton.png\")));\r\n\t\t\t\tsetExitButton(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/exitButton.png\")));\r\n\t\t\t\tsetHelpButton(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/helpButton.png\")));\r\n\t\t\t\t\r\n\t \t} \r\n\t \tcatch (Exception e) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, e.getStackTrace(), \"Erro ao carregar imagens\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t\r\n\t\t\t}\t\r\n \t\r\n \t}", "public Assets() {\n\t\tinit();\n\t}", "private void loadTextures() {\n textureIdMap.keySet().forEach((i) -> {\n //for (int i = 0; i < textureFileNames.length; i++) {\n try {\n URL textureURL;\n textureURL = getClass().getClassLoader().getResource(textureIdMap.get(i));\n if (textureURL != null) {\n BufferedImage img = ImageIO.read(textureURL);\n ImageUtil.flipImageVertically(img);\n Texture temp = AWTTextureIO.newTexture(GLProfile.getDefault(), img, true);\n temp.setTexParameteri(gl, GL2.GL_TEXTURE_WRAP_S, GL2.GL_CLAMP_TO_EDGE);\n temp.setTexParameteri(gl, GL2.GL_TEXTURE_WRAP_T, GL2.GL_CLAMP_TO_EDGE);\n textures.put(i, temp);\n }\n } catch (IOException | GLException e) {\n e.printStackTrace();\n }\n });\n textures.get(0).enable(gl);\n }", "private boolean load() {\r\n \t\r\n int[] textureIds = new int[1];\r\n GLES10.glGenTextures(1, textureIds, 0);\r\n this.textureId = textureIds[0];\r\n \r\n InputStream in = null;\r\n // try loading from assets\r\n try {\r\n \t\r\n in = FileIO.getInstance().readAsset(\"textures\" + File.separator + this.fileName);\r\n Bitmap bitmap = BitmapFactory.decodeStream(in);\r\n GLES10.glBindTexture(GLES10.GL_TEXTURE_2D, this.textureId);\r\n GLUtils.texImage2D(GLES10.GL_TEXTURE_2D, 0, bitmap, 0);\r\n this.setFilters(GLES10.GL_NEAREST, GLES10.GL_NEAREST); \r\n GLES10.glBindTexture(GLES10.GL_TEXTURE_2D, 0);\r\n this.width = bitmap.getWidth();\r\n this.height = bitmap.getHeight();\r\n bitmap.recycle();\r\n \r\n } catch (IOException e) {\r\n \t\r\n \t// if not found in assets try loading from sd-card\r\n try {\r\n \t\r\n \tin = FileIO.getInstance().readFile(APP_FOLDER + File.separator + \"textures\" + File.separator + this.fileName);\r\n Bitmap bitmap = BitmapFactory.decodeStream(in);\r\n GLES10.glBindTexture(GLES10.GL_TEXTURE_2D, this.textureId);\r\n GLUtils.texImage2D(GLES10.GL_TEXTURE_2D, 0, bitmap, 0);\r\n this.setFilters(GLES10.GL_NEAREST, GLES10.GL_NEAREST); \r\n GLES10.glBindTexture(GLES10.GL_TEXTURE_2D, 0);\r\n this.width = bitmap.getWidth();\r\n this.height = bitmap.getHeight();\r\n bitmap.recycle();\r\n \r\n } catch (IOException e2) {\r\n \t\r\n \treturn false;\r\n \t\r\n } finally {\r\n \t\r\n if (in != null) {\r\n \r\n \ttry { in.close(); } catch (IOException e2) {}\r\n }\r\n }\r\n \r\n } finally {\r\n \t\r\n if (in != null) {\r\n \r\n \ttry { in.close(); } catch (IOException e) {}\r\n }\r\n }\r\n \r\n return true;\r\n }", "private void loadTextures() {\n\t\tspriteSheet01 = new Texture(\"data/buttonsspritesheet02.png\");\n\n\t\tnew TextureRegion(spriteSheet01, BROKEN_COLUMN * SQUARE_SIZE,\n\t\t\t\tBROKEN_ROW * SQUARE_SIZE, SQUARE_SIZE, SQUARE_SIZE);\n\n\t\tnew TextureRegion(spriteSheet01, EMPTY_BUTTON_COLUMN * SQUARE_SIZE,\n\t\t\t\tEMPTY_BUTTON_ROW * SQUARE_SIZE, SQUARE_SIZE, SQUARE_SIZE);\n\n\t\tnew TextureRegion(spriteSheet01, ACTIVATED_COLUMN * SQUARE_SIZE,\n\t\t\t\tSPECIALS_ROW_TWO * SQUARE_SIZE, SQUARE_SIZE, SQUARE_SIZE);\n\n\t\tnew TextureRegion(spriteSheet01, DEPRESSED_BUTTON * SQUARE_SIZE,\n\t\t\t\tSPECIALS_ROW_TWO * SQUARE_SIZE, SQUARE_SIZE, SQUARE_SIZE);\n\n\t\tnew TextureRegion(spriteSheet01, HIGHLIGHTED_COLUMN * SQUARE_SIZE,\n\t\t\t\tSPECIALS_ROW_TWO * SQUARE_SIZE, SQUARE_SIZE, SQUARE_SIZE);\n\n\t\tnew TextureRegion(spriteSheet01, CAROUSEL_COLUMN * SQUARE_SIZE,\n\t\t\t\t(CAROUSEL_ROW * SQUARE_SIZE) + CAROUSEL_PIXELS, SQUARE_SIZE,\n\t\t\t\tCAROUSEL_PIXELS);\n\n\t\tnew TextureRegion(spriteSheet01, FIX_BUTTON_COLUMN * SQUARE_SIZE,\n\t\t\t\tFIX_BUTTON_ROW * SQUARE_SIZE, SQUARE_SIZE, SQUARE_SIZE);\n\n\t\tnew TextureRegion(spriteSheet01, WILD_BUTTON_COLUMN * SQUARE_SIZE,\n\t\t\t\tWILD_BUTTON_ROW * SQUARE_SIZE, SQUARE_SIZE, SQUARE_SIZE);\n\n\t\tcarousel = new TextureRegion[MAIN_COLOUR_AMOUNT];\n\t\tfor (int i = 0; i < MAIN_COLOUR_AMOUNT; i++) {\n\t\t\tcarousel[i] = new TextureRegion(spriteSheet01,\n\t\t\t\t\t(CAROUSEL_COLUMN * SQUARE_SIZE) + (i * CAROUSEL_PIXELS),\n\t\t\t\t\tCAROUSEL_ROW * SQUARE_SIZE, CAROUSEL_PIXELS,\n\t\t\t\t\tCAROUSEL_PIXELS);\n\t\t}\n\n\t\trings = new TextureRegion[RING_AMOUNT];\n\t\tfor (int i = 0; i < RING_AMOUNT; i++) {\n\t\t\trings[i] = new TextureRegion(spriteSheet01, i * SQUARE_SIZE,\n\t\t\t\t\tRING_ROW * SQUARE_SIZE, SQUARE_SIZE, SQUARE_SIZE);\n\t\t}\n\n\t\tmainColour = new TextureRegion[MAIN_COLOUR_AMOUNT];\n\t\tfor (int i = 0; i < MAIN_COLOUR_AMOUNT; i++) {\n\t\t\tmainColour[i] = new TextureRegion(spriteSheet01,\n\t\t\t\t\t(i + MAIN_COLOUR_COLUMN) * SQUARE_SIZE, MAIN_COLOUR_ROW,\n\t\t\t\t\tSQUARE_SIZE, SQUARE_SIZE);\n\t\t}\n\n\t\tspecials = new TextureRegion[SPECIALS_AMOUNT];\n\t\tfor (int i = 0; i < SPECIALS_ROW_ONE_AMOUNT; i++) {\n\t\t\tspecials[i] = new TextureRegion(spriteSheet01, i * SQUARE_SIZE,\n\t\t\t\t\tSQUARE_SIZE, SQUARE_SIZE, SQUARE_SIZE);\n\t\t}\n\t\tfor (int i = SPECIALS_ROW_ONE_AMOUNT; i < SPECIALS_AMOUNT; i++) {\n\t\t\tspecials[i] = new TextureRegion(spriteSheet01,\n\t\t\t\t\t(i - SPECIALS_ROW_ONE_AMOUNT) * SQUARE_SIZE,\n\t\t\t\t\tSPECIALS_ROW_TWO * SQUARE_SIZE, SQUARE_SIZE, SQUARE_SIZE);\n\t\t}\n\n\t\tenemyBaseColours = new TextureRegion[ENEMY_COLOURS_AMOUNT];\n\t\tfor (int i = 0; i < ENEMY_COLOURS_AMOUNT; i++) {\n\t\t\tenemyBaseColours[i] = new TextureRegion(spriteSheet01, i\n\t\t\t\t\t* SQUARE_SIZE, ENEMY_BASE_ROW * SQUARE_SIZE, SQUARE_SIZE,\n\t\t\t\t\tSQUARE_SIZE);\n\t\t}\n\n\t\tenemyHalfColours = new TextureRegion[ENEMY_COLOURS_AMOUNT];\n\t\tfor (int i = 0; i < ENEMY_COLOURS_AMOUNT; i++) {\n\t\t\tenemyHalfColours[i] = new TextureRegion(spriteSheet01, i\n\t\t\t\t\t* SQUARE_SIZE, ENEMY_HALF_ROW * SQUARE_SIZE, SQUARE_SIZE,\n\t\t\t\t\tSQUARE_SIZE);\n\t\t}\n\n\t\tenemyThirdColours = new TextureRegion[ENEMY_COLOURS_AMOUNT];\n\t\tfor (int i = 0; i < ENEMY_COLOURS_AMOUNT; i++) {\n\t\t\tenemyThirdColours[i] = new TextureRegion(spriteSheet01, i\n\t\t\t\t\t* SQUARE_SIZE, ENEMY_THIRD_ROW * SQUARE_SIZE, SQUARE_SIZE,\n\t\t\t\t\tSQUARE_SIZE);\n\t\t}\n\n\t\tenemyRimColours = new TextureRegion[ENEMY_COLOURS_AMOUNT];\n\t\tfor (int i = 0; i < ENEMY_COLOURS_AMOUNT; i++) {\n\t\t\tenemyRimColours[i] = new TextureRegion(spriteSheet01, i\n\t\t\t\t\t* SQUARE_SIZE, ENEMY_RIM_ROW * SQUARE_SIZE, SQUARE_SIZE,\n\t\t\t\t\tSQUARE_SIZE);\n\t\t}\n\n\t\tenemyConnectors = new TextureRegion[ENEMY_CONNECTORS_AMOUNT];\n\t\tfor (int i = 0; i < ENEMY_CONNECTORS_AMOUNT; i++) {\n\t\t\tenemyConnectors[i] = new TextureRegion(spriteSheet01,\n\t\t\t\t\t(i + ENEMY_CONNECTORS_COLUMN) * SQUARE_SIZE,\n\t\t\t\t\tENEMY_CONNECTORS_ROW * SQUARE_SIZE, SQUARE_SIZE,\n\t\t\t\t\tSQUARE_SIZE);\n\t\t}\n\t}", "public static void loadTextures() {\n loadFontTextures();\n loadAlternatePaletteTextures(); // Load alternate tiles.\n findAllTextures(); // Should be run last.\n System.out.println(\"Textures have been successfully loaded.\");\n }", "@Override\n\tpublic void LoadContent()\n\t{\n\t\tspriteBatch = new SpriteBatch(getGraphicsDevice());\n\t\t\n\t\tbackground = Texture2D.FromStream(getGraphicsDevice(), TitleContainer.OpenStream(\"test.png\"));\n\t\t\n\t\t//background = Content.Load(\"test.png\");\n\t\t\n\t\t// TODO: use this.Content to load your game content here\n\t}", "public void loadTextures(){\n switch (playerCarColor){\n case \"Black\":\n playerTexture = new Texture(Gdx.files.internal(\"images/playerCarBlack.png\"));\n fadedPlayerTexture = new Texture(Gdx.files.internal(\"images/playerCarBlackFaded.png\"));\n break;\n case \"White\":\n playerTexture = new Texture(Gdx.files.internal(\"images/playerCarWhite.png\"));\n fadedPlayerTexture = new Texture(Gdx.files.internal(\"images/playerCarWhiteFaded.png\"));\n break;\n }\n\n enemyPistolTexture = new Texture(Gdx.files.internal(\"images/enemyPistol.png\"));\n enemyAWPTexture = new Texture(Gdx.files.internal(\"images/enemyAWP.png\"));\n enemyStalkerTexture = new Texture(Gdx.files.internal(\"images/enemyStalker.png\"));\n bulletTexture = new Texture(Gdx.files.internal(\"images/bullet.png\"));\n enemyBossTexture = new Texture(Gdx.files.internal(\"images/enemyBoss.png\"));\n }", "@Override\n public void create() {\n\n batch = new SpriteBatch();\n manager = new AssetManager();\n\n manager.load(\"audio/main_theme.mp3\", Music.class);\n // manager.load(\"String sonido\", Sound.class);\n manager.load(\"sprites/dragon.pack\", TextureAtlas.class);\n manager.load(\"sprites/vanyr.pack\", TextureAtlas.class);\n manager.finishLoading();\n\n setScreen(new PlayScreen(this));\n\n }", "private void loadTextures() {\r\n int[] imgData;\r\n int width;\r\n int height;\r\n\r\n BitmapFactory.Options options = new BitmapFactory.Options();\r\n //圖片質量,數字越大越差\r\n options.inSampleSize = 1;\r\n Bitmap bitmap = BitmapFactory.decodeByteArray(path, 0, path.length, options);\r\n width = bitmap.getWidth();\r\n height = bitmap.getHeight();\r\n imgData = new int[width * height * 4];\r\n bitmap.getPixels(imgData, 0, width, 0, 0, width, height);\r\n bitmap.recycle();\r\n System.gc();\r\n\r\n mTextures.add(Texture.loadTextureFromIntBuffer(imgData, width, height));\r\n }", "public void gatherAssets(AssetDirectory directory) {\r\n\r\n\t\tassets = directory;\r\n\t\tavatarTexture = new TextureRegion(directory.getEntry(\"platform:Somni_Idle\",Texture.class));\r\n\t\tcombinedTexture = new TextureRegion(directory.getEntry(\"platform:somni_phobia_stand\",Texture.class));\r\n\r\n\t\t// Tiles\r\n\t\tlightTexture = new TextureRegion(directory.getEntry( \"shared:solidCloud_light\", Texture.class ));\r\n\t\tdarkTexture = new TextureRegion(directory.getEntry( \"shared:solidCloud_dark\", Texture.class ));\r\n\t\tallTexture = new TextureRegion(directory.getEntry( \"shared:solidCloud_all\", Texture.class ));\r\n\t\trainLightTexture = new TextureRegion(directory.getEntry( \"shared:rain_cloud_light\", Texture.class ));\r\n\t\trainDarkTexture = new TextureRegion(directory.getEntry( \"shared:rain_cloud_dark\", Texture.class ));\r\n\t\trainAllTexture = new TextureRegion(directory.getEntry( \"shared:rain_cloud_all\", Texture.class ));\r\n\t\tlightningLightTexture = new TextureRegion(directory.getEntry( \"shared:lightning_cloud_light\", Texture.class ));\r\n\t\tlightningDarkTexture = new TextureRegion(directory.getEntry( \"shared:lightning_cloud_dark\", Texture.class ));\r\n\t\tlightningAllTexture = new TextureRegion(directory.getEntry( \"shared:lightning_cloud_all\", Texture.class ));\r\n\t\tcrumbleLightTexture = new TextureRegion(directory.getEntry( \"shared:rain_crumble_light\", Texture.class ));\r\n\t\tcrumbleDarkTexture = new TextureRegion(directory.getEntry( \"shared:rain_crumble_dark\", Texture.class ));\r\n\t\tcrumbleAllTexture = new TextureRegion(directory.getEntry( \"shared:rain_crumble_all\", Texture.class ));\r\n\r\n\t\trainLightTextureReduced = new TextureRegion(directory.getEntry( \"shared:rain_cloud_light_reduced\", Texture.class ));\r\n\t\trainDarkTextureReduced = new TextureRegion(directory.getEntry( \"shared:rain_cloud_dark_reduced\", Texture.class ));\r\n\t\trainAllTextureReduced = new TextureRegion(directory.getEntry( \"shared:rain_cloud_all_reduced\", Texture.class ));\r\n\t\tlightningLightTextureReduced = new TextureRegion(directory.getEntry( \"shared:lightning_cloud_light_reduced\", Texture.class ));\r\n\t\tlightningDarkTextureReduced = new TextureRegion(directory.getEntry( \"shared:lightning_cloud_dark_reduced\", Texture.class ));\r\n\t\tlightningAllTextureReduced = new TextureRegion(directory.getEntry( \"shared:lightning_cloud_all_reduced\", Texture.class ));\r\n\t\tcrumbleLightTextureReduced = new TextureRegion(directory.getEntry( \"shared:rain_crumble_light_reduced\", Texture.class ));\r\n\t\tcrumbleDarkTextureReduced = new TextureRegion(directory.getEntry( \"shared:rain_crumble_dark_reduced\", Texture.class ));\r\n\t\tcrumbleAllTextureReduced = new TextureRegion(directory.getEntry( \"shared:rain_crumble_all_reduced\", Texture.class ));\r\n\r\n\t\t// Tutorial\r\n\t\ttutorial_signs = new TextureRegion[]{\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:camera_pan\", Texture.class)), //0\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:phobia_dash\", Texture.class)), //1\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:phobia_jump\", Texture.class)), //2\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:phobia_propel\", Texture.class)), //3\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:phobia_walk\", Texture.class)), //4\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:somni_dash\", Texture.class)), //5\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:somni_jump\", Texture.class)), //6\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:somni_propel\", Texture.class)), //7\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:somni_walk\", Texture.class)), //8\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:spirit_switch\", Texture.class)), //9\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:spirit_separate\", Texture.class)), //10\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:spirit_unify\", Texture.class)), //11\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:dash_catch\", Texture.class)),\t //12\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:propel_dash_vertical\", Texture.class))\t //13\r\n\r\n\t\t};\r\n\r\n\t\t// Base models\r\n\t\tsomniTexture = new TextureRegion(directory.getEntry(\"platform:somni_stand\",Texture.class));\r\n\t\tsomniIdleTexture = new TextureRegion(directory.getEntry(\"platform:Somni_Idle\",Texture.class));\r\n\t\tsomniWalkTexture = new TextureRegion(directory.getEntry(\"platform:somni_walk_cycle\",Texture.class));\r\n\t\tsomniDashSideTexture = new TextureRegion(directory.getEntry(\"platform:Somni_Jump_Dash\",Texture.class));\r\n\t\tsomniDashUpTexture = new TextureRegion(directory.getEntry(\"platform:Somni_Falling\",Texture.class));\r\n\t\tsomniFallTexture = new TextureRegion(directory.getEntry(\"platform:Somni_Falling\", Texture.class));\r\n\r\n\t\tphobiaTexture = new TextureRegion(directory.getEntry(\"platform:phobia_stand\",Texture.class));\r\n\t\tphobiaIdleTexture = new TextureRegion(directory.getEntry(\"platform:Phobia_Idle\",Texture.class));\r\n\t\tphobiaWalkTexture = new TextureRegion(directory.getEntry(\"platform:phobia_walk_cycle\",Texture.class));\r\n\t\tphobiaDashSideTexture = new TextureRegion(directory.getEntry(\"platform:Phobia_Jump_Dash\",Texture.class));\r\n\t\tphobiaDashUpTexture = new TextureRegion(directory.getEntry(\"platform:Phobia_Falling\",Texture.class));\r\n\t\tphobiaFallTexture = new TextureRegion(directory.getEntry(\"platform:Phobia_Falling\", Texture.class));\r\n\r\n\r\n\t\t// Combined models\r\n\t\tsomniPhobiaTexture = new TextureRegion(directory.getEntry(\"platform:somni_phobia_stand\",Texture.class));\r\n\t\tsomniPhobiaWalkTexture = new TextureRegion(directory.getEntry(\"platform:somni_phobia_walk\",Texture.class));\r\n\t\tsomniPhobiaDashSideTexture = new TextureRegion(directory.getEntry(\"platform:somni_phobia_dash_side\",Texture.class));\r\n\t\tsomniPhobiaDashUpTexture = new TextureRegion(directory.getEntry(\"platform:somni_phobia_dash_up\",Texture.class));\r\n\t\tphobiaSomniTexture = new TextureRegion(directory.getEntry(\"platform:phobia_somni_stand\",Texture.class));\r\n\t\tphobiaSomniWalkTexture = new TextureRegion(directory.getEntry(\"platform:phobia_somni_walk\",Texture.class));\r\n\t\tphobiaSomniDashSideTexture = new TextureRegion(directory.getEntry(\"platform:phobia_somni_dash_side\",Texture.class));\r\n\t\tphobiaSomniDashUpTexture = new TextureRegion(directory.getEntry(\"platform:phobia_somni_dash_up\",Texture.class));\r\n\r\n\t\tsomniPhobiaHandsTexture = new TextureRegion(directory.getEntry(\"platform:somni_phobia_hands\",Texture.class));\r\n\t\tphobiaSomniHandsTexture = new TextureRegion(directory.getEntry(\"platform:phobia_somni_hands\",Texture.class));\r\n\t\tblueRingBigTexture = new TextureRegion(directory.getEntry(\"platform:blue_ring_big\",Texture.class));\r\n\t\tyellowRingBigTexture = new TextureRegion(directory.getEntry(\"platform:yellow_ring_big\",Texture.class));\r\n\t\tblueRingSmallTexture = new TextureRegion(directory.getEntry(\"platform:blue_ring_small\",Texture.class));\r\n\t\tyellowRingSmallTexture = new TextureRegion(directory.getEntry(\"platform:yellow_ring_small\",Texture.class));\r\n\t\tsomniHandFrontTexture = new TextureRegion(directory.getEntry(\"platform:somni_hand_front\",Texture.class));\r\n\t\tsomniHandBackTexture = new TextureRegion(directory.getEntry(\"platform:somni_hand_back\",Texture.class));\r\n\t\tphobiaHandFrontTexture = new TextureRegion(directory.getEntry(\"platform:phobia_hand_front\",Texture.class));\r\n\t\tphobiaHandBackTexture = new TextureRegion(directory.getEntry(\"platform:phobia_hand_back\",Texture.class));\r\n\r\n\t\tbackgrounds = new TextureRegion[] {\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_light_forest\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_dark_forest\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_light_gear\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_dark_gear\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_light_dreams\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_dark_dreams\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_light_house\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_dark_house\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_light_statues\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_dark_statues\", Texture.class)),\r\n\r\n\t\t};\r\n\r\n\r\n\t\tTextureRegion [] somnis = {somniIdleTexture,somniWalkTexture,somniDashSideTexture,somniDashUpTexture, somniFallTexture, somniDashUpTexture};\r\n\t\tsomnisTexture = somnis;\r\n\t\tTextureRegion [] phobias = {phobiaIdleTexture,phobiaWalkTexture,phobiaDashSideTexture,phobiaDashUpTexture, phobiaFallTexture, phobiaDashUpTexture};\r\n\t\tphobiasTexture = phobias;\r\n\t\tTextureRegion [] somniphobias = {somniPhobiaTexture,somniPhobiaWalkTexture,somniPhobiaDashSideTexture,somniPhobiaDashUpTexture, somniPhobiaDashUpTexture};\r\n\t\tsomniphobiasTexture = somniphobias;\r\n\t\tTextureRegion [] phobiasomnis = {phobiaSomniTexture,phobiaSomniWalkTexture,phobiaSomniDashSideTexture,phobiaSomniDashUpTexture, phobiaSomniDashUpTexture};\r\n\t\tphobiasomnisTexture = phobiasomnis;\r\n\t\tTextureRegion [] somniHands = {somniHandFrontTexture, somniHandBackTexture, somniPhobiaHandsTexture};\r\n\t\tsomniHandsTextures = somniHands;\r\n\t\tTextureRegion [] phobiaHands = {phobiaHandFrontTexture, phobiaHandBackTexture, phobiaSomniHandsTexture};\r\n\t\tphobiaHandsTextures = phobiaHands;\r\n\r\n\t\tanimationSpeed = new float[]{0.1f, 0.5f, 0.1f, 0.1f, 0.1f, 0.1f};\r\n\t\tframePixelWidth = new double[]{32, 64, 32, 32, 32, 32};\r\n\t\toffsetsX = new float[]{12, 19, 0, 0, 15, 0};\r\n\t\toffsetsY = new float[]{0, 0, 0, 0, 0, 0};\r\n\t\tsecOffsetsX = new float[]{-20, -16, 52, 60, -18, 35, -18};\r\n\t\tsecOffsetsY = new float[]{0, 0, -80, -60, 0, -70, 0};\r\n\t\tthirdOffsetsX = new float[]{0, -18, -22, -22, 0, -22, 10, -15, 0, 0, 5, 0, 0, -20, 0, 0, -2, 0};\r\n\t\tthirdOffsetsY = new float[]{0, 0, 0, 0, 0, 0};\r\n\t\tdashAngles = new float[] {0, 0, -1.55f, 0, 0, 3.14f};\r\n\t\tpropelAngles = new float[] {0, 0, 0, 1.55f, 0, -1.55f};\r\n\r\n\r\n\t\t// Setup masking\r\n\t\tcircle_mask = new TextureRegion(directory.getEntry(\"circle_mask\",Texture.class));\r\n\t\tVector2 mask_size = new Vector2(circle_mask.getRegionWidth(), circle_mask.getRegionHeight());\r\n\t\tMIN_MASK_DIMENSIONS = new Vector2(mask_size).scl(mask_shrink_factor);\r\n\t\tmaskWidth = MIN_MASK_DIMENSIONS.x;\r\n\t\tmaskHeight = MIN_MASK_DIMENSIONS.y;\r\n\r\n\t\tsliderBarTexture = directory.getEntry( \"platform:sliderbar\", Texture.class);\r\n\t\tsliderKnobTexture = directory.getEntry( \"platform:sliderknob\", Texture.class);\r\n\r\n\t\tjumpSound = directory.getEntry( \"platform:jump\", SoundBuffer.class );\r\n\t\tfireSound = directory.getEntry( \"platform:pew\", SoundBuffer.class );\r\n\t\tplopSound = directory.getEntry( \"platform:plop\", SoundBuffer.class );\r\n\r\n\t\tconstants = directory.getEntry( \"constants\", JsonValue.class );\r\n\r\n\r\n\r\n\r\n\r\n//Gather sound assets\r\n\t\twinTrack = directory.getEntry(\"winTrack\", SoundBuffer.class);\r\n\t\tSoundController.getInstance().setWinTrack(winTrack);\r\n\r\n\t\tfailTrack = directory.getEntry(\"failTrack\", SoundBuffer.class);\r\n\t\tSoundController.getInstance().setFailTrack(failTrack);\r\n\r\n\r\n\r\n//\t\tsomniTrack = directory.getEntry(\"somniTrack\", SoundBuffer.class);\r\n//\t\tphobiaTrackPath = directory.getEntry(\"phobiaTrack\", SoundBuffer.class);\r\n//\t\tcombinedTrackPath = directory.getEntry(\"combinedTrack\", SoundBuffer.class);\r\n\r\n\r\n//\t\tmenu drawables\r\n\t\torangeUnderline = new TextureRegionDrawable(directory.getEntry(\"pause_menu:pausemenu_underline_red\", Texture.class));\r\n\t\tblueUnderline = new TextureRegionDrawable(directory.getEntry(\"pause_menu:pausemenu_underline\", Texture.class));\r\n\t\tblueRectangle = new TextureRegionDrawable(directory.getEntry(\"pause_menu:bluerectangle\", Texture.class));\r\n\t\tblueExit = new TextureRegionDrawable(directory.getEntry(\"pause_menu:exit_blue\", Texture.class));\r\n\t\tblueResume = new TextureRegionDrawable(directory.getEntry(\"pause_menu:resume_blue\", Texture.class));\r\n\t\tblueRestart = new TextureRegionDrawable(directory.getEntry(\"pause_menu:restart_blue\", Texture.class));\r\n\t\torangeRectangle = new TextureRegionDrawable(directory.getEntry(\"pause_menu:orangerectangle\", Texture.class));\r\n\t\torangeExit = new TextureRegionDrawable(directory.getEntry(\"pause_menu:exit_orange\", Texture.class));\r\n\t\torangeResume = new TextureRegionDrawable(directory.getEntry(\"pause_menu:resume_orange\", Texture.class));\r\n\t\torangeRestart = new TextureRegionDrawable(directory.getEntry(\"pause_menu:restart_orange\", Texture.class));\r\n\t\t//\t\tSliders\r\n\t\torangeSlider = new TextureRegionDrawable(directory.getEntry(\"pause_menu:slider_orange\", Texture.class));\r\n\t\tblueSlider = new TextureRegionDrawable(directory.getEntry(\"pause_menu:slider_blue\", Texture.class));\r\n\t\torangeKnob = new TextureRegionDrawable(directory.getEntry(\"pause_menu:knob_orange\", Texture.class));\r\n\t\tblueKnob = new TextureRegionDrawable(directory.getEntry(\"pause_menu:knob_blue\", Texture.class));\r\n\t\torangeSound = new TextureRegionDrawable(directory.getEntry(\"pause_menu:sound_orange\", Texture.class));\r\n\t\tblueSound = new TextureRegionDrawable(directory.getEntry(\"pause_menu:sound_blue\", Texture.class));\r\n\t\tblueMusicNote = new TextureRegionDrawable(directory.getEntry(\"pause_menu:musicnote_blue\", Texture.class));\r\n\t\torangeMusicNote = new TextureRegionDrawable(directory.getEntry(\"pause_menu:musicnote_orange\", Texture.class));\r\n\r\n\t\tblueNext = new TextureRegionDrawable(directory.getEntry(\"pause_menu:nextblue\", Texture.class));\r\n\t\torangeNext = new TextureRegionDrawable(directory.getEntry(\"pause_menu:nextorange\", Texture.class));\r\n\r\n\t\tbluePauseButton = new TextureRegionDrawable(directory.getEntry(\"pause_menu:pause_button_blue\", Texture.class));\r\n\t\torangePauseButton = new TextureRegionDrawable(directory.getEntry(\"pause_menu:pause_button_red\", Texture.class));\r\n\t\tblurBackground = new TextureRegion(directory.getEntry(\"pause_menu:blur\", Texture.class));\r\n\r\n\r\n\t\tsuper.gatherAssets(directory);\r\n\r\n\r\n\t}", "@Override\n\tpublic void create() {\n\t\tthis.batch = new SpriteBatch();\n\t\t\n//\t\tgame.batch.begin();\n// player.draw(game.batch);\n// \n// game.batch.end();\n\t\t\n\t\tmanager = new AssetManager();\n\t\tmanager.setLoader(TiledMap.class, new TmxMapLoader(new InternalFileHandleResolver()));\n\t\tmanager.load(\"data/level1.tmx\", TiledMap.class);\n\t\tmanager.load(\"data/background.png\", Texture.class);\n//\t\tmanager.load(\"level1.tsx\", TiledMapTileSet.class);\n\t\tmanager.finishLoading();\n\t\tscreen = new GameScreen(this);\n\t\tsetScreen(screen);\n\t\t\n\t}", "public void loadAllTextures()\n {\n int numChildren = androidRobot3DObject.numChildren();\n for(int i = 0;i<numChildren;i++)\n {\n String name = androidRobot3DObject.getChildAt(i).name();\n\n Log.d(\"min3d\", \"Texture name: \" + name);\n\n // The name is either extracted from the _mtl file\n // or directly from the *.3ds file\n // The name can be given directly into Blender\n if(name.indexOf(\"body\")!=-1)\n {\n androidRobot3DObject.getChildAt(i).textures().clear();\n androidRobot3DObject.getChildAt(i).textures().addById(\"squared_robot_body\");\n }\n\n if(name.indexOf(\"head\")!=-1)\n {\n androidRobot3DObject.getChildAt(i).textures().clear();\n androidRobot3DObject.getChildAt(i).textures().addById(\"squared_robot_head\");\n }\n\n if(name.indexOf(\"foot\")!=-1)\n {\n androidRobot3DObject.getChildAt(i).textures().clear();\n androidRobot3DObject.getChildAt(i).textures().addById(\"squared_robot_foot\");\n }\n\n\n if(name.indexOf(\"arm\")!=-1)\n {\n androidRobot3DObject.getChildAt(i).textures().clear();\n androidRobot3DObject.getChildAt(i).textures().addById(\"squared_robot_arm\");\n }\n\n if(name.indexOf(\"antenna\")!=-1)\n {\n androidRobot3DObject.getChildAt(i).textures().clear();\n androidRobot3DObject.getChildAt(i).textures().addById(\"squared_robot_antenna\");\n }\n }\n\n }", "private void heroStandingTextureLoad() {\n standLeft = new TextureRegion(logicController.getGame().getAssetManager().get(\"Game/hero_left.png\", Texture.class), 1, 1, 16, 21);\n standBack = new TextureRegion(logicController.getGame().getAssetManager().get(\"Game/hero_back.png\", Texture.class), 1, 1, 16, 21);\n standFront = new TextureRegion(logicController.getGame().getAssetManager().get(\"Game/hero_front.png\", Texture.class), 1, 1, 17, 22);\n standRight = new TextureRegion(logicController.getGame().getAssetManager().get(\"Game/hero_left.png\", Texture.class), 1, 1, 16, 21);\n }", "private void importImages() {\n\n\t\t// Create array of the images. Each image pixel map contains\n\t\t// multiple images of the animate at different time steps\n\n\t\t// Eclipse will look for <path/to/project>/bin/<relative path specified>\n\t\tString img_file_base = \"Game_Sprites/\";\n\t\tString ext = \".png\";\n\n\t\t// Load background\n\t\tbackground = createImage(img_file_base + \"Underwater\" + ext);\n\t}", "public void loadContent(AssetManager manager) {\n\t\tif (worldAssetState != AssetState.LOADING) {\n\t\t\treturn;\n\t\t}\n\t\tmanager.finishLoading();\n\t\t\n\n\t\tint cols = 11;\n\t\tint rows = 1;\n\n\t\t//animationDef\n\t\t//load the animation content here\n\n\t\tlilyFrames = splice(4, 12, 47, LILY_TEXTURE);\n\n\t\tlilyFramesDay = splice(4, 12, 47, LILY_TEXTURE);\n\t\tlilyFramesNight = splice(24, 2, 47, LILY_TEXTURE_N);\n\t\tlilyFramesSunset = splice(24, 2, 47, LILY_TEXTURE_S);\n\n\n\t\tgoalFrames = splice(4,20, GOAL_TEXTURE);\n\t\tgoalAnimation = new Animation(.01f, goalFrames);\n\t\t//lilyAnimation = new Animation(.2f, lilyFrames);\n\t\t\n\t\tenemyFrames = splice(4, 10, 39, ENEMY_TEXTUREA);\n\t\tenemyAnimation = new Animation(.02f, enemyFrames);\n\n\n\t\tcols = 11;\n\t\trows = 1;\n\n\n\t\tclosedFlowerFramesDay = splice(26, 1, \"tethers/Floating_Closed_Day_small.png\");\n\t\tclosedFlowerFramesNight = splice(26, 1, \"tethers/Floating_Closed_Night_small.png\");\n\t\tclosedFlowerFramesSunset = splice(26, 1, \"tethers/Floating_Closed_Sunset_small.png\");\n\t\tclosedFlowerFramesT = splice(23, 1, \"tethers/Floating_Closed_Sunset2.png\");\n\n\n\t\tint index = 0;\n\n\t\topenFlowerFramesDay = splice(26, 1, \"tethers/Floating_Open_Day_small.png\");\n\t\topenFlowerFramesNight = splice(26, 1, \"tethers/Floating_Open_Night_small.png\");\n\t\topenFlowerFramesSunset = splice(26, 1, \"tethers/Floating_Open_Sunset_small.png\");\n\t\topenFlowerFramesT = splice(23, 1, \"tethers/Floating_Open_Sunset2.png\");\n\n\n\t\tcols = 8; \n\n\t\topeningFlowerFramesDay = splice(26, 1, \"tethers/Opening_Flower_Day_small.png\" );\n\t\topeningFlowerFramesNight = splice(26, 1, \"tethers/Opening_Flower_Night_small.png\");\n\t\topeningFlowerFramesSunset = splice(26, 1, \"tethers/Opening_Flower_Sunset_small.png\");\n\t\topeningFlowerFramesT = splice(26, 1, \"tethers/Opening_Flower_Sunset2.png\");\n\n\t\tclosingFlowerFramesDay = splice(26, 1, \"tethers/Closing_Flower_Day_small.png\");\n\t\tclosingFlowerFramesNight = splice(26, 1, \"tethers/Closing_Flower_Night_small.png\");\n\t\tclosingFlowerFramesSunset = splice(26, 1, \"tethers/Closing_Flower_Sunset_small.png\");\n\t\tclosingFlowerFramesT = splice(26, 1, \"tethers/Opening_Flower_Sunset2.png\");\n\n\t\tcols = 12;\n\t\tkoiSSheet = new Texture(Gdx.files.internal(\"koi/Straight_Koi.png\"));\n\t\tTextureRegion[][] tmpkoiS = TextureRegion.split(koiSSheet, koiSSheet.getWidth()/cols, koiSSheet.getHeight()/rows); // #10\n\t\tkoiSFrames = new TextureRegion[cols * rows];\n\t\tindex = 0;\n\t\tfor (int i = 0; i < rows; i++) {\n\t\t\tfor (int j = 0; j < cols; j++) {\n\t\t\t\tkoiSFrames[index++] = tmpkoiS[i][j];\n\t\t\t}\n\t\t}\n\t\tkoiSAnimation = new Animation(.05f, koiSFrames); \n\t\tkoiSspriteBatch = new SpriteBatch(); \n\n\t\tcols = 31;\n\n\t\t//remeber kiddies, animate both directions\n\t\tkoiCSheet = new Texture(Gdx.files.internal(\"koi/curve_koi.png\"));\n\n\t\tTextureRegion[][] tmpkoiC = TextureRegion.split(koiCSheet, koiCSheet.getWidth()/cols, koiCSheet.getHeight()/rows); // #10\n\t\tTextureRegion[][] tmpkoiCFlipped = TextureRegion.split(koiCSheet, koiCSheet.getWidth()/cols, koiCSheet.getHeight()/rows); // #10\n\n\t\tkoiCFrames = new TextureRegion[cols * rows];\n\t\tkoiCFramesFlipped = new TextureRegion[cols * rows];\n\t\tindex = 0;\n\t\tfor (int i = 0; i < rows; i++) {\n\t\t\tfor (int j = 0; j < cols; j++) {\n\t\t\t\t//tmpkoiC[i][j].flip(false, true);\n\t\t\t\tkoiCFrames[index] = tmpkoiC[i][j];\n\t\t\t\ttmpkoiCFlipped[i][j].flip(false, true);\n\t\t\t\tkoiCFramesFlipped[index++] = tmpkoiCFlipped[i][j];\n\t\t\t}\n\t\t}\n\t\tkoiCAnimation = new Animation(.02f, koiCFrames); \n\t\tkoiCAnimationFlipped = new Animation(.02f, koiCFramesFlipped);\n\n\n\n\t\tenergyBarTexture = createTexture(manager, ENERGYBAR_TEXTURE, false);\n\t\t//enemyTexture = createTexture(manager,ENEMY_TEXTURE,false);\n\t\tenemyTexture = enemyFrames[0];\n\t\tkoiTexture = koiSFrames[0];\n\t\t//koiTexture = createTexture(manager, KOI_TEXTURE, false);\n\n\t\t//lilyTexture = lilyFramesNight[0];\n\t\tlilyTexture = lilyFrames[0];\n\t\tlanternTexture = closedFlowerFramesDay[0];\n\t\tlightingTexture = createTexture(manager, LIGHTING_TEXTURE, false);\n\t\tshadowTexture = createTexture(manager, SHADOW_TEXTURE, false);\n\t\t//goalTexture = createTexture(manager, GOAL_TEXTURE, false);\n\t\tgoalTexture = goalFrames[0];\n\n\t\tUILotusTexture = createTexture(manager, UI_FLOWER, false);\t\n\n\t\tearthTile = createTexture(manager,EARTH_FILE_N,true);\n\t\tearthTileDay = createTexture(manager,EARTH_FILE_D, true);\n\t\tearthTileNight = createTexture(manager,EARTH_FILE_N, true);\n\t\tearthTileSunset = createTexture(manager,EARTH_FILE_S, true);\n\t\tshoreTile = createTexture(manager,SHORE_FILE,true);\n\n\t\trockDay = createTexture(manager,ROCK_FILE_D, true);\n\t\trockNight = createTexture(manager,ROCK_FILE_N, true);\n\t\trockSunset = createTexture(manager,ROCK_FILE_S, true);\n\n\t\t\n\t\t\n\t\twhirlpoolTexture = createTexture(manager, WHIRLPOOL_TEXTURE, true);\n\n\t\tkoiArrow = createTexture(manager, KOI_ARROW, false);\n\t\twhirlArrow = createTexture(manager, WHIRL_ARROW, false);\n\t\t\n\t\ttutorial1 = createTexture(manager, TUTORIAL_TEXTURE1, false);\n\t\ttutorial2 = createTexture(manager, TUTORIAL_TEXTURE2, false);\n\t\ttutorial3 = createTexture(manager, TUTORIAL_TEXTURE3, false);\n\t\ttutorial4 = createTexture(manager, TUTORIAL_TEXTURE4, false);\n\t\ttutorial5 = createTexture(manager, TUTORIAL_TEXTURE5, false);\n\t\ttutorial6 = createTexture(manager, TUTORIAL_TEXTURE6, false);\n\t\t\n\t\thelpTexture = createTexture(manager, HELP_TEXTURE, false);\n\n\t\t// Allocate the tiles\n\n\t\t\n\t\t//setBackground(manager.get(BACKGROUND_FILE_N, Texture.class), 2);\n\t\tsetBackground(createTexture(manager, BACKGROUND_FILE_N, false).getTexture(), 2);\n\t\tgetBackground(2).setWrap(TextureWrap.Repeat, TextureWrap.Repeat);\n\n\t\tsetBackground(createTexture(manager, BACKGROUND_FILE_D, false).getTexture(), 0);\n\t\tgetBackground(0).setWrap(TextureWrap.Repeat, TextureWrap.Repeat);\n\n\t\tsetBackground(createTexture(manager, BACKGROUND_FILE_S, false).getTexture(), 1);\n\t\tgetBackground(1).setWrap(TextureWrap.Repeat, TextureWrap.Repeat);\n\n\t\toverlay = createTexture(manager, OVERLAY_FILE, true).getTexture();\n\t\toverlay.setWrap(TextureWrap.Repeat, TextureWrap.Repeat);\n\n\t\t// Allocate the font\n\t\tif (manager.isLoaded(FONT_FILE)) {\n\t\t\tdisplayFont = manager.get(FONT_FILE,BitmapFont.class);\n\t\t} else {\n\t\t\tdisplayFont = null;\n\t\t}\n\n\t\tif (manager.isLoaded(FONT_FILE2)) {\n\t\t\tsecondFont = manager.get(FONT_FILE2,BitmapFont.class);\n\t\t} else {\n\t\t\tsecondFont = null;\n\t\t}\n\t\t\n\t\tlightingSound = Gdx.audio.newMusic(Gdx.files.internal(LIGHTING_SOUND));\n\t\tlightingSound.setLooping(false);\n\t\t\n\t\tclickSound = Gdx.audio.newMusic(Gdx.files.internal(MENU_CLICK_SOUND));\n\t\tclickSound.setLooping(false);\n\t\t\n\t\tfailSound = Gdx.audio.newMusic(Gdx.files.internal(FAIL_SOUND));\n\t\tfailSound.setLooping(false);\n\t\t\n\t\twhirlSound = Gdx.audio.newMusic(Gdx.files.internal(WHIRL_SOUND));\n\t\twhirlSound.setLooping(false);\n\t\twhirlSound.setPosition(7);\n\t\t\n\t\tworldAssetState = AssetState.COMPLETE;\n\t}", "private void graphicsLoader() {\n\t\tff2Logo = new Texture(Gdx.files.internal(uiName + \"/ff2logo.png\"));\n\t\tff2LogoHit = new Texture(Gdx.files.internal(uiName + \"/ff2logohit.png\"));\n\t\tplayerword = new Texture(Gdx.files.internal(uiName + \"/playerword.png\"));\n\t\tplayerwordHit = new Texture(Gdx.files.internal(uiName + \"/playerwordhit.png\"));\n\t\tturretword = new Texture(Gdx.files.internal(uiName + \"/turretword.png\"));\n\t\tturretwordHit = new Texture(Gdx.files.internal(uiName + \"/turretwordhit.png\"));\n\t\tfenceword = new Texture(Gdx.files.internal(uiName + \"/fenceword.png\"));\n\t\tfencewordHit = new Texture(Gdx.files.internal(uiName + \"/fencewordhit.png\"));\n\t\tbarrierword = new Texture(Gdx.files.internal(uiName + \"/barrierword.png\"));\n\t\tbarrierwordHit = new Texture(Gdx.files.internal(uiName + \"/barrierwordhit.png\"));\n\t\tgatewayword = new Texture(Gdx.files.internal(uiName + \"/gatewayword.png\"));\n\t\tgatewaywordHit = new Texture(Gdx.files.internal(uiName + \"/gatewaywordhit.png\"));\n\t\tpowerupword = new Texture(Gdx.files.internal(uiName + \"/powerupword.png\"));\n\t\tpowerupwordHit = new Texture(Gdx.files.internal(uiName + \"/powerupwordhit.png\"));\n\t\tswitchword = new Texture(Gdx.files.internal(uiName + \"/switchword.png\"));\n\t\tswitchwordHit = new Texture(Gdx.files.internal(uiName + \"/switchwordhit.png\"));\n\t\tenemyfighterword = new Texture(Gdx.files.internal(uiName + \"/enemyfighterword.png\"));\n\t\tenemyfighterwordHit = new Texture(Gdx.files.internal(uiName + \"/enemyfighterwordhit.png\"));\n\t\tmineword = new Texture(Gdx.files.internal(uiName + \"/mineword.png\"));\n\t\tminewordHit = new Texture(Gdx.files.internal(uiName + \"/minewordhit.png\"));\n\t\tpushblockword = new Texture(Gdx.files.internal(uiName + \"/pushblockword.png\"));\n\t\tpushblockwordHit = new Texture(Gdx.files.internal(uiName + \"/pushblockwordhit.png\"));\n\t\tbombupword = new Texture(Gdx.files.internal(uiName + \"/bombupword.png\"));\n\t\tbombupwordHit = new Texture(Gdx.files.internal(uiName + \"/bombupwordhit.png\"));\n\t\t\n\t\t// ui\n\t\tsoundonbutton = new Texture(Gdx.files.internal(uiName + \"/soundon.png\"));\n\t\tsoundoffbutton = new Texture(Gdx.files.internal(uiName + \"/soundoff.png\"));\n\t\tcreatebutton = new Texture(Gdx.files.internal(uiName + \"/createbutton.png\"));\n\t\tnocreatebutton = new Texture(Gdx.files.internal(uiName + \"/nocreatebutton.png\"));\n\t\tloaderTexture = new Texture(Gdx.files.internal(uiName + \"/ff2loader.png\"));\n\t\tgameOverTexture = new Texture(Gdx.files.internal(uiName + \"/gameover.png\"));\n\t\tnextFieldTexture = new Texture(Gdx.files.internal(uiName + \"/nextfield.png\"));\n\t\t\n\t\tmenubutton = new Texture(Gdx.files.internal(uiName + \"/menubutton.png\"));\n\t\tnomenubutton = new Texture(Gdx.files.internal(uiName + \"/nomenubutton.png\"));\n\t\tdiffEasyButton = new Texture(Gdx.files.internal(uiName + \"/diffeasybutton.png\"));\n\t\tdiffNormButton = new Texture(Gdx.files.internal(uiName + \"/diffnormbutton.png\"));\n\t\tdiffHardButton = new Texture(Gdx.files.internal(uiName + \"/diffhardbutton.png\"));\n\t\tosdButton = new Texture(Gdx.files.internal(uiName + \"/osdbutton.png\"));\n\t\t\n\t\texoFFfont = new BitmapFont(Gdx.files.internal(uiName + \"/font/exo-ff.fnt\"), true);\n\t\t\n\t\t// creator\n\t\texitbutton = new Texture(Gdx.files.internal(creatorName + \"/exitbutton.png\"));\n\t\tfilebutton = new Texture(Gdx.files.internal(creatorName + \"/filebutton.png\"));\n\t\ttoolsbutton = new Texture(Gdx.files.internal(creatorName + \"/toolsbutton.png\"));\n\t\tnextbutton = new Texture(Gdx.files.internal(creatorName + \"/nextbutton.png\"));\n\t\tprevbutton = new Texture(Gdx.files.internal(creatorName + \"/prevbutton.png\"));\n\t\tdeletebutton = new Texture(Gdx.files.internal(creatorName + \"/deletebutton.png\"));\n\t\tyesbutton = new Texture(Gdx.files.internal(creatorName + \"/yesbutton.png\"));\n\t\tnobutton = new Texture(Gdx.files.internal(creatorName + \"/nobutton.png\"));\n\t\tbuildbutton = new Texture(Gdx.files.internal(creatorName + \"/buildbutton.png\"));\n\t\tprocbutton = new Texture(Gdx.files.internal(creatorName + \"/procbutton.png\"));\n\t\trandbutton = new Texture(Gdx.files.internal(creatorName + \"/randbutton.png\"));\n\t\tgroupsbutton = new Texture(Gdx.files.internal(creatorName + \"/groupsbutton.png\"));\n\t\tarenabutton = new Texture(Gdx.files.internal(creatorName + \"/arenabutton.png\"));\n\t\tfileExitButton = new Texture(Gdx.files.internal(creatorName + \"/fileexitbutton.png\"));\n\t\tfileLoadButton = new Texture(Gdx.files.internal(creatorName + \"/loadbutton.png\"));\n\t\tfileSaveButton = new Texture(Gdx.files.internal(creatorName + \"/savebutton.png\"));\n\t\tfilePlayButton = new Texture(Gdx.files.internal(creatorName + \"/playbutton.png\"));\n\t\tfileNoPlayButton = new Texture(Gdx.files.internal(creatorName + \"/noplaybutton.png\"));\n\t\tfileSendButton = new Texture(Gdx.files.internal(creatorName + \"/sendbutton.png\"));\n\t\ttoasterBack = new Texture(Gdx.files.internal(creatorName + \"/toasterback.png\"));\n\t\twindowBack = new Texture(Gdx.files.internal(creatorName + \"/windowback.png\"));\n\t\temptyCellTexture = new Texture(Gdx.files.internal(creatorName + \"/emptycell.png\"));\n\t\tcreateSplashTexture = new Texture(Gdx.files.internal(creatorName + \"/createsplash.png\"));\n\t\t\n\t\tplayerDef = new Texture(Gdx.files.internal(creatorName + \"/player_def.png\"));\n\t\tgatewayDef = new Texture(Gdx.files.internal(creatorName + \"/gateway_def.png\"));\n\t\tpowerupDef = new Texture(Gdx.files.internal(creatorName + \"/powerup_def.png\"));\n\t\tbombupDef = new Texture(Gdx.files.internal(creatorName + \"/bombup_def.png\"));\n\t\tswitchDef = new Texture(Gdx.files.internal(creatorName + \"/switch_def.png\"));\n\t\tscaffoldDef = new Texture(Gdx.files.internal(creatorName + \"/scaffold_def.png\"));\n\t\tbarrierDef = new Texture(Gdx.files.internal(creatorName + \"/barrier_def.png\"));\n\t\tfenceDef = new Texture(Gdx.files.internal(creatorName + \"/fence_def.png\"));\n\t\tturretDef = new Texture(Gdx.files.internal(creatorName + \"/turret_def.png\"));\n\t\tenemyDef = new Texture(Gdx.files.internal(creatorName + \"/enemy_def.png\"));\n\t\tmineDef = new Texture(Gdx.files.internal(creatorName + \"/mine_def.png\"));\n\t\tpushblockDef = new Texture(Gdx.files.internal(creatorName + \"/pushblock_def.png\"));\n\t\thangerDef = new Texture(Gdx.files.internal(creatorName + \"/hanger_def.png\"));\n\t\t\n\t\tdeleteDef = new Texture(Gdx.files.internal(creatorName + \"/delete_def.png\"));\n\t\tdeleteSel = new Texture(Gdx.files.internal(creatorName + \"/delete_sel.png\"));\n\t\tlockUnlock = new Texture(Gdx.files.internal(creatorName + \"/lock_unlock.png\"));\n\t\tlockLock = new Texture(Gdx.files.internal(creatorName + \"/lock_lock.png\"));\n\t\ttoolSelect = new Texture(Gdx.files.internal(creatorName + \"/toolselect.png\"));\n\t\t\n\t\t// game stuff\n\t\tplayerShipTexture = new Texture(Gdx.files.internal(gameName + \"/player2ship.png\"));\n\t\tplayerShipPowerupTexture = new Texture(Gdx.files.internal(gameName + \"/player2shippowerup.png\"));\n\t\tplayerShipBombupTexture = new Texture(Gdx.files.internal(gameName + \"/player2shipbombup.png\"));\n\t\tenemyShipTexture = new Texture(Gdx.files.internal(gameName + \"/enemy2ship.png\"));\n\t\tenemyShipPowerupTexture = new Texture(Gdx.files.internal(gameName + \"/enemy2shippowerup.png\"));\n\t\tenemyShipBombupTexture = new Texture(Gdx.files.internal(gameName + \"/enemy2shipbombup.png\"));\n\t\tenemyShipOrderedTexture = new Texture(Gdx.files.internal(gameName + \"/enemy2shipordered.png\"));\n\t\tplayerBulletTexture = new Texture(Gdx.files.internal(gameName + \"/playerlaser.png\"));\n\t\tplayerCableTexture = new Texture(Gdx.files.internal(gameName + \"/playercable.png\"));\n\t\tenemyBulletTexture = new Texture(Gdx.files.internal(gameName + \"/enemylaser.png\"));\n\t\tenemyCableTexture = new Texture(Gdx.files.internal(gameName + \"/enemycable.png\"));\n\t\tbombCableTexture = new Texture(Gdx.files.internal(gameName + \"/bombcable.png\"));\n\t\tturretTexture = new Texture(Gdx.files.internal(gameName + \"/turret.png\"));\n\t\tturrethitTexture = new Texture(Gdx.files.internal(gameName + \"/turrethit.png\"));\t\n\t\tfenceTexture = new Texture(Gdx.files.internal(gameName + \"/fence.png\"));\n\t\tfencehitTexture = new Texture(Gdx.files.internal(gameName + \"/fencehit.png\"));\n\t\tbarrierTexture = new Texture(Gdx.files.internal(gameName + \"/barrier.png\"));\n\t\tbarrierhitTexture = new Texture(Gdx.files.internal(gameName + \"/barrierhit.png\"));\n\t\tgatewayonTexture = new Texture(Gdx.files.internal(gameName + \"/gatewayon.png\"));\n\t\tgatewayoffTexture = new Texture(Gdx.files.internal(gameName + \"/gatewayoff.png\"));\n\t\tpowerupTexture = new Texture(Gdx.files.internal(gameName + \"/powerup.png\"));\n\t\tbombupTexture = new Texture(Gdx.files.internal(gameName + \"/bombup.png\"));\n\t\tbombupCharge = new Texture(Gdx.files.internal(gameName + \"/bombupcharge.png\"));\n\t\texplosion = new Texture(Gdx.files.internal(gameName + \"/explosion.png\"));\n\t\tdeath = new Texture(Gdx.files.internal(gameName + \"/death.png\"));\n\t\tpowerupCharge = new Texture(Gdx.files.internal(gameName + \"/powerupcharge.png\"));\n\t\tswitchonTexture = new Texture(Gdx.files.internal(gameName + \"/switchon.png\"));\n\t\tswitchoffTexture = new Texture(Gdx.files.internal(gameName + \"/switchoff.png\"));\n\t\tscaffoldTexture = new Texture(Gdx.files.internal(gameName + \"/scaffold.png\"));\n\t\tmineTexture = new Texture(Gdx.files.internal(gameName + \"/mine.png\"));\n\t\tminehitTexture = new Texture(Gdx.files.internal(gameName + \"/minehit.png\"));\n\t\tmineDebrisTexture = new Texture(Gdx.files.internal(gameName + \"/minedebris.png\"));\n\t\tpushblockTexture = new Texture(Gdx.files.internal(gameName + \"/pushblock.png\"));\n\t\thangerTexture = new Texture(Gdx.files.internal(gameName + \"/hanger.png\"));\n\t\thangerhitTexture = new Texture(Gdx.files.internal(gameName + \"/hangerhit.png\"));\n\t\t// have a catch here for the loaded=true?\n\t\tloaded = true;\n\t}", "private Assets (){}", "@Override\n public void loadTexture() {\n\n }", "public interface TextureAtlas<T> {\n\t/**\n\t *\n\t * @param key\n\t * @return\n\t */\n\tRectangle quad(T key);\n\n\t/**\n\t *\n\t * @param <T>\n\t * @param atlas\n\t * @return\n\t */\n\tstatic <T> TextureAtlas<T> of(Map<T, Rectangle> atlas) {\n\t\treturn atlas::get;\n\t}\n\n\t/**\n\t * Loader for a texture atlas.\n\t * <p>\n\t * A texture atlas is specified as a JSON document illustrated by the following example:\n\t * <p>\n\t * <pre>\n\t * {\n\t * atlas: [\n\t * {\n\t * name: rectangle,\n\t * rect: [1, 2, 3, 4]\n\t * }\n\t * ]\n\t * }\n\t * </pre>\n\t */\n\tpublic static class Loader implements ResourceLoader<JSONObject, TextureAtlas<String>> {\n\t\t@Override\n\t\tpublic JSONObject map(InputStream in) throws IOException {\n\t\t\treturn new JSONObject(new JSONTokener(in));\n\t\t}\n\n\t\t@Override\n\t\tpublic TextureAtlas<String> load(JSONObject root) throws IOException {\n\t\t\t// Extract array of entries\n\t\t\tfinal JSONArray array = root.getJSONArray(\"atlas\");\n\n\t\t\t// Load texture atlas\n\t\t\treturn StreamSupport\n\t\t\t\t\t.stream(array.spliterator(), false)\n\t\t\t\t\t.map(JSONObject.class::cast)\n\t\t\t\t\t.map(Loader::entry)\n\t\t\t\t\t.collect(collectingAndThen(toMap(Entry::getKey, Entry::getValue), TextureAtlas::of));\n\t\t}\n\n\t\t/**\n\t\t * Loads a texture atlas entry.\n\t\t */\n\t\tprivate static Entry<String, Rectangle> entry(JSONObject entry) {\n\t\t\tfinal String name = entry.getString(\"name\").trim();\n\t\t\tfinal JSONArray array = entry.getJSONArray(\"rect\");\n\t\t\tfinal Rectangle rect = new Rectangle(\n\t\t\t\t\tarray.getInt(0),\n\t\t\t\t\tarray.getInt(1),\n\t\t\t\t\tarray.getInt(2),\n\t\t\t\t\tarray.getInt(3)\n\t\t\t);\n\t\t\treturn Map.entry(name, rect);\n\t\t}\n\t}\n}", "TextureAtlas.AtlasRegion getTexture(FileHandle textureFile);", "public void init() throws IOException\n\t{\n\t\tString pth = \"\";\n\t\tif(normal)\n\t\t{\n\t\t\tpth = \"Assets\\\\Art\\\\Tiles\\\\\";\n\t\t}\n\t\ttry\n\t\t{\n\t\t\ttexture = TextureLoader.getTexture(\"PNG\", ResourceLoader.getResourceAsStream(pth+path));\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\ttexture = TextureLoader.getTexture(\"PNG\", ResourceLoader.getResourceAsStream(pth+\"default.png\"));\n\t\t}\n\n\t\theight = texture.getImageHeight();\n\t\twidth = texture.getImageWidth();\n\t\tRandom rand = new Random();\n\t\tthis.identity = rand.nextInt();\n\t\ta = new AudioController();\n\t\t\n\t}", "public static void loadImages(){\n\t\tsetPath(main.getShop().inventory.getEquipID());\n\t\ttry {\n\t\t\tbackground = ImageIO.read(new File(\"res/world/bg.png\"));\n\t\t\tterrain = ImageIO.read(new File(\"res/world/solids.png\"));\n\t\t\t// Character and Armour\n\t\t\tcharacters = ImageIO.read(new File(\"res/world/char3.png\"));\n\t\t\tcharactersHead =ImageIO.read(new File(\"res/world/charhead\"+path[0]+\".png\"));\n\t\t\tcharactersTop = ImageIO.read(new File(\"res/world/chartop\"+path[2]+\".png\"));\n\t\t\tcharactersShoulder = ImageIO.read(new File(\"res/world/charshoulders\"+path[3]+\".png\"));\n\t\t\tcharactersHand = ImageIO.read(new File(\"res/world/charhands\"+path[5]+\".png\"));\n\t\t\tcharactersBottom = ImageIO.read(new File(\"res/world/charbottom\"+path[8]+\".png\"));\n\t\t\tcharactersShoes = ImageIO.read(new File(\"res/world/charshoes\"+path[9]+\".png\"));\n\t\t\tcharactersBelt = ImageIO.read(new File(\"res/world/charBelt\"+path[4]+\".png\"));\n\n\t\t\tweaponBow = ImageIO.read(new File(\"res/world/bow.png\"));\n\t\t\tweaponArrow = ImageIO.read(new File(\"res/world/arrow.png\"));\n\t\t\tweaponSword = ImageIO.read(new File(\"res/world/sword.png\"));\n\t\t\titems = ImageIO.read(new File(\"res/world/items.png\"));\n\t\t\tnpc = ImageIO.read(new File(\"res/world/npc.png\"));\n\t\t\thealth = ImageIO.read(new File(\"res/world/health.png\"));\n\t\t\tenemies = ImageIO.read(new File(\"res/world/enemies.png\"));\n\t\t\tcoin = ImageIO.read(new File(\"res/world/coin.png\"));\n\t\t\tmana = ImageIO.read(new File(\"res/world/mana.gif\"));\n\t\t\tarrowP = ImageIO.read(new File(\"res/world/arrowP.png\"));\n\t\t\tbutton = ImageIO.read(new File(\"res/world/button.png\"));\n\t\t\tblood = ImageIO.read(new File(\"res/world/blood.png\"));\n\t\t\tarrowDisp = ImageIO.read(new File(\"res/world/arrowDisp.png\"));\n\t\t\tboss1 = ImageIO.read(new File(\"res/world/boss1.png\"));\n\t\t\tmagic = ImageIO.read(new File(\"res/world/magic.png\"));\n\t\t\tmainMenu = ImageIO.read(new File(\"res/world/MainMenu.png\"));\n\t\t\tinstructions = ImageIO.read(new File(\"res/world/instructions.png\"));\n\t\t\trespawn = ImageIO.read(new File(\"res/world/respawn.png\"));\n\t\t\tinventory = ImageIO.read(new File(\"res/world/inventory.png\"));\n shop = ImageIO.read(new File(\"res/world/shop.png\"));\n dizzy = ImageIO.read(new File(\"res/world/dizzy.png\"));\n pet = ImageIO.read(new File(\"res/world/pet.png\"));\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error Loading Images\");\n\t\t}\n\t}", "public void create() {\r\n\t\t\r\n\t\tTexture.setEnforcePotImages(false);\r\n\t\t\r\n\t\tGdx.input.setInputProcessor(new MyInputProcessor());\r\n\t\t\r\n\t\t\r\n\t\ttextures = Tex.getTex();\r\n\t\t// load images\r\n\t\ttextures.loadTexture(\"res/images/guyDown.png\", \"guyDown\");\r\n\t\ttextures.loadTexture(\"res/images/guyUp.png\", \"guyUp\");\r\n\t\ttextures.loadTexture(\"res/images/guy2Down.png\", \"guyDown2\");\r\n\t\ttextures.loadTexture(\"res/images/guy2Up.png\", \"guyUp2\");\r\n\t\ttextures.loadTexture(\"res/images/enemyDown.png\", \"enemyDown\");\r\n\t\ttextures.loadTexture(\"res/images/enemyUp.png\", \"enemyUp\");\r\n\t\t\r\n\t\ttextures.loadTexture(\"res/images/skyline.png\", \"skyline\");\r\n\t\ttextures.loadTexture(\"res/images/skyline2.jpg\", \"skyline2\");\r\n\t\ttextures.loadTexture(\"res/images/skyline3.png\", \"skyline3\");\t\t\r\n\t\ttextures.loadTexture(\"res/images/circuit board.jpg\", \"fundo2\");\r\n\t\ttextures.loadTexture(\"res/images/grav3.jpg\", \"menu\");\r\n\t\t\r\n\t\ttextures.loadTexture(\"res/images/singleplayer.png\", \"single\");\r\n\t\ttextures.loadTexture(\"res/images/multiplayer.png\", \"multi\");\r\n\t\ttextures.loadTexture(\"res/images/exit.png\", \"exit\");\r\n\t\ttextures.loadTexture(\"res/images/level1B.png\", \"B1\");\r\n\t\ttextures.loadTexture(\"res/images/level2B.png\", \"B2\");\r\n\t\ttextures.loadTexture(\"res/images/level3B.png\", \"B3\");\r\n\t\ttextures.loadTexture(\"res/images/mainMenuB.png\", \"mainB\");\r\n\t\ttextures.loadTexture(\"res/images/win1.png\", \"win1\");\r\n\t\ttextures.loadTexture(\"res/images/win2.png\", \"win2\");\r\n\t\ttextures.loadTexture(\"res/images/tryagain.png\", \"retry\");\r\n\t\ttextures.loadTexture(\"res/images/easy.png\", \"easy\");\r\n\t\ttextures.loadTexture(\"res/images/medium.png\", \"medium\");\r\n\t\ttextures.loadTexture(\"res/images/hard.png\", \"hard\");\r\n\t\ttextures.loadTexture(\"res/images/difficulty.png\", \"difficulty\");\r\n\t\ttextures.loadTexture(\"res/images/thunder2.png\", \"thunder\");\r\n\t\r\n\t\ttextures.loadTexture(\"res/images/levelcleared.png\", \"cleared\");\r\n\t\ttextures.loadTexture(\"res/images/you lost.png\", \"lost\");\r\n\t\ttextures.loadTexture(\"res/images/playerpress.png\", \"playerp\");\r\n\t\ttextures.loadTexture(\"res/images/player1press.png\", \"player1p\");\r\n\t\ttextures.loadTexture(\"res/images/player2press.png\", \"player2p\");\r\n\t\ttextures.loadTexture(\"res/images/selectthelevel.png\", \"select\");\r\n\t\t\r\n\t\t\r\n\t\tsb = new SpriteBatch();\r\n\t\tcam = new OrthographicCamera();\r\n\t\tcam.setToOrtho(false, V_WIDTH, V_HEIGHT);\r\n\t\thudCam = new OrthographicCamera();\r\n\t\thudCam.setToOrtho(false, V_WIDTH, V_HEIGHT);\r\n\t\tgsm = new GameStateManager(this);\r\n\t\t\t\t\r\n\t}", "public abstract void loadContent(AssetManager manager);", "public void loadAllTextures() {\n loadEntityTextures();\n loadDynamicEntityTextures();\n loadTileTextures();\n loadLiveTileTextures();\n }", "private void loadSpritesheet() {\n\t\tobjects = new SpriteSheet(\"res\\\\pong.png\");\n\t\tobjects_hires = new SpriteSheet(\"res\\\\ponghires.png\",\n\t\t\t\tSpriteSheet.LINEAR);\n\t}", "public void cargarGameScreenTiled() {\n\n musicaTiled = get(rutaMusica, Music.class);\n musicaTiled.setLooping(true);\n platMusicInGame();\n\n TextureAtlas atlas = get(atlasTiledStuff, TextureAtlas.class);\n tiledMap = get(rutaTiled, TiledMap.class);\n\n SkeletonJson json = new SkeletonJson(atlas);\n json.setScale(.01f);\n ponySkeletonData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/personajes.json\"));\n // ponySkeletonData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/characters.json\"));\n json.setScale(.004f);\n skeletonBombData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/bombs.json\"));\n bombAnim = skeletonBombData.findAnimation(\"b1\");\n bombExAnim = skeletonBombData.findAnimation(\"b2x\");\n\n json.setScale(.005f);\n skeletonMonedaData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/coin.json\"));\n monedaAnim = skeletonMonedaData.findAnimation(\"normal\");\n monedaTomadaAnim = skeletonMonedaData.findAnimation(\"plus1\");\n\n json.setScale(.009f);\n chileSkeletonData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/chile.json\"));\n chileAnim = chileSkeletonData.findAnimation(\"normal\");\n chileTomadaAnim = chileSkeletonData.findAnimation(\"toospicy\");\n\n json.setScale(.009f);\n globoSkeletonData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/ballons.json\"));\n globoAnim = globoSkeletonData.findAnimation(\"normal\");\n globoTomadaAnim = globoSkeletonData.findAnimation(\"plus5\");\n\n json.setScale(.009f);\n dulceSkeletonData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/chocolate.json\"));\n dulceAnim = dulceSkeletonData.findAnimation(\"normal\");\n dulceTomadaAnim = dulceSkeletonData.findAnimation(\"speedup\");\n\n medallaPrimerLugar = atlas.findRegion(\"imagenes/podio/1stplacetrophy\");\n medallaSegundoLugar = atlas.findRegion(\"imagenes/podio/2ndplace\");\n medallaTercerLugar = atlas.findRegion(\"imagenes/podio/3rdplace\");\n congratulations = atlas.findRegion(\"imagenes/podio/congratulations\");\n youLose = atlas.findRegion(\"imagenes/podio/youlose\");\n timeUp = atlas.findRegion(\"imagenes/podio/timeup\");\n\n // json.setScale(.003f);\n // SkeletonData fuegoSkeletonData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/bombs.json\"));\n // fuegoAnim = fuegoSkeletonData.findAnimation(\"firedancing\");\n // fuegoSkeleton = new Skeleton(fuegoSkeletonData);\n\n json.setScale(.01f);\n SkeletonData fondoSkeletonData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/background.json\"));\n fondoAnim = fondoSkeletonData.findAnimation(\"animation\");\n fondoSkeleton = new Skeleton(fondoSkeletonData);\n\n //\n // json.setScale(.011f);\n // SkeletonData fogataSkeletonData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/fogata.json\"));\n // fogataAnim = fogataSkeletonData.findAnimation(\"fogata\");\n // fogataSkeleton = new Skeleton(fogataSkeletonData);\n //\n // json.setScale(.005f);\n // SkeletonData plumaSkeletonData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/feather.json\"));\n // plumaAnim = plumaSkeletonData.findAnimation(\"pluma\");\n // plumaSkeleton = new Skeleton(plumaSkeletonData);\n //\n // json.setScale(.011f);\n // SkeletonData bloodStoneSkeletonData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/bloodstone.json\"));\n // bloodStoneAnim = bloodStoneSkeletonData.findAnimation(\"animation\");\n // bloodStoneSkeleton = new Skeleton(bloodStoneSkeletonData);\n //\n // SkeletonData bloodStone2SkeletonData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/bloodstones.json\"));\n // bloodStone2Anim = bloodStone2SkeletonData.findAnimation(\"glow1\");\n // bloodStone2Skeleton = new Skeleton(bloodStone2SkeletonData);\n\n fondo = atlas.findRegion(\"imagenes/fondo\");\n\n padIzq = new NinePatchDrawable(new NinePatch(atlas.findRegion(\"Interfaz/pad_izq\")));\n padDer = new NinePatchDrawable(new NinePatch(atlas.findRegion(\"Interfaz/pad_derecha\")));\n btBombaDown = new NinePatchDrawable(new NinePatch(atlas.findRegion(\"Interfaz/bombasalpresionar\")));\n btBombaUp = new NinePatchDrawable(new NinePatch(atlas.findRegion(\"Interfaz/bombasinpresionar\")));\n\n btJumpDown = new NinePatchDrawable(new NinePatch(atlas.findRegion(\"Interfaz/saltoalpresionar\")));\n btJumpUp = new NinePatchDrawable(new NinePatch(atlas.findRegion(\"Interfaz/saltosinpresionar\")));\n // btTroncoUp = new NinePatchDrawable(new NinePatch(atlas.findRegion(\"Interfaz/botontroncosinpresionar\")));\n // btTroncoDown = new NinePatchDrawable(new NinePatch(atlas.findRegion(\"Interfaz/botontroncopresionado\")));\n\n btTroncoUp = new NinePatchDrawable(new NinePatch(atlas.findRegion(\"Interfaz/btPlatanoTachuelas\")));\n btTroncoDown = new NinePatchDrawable(new NinePatch(atlas.findRegion(\"Interfaz/btPlatanoTachuelasPresionado\")));\n\n btPauseUp = new NinePatchDrawable(new NinePatch(atlas.findRegion(\"Interfaz/pause\")));\n\n indicador = atlas.findRegion(\"Interfaz/indicador\");\n indicadorCloud = atlas.findRegion(\"Interfaz/icono000\");\n indicadorCientifico = atlas.findRegion(\"Interfaz/icono001\");\n indicadorMinion = atlas.findRegion(\"Interfaz/icono002\");\n indicadorNatylol = atlas.findRegion(\"Interfaz/icono003\");\n indicadorLighthingAlba = atlas.findRegion(\"Interfaz/icono004\");\n indicadorIgnis = atlas.findRegion(\"Interfaz/icono005\");\n\n perfilRegionCloud = atlas.findRegion(\"perfiles/cloud\");\n perfilRegionNatylol = atlas.findRegion(\"perfiles/natylol\");\n perfilRegionIgnis = atlas.findRegion(\"perfiles/ignis\");\n perfilRegionCientifico = atlas.findRegion(\"perfiles/scientist\");\n perfilRegionLAlba = atlas.findRegion(\"perfiles/lightingalba\");\n perfilRegionEnemigo = atlas.findRegion(\"perfiles/enemy\");\n\n lugaresMarco = atlas.findRegion(\"Interfaz/lugares\");\n\n moneda = atlas.findRegion(\"moneda\");\n\n tronco = atlas.findRegion(\"tachuelas\");\n tachuelas = atlas.findRegion(\"tachuelas\");\n platano = atlas.findRegion(\"platano\");\n\n pickCoin = get(\"data/musica/coin.mp3\");\n jump = get(\"data/musica/salto.mp3\");\n }", "private void chargerTextures() {\n String messageErreur = \"\";\n try {\n JETON_2 = new Texture(Gdx.files.internal(\"textures/jeton_2.png\"));\n } catch (Exception e) {\n messageErreur += \"Erreur lors du chargement de la texture : \"+\"textures/jeton_2.png\"+\"\\n\";\n }\n try {\n JETON_3 = new Texture(Gdx.files.internal(\"textures/jeton_3.png\"));\n } catch (Exception e) {\n messageErreur += \"Erreur lors du chargement de la texture : \"+\"textures/jeton_3.png\"+\"\\n\";\n }\n try {\n JETON_4 = new Texture(Gdx.files.internal(\"textures/jeton_4.png\"));\n } catch (Exception e) {\n messageErreur += \"Erreur lors du chargement de la texture : \"+\"textures/jeton_4.png\"+\"\\n\";\n }\n try {\n JETON_5 = new Texture(Gdx.files.internal(\"textures/jeton_5.png\"));\n } catch (Exception e) {\n messageErreur += \"Erreur lors du chargement de la texture : \"+\"textures/jeton_5.png\"+\"\\n\";\n }\n try {\n JETON_6 = new Texture(Gdx.files.internal(\"textures/jeton_6.png\"));\n } catch (Exception e) {\n messageErreur += \"Erreur lors du chargement de la texture : \"+\"textures/jeton_6.png\"+\"\\n\";\n }\n try {\n JETON_8 = new Texture(Gdx.files.internal(\"textures/jeton_8.png\"));\n } catch (Exception e) {\n messageErreur += \"Erreur lors du chargement de la texture : \"+\"textures/jeton_8.png\"+\"\\n\";\n }\n try {\n JETON_9 = new Texture(Gdx.files.internal(\"textures/jeton_9.png\"));\n } catch (Exception e) {\n messageErreur += \"Erreur lors du chargement de la texture : \"+\"textures/jeton_9.png\"+\"\\n\";\n }\n try {\n JETON_10 = new Texture(Gdx.files.internal(\"textures/jeton_10.png\"));\n } catch (Exception e) {\n messageErreur += \"Erreur lors du chargement de la texture : \"+\"textures/jeton_10.png\"+\"\\n\";\n }\n try {\n JETON_11 = new Texture(Gdx.files.internal(\"textures/jeton_11.png\"));\n } catch (Exception e) {\n messageErreur += \"Erreur lors du chargement de la texture : \"+\"textures/jeton_11.png\"+\"\\n\";\n }\n try {\n JETON_12 = new Texture(Gdx.files.internal(\"textures/jeton_12.png\"));\n } catch (Exception e) {\n messageErreur += \"Erreur lors du chargement de la texture : \"+\"textures/jeton_12.png\"+\"\\n\";\n }\n try {\n FORET = new Texture(Gdx.files.internal(\"textures/texture_foret.png\"));\n } catch (Exception e) {\n messageErreur += \"Erreur lors du chargement de la texture : \"+\"textures/texture_foret.png\"+\"\\n\";\n }\n try {\n PRE = new Texture(Gdx.files.internal(\"textures/texture_pre.png\"));\n } catch (Exception e) {\n messageErreur += \"Erreur lors du chargement de la texture : \"+\"textures/texture_pre.png\"+\"\\n\";\n }\n try {\n CHAMP = new Texture(Gdx.files.internal(\"textures/texture_champ.png\"));\n } catch (Exception e) {\n messageErreur += \"Erreur lors du chargement de la texture : \"+\"textures/texture_champ.png\"+\"\\n\";\n }\n try {\n COLLINE = new Texture(Gdx.files.internal(\"textures/texture_colline.png\"));\n } catch (Exception e) {\n messageErreur += \"Erreur lors du chargement de la texture : \"+\"textures/texture_colline.png\"+\"\\n\";\n }\n try {\n MONTAGNE = new Texture(Gdx.files.internal(\"textures/texture_montagne.png\"));\n } catch (Exception e) {\n messageErreur += \"Erreur lors du chargement de la texture : \"+\"textures/texture_montagne.png\"+\"\\n\";\n }\n try {\n DESERT = new Texture(Gdx.files.internal(\"textures/texture_desert.png\"));\n } catch (Exception e) {\n messageErreur += \"Erreur lors du chargement de la texture : \"+\"textures/texture_desert.png\"+\"\\n\";\n }\n try {\n MER = new Texture(Gdx.files.internal(\"textures/texture_mer.jpg\"));\n } catch (Exception e) {\n messageErreur += \"Erreur lors du chargement de la texture : \"+\"textures/texture_mer.jpg\"+\"\\n\";\n }\n try {\n PORT = new Texture(Gdx.files.internal(\"textures/texture_port2.png\"));\n } catch (Exception e) {\n messageErreur += \"Erreur lors du chargement de la texture : \"+\"textures/texture_port2.png\"+\"\\n\";\n }\n System.err.println(messageErreur);\n }", "public void preLoadContent(AssetManager manager) {\n\t\tif (ragdollAssetState != AssetState.EMPTY) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tragdollAssetState = AssetState.LOADING;\n\t\tmanager.load(CROSS_FILE, Texture.class);\n\t\tassets.add(CROSS_FILE);\n\t\tmanager.load(FOREG_FILE, Texture.class);\n\t\tassets.add(FOREG_FILE);\n\t\tmanager.load(BACKG_FILE, Texture.class);\n\t\tassets.add(BACKG_FILE);\n\t\tmanager.load(BUBBLE_FILE, Texture.class);\n\t\tassets.add(BUBBLE_FILE);\n\t\tfor(int ii = 0; ii < RAGDOLL_FILES.length; ii++) {\n\t\t\tmanager.load(RAGDOLL_FILES[ii], Texture.class);\n\t\t\tassets.add(RAGDOLL_FILES[ii]);\n\t\t}\n\t\tfor(int ii = 0; ii < BUBBLE_SOUNDS.length; ii++) {\n\t\t\tmanager.load(BUBBLE_SOUNDS[ii], Sound.class);\n\t\t\tassets.add(BUBBLE_SOUNDS[ii]);\n\t\t}\n\t\t\n\t\tsuper.preLoadContent(manager);\n\t}", "private void cargarTexturas()\n {\n \ttry\n \t{/*\n\t mTextures.add(Texture.cargarTextura(\"texturaTeclaC.png\",\n\t getAssets()));\n\t mTextures.add(Texture.cargarTextura(\"texturaTeclaD.png\",\n\t getAssets()));\n\t mTextures.add(Texture.cargarTextura(\"texturaTeclaE.png\",\n\t getAssets()));\n\t mTextures.add(Texture.cargarTextura(\"texturaTeclaF.png\",\n\t getAssets()));\n\t mTextures.add(Texture.cargarTextura(\"texturaTeclaG.png\",\n\t getAssets()));\n\t mTextures.add(Texture.cargarTextura(\"texturaTeclaA.png\",\n\t getAssets()));\n\t mTextures.add(Texture.cargarTextura(\"texturaTeclaB.png\",\n\t getAssets()));\n\t mTextures.add(Texture.cargarTextura(\"texturaTeclaC1.png\",\n\t getAssets()));\n\t */\n \t\tmTextures.add(new Texture(\"texturaTeclaC.png\", getAssets()) );\n \t\tmTextures.add(new Texture(\"texturaTeclaD.png\", getAssets()) );\n \t\tmTextures.add(new Texture(\"texturaTeclaE.png\", getAssets()) );\n \t\tmTextures.add(new Texture(\"texturaTeclaF.png\", getAssets()) );\n \t\tmTextures.add(new Texture(\"texturaTeclaG.png\", getAssets()) );\n \t\tmTextures.add(new Texture(\"texturaTeclaA.png\", getAssets()) );\n \t\tmTextures.add(new Texture(\"texturaTeclaB.png\", getAssets()) );\n \t\tmTextures.add(new Texture(\"texturaTeclaC1.png\", getAssets()) );\n \t} catch(IOException e)\n \t{\n \t\tLog.v(\"ELIMINAR\", \"Fallo en la carga de texturas\");\n \t\te.printStackTrace();\n \t}\n }", "@Override\n public void onLoadResources() {\n }", "public void initialize() {\n\t\tImageIcon bg = new ImageIcon(\"bg.png\");\n\t\tBackground = (bg.getImage().getScaledInstance(bg.getIconWidth(), bg.getIconHeight(), Image.SCALE_DEFAULT));\n\t\tImageIcon[] in1 = new ImageIcon[12];\n\t\tin1[0] = new ImageIcon(\"Hero1 Normal.png\");\n\t\tin1[1] = new ImageIcon(\"20ed.png\");\n\t\tin1[2] = new ImageIcon(\"50ed.png\");\n\t\tin1[3] = new ImageIcon(\"100ed.png\");\n\t\tin1[4] = new ImageIcon(\"200ed.png\");\n\t\tin1[5] = new ImageIcon(\"500ed.png\");\n\t\tin1[6] = new ImageIcon(\"Hero1 Att200.png\");\n\t\tin1[7] = new ImageIcon(\"Hero1 Att500.png\");\n\t\tin1[8] = new ImageIcon(\"Hero1 Defence01.png\");\n\t\tin1[9] = new ImageIcon(\"Hero1Defence02.png\");\n\t\tin1[10] = new ImageIcon(\"Hero1 to fire.png\");\n\t\tin1[11] = new ImageIcon(\"Hero1 die.png\");\n\t\tImageIcon[] in2 = new ImageIcon[12];\n\t\tin2[0] = new ImageIcon(\"Hero02.png\");\n\t\tin2[1] = new ImageIcon(\"20ed02.png\");\n\t\tin2[2] = new ImageIcon(\"50ed02.png\");\n\t\tin2[3] = new ImageIcon(\"100ed02.png\");\n\t\tin2[4] = new ImageIcon(\"200ed02.png\");\n\t\tin2[5] = new ImageIcon(\"500ed02.png\");\n\t\tin2[6] = new ImageIcon(\"Hero02 Attack02.png\");\n\t\tin2[7] = new ImageIcon(\"Hero02 Attack02.png\");\n\t\tin2[8] = new ImageIcon(\"Hero02 Defence.png\");\n\t\tin2[9] = new ImageIcon(\"Hero02 Defence.png\");\n\t\tin2[10] = new ImageIcon(\"Hero02 Attack01.png\");\n\t\tin2[11] = new ImageIcon(\"Hero02 Die.png\");\n\t\tImageIcon[] inBullet1 = new ImageIcon[3];\n\t\tinBullet1[0] = new ImageIcon(\"B1fire02.png\");\n\t\tinBullet1[1] = new ImageIcon(\"B1fire03.png\");\n\t\tinBullet1[2] = new ImageIcon(\"B1fire05.png\");\n\t\tImageIcon[] inBullet2 = new ImageIcon[5];\n\t\tinBullet2[0] = new ImageIcon(\"20.png\");\n\t\tinBullet2[1]= new ImageIcon(\"50.png\");\n\t\tinBullet2[2]= new ImageIcon(\"100.png\");\n\t\tinBullet2[3]= new ImageIcon(\"200.png\");\n\t\tinBullet2[4]= new ImageIcon(\"500.png\");\n\t\tHero1.settemplate(in2);\n\t\tHero2.settemplate(in1);\n\t\tBullet1.settemplate(inBullet2);\n\t\tBullet2.settemplate(inBullet1);\n\t\tHero1.setstatus(0);\n\t\tHero2.setstatus(0);\n\t}", "private void loadSprites(String s){\n try {\n BufferedImage spriteSheet = ImageIO.read(\n getClass().getResourceAsStream(s));\n sprites = new BufferedImage[1];\n sprites[0] = spriteSheet.getSubimage(0, 0, width, height);\n\n } catch (Exception e){\n e.printStackTrace();\n }\n\n }", "public static void load(Resources resources) {\n mBitmap1 = BitmapFactory.decodeResource(resources, R.mipmap.a);\n mBitmap2 = BitmapFactory.decodeResource(resources, R.mipmap.b);\n mBitmap3 = BitmapFactory.decodeResource(resources, R.mipmap.c);\n mBitmap4 = BitmapFactory.decodeResource(resources, R.mipmap.d);\n mBitmap5 = BitmapFactory.decodeResource(resources, R.mipmap.e);\n mBitmap6 = BitmapFactory.decodeResource(resources, R.mipmap.f);\n\n }", "public Texture setBackgroundImage(){\n\t\tList<String> backgroundSelection = new ArrayList<String>();\n\t\t\n//\t\tAdds the universal background images to the List\n\t\ttry{Element root = new XmlReader().parse(Gdx.files.internal(\"gameImages.xml\"));\n\t\tElement selection = root.getChildByName(\"Universal\");\n\t\tArray<Element> backgroundArray = selection.getChildrenByName(\"background\");\n\t\tfor (int i = 0; i < backgroundArray.size; i++)\n\t\t\tbackgroundSelection.add(backgroundArray.get(i).getText());\n\t\t}\n\t\tcatch(IOException e){\n\t\t}\n\t\t\n//\t\tUse of xml file readers to add strings to the balls List\n\t\ttry{Element root = new XmlReader().parse(Gdx.files.internal(\"gameImages.xml\"));\n\t\tElement selection = root.getChildByName(\"artist\");\n\t\tElement artist = selection.getChildByName(formatName(game.getArtist()));\n\t\tArray<Element> backgroundSelectArray = artist.getChildrenByName(\"background\");\n\t\tfor (int i = 0; i < backgroundSelectArray.size; i++)\n\t\t\tbackgroundSelection.add(backgroundSelectArray.get(i).getText());\n\t\t}\n\t\tcatch(IOException e){\n\t\t}\n\t\t\n//\t\tRandom number generator to choose a random image as the ball image\n\t\tint randomBackground = (int) Math.random() * backgroundSelection.size();\n\t\tFileHandle backgroundImage = Gdx.files.internal(backgroundSelection.get(randomBackground));\n\t\treturn new Texture(backgroundImage) ;\n\t}", "@Override\n public void initScene()\n {\n myLight.position.setAll(300,150,150);\n\n myLight = new Light();\n myLight.type(LightType.DIRECTIONAL);\n\n scene.lights().add(myLight);\n scene.backgroundColor().setAll(255,255,255,1);\n\n IParser myParser = Parser.createParser(Parser.Type.MAX_3DS, getResources(), \"min3d.sampleProject1:raw/squared_robot_3ds\", false);\n myParser.parse();\n\n androidRobot3DObject = myParser.getParsedObject();\n androidRobot3DObject.position().x = androidRobot3DObject.position().y = androidRobot3DObject.position().z = 0;\n\n\n // We scale the robot, check this value if you want to target another scale\n androidRobot3DObject.scale().x = androidRobot3DObject.scale().y = androidRobot3DObject.scale().z = 1f;\n scene.addChild(androidRobot3DObject);\n\n // Preloading the textures with the textureManager()\n Bitmap b;\n b = Utils.makeBitmapFromResourceId(R.drawable.squared_robot_body_business);\n Shared.textureManager().addTextureId(b, \"squared_robot_body_business\");\n b.recycle();\n\n b = Utils.makeBitmapFromResourceId(R.drawable.squared_robot_body);\n Shared.textureManager().addTextureId(b, \"squared_robot_body\");\n b.recycle();\n\n\n b = Utils.makeBitmapFromResourceId(R.drawable.squared_robot_arm);\n Shared.textureManager().addTextureId(b,\"squared_robot_arm\");\n b.recycle();\n\n b = Utils.makeBitmapFromResourceId(R.drawable.squared_robot_foot);\n Shared.textureManager().addTextureId(b,\"squared_robot_foot\");\n b.recycle();\n\n\n b = Utils.makeBitmapFromResourceId(R.drawable.squared_robot_antenna);\n Shared.textureManager().addTextureId(b,\"squared_robot_antenna\");\n b.recycle();\n\n b = Utils.makeBitmapFromResourceId(R.drawable.squared_robot_head);\n Shared.textureManager().addTextureId(b,\"squared_robot_head\");\n b.recycle();\n\n b = Utils.makeBitmapFromResourceId(R.drawable.squared_robot_head_business);\n Shared.textureManager().addTextureId(b,\"squared_robot_head_business\");\n b.recycle();\n\n loadAllTextures();\n\n }", "public abstract T loadResource(AssetManager assetManager, String str);", "private void loadImages(){\n try{\n System.out.println(System.getProperty(\"user.dir\"));\n\n t1img = read(new File(\"resources/tank1.png\"));\n t2img = read(new File(\"resources/tank1.png\"));\n backgroundImg = read(new File(\"resources/background.jpg\"));\n wall1 = read(new File(\"resources/Wall1.gif\"));\n wall2 = read(new File(\"resources/Wall2.gif\"));\n heart = resize(read(new File(\"resources/Hearts/basic/heart.png\")), 35,35);\n heart2 = resize(read( new File(\"resources/Hearts/basic/heart.png\")), 25,25);\n bullet1 = read(new File(\"resources/bullet1.png\"));\n bullet2 = read(new File(\"resources/bullet2.png\"));\n\n }\n catch(IOException e){\n System.out.println(e.getMessage());\n }\n }", "public abstract void preloadContent(AssetManager manager);", "public static void loadBlockTextures() {\n\t\tspriteTopOn = ModLoader.addOverride(\"/terrain.png\",\n\t\t\t\t\"/WirelessSprites/topOn.png\");\n\t\tspriteTopOff = ModLoader.addOverride(\"/terrain.png\",\n\t\t\t\t\"/WirelessSprites/topOff.png\");\n\t\tspriteROn = ModLoader.addOverride(\"/terrain.png\",\n\t\t\t\t\"/WirelessSprites/rxOn.png\");\n\t\tspriteROff = ModLoader.addOverride(\"/terrain.png\",\n\t\t\t\t\"/WirelessSprites/rxOff.png\");\n\t\tspriteTOn = ModLoader.addOverride(\"/terrain.png\",\n\t\t\t\t\"/WirelessSprites/txOn.png\");\n\t\tspriteTOff = ModLoader.addOverride(\"/terrain.png\",\n\t\t\t\t\"/WirelessSprites/txOff.png\");\n\t}", "private void assetManager() {\n switch (chapterSection) {\n case 0:\n if (backgroundSprite.getTexture() != introBg)\n resetBackgroundSprite(introBg);\n intros.play();\n baybayins.stop();\n baybayinBGs.stop();\n break;\n case 1:\n intros.stop();\n baybayins.play();\n baybayinBGs.play();\n bukids.stop();\n bukidBGs.stop();\n break;\n case 2:\n resetBackgroundSprite(kabukirinBg);\n baybayinBGs.stop();\n baybayins.stop();\n bukids.play();\n bukidBGs.play();\n bundoks.stop();\n kabundukanBGs.stop();\n break;\n case 3:\n if (backgroundSprite.getTexture() != kabundukanBg)\n backgroundSprite.setTexture(kabundukanBg);\n\n bukids.stop();\n bukidBGs.stop();\n bundoks.play();\n kabundukanBGs.play();\n lungsodBGs.stop();\n lungsods.stop();\n break;\n case 4:\n backgroundSprite.setTexture(lungsodBg);\n bundoks.stop();\n kabundukanBGs.stop();\n lungsods.play();\n lungsodBGs.play();\n break;\n case 5: // Start of game\n lungsodBGs.stop();\n lungsods.stop();\n baybayinBGs.stop();\n baybayins.stop();\n bukids.stop();\n bukidBGs.stop();\n bundoks.stop();\n kabundukanBGs.stop();\n intros.stop();\n\n question.setScale(getQuestionFontScale());\n if (isTeacher) {\n backgroundSprite.setTexture(answer1Texture);\n } else {\n backgroundSprite.setTexture(question1Texture);\n }\n break;\n case 6:\n if (isTeacher)\n backgroundSprite.setTexture(answer2Texture);\n else {\n if (typedAnswer.toString().toLowerCase().contentEquals(\"baybayin\"))\n correctAnswers++;\n typedAnswer.setLength(0);\n backgroundSprite.setTexture(question2Texture);\n }\n break;\n case 7:\n if (isTeacher)\n backgroundSprite.setTexture(answer3Texture);\n else {\n if (typedAnswer.toString().toLowerCase().contentEquals(\"kabundukan\"))\n correctAnswers++;\n typedAnswer.setLength(0);\n backgroundSprite.setTexture(question3Texture);\n }\n break;\n case 8:\n if (isTeacher)\n backgroundSprite.setTexture(answer4Texture);\n else {\n if (typedAnswer.toString().toLowerCase().contentEquals(\"lungsod\"))\n correctAnswers++;\n typedAnswer.setLength(0);\n backgroundSprite.setTexture(question4Texture);\n }\n break;\n case 9:\n if (!isTeacher) {\n if (typedAnswer.toString().toLowerCase().contentEquals(\"kabukiran\"))\n correctAnswers++;\n typedAnswer.setLength(0);\n saveProgress(CHAPTER_ONE_SCORE);\n }\n backgroundSprite.setTexture(questionBg);\n displayQuizResult(CHAPTER_ONE_SCORE, 2);\n break;\n\n }\n assetNeedUpdate = false;\n }", "private void loadTextureAtlas(final int directoryIndex, final int atlasIndex) {\n if ((directoryIndex < 0) || (directoryIndex >= rootDirectories.size())) {\n throw new IndexOutOfBoundsException(\"Directory index is not within valid range\");\n }\n\n final String directory = rootDirectories.get(directoryIndex);\n final String atlasTextureRes = directory + ATLAS_BASE_NAME + atlasIndex;\n\n final Texture atlasTexture = loadTexture(atlasTextureRes + IMAGE_EXTENSION);\n if (atlasTexture == null) {\n LOGGER.warn(\"Error loading texture atlas: \" + atlasTextureRes);\n return;\n }\n\n textures.put(atlasTextureRes, atlasTexture);\n\n final MXParserFactory parserFactory = new MXParserFactory();\n parserFactory.setNamespaceAware(false);\n parserFactory.setValidating(false);\n InputStream xmlStream = null;\n try {\n final XmlPullParser parser = parserFactory.newPullParser();\n\n final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n xmlStream = classLoader.getResourceAsStream(atlasTextureRes + ATLAS_DEF_EXTENSION);\n parser.setInput(xmlStream, \"UTF-8\");\n\n int currentEvent = parser.nextTag();\n while (currentEvent != XmlPullParser.END_DOCUMENT) {\n if ((currentEvent == XmlPullParser.START_TAG) && \"sprite\".equals(parser.getName())) {\n parseXmlTag(directory, atlasTexture, parser);\n }\n if ((currentEvent == XmlPullParser.END_TAG) && \"sprites\".equals(parser.getName())) {\n break;\n }\n currentEvent = parser.nextTag();\n }\n\n } catch (@Nonnull final XmlPullParserException e) {\n LOGGER.error(\"Failed to create a new instance of the pull parser for atlas: \" + atlasTextureRes, e);\n } catch (@Nonnull final IOException e) {\n LOGGER.error(\"Error while reading the XML definition of the atlas.\", e);\n } finally {\n closeQuietly(xmlStream);\n }\n }", "public static void classInit(){\n //set up font\n //font = WurfelEngine.getInstance().manager.get(\"com/BombingGames/WurfelEngine/EngineCore/arial.fnt\"); //load font\n font = new BitmapFont(false);\n //font.scale(2);\n\n\n font.setColor(Color.GREEN);\n //font.scale(-0.5f);\n \n //load sprites\n Block.loadSheet();\n addInputProcessor(staticStage);\n skin = new Skin(Gdx.files.internal(\"com/BombingGames/WurfelEngine/Core/skin/uiskin.json\"));\n GameplayScreen.msgSystem().viewInit(skin,Gdx.graphics.getWidth()/2, Gdx.graphics.getHeight()/4);\n }", "private static void loadSprites(){\n \t\tshipSprites.put(\"SCOUT_BLUE\", new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/blue/scout.png\"), 0, 0.5f));\n \t\tshipSprites.put(\"HUNTER_BLUE\", new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/blue/hunter.png\"), 0, 0.5f));\n \t\tshipSprites.put(\"DESTROYER_BLUE\", new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/blue/destroyer.png\"), 0, 0.5f));\n \t\tshipSprites.put(\"COLONIZER_BLUE\", new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/blue/colonizer.png\"), 0.5f, 0.5f));\n \t\t\n \t\t/*\n \t\t * Ships Red Player\n \t\t */\n \t\tshipSprites.put(\"SCOUT_RED\", new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/red/scout.png\"), 0, 0.5f));\n \t\tshipSprites.put(\"HUNTER_RED\", new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/red/hunter.png\"), 0, 0.5f));\n \t\tshipSprites.put(\"DESTROYER_RED\", new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/red/destroyer.png\"), 0, 0.5f));\n \t\tshipSprites.put(\"COLONIZER_RED\", new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/red/colonizer.png\"), 0.5f, 0.5f));\n \n \t\t/*\n \t\t * Path Arrows\n \t\t */\n\t\tpathTextures.put(\"HEAD\", Toolkit.getDefaultToolkit().getImage(\"res/path/head.png\"));\n\t\tpathTextures.put(\"START\", Toolkit.getDefaultToolkit().getImage(\"res/path/start.png\"));\n\t\tpathTextures.put(\"STRAIGHT\", Toolkit.getDefaultToolkit().getImage(\"res/path/straight.png\"));\n\t\tpathTextures.put(\"TURN\", Toolkit.getDefaultToolkit().getImage(\"res/path/turn.png\"));\n \t\t\n \t\t/*\n \t\t * Planets\n \t\t */\n \t\tmetalplanets.put(0, new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/planets/metalplanet_0.png\"), 0.5f, 0));\n \t\tmetalplanets.put(1, new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/planets/metalplanet_1.png\"), 0.5f, 0));\n \t\tmetalplanets.put(2, new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/planets/metalplanet_2.png\"), 0.5f, 0));\n \t\tmetalplanets.put(3, new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/planets/metalplanet_3.png\"), 0.5f, 0));\n \t\tgasplanets.put(0, new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/planets/gasplanet_0.png\"), 0.5f, 0));\n \t\tgasplanets.put(1, new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/planets/gasplanet_1.png\"), 0.5f, 0));\n \t\tgasplanets.put(2, new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/planets/gasplanet_2.png\"), 0.5f, 0));\n \t\t\n \t\t/*\n \t\t * Colony Sprite\n \t\t */\n \t\tloadColonySprites(Color.RED, \"RED\");\n \t\tloadColonySprites(Color.BLUE, \"BLUE\");\n \t}", "private void initResources()\n {\n try\n {\n searchBackgroundImage = ImageIO.read(new File(IMAGES_DIR + \"logo.jpg\"));\n searchIcon = ImageIO.read(new File(IMAGES_DIR + \"search_icon.png\"));\n miniMenuAddImage = ImageIO.read(new File(IMAGES_DIR + \"addSmallIcon.png\"));\n miniMenuRemoveImage = ImageIO.read(new File(IMAGES_DIR + \"removeSmallIcon.png\"));\n updateMiniImage = ImageIO.read(new File(IMAGES_DIR + \"up.png\"));\n playButtonImage = ImageIO.read(new File(IMAGES_DIR + \"play_arrow.png\"));\n stopButtonImage = ImageIO.read(new File(IMAGES_DIR + \"stop_square.png\"));\n openFileImage = ImageIO.read(new File(IMAGES_DIR + \"open_icon.png\"));\n newFileImage = ImageIO.read(new File(IMAGES_DIR + \"new_file.png\"));\n settingsImage = ImageIO.read(new File(IMAGES_DIR + \"settings.png\"));\n spiderImage = ImageIO.read(new File(IMAGES_DIR + \"spider_icon.png\"));\n searchIconDark = ImageIO.read(new File(IMAGES_DIR + \"search_icon_dark.png\"));\n webIconImage = ImageIO.read(new File(IMAGES_DIR + \"web_icon.png\"));\n clipboardImage = ImageIO.read(new File(IMAGES_DIR + \"clipboard.png\"));\n colorIconImage = ImageIO.read(new File(IMAGES_DIR + \"color_icon.png\"));\n transitionSpinnerImage = IMAGES_DIR + \"loading.gif\";\n processingImage = IMAGES_DIR + \"processing.gif\";\n processingMiniImage = IMAGES_DIR + \"spinner.gif\";\n }\n \n catch(IOException e)\n {\n JOptionPane.showMessageDialog(null, \"[Error] Failed to load resource(s)\");\n }\n }", "public void loadContent(){\n\t\tspriteBatch = new SpriteBatch(getGraphicsDevice());\n\t\t//TODO: put content loading code here\n\t\t\n\t}", "private Allocation loadTextureARGB(int id) {\n Bitmap b = BitmapFactory.decodeResource(mResources, id, mOptionsARGB);\n final Allocation allocation = Allocation.createFromBitmap(mRS, b,\n Allocation.MipmapControl.MIPMAP_NONE,\n Allocation.USAGE_GRAPHICS_TEXTURE);\n return allocation;\n }", "public static void makeGeometry(AssetManager am) {\n geom = am.loadModel(\"Models/container/container.j3o\");\n mat = new Material(am, \"Common/MatDefs/Misc/Unshaded.j3md\");\n Texture Tex = am.loadTexture(\n \"Textures/Container/Template/texture.png\");\n\n\n Colors.add(am.loadTexture(\n \"Textures/Container/blue.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/green.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/purple.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/red.png\"));\n companyTextures.put(\"UPS\", am.loadTexture(\n \"Textures/Container/UPS.png\"));\n companyTextures.put(\"CocaCola\", am.loadTexture(\n \"Textures/Container/cocacola.png\"));\n companyTextures.put(\"McDonalds\", am.loadTexture(\n \"Textures/Container/mac.png\"));\n\n companyTextures.put(\"Grolsch\", am.loadTexture(\n \"Textures/Container/grolsch.png\"));\n companyTextures.put(\"Heineken\", am.loadTexture(\n \"Textures/Container/heineken.png\"));\n companyTextures.put(\"Nestle\", am.loadTexture(\n \"Textures/Container/nestle.png\"));\n companyTextures.put(\"Shell\", am.loadTexture(\n \"Textures/Container/shell.png\"));\n companyTextures.put(\"DeutschePost\", am.loadTexture(\n \"Textures/Container/post.png\"));\n companyTextures.put(\"PostBank\", am.loadTexture(\n \"Textures/Container/postbank.png\"));\n companyTextures.put(\"Airfrance\", am.loadTexture(\n \"Textures/Container/airfrance.png\"));\n\n companyTextures.put(\"BallastNedam\", am.loadTexture(\n \"Textures/Container/ballastnedam.png\"));\n companyTextures.put(\"Manpower\", am.loadTexture(\n \"Textures/Container/manpower.png\"));\n\n companyTextures.put(\"Lufthansa\", am.loadTexture(\n \"Textures/Container/lufthansa.png\"));\n companyTextures.put(\"Bayer\", am.loadTexture(\n \"Textures/Container/bayer.png\"));\n\n\n companyTextures.put(\"Danone\", am.loadTexture(\n \"Textures/Container/danone.png\"));\n companyTextures.put(\"Ericsson\", am.loadTexture(\n \"Textures/Container/ericsson.png\"));\n\n companyTextures.put(\"Danone\", am.loadTexture(\n \"Textures/Container/danone.png\"));\n companyTextures.put(\"Ericsson\", am.loadTexture(\n \"Textures/Container/ericsson.png\"));\n\n\n companyTextures.put(\"OCE\", am.loadTexture(\n \"Textures/Container/oce.png\"));\n companyTextures.put(\"BeterBed\", am.loadTexture(\n \"Textures/Container/beterbed.png\"));\n\n companyTextures.put(\"TenCate\", am.loadTexture(\n \"Textures/Container/tencate.png\"));\n\n companyTextures.put(\"FederalExpress\", am.loadTexture(\n \"Textures/Container/fedex.png\"));\n companyTextures.put(\"IBM\", am.loadTexture(\n \"Textures/Container/IBM.png\"));\n companyTextures.put(\"KraftFoods\", am.loadTexture(\n \"Textures/Container/kraft.png\"));\n companyTextures.put(\"Hanjin\", am.loadTexture(\n \"Textures/Container/hanjin.png\"));\n companyTextures.put(\"CargoTrans\", am.loadTexture(\n \"Textures/Container/cargotrans.png\"));\n\n\n companyTextures.put(\"Metro\", am.loadTexture(\n \"Textures/Container/metro.png\"));\n companyTextures.put(\"Carrefour\", am.loadTexture(\n \"Textures/Container/carefour.png\"));\n companyTextures.put(\"Amstel\", am.loadTexture(\n \"Textures/Container/amstel.png\"));\n companyTextures.put(\"TransNL\", am.loadTexture(\n \"Textures/Container/transnl.png\"));\n companyTextures.put(\"Gilette\", am.loadTexture(\n \"Textures/Container/gillete.png\"));\n\n\n companyTextures.put(\"WalMart\", am.loadTexture(\n \"Textures/Container/walmart.png\"));\n companyTextures.put(\"Delhaize\", am.loadTexture(\n \"Textures/Container/delhaize.png\"));\n companyTextures.put(\"BASF\", am.loadTexture(\n \"Textures/Container/basf.png\"));\n companyTextures.put(\"SeaTrans\", am.loadTexture(\n \"Textures/Container/seatrans.png\"));\n companyTextures.put(\"DowChemical\", am.loadTexture(\n \"Textures/Container/dow.png\"));\n\n companyTextures.put(\"AXA\", am.loadTexture(\n \"Textures/Container/axe.png\"));\n companyTextures.put(\"LLyod\", am.loadTexture(\n \"Textures/Container/lloyd.png\"));\n \n companyTextures.put(\"GJMW\", am.loadTexture(\n \"Textures/Container/GJMW.png\"));\n companyTextures.put(\"WoodNorge\", am.loadTexture(\n \"Textures/Container/woodnorge.png\"));\n companyTextures.put(\"FlowersNL\", am.loadTexture(\n \"Textures/Container/flowersnl.png\"));\n \n companyTextures.put(\"FruitINT\", am.loadTexture(\n \"Textures/Container/fruitint.png\"));\n companyTextures.put(\"IntTrans\", am.loadTexture(\n \"Textures/Container/inttrans.png\"));\n companyTextures.put(\"MaasHolland\", am.loadTexture(\n \"Textures/Container/maasholland.png\"));\n\n mat.setTexture(\"ColorMap\", Tex);\n r = new Random();\n\n mat.setColor(\"Color\", ColorRGBA.White);\n\n geom.setMaterial(mat);\n }", "public void preload() {\n\t\ttry {\n\t\t\ttexture = TextureLoader.getTexture(\"PNG\",\n\t\t\t\t\tResourceLoader.getResourceAsStream(file));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tloaded = true;\n\t}", "private TextureRegion getAtlas(BonusMaterials material) {\n return new TextureRegion(new Texture(Gdx.files.internal(GameConfig.getInstance().tilesetPath)));\n }", "private void init() {\n healthBars = new TextureAtlas( Gdx.files.internal( \"health/health.pack\" ) );\n buildUIElements();\n }", "public TextureRegion loadTextureRegion(Texture texture, Rectangle rec);", "public Texture(String path)\n {\n texture = load(path);\n }", "default T background(Name name) {\n return background(new ResourceUrn(new Name(\"engine\"), new Name(\"textures\"), name));\n }", "@Override\n\tpublic void init() {\n\t\tloadSpritesheet();\n\t\tloadSounds();\n\t\tinitIntro();\n\t}", "public Sprite loadBitmap(Context context, GL10 gl, int resourceId)\r\n\t{\r\n\t if(context != null && gl != null)\r\n\t {\r\n\t \t//Generate one texture pointer...\r\n\t gl.glGenTextures(1, mTexture, 0);\r\n\t \r\n\t //grab location index\r\n\t int textureID = mTexture[0];\r\n\t \r\n\t\t\t//...and bind it to our array\r\n\t gl.glBindTexture(GL10.GL_TEXTURE_2D, textureID);\r\n\t \r\n\t\t\t//Create Nearest Filtered Texture //GL_NEAREST\r\n\t gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_LINEAR);\r\n\t gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_LINEAR);\r\n\t\r\n\t\t\t//Different possible texture parameters, e.g. GL10.GL_CLAMP_TO_EDGE\r\n\t gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S, GL10.GL_REPEAT);\r\n\t gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T, GL10.GL_REPEAT);\r\n\t\t\t\r\n\t // select modulate to mix texture with color for shading\r\n\t gl.glTexEnvf(GL10.GL_TEXTURE_ENV, GL10.GL_TEXTURE_ENV_MODE, /*GL10.GL_REPLACE*/ GL10.GL_MODULATE);\r\n\t\r\n\t InputStream is = context.getResources().openRawResource(resourceId);\r\n\t Bitmap bitmap;\r\n\t try\r\n\t {\r\n\t bitmap = BitmapFactory.decodeStream(is, null, sBitmapOptions);\r\n\t }\r\n\t finally\r\n\t {\r\n\t try\r\n\t {\r\n\t is.close();\r\n\t }\r\n\t catch(IOException e)\r\n\t {\r\n\t //Log.e(\"ImageLoaderIO\", \"DecodeStreamError: \" + e);\r\n\t }\r\n\t }\r\n\t\r\n\t GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0);\r\n\t int width = bitmap.getWidth();\r\n\t int height = bitmap.getHeight();\r\n\t \r\n\t // clean up\r\n\t bitmap.recycle();\r\n\t\r\n\t return new Sprite(textureID,width,height);\r\n\t }\r\n\t return null;\r\n\t}", "@Override\n\tpublic void init() {\n\t\tEffect().registerEffect(40, 40, 3, \"ExplosionSheet.png\");\n\t\tbg = new Background();\n\t\tobj = new TestObj();\n\t\tobj.init();\n\t\ttest = new Test2[50];\n\t\tfor(int x = 0; x < test.length; x++ )\n\t\t\ttest[x] = new Test2(x*30-600,30 *(float)Math.pow(-1, x), \"g.png\");\n\t\t\n\t\ttest2 = new Test2[50000];\n\t\tfor(int x = 0; x < test2.length; x++ )\n\t\t\ttest2[x] = new Test2(x*30-600,150+30 *(float)Math.pow(-1, x), \"AlienPawn.png\");\n\t\t\n\t\ttest3 = new Test2[50000];\n\t\tfor(int x = 0; x < test3.length; x++ )\n\t\t\ttest3[x] = new Test2(x*30-600,-200+30 *(float)Math.pow(-1, x), \"AlienPawn - Copy.png\");\n\t\n\t}", "public void atacar() {\n texture = new Texture(Gdx.files.internal(\"recursos/ataques.png\"));\n rectangle=new Rectangle(x,y,texture.getWidth(),texture.getHeight());\n tmp = TextureRegion.split(texture, texture.getWidth() / 4, texture.getHeight() / 4);\n switch (jugadorVista) {\n case \"Derecha\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[2][b];\n animation = new Animation((float) 0.1, regions);\n tiempo = 0f;\n }\n break;\n case \"Izquierda\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[3][b];\n animation = new Animation((float) 0.1, regions);\n tiempo = 0f;\n }\n break;\n case \"Abajo\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[0][b];\n animation = new Animation((float) 0.1, regions);\n tiempo = 0f;\n }\n break;\n case \"Arriba\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[1][b];\n animation = new Animation((float) 0.1, regions);\n tiempo = 0f;\n }\n break;\n }\n }", "private void attachTextures(GameTerrain gameTerrain){\r\n\t\t//Get the texture collection from gameTerrain\r\n\t\tGameTerrainTexture_Collection gameTerrainTexture_Collection = gameTerrain.getGameTerrainTexture_Collection();\r\n\t\t//Activate and attach the background texture to the 1st unit\r\n\t\tGL13.glActiveTexture(GL13.GL_TEXTURE0);\r\n\t\tGL11.glBindTexture(GL11.GL_TEXTURE_2D, gameTerrainTexture_Collection.getBackgroundTexture().getTextureReferenceID());\r\n\t\t//Activate and attach the red texture to the 2nd unit\r\n\t\tGL13.glActiveTexture(GL13.GL_TEXTURE1);\r\n\t\tGL11.glBindTexture(GL11.GL_TEXTURE_2D, gameTerrainTexture_Collection.getRedTexture().getTextureReferenceID());\r\n\t\t//Activate and attach the blue texture to the 3rd unit\r\n\t\tGL13.glActiveTexture(GL13.GL_TEXTURE2);\r\n\t\tGL11.glBindTexture(GL11.GL_TEXTURE_2D, gameTerrainTexture_Collection.getBlueTexture().getTextureReferenceID());\r\n\t\t//Activate and attach the green texture to the 4th unit\r\n\t\tGL13.glActiveTexture(GL13.GL_TEXTURE3);\r\n\t\tGL11.glBindTexture(GL11.GL_TEXTURE_2D, gameTerrainTexture_Collection.getGreenTexture().getTextureReferenceID());\r\n\t\t//Activate and attach the blendmap to the 5th unit\r\n\t\tGL13.glActiveTexture(GL13.GL_TEXTURE4);\r\n\t\tGL11.glBindTexture(GL11.GL_TEXTURE_2D, gameTerrain.getBlendMap().getTextureReferenceID());\r\n\t\t\r\n\t}", "public ResourceManager(GraphicsConfiguration gc) {\n this.gc = gc;\n loadTileImages();\n loadCreatureSprites();\n loadPowerUpSprites();\n }", "@Override\r\n protected void onCreate(Bundle savedInstanceState) {\r\n Log.d(LOGTAG, \"onCreate\");\r\n super.onCreate(savedInstanceState);\r\n Bundle bundle = this.getIntent().getExtras();\r\n path = bundle.getByteArray(\"IMAGE\");\r\n vuforiaAppSession = new ArSession(this);\r\n\r\n startLoadingAnimation();\r\n\r\n mDatasetStrings.add(\"target_tiny_chief.xml\");\r\n\r\n vuforiaAppSession.initAR(this, ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\r\n\r\n mGestureDetector = new GestureDetector(this, new GestureListener());\r\n\r\n // Load any sample specific textures:\r\n mTextures = new Vector<>();\r\n loadTextures();\r\n\r\n mIsDroidDevice = android.os.Build.MODEL.toLowerCase().startsWith(\"droid\");\r\n }", "public static void LoadSpritesIntoArray() {\r\n\t\t// Get all nodes for the settings\r\n\t\t// Node main = document.getElementById(\"main\");\r\n\t\t// Node textures = document.getElementById(\"textures\");\r\n\t\t// NodeList nList = document.getElementsByTagName(\"TexturePath\");\r\n\r\n\t\t// for (Element texPath : texturePathElements) {\r\n\t\t// System.out.println(texPath.getAttribute(\"name\") + \" \" +\r\n\t\t// texPath.getAttribute(\"name\"));\r\n\t\t// sprites.add(new Sprite(texPath.getAttribute(\"name\"),\r\n\t\t// texPath.getAttribute(\"path\")));\r\n\t\t// }\r\n\r\n\t\tsprites = ImageTools.LoadAllSpriteTexturesFromSpriteSheet(\"In_Game\");\r\n\r\n\t\t/*\r\n\t\t * This method i got from a stack overflow question\r\n\t\t * https://stackoverflow.com/questions/22610526/how-to-append-elements-\r\n\t\t * at-the-end-of-arraylist-in-java\r\n\t\t */\r\n\t\tint endOfList = sprites.size();\r\n\t\tsprites.addAll(endOfList, ImageTools.LoadAllSpriteTexturesFromSpriteSheet(\"In_Game_HUD\"));\r\n\t\tendOfList = sprites.size();\r\n\t\tsprites.addAll(endOfList, ImageTools.LoadAllSpriteTexturesFromSpriteSheet(\"In_Game_Custom\"));\r\n\t\tSystem.out.println(endOfList);\r\n\r\n\t\tfor (Element el : texturePathElements) {\r\n\r\n\t\t\ttry {\r\n\t\t\t\tsprites.add(new Sprite(el.getAttribute(\"name\"), el.getAttribute(\"path\")));\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tisTexturesDone = true;\r\n\t}", "private void loadGLTextures(GL10 gl) throws IOException\t\t\t// Load Bitmaps And Convert To Textures\r\n {\r\n texture[0] = new Texture();\r\n texture[1] = new Texture();\r\n // Load The Bitmap, Check For Errors.\r\n TGALoader.loadTGA(texture[0], \"tga/uncompressed.tga\");\r\n TGALoader.loadTGA(texture[1], \"tga/compressed.tga\");\r\n for (int loop = 0; loop < 2; loop++)\t\t\t\t\t\t// Loop Through Both Textures\r\n {\r\n // Typical Texture Generation Using Data From The TGA ( CHANGE )\r\n gl.glGenTextures(1, texture[loop].texID, 0);\t\t\t\t// Create The Texture ( CHANGE )\r\n gl.glBindTexture(GL10.GL_TEXTURE_2D, texture[loop].texID[0]);\r\n gl.glTexImage2D(GL10.GL_TEXTURE_2D, 0, texture[loop].type, texture[loop].width, texture[loop].height, 0, texture[loop].type, GL10.GL_UNSIGNED_BYTE, texture[loop].imageData);\r\n gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_LINEAR);\r\n gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_LINEAR);\r\n \r\n Log.i(\"40\", \"bpp = \" + texture[loop].bpp + \" type = \" + texture[loop].type);\r\n }\r\n }", "public Texture loadTexture(String file, Format format, boolean useMipMap);", "public Texture(String path) {\n load(path);\n }", "abstract public void loadSprite();", "protected void init() {\n splashImg = new Texture(\"splash.png\");\n }", "public abstract void init(ResourceLoader loader);", "public abstract ResourceDataSet loadResources() ;", "public void loadBackground() {\n try {\n File file = new File(\"src/resources/fondo.png\");\n this.background = ImageIO.read(file);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private final void init() {\n\t\tam = new nativeAssetManager();\n\t\tam.addDefaultAssets();\n\t}", "public void loadTexture(String s) {\n\t\tFile file = new File(s);\n\t\ttry {\n\t\t\tbufferimage = ImageIO.read(file);\n\t\t\tint pixels[] = bufferimage.getRGB(0, 0, bufferimage.getWidth(),\n\t\t\t\t\tbufferimage.getHeight(), null, 0, bufferimage.getWidth());\n\t\t\tbuffer = IntBuffer.wrap(pixels);\n\t\t} catch (IOException e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "private void loadAnimations() {\n loadImages(imagesFront, \"F\");\n loadImages(imagesLeft, \"L\");\n loadImages(imagesRight, \"R\");\n loadImages(imagesBack, \"B\");\n }", "private <T> void loadAllFromFolder(String name,Class<T> type){\n\t\tFileHandle dirHandle;\n\t\tif (Gdx.app.getType() == ApplicationType.Desktop) {\n\t\t dirHandle = new FileHandle(\"./bin/\"+name);\n\t\t \n\t\t} else {\n\t\t dirHandle = Gdx.files.internal(name);\n\t\t}\n\t\t \n\t\tfor (FileHandle entry: dirHandle.list()) {\n\t\t assetManager.load(entry.path(),type);\n\t\t}\n\t}", "public void findImages() {\n URL imgURL = ImageLoader.class.getResource(\"/BackgroundMenu.jpg\");\n this.backgroundImages.put(MenuP.TITLE, loadImage(imgURL));\n\n imgURL = ImageLoader.class.getResource(\"/backgroundGame.png\");\n this.backgroundImages.put(ArenaView.TITLE, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/gameOver.jpg\");\n this.backgroundImages.put(GameOverView.TITLE, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/Player.png\");\n this.entityImages.put(ID.PLAYER, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/Enemy1.png\");\n this.entityImages.put(ID.BASIC_ENEMY, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/boss.png\");\n this.entityImages.put(ID.BOSS_ENEMY, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/meteorBrown_big1.png\");\n this.entityImages.put(ID.METEOR, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/BlueBullet.png\");\n this.bulletImages.put(new Pair<>(ID.PLAYER_BULLET, ID.PLAYER), loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/redBullet.png\");\n this.entityImages.put(ID.ENEMY_BULLET, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/powerup_FireBoost.png\");\n this.powerUpImages.put(new Pair<>(ID.POWER_UP, PowerUpT.FIRE_BOOST), loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/powerup_Freeze.png\");\n this.powerUpImages.put(new Pair<>(ID.POWER_UP, PowerUpT.FREEZE), loadImage(imgURL)); \n \n imgURL = ImageLoader.class.getResource(\"/powerup_Health.png\");\n this.powerUpImages.put(new Pair<>(ID.POWER_UP, PowerUpT.HEALTH), loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/powerup_Shield.png\");\n this.powerUpImages.put(new Pair<>(ID.POWER_UP, PowerUpT.SHIELD), loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/bulletSpeedUp.png\");\n this.AnimationsPowerUp.put(new Pair<>(ID.POWER_UP, PowerUpT.FIRE_BOOST), loadEffect(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/Explosion.png\");\n this.AnimationsEffect.put(new Pair<>(ID.EFFECT, SpecialEffectT.EXPLOSION), loadEffect(imgURL));\n\n imgURL = ImageLoader.class.getResource(\"/freeze.png\");\n this.AnimationsPowerUp.put(new Pair<>(ID.POWER_UP, PowerUpT.FREEZE), loadImage(imgURL));\n }", "@Override\r\n public void loadResources() {\n\r\n }", "private void ini_Sprites()\r\n\t{\r\n\t\tLogger.DEBUG(\"ini_Sprites\");\r\n\t\tResourceCache.LoadSprites(false);\r\n\t}", "public void init(){\n\t\n\t\t//background init\n\t\tthis.background = new Sprite(this.scene, \"space-backdrop.png\", 1280 * 5, 800 * 5);\n\t\tthis.background.setBoundAction(\"background\");\n\t\tthis.background.setSpeedScale(0.2);\n\t\tthis.background.setSpeed(0);\n\t\tthis.sprites.add(this.background);\n\t\t\n\t\t//compass init\n\t\tthis.compass = new Sprite(this.scene, \"compass.png\", 100, 100);\n\t\tthis.compass.setSpeed(0);\n\t\tthis.compass.setPosition(this.compass.getWidth() / 2, this.scene.getHeight() - this.compass.getHeight() / 2);\n\t\t\n\t\t//earth init\n\t\tthis.earth = new Planet(this.scene, \"earth.png\", 4800, 4800);\n\t\tthis.earth.setSpeed(0);\n\t\tthis.earth.setPosition(0, 7000);\n\t\tthis.earth.setBoundAction(\"continue\");\n\t\tthis.sprites.add(this.earth);\n\t\t\n\t\t//ship init\n\t\tthis.mainSprite = new Ship(this.scene, \"cannon.png\", 50, 50, this.k);\n\t\tthis.mainSprite.keyListen = true;\n\t\tthis.mainSprite.setSpeed(0);\n\t\tthis.mainSprite.setPosition(this.scene.getWidth() / 2, this.scene.getHeight() / 2);\n\t\t\n\t\t//asteroids init\n\t\tthis.asteroids.add(new Body(this.scene, \"asteroid.png\", 250, 250, this));\n\t\tthis.asteroids.get(0).setBoundAction(\"continue\");\n\t\tthis.asteroids.get(0).setSpeed(0);\n\t\tthis.asteroids.get(0).setPosition(0, 0);\n\t\tthis.sprites.add(this.asteroids.get(0));\n\t\t\n\t\tfor(int i = 1; i < 200; i++){\n\t\t\t\n\t\t\tint size = (int) Math.round(Math.random() * 400 + 50);\n\t\t\tlong x = Math.round(Math.random() * this.background.getWidth() - (this.background.getWidth() / 2));\n\t\t\tlong y = Math.round(Math.random() * this.background.getHeight() - (this.background.getHeight() / 2));\n\t\t\t\n\t\t\twhile(x > 0 && x < this.scene.getWidth()){\n\t\t\t\tx = Math.round(Math.random() * this.background.getWidth() - (this.background.getWidth() / 2));\n\t\t\t}\n\t\t\t\n\t\t\twhile(y > 0 && y < this.scene.getHeight()){\n\t\t\t\ty = Math.round(Math.random() * this.background.getHeight() - (this.background.getHeight() / 2));\n\t\t\t}\n\t\t\t\n\t\t\tthis.asteroids.add(new Body(this.scene, \"asteroid.png\", size, size, this));\n\t\t\tthis.asteroids.get(i).setBoundAction(\"continue\");\n\t\t\tthis.asteroids.get(i).setSpeed(0);\n\t\t\tthis.asteroids.get(i).setPosition(x, y);\n\t\t\t\n\t\t\tthis.sprites.add(this.asteroids.get(i));\n\t\t}\n\t\t\n\t\t\n\t\t//chest init\n\t\tthis.chests.add(new Chest(this.scene, \"chest.png\", 100, 50));\n\t\tthis.chests.get(0).setBoundAction(\"continue\");\n\t\tthis.chests.get(0).setSpeed(0);\n\t\tthis.chests.get(0).setPosition(500, 500);\n\t\tthis.sprites.add(this.chests.get(0));\n\t\t\n\t\tfor(int i = 1; i < this.numChests; i++){\n\t\t\t\n\t\t\tthis.chests.add(new Chest(this.scene, \"chest.png\", 100, 50));\n\t\t\tthis.chests.get(i).setBoundAction(\"continue\");\n\t\t\tthis.chests.get(i).setSpeed(0);\n\t\t\t\n\t\t\tboolean keepGoing = true;\n\t\t\tdo{\n\t\t\t\t\n\t\t\t\tlong x = Math.round(Math.random() * this.background.getWidth() - (this.background.getWidth() / 2));\n\t\t\t\tlong y = Math.round(Math.random() * this.background.getHeight() - (this.background.getHeight() / 2));\n\t\t\t\t\n\t\t\t\twhile(x > 0 && x < this.scene.getWidth()){\n\t\t\t\t\tx = Math.round(Math.random() * this.background.getWidth() - (this.background.getWidth() / 2));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\twhile(y > 0 && y < this.scene.getHeight()){\n\t\t\t\t\ty = Math.round(Math.random() * this.background.getHeight() - (this.background.getHeight() / 2));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.chests.get(i).setPosition(x, y);\n\t\t\t\t\n\t\t\t\t//check for collisions with asteroids\n\t\t\t\tboolean colliding = false;\n\t\t\t\tfor(int j = 0; j < this.asteroids.size() && colliding == false; j++){\n\t\t\t\t\tif(this.asteroids.get(j).collidesWith(this.chests.get(i))){\n\t\t\t\t\t\tcolliding = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tkeepGoing = colliding;\n\t\t\t\t\n\t\t\t}while(keepGoing);\n\t\t\t\n\t\t\tthis.sprites.add(this.chests.get(i));\n\t\t\t\n\t\t}//end for\n\t\n\t\tthis.scene.start();\n\t\t\n\t\tSystem.out.println(\"==== Welcome to Space Smuggler! ====\");\n\t\tSystem.out.println(\"(WASD to move)\");\n\t\tSystem.out.println(\"Follow your compass in the bottom left corner to find treasure.\");\n\t\tSystem.out.println(\"Collect all of the treasure, then follow your compass to Earth!\");\n\t\tSystem.out.println(\"Watch out for the asteroids though, their gravitational pull is strong!\");\n\t\tSystem.out.println(\"Crashing into one will certainly kill you! D:\");\n\t\tSystem.out.println(\"Good Luck!\");\n\t\t\n\t}", "public void addTextureAtlas(Resources res, String asset, int scriptId) {\n TextureAtlas.getDefault().add(res, asset, scriptId);\n }", "@Override\n\tpublic void loadUnits() {\n\t\tsprites.put(\"axeman\", RES.getSprite(\"axeman\"));\n\t\tsprites.put(\"warg\", RES.getSprite(\"warg_right\"));\n\t}", "private void LoadContent() {\n\t\ttry { // Récupération de la police d'écriture\n\t\t\tfont1 = Font.createFont(Font.TRUETYPE_FONT, new File(\"res/polices/Coalition.ttf\"));\n\t\t\tfont2 = Font.createFont(Font.TRUETYPE_FONT, new File(\"res/polices/13_Misa.ttf\"));\n\t\t} catch (final Exception err) {\n\t\t\tSystem.err.println(\"Police(s) d'écriture introuvable(s) !\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "private void loadGameFiles(){\n\t}", "static public int loadTextureFromAsset ( String fileName )\n {\n int[] textureId = new int[1];\n Bitmap bitmap = null;\n InputStream is = null;\n\n try\n {\n is = mContext.getAssets().open ( fileName );\n }\n catch ( IOException ioe )\n {\n is = null;\n }\n\n if ( is == null )\n {\n return 0;\n }\n\n bitmap = BitmapFactory.decodeStream(is);\n\n GLES30.glGenTextures ( 1, textureId, 0 );\n GLES30.glBindTexture(GLES30.GL_TEXTURE_2D, textureId[0]);\n\n GLUtils.texImage2D(GLES30.GL_TEXTURE_2D, 0, bitmap, 0);\n\n GLES30.glTexParameteri(GLES30.GL_TEXTURE_2D, GLES30.GL_TEXTURE_MIN_FILTER, GLES30.GL_LINEAR);\n GLES30.glTexParameteri(GLES30.GL_TEXTURE_2D, GLES30.GL_TEXTURE_MAG_FILTER, GLES30.GL_LINEAR);\n GLES30.glTexParameteri(GLES30.GL_TEXTURE_2D, GLES30.GL_TEXTURE_WRAP_S, GLES30.GL_CLAMP_TO_EDGE);\n GLES30.glTexParameteri(GLES30.GL_TEXTURE_2D, GLES30.GL_TEXTURE_WRAP_T, GLES30.GL_CLAMP_TO_EDGE);\n\n return textureId[0];\n }" ]
[ "0.72061956", "0.7190964", "0.71843344", "0.70289916", "0.6816301", "0.67689884", "0.6765363", "0.6752656", "0.66648906", "0.663926", "0.6603238", "0.6558959", "0.6520581", "0.6468332", "0.6369418", "0.6355963", "0.6347568", "0.63401544", "0.6324985", "0.6277723", "0.6265264", "0.62378216", "0.6222293", "0.62084275", "0.62017393", "0.6179329", "0.6164526", "0.6154595", "0.61465037", "0.6144147", "0.61307704", "0.61164814", "0.6101134", "0.60725445", "0.60661995", "0.60651255", "0.60584456", "0.59947526", "0.59945583", "0.59780186", "0.5958511", "0.5946208", "0.5939959", "0.5929753", "0.5918121", "0.59053946", "0.58356756", "0.58249223", "0.5821475", "0.58202946", "0.5819087", "0.5815324", "0.5812242", "0.58056647", "0.579349", "0.5786274", "0.5771845", "0.57485145", "0.5727401", "0.5718917", "0.57035553", "0.57011676", "0.56913453", "0.568916", "0.56668276", "0.56610394", "0.5654419", "0.5634176", "0.5630141", "0.56283903", "0.5627897", "0.5627269", "0.56268317", "0.5622344", "0.56007177", "0.5590421", "0.5588406", "0.5583982", "0.55831206", "0.55811304", "0.556434", "0.55635214", "0.5555661", "0.5548207", "0.5546515", "0.5539679", "0.5533085", "0.553283", "0.55297816", "0.55194986", "0.5518202", "0.55125004", "0.55099744", "0.5495085", "0.54947495", "0.54884833", "0.5487244", "0.5433563", "0.5412291", "0.5408982" ]
0.80270374
0
/ Here we create the scene First we create the AutoParallelaxBackgound Object which has the feature to move the background then we attach one entity to this object which holds the background image We also create on animated sprite 'banana' which animates in the foreground
@Override public Scene onLoadScene() { mEngine.registerUpdateHandler(new FPSLogger()); Scene scene=new Scene(); AutoParallaxBackground autoParallaxBackground=new AutoParallaxBackground(0, 0, 0, 5); autoParallaxBackground.attachParallaxEntity(new ParallaxEntity(-10.0f, new Sprite(0, 0, mTextureRegion))); scene.setBackground(autoParallaxBackground); //Position of the Sprite in the region AnimatedSprite banana=new AnimatedSprite(200,200,bananaRegion); banana.animate(100); scene.attachChild(banana); return scene; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setUpBackGround() {\n try {\n setBackGround(new Image(new FileInputStream(\"images/backgrounds/battlemap0_background@2x.png\")));\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/battlemap0_foreground_002@2x.png\")));\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 }", "public void init(){\n\t\n\t\t//background init\n\t\tthis.background = new Sprite(this.scene, \"space-backdrop.png\", 1280 * 5, 800 * 5);\n\t\tthis.background.setBoundAction(\"background\");\n\t\tthis.background.setSpeedScale(0.2);\n\t\tthis.background.setSpeed(0);\n\t\tthis.sprites.add(this.background);\n\t\t\n\t\t//compass init\n\t\tthis.compass = new Sprite(this.scene, \"compass.png\", 100, 100);\n\t\tthis.compass.setSpeed(0);\n\t\tthis.compass.setPosition(this.compass.getWidth() / 2, this.scene.getHeight() - this.compass.getHeight() / 2);\n\t\t\n\t\t//earth init\n\t\tthis.earth = new Planet(this.scene, \"earth.png\", 4800, 4800);\n\t\tthis.earth.setSpeed(0);\n\t\tthis.earth.setPosition(0, 7000);\n\t\tthis.earth.setBoundAction(\"continue\");\n\t\tthis.sprites.add(this.earth);\n\t\t\n\t\t//ship init\n\t\tthis.mainSprite = new Ship(this.scene, \"cannon.png\", 50, 50, this.k);\n\t\tthis.mainSprite.keyListen = true;\n\t\tthis.mainSprite.setSpeed(0);\n\t\tthis.mainSprite.setPosition(this.scene.getWidth() / 2, this.scene.getHeight() / 2);\n\t\t\n\t\t//asteroids init\n\t\tthis.asteroids.add(new Body(this.scene, \"asteroid.png\", 250, 250, this));\n\t\tthis.asteroids.get(0).setBoundAction(\"continue\");\n\t\tthis.asteroids.get(0).setSpeed(0);\n\t\tthis.asteroids.get(0).setPosition(0, 0);\n\t\tthis.sprites.add(this.asteroids.get(0));\n\t\t\n\t\tfor(int i = 1; i < 200; i++){\n\t\t\t\n\t\t\tint size = (int) Math.round(Math.random() * 400 + 50);\n\t\t\tlong x = Math.round(Math.random() * this.background.getWidth() - (this.background.getWidth() / 2));\n\t\t\tlong y = Math.round(Math.random() * this.background.getHeight() - (this.background.getHeight() / 2));\n\t\t\t\n\t\t\twhile(x > 0 && x < this.scene.getWidth()){\n\t\t\t\tx = Math.round(Math.random() * this.background.getWidth() - (this.background.getWidth() / 2));\n\t\t\t}\n\t\t\t\n\t\t\twhile(y > 0 && y < this.scene.getHeight()){\n\t\t\t\ty = Math.round(Math.random() * this.background.getHeight() - (this.background.getHeight() / 2));\n\t\t\t}\n\t\t\t\n\t\t\tthis.asteroids.add(new Body(this.scene, \"asteroid.png\", size, size, this));\n\t\t\tthis.asteroids.get(i).setBoundAction(\"continue\");\n\t\t\tthis.asteroids.get(i).setSpeed(0);\n\t\t\tthis.asteroids.get(i).setPosition(x, y);\n\t\t\t\n\t\t\tthis.sprites.add(this.asteroids.get(i));\n\t\t}\n\t\t\n\t\t\n\t\t//chest init\n\t\tthis.chests.add(new Chest(this.scene, \"chest.png\", 100, 50));\n\t\tthis.chests.get(0).setBoundAction(\"continue\");\n\t\tthis.chests.get(0).setSpeed(0);\n\t\tthis.chests.get(0).setPosition(500, 500);\n\t\tthis.sprites.add(this.chests.get(0));\n\t\t\n\t\tfor(int i = 1; i < this.numChests; i++){\n\t\t\t\n\t\t\tthis.chests.add(new Chest(this.scene, \"chest.png\", 100, 50));\n\t\t\tthis.chests.get(i).setBoundAction(\"continue\");\n\t\t\tthis.chests.get(i).setSpeed(0);\n\t\t\t\n\t\t\tboolean keepGoing = true;\n\t\t\tdo{\n\t\t\t\t\n\t\t\t\tlong x = Math.round(Math.random() * this.background.getWidth() - (this.background.getWidth() / 2));\n\t\t\t\tlong y = Math.round(Math.random() * this.background.getHeight() - (this.background.getHeight() / 2));\n\t\t\t\t\n\t\t\t\twhile(x > 0 && x < this.scene.getWidth()){\n\t\t\t\t\tx = Math.round(Math.random() * this.background.getWidth() - (this.background.getWidth() / 2));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\twhile(y > 0 && y < this.scene.getHeight()){\n\t\t\t\t\ty = Math.round(Math.random() * this.background.getHeight() - (this.background.getHeight() / 2));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.chests.get(i).setPosition(x, y);\n\t\t\t\t\n\t\t\t\t//check for collisions with asteroids\n\t\t\t\tboolean colliding = false;\n\t\t\t\tfor(int j = 0; j < this.asteroids.size() && colliding == false; j++){\n\t\t\t\t\tif(this.asteroids.get(j).collidesWith(this.chests.get(i))){\n\t\t\t\t\t\tcolliding = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tkeepGoing = colliding;\n\t\t\t\t\n\t\t\t}while(keepGoing);\n\t\t\t\n\t\t\tthis.sprites.add(this.chests.get(i));\n\t\t\t\n\t\t}//end for\n\t\n\t\tthis.scene.start();\n\t\t\n\t\tSystem.out.println(\"==== Welcome to Space Smuggler! ====\");\n\t\tSystem.out.println(\"(WASD to move)\");\n\t\tSystem.out.println(\"Follow your compass in the bottom left corner to find treasure.\");\n\t\tSystem.out.println(\"Collect all of the treasure, then follow your compass to Earth!\");\n\t\tSystem.out.println(\"Watch out for the asteroids though, their gravitational pull is strong!\");\n\t\tSystem.out.println(\"Crashing into one will certainly kill you! D:\");\n\t\tSystem.out.println(\"Good Luck!\");\n\t\t\n\t}", "@Override\r\n\tpublic void createScene() {\n\t\tthis.setBackground(new Background(255, 255, 255));\r\n\t\tsLogo = new Sprite(BaseActivity.WIDTH / 2, BaseActivity.HEIGHT / 2, logoRegion.getWidth() * 1.23f, logoRegion.getHeight() * 1.23f, logoRegion, engine.getVertexBufferObjectManager());\r\n\t\tthis.attachChild(sLogo);\r\n\t\tSystem.out.println(\"stufff\");\r\n\t\t\r\n\t\tengine.registerUpdateHandler(new TimerHandler(0.2f, new ITimerCallback() \r\n\t {\r\n\t public void onTimePassed(final TimerHandler pTimerHandler) \r\n\t {\r\n\t System.out.println(\"stuff1\");\r\n\t engine.unregisterUpdateHandler(pTimerHandler);\r\n\t PlayScene play = new PlayScene(engine, activity, camera);\r\n\t play.createScene();\r\n\t engine.setScene(play);\r\n\t Resources.getInstance().music.setLooping(true);\r\n\t \t\tResources.getInstance().music.play();\r\n\t play.start();\r\n\t }\r\n\t }));\r\n\t}", "public void createBackground() {\n Sprite bg = this.levelInfo.getBackground();\n this.sprites.addSprite(bg);\n }", "public static void loadBg() {\n bg = new Texture (Gdx.files.internal(\"data/bbb.png\"));\n textureBg =new TextureRegion(bg);\n player = new Texture (Gdx.files.internal(\"data/nave2.png\"));\n texturePlayer =new TextureRegion(player);\n gameOver = new Texture (Gdx.files.internal(\"data/gameOver.png\"));\n textureGameOver =new TextureRegion(gameOver);\n textureGameOver.flip(false, true);\n laser= new Texture (Gdx.files.internal(\"data/disparo_sprite.png\"));\n textureLaser = new TextureRegion(laser);\n obstacle= new Texture (Gdx.files.internal(\"data/square.gif\"));\n textureObstacle = new TextureRegion(obstacle);\n title= new Texture (Gdx.files.internal(\"data/invadpt2.png\"));\n textureTitle = new TextureRegion(title);\n win = new Texture (Gdx.files.internal(\"data/win.png\"));\n textureWin =new TextureRegion(win);\n textureWin.flip(false, true);\n ranking = new Texture (Gdx.files.internal(\"data/ranking.png\"));\n textureRanking =new TextureRegion(ranking);\n textureRanking.flip(false, true);\n ranking1 = new Texture (Gdx.files.internal(\"data/ranking1.png\"));\n textureRanking1 =new TextureRegion(ranking1);\n textureRanking1.flip(false, true);\n ranking2 = new Texture (Gdx.files.internal(\"data/ranking2.png\"));\n textureRanking2 =new TextureRegion(ranking2);\n textureRanking2.flip(false, true);\n superEnemy= new Texture (Gdx.files.internal(\"data/superEnemy.png\"));\n textureSuperEnemy = new TextureRegion(superEnemy);\n textureSuperEnemy.flip(false, true);\n\n text1=new Texture(Gdx.files.internal(\"data/bg.jpg\"));\n text2 = new TextureRegion(text1);\n text= new TextureAtlas();\n text.addRegion(\"text\",text2);\n text.addRegion(\"text\",text1,0,0,20,30);\n loadColorInvaders();\n\n\n }", "private void buildScene() {\n for (int i = 0; i < Layer.LAYERCOUNT.ordinal(); i++) {\n SceneNode layer = new SceneNode();\n sceneLayers[i] = layer;\n\n sceneGraph.attachChild(layer);\n }\n\n // Prepare the tiled background\n Texture texture = textures.getTexture(Textures.DESERT);\n IntRect textureRect = new IntRect(worldBounds);\n texture.setRepeated(true);\n\n // Add the background sprite to the scene\n SpriteNode backgroundSprite = new SpriteNode(texture, textureRect);\n backgroundSprite.setPosition(worldBounds.left, worldBounds.top);\n sceneLayers[Layer.BACKGROUND.ordinal()].attachChild(backgroundSprite);\n\n // Add player's aircraft\n playerAircraft = new Aircraft(Aircraft.Type.EAGLE, textures);\n playerAircraft.setPosition(spawnPosition);\n playerAircraft.setVelocity(40.f, scrollSpeed);\n sceneLayers[Layer.AIR.ordinal()].attachChild(playerAircraft);\n\n // Add two escorting aircrafts, placed relatively to the main plane\n Aircraft leftEscort = new Aircraft(Aircraft.Type.RAPTOR, textures);\n leftEscort.setPosition(-80.f, 50.f);\n playerAircraft.attachChild(leftEscort);\n\n Aircraft rightEscort = new Aircraft(Aircraft.Type.RAPTOR, textures);\n rightEscort.setPosition(80.f, 50.f);\n playerAircraft.attachChild(rightEscort);\n }", "private void initBackGround() {\n Entity walls = Entities.makeScreenBounds(100);\n walls.setType(PinballTypes.WALL);\n walls.addComponent(new CollidableComponent(true));\n getGameWorld().addEntity(walls);\n\n Entities.builder()\n .viewFromTexture(\"piñi.jpg\")\n .buildAndAttach();\n\n// adds bottom part of table, shared with all tables\n// getGameWorld().addEntity(factory.bottomLeft());\n// getGameWorld().addEntity(factory.bottomRight());\n }", "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 }", "public PokeSceneWithBlastoiseCharizard() {\n BackgroundImage blastoise = new BackgroundImage(\"blastoise.png\", 350, 80, 300);\n BackgroundImage charizard = new BackgroundImage(\"charizard.png\", 400, 800, 300);\n\n sceneNodes.getChildren().add(blastoise);\n sceneNodes.getChildren().add(charizard);\n }", "public void act()\r\n {\n \r\n if (Background.enNum == 0)\r\n {\r\n length = Background.length;\r\n width = Background.width;\r\n getWorld().addObject (new YouWon(), length / 2, width / 2);\r\n \r\n //long lastAdded2 = System.currentTimeMillis();\r\n //long curTime3 = System.currentTimeMillis();\r\n //long curTime3 = System.currentTimeMillis();\r\n //long seconds = curTime3 / 1000;\r\n //sleep = 3;\r\n //try {\r\n //TimeUnit.SECONDS.sleep(sleep);\r\n //} catch(InterruptedException ex) {\r\n //Thread.currentThread().interrupt();\r\n //}\r\n //Greenfoot.delay(3);\r\n //long curTime3 = System.currentTimeMillis();\r\n //long secs2 = curTime3 / 1000;\r\n //long curTime4;\r\n //long secs3;\r\n //do\r\n //{\r\n //getWorld().addObject (new YouWon(), length / 2, width / 2);\r\n //curTime4 = System.currentTimeMillis();\r\n //secs3 = curTime3 / 1000;\r\n //} while (curTime4 / 1000 < curTime3 / 1000 + 3);\r\n //if (System.currentTimeMillis()/1000 - 3 >= secs2)\r\n //{\r\n //do\r\n //{\r\n pause(3000);\r\n Actor YouWon;\r\n YouWon = getOneObjectAtOffset(0, 0, YouWon.class);\r\n World world;\r\n world = getWorld();\r\n world.removeObject(this);\r\n Background.xp += 50;\r\n Background.myGold += 100;\r\n if (Background.xp >= 50 && Background.xp < 100){\r\n Background.myLevel = 2;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 100 && Background.xp < 200){\r\n Background.myLevel = 3;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 200 && Background.xp < 400){\r\n Background.myLevel = 4;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 400 && Background.xp < 800){\r\n Background.myLevel = 5;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 800 && Background.xp < 1600){\r\n Background.myLevel = 6;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 1600 && Background.xp < 3200){\r\n Background.myLevel = 7;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 3200 && Background.xp < 6400){\r\n Background.myLevel = 8;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 6400 && Background.xp < 12800){\r\n Background.myLevel = 9;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 12800){\r\n Background.myLevel = 10;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n }\r\n //curTime3 = System.currentTimeMillis();\r\n //secs2 = curTime3 / 1000;\r\n //index2++;\r\n //Greenfoot.setWorld(new YouWon());\r\n //lastAdded2 = curTime3;\r\n //}\r\n //} while (index2 <= 0);\r\n }\r\n }", "@Override\n\tpublic void create() {\n\t\t// TODO: create completely new batches for sprites and models\n\t\tsprites = new SpriteBatch();\n\t\tmodelBatch = new ModelBatch();\n\n\t\t// TODO: create a new environment\n\t\t// set a new color attribute for ambient light in the environment\n\t\t// add a new directional light to the environment\n\n\t\tenvironment = new Environment();\n\t\tenvironment.set(new ColorAttribute(ColorAttribute.AmbientLight, 0.4f, 0.4f, 0.4f, 0.1f));\n\t\tenvironment.add(new DirectionalLight().set(0.8f, 0.8f, 0.8f, -1f, -0.8f, -0.2f));\n\n\t\t// create a new logo texture from the \"data/firstorder.png\" file\n\t\tlogo = new Texture(\"data/firstorder.png\");\n\n\t\t// TODO: create a new perspective camera with a field-of-view of around 70,\n\t\t// and the width and height found in the Gdx.graphics class\n\t\t// set the position of the camera to (100, 100, 100)\n\t\t// set the camera to look at the origin point (0, 0, 0)\n\t\t// set the near and far planes of the camera to 1 and 300\n\t\t// update the camera\n\t\tint width = Gdx.graphics.getWidth();\n\t\tint height = Gdx.graphics.getHeight();\n\t\tcam = new PerspectiveCamera(70f, width, height);\n\t\tcam.position.set(100f,100f,100f);\n\t\tcam.lookAt(0f, 0f, 0f);\n\t\tcam.near = 1f;\n\t\tcam.far = 300f;\n\t\tcam.update();\n\n\t\tbackgroundMusic = Gdx.audio.newMusic(Gdx.files.internal(\"data/StarWarsMusicTheme.mp3\"));\n\t\tbackgroundMusic.setLooping(true);\n\t\tbackgroundMusic.play();\n\n\t\t// create a new model loader\n\t\tfinal ModelLoader modelLoader = new ObjLoader();\n\n\t\t// TODO: load the internal file \"data/stormtrooper.obj\" into the model variable\n\t\tmodel = modelLoader.loadModel(Gdx.files.internal(\"data/stormtrooper_unwrapped.obj\"));\n\n\t\t// TODO: create a new model instance and scale it to 20% it's original size (it's huge...)\n\t\tinstance = new ModelInstance(model); // ← our model instance is here\n\t\tinstance.transform.scale(0.2f, 0.2f, 0.2f);\n\n\t\t// TODO: set the helmet details material to a new diffuse black color attribute\n\n\t\tgetHelmetDetails().material = new Material(ColorAttribute.createDiffuse(Color.BLACK));\n\t\tgetHelmetMoreDetails().material = new Material(ColorAttribute.createDiffuse(Color.DARK_GRAY));\n\t\tgetHelmetBase().material = new Material(ColorAttribute.createDiffuse(Color.WHITE));\n\n\t\t// set the input processor to work with our custom input:\n\t\t// clicking the image in the lower right should change the colors of the helmets\n\t\t// bonus points: implement your own GestureDetector and an input processor based on it\n\t\tGdx.app.log(\"instance node size\", \"\"+String.valueOf(instance.nodes.size));\n\n\n\t\tGdx.input.setInputProcessor(new FirstOrderInputProcessor(cam, new Runnable() {\n\t\t\tprivate Texture camouflage = new Texture(\"data/camouflage.png\");\n\t\t\tprivate Texture paper = new Texture(\"data/paper.png\");\n\t\t\tprivate Texture hive = new Texture(\"data/hive.png\");\n\t\t\tprivate Texture strips = new Texture(\"data/strip.png\");\n\t\t\tprivate Texture grass = new Texture(\"data/grass.jpeg\");\n\t\t\tpublic void run() {\n\t\t\t\t// TODO: change the helmet details material to a new diffuse random color\n\n\t\t\t\tgetHelmetDetails().material = getRandomMaterial();\n\t\t\t\tgetHelmetMoreDetails().material = getRandomMaterial();\n\n\t\t\t\t// bonus points:\n\t\t\t\t// randomly change the material of the helmet base to a texture\n\t\t\t\t// from the files aloha.png and camouflage.png (or add your own!)\n\t\t\t\tgetHelmetBase().material = getRandomMaterial();\n\t\t\t\tsetRandomLight();\n\n\t\t\t}\n\n\t\t\tprivate Material getRandomMaterial() {\n\t\t\t\tint rand = (int) (MathUtils.random() * 100) % 8;\n\t\t\t\tGdx.app.log(\"Random\", \"\" + rand);\n\n\t\t\t\t//Texture aloha = new Texture(\"data/aloha.png\");\n\t\t\t\tMaterial randMaterial = null;\n\n\t\t\t\tswitch (rand) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\trandMaterial = new Material(ColorAttribute.createReflection(Color.WHITE));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\trandMaterial = new Material(TextureAttribute.createDiffuse(paper));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\trandMaterial = new Material(TextureAttribute.createDiffuse(hive));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\trandMaterial = new Material(TextureAttribute.createDiffuse(camouflage));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 5:\n\t\t\t\t\t\trandMaterial = new Material(ColorAttribute.createDiffuse(getRandomColor()));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 6:\n\t\t\t\t\t\trandMaterial = new Material(TextureAttribute.createDiffuse(strips));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 7:\n\t\t\t\t\t\trandMaterial = new Material(TextureAttribute.createDiffuse(grass));\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\treturn randMaterial;\n\t\t\t}\n\t\t}));\n\t}", "public Stage1()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1200, 900, 1);\n \n GreenfootImage image = getBackground();\n image.setColor(Color.BLACK);\n image.fill();\n star();\n \n \n \n //TurretBase turretBase = new TurretBase();\n playerShip = new PlayerShip();\n scoreDisplay = new ScoreDisplay();\n addObject(scoreDisplay, 100, 50);\n addObject(playerShip, 100, 450);\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}", "@Override\n\tpublic void create () {\n\t\t//IntrigueGraphicalDebugger.enable();\n\t\tIntrigueGraphicSys = new IntrigueGraphicSystem();\n\t\tIntrigueTotalPhysicsSys = new IntrigueTotalPhysicsSystem();\n\t\t\n\t\tfinal int team1 = 1;\n\t\tfinal int team2 = 2;\n\t\t\n\t\tstage = new Stage();\n\t\ttable = new Table();\n\t\ttable.bottom();\n\t\ttable.left();\n\t\ttable.setFillParent(true);\n\t\t\n\t\tLabelStyle textStyle;\n\t\tBitmapFont font = new BitmapFont();\n\t\t\n\n\t\ttextStyle = new LabelStyle();\n\t\ttextStyle.font = font;\n\n\t\ttext = new Label(\"Intrigue\",textStyle);\n\t\tLabel text2 = new Label(\"@author: Matt\", textStyle);\n\t\tLabel text3 = new Label(\"OPERATION 1\", textStyle);\n\t\t\n\t\ttext.setFontScale(1f,1f);\n\t\ttable.add(text);\n\t\ttable.row();\n\t\ttable.add(text2);\n\t\ttable.row();\n\t\ttable.add(text3);\n\t\tstage.addActor(table);\n\n\t\ttable.setDebug(true);\n\t\tString path_to_char = \"3Dmodels/Soldier/ArmyPilot/ArmyPilot.g3dj\";\n //String path_to_road = \"3Dmodels/Road/roadV2.g3db\";\n\t\t//String path_to_rink = \"3Dmodels/Rink/Rink2.g3dj\";\n\t\tString path_to_snow_terrain = \"3Dmodels/Snow Terrain/st5.g3dj\";\n\t\tString path_to_crosshair = \"2Dart/Crosshairs/rifle_cross.png\";\n\t\n\t\tMatrix4 trans = new Matrix4();\n\t\tMatrix4 iceTrans = new Matrix4();\n\t\tMatrix4 iceTrans2 = new Matrix4();\n\t\tMatrix4 iceTrans3 = new Matrix4();\n\t\tMatrix4 iceTrans4 = new Matrix4();\n\t\tMatrix4 trans2 = new Matrix4();\n\t\tMatrix4 trans3 = new Matrix4();\n\t\n\t\ttrans.translate(-3000,6000,-500);\n\t\t//Vector3 halfExtents = new Vector3(30f,90f,25f);\n\t\tbtCapsuleShape person_shape = new btCapsuleShape(30f, 90f);\n\t\t\n\t\tmamaDukes.add(new Entity.Builder(player_guid)\n\t\t\t\t\t.IntrigueModelComponent(path_to_char).IntrigueControllerComponent(1)\n\t\t\t\t\t.IntriguePhysicalComponent(person_shape, 200f, trans)\n\t\t\t\t\t.MotionComponent()\n\t\t\t\t\t.AimingComponent()\n\t\t\t\t\t.DecalComponent()\n\t\t\t\t\t.ThirdPersonCameraComponent()\n .CharacterActionsComponent()\n\t\t\t\t\t.AnimationComponent()\n\t\t\t\t\t.Fireable(path_to_crosshair)\n\t\t\t\t\t.TargetingAI(team1)\n\t\t\t\t\t//.CharacterSoundComponent(\"SoundEffects/Character/walking/step-spur.mp3\", \"SoundEffects/guns/M4A1.mp3\")\n\t\t\t\t\t.Build());\n\t\tJson json_test = new Json(); \n\t\tEntity d = mamaDukes.get(player_guid);\n\t\t//System.out.println(json_test.prettyPrint(d));\n\t\t\n\t\t\n\t\tmamaDukes.get(player_guid).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody().getRigidBody()\n\t\t\t\t\t.setActivationState(Collision.DISABLE_DEACTIVATION);\n\n\t\tmamaDukes.add(level_factory.createLevel(path_to_snow_terrain,\n\t\t\t\t\"3DParticles/blizzard.pfx\", iceTrans, Entity.class));\n\t\t\t\t/*\n\t\t\t\tnew DrifterObject.DrifterObjectBuilder(1)\n\t\t\t\t\t.BaseObject(new Gobject.Builder(1)\n\t\t\t\t\t.IntrigueModelComponent(path_to_snow_terrain)\n\t\t\t\t\t.IntriguePhysicalComponent(iceMass, iceTrans)\n\t\t\t\t\t.ParticleComponent(\"Blizzard\",\n\t\t\t\t\t\t\t\"3DParticles/blizzard.pfx\",new Vector3(1000,1000, -2500), \n\t\t\t\t\t\t\tnew Vector3(3000, 1000,2000 ))\n\t\t\t\t\t.Build())\n\t\t\t\t\t.Build());*/\n\t\ttrans2.translate(-1000,1000,1500);\n\t\t\n\t\tmamaDukes.add(new Entity.Builder(2)\n\t\t\t\t\t.IntrigueModelComponent(path_to_char)\n\t\t\t\t\t.IntriguePhysicalComponent(person_shape, 200f, trans2)\n\t\t\t\t\t.ParticleComponent(\"Blood\", \"3DParticles/Character/Blood.pfx\", \n\t\t\t\t\t\t\tnew Vector3(), new Vector3(1f,1f,1f))\n\t\t\t\t\t.MotionComponent()\n\t\t\t\t\t.AimingComponent()\n\t\t\t\t\t.CharacterActionsComponent()\n\t\t\t\t\t.AnimationComponent()\n\t\t\t\t\t.Fireable()\n\t\t\t\t\t.ShootingSoldierAI()\n\t\t\t\t\t.TargetingAI(team2)\n\t\t\t\t\t.Build());\n\t\t\n\t\tmamaDukes.get(2).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody()\n\t\t\t\t\t.getRigidBody()\n\t\t\t\t\t.setAngularFactor(new Vector3(0,0,0));\n\t\tmamaDukes.get(2).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody()\n\t\t\t\t\t.getRigidBody()\n\t\t\t\t\t.setActivationState(Collision.DISABLE_DEACTIVATION);\n\t\t\n\t\tmamaDukes.get(2).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody().getRigidBody()\n\t\t\t\t\t.setUserIndex(2);\n\t\t\n\t\ttrans3.translate(-1000, 1000, 2000);\n\t\t\n\t\tmamaDukes.add(new Entity.Builder(3)\n\t\t\t\t\t.IntrigueModelComponent(path_to_char)\n\t\t\t\t\t.IntriguePhysicalComponent(person_shape, 200f, trans3)\n\t\t\t\t\t.MotionComponent()\n\t\t\t\t\t.AimingComponent()\n\t\t\t\t\t.CharacterActionsComponent()\n\t\t\t\t\t.AnimationComponent().Fireable()\n\t\t\t\t\t.ShootingSoldierAI().TargetingAI(team2)\n\t\t\t\t\t.Build());\n\t\t\n\t\tmamaDukes.get(3).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody().getRigidBody()\n\t\t\t\t\t.setAngularFactor(new Vector3(0,0,0));\n\t\tmamaDukes.get(3).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody().getRigidBody()\n\t\t\t\t\t.setActivationState(Collision.DISABLE_DEACTIVATION);\n\t\tmamaDukes.get(3).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody().getRigidBody().setUserIndex(3);\n\t\t\n\t\tVector3 rpos = new Vector3();\n\t\t\n\t\tmamaDukes.get(1).getModelComponent().getModel()\n\t\t\t\t\t.transform.getTranslation(rpos);\n\t\t\n\t\ticeTrans2.translate(0, 0, 6185.332f);\n\t\t\n\t\tmamaDukes.add(level_factory.createLevel(path_to_snow_terrain,\n\t\t\t\t\"SoundEffects/stages/snow stage/wind1.mp3\",\n\t\t\t\t\"3DParticles/blizzard.pfx\", iceTrans2, Entity.class));\n\t\t\n\t\t\t\t\t/*new DrifterObject.DrifterObjectBuilder(4)\n\t\t\t\t\t.BaseObject(new Gobject.Builder(4)\n\t\t\t\t\t.IntrigueModelComponent(path_to_snow_terrain)\n\t\t\t\t\t.IntriguePhysicalComponent(iceMass, iceTrans2)\n\t\t\t\t\t.IntrigueLevelComponent(\"SoundEffects/stages/snow stage/wind1.mp3\")\n\t\t\t\t\t.Build())\n\t\t\t\t\t.ParticleComponent(\"Blizzard\",\"3DParticles/blizzard.pfx\",\n\t\t\t\t\t\t\tnew Vector3(0, 0, 6185.332f),\n\t\t\t\t\t\t\tnew Vector3(3000, 1000,2000 ))\n\t\t\t\t\t.Build());*/\n\t\t\n\t\tmamaDukes.get(4).getModelComponent().getModel().transform.translate(new Vector3(0, 0, 6185.332f)); //btStaticMeshShapes do not update their motionStates. The model Translation must be set manually in these cases.\n\t\ticeTrans3.translate(-6149.6568f, 0, 6185.332f);\n\t\t\n\t\tmamaDukes.add(level_factory.createLevel(path_to_snow_terrain,\n\t\t\t\t\"3DParticles/blizzard.pfx\" , iceTrans3, Entity.class));\n\t\t/**\n\t\t * btStaticMeshShapes do not update their motionStates. The model Translation must be set manually in these cases.\n\t\t */\n\t\tmamaDukes.get(5).getModelComponent().getModel().transform.translate(new Vector3(-6149.6568f, 0, 6185.332f)); \n\t\t\n\t\ticeTrans4.translate(-6149.6568f, 0, 0);\n\t\tmamaDukes.add(level_factory.createLevel(path_to_snow_terrain,\n\t\t\t\t\"3DParticles/blizzard.pfx\" , iceTrans4, Entity.class));\n\t\t\t\t\t/**new DrifterObject.DrifterObjectBuilder(6)\n\t\t\t\t\t.BaseObject(new Gobject.Builder(6)\n\t\t\t\t\t.IntrigueModelComponent(path_to_snow_terrain)\n\t\t\t\t\t.IntriguePhysicalComponent(iceMass, iceTrans4)\n\t\t\t\t\t.ParticleComponent(\"Blizzard\",\"3DParticles/blizzard.pfx\",\n\t\t\t\t\t\t\tnew Vector3(-6149.6568f, 0, 0), new Vector3(3000, 1000,2000 ))\n\t\t\t\t\t.Build())\n\t\t\t\t\t.Build());*/\n\t\tmamaDukes.get(6).getModelComponent().getModel().transform.translate(new Vector3(-6149.6568f, 0, 0)); \n\t\t\n\t}", "public void 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 }", "public Game()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1, false); \n Greenfoot.start(); //Autostart the game\n Greenfoot.setSpeed(50); // Set the speed to 30%\n setBackground(bgImage);// Set the background image\n \n //Create instance\n \n Airplane gameplayer = new Airplane ();\n addObject (gameplayer, 100, getHeight()/2);\n \n }", "@Override\n\tpublic void create () {\n\t\tmBatch = new SpriteBatch();\n mFont = new BitmapFont();\n\t\tmCamera = new OrthographicCamera();\n\t\tmCamera.setToOrtho(false, 800, 480); // Regardless of resolution, project screen onto 800 x 480 orthographic matrix\n\n\t\tmGameBackgrounds = new Texture[6]; // Six frames describing six states of damage to the castle, from pristine to broken\n\t\tmGameBackgrounds[0] = new Texture(\"castle_v1.png\");\n\t\tmGameBackgrounds[1] = new Texture(\"castle_v1_dam1.png\");\n\t\tmGameBackgrounds[2] = new Texture(\"castle_v1_dam2.png\");\n\t\tmGameBackgrounds[3] = new Texture(\"castle_v1_dam3.png\");\n\t\tmGameBackgrounds[4] = new Texture(\"castle_v1_dam4.png\");\n\t\tmGameBackgrounds[5] = new Texture(\"castle_v1_dam5.png\");\n\n\t\t// Assign value to list so it may be given objects to store\n\t\tmAttackers = new Attacker[ATTACKER_ARRAY_SIZE];\n\t\tmButtons = new DefenderButtons[7];\n\t\tmButtons[0] = new DefenderButtons(DefenderButtons.TYPE_NEW_GAME);\n\t\tmButtons[1] = new DefenderButtons(DefenderButtons.TYPE_RESUME_SAVED_GAME);\n\t\tmButtons[2] = new DefenderButtons(DefenderButtons.TYPE_PAUSE_GAME);\n\t\tmButtons[3] = new DefenderButtons(DefenderButtons.TYPE_RESUME_PAUSED_GAME);\n\t\tmButtons[4] = new DefenderButtons(DefenderButtons.TYPE_REPAIR_CASTLE);\n\t\tmButtons[5] = new DefenderButtons(DefenderButtons.TYPE_CONTINUE_NEXT_ROUND);\n\t\tmButtons[6] = new DefenderButtons(DefenderButtons.TYPE_SAVE_GAME);\n\n\t\tmButtons[0].setTexture(new Texture(\"button1.png\"));\n\t\tmButtons[1].setTexture(new Texture(\"button1.png\"));\n\t\tmButtons[2].setTexture(new Texture(\"button2.png\"));\n\t\tmButtons[3].setTexture(new Texture(\"button2.png\"));\n\t\tmButtons[4].setTexture(new Texture(\"button3.png\"));\n\t\tmButtons[5].setTexture(new Texture(\"button3.png\"));\n\t\tmButtons[6].setTexture(new Texture(\"button3.png\"));\n\n\t\t// Create the object that tracks the touch coordinates\n\t\tmLastTouch = new Vector3();\n\n // Assign value to miscellaneous game variables\n mRoundTimeElapsed = 0;\n mRoundMaxTime = 25f; // Counted in SECONDS\n\t\tmCastleMaxHealth = 1000f;\n mCastleHealth = mCastleMaxHealth; // Will last 1,000 frames if attacked by one single standard attacker constantly\n\t\tmCastleDamageStage = 0;\n mRoundScore = 0f;\n mTotalScore = 0f;\n mRoundNumber = 1;\n\t\tmGameState = STATE_PRE_GAME;\n\t\tmAttackerDelay = 0;\n mRoundMaxAttackers = 5;\n\t\tmRepairCost = 1000f;\n\t\tmLivingAttackerCount = 0;\n\t\tmKnightSpawnChance = 0.35f; // 35% chance to spawn a knight instead of normal under regular circumstances\n mPaused = false;\n\t\tmRoundSaved = false;\n mHealthText = \"Castle Strength: \" + mCastleHealth;\n mRoundScoreText = \"This Round Score: \" + mRoundScore;\n\t\tmTotalScoreText = \"Total Game Score: \" + mTotalScore;\n\t\tmGameTitle = \"Castle Defender\";\n\t\tmGameSavedText = \"Game Saved!\";\n\t\tmRoundText = \"Round :\" + mRoundNumber;\n\t\tmRandom = new Random();\n\t\t//TEMPORARY! Will change the logic later\n mSpawnTime = 100;\n\t\tmMonsterHouseSpawn = 10;\n\n\t\t// Pull out the normal attacker's frames through temporary objects\n\t\tTexture walkTexture = new Texture(\"attackerSheet.png\");\n\t\tTextureRegion[][] walkTempArray = TextureRegion.split(walkTexture, 64, 64);\n\t\tTextureRegion[] walkFrames = new TextureRegion[16];\n\n\t\tint index = 0; // Cut the animation's frames up using this temporary jagged array (8 by 2 matches the image file rows / cols)\n\t\tfor (int i = 0; i < 2; i++) {\n\t\t\tfor (int j = 0; j < 8; j++) {\n\t\t\t\twalkFrames[index++] = walkTempArray[i][j];\n\t\t\t}\n\t\t}\n\n\t\tmStandardAttackerWalk = new Animation(0.055f, walkFrames);\n\n\t\t// Do the same process for the knight animations\n\t\tTexture knightWalk = new Texture(\"knight_sheet_walk.png\");\n\t\tTexture knightAttack = new Texture(\"knight_sheet_attack.png\");\n\n\t\tTextureRegion[][] knightWalkTemp = TextureRegion.split(knightWalk, 64, 128);\n\t\tTextureRegion[][] knightAtkTemp = TextureRegion.split(knightAttack, 64, 128);\n\n\t\tTextureRegion[] knightWalkFrames = new TextureRegion[8];\n\t\tTextureRegion[] knightAtkFrames = new TextureRegion[4];\n\n\t\tindex = 0;\n\t\tfor(int i = 0; i < 2; i++) {\n\t\t\tfor(int j = 0; j < 4; j++) {\n\t\t\t\tknightWalkFrames[index++] = knightWalkTemp[i][j];\n\t\t\t}\n\t\t}\n\n\t\tindex = 0;\n\t\tfor(int i = 0; i < 4; i++) {\n\t\t\tknightAtkFrames[index++] = knightAtkTemp[0][i];\n\t\t}\n\n\t\tmKnightAttackerAttack = new Animation(0.25f, knightAtkFrames);\n\t\tmKnightAttackerWalk = new Animation(0.125f, knightWalkFrames);\n\n\t\t// Populate the mAttackers array with 50 total attackers, 25 of each\n\t\tfor(int i = 0; i < ATTACKER_ARRAY_SIZE; i++){\n\t\t\t// Grab a walk speed between constant minimum and maximum\n\t\t\tfloat walkSpeed = mRandom.nextFloat() * MAX_SPEED_VARIANCE;\n\t\t\twalkSpeed += MIN_SPEED; // Ensures the speed is AT LEAST 60 \"units\"\n\t\t\t// Spawn at a random y coordinate starting at MIN_SPAWN_Y, varying by MAX_SPAWN_Y_VARIANCE\n\t\t\tfloat spawnY = mRandom.nextFloat() * MAX_SPAWN_Y_VARIANCE;\n\t\t\tspawnY += MIN_SPAWN_Y;\n\n\t\t\tif(i < ATTACKER_HALF_SIZE) {\n\t\t\t\t// The first half of the array are normal attackers\n\t\t\t\tmAttackers[i] = new Attacker(1f, walkSpeed, -100f, spawnY, 64f, 64f, \"normal\");\n\t\t\t\tmAttackers[i].addAnimation(mStandardAttackerWalk, \"walk\");\n\t\t\t} else {\n\t\t\t\t// The second half of the array are \"knight\" attackers\n\t\t\t\tmAttackers[i] = new Attacker(2f, walkSpeed * 0.75f, -100f, spawnY, 64f, 128f, \"knight\");\n\t\t\t\tmAttackers[i].addAnimation(mKnightAttackerWalk, \"walk\");\n\t\t\t\tmAttackers[i].addAnimation(mKnightAttackerAttack, \"attack\");\n\t\t\t}\n\t\t}\n\t}", "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 }", "@Override\n\tpublic void show() {\n\t backgroundImage = new Texture(Gdx.files.internal(\"resources/images/menu.png\"));\n\t soccerImage = new Texture(Gdx.files.internal(\"resources/images/ball.gif\"));\n\t boomerangImage = new Texture(Gdx.files.internal(\"resources/images/boomerang.gif\"));\n\t wolfImage = new Texture(Gdx.files.internal(\"resources/images/wolf.gif\"));\n\t boyImage = new Texture(Gdx.files.internal(\"resources/images/bueno2.png\"));\n\t boyImageInv = new Texture(Gdx.files.internal(\"resources/images/bueno2Inv.png\"));\n\t grassImage = new Texture(Gdx.files.internal(\"resources/images/piso.png\"));\n\t \n\n\t // load the drop sound effect and the rain background \"music\"\n\t dropSound = Gdx.audio.newSound(Gdx.files.internal(\"resources/drop.wav\"));\n\t rainMusic = Gdx.audio.newMusic(Gdx.files.internal(\"resources/rain.mp3\"));\n\n\t // start the playback of the background music immediately\n\t rainMusic.setLooping(true);\n\t //rainMusic.play();\n\n\t // create the camera and the SpriteBatch\n\t camera = new OrthographicCamera();\n\t camera.setToOrtho(false, 800, 480);\n\t batch = new SpriteBatch();\n\n\t // create a Rectangle to logically represent the boy\n\t boy = new Rectangle();\n\t boy.x = 130; //800 / 2 - 50 / 2; // center the boy horizontally\n\t boy.y = 235; // just above the ground\n\t boy.width = 50;\n\t boy.height = 74;\n\t \n\t //boy2\n\t boy2 = new Rectangle();\n\t boy2.x = 130;\n\t boy2.y = 160; \n\t boy2.width = 50;\n\t boy2.height = 74;\n\t \n\t //create a grass Rectangle to represent the grass\n\t grass = new Rectangle();\n\t grass.x = 0;\n\t grass.y = camera.viewportHeight/2-30;\n\t \n\t grass2 = new Rectangle();\n\t grass2.x = camera.viewportWidth;\n\t grass2.y = camera.viewportHeight/2-30;\n\t \n\t velocidad = 8;\n\t counterGravity = 0.0;\n\t \n\t countObjs = 1;\n\t //stateTime = 0;\n\n\t // create the soccerballs array and spawn the first soccer ball\n\t soccerballs = new Array<Rectangle>();\n\n\t //create the boomerans array and spawn the first boomerang\n\t boomerangs = new Array<Rectangle>();\n\t \n\n\t spawnBoomerangs();\n\t spawnSoccerBall();\n\t\t\n\t}", "public gameScene_Model(Stage primaryStage){\n this.primaryStage = primaryStage;\n background = new MyStage();\n this.scene = new Scene(background,600,800);\n animal = new Animal(\"file:src/FroggerApp/Images_File/froggerUp.png\");\n }", "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 }", "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}", "@Override\n\tpublic void init() {\n\t\tEffect().registerEffect(40, 40, 3, \"ExplosionSheet.png\");\n\t\tbg = new Background();\n\t\tobj = new TestObj();\n\t\tobj.init();\n\t\ttest = new Test2[50];\n\t\tfor(int x = 0; x < test.length; x++ )\n\t\t\ttest[x] = new Test2(x*30-600,30 *(float)Math.pow(-1, x), \"g.png\");\n\t\t\n\t\ttest2 = new Test2[50000];\n\t\tfor(int x = 0; x < test2.length; x++ )\n\t\t\ttest2[x] = new Test2(x*30-600,150+30 *(float)Math.pow(-1, x), \"AlienPawn.png\");\n\t\t\n\t\ttest3 = new Test2[50000];\n\t\tfor(int x = 0; x < test3.length; x++ )\n\t\t\ttest3[x] = new Test2(x*30-600,-200+30 *(float)Math.pow(-1, x), \"AlienPawn - Copy.png\");\n\t\n\t}", "public void OnStart(){\n\t\t//create the random space background and put its priority behind everything else\n\t\tswitch ((int) (Math.random() * 3)){\n\t\t\tcase 0:\n\t\t\t\tbackground = new Background(R.drawable.spaceback_med,new Point(0,0),-1);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tbackground = new Background(R.drawable.spaceback_asteroids,new Point(0,0),-1);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tbackground = new Background(R.drawable.spaceback_nebula,new Point(0,0),-1);\n\t\t\t\tbreak;\n\t\t}\n\t\t//generate asteroids\n\t\tinitAsteroids((int)(Math.random()*3));\n\t\t//create a border for the background (draw on top)\n\t\tnew Border(background,1000);\n\t\t//create the player\n\t\tplayer = new Player(new Point(-300,300), 1);\n\t\t//create a target reticule for the player\n\t\ttarget = new Target(player);\n\t\t\n\t\t//load sounds\n\t\tGameState.State().LoadSound(R.raw.shoot, \"shoot\");\n\t\tGameState.State().LoadSound(R.raw.accelerate, \"accelerate\");\n\t\tGameState.State().LoadSound(R.raw.engine, \"engine\");\n\t\tGameState.State().LoadSound(R.raw.explosion, \"explosion\");\n\t\tGameState.State().LoadSound(R.raw.death, \"death\");\n\t\t\n\t\thasStarted = true;\n\t\t\n\t\trespawnCount = 0.0f;\n\t\trespawnTime = 4f;\n\t}", "@Override\n\tpublic void create () {\n\t\tgempiresAssetHandler = new GempiresAssetHandler(this);\n\t\tbatch = new SpriteBatch();\n\t\tcastle = new CastleScreen(this);\n\t\tsetScreen(new MainMenuScreen(this));\n\t}", "@Override\n\tpublic void createScene() {\n\t\t\n\t\tSprite backGround = new Sprite(0, 0, rm.setting_background_region, rm.vbo);\n\t\t\n\t\tv_on = new Sprite(400,100,rm.on_region,rm.vbo){\n\t\t\t@Override\n\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\t\t\n\t\t\t\tif(pSceneTouchEvent.isActionDown()){\n\t\t\t\t\t\n\t\t\t\t\tisVoice = true;\n\t\t\t\t\t\n\t\t\t\t\tv_on.setColor(0, 0, 1);\n\t\t\t\t\tv_off.setColor(1,0,0);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t return false;\n\t\t\t}};\n\t\tv_off = new Sprite(500,100,rm.off_region,rm.vbo){\n\t\t\t\t@Override\n\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\t\t\t\n\t\t\t\t\tif(pSceneTouchEvent.isActionDown()){\n\t\t\t\t\t\t\n\t\t\t\t\t\tisVoice = false;\n\t\t\t\t\t\t\n\t\t\t\t\t\tv_off.setColor(0, 0, 1);\n\t\t\t\t\t\tv_on.setColor(1,0,0);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\t return false;\n\t\t }};\n\t\ts_on = new Sprite(400,170,rm.on_region,rm.vbo){\n\t\t\t\t@Override\n\t\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\t\t\t\n\t\t\t\t\tif(pSceneTouchEvent.isActionDown()){\n\t\t\t\t\t\t\n\t\t\t\t\t\tisSound = true;\n\t\t\t\t\t\t\n\t\t\t\t\t\ts_on.setColor(0, 0, 1);\n\t\t\t\t\t\ts_off.setColor(1,0,0);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\t return false;\n\t\t\t\t}};\n\t\ts_off = new Sprite(500,170,rm.off_region,rm.vbo){\n\t\t\t\t\t@Override\n\t\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(pSceneTouchEvent.isActionDown()){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tisSound = false;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ts_off.setColor(0, 0, 1);\n\t\t\t\t\t\t\ts_on.setColor(1,0,0);\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t return false;\n\t\t\t }};\n\t\t \n\t\t\n\t\t \n\t\tauto_on = new Sprite(400,240,rm.on_region,rm.vbo){\n\t\t\t\t@Override\n\t\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\t\t\t\n\t\t\t\t\tif(pSceneTouchEvent.isActionDown()){\n\t\t\t\t\t\t\n\t\t\t\t\t\tisAutofight = true;\n\t\t\t\t\t\t\n\t\t\t\t\t\tauto_on.setColor(0, 0, 1);\n\t\t\t\t\t\tauto_off.setColor(1,0,0);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\t return false;\n\t\t\t\t}};\n\t\tauto_off = new Sprite(500,240,rm.off_region,rm.vbo){\n\t\t\t\t\t@Override\n\t\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(pSceneTouchEvent.isActionDown()){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tisAutofight = false;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tauto_off.setColor(0, 0, 1);\n\t\t\t\t\t\t\tauto_on.setColor(1,0,0);\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t return false;\n\t\t\t }};\n\t\t\t p_on = new Sprite(400,310,rm.on_region,rm.vbo){\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(pSceneTouchEvent.isActionDown()){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tisParticle = true;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tp_on.setColor(0, 0, 1);\n\t\t\t\t\t\t\tp_off.setColor(1,0,0);\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t return false;\n\t\t\t\t\t}};\n\t\t\tp_off = new Sprite(500,310,rm.off_region,rm.vbo){\n\t\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(pSceneTouchEvent.isActionDown()){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tisParticle = false;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tp_off.setColor(0, 0, 1);\n\t\t\t\t\t\t\t\tp_on.setColor(1,0,0);\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t return false;\n\t\t\t\t }};\n\t\t\t\t \n\t\t\t\t skill_on = new Sprite(400,380,rm.on_region,rm.vbo){\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(pSceneTouchEvent.isActionDown()){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tshowSkillEffect = true;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tskill_on.setColor(0, 0, 1);\n\t\t\t\t\t\t\t\tskill_off.setColor(1,0,0);\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t return false;\n\t\t\t\t\t\t}};\n\t\t\t\tskill_off = new Sprite(500,380,rm.off_region,rm.vbo){\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(pSceneTouchEvent.isActionDown()){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tshowSkillEffect = false;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tskill_off.setColor(0, 0, 1);\n\t\t\t\t\t\t\t\t\tskill_on.setColor(1,0,0);\n\t\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t return false;\n\t\t\t\t\t }};\n\t\t\t \n\t\t\t Sprite back = new Sprite(690,365,rm.options_back_region,rm.vbo){\n\t\t\t\t\t@Override\n\t\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(pSceneTouchEvent.isActionDown()){\n\t\t\t\t\t\t\tonBackKeyPressed();\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t return false;\n\t\t\t }};\n\t\t\t reset();\n\t\t \n\t \n\t\t \n\t attachChild(backGround);\n\t attachChild(v_off);\n\t attachChild(v_on);\n\t attachChild(s_off);\n\t attachChild(s_on);\n\t attachChild(auto_off);\n\t attachChild(auto_on);\n\t attachChild(p_off);\n\t attachChild(p_on);\n\t attachChild(skill_off);\n\t attachChild(skill_on);\n attachChild(back);\n\t\t\t\n\t registerTouchArea(v_off);\n registerTouchArea(v_on);\n registerTouchArea(s_off);\n registerTouchArea(s_on);\n registerTouchArea(auto_off);\n registerTouchArea(auto_on);\n registerTouchArea(p_off);\n registerTouchArea(p_on);\n registerTouchArea(skill_off);\n registerTouchArea(skill_on);\n \n\t registerTouchArea(back);\n\t \n\t\t\n\t}", "public void buildInitialScene() {\n\t\t\n\t\t//Creation image background\n\t\tfinal String BACKGROUND_PATH = \"src/assets/img/temp_background.png\";\n\t\tthis.background = new GameImage(BACKGROUND_PATH);\n\n\t\t//Creation image Game Over\n\t\tfinal String GAME_OVER_PATH = \"src/assets/img/erro.png\";\n\t\tthis.errorScene = new Sprite(GAME_OVER_PATH);\n\n\t\t//Game over sprite center position\n\t\tthis.errorScene.x = spos.calculatePosition(WindowConstants.WIDTH, 2, this.errorScene, 2);\n\t\tthis.errorScene.y = spos.calculatePosition(WindowConstants.HEIGHT, 2, this.errorScene, 2);\n\t}", "@Override\r\n\tpublic void create() {\n\t\tbatch = new SpriteBatch();\r\n\t\tcamera = new OrthographicCamera();\r\n\t\tassets = new AssetManager();\r\n\t\t\r\n\t\tcamera.setToOrtho(false,WIDTH,HEIGHT);\r\n\t\t\r\n\t\tTexture.setAssetManager(assets);\r\n\t\tTexture.setEnforcePotImages(false);\r\n\t\t\r\n\t\tsetScreen(new SplashScreen(this));\r\n\t}", "public Background(GameLevel w, int width, int height) {\n super(w, 800, 800);\n this.world = w;\n //this.gameLevel = gameLevel;\n try {\n //All images being read from their respective image files and being assigned to variables.\n bg = ImageIO.read(new File(\"data/bg.png\"));\n bg2 = ImageIO.read(new File(\"data/bg2.png\"));\n bg3 = ImageIO.read(new File(\"data/bg3.png\"));\n fg = ImageIO.read(new File(\"data/clouds.png\"));\n win = ImageIO.read(new File(\"data/win.jpg\"));\n dead = ImageIO.read(new File(\"data/dead.jpg\"));\n scoreBoard = ImageIO.read(new File(\"data/scoreBoard.png\"));\n bulletBillSelect = ImageIO.read(new File(\"data/GUI/billSelect.png\"));\n bulletSelect = ImageIO.read(new File(\"data/GUI/bulletSelect.png\"));\n arrow = ImageIO.read(new File(\"data/GUI/arrow.png\"));\n health = ImageIO.read(new File(\"data/GUI/health.png\"));\n black = ImageIO.read(new File(\"data/GUI/black.jpg\"));\n\n\n } catch (IOException ex) {\n System.out.println(\"System Error\");\n }\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 drawLevelBg( SpriteBatch batch, JARCamera camera )\n {\n //draw bg image\n if ( JARSettings.scrollBgImageParallax )\n {\n int imgWidth = (int)JARImage.GAME_BG_HILL.getWidth();\n int imgHeight = (int)JARImage.GAME_BG_HILL.getHeight();\n LibDrawing.drawImage\n (\n batch,\n JARImage.GAME_BG_HILL.getTextureRegion(),\n 0 - ( imgWidth - JARScreen.width() ) * camera.x / ( iLevelBoundX - JARScreen.width() ),\n 0 - ( imgHeight - JARScreen.height() ) * camera.y / ( iLevelBoundY - JARScreen.height() ),\n LibAnchor.LEFT_TOP\n );\n }\n else\n {\n //draw image static on center bottom of the canvas\n LibDrawing.drawImage( batch, JARImage.GAME_BG_HILL.getTextureRegion(), JARScreen.width() / 2, JARScreen.height(), LibAnchor.CENTER_BOTTOM );\n }\n\n //blend the image to make the fg more visible\n //Drawing.fillCanvas( \"rgba( 255, 255, 255, \" + Settings.BG_BLENDING + \" )\" );\n\n //draw middle layer\n if ( JARSettings.scrollBgImageParallax )\n {\n float imgWidth = JARImage.GAME_BG_TREES.getWidth();\n float imgHeight = JARImage.GAME_BG_TREES.getHeight();\n\n float MAGIC_OFF_Y = 100;\n\n LibDrawing.drawImage\n (\n batch,\n JARImage.GAME_BG_TREES.getTextureRegion(),\n 0 - ( imgWidth - JARScreen.width() ) * camera.x / ( iLevelBoundX - JARScreen.width() ),\n 0 - 4 * ( imgHeight - JARScreen.height() ) * camera.y / ( iLevelBoundY - JARScreen.height() ) + MAGIC_OFF_Y,\n LibAnchor.LEFT_TOP\n );\n/*\n float offsetX = 0;\n float offsetY = 3 * imgHeight;\n\n float targetWidth = imgWidth;\n float targetHeight = 4 * imgHeight;\n\n LibDrawing.drawImage\n (\n batch,\n JARImage.GAME_BG_TREES,\n 0 - ( targetWidth - Canvas.WIDTH ) * camera.x / ( iLevelBoundX - Canvas.WIDTH ) + offsetX,\n 0 - ( targetHeight - Canvas.HEIGHT ) * camera.y / ( iLevelBoundY - Canvas.HEIGHT ) + offsetY,\n Anchor.LEFT_TOP\n );\n*/\n }\n else\n {\n //draw image static on center bottom of the canvas\n LibDrawing.drawImage( batch, JARImage.GAME_BG_TREES.getTextureRegion(), JARScreen.width() / 2, JARScreen.height(), LibAnchor.CENTER_BOTTOM );\n }\n }", "@Override\n\tpublic void create() {\n\t\tGdx.gl20.glClearColor(1, 1, 1, 1);\n\n\t\t// instancia batch, asset manager e ambiente 3D\n\t\tmodelBatch = new ModelBatch();\n\t\tassets = new AssetManager();\n\t\tambiente = new Environment();\n\t\tambiente.set(new ColorAttribute(ColorAttribute.AmbientLight, 0.4f, 0.4f, 0.4f, 1f));\n\t\tambiente.add(new DirectionalLight().set(0.8f, 0.8f, 0.8f, -1f, -0.8f, -0.2f));\n\n\t\t// configura a câmera\n\t\tfloat razaoAspecto = ((float) Gdx.graphics.getWidth()) / Gdx.graphics.getHeight();\n\t\tcamera = new PerspectiveCamera(67, 480f * razaoAspecto, 480f);\n\t\tcamera.position.set(1f, 1.75f, 3f);\n\t\tcamera.lookAt(0, 0.35f, 0);\n\t\tcamera.near = 1f;\n\t\tcamera.far = 300f;\n\t\tcamera.update();\n\t\tcameraController = new CameraInputController(camera);\n\t\tGdx.input.setInputProcessor(cameraController);\n\n\t\t// solicita carregamento dos 2 modelos 3D da cena\n\t\tassets.load(\"caldeirao.obj\", Model.class);\n\t\tassets.load(\"caldeirao-jogos.obj\", Model.class);\n\t\tassets.load(\"caldeirao-love.obj\", Model.class);\n\t\tassets.load(\"fogueira.obj\", Model.class);\n\n\t\t// instancia e configura 2 tipos de renderizadores de partículas:\n\t\t// 1. Billboards (para fogo)\n\t\t// 2. PointSprites (para bolhas)\n\t\tBillboardParticleBatch billboardBatch = new BillboardParticleBatch(ParticleShader.AlignMode.Screen, true, 500);\n\t\tPointSpriteParticleBatch pointSpriteBatch = new PointSpriteParticleBatch();\n\t\tsistemaParticulas = new ParticleSystem();\n\t\tbillboardBatch.setCamera(camera);\n\t\tpointSpriteBatch.setCamera(camera);\n\t\tsistemaParticulas.add(billboardBatch);\n\t\tsistemaParticulas.add(pointSpriteBatch);\n\n\t\t// solicita o carregamento dos efeitos de partículas\n\t\tParticleEffectLoader.ParticleEffectLoadParameter loadParam = new ParticleEffectLoader.ParticleEffectLoadParameter(\n\t\t\t\tsistemaParticulas.getBatches());\n\t\tassets.load(\"fogo.pfx\", ParticleEffect.class, loadParam);\n\t\tassets.load(\"fogo-jogos.pfx\", ParticleEffect.class, loadParam);\n\t\tassets.load(\"fogo-love.pfx\", ParticleEffect.class, loadParam);\n\t\tassets.load(\"bolhas.pfx\", ParticleEffect.class, loadParam);\n\t\tassets.load(\"bolhas-jogos.pfx\", ParticleEffect.class, loadParam);\n\t\tassets.load(\"bolhas-love.pfx\", ParticleEffect.class, loadParam);\n\n\t\t// solicita carregamento da música\n\t\tmusica = Gdx.audio.newMusic(Gdx.files.internal(\"zelda-potion-shop.mp3\"));\n\n\t\taindaEstaCarregando = true;\n\t}", "Sprite getBackground();", "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 }", "@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 }", "Ground(Sprite sprite) {Collect.Hit(\"BoardFactory.java\",\"Ground(Sprite sprite)\");this.background = sprite; Collect.Hit(\"BoardFactory.java\",\"Ground(Sprite sprite)\", \"3015\");}", "@Override\n\tpublic void create() {\n\t\tthis.batch = new SpriteBatch();\n\t\t\n//\t\tgame.batch.begin();\n// player.draw(game.batch);\n// \n// game.batch.end();\n\t\t\n\t\tmanager = new AssetManager();\n\t\tmanager.setLoader(TiledMap.class, new TmxMapLoader(new InternalFileHandleResolver()));\n\t\tmanager.load(\"data/level1.tmx\", TiledMap.class);\n\t\tmanager.load(\"data/background.png\", Texture.class);\n//\t\tmanager.load(\"level1.tsx\", TiledMapTileSet.class);\n\t\tmanager.finishLoading();\n\t\tscreen = new GameScreen(this);\n\t\tsetScreen(screen);\n\t\t\n\t}", "private void initUI() {\n Texture wallTileTexture = new Texture(Gdx.files.internal(\"mappa_text_low_res/background_tile.png\"));\r\n wallTileTexture.setWrap(Texture.TextureWrap.Repeat, Texture.TextureWrap.Repeat);\r\n TextureRegion wallTileRegion = new TextureRegion(wallTileTexture);\r\n wallTileRegion.setRegion(0, 0, wallTileTexture.getWidth() * 8, wallTileTexture.getHeight() * 6);\r\n Image backgroundImage = new Image(wallTileRegion);\r\n backgroundImage.setSize(stage.getWidth(), stage.getHeight());\r\n stage.addActor(backgroundImage);\r\n //////////////////////////////////////////////////\r\n\r\n Label.LabelStyle lblStyle = new Label.LabelStyle();\r\n lblStyle.font = GdxGame.game.buttonFont;\r\n\r\n label1 = new Label(\"SETTINGS\", lblStyle);\r\n label1.setSize(stage.getWidth(), 30);\r\n label1.setAlignment(Align.center);\r\n label1.setPosition(0, stage.getWidth() / 2 - 15 + 250);\r\n stage.addActor(label1);\r\n\r\n colWidth = stage.getWidth() / 5f;\r\n rowHeight = stage.getWidth() / 15f;\r\n TextButton backButton = new TextButton(\"Back\", GdxGame.game.txtBtnStyle);\r\n backButton.setSize(colWidth, rowHeight);\r\n backButton.setPosition(padding, padding);\r\n backButton.addListener(new InputListener() {\r\n @Override\r\n public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) {\r\n // SettingsScreen.this.dispose();\r\n SettingsScreen.this.dispose();\r\n game.setScreen(previousScreen);\r\n return true;\r\n }\r\n });\r\n stage.addActor(backButton);\r\n\r\n audio = new Label(\"AUDIO\", lblStyle);\r\n audio.setSize(stage.getWidth(), 30);\r\n audio.setAlignment(Align.center);\r\n audio.setPosition(stage.getWidth() / 2 - 15 - 675, stage.getWidth() / 2 + 150);\r\n stage.addActor(audio);\r\n\r\n Skin skin = new Skin(Gdx.files.internal(\"skin/uiskin.json\"));\r\n final Slider volumeSlider = new Slider(0.0f, 1.0f, 0.1f, false, skin);\r\n\r\n volumeSlider.setValue(game.settings.getVolume());\r\n volumeSlider.setPosition(stage.getWidth() / 2 - 140, stage.getWidth() / 2 + 155);\r\n\r\n stage.addActor(volumeSlider);\r\n\r\n volumeSlider.addListener(new ChangeListener() {\r\n public void changed(ChangeEvent event, Actor actor) {\r\n game.settings.setVolume(volumeSlider.getValue());\r\n game.getMusic().setVolume(game.settings.getVolume());\r\n\r\n //volumeSlider.setValue(volumeSlider.getValue());\r\n System.out.println(\"il volume è VolumeSetValue: \" + volumeSlider.getValue());\r\n }\r\n });\r\n\r\n TextButton defaultButton = new TextButton(\"Default Settings\", GdxGame.game.txtBtnStyle);\r\n defaultButton.setSize(defaultButton.getLabel().getWidth() + padding, rowHeight);\r\n defaultButton.setPosition(stage.getWidth() - defaultButton.getWidth() - padding, padding);\r\n\r\n stage.addActor(defaultButton);\r\n\r\n defaultButton.addListener(new InputListener() {\r\n @Override\r\n public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) {\r\n game.settings.setDefault();\r\n game.getMusic().setVolume(game.settings.getVolume());\r\n volumeSlider.setValue(game.settings.getVolume());\r\n\r\n return true;\r\n }\r\n });\r\n }", "@Override\n protected Scene onCreateScene() {\n this.getWindowManager().getDefaultDisplay().getMetrics(metrics);\n this.mEngine.registerUpdateHandler(new FPSLogger());\n inventoryEntity.attachChild(new Rectangle(0,0,125,780,new VertexBufferObjectManager()));\n viennaPracticeScene.attachChild(inventoryEntity);\n\n final Entity doorEntity = new Entity(50,270,100,100);\n Rectangle r = new Rectangle(0,0,120,300,new VertexBufferObjectManager());\n r.setSkewY(-20);\n r.setColor(Color.BLACK);\n doorEntity.attachChild(r);\n viennaPracticeScene.attachChild(doorEntity);\n\n final Entity beethovenEntity = new Entity(CAMERA_WIDTH/2,CAMERA_HEIGHT/2);\n beethovenEntity.attachChild(beethovenSprite);\n viennaPracticeScene.attachChild(beethovenEntity);\n\n final Text beethovenSpeech = new Text(0, 70, this.font, \"...Alas!\\nI, the great Beethoven, have broken my strings!\", this.getVertexBufferObjectManager());\n beethovenSpeech.setWidth(850);\n beethovenSpeech.setAutoWrap(AutoWrap.NONE);\n beethovenSpeech.setHorizontalAlign(HorizontalAlign.CENTER);\n\n guitarStringSprite.setColor(Color.WHITE);\n guitarStringSprite.setOnClickListener(new ButtonSprite.OnClickListener() {\n @Override\n public void onClick(ButtonSprite pButtonSprite, float pTouchAreaLocalX, float pTouchAreaLocalY) {\n toggleColor();\n ViennaPracticeActivity.this.game.handleItemClick(new GuitarStrings(player));\n }\n });\n viennaPracticeScene.registerTouchArea(guitarStringSprite);\n\n beethovenSprite.setOnClickListener(new ButtonSprite.OnClickListener() {\n @Override\n public void onClick(ButtonSprite pButtonSprite, float pTouchAreaLocalX, float pTouchAreaLocalY) {\n beethovenEntity.attachChild(beethovenSpeech);\n Timer timer = new Timer();\n Long delayTime = (long) (30 * 100);\n timer.schedule(new TimerTask() {\n @Override\n public void run() {\n beethovenEntity.detachChild(beethovenSpeech);\n }\n }, delayTime);\n }\n });\n viennaPracticeScene.registerTouchArea(beethovenSprite);\n\n viennaPracticeScene.setOnSceneTouchListener(new IOnSceneTouchListener() {\n @Override\n public boolean onSceneTouchEvent(Scene pScene, TouchEvent pSceneTouchEvent) {\n float xCoordinate = pSceneTouchEvent.getX();\n float yCoordinate = pSceneTouchEvent.getY();\n if (pSceneTouchEvent.isActionDown() && pSceneTouchEvent.getX() < 70) {\n Intent startIntent = new Intent(ViennaPracticeActivity.this.getApplication(), ViennaStreetActivity.class);\n startIntent.putExtra(\"game\", game);\n ViennaPracticeActivity.this.startActivity(startIntent);\n ViennaPracticeActivity.this.finish();\n ViennaPracticeActivity.this.game.switchToScene(jlstanford.bsu.edu.game.Scene.VIENNA_STREET);\n } else if (pSceneTouchEvent.isActionDown() && ((xCoordinate < 335 && xCoordinate > 263) && (yCoordinate < 284 && yCoordinate > 124))) {\n player = ViennaPracticeActivity.this.game.getPlayer();\n ViennaPracticeActivity.this.game.handleItemClick(new GuitarStrings(player));\n ViennaPracticeActivity.this.toastOnUiThread(\"Got Guitar Strings!\");\n loadInventoryItems();\n } else {\n }\n return false;\n }\n });\n\n loadInventoryItems();\n final Sprite spriteBG = new Sprite(405,240,CAMERA_WIDTH,CAMERA_HEIGHT,this.backgroundTiledTextureRegion,this.getVertexBufferObjectManager());\n SpriteBackground bg = new SpriteBackground(spriteBG);\n viennaPracticeScene.setBackground(bg);\n\n return viennaPracticeScene;\n }", "public Hero(int x, int y) {\r\n this.centerX = x;\r\n this.centerY = y;\r\n this.currentHealth = 100;\r\n rect1 = new FloatRect (100,630,80,110);\r\n imgTexture = new Texture ();\r\n try {\r\n imgTexture.loadFromFile (Paths.get (ImageFile));\r\n } catch (IOException ex) {\r\n ex.printStackTrace ();\r\n }\r\n imgTexture.setSmooth (true);\r\n\r\n img = new Sprite (imgTexture);\r\n img.setOrigin (Vector2f.div (new Vector2f (imgTexture.getSize ()), 2));\r\n img.setPosition (x, y);\r\n // Store references to object and key methods\r\n obj = img;\r\n setPosition = img::setPosition;\r\n\r\n background = new Sprite (bg.loadTextures ());\r\n background.setOrigin(Vector2f.div(new Vector2f(bg.getTexture1 ()), 1000000));\r\n background.setPosition (0,0);\r\n }", "@Override\n\tpublic void createScene()\n\t\n\t{\n\t loading = new Sprite (0,0,resourceManager.loadingRegion,vbo); // тупо ставим спрайт с картинкой\n\t\tattachChild(loading);\n\t}", "@Override\n public void create() {\n\n batch = new SpriteBatch();\n manager = new AssetManager();\n\n manager.load(\"audio/main_theme.mp3\", Music.class);\n // manager.load(\"String sonido\", Sound.class);\n manager.load(\"sprites/dragon.pack\", TextureAtlas.class);\n manager.load(\"sprites/vanyr.pack\", TextureAtlas.class);\n manager.finishLoading();\n\n setScreen(new PlayScreen(this));\n\n }", "@Override\n\tpublic void start(Stage stagePrimary) throws Exception {\n\t\tstagePrimary.setTitle(\"RJMs Ball Animation\");\n\t\t\n\t Group root = new Group();\t\t\t\t\t// for group of what is shown\n\t Scene scene = new Scene( root );\t\t\t// put it in a scene\n\t stagePrimary.setScene( scene );\t\t\t\t// apply the scene to the stage\n\t \n\t Canvas canvas = new Canvas( xCanvasSize, yCanvasSize );\n\t \t\t\t\t\t\t\t\t\t\t\t// create canvas onto which animation shown\n\t root.getChildren().add( canvas );\t\t\t// add to root and hence stage\n\t \n\t mc = new MyCanvas(canvas.getGraphicsContext2D(), xCanvasSize, yCanvasSize);\n\t \t\t\t\t\t\t\t\t// create MyCanvas passing context on canvas onto which images put\n\t \n\t obw = new OneBallWorld();\t\t\t\t\t// create object for world with a ball\n\t\t\n\t new AnimationTimer()\t\t\t\t\t\t// create timer\n\t \t{\n\t \t\tpublic void handle(long currentNanoTime) {\n\t \t\t\t\t// define handle for what do at this time ... here dont use time\n\t \t\t\tobw.updateWorld(mc);\t\t\t// find new position of ball \n\t \t\t\tobw.drawWorld(mc);\t\t\t\t// draw ball in new position\n\t \t\t}\n\t \t}.start();\t\t\t\t\t\t\t// start animation\n\t \n\t\tstagePrimary.show();\t\t\t\t\t\t// show scene\n\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 }", "@Override\n\tpublic void create() {\n\t\tassets = new AssetManager();\n\t\tspriteBatch = new SpriteBatch();\n\t\tGdx.input.setInputProcessor(this);\n\t\tGdx.input.setCatchMenuKey(true);\n\t\tGdx.input.setCatchBackKey(true);\n\t\tGdx.input.setInputProcessor(this);\n\t\t\n\t\t//WorldRenderer.BLEND_FUN1=GL20.GL_SRC_ALPHA;\n\t\t//WorldRenderer.BLEND_FUN2=GL20.GL_ONE_MINUS_SRC_ALPHA;\n\t\t//WorldRenderer.CLEAR_COLOR.set(0.5f,0.1f,0.2f,1);\n\t\t//UIRenderer.BLEND_FUN1=GL20.GL_SRC_ALPHA;\n\t\t//UIRenderer.BLEND_FUN2=GL20.GL_ONE_MINUS_SRC_ALPHA;\n\t\t\n\t\tspriteBatch.setBlendFunction(GL20.GL_SRC_ALPHA,GL20.GL_ONE);\n\t\tspriteBatch.enableBlending();\n\t\t\n\t\tdefaultShader=SpriteBatch.createDefaultShader();\n\t}", "@Override\n public void draw (Batch batch, float parentAlpha) {\n setPosition(body.getPosition().x, body.getPosition().y);\n\n // Draw the main engine's fire\n if (activateEngine) {\n batch.draw((TextureRegion) fireAnimation.getKeyFrame(time, true),\n getX() - fireSpriteOriginX,\n getY() - fireSpriteOriginY,\n fireSpriteOriginX,\n fireSpriteOriginY,\n fireSpriteWidth,\n fireSpriteHeight,\n 1,\n 1,\n body.getAngle() * MathUtils.radiansToDegrees);\n }\n\n // Draw top left and bottom right auxiliary engines if they are activated\n if (activateAuxiliaryEnginesLeft) {\n batch.draw((TextureRegion) smokeAnimation.getKeyFrame(time, true),\n getX() - smokeSpriteOriginX,\n getY() - smokeSpriteOriginY,\n smokeSpriteOriginX,\n smokeSpriteOriginY,\n smokeSpriteWidth,\n smokeSpriteHeight,\n 1,\n 1,\n body.getAngle() * MathUtils.radiansToDegrees);\n batch.draw((TextureRegion) smokeAnimation.getKeyFrame(time, true),\n getX() - smokeSpriteOriginX,\n getY() - smokeSpriteOriginY,\n smokeSpriteOriginX,\n smokeSpriteOriginY,\n smokeSpriteWidth,\n smokeSpriteHeight,\n 1,\n 1,\n body.getAngle() * MathUtils.radiansToDegrees + 180);\n }\n\n // Draw bottom left and top right auxiliary engines if they are activated\n if (activateAuxiliaryEnginesRight) {\n batch.draw((TextureRegion) smokeAnimation.getKeyFrame(time, true),\n getX() - smokeSpriteOriginX2,\n getY() - smokeSpriteOriginY2,\n smokeSpriteOriginX2,\n smokeSpriteOriginY2,\n smokeSpriteWidth,\n smokeSpriteHeight,\n 1,\n 1,\n body.getAngle() * MathUtils.radiansToDegrees);\n batch.draw((TextureRegion) smokeAnimation.getKeyFrame(time, true),\n getX() - smokeSpriteOriginX2,\n getY() - smokeSpriteOriginY2,\n smokeSpriteOriginX2,\n smokeSpriteOriginY2,\n smokeSpriteWidth,\n smokeSpriteHeight,\n 1,\n 1,\n body.getAngle() * MathUtils.radiansToDegrees + 180);\n }\n\n // Draw thr lunar module's texture\n batch.draw(lunarModuleTexture,\n getX() - getWidth() / 2,\n getY() - getHeight() / 2,\n getWidth() / 2,\n getHeight() / 2,\n getWidth(),\n getHeight(),\n 1,\n 1,\n body.getAngle() * MathUtils.radiansToDegrees,\n 0,\n 0,\n lunarModuleTexture.getWidth(),\n lunarModuleTexture.getHeight(),\n false,\n false);\n }", "public void create() {\r\n\t\t\r\n\t\tTexture.setEnforcePotImages(false);\r\n\t\t\r\n\t\tGdx.input.setInputProcessor(new MyInputProcessor());\r\n\t\t\r\n\t\t\r\n\t\ttextures = Tex.getTex();\r\n\t\t// load images\r\n\t\ttextures.loadTexture(\"res/images/guyDown.png\", \"guyDown\");\r\n\t\ttextures.loadTexture(\"res/images/guyUp.png\", \"guyUp\");\r\n\t\ttextures.loadTexture(\"res/images/guy2Down.png\", \"guyDown2\");\r\n\t\ttextures.loadTexture(\"res/images/guy2Up.png\", \"guyUp2\");\r\n\t\ttextures.loadTexture(\"res/images/enemyDown.png\", \"enemyDown\");\r\n\t\ttextures.loadTexture(\"res/images/enemyUp.png\", \"enemyUp\");\r\n\t\t\r\n\t\ttextures.loadTexture(\"res/images/skyline.png\", \"skyline\");\r\n\t\ttextures.loadTexture(\"res/images/skyline2.jpg\", \"skyline2\");\r\n\t\ttextures.loadTexture(\"res/images/skyline3.png\", \"skyline3\");\t\t\r\n\t\ttextures.loadTexture(\"res/images/circuit board.jpg\", \"fundo2\");\r\n\t\ttextures.loadTexture(\"res/images/grav3.jpg\", \"menu\");\r\n\t\t\r\n\t\ttextures.loadTexture(\"res/images/singleplayer.png\", \"single\");\r\n\t\ttextures.loadTexture(\"res/images/multiplayer.png\", \"multi\");\r\n\t\ttextures.loadTexture(\"res/images/exit.png\", \"exit\");\r\n\t\ttextures.loadTexture(\"res/images/level1B.png\", \"B1\");\r\n\t\ttextures.loadTexture(\"res/images/level2B.png\", \"B2\");\r\n\t\ttextures.loadTexture(\"res/images/level3B.png\", \"B3\");\r\n\t\ttextures.loadTexture(\"res/images/mainMenuB.png\", \"mainB\");\r\n\t\ttextures.loadTexture(\"res/images/win1.png\", \"win1\");\r\n\t\ttextures.loadTexture(\"res/images/win2.png\", \"win2\");\r\n\t\ttextures.loadTexture(\"res/images/tryagain.png\", \"retry\");\r\n\t\ttextures.loadTexture(\"res/images/easy.png\", \"easy\");\r\n\t\ttextures.loadTexture(\"res/images/medium.png\", \"medium\");\r\n\t\ttextures.loadTexture(\"res/images/hard.png\", \"hard\");\r\n\t\ttextures.loadTexture(\"res/images/difficulty.png\", \"difficulty\");\r\n\t\ttextures.loadTexture(\"res/images/thunder2.png\", \"thunder\");\r\n\t\r\n\t\ttextures.loadTexture(\"res/images/levelcleared.png\", \"cleared\");\r\n\t\ttextures.loadTexture(\"res/images/you lost.png\", \"lost\");\r\n\t\ttextures.loadTexture(\"res/images/playerpress.png\", \"playerp\");\r\n\t\ttextures.loadTexture(\"res/images/player1press.png\", \"player1p\");\r\n\t\ttextures.loadTexture(\"res/images/player2press.png\", \"player2p\");\r\n\t\ttextures.loadTexture(\"res/images/selectthelevel.png\", \"select\");\r\n\t\t\r\n\t\t\r\n\t\tsb = new SpriteBatch();\r\n\t\tcam = new OrthographicCamera();\r\n\t\tcam.setToOrtho(false, V_WIDTH, V_HEIGHT);\r\n\t\thudCam = new OrthographicCamera();\r\n\t\thudCam.setToOrtho(false, V_WIDTH, V_HEIGHT);\r\n\t\tgsm = new GameStateManager(this);\r\n\t\t\t\t\r\n\t}", "@Override\r\n public Sprite getBackground() {\r\n return new Level3Background();\r\n }", "private boolean initBackgroundImage(MinesweeperView frame) {\r\n try {\r\n int width = (int) frame.getDim().getWidth();\r\n int height = (int) frame.getDim().getHeight();\r\n Background image = new Background(new File(\"../Asset/explosion.jpg\"), 0, 0, width, height);\r\n frame.add(image);\r\n } catch (IOException event) {\r\n System.err.println(\"Image Not Found\");\r\n return false;\r\n }\r\n return true;\r\n }", "private void initScene() {\n scene = new idx3d_Scene() {\n\n @Override\n public boolean isAdjusting() {\n return super.isAdjusting() || isAnimating() || isInStartedPlayer() || AbstractCube7Idx3D.this.isAdjusting();\n }\n\n @Override\n public void prepareForRendering() {\n validateAlphaBeta();\n validateScaleFactor();\n validateCube();\n validateStickersImage();\n validateAttributes(); // must be done after validateStickersImage!\n super.prepareForRendering();\n }\n @Override\n\t\tpublic /*final*/ void rotate(float dx, float dy, float dz) {\n super.rotate(dx, dy, dz);\n fireStateChanged();\n }\n };\n scene.setBackgroundColor(0xffffff);\n\n scaleTransform = new idx3d_Group();\n scaleTransform.scale(0.018f);\n\n for (int i = 0; i < locationTransforms.length; i++) {\n scaleTransform.addChild(locationTransforms[i]);\n }\n alphaBetaTransform = new idx3d_Group();\n alphaBetaTransform.addChild(scaleTransform);\n scene.addChild(alphaBetaTransform);\n\n scene.addCamera(\"Front\", idx3d_Camera.FRONT());\n scene.camera(\"Front\").setPos(0, 0, -4.9f);\n scene.camera(\"Front\").setFov(40f);\n\n scene.addCamera(\"Rear\", idx3d_Camera.FRONT());\n scene.camera(\"Rear\").setPos(0, 0, 4.9f);\n scene.camera(\"Rear\").setFov(40f);\n scene.camera(\"Rear\").roll((float) Math.PI);\n\n //scene.environment.ambient = 0x0;\n //scene.environment.ambient = 0xcccccc;\n scene.environment.ambient = 0x777777;\n //scene.addLight(\"Light1\",new idx3d_Light(new idx3d_Vector(0.2f,-0.5f,1f),0x888888,144,120));\n //scene.addLight(\"Light1\",new idx3d_Light(new idx3d_Vector(1f,-1f,1f),0x888888,144,120));\n // scene.addLight(\"Light2\",new idx3d_Light(new idx3d_Vector(1f,1f,1f),0x222222,100,40));\n //scene.addLight(\"Light2\",new idx3d_Light(new idx3d_Vector(-1f,1f,1f),0x222222,100,40));\n // scene.addLight(\"Light3\",new idx3d_Light(new idx3d_Vector(-1f,2f,1f),0x444444,200,120));\n scene.addLight(\"KeyLight\", new idx3d_Light(new idx3d_Vector(1f, -1f, 1f), 0xffffff, 0xffffff, 100, 100));\n scene.addLight(\"FillLightRight\", new idx3d_Light(new idx3d_Vector(-1f, 0f, 1f), 0x888888, 50, 50));\n scene.addLight(\"FillLightDown\", new idx3d_Light(new idx3d_Vector(0f, 1f, 1f), 0x666666, 50, 50));\n\n if (sharedLightmap == null) {\n sharedLightmap = scene.getLightmap();\n } else {\n scene.setLightmap(sharedLightmap);\n }\n }", "public A(){ \n super();\n AtrEA = new GreenfootImage(\"AtrEA.png\");\n DerEA1 = new GreenfootImage(\"DerEA1.png\");\n DerEA2 = new GreenfootImage(\"DerEA2.png\");\n DerEA3 = new GreenfootImage(\"DerEA3.png\");\n FrtEA1 = new GreenfootImage(\"FrtEA1.png\");\n FrtEA2 = new GreenfootImage(\"FrtEA2.png\");\n FrtEA3 = new GreenfootImage(\"FrtEA3.png\");\n IzqEA1 = new GreenfootImage(\"IzqEA1.png\");\n IzqEA2 = new GreenfootImage(\"IzqEA2.png\");\n IzqEA3 = new GreenfootImage(\"IzqEA3.png\"); \n animationE = 0;\n start = 1; \n }", "public DebugOverlay(SpriteBatch sb) {\n\n\n viewport = new FitViewport(PixClient.V_WIDTH, PixClient.V_HEIGHT, new OrthographicCamera());\n\n labels = new Label[labelCount];\n\n stage = new Stage(viewport, sb);\n\n Table table = new Table();\n table.bottom().right();\n table.setHeight(300);\n table.setWidth(200);\n table.setPosition(Gdx.graphics.getWidth() - table.getWidth(), 0);\n\n\n\n for(int i = 0; i < labelCount; i++) {\n\n labels[i] = new Label(\"\", new Label.LabelStyle(new BitmapFont(), Color.WHITE));\n table.add(labels[i]).right();\n table.row();\n\n }\n\n Pixmap pixmap = new Pixmap(1, 1, Pixmap.Format.RGBA8888);\n pixmap.setColor(0, 0, 0, 0.75f);\n pixmap.fill();\n\n table.setBackground(new TextureRegionDrawable(new TextureRegion(new Texture(pixmap) ) ) );\n stage.addActor(table);\n }", "public Sprite getBackground() {\r\n return new BackGround4();\r\n }", "@Override\n public void populate(Game game) {\n super.populate(game);\n\n Level1.background1Music.stop();\n background2Music.loop();\n voiceOver2.play();\n\n Shape groundShape = new BoxShape(100, 0.5f);\n Body ground = new StaticBody(this, groundShape);\n ground.setPosition(new Vec2(0, -18));\n\n Shape wallShape = new BoxShape(0.5f, 100);\n Body leftWall = new StaticBody(this, wallShape);\n leftWall.setPosition(new Vec2(-25f, -6));\n leftWall.setName(\"leftWall\");\n Body rightWall = new StaticBody(this, wallShape);\n rightWall.setPosition(new Vec2(25f, -6));\n rightWall.setName(\"rightWall\");\n Body TopWall = new StaticBody(this, groundShape);\n TopWall.setPosition(new Vec2(25f, 18f));\n\n\n Shape platformShape = new BoxShape(3, 0.5f);\n Shape platformShape2= new BoxShape(5,0.5f);\n Shape platformShape3= new BoxShape(12,0.5f);\n Shape platformShape4= new BoxShape(16,0.5f);\n Shape platformShape5= new BoxShape(0.5f,2);\n Body platform1 = new StaticBody(this, platformShape);\n platform1.setPosition(new Vec2(20, -10));\n Body platform2 = new StaticBody(this, platformShape);\n platform2.setPosition(new Vec2(13, -5));\n Body platform3 = new StaticBody(this, platformShape2);\n platform3.setPosition(new Vec2(4, 0));\n Body platform4 = new StaticBody(this, platformShape);\n platform4.setPosition(new Vec2(-15, -5));\n Body platform5 = new StaticBody(this, platformShape);\n platform5.setPosition(new Vec2(20, 3));\n Body platform6 = new StaticBody(this, platformShape3);\n platform6.setPosition(new Vec2(8, 11));\n Body platform7 = new StaticBody(this, platformShape4);\n platform7.setPosition(new Vec2(12, 16.5f));\n Body platform8 = new StaticBody(this,platformShape);\n platform8.setPosition(new Vec2(-10f,10));\n Body platform9 = new StaticBody(this,platformShape2);\n platform9.setPosition(new Vec2(-19.5f,12));\n Body platform10 = new StaticBody(this,platformShape);\n platform10.setPosition(new Vec2(0,-9));\n\n Enemy2 enemy2 = new Enemy2(this);\n enemy2.setPosition(new Vec2(-20, 14));\n enemy2.addCollisionListener(new Collisions(timothyDalton, game));\n\n destroyablePlatform = new StaticBody(this,platformShape5);\n destroyablePlatform.setPosition(new Vec2(-3,13.75f));\n destroyablePlatform.setName(\"destroyablePlatform\");\n\n Heart heart= new Heart(this);\n heart.setPosition(new Vec2(-15,-4));\n heart.addCollisionListener(new Collisions(timothyDalton,game));\n\n GunCoin coin = new GunCoin(this);\n coin.setPosition(new Vec2(0, -8));\n coin.addCollisionListener(new Collisions(timothyDalton,game));\n\n Button1 button= new Button1(this);\n button.setPosition(new Vec2(-24,0));\n button.addCollisionListener(new Collisions(timothyDalton,game));\n }", "@Override\n\tpublic void create() {\n\t\tassetManager = new AssetManager();\n\t\tassetManager.load(ROLIT_BOARD_MODEL, Model.class);\n\t\tassetManager.load(ROLIT_BALL_MODEL, Model.class);\n\t\t\n\t\t//construct the lighting\n\t\tenvironment = new Environment();\n\t\tenvironment.set(new ColorAttribute(ColorAttribute.AmbientLight, 0.4f, 0.4f, 0.4f, 1f));\n\t\tenvironment.add(new DirectionalLight().set(0.8f, 0.8f, 0.8f, -1f, -0.8f, -0.2f));\n\t\t\n\t\tmodelBatch = new ModelBatch();\n\t\t\n\t\tcam = new PerspectiveCamera(67f, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());\n\t\t\n\t\tGdx.input.setInputProcessor(new InputHandler());\n\t}", "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 }", "@Override\n\tpublic void create () {\n\t\t\n\t\teManager = new EventManager();\n\t\t\n\t\tbatch = new SpriteBatch();\n\t\timg = new Texture(\"background.png\");\n\t\t\n\t\tmessages = new MessageManager(eManager);\n\t\t\n\t\tworld = new WorldRenderer(messages, eManager);\n\t\t\n\t\t\n\t\tResourceLoader.getInstance();\n\t\twhile (!ResourceLoader.assetManager.update())\n {\n\t\t\t\n }\n\t\tSystem.gc();\n\t\tsaveLoaded = false;\n\t\t\n\t\ttry{\n\t\t\tplayer = GameSave.loadPlayerSave();\n\t\t\tSystem.gc();\n\t\t\tThread.sleep(100);\n\t\t\t\n\t\t\tplayer.setItems(GameSave.loadPlayerItemsSave());\n\t\t\tSystem.gc();\n\t\t\tThread.sleep(100);\n\t\t\tplayer.setLinkmon(GameSave.loadLinkmonSave());\n\t\t\tSystem.gc();\n\t\t\tThread.sleep(100);\n\t\t\tplayer.getLinkmon().setStats(GameSave.loadLinkmonStatsSave());\n\t\t\tSystem.gc();\n\t\t\tThread.sleep(100);\n\t\t\tplayer.getLinkmon().setBirthDate(GameSave.loadLinkmonBirthDateSave());\n\t\t\tSystem.gc();\n\t\t\tThread.sleep(100);\n\t\t\tGameSave.updateLinkmon(player.getLinkmon());\n\t\t\tSystem.gc();\n\t\t\tThread.sleep(100);\n\t\t\tsaveLoaded = true;\n\t\t} catch(Exception e) {\n\t\t\tsaveLoaded = false;\n\t\t\tGdx.app.log(\"GameClass (LoadingSave)\", \"loadPlayerSave\");\n\t\t}\n\t\t\n//\t\ttry{\n//\t\t\tplayer = GameSave.loadPlayerSave();\n//\t\t} catch(Exception e) {\n//\t\t\tsaveLoaded = false;\n//\t\t\tGdx.app.log(\"GameClass (LoadingSave)\", \"loadPlayerSave\");\n//\t\t}\n//\t\ttry{\n//\t\t\tplayer.setItems(GameSave.loadPlayerItemsSave());\n//\t\t} catch(Exception e) {\n//\t\t\tsaveLoaded = false;\n//\t\t\tGdx.app.log(\"GameClass (LoadingSave)\", \"loadPlayerItemsSave\");\n//\t\t}\n//\t\ttry{\n//\t\t\tplayer.setLinkmon(GameSave.loadLinkmonSave());\n//\t\t} catch(Exception e) {\n//\t\t\tsaveLoaded = false;\n//\t\t\tGdx.app.log(\"GameClass (LoadingSave)\", \"loadLinkmonSave\");\n//\t\t}\n//\t\ttry{\n//\t\t\tplayer.getLinkmon().setStats(GameSave.loadLinkmonStatsSave());\n//\t\t} catch(Exception e) {\n//\t\t\tsaveLoaded = false;\n//\t\t\tGdx.app.log(\"GameClass (LoadingSave)\", \"loadLinkmonStatsSave\");\n//\t\t}\n//\t\ttry{\n//\t\t\tplayer.getLinkmon().setBirthDate(GameSave.loadLinkmonBirthDateSave());\n//\t\t} catch(Exception e) {\n//\t\t\tsaveLoaded = false;\n//\t\t\tGdx.app.log(\"GameClass (LoadingSave)\", \"loadLinkmonBirthDateSave\");\n//\t\t}\n//\t\ttry{\n//\t\t\tplayer.getLinkmon().setPoopList(GameSave.loadPoopSave());\n//\t\t} catch(Exception e) {\n//\t\t\tsaveLoaded = false;\n//\t\t\tGdx.app.log(\"GameClass (LoadingSave)\", \"loadPoopSave\");\n//\t\t}\n//\t\ttry{\n//\t\t\tGameSave.updateLinkmon(player.getLinkmon());\n//\t\t} catch(Exception e) {\n//\t\t\tsaveLoaded = false;\n//\t\t\tGdx.app.log(\"GameClass (LoadingSave)\", \"updateLinkmon\");\n//\t\t}\n\t\t\n\t\t\n\t\t\n\t\tString message = \"\" + Gdx.graphics.getWidth() + \" \" + Gdx.graphics.getHeight();\n Gdx.app.log(\"TIMER\", message);\n\t\t\n\t\tim = new InputMultiplexer();\n\t\t\n\t\tim.addProcessor(world.stage);\n\t\tGdx.input.setInputProcessor(im);\n\t\t\n\t\tif(!saveLoaded) {\n\t\t\tthis.setScreen(new IntroScreen(this, world.ui, eManager));\n\t\t\t//startGame(\"Kilst\", 1);\n\t\t}\n\t\telse {\n//\t\t\tcontrollerService = new ControllerService(this, world.ui, Gdx.graphics.getWidth(), Gdx.graphics.getHeight(), eManager);\n//\t\t\tworld.addLinkmonToWorld(controllerService.getLinkmonController());\n//\t\t\teManager.notify(new ControllerEvent(ControllerEvents.SWAP_SCREEN, ScreenType.MAIN_UI));\n\t\t\tloadGame(player);\n\t\t\t\n\t\t}\n\t}", "private void drawBG(Batch batch) {\n\t\tbackgroundSprite.setRegion(baybayinAnimation.getKeyFrame(animationCounter, true));\n\t}", "@Override\n\tpublic void LoadContent()\n\t{\n\t\tspriteBatch = new SpriteBatch(getGraphicsDevice());\n\t\t\n\t\tbackground = Texture2D.FromStream(getGraphicsDevice(), TitleContainer.OpenStream(\"test.png\"));\n\t\t\n\t\t//background = Content.Load(\"test.png\");\n\t\t\n\t\t// TODO: use this.Content to load your game content here\n\t}", "public Texture setBackgroundImage(){\n\t\tList<String> backgroundSelection = new ArrayList<String>();\n\t\t\n//\t\tAdds the universal background images to the List\n\t\ttry{Element root = new XmlReader().parse(Gdx.files.internal(\"gameImages.xml\"));\n\t\tElement selection = root.getChildByName(\"Universal\");\n\t\tArray<Element> backgroundArray = selection.getChildrenByName(\"background\");\n\t\tfor (int i = 0; i < backgroundArray.size; i++)\n\t\t\tbackgroundSelection.add(backgroundArray.get(i).getText());\n\t\t}\n\t\tcatch(IOException e){\n\t\t}\n\t\t\n//\t\tUse of xml file readers to add strings to the balls List\n\t\ttry{Element root = new XmlReader().parse(Gdx.files.internal(\"gameImages.xml\"));\n\t\tElement selection = root.getChildByName(\"artist\");\n\t\tElement artist = selection.getChildByName(formatName(game.getArtist()));\n\t\tArray<Element> backgroundSelectArray = artist.getChildrenByName(\"background\");\n\t\tfor (int i = 0; i < backgroundSelectArray.size; i++)\n\t\t\tbackgroundSelection.add(backgroundSelectArray.get(i).getText());\n\t\t}\n\t\tcatch(IOException e){\n\t\t}\n\t\t\n//\t\tRandom number generator to choose a random image as the ball image\n\t\tint randomBackground = (int) Math.random() * backgroundSelection.size();\n\t\tFileHandle backgroundImage = Gdx.files.internal(backgroundSelection.get(randomBackground));\n\t\treturn new Texture(backgroundImage) ;\n\t}", "public static void create(){\n\t\tstage = new Stage(new StretchViewport(1680, 1050)); \n\t\tCamera camera = stage.getCamera();\n\t\tcamera.update();\n\n\t\t//Instantiate the Managers\n\t\tGdx.input.setInputProcessor(getStage());\t\n\t\tstage.getActors().clear();\n\t\t\n\t\tmapManager = new Game_Map_Manager();\n\t\tmapManager.create(getStage());\n\t\t\n\t\tGame_CardHand cardHand = new Game_CardHand();\n\t\tcardHand.create(getStage());\n\n\t\tGameScreenUI actorManager = new GameScreenUI();\n\t\tactorManager.create(getStage());\n\n\t\tTrainDepotUI trainDepot = new TrainDepotUI();\n\t\ttrainDepot.create(getStage());\n\n\t\tGoalMenu goalScreenManager = new GoalMenu();\n\t\tgoalScreenManager.create(getStage());\n\t\t\n\t\tPlayerGoals ticketManager = new PlayerGoals();\n\t\tticketManager.create(getStage());\t\n\t\t\n\t\tGame_StartingSequence startgameManager = new Game_StartingSequence(replayMode);\n\t\tstartgameManager.create(getStage());\n\t\t\n\t\tGame_Shop shop = new Game_Shop();\n\t\tshop.create(getStage());\n\t\t\n\t\tGame_PauseMenu pauseMenu= new Game_PauseMenu();\n\t\tpauseMenu.create(getStage());\n\t\t\n\t\tWarningMessage warningMessage = new WarningMessage();\n\t\twarningMessage.create(getStage());\n\t\t\n\t\tif (replayMode){\n\t\t\tReplayModeUI replayUI = new ReplayModeUI();\n\t\t\treplayUI.create(getStage());\n\t\t\t\n\t\t\tif (Game_StartingSequence.inProgress){\n\t\t\t\tWorldMap replayMap = WorldMap.getInstance();\n\t\t\t\tGame_StartingSequence.player1 = false;\n\t\t\t\t\n\t\t\t\tStation p1station = replayMap.stationsList.get(0);\n\t\t\t\tfor (Station station : replayMap.stationsList){\n\t\t\t\t\tif (station.getName().equals(LocomotionCommotion.getReplayTurn().getJSONObject(\"player1\").getJSONArray(\"stations\").getJSONObject(0).getString(\"stationName\"))){\n\t\t\t\t\t\tp1station = station;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tStation p2station = replayMap.stationsList.get(1);\n\t\t\t\tfor (Station station : replayMap.stationsList){\n\t\t\t\t\tif (station.getName().equals(LocomotionCommotion.getReplayTurn().getJSONObject(\"player2\").getJSONArray(\"stations\").getJSONObject(0).getString(\"stationName\"))){\n\t\t\t\t\t\tp2station = station;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcreateCoreGame(p1station, p2station);\n\t\t\t\tGame_StartingSequence.startGame();\n\t\t\t\tGameScreenUI.refreshResources();\n\t\t\t\tGame_StartingSequence.inProgress = false;\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void onLoadResources() {\n\t\tBitmapTextureAtlasTextureRegionFactory.setAssetBasePath(\"gfx/\");\t\t\n\t\tmBitmapParralaxTextureAtlas=new BitmapTextureAtlas(1024,1024);\n\t\tmBitmapTextureAtlas=new BitmapTextureAtlas(512, 512);\n\t\tmTextureRegion=BitmapTextureAtlasTextureRegionFactory.createFromAsset(mBitmapParralaxTextureAtlas, this, \"parallax_background_layer_back.png\", 0, 0);\n\t\tbananaRegion=BitmapTextureAtlasTextureRegionFactory.createTiledFromAsset(mBitmapTextureAtlas, this, \"banana_tiled.png\", 0, 0, 4,2);\n\t\tmEngine.getTextureManager().loadTextures(mBitmapParralaxTextureAtlas,mBitmapTextureAtlas);\n\t}", "private void createBackground()\n {\n GreenfootImage background = getBackground();\n background.setColor(Color.BLACK);\n background.fill();\n }", "public void run() throws Exception {\n settings = WindowSettings.builder()\n// .setWindowMode( WindowMode.FULLSCREEN )\n// .setWindowMode( WindowMode.BORDERLESS )\n .setWindowMode( WindowMode.WINDOWED )\n .setMonitorIndex( 1 )\n .setResizeable( true )\n// .setPositionX( -1920 )\n// .setWidth( -1 )\n// .setHeight( -1 )\n .build();\n \n //Here most likely we will only use Rectangle for objects like bullets and characters and RectangleGrid for terrain\n //RectangleGrid provides nice method for translating array position into rendered space position so they can be shared for same terrains\n //Texture path can be either file in filesystem or within jar\n var texture1 = Texture.create( \"resources/First Oracle/grid.png\" );\n var texture2 = Texture.create( \"resources/First Oracle/texture3D.png\" );\n var overlayObject = new DirectableRectangle();\n overlayObject.setTexture( texture1 );\n \n //Example initialisation of map\n var terrain = new StaticCubeGrid();\n terrain.setTexture( texture2 );\n \n var array = new CubeGrid[ 20 ][ 10 ][ 20 ];\n \n for ( var x = 0; x < 20; x++ ) {\n for ( var y = 0; y < 10; y++ ) {\n for ( var z = 0; z < 20; z++ ) {\n array[ x ][ y ][ z ] = terrain;\n }\n }\n }\n \n //GridRenderer will be changed so it works as either 2D or 3D. For now leave it as it is so you can see whether the rendering still works.\n grid3DRenderer = new BoundedGrid3D( 100, 25, 5 );\n grid2DRenderer = new DummyGrid2D();\n //Rendered scene is what is displayed via OpenGL rendering, it should be most likely moved to SceneProvider\n //Which will provide next scenes to renderObject when something changes.\n renderedScene = new RenderableSceneMutable( settings );\n \n //Scene provider could be used for providing different scenes. For example one for open credits, one for main menu and one for game.\n //New scenes could be created when other scene is presented and immediately switched to when ready.\n //Now we are providing one scene so this simple lambda can be used instead.\n sceneProvider = () -> renderedScene ;\n\n //Overlay is rendered on top of anything so it's good for UI elements, although only 2D objects are supported.\n RegistrableOverlay overlay = new RegistrableOverlayImpl();\n overlay.registerOverlay( overlayObject );\n renderedScene.setOverlay( overlay );\n \n //Renderer is class that contains all information like scenes and grids.\n renderer = new WindowRenderer(\n grid2DRenderer,\n grid3DRenderer,\n sceneProvider\n );\n \n //Window is window displayed with OpenGL\n //Also it initialises OpenGL (via init()) content and initialises most of the objects passed via parameters\n //It also contains rendering loop which is done via run() method, best if called as another thread since it will block current thread for ever.\n window = WindowBuilder.simpleWindow( settings, renderer ).build();\n \n //Camera controller provides two cameras: 2D and 3D, which are updated corresponding to used input.\n cameraController = CameraController.createAndStart( window, settings, CameraKeyMap.getFunctionalKeyLayout(), 10, 15f );\n \n //Now the Scene3D is being set up like camera, which objects etc.\n //Scene2D is similar but you are providing 2D Objects instead of 3D\n //Scenes 2D and 3D are designed to be used for in game objects like characters, terrain or items\n renderedScene.setScene3D( new RenderableScene3DImpl( cameraController.getCamera3D(), Collections.emptyList(), array, FirstOracleConstants.INDEX_ZERO_3I ) );\n \n //Background is bunch of 2D objects rendered beneath other elements, so could be used for background images or skybox.\n //It also provides background colour which can be seen when there are no objects displayed in some places.\n renderedScene.setBackground( new RenderableBackgroundImpl( IdentityCamera2D.getCamera(), Collections.emptyList(), FirstOracleConstants.WHITE ) );\n \n overlay.registerOverlay( new FpsCounter( window ) );\n \n //At last the window loop must be run in this thread. ( or thread where init() was called )\n window.run();\n }", "private void createInstructionManual() {\n TextButton mainMenuButton = new TextButton(\"Main Menu\", skin);\n mainMenuButton.addListener(\n new ChangeListener() {\n @Override\n public void changed(ChangeEvent changeEvent, Actor actor) {\n game.setScreen(GdxGame.ScreenType.MAIN_MENU);\n }\n });\n\n\n Image bgImage = new Image(ServiceLocator.getResourceService()\n .getAsset(\"game-instruction/tutorialScreen_new.png\", Texture.class));\n bgImage.setScaling(Scaling.fit);\n buttonTable = new Table();\n buttonTable.setFillParent(true);\n buttonTable.top().left();\n buttonTable.add(mainMenuButton);\n\n bgTable = new Table();\n bgTable.setFillParent(true);\n bgTable.center();\n bgTable.add(bgImage);\n // add the board to the stage first so that its can be under of score data\n stage.addActor(bgTable);\n stage.addActor(buttonTable);\n\n\n }", "void createStage(Stage stage){\n\t\tstage.setHeight(background.getHeight()+25);//displays full image (1)\r\n\t\tstage.setWidth(background.getWidth());\r\n\t\tshowBackground.setFitWidth(stage.getWidth());\r\n\t\tshowBackground.setFitHeight(stage.getHeight()-23);//displays full image (1)\r\n\t\r\n\t\tstage.setAlwaysOnTop(true);\r\n\t\tstage.setResizable(false);\r\n\t\t\r\n\t\t//launches first window in center of screen. \r\n\t\tstage.centerOnScreen();\r\n\t\tstage.setScene(mainScene);\r\n\t\tstage.setTitle(\"Don't Play Games in Class\");\r\n\t\t//supposed to prevent window from being moved\r\n\t\t\r\n\t\t//removes minimize, maximize and close buttons\r\n\t\t//unused because replacing the \r\n\t\t//stage.initStyle(StageStyle.UNDECORATED);\r\n\t\t\r\n\t\t//removes minimize and maximize button\r\n\t\tstage.initStyle(StageStyle.UTILITY);\r\n\t\t\r\n\t\t//replaces the closed window in the center of the screen.\r\n\t\tRespawn launch = new Respawn();\r\n\t\tstage.setOnCloseRequest(launch);\r\n\t}", "@Override\n public void start(Stage primaryStage) {\n primaryStage.setOnCloseRequest(new EventHandler<WindowEvent>() {\n @Override\n public void handle(WindowEvent t) {\n Platform.exit();\n System.exit(0);\n }\n });\n\n // Set up the Stage.\n Group root = new Group();\n Scene scene = new Scene(root, SCENE_WIDTH, SCENE_HEIGHT);\n\n this.spriteList = new ArrayList<Sprite>();\n\n Sprite sprite = new hoffmanm2();\n sprite.setName(\"Geralt\");\n sprite.setSize(76, 77);\n sprite.setPosition(74, 51);\n sprite.setVelocity(10, 7);\n root.getChildren().add(sprite);\n this.spriteList.add(sprite);\n\n // Show the UI.\n primaryStage.setScene(scene);\n primaryStage.show();\n\n // Set up the timer to run the animation. Note that there are\n // more standard ways to run an animation with JavaFX, but this one\n // is extremely explicit, and easiest to understand and control at first.\n this.setUpAnimationTimer();\n }", "@Override\r\n\tpublic void create() {\n\t\tsuper.create();\r\n\t\t// Ground\r\n\t\tBodyDef groundBodyDef = new BodyDef();\r\n\t\tgroundBody = world.createBody(groundBodyDef);\r\n\t\tEdgeShape edgeShape = new EdgeShape();\r\n\t\tedgeShape.set(new Vector2(50.0f, 0.0f), new Vector2(50.0f, 0.0f));\r\n\t\tgroundBody.createFixture(edgeShape, 0.0f);\r\n \r\n\t\tcreateFirstGroupShape();\r\n\t\t// the second group\r\n\t\tcreateSecondGroupShape();\r\n\t}", "public void create() {\n connect();\n batch = new SpriteBatch();\n font = new BitmapFont();\n\n audioManager.preloadTracks(\"midlevelmusic.wav\", \"firstlevelmusic.wav\", \"finallevelmusic.wav\", \"mainmenumusic.wav\");\n\n mainMenuScreen = new MainMenuScreen(this);\n pauseMenuScreen = new PauseMenuScreen(this);\n settingsScreen = new SettingsScreen(this);\n completeLevelScreen = new CompleteLevelScreen(this);\n completeGameScreen = new CompleteGameScreen(this);\n\n setScreen(mainMenuScreen);\n }", "void setup() {\n size(2048, 2048); //sets size of canvas\n \n //names entities and their position\n player = new Sprite(tankURL, 100, 400, 100, 100);\n smbulletbase = new Sprite(tankbulletURL, 100, 400, 100, 100);\n enemyBase = new Sprite(enemytankURL, 100, 400, 100, 100);\n medkit = new Sprite(healthURL, 100, 400, 100, 100);\n kaboomBase = new Sprite(explosionURL, 100, 400, 100, 100);\n minigun = new Sprite(minigunURL, 100, 400, 100, 100);\n coilgun = new Sprite(coilgunURL, 100, 400, 100, 100);\n \n \n //sets size of some pictures\n smbulletbase.setSize(50, 50);\n minigun.setSize(150,150);\n coilgun.setSize(150,150);\n \n //initialization of scene switcher library\n scsw = new SceneSwitcher();\n scsw.addScene(\"Title\", new Scene(() -> drawTitle()));\n scsw.addScene(\"Game\", new Scene(() -> drawGame()));\n scsw.addScene(\"Death\", new Scene(() -> drawDeath()));\n \n \n //sets players front angle\n player.frontAngle(90);\n \n //sets up audio library\n ktAudio = new KTAudioController(this);\n clickEffect = new KTSound(this, gunshotURL);\n ktAudio.add(clickEffect);\n \n\n}", "@Override\n\tpublic void create() {\n\t\t// This should come from the platform\n\t\theight = platform.getScreenDimension().getHeight();\n\t\twidth = platform.getScreenDimension().getWidth();\n\n\t\t// create the drawing boards\n\t\tsb = new SpriteBatch();\n\t\tsr = new ShapeRenderer();\n\n\t\t// Push in first state\n\t\tgsm.push(new CountDownState(gsm));\n//\t\tgsm.push(new PlayState(gsm));\n\t}", "@Override\n protected void initGame() {\n\n// entityBuilder()\n// .view(new Rectangle(64, 64, Color.BLUE))\n// .buildAndAttach();\n//\n// entityBuilder()\n// .at(getAppWidth() - 64, getAppHeight() - 64)\n// .view(new Rectangle(64, 64, Color.BLUE))\n// .buildAndAttach();\n//\n// entityBuilder()\n// .at(0, getAppHeight() / 2 - 32)\n// .view(new Rectangle(64, 64, Color.BLUE))\n// .with(new ProjectileComponent(new Point2D(1, 0), 150))\n// .buildAndAttach();\n }", "public GalaxyScreen(ProjectSurvival game){\n super();\n this.game = game;\n backGroundTexture = new Texture(Gdx.files.internal(\"images/GalaxyScreenBackground.jpg\"));\n backgroundSprite = new Sprite(backGroundTexture);\n dragonCurve1 = DragonCurveGenerator.generateDragonCurve(Const.WORLD_WIDTH, Const.WORLD_HEIGHT, RECURSIONS, new Vector2(5, 0));\n dragonCurve2 = DragonCurveGenerator.generateDragonCurve(Const.WORLD_WIDTH, Const.WORLD_HEIGHT, RECURSIONS, new Vector2(-5, 0));\n dragonCurve3 = DragonCurveGenerator.generateDragonCurve(Const.WORLD_WIDTH, Const.WORLD_HEIGHT, RECURSIONS, new Vector2(0, 5));\n dragonCurve4 = DragonCurveGenerator.generateDragonCurve(Const.WORLD_WIDTH, Const.WORLD_HEIGHT, RECURSIONS, new Vector2(0, -5));\n myCamera = new MyCamera(game);\n ab = new ActionButton(game, batch, renderer, new Vector2(1400, 30), new Vector2(300, 15), \"Return to Observatory\");\n origins = new ArrayList<Vector2>();\n destinations = new ArrayList<Vector2>();\n layout = new GlyphLayout();\n generator = new FreeTypeFontGenerator(Gdx.files.internal(\"fonts/goodTimes.ttf\"));\n parameter = new FreeTypeFontGenerator.FreeTypeFontParameter();\n parameter.size = 15;\n font = generator.generateFont(parameter);\n font.setColor(Color.WHITE);\n\n int nb = Integer.parseInt(GameScreen.database.getOneData(\"SELECT Count(*) FROM Systems WHERE Description = 'May_welcome_life' \"));\n for(int i = 0; i<nb; i++){\n favouriteX.add(Float.parseFloat(GameScreen.database.getOneData(\"SELECT SystemX FROM Systems WHERE Description = 'May welcome life' ;\")));\n favouriteY.add(Float.parseFloat(GameScreen.database.getOneData(\"SELECT SystemY FROM Systems WHERE Description = 'May welcome life' ;\")));\n }\n }", "public static void preloadAllAssets() {\r\n\t\tbackground = new Image(fileURL(\"./assets/gifs/background.gif\"));\r\n\r\n\t\tbackgroundGif = new Background(new BackgroundImage(background, BackgroundRepeat.NO_REPEAT, BackgroundRepeat.NO_REPEAT, BackgroundPosition.DEFAULT, BackgroundSize.DEFAULT));\r\n\r\n\t\t//Michael Bay Mode gifs\r\n\t\tcollisionGif = new Image(fileURL(\"./assets/gifs/collision.gif\"));\r\n\t\trunAwayGif = new Image(fileURL(\"./assets/gifs/run_away.gif\"));\r\n\r\n\t\t//Regular Simulation Images \r\n\t\tearthImage = new ImagePattern(new Image(fileURL(\"./assets/images/earth.png\")));\r\n\t\tneptuneImage = new ImagePattern(new Image(fileURL(\"./assets/images/neptune.png\")));\r\n\t\tsunImage = new ImagePattern(new Image(fileURL(\"./assets/images/sun.png\")));\r\n\t\tstarImage = new ImagePattern(new Image(fileURL(\"./assets/images/star.png\")));\r\n\t\tmarsImage = new ImagePattern(new Image(fileURL(\"./assets/images/mars.png\")));\r\n\t\tmoonImage = new ImagePattern(new Image(fileURL(\"./assets/images/moon.png\")));\r\n\t\tasteroidImage = new ImagePattern(new Image(fileURL(\"./assets/images/asteroid.png\")));\r\n\r\n\t\t//Michael Bay mode images\r\n\t\tmichaelBayExplosionImage = new ImagePattern(new Image(fileURL(\"./assets/images/bay_explosion.jpg\")));\r\n\t\tmichaelBayPointingImage = new Image(fileURL(\"./assets/images/bay_pointing.jpg\"));\r\n\t\tmichaelBayGangsterImage = new ImagePattern(new Image(fileURL(\"./assets/images/bay_gangster.jpg\")));\r\n\t\tgenericExplosionImage = new ImagePattern(new Image(fileURL(\"./assets/images/generic_explosion.png\")));\r\n\t\tusaFlagImage = new Image(fileURL(\"./assets/images/usa_flag.jpg\"));\r\n\t\tusaBackground = new Background(new BackgroundImage(usaFlagImage, BackgroundRepeat.NO_REPEAT, BackgroundRepeat.NO_REPEAT, BackgroundPosition.DEFAULT, BackgroundSize.DEFAULT));\r\n\t}", "private BranchGroup getScene(){\n BranchGroup scene = new BranchGroup();\r\n\r\n // transformgroup zawierający robota oraz podłoże\r\n world = new TransformGroup();\r\n world.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);\r\n world.setCapability(TransformGroup.ALLOW_CHILDREN_EXTEND);\r\n world.setCapability(TransformGroup.ALLOW_CHILDREN_READ);\r\n world.setCapability(TransformGroup.ALLOW_CHILDREN_WRITE);\r\n TransformGroup robotTg;\r\n\r\n // nasz robot pobrany z klasy Robot\r\n robotTg = robot.getGroup();\r\n robotTg.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);\r\n world.addChild(robotTg);\r\n\r\n // tworzenie scian\r\n float szerokoscScian = 10f;\r\n makeWalls(szerokoscScian);\r\n\r\n // tworzenie podłoża\r\n TransformGroup ground = new TransformGroup();\r\n Shape3D gr = new MyShapes().makeGround(new Point3f(szerokoscScian, 0f, szerokoscScian),\r\n new Point3f(szerokoscScian, 0f, -szerokoscScian), new Point3f(-szerokoscScian, 0f, -szerokoscScian),\r\n new Point3f(-szerokoscScian, 0f, szerokoscScian));\r\n gr.setUserData(new String(\"ground\"));\r\n Appearance appGround = new Appearance();\r\n appGround.setTexture(createTexture(\"grafika/floor.jpg\"));\r\n gr.setAppearance(appGround);\r\n\r\n // detekcja kolizji dla ziemi\r\n CollisionDetector collisionGround = new CollisionDetector(gr, new BoundingSphere(), this, robot);\r\n ground.addChild(gr);\r\n world.addChild(collisionGround);\r\n world.addChild(ground);\r\n\r\n // światła\r\n Color3f light1Color = new Color3f(1.0f, 1.0f, 1.0f);\r\n Vector3f light1Direction = new Vector3f(4.0f, -7.0f, -12.0f);\r\n BoundingSphere bounds = new BoundingSphere(new Point3d(0.0, 0.0, 0.0), 100.0);\r\n\r\n DirectionalLight light1 = new DirectionalLight(light1Color, light1Direction);\r\n light1.setInfluencingBounds(bounds);\r\n scene.addChild(light1);\r\n\r\n // obiekt do podnoszenia\r\n object = new Sphere(0.15f, robot.createAppearance(new Color3f(Color.ORANGE)));\r\n object.getShape().setUserData(new String(\"object\"));\r\n objectTransform = new Transform3D();\r\n objectTransform.setTranslation(objPos);\r\n objectTg = new TransformGroup(objectTransform);\r\n objectTg.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);\r\n objectTg.addChild(object);\r\n objectGroup = new BranchGroup();\r\n objectGroup.setCapability(BranchGroup.ALLOW_DETACH);\r\n objectGroup.addChild(objectTg);\r\n world.addChild(objectGroup);\r\n\r\n // klasa behavior która służy do obsługiwania klawiatury\r\n Moving moving = new Moving(robot);\r\n moving.setSchedulingBounds(bounds);\r\n world.addChild(moving);\r\n\r\n // klasa behavior która odświeża się 60 razy na sekundę i odpowiada ona np. za nagrywanie, odtworzenie nagrania\r\n // symulowanie grawitacji\r\n loop = new GameLoop(this, robot);\r\n loop.setSchedulingBounds(bounds);\r\n world.addChild(loop);\r\n\r\n // detekcja kolizji dla obiektu\r\n CollisionDetector collisionObject = new CollisionDetector(object.getShape(), new BoundingSphere(new Point3d(), 0.15), this, robot);\r\n world.addChild(collisionObject);\r\n\r\n scene.addChild(world);\r\n\r\n scene.compile();\r\n return scene;\r\n }", "public void act() \n {\n setImage(\"1up.png\");\n setImage(\"acrate.png\");\n setImage(\"Betacactus.png\");\n setImage(\"bullet1.png\");\n setImage(\"bullet2.png\");\n setImage(\"burst.png\");\n setImage(\"cowboy.png\");\n setImage(\"fOxen1.png\");\n setImage(\"fOxen2.png\");\n setImage(\"fOxen3.png\");\n setImage(\"fOxen4.png\");\n setImage(\"fOxenH.png\");\n setImage(\"fWagon1.png\");\n setImage(\"fWagon2.png\");\n setImage(\"fWagon3.png\");\n setImage(\"fWagon4.png\");\n setImage(\"fWagonH.png\");\n setImage(\"health.png\");\n setImage(\"indian.png\");\n setImage(\"normal.png\");\n setImage(\"oxen.png\");\n setImage(\"oxen2.png\");\n setImage(\"oxen3.png\");\n setImage(\"oxen4.png\");\n setImage(\"oxen-hit.png\");\n setImage(\"plasma.png\");\n setImage(\"rapid.png\");\n setImage(\"snake1.png\");\n setImage(\"snake2.png\");\n setImage(\"snake3.png\");\n setImage(\"snake4.png\");\n setImage(\"spread.png\");\n setImage(\"theif.png\");\n setImage(\"train1.png\");\n setImage(\"train-hit.png\");\n setImage(\"wagon.png\");\n setImage(\"wagonhit.png\");\n setImage(\"wave.png\");\n getWorld().removeObject(this);\n }", "public MyWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1); \n for( int i = 0; i < IMAGE_COUNT; i++)\n {\n images[i] = new GreenfootImage(\"frame_\" + i + \"_delay-0.06s.gif\");\n }\n \n setBackground(images [0]); \n \n }", "public DumbEnemy(){\n setImage(new GreenfootImage(SPRITE_W,SPRITE_H));\n }", "private void initialize() {\n\n this.levelName = \"Green 3\";\n this.numberOfBalls = 2;\n int ballsRadius = 5;\n Color ballsColor = Color.white;\n this.paddleHeight = (screenHeight / 27);\n this.paddleWidth = (screenWidth / 8);\n this.paddleSpeed = 11;\n int surroundingBlocksWidth = 30;\n this.paddleColor = new Color(1.0f, 0.699f, 0.000f);\n this.paddleUpperLeft = new Point(screenWidth / 2.2, screenHeight - surroundingBlocksWidth\n - this.paddleHeight);\n Color backgroundColor = new Color(0.000f, 0.420f, 0.000f);\n this.background = new Block(new Rectangle(new Point(0, 0), screenWidth + 1\n , screenHeight + 2), backgroundColor);\n this.background.setNumber(-1);\n\n Color[] colors = {Color.darkGray, Color.red, Color.yellow, Color.blue, Color.white};\n int blocksRowsNum = 5;\n int blocksInFirstRow = 10;\n int blocksWidth = screenWidth / 16;\n int blockHeight = screenHeight / 20;\n int firstBlockYlocation = screenHeight / 4;\n int removableBlocks = 0;\n Block[][] stairs = new Block[blocksRowsNum][];\n //blocks initialize.\n for (int i = 0; i < blocksRowsNum; i++, blocksInFirstRow--) {\n int number;\n for (int j = 0; j < blocksInFirstRow; j++) {\n if (i == 0) {\n number = 2; //top row.\n } else {\n number = 1;\n }\n stairs[i] = new Block[blocksInFirstRow];\n Point upperLeft = new Point(screenWidth - (blocksWidth * (j + 1)) - surroundingBlocksWidth\n , firstBlockYlocation + (blockHeight * i));\n stairs[i][j] = new Block(new Rectangle(upperLeft, blocksWidth, blockHeight), colors[i % 5]);\n if (stairs[i][j].getHitPoints() != -2 && stairs[i][j].getHitPoints() != -3) { // not death or live block\n stairs[i][j].setNumber(number);\n removableBlocks++;\n }\n this.blocks.add(stairs[i][j]);\n }\n\n }\n this.numberOfBlocksToRemove = (int) (removableBlocks * 0.5); //must destroy half of them.\n this.ballsCenter.add(new Point(screenWidth / 1.93, screenHeight * 0.9));\n this.ballsCenter.add(new Point(screenWidth / 1.93, screenHeight * 0.9));\n List<Velocity> v = new ArrayList<>();\n v.add(Velocity.fromAngleAndSpeed(45, 9));\n v.add(Velocity.fromAngleAndSpeed(-45, 9));\n this.ballsFactory = new BallsFactory(this.ballsCenter, ballsRadius, ballsColor,\n screenWidth, screenHeight, v);\n\n //bodies.\n //tower.\n Block base = new Block(new Rectangle(new Point(surroundingBlocksWidth + screenWidth / 16, screenHeight * 0.7)\n , screenWidth / 6, screenHeight * 0.3), Color.darkGray);\n base.setNumber(-1);\n this.bodies.add(base);\n Block base2 = new Block(new Rectangle(new Point(base.getCollisionRectangle().getUpperLine()\n .middle().getX() - base.getWidth() / 6\n , base.getCollisionRectangle().getUpperLeft().getY() - base.getHeight() / 2.5), base.getWidth() / 3\n , base.getHeight() / 2.5), Color.gray);\n base2.setNumber(-1);\n this.bodies.add(base2);\n Block pole = new Block(new Rectangle(new Point(base2.getCollisionRectangle().getUpperLine().middle().getX()\n - base2.getWidth() / 6, base2.getCollisionRectangle().getUpperLeft().getY() - screenHeight / 3)\n , base2.getWidth() / 3, screenHeight / 3), Color.lightGray);\n pole.setNumber(-1);\n this.bodies.add(pole);\n\n double windowWidth = base.getWidth() / 10;\n double windowHeight = base.getHeight() / 7;\n double b = base.getWidth() / 12;\n double h = base.getHeight() / 20;\n for (int i = 0; i < 6; i++) { //windows of tower.\n for (int j = 0; j < 5; j++) {\n Block window = new Block(new Rectangle(new Point(base.getCollisionRectangle().getUpperLeft().getX() + b\n + (windowWidth + b) * j,\n base.getCollisionRectangle().getUpperLeft().getY() + h + (windowHeight + h) * i), windowWidth\n , windowHeight), Color.white);\n window.setNumber(-1);\n this.bodies.add(window);\n }\n }\n\n //circles on the top of the tower.\n Circle c1 = new Circle(pole.getCollisionRectangle().getUpperLine().middle().getX()\n , pole.getCollisionRectangle().getUpperLine().middle().getY() - 17, 17, Color.black, \"fill\");\n Circle c2 = new Circle(pole.getCollisionRectangle().getUpperLine().middle().getX()\n , pole.getCollisionRectangle().getUpperLine().middle().getY() - 17, 12, Color.darkGray, \"fill\");\n Circle c3 = new Circle(pole.getCollisionRectangle().getUpperLine().middle().getX()\n , pole.getCollisionRectangle().getUpperLine().middle().getY() - 17, 7, Color.red, \"fill\");\n this.bodies.add(c1);\n this.bodies.add(c2);\n this.bodies.add(c3);\n\n\n }", "public void initialize() {\n\t\tImageIcon bg = new ImageIcon(\"bg.png\");\n\t\tBackground = (bg.getImage().getScaledInstance(bg.getIconWidth(), bg.getIconHeight(), Image.SCALE_DEFAULT));\n\t\tImageIcon[] in1 = new ImageIcon[12];\n\t\tin1[0] = new ImageIcon(\"Hero1 Normal.png\");\n\t\tin1[1] = new ImageIcon(\"20ed.png\");\n\t\tin1[2] = new ImageIcon(\"50ed.png\");\n\t\tin1[3] = new ImageIcon(\"100ed.png\");\n\t\tin1[4] = new ImageIcon(\"200ed.png\");\n\t\tin1[5] = new ImageIcon(\"500ed.png\");\n\t\tin1[6] = new ImageIcon(\"Hero1 Att200.png\");\n\t\tin1[7] = new ImageIcon(\"Hero1 Att500.png\");\n\t\tin1[8] = new ImageIcon(\"Hero1 Defence01.png\");\n\t\tin1[9] = new ImageIcon(\"Hero1Defence02.png\");\n\t\tin1[10] = new ImageIcon(\"Hero1 to fire.png\");\n\t\tin1[11] = new ImageIcon(\"Hero1 die.png\");\n\t\tImageIcon[] in2 = new ImageIcon[12];\n\t\tin2[0] = new ImageIcon(\"Hero02.png\");\n\t\tin2[1] = new ImageIcon(\"20ed02.png\");\n\t\tin2[2] = new ImageIcon(\"50ed02.png\");\n\t\tin2[3] = new ImageIcon(\"100ed02.png\");\n\t\tin2[4] = new ImageIcon(\"200ed02.png\");\n\t\tin2[5] = new ImageIcon(\"500ed02.png\");\n\t\tin2[6] = new ImageIcon(\"Hero02 Attack02.png\");\n\t\tin2[7] = new ImageIcon(\"Hero02 Attack02.png\");\n\t\tin2[8] = new ImageIcon(\"Hero02 Defence.png\");\n\t\tin2[9] = new ImageIcon(\"Hero02 Defence.png\");\n\t\tin2[10] = new ImageIcon(\"Hero02 Attack01.png\");\n\t\tin2[11] = new ImageIcon(\"Hero02 Die.png\");\n\t\tImageIcon[] inBullet1 = new ImageIcon[3];\n\t\tinBullet1[0] = new ImageIcon(\"B1fire02.png\");\n\t\tinBullet1[1] = new ImageIcon(\"B1fire03.png\");\n\t\tinBullet1[2] = new ImageIcon(\"B1fire05.png\");\n\t\tImageIcon[] inBullet2 = new ImageIcon[5];\n\t\tinBullet2[0] = new ImageIcon(\"20.png\");\n\t\tinBullet2[1]= new ImageIcon(\"50.png\");\n\t\tinBullet2[2]= new ImageIcon(\"100.png\");\n\t\tinBullet2[3]= new ImageIcon(\"200.png\");\n\t\tinBullet2[4]= new ImageIcon(\"500.png\");\n\t\tHero1.settemplate(in2);\n\t\tHero2.settemplate(in1);\n\t\tBullet1.settemplate(inBullet2);\n\t\tBullet2.settemplate(inBullet1);\n\t\tHero1.setstatus(0);\n\t\tHero2.setstatus(0);\n\t}", "@Override\n public void draw(Batch batch, float parentAlpha) {\n\n if(vidas == 0){\n sprite.setBounds(body.getPosition().x-7,body.getPosition().y-12,16,16);\n sprite.draw(batch);\n\n }else{\n sprite.setBounds(body.getPosition().x-7,body.getPosition().y-7,16,16);\n sprite.setPosition(body.getPosition().x - 9f, body.getPosition().y - 9);\n sprite.draw(batch);\n patrullar();\n }\n\n\n }", "@Override\n public void show() {\n stage = new Stage(new FitViewport(game.SCREEN_WIDTH, game.SCREEN_HEIGHT), batch);\n Gdx.input.setInputProcessor(stage);\n\n background = game.getAssetManager().get(\"startscreen.png\");\n bgViewPort = new StretchViewport(game.SCREEN_WIDTH, game.SCREEN_HEIGHT);\n\n fonts = new Fonts();\n fonts.createSmallestFont();\n fonts.createSmallFont();\n fonts.createMediumFont();\n fonts.createLargeFont();\n fonts.createTitleFont();\n\n createButtons();\n }", "public MyWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1200, 800, 1); \n GreenfootImage bg = new GreenfootImage(\"background.jpg\");\n bg.scale(getWidth(), getHeight());\n setBackground(bg);\n initialize();\n \n }", "private void loadGraphics() {\n\t\ttopAtlas = new BitmapTextureAtlas(this.activity.getTextureManager(), 1024, 1024);\r\n\t\ttopRegion = BitmapTextureAtlasTextureRegionFactory.createFromAsset(topAtlas, activity, \"pizza_top.png\", 0, 0);\r\n\t\ttopAtlas.load();\r\n\t\t\r\n\t\t\r\n\t\tbottomAtlas = new BitmapTextureAtlas(this.activity.getTextureManager(), 1024, 1024);\r\n\t\tbottomRegion = BitmapTextureAtlasTextureRegionFactory.createFromAsset(bottomAtlas, activity, \"pizza_bottom.png\", 0, 0);\r\n\t\tbottomAtlas.load();\t\r\n\t\t\t\t\t\t\r\n\t\t\r\n\t\tbalanceAtlas = new BuildableBitmapTextureAtlas(engine.getTextureManager(), 1024, 512);\r\n\t\trod = BitmapTextureAtlasTextureRegionFactory.createFromAsset(balanceAtlas, activity, \"baserod.png\");\r\n\t\tbase = BitmapTextureAtlasTextureRegionFactory.createFromAsset(balanceAtlas, activity, \"balancebase.png\");\r\n\t\tbalanceRod = BitmapTextureAtlasTextureRegionFactory.createFromAsset(balanceAtlas, activity, \"balancerod.png\");\r\n\t\tchain = BitmapTextureAtlasTextureRegionFactory.createFromAsset(balanceAtlas, activity, \"chain.png\");\r\n\t\tpan = BitmapTextureAtlasTextureRegionFactory.createFromAsset(balanceAtlas, activity, \"pan.png\");\r\n\t\tok = BitmapTextureAtlasTextureRegionFactory.createFromAsset(balanceAtlas, activity, \"OK.png\");\r\n\t\twinner = BitmapTextureAtlasTextureRegionFactory.createFromAsset(balanceAtlas, activity, \"winner.png\");\r\n\t\ticon = BitmapTextureAtlasTextureRegionFactory.createFromAsset(balanceAtlas, activity, \"icon.png\");\r\n\t\t\r\n\t\tweight = BitmapTextureAtlasTextureRegionFactory.createFromAsset(balanceAtlas, activity, \"w.png\");\r\n\t\t\r\n\t\ttry {\r\n\t\t\tbalanceAtlas.build(new BlackPawnTextureAtlasBuilder<IBitmapTextureAtlasSource, BitmapTextureAtlas>(0, 1, 1));\r\n\t\t} catch (TextureAtlasBuilderException e) {\r\n\t\t\tLog.e(\"PLAYSCENE\", \"ERROR BUILDING BALANCEATLAS\");\r\n\t\t}\r\n\t\tbalanceAtlas.load();\r\n\t\t\r\n\t}", "@SuppressWarnings(\"unchecked\")\n private void create() {\n components.clear();\n\n if (content != null) {\n content.clearChildren();\n }\n else {\n content = new Container();\n content.setInsets(INSETS);\n }\n\n GuiComponent guiComponent = (GuiComponent) getReflectedItem().getValue();\n\n // let the user choose which type of backgroundComponent they want.\n Label label = content.addChild(new Label(\"Type\"), 0, 0);\n label.setTextHAlignment(HAlignment.Right);\n label.setInsets(INSETS);\n Container backgroundTypeContainer = content.addChild(new Container(), 0, 1);\n\n ColorRGBA oldColor = BackgroundUtils.getBackgroundColor(guiComponent);\n\n Button colorOnlyBgButton = backgroundTypeContainer.addChild(new Button(\"Color Only\"), 0, 0);\n colorOnlyBgButton.addClickCommands(source -> {\n if (!(guiComponent instanceof QuadBackgroundComponent)) {\n setValue(new QuadBackgroundComponent(oldColor));\n create();\n }\n });\n\n Button colorAndImageBgButton = backgroundTypeContainer.addChild(new Button(\"Color and Image\"), 0, 1);\n colorAndImageBgButton.addClickCommands(source -> {\n if (!(guiComponent instanceof TbtQuadBackgroundComponent)) {\n setValue(BackgroundComponents.gradient(oldColor));\n create();\n }\n });\n\n if (guiComponent instanceof QuadBackgroundComponent) {\n\n try {\n\n Method getter = QuadBackgroundComponent.class.getDeclaredMethod(\"getColor\");\n Method setter = QuadBackgroundComponent.class.getDeclaredMethod(\"setColor\", ColorRGBA.class);\n\n label = content.addChild(new Label(\"Color\"), 1, 0);\n label.setTextHAlignment(HAlignment.Right);\n label.setInsets(INSETS);\n\n ColorRGBAComponent bgColorComponent = new ColorRGBAComponent(guiComponent, getter, setter);\n content.addChild(bgColorComponent.getPanel(), 1, 1);\n components.add(bgColorComponent);\n\n // margin\n getter = QuadBackgroundComponent.class.getDeclaredMethod(\"getMargin\");\n setter = QuadBackgroundComponent.class.getDeclaredMethod(\"setMargin\", Vector2f.class);\n\n label = content.addChild(new Label(\"Margin\"), 2, 0);\n Vector2fComponent marginComponent = new Vector2fComponent(guiComponent, getter, setter);\n content.addChild(marginComponent.getPanel(), 2, 1);\n components.add(marginComponent);\n\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n }\n\n }\n else if (guiComponent instanceof TbtQuadBackgroundComponent) {\n\n TbtQuadBackgroundComponent backgroundComponent = (TbtQuadBackgroundComponent) guiComponent;\n\n try {\n Method getter = TbtQuadBackgroundComponent.class.getDeclaredMethod(\"getColor\");\n Method setter = TbtQuadBackgroundComponent.class.getDeclaredMethod(\"setColor\", ColorRGBA.class);\n\n label = content.addChild(new Label(\"Color\"), 1, 0);\n label.setTextHAlignment(HAlignment.Right);\n label.setInsets(INSETS);\n\n ColorRGBAComponent bgColorComponent = new ColorRGBAComponent(guiComponent, getter, setter);\n content.addChild(bgColorComponent.getPanel(), 1, 1);\n components.add(bgColorComponent);\n\n label = content.addChild(new Label(\"Image\"), 2, 0);\n label.setTextHAlignment(HAlignment.Right);\n label.setInsets(INSETS);\n\n Button browseImageButton = content.addChild(new Button(\"Select Background Image...\"), 2, 1);\n browseImageButton.setTextVAlignment(VAlignment.Center);\n browseImageButton.addClickCommands(source -> {\n\n JFileChooser jfc = new JFileChooser(FileSystemView.getFileSystemView().getHomeDirectory());\n jfc.setDialogTitle(\"Select a Background Image...\");\n jfc.setMultiSelectionEnabled(false);\n jfc.setFileSelectionMode(JFileChooser.FILES_ONLY);\n jfc.setAcceptAllFileFilterUsed(false);\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"PNG Images\", \"png\");\n jfc.addChoosableFileFilter(filter);\n int returnValue = jfc.showOpenDialog(null);\n\n if (returnValue == JFileChooser.APPROVE_OPTION) {\n\n File file = jfc.getSelectedFile();\n\n\n try {\n\n byte[] imageData = Files.readAllBytes(file.toPath());\n byte[] stringData = Base64.getEncoder().encode(imageData);\n\n String imageString = new String(stringData);\n\n // PanelBackground panelBackground = (PanelBackground) getReflectedProperty().getValue();\n // panelBackground.setBase64Image(imageString);\n\n Texture texture = new TextureUtils().fromBase64(imageString);\n\n backgroundComponent.setTexture(texture);\n\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n });\n\n // margin\n getter = TbtQuadBackgroundComponent.class.getDeclaredMethod(\"getMargin\");\n setter = TbtQuadBackgroundComponent.class.getDeclaredMethod(\"setMargin\", Vector2f.class);\n\n label = content.addChild(new Label(\"Margin\"), 3, 0);\n Vector2fComponent marginComponent = new Vector2fComponent(guiComponent, getter, setter);\n content.addChild(marginComponent.getPanel(), 3, 1);\n components.add(marginComponent);\n\n\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n }\n\n }\n\n//\n// this.content = new RollupPanel(\"\", contentContainer, null);\n// this.content.setOpen(false);\n//\n// // background Image\n// Container bgImageContainer = contentContainer.addChild(new Container(new SpringGridLayout(Axis.Y, Axis.X, FillMode.Last, FillMode.Last)), 0, 0);\n// Label bgImageLabel = bgImageContainer.addChild(new Label(\"Background Image\"), 0, 0);\n// bgImageLabel.setTextVAlignment(VAlignment.Center);\n// bgImageLabel.setInsets(new Insets3f(0.0F, 2.0F, 0.0F, 5.0F));\n// Button browseImageButton = bgImageContainer.addChild(new Button(\"Browse...\"), 0, 1);\n// Button removeImageButton = bgImageContainer.addChild(new Button(\"Remove\"), 0, 2);\n// bgImageContainer.addChild(new Container(), 0, 3);\n//\n// browseImageButton.addClickCommands(source -> {\n//\n// JFileChooser jfc = new JFileChooser(FileSystemView.getFileSystemView().getHomeDirectory());\n// jfc.setDialogTitle(\"Select a Background Image...\");\n// jfc.setMultiSelectionEnabled(false);\n// jfc.setFileSelectionMode(JFileChooser.FILES_ONLY);\n// jfc.setAcceptAllFileFilterUsed(false);\n// FileNameExtensionFilter filter = new FileNameExtensionFilter(\"PNG Images\", \"png\");\n// jfc.addChoosableFileFilter(filter);\n// int returnValue = jfc.showOpenDialog(null);\n//\n// if (returnValue == JFileChooser.APPROVE_OPTION) {\n//\n// File file = jfc.getSelectedFile();\n//\n// try {\n// byte[] imageData = Files.readAllBytes(file.toPath());\n// byte[] stringData = Base64.getEncoder().encode(imageData);\n//\n// String imageString = new String(stringData);\n//\n// PanelBackground panelBackground = (PanelBackground) getReflectedProperty().getValue();\n// panelBackground.setBase64Image(imageString);\n//\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n// }\n//\n// });\n//\n// removeImageButton.addClickCommands(source -> {\n// PanelBackground panelBackground = (PanelBackground) getReflectedProperty().getValue();\n// panelBackground.setBase64Image(\"\");\n// });\n//\n//\n// try {\n//\n// // color\n// Method get = PanelBackground.class.getMethod(\"getColor\");\n// Method set = PanelBackground.class.getMethod(\"setColor\", ColorRGBA.class);\n//\n// ColorRGBAComponent bgColorComponent = new ColorRGBAComponent(getReflectedProperty().getValue(), get, set);\n// bgColorComponent.setPropertyName(\"Color\");\n// contentContainer.addChild(bgColorComponent.getPanel());\n// components.add(bgColorComponent);\n//\n// // insetTop\n// get = PanelBackground.class.getMethod(\"getInsetTop\");\n// set = PanelBackground.class.getMethod(\"setInsetTop\", int.class);\n//\n// IntComponent insetTopComponent = new IntComponent(getReflectedProperty().getValue(), get, set);\n// insetTopComponent.setPropertyName(\"Inset Top\");\n// contentContainer.addChild(insetTopComponent.getPanel());\n// components.add(insetTopComponent);\n//\n// // insetLeft\n// get = PanelBackground.class.getMethod(\"getInsetLeft\");\n// set = PanelBackground.class.getMethod(\"setInsetLeft\", int.class);\n//\n// IntComponent insetLeftComponent = new IntComponent(getReflectedProperty().getValue(), get, set);\n// insetLeftComponent.setPropertyName(\"Inset Left\");\n// contentContainer.addChild(insetLeftComponent.getPanel());\n// components.add(insetLeftComponent);\n//\n// // insetBottom\n// get = PanelBackground.class.getMethod(\"getInsetBottom\");\n// set = PanelBackground.class.getMethod(\"setInsetBottom\", int.class);\n//\n// IntComponent insetBottomComponent = new IntComponent(getReflectedProperty().getValue(), get, set);\n// insetBottomComponent.setPropertyName(\"Inset Bottom\");\n// contentContainer.addChild(insetBottomComponent.getPanel());\n// components.add(insetBottomComponent);\n//\n// // insetRight\n// get = PanelBackground.class.getMethod(\"getInsetRight\");\n// set = PanelBackground.class.getMethod(\"setInsetRight\", int.class);\n//\n// IntComponent insetRightComponent = new IntComponent(getReflectedProperty().getValue(), get, set);\n// insetRightComponent.setPropertyName(\"Inset Right\");\n// contentContainer.addChild(insetRightComponent.getPanel());\n// components.add(insetRightComponent);\n//\n// // zOffset\n// get = PanelBackground.class.getMethod(\"getzOffset\");\n// set = PanelBackground.class.getMethod(\"setzOffset\", float.class);\n//\n// FloatComponent zOffsetComponent = new FloatComponent(getReflectedProperty().getValue(), get, set);\n// zOffsetComponent.setPropertyName(\"Z-Offset\");\n// contentContainer.addChild(zOffsetComponent.getPanel());\n// components.add(zOffsetComponent);\n//\n// } catch (NoSuchMethodException e) {\n// e.printStackTrace();\n// }\n\n\n }", "public void createNodes() {\n\n //Current wave text\n currentWaveText = new Text();\n currentWaveText.setY(50);\n currentWaveText.setX(Constants.GAME_WIDTH / 2 - 150);\n currentWaveText.setTextAlignment(TextAlignment.LEFT);\n currentWaveText.setFont(Font.font(\"verdana\", FontWeight.BOLD, FontPosture.REGULAR, 36));\n currentWaveText.setFill(Color.TOMATO);\n currentWaveText.setStroke(Color.BLACK);\n\n FXGL.getGameScene().addUINode(currentWaveText);\n\n //Health bar\n healthBar = new Rectangle(healthBarMaxWidth, healthBarMaxHeight, Color.LIMEGREEN);\n healthBar.setY(10);\n healthBar.setX(10);\n\n FXGL.getGameScene().addUINode(healthBar);\n\n //Health bar background\n healthBackground = new Rectangle(healthBarMaxWidth, healthBarMaxHeight);\n healthBackground.setY(10);\n healthBackground.setX(10);\n healthBackground.setFill(Color.TRANSPARENT);\n healthBackground.setStroke(Color.BLACK);\n\n FXGL.getGameScene().addUINode(healthBackground);\n\n //Amount of ammo text\n amountOfAmmoText = new Text(10, 100, \"\");\n amountOfAmmoText.setFont(Font.font(\"verdana\", FontWeight.BOLD, FontPosture.REGULAR, 24));\n amountOfAmmoText.setFill(Color.LIMEGREEN);\n amountOfAmmoText.setStroke(Color.BLACK);\n\n FXGL.getGameScene().addUINode(amountOfAmmoText);\n\n //Active weapon text\n activeWeaponText = new Text(10, 70, \"\");\n activeWeaponText.setFont(Font.font(\"verdana\", FontWeight.BOLD, FontPosture.REGULAR, 24));\n activeWeaponText.setFill(Color.LIMEGREEN);\n activeWeaponText.setStroke(Color.BLACK);\n\n FXGL.getGameScene().addUINode(activeWeaponText);\n\n //Reloading text\n reloadingText = new Text(10, 130, \"\");\n reloadingText.setFont(Font.font(\"verdana\", FontWeight.BOLD, FontPosture.REGULAR, 24));\n reloadingText.setFill(Color.LIMEGREEN);\n reloadingText.setStroke(Color.BLACK);\n\n FXGL.getGameScene().addUINode(reloadingText);\n update();\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}", "@Override\r\n\tpublic void render () {\n\t if(Gdx.input.isKeyPressed(Input.Keys.LEFT))\r\n sprMstanding.translateX(-1f);\r\n\t if(Gdx.input.isKeyPressed(Input.Keys.RIGHT))\r\n sprMstanding.translateX(1f);\r\n\r\n //sprGoomba sliding across\r\n sprGoomba.translateX(-1f);\r\n\r\n\r\n\t //background\r\n\t\tGdx.gl.glClearColor(0, 0, 1, 1);\r\n\t\tGdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);\r\n\t\tbatch.begin();\r\n\t\t//draw Mario\r\n\t\tbatch.draw(sprMstanding, sprMstanding.getX(), sprMstanding.getY(),sprMstanding.getWidth()/2,sprMstanding.getHeight()/2,\r\n sprMstanding.getWidth(),sprMstanding.getHeight(),sprMstanding.getScaleX(),sprMstanding.getScaleY(),sprMstanding.getRotation());\r\n\t\t//draw sprGoomba\r\n batch.draw(sprGoomba, sprGoomba.getX(), sprGoomba.getY(), sprGoomba.getWidth()/2,sprGoomba.getHeight()/2,\r\n sprGoomba.getWidth(), sprGoomba.getHeight(),sprGoomba.getScaleX(), sprGoomba.getScaleY(), sprGoomba.getRotation());\r\n\t\tbatch.end();\r\n\t}", "@Override\n public void simpleInitApp() {\n cam.getLocation().set(-10,12,25);\n cam.update();\n \n // Add the Scene And create collision physics to match the terrain\n Spatial scene = assetManager.loadModel(\"/Scenes/HW_2_Scene.j3o\");\n \n CollisionShape sceneShape = \n CollisionShapeFactory.createMeshShape(scene);\n landscape = new RigidBodyControl(sceneShape, 0);\n scene.addControl(landscape);\n \n //Attach the scene to the root\n rootNode.attachChild(scene);\n \n // Allows for the use of Physics simulation\n bulletAppState = new BulletAppState();\n stateManager.attach(bulletAppState);\n \n // Add the scene to the PhysicsSpace\n bulletAppState.getPhysicsSpace().add(landscape);\n \n //Create the Physics World based on the Helper class\n PhysicsTestHelper.createMyPhysicsTestWorld(rootNode, assetManager, \n bulletAppState.getPhysicsSpace(), targets);\n \n // Add the Player to the world and use the customer character \n // and input control classes\n Node sinbad = (Node)assetManager.loadModel(\"/Models/Sinbad/Sinbad.mesh.xml\");\n Node jaime = (Node)assetManager.loadModel(\"/Models/Jaime/Jaime.j3o\");\n\n // Set the starting postion and scale for the characters\n sinbad.setLocalTranslation(0, 12, 0);\n jaime.setLocalTranslation(-12, 6, 5);\n jaime.setLocalScale(4, 4, 4);\n\n \n // Add the controls for the characters \n MyGameCharacterControl sinbadControl = new MyGameCharacterControl(0.5f,2.5f,8f);\n MyGameCharacterControl jaimeControl = new MyGameCharacterControl(0.5f,2.5f,8f);\n sinbadControl.setCamera(cam);\n jaimeControl.setCamera(cam);\n sinbad.addControl(sinbadControl);\n jaime.addControl(jaimeControl);\n\n // Set the physics for the characters\n sinbadControl.setGravity(normalGravity);\n jaimeControl.setGravity(normalGravity);\n bulletAppState.getPhysicsSpace().add(sinbadControl);\n bulletAppState.getPhysicsSpace().add(jaimeControl);\n \n \n // Add the input listeners for the characters \n InputAppState sinbadAppState = new InputAppState();\n sinbadAppState.setCharacter(sinbadControl);\n stateManager.attach(sinbadAppState);\n InputAppState jaimeAppState = new InputAppState();\n jaimeAppState.setCharacter(jaimeControl);\n stateManager.attach(jaimeAppState);\n \n // Attach the characters to the root node \n rootNode.attachChild(sinbad);\n rootNode.attachChild(jaime);\n \n \n //Add a custom font and text to the scene\n BitmapFont myFont = assetManager.loadFont(\"Interface/Fonts/DroidSansMono.fnt\");\n \n\n // Create the Text that will be used for displaying hits\n BitmapText hitText = new BitmapText(myFont, true);\n hitText.setName(\"hitText\");\n hitText.setText(\"HIT !!!\");\n hitText.setColor(ColorRGBA.Red);\n hitText.setSize(guiFont.getCharSet().getRenderedSize()); \n hitText.setLocalTranslation(settings.getWidth() / 2 - hitText.getLineWidth() / 2,\n settings.getHeight() - 40, 0f);\n\n\n // Create the crosshairs for the ball shooter\n BitmapText crosshairs = new BitmapText(myFont, true); \n crosshairs.setText(\"X\");\n crosshairs.setColor(ColorRGBA.Yellow);\n crosshairs.setSize(guiFont.getCharSet().getRenderedSize());\n crosshairs.setLocalTranslation(settings.getWidth() / 2,\n settings.getHeight() / 2 + crosshairs.getLineHeight(), 0f);\n guiNode.attachChild(crosshairs); \n \n \n\n // Create the title text for the hud\n BitmapText hudText = new BitmapText(myFont, true);\n hudText.setText(\"CMSC325 Project 1\");\n hudText.setColor(ColorRGBA.Blue);\n hudText.setSize(guiFont.getCharSet().getRenderedSize());\n hudText.setLocalTranslation(settings.getWidth() / 2 - hudText.getLineWidth() / 2 ,\n settings.getHeight() - 10, 0f);\n guiNode.attachChild(hudText);\n \n\n //Add the \"bullets\" to the scene to allow the player to shoot the balls\n PhysicsTestHelper.createBallShooter(this,rootNode,bulletAppState.getPhysicsSpace(),\n sinbadAppState, targets, guiNode, hitText);\n }", "default T background(Name name) {\n return background(new ResourceUrn(new Name(\"engine\"), new Name(\"textures\"), name));\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}", "private void getTilePrefabs(){\n \n tilePrefabs = new Node[14];\n tilePrefabs[0] = (Node) animation_Scene.getChild(0);\n tilePrefabs[1] = (Node) animation_Scene.getChild(1);\n tilePrefabs[2] = (Node) animation_Scene.getChild(2);\n tilePrefabs[3] = (Node) animation_Scene.getChild(3);\n tilePrefabs[4] = (Node) animation_Scene.getChild(4);\n tilePrefabs[5] = (Node) animation_Scene.getChild(5);\n tilePrefabs[6] = (Node) animation_Scene.getChild(6);\n tilePrefabs[7] = (Node) animation_Scene.getChild(7);\n tilePrefabs[8] = (Node) animation_Scene.getChild(8);\n tilePrefabs[9] = (Node) animation_Scene.getChild(9);\n tilePrefabs[10] = (Node) animation_Scene.getChild(10);\n tilePrefabs[11] = (Node) animation_Scene.getChild(11);\n tilePrefabs[12] = (Node) animation_Scene.getChild(12);\n tilePrefabs[13] = (Node) animation_Scene.getChild(13);\n \n /* A colored lit cube. Needs light source! */ \n Material floorMat = new Material(assetManager, \"Common/MatDefs/Light/Lighting.j3md\"); \n floorMat.setBoolean(\"UseMaterialColors\", true); \n floorMat.setColor(\"Ambient\", new ColorRGBA(0.113f,0.104f, 0.128f,1));\n floorMat.setColor(\"Diffuse\", ColorRGBA.Green); \n \n Material wallMat = new Material(assetManager, \"Common/MatDefs/Light/Lighting.j3md\"); \n wallMat.setBoolean(\"UseMaterialColors\", true); \n wallMat.setColor(\"Ambient\", new ColorRGBA(0.359f,0.367f, 0.312f,1)); \n wallMat.setColor(\"Diffuse\", ColorRGBA.Green); \n \n tilePrefabs[0].setMaterial(floorMat);\n tilePrefabs[1].setMaterial(wallMat);\n tilePrefabs[2].setMaterial(wallMat);\n tilePrefabs[3].setMaterial(wallMat);\n tilePrefabs[4].setMaterial(floorMat);\n tilePrefabs[5].setMaterial(floorMat);\n tilePrefabs[6].setMaterial(floorMat);\n tilePrefabs[7].setMaterial(floorMat);\n tilePrefabs[8].setMaterial(wallMat);\n tilePrefabs[9].setMaterial(floorMat);\n tilePrefabs[10].setMaterial(floorMat);\n tilePrefabs[11].setMaterial(floorMat);\n tilePrefabs[12].setMaterial(wallMat);\n tilePrefabs[13].setMaterial(wallMat);\n }", "private void resetBackgroundSprite(Texture newSpriteTexture) {\n backgroundSprite = new Sprite(newSpriteTexture);\n backgroundSprite.setSize(screenWidth, screenHeight);\n backgroundSprite.setPosition(0, 0);\n }", "public static void makeGeometry(AssetManager am) {\n geom = am.loadModel(\"Models/container/container.j3o\");\n mat = new Material(am, \"Common/MatDefs/Misc/Unshaded.j3md\");\n Texture Tex = am.loadTexture(\n \"Textures/Container/Template/texture.png\");\n\n\n Colors.add(am.loadTexture(\n \"Textures/Container/blue.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/green.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/purple.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/red.png\"));\n companyTextures.put(\"UPS\", am.loadTexture(\n \"Textures/Container/UPS.png\"));\n companyTextures.put(\"CocaCola\", am.loadTexture(\n \"Textures/Container/cocacola.png\"));\n companyTextures.put(\"McDonalds\", am.loadTexture(\n \"Textures/Container/mac.png\"));\n\n companyTextures.put(\"Grolsch\", am.loadTexture(\n \"Textures/Container/grolsch.png\"));\n companyTextures.put(\"Heineken\", am.loadTexture(\n \"Textures/Container/heineken.png\"));\n companyTextures.put(\"Nestle\", am.loadTexture(\n \"Textures/Container/nestle.png\"));\n companyTextures.put(\"Shell\", am.loadTexture(\n \"Textures/Container/shell.png\"));\n companyTextures.put(\"DeutschePost\", am.loadTexture(\n \"Textures/Container/post.png\"));\n companyTextures.put(\"PostBank\", am.loadTexture(\n \"Textures/Container/postbank.png\"));\n companyTextures.put(\"Airfrance\", am.loadTexture(\n \"Textures/Container/airfrance.png\"));\n\n companyTextures.put(\"BallastNedam\", am.loadTexture(\n \"Textures/Container/ballastnedam.png\"));\n companyTextures.put(\"Manpower\", am.loadTexture(\n \"Textures/Container/manpower.png\"));\n\n companyTextures.put(\"Lufthansa\", am.loadTexture(\n \"Textures/Container/lufthansa.png\"));\n companyTextures.put(\"Bayer\", am.loadTexture(\n \"Textures/Container/bayer.png\"));\n\n\n companyTextures.put(\"Danone\", am.loadTexture(\n \"Textures/Container/danone.png\"));\n companyTextures.put(\"Ericsson\", am.loadTexture(\n \"Textures/Container/ericsson.png\"));\n\n companyTextures.put(\"Danone\", am.loadTexture(\n \"Textures/Container/danone.png\"));\n companyTextures.put(\"Ericsson\", am.loadTexture(\n \"Textures/Container/ericsson.png\"));\n\n\n companyTextures.put(\"OCE\", am.loadTexture(\n \"Textures/Container/oce.png\"));\n companyTextures.put(\"BeterBed\", am.loadTexture(\n \"Textures/Container/beterbed.png\"));\n\n companyTextures.put(\"TenCate\", am.loadTexture(\n \"Textures/Container/tencate.png\"));\n\n companyTextures.put(\"FederalExpress\", am.loadTexture(\n \"Textures/Container/fedex.png\"));\n companyTextures.put(\"IBM\", am.loadTexture(\n \"Textures/Container/IBM.png\"));\n companyTextures.put(\"KraftFoods\", am.loadTexture(\n \"Textures/Container/kraft.png\"));\n companyTextures.put(\"Hanjin\", am.loadTexture(\n \"Textures/Container/hanjin.png\"));\n companyTextures.put(\"CargoTrans\", am.loadTexture(\n \"Textures/Container/cargotrans.png\"));\n\n\n companyTextures.put(\"Metro\", am.loadTexture(\n \"Textures/Container/metro.png\"));\n companyTextures.put(\"Carrefour\", am.loadTexture(\n \"Textures/Container/carefour.png\"));\n companyTextures.put(\"Amstel\", am.loadTexture(\n \"Textures/Container/amstel.png\"));\n companyTextures.put(\"TransNL\", am.loadTexture(\n \"Textures/Container/transnl.png\"));\n companyTextures.put(\"Gilette\", am.loadTexture(\n \"Textures/Container/gillete.png\"));\n\n\n companyTextures.put(\"WalMart\", am.loadTexture(\n \"Textures/Container/walmart.png\"));\n companyTextures.put(\"Delhaize\", am.loadTexture(\n \"Textures/Container/delhaize.png\"));\n companyTextures.put(\"BASF\", am.loadTexture(\n \"Textures/Container/basf.png\"));\n companyTextures.put(\"SeaTrans\", am.loadTexture(\n \"Textures/Container/seatrans.png\"));\n companyTextures.put(\"DowChemical\", am.loadTexture(\n \"Textures/Container/dow.png\"));\n\n companyTextures.put(\"AXA\", am.loadTexture(\n \"Textures/Container/axe.png\"));\n companyTextures.put(\"LLyod\", am.loadTexture(\n \"Textures/Container/lloyd.png\"));\n \n companyTextures.put(\"GJMW\", am.loadTexture(\n \"Textures/Container/GJMW.png\"));\n companyTextures.put(\"WoodNorge\", am.loadTexture(\n \"Textures/Container/woodnorge.png\"));\n companyTextures.put(\"FlowersNL\", am.loadTexture(\n \"Textures/Container/flowersnl.png\"));\n \n companyTextures.put(\"FruitINT\", am.loadTexture(\n \"Textures/Container/fruitint.png\"));\n companyTextures.put(\"IntTrans\", am.loadTexture(\n \"Textures/Container/inttrans.png\"));\n companyTextures.put(\"MaasHolland\", am.loadTexture(\n \"Textures/Container/maasholland.png\"));\n\n mat.setTexture(\"ColorMap\", Tex);\n r = new Random();\n\n mat.setColor(\"Color\", ColorRGBA.White);\n\n geom.setMaterial(mat);\n }", "public void enterBackground();", "@Override\r\n public void init() {\n Image bgImage = assets().getImage(\"images/bg.png\");\r\n ImageLayer bgLayer = graphics().createImageLayer(bgImage);\r\n graphics().rootLayer().add(bgLayer);\r\n\r\n // Create tiles\r\n tiles = new int[BOARD_MAX_WIDTH][BOARD_MAX_HEIGHT];\r\n printTiles();\r\n\r\n // Place mines at random positions\r\n int placedMines = 0;\r\n Random r = new Random();\r\n while (placedMines < MINES) {\r\n int row = r.nextInt(BOARD_MAX_WIDTH);\r\n int col = r.nextInt(BOARD_MAX_HEIGHT);\r\n if (tiles[row][col] == TILE_EMPTY) {\r\n tiles[row][col] = TILE_MINE;\r\n placedMines++;\r\n }\r\n }\r\n printTiles();\r\n\r\n // Count number of mines around blank tiles\r\n for (int row = 0; row < BOARD_MAX_WIDTH; row++) {\r\n for (int col = 0; col < BOARD_MAX_WIDTH; col++) {\r\n // Check surrounding tiles if mine\r\n if (tiles[row][col] == TILE_MINE) {\r\n for (int rowCheck = -1; rowCheck <= 1; rowCheck++) {\r\n for (int colCheck = -1; colCheck <= 1; colCheck++) {\r\n if (tileExistAndNotMine(row+rowCheck, col+colCheck)) {\r\n tiles[row+rowCheck][col+colCheck]++;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n printTiles();\r\n\r\n // Create tile map\r\n Map<Integer, TileType> tileMap = new HashMap<Integer, TileType>();\r\n tileMap.put(0, TileType.EMPTY);\r\n tileMap.put(1, TileType.ONE);\r\n tileMap.put(2, TileType.TWO);\r\n tileMap.put(3, TileType.THREE);\r\n tileMap.put(4, TileType.FOUR);\r\n tileMap.put(5, TileType.FIVE);\r\n tileMap.put(6, TileType.SIX);\r\n tileMap.put(7, TileType.SEVEN);\r\n tileMap.put(8, TileType.EIGHT);\r\n tileMap.put(9, TileType.MINE);\r\n\r\n // Create a GroupLayer to hold the sprites\r\n GroupLayer groupLayer = graphics().createGroupLayer();\r\n graphics().rootLayer().add(groupLayer);\r\n\r\n // Create graphic tiles\r\n tileList = new ArrayList<Tile>();\r\n for (int row = 0; row < BOARD_MAX_WIDTH; row++) {\r\n for (int col = 0; col < BOARD_MAX_WIDTH; col++) {\r\n Tile tile = new Tile(groupLayer, col*Tile.SIZE, row*Tile.SIZE, tileMap.get(tiles[row][col]), row, col);\r\n tileList.add(tile);\r\n }\r\n }\r\n\r\n // Timer text\r\n CanvasImage canvasImage = graphics().createImage(160, 70);\r\n timerLabel = canvasImage.canvas();\r\n ImageLayer countDownLayer = graphics().createImageLayer(canvasImage);\r\n countDownLayer.setTranslation(180, 10);\r\n graphics().rootLayer().add(countDownLayer);\r\n\r\n // Cleared tiles text\r\n CanvasImage clearedTilesImage = graphics().createImage(160, 70);\r\n clearedTilesLabel = clearedTilesImage.canvas();\r\n ImageLayer clearedTilesLayer = graphics().createImageLayer(clearedTilesImage);\r\n clearedTilesLayer.setTranslation(180, 30);\r\n graphics().rootLayer().add(clearedTilesLayer);\r\n updateClearedTiles();\r\n }", "public GameObject spawnBigBeamer(LogicEngine in_logicEngine) {\n\t\tGameObject ship = new GameObject(\"data/\"+GameRenderer.dpiFolder+\"/bigbeamer.png\",((float)LogicEngine.SCREEN_WIDTH/2),LogicEngine.SCREEN_HEIGHT+64,0);\r\n\t\tship.i_animationFrameSizeHeight = 115;\r\n\t\tship.i_animationFrameSizeWidth = 115;\r\n\t\t\r\n\t\t\r\n\t\tship.stepHandlers.add(new FlyStraightStep(new Vector2d(0,-1f)));\r\n\t\t\r\n\t\r\n\t\tship.v.setMaxForce(2.5f);\r\n\t\tship.v.setMaxVel(2.5f);\r\n\t\tship.allegiance = GameObject.ALLEGIANCES.ENEMIES;\r\n\t\t\r\n\t\tint i_shootEvery = 80;\r\n\t\t\r\n\t\tBeamShot b = new BeamShot(i_shootEvery);\r\n\t\t\r\n\t\tb.b_flare=false;\r\n\t\tb.f_offsetX=-40;\r\n\t\tb.f_offsetY=-30;\r\n\t\tb.i_delay = 40;\r\n\t\tb.i_beamWidth = 15;\r\n\t\t\r\n\t\tBeamShot b2 = new BeamShot(i_shootEvery);\r\n\t\tb2.b_flare=false;\r\n\t\tb2.f_offsetX=40;\r\n\t\tb2.f_offsetY=-30;\r\n\t\tb2.i_delay = 40+(i_shootEvery/2);\r\n\t\tb2.i_beamWidth = 15;\r\n\t\tb.nextBeam = b2;\r\n\t\t\r\n\t\tship.shootEverySteps=1;\r\n\t\tship.shotHandler = b;\r\n\t\t\r\n\t\tHitpointShipCollision c = new HitpointShipCollision(ship, 100, 50f);\r\n\t\t\r\n\t\tif(!Difficulty.isHard())\r\n\t\t\tc.f_numberOfHitpoints = 200;\r\n\t\tif(!Difficulty.isMedium())\r\n\t\t\tc.f_numberOfHitpoints = 160;\r\n\t\t\r\n\t\tc.setExplosion(Utils.getBossExplosion(ship));\r\n\t\tship.collisionHandler = c;\r\n\t\t\r\n\t\tin_logicEngine.objectsEnemies.add(ship);\r\n\t\t\r\n\t\treturn ship;\r\n\t}", "Wall(Sprite sprite) {Collect.Hit(\"BoardFactory.java\",\"Wall(Sprite sprite)\");this.background = sprite; Collect.Hit(\"BoardFactory.java\",\"Wall(Sprite sprite)\", \"2420\");}", "public Boss() {\n\t\tlife = 3;\n\t\timage = new Image(\"/Model/boss3.png\", true);\n\t\tboss = new ImageView(image);\n\t\tRandom r = new Random();\n\t\tboss.setTranslateX(r.nextInt(900));\n\t\tboss.setTranslateY(0);\n\t\tisAlive = true;\n\t}" ]
[ "0.70551777", "0.7023515", "0.68938404", "0.6854403", "0.6829071", "0.67658365", "0.667587", "0.66560024", "0.6649937", "0.6551224", "0.6540914", "0.65216225", "0.6485804", "0.6455392", "0.64401096", "0.6431", "0.6392935", "0.6388278", "0.63738585", "0.63554806", "0.633177", "0.63282", "0.6325606", "0.6308842", "0.62959516", "0.6293067", "0.62929904", "0.62848866", "0.6277891", "0.6271449", "0.6258799", "0.6232232", "0.6215143", "0.62093055", "0.62093055", "0.61974096", "0.6193227", "0.618821", "0.6183635", "0.6177563", "0.6146202", "0.6141338", "0.6141097", "0.61384547", "0.60863036", "0.60666084", "0.60599756", "0.604309", "0.6034331", "0.60342413", "0.6030823", "0.60255736", "0.6013931", "0.60051566", "0.5998756", "0.59892666", "0.5957269", "0.59452647", "0.5928719", "0.5924728", "0.59200394", "0.5916362", "0.59134334", "0.5905938", "0.5901122", "0.5890644", "0.5856782", "0.58535296", "0.5850376", "0.5843049", "0.58314514", "0.58272696", "0.580042", "0.57914144", "0.57877463", "0.57772404", "0.5773565", "0.5745815", "0.5741534", "0.57331085", "0.57303435", "0.5729819", "0.5727673", "0.57214206", "0.5708477", "0.5704678", "0.56952626", "0.5692868", "0.5690668", "0.56901485", "0.56833154", "0.56804925", "0.5679793", "0.56797117", "0.567829", "0.56710386", "0.56670535", "0.5660729", "0.56536305", "0.56484705" ]
0.6799193
5
Search All Teams and his Projects
public static ArrayList<Team> findTeamProject() throws DALException { Connection cnx = null; PreparedStatement pstmt = null; ResultSet rs = null; ArrayList<Team> listTeams = new ArrayList<>(); try { // Connection DB cnx = DBConnection.connect(); pstmt = cnx.prepareStatement(LIST_TEAMS_PROJECTS); rs = pstmt.executeQuery(); // For each team while (rs.next()) { Team team = new Team(); team.setIdTeam(rs.getInt("Teams_IdTeams")); team.setName(rs.getString("Teams_name")); team.setIdProject(rs.getInt("idProjects")); team.setNameProject(rs.getString("nameProject")); listTeams.add(team); } } catch (SQLException e) { throw new DALException("Problem - listTeamHisProject - TeamDAO - Request : "+ pstmt+ " " + e.getMessage()); } finally { try { if (rs != null) rs.close(); if (pstmt != null) pstmt.close(); if (cnx != null) cnx.close(); } catch (SQLException e) { throw new DALException("Problem - Closing connection - " + e.getMessage()); } } return listTeams; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n\tpublic void findAllTeams() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: findAllTeams \r\n\t\tInteger startResult = 0;\r\n\t\tInteger maxRows = 0;\r\n\t\tList<Team> response = null;\r\n\t\tresponse = service.findAllTeams(startResult, maxRows);\r\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: findAllTeams\r\n\t}", "List<Team> findAll();", "private void search(ActionEvent x) {\n\t\tString text = this.searchText.getText();\n\t\tif (text.equals(\"\")) {\n\t\t\tupdate();\n\t\t\treturn;\n\t\t}\n\t\tboolean flag = false;\n\t\tfor (Project p : INSTANCE.getProjects()) {\n\t\t\tif (p.getName().indexOf(text) != -1) {\n\t\t\t\tif (!flag) {\n\t\t\t\t\tthis.projects.clear();\n\t\t\t\t\tflag = true;\n\t\t\t\t}\n\t\t\t\tthis.projects.addElement(p);\n\t\t\t}\n\t\t}\n\n\t\tif (!flag) {\n\t\t\tINSTANCE.getCurrentUser().sendNotification(new Notification((Object) INSTANCE, \"No results\"));\n\t\t\tthis.searchText.setText(\"\");\n\t\t}\n\t}", "List<Project> findProjectsOfAccount(String username);", "TeamResultWrapper findTeams(String personId,\n String partOfGroupname, int offset, int pageSize);", "private void search() {\n if (dateFind.getValue() == null) {\n dateFind.setValue(LocalDate.now().minusDays(DEFAULT_PERIOD));\n }\n Long days = ChronoUnit.DAYS.between(dateFind.getValue(), LocalDate.now());\n final List<Project> findProject = ServiceFactory.getProjectService().getFindProject(days, comboProject.getValue());\n observableProjects.clear();\n observableProjects.addAll(findProject);\n table.setItems(observableProjects);\n }", "public List<ProjectType> invokeQueryProjects() throws TsResponseException {\n checkSignedIn();\n\n final List<ProjectType> projects = new ArrayList<>();\n\n int currentPage = 1; // Tableau starts counting at 1\n BigInteger totalReturned = BigInteger.ZERO;\n BigInteger totalAvailable;\n\n // Loop over pages\n do {\n // Query the projects page\n final String url = getUriBuilder().path(QUERY_PROJECTS) //\n .queryParam(\"pageNumber\", currentPage) //\n .queryParam(\"pageSize\", PROJECTS_PAGE_SIZE) //\n .build(m_siteId).toString();\n final TsResponse response = get(url);\n\n // Get the projects from the response\n projects.addAll(response.getProjects().getProject());\n\n // Next page\n currentPage++;\n // NOTE: total available is the number of datasources available\n totalAvailable = response.getPagination().getTotalAvailable();\n totalReturned = totalReturned.add(response.getPagination().getPageSize());\n } while (totalReturned.compareTo(totalAvailable) < 0);\n\n return projects;\n }", "public List<Project> getAllProjects();", "public void testSearchRules() throws Exception {\n Project project = new Project();\r\n \r\n DateFormatSymbols symbols = new DateFormatSymbols(Locale.US);\r\n \r\n for (int i = 0; i < 12; i++) {\r\n \r\n String month = symbols.getMonths()[i];\r\n String shortMonth = symbols.getShortMonths()[i];\r\n \r\n // Basic project info\r\n project.setId(i);\r\n project.setCategoryId(1);\r\n project.setAllowGuests(true);\r\n project.setMembershipRequired(false);\r\n project.setApproved(true);\r\n project.setClosed(false);\r\n project.setPortal(false);\r\n \r\n // Unique Title\r\n project.setTitle(month + \" test project\");\r\n project.setShortDescription(month + \" description word\");\r\n project.setKeywords(shortMonth);\r\n \r\n // Unique Location\r\n project.setCity(\"Virginia Beach\");\r\n project.setState(\"VA\");\r\n project.setPostalCode(\"234\" + String.valueOf(50 + i));\r\n \r\n // Random Rating for now\r\n project.setRatingCount(i + 1);\r\n project.setRatingValue(project.getRatingCount() * StringUtils.rand(1, 5));\r\n project.setRatingAverage(project.getRatingValue() / project.getRatingCount());\r\n \r\n // Index it\r\n ProjectIndexer indexer = new ProjectIndexer();\r\n indexer.add(snowballWriter, project, true);\r\n }\r\n \r\n QueryParser parser = new QueryParser(\"contents\", snowballAnalyzer);\r\n \r\n {\r\n // Make sure a single matching term yields a single hit\r\n SearchBean search = new SearchBean();\r\n search.setQuery(symbols.getMonths()[0]);\r\n search.setLocation(\"Virginia Beach\");\r\n assertNotNull(search.getQuery());\r\n assertNotNull(search.getLocation());\r\n search.parseQuery();\r\n assertTrue(search.isValid());\r\n \r\n String queryString = SearchUtils.generateProjectQueryString(search, UserUtils.createGuestUser().getId(), -1, null);\r\n assertNotNull(queryString);\r\n \r\n // (approved:1)\r\n // AND (guests:1)\r\n // AND (closed:0)\r\n // AND (website:0)\r\n // AND (\"january\"^20 OR january^15 OR january*^4) AND (location:(\"virginia beach\"^30))\r\n \r\n Query query = parser.parse(queryString);\r\n Hits hits = getSnowballSearcher().search(query);\r\n assertTrue(hits.length() == 1);\r\n }\r\n \r\n {\r\n // Make sure a single matching term stem yields a single hit\r\n SearchBean search = new SearchBean();\r\n search.setQuery(symbols.getMonths()[0] + \"'s\");\r\n search.setLocation(\"Virginia Beach\");\r\n assertNotNull(search.getQuery());\r\n assertNotNull(search.getLocation());\r\n search.parseQuery();\r\n assertTrue(search.isValid());\r\n \r\n String queryString = SearchUtils.generateProjectQueryString(search, UserUtils.createGuestUser().getId(), -1, null);\r\n assertNotNull(queryString);\r\n \r\n // (approved:1)\r\n // AND (guests:1)\r\n // AND (closed:0)\r\n // AND (website:0)\r\n // AND (\"january's\"^20 OR january's^15 OR january's*^4) AND (location:(\"virginia beach\"^30))\r\n \r\n Query query = parser.parse(queryString);\r\n Hits hits = getSnowballSearcher().search(query);\r\n assertTrue(hits.length() == 1);\r\n }\r\n \r\n {\r\n // Make sure multiple matching words yield two hits\r\n SearchBean search = new SearchBean();\r\n search.setQuery(symbols.getMonths()[0] + \" \" + symbols.getMonths()[1]);\r\n search.setLocation(\"Virginia Beach\");\r\n search.parseQuery();\r\n assertTrue(search.isValid());\r\n \r\n String queryString = SearchUtils.generateProjectQueryString(search, UserUtils.createGuestUser().getId(), -1, null);\r\n assertNotNull(queryString);\r\n \r\n // (approved:1)\r\n // AND (guests:1)\r\n // AND (closed:0)\r\n // AND (website:0)\r\n // AND (\"january february\"^20 OR january^15 OR february^14 OR january*^4 OR february*^3) AND (location:(\"virginia beach\"^30))\r\n \r\n Query query = parser.parse(queryString);\r\n Hits hits = getSnowballSearcher().search(query);\r\n assertTrue(hits.length() == 2);\r\n }\r\n \r\n {\r\n // Make sure wilcards yield multiple hits\r\n SearchBean search = new SearchBean();\r\n search.setQuery(\"j\");\r\n search.setLocation(\"Virginia Beach\");\r\n search.parseQuery();\r\n assertTrue(search.isValid());\r\n \r\n // Look for data with a \"j\" for comparison\r\n int jCount = 0;\r\n for (int i = 0; i < symbols.getMonths().length; i++) {\r\n if (symbols.getMonths()[i].toLowerCase().indexOf(\"j\") > -1 ||\r\n symbols.getShortMonths()[i].toLowerCase().indexOf(\"j\") > -1) {\r\n ++jCount;\r\n }\r\n }\r\n assertTrue(jCount > 0);\r\n \r\n String queryString = SearchUtils.generateProjectQueryString(search, UserUtils.createGuestUser().getId(), -1, null);\r\n assertNotNull(queryString);\r\n \r\n // (approved:1)\r\n // AND (guests:1)\r\n // AND (closed:0)\r\n // AND (website:0)\r\n // AND (\"j\"^20 OR j^15 OR j*^4) AND (location:(\"virginia beach\"^30))\r\n \r\n Query query = parser.parse(queryString);\r\n Hits hits = getSnowballSearcher().search(query);\r\n assertTrue(hits.length() == jCount);\r\n }\r\n \r\n {\r\n // Make sure alternate locations do not yield any hits\r\n SearchBean search = new SearchBean();\r\n search.setQuery(symbols.getMonths()[0]);\r\n search.setLocation(\"Norfolk\");\r\n search.parseQuery();\r\n \r\n String queryString = SearchUtils.generateProjectQueryString(search, UserUtils.createGuestUser().getId(), -1, null);\r\n \r\n Query query = parser.parse(queryString);\r\n Hits hits = getSnowballSearcher().search(query);\r\n assertTrue(hits.length() == 0);\r\n }\r\n \r\n {\r\n // Make sure locations as query terms do not yield any hits\r\n SearchBean search = new SearchBean();\r\n search.setQuery(\"Virginia Beach\");\r\n search.setLocation(\"Virginia Beach\");\r\n search.parseQuery();\r\n \r\n String queryString = SearchUtils.generateProjectQueryString(search, UserUtils.createGuestUser().getId(), -1, null);\r\n \r\n Query query = parser.parse(queryString);\r\n Hits hits = getSnowballSearcher().search(query);\r\n assertTrue(hits.length() == 0);\r\n }\r\n }", "SearchResult<TimelineMeta> search(SearchParameter searchParameter);", "List<SearchResult> search(SearchQuery searchQuery);", "TeamResultWrapper findAllTeams(String personId, int offset,\n int pageSize);", "List<Team> findTeamsByUserId(UserId userId);", "SearchResult<TimelineMeta> search(SearchQuery searchQuery);", "public static List<String> getAllTeams() throws URISyntaxException, IOException {\n HttpClient httpClient = HttpClientBuilder.create().build();\n URIBuilder uriBuilder = new URIBuilder();\n //http://api.football-data.org/v2/teams/\n uriBuilder.setScheme(\"http\").setHost(\"api.football-data.org\").setPath(\"v2/teams/\");\n HttpGet httpGet = new HttpGet(uriBuilder.build());\n httpGet.setHeader(\"X-Auth-Token\",\"7cf82ca9d95e498793ac0d3179e1ec9f\");\n httpGet.setHeader(\"Accept\",\"application/json\");\n HttpResponse response = httpClient.execute(httpGet);\n ObjectMapper objectMapper = new ObjectMapper();\n TeamsPojo pojo = objectMapper.readValue(response.getEntity().getContent(),TeamsPojo.class);\n List<String> willBeReturned = new ArrayList<>();\n List<Teams> teams = pojo.getTeams();\n for (int i =0 ; i<teams.size();i++){\n willBeReturned.add(teams.get(i).getName());\n }\n\n\n return willBeReturned;\n }", "List<LectureDTO> search(String query);", "@Override\n\tpublic List<ProjectInfo> findProject(ProjectInfo project) {\n\t\treturn sqlSession.selectList(\"cn.sep.samp2.project.findProject\",project);\n\t}", "@Override\n\tpublic List<ProjectInfo> findAllProject() {\n\t\treturn sqlSession.selectList(\"cn.sep.samp2.project.findAllProject\");\n\t}", "@GetMapping(\"/my_projects\")\n public ResponseEntity<List<ProjectDto>> getMyProjects(){\n\n Authentication authentication = SecurityContextHolder.getContext().getAuthentication();\n String currentUserName = authentication.getName();\n User currentUser = userService.findByEmail(currentUserName).orElseThrow(\n () -> {throw new MyNotFoundException(\"User not found\");}\n );\n\n List<String> projects = Arrays.asList(currentUser.getProjects().split(\"#\"));\n\n List<ProjectDto> projectDtos = new ArrayList<>();\n for(String project : projects){\n if (projectService.findByName(project).isPresent()){\n Project temp = projectService.findByName(project).get();\n projectDtos.add(new ProjectDto(temp.getId(), temp.getName(), new CompanyDto(temp.getCompany()), temp.getStart_date(), temp.getStatus()));\n }\n }\n return ResponseEntity.ok(projectDtos);\n }", "@Override\n\tpublic List<TeamInfo> findAll() {\n\t\treturn repository.findAll();\n\t}", "public PageResult<Team> getAll() {\n\t\t\n\t\treturn null;\n\t}", "private static void search_by_name() {\r\n\t\ttry (// Creates a connection and statement object\r\n\t\t\t\tConnection conn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/PoisedPMS\",\"poisedpms\",\"poisedpms\");\r\n\t\t\t\t\r\n\t\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\t\t\r\n\t\t\t){\r\n\t\t\tScanner input = new Scanner(System.in);\r\n\t\t\r\n\t\t\tSystem.out.println(\"Project Name: \");\r\n\t\t\tString project_name = input.nextLine();\r\n\t\t\r\n\t\t\tString strSelectProject = String.format(\"SELECT * FROM projects INNER JOIN project_statuses ON \"\r\n\t\t\t\t\t+ \"projects.project_id = project_statuses.project_id;\");\r\n\t\t\tResultSet project_rset = stmt.executeQuery(strSelectProject);\r\n\t\t\t\r\n\t\t\tfetch_all_project_info(stmt, project_name, project_rset);\r\n\t\t/**\r\n\t\t * @exception If entered project name cannot be found in the projects table then an SQLException is thrown\r\n\t\t */\t\t\r\n\t\t} catch ( SQLException ex ) {\r\n\t\t\tex . printStackTrace ();\r\n\t\t}\r\n\t}", "public void querySubProjects() {\r\n\t\t// Create a task\r\n\t\tProject master = new Project();\r\n\t\tmaster.setName(\"INFRASTRUCTURE\");\r\n\t\tmaster.setDisplayName(\"Infrastructure\");\r\n\t\tmaster.setDescription(\"Project to setup the new infrastructure\");\r\n\t\tmaster = (Project) aggregateService.create(master, new Settings());\t\r\n\r\n\t\t// Create 2 dependents\r\n\t\tProject A = new Project();\r\n\t\tA.setName(\"SETUP_NETWORK\");\r\n\t\tA.setDisplayName(\"Setup network\");\r\n\t\tA.setDescription(\"Project to lay the network cables and connect to routers\");\r\n\t\tA = (Project) aggregateService.create(A, new Settings());\r\n\r\n\t\tProject B = new Project();\r\n\t\tB.setName(\"SETUP_TELEPHONE\");\r\n\t\tB.setDisplayName(\"Setup telephone\");\r\n\t\tB.setDescription(\"Setup the telephone at each employee desk\");\r\n\t\tB = (Project) aggregateService.create(B, new Settings());\r\n\r\n\t\tMap<String, Project> subProjects = new HashMap<String, Project>();\r\n\t\tsubProjects.put(A.getName(), A);\r\n\t\tsubProjects.put(B.getName(), B);\r\n\t\tmaster.setSubProjects(subProjects);\r\n\t\tmaster = (Project) aggregateService.read(master, getSettings());\t\t\r\n\r\n\t\t// query the task object\r\n\t\tSettings settings = new Settings();\r\n\t\tsettings.setView(aggregateService.getView(\"SUBPROJECTS\"));\t\t\r\n\t\tList<?> toList = aggregateService.query(master, settings);\r\n\r\n\t\tassert(toList.size() == 1);\t\t\r\n\r\n\t\tObject obj = toList.get(0);\r\n\t\tassert(Project.class.isAssignableFrom(obj.getClass()));\r\n\r\n\t\tProject root = (Project) obj;\r\n\t\tassert(root.getSubProjects() != null && root.getSubProjects().size() == 2);\r\n\t\tassert(root.getSubProjects().get(\"SETUP_NETWORK\").getName().equals(\"SETUP_NETWORK\"));\r\n\t\tassert(root.getSubProjects().get(\"SETUP_TELEPHONE\").getName().equals(\"SETUP_TELEPHONE\"));\t\t\r\n\t}", "private void setProjectSearchResults(List<Project> aces, List<Project> aws, List<Project> elsewhere, List<Project> rcnc){\n resultsMap.put(titles[0], aces);\n resultsMap.put(titles[1], aws);\n resultsMap.put(titles[2], elsewhere);\n resultsMap.put(titles[3], rcnc);\n\n mAdapterSearch = new ProjectsExpandableSearchAdapter(main, R.layout.project_list_item, titles, resultsMap);\n mProjectsListView.setAdapter(mAdapterSearch);\n mProjectsListView.expandGroup(0);\n mProjectsListView.expandGroup(1);\n mProjectsListView.expandGroup(2);\n mProjectsListView.expandGroup(3);\n\n }", "void projectsFound( String key ) {\n developer.projects = new ArrayList<>();\n }", "@Override\n\tpublic List<ProjectTeamBean> listProjectTeam() {\n\t\treturn null;\n\t}", "private void getTeams() {\n if(progressDialog!=null && progressDialog.isShowing()){\n progressDialog.dismiss();\n }\n progressDialog = new ProgressDialog(getContext());\n progressDialog.setCancelable(true);\n if(getArguments()!=null) {\n progressDialog.setMessage(\"Fetching Match Schedules\");\n }\n else {\n progressDialog.setMessage(\"Processing\");\n }\n progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n progressDialog.setProgress(0);\n progressDialog.show();\n db.collection(\"teams\").get().addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\n @Override\n public void onComplete(@NonNull Task<QuerySnapshot> task) {\n if (task.isSuccessful()) {\n for (QueryDocumentSnapshot document : task.getResult()) {\n JSONObject object = new JSONObject(document.getData());\n try {\n teamsObject.put(document.getId(), object);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n if(getArguments()!=null) {\n if (dataBundle.getString(\"from\").equals(\"league Features\")) {\n getSchedules();\n }\n else if(dataBundle.getString(\"from\").equals(\"TM-matches\")){\n getTeamSchedules();\n }\n }\n else {\n getSchedules();\n }\n } else {\n Toast.makeText(context, task.getException().getLocalizedMessage(), Toast.LENGTH_LONG).show();\n }\n }\n });\n }", "@RequestMapping(method=RequestMethod.GET)\n public ResponseEntity<List<TeamDTO>> findAll() {\n List<Team> list = this.teamService.findAll();\n List<TeamDTO> listDto = list.stream().map(obj -> new TeamDTO(obj)).collect(Collectors.toList());\n\n return ResponseEntity.ok().body(listDto);\n }", "public LearningResultHasActivity[] findWhereProjectCodeEquals(String projectCode) throws LearningResultHasActivityDaoException;", "@Override\r\n\tpublic List<Project> findProject() {\n\t\treturn iSearchSaleRecordDao.findProject();\r\n\t}", "public List<TicketSite> getTicketSitesOfATeam(String teamId);", "@Override\n public List<String> getTissueIdsMatchingQuery(Query query, List<FimsProject> projectsToMatch) throws ConnectionException {\n\n\n if(query instanceof BasicSearchQuery) {\n String value = ((BasicSearchQuery)query).getSearchText();\n List<Query> queries = new ArrayList<Query>();\n for(DocumentField field : getSearchAttributes()) {\n queries.add(Query.Factory.createFieldQuery(field, Condition.APPROXIMATELY_EQUAL, value));\n }\n return getTissueIdsMatchingQuery(Query.Factory.createOrQuery(queries.toArray(new Query[queries.size()]), Collections.<String, Object>emptyMap()), null);\n }\n if(query instanceof CompoundSearchQuery && (((CompoundSearchQuery)query).getOperator() == CompoundSearchQuery.Operator.OR)) {\n Set<String> results = new LinkedHashSet<String>();\n for(Query q : ((CompoundSearchQuery)query).getChildren()) {\n results.addAll(getTissueIdsMatchingQuery(q, null));\n }\n return new ArrayList<String>(results);\n }\n final List<String> results = new ArrayList<String>();\n String querySQLString = getQuerySQLString(query);\n if(querySQLString == null) {\n return Collections.emptyList();\n }\n String sql = \"SELECT '\" + getTissueCol() + \"' FROM \"+tableId+\" WHERE \"+ querySQLString;\n System.out.println(sql);\n\n try {\n Sqlresponse sqlresponse = FusionTableUtils.queryTable(sql, requestTimeoutInSeconds);\n List<List<Object>> rows = sqlresponse.getRows();\n if(rows == null) {\n return Collections.emptyList();\n }\n for (List<Object> row : rows) {\n String decoded = getRowValue(row, 0);\n results.add(decoded);\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n throw new ConnectionException(e.getMessage(), e);\n }\n\n return results;\n }", "List<Cemetery> search(String query);", "public List<org.apache.airavata.registry.core.experiment.catalog.resources.ProjectResource> searchProjects(\n Map<String, String> filters, List<String> accessibleIds, int limit, int offset, Object orderByIdentifier,\n ResultOrderType resultOrderType) throws RegistryException {\n\n List<org.apache.airavata.registry.core.experiment.catalog.resources.ProjectResource> result = new ArrayList<org.apache.airavata.registry.core.experiment.catalog.resources.ProjectResource>();\n EntityManager em = null;\n try {\n String query = \"SELECT DISTINCT p from Project p WHERE \";\n\n // FIXME There is a performance bottleneck for using IN clause. Try using temporary tables ?\n if(accessibleIds != null){\n query += \" p.projectId IN (\";\n for(String id : accessibleIds)\n query += (\"'\" + id + \"'\" + \",\");\n query = query.substring(0, query.length()-1) + \") AND \";\n }\n\n if (filters != null && filters.size() != 0) {\n for (String field : filters.keySet()) {\n String filterVal = filters.get(field);\n if (field.equals(ProjectConstants.USERNAME)) {\n query += \"p.\" + field + \"= '\" + filterVal + \"' AND \";\n } else if (field.equals(ProjectConstants.GATEWAY_ID)) {\n query += \"p.\" + field + \"= '\" + filterVal + \"' AND \";\n } else {\n if (filterVal.contains(\"*\")) {\n filterVal = filterVal.replaceAll(\"\\\\*\", \"\");\n }\n query += \"p.\" + field + \" LIKE '%\" + filterVal + \"%' AND \";\n }\n }\n }\n query = query.substring(0, query.length() - 5);\n\n //ordering\n if (orderByIdentifier != null && resultOrderType != null\n && orderByIdentifier.equals(Constants.FieldConstants.ProjectConstants.CREATION_TIME)) {\n String order = (resultOrderType == ResultOrderType.ASC) ? \"ASC\" : \"DESC\";\n query += \" ORDER BY p.\" + ProjectConstants.CREATION_TIME + \" \" + order;\n }\n\n em = ExpCatResourceUtils.getEntityManager();\n em.getTransaction().begin();\n Query q;\n\n //pagination\n if (offset >= 0 && limit >= 0) {\n q = em.createQuery(query).setFirstResult(offset).setMaxResults(limit);\n } else {\n q = em.createQuery(query);\n }\n\n List resultList = q.getResultList();\n for (Object o : resultList) {\n Project project = (Project) o;\n org.apache.airavata.registry.core.experiment.catalog.resources.ProjectResource projectResource =\n (ProjectResource) Utils.getResource(ResourceType.PROJECT, project);\n result.add(projectResource);\n }\n em.getTransaction().commit();\n em.close();\n } catch (Exception e) {\n logger.error(e.getMessage(), e);\n throw new RegistryException(e);\n } finally {\n if (em != null && em.isOpen()) {\n if (em.getTransaction().isActive()) {\n em.getTransaction().rollback();\n }\n em.close();\n }\n }\n return result;\n }", "public List<Project> findAllProject() {\n\t\tProject project;\r\n\t\tList<Project> projectList = new ArrayList<Project>();\r\n\t\tString query = \"SELECT * FROM TA_PROJECTS\";\r\n\t\tSqlRowSet srs = jdbcTemplate.queryForRowSet(query);\r\n\t\twhile(srs.next()){\r\n\t\t\tproject = new Project();\r\n\t\t\tproject.setProjectID(srs.getString(1));\r\n\t\t\tproject.setProjectName(srs.getString(2));\r\n\t\t\tproject.setManagerID(srs.getString(3));\r\n\t\t\tprojectList.add(project);\r\n\t\t}\r\n\t\treturn projectList;\r\n\t}", "@Override\r\n\tpublic ArrayList<TeamPO> getAllTeams() {\n\t\treturn teams.getAllTeams() ;\r\n\t}", "private void fetchTeams() {\n String url = Teams.TEAMS_URL;\n\n JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, url, null,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(final JSONObject response) {\n Gson gson = new Gson();\n //Deserialize\n mTeams = gson.fromJson(response.toString(), Teams.class);\n for (Team team : mTeams.getTeams()) {\n //Add each team to the nav drawer with the appropriate icon\n mNavigationView.getMenu().add(team.getName()).setIcon(Utils.getDrawableForTeam(team));\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(final VolleyError error) {\n error.printStackTrace();\n }\n });\n //Singleton instance of Volley as per the documentation\n RequestQueue.getInstance(this).addToRequestQueue(request);\n }", "@GET\n @Path(\"Current/Team\")\n public Response findTeamsByCurrentUser() {\n Response r = Response.noContent().build();\n Collection<Team> teamsToReturn = new ArrayList<>();\n User currentUser = userFacade.getCurrentUser();\n final List<Player> players = currentUser.getPlayers();\n for (Player p : players) {\n teamsToReturn.add(p.getTeam());\n }\n if (!teamsToReturn.isEmpty()) {\n r = Response.ok().entity(teamsToReturn).build();\n }\n\n return r;\n }", "public List<SearchedItem> getAllSearchedItems(StaplerRequest req, String tokenList) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, ServletException {\n Set<String> filteredItems= new TreeSet<String>();\n AbstractProject p;\n \n if(\"Filter\".equals(req.getParameter(\"submit\"))){ //user wanto to change setting for this search\n filteredItems = getFilter(req);\n }\n else{\n filteredItems = User.current().getProperty(SearchProperty.class).getFilter();\n }\n req.setAttribute(\"filteredItems\", filteredItems);\n return getResolvedAndFilteredItems(tokenList, req, filteredItems);\n }", "@Override\r\n\tpublic List<Project> viewAllProjects(String authToken) throws ManualException{\r\n\t\tfinal\tSession session=sessionFactory.openSession();\r\n\t\tList<Project> projectList =null;\r\n\r\n\t\t/* check for authToken of admin */\r\n\t\tsession.beginTransaction();\r\n\t\ttry{\r\n\t\t\tAuthTable authtable=session.get(AuthTable.class, authToken);\r\n\t\r\n\t\t\tUser user = authtable.getUser();\r\n\t\t\tif(user.getUsertype().equals(\"Admin\")){\r\n\t\t\t\tString hql=\"from project\";\r\n\t\t\t\tQuery q=session.createQuery(hql);\r\n\t\t\t\tprojectList=(List)q.list();\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tprojectList=null;\r\n\t\t}\r\n\t\tfinally{\r\n\t\t\tsession.getTransaction().commit();\r\n\t\t\tsession.close();\r\n\t\t\treturn projectList;\r\n\t\t}\r\n\t}", "private void searchforResults() {\n\n List<String> queryList = new SavePreferences(this).getStringSetPref();\n if(queryList != null && queryList.size() > 0){\n Log.i(TAG, \"Searching for results \" + queryList.get(0));\n Intent searchIntent = new Intent(Intent.ACTION_WEB_SEARCH);\n searchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n searchIntent.putExtra(SearchManager.QUERY, queryList.get(0));\n this.startActivity(searchIntent);\n }\n }", "public ArrayList<CollegeFootballTeam> getTeamList();", "private static void search_by_id() {\r\n\t\ttry (// Creates a connection and statement object\r\n\t\t\t\tConnection conn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/PoisedPMS\",\"poisedpms\",\"poisedpms\");\r\n\t\t\t\t\r\n\t\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\t\t\r\n\t\t\t){\r\n\t\t\tScanner input = new Scanner(System.in);\r\n\t\t\r\n\t\t\tSystem.out.println(\"Project id: \");\r\n\t\t\tString project_id_str = input.nextLine();\r\n\t\t\r\n\t\t\tString strSelectProject = String.format(\"SELECT * FROM projects INNER JOIN project_statuses ON \"\r\n\t\t\t\t\t+ \"projects.project_id = project_statuses.project_id;\");\r\n\t\t\tResultSet project_rset = stmt.executeQuery(strSelectProject);\r\n\t\t\t\r\n\t\t\tfetch_all_project_info(stmt, project_id_str, project_rset);\r\n\t\t/**\r\n\t\t * @exception If entered project id cannot be found in the projects table then an SQLException is thrown\r\n\t\t */\t\r\n\t\t} catch ( SQLException ex ) {\r\n\t\t\tex . printStackTrace ();\r\n\t\t}\r\n\t\t\r\n\t}", "public List<TeamVo> query(@Valid TeamQuery teamQuery) {\n\t\tList<TeamVo> list = null;\n\t\tlist = teamMapper.queryTeamVo(teamQuery.getCompanyid(), teamQuery.getDepartmentid());\n\t\treturn list;\n\t}", "public static void search() {\n\t\tList<Domain> domains = DomainService.findAll();\n\t\t\n\t\tlogger.info(\"{} domains selected to search\", domains.size());\n\t\t\n\t\tMap<String, Integer> sourceMap = getSourceMap();\n\t\tString currentDomain = \"\";\n\t\t\n\t\tMap<String, SearchResult> resultMap = new HashMap<String, SearchResult>();\n\t\t\n\t\tfor (Domain domain : domains) {\n\t\t\tcurrentDomain = domain.getName();\n\t\t\t\n\t\t\tlogger.info(\"{} domain searching started\", currentDomain);\n\t\t\t\n\t\t\t// The last search time prevents getting the same articles which were already retrieved at the last search\n\t\t\tString lastSearch = MongoService.getLastSearchTime(currentDomain);\t\t\t\n\t\t\tMongoService.setLastSearchTime(currentDomain, DatetimeUtil.getUTCDatetime());\n\t\t\t\n\t\t\tlogger.info(\"{} domain last searched {}\", currentDomain, lastSearch);\n\t\t\t\n\t\t\tList<String> domainKeywords = domain.getKeywords();\n\t\t\tList<Source> sources = domain.getSources();\n\t\t\t\n\t\t\tList<String> sourceNames = new ArrayList<String>();\n\t\t\tfor (Source source : sources) {\n\t\t\t\tsourceNames.add(source.getDomain());\n\t\t\t}\n\t\t\t\n\t\t\tList<Topic> topics = domain.getTopics();\n\t\t\t\n\t\t\t// If the domain contains any topic, get the topic keywords and merge them with the domain keywords. \n\t\t\tif (topics.size() > 0) {\n\t\t\t\tfor (Topic topic : topics) {\n\t\t\t\t\tList<String> topicKeywords = topic.getKeywords();\n\t\t\t\t\t\n\t\t\t\t\tList<String> ids = Searcher.search(sourceNames, lastSearch, domainKeywords, topicKeywords);\n\t\t\t\t\t\n\t\t\t\t\tfor (String id : ids) {\n\t\t\t\t\t\tif (resultMap.containsKey(id)) {\n\t\t\t\t\t\t\tSearchResult result = resultMap.get(id);\n\t\t\t\t\t\t\tArticle article = result.getArticle();\n\t\t\t\t\t\t\tarticle.attachTopic(topic);\n\t\t\t\t\t\t\tarticle.attachDomain(domain);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tSearchResult result;\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tresult = new SearchResult(id);\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tArticle article = result.getArticle();\n\t\t\t\t\t\t\tArticleDocument doc = result.getDoc();\n\t\t\t\t\t\t\tarticle.attachDomain(domain);\n\t\t\t\t\t\t\tarticle.setSourceId(sourceMap.get(doc.getSource()));\n\t\t\t\t\t\t\tarticle.attachTopic(topic);\n\t\t\t\t\t\t\tresultMap.put(id, result);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tList<String> ids = Searcher.search(sourceNames, lastSearch, domainKeywords, null);\n\t\t\t\t\n\t\t\t\tfor (String id : ids) {\n\t\t\t\t\tSearchResult result;\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tresult = new SearchResult(id);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tArticle article = result.getArticle();\n\t\t\t\t\tArticleDocument doc = result.getDoc();\n\t\t\t\t\tarticle.attachDomain(domain);\n\t\t\t\t\tarticle.setSourceId(sourceMap.get(doc.getSource()));\n\t\t\t\t\tresultMap.put(id, result);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tfor (Map.Entry<String, SearchResult> entry : resultMap.entrySet())\n\t\t\t{\n\t\t\t\tlogger.info(\" {} : {}\", entry.getValue().getArticle().getTitle(), entry.getValue().getArticle().getUrl());\n\t\t\t}\n\t\t}\n\t\t\n\t\tinsertArticles(resultMap);\n\t}", "@Query(value = \"SELECT * FROM questions_aides_project WHERE token_project=?1 \", nativeQuery = true)\n List<QuestionAidesProjectModel> findByProject(String tokenProject);", "public List<Meeting> getMeetings(int projectId);", "public static void main(String[] args) {\n\t\tSystem.out.println(\"View all teams\");\n\t\tSystem.out.println(teamData.viewTeams());\n\t\t\n\t\tSystem.out.println(\"Search by conference\");\n\t\tSystem.out.println(teamData.searchConference(\"AFC\"));\n\t\tSystem.out.println(teamData.searchConference(\"NFC\"));\n\t\t\n\t\tSystem.out.println(\"Search by division\");\n\t\tSystem.out.println(teamData.searchDivision(\"NFC\", \"West\"));\n\t\tSystem.out.println(teamData.searchDivision(\"NFC\", \"East\"));\n\t\t\n\t\tSystem.out.println(\"View team roster\");\n\t\tSystem.out.println(teamData.viewTeamRoster(\"Bears\"));\n\t\tSystem.out.println(teamData.viewTeamRoster(\"Cowboys\"));\n\t\t\n\t\tSystem.out.println(\"List player data\");\n\t\tSystem.out.println(teamData.listPlayer(\"Romo\", \"Cowboys\"));\n\t\tSystem.out.println(teamData.listPlayer(\"Brady\", \"Patriots\"));\n\t\t\n\t\tSystem.out.println(\"List all match results\");\n\t\t//System.out.println(teamData.readMatchData()); //lists all match results for all weeks\n\t\t\n\t\tSystem.out.println(\"List match results by week\");\n\t\tSystem.out.println(teamData.viewMatchWeek(\"Week 5\"));\n\t\t\n\t\tSystem.out.println(\"View single team's match data\");\n\t\tSystem.out.println(teamData.viewMatchByTeam(\"Falcons\"));\n\t\tSystem.out.println(teamData.viewMatchByTeam(\"Cowboys\"));\n\t\t\n\t\tSystem.out.println(\"View Head to Head (team vs team)\");\n\t\tSystem.out.println(teamData.viewH2H(\"Patriots\", \"Dolphins\"));\n\t\tSystem.out.println(teamData.viewH2H(\"Panthers\", \"Eagles\"));\n\t\t\n\t\tSystem.out.println(\"View specific team wins\");\n\t\tSystem.out.println(teamData.viewTeamWins(\"Panthers\"));\n\t\t\n\t\tSystem.out.println(\"View specific team loses\");\n\t\tSystem.out.println(teamData.viewTeamLoses(\"Titans\"));\n\t\t\n\t\t//Haven't tested this fully\n\t\t//System.out.println(teamData.getTeamImage(\"Cowboys\"));\n\t}", "void getAllProjectList(int id);", "void findWithPagination(Pagination<Task, Project> pagination);", "@GetMapping(\"/getAll\")\r\n\tpublic List<Project> getAllProjects() {\r\n\t\treturn persistenceService.getAllProjects();\r\n\t}", "@Override\n protected SearchedResRepList getProjectSearchResults(final URI projectId) {\n SearchedResRepList resRepList = new SearchedResRepList(getResourceType());\n _dbClient.queryByConstraint(\n ContainmentConstraint.Factory.getProjectBlockConsistencyGroupConstraint(projectId),\n resRepList);\n return resRepList;\n }", "Team findByName(String name);", "TeamResultWrapper findTeamsByMember(String personId,\n String partOfGroupname, int offset, int pageSize);", "List<GameResult> getAllResults();", "List<Corretor> search(String query);", "List<Project> selectAll();", "@Override\n\tpublic List<Movie> search(String queryText) {\n\t\tMoviesResponse moviesResponse = movieDataService.fetchAll();\n\t\tList<Movie> movieList = moviesResponse.stream()\n\t\t\t\t.filter(movieData -> Arrays.asList(movieData.getTitle().toLowerCase().split(\"\\\\s+\")).contains(queryText.toLowerCase()))\n\t\t\t\t.collect(Collectors.mapping(movieData -> mapMovieDataToMovie(movieData),Collectors.toList()));\n\t\treturn movieList;\n\t}", "Page<ChatDTO> search(String query, Pageable pageable);", "List<Team> getTeamsFromApi(List<Long> teamIds);", "@Override\r\n\tpublic List<String> getAllTeam() {\n\t\treturn dao.getAllTeam();\r\n\t}", "List<Codebadge> search(String query);", "public void search() {\n try {\n for(int i = 0; i < this.queries.size(); i++){\n search(i);\n // in case of error stop\n if(!this.searchOK(i)){\n System.out.println(\"\\t\" + new Date().toString() + \" \" + db + \" Search for rest queries cancelled, because failed for query \" + i + \" : \" + this.queries.get(i));\n break;\n }\n }\n } catch (UnsupportedEncodingException ex) {\n Logger.getLogger(EntrezSearcher.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "List<ResultDTO> search(String query);", "@Test\r\n\tpublic void findAllGames() {\r\n\t\t// DO: JUnit - Populate test inputs for operation: findAllGames \r\n\t\tInteger startResult = 0;\r\n\t\tInteger maxRows = 0;\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tList<Game> response = null;\r\n\t\tTswacct tswacct = null;\r\n\t\tresponse = service.findAllGames4tsw(tswacct, startResult, maxRows);\r\n\t\t// DO: JUnit - Add assertions to test outputs of operation: findAllGames\r\n\t}", "@Test\r\n public void testSearchPeople() throws MovieDbException {\r\n LOG.info(\"searchPeople\");\r\n String personName = \"Bruce Willis\";\r\n boolean includeAdult = false;\r\n List<Person> result = tmdb.searchPeople(personName, includeAdult, 0);\r\n assertTrue(\"Couldn't find the person\", result.size() > 0);\r\n }", "@Test\r\n public void testSearchList() throws Exception {\r\n LOG.info(\"searchList\");\r\n String query = \"watch\";\r\n int page = 0;\r\n List result = tmdb.searchList(query, LANGUAGE_DEFAULT, page);\r\n assertFalse(\"No lists found\", result == null);\r\n assertTrue(\"No lists found\", result.size() > 0);\r\n }", "@RequestMapping(value = \"/_search/hrProjectInfos/{query}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public List<HrProjectInfo> searchHrProjectInfos(@PathVariable String query) {\n log.debug(\"REST request to search HrProjectInfos for query {}\", query);\n return StreamSupport\n .stream(hrProjectInfoSearchRepository.search(queryStringQuery(query)).spliterator(), false)\n .collect(Collectors.toList());\n }", "public List<Team> getAll() {\n TeamDB tdb = new TeamDB();\n List<Team> teams = tdb.getAll();\n for (Team t : teams) {\n String teamName = t.getTeamName();\n teamName = teamName.replace(\"'\", \"\\\\\\'\");\n t.setTeamName(teamName);\n System.out.println(t.getTeamName());\n }\n return teams;\n }", "public void search() {\r\n \t\r\n }", "@Override\n public void doIT() throws RepositoryException {\n Repository repo = taskData.getRepository();\n\n if (repo instanceof RemoteRepository && taskData.getSubject() != null) {\n RemoteRepository rr = (RemoteRepository) repo;\n NamedEntity entity = (NamedEntity) taskData.getSubject().getTL();\n boolean includeIndirect = true;\n\n repoResults = new ArrayList<>();\n rr.getEntityWhereExtended( entity ).forEach( e -> repoResults.add( e ) );\n repoResults.addAll( rr.getEntityWhereUsed( entity, includeIndirect ) );\n // Returns list of repo items\n // RepositoryItem item = null;\n // rr.getItemWhereUsed( item, includeIndirect );\n log.debug( \"Found \" + repoResults.size() + \" entities.\" );\n } else {\n // Run full-text search\n // Result list contains both entity and library result items\n repoResults = repo.search( taskData.getQuery(), taskData.getIncludeStatus(),\n taskData.isLatestVersionsOnly(), taskData.getItemType() );\n log.debug( \"Found \" + repoResults.size() + \" items in repo.\" );\n }\n }", "private void displayAllProjects() {\n for(Project projects: Project.totalProjects){\n projects.displayProject();\n System.out.println(\"Popularity\\t\\t: \" + projects.getPopularityCounter());\n }\n }", "List<ProjectDTO> findLimitProjects(int pageNumber);", "@Override\n\tpublic List<ProjectTeamBean> selectProjectTeamList() {\n\t\treturn null;\n\t}", "public List<Project> findAllProject() {\n\treturn projectmapper.findProject(null);\n}", "@RequestMapping(method = RequestMethod.GET, value = \"/teamsForUser/{name}\")\n public JSONObject getTeamForUserPage(@PathVariable String name) {\n JSONArray teamJsonArray = getAllTeamsForUserPage();\n JSONObject jsonObject = new JSONObject();\n\n for (int i = 0; i < teamJsonArray.size(); i++) {\n if (teamJsonArray.get(i).toString().contains(name)) {\n return (JSONObject) teamJsonArray.get(i);\n }\n }\n return jsonObject;\n }", "@GET\n\t@Path(\"/{name}/meetings\")\n\t@Produces(\"application/xml\")\n\tpublic StreamingOutput getAllCourses(@PathParam(\"name\") String projectName) throws Exception {\n\t\tfinal Project proj = new Project();\n\t\tArrayList<String> years = new ArrayList<String>();\n\n//\t\tmodernWebApps.setDepartment(\"CS\");\n//\t\tmodernWebApps.setName(\"Modern Web Applications\");\n\t\tyears = eavesdropService.getYears(projectName);\n\t\tif (years != null) {\n\t\t\t//proj.setName(projectName);\n\t\t\tproj.setLink(years);\n\t\t}\n\t\telse {\n\t\t\tfinal Error error = new Error();\n\t\t\terror.setMessage(projectName);\n\t\t return new StreamingOutput() {\n\t\t public void write(OutputStream outputStream) throws IOException, WebApplicationException {\n\t\t outputCourses(outputStream, error);\n\t\t }\n\t\t };\n\t\t}\n//\t\tCourse operatingSystems = new Course();\n//\t\toperatingSystems.setDepartment(\"CS\");\n//\t\toperatingSystems.setName(\"Operating Systems\");\n\t\t\n\t\tfinal Courses courses = new Courses();\n//\t\tList<Course> courseList = new ArrayList<Course>();\n//\t\tcourseList.add(modernWebApps);\n//\t\tcourseList.add(operatingSystems);\n//\t\tcourses.setCourses(courseList);\t\t\n\t\t\t \n\t return new StreamingOutput() {\n\t public void write(OutputStream outputStream) throws IOException, WebApplicationException {\n\t outputCourses(outputStream, proj);\n\t }\n\t };\t \n\t}", "@Override\n\t\tprotected List<ProjectModel> doInBackground(Void... params) {\n\t\t\tLog.i(\"LOGGER\", \"Starting...doInBackground loadList\");\n\t\t\tList<ProjectModel> projectsList = searchController.searchIntoXML();\n\t\t\treturn projectsList;\n\t\t}", "SearchResultCompany search(String keywords);", "@WebMethod public List<Team> getAllTeams();", "public List<VwTeams> browse(String[] params)\n\t{\n\t\tList<VwTeams> results\t= new ArrayList<VwTeams>();\n\t\tVwTeams[] array\t\t\t= null;\n\t\t\n\t\ttry\n\t\t{\n\t\t\tif (params == null)\n\t\t\t{\n\t\t\t\tarray = dao.findAll();\n\t\t\t}\n\t\t\telse \n\t\t\t{\t\t\t\t\n\t\t\t\t//like filter\n\t\t\t\tparams[0] = GeneralUtils.addLikeFormat(params[0]);\n\t\t\t\t\n\t\t\t\tString sql = \"\";\n\t\t\t\t\n\t\t\t\tsql = \"\tteam_name LIKE ? \";\n\t\t\t\tsql += \"\t\tevent_id = ? \";\n\t\t\t\t\t\t\t\t\n\t\t\t\tarray = dao.findByDynamicWhere(sql, params);\n\t\t\t}\n\t\t\t\n\t\t\t// convert array to list\n\t\t\tresults = Arrays.asList(array);\n\t\t}\n\t\tcatch (VwTeamsDaoException e)\n\t\t{\n\t\t\tlogger.error(e.getMessage());\n\t\t\t\n\t\t\terror.setCode(Errors.Codes.DB_DAO.getCode());\n\t\t\terror.setWindowTitle(Errors.Codes.DB_DAO.getWindowTitle());\n\t\t\terror.setMessage(Errors.Codes.DB_DAO.getMessage());\n\t\t\t\n\t\t\terror.setExceptionMessage(e.getMessage());\n\t\t\t\n\t\t\tpdr.setError(error);\n\t\t\t\n\t\t\tif (logger.isDebugEnabled())\n\t\t\t\te.printStackTrace();\n\t\t\t\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn results;\n\t}", "void getAllProjectList(int id, UserType userType);", "@OnKeyword(value = \"get todolist\")\n\tpublic void getTodoList(TeamchatAPI api) throws Exception {\n\t\tif (isBasecampnotPresent(api)) {\n\t\t\treturn;\n\t\t}\n\t\t// populating with project name list\n\t\tField f = api.objects().select().name(\"project\").label(\"Project\");\n\t\tfor (Project project : bah.getActiveProjects()) {\n\t\t\tf.addOption(project.getName() + \" | \" + project.getId());\n\t\t}\n\t\t// api.perform(api\n\t\t// .context()\n\t\t// .currentRoom()\n\t\t// .post(new PrimaryChatlet()\n\t\t// .setQuestion(\"Get todolists from a project\")\n\t\t// .setDetailsLabel(\"Comments\")\n\t\t// .showDetails(true)\n\t\t// .setReplyScreen(api.objects().form().addField(f))\n\t\t// .setReplyLabel(\"Select Project\")\n\t\t// .alias(\"get_todo_list2\")));//.setReplyLabel(\"Comment\")\n\t\tapi.perform(api\n\t\t\t\t.context()\n\t\t\t\t.currentRoom()\n\t\t\t\t.post(new PrimaryChatlet()\n\t\t\t\t\t\t.setQuestion(\"Get todolists from a project\")\n\t\t\t\t\t\t.setReplyScreen(api.objects().form().addField(f))\n\t\t\t\t\t\t.setReplyLabel(\"Select Project\")\n\t\t\t\t\t\t.alias(\"get_todo_list2\")));\n\t}", "private void fetchProjects(Folder folder) {\n\n logger.atInfo().log(\"Fetching projects from \" + folder.getDisplayName());\n\n Set<Project> projectSet = new HashSet<Project>();\n ListProjectsPagedResponse projectsResponse = projectsClient.listProjects(folder.getName());\n Iterable<Project> iterableProjects = projectsResponse.iterateAll();\n Iterator<Project> projects = iterableProjects.iterator();\n\n while (projects.hasNext()) {\n Project project = projects.next();\n projectSet.add(project);\n }\n folderProjectMap.put(folder, projectSet);\n }", "@Transactional(readOnly = true)\n public Page<TaskProject> search(String query, Pageable pageable) {\n log.debug(\"Request to search for a page of TaskProjects for query {}\", query);\n Page<TaskProject> result = taskProjectSearchRepository.search(queryStringQuery(query), pageable);\n return result;\n }", "public abstract KenaiProject[] getDashboardProjects(boolean onlyOpened);", "SearchResultVO<Project> findAll(int nextPage, int num, String sortColName, String sortDirection);", "public List<Movie> search() {\n keyword = URLEncoder.encode(keyword);\n String url = \"http://api.rottentomatoes.com/api/public/v1.0/movies.json?apikey=yedukp76ffytfuy24zsqk7f5&q=\"\n + keyword + \"&page_limit=20\";\n apicall(url);\n System.out.println(url);\n System.out.println(data);\n GsonBuilder builder = new GsonBuilder();\n Gson gson = builder.create();\n MovieResponse response = gson.fromJson(data, MovieResponse.class);\n List<Movie> movies = response.getMovies();\n movieData = movies;\n return movieData;\n }", "Page<TeamDTO> findAll(Pageable pageable);", "public List<MmathFighter> searchByName(String name) {\n String searchQuery = \"%\" + name + \"%\";\n\n String[] nameSplit = name.split(\" \");\n ExecutorService exec = Executors.newFixedThreadPool(nameSplit.length + 2);\n\n List<Future<List<MmathFighter>>> futures = new ArrayList<>();\n\n futures.add(exec.submit(() -> getDsl().select().from(FIGHTERS)\n .where(FIGHTERS.NAME.like(searchQuery))\n .orderBy(FIGHTERS.SEARCH_RANK)\n .limit(10)\n .fetch(recordMapper)));\n\n futures.add(exec.submit(() -> getDsl().select().from(FIGHTERS)\n .where(FIGHTERS.NICKNAME.like(searchQuery))\n .orderBy(FIGHTERS.SEARCH_RANK)\n .limit(10)\n .fetch(recordMapper)));\n\n if (nameSplit.length > 1) {\n futures.addAll(\n Stream.of(nameSplit)\n .map(s -> exec.submit(() -> getDsl().select().from(FIGHTERS)\n .where(FIGHTERS.NAME.like(s))\n .or(FIGHTERS.NICKNAME.like(s))\n .orderBy(FIGHTERS.SEARCH_RANK)\n .limit(10)\n .fetch(recordMapper)\n )).collect(Collectors.toList())\n );\n }\n return futures.stream()\n .flatMap(f -> {\n try {\n return f.get().stream();\n } catch (InterruptedException | ExecutionException e) {\n return null;\n }\n })\n .filter(s -> s != null)\n .filter(distinctByKey(MmathFighter::getSherdogUrl)).limit(10).collect(Collectors.toList());\n }", "@Override\n\tpublic List<ProjectTeamBean> selectProjectTeamByWord(String word) {\n\t\treturn null;\n\t}", "private void compareProjects(DoapProject[] projects,\n\t\t\tDoapProject[] result) {\n\t\tassertEquals(projects.length, result.length);\n\t\tfor (int i = 0; i < projects.length; i++) {\n\t\t\tboolean found = false;\n\t\t\tfor (int j = 0; j < result.length; j++) {\n\t\t\t\tif (projects[i].getName() == null) {\n\t\t\t\t\tif (result[j].getName() == null) {\n\t\t\t\t\t\tif (projects[i].getHomePage() == null) {\n\t\t\t\t\t\t\tif (result[j].getHomePage() == null) {\n\t\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (projects[i].getHomePage().equals(result[j].getHomePage())) {\n\t\t\t\t\t\t\tfound = 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} else if (projects[i].getName().equals(result[j].getName())) {\n\t\t\t\t\tif (projects[i].getHomePage() == null) {\n\t\t\t\t\t\tif (result[j].getHomePage() == null) {\n\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (projects[i].getHomePage().equals(result[j].getHomePage())) {\n\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!found) {\n\t\t\t\tfail(\"Project not found: \"+projects[i].getName());\n\t\t\t}\n\t\t}\n\t}", "public static List<String> getSpainCoach() throws URISyntaxException, IOException {\n\n HttpClient httpClient = HttpClientBuilder.create().build();\n URIBuilder uriBuilder = new URIBuilder();\n //http://api.football-data.org/v2/teams/\n uriBuilder.setScheme(\"http\").setHost(\"api.football-data.org\").setPath(\"v2/teams/77\");\n HttpGet httpGet = new HttpGet(uriBuilder.build());\n httpGet.setHeader(\"X-Auth-Token\",\"7cf82ca9d95e498793ac0d3179e1ec9f\");\n httpGet.setHeader(\"Accept\",\"application/json\");\n HttpResponse response = httpClient.execute(httpGet);\n ObjectMapper objectMapper = new ObjectMapper();\n Team66Pojo team66Pojo =objectMapper.readValue(response.getEntity().getContent(),Team66Pojo.class);\n List<Squad> squad = team66Pojo.getSquad();\n List<String> nameOfSpainTeamCoach= new ArrayList<>();\n for (int i = 0; i <squad.size() ; i++) {\n try {\n if(squad.get(i).getRole().equals(\"COACH\")){\n\n nameOfSpainTeamCoach.add(squad.get(i).getName());\n }\n }catch (NullPointerException e){\n continue;\n }\n\n }\n return nameOfSpainTeamCoach;\n }", "private JsonObject search(JsonObject request) {\n\t\t\tJsonObject result = new JsonObject();\n\t\t\tJsonArray artists = new JsonArray();\n\t\t\tJsonArray titles = new JsonArray();\n\t\t\tJsonArray tags = new JsonArray();\n\t\t\tJsonArray arSimilars = new JsonArray();\n\t\t\tJsonArray tiSimilars = new JsonArray();\n\t\t\tJsonArray taSimilars = new JsonArray();\n\t\t\t//Individually search by artist, by title and by tag. \n\t\t\tartists = request.getAsJsonArray(\"searchByArtist\");\n\t\t\ttitles = request.getAsJsonArray(\"searchByTitle\");\n\t\t\ttags = request.getAsJsonArray(\"searchByTag\");\n\t\t\t//If the request contains \"artist\", we search each artist's similar song, and add it to a JsonArray.\n\t\t\tif(artists != null && artists.size() >= 1) {\n\t\t\t\tfor(JsonElement artist: artists) {\n\t\t\t\t\tarSimilars.add(this.sl.searchByArtist(artist.getAsString()));\t\n\t\t\t\t}\n\t\t\t\t//We add the JsonArray to result, associated with \"searchByArtist\".\n\t\t\t\tresult.add(\"searchByArtist\", arSimilars);\n\t\t\t}\n\t\t\t//If the request contains \"tag\", we search each tag's similar song, and add it to a JsonArray.\n\t\t\tif(tags != null && tags.size() >= 1) {\n\t\t\t\tfor(JsonElement tag: tags) {\t\t\t\t\n\t\t\t\t\ttaSimilars.add(this.sl.searchByTag(tag.getAsString()));\t\t\t\t\n\t\t\t\t}\n\t\t\t\t//We add the JsonArray to result, associated with \"searchByTag\".\n\t\t\t\tresult.add(\"searchByTag\", taSimilars);\n\t\t\t}\t\t\n\t\t\t//If the request contains title, we search each title's similar song, and add it to a JsonArray\n\t\t\tif(titles != null && titles.size() >= 1) {\t\t\t\n\t\t\t\tfor(JsonElement title: titles) {\n\t\t\t\t\ttiSimilars.add(this.sl.searchByTitle(title.getAsString()));\n\t\t\t\t}\n\t\t\t\t//We add the JsonArray to result, associated with \"searchByTiltle\".\n\t\t\t\tresult.add(\"searchByTitle\", tiSimilars);\n\t\t\t}\n\t\t\treturn result;\n\t\t}", "TeamResultWrapper findAllTeamsByMember(String personId, int offset,\n int pageSize);", "private void searchList() {\n String keyword = search_bar.getText().toString();\n try {\n if (!TextUtils.isEmpty(keyword)) {\n RemoteMongoCollection<Document> plants = mongoDbSetup.getCollection(\"plants\");\n RemoteMongoIterable<Document> plantIterator = plants.find();\n\n docsToUse.clear();\n listOfPlants.clear();\n mRecyclerView.removeAllViews();\n\n final ArrayList<Document> docs = new ArrayList<>();\n\n plantIterator\n .forEach(document -> {\n plant_name = document.getString(\"plant_name\");\n picture_url = document.getString(\"picture_url\");\n description = document.getString(\"description\");\n\n if (plant_name.toLowerCase().contains(keyword.toLowerCase())) {\n\n docs.add(document);\n setPlantList(docs);\n listOfPlants.add(new RecyclerViewPlantItem(picture_url, plant_name, description));\n\n }\n })\n\n .addOnCompleteListener(task -> {\n if (listOfPlants.size() == 0) {\n search_bar.requestFocus();\n search_bar.setError(\"No match found\");\n\n listOfPlants.clear();\n }\n mRecyclerView.setHasFixedSize(true);\n mLayoutManager = new LinearLayoutManager(getActivity());\n mAdapter = new RecyclerViewAdapter(listOfPlants, getActivity());\n mAdapter.notifyDataSetChanged();\n\n mRecyclerView.setLayoutManager(mLayoutManager);\n mRecyclerView.setAdapter(mAdapter);\n })\n .addOnFailureListener(e -> Log.e(TAG, \"error \" + e.getMessage()));\n\n } else if (searchButton.isPressed() && TextUtils.isEmpty(keyword)) {\n search_bar.setError(\"Please type a keyword\");\n listOfPlants.clear();\n findPlantsList();\n }\n } catch (Throwable e) {\n Log.e(TAG, \"NullPointerException: \" + e.getMessage());\n }\n }", "List<GameResult> getAllGameResults();", "SearchResult search(State root, List<State> expanded_list, State goal);", "private void findMatches() {\n this.user.getMatches().clear();\n final String HOST_MATCH = HOST_URL + \"/match/\" + user.getId() + \"/?page=0\" + HomeView.MATCH_LIMIT;\n RequestQueue que = Volley.newRequestQueue(this);\n JsonObjectRequest req = new JsonObjectRequest(Request.Method.GET, HOST_MATCH, null,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n try { //String id, String firstName, String lastName, String email) {\n MatchView.parseEdges(response.getJSONArray(\"matches\"), toBeMatched);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.d(\"HomeView\", \"Could not find matches\");\n }\n });\n que.add(req);\n }", "public static List<Team> getTeams() {\n return find().all();\n }" ]
[ "0.6144005", "0.59737396", "0.59408265", "0.5900081", "0.58563507", "0.5832932", "0.579854", "0.5760693", "0.572266", "0.569457", "0.5690778", "0.5669738", "0.56445706", "0.5630721", "0.56191164", "0.5605986", "0.5600709", "0.5572415", "0.55001557", "0.5462245", "0.5458359", "0.5457088", "0.5439231", "0.53792834", "0.53632677", "0.5350991", "0.5338039", "0.53339535", "0.53124505", "0.5310318", "0.53025234", "0.5302423", "0.5298364", "0.5285586", "0.5276199", "0.5272239", "0.5271779", "0.52536964", "0.5248346", "0.52454185", "0.52450806", "0.52245134", "0.5208917", "0.51945895", "0.5186827", "0.51864445", "0.51804674", "0.5179084", "0.5175574", "0.51671374", "0.51579267", "0.5157284", "0.5156077", "0.5145662", "0.51437414", "0.5139561", "0.51373863", "0.5128434", "0.5125794", "0.5111962", "0.5109504", "0.5105766", "0.51014996", "0.5094711", "0.5086419", "0.50844693", "0.50832796", "0.5082534", "0.50818694", "0.5078737", "0.5072172", "0.5068496", "0.50681835", "0.5067141", "0.5066277", "0.50589985", "0.5051048", "0.50424373", "0.503661", "0.5035388", "0.5035293", "0.5033813", "0.50276715", "0.50247514", "0.501948", "0.50147754", "0.50094783", "0.5006595", "0.50062186", "0.5001382", "0.4997931", "0.499659", "0.49960294", "0.49868476", "0.4985494", "0.4981827", "0.4978686", "0.49658847", "0.49602", "0.49523008" ]
0.5966773
2
Search team by name and return id
public static int findByName(String teamName) throws DALException { Connection cnx = null; PreparedStatement pstmt = null; ResultSet rs = null; int idTeam = 0; try { // Connection DB cnx = DBConnection.connect(); pstmt = cnx.prepareStatement(SEARCH_NAME_TEAM); pstmt.setString(1, teamName); rs = pstmt.executeQuery(); if (rs.next()) { idTeam = rs.getInt("idTeams"); } } catch (SQLException e) { throw new DALException("Problem - search teams By Name - TeamDAO - Request : "+pstmt+ " " + e.getMessage()); } finally { try { if (rs != null) rs.close(); if (pstmt != null) pstmt.close(); if (cnx != null) cnx.close(); } catch (SQLException e) { throw new DALException("Problem - Closing connection - " + e.getMessage()); } } return idTeam; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Team findByName(String name);", "Team findById(Long id);", "public Team get(Long id);", "@Override\r\n\tpublic TeamPO findTeamByName(String name) {\n\t\treturn teams.findTeamByShortName(name);\r\n\t}", "@Override\n\tpublic TeamInfo findById(String id) {\n\t\treturn repository.findOne(id);\n\t}", "public int getTeamIdByName(String name) {\n\t\tint id = 0;\n\t\tPreparedStatement statement = null;\n\t\tResultSet rs = null;\n\t\tString teamIdByNameRecords_sql = \"SELECT id FROM \" + team_table + \" WHERE name='\" + name + \"'\";\n\t\tconnection = connector.getConnection();\n\t\ttry {\n\t\t\tstatement = connection.prepareStatement(teamIdByNameRecords_sql);\n\t\t\trs = statement.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tid = rs.getInt(1);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn id;\n\t}", "TeamDTO findOne(Long id);", "public Team findTeamFromName(String name) {\r\n Iterator<Team> itr = this.getTeamTreeFromMatchTree().iterator();\r\n Team team;\r\n while (itr.hasNext()){\r\n team = itr.next();\r\n if (team.getName().equals(name)){\r\n return team;\r\n }\r\n }\r\n return null;\r\n }", "SmsEmployeeTeam selectByPrimaryKey(String id);", "public static Team findById(int id) throws DALException {\n\n\t\t\tConnection cnx = null;\n\t\t\tPreparedStatement pstmt = null;\n\t\t\tResultSet rs = null;\n\t\t\tTeam team = new Team();\n\n\t\t\ttry {\n\t\t\t\t// Connection DB\n\t\t\t\tcnx = DBConnection.connect();\n\t\t\t\tpstmt = cnx.prepareStatement(SEARCH_ID_TEAM);\n\t\t\t\tpstmt.setInt(1, id);\n\t\t\t\trs = pstmt.executeQuery();\n\n\t\t\t\tif (rs.next()) {\n\n\t\t\t\t\tteam.setIdTeam(rs.getInt(\"idTeams\"));\n\t\t\t\t\tteam.setName(rs.getString(\"name\"));\n\t\t\t\t\t\n\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\tthrow new DALException(\"Problem - search teams By Id - TeamDAO - Request :\"+ pstmt+ \" Team: \" + team + e.getMessage());\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (rs != null)\n\t\t\t\t\t\trs.close();\n\t\t\t\t\tif (pstmt != null)\n\t\t\t\t\t\tpstmt.close();\n\t\t\t\t\tif (cnx != null)\n\t\t\t\t\t\tcnx.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\tthrow new DALException(\"Problem - Closing connection - \" + e.getMessage());\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn team;\n\n\t\t}", "List<Team> findTeamsByUserId(UserId userId);", "public Teams getTeamById(UUID id)\n {\n Optional<Teams> optionalTeam = teamRepo.findById(id);\n if(!optionalTeam.isPresent())\n throw new TeamNotFoundException(\"Team Record with \" + id + \" is not available\");\n return teamRepo.findById(id).get();\n }", "public String getTeam(int id){\r\n\t\treturn teamList.get(id);\r\n\t}", "public static String findTeam(Scanner input, int searchId) {\nwhile (input.hasNextLine()) {\nString line = input.nextLine();\n\nScanner lineScan = new Scanner(line).useDelimiter(\"\\t\");\n\nint id = lineScan.nextInt();\n\nif (id == searchId) {\n\nreturn line; // we found them!\n\n}\n\n}\n\nreturn \"\"; \n\n}", "public String getTeamNameById(int id) {\n\t\tString t = \"\";\n\t\tPreparedStatement statement = null;\n\t\tResultSet rs = null;\n\t\tString teamByIdRecords_sql = \"SELECT name FROM \" + team_table + \" WHERE id='\" + id + \"'\";\n\t\tconnection = connector.getConnection();\n\t\ttry {\n\t\t\tstatement = connection.prepareStatement(teamByIdRecords_sql);\n\t\t\trs = statement.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tt = rs.getString(1);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn t;\n\t}", "public static Team getTeam(long id) {\n return find().where().eq(\"id\", id).findUnique();\n }", "TeamResultWrapper findTeams(String personId,\n String partOfGroupname, int offset, int pageSize);", "SysTeam selectByPrimaryKey(Integer teamId);", "public Match findMatchFromTeamName(String name1, String name2){\r\n Iterator<Match> itr = this.resultsTree.iterator();\r\n Match m;\r\n while (itr.hasNext()) {\r\n m = itr.next();\r\n if (m.getTeam1().getName().equals(name1) \r\n && m.getTeam2().getName().equals(name2)){\r\n return m;\r\n }\r\n }\r\n return null;\r\n }", "@RequestMapping(method = RequestMethod.GET, value = \"/teamsForUser/{name}\")\n public JSONObject getTeamForUserPage(@PathVariable String name) {\n JSONArray teamJsonArray = getAllTeamsForUserPage();\n JSONObject jsonObject = new JSONObject();\n\n for (int i = 0; i < teamJsonArray.size(); i++) {\n if (teamJsonArray.get(i).toString().contains(name)) {\n return (JSONObject) teamJsonArray.get(i);\n }\n }\n return jsonObject;\n }", "public String getTeamId() {\r\n\t\treturn teamName;\r\n\t}", "@Override\n public Team getTeamById(int id){\n try {\n String sql = \"SELECT * FROM Team WHERE Team.teamid = ?\";\n Team team = jdbc.queryForObject(sql, new TeamMapper(), id);\n team.setUser(getUserFromTeam(team));\n return team;\n }catch(DataAccessException ex){\n return null;\n }\n }", "public static Team find(String id) throws SQLException\n {\n String query = \"SELECT * FROM team WHERE teamID = ?\";\n PreparedStatement stmt = db.getPreparedStatement(query);\n stmt.setString(1, id);\n Team team = null;\n ResultSet r = db.executeQuery(stmt);\n if (r.next())\n {\n team = new Team(r.getString(\"teamID\"), r.getString(\"motto\"), r.getInt(\"totalKittiesKlicked\"));\n }\n\n return team;\n }", "public Team(String name) {\n this.name = name;\n }", "@RequestMapping(value = \"/{id}\", method=RequestMethod.GET)\n public ResponseEntity<?> findById(@PathVariable final Integer id) {\n Team team = this.teamService.findById(id);\n return ResponseEntity.ok().body(team);\n }", "public SoccerTeam getTeam(String teamName) throws TeamNotFoundException {\n\n for (int i = 0; i < this.teams.size(); i++) {\n SoccerTeam team = this.teams.get(i);\n\n if (team.getName().equals(teamName)){\n return team;\n }\n }\n throw new TeamNotFoundException(\"Team that you are searching for is not found\");\n }", "public Team getTeamByName(String name) {\n\t\tTeam t = null;\n\t\ttry {\n\t\t\tPreparedStatement statement = null;\n\t\t\tResultSet rs = null;\n\t\t\tString teamRecords_sql = \"SELECT * FROM \" + team_table + \" WHERE name='\" + name + \"'\";\n\t\t\tconnection = connector.getConnection();\n\t\t\tstatement = connection.prepareStatement(teamRecords_sql);\n\t\t\trs = statement.executeQuery();\n\t\t\tList<Player> players = new ArrayList<Player>();\n\t\t\tif (rs.next()) {\n\t\t\t\tplayers = formatPlayers(getPlayersByTeamId(rs.getInt(1)));\n\t\t\t\tt = new Team(players, rs.getString(2), rs.getString(3), rs.getString(4), rs.getDate(5));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn t;\n\t}", "public int getTeamIdByPlayerName(String pName) {\n\t\tint id = 0;\n\t\tPreparedStatement statement = null;\n\t\tResultSet rs = null;\n\t\tString teamIdByPlayerNameRecords_sql = \"SELECT idTeam FROM \" + player_table + \" WHERE name='\" + pName + \"'\";\n\t\tconnection = connector.getConnection();\n\t\ttry {\n\t\t\tstatement = connection.prepareStatement(teamIdByPlayerNameRecords_sql);\n\t\t\trs = statement.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tid = rs.getInt(1);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn id;\n\t}", "private Team getTeam(String teamName) {\n return scoreboard.getTeam(trimString(teamName));\n }", "List<Team> findAll();", "public boolean findTeam(String teamName) throws SQLException {\n\t\tConnection conn = DriverManager.getConnection(\"jdbc:sqlite:users\");\n\t\tStatement stmt = conn.createStatement();\n\t\tString SQL = \"select * from leaguestandings where TeamName = '\" + teamName + \"';\";\n\n\t\tResultSet rset = stmt.executeQuery(SQL);\n\n\t\tif (rset.next()) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "private static void search_by_id() {\r\n\t\ttry (// Creates a connection and statement object\r\n\t\t\t\tConnection conn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/PoisedPMS\",\"poisedpms\",\"poisedpms\");\r\n\t\t\t\t\r\n\t\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\t\t\r\n\t\t\t){\r\n\t\t\tScanner input = new Scanner(System.in);\r\n\t\t\r\n\t\t\tSystem.out.println(\"Project id: \");\r\n\t\t\tString project_id_str = input.nextLine();\r\n\t\t\r\n\t\t\tString strSelectProject = String.format(\"SELECT * FROM projects INNER JOIN project_statuses ON \"\r\n\t\t\t\t\t+ \"projects.project_id = project_statuses.project_id;\");\r\n\t\t\tResultSet project_rset = stmt.executeQuery(strSelectProject);\r\n\t\t\t\r\n\t\t\tfetch_all_project_info(stmt, project_id_str, project_rset);\r\n\t\t/**\r\n\t\t * @exception If entered project id cannot be found in the projects table then an SQLException is thrown\r\n\t\t */\t\r\n\t\t} catch ( SQLException ex ) {\r\n\t\t\tex . printStackTrace ();\r\n\t\t}\r\n\t\t\r\n\t}", "private static Team getTeam(Connection con,Long teamId) {\n\n Team team = null;\n\n String query = SQLConstants.GET_TEAM_BY_TEAM_ID;\n\n try {\n team = new Team();\n //Connection con = JdbcConnection.getConnection();\n PreparedStatement pstmt = con.prepareStatement(query);\n pstmt.setLong(1, teamId);\n\n ResultSet rs = pstmt.executeQuery();\n\n while (rs.next()) {\n team.setId(rs.getLong(\"id\"));\n team.setName(rs.getString(\"name\"));\n team.setDescribe(rs.getString(\"describe\"));\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return team;\n\n }", "public int getTeamId() {\n return teamId;\n }", "@Test\r\n\tpublic void findAllTeams() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: findAllTeams \r\n\t\tInteger startResult = 0;\r\n\t\tInteger maxRows = 0;\r\n\t\tList<Team> response = null;\r\n\t\tresponse = service.findAllTeams(startResult, maxRows);\r\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: findAllTeams\r\n\t}", "@Override\n\tpublic List<String> getTeamNames(Integer id) {\n\t\treturn null;\n\t}", "Team getMyTeam();", "public interface TeamService {\n Teams getAllTeams();\n Team getTeamById(int id);\n Teams getSelectedTeams(int[] teamList);\n}", "public void setTeamId(int value) {\n this.teamId = value;\n }", "private static void search_by_name() {\r\n\t\ttry (// Creates a connection and statement object\r\n\t\t\t\tConnection conn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/PoisedPMS\",\"poisedpms\",\"poisedpms\");\r\n\t\t\t\t\r\n\t\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\t\t\r\n\t\t\t){\r\n\t\t\tScanner input = new Scanner(System.in);\r\n\t\t\r\n\t\t\tSystem.out.println(\"Project Name: \");\r\n\t\t\tString project_name = input.nextLine();\r\n\t\t\r\n\t\t\tString strSelectProject = String.format(\"SELECT * FROM projects INNER JOIN project_statuses ON \"\r\n\t\t\t\t\t+ \"projects.project_id = project_statuses.project_id;\");\r\n\t\t\tResultSet project_rset = stmt.executeQuery(strSelectProject);\r\n\t\t\t\r\n\t\t\tfetch_all_project_info(stmt, project_name, project_rset);\r\n\t\t/**\r\n\t\t * @exception If entered project name cannot be found in the projects table then an SQLException is thrown\r\n\t\t */\t\t\r\n\t\t} catch ( SQLException ex ) {\r\n\t\t\tex . printStackTrace ();\r\n\t\t}\r\n\t}", "public void setTeamName(String name) {\n\t\tteamName = name;\n\t}", "List<Team> findByIds(List<Long> teamIds);", "int getTeam();", "public Individual getIndividualByName(String name) throws ObjectNotFoundException{\n \t\n\t\tList<Individual> individualList = new ArrayList<>();\n\t\tindividualList = (new TeamsJsonReader()).getListOfIndividuals();\n\t\tIndividual individual = null;\n\t\tint size, counter = 0;\n\t\tfor (size = 0; size < individualList.size(); size++) {\n\t\t\tcounter = 0;\n\n\t\t\tindividual = individualList.get(size);\n\n\t\t\tif (individual.getName().equals(name)) {\n\t\t\t\tcounter = 1;\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (size == individualList.size() && counter == 0)\n\t\t\tthrow new ObjectNotFoundException(\"individual\", \"name\", name);\n\n\t\treturn individual;\n\n\n }", "@RequestMapping(\"/teams/{id}\")\n public ArrayList<Team> readTeam(@PathVariable Integer id) {\n return teamService.getTeam(id);\n }", "TeamResultWrapper findTeamsByMember(String personId,\n String partOfGroupname, int offset, int pageSize);", "@Override\n\tpublic ArrayList<MemberVO> idFind(String name) {\n\t\treturn mapper.idFind(name);\n\t}", "TeamResultWrapper findAllTeams(String personId, int offset,\n int pageSize);", "public ResultSet getTeamInfo(String teamsname) throws SQLException\n\t{\n\t\t// Create a connection to the database.\n\t\t conn = DriverManager.getConnection(DB_URL);\n\t\t// Create a Statement object for the query.\n\t\tStatement stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);\n\t\t// Execute the query.\n\t\tResultSet resultSet = stmt.executeQuery(\"SELECT * FROM Team WHERE teamName = '\" + teamsname + \"'\");\n\t\t\n\t\treturn resultSet;\n\t\n\t}", "@GET\n @Path(\"Current/Team/{teamId}\")\n public Response getTeamByCurrentUser(@PathParam(\"teamId\") Long teamId) {\n Response r = Response.noContent().build();\n User currentUser = userFacade.getCurrentUser();\n final Collection<Game> playedGames = gameFacade.findRegisteredGames(currentUser.getId());\n for (Game g : playedGames) {\n Collection<Team> teams = g.getTeams();\n for (Team t : teams) {\n if (teamId.equals(t.getId())) {\n for (Player p : t.getPlayers()) {\n if (p.getUserId().equals(currentUser.getId())) {\n r = Response.ok().entity(t).build();\n }\n }\n }\n }\n }\n return r;\n }", "@Override\n\tpublic List<ProjectTeamBean> selectProjectTeamName(String word) {\n\t\treturn null;\n\t}", "public void setTeamId(String teamId) {\r\n\t\tthis.teamName = teamId;\r\n\t}", "public String getTeamId() {\n\t\treturn teamId;\n\t}", "public String getTeamId() {\n\t\treturn teamId;\n\t}", "public Team(String name) {\r\n this.name = name;\r\n team = new ArrayList<Hero>();\r\n }", "UserGroup findByNameIgnoreCase(String companyId, String name);", "public Team selectTeam() {\r\n \r\n String[] list = new String[controller.getTeams().size()];\r\n for (int i = 0; i < controller.getTeams().size(); i++) {\r\n list[i] = controller.getTeams().get(i).getName();\r\n }\r\n\r\n JComboBox cmbOption = new JComboBox(list);\r\n int input = JOptionPane.showOptionDialog(null, cmbOption, \"Select Team that your like Delete\",JOptionPane.DEFAULT_OPTION,JOptionPane.QUESTION_MESSAGE, null, null, null);\r\n if(input==-1){\r\n return null;\r\n }\r\n Team teamAux = controller.searchTeam((String) cmbOption.getSelectedItem());\r\n return teamAux;\r\n }", "public String nodeTeam(String id)\n\t{\n\t\treturn getNode(id).team;\n\t}", "List<Team> getTeamsFromApi(List<Long> teamIds);", "public ModelGame findGameById () {\n Scanner input = new Scanner(System.in); // Create a Scanner object\n System.out.println(\"Enter the ID of the game you wish to return:\");\n int id = input.nextInt(); // Read user input of id\n for (ModelGame game : this.allGames) {\n if (game.getGameId() == id) {\n return game;\n }\n }\n return null;\n }", "public Team getTeamById(int id, ResultSet rsMatches) {\n\t\tTeam t = null;\n\t\tPreparedStatement statement = null;\n\t\tResultSet rs = null;\n\t\tString teamByIdRecords_sql = \"SELECT * FROM \" + team_table + \" WHERE id='\" + id + \"'\";\n\t\tconnection = connector.getConnection();\n\t\ttry {\n\t\t\tstatement = connection.prepareStatement(teamByIdRecords_sql);\n\t\t\trs = statement.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tt = new Team(formatPlayers(getPlayersByTeamId(id)), rs.getString(2), rs.getString(3), rs.getString(4),\n\t\t\t\t\t\trs.getDate(5));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn t;\n\t}", "List<SysTeam> selectByExample(SysTeamExample example);", "public static void oneTeam(String[] name, int[] team)\n {\n int a=0;\n System.out.println(\"The following players played with one team for their entire NHL careers:\");\n for(int i=0;i<team.length;i++)\n { \n if(team[i]==1)\n {\n System.out.println(name[i]);\n }//end of if statement\n }//end of for loop\n }", "public int getTeamIdBySelection(List<String> selection) {\n\t\tint id = 0;\n\t\tPreparedStatement statement = null;\n\t\tResultSet rs = null;\n\n\t\tjava.sql.Date date = null;\n\t\ttry {\n\t\t\tdate = new java.sql.Date(sdf.parse(selection.get(3)).getTime());\n\t\t} catch (ParseException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tString teamIdBySelectionRecords_sql = \"SELECT id FROM \" + team_table + \" WHERE name='\" + selection.get(0)\n\t\t\t\t+ \"' AND coach='\" + selection.get(1) + \"' AND city='\" + selection.get(2) + \"' AND dateFoundation='\"\n\t\t\t\t+ date + \"'\";\n\t\tconnection = connector.getConnection();\n\t\ttry {\n\t\t\tstatement = connection.prepareStatement(teamIdBySelectionRecords_sql);\n\t\t\trs = statement.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tid = rs.getInt(1);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn id;\n\t}", "public int getTeamId(Team team) {\n\t\tint teamId = 0;\n\t\tPreparedStatement statement = null;\n\t\tResultSet rs = null;\n\t\tString teamIdRecords_sql = \"SELECT id FROM \" + team_table + \" WHERE name='\" + team.getName() + \"'\";\n\t\tconnection = connector.getConnection();\n\t\ttry {\n\t\t\tstatement = connection.prepareStatement(teamIdRecords_sql);\n\t\t\trs = statement.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tteamId = rs.getInt(1);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn teamId;\n\t}", "public static ArrayList<Team> findTeamProject() throws DALException {\n\t\t\tConnection cnx = null;\n\t\t\tPreparedStatement pstmt = null;\n\t\t\tResultSet rs = null;\n\t\t\tArrayList<Team> listTeams = new ArrayList<>();\n\n\t\t\ttry {\n\t\t\t\t// Connection DB\n\t\t\t\tcnx = DBConnection.connect();\n\t\t\t\tpstmt = cnx.prepareStatement(LIST_TEAMS_PROJECTS);\n\t\t\t\trs = pstmt.executeQuery();\n\n\t\t\t\t// For each team\n\t\t\t\twhile (rs.next()) {\n\t\t\t\t\tTeam team = new Team();\n\t\t\t\t\tteam.setIdTeam(rs.getInt(\"Teams_IdTeams\"));\n\t\t\t\t\tteam.setName(rs.getString(\"Teams_name\"));\n\t\t\t\t\tteam.setIdProject(rs.getInt(\"idProjects\"));\n\t\t\t\t\tteam.setNameProject(rs.getString(\"nameProject\"));\n\t\t\t\t\tlistTeams.add(team);\n\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\n\t\t\t\tthrow new DALException(\"Problem - listTeamHisProject - TeamDAO - Request : \"+ pstmt+ \" \" + e.getMessage());\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (rs != null)\n\t\t\t\t\t\trs.close();\n\t\t\t\t\tif (pstmt != null)\n\t\t\t\t\t\tpstmt.close();\n\t\t\t\t\tif (cnx != null)\n\t\t\t\t\t\tcnx.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\tthrow new DALException(\"Problem - Closing connection - \" + e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn listTeams;\n\n\t\t}", "public int getTeamId() {\n\t\treturn teamId;\n\t}", "public String getTeamName() {\r\n return teamName;\r\n }", "public Team get(String teamID) {\n TeamDB tdb = new TeamDB();\n return tdb.get(teamID);\n }", "TeamMember(String _name, String _title) {\r\n this.name = _name;\r\n this.title = _title;\r\n }", "@WebMethod public Team addTeam(String name) throws TeamAlreadyExists;", "public String getHomeTeam();", "public ResultSet getTeamNames() {\n\t\tPreparedStatement statement = null;\n\t\tResultSet rs = null;\n\t\tString teamNamesRecords_sql = \"SELECT name FROM \" + team_table;\n\t\tconnection = connector.getConnection();\n\t\ttry {\n\t\t\tstatement = connection.prepareStatement(teamNamesRecords_sql);\n\t\t\trs = statement.executeQuery();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn rs;\n\t}", "Team createTeam();", "private boolean teamExist(String teamName) {\n boolean doesExist = false;\n for (Team team : scoreboard.getTeams()) if (team.getName().equals(teamName)) doesExist = true;\n return doesExist;\n }", "public VwTeams get(int teamId)\n\t{\n\t\tVwTeams [] results = null;\n\t\t\n\t\ttry\n\t\t{\n\t\t\tresults = dao.findWhereTeamIdEquals(teamId);\t\t\t\n\t\t}\n\t\tcatch (VwTeamsDaoException e)\n\t\t{\n\t\t\tlogger.error(e.getMessage());\n\t\t\t\n\t\t\terror.setCode(Errors.Codes.DB_DAO.getCode());\n\t\t\terror.setWindowTitle(Errors.Codes.DB_DAO.getWindowTitle());\n\t\t\terror.setMessage(Errors.Codes.DB_DAO.getMessage());\n\t\t\t\n\t\t\terror.setExceptionMessage(e.getMessage());\n\t\t\t\n\t\t\tpdr.setError(error);\n\t\t\t\n\t\t\tif (logger.isDebugEnabled())\n\t\t\t\te.printStackTrace();\n\t\t\t\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn results.length == 0 ? null : results[0];\n\t}", "Road findByName(String toFind, ArrayList<Road> list)\n\t{\n\t\tRoad tmp;\n\t\tIterator<Road> it = list.iterator();\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\ttmp = it.next();\n\t\t\tif(tmp.getName().equals(toFind))\n\t\t\t{\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Given(\"^I navigate to team page \\\"([^\\\"]*)\\\"$\")\n public void navigate_to_teamPage(String nameTeam){\n addNewTeam = mainPage.clickNewTeam();\n teamPage = addNewTeam.createTeam(nameTeam);\n }", "public Movie findMovie(String name){\n\n Movie find = null ;\n\n for (Movie movie :movies) {\n\n if(movie.getTitle().equals(name)){\n\n find = movie;\n\n }\n\n }\n\n return find;\n\n }", "List<Person> findByIdAndName(int id,String name);", "Name findNameByPersonPrimary(int idPerson);", "@GetMapping(path=\"{id}\")\n public @ResponseBody TeamMember getTeamMember(@PathVariable long id){\n return teamMemberRepository.getOne(id);\n }", "public void setTeamName(String teamName) {\r\n this.teamName = teamName;\r\n }", "Person findPerson(String name);", "TeamResultWrapper findAllTeamsByMember(String personId, int offset,\n int pageSize);", "private TeamId findWinningTeam(){\n if (state.score().totalPoints(TeamId.TEAM_1)>=Jass.WINNING_POINTS) {\n return TeamId.TEAM_1;\n }\n else {\n return TeamId.TEAM_2;\n }\n }", "private int getIndexForName(String teammateName) {\r\n\t\tfor (int x = 0; x < targetTracking.size(); x++) {\r\n\t\t\tif (targetTracking.get(x).getAlly().getName().equals(teammateName)) {\r\n\t\t\t\treturn x;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\t}", "Match getTeam1LooserOfMatch();", "public interface TeamService {\n\n /**\n * Save a team.\n *\n * @param teamDTO the entity to save\n * @return the persisted entity\n */\n TeamDTO save(TeamDTO teamDTO);\n\n /**\n * Get all the teams.\n *\n * @param pageable the pagination information\n * @return the list of entities\n */\n Page<TeamDTO> findAll(Pageable pageable);\n\n /**\n * Get the \"id\" team.\n *\n * @param id the id of the entity\n * @return the entity\n */\n TeamDTO findOne(Long id);\n\n /**\n * Delete the \"id\" team.\n *\n * @param id the id of the entity\n */\n void delete(Long id);\n\n\tPage<TeamDTO> findByTeamHeadUserLoginIsCurrentUser(Pageable pageable);\n\tPage<TeamDTO> findByActiveAndTeamHeadUserLogin(boolean isActive, String teamHeadLogin, Pageable pageable);\n\tPage<TeamDTO> findByActiveAndIdNotInAndTeamHeadUserLoginNot(boolean isActive, String teamHeadLogin, Pageable pageable);\n\tPage<TeamDTO> findByActiveAndIdInAndTeamHeadUserLoginNot(boolean isActive, String teamHeadLogin, Pageable pageable);\n\tPage<TeamDTO> findByActiveAndIdNotInAndTeamHeadUserLogin(boolean isActive, String teamHeadLogin, Pageable pageable);\n\tPage<TeamDTO> findByActiveAndIdNotIn(boolean isActive, String userLogin, Pageable pageable);\n\tPage<TeamDTO> findByActive(boolean isActive, Pageable pageable);\n\tPage<TeamDTO> findByActiveAndIdInAndTeamHeadUserLogin(boolean isActive, String userLogin, String teamHeadUserLogin, Pageable pageable);\n}", "public int getTeam() {\n return team;\n }", "public PageBean<Match> find(String name) {\n\t\tif(name==null||\"\".equals(name.trim())){\r\n\t\t\treturn matchDao.find(\"from Match\");\r\n\t\t}else{\r\n\t\t\treturn matchDao.find(\"from Match where nickname like ? or userName like ?\",\r\n\t\t\t\t\tnew Object[]{\"%\"+name+\"%\",\"%\"+name+\"%\"});\r\n\t\t\t\r\n\t\t}\r\n\t}", "public Cursor teamSpinnerResult( String spinteam) {\n sqLiteDB = teamDB.getReadableDatabase();\n String siteItemResultQuery = \"SELECT \" + TeamsContents.TEAM_TID +\n \" FROM \" + TeamsContents.TEAM_TABLE +\n \" where \" + TeamsContents.TEAM_LEADER + \" LIKE '%\" + spinteam + \"%'\";\n\n Cursor cusAllSite = sqLiteDB.rawQuery( siteItemResultQuery, null );\n if (cusAllSite.moveToFirst()) {\n do {\n cusAllSite.getString( 0 );\n } while (cusAllSite.moveToNext());\n }\n cusAllSite.moveToFirst();\n sqLiteDB.close();\n return cusAllSite;\n }", "public Individual getIndividualById(Integer id) throws ObjectNotFoundException{\n \tList<Individual> individualList = new ArrayList<>();\n\t\tindividualList = (new TeamsJsonReader()).getListOfIndividuals();\n\t\tIndividual individual = null;\n\t\tint size, counter = 0;\n\t\tfor (size = 0; size < individualList.size(); size++) {\n\t\t\tcounter = 0;\n\n\t\t\tindividual = individualList.get(size);\n\t\t\tif (individual.getId().compareTo(id) == 0) {\n\t\t\t\tcounter = 1;\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (size == individualList.size() && counter == 0)\n\t\t\tthrow new ObjectNotFoundException(\"individual\", \"id\", id.toString());\n\n\t\treturn individual;\n\n }", "public String getTeam() {\n return team;\n }", "public ArrayList<Student> retrieveStudentsInvitedByTeam(int teamId) {\r\n\t\tArrayList<Student> students = new ArrayList<Student>();\r\n\t\tHashMap<String, ArrayList<String>> map = MySQLConnector.executeMySQL(\"select\", \"SELECT * FROM team_request WHERE team_id = \" + teamId);\r\n\t\tSet<String> keySet = map.keySet();\r\n\t\tIterator<String> iterator = keySet.iterator();\r\n\t\t\r\n\t\twhile (iterator.hasNext()){\r\n\t\t\tString key = iterator.next();\r\n\t\t\tArrayList<String> array = map.get(key);\t\r\n\t\t\tint stdId\t \t= Integer.parseInt(array.get(2));\r\n\t\t\t\r\n\t\t\tStudent student = null;\r\n\t\t\t\r\n\t\t\ttry{\r\n\t\t\t\tstudent = retrieve(stdId);\r\n\t\t\t}catch(Exception e){}\r\n\t\t\t\r\n\t\t\tstudents.add(student);\r\n\t\t}\r\n\t\t\r\n\t\treturn students;\r\n\t}", "public abstract SmartObject findIndividualName(String individualName);", "private boolean exist(List<PlayerTeam> l, String name) {\n boolean ex = false;\n PlayerTeam curr = l.first();\n while (curr != null) {\n if (curr.getName().equals(name))\n return true;\n curr = l.next();\n }\n return ex;\n }", "public List<Team> getListOfTeams(){\n \tMap<String, Object> myMap = new HashMap<String, Object>();\n\t\tJSONObject jsonobj = null;\n\t\tList<Team> team = new ArrayList<>();\n\t\tTeamsJsonReader reader = new TeamsJsonReader();\n\t\tJSONParser parser = new JSONParser();\n\t\tObject obj = null;\n\n\t\ttry {\n\t\t\tobj = parser.parse(new FileReader(\"src/main/resources/db.json\"));\n\t\t\tJSONObject jsonObject = (JSONObject) obj;\n\t\t\tJSONArray jsonarr = (JSONArray) jsonObject.get(\"teams\");\n\t\t\tfor (int size = 0; size < jsonarr.size(); size++) {\n\t\t\t\tList<Individual> individualList = new ArrayList<>();\n\t\t\t\tjsonobj = (JSONObject) jsonarr.get(size);\n\t\t\t\tmyMap.put(\"name\", jsonobj.get(\"name\"));\n\t\t\t\tmyMap.put(\"id\", ((Long) jsonobj.get(\"id\")).intValue());\n\t\t\t\tJSONArray memberArray = (JSONArray) jsonobj.get(\"members\");\n\n\t\t\t\tfor (int index = 0; index < memberArray.size(); index++) {\n\n\t\t\t\t\tindividualList.add(reader.getIndividualById(((Long) memberArray.get(index)).intValue()));\n\n\t\t\t\t}\n\t\t\t\tmyMap.put(\"members\", individualList);\n\t\t\t\t\n\t\t\t\tteam.add(new Team(myMap));\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn team;\n }", "public User getUserFromTeam(Team team){\n String sql = \"SELECT * FROM trainer tr INNER JOIN Team T ON tr.userid = T.userid WHERE T.teamid = ?\";\n User user = jdbc.queryForObject(sql, new UserDaoImpl.UserMapper(), team.getId());\n System.out.print(user);\n return user;\n }", "public ArrayList<Student> getTeamListFromTeamId(int teamId){\r\n\t\tArrayList<Student> students = new ArrayList<Student>();\r\n\t\tHashMap<String, ArrayList<String>> map = MySQLConnector.executeMySQL(\"select\", \"SELECT * FROM `is480-matching`.users inner join `is480-matching`.students on users.id=students.id WHERE students.team_id = \" + teamId);\r\n\t\tSet<String> keySet = map.keySet();\r\n\t\tIterator<String> iterator = keySet.iterator();\r\n\t\t\r\n\t\twhile (iterator.hasNext()){\r\n\t\t\tString key = iterator.next();\r\n\t\t\tArrayList<String> array = map.get(key);\t\r\n\t\t\tint id \t\t\t\t= Integer.parseInt(array.get(0));\r\n\t\t\tString username \t= array.get(1);\r\n\t\t\tString fullName \t= array.get(2);\r\n\t\t\tString contactNum \t= array.get(3);\r\n\t\t\tString email \t\t= array.get(4);\r\n\t\t\tString type\t\t\t= array.get(5);\r\n\t\t\tString secondMajor \t= array.get(7);\r\n\t\t\tint role \t\t\t= Integer.parseInt(array.get(8));\r\n\t\t\tint teamid \t\t\t= Integer.parseInt(array.get(9));\r\n\t\t\tint prefRole \t\t= Integer.parseInt(array.get(10));\r\n\t\t\t\r\n\t\t\tStudent student = new Student(id, username, fullName, contactNum, email, type, secondMajor, role, teamid, prefRole);\r\n\t\t\tstudents.add(student);\r\n\t\t}\r\n\t\t\r\n\t\tCollections.sort(students, new Comparator<Student>() {\r\n\t @Override public int compare(Student s1, Student s2) {\r\n\t \treturn s1.getRole() - s2.getRole();\r\n\t }\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t\treturn students;\r\n\t}" ]
[ "0.78801024", "0.73047405", "0.69003534", "0.6825275", "0.67601615", "0.6758668", "0.6599673", "0.6557881", "0.65061736", "0.6502415", "0.6485949", "0.6467933", "0.6466385", "0.64053386", "0.63912994", "0.63366127", "0.6291956", "0.62769246", "0.62505955", "0.62470835", "0.6245191", "0.62037086", "0.6169232", "0.61359423", "0.6113083", "0.6109168", "0.61077005", "0.6086903", "0.59946036", "0.59918666", "0.5983938", "0.5913209", "0.5905356", "0.587582", "0.5854276", "0.584622", "0.58438337", "0.58343923", "0.5815316", "0.5810493", "0.5805748", "0.5798878", "0.5789616", "0.5780435", "0.57779944", "0.57598275", "0.57456523", "0.57315946", "0.57208407", "0.5713841", "0.57030565", "0.5702938", "0.5668255", "0.5668255", "0.56660897", "0.5664165", "0.56592023", "0.56413114", "0.5637555", "0.5631119", "0.5629774", "0.56028813", "0.5580634", "0.5576152", "0.5568659", "0.55654866", "0.5549277", "0.55174804", "0.5489472", "0.54818666", "0.5446568", "0.54291964", "0.54142857", "0.5412582", "0.5411939", "0.540507", "0.540205", "0.5399778", "0.53925043", "0.5380445", "0.53658855", "0.53608745", "0.5357771", "0.5353516", "0.5345532", "0.5344426", "0.5343196", "0.53430706", "0.5339902", "0.5331825", "0.5326344", "0.53120035", "0.5311805", "0.53089386", "0.5305158", "0.5292182", "0.5276451", "0.52754587", "0.52711225", "0.5266421" ]
0.66373163
6
Search team by id and return Team Object
public static Team findById(int id) throws DALException { Connection cnx = null; PreparedStatement pstmt = null; ResultSet rs = null; Team team = new Team(); try { // Connection DB cnx = DBConnection.connect(); pstmt = cnx.prepareStatement(SEARCH_ID_TEAM); pstmt.setInt(1, id); rs = pstmt.executeQuery(); if (rs.next()) { team.setIdTeam(rs.getInt("idTeams")); team.setName(rs.getString("name")); } } catch (SQLException e) { throw new DALException("Problem - search teams By Id - TeamDAO - Request :"+ pstmt+ " Team: " + team + e.getMessage()); } finally { try { if (rs != null) rs.close(); if (pstmt != null) pstmt.close(); if (cnx != null) cnx.close(); } catch (SQLException e) { throw new DALException("Problem - Closing connection - " + e.getMessage()); } } return team; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Team get(Long id);", "Team findById(Long id);", "TeamDTO findOne(Long id);", "@Override\n\tpublic TeamInfo findById(String id) {\n\t\treturn repository.findOne(id);\n\t}", "public Teams getTeamById(UUID id)\n {\n Optional<Teams> optionalTeam = teamRepo.findById(id);\n if(!optionalTeam.isPresent())\n throw new TeamNotFoundException(\"Team Record with \" + id + \" is not available\");\n return teamRepo.findById(id).get();\n }", "public static Team getTeam(long id) {\n return find().where().eq(\"id\", id).findUnique();\n }", "@RequestMapping(value = \"/{id}\", method=RequestMethod.GET)\n public ResponseEntity<?> findById(@PathVariable final Integer id) {\n Team team = this.teamService.findById(id);\n return ResponseEntity.ok().body(team);\n }", "@Override\n public Team getTeamById(int id){\n try {\n String sql = \"SELECT * FROM Team WHERE Team.teamid = ?\";\n Team team = jdbc.queryForObject(sql, new TeamMapper(), id);\n team.setUser(getUserFromTeam(team));\n return team;\n }catch(DataAccessException ex){\n return null;\n }\n }", "Team findByName(String name);", "public static Team find(String id) throws SQLException\n {\n String query = \"SELECT * FROM team WHERE teamID = ?\";\n PreparedStatement stmt = db.getPreparedStatement(query);\n stmt.setString(1, id);\n Team team = null;\n ResultSet r = db.executeQuery(stmt);\n if (r.next())\n {\n team = new Team(r.getString(\"teamID\"), r.getString(\"motto\"), r.getInt(\"totalKittiesKlicked\"));\n }\n\n return team;\n }", "List<Team> findTeamsByUserId(UserId userId);", "@RequestMapping(\"/teams/{id}\")\n public ArrayList<Team> readTeam(@PathVariable Integer id) {\n return teamService.getTeam(id);\n }", "SmsEmployeeTeam selectByPrimaryKey(String id);", "public String getTeam(int id){\r\n\t\treturn teamList.get(id);\r\n\t}", "SysTeam selectByPrimaryKey(Integer teamId);", "private static Team getTeam(Connection con,Long teamId) {\n\n Team team = null;\n\n String query = SQLConstants.GET_TEAM_BY_TEAM_ID;\n\n try {\n team = new Team();\n //Connection con = JdbcConnection.getConnection();\n PreparedStatement pstmt = con.prepareStatement(query);\n pstmt.setLong(1, teamId);\n\n ResultSet rs = pstmt.executeQuery();\n\n while (rs.next()) {\n team.setId(rs.getLong(\"id\"));\n team.setName(rs.getString(\"name\"));\n team.setDescribe(rs.getString(\"describe\"));\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return team;\n\n }", "public Team getTeamById(int id, ResultSet rsMatches) {\n\t\tTeam t = null;\n\t\tPreparedStatement statement = null;\n\t\tResultSet rs = null;\n\t\tString teamByIdRecords_sql = \"SELECT * FROM \" + team_table + \" WHERE id='\" + id + \"'\";\n\t\tconnection = connector.getConnection();\n\t\ttry {\n\t\t\tstatement = connection.prepareStatement(teamByIdRecords_sql);\n\t\t\trs = statement.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tt = new Team(formatPlayers(getPlayersByTeamId(id)), rs.getString(2), rs.getString(3), rs.getString(4),\n\t\t\t\t\t\trs.getDate(5));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn t;\n\t}", "@GetMapping(path=\"{id}\")\n public @ResponseBody TeamMember getTeamMember(@PathVariable long id){\n return teamMemberRepository.getOne(id);\n }", "List<Team> findAll();", "@Override\r\n\tpublic TeamPO findTeamByName(String name) {\n\t\treturn teams.findTeamByShortName(name);\r\n\t}", "Team getMyTeam();", "@GET\n @Path(\"Current/Team/{teamId}\")\n public Response getTeamByCurrentUser(@PathParam(\"teamId\") Long teamId) {\n Response r = Response.noContent().build();\n User currentUser = userFacade.getCurrentUser();\n final Collection<Game> playedGames = gameFacade.findRegisteredGames(currentUser.getId());\n for (Game g : playedGames) {\n Collection<Team> teams = g.getTeams();\n for (Team t : teams) {\n if (teamId.equals(t.getId())) {\n for (Player p : t.getPlayers()) {\n if (p.getUserId().equals(currentUser.getId())) {\n r = Response.ok().entity(t).build();\n }\n }\n }\n }\n }\n return r;\n }", "public VwTeams get(int teamId)\n\t{\n\t\tVwTeams [] results = null;\n\t\t\n\t\ttry\n\t\t{\n\t\t\tresults = dao.findWhereTeamIdEquals(teamId);\t\t\t\n\t\t}\n\t\tcatch (VwTeamsDaoException e)\n\t\t{\n\t\t\tlogger.error(e.getMessage());\n\t\t\t\n\t\t\terror.setCode(Errors.Codes.DB_DAO.getCode());\n\t\t\terror.setWindowTitle(Errors.Codes.DB_DAO.getWindowTitle());\n\t\t\terror.setMessage(Errors.Codes.DB_DAO.getMessage());\n\t\t\t\n\t\t\terror.setExceptionMessage(e.getMessage());\n\t\t\t\n\t\t\tpdr.setError(error);\n\t\t\t\n\t\t\tif (logger.isDebugEnabled())\n\t\t\t\te.printStackTrace();\n\t\t\t\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn results.length == 0 ? null : results[0];\n\t}", "TeamResultWrapper findTeams(String personId,\n String partOfGroupname, int offset, int pageSize);", "public Team get(String teamID) {\n TeamDB tdb = new TeamDB();\n return tdb.get(teamID);\n }", "public Set<Sportive> filterByTeamId(int id){\n Iterable<Sportive> materials = repo.findAll();\n return StreamSupport.stream(materials.spliterator(), false).filter(sportive -> sportive.getTeamId()==id).collect(Collectors.toSet());\n }", "public Individual getIndividualById(Integer id) throws ObjectNotFoundException{\n \tList<Individual> individualList = new ArrayList<>();\n\t\tindividualList = (new TeamsJsonReader()).getListOfIndividuals();\n\t\tIndividual individual = null;\n\t\tint size, counter = 0;\n\t\tfor (size = 0; size < individualList.size(); size++) {\n\t\t\tcounter = 0;\n\n\t\t\tindividual = individualList.get(size);\n\t\t\tif (individual.getId().compareTo(id) == 0) {\n\t\t\t\tcounter = 1;\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (size == individualList.size() && counter == 0)\n\t\t\tthrow new ObjectNotFoundException(\"individual\", \"id\", id.toString());\n\n\t\treturn individual;\n\n }", "TeamResultWrapper findAllTeams(String personId, int offset,\n int pageSize);", "public interface TeamService {\n Teams getAllTeams();\n Team getTeamById(int id);\n Teams getSelectedTeams(int[] teamList);\n}", "public PlayerGame find(Long id) {\n return playerGames.stream()\n .filter(p -> p.getId().equals(id))\n .findFirst()\n .orElse(null);\n }", "List<Team> getTeamsFromApi(List<Long> teamIds);", "@Test\r\n\tpublic void findAllTeams() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: findAllTeams \r\n\t\tInteger startResult = 0;\r\n\t\tInteger maxRows = 0;\r\n\t\tList<Team> response = null;\r\n\t\tresponse = service.findAllTeams(startResult, maxRows);\r\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: findAllTeams\r\n\t}", "Coach findById(long id);", "List<Team> findByIds(List<Long> teamIds);", "List<SysTeam> selectByExample(SysTeamExample example);", "public ModelGame findGameById () {\n Scanner input = new Scanner(System.in); // Create a Scanner object\n System.out.println(\"Enter the ID of the game you wish to return:\");\n int id = input.nextInt(); // Read user input of id\n for (ModelGame game : this.allGames) {\n if (game.getGameId() == id) {\n return game;\n }\n }\n return null;\n }", "public SoccerTeam getTeam(String teamName) throws TeamNotFoundException {\n\n for (int i = 0; i < this.teams.size(); i++) {\n SoccerTeam team = this.teams.get(i);\n\n if (team.getName().equals(teamName)){\n return team;\n }\n }\n throw new TeamNotFoundException(\"Team that you are searching for is not found\");\n }", "public Match getMatchById(int id) {\n\t\tMatch m = null;\n\t\tPreparedStatement statement = null;\n\t\tResultSet rs = null;\n\t\tString matchByIdRecords_sql = \"SELECT * FROM \" + match_table + \" WHERE id='\" + id + \"'\";\n\t\tconnection = connector.getConnection();\n\t\ttry {\n\t\t\tstatement = connection.prepareStatement(matchByIdRecords_sql);\n\t\t\trs = statement.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tm = new Match(getTeamById(rs.getInt(2), getMatchesByTeamId(rs.getInt(2))),\n\t\t\t\t\t\tgetTeamById(rs.getInt(3), getMatchesByTeamId(rs.getInt(3))), getStatsById(id), rs.getDate(4),\n\t\t\t\t\t\trs.getString(5));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn m;\n\t}", "public int getTeamId() {\n return teamId;\n }", "TeamResultWrapper findTeamsByMember(String personId,\n String partOfGroupname, int offset, int pageSize);", "public interface TeamService {\n\n /**\n * Save a team.\n *\n * @param teamDTO the entity to save\n * @return the persisted entity\n */\n TeamDTO save(TeamDTO teamDTO);\n\n /**\n * Get all the teams.\n *\n * @param pageable the pagination information\n * @return the list of entities\n */\n Page<TeamDTO> findAll(Pageable pageable);\n\n /**\n * Get the \"id\" team.\n *\n * @param id the id of the entity\n * @return the entity\n */\n TeamDTO findOne(Long id);\n\n /**\n * Delete the \"id\" team.\n *\n * @param id the id of the entity\n */\n void delete(Long id);\n\n\tPage<TeamDTO> findByTeamHeadUserLoginIsCurrentUser(Pageable pageable);\n\tPage<TeamDTO> findByActiveAndTeamHeadUserLogin(boolean isActive, String teamHeadLogin, Pageable pageable);\n\tPage<TeamDTO> findByActiveAndIdNotInAndTeamHeadUserLoginNot(boolean isActive, String teamHeadLogin, Pageable pageable);\n\tPage<TeamDTO> findByActiveAndIdInAndTeamHeadUserLoginNot(boolean isActive, String teamHeadLogin, Pageable pageable);\n\tPage<TeamDTO> findByActiveAndIdNotInAndTeamHeadUserLogin(boolean isActive, String teamHeadLogin, Pageable pageable);\n\tPage<TeamDTO> findByActiveAndIdNotIn(boolean isActive, String userLogin, Pageable pageable);\n\tPage<TeamDTO> findByActive(boolean isActive, Pageable pageable);\n\tPage<TeamDTO> findByActiveAndIdInAndTeamHeadUserLogin(boolean isActive, String userLogin, String teamHeadUserLogin, Pageable pageable);\n}", "public TAlgmntSalesTeam findTAlgmntSalesTeamById(final TAlgmntSalesTeamId tAlgmntSalesTeamId) {\n\t\tLOGGER.info(\"find TAlgmntSalesTeam instance with TAlgmntSalesTeamId: \" + tAlgmntSalesTeamId);\n\t\treturn genericDAO.get(clazz, tAlgmntSalesTeamId);\n\t}", "public String nodeTeam(String id)\n\t{\n\t\treturn getNode(id).team;\n\t}", "TeamResultWrapper findAllTeamsByMember(String personId, int offset,\n int pageSize);", "public MemberPo findMember(final String id);", "public ArrayList<Student> getTeamListFromTeamId(int teamId){\r\n\t\tArrayList<Student> students = new ArrayList<Student>();\r\n\t\tHashMap<String, ArrayList<String>> map = MySQLConnector.executeMySQL(\"select\", \"SELECT * FROM `is480-matching`.users inner join `is480-matching`.students on users.id=students.id WHERE students.team_id = \" + teamId);\r\n\t\tSet<String> keySet = map.keySet();\r\n\t\tIterator<String> iterator = keySet.iterator();\r\n\t\t\r\n\t\twhile (iterator.hasNext()){\r\n\t\t\tString key = iterator.next();\r\n\t\t\tArrayList<String> array = map.get(key);\t\r\n\t\t\tint id \t\t\t\t= Integer.parseInt(array.get(0));\r\n\t\t\tString username \t= array.get(1);\r\n\t\t\tString fullName \t= array.get(2);\r\n\t\t\tString contactNum \t= array.get(3);\r\n\t\t\tString email \t\t= array.get(4);\r\n\t\t\tString type\t\t\t= array.get(5);\r\n\t\t\tString secondMajor \t= array.get(7);\r\n\t\t\tint role \t\t\t= Integer.parseInt(array.get(8));\r\n\t\t\tint teamid \t\t\t= Integer.parseInt(array.get(9));\r\n\t\t\tint prefRole \t\t= Integer.parseInt(array.get(10));\r\n\t\t\t\r\n\t\t\tStudent student = new Student(id, username, fullName, contactNum, email, type, secondMajor, role, teamid, prefRole);\r\n\t\t\tstudents.add(student);\r\n\t\t}\r\n\t\t\r\n\t\tCollections.sort(students, new Comparator<Student>() {\r\n\t @Override public int compare(Student s1, Student s2) {\r\n\t \treturn s1.getRole() - s2.getRole();\r\n\t }\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t\treturn students;\r\n\t}", "public List<Team> getTeamByMentorId(Id mentorId) throws MissingEntityException {\n List<Team> teams = this.teamList.getSpecificTypedList();\n List<Team> results = new ArrayList<>();\n for (Team t : teams) {\n Optional<Mentor> mentor = t.getMentor();\n if (mentor.isPresent()) {\n if (mentor.get().getId().equals(mentorId)) {\n results.add(t);\n }\n }\n }\n if (results.size() == 0) {\n throw new MissingEntityException(\"Team with said participant cannot be found.\");\n }\n return results;\n }", "public List<Team> getListOfTeams(){\n \tMap<String, Object> myMap = new HashMap<String, Object>();\n\t\tJSONObject jsonobj = null;\n\t\tList<Team> team = new ArrayList<>();\n\t\tTeamsJsonReader reader = new TeamsJsonReader();\n\t\tJSONParser parser = new JSONParser();\n\t\tObject obj = null;\n\n\t\ttry {\n\t\t\tobj = parser.parse(new FileReader(\"src/main/resources/db.json\"));\n\t\t\tJSONObject jsonObject = (JSONObject) obj;\n\t\t\tJSONArray jsonarr = (JSONArray) jsonObject.get(\"teams\");\n\t\t\tfor (int size = 0; size < jsonarr.size(); size++) {\n\t\t\t\tList<Individual> individualList = new ArrayList<>();\n\t\t\t\tjsonobj = (JSONObject) jsonarr.get(size);\n\t\t\t\tmyMap.put(\"name\", jsonobj.get(\"name\"));\n\t\t\t\tmyMap.put(\"id\", ((Long) jsonobj.get(\"id\")).intValue());\n\t\t\t\tJSONArray memberArray = (JSONArray) jsonobj.get(\"members\");\n\n\t\t\t\tfor (int index = 0; index < memberArray.size(); index++) {\n\n\t\t\t\t\tindividualList.add(reader.getIndividualById(((Long) memberArray.get(index)).intValue()));\n\n\t\t\t\t}\n\t\t\t\tmyMap.put(\"members\", individualList);\n\t\t\t\t\n\t\t\t\tteam.add(new Team(myMap));\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn team;\n }", "public Team findTeamFromName(String name) {\r\n Iterator<Team> itr = this.getTeamTreeFromMatchTree().iterator();\r\n Team team;\r\n while (itr.hasNext()){\r\n team = itr.next();\r\n if (team.getName().equals(name)){\r\n return team;\r\n }\r\n }\r\n return null;\r\n }", "public Voto find(int id ) { \n\t\treturn em.find(Voto.class, id);\n\t}", "public User getUserFromTeam(Team team){\n String sql = \"SELECT * FROM trainer tr INNER JOIN Team T ON tr.userid = T.userid WHERE T.teamid = ?\";\n User user = jdbc.queryForObject(sql, new UserDaoImpl.UserMapper(), team.getId());\n System.out.print(user);\n return user;\n }", "public Team selectTeam() {\r\n \r\n String[] list = new String[controller.getTeams().size()];\r\n for (int i = 0; i < controller.getTeams().size(); i++) {\r\n list[i] = controller.getTeams().get(i).getName();\r\n }\r\n\r\n JComboBox cmbOption = new JComboBox(list);\r\n int input = JOptionPane.showOptionDialog(null, cmbOption, \"Select Team that your like Delete\",JOptionPane.DEFAULT_OPTION,JOptionPane.QUESTION_MESSAGE, null, null, null);\r\n if(input==-1){\r\n return null;\r\n }\r\n Team teamAux = controller.searchTeam((String) cmbOption.getSelectedItem());\r\n return teamAux;\r\n }", "public String getTeamNameById(int id) {\n\t\tString t = \"\";\n\t\tPreparedStatement statement = null;\n\t\tResultSet rs = null;\n\t\tString teamByIdRecords_sql = \"SELECT name FROM \" + team_table + \" WHERE id='\" + id + \"'\";\n\t\tconnection = connector.getConnection();\n\t\ttry {\n\t\t\tstatement = connection.prepareStatement(teamByIdRecords_sql);\n\t\t\trs = statement.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tt = rs.getString(1);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn t;\n\t}", "Team createTeam();", "public static ArrayList<Team> findTeamProject() throws DALException {\n\t\t\tConnection cnx = null;\n\t\t\tPreparedStatement pstmt = null;\n\t\t\tResultSet rs = null;\n\t\t\tArrayList<Team> listTeams = new ArrayList<>();\n\n\t\t\ttry {\n\t\t\t\t// Connection DB\n\t\t\t\tcnx = DBConnection.connect();\n\t\t\t\tpstmt = cnx.prepareStatement(LIST_TEAMS_PROJECTS);\n\t\t\t\trs = pstmt.executeQuery();\n\n\t\t\t\t// For each team\n\t\t\t\twhile (rs.next()) {\n\t\t\t\t\tTeam team = new Team();\n\t\t\t\t\tteam.setIdTeam(rs.getInt(\"Teams_IdTeams\"));\n\t\t\t\t\tteam.setName(rs.getString(\"Teams_name\"));\n\t\t\t\t\tteam.setIdProject(rs.getInt(\"idProjects\"));\n\t\t\t\t\tteam.setNameProject(rs.getString(\"nameProject\"));\n\t\t\t\t\tlistTeams.add(team);\n\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\n\t\t\t\tthrow new DALException(\"Problem - listTeamHisProject - TeamDAO - Request : \"+ pstmt+ \" \" + e.getMessage());\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (rs != null)\n\t\t\t\t\t\trs.close();\n\t\t\t\t\tif (pstmt != null)\n\t\t\t\t\t\tpstmt.close();\n\t\t\t\t\tif (cnx != null)\n\t\t\t\t\t\tcnx.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\tthrow new DALException(\"Problem - Closing connection - \" + e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn listTeams;\n\n\t\t}", "@GetMapping(\"/showTeam/{id}\")\n\tpublic String showTeamPage(@PathVariable(\"id\") Long teamId, Model model) {\n\t\tTeam team=teamService.findOne(teamId);\n\t\t//Today's date\n\t\tmodel.addAttribute(\"today\", new Date());\n\t\tmodel.addAttribute(\"team\", team);\n\t\treturn \"showTeamPage.jsp\";\n\t}", "@GetMapping(\"/players/{id}\")\r\n public ModelAndView getSingleTeamPage(ModelAndView modelAndView,\r\n @PathVariable Integer id) {\r\n modelAndView.setViewName(\"single-player\");\r\n\r\n Player player = playerService.findPlayerById(id);\r\n\r\n List<Player> teammates = playerService.findAllPlayersByTeam(player.getTeam());\r\n teammates.remove(player);\r\n\r\n List<Match> upcomingMatches = matchService.getFiveLastUpcomingMatchesByTeam(player.getTeam());\r\n List<EndedMatch> endedMatches = matchService.get10LastEndedMatchesByTeam(player.getTeam());\r\n\r\n if (upcomingMatches.size() == 0) {\r\n modelAndView.addObject(\"isUpcomingMatchesEmpty\", true);\r\n modelAndView.addObject(\"noUpcomingMatchesYet\", \"No upcoming matches yet\");\r\n } else {\r\n modelAndView.addObject(\"teamsUpcomingMatches\", upcomingMatches);\r\n }\r\n\r\n if (endedMatches.size() == 0) {\r\n modelAndView.addObject(\"isEndedMatchesEmpty\", true);\r\n modelAndView.addObject(\"noEndedMatchesYet\", \"The team didn't play a single match\");\r\n } else {\r\n modelAndView.addObject(\"teamsEndedMatches\", endedMatches);\r\n }\r\n\r\n modelAndView.addObject(\"player\", player);\r\n modelAndView.addObject(\"teammates\", teammates);\r\n modelAndView.addObject(\"players\", playerService.getFiveFirstPlayers());\r\n modelAndView.addObject(\"teams\", teamService.getFiveFirstTeams());\r\n modelAndView.addObject(\"matches\", matchService.getAllMatchesNotEnded());\r\n modelAndView.addObject(\"endedMatches\", matchService.getFiveLastEndedMatches());\r\n\r\n return modelAndView;\r\n }", "public Team getTeamByName(String name) {\n\t\tTeam t = null;\n\t\ttry {\n\t\t\tPreparedStatement statement = null;\n\t\t\tResultSet rs = null;\n\t\t\tString teamRecords_sql = \"SELECT * FROM \" + team_table + \" WHERE name='\" + name + \"'\";\n\t\t\tconnection = connector.getConnection();\n\t\t\tstatement = connection.prepareStatement(teamRecords_sql);\n\t\t\trs = statement.executeQuery();\n\t\t\tList<Player> players = new ArrayList<Player>();\n\t\t\tif (rs.next()) {\n\t\t\t\tplayers = formatPlayers(getPlayersByTeamId(rs.getInt(1)));\n\t\t\t\tt = new Team(players, rs.getString(2), rs.getString(3), rs.getString(4), rs.getDate(5));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn t;\n\t}", "@Override\n\tpublic Employee findById(int id) {\n\t\tList<Employee> employeeList= \n\t\tlistEmployee().stream().filter((e -> e.getId()==id)).collect(Collectors.toList());\n\t\t\n\t\treturn (Employee)employeeList.get(0);\n\t}", "public FightTeam team();", "@Override\n public ArrayList<League> select(String id) {\n return null;\n }", "public static String findTeam(Scanner input, int searchId) {\nwhile (input.hasNextLine()) {\nString line = input.nextLine();\n\nScanner lineScan = new Scanner(line).useDelimiter(\"\\t\");\n\nint id = lineScan.nextInt();\n\nif (id == searchId) {\n\nreturn line; // we found them!\n\n}\n\n}\n\nreturn \"\"; \n\n}", "public interface TeamService {\n\n /**\n * Finds all teams\n *\n * @return A list of teams\n */\n public List<Team> getAll();\n\n /**\n * Finds team by ID\n *\n * @param id The ID of the wanted team\n * @return The found team. If no team is found, this method returns null.\n */\n public Team get(Long id);\n\n /**\n * Creates a new team\n *\n * @param teamForm The information of the created team\n * @return The created team\n */\n public Team create(TeamDTO teamForm);\n\n /**\n * Updates the information of a team\n *\n * @param teamForm The information of the updated team\n * @return The updated team\n * @throws TeamNotFoundException If no team is found with given ID\n */\n public Team update(TeamDTO teamForm) throws TeamNotFoundException;\n\n /**\n * Deletes a team\n *\n * @param id The ID of the deleted team\n * @throws TeamNotFoundException If no team is found with the given ID\n */\n public void delete(Long id) throws TeamNotFoundException;\n\n}", "@ApiOperation(value = \"Find a movie by id\", notes = \"Find a movie by id\")\n @ApiResponses(value = {\n @ApiResponse(code = 200, message = \"Success\", response = MovieDto.class),\n @ApiResponse(code = 400, message = \"Bad request\"),\n @ApiResponse(code = 404, message = \"Not found\"),\n })\n @CrossOrigin\n @GetMapping(value = \"/find/{id}\", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)\n public ResponseEntity findById(\n @ApiParam(value = \"A movie id\", defaultValue = \"2503\", required = true)\n @PathVariable(name = \"id\") Integer id) {\n MovieDto movie = movieService.findById(id);\n return new ResponseEntity<>(movie, HttpStatus.OK);\n }", "T findById(ID id) ;", "public TicketRes searchById(int num){\n Optional<Ticket> ticketOpt=ticketRepository.findById(num);\n Ticket ticket;\n if(ticketOpt.isPresent())\n ticket=ticketOpt.get();\n else\n throw new NoSuchElementException(\"ticket avec num (\"+num+\") introuvable ;\");\n\n return mapp.map(ticket,TicketRes.class);\n\n }", "public People getPeopleById(Long id);", "public void deleteTeamById(UUID id) {\n Optional<Teams> optionalTeam = teamRepo.findById(id);\n if (!optionalTeam.isPresent())\n throw new TeamNotFoundException(\"Team Record with id \" + id + \" is not available\");\n teamRepo.deleteById(id);\n }", "public Team getTeam() {\n return team;\n }", "public void setTeamId(int value) {\n this.teamId = value;\n }", "public List<Team> getTeamByParticipantId(Id participantId) throws MissingEntityException {\n List<Team> teams = this.teamList.getSpecificTypedList();\n List<Team> results = new ArrayList<>();\n for (Team t : teams) {\n for (Participant p : t.getParticipants()) {\n if (p.getId().equals(participantId)) {\n results.add(t);\n }\n }\n }\n if (results.size() == 0) {\n throw new MissingEntityException(\"Team with said participant cannot be found.\");\n }\n return results;\n }", "public Student findStudent(int id);", "public Airplane find(int id);", "public Team() {\r\n id = \"\";\r\n abbreviation = \"\";\r\n name = \"\";\r\n conference = \"\";\r\n division = \"\";\r\n address = null;\r\n }", "int getTeam();", "public SportDTO resolveFromObjectIdFull(String id){\n SportDTO sportDTO = null;\n try {\n SportEntity sportEntity = departmentRepository.getSportByLeagueId(id);\n sportDTO = resolverMapper.map(sportEntity, SportDTO.class);\n } catch (InvalidInputDataException e) {\n logger.error(\"Invalid ID input given: \", e);\n } catch (DataAccessException e) {\n logger.warn(\"Not data could be obtained for the given league ID \" + id, e);\n } catch (MappingException e){\n logger.fatal(\"Mapping from entity to domain failed\", e);\n }\n return sportDTO == null ? new SportDTO(): sportDTO;\n }", "public ArrayList<Student> retrieveStudentsInvitedByTeam(int teamId) {\r\n\t\tArrayList<Student> students = new ArrayList<Student>();\r\n\t\tHashMap<String, ArrayList<String>> map = MySQLConnector.executeMySQL(\"select\", \"SELECT * FROM team_request WHERE team_id = \" + teamId);\r\n\t\tSet<String> keySet = map.keySet();\r\n\t\tIterator<String> iterator = keySet.iterator();\r\n\t\t\r\n\t\twhile (iterator.hasNext()){\r\n\t\t\tString key = iterator.next();\r\n\t\t\tArrayList<String> array = map.get(key);\t\r\n\t\t\tint stdId\t \t= Integer.parseInt(array.get(2));\r\n\t\t\t\r\n\t\t\tStudent student = null;\r\n\t\t\t\r\n\t\t\ttry{\r\n\t\t\t\tstudent = retrieve(stdId);\r\n\t\t\t}catch(Exception e){}\r\n\t\t\t\r\n\t\t\tstudents.add(student);\r\n\t\t}\r\n\t\t\r\n\t\treturn students;\r\n\t}", "public List<PlayerWon> findByTeamId(int teamId);", "@WebMethod public List<Team> getAllTeams();", "@Override\n\tpublic List<String> getTeamNames(Integer id) {\n\t\treturn null;\n\t}", "@Override\n\tpublic List<TeamInfo> findAll() {\n\t\treturn repository.findAll();\n\t}", "@Override\n public Tournament tournamentStatus(String id) {\n return Optional.ofNullable(tournamentCache.get(id))\n .orElseThrow(TournamentNotFoundException::new);\n }", "AceEntity findEntity (String id) {\n\t\tfor (int i=0; i<entities.size(); i++) {\n\t\t\tAceEntity entity = (AceEntity) entities.get(i);\n\t\t\tif (entity.id.equals(id)) {\n\t\t\t\treturn entity;\n\t\t\t}\n\t\t}\n\t\tSystem.err.println (\"*** unable to find entity with id \" + id);\n\t\treturn null;\n\t}", "public T findById(int id) {\n\t\tConnection connection = null;\n\t\tPreparedStatement st = null;\n\t\tResultSet rs = null;\n\t\tString query = createSelectQuery(\"id\");\n\t\ttry {\n\t\t\tconnection = ConnectionFactory.createCon();\n\t\t\tst = connection.prepareStatement(query);\n\t\t\tst.setInt(1, id);\n\t\t\trs = st.executeQuery();\n\t\t\t\n\t\t\treturn createObjects(rs).get(0);\n\t\t}catch(SQLException e) {\n\t\t\tLOGGER.fine(type.getName() + \"DAO:findBy\" + e.getMessage());\n\t\t}\n\t\treturn null;\n\t}", "private static Person findPersonById(int id) {\n Person personReturn = null;\n\n for (Person person : persons) {\n if (id == person.getId()) {\n personReturn = person;\n }\n }\n\n return personReturn;\n }", "private User findById(String id) {\n User result = new NullUserOfDB();\n for (User user : this.users) {\n if (user.getId().equals(id)) {\n result = user;\n break;\n }\n }\n return result;\n }", "@ApiOperation(\"根据会场编号查询具体会场\")\n @GetMapping(\"/selectOnePlaceById\")\n public ResultResponse selectOnePlace(@ApiParam(\"会场编号\") @RequestParam(\"id\")Integer id){\n VoPlace voPlace = placeService.selectOnePlaceById(id);\n return new ResultResponse()\n .setData(voPlace)\n .setMessage(\"根据编号查询会场\");\n }", "@Test\n @Transactional\n public void getNonExistingTeam() throws Exception {\n // Get the team\n restTeamMockMvc.perform(get(\"/api/teams/{id}\", Long.MAX_VALUE))\n .andExpect(status().isNotFound());\n }", "public Film find(int id) {\n\t\t\n\t\tString codeFilm = null;\n\t\tString nomFilm = null;\n\t\tFilm film = new Film();\n\t\t\n\t\ttry {\n\t\t\tResultSet result = Connection.selectFrom(\"SELECT codeFilm, nomFilm \"\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"FROM film \"\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"WHERE idFilm=\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t+id\n\t\t\t\t\t\t\t\t\t\t\t\t\t+\";\");\n\t\t\t\n\t\t\twhile(result.next())\n\t\t\t{\n\t\t\t\tcodeFilm = result.getString(\"codeFilm\");\n\t\t\t\tnomFilm = result.getString(\"nomFilm\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\tfilm = new Film(id,codeFilm,nomFilm);\n\t\tConnection.close();\n\t\treturn film;\n\t}", "public Team(String name) {\n this.name = name;\n }", "public List<TicketSite> getTicketSitesOfATeam(String teamId);", "public interface TeamUserService extends CrudService<TeamUser, Long> {\n\n List<User> findByTeam(Team team);\n}", "public Data findById(Object id);", "public static List<Team> getTeams() {\n return find().all();\n }", "public Optional<PessoaDto> encontrar(Long id) {\n\t\tOptional<Pessoa> pessoa = dao.encontrar(id);\n\t\treturn Optional.of(toPessoaDTO(pessoa.get()));\n\t}", "public String getTeamId() {\n\t\treturn teamId;\n\t}", "public String getTeamId() {\n\t\treturn teamId;\n\t}", "@Override\n public TournamentEntity getOldTournament(String id) {\n return tournamentRepository.findById(id)\n .orElseThrow(TournamentNotFoundException::new);\n }", "public ArrayList<CollegeFootballTeam> getTeamList();", "public int getTeamId() {\n\t\treturn teamId;\n\t}" ]
[ "0.8352583", "0.8283714", "0.78669816", "0.7842334", "0.7742179", "0.75959486", "0.75597537", "0.7495106", "0.7477909", "0.7414992", "0.71484137", "0.70299125", "0.69291836", "0.6824838", "0.6817454", "0.67829585", "0.673005", "0.6683751", "0.66536474", "0.6554243", "0.65148264", "0.6485793", "0.6466887", "0.6366329", "0.6341243", "0.6324334", "0.6240636", "0.6235163", "0.62255234", "0.62156224", "0.61628443", "0.6112826", "0.6080945", "0.6066772", "0.60531783", "0.6019222", "0.6018232", "0.6013826", "0.6012837", "0.60082453", "0.6002792", "0.598773", "0.59750307", "0.597316", "0.5961877", "0.59508735", "0.59500533", "0.5937797", "0.5924536", "0.59202194", "0.59161574", "0.5891805", "0.5884728", "0.58708054", "0.58641654", "0.5855059", "0.58455324", "0.5834775", "0.58050144", "0.5794635", "0.57944673", "0.5767003", "0.57664025", "0.57446134", "0.57417715", "0.57396835", "0.5737967", "0.57373583", "0.5727007", "0.57146233", "0.57121575", "0.57115924", "0.5710773", "0.5708543", "0.5702122", "0.5699799", "0.5697614", "0.5695796", "0.5694006", "0.5689834", "0.5673449", "0.56403315", "0.5640247", "0.56353915", "0.56272256", "0.56132495", "0.56074584", "0.56049937", "0.55852133", "0.55833524", "0.5581058", "0.55755085", "0.5570781", "0.5569613", "0.55656797", "0.5564762", "0.5564762", "0.555775", "0.5553674", "0.5552686" ]
0.7629975
5
Deze methode zorgt ervoor dat de update wordt uitgevoerd om de nieuwe waarde van de beheerder in te vullen.
@Override public void update(Beheerder beheerder) { Connection connection = createConnection(); try { PreparedStatement preparedStatement = connection.prepareStatement("UPDATE gebruiker SET voornaam = ?, achternaam = ?, adres =" + " ?, postcode = ?, woonplaats = ?, telefoon = ?,email = ?, wachtwoord = ?,rechten_id =? , isactief = ? WHERE id = ?"); preparedStatement.setString(1,beheerder.getVoornaam()); preparedStatement.setString(2,beheerder.getAchternaam()); preparedStatement.setString(3,beheerder.getAdres()); preparedStatement.setString(4,beheerder.getPostcode()); preparedStatement.setString(5,beheerder.getWoonplaats()); preparedStatement.setString(6,beheerder.getTelefoon()); preparedStatement.setString(7,beheerder.getEmail()); preparedStatement.setString(8,beheerder.getWachtwoord()); preparedStatement.setInt(9, beheerder.getRechten_id()); preparedStatement.setBoolean(10,beheerder.isActief()); preparedStatement.setInt(11, beheerder.getId()); preparedStatement.executeUpdate(); } catch (SQLException e) { e.printStackTrace(); } closeConnection(connection); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean update(Revue objet) {\n return false;\n }", "public void update(){}", "public void update(){}", "@Override\n\tpublic void update(Object entidade) {\n\t\t\n\t}", "@Override\r\n\tpublic boolean update(Moteur obj) {\n\t\treturn false;\r\n\t}", "public void willbeUpdated() {\n\t\t\n\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "public void updateData() {}", "@Override\r\n\tpublic String update() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String update() {\n\t\treturn null;\r\n\t}", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "@Override\r\n\tpublic void updateData() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Action(value=\"update\",results={@Result(name=\"queryAll\",location=\"/zjwqueryMange.jsp\")})\n\tpublic String update()\n\t{\n\t\tkehuDAO.update(kehu);\n\t\t//查询 id kehu\n\t\tkehuList = (ArrayList) kehuDAO.findAll();\n\t\treturn \"queryAll\";\n\t}", "@Override\r\npublic int update(Detalle_pedido d) {\n\treturn detalle_pedidoDao.update(d);\r\n}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {}", "@Override\n\tpublic void update() {}", "@Override\n\tpublic void update(Unidade obj) {\n\n\t}", "void updateData();", "@Override\r\n\tpublic void update() {\r\n\r\n\t}", "public void update() {}", "Motivo update(Motivo update);", "public void update() {\n\t\t\n\t}", "public boolean update(Etudiant obj) {\n\t\treturn false;\n\t}", "@Override\n\tpublic void update() { }", "@Override\r\n\tpublic void update() {\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "public void update() {\n\t}", "public void update() {\n\t}", "public void update() {\n\t}", "public void update() {\n\t}", "@Override\n\t\tpublic void update(Metodologia metodologia,String name) {\n\t\t\t\n\t\t}", "private void updateDB() {\n }", "@Override\n\tpublic int update() {\n\t\treturn 0;\n\t}", "@Override\r\n\tpublic void update() {\n\t}", "@Override\r\n\tpublic void update() {\n\t}", "public void update() {\r\n\t\t\r\n\t}", "@Override\n\tpublic boolean doUpdate(Orders vo) throws Exception\n\t{\n\t\treturn false; \n\t}", "@Override\n\tpublic boolean update(Langues obj) {\n\t\treturn false;\n\t}", "@Override\r\n\tpublic void update() {\n\r\n\t}", "@Override\r\n\tpublic void update() {\n\r\n\t}", "@Override\n public void update(KlantBedrijf kb) {\n }", "@Override\n\tpublic void update() {\n\t}", "@Override\n\tpublic void update() {\n\t}", "@Override\n\tpublic void update() {\n\t}", "public void update(){\r\n\t\t\r\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "public void executeUpdate();", "public void updateByObject()\r\n\t{\n\t}", "@Override\n\tpublic void queryUpdate() {\n\t\tneedToUpdate = true;\n\t}", "@Override\n\tpublic int update(Reservation objet) {\n\t\treturn 0;\n\t}", "public void update()\n\t{\n\t\tsuper.update();\n\t}", "public void updateDataBuku(){\n String sql = \"UPDATE buku SET judulBuku = '\"+getJudulBuku()+\"'\"\n + \",pengarang = '\"+getPengarang()+\"'\"\n + \",penerbit = '\"+getPenerbit()+\"'\"\n + \",tahun = '\"+getTahun()+\"'\"\n + \",stok = '\"+getStok()+\"' WHERE idBuku = '\"+getIdBuku()+\"'\";\n \n try {\n //inisialisasi preparedstatmen\n PreparedStatement eksekusi = koneksi. getKoneksi().prepareStatement(sql);\n eksekusi.execute();\n \n //pemberitahuan jika data berhasil di simpan\n JOptionPane.showMessageDialog(null,\"Data Berhasil Disimpan\");\n } catch (SQLException ex) {\n //Logger.getLogger(modelPelanggan.class.getName()).log(Level.SEVERE, null, ex);\n JOptionPane.showMessageDialog(null, \"Data Gagal Disimpan \\n\"+ex);\n }\n }", "boolean update();", "public void update() ;", "@Override\n\tpublic boolean update(Etape obj) {\n\t\treturn false;\n\t}", "@Override\n\tpublic void update(BatimentoCardiaco t, String[] params) {\n\t\t\n\t}", "@Override\n\tpublic void update(finalDataBean t, String[] fields) throws Exception {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\tSystem.out.println(\"Mysql DB 서버에 접속해서 수정을 하다.\");\n\t}", "@Override\n public void update() {\n \n }", "@Override\n public void update() {\n }", "@Override\r\n\tpublic int do_update(DTO dto) {\n\t\treturn 0;\r\n\t}", "@Override\n public void update()\n {\n\n }", "void executeUpdate();", "@Override\n\tpublic boolean update() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean update() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean update() {\n\t\treturn false;\n\t}", "public void update() {\n }", "@Override\n\tpublic Item update() {\n\t\t\n\t\treadAll();\n\t\n\t\tLOGGER.info(\"State the shoe name you wish to update\");\n\t\tString name = util.getString().toLowerCase();;\n\t\tLOGGER.info(\"State the size you wish to update\");\n\t\tdouble size = util.getDouble();\n\t\tLOGGER.info(\"Change price\");\n\t\tdouble price = util.getDouble();\n\t\tLOGGER.info(\"Change amount in stock\");\n\t\tlong stock = util.getLong();\n\t\tLOGGER.info(\"\\n\");\n\t\treturn itemDAO.update(new Item(name,size,price,stock));\n\t\t\n\t\t\n\t\t\n\t}", "@Override\n\tpublic boolean update(Produto t) {\n\t\treturn true;\n\t}", "@Override\r\n\tpublic void update(String[] getdata) {\n\r\n\t}", "@Override\r\n\tpublic int update() throws Exception {\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic boolean update(Document obj) {\n\t\treturn false;\n\t}", "@Override\r\n\tpublic void update() {\n\t\tsuper.update();\r\n\t}", "public void update(){\n \t//NOOP\n }", "public void update() {\n\n dbWork.cleanAll();\n\n List<DataFromServiceKudaGo> list = requestDataFromService();\n\n List<Film> films = new ArrayList<>();\n for (DataFromServiceKudaGo data : list) {\n Film film = new Film(list.indexOf(data), data.getNameMovie(), data.getPosterMoviePath(),\n data.getRunning_time(), data.getPrice(), data.getImax(),\n data.getCountryFilm(), data.getYearFilm(), data.getTrailerFilm(),\n data.getAgeFilm(), data.getDirectorFilm(), data.getNameCinema(),\n data.getAddressCinema(), data.getPhone(), data.getStationAboutCinema(),\n data.getPosterCinemaPath(), data.getBeginning_time(), data.getDescription());\n films.add(film);\n }\n\n dbWork.setFilms(films);\n\n fillShows();\n }", "Update createUpdate();", "@Override\n\tpublic boolean update(String sql) {\n\t\treturn false;\n\t}", "@Override\n protected Response doUpdate(Long id, JSONObject data) {\n return null;\n }" ]
[ "0.7240698", "0.7156502", "0.7156502", "0.71562374", "0.713705", "0.7066354", "0.70070064", "0.70070064", "0.70070064", "0.696723", "0.69453955", "0.69453955", "0.6938881", "0.6938881", "0.6930892", "0.68540823", "0.68540823", "0.68540823", "0.68540823", "0.68540823", "0.6833819", "0.6818203", "0.6804849", "0.6804849", "0.6804849", "0.6804849", "0.6804849", "0.6804849", "0.6763582", "0.6763582", "0.6752243", "0.6742363", "0.6739026", "0.67228687", "0.66997963", "0.6694511", "0.6675241", "0.66669476", "0.6647536", "0.6642668", "0.66269", "0.66269", "0.66269", "0.66269", "0.6626718", "0.6614587", "0.6614283", "0.6613318", "0.6613318", "0.66102314", "0.66076493", "0.659613", "0.65895545", "0.65895545", "0.6582698", "0.65788513", "0.65788513", "0.65788513", "0.65784144", "0.6565326", "0.6565326", "0.6565326", "0.6565326", "0.6565326", "0.6565326", "0.6565326", "0.6565326", "0.6565326", "0.6565326", "0.65605634", "0.65504014", "0.6540016", "0.6537863", "0.6529874", "0.6529069", "0.6520131", "0.65116656", "0.65108764", "0.65095526", "0.6502676", "0.64861476", "0.64754194", "0.6466878", "0.6466265", "0.6465657", "0.6464745", "0.6460894", "0.6460894", "0.6460894", "0.6459612", "0.6451815", "0.6443946", "0.6438148", "0.6437906", "0.64353734", "0.6434636", "0.6434355", "0.6419034", "0.6413889", "0.64118594", "0.64051646" ]
0.0
-1
Deze methode zorgt ervoor dat de delete wordt uitgevoerd om geselecteerde beheerder te verwijderen.
@Override public void delete(int id) { Connection connection = createConnection(); try { PreparedStatement preparedStatement = connection.prepareStatement("UPDATE gebruiker set isActief = FALSE WHERE ID = ?"); preparedStatement.setInt(1,id); preparedStatement.executeUpdate(); } catch (SQLException e) { e.printStackTrace(); } closeConnection( connection); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void adminSelectDelete() {\n\t\t\r\n\t}", "@Override\n\tpublic void deleteSelected() {\n\n\t}", "public void deleteSelection() {\n deleteFurniture(Home.getFurnitureSubList(this.home.getSelectedItems())); \n }", "public void deleteSelectedWord()\r\n {\n ArrayList al = crossword.getWords();\r\n al.remove(selectedWord);\r\n repopulateWords();\r\n }", "private void delete() {\n AltDatabase.getInstance().getAlts().remove(getCurrentAsEditable());\n if (selectedAccountIndex > 0)\n selectedAccountIndex--;\n updateQueried();\n updateButtons();\n }", "public void deleteCt() {\n\t\tlog.info(\"-----deleteCt()-----\");\n\t\t//int index = selected.getCtXuatKho().getCtxuatkhoThutu().intValue() - 1;\n\t\tlistCtKhoLeTraEx.remove(selected);\n\t\tthis.count = listCtKhoLeTraEx.size();\n\t\ttinhTien();\n\t}", "private void deleteExec(){\r\n\t\tList<HashMap<String,String>> selectedDatas=ViewUtil.getSelectedData(jTable1);\r\n\t\tif(selectedDatas.size()<1){\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Please select at least 1 item to delete\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tint options = 1;\r\n\t\tif(selectedDatas.size() ==1 ){\r\n\t\t\toptions = JOptionPane.showConfirmDialog(null, \"Are you sure to delete this Item ?\", \"Info\",JOptionPane.YES_NO_OPTION);\r\n\t\t}else{\r\n\t\t\toptions = JOptionPane.showConfirmDialog(null, \"Are you sure to delete these \"+selectedDatas.size()+\" Items ?\", \"Info\",JOptionPane.YES_NO_OPTION);\r\n\t\t}\r\n\t\tif(options==1){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tfor(HashMap<String,String> map:selectedDatas){\r\n\t\t\t\r\n\t\t\tdiscountService.deleteDiscountByMap(NameConverter.convertViewMap2PhysicMap(map, \"Discount\"));\r\n\t\t}\r\n\t\tthis.initDatas();\r\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif(cbElPuesto.getSelectedIndex()!=0) {\n\t\t\t\t\tString eliminar=((String) cbElPuesto.getSelectedItem());\n\t\t\t\t\tSystem.out.println(eliminar);\n\t\t\t\t\tdata.setQuery(\"DELETE FROM TipoPuesto WHERE puesto='\"+eliminar+\"'\");\n\t\t\t\t\tcbElPuesto.removeAllItems();\n\t\t\t\t\tcbEdPuesto.removeAllItems();\n\t\t\t\t\tcbElPuesto.addItem(\"Seleccione un hospital...\");\n\t\t\t\t\tcbEdPuesto.addItem(\"Seleccione un hospital...\");\n\t\t\t\t\tJOptionPane.showMessageDialog(btnEliminar,\"Eliminación exitosa\");\n\t\t\t\t\tregistros=(ResultSet) data.getQuery(\"Select * from TipoPuesto\");\n\t\t\t\t\ttry {\n\t\t\t\t\t\twhile(registros.next()) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcbElPuesto.addItem(registros.getString(\"puesto\"));\n\t\t\t\t\t\t\tcbEdPuesto.addItem(registros.getString(\"puesto\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t}else {\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t}", "private void cmd_deleteSelection(){\n\t\tm_frame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));\n\t\tif (ADialog.ask(getWindowNo(), m_frame.getContainer(), \"DeleteSelection\"))\n\t\t{\t\n\t\t\tint records = deleteSelection(detail);\n\t\t\tsetStatusLine(Msg.getMsg(Env.getCtx(), \"Deleted\") + records, false);\n\t\t}\t\n\t\tm_frame.setCursor(Cursor.getDefaultCursor());\n\t\tbDelete.setSelected(false);\n\t\texecuteQuery();\n\t\t\n\t}", "private void btnDeleteActionPerformed(java.awt.event.ActionEvent evt) {\n String delete = TabelSiswa.getValueAt(baris, 1).toString();\n try{\n Statement stmt = koneksi.createStatement();\n String query = \"DELETE FROM pasien WHERE nis = '\" + delete + \"'\";\n int berhasil = stmt.executeUpdate(query);\n if(berhasil == 1){\n JOptionPane.showMessageDialog(null, \"Data berhasil dihapus\");\n dtm.getDataVector().removeAllElements();\n showData();\n showStok();\n }else{\n JOptionPane.showMessageDialog(null, \"Data gagal dihapus\");\n }\n }catch(SQLException ex){\n ex.printStackTrace();\n JOptionPane.showMessageDialog(null, \"Terjadi kesalahan\", \"ERROR\", JOptionPane.ERROR_MESSAGE);\n }\n }", "public void deleteSelectedAndRefresh()\n\t{\n\t\tDisplayThreeSQLHandler.changeRoom(\"CREATURE\", selectedCreature, -1);\n\t\t\n\t\tremoveElement(thingsInColumn.indexOf(selectedCreature));\n\t\t\n\t\tselectedCreature = thingsInColumn.get(itemsVisible[buttonLastPressed]);\n\t\t\n\t\tDisplayThree.getInstance().addBox.changeContents(\"CREATURE\", false);\n\t\t;\n\t\t\n\t\tthis.updateButtons();\n\t}", "@Override\r\n\t//public void sqlQueryDelete(JComboBox combo, String s, JTextArea textArea, Vector vectorCombo) {\r\n\tpublic void sqlQueryDelete(String s, Vector vectorCombo) {\n\t\ttry {\r\n\t\t\tstatement = conn.prepareStatement(\"DELETE FROM words WHERE word=?\");\t\t\r\n\t\t\tstatement.setString(1, s);\r\n\t\t\tstatement.executeUpdate();\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\ttextArea.setText(e.getMessage());\r\n\t\t}\r\n textArea.setText(\"\");\r\n JOptionPane.showMessageDialog(null, s + \" delete completed\");\r\n sqlQueryList(vectorCombo);\r\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n String nama = String.valueOf(cbbNama.getSelectedItem());\n String pilihan2 = String.valueOf(cbbPilihan2.getSelectedItem());\n //dapetin nama nama table\n LinkedList<String> arrTable = DataAksesAdmin.listTable();\n //linked list buat nampung yg mau dihapus\n LinkedList<String> forDelete = new LinkedList<>();\n //pindahin ke array kalo ada namanya\n for(int i = 0; i < arrTable.size(); i++){\n for(int j = 1; j < 15; j++){\n if(arrTable.get(i).equals(nama+j)){\n forDelete.add(arrTable.get(i));\n }\n }\n }\n DataAksesAdmin.delUser(nama, pilihan2, forDelete);\n JOptionPane.showMessageDialog(null, \"Data Berhasil Dihapus!\");\n }", "public void delete() {\n\t if (input.getSelectedText() != null){\n\t input.setText(input.getText().replace(\n\t input.getSelectedText(), \"\"));}\n\t}", "private void toDelete() {\n if(toCount()==0)\n {\n JOptionPane.showMessageDialog(rootPane,\"No paint detail has been currently added\");\n }\n else\n {\n String[] choices={\"Delete First Row\",\"Delete Last Row\",\"Delete With Index\"};\n int option=JOptionPane.showOptionDialog(rootPane, \"How would you like to delete data?\", \"Delete Data\", WIDTH, HEIGHT,null , choices, NORMAL);\n if(option==0)\n {\n jtModel.removeRow(toCount()-toCount());\n JOptionPane.showMessageDialog(rootPane,\"Successfully deleted first row\");\n }\n else if(option==1)\n {\n jtModel.removeRow(toCount()-1);\n JOptionPane.showMessageDialog(rootPane,\"Successfully deleted last row\");\n }\n else if(option==2)\n {\n toDeletIndex();\n }\n else\n {\n \n }\n }\n }", "private void delete()\n\t{\n\t\ttry\n\t\t{\n\t\t\tConnection con = Connector.DBcon();\n\t\t\tString query = \"select * from items where IT_ID=?\";\n\t\t\t\n\t\t\tPreparedStatement pst = con.prepareStatement(query);\n\t\t\tpst.setString(1, txticode.getText());\n\t\t\tResultSet rs = pst.executeQuery();\n\t\t\t\n\t\t\tint count = 0;\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\t\n\t\t\tif(count == 1)\n\t\t\t{\n\t\t\t\tint choice = JOptionPane.showConfirmDialog(null, \"Are you sure you want to delete selected item data?\", \"ALERT\", JOptionPane.YES_NO_OPTION);\n\t\t\t\tif(choice==JOptionPane.YES_OPTION)\n\t\t\t\t{\n\t\t\t\t\tquery=\"delete from items where IT_ID=?\";\n\t\t\t\t\tpst = con.prepareStatement(query);\n\t\t\t\t\t\n\t\t\t\t\tpst.setString(1, txticode.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\tJOptionPane.showMessageDialog(null, \"Deleted Successfully\", \"RESULT\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tloadData();\n\t\t\t\t\n\t\t\t\trs.close();\n\t\t\t\tpst.close();\n\t\t\t\tcon.close();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Record Not Found!\", \"Alert\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\n\t\t\trs.close();\n\t\t\tpst.close();\n\t\t\tcon.close();\n\t\t\t\n\t\t} \n\t\tcatch (Exception e)\n\t\t{\n\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t}\n\t}", "private void deleteActionPerformed(ActionEvent evt) throws Exception {\n String teaID = this.teaIDText.getText();\n if(StringUtil.isEmpty(teaID)){\n JOptionPane.showMessageDialog(null, \"请先选择一条老师信息!\");\n return;\n }\n int confirm = JOptionPane.showConfirmDialog(null, \"确认删除?\");\n if(confirm == 0){//确认删除\n Connection con = dbUtil.getConnection();\n int delete = teacherInfo.deleteInfo(con, teaID);\n if(delete == 1){\n JOptionPane.showMessageDialog(null, \"删除成功!\");\n resetValues();\n }\n else{\n JOptionPane.showMessageDialog(null, \"删除失败!\");\n return;\n }\n initTable(new Teacher());//初始化表格\n }\n }", "@FXML\n public void excluiCidade(){\n\t\tCidade sel = tblCidade.getSelectionModel().getSelectedItem();\n\t\t\n \tif(sel!=null){\n \t\tif(Mensagens.msgExcluir()){\n \t\t\tsel.exclui(conn);\n \t\t\tattTblCidade();\n \t\t\tlimpaCidade();\n \t\t\tMensagens.msgInformacao(\"Sucesso\", \"Cidade excluída com êxito\");\n \t\t}else\n \t\t\tMensagens.msgInformacao(\"Cancelado\", \"Cidade não excluída\");\n \t}else\n \t\tMensagens.msgErro(\"FALHA\", \"Selecione uma Cidade\");\n }", "public void delZoneComm() {\n\n\t\t\tfinal JTextField txtLevel = new JTextField(10), txtPhone = new JTextField(10);\n\t\t\tfinal JComboBox<Integer> id = new JComboBox<Integer>();\n\t\t\tid.setBackground(Color.white);\n\t\t\tJButton save = new JButton(\"Delete Record \");\n\t\t\tsave.setBackground(Color.RED);\n\t\t\tsave.setBorder(BorderFactory.createRaisedSoftBevelBorder());\n\n\t\t\tfinal JComboBox<String> chczon = new JComboBox<String>();\n\t\t\tAutoCompleteDecorator.decorate(chczon);\n\t\t\tAutoCompleteDecorator.decorate(id);\n\t\t\t\n\t\t\tfinal Choice position = new Choice();\n\t\t\tposition.add(\"CHAIRPERSON\");\n\t\t\tposition.add(\"VICE-CHAIRPERSON\");\n\t\t\tposition.add(\"SECRETARY\");\n\t\t\tposition.add(\"VICE-SECRETARY\");\n\t\t\tposition.add(\"TREASURER\");\n\t\t\tposition.add(\"MEMBER\");\n\t\t\tposition.select(\"MEMBER\");\n\n\t\t\ttxtBapName.setEditable(false);\n\t\t\ttxtOtherName.setEditable(false);\n\t\t\ttxtLevel.setEditable(false);\n\t\t\ttxtPhone.setEditable(false);\n\t\t\tposition.setEnabled(false);\n\n\t\t\ttry {\n\t\t\t\t// Register jdbc driver\n\t\t\t\tClass.forName(DRIVER_CLASS);\n\t\t\t\t// open connection\n\t\t\t\tcon = DriverManager.getConnection(URL, USER, PASSWORD);\n\t\t\t\tString sql = \"select * from Zone;\";\n\t\t\t\tResultSet rs = null;\n\t\t\t\tstmt = con.prepareStatement(sql);\n\t\t\t\trs = stmt.executeQuery();\n\t\t\t\twhile (rs.next()) {\n\t\t\t\t\tchczon.addItem(rs.getString(\"Name\"));\n\t\t\t\t}\n\t\t\t} catch (SQLException | ClassNotFoundException e) {}\n\n\t\t\tObject[] zone = { new JLabel(\"Zone name:\"), chczon};\n\n\t\t\tint option=JOptionPane.showConfirmDialog(this, zone, \"select zone and press OK\",\n\t\t\t\t\tJOptionPane.DEFAULT_OPTION,\tJOptionPane.INFORMATION_MESSAGE);\n\t\t\tif(option==JOptionPane.OK_OPTION)\n\t\t\t{\n\t\t\t\ttry {\n\t\t\t\t\t// Register jdbc driver\n\t\t\t\t\tClass.forName(DRIVER_CLASS);\n\t\t\t\t\t// open connection\n\t\t\t\t\tcon = DriverManager.getConnection(URL, USER, PASSWORD);\n\t\t\t\t\tString sql = \"select ID from `Zone committee` where Zone=?;\";\n\t\t\t\t\tResultSet rs = null;\n\t\t\t\t\tstmt = con.prepareStatement(sql);\n\t\t\t\t\tstmt.setString(1, chczon.getSelectedItem().toString().trim().toUpperCase());\n\t\t\t\t\trs = stmt.executeQuery();\n\t\t\t\t\twhile (rs.next()) {\n\t\t\t\t\t\tid.addItem(Integer.parseInt(rs.getString(\"ID\")));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\tif(id.getItemCount()>0){\n\t\t\t\t\t\t\tsql = \"select `BaptismalName`, `OtherName`, `Phone`, `Position`, `Level`, `Zone`\"\n\t\t\t\t\t\t\t\t\t+ \" from `Zone committee` where ID=?;\";\n\t\t\t\t\t\t\tstmt = con.prepareStatement(sql);\n\t\t\t\t\t\t\tstmt.setInt(1, Integer.parseInt(id.getSelectedItem().toString()));\n\t\t\t\t\t\t\trs = stmt.executeQuery();\n\t\t\t\t\t\t\trs.beforeFirst();\n\t\t\t\t\t\t\twhile (rs.next()) {\n\t\t\t\t\t\t\t\ttxtBapName.setText(rs.getString(\"BaptismalName\"));\n\t\t\t\t\t\t\t\ttxtOtherName.setText(rs.getString(\"OtherName\"));\n\t\t\t\t\t\t\t\ttxtLevel.setText(rs.getString(\"Level\"));\n\t\t\t\t\t\t\t\ttxtPhone.setText(rs.getString(\"Phone\"));\n\t\t\t\t\t\t\t\tposition.select(rs.getString(\"Position\"));\n\t\t\t\t\t\t\t\tchczon.setSelectedItem(rs.getString(\"Zone\"));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} catch (SQLException | ClassNotFoundException e1) {\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, e1.getMessage());\n\n\t\t\t\t\t}\n\t\t\t\tAutoCompleteDecorator.decorate(id);\n\t\t\t\tid.addItemListener(new ItemListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void itemStateChanged(ItemEvent e) {\n\n\t\t\t\t\t\tint ids = Integer.parseInt(id.getSelectedItem().toString());\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tString sql = \"select `BaptismalName`, `OtherName`, `Phone`, `Position`, `Level`, `Zone`\"\n\t\t\t\t\t\t\t\t\t+ \" from `Zone committee` where ID=?;\";\n\t\t\t\t\t\t\tstmt = con.prepareStatement(sql);\n\t\t\t\t\t\t\tstmt.setInt(1, ids);\n\t\t\t\t\t\t\tResultSet rs = stmt.executeQuery();\n\t\t\t\t\t\t\trs.beforeFirst();\n\t\t\t\t\t\t\twhile (rs.next()) {\n\t\t\t\t\t\t\t\ttxtBapName.setText(rs.getString(\"BaptismalName\"));\n\t\t\t\t\t\t\t\ttxtOtherName.setText(rs.getString(\"OtherName\"));\n\t\t\t\t\t\t\t\ttxtLevel.setText(rs.getString(\"Level\"));\n\t\t\t\t\t\t\t\ttxtPhone.setText(rs.getString(\"Phone\"));\n\t\t\t\t\t\t\t\tposition.select(rs.getString(\"Position\"));\n\t\t\t\t\t\t\t\tchczon.setSelectedItem(rs.getString(\"Zone\"));\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, e1.getMessage());\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t// If save button clicked, get the inputs from the text fields\n\t\t\t\tsave.addActionListener(new ActionListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * Update Record\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif(id.getItemCount()>0){\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t// Register jdbc driver\n\t\t\t\t\t\t\t\tClass.forName(DRIVER_CLASS);\n\t\t\t\t\t\t\t\t// open connection\n\t\t\t\t\t\t\t\tcon = DriverManager.getConnection(URL, USER, PASSWORD);\n\t\t\t\t\t\t\t\tString sql = \"delete from `Zone committee` WHERE `ID`=?;\";\n\t\t\t\t\t\t\t\tstmt = (PreparedStatement) con.prepareStatement(sql);\n\t\t\t\t\t\t\t\tstmt.setInt(1, Integer.parseInt(id.getSelectedItem().toString()));\n\t\t\t\t\t\t\t\tstmt.executeUpdate();\n\t\t\t\t\t\t\t\tshowZonecomm();\n\t\t\t\t\t\t\t\ttxtBapName.setText(\"\");\n\t\t\t\t\t\t\t\ttxtOtherName.setText(\"\");\n\t\t\t\t\t\t\t\ttxtLevel.setText(\"\");\n\t\t\t\t\t\t\t\ttxtPhone.setText(\"\");\n\t\t\t\t\t\t\t\tposition.select(0);\n\t\t\t\t\t\t\t\tid.removeItem(id.getSelectedItem().toString());\n\t\t\t\t\t\t\t} catch (SQLException | ClassNotFoundException e2) {\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, e2.getMessage());\n\t\t\t\t\t\t\t\te2.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Record does not exist.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\ttxtBapName.setEditable(false);\n\t\t\t\ttxtOtherName.setEditable(false);\n\t\t\t\tObject[] inputfields = { new JLabel(\"Type ID and press ENTER\"), id, labBaptismalName,\n\t\t\t\t\t\ttxtBapName, labOtherName, txtOtherName, labPhone, txtPhone, new JLabel(\"Level\"), txtLevel, labPosition,\n\t\t\t\t\t\tposition };\n\n\t\t\t\tJOptionPane.showOptionDialog(this, inputfields, \"Enter zone committee members\", JOptionPane.DEFAULT_OPTION,\n\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE, null, new Object[] { save }, null);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}", "private void actionDelete() {\r\n showDeleteDialog();\r\n }", "@Override\r\n\tpublic void k_delete(String MF_NO) {\n\t\t\r\n\t}", "private void popupDelete() {\n\t\taufzugschacht.removeElement(this);\n\t}", "@Command(\"delete\")\n @NotifyChange({\"events\", \"selectedEvent\"})\n public void delete() {\n if(this.selectedEvent != null) {\n eventDao.delete(this.selectedEvent);\n this.selectedEvent = null;\n }\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tint RowNum=jt.getSelectedRow();\n\t\t\t\tif(RowNum==-1){\n\t\t\t\t\tJOptionPane.showMessageDialog(jt, \"请选择一行\");\n\t\t\t\t return ;\n\t\t\t }\n\t\t\t\t\n\t\t\t\tint isDelete=JOptionPane.showConfirmDialog(null, \"是否确定删除该专业以及该专业所有班级与学生信息?\");\n\t\t\t\t\n\t\t\t\tif(isDelete==JOptionPane.YES_OPTION){\n\t\t\t\t\tString majorName=(String)mit.getValueAt(RowNum, 1);\n\t\t\t\t\tString deleteSql=\"delete from majorinfo where grade='\"+Tool.getGrade(userId)+\"' and majorName=?\";\n\t\t\t\t\tString deleteclass=\"delete from classinfo where grade='\"+Tool.getGrade(userId)+\"' and major=?\";\n\t\t\t\t\tString deletejob=\"delete from jobinfo where grade='\"+Tool.getGrade(userId)+\"' and major=?\";\n\t\t\t\t\t\n\t\t\t\t\tString[] dleteParas={Tool.string2UTF8(majorName)};\n\t\t\t\t\t\n\t\t\t\t\tmit.Update(deleteclass, dleteParas);\n\t\t\t\t\tmit.Update(deletejob, dleteParas);\n\t\t\t\t\t\n\t\t\t\t\tif(mit.Update(deleteSql, dleteParas)){\n\t\t\t\t\t\trefresh(jt);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(jt, \"删除失败\");\n\t\t\t\t\t}\n\n\t\t\t\t\trefresh(jt);\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t}", "private void delete() {\n\t\tfor (int i = 0; i < list.size(); i++) {\r\n\t\t\tif (list.get(i).toString().equals(lu.toString())) {\r\n\t\t\t\tlist.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tll.makeXml(list);\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tinitTableView();\r\n\t}", "private void jbtn_deleteActionPerformed(ActionEvent evt) {\n\t\tDefaultTableModel RecordTable=(DefaultTableModel)jTable1.getModel();\n\t\tint Selectedrow=jTable1.getSelectedRow();\n\t\t\n\t\ttry\n\t\t{\n\t\t\tid=RecordTable.getValueAt(Selectedrow,0).toString();\n\t\t\tdeleteItem=JOptionPane.showConfirmDialog(this,\"Confirm if you want to delete the record\",\"Warning\",JOptionPane.YES_NO_OPTION);\n\t\t\t\n\t\t\tif(deleteItem==JOptionPane.YES_OPTION)\n\t\t\t{\n\t\t\t\tconn cc=new conn();\n\t\t\t\tpst=cc.c.prepareStatement(\"delete from medicine where medicine_name=?\");\n\t\t\t pst.setString(1,id);\n\t\t\t\tpst.executeUpdate();\n\t\t\t\tJOptionPane.showMessageDialog(this,\"Record Updated\");\n\t\t\t\tupDateDB();\n\t\t\t\ttxtblank();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\t\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\t Database.RemoveItem(Integer.toString(Database.IDs[table.getSelectedRow()]));\t\n\t\t\t\t Login.Refresh();\n\t\t\t }", "@FXML\n private void btnSlett() {\n int valgtIndex = tblData.getSelectionModel().getSelectedIndex();\n if (valgtIndex >=0) {\n System.out.println(tblData.getSelectionModel().getSelectedIndex());\n dRegister.removeInded(valgtIndex);\n } else {\n dialogs.showNoSelectDialog(\"Vennligst velg en komponent i tabellen\");\n }\n }", "private void delete() {\n\t\tComponents.questionDialog().message(\"Are you sure?\").callback(answeredYes -> {\n\n\t\t\t// if confirmed, delete the current product PropertyBox\n\t\t\tdatastore.delete(TARGET, viewForm.getValue());\n\t\t\t// Notify the user\n\t\t\tNotification.show(\"Product deleted\", Type.TRAY_NOTIFICATION);\n\n\t\t\t// navigate back\n\t\t\tViewNavigator.require().navigateBack();\n\n\t\t}).open();\n\t}", "@FXML\n private void handleDeleteFilm() {\n int selectedIndex = filmTable.getSelectionModel().getSelectedIndex();\n if (selectedIndex >= 0) {\n \tfilmTable.getItems().remove(selectedIndex);\n \tsave();\n } else {\n // Nothing selected.\n Dialogs.create()\n .title(\"No Selection\")\n .masthead(\"No Person Selected\")\n .message(\"Please select a person in the table.\")\n .showWarning();\n }\n }", "private void deleteRoutine() {\n String message = \"Are you sure you want to delete this routine\\nfrom your routine collection?\";\n int n = JOptionPane.showConfirmDialog(this, message, \"Warning\", JOptionPane.YES_NO_OPTION);\n if (n == JOptionPane.YES_OPTION) {\n Routine r = list.getSelectedValue();\n\n collection.delete(r);\n listModel.removeElement(r);\n }\n }", "public void eliminarLista(){\n //se define la lista seleccionada y se elimina\n ListaCompras listaSeleccionada = ListasComprasTabla.getSelectionModel().getSelectedItem();\n if (listaSeleccionada!=null) {\n ListasComprasTabla.getItems().remove(listaSeleccionada);\n }else {\n System.out.println(\"No hay lista seleccionada\");\n }\n }", "private void deleteSelectedFile() {\r\n\t\tString sel = this.displayFileNames.getSelectedValue();\r\n\t\tif(sel != null) {\r\n\t\t\tFileModel model = FileData.getFileModel(sel);\r\n\t\t\tFileType type = model.getFileType();\r\n\t\t\tFileData.deleteFileModel(type);\r\n\t\t\tthis.setButtonEnabled(type);\r\n\t\t\tthis.loadFileNames();\r\n\t\t\tthis.updateColumnSelections(type);\r\n\t\t\tColumnData.clearMatchedCells(type);\r\n\t\t}\r\n\t}", "@Override\n\tpublic void deleteClick(int id) {\n\t\t\n\t}", "@Override\n\tpublic void delete() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "void deleteButton_actionPerformed(ActionEvent e) {\n doDelete();\n }", "@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tInputDialog id1=new InputDialog(sShell,\"删除员工\",\"输入员工编号\",\"\",null);\r\n\t\t\t\tif(id1.open()==0){\r\n\t\t\t\t\tinput=id1.getValue();\r\n\t\t\t\t\tif(input.equals(\"\")) return;\r\n\t\t\t\t}\r\n\t\t\t\telse return;\r\n\t\t\t\t\r\n\t\t\t\tCommonADO ado=CommonADO.getCommonADO();\r\n\t\t\t\tString sql=\"delete from Staff where StaffNo='\"+input+\"'\";\r\n\t\t\t\tado.executeUpdate(sql);\r\n\t\t\t\tshowStaff();\r\n\t\t\t}", "public void delete() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"deleteButton\").click();\n\t}", "@FXML\r\n public void onDelete() {\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\r\n alert.setTitle(\"Mensagem\");\r\n alert.setHeaderText(\"\");\r\n alert.setContentText(\"Deseja excluir?\");\r\n Optional<ButtonType> result = alert.showAndWait();\r\n if (result.get() == ButtonType.OK) {\r\n AlunoModel alunoModel = tabelaAluno.getItems().get(tabelaAluno.getSelectionModel().getSelectedIndex());\r\n\r\n if (AlunoDAO.executeUpdates(alunoModel, AlunoDAO.DELETE)) {\r\n tabelaAluno.getItems().remove(tabelaAluno.getSelectionModel().getSelectedIndex());\r\n alert(\"Excluido com sucesso!\");\r\n desabilitarCampos();\r\n } else {\r\n alert(\"Não foi possivel excluir\");\r\n }\r\n }\r\n }", "private void delete() {\n\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString RemoveOrder=\"Delete from UserFace1 where (ID=?)\";\r\n\t\t\t\ttry {\r\n\t\t\t\t\tst=con.prepareStatement(RemoveOrder);\r\n\t\t\t\t\tst.setInt(1,Integer.parseInt(idField.getText()));\r\n\t\t\t\t\tint i = st.executeUpdate();\r\n //Executing MySQL Update Query\t\t\t\t\t\t+++++++++++++++++++++++\r\n if(i==1){\r\n JOptionPane.showMessageDialog(panel,\"Successfully Removed\");\r\n }\r\n \r\n refreshTable();\r\n\t\t\t\t\t\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}\r\n\t\t\t\t\r\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tint choice = JOptionPane.showConfirmDialog(frame, \n\t\t\t\t\t\t\"Do you want to delete the selected projects?\\nThis action cannot be undone!\", \n\t\t\t\t\t\t\"Delete Selected\", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);\n\t\t\t\tif(choice == 0){\n\t\t\t\t\tSystem.out.println(\"Delete\");\n\t\t\t\t\tString[] selected = sel.getSelected(); \n\t\t\t\t\tfor(int i=0;i<selected.length;i++) {\n\t\t\t\t\t\n\t\t\t\t\t\tint index = portfolio.findByCode(selected[i]);\n\t\t\t\t\t\tportfolio.remove(index, config.isUpdateDB());\n\t\t\t\t\t\tsel.remove(index);\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfpTable.setModel((TableModel) new ProjectTableModel(portfolio.getFinishedProjects()));\n\t\t\t\topTable.setModel((TableModel) new ProjectTableModel(portfolio.getOngoingProjects()));\n\t\t\t\ttoggleSaved(false);\n\t\t\t}", "@FXML\n private void setRemoveButton() {\n Coach selectedRow = coachesTable.getSelectionModel().getSelectedItem();\n try {\n Connection conn = DatabaseHandler.getInstance().getConnection();\n try (Statement st = conn.createStatement()) {\n st.execute(\"delete from szkolka.uzytkownik where id_u=\" + selectedRow.getId() + \";\");\n coachesTable.getItems().remove(coachesTable.getSelectionModel().getSelectedItem());\n removeButton.setDisable(true);\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@FXML\n\tprivate void deleteSelected(ActionEvent event) {\n\t\tint selectedIndex = taskList.getSelectionModel().getSelectedIndex();\n\t\tString task = taskList.getItems().get(selectedIndex);\n\t\ttaskList.getSelectionModel().clearSelection();\n\t\ttaskList.getItems().remove(task);\n\t\tchatView.setText(\"\");\n\t\ttaskList.getItems().removeAll();\n\t\tString task_split[] = task.split(\" \", 2);\n\t\tString removeTask = task_split[1];\n\t\tif (task.contains(\"due by\")) {\n\t\t\tString[] taskDate = task_split[1].split(\"\\\\s+\");\n\t\t\tSystem.out.println(taskDate);\n\t\t\tString end = taskDate[taskDate.length - 3];\n\t\t\tSystem.out.println(end);\n\t\t\tremoveTask = task_split[1].substring(0, task_split[1].indexOf(end)).trim();\n\t\t\tSystem.out.println(removeTask);\n\n\t\t}\n\t\tclient.removeTask(removeTask.replace(\"\\n\", \"\"));\n\t}", "@Override\n\tpublic void deleteClick(Object id) {\n\t\t\n\t}", "@FXML\n\tpublic void deleteUser(ActionEvent e) {\n\t\tint i = userListView.getSelectionModel().getSelectedIndex();\n//\t\tUser deletMe = userListView.getSelectionModel().getSelectedItem();\n//\t\tuserList.remove(deletMe); this would work too just put the admin warning\n\t\tdeleteUser(i);\n\t}", "private void jButtonDeleteStageplaatsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonDeleteStageplaatsActionPerformed\n\n Stageplaats s = (Stageplaats)jListStageplaatsen.getSelectedValue();\n if (s != null){\n int index = this.jListStageplaatsen.getSelectedIndex();\n Stageplaats sFromDB = this.dbFacade.getStageplaatsByID(s.getId());\n if (sFromDB != null){\n this.dbFacade.remove(sFromDB);\n refreshDataCache();\n refreshListbox();\n if (index > 0) index--;\n this.jListStageplaatsen.setSelectedIndex(index);\n }\n }\n enableButtons();\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tItemType i = getSelectedItem();\n\t\t\t\tif(i != null)\n\t\t\t\t{\t\n\n\t\t\t\t\tfinal String msg = \"Delete \"+i.getName() + \"?\";\n\t\t\t\t\tif(!confirmDelete(msg))\n\t\t\t\t\t\treturn;\n\t\t\t\t\ti.removeContainer(GeneralItemList.this);\n\t\t\t\t\ti.destroy();\n\t\t\t\t}\n\t\t\t\titems.remove(i);\n\t\t\t\tlist.clearSelection();\n\t\t\t\tlist.repaint(100);\t\t\t\t\n\t\t\t}", "public String btn_delete_action()\n {\n int n = this.getDataTableSemental().getRowCount();\n ArrayList<SementalDTO> selected = new ArrayList();\n for (int i = 0; i < n; i++) { //Obtener elementos seleccionados\n this.getDataTableSemental().setRowIndex(i);\n SementalDTO aux = (SementalDTO) this.\n getDataTableSemental().getRowData();\n if (aux.isSelected()) {\n selected.add(aux);\n }\n }\n if(selected == null || selected.size() == 0)\n {\n //En caso de que no se seleccione ningun elemento\n MessageBean.setErrorMessageFromBundle(\"not_selected\", this.getMyLocale());\n return null;\n }\n else if(selected.size() == 1)\n { //En caso de que solo se seleccione un elemento\n \n //si tiene hijos o asociacions despliega el mensaje de alerta\n if(getgermplasm$SementalSessionBean().getGermplasmFacadeRemote().\n haveSemenGathering(\n selected.get(0).getSementalId()))\n {\n this.getAlertMessage().setRendered(true);\n this.getMainPanel().setRendered(false);\n getgermplasm$SementalSessionBean().setDeleteSemental(\n selected.get(0).getSementalId());\n }\n else\n {\n //delete the accession\n getgermplasm$SementalSessionBean().getGermplasmFacadeRemote().\n deleteSemental(selected.get(0).getSementalId());\n //refresh the list\n getgermplasm$SementalSessionBean().getPagination().deleteItem();\n getgermplasm$SementalSessionBean().getPagination().refreshList();\n getgermplasm$SemenGatheringSessionBean().setPagination(null);\n MessageBean.setSuccessMessageFromBundle(\"delete_semental_success\", this.getMyLocale());\n }\n \n return null;\n }\n else{ //En caso de que sea seleccion multiple\n MessageBean.setErrorMessageFromBundle(\"not_yet\", this.getMyLocale());\n return null;\n }\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSystem.out.println(\"btnDelete\");\n\t\t\t\tint i = table.getSelectedRow();\n\t\t\t\tif (i >= 0) {\n\t\t\t\t\tSystem.out.println(\"row-Delete\" + i);\n\t\t\t\t\tSystem.out.println(\"row-Delete\" + textSuppD.getText());\n\t\t\t\t\tint suppID = Integer.parseInt(textSuppD.getText().trim());\n\n\t\t\t\t\tDatabase db = new Database();\n\t\t\t\t\tSuppliersDAO suppDAO = new SuppliersDAO(db);\n\t\t\t\t\tSuppliersModel suppModel = new SuppliersModel();\n\t\t\t\t\tsuppModel.setSuppliers_id(suppID);\n\t\t\t\t\tsuppDAO.Delete(suppModel);\n\t\t\t\t\tdb.commit();\n\t\t\t\t\tdb.close();\n\n\t\t\t\t\tmodel.removeRow(i);\n\t\t\t\t} else {\n\t\t\t\t}\n\t\t\t}", "private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {\n if(!search_table.getSelectionModel().isSelectionEmpty()){\n // TODO add your handling code here:\n int op = JOptionPane.showConfirmDialog(null, \"ARE YOU SURE YOU WANT TO DELETE?\", \"DELETE\", JOptionPane.YES_NO_OPTION);\n if(op==0){\n try{\n int i = search_table.getSelectedRow();\n TableModel model = search_table.getModel();\n \n String sql2 = \"DELETE FROM Lecturer WHERE id = '\"+model.getValueAt(i, 0).toString()+\"'\";\n st.executeUpdate(sql2);\n JOptionPane.showMessageDialog(null, \"DELETED SUCCESSFULLY\");\n \n DefaultTableModel model1= (DefaultTableModel) search_table.getModel();\n model1.setRowCount(0);\n viedetail_txt.setText(null);\n }\n catch(HeadlessException | SQLException ex){\n JOptionPane.showMessageDialog(null, ex);\n }\n }\n }\n else\n JOptionPane.showMessageDialog(null, \"NOTHING SPECIFIED TO DELETE\");\n \n \n }", "@FXML\n\tpublic void deleteProductType(ActionEvent event) {\n\t\tif (!txtDeleteProductTypeName.getText().equals(\"\")) {\n\t\t\ttry {\n\t\t\t\tboolean remove = restaurant.deleteproductType(txtDeleteProductTypeName.getText());\n\t\t\t\tif (remove == true) {\n\t\t\t\t\ttypeOptions.remove(txtDeleteProductTypeName.getText());\n\t\t\t\t\ttxtDeleteProductTypeName.setText(\"\");\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"No se pudo guardar la actualización de los datos\");\n\t\t\t\tdialog.setTitle(\"Error guardar datos\");\n\t\t\t\tdialog.show();\n\t\t\t}\n\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Los campos deben ser llenados\");\n\t\t\tdialog.setTitle(\"Error, Campo sin datos\");\n\t\t\tdialog.show();\n\t\t}\n\n\t}", "public void doDeleteconfirm ( RunData data)\n\t{\n\t\tSessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ());\n\t\tSet deleteIdSet = new TreeSet();\n\n\t\t// cancel copy if there is one in progress\n\t\tif(! Boolean.FALSE.toString().equals(state.getAttribute (STATE_COPY_FLAG)))\n\t\t{\n\t\t\tinitCopyContext(state);\n\t\t}\n\n\t\t// cancel move if there is one in progress\n\t\tif(! Boolean.FALSE.toString().equals(state.getAttribute (STATE_MOVE_FLAG)))\n\t\t{\n\t\t\tinitMoveContext(state);\n\t\t}\n\n\t\tString[] deleteIds = data.getParameters ().getStrings (\"selectedMembers\");\n\t\tif (deleteIds == null)\n\t\t{\n\t\t\t// there is no resource selected, show the alert message to the user\n\t\t\taddAlert(state, rb.getString(\"choosefile3\"));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdeleteIdSet.addAll(Arrays.asList(deleteIds));\n\t\t\tList deleteItems = new Vector();\n\t\t\tList notDeleteItems = new Vector();\n\t\t\tList nonEmptyFolders = new Vector();\n\t\t\tList roots = (List) state.getAttribute(STATE_COLLECTION_ROOTS);\n\t\t\tIterator rootIt = roots.iterator();\n\t\t\twhile(rootIt.hasNext())\n\t\t\t{\n\t\t\t\tBrowseItem root = (BrowseItem) rootIt.next();\n\n\t\t\t\tList members = root.getMembers();\n\t\t\t\tIterator memberIt = members.iterator();\n\t\t\t\twhile(memberIt.hasNext())\n\t\t\t\t{\n\t\t\t\t\tBrowseItem member = (BrowseItem) memberIt.next();\n\t\t\t\t\tif(deleteIdSet.contains(member.getId()))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(member.isFolder())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(ContentHostingService.allowRemoveCollection(member.getId()))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdeleteItems.add(member);\n\t\t\t\t\t\t\t\tif(! member.isEmpty())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tnonEmptyFolders.add(member);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tnotDeleteItems.add(member);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(ContentHostingService.allowRemoveResource(member.getId()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdeleteItems.add(member);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnotDeleteItems.add(member);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(! notDeleteItems.isEmpty())\n\t\t\t{\n\t\t\t\tString notDeleteNames = \"\";\n\t\t\t\tboolean first_item = true;\n\t\t\t\tIterator notIt = notDeleteItems.iterator();\n\t\t\t\twhile(notIt.hasNext())\n\t\t\t\t{\n\t\t\t\t\tBrowseItem item = (BrowseItem) notIt.next();\n\t\t\t\t\tif(first_item)\n\t\t\t\t\t{\n\t\t\t\t\t\tnotDeleteNames = item.getName();\n\t\t\t\t\t\tfirst_item = false;\n\t\t\t\t\t}\n\t\t\t\t\telse if(notIt.hasNext())\n\t\t\t\t\t{\n\t\t\t\t\t\tnotDeleteNames += \", \" + item.getName();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tnotDeleteNames += \" and \" + item.getName();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\taddAlert(state, rb.getString(\"notpermis14\") + notDeleteNames);\n\t\t\t}\n\n\n\t\t\t/*\n\t\t\t\t\t//htripath-SAK-1712 - Set new collectionId as resources are not deleted under 'more' requirement.\n\t\t\t\t\tif(state.getAttribute(STATE_MESSAGE) == null){\n\t\t\t\t\t String newCollectionId=ContentHostingService.getContainingCollectionId(currentId);\n\t\t\t\t\t state.setAttribute(STATE_COLLECTION_ID, newCollectionId);\n\t\t\t\t\t}\n\t\t\t*/\n\n\t\t\t// delete item\n\t\t\tstate.setAttribute (STATE_DELETE_ITEMS, deleteItems);\n\t\t\tstate.setAttribute (STATE_DELETE_ITEMS_NOT_EMPTY, nonEmptyFolders);\n\t\t}\t// if-else\n\n\t\tif (state.getAttribute(STATE_MESSAGE) == null)\n\t\t{\n\t\t\tstate.setAttribute (STATE_MODE, MODE_DELETE_CONFIRM);\n\t\t\tstate.setAttribute(STATE_LIST_SELECTIONS, deleteIdSet);\n\t\t}\n\n\n\t}", "@FXML\n\tpublic void deleteProduct(ActionEvent event) {\n\t\tif (!txtDeleteProductName.getText().equals(\"\")) {\n\t\t\ttry {\n\n\t\t\t\tList<Product> productToDelete = restaurant.findSameProduct(txtDeleteProductName.getText());\n\t\t\t\tboolean delete = restaurant.deleteProduct(txtDeleteProductName.getText());\n\t\t\t\tif (delete == true) {\n\t\t\t\t\tfor (int i = 0; i < productOptions.size(); i++) {\n\t\t\t\t\t\tfor (int j = 0; j < productToDelete.size(); j++) {\n\t\t\t\t\t\t\tif (productOptions.get(i) != null && productOptions.get(i)\n\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(productToDelete.get(j).getReferenceId())) {\n\t\t\t\t\t\t\t\tproductOptions.remove(productToDelete.get(j).getReferenceId());\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\n\t\t\t\ttxtDeleteProductName.setText(\"\");\n\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"No se pudo guardar la actualización de los productos\");\n\t\t\t\tdialog.setTitle(\"Error guardar datos\");\n\t\t\t\tdialog.show();\n\t\t\t}\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Los campos deben ser llenados\");\n\t\t\tdialog.setTitle(\"Error, Campo sin datos\");\n\t\t\tdialog.show();\n\t\t}\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tUser zws = alllist.getSelectedValue();\r\n\t\t\t\tam.removeElement(zws);\r\n\t\t\t\tall.remove(zws);\r\n\t\t\t\tvm.addElement(zws);\r\n\t\t\t\tverwalter.remove(zws);\r\n\t\t\t}", "public void onClick(DialogInterface dialog,int id) {\n \n\n bookMarkList.remove(selectedItem);\n iadapter.notifyDataSetChanged();\n // Toast.makeText(getApplicationContext(),\"delete\"+ valuebpage+ \" name is \"+ valuebname,Toast.LENGTH_LONG).show();\n // dialogBookmark.dismiss();\n dialog.cancel();\n }", "@Override\n\t\tpublic void delete() {\n\t\t\tSystem.out.println(\"새로운 삭제\");\n\t\t}", "@FXML\n public void handleDeleteButton(ActionEvent event) {\n if (cList.getItems().size() == 0) {\n alert(\"Error\", \"Invalid selection.\", \"The list is already empty.\");\n return;\n }\n\n String s = (String) cList.getSelectionModel().getSelectedItem();\n\n if (cList.getSelectionModel().getSelectedIndex() == -1) {\n alert(\"Error\", \"Invalid selection.\", \"Please select an item to delete.\");\n return;\n }\n\n String parts[] = s.split(\"=\");\n Tag delete = null;\n for (Tag t : tags) {\n if (t.getType().equals(parts[0]) && t.getValue().equals(parts[1])) {\n obsList.remove(s);\n }\n }\n tags.remove(delete);\n cList.setItems(obsList);\n\n\n }", "@FXML\n\tpublic void handleExcluir(MouseEvent event) {\n\t\tif(colNome.getCellData(jtvIngredienteTable.getSelectionModel().getSelectedIndex()) != null){\n\t\t\tingredienteService = new IngredienteService();\n\t\t\tIngrediente ingrediente = jtvIngredienteTable.getSelectionModel().getSelectedItem();\n\t\t\tingredienteService.delete(ingrediente.getId());\n\t\t\tatualizarTable();\n\t\t}else{\n\t\t\tScreenUtils.janelaInformação(spDialog, Internationalization.getMessage(\"header_erro3\"), Internationalization.getMessage(\"item_nao_selecionado\"), Internationalization.getMessage(\"erro_button2\"));\n//\t\t\tScreenUtils.janelaInformação(spDialog, \"Ops\", \"Por favor, selecione um item.\", \"Sem problemas\");\n\t\t}\n\t}", "@Override\n public void onDeleteButtonClick(int position) {\n UserDevicesDB selected_aube = userDevicesDBList.get(position);\n\n // TO DO --> action to delete this device by device address\n Toast.makeText(getContext(), R.string.coming_soon, Toast.LENGTH_SHORT ).show();\n }", "private void delete(ActionEvent e){\r\n if (client != null){\r\n ConfirmBox.display(\"Confirm Deletion\", \"Are you sure you want to delete this entry?\");\r\n if (ConfirmBox.response){\r\n Client.deleteClient(client);\r\n AlertBox.display(\"Delete Client\", \"Client Deleted Successfully\");\r\n // Refresh view\r\n refresh();\r\n \r\n }\r\n }\r\n }", "public void delete() {\n\n\t}", "@FXML public void deleteBT_handler(ActionEvent e) {\n\t\tif(list.getSelectionModel().getSelectedIndex() == -1) {\n\t\t\tAlert error = new Alert(AlertType.ERROR, \"Nothing Selected.\\nPlease select correctly or add new User\", ButtonType.OK);\n\t error.showAndWait();\n\t\t}\n\t\telse {\n\t\t\tAlert warning = new Alert(AlertType.WARNING,\"Delete this User from list?\", ButtonType.YES, ButtonType.NO);\n\t warning.showAndWait();\n\t if(warning.getResult() == ButtonType.NO){\n\t return;\n\t }\n\t\n\t int idx = list.getSelectionModel().getSelectedIndex();\n\t if(list.getSelectionModel().getSelectedItem().getUserName().equals(\"stock\")) {\n\t \tAlert error = new Alert(AlertType.ERROR, \"You can't delete stock username\", ButtonType.OK);\n\t error.showAndWait();\n\t \treturn;\n\t }\n\t obs.remove(idx);\n\t mgUsr.arrList.remove(idx);\n\t\t}\n\t}", "public void eliminarDatos(EstructuraContratosDatDTO estructuraNominaSelect) {\n\t\t\n\t}", "@FXML\r\n public void deleteTreatmentButton(){\r\n int sIndex = treatmentTabletv.getSelectionModel().getSelectedIndex();\r\n String sID = treatmentData.get(sIndex).getIdProperty();\r\n\r\n String deleteTreatment = \"delete from treatment where treatmentID = ?\";\r\n try{\r\n ps = mysql.prepareStatement(deleteTreatment);\r\n ps.setString(1,sID);\r\n ps.executeUpdate();\r\n ps.close();\r\n ps = null;\r\n\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n //maybe more in this exception\r\n }\r\n\r\n treatmentData.remove(sIndex);\r\n }", "public void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tint a=JOptionPane.showConfirmDialog(null,\"Are you sure you want to delete this Complaint?\",\"Delete this Record?\",JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE);\n\t\t\t if(a==JOptionPane.YES_OPTION)\n\t\t\t {\n\t\t\t \ttry \n\t\t\t\t\t{\n\t\t\t\t\tString sql2=\"DELETE FROM ComplaintsData WHERE Customer_Name=?\";\t\n\t\t\t\t\tcon=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/MundheElectronics1\",\"root\",\"vishakha\");\n\t\t\t\t\tps=con.prepareStatement(sql2);\n\t\t\t\t\tps.setString(1,txtCustomerName.getText());\n\t\t\t\t\tps.executeUpdate();\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\"Complaint deleted successfully!\");\n\n\t\t\t\t\tclear();\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception e1) {}\n\t\t\t }\n\t\t\t\tshowData();\n\t\t\t}", "public void buttonDelete(ActionEvent event) {\n\t\tObservableList<Player> allProduct, SinglePlayer;\n\t\tallProduct = tableview.getItems();\n\t\tSinglePlayer = tableview.getSelectionModel().getSelectedItems();\n\t\tSinglePlayer.forEach(allProduct::remove);\n\t}", "public void clickedSpeakerDelete() {\n\t\tif(mainWindow.getSelectedRowSpeaker().length <= 0) ApplicationOutput.printLog(\"YOU DID NOT SELECT ANY PRESENTATION\");\n\t\telse if(mainWindow.getSelectedRowSpeaker().length > 1) ApplicationOutput.printLog(\"Please select only one presentation to edit\");\n\t\telse {\n\t\t\tint tmpSelectedRow = mainWindow.getSelectedRowSpeaker()[0];\n\t\t\tSpeakers tmpSpeaker = speakersList.remove(tmpSelectedRow);\t\t\t\n\t\t\tappDriver.hibernateProxy.deleteSpeaker(tmpSpeaker);\t\n\t\t\trefreshSpeakerTable();\t\t\t\n\t\t}\n\t}", "@FXML\n private void deleteRow(ActionEvent event){\n if(facilitiesView.getSelectionModel().getSelectedItem()==null){\n errorBox(\"Feil\", \"Det er ingen rader som er markert\", \"Vennligst marker en rad i tabellen\");\n }\n else{\n Alert mb = new Alert(Alert.AlertType.CONFIRMATION);\n mb.setTitle(\"Bekreft\");\n mb.setHeaderText(\"Du har trykket slett på \"+ facilitiesView.getSelectionModel().getSelectedItem().getFacilityName());\n mb.setContentText(\"Ønsker du virkerlig å slette dette lokalet?\");\n mb.showAndWait().ifPresent(response -> {\n if(response== ButtonType.OK){\n observableList.remove(facilitiesView.getSelectionModel().getSelectedItem());\n\n File file = new File(EditedFiles.getActiveFacilityFile());\n file.delete();\n try {\n WriterThreadRunner.WriterThreadRunner(getFacilities(), EditedFiles.getActiveFacilityFile());\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n }\n });\n }\n }", "private void deleteJMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteJMenuItemActionPerformed\n // TODO add your handling code here:\n int index = employeeJComboBox.getSelectedIndex();\n employeeJComboBox.removeItemAt(index);\n employees.remove(index);\n saveEmployee();\n clearAll();\n }", "public void removeBtn(){\r\n\t\t\r\n\t\tWorkflowEntry entryToBeRemoved = (WorkflowEntry) tableView.getSelectionModel().getSelectedItem();\r\n\t\t\r\n\t\tdata.remove(entryToBeRemoved);\r\n\t\t\r\n\t}", "public void deletePerson() {\n\t\t\n\n\t\tString code = selectedPerson.getCode();\n\t\tString nameKey = selectedPerson.getName()+code;\n\t\tString lastnameKey = selectedPerson.getLastName()+code;\n\t\tString fullNameKey = nameKey+lastnameKey+code;\n\t\ttreeName.removeE(nameKey);\n\t\ttreeLastname.removeE(lastnameKey);\n\t\ttreeFullName.removeE(fullNameKey);\n\t\ttreeCode.removeE(code);\n\n\t\t\n\t}", "@FXML\n\tprivate void handleDeleteTaxi() {\n\t\tint selectedIndex = TaxiTable.getSelectionModel().getSelectedIndex();\n\t\tif (selectedIndex >= 0) {\n\t\t\tTaxiTable.getItems().remove(selectedIndex);\n\t\t} else {\n\t\t\t// Nothing selected.\n\t\t}\n\t}", "public void deleteTbagendamento() {\n\n if (agendamentoLogic.removeTbagendamento(tbagendamentoSelected)) {\n AbstractFacesContextUtils.addMessageInfo(\"Agendamento removido com sucesso.\");\n listTbagendamentos = agendamentoLogic.findAllTbagendamentoFromCurrentDay();\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"Falha ao remover agendamento.\");\n }\n\n }", "@FXML\n private void handleDeletePerson() {\n //remove the client from the view\n int selectedIndex = informationsClients.getSelectionModel().getSelectedIndex();\n if (selectedIndex >= 0) {\n //remove the client from the database\n ClientManager cManager = new ClientManager();\n cManager.deleteClient(informationsClients.getSelectionModel().getSelectedItem().getId());\n informationsClients.getItems().remove(selectedIndex);\n } else {\n // Nothing selected.\n Alert alert = new Alert(AlertType.WARNING);\n alert.initOwner(mainApp.getPrimaryStage());\n alert.setTitle(\"Erreur : Pas de selection\");\n alert.setHeaderText(\"Aucun client n'a été selectionné\");\n alert.setContentText(\"Veuillez selectionnez un client.\");\n alert.showAndWait();\n }\n }", "public void delete() throws SQLException {\r\n\t\t//SQL Statement\r\n\r\n\t\tString sql = \"DELETE FROM \" + table+ \" WHERE \" + col_genreID + \" = ?\";\r\n\t\tPreparedStatement stmt = DBConnection.getConnection().prepareStatement(sql);\r\n\t\tstmt.setInt(1, this.getGenreID());\r\n\r\n\t\tint rowsDeleted = stmt.executeUpdate();\r\n\t\tSystem.out.println(\"Es wurden \"+rowsDeleted+ \"Zeilen gelöscht\");\r\n\t\tstmt.close();\r\n\t}", "public void deleteWordLevel() {\n\t\ttry {\n \t\t\tClass.forName(DRIVER);\n \t\t} catch (ClassNotFoundException e1) {\n \t\t\t// TODO Auto-generated catch block\n \t\t\te1.printStackTrace();\n \t\t}\t\t\n\t\ttry ( Connection con = DriverManager.getConnection(URL, USER, PW)) {\n\t\t\tStatement stmt = con.createStatement();\n//\t\t\tString sql = \"DELETE FROM \" + TblName_KNOW + \" WHERE UID = \" + uid + \";\";\n\t\t\tString sql = \"UPDATE \" + tbl_USER_DIC + \" SET \" + Constants.FLD_KNOW + \"=\" + Constants.WORD_UNKNOWN + \";\";\t\t\t\n\t\t\tstmt.executeUpdate(sql);\n\t\t\t\n\t stmt.close();\n\t con.close();\n\t\t} catch(Exception e) {\n\t\t\tlogger.info(\"fail to open mysql\");\n\t\t\te.printStackTrace();\n\t\t}\t\n\t}", "@FXML\n private void deleteUser(ActionEvent event) throws IOException {\n User selectedUser = table.getSelectionModel().getSelectedItem();\n\n boolean userWasRemoved = selectedUser.delete();\n\n if (userWasRemoved) {\n userList.remove(selectedUser);\n UsermanagementUtilities.setFeedback(event,selectedUser.getName().getFirstName()+\" \"+LanguageHandler.getText(\"userDeleted\"),true);\n } else {\n UsermanagementUtilities.setFeedback(event,LanguageHandler.getText(\"userNotDeleted\"),false);\n }\n }", "public void clickedPresentationDelete() {\n\t\tif(mainWindow.getSelectedRowPresentation().length <= 0) ApplicationOutput.printLog(\"YOU DID NOT SELECT ANY PRESENTATION\");\n\t\telse if(mainWindow.getSelectedRowPresentation().length > 1) ApplicationOutput.printLog(\"Please select only one presentation to edit\");\n\t\telse {\n\t\t\tint tmpSelectedRow = mainWindow.getSelectedRowPresentation()[0];\n\t\t\tPresentations tmpPresentation = presentationList.remove(tmpSelectedRow);\t\t\t\n\t\t\tappDriver.hibernateProxy.deletePresentation(tmpPresentation);\t\n\t\t\trefreshPresentationTable();\t\t\t\n\t\t}\n\t}", "private void btnRemoverActionPerformed(java.awt.event.ActionEvent evt) {\n\n if (tblSecoes.getSelectedRow() >= 0){\n\n if (JOptionPane.showConfirmDialog(RootPane, \"Deseja Remover esta Seção?\") == 0){\n Secao secaoselect = (Secao) tblSecoes.getValueAt(tblSecoes.getSelectedRow(), 0);\n\n if (secoes.contains(secaoselect)){\n secoes.remove(secaoselect);\n secoesapagar.add(secaoselect);\n }\n\n JOptionPane.showMessageDialog(RootPane, \"Seção Removida com Sucesso!\");\n adicionasecaotable();\n }\n } else {\n JOptionPane.showMessageDialog(RootPane, \"Selecione uma Seção Por Favor!\");\n }\n }", "public void del(Connection con) \n throws qdbException\n {\n try {\n PreparedStatement stmt = con.prepareStatement(\n \" DELETE From DisplayOption WHERE \" \n + \" dpo_res_id = ? AND \" \n + \" dpo_view = ? \" );\n \n stmt.setLong(1,dpo_res_id);\n stmt.setString(2,dpo_view); \n \n stmt.executeUpdate(); \n stmt.close();\n \n } catch(SQLException e) {\n throw new qdbException(\"SQL Error: \" + e.getMessage()); \n }\n }", "private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {\n int index = jList1.getSelectedIndex();\n \n String idCategory = listIDCategory.get(index);\n deleteCategory(idCategory);\n \n }", "private void delete_btnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_delete_btnActionPerformed\n // pull current table model\n DefaultTableModel model = (DefaultTableModel) remindersTable.getModel();\n if (remindersTable.getSelectedRow() == -1) {\n if (remindersTable.getRowCount() == 0) {\n dm.messageEmptyTable();\n } else {\n dm.messageSelectLine();\n }\n } else {\n int input = JOptionPane.showConfirmDialog(frame, \"Do you want to Delete!\");\n // 0 = yes, 1 = no, 2 = cancel\n if (input == 0) {\n model.removeRow(remindersTable.getSelectedRow());\n dm.messageReminderDeleted();// user message;\n saveDataToFile();// Save changes to file\n getSum(); // Update projected balance\n } else {\n // delete canceled\n }\n }\n }", "public void operationDelete() {\n\r\n\t\tstatusFeldDelete();\r\n\t}", "@FXML\n public void deleteSet(MouseEvent e) {\n //confirm first\n Alert confirmAlert = new Alert(AlertType.CONFIRMATION, \"\", ButtonType.YES, ButtonType.NO);\n confirmAlert.setHeaderText(\"Are you sure you want to delete this set?\");\n Optional<ButtonType> result = confirmAlert.showAndWait();\n if (result.get() == ButtonType.YES) {\n //delete from database\n try (\n Connection conn = dao.getConnection();\n PreparedStatement stmt = conn.prepareStatement(\"DELETE FROM Theory WHERE Title = ?\");\n ) {\n conn.setAutoCommit(false);\n stmt.setString(1, txtTitle.getText());\n stmt.executeUpdate();\n conn.commit();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n //delete from interface\n VBox vbxCards = (VBox) apnSetRow.getParent();\n vbxCards.getChildren().remove(apnSetRow);\n }\n }", "@Override\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\tString[] strArray = { mSpinner\n\t\t\t\t\t\t\t\t\t\t\t.getSelectedItem().toString() };\n\t\t\t\t\t\t\t\t\tmWebDao.delete(strArray);\n\t\t\t\t\t\t\t\t\tlist.remove(mSpinner\n\t\t\t\t\t\t\t\t\t\t\t.getSelectedItemPosition());\n\t\t\t\t\t\t\t\t\tadapter.notifyDataSetChanged();\n\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\t}", "@FXML\n\tprivate void deleteButtonAction(ActionEvent clickEvent) {\n\t\t\n\t\tPart deletePartFromProduct = partListProductTable.getSelectionModel().getSelectedItem();\n\t\t\n\t\tif (deletePartFromProduct != null) {\n\t\t\t\n\t\t\tAlert alert = new Alert(Alert.AlertType.CONFIRMATION, \"Pressing OK will remove the part from the product.\\n\\n\" + \"Are you sure you want to remove the part?\");\n\t\t\n\t\t\tOptional<ButtonType> result = alert.showAndWait();\n\t\t\n\t\t\tif (result.isPresent() && result.get() == ButtonType.OK) {\n\t\t\t\n\t\t\t\tdummyList.remove(deletePartFromProduct);\n\n\t\t\t}\n\t\t}\n\t}", "public void onClick(DialogInterface dialog, int id) {\n study1.delete(l_name);\n listItems.remove(l_name);\n adapter.notifyDataSetChanged();\n }", "public void onClick(DialogInterface dialog, int id) {\n\r\n db.countryDao().deleteAll();\r\n\r\n Toast.makeText(MainActivity.this,\"Data deleted\",Toast.LENGTH_SHORT).show();\r\n LoadCountryList();\r\n\r\n }", "@Override\r\n\tpublic String delete() {\n\t\treturn \"delete\";\r\n\t}", "@Override\n\tpublic boolean delete(Langues obj) {\n\t\treturn false;\n\t}", "@FXML\r\n\r\n private void deleteFriend(){\r\n // Delete from GUI\r\n final int selectIndex = udb_FriendsListView.getSelectionModel().getSelectedIndex();\r\n if(selectIndex != -1){\r\n String itemToRemove = udb_FriendsListView.getSelectionModel().getSelectedItem();\r\n final int newSelectedIndex = (selectIndex == udb_FriendsListView.getItems().size() - 1) ? selectIndex - 1 : selectIndex;\r\n udb_FriendsListView.getItems().remove(selectIndex);\r\n udb_FriendsListView.getSelectionModel().select(newSelectedIndex);\r\n\r\n //Delete from DB\r\n try{\r\n FriendsDao.deleteFriend(userName, itemToRemove);\r\n }catch (Exception e){\r\n\r\n }\r\n }\r\n\r\n }", "private void deleteDialog() {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setTitle(getString(R.string.warmhint));\n\t\tbuilder.setMessage(getString(R.string.changequestion2));\n\t\tbuilder.setPositiveButton(getString(R.string.yes),\n\t\t\t\tnew OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdeleteAllTag();\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\tToast.makeText(ArchermindReaderActivity.this,\n\t\t\t\t\t\t\t\tgetString(R.string.successdelete),\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.setNegativeButton(getString(R.string.no),\n\t\t\t\tnew OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.show();\n\t}", "public void remove() {\n getMainApplication().showConfirmationDialog(\n new ConfirmDialog.Listener() {\n public void onClose(ConfirmDialog dialog) {\n if (dialog.isConfirmed()) {\n Collection<T> selectedValues = getSelectedValues();\n removeConfirmed(CollectionsUtil.toArray(getType(), selectedValues));\n }\n }\n });\n }", "@Override\n\t\tpublic void eliminar() {\n\t\t\tutilitario.getTablaisFocus().eliminar();\n\t\t}", "@Override\n\tpublic void delete() {\n\n\t}", "public void removeClicked(View v){\n android.util.Log.d(this.getClass().getSimpleName(), \"remove Clicked\");\n String delete = \"delete from partner where partner.name=?;\";\n try {\n PartnerDB db = new PartnerDB((Context) this);\n SQLiteDatabase plcDB = db.openDB();\n plcDB.execSQL(delete, new String[]{this.selectedPartner});\n plcDB.close();\n db.close();\n }catch(Exception e){\n android.util.Log.w(this.getClass().getSimpleName(),\" error trying to delete partner\");\n }\n this.selectedPartner = this.setupselectSpinner1();\n this.loadFields();\n }", "private void eliminar() {\n\n int row = vista.tblClientes.getSelectedRow();\n cvo.setId_cliente(Integer.parseInt(vista.tblClientes.getValueAt(row, 0).toString()));\n int men = JOptionPane.showConfirmDialog(null, \"Estas seguro que deceas eliminar el registro?\", \"pregunta\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n\n if (men == JOptionPane.YES_OPTION) {\n try {\n cdao.eliminar(cvo);\n cvo.setId_cliente(row);\n } catch (Exception e) {\n System.out.println(\"Mensaje eliminar\" + e.getMessage());\n }\n }\n }", "public void delete() {\n\t\tcmd = new DeleteCommand(editor);\n\t\tinvoker = new MiniEditorInvoker(cmd);\n\t\tinvoker.action();\n\t}", "void onDeleteClicked();", "public static void deleteButtonActionPerformed(ActionEvent evt){\r\n yearField.setEditable(true);\r\n semesterChoice.setEnabled(true);\r\n mylist.empty();\r\n subjectCodes = new ArrayList<>();\r\n timeLabels = new ArrayList<>();\r\n schedulePanel.removeAll();\r\n schedulePanel.repaint();\r\n schedulePanel.add(monLabel);\r\n schedulePanel.add(tueLabel);\r\n schedulePanel.add(wedLabel);\r\n schedulePanel.add(thuLabel);\r\n schedulePanel.add(friLabel); \r\n }" ]
[ "0.7659786", "0.75681067", "0.7045917", "0.69269973", "0.6911606", "0.6890355", "0.6869923", "0.68334603", "0.6797132", "0.6766305", "0.67567015", "0.6671295", "0.66699576", "0.6632745", "0.6623466", "0.6616625", "0.6512219", "0.6503435", "0.64953357", "0.64879733", "0.6482795", "0.6481802", "0.648147", "0.64793754", "0.64781857", "0.64753306", "0.64569587", "0.64536595", "0.6437523", "0.6419827", "0.64017075", "0.6385847", "0.6372577", "0.6364757", "0.63600194", "0.6355282", "0.6342942", "0.6329877", "0.63044196", "0.6288985", "0.6286328", "0.62745786", "0.627298", "0.62720764", "0.62580913", "0.62514794", "0.6246921", "0.62433994", "0.62412035", "0.6238347", "0.6232709", "0.62311256", "0.6229037", "0.6226589", "0.62251157", "0.6210416", "0.62026876", "0.62004083", "0.61887205", "0.6188426", "0.61822486", "0.6179416", "0.61790645", "0.61777544", "0.61708194", "0.6166207", "0.6160902", "0.6152545", "0.61515224", "0.61513305", "0.6146649", "0.6138426", "0.6131501", "0.61252964", "0.61203235", "0.61190945", "0.61163276", "0.6111349", "0.610529", "0.60974014", "0.60892653", "0.60879874", "0.6081079", "0.6080762", "0.6078499", "0.6074808", "0.6071641", "0.60711044", "0.60668194", "0.60640407", "0.6062686", "0.60590523", "0.60572267", "0.6054873", "0.6053479", "0.6050498", "0.60472363", "0.6044344", "0.6043682", "0.6043115", "0.6041386" ]
0.0
-1
Deze methode zorgt ervoor dat de insert wordt uitgevoerd om de nieuwe een nieuwe beheerder toe te voegen.
@Override public int insert(Beheerder beheerder) { Connection connection = createConnection(); int id = -1; try { PreparedStatement preparedStatement = connection.prepareStatement("INSERT INTO gebruiker (voornaam,achternaam,adres,postcode," + "woonplaats,telefoon,email,wachtwoord,rechten_id, isactief) VALUES (?,?,?,?,?,?,?,?,?,?)", Statement.RETURN_GENERATED_KEYS); preparedStatement.setString(1, beheerder.getVoornaam()); preparedStatement.setString(2, beheerder.getAchternaam()); preparedStatement.setString(3, beheerder.getAdres()); preparedStatement.setString(4, beheerder.getPostcode()); preparedStatement.setString(5, beheerder.getWoonplaats()); preparedStatement.setString(6, beheerder.getTelefoon()); preparedStatement.setString(7, beheerder.getEmail()); preparedStatement.setString(8, beheerder.getWachtwoord()); preparedStatement.setInt(9, beheerder.getRechten_id()); preparedStatement.setBoolean(10, true); preparedStatement.executeUpdate(); ResultSet rs = preparedStatement.getGeneratedKeys(); rs.next(); id = rs.getInt(1); rs.close(); } catch (SQLException e) { e.printStackTrace(); } closeConnection(connection); return id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void insertar() {\n\t\t\n\t}", "public void insert()\n\t{\n\t}", "private void InsertActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_InsertActionPerformed\n try{\n if(isEmpty())\n throw new Exception(\"Introdu toate datele!\");\n\n // if phone is frequency dont insert\n if(isExitsPhone())\n throw new Exception(\"Eroare nr telefon!\");\n\n boolean ok = insert();\n if(ok){\n Vector data = getData(\"\");\n showData(data);\n } else\n throw new Exception(\"Eroare la inserare!\");\n\n }catch(Exception e){\n JOptionPane.showMessageDialog(this, e.getMessage());\n }\n }", "@Override\n\tpublic boolean insert(String sql) {\n\t\treturn false;\n\t}", "@Override\n\tpublic void insert() {\n\t\t\n\t}", "@Override\r\n\tpublic String insert() {\n\t\tboolean mesg=false;\r\n\t\tif(adminDao.doSave(admin)==1)\r\n\t\t\tmesg=true;\r\n\t\tthis.setResultMesg(mesg, \"²åÈë\");\r\n\t\treturn SUCCESS;\r\n\t}", "@Override\n\tpublic void preInsert() {\n\n\t}", "public void insert() {\n SiswaModel m = new SiswaModel();\n m.setNisn(view.getTxtNis().getText());\n m.setNik(view.getTxtNik().getText());\n m.setNamaSiswa(view.getTxtNama().getText());\n m.setTempatLahir(view.getTxtTempatLahir().getText());\n \n //save date format\n String date = view.getDatePickerLahir().getText();\n DateFormat df = new SimpleDateFormat(\"MM/dd/yyyy\"); \n Date d = null;\n try {\n d = df.parse(date);\n } catch (ParseException ex) {\n System.out.println(\"Error : \"+ex.getMessage());\n }\n m.setTanggalLahir(d);\n \n //Save Jenis kelamin\n if(view.getRadioLaki().isSelected()){\n m.setJenisKelamin(JenisKelaminEnum.Pria);\n }else{\n m.setJenisKelamin(JenisKelaminEnum.Wanita);\n }\n \n m.setAsalSekolah(view.getTxtAsalSekolah().getText());\n m.setHobby(view.getTxtHoby().getText());\n m.setCita(view.getTxtCita2().getText());\n m.setJumlahSaudara(Integer.valueOf(view.getTxtNis().getText()));\n m.setAyah(view.getTxtNamaAyah().getText());\n m.setAlamat(view.getTxtAlamat().getText());\n \n if(view.getRadioLkkAda().isSelected()){\n m.setLkk(LkkEnum.ada);\n }else{\n m.setLkk(LkkEnum.tidak_ada);\n }\n \n //save agama\n m.setAgama(view.getComboAgama().getSelectedItem().toString());\n \n dao.save(m);\n clean();\n }", "@Override\n\tpublic void insert() {\n\t\tSystem.out.println(\"Mysql DB 서버에 접속해서 등록을 하다.\");\n\t}", "@Insert(onConflict = OnConflictStrategy.IGNORE)\n void insert(DataTugas dataTugas);", "@Override\r\n\tpublic String insert() {\n\t\treturn \"insert\";\r\n\t}", "private void insertar() {\n try {\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.insertar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Ingresado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para guardar registro!\");\n }\n }", "@Override\n public void insert(J34SiscomexOrigemDi j34SiscomexOrigemDi) {\n super.doInsert(j34SiscomexOrigemDi);\n }", "@Override\n\tpublic boolean insertOne(finalDataBean t) throws Exception {\n\t\treturn false;\n\t}", "@Override\n\tpublic void insert(Unidade obj) {\n\n\t}", "@Override\n\t\tpublic void insert() {\n\t\t\tSystem.out.println(\"새로운 등록\");\n\t\t}", "@Override\r\n\tpublic void insertar() {\n\t\ttab_cuenta.eliminar();\r\n\t\t\r\n\t\t\r\n\t}", "public void processInsertar() {\n }", "public void insert(TdiaryArticle obj) throws SQLException {\n\r\n\t}", "public void insertar(String dato){\r\n \r\n if(estaVacia()){\r\n \r\n primero = new NodoJugador(dato);\r\n }else{\r\n NodoJugador temporal = primero;\r\n while(temporal.getSiguiente()!=null){\r\n temporal = temporal.getSiguiente();\r\n }\r\n \r\n temporal.setSiguiente(new NodoJugador(dato));\r\n }\r\n }", "int insert(Tipologia record);", "public void insert() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.save(this);\n\t\tsession.getTransaction().commit();\n\t}", "public void insert() throws SQLException;", "int insert(Tourst record);", "public boolean insert(Panier nouveau) {\n\t\treturn false;\r\n\t}", "public void inserir(Comentario c);", "public void insertarcola(){\n Cola_banco nuevo=new Cola_banco();// se declara nuestro metodo que contendra la cola\r\n System.out.println(\"ingrese el nombre que contendra la cola: \");// se pide el mensaje desde el teclado\r\n nuevo.nombre=teclado.next();// se ingresa nuestro datos por consola yse almacena en la variable nombre\r\n if (primero==null){// se usa una condicional para indicar si primer dato ingresado es igual al null\r\n primero=nuevo;// se indica que el primer dato ingresado pasa a ser nuestro dato\r\n primero.siguiente=null;// se indica que el el dato ingresado vaya al apuntador siguente y que guarde al null\r\n ultimo=nuevo;// se indica que el ultimo dato ingresado pase como nuevo en la cabeza de nuestro cola\r\n }else{// se usa la condicon sino se cumple la primera\r\n ultimo.siguiente=nuevo;//se indica que ultimo dato ingresado apunte hacia siguente si es que hay un nuevo dato ingresado y que vaya aser el nuevo dato de la cola\r\n nuevo.siguiente=null;// se indica que el nuevo dato ingresado vaya y apunete hacia siguente y quees igual al null\r\n ultimo=nuevo;// se indica que el ultimo dato ingresado pase como nuevo dato\r\n }\r\n System.out.println(\"\\n dato ingresado correctamente\");// se imprime enl mensaje que el dato ha sido ingresado correctamente\r\n}", "int insert(Prueba record);", "@Override\n\tpublic void Insert(PersonelContract entity) {\n\n\t}", "int insert(Movimiento record);", "@Override\n\tpublic boolean insert() {\n\t\tif(num==null||name==null||email==null||phone==null||project==0||school==0)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tString format=\"INSERT INTO tc_student(num,name,email,phone,degree,project,school,is_cap) values ('%s','%s','%s','%s',%d,%d,%d,%d)\";\n\t\tString sql=String.format(format, num,name,email,phone,degree,project,school,is_cap);\n\t\t//System.out.println(sql);\n\t\treturn mysql.execute(sql);\n\t\t}", "@Override\n public void insert(J34SiscomexMercadoriaAdi j34SiscomexMercadoriaAdi) {\n super.doInsert(j34SiscomexMercadoriaAdi);\n }", "private void insertData() {\r\n \r\n TeatroEntity teatro = factory.manufacturePojo(TeatroEntity.class);\r\n em.persist(teatro);\r\n FuncionEntity funcion = factory.manufacturePojo(FuncionEntity.class);\r\n List<FuncionEntity> lista = new ArrayList();\r\n lista.add(funcion);\r\n em.persist(funcion);\r\n for (int i = 0; i < 3; i++) \r\n {\r\n SalaEntity sala = factory.manufacturePojo(SalaEntity.class);\r\n sala.setTeatro(teatro);\r\n sala.setFuncion(lista);\r\n em.persist(sala);\r\n data.add(sala);\r\n }\r\n for (int i = 0; i < 3; i++) \r\n {\r\n SalaEntity sala = factory.manufacturePojo(SalaEntity.class);\r\n sala.setTeatro(teatro);\r\n em.persist(sala);\r\n sfdata.add(sala);\r\n }\r\n \r\n }", "public boolean insertDateToDB() {\n return false;\n }", "@Override\n\tpublic MensajeBean inserta(Tramite_informesem nuevo) {\n\t\treturn tramite_informesemDao.inserta(nuevo);\n\t}", "public void insertProblema() {\n \n \n java.util.Date d = new java.util.Date();\n java.sql.Date fecha = new java.sql.Date(d.getTime());\n \n this.equipo.setEstado(true);\n this.prob = new ReporteProblema(equipo, this.problema, true,fecha);\n f.registrarReporte(this.prob);\n \n }", "@Override\r\n\tpublic MensajeBean inserta(Tramite_presentan_info_impacto nuevo) {\n\t\treturn tramite.inserta(nuevo);\r\n\t}", "int insert(Kaiwa record);", "private void insertTupel(Connection c) {\n try {\n String query = \"INSERT INTO \" + getEntityName() + \" VALUES (null,?,?,?,?,?);\";\n PreparedStatement ps = c.prepareStatement(query, Statement.RETURN_GENERATED_KEYS);\n ps.setString(1, getAnlagedatum());\n ps.setString(2, getText());\n ps.setString(3, getBild());\n ps.setString(4, getPolizist());\n ps.setString(5, getFall());\n ps.executeUpdate();\n ResultSet rs = ps.getGeneratedKeys();\n rs.next();\n setID(rs.getString(1));\n getPk().setValue(getID());\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "private void insertBoger() {\r\n\t\tEmne emne;\r\n\t\tBog bog;\r\n\t\tForfatter forfatter;\r\n\r\n\t\temne = _database.getEmne().get(0);\r\n\t\tbog = new BogEksemplar(\"Titel-1\", emne, 2001,1);\r\n\t\tforfatter = _database.getForfatter().get(0);\r\n\t\tbog.addForfatter(forfatter);\r\n\t\t_database.addBog(bog);\r\n\t\t\r\n\t\temne = _database.getEmne().get(0);\r\n\t\tbog = new BogEksemplar(\"Titel-1\", emne, 2001,2);\r\n\t\tforfatter = _database.getForfatter().get(0);\r\n\t\tbog.addForfatter(forfatter);\r\n\t\t_database.addBog(bog);\r\n\r\n\t\temne = _database.getEmne().get(0);\r\n\t\tbog = new BogEksemplar(\"Titel-2\", emne, 2002,1);\r\n\t\tforfatter = _database.getForfatter().get(1);\r\n\t\tbog.addForfatter(forfatter);\r\n\t\t_database.addBog(bog);\r\n\t\t\r\n\t\temne = _database.getEmne().get(1);\r\n\t\tbog = new BogEksemplar(\"Titel-3\", emne, 2003,1);\r\n\t\tforfatter = _database.getForfatter().get(1);\r\n\t\tbog.addForfatter(forfatter);\r\n\t\t_database.addBog(bog);\r\n\t\t\r\n\t\temne = _database.getEmne().get(0);\r\n\t\tbog = new BogEksemplar(\"Titel-4\", emne, 2001,1);\r\n\t\tforfatter = _database.getForfatter().get(2);\r\n\t\tbog.addForfatter(forfatter);\r\n\t\t_database.addBog(bog);\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void insertar() {\n\t\ttab_nivel_funcion_programa.insertar();\r\n\t\t\t\r\n\t\t\r\n\t}", "void insert(CTipoComprobante record) throws SQLException;", "@Override\n\tprotected Long insert(Serializable content, SQLiteDatabase db) {\n\t\treturn null;\n\t}", "public void insert(Object objekt) throws SQLException {\r\n\t\t \r\n\t\tPomagaloVO ul = (PomagaloVO) objekt;\r\n\r\n\t\tif (ul == null)\r\n\t\t\tthrow new SQLException(\"Insert \" + tablica\r\n\t\t\t\t\t+ \", ulazna vrijednost je null!\");\r\n\t\t \r\n\t\tConnection conn = null;\r\n\t\tPreparedStatement ps = null;\r\n\r\n\t\ttry {\r\n\t\t\tconn = conBroker.getConnection();\r\n\r\n\t\t\tps = conn.prepareStatement(insertUpit);\r\n\r\n\t\t\tps.setString(1, ul.getSifraArtikla());\r\n\t\t\tps.setString(2, ul.getNaziv());\r\n\t\t\tps.setInt(3, ul.getPoreznaSkupina().intValue());\r\n\r\n\t\t\tif (ul.getCijenaSPDVom() == null\r\n\t\t\t\t\t|| ul.getCijenaSPDVom().intValue() <= 0)\r\n\t\t\t\tps.setNull(4, Types.INTEGER);\r\n\t\t\telse\r\n\t\t\t\tps.setInt(4, ul.getCijenaSPDVom().intValue());\r\n\r\n\t\t\tString op = ul.getOptickoPomagalo() != null\r\n\t\t\t\t\t&& ul.getOptickoPomagalo().booleanValue() ? DA : NE;\r\n\r\n\t\t\tps.setString(5, op);\r\n\t\t\t\r\n\t\t\tps.setTimestamp(6, new Timestamp(System.currentTimeMillis()));\r\n\t\t\tps.setInt(7, NEPOSTOJECA_SIFRA);\r\n\t\t\tps.setTimestamp(8, null);\r\n\t\t\tps.setNull(9, Types.INTEGER);\r\n\r\n\t\t\tint kom = ps.executeUpdate();\r\n\r\n\t\t\tif (kom == 1) {\r\n\t\t\t\tul.setSifra(Integer.valueOf(0)); // po tome i pozivac zna da je\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// insert uspio...\r\n\t\t\t}// if kom==1\r\n\t\t\telse {\r\n\t\t\t\t//Logger.fatal(\"neuspio insert zapisa u tablicu \" + tablica, null);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// nema catch-anja SQL exceptiona... neka se pozivatelj iznad jebe ...\r\n\t\tfinally {\r\n\t\t\ttry {\r\n\t\t\t\tif (ps != null)\r\n\t\t\t\t\tps.close();\r\n\t\t\t} catch (SQLException e1) {\r\n\t\t\t}\r\n\t\t\tconBroker.freeConnection(conn);\r\n\t\t}// finally\r\n\r\n\t}", "public void insert(Conge conge) ;", "@Override\n\tpublic void insert(RaceZipTbVo vo) throws SQLException {\n\t\t\n\t}", "int insertSelective(Prueba record);", "int insert(TCar record);", "int insertSelective(Movimiento record);", "public boolean insertar(T dato){\n\t boolean resultado=true;\n\t if (vacio()) {\n\t \tdatoRaiz = dato;\n\t\t\tesVacio = false;\n\t\t}\n\t else {\n\t if (!(this.datoRaiz.equals(dato))) {\n\t Arbol<T> aux;\n\t if (dato.compareTo(this.datoRaiz)<0) { //dato < datoRaiz\n\t if ((aux=getHijoIzq())==null)\n\t hIzq = aux = new Arbol <T>();\n\t }\n\t else {\t\t\t\t\t\t\t\t\t//dato > datoRaiz\n\t if ((aux=getHijoDer())==null)\n\t hDer = aux = new Arbol <T>();\n\t }\n\t resultado = aux.insertar(dato);\n\t }\n\t else\n\t resultado=false;\n\t }\n\t return resultado;\n\t}", "public String insert(DtoEntrprs dto){\n\t\treturn null;\r\n\t}", "@Override\n public void DataIsInserted() {\n }", "int insert(Enfermedad record);", "@Override\n\tpublic int admin_insert(BoardVO obj) {\n\t\treturn 0;\n\t}", "private static void testInsert() {\n\t\tSkemp skemp = new Skemp();\n\t\tskemp.setId(99);\n\t\tskemp.setName(\"王2\");\n\t\tskemp.setSex(\"男\");\n\t\tSkempDao skempDao = new SkempDaoImpl();\n\t\tskempDao.insertSkemp(skemp);\n\t}", "int insert(Commet record);", "@Override\r\n\tpublic void insertPrestito(Prestito p) {\n\t\t\r\n\t}", "@Override\n\tpublic void insert(String... args) throws SQLException {\n\t\t\n\t}", "private void insertPerform(){\n \tif(!verify()){\n \t\treturn;\n \t}\n \tString val=new String(\"\");\n \tval=val+\"'\"+jTextField1.getText()+\"', \"; // poNo\n \tval=val+\"'\"+\n \t\tinventorycontroller.util.DateUtil.getRawFormat(\n \t\t\t(java.util.Date)jXDatePicker1.getValue()\n \t\t)\n \t\t+\"', \"; // poDate\n \tval=val+\"'\"+vndList[jTextField2.getSelectedIndex()-1]+\"', \"; // vndNo\n \tval=val+\"'\"+jTextField3.getText()+\"', \"; // qtnNo\n \tval=val+\"'\"+\n \t\tinventorycontroller.util.DateUtil.getRawFormat(\n \t\t\t(java.util.Date)jXDatePicker2.getValue()\n \t\t)\n \t\t+\"', \"; // qtnDate\n \tval=val+\"'\"+poAmount+\"', \"; // poTotal\n \tval=val+\"'pending', \"; // poStatus\n \tval=val+\"'\"+jEditorPane1.getText()+\"' \"; // remark\n \t\n \ttry{\n \t\tdbInterface1.cmdInsert(\"poMaster\", val);\n \t\tinsertPoBomDesc();\n \t\tinsertPoDesc();\n\t \tupdateBOM();\n \t}\n \tcatch(java.sql.SQLException ex){\n \t\tSystem.out.println (ex);\n \t}\n \tresetPerform();\n }", "public void insertar() {\r\n if (vista.jTNombreempresa.getText().equals(\"\") || vista.jTTelefono.getText().equals(\"\") || vista.jTRFC.getText().equals(\"\") || vista.jTDireccion.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(null, \"Faltan Datos: No puedes dejar cuadros en blanco\");//C.P.M Verificamos si las casillas esta vacia si es asi lo notificamos\r\n } else {//C.P.M de lo contrario prosegimos\r\n modelo.setNombre(vista.jTNombreempresa.getText());//C.P.M mandamos las variabes al modelo \r\n modelo.setDireccion(vista.jTDireccion.getText());\r\n modelo.setRfc(vista.jTRFC.getText());\r\n modelo.setTelefono(vista.jTTelefono.getText());\r\n \r\n Error = modelo.insertar();//C.P.M Ejecutamos el metodo del modelo \r\n if (Error.equals(\"\")) {//C.P.M Si el modelo no regresa un error es que todo salio bien\r\n JOptionPane.showMessageDialog(null, \"Se guardo exitosamente la configuracion\");//C.P.M notificamos a el usuario\r\n vista.dispose();//C.P.M y cerramos la vista\r\n } else {//C.P.M de lo contrario \r\n JOptionPane.showMessageDialog(null, Error);//C.P.M notificamos a el usuario el error\r\n }\r\n }\r\n }", "public Etudiant insert(Etudiant obj) {\n\t\treturn null;\n\t}", "public SgfensBancoPk insert(SgfensBanco dto) throws SgfensBancoDaoException;", "public void addAnzeige(Anzeige anzeigeToAdd) throws StoreException {\n \r\n \t try {\r\n PreparedStatement preparedStatement = connection\r\n .prepareStatement(\"insert into Dbp71.Anzeige (titel, text, preis, ersteller, status) values (?,?,?,?,?)\");\r\n \t\t\r\n //preparedStatement.setInt(1, anzeigeToAdd.getId_Anzeige());\r\n preparedStatement.setString(1, anzeigeToAdd.getTitel());\r\n preparedStatement.setString(2, anzeigeToAdd.getText());\r\n preparedStatement.setBigDecimal(3, BigDecimal.valueOf(anzeigeToAdd.getPreis()));\r\n // preparedStatement.setString(5, anzeigeToAdd.getErsteller());\r\n preparedStatement.setString(4, anzeigeToAdd.getErsteller());\r\n preparedStatement.setString(5, anzeigeToAdd.getStatus());\r\n System.out.println(anzeigeToAdd.getTitel()+ anzeigeToAdd.getText()+ BigDecimal.valueOf(anzeigeToAdd.getPreis())\r\n + anzeigeToAdd.getErsteller()+ anzeigeToAdd.getErsteller()+ anzeigeToAdd.getStatus());\r\n preparedStatement.executeUpdate();\r\n \r\n \r\n }\r\n catch (SQLException e) {\r\n throw new StoreException(e);\r\n }\r\n }", "@Override\r\n\tpublic void insert(Object obj) throws DAOException {\n\t\tOfferta offerta;\r\n\t\ttry {\r\n\t\t\tofferta = (Offerta) obj;\r\n\r\n\t\t\tconn = getConnection(usr, pass);\r\n\r\n\t\t\tps = conn.prepareStatement(insertQuery);\r\n\r\n\t\t\tSystem.out.println(\"Inserimento dell'offerta nel db.\");\r\n\t\t\tofferta.print();\r\n\r\n\t\t\tps.setInt(1, offerta.getIdOfferta());\r\n\t\t\tps.setInt(2, offerta.getIdTratta());\r\n\t\t\tps.setInt(3, offerta.getData().getGiorno());\r\n\t\t\tps.setInt(4, offerta.getData().getMese());\r\n\t\t\tps.setInt(5, offerta.getData().getAnno());\r\n\t\t\tps.setInt(6, offerta.getOraPartenza().getOra());\r\n\t\t\tps.setInt(7, offerta.getOraPartenza().getMinuti());\r\n\t\t\tps.setInt(8, offerta.getOraArrivo().getOra());\r\n\t\t\tps.setInt(9, offerta.getOraArrivo().getMinuti());\r\n\t\t\tps.setInt(10, offerta.getPosti());\r\n\t\t\tps.setInt(11, offerta.getDataInserimento().getGiorno());\r\n\t\t\tps.setInt(12, offerta.getDataInserimento().getMese());\r\n\t\t\tps.setInt(13, offerta.getDataInserimento().getAnno());\r\n\r\n\t\t\tps.executeUpdate();\r\n\r\n\t\t} catch (ClassCastException e) {\r\n\t\t\tthrow new DAOException(\"Errore in insert ClassCastException.\");\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new DAOException(\"Errore in insert SQLException.\");\r\n\t\t}\r\n\r\n\t}", "@Override\n public void insert(J34SiscomexPaises j34SiscomexPaises) {\n super.doInsert(j34SiscomexPaises);\n }", "private void insertar() {\n String nombre = edtNombre.getText().toString();\n String telefono = edtTelefono.getText().toString();\n String correo = edtCorreo.getText().toString();\n // Validaciones\n if (!esNombreValido(nombre)) {\n TextInputLayout mascaraCampoNombre = (TextInputLayout) findViewById(R.id.mcr_edt_nombre_empresa);\n mascaraCampoNombre.setError(\"Este campo no puede quedar vacío\");\n } else {\n mostrarProgreso(true);\n String[] columnasFiltro = {Configuracion.COLUMNA_EMPRESA_NOMBRE, Configuracion.COLUMNA_EMPRESA_TELEFONO\n , Configuracion.COLUMNA_EMPRESA_CORREO, Configuracion.COLUMNA_EMPRESA_STATUS};\n String[] valorFiltro = {nombre, telefono, correo, estado};\n Log.v(\"AGET-ESTADO\", \"ENVIADO: \" + estado);\n resultado = new ObtencionDeResultadoBcst(this, Configuracion.INTENT_EMPRESA_CLIENTE, columnasFiltro, valorFiltro, tabla, null, false);\n if (ID.isEmpty()) {\n resultado.execute(Configuracion.PETICION_EMPRESA_REGISTRO, tipoPeticion);\n } else {\n resultado.execute(Configuracion.PETICION_EMPRESA_MODIFICAR_ELIMINAR + ID, tipoPeticion);\n }\n }\n }", "public void databaseinsert() {\n\n\t\tStringBuilder sb = new StringBuilder();\n\t\tSite site = new Site(Sid.getText().toString().trim(), Scou.getText().toString().trim());\n\t\tlong rowId = dbHlp.insertDB(site);\n\t\tif (rowId != -1) {\n\t\t\tsb.append(getString(R.string.insert_success));\n\n\t\t} else {\n\n\t\t\tsb.append(getString(R.string.insert_fail));\n\t\t}\n\t\tToast.makeText(Stu_state.this, sb, Toast.LENGTH_SHORT).show();\n\t}", "int insert(Tour record);", "int insert(TblMotherSon record);", "@Override\n\tpublic void insertProcess() {\n\t\t\n\t}", "public boolean Insert(String tipo, String lugar, String accion, String responsable, String vencimiento,String spinnerRiesgoSeleccion,\n String spinnerSectorSeleccion, String estado, String condicionInsegura, String usuario, String imagen, String site,\n String fecha, String Lider_recorrida, String Participantes, String Categoria){\n\n SQLiteDatabase BaseDeDatos=this.getWritableDatabase();\n ContentValues values=new ContentValues();\n\n if(tipo==\"Reporte de condiciones inseguras UAC\"){\n tipo = \"UAC\";\n }else if(tipo == \"Auditoria de primera parte\"){\n tipo = \"Auditoria\";\n }else {\n tipo = \"EHSS\";\n }\n values.put(\"tipo\", tipo);\n values.put(\"site\", site);\n values.put(\"fecha\", fecha);\n String fh = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").format(new Date());\n values.put(\"fechaHoraCreacion\", fh);\n values.put(\"sector\",spinnerSectorSeleccion);\n values.put(\"lugar\", lugar);\n values.put(\"accion\", accion);\n values.put(\"responsable\", responsable);\n values.put(\"vencimiento\", vencimiento);\n values.put(\"riesgo\",spinnerRiesgoSeleccion);\n values.put(\"estado\",estado );\n values.put(\"condicionInsegura\", condicionInsegura);\n values.put(\"usuarioCreacion\",usuario);\n values.put(\"imagenUAC\",imagen);\n values.put(\"Lider_recorrida\",Lider_recorrida);\n values.put(\"Participantes\",Participantes);\n values.put(\"Categoria\",Categoria);\n values.put(\"syncro\", 0);\n\n boolean resultado=BaseDeDatos.insert(\"uac\",null,values)>0;\n BaseDeDatos.close();\n return resultado;\n }", "void insertSelective(CTipoComprobante record) throws SQLException;", "@Override\n\tpublic String insertStatement() throws Exception {\n\t\treturn null;\n\t}", "int insertSelective(Tourst record);", "public void insert() throws LRException\n\t{\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\tgetBackground();\n\t\ttry { myData.record.save(background.getClient()); }\n\t\tcatch (LDBException e) { setStatus(e); }\n\t}", "@Override\r\n\tpublic Usuario insert(Usuario t) {\n\t\treturn null;\r\n\t}", "@Override\r\n public boolean insert(Anggota anggota) {\r\n// boolean flag = false;\r\n// try {\r\n//\r\n// CallableStatement cs = connection.prepareCall(\"{ CALL insAngs(?,?) }\");\r\n// cs.setString(1, angsuranPinjam.getKdAngsuran());\r\n// cs.setString(2, angsuranPinjam.getKdAnggotaP());\r\n// cs.executeUpdate();\r\n// flag = true;\r\n// } catch (SQLException ex) {\r\n// Logger.getLogger(AnggotaDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n//\r\n// }\r\n//\r\n// return flag;\r\n\r\n boolean flag = false;\r\n try {\r\n CallableStatement cs = connection.prepareCall(\"{ CALL getAutoKDAgt(?,?,?) }\");\r\n cs.setString(1, anggota.getNmAnggota());\r\n cs.setString(2, anggota.getTelepon());\r\n cs.setString(3, anggota.getAlamat());\r\n cs.executeUpdate();\r\n flag = true;\r\n } catch (SQLException ex) {\r\n Logger.getLogger(AnggotaDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return flag;\r\n }", "@Override\n\tpublic void insertUserAndShopData() {\n\t\t\n\t}", "public TipologiaStrutturaPk insert(TipologiaStruttura dto) throws TipologiaStrutturaDaoException;", "int insertSelective(Tipologia record);", "@Override\r\n\tpublic void insert(BbsDto dto) {\n\t}", "public static void inserttea() {\n\t\ttry {\n\t\t\tps = conn.prepareStatement(\"insert into teacher values ('\"+teaid+\"','\"+teaname+\"','\"+teabirth+\"','\"+protitle+\"','\"+cno+\"')\");\n\t\t\tSystem.out.println(\"cno:\"+cno);\n\t\t\tps.executeUpdate();\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"教师记录添加成功!\", \"提示消息\", JOptionPane.INFORMATION_MESSAGE);\n\t\t}catch (Exception e){\n\t\t\t// TODO Auto-generated catch block\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"数据添加异常!\", \"提示消息\", JOptionPane.ERROR_MESSAGE);\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void insert(BnesBrowsingHis record) throws SQLException;", "int insert(TBBearPer record);", "int insert(Forumpost record);", "@Override\n\t\tpublic void insertar() {\n\t\t\tutilitario.getTablaisFocus().insertar();\n\n\t\t}", "public void insert(Doacao doacao) {\n SQLiteDatabase sqLiteDatabase = getWritableDatabase();\n\n //Abrindo o mapeamento dos dados para o insert\n ContentValues dados = new ContentValues();\n\n dados.put(\"id_participa_campanha\",doacao.getId_participa_campanha());\n dados.put(\"id_recurso\",doacao.getId_recurso());\n dados.put(\"data\",doacao.getData());\n dados.put(\"quantidade\",doacao.getQuantidade());\n\n\n sqLiteDatabase.insert(\"doacao\",null, dados);\n\n }", "public RutaPk insert(Ruta dto) throws RutaDaoException;", "void insert(Disproduct record);", "int insert(ActivityHongbaoPrize record);", "int insert(ParUsuarios record);", "@Override\n\tpublic void insert(DhtmlxGridForm f) throws Exception {\n\t\t\n\t}", "public void guardar() {\n try {\n objConec.conectar();\n objConec.Sql = objConec.con.prepareStatement(\"insert into contacto values(null,?,?,?,?,?)\");\n objConec.Sql.setString(1, getNom_con());\n objConec.Sql.setInt(2, getTel_con()); \n objConec.Sql.setString(3, getEma_con());\n objConec.Sql.setString(4, getAsu_con());\n objConec.Sql.setString(5, getMen_con());\n objConec.Sql.executeUpdate();\n objConec.cerrar();\n JOptionPane.showMessageDialog(null, \"Mensaje enviado correctamente\");\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, \"Error al enviar el mensaje\");\n\n }\n\n }", "@Override\r\n\tpublic int inserta(ReservaBean bean) throws Exception {\n\t\treturn 0;\r\n\t}", "private void save() {\n if (String.valueOf(tgl_pengobatanField.getText()).equals(null)\n || String.valueOf(waktu_pengobatanField.getText()).equals(null) ) {\n Toast.makeText(getApplicationContext(),\n \"Ada Yang Belum Terisi\", Toast.LENGTH_SHORT).show();\n } else {\n SQLite.insert(nama_pasien2,\n nama_dokter2,\n tgl_pengobatanField.getText().toString().trim(),\n waktu_pengobatanField.getText().toString(),\n keluhan_pasienField.getText().toString().trim(),\n hasil_diagnosaField.getText().toString().trim(),\n biayaField.getText().toString().trim());\n blank();\n finish();\n }\n }", "public void insertFeriadoZona(FeriadoZona feriadoZona, Usuario usuario);", "@Override\n\tpublic void insert(Categoria cat) throws SQLException {\n\t\t\n\t}", "public boolean insertar(vpoliza dts) {\r\n sSql = \"INSERT INTO poliza\\n\"\r\n + \"(monto_total,fecha_inicio, fecha_venc, cliente_vehiculo_chapaId) \\n\"\r\n + \"VALUES\\n\"\r\n + \"(?,?,?,?);\";\r\n try {\r\n PreparedStatement pst = cn.prepareStatement(sSql);\r\n /*Se crea un objeto pst del tipo PreparedStatement (prepara la consulta sql)\r\n para insertar los datos en la base de datos mediante insert into*/\r\n pst.setInt(1, dts.getMonto_total());\r\n pst.setDate(2, dts.getFecha_inicio());\r\n pst.setDate(3, dts.getFecha_venc());\r\n \r\n pst.setString(4, dts.getCliente_vehiculo_chapaId());\r\n \r\n int n = pst.executeUpdate();\r\n \r\n if (n != 0) {\r\n return true;\r\n }\r\n return false;\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n JOptionPane.showMessageDialog(null, \"LO SENTIMOS HA OCURRIDO UN ERROR >> \" + ex + \" <<\");\r\n return false;\r\n }\r\n }", "int insert(AdminTab record);", "public StavkaFaktureInsert() {\n initComponents();\n CBFakture();\n CBProizvod();\n }" ]
[ "0.75772876", "0.736492", "0.736483", "0.73059374", "0.728466", "0.7182213", "0.71770793", "0.71646035", "0.7133021", "0.7119074", "0.7106845", "0.7104655", "0.7031732", "0.6998606", "0.6992108", "0.6986366", "0.69261897", "0.6923318", "0.68978393", "0.6859692", "0.6845443", "0.6837394", "0.68324816", "0.68281114", "0.68145865", "0.68140185", "0.6784616", "0.6771434", "0.67612475", "0.67594206", "0.6756181", "0.675512", "0.67486775", "0.6719085", "0.6718672", "0.6715048", "0.6686728", "0.6685414", "0.66848063", "0.6677828", "0.6676388", "0.6669507", "0.6668466", "0.6665143", "0.6660298", "0.6658991", "0.66582096", "0.66469324", "0.66401535", "0.66390854", "0.6636302", "0.66352415", "0.66290903", "0.66062605", "0.6606162", "0.66012317", "0.6600516", "0.65942144", "0.6587045", "0.6583914", "0.65737903", "0.65719694", "0.6571601", "0.65689236", "0.6567984", "0.6564389", "0.65600014", "0.6558669", "0.6552338", "0.6547849", "0.6541619", "0.65276664", "0.65274245", "0.65233576", "0.6518521", "0.65168154", "0.6513464", "0.65119326", "0.6507042", "0.65022874", "0.6500342", "0.6497049", "0.6495306", "0.6487531", "0.6486959", "0.64803165", "0.6477355", "0.6470778", "0.6464894", "0.6462346", "0.6460662", "0.6455134", "0.64456856", "0.6443356", "0.6443118", "0.643946", "0.64381635", "0.64345396", "0.64340574", "0.6424554" ]
0.67072207
36
Deze methode zorgt ervoor dat de select wordt uitgevoerd om alle beheerders te selecteren.
@Override public List<Beheerder> select() { ArrayList<Beheerder> beheerders = new ArrayList<>(); Connection connection = createConnection(); try { PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM gebruiker ORDER BY id;"); ResultSet resultSet = preparedStatement.executeQuery(); beheerders = fillListFromResultSet(resultSet, beheerders); } catch (SQLException e) { e.printStackTrace(); } closeConnection(connection); return beheerders; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setSelectedWord() {\n for (TableRow row: rows) {\n Drawable background = row.getBackground();\n if (background instanceof ColorDrawable) {\n int backColor = ((ColorDrawable) background).getColor();\n if (backColor == rowSelectColor) {\n final TextView descriptionView = (TextView) row.findViewById(R.id.wordDescription);\n final TextView glossView1 = (TextView) row.findViewById(R.id.wordGloss1);\n if (descriptionView != null) selectedWords = descriptionView.getText().toString();\n if (glossView1 != null) selectedSynset = glossView1.getText().toString();\n }\n }\n }\n }", "@Override\r\n\t\t\tpublic void seleccionar() {\n\r\n\t\t\t}", "String getSelect();", "String getSelect();", "@Override\n protected void processSelect() {\n \n }", "private void setUpSelect(){\n\t\tEPFuncion fun = new EPFuncion();\n\t\tEPPropiedad pro = new EPPropiedad();\n\t\tArrayList<EPExpresion> exps = new ArrayList<>();\n\t\t//seteamos la propiedad de la funcion.\n\t\tpro.setNombre(\"a1.p1\");\n\t\tpro.setPseudonombre(\"\");\n\t\t//metemos la propiedad en la funcion.\n\t\texps.add(pro);\n\t\tfun.setExpresiones(exps);\n\t\t//seteamos la funcion con el resto de valores.\n\t\tfun.setNombreFuncion(\"f1\");\n\t\tfun.setPseudonombre(\"fun1\");\n\t\t//metemos la funcion en la lista del select.\n\t\texpresionesSelect.add(fun);\n\t\t//seteamos el resto de propiedades.\n\t\tpro = new EPPropiedad();\n\t\tpro.setNombre(\"a1.p2\");\n\t\tpro.setPseudonombre(\"pro2\");\n\t\texpresionesSelect.add(pro);\n\t\tpro = new EPPropiedad();\n\t\tpro.setNombre(\"a1.p3\");\n\t\tpro.setPseudonombre(\"pro3\");\n\t\texpresionesSelect.add(pro);\n\t}", "public void selectVenue() {\n\t\t\r\n\t}", "void defSelect(Variable var){\r\n \t//if (isSelectAll()){\r\n \t\taddSelect(var);\r\n \t//}\r\n }", "private void select() {\n\t\tif (selected.equals(mealSelect) && !eating) {\n\t\t\tmakeMeal();\n\t\t} else if (selected.equals(snackSelect) && !eating) {\n\t\t\tmakeSnack();\n\t\t} else if (selected.equals(medicineSelect) && !eating){\n\t\t\tmakeMedicine();\n\t\t} else if (selected.equals(playSelect) && !eating){\n\t\t\tmakePlay();\n\t\t}\n\t\t\n\t}", "private void allWordsListMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_allWordsListMouseClicked\n \n String selectedWord = this.getAllWordsList().getSelectedValue();\n char firstLetterOfWord = selectedWord.charAt(0);\n \n // find the index of the corresponding tree tot he first letter of the word\n int index = -1;\n for(int i = 0 ; i < lexiNodeTrees.size() ; i++)\n {\n if(lexiNodeTrees.get(i).getCurrentCharacter() == firstLetterOfWord)\n {\n index = i;\n i = lexiNodeTrees.size();\n }\n }\n \n // find the word in the tree\n WordDefinition wordQuery = lexiNodeTrees.get(index).searchWord(selectedWord, true).get(0);\n \n // update definition field\n this.getDefinitionTextArea().setText(wordQuery.getDefinition());\n \n // display the word in the search field as well\n this.getSearchField().setText(selectedWord);\n \n // get search suggestion too\n searchWord();\n \n // select the same word in the search suggestion list \n ListModel<String> modelList = getSearchSuggestionList().getModel();\n \n for(int i = 0 ; i < modelList.getSize() ; i++)\n {\n if(modelList.getElementAt(i).equals(selectedWord))\n {\n getSearchSuggestionList().setSelectedIndex(i);\n i = modelList.getSize();\n }\n }\n \n }", "public void select() {}", "private void llenarCombo(HTMLSelectElement combo, String tabla, String codigo, String descripcion, String condicion, String defecto, boolean dejarBlanco) {\n/* 436 */ if (dejarBlanco) {\n/* 437 */ HTMLOptionElement op = (HTMLOptionElement)this.pagHTML.createElement(\"option\");\n/* 438 */ op.setValue(\"\");\n/* 439 */ op.appendChild(this.pagHTML.createTextNode(\"\"));\n/* 440 */ combo.appendChild(op);\n/* */ } \n/* 442 */ TGeneralDAO rsTGen = new TGeneralDAO();\n/* 443 */ Collection<TGeneralDTO> arr = rsTGen.cargarTabla(tabla, codigo, descripcion, condicion);\n/* 444 */ rsTGen.close();\n/* 445 */ Iterator<TGeneralDTO> iterator = arr.iterator();\n/* 446 */ while (iterator.hasNext()) {\n/* 447 */ TGeneralDTO regGeneral = (TGeneralDTO)iterator.next();\n/* 448 */ HTMLOptionElement op = (HTMLOptionElement)this.pagHTML.createElement(\"option\");\n/* 449 */ op.setValue(\"\" + regGeneral.getCodigoS());\n/* 450 */ op.appendChild(this.pagHTML.createTextNode(regGeneral.getDescripcion()));\n/* 451 */ if (defecto != null && defecto.equals(regGeneral.getCodigoS())) {\n/* 452 */ Attr escogida = this.pagHTML.createAttribute(\"selected\");\n/* 453 */ escogida.setValue(\"on\");\n/* 454 */ op.setAttributeNode(escogida);\n/* */ } \n/* 456 */ combo.appendChild(op);\n/* */ } \n/* */ }", "private void comboMultivalores(HTMLSelectElement combo, String tabla, String defecto, boolean dejarBlanco) {\n/* 393 */ SisMultiValoresDAO ob = new SisMultiValoresDAO();\n/* 394 */ Collection<SisMultiValoresDTO> arr = ob.cargarTabla(tabla);\n/* 395 */ ob.close();\n/* 396 */ if (dejarBlanco) {\n/* 397 */ HTMLOptionElement op = (HTMLOptionElement)this.pagHTML.createElement(\"option\");\n/* 398 */ op.setValue(\"\");\n/* 399 */ op.appendChild(this.pagHTML.createTextNode(\"\"));\n/* 400 */ combo.appendChild(op);\n/* */ } \n/* 402 */ Iterator<SisMultiValoresDTO> iterator = arr.iterator();\n/* 403 */ while (iterator.hasNext()) {\n/* 404 */ SisMultiValoresDTO reg = (SisMultiValoresDTO)iterator.next();\n/* 405 */ HTMLOptionElement op = (HTMLOptionElement)this.pagHTML.createElement(\"option\");\n/* 406 */ op.setValue(\"\" + reg.getCodigo());\n/* 407 */ op.appendChild(this.pagHTML.createTextNode(reg.getDescripcion()));\n/* 408 */ if (defecto.equals(reg.getCodigo())) {\n/* 409 */ Attr escogida = this.pagHTML.createAttribute(\"selected\");\n/* 410 */ escogida.setValue(\"on\");\n/* 411 */ op.setAttributeNode(escogida);\n/* */ } \n/* 413 */ combo.appendChild(op);\n/* */ } \n/* 415 */ arr.clear();\n/* */ }", "public void searchFilter(){\n\t\t\n\t\tdriver.findElement(By.xpath(\"//div[@class='_3uDYxP']//select[@class='_2YxCDZ']\")).click();\n\t\tSystem.out.println(\"drop-downselected\");\n\t}", "private void ComboUserActionPerformed(java.awt.event.ActionEvent evt) {\n if(ComboUser.getSelectedItem().equals(\"title\")){\n \n selected=1;\n }\n else if(ComboUser.getSelectedItem().equals(\"author\"))\n {\n selected=2;\n }\n else if(ComboUser.getSelectedItem().equals(\"subject\"))\n {\n selected=3;\n }\n }", "public void llenarComboSeccion() {\t\t\n\t\tString respuesta = negocio.llenarComboSeccion(\"\");\n\t\tSystem.out.println(respuesta);\t\t\n\t}", "@Override\r\n\tpublic void seleccionarPersona() {\n\t\t\r\n\t}", "protected void onSelect() {\n\n }", "public void select();", "public void selectAllAccessibleSelection() {\n // To be fully implemented in a future release\n }", "void hienThi() {\n LoaiVT.Open();\n ArrayList<LoaiVT> DSSP = LoaiVT.DSLOAIVT;\n VatTu PX = VatTu.getPX();\n \n try {\n txtMaVT.setText(PX.getMaVT());\n txtTenVT.setText(PX.getTenVT());\n txtDonVi.setText(PX.getDVT());\n DefaultComboBoxModel cb = new DefaultComboBoxModel();\n for(LoaiVT SP: DSSP){ \n cb.addElement(SP.getMaLoai());\n if(SP.getMaLoai().equals(PX.getMaLoai())){\n cb.setSelectedItem(SP.getMaLoai());\n }\n }\n cbMaloai.setModel(cb);\n } catch (Exception ex) {\n txtMaVT.setText(\"\");\n txtTenVT.setText(\"\");\n txtDonVi.setText(\"\");\n DefaultComboBoxModel cb = new DefaultComboBoxModel();\n cb.setSelectedItem(\"\");\n cbMaloai.setModel(cb);\n }\n \n \n }", "@SuppressWarnings(\"unchecked\")\n\tpublic void onSelectFeatures(ControllerEvent event) throws IOException {\n\n\t\t// Selecteren segment\n\t\t// if (object.getProbleem() != null\n\t\t// && object.getProbleem() instanceof NetwerkAnderProbleem) {\n\t\t//\n\t\t// String layerId = (String) event.getParams().get(\"layerId\");\n\t\t// FeatureMapLayer layer = (FeatureMapLayer) getViewer().getContext()\n\t\t// .getLayer(layerId);\n\t\t//\n\t\t// if (layer.getSelection().size() == 1) {\n\t\t// object.setTraject(new ResourceKey(\"Traject\", layer\n\t\t// .getSelection().get(0)));\n\t\t//\n\t\t// } else {\n\t\t// messages.error(\"Gelieve precies 1 segment te selecteren.\");\n\t\t// layer.setSelection(new ArrayList<String>(1));\n\t\t// }\n\t\t// }\n\n\t\t// Selecteren bord\n\t\tif (object.getProbleem() != null\n\t\t\t\t&& object.getProbleem() instanceof BordProbleem) {\n\n\t\t\tList<String> ids = (List<String>) event.getParams().get(\n\t\t\t\t\t\"featureIds\");\n\n\t\t\tString layerId = (String) event.getParams().get(\"layerId\");\n\t\t\tFeatureMapLayer layer = (FeatureMapLayer) getViewer().getContext()\n\t\t\t\t\t.getLayer(layerId);\n\n\t\t\t// Workaround om te vermijden dat niet zichtbare borden geselecteerd\n\t\t\t// worden\n\t\t\t// Enkel de Borden behorende tot de bewegwijzering van het Traject\n\t\t\t// mogen geselecteerd\n\t\t\t// worden.\n\t\t\tList<String> idsFiltered = new ArrayList<String>();\n\t\t\tfor (Bord b : selectableBorden) {\n\t\t\t\tif (ids.contains(b.getId().toString())) {\n\t\t\t\t\tidsFiltered.add(b.getId().toString());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (idsFiltered.isEmpty()) {\n\t\t\t\tlayer.setSelection(new ArrayList<String>(1));\n\t\t\t}\n\n\t\t\telse if (idsFiltered.size() == 1) {\n\t\t\t\tlayer.setSelection(idsFiltered);\n\n\t\t\t\t((BordProbleem) object.getProbleem()).setBord(new ResourceKey(\n\t\t\t\t\t\t\"Bord\", idsFiltered.get(0)));\n\n\t\t\t\tBord selectedBord = (Bord) modelRepository\n\t\t\t\t\t\t.loadObject(new ResourceKey(\"Bord\", idsFiltered.get(0)));\n\n\t\t\t\t// Zoek traject dat bij routebord hoort\n\t\t\t\tif (selectedBord instanceof RouteBord) {\n\t\t\t\t\tobject.setTraject(((RouteBord) selectedBord).getRoute());\n\t\t\t\t}\n\n\t\t\t\t// Zoek segment dat bij NetwerkBord hoort\n\t\t\t\telse if (selectedBord instanceof NetwerkBord) {\n\t\t\t\t\tobject.setTraject(((NetwerkBord) selectedBord)\n\t\t\t\t\t\t\t.getSegmenten().get(0));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tmessages.warn(\"Er bevinden zich meerdere borden op deze locatie. Gelieve in dit geval de 'Tonen informatie' knop te gebruiken om uw selectie te verfijnen.\");\n\t\t\t\tlayer.setSelection(new ArrayList<String>(1));\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void select() {\n\t}", "public void select() {\n \t\t\tString sinput = \"\";\r\n \t\t\tOption selected = null;\r\n \t\t\tErrorLog.debug(name + \" selected.\");\r\n \t\t\t\r\n \t\t\twhile (true) {\r\n \t\t\t\tSystem.out.println(toString()); //Print menu.\r\n \t\t\t\tsinput = read(); //Get user selection.\r\n \t\t\t\tif (!sinput.equalsIgnoreCase(\"exit\")) {\r\n \t\t\t\t\tselected = options.get(sinput); //Find corresponding option.\r\n \r\n \t\t\t\t\tif (selected != null) //Sinput corresponds to an extant option.\r\n \t\t\t\t\t\tselected.select(); //Select the selected.\r\n \t\t\t\t\telse\r\n \t\t\t\t\t\tprint(sinput + \" is not a valid option\");\r\n \t\t\t\t} else\r\n \t\t\t\t\t{print(\"Returning to previous menu.\"); break;}\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tErrorLog.debug (\"Quitting \" + name + \". Sinput:\"+sinput);\r\n \t\t\t\r\n \t\t\treturn;\r\n \t\t}", "public void searchOptions()\n {\n System.out.println(\"\\n\\t\\t:::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| Select Options Below : |\");\n System.out.println(\"\\t\\t:::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| [1] Search by - Title |\");\n System.out.println(\"\\t\\t| [2] Search by - Directors |\");\n System.out.println(\"\\t\\t| [3] Back To Menu |\");\n System.out.println(\"\\t\\t=================================\");\n System.out.print(\"\\t\\t Input the option number : \"); \n }", "public void doButtonEinfuegen() {\n\t\tDialogSelectionDjinn dsd = new DialogSelectionDjinn((Frame) this.owner, \"Auswahl Tabellenspalte\",\n\t\t\t\tnew DefaultListViewComponentFactory((allts ? this.tabelle.getDiagramm().getFieldCache()\n\t\t\t\t\t\t: new Vector<Object>(Arrays.asList(this.tabelle.getColumns())))));\n\t\tif (dsd.isSelected()) {\n\t\t\tVector v = dsd.getSelection();\n\t\t\tVector values = new Vector();\n\t\t\tfor (int i = 0, len = v.size(); i < len; i++) {\n\t\t\t\tif (this.getType() == 0) {\n\t\t\t\t\tvalues.addElement(v.elementAt(i));\n\t\t\t\t} else if ((this.getType() == 1) || (this.getType() == 2)) {\n\t\t\t\t\tvalues.addElement(new ToStringContainer((TabellenspaltenModel) v.elementAt(i), this.tabelle));\n\t\t\t\t} else if (this.getType() == 3) {\n\t\t\t\t\tvalues.addElement(Archimedes.Factory.createOrderMember((TabellenspaltenModel) v.elementAt(i)));\n\t\t\t\t} else if (this.getType() == 4) {\n\t\t\t\t\tvalues.addElement(Archimedes.Factory.createSelectionMember((TabellenspaltenModel) v.elementAt(i)));\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (int i = 0, len = values.size(); i < len; i++) {\n\t\t\t\tboolean found = false;\n\t\t\t\tfor (int j = 0, lenj = this.tabellenspalten.size(); j < lenj; j++) {\n\t\t\t\t\tif (this.getType() == 0) {\n\t\t\t\t\t\tTabellenspaltenModel tsm = (TabellenspaltenModel) this.tabellenspalten.get(j);\n\t\t\t\t\t\tif (values.elementAt(i) == tsm) {\n\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if ((this.getType() == 1) || (this.getType() == 2)) {\n\t\t\t\t\t\tToStringContainer tsc = (ToStringContainer) this.tabellenspalten.get(j);\n\t\t\t\t\t\tif (((ToStringContainer) values.elementAt(i)).getTabellenspalte() == tsc) {\n\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (this.getType() == 3) {\n\t\t\t\t\t\tOrderMemberModel omm = (OrderMemberModel) this.tabellenspalten.get(j);\n\t\t\t\t\t\tif (((OrderMemberModel) values.elementAt(i)).getOrderColumn() == omm) {\n\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (this.getType() == 4) {\n\t\t\t\t\t\tSelectionMemberModel smm = (SelectionMemberModel) this.tabellenspalten.get(j);\n\t\t\t\t\t\tif (((SelectionMemberModel) values.elementAt(i)).getColumn() == smm) {\n\t\t\t\t\t\t\tfound = 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}\n\t\t\t\tif (!found) {\n\t\t\t\t\tif (this.anzeige.getSelectedRow() >= 0) {\n\t\t\t\t\t\tthis.tabellenspalten.add(this.anzeige.getSelectedRow(), values.get(i));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.tabellenspalten.add(values.get(i));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.doRepaint();\n\t\t}\n\t}", "@Override\n public void selectGolem(int id) {\n }", "public void select ();", "public void updateSelection() {\n\t\t\n\t}", "public void verSeleccionarCaracterisiticasEscalaId()\r\n\t{\r\n\t\tseleccionarcaract = new SeleccionarCaracterisiticasEscalaId(this);\r\n\t\tseleccionarcaract.setVisible(true);\r\n\t}", "private void loadToChoice() {\n\t\tfor(Genre genre : genreList) {\n\t\t\tuploadPanel.getGenreChoice().add(genre.getName());\n\t\t}\n\t}", "private void xuLyLayMaDichVu() {\n int result = tbDichVu.getSelectedRow();\n String maDV = (String) tbDichVu.getValueAt(result, 0);\n hienThiDichVuTheoMa(maDV);\n }", "@Override\r\n\tpublic void adminSelectAdd() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t\r\n\t}", "private void searchSuggestionListMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_searchSuggestionListMouseClicked\n String selectedWord = this.getSearchSuggestionList().getSelectedValue();\n \n // find the definiiton of the word\n for(int i = 0 ; i < queryResult.size() ; i++)\n {\n if(queryResult.get(i).getWord().equals(selectedWord))\n {\n String definition = queryResult.get(i).getDefinition();\n definitionTextArea.setText(definition);\n i = queryResult.size();\n }\n }\n \n // select the same word in the all word list \n ListModel<String> modelList = getAllWordsList().getModel();\n \n for(int i = 0 ; i < modelList.getSize() ; i++)\n {\n if(modelList.getElementAt(i).equals(selectedWord))\n {\n getAllWordsList().setSelectedIndex(i);\n i = modelList.getSize();\n }\n }\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 }", "public void selectOption(WebElement element,String text) {\nSelect s=new Select(element);\n//List<WebElement> options = s.getOptions();\n//WebElement webElement = options.get(index);\n//String text = webElement.getText();\ns.selectByVisibleText(text);\n\n\n}", "private void geselecteerdSymbool()\n {\n /**\n * selecteren van vak\n */\n vulKeuzeBordIn();\n GraphicsContext gc = canvasKeuzeveld[0][keuzeID].getGraphicsContext2D();\n tekenRechtHoek(gc, 0, 0, 30, 30, Color.RED);\n }", "@Override\r\n\tpublic void adminSelectUpdate() {\n\t\t\r\n\t}", "private static void DoSelection()\n\t{\n\n\t\tArrayList<Attribute> inAtts = new ArrayList<Attribute>();\n\t\tinAtts.add(new Attribute(\"Int\", \"o_orderkey\"));\n\t\tinAtts.add(new Attribute(\"Int\", \"o_custkey\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_orderstatus\"));\n\t\tinAtts.add(new Attribute(\"Float\", \"o_totalprice\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_orderdate\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_orderpriority\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_clerk\"));\n\t\tinAtts.add(new Attribute(\"Int\", \"o_shippriority\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_comment\"));\n\n\t\tArrayList<Attribute> outAtts = new ArrayList<Attribute>();\n\t\toutAtts.add(new Attribute(\"Int\", \"att1\"));\n\t\toutAtts.add(new Attribute(\"Float\", \"att2\"));\n\t\toutAtts.add(new Attribute(\"Str\", \"att3\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att4\"));\n\n\t\tString selection = \"o_orderdate > Str (\\\"1996-12-19\\\") && o_custkey < Int (100)\";\n\n\t\tHashMap<String, String> exprs = new HashMap<String, String>();\n\t\texprs.put(\"att1\", \"o_orderkey\");\n\t\texprs.put(\"att2\", \"(o_totalprice * Float (1.5)) + Int (1)\");\n\t\texprs.put(\"att3\", \"o_orderdate + Str (\\\" this is my string\\\")\");\n\t\texprs.put(\"att4\", \"o_custkey\");\n\n\t\t// run the selection operation\n\t\ttry\n\t\t{\n\t\t\tnew Selection(inAtts, outAtts, selection, exprs, \"orders.tbl\", \"out.tbl\", \"g++\", \"cppDir/\");\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "protected abstract void select();", "void selected(Collection<AppUser> appUsers, String extraText);", "public void select()\n {\n super.select();\n SwingUtilities.invokeLater(() -> _sqlPanel.getSQLEntryPanel().requestFocus());\n }", "public void widgetSelected(SelectionEvent e)\n\t\t\t{\n\t\t\t\ttranslatePhrases(getIOldSegmentPosition());\n\t\t\t\tshowAltTrans(getIOldSegmentPosition(), 0, 0);\n\t\t\t\tif (xliffEditorSegmentDictionaryViewer != null)\n\t\t\t\t{\n\t\t\t\t\txliffEditorSegmentDictionaryViewer.adaptDictionaryViewer(xliffFile, sourceLanguage, targetLanguage);\n\t\t\t\t\txliffEditorSegmentDictionaryViewer.setTerms(getPhrases(getIOldSegmentPosition()));\n\t\t\t\t}\n\t\t\t\tif (xliffEditorDictionaryViewer != null)\n\t\t\t\t{\n\t\t\t\t\txliffEditorDictionaryViewer.adaptDictionaryViewer(sourceLanguage, targetLanguage);\n\t\t\t\t}\n\t\t\t}", "private void cargaLista() {\n this.getTipoApelacionSelecionada().add(new SelectItem(\"Aclaracion\", \"Aclaracion\"));\n this.getTipoApelacionSelecionada().add(new SelectItem(\"Revision\", \"Revision\"));\n this.getTipoApelacionSelecionada().add(new SelectItem(\"Revocatoria\", \"Revocatoria\"));\n this.getTipoApelacionSelecionada().add(new SelectItem(\"Subsidiaria\", \"Subsidiaria\"));\n \n }", "private void CargarListaFincas() {\n listaFincas = controlgen.GetComboBox(\"SELECT '-1' AS ID, 'Seleccionar' AS DESCRIPCION\\n\" +\n \"UNION\\n\" +\n \"SELECT `id` AS ID, `descripcion` AS DESCRIPCION\\n\" +\n \"FROM `fincas`\\n\"+\n \"/*UNION \\n\"+\n \"SELECT 'ALL' AS ID, 'TODOS' AS DESCRIPCION*/\");\n \n Utilidades.LlenarComboBox(cbFinca, listaFincas, \"DESCRIPCION\");\n \n }", "public void widgetSelected(SelectionEvent e) {\n\t\tdoctorcombo.removeAll();\n\t\tint i = subject.getSelectionIndex();\n\t\t if(i == 0){\n\t\t\t\tint j = pdtabledaoimpl.findByname1(subject.getItem(0));\n\t\t\t\tfor (int k = 0; k < j; k++){\n\t\t\t\t\tString ss = pdtabledaoimpl.findByname2(subject.getItem(0),j,k);\n\t\t\t\t\tdoctorcombo.add(ss, k);\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t else if(i == 1){\n\t\t\t\tint j = pdtabledaoimpl.findByname1(subject.getItem(1));\n\t\t\t\tfor (int k = 0; k < j; k++){\n\t\t\t\t\tString ss = pdtabledaoimpl.findByname2(subject.getItem(1),j,k);\n\t\t\t\t\tdoctorcombo.add(ss, k);\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t else if(i == 2){\n\t\t\t\tint j = pdtabledaoimpl.findByname1(subject.getItem(2));\n\t\t\t\tfor(int k = 0; k< j; k++){\n\t\t\t\t\tString ss = pdtabledaoimpl.findByname2(subject.getItem(2),j,k);\n\t\t\t\t\tdoctorcombo.add(ss, k);\n\t\t\t\t}\n\t\t\t}\n\t\t else if(i == 3){\n\t\t\t\tint j = pdtabledaoimpl.findByname1(subject.getItem(3));\n\t\t\t\tfor(int k = 0; k< j; k++){\n\t\t\t\t\tString ss = pdtabledaoimpl.findByname2(subject.getItem(3),j,k);\n\t\t\t\t\tdoctorcombo.add(ss, k);\n\t\t\t\t}\n\t\t\t}\n\t\t else if(i == 4){\n\t\t\t\tint j = pdtabledaoimpl.findByname1(subject.getItem(4));\n\t\t\t\tfor(int k = 0; k< j; k++){\n\t\t\t\t\tString ss = pdtabledaoimpl.findByname2(subject.getItem(4),j,k);\n\t\t\t\t\tdoctorcombo.add(ss, k);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}", "@FXML\n void selectType() {\n \t//hide all errors\n \thideErrors();\n \t//get countries from /type/metadata.txt\n \t//Reset range string\n T3_startYear_ComboBox.setValue(\"\");\n T3_endYear_ComboBox.setValue(\"\");\n //update country list\n String type = T3_type_ComboBox.getValue(); // getting type\n countries.clear();\n for (String country: DatasetHandler.getCountries(type)){\n countries.add(country);\n }\n T3_country_ComboBox.setValue(\"\");\n //clearing the StartYear and EndYear values and lists\n }", "public void selectAll ()\r\n {\r\n editor.selectAll ();\r\n }", "@FXML\n public void clicaTblCidade(){\n \tCidade sel = tblCidade.getSelectionModel().getSelectedItem();\n \ttxtNome.setText(sel.getNome());\n \ttxtUf.getSelectionModel().select(sel.getUf());\n }", "@Override\n public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int position, long id) {\n spnDistrict.setAdapter(C.getArrayAdapter(\"select ZIlLAID||'-'||ZILLANAMEENG DistName from Zilla where DIVID='\" + Global.Left(spnDiv.getSelectedItem().toString(), 2) + \"'\"));// Global.Left(spnDiv.getSelectedItem().toString(),2)\n spnDistrict.setSelection(DivzillaSelect(\"zilla\"));\n\n\n }", "public void setSelection( String strSelection )\n {\n List<String> suggestionNames = getPopupSuggestions();\n for( int currentIndex = 0; currentIndex < suggestionNames.size(); currentIndex++ )\n {\n if( suggestionNames.get( currentIndex ).equals( strSelection ) )\n {\n //select the matching suggestion's index\n _list.setSelectedIndex( currentIndex );\n break;\n }\n }\n }", "private void loadlec() {\n try {\n\n ResultSet rs = DBConnection.search(\"select * from lecturers\");\n Vector vv = new Vector();\n//vv.add(\"\");\n while (rs.next()) {\n\n// vv.add(rs.getString(\"yearAndSemester\"));\n String gette = rs.getString(\"lecturerName\");\n\n vv.add(gette);\n\n }\n //\n jComboBox1.setModel(new DefaultComboBoxModel<>(vv));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Test\n\tpublic void testLecturaSelect(){\n\t\tassertEquals(esquemaEsperado.getExpresionesSelect().toString(), esquemaReal.getExpresionesSelect().toString());\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString input = ((String)comboBoxProductAuthor.getSelectedItem()).toLowerCase();\n\t\t\t\t//String input = (productAuthorTextField.getText()).toLowerCase();\t// Convert input text to lower case. \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//All names in array should be stored in lower case.\n\t\t\t\t\n\t\t\t\tif(input.trim().equals(\"select\")){ \t// If no value is selected\n\t\t\t\t\tproductTextArea.setText(\"\");\n\t\t\t\t\tproductTextArea.setCaretPosition(0);\n\t\t\t\t\tlistOfProdIds.setSelectedItem(\"Select\");\n\t\t\t\t\tlistofProductTitle.setSelectedItem(\"Select\");\t\t\t\t\t\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please Select Product Author From Drop Down Menu\");\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}else{\t\t\t\t\t\t\t// Take in String and Search for it.\n\t\t\t\t\tproductTextArea.setText(product.viewProductByAuthor(input, products));\t\n\t\t\t\t\tproductTextArea.setCaretPosition(0);\t\t// This sets the position of the scroll bar to the top of the page.\n\t\t\t\t\tlistOfProdIds.setSelectedItem(\"Select\");\n\t\t\t\t\tlistofProductTitle.setSelectedItem(\"Select\");\n\t\t\t\t\tlistOfProductAuthor.setSelectedItem(\"Select\");\n\t\t\t\t\tpriceRange.clearSelection();\n\t\t\t\t\tquantity.clearSelection();\n\t\t\t\t}\n\t\t\t}", "public String getSelectedLetters();", "@Override\r\n\t\tpublic void onIndexSelect(String str) {\n\t\t\tsearch_contact_suoyin.setVisibility(View.VISIBLE);\r\n\t\t\tsearch_contact_suoyin.setText(str);\r\n\t\t\tfor(int i = 0; i < listItems.size(); i++){\r\n\t\t\t\tif(listItems.get(i).getSuoyin().equals(str)){\r\n\t\t\t\t\tsearch_contact_listview.setSelection(i);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "@Override\n\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, \"您沒有選擇任何藍牙裝置。\", Toast.LENGTH_LONG).show();\n\t\t\t}", "public void seleccionSitio() {\r\n\t\tif (sitioId != null) {\r\n\t\t\tsitio = hashSitios.get(sitioId);\r\n\t\t\tcargarEstudiantesSitio();\r\n\t\t\tlibres = mngRes.traerLibres(getSitio().getId().getArtId());\r\n\t\t\tSystem.out.println(libres);\r\n\t\t}\r\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\t\trutaseleccionada = (String) rodadura.getSelectedItem();\r\n\r\n\t\t\t\t}", "public void setSelectMethod(Selection s){\n selectType = s;\n }", "private void ReiniciarSeleccion()\n {\n if(Estado!=TURNOENEMIGO && Estado!=HUYENDO && Estado!=FINTURNO)\n {\n if(input.isKeyPressed(Input.KEY_ESCAPE))\n {\n estadoAnterior=OPCIONESBASE;\n Estado=OPCIONESBASE;\n sonidoSelect.play(1, 0.2f);\n }/**/\n }/*if(Estado!=TURNOENEMIGO && Estado!=HUYENDO && Estado!=FINTURNO)*/\n }", "private void iniciaTela() {\n try {\n tfCod.setText(String.valueOf(reservaCliDAO.getLastId()));\n desabilitaCampos(false);\n DefaultComboBoxModel modeloComboCliente;\n modeloComboCliente = new DefaultComboBoxModel(funDAO.getAll().toArray());\n cbFunc.setModel(modeloComboCliente);\n modeloComboCliente = new DefaultComboBoxModel(quartoDAO.getAll().toArray());\n cbQuarto.setModel(modeloComboCliente);\n modeloComboCliente = new DefaultComboBoxModel(cliDAO.getAll().toArray());\n cbCliente.setModel(modeloComboCliente);\n btSelect.setEnabled(false);\n verificaCampos();\n carregaTableReserva(reservaDAO.getAll());\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void plannerDisplayComboBoxs(){\n Days dm = weekList.getSelectionModel().getSelectedItem();\n if (dm.isBreakfastSet()){\n //find Recipe set for breakfast in the Days in the comboBox and display it in the comboBox\n Recipe breakfast = findRecipeFromID(dm.getBreakfast().getId(), breakfastCombo);\n breakfastCombo.getSelectionModel().select(breakfast);\n }\n\n if (dm.isLunchSet()){\n //find Recipe set for lunch in the Days in the comboBox and display it in the comboBox\n Recipe lunch = findRecipeFromID(dm.getLunch().getId(), lunchCombo);\n lunchCombo.getSelectionModel().select(lunch);\n }\n\n if (dm.isDinnerSet()){\n //find Recipe set for dinner in the Days in the comboBox and display it in the comboBox\n Recipe dinner = findRecipeFromID(dm.getDinner().getId(), dinnerCombo);\n dinnerCombo.getSelectionModel().select(dinner);\n }\n }", "public void selectCategory() {\n\t\t\r\n\t}", "public void switchSelectAll() {\n\t\tif (mDeList.size() == mStationList.getSize()) {\n\t\t\tunSelectAll();\n\t\t} else {\n\t\t\tselectAll();\n\t\t}\n\t\tif (mOnChannelLitener != null) { \n\t\t\tmOnChannelLitener.onSelectChange(mDeList.size(), mStationList.getSize());\n\t\t}\n\t}", "@Override\r\n\tprotected Object getSelectData() {\n\t\treturn null;\r\n\t}", "public datakontrak() {\n initComponents();\n this.setLocationRelativeTo(this);\n tb_kontrak.changeSelection(0, 0, true, false);\n }", "public void selectionChanged() {\r\n int fila = menuCursos.tablaCursos.getSelectedRow();\r\n try {\r\n actual=(Cursos) rs.get(fila);\r\n if(actual.getCodigo()!=null){\r\n MostrarRegistro();\r\n menuCursos.botonCursosBorrar.setEnabled(fila != -1);\r\n menuCursos.botonCursosModificar.setEnabled(fila != -1);\r\n }\r\n } catch (Exception e) {\r\n actual = null;\r\n }\r\n }", "private void ini_SelectDB()\r\n\t{\r\n\r\n\t}", "private void loadDataDownCoponnent() {\n jtfMaSV2.setText(jtbTTSV.getValueAt(jtbTTSV.getSelectedRow(), 0).toString());\n jtfHoTen2.setText(jtbTTSV.getValueAt(jtbTTSV.getSelectedRow(), 1).toString());\n jcblop2.setSelectedItem(jtbTTSV.getValueAt(jtbTTSV.getSelectedRow(), 2).toString());\n jtfHeDaoTao2.setText(jtbTTSV.getValueAt(jtbTTSV.getSelectedRow(), 3).toString());\n jtfngaysinh2.setText(jtbTTSV.getValueAt(jtbTTSV.getSelectedRow(), 4).toString());\n // jdate.setDateFormatString(jtbTTSV.getValueAt(jtbTTSV.getSelectedRow(), 4).toString());\n jtfDiaChi2.setText(jtbTTSV.getValueAt(jtbTTSV.getSelectedRow(), 5).toString());\n jtfDienThoai2.setText(jtbTTSV.getValueAt(jtbTTSV.getSelectedRow(), 7).toString());\n String sex = jtbTTSV.getValueAt(jtbTTSV.getSelectedRow(), 6).toString();\n if (sex.equals(\"Nam\")) {\n jrbsex2.setSelected(true);\n } else {\n jrbsex2.setSelected(false);\n }\n// \n jtfMaSV2.setEnabled(false);\n }", "Select(){\n }", "private void dropBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_dropBox1ActionPerformed\n int sqlSelector = getSelections();\n sqlBuilder(sqlSelector);\n }", "public void isiPilihanDokter() {\n String[] list = new String[]{\"\"};\n pilihNamaDokter.setModel(new javax.swing.DefaultComboBoxModel(list));\n\n /*Mengambil data pilihan spesialis*/\n String nama = (String) pilihPoliTujuan.getSelectedItem();\n String kodeSpesialis = ss.serviceGetIDSpesialis(nama);\n\n /* Mencari dokter where id_spesialis = pilihSpesialis */\n tmd.setData(ds.serviceGetAllDokterByIdSpesialis(kodeSpesialis));\n int b = tmd.getRowCount();\n\n /* Menampilkan semua nama berdasrkan pilihan sebelumnya */\n pilihNamaDokter.setModel(new javax.swing.DefaultComboBoxModel(ds.serviceTampilNamaDokter(kodeSpesialis, b)));\n }", "private void hienThi() {\n try {\n if (isInsert) {\n txtMaThucAn.setText(ThucPhamController.hienMa());\n txtMaThucAn.setEnabled(false);\n hienTrangThai();\n } else {\n txtMaThucAn.setText(tp.getMathucpham());\n txtMaThucAn.setEnabled(false);\n txtTenThucAn.setText(tp.getTenthucpham());\n jSpinSoLuong.setValue(tp.getSoluong());\n String sDonGia = Integer.toString((int) tp.getDongia());\n txtDonGia.setText(sDonGia);\n hienTrangThai();\n if (tp.getTrangthai() == 1) {\n cbbTrangThai.setSelectedIndex(0);\n } else {\n cbbTrangThai.setSelectedIndex(1);\n }\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }", "private void selecionarOpcoesDeBackup() {\n try {\n if (dao.opcaoDeBackupAtual().equals(\"Não fazer Backup Automático\")) {\n rbNãofazerBackup.setSelected(true);\n }\n if (dao.opcaoDeBackupAtual().equals(\"Fazer Backup na Entrada\")) {\n rbFazerBackupnaEntrada.setSelected(true);\n }\n if (dao.opcaoDeBackupAtual().equals(\"Fazer Backup na Saída\")) {\n rbFazerBackupnaSaída.setSelected(true);\n }\n if (dao.opcaoDeBackupAtual().equals(\"Fazer Backup na Entrada e na Saída\")) {\n rbFazerBackupnaEntradaenaSaida.setSelected(true);\n }\n } catch (SQLException ex) {\n Logger.getLogger(Backup.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void openDialog(){\n if (!isAdded()) return;\n homeViewModel.getAllSets().removeObservers(getViewLifecycleOwner());\n ChooseSetDialog dialog = new ChooseSetDialog(setsTitles);\n dialog.show(getChildFragmentManager(), \"choose_set_dialog\");\n dialog.setOnSelectedListener(choice -> {\n Word word = new Word(setsObjects.get(choice).getId(), original, translation);\n homeViewModel.insertWord(word);\n original=\"\"; translation=\"\";\n etOrigWord.setText(\"\"); etTransWord.setText(\"\");\n });\n }", "private void jButtonBedrijfSelecterenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonBedrijfSelecterenActionPerformed\n\n Bedrijf geselecteerdBedrijf = (Bedrijf)this.jComboBoxGekendeBedrijven.getSelectedItem();\n if (geselecteerdBedrijf != null && geselecteerdBedrijf.getId() != null){\n this.geselecteerdeStageplaats.setBedrijfID(this.dbFacade.getBedrijfByID(geselecteerdBedrijf.getId()));\n displayBedrijf();\n }\n this.enableButtons();\n }", "private void combo() {\n cargaCombo(combo_habitacion, \"SELECT hh.descripcion\\n\" +\n \"FROM huespedes h\\n\" +\n \"LEFT JOIN estadia_huespedes eh ON eh.huespedes_id = h.id\\n\" +\n \"LEFT JOIN estadia_habitaciones ehh ON eh.id_estadia = ehh.id_estadia\\n\" +\n \"LEFT JOIN estadia e ON e.id = ehh.id_estadia \\n\" +\n \"LEFT JOIN habitaciones hh ON hh.id = ehh.id_habitacion\\n\" +\n \"WHERE eh.huespedes_id = \"+idd+\" AND e.estado ='A'\\n\" +\n \"ORDER BY descripcion\\n\" +\n \"\",\"hh.descripcion\");\n cargaCombo(combo_empleado, \"SELECT CONCAT(p.nombre, ' ',p.apellido) FROM persona p\\n\" +\n \"RIGHT JOIN empleado e ON e.persona_id = p.id\", \"empleado\");\n cargaCombo(combo_producto, \"SELECT producto FROM productos order by producto\", \"producto\");\n }", "public void iniciar_combo() {\n try {\n Connection cn = DriverManager.getConnection(mdi_Principal.BD, mdi_Principal.Usuario, mdi_Principal.Contraseña);\n PreparedStatement psttt = cn.prepareStatement(\"select nombre from proveedor \");\n ResultSet rss = psttt.executeQuery();\n\n cbox_proveedor.addItem(\"Seleccione una opción\");\n while (rss.next()) {\n cbox_proveedor.addItem(rss.getString(\"nombre\"));\n }\n \n PreparedStatement pstt = cn.prepareStatement(\"select nombre from sucursal \");\n ResultSet rs = pstt.executeQuery();\n\n \n cbox_sucursal.addItem(\"Seleccione una opción\");\n while (rs.next()) {\n cbox_sucursal.addItem(rs.getString(\"nombre\"));\n }\n \n PreparedStatement pstttt = cn.prepareStatement(\"select id_compraE from compra_encabezado \");\n ResultSet rsss = pstttt.executeQuery();\n\n \n cbox_compra.addItem(\"Seleccione una opción\");\n while (rsss.next()) {\n cbox_compra.addItem(rsss.getString(\"id_compraE\"));\n }\n \n PreparedStatement ps = cn.prepareStatement(\"select nombre_moneda from moneda \");\n ResultSet r = ps.executeQuery();\n\n \n cbox_moneda.addItem(\"Seleccione una opción\");\n while (r.next()) {\n cbox_moneda.addItem(r.getString(\"nombre_moneda\"));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n \n }", "public void select(String data, String objectName) {\n\t\n}", "void renderNameSelection() {\n //sets the right letters for buttons\n String[] names = {Character.toString(arr[0]), Character.toString(arr[1]), Character.toString(arr[2])};\n changeNames(names);\n selectedButton = menuItems[iH];\n selectedButton.buildSelecter();\n //renders the startscreen\n renderStartScreen();\n }", "public String selectList(final String object, String data) {\n\t\tlogger.debug(\"Selecting from list\");\n\t\ttry {\n\t\t\t//System.out.println(\"inside selectList---\");\n\t\t\twaitForPageLoad(driver);\n\t\t\t\n\t\t\t\n\t\t\tWebElement select = wait.until(explicitWaitForElement((By.xpath(OR.getProperty(object)))));\n\n\t\t\tList<WebElement> options = select.findElements(By.tagName(OR.getProperty(\"OPTION_TAG\").trim()));\n\t\t\tString expected = data.trim();\n\t\t\tlogger.debug(\"Expected is > \" + expected);\n\t\t\tfor (WebElement option : options) {\n\n\t\t\t\tString actual = option.getText().trim();\n\t\t\t\tlogger.debug(\"Actual > \" + actual);\n\t\t\t\tif (actual.equals(expected)) {\n\t\t\t\t\tlogger.debug(\"Selected...\" + data);\n\t\t\t\t\toption.click();\n\t\t\t\t\treturn Constants.KEYWORD_PASS + \"--\" + data + \" - selected\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(TimeoutException ex)\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + \" - Could not select from list. \" + e.getMessage();\n\t\t}\n\t\treturn Constants.KEYWORD_FAIL + \" - Could not select from list. \";\n\t}", "public abstract void select(boolean select);", "@FXML\n void selectCountry() {\n \t//hide all errors\n \thideErrors();\n \t//Getting start year and end year limits from /type/country/metadata.txt\n if (isComboBoxEmpty(T3_country_ComboBox.getValue())){\n //if nothing has been selected do nothing\n return;\n }\n String type = T3_type_ComboBox.getValue(); // getting type\n String country = T3_country_ComboBox.getValue(); // getting country\n //update ranges\n Pair<String,String> validRange = DatasetHandler.getValidRange(type,country);\n\n //update relevant menus\n\n int start = Integer.parseInt(validRange.getKey());\n int end = Integer.parseInt(validRange.getValue());\n //set up end list\n endOptions.clear();\n startOptions.clear();\n for (int i = start; i <= end ; ++i){\n endOptions.add(Integer.toString(i));\n startOptions.add(Integer.toString(i));\n }\n //set up comboBox default values and valid lists\n T3_startYear_ComboBox.setValue(Integer.toString(start));\n T3_endYear_ComboBox.setValue(Integer.toString(end));\n }", "private void selectMenu()\n\t{\n\t\t//clear the panel first\n\t\tclearPanel(getPanel1());\n\t\t\n\t\tJLabel label1=new JLabel(\"Select two rows to inspect data:\");\n\t\t\n\t\t//set up panel\n\t\tgetPanel1().setLayout(null);\n\t\tadd(getPanel1(),BorderLayout.CENTER);\n\t\t\n\t\t//add buttons to panel\n\t\tgetPanel1().add(getButton1());\n\t\tgetPanel1().add(getTopics1());\n\t\tgetPanel1().add(getTopics2());\n\t\tgetPanel1().add(label1);\n\t\t\n\t\t\n\t\t//manually set their position\n\t\tlabel1.setBounds(380,10,400,40);\n\t\tgetButton1().setBounds(430,350,230,60);\n\t\tgetTopics1().setBounds(430,80,230,60);\n\t\tgetTopics2().setBounds(430,215,230,60);\n\n\t\tlabel1.setFont(new Font(\"Serif\", Font.CENTER_BASELINE, 24));\t\n\t}", "private void defaultSelectedFilterOption() {\n activeSelectBtn.setChecked(true);\n upcomingSelectBtn.setChecked(true);\n inProgressSelctBtn.setChecked(true);\n yettoJoinSelctBtn.setChecked(true);\n bookmarkedSelctBtn.setChecked(false);\n category1SelectBtn.setChecked(true);\n category2SelectBtn.setChecked(true);\n category3SelectBtn.setChecked(true);\n category4SelectBtn.setChecked(true);\n category5SelectBtn.setChecked(true);\n category6SelectBtn.setChecked(true);\n category7SelectBtn.setChecked(true);\n category8SelectBtn.setChecked(true);\n category9SelectBtn.setChecked(true);\n category10SelectBtn.setChecked(true);\n }", "SelectAlternative getSelectAlternative();", "public void FuncionarioSelecionado(SelectEvent event) {\n\n\t\tFuncionario m1 = (Funcionario) event.getObject();\n\t\tthis.funcionarioselect = m1;\n\n\t}", "public Select getSelect()\n {\n return select;\n }", "private void verarbeiteInWarenkorbKlick() {\n\n\t\tString titel = text2.getText();\n\t\tString anzahlString = text1.getText();\n\t\tint menge = Integer.parseInt(anzahlString);\n\n\t\tList<Artikel> liste1 = shop.sucheArtikelBezeichnung(titel);\n\n\t\ttry {\n\t\t\ttry {\n\t\t\t\tshop.warenHinzufügen(liste1.get(0), kunde, menge);\n\t\t\t} catch (ArtikelBestandReichtNichtAusException e) {\n\t\t\t\t// TODO Automatisch generierter Erfassungsblock\n\t\t\t\tJOptionPane.showMessageDialog(null, e.getMessage());\n\t\t\t}\n\t\t} catch (MassengutartikelException e1) {\n\n\t\t\tJOptionPane.showMessageDialog(null, e1.getMessage());\n\t\t}\n\t\ttry {\n\t\t\tshop.schreibeArtikel();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Automatisch generierter Erfassungsblock\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void ViagemSelecionado(SelectEvent event) {\n\n\t\tViagem m1 = (Viagem) event.getObject();\n\t\tthis.viagem = m1;\n\n\t}", "public void updateSelection()\n {\n \trectForSelection.setRect(rettangoloX,rettangoloY,larghezza,altezza);\n \trectSelTopLeft.setRect(rettangoloX-3,rettangoloY-3,6,6);\n \trectSelBottomLeft.setRect(rettangoloX-3,rettangoloY+altezza-3,6,6);\n \trectSelTopRight.setRect(rettangoloX+larghezza-3,rettangoloY-3,6,6);\n \trectSelBottomRight.setRect(rettangoloX+larghezza-3,rettangoloY+altezza-3,6,6);\n }", "Select createSelect();", "public HashMap<String, String> getAllSelect() {\n\t\treturn danTocDAO.getAllSelectLoad();\n\t}", "@Override\n\tpublic List selectList() {\n\t\t\n\t\t\n\t\t\n\t\treturn null;\n\t}", "public String button1_action() {\n getSessionBean1().setSelected_algos(listbox1.getValueAsStringArray(this.getContext()));\n getSessionBean1().setSelected_tiers(listbox2.getValueAsStringArray(this.getContext()));\n getSessionBean1().setSelected_runs(listbox3.getValueAsStringArray(this.getContext()));\n getSessionBean1().setSelected_storageelems(listbox4.getValueAsStringArray(this.getContext()));\n //getSessionBean1().setSelected_branches(listbox5.getValueAsStringArray(this.getContext()));\n \n //String selected_primary = (String)dropDown1.getSelected().toString();\n //log(\"Selected Primary is\"+selected_primary);\n \n if ( dropDown1.getSelected() != null ||\n getSessionBean1().getSelected_algos().length !=0 || \n getSessionBean1().getSelected_tiers().length !=0 ||\n getSessionBean1().getSelected_runs().length != 0 ||\n getSessionBean1().getSelected_storageelems().length !=0 \n //getSessionBean1().getSelected_branches().length !=0\n ) {\n getSessionBean1().setItems_selected(\"1\");\n }\n return null;\n }", "public void selectTDList(ActionEvent actionEvent) {\n // we will have to update the viewer so that it is displaying the list that was just selected\n // it will go something like...\n // grab the list that was clicked by the button (again, using the relationship between buttons and lists)\n // and then displayTODOs(list)\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n et_search.setText(\"\");\n et_search.setEnabled(true);\n if(position==0){\n search_column=\"file_nm\";\n }else if(position==1){\n search_column=\"title\";\n }else{\n\n }\n }", "public void selectAll() {\n setSelectedFurniture(this.home.getFurniture());\n }", "public void selectDeal() {\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tLoaitietkiem ltk = (Loaitietkiem)comboBox.getSelectedItem();\n\t\t\t\tltkChoose = ltk;\n\t\t\t}" ]
[ "0.6496394", "0.6385831", "0.63821125", "0.63821125", "0.63790196", "0.6238351", "0.61928844", "0.617631", "0.6082528", "0.6052752", "0.60086143", "0.60024387", "0.5994916", "0.5988264", "0.5919311", "0.59100324", "0.5901339", "0.59013146", "0.589467", "0.58870715", "0.5882549", "0.5874244", "0.5855892", "0.5849021", "0.58479387", "0.58382434", "0.5836339", "0.58316505", "0.5808239", "0.5791436", "0.5774651", "0.5773281", "0.57730466", "0.5755241", "0.573511", "0.5706515", "0.570575", "0.5694946", "0.56829756", "0.56802773", "0.5679475", "0.56714094", "0.5669329", "0.566889", "0.56630886", "0.5660055", "0.5650092", "0.5642301", "0.5626998", "0.56205785", "0.56187326", "0.56043315", "0.5596867", "0.5576509", "0.55737436", "0.5569969", "0.55656934", "0.5560994", "0.5548863", "0.5541042", "0.55299234", "0.55285156", "0.55268216", "0.55261916", "0.5524491", "0.5522399", "0.5522223", "0.5520992", "0.55184865", "0.55163616", "0.55161524", "0.55155236", "0.55055404", "0.55045676", "0.5500431", "0.5498905", "0.5492154", "0.5485491", "0.5483841", "0.5481576", "0.5480335", "0.5476757", "0.54663473", "0.5464245", "0.54601735", "0.5459418", "0.5453809", "0.54478705", "0.54462105", "0.5444296", "0.54357827", "0.5425894", "0.54249084", "0.54238945", "0.541994", "0.54187644", "0.54147625", "0.5412204", "0.5409416", "0.5406063", "0.54044133" ]
0.0
-1
Deze methode zorgt ervoor dat alle beheerders wordt geselecteerd die actief zijn.
public List<Beheerder> selectActive(){ ArrayList<Beheerder> beheerders = new ArrayList<>(); Connection connection = createConnection(); try { PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM gebruiker WHERE isactief = true ORDER BY id;"); ResultSet resultSet = preparedStatement.executeQuery(); beheerders = fillListFromResultSet(resultSet, beheerders); } catch (SQLException e) { e.printStackTrace(); } closeConnection(connection); return beheerders; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\t\tpublic void seleccionar() {\n\r\n\t\t\t}", "@Override\n protected void processSelect() {\n \n }", "private void select() {\n\t\tif (selected.equals(mealSelect) && !eating) {\n\t\t\tmakeMeal();\n\t\t} else if (selected.equals(snackSelect) && !eating) {\n\t\t\tmakeSnack();\n\t\t} else if (selected.equals(medicineSelect) && !eating){\n\t\t\tmakeMedicine();\n\t\t} else if (selected.equals(playSelect) && !eating){\n\t\t\tmakePlay();\n\t\t}\n\t\t\n\t}", "protected void onSelect() {\n\n }", "public void invSelected()\n {\n\t\t//informaPreUpdate();\n \tisSelected = !isSelected;\n\t\t//informaPostUpdate();\n }", "public void selectAllAccessibleSelection() {\n // To be fully implemented in a future release\n }", "@Override\n\tpublic void select() {\n\t}", "public void selectAll() {\n setSelectedFurniture(this.home.getFurniture());\n }", "public void select() {}", "@Override\r\n\tpublic void seleccionarPersona() {\n\t\t\r\n\t}", "private void ComboUserActionPerformed(java.awt.event.ActionEvent evt) {\n if(ComboUser.getSelectedItem().equals(\"title\")){\n \n selected=1;\n }\n else if(ComboUser.getSelectedItem().equals(\"author\"))\n {\n selected=2;\n }\n else if(ComboUser.getSelectedItem().equals(\"subject\"))\n {\n selected=3;\n }\n }", "public void itemsSelected() {\n getEntitySelect().close();\n Collection<T> selectedValues = getEntitySelect().getResults().getSelectedValues();\n setReferencesToParentAndPersist((T[]) selectedValues.toArray());\n showAddSuccessful();\n }", "abstract public void cabMultiselectPrimaryAction();", "public void selectionChanged() {\r\n int fila = menuCursos.tablaCursos.getSelectedRow();\r\n try {\r\n actual=(Cursos) rs.get(fila);\r\n if(actual.getCodigo()!=null){\r\n MostrarRegistro();\r\n menuCursos.botonCursosBorrar.setEnabled(fila != -1);\r\n menuCursos.botonCursosModificar.setEnabled(fila != -1);\r\n }\r\n } catch (Exception e) {\r\n actual = null;\r\n }\r\n }", "public void updateSelection() {\n\t\t\n\t}", "public void selectVenue() {\n\t\t\r\n\t}", "void defSelect(Variable var){\r\n \t//if (isSelectAll()){\r\n \t\taddSelect(var);\r\n \t//}\r\n }", "protected void onSelectionPerformed(boolean success) {\n }", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tif (jcb.isSelected()) {\n\t\t\t\t\t\tselectList.add(new Integer(site));\n\t\t\t\t\t\t//System.out.println(selectList);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tselectList.remove(new Integer(site));\n\t\t\t\t\t\t//System.out.println(selectList);\n\t\t\t\t\t}\n\t\t\t\t}", "private void defaultSelectedFilterOption() {\n activeSelectBtn.setChecked(true);\n upcomingSelectBtn.setChecked(true);\n inProgressSelctBtn.setChecked(true);\n yettoJoinSelctBtn.setChecked(true);\n bookmarkedSelctBtn.setChecked(false);\n category1SelectBtn.setChecked(true);\n category2SelectBtn.setChecked(true);\n category3SelectBtn.setChecked(true);\n category4SelectBtn.setChecked(true);\n category5SelectBtn.setChecked(true);\n category6SelectBtn.setChecked(true);\n category7SelectBtn.setChecked(true);\n category8SelectBtn.setChecked(true);\n category9SelectBtn.setChecked(true);\n category10SelectBtn.setChecked(true);\n }", "public abstract void select(boolean select);", "@Override\n public void selectGolem(int id) {\n }", "public void switchSelectAll() {\n\t\tif (mDeList.size() == mStationList.getSize()) {\n\t\t\tunSelectAll();\n\t\t} else {\n\t\t\tselectAll();\n\t\t}\n\t\tif (mOnChannelLitener != null) { \n\t\t\tmOnChannelLitener.onSelectChange(mDeList.size(), mStationList.getSize());\n\t\t}\n\t}", "protected abstract void select();", "public void select();", "protected void select() {\n\t\tcleanValues();\n\t\tint row = m_table.getSelectedRow();\n\t\tboolean enabled = row != -1;\n\t\tif (enabled)\n\t\t{\n\t\t\tInteger ID = m_table.getSelectedRowKey();\n\t\t\tif (ID != null)\n\t\t\t{\n\t\t\t\tm_C_Order_ID = ID.intValue();\n\t\t\t}\n\t\t}\n\t\tlog.info(\"ID=\" + m_C_Order_ID); \n\t}", "private void actionSwitchSelect()\r\n\t{\r\n\t\tif (FormMainMouse.isSampleSelectOn)\r\n\t\t{\r\n\t\t\thelperSwitchSelectOff();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\thelperSwitchSelectOn();\r\n\r\n\t\t\t//---- If we can select sample, we can not move it\r\n\t\t\thelperSwitchMoveOff();\r\n\t\t}\r\n\t}", "Select(){\n }", "protected void ACTION_B_SELECT(ActionEvent arg0) {\n\t\tchoseInterface();\r\n\t}", "public void toSelectingAction() {\n }", "@Override\n\tpublic void eventSelectOrder() {\n\t\t\n\t}", "public void select(Object obj, boolean selectionFlag);", "public void select ();", "public void selectTDList(ActionEvent actionEvent) {\n // we will have to update the viewer so that it is displaying the list that was just selected\n // it will go something like...\n // grab the list that was clicked by the button (again, using the relationship between buttons and lists)\n // and then displayTODOs(list)\n }", "public void selected(String action);", "public void select()\n {\n super.select();\n SwingUtilities.invokeLater(() -> _sqlPanel.getSQLEntryPanel().requestFocus());\n }", "public void select() {\n \t\t\tString sinput = \"\";\r\n \t\t\tOption selected = null;\r\n \t\t\tErrorLog.debug(name + \" selected.\");\r\n \t\t\t\r\n \t\t\twhile (true) {\r\n \t\t\t\tSystem.out.println(toString()); //Print menu.\r\n \t\t\t\tsinput = read(); //Get user selection.\r\n \t\t\t\tif (!sinput.equalsIgnoreCase(\"exit\")) {\r\n \t\t\t\t\tselected = options.get(sinput); //Find corresponding option.\r\n \r\n \t\t\t\t\tif (selected != null) //Sinput corresponds to an extant option.\r\n \t\t\t\t\t\tselected.select(); //Select the selected.\r\n \t\t\t\t\telse\r\n \t\t\t\t\t\tprint(sinput + \" is not a valid option\");\r\n \t\t\t\t} else\r\n \t\t\t\t\t{print(\"Returning to previous menu.\"); break;}\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tErrorLog.debug (\"Quitting \" + name + \". Sinput:\"+sinput);\r\n \t\t\t\r\n \t\t\treturn;\r\n \t\t}", "@Override\n public boolean onActionItemClicked(ActionMode mode, MenuItem item) {\n int id = item.getItemId();\n //use switch condition\n switch (id){\n case R.id.select_delete:\n //when click delete\n //use for loop\n for (NoteEntity noteSelect :selectList) {\n //remove select item from list\n list.remove(noteSelect);\n mainViewModel.deleteById(noteSelect.getId());\n }\n //check condition\n if (list.size()==0){\n //when list is empty\n //visible text view\n tvEmpty.setVisibility(View.VISIBLE);\n }\n mode.finish();\n break;\n case R.id.select_all:\n //when click on select all\n //check condition\n if (selectList.size() == list.size()){\n //when all item selected\n //set isSelectAll false\n isSelectAll = false;\n //clear select list\n selectList.clear();\n }else {\n //when all item unselected\n //set isSelectAll true\n isSelectAll = true;\n //clear list\n selectList.clear();\n //add all values in select list\n selectList.addAll(list);\n }\n //set text in view mode\n mainViewModel.setSelectedLiveData(String.valueOf(selectList.size()));\n //notify adaptor\n notifyDataSetChanged();\n break;\n }\n return true;\n }", "@Override\r\n\tpublic void adminSelectUpdate() {\n\t\t\r\n\t}", "public void selectCategory() {\n\t\t\r\n\t}", "public void selectAll (){\r\n\t\tboolean noNeedNotification = (modeSelectAll && unselectedDataIds.isEmpty());\r\n\t\t\r\n\t\tunselectedDataIds.clear(); \r\n\t\tselectedDataIds.clear();\r\n\t\tmodeSelectAll = true ;\r\n\t\tif (! noNeedNotification)\r\n\t\t\tfireSelectionChangeNotification();\r\n\t}", "public void selectDeal() {\n\t}", "public void onSelectionChanged();", "protected void selectAll(JTextField source) {\n\t}", "@Override\n\tpublic void eventSelectTracker() {\n\t\t\n\t}", "private void doSelect() {\n this.setVisible(false);\n }", "private void select(ActionEvent e){\r\n // Mark this client as an existing client since they are in the list\r\n existingClient = true;\r\n // To bring data to Management Screen we will modify the text fields\r\n NAME_FIELD.setText(client.getName());\r\n ADDRESS_1_FIELD.setText(client.getAddress1());\r\n ADDRESS_2_FIELD.setText(client.getAddress2());\r\n CITY_FIELD.setText(client.getCity());\r\n ZIP_FIELD.setText(client.getZip());\r\n COUNTRY_FIELD.setText(client.getCountry());\r\n PHONE_FIELD.setText(client.getPhone());\r\n // client.setAddressID();\r\n client.setClientID(Client.getClientID(client.getName(), client.getAddressID()));\r\n // Pass client information to Client Management Screen\r\n currClient = client;\r\n back(e);\r\n }", "protected final void onSelect(CommandSender sender) {\n setInteracting(sender);\n onSelect();\n }", "default public void clickSelect() {\n\t\tremoteControlAction(RemoteControlKeyword.SELECT);\n\t}", "public void ViagemSelecionado(SelectEvent event) {\n\n\t\tViagem m1 = (Viagem) event.getObject();\n\t\tthis.viagem = m1;\n\n\t}", "@Override\n public void actionPerformed(ActionEvent e)\n {\n selectedComboBox = String.valueOf(colSelect.getSelectedItem());\n\n if (selectedComboBox == null) { return; }\n\n switch (selectedComboBox)\n {\n case \"None\" :\n {\n flag = true;\n selectedColumn = null ;\n rs.setRowFilter(RowFilter.regexFilter(\"\"));\n break;\n }\n case \"Name\" :\n {\n\n flag= false;\n selectedColumn = StatisticsWindow.this.statsTable.getColumnModel().getColumn(0);\n break;\n }\n case \"Type\" :\n {\n flag = false;\n selectedColumn = StatisticsWindow.this.statsTable.getColumnModel().getColumn(1);\n break;\n }\n case \"RamzorColor\" :\n {\n flag = false;\n selectedColumn = StatisticsWindow.this.statsTable.getColumnModel().getColumn(2);\n break;\n }\n }\n }", "private void onSelectPatient() {\n\t\tint selectedRowIndex = tablePatients.getSelectedRow();\n\n\t\tif (selectedRowIndex < 0) {\n\t\t\t// No row has been selected\n\t\t\tbuttonRemovePatient.setEnabled(false);\n\t\t\tbuttonViewPatient.setEnabled(false);\n\t\t} else {\n\t\t\t// A row has been selected\n\t\t\tbuttonRemovePatient.setEnabled(true);\n\t\t\tbuttonViewPatient.setEnabled(true);\n\t\t}\n\t}", "@Listen(\"onClick = #selectModel\")\n\tpublic void selectModel(){\n\t\ttreeModel.setOpenObjects(List.of(treeModel.getRoot().getChildren().get(path[0])));\n\t\ttreeModel.addToSelection(treeModel.getChild(path));\n\t}", "@Listen(\"onClick = #selectTree\")\n\tpublic void select(){\n\t\ttreeModel.setOpenObjects(treeModel.getRoot().getChildren());\n\t\tTreeitem[] items = tree.getItems().toArray(new Treeitem[0]);\n\t\ttree.setSelectedItem(items[items.length - 1]);\n\t}", "@Override\r\n\tprotected Object getSelectData() {\n\t\treturn null;\r\n\t}", "@Override\r\n public void valueChanged(ListSelectionEvent e) {\n selectionChanged();\r\n }", "@Override\n\tpublic void onNothingSelected() {\n\n\t}", "public void startSelect(View v){\n isStart = true;\n isCancel = false;\n mySave.setVisibility(View.VISIBLE);\n myCancel.setVisibility(View.VISIBLE);\n myEdit.setVisibility(View.INVISIBLE);\n myCancel.bringToFront();\n myViewFilter.setVisibility(View.INVISIBLE);\n adapter.notifyDataSetChanged();\n }", "public void FuncionarioSelecionado(SelectEvent event) {\n\n\t\tFuncionario m1 = (Funcionario) event.getObject();\n\t\tthis.funcionarioselect = m1;\n\n\t}", "public void select(List<Object> objs, boolean selectionFlag) throws Exception;", "@Override\n\tpublic void onSelectionChanged(ListSelectionEvent e, List<ShoppingListObject> values) {\n\n\t}", "public void selectAgent(int selected) {\n this.selected = selected;\n }", "@Override\n\tpublic void visit(SubSelect arg0) {\n\t\t\n\t}", "@FXML\n public void allSelected() {\n this.populateListInterview(this.interviewer.getPendingInterviews());\n }", "private void setUpSelect(){\n\t\tEPFuncion fun = new EPFuncion();\n\t\tEPPropiedad pro = new EPPropiedad();\n\t\tArrayList<EPExpresion> exps = new ArrayList<>();\n\t\t//seteamos la propiedad de la funcion.\n\t\tpro.setNombre(\"a1.p1\");\n\t\tpro.setPseudonombre(\"\");\n\t\t//metemos la propiedad en la funcion.\n\t\texps.add(pro);\n\t\tfun.setExpresiones(exps);\n\t\t//seteamos la funcion con el resto de valores.\n\t\tfun.setNombreFuncion(\"f1\");\n\t\tfun.setPseudonombre(\"fun1\");\n\t\t//metemos la funcion en la lista del select.\n\t\texpresionesSelect.add(fun);\n\t\t//seteamos el resto de propiedades.\n\t\tpro = new EPPropiedad();\n\t\tpro.setNombre(\"a1.p2\");\n\t\tpro.setPseudonombre(\"pro2\");\n\t\texpresionesSelect.add(pro);\n\t\tpro = new EPPropiedad();\n\t\tpro.setNombre(\"a1.p3\");\n\t\tpro.setPseudonombre(\"pro3\");\n\t\texpresionesSelect.add(pro);\n\t}", "public void searchFilter(){\n\t\t\n\t\tdriver.findElement(By.xpath(\"//div[@class='_3uDYxP']//select[@class='_2YxCDZ']\")).click();\n\t\tSystem.out.println(\"drop-downselected\");\n\t}", "private void checkSelectable() {\n \t\tboolean oldIsSelectable = isSelectable;\n \t\tisSelectable = isSelectAllEnabled();\n \t\tif (oldIsSelectable != isSelectable) {\n \t\t\tfireEnablementChanged(SELECT_ALL);\n \t\t}\n \t}", "public void selectionChanged(Selection selecton) {\r\n }", "public void afficherEcranSelectionJoueur() {\n gestionnaireJoueurs.chargerJoueurs();\n ecranSelectionJoueur.rechargerListeJoueur();\n CardLayout cl = (CardLayout) (container.getLayout());\n cl.show(container, \"EcranSelectionJoueur\");\n }", "@Override\n\tpublic void visit(SubSelect arg0) {\n\n\t}", "@Override\n\tpublic void setSelected(boolean selected) {\n\t\t\n\t}", "@Override\r\n\tpublic void objectSelectListener(SelectEvent event) {\n\t\t\r\n\t}", "private void doSelect(MouseEvent e) {\n if (e != null && e.getClickCount() > 1)\n doOK();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tString colorString = flowerColorHorizontalSelector.getSelected();\n\t\t\t\tString leafShapeString = leafShapeHorizontalSelector.getSelected();\n\t\t\t\tString leafMarginString = leafMarginHorizontalSelector.getSelected();\n\t\t\t\tString leafArrangementString = leafArrangementHorizontalSelector.getSelected();\n\t\t\t\t//Uncomfortable putting this here ////messy\n\t\t\t\tif (colorString!=null | leafShapeString!=null | leafMarginString!=null | leafArrangementString!=null){\n\t\t\t\t\tCursor cursor = ((MainActivity) getActivity()).getLeaves(colorString, leafShapeString,leafMarginString,leafArrangementString);\n\t\t\t mListener.fragmentToActivity(2, cursor);\n\t\t\t\t}else{\n\t\t\t\t\tshowText(\"Please select at least one option from one category.\");\n\t\t\t\t}\n\t\t\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic void onSelectFeatures(ControllerEvent event) throws IOException {\n\n\t\t// Selecteren segment\n\t\t// if (object.getProbleem() != null\n\t\t// && object.getProbleem() instanceof NetwerkAnderProbleem) {\n\t\t//\n\t\t// String layerId = (String) event.getParams().get(\"layerId\");\n\t\t// FeatureMapLayer layer = (FeatureMapLayer) getViewer().getContext()\n\t\t// .getLayer(layerId);\n\t\t//\n\t\t// if (layer.getSelection().size() == 1) {\n\t\t// object.setTraject(new ResourceKey(\"Traject\", layer\n\t\t// .getSelection().get(0)));\n\t\t//\n\t\t// } else {\n\t\t// messages.error(\"Gelieve precies 1 segment te selecteren.\");\n\t\t// layer.setSelection(new ArrayList<String>(1));\n\t\t// }\n\t\t// }\n\n\t\t// Selecteren bord\n\t\tif (object.getProbleem() != null\n\t\t\t\t&& object.getProbleem() instanceof BordProbleem) {\n\n\t\t\tList<String> ids = (List<String>) event.getParams().get(\n\t\t\t\t\t\"featureIds\");\n\n\t\t\tString layerId = (String) event.getParams().get(\"layerId\");\n\t\t\tFeatureMapLayer layer = (FeatureMapLayer) getViewer().getContext()\n\t\t\t\t\t.getLayer(layerId);\n\n\t\t\t// Workaround om te vermijden dat niet zichtbare borden geselecteerd\n\t\t\t// worden\n\t\t\t// Enkel de Borden behorende tot de bewegwijzering van het Traject\n\t\t\t// mogen geselecteerd\n\t\t\t// worden.\n\t\t\tList<String> idsFiltered = new ArrayList<String>();\n\t\t\tfor (Bord b : selectableBorden) {\n\t\t\t\tif (ids.contains(b.getId().toString())) {\n\t\t\t\t\tidsFiltered.add(b.getId().toString());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (idsFiltered.isEmpty()) {\n\t\t\t\tlayer.setSelection(new ArrayList<String>(1));\n\t\t\t}\n\n\t\t\telse if (idsFiltered.size() == 1) {\n\t\t\t\tlayer.setSelection(idsFiltered);\n\n\t\t\t\t((BordProbleem) object.getProbleem()).setBord(new ResourceKey(\n\t\t\t\t\t\t\"Bord\", idsFiltered.get(0)));\n\n\t\t\t\tBord selectedBord = (Bord) modelRepository\n\t\t\t\t\t\t.loadObject(new ResourceKey(\"Bord\", idsFiltered.get(0)));\n\n\t\t\t\t// Zoek traject dat bij routebord hoort\n\t\t\t\tif (selectedBord instanceof RouteBord) {\n\t\t\t\t\tobject.setTraject(((RouteBord) selectedBord).getRoute());\n\t\t\t\t}\n\n\t\t\t\t// Zoek segment dat bij NetwerkBord hoort\n\t\t\t\telse if (selectedBord instanceof NetwerkBord) {\n\t\t\t\t\tobject.setTraject(((NetwerkBord) selectedBord)\n\t\t\t\t\t\t\t.getSegmenten().get(0));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tmessages.warn(\"Er bevinden zich meerdere borden op deze locatie. Gelieve in dit geval de 'Tonen informatie' knop te gebruiken om uw selectie te verfijnen.\");\n\t\t\t\tlayer.setSelection(new ArrayList<String>(1));\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n public void onClick(View v) {\n switch (v.getId()) {\r\n case R.id.btnAllSelect:\r\n allSelect();\r\n break;\r\n case R.id.btnUnSelect:\r\n unSelect();\r\n break;\r\n case R.id.btnEnter:\r\n Save();\r\n break;\r\n }\r\n \r\n }", "public void beginSelection()\n {\n\tisMultiSelection = true;\n\tsetMaxCheckCount(-1);\n }", "@Override\r\n\tpublic void valueChanged(ListSelectionEvent e) {\n\t\tString query=\"\";\r\n\t\t\r\n\t\tselectedUsers.clear();\r\n\t\t\r\n\t\tListSelectionModel lsm = (ListSelectionModel)e.getSource();\r\n\t\tint minIndex = lsm.getMinSelectionIndex();\r\n int maxIndex = lsm.getMaxSelectionIndex();\r\n for (int i = minIndex; i <= maxIndex; i++) \r\n {\r\n if (lsm.isSelectedIndex(i)) \r\n {\r\n \t\t\tif (query.length()!=0)\r\n \t\t\t{\r\n \t\t\t\tquery = query + \" OR \";\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tquery = query + \"fromdisp:\\\"\" + interestedUsers[i] + \"\\\"\"; \r\n \t\t\t\r\n \t\t\tselectedUsers.add(interestedUsers[i]);\r\n }\r\n }\r\n \r\n if (query.length()==0)\r\n {\r\n \tqueryTextField.setText(\"*:*\");\r\n }\r\n else\r\n {\r\n \tqueryTextField.setText(\"(\" + query + \")\");\r\n }\r\n \r\n\t\t\r\n\t}", "protected void saveSelection ()\t{\n\t\t//\tAlready disposed\n\t\tif (m_table == null)\n\t\t\treturn;\n\n\t\tm_results.addAll(getSelectedRowKeys());\n\n\t\t//\tSave Settings of detail info screens\n//\t\tsaveSelectionDetail();\n\t\t\n\t}", "public String button1_action() {\n getSessionBean1().setSelected_algos(listbox1.getValueAsStringArray(this.getContext()));\n getSessionBean1().setSelected_tiers(listbox2.getValueAsStringArray(this.getContext()));\n getSessionBean1().setSelected_runs(listbox3.getValueAsStringArray(this.getContext()));\n getSessionBean1().setSelected_storageelems(listbox4.getValueAsStringArray(this.getContext()));\n //getSessionBean1().setSelected_branches(listbox5.getValueAsStringArray(this.getContext()));\n \n //String selected_primary = (String)dropDown1.getSelected().toString();\n //log(\"Selected Primary is\"+selected_primary);\n \n if ( dropDown1.getSelected() != null ||\n getSessionBean1().getSelected_algos().length !=0 || \n getSessionBean1().getSelected_tiers().length !=0 ||\n getSessionBean1().getSelected_runs().length != 0 ||\n getSessionBean1().getSelected_storageelems().length !=0 \n //getSessionBean1().getSelected_branches().length !=0\n ) {\n getSessionBean1().setItems_selected(\"1\");\n }\n return null;\n }", "public void actionPerformed(ActionEvent ae){\r\n \r\n String select = \"\"; \r\n \r\n if(jrTCP.isSelected())\r\n {\r\n select = jrTCP.getText(); \r\n }\r\n else if(jrUDP.isSelected())\r\n {\r\n select = jrUDP.getText(); \r\n }\r\n }", "public void selectAt(MouseEvent e) {\r\n \t\tactivateSelect();\r\n \t\tmouseListner.mousePressed(e);\r\n \t}", "private void jButtonBedrijfSelecterenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonBedrijfSelecterenActionPerformed\n\n Bedrijf geselecteerdBedrijf = (Bedrijf)this.jComboBoxGekendeBedrijven.getSelectedItem();\n if (geselecteerdBedrijf != null && geselecteerdBedrijf.getId() != null){\n this.geselecteerdeStageplaats.setBedrijfID(this.dbFacade.getBedrijfByID(geselecteerdBedrijf.getId()));\n displayBedrijf();\n }\n this.enableButtons();\n }", "@Override\n\tpublic void onNothingSelected() {\n\t}", "@Override\n\t\tpublic void setSelected(int p_178011_1_, int p_178011_2_, int p_178011_3_) {\n\n\t\t}", "@Override\n\t\tpublic void setSelected(int p_178011_1_, int p_178011_2_, int p_178011_3_) {\n\n\t\t}", "public void doButtonEinfuegen() {\n\t\tDialogSelectionDjinn dsd = new DialogSelectionDjinn((Frame) this.owner, \"Auswahl Tabellenspalte\",\n\t\t\t\tnew DefaultListViewComponentFactory((allts ? this.tabelle.getDiagramm().getFieldCache()\n\t\t\t\t\t\t: new Vector<Object>(Arrays.asList(this.tabelle.getColumns())))));\n\t\tif (dsd.isSelected()) {\n\t\t\tVector v = dsd.getSelection();\n\t\t\tVector values = new Vector();\n\t\t\tfor (int i = 0, len = v.size(); i < len; i++) {\n\t\t\t\tif (this.getType() == 0) {\n\t\t\t\t\tvalues.addElement(v.elementAt(i));\n\t\t\t\t} else if ((this.getType() == 1) || (this.getType() == 2)) {\n\t\t\t\t\tvalues.addElement(new ToStringContainer((TabellenspaltenModel) v.elementAt(i), this.tabelle));\n\t\t\t\t} else if (this.getType() == 3) {\n\t\t\t\t\tvalues.addElement(Archimedes.Factory.createOrderMember((TabellenspaltenModel) v.elementAt(i)));\n\t\t\t\t} else if (this.getType() == 4) {\n\t\t\t\t\tvalues.addElement(Archimedes.Factory.createSelectionMember((TabellenspaltenModel) v.elementAt(i)));\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (int i = 0, len = values.size(); i < len; i++) {\n\t\t\t\tboolean found = false;\n\t\t\t\tfor (int j = 0, lenj = this.tabellenspalten.size(); j < lenj; j++) {\n\t\t\t\t\tif (this.getType() == 0) {\n\t\t\t\t\t\tTabellenspaltenModel tsm = (TabellenspaltenModel) this.tabellenspalten.get(j);\n\t\t\t\t\t\tif (values.elementAt(i) == tsm) {\n\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if ((this.getType() == 1) || (this.getType() == 2)) {\n\t\t\t\t\t\tToStringContainer tsc = (ToStringContainer) this.tabellenspalten.get(j);\n\t\t\t\t\t\tif (((ToStringContainer) values.elementAt(i)).getTabellenspalte() == tsc) {\n\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (this.getType() == 3) {\n\t\t\t\t\t\tOrderMemberModel omm = (OrderMemberModel) this.tabellenspalten.get(j);\n\t\t\t\t\t\tif (((OrderMemberModel) values.elementAt(i)).getOrderColumn() == omm) {\n\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (this.getType() == 4) {\n\t\t\t\t\t\tSelectionMemberModel smm = (SelectionMemberModel) this.tabellenspalten.get(j);\n\t\t\t\t\t\tif (((SelectionMemberModel) values.elementAt(i)).getColumn() == smm) {\n\t\t\t\t\t\t\tfound = 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}\n\t\t\t\tif (!found) {\n\t\t\t\t\tif (this.anzeige.getSelectedRow() >= 0) {\n\t\t\t\t\t\tthis.tabellenspalten.add(this.anzeige.getSelectedRow(), values.get(i));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.tabellenspalten.add(values.get(i));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.doRepaint();\n\t\t}\n\t}", "public void prepareOferente(ActionEvent event) {\n if (this.getSelected() != null && oferenteController.getSelected() == null) {\n oferenteController.setSelected(this.getSelected().getOferente());\n }\n }", "Guard getSelectguard();", "private void selecionarOpcoesDeBackup() {\n try {\n if (dao.opcaoDeBackupAtual().equals(\"Não fazer Backup Automático\")) {\n rbNãofazerBackup.setSelected(true);\n }\n if (dao.opcaoDeBackupAtual().equals(\"Fazer Backup na Entrada\")) {\n rbFazerBackupnaEntrada.setSelected(true);\n }\n if (dao.opcaoDeBackupAtual().equals(\"Fazer Backup na Saída\")) {\n rbFazerBackupnaSaída.setSelected(true);\n }\n if (dao.opcaoDeBackupAtual().equals(\"Fazer Backup na Entrada e na Saída\")) {\n rbFazerBackupnaEntradaenaSaida.setSelected(true);\n }\n } catch (SQLException ex) {\n Logger.getLogger(Backup.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Override\n protected void processUnselect() {\n \n }", "public void selectSlot() {\n\t\t\r\n\t}", "public void select(int action) {\n\t\tselected = true;\n\t\tthis.action = action;\n\t}", "private void helperSwitchSelectOn()\r\n\t{\r\n\t\tImageIcon iconButton = FormUtils.getIconResource(FormStyle.RESOURCE_PATH_ICO_SELECT_PRESSED);\r\n\r\n\t\tmainFormLink.getComponentToolbar().getComponentButtonSelect().setIcon(iconButton);\r\n\r\n\t\tFormMainMouse.isSampleSelectOn = true;\r\n\t}", "public void selectAll ()\r\n {\r\n editor.selectAll ();\r\n }", "@Override\n public void onClick(View view)\n {\n if(selectedStructure != null) //checks if object is selected and if prev object is same object\n {\n //if object is the same, then deselect the structure\n if (selectedStructure.equals(structureList.get(getAdapterPosition())))\n selected = false;\n else\n selected = true;\n }\n\n // if selected, get object otherwise let no object is selected\n if (selected)\n {\n selectedStructure = structureList.get(getAdapterPosition());\n }\n else\n {\n selectedStructure = null;\n }\n }", "String getSelect();", "String getSelect();", "void selected(Collection<AppUser> appUsers, String extraText);", "@Override\n public void selectItem(String selection) {\n vendingMachine.setSelectedItem(selection);\n vendingMachine.changeToHasSelectionState();\n }", "public void beginSelecting() {\r\n selecting = true;\r\n minX = 0;\r\n maxX = 0;\r\n }" ]
[ "0.71055675", "0.7033785", "0.69677895", "0.6811462", "0.68022716", "0.6717826", "0.66844225", "0.662502", "0.6609909", "0.6607994", "0.6603398", "0.65961397", "0.65403366", "0.650083", "0.6498743", "0.64976037", "0.64241", "0.6383836", "0.6368627", "0.63586885", "0.63543797", "0.6339327", "0.63280827", "0.62775123", "0.62719375", "0.62601125", "0.62587976", "0.6258613", "0.6247105", "0.62410134", "0.623901", "0.6237138", "0.6234534", "0.62282175", "0.6225398", "0.6219721", "0.621413", "0.62104917", "0.6204226", "0.62026787", "0.61912996", "0.6187422", "0.61769104", "0.6167764", "0.615877", "0.614214", "0.61358964", "0.6118588", "0.61120117", "0.6105137", "0.6093504", "0.6088321", "0.60765487", "0.6071614", "0.6066335", "0.606004", "0.6057889", "0.60529923", "0.6045599", "0.6044209", "0.6041383", "0.6036805", "0.60339636", "0.6033778", "0.60261846", "0.6023511", "0.6020074", "0.6015419", "0.6015405", "0.6015137", "0.6009003", "0.6007736", "0.60034525", "0.6001435", "0.5998988", "0.5995138", "0.59920496", "0.598186", "0.5980905", "0.59783393", "0.59713334", "0.5970882", "0.59691167", "0.5968663", "0.59673566", "0.59673566", "0.59557295", "0.5952308", "0.59479517", "0.59397584", "0.5935929", "0.593541", "0.59352076", "0.5934859", "0.5933379", "0.59204936", "0.5920396", "0.5920396", "0.59149444", "0.5910855", "0.5910529" ]
0.0
-1
Deze methode zorgt ervoor dat de select statement wordt uitgevoerd. welke ervoor zorgt dat alle bedrijfsgegevens worden opgehaald.
@Override public Beheerder select(int id) { Connection connection = createConnection(); Beheerder beheerder = new Beheerder(); try { PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM gebruiker WHERE id = ?"); preparedStatement.setInt(1, id); ResultSet resultSet = preparedStatement.executeQuery(); resultSet.next(); beheerder.setId(resultSet.getInt("id")); beheerder.setVoornaam(resultSet.getString("voornaam")); beheerder.setAchternaam(resultSet.getString("achternaam")); beheerder.setAdres(resultSet.getString("adres")); beheerder.setPostcode(resultSet.getString("postcode")); beheerder.setWoonplaats(resultSet.getString("woonplaats")); beheerder.setTelefoon(resultSet.getString("telefoon")); beheerder.setEmail(resultSet.getString("email")); beheerder.setWachtwoord(resultSet.getString("wachtwoord")); beheerder.setRechten_id(resultSet.getInt("rechten_id")); beheerder.setActief(resultSet.getBoolean("isactief")); } catch (SQLException e) { e.printStackTrace(); } closeConnection(connection); return beheerder; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected String getSelectSQL() {\n\t\treturn queryData.getString(\"SelectSQL\");\n\t}", "private static void selectRecordsFromDbUserTable() throws SQLException {\n\n\t\tConnection dbConnection = null;\n\t\tStatement statement = null;\n\n\t\tString selectTableSQL = \"SELECT * from spelers\";\n\n\t\ttry {\n\t\t\tdbConnection = getDBConnection();\n\t\t\tstatement = dbConnection.createStatement();\n\n\t\t\tSystem.out.println(selectTableSQL);\n\n\t\t\t// execute select SQL stetement\n\t\t\tResultSet rs = statement.executeQuery(selectTableSQL);\n\n\t\t\twhile (rs.next()) {\n \n String naam = rs.getString(\"naam\");\n\t\t\t\tint punten = rs.getInt(\"punten\");\n \n System.out.println(\"naam : \" + naam);\n\t\t\t\tSystem.out.println(\"punten : \" + punten);\n\t\t\t\t\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\n\t\t\tSystem.out.println(e.getMessage());\n\n\t\t} finally {\n\n\t\t\tif (statement != null) {\n\t\t\t\tstatement.close();\n\t\t\t}\n\n\t\t\tif (dbConnection != null) {\n\t\t\t\tdbConnection.close();\n\t\t\t}\n\n\t\t}\n\n\t}", "private void appendSelectStatement() {\n builder.append(SELECT).append(getSelectedFields()).append(FROM);\n }", "@Override\r\n\tpublic String getSelect() {\n\t\treturn SQL;\r\n\t}", "public void selectFromTable(){\n //SQL query\n String query = \"SELECT fNavn, eNavn, konto_Navn, konto_Reg, konto_ID, konto_Saldo FROM person JOIN konti ON Person_ID = fk_Person_ID\";\n\n try {\n //connection\n stmt = con.createStatement();\n //execute query\n rs = stmt.executeQuery(query);\n System.out.println(\"\\nFornavn: \\t\\tEfternavn: \\t\\tKonto: \\t\\tReg.nr: \\t\\tKontonr.: \\t\\tSaldo: \\n____________________________________\");\n\n //get data\n while (rs.next()){\n String fNavn = rs.getString(\"fNavn\"); //returns fornavn\n String eNavn = rs.getString(\"eNavn\"); //returns efternavn\n String kontoNavn = rs.getString(\"konto_Navn\"); //returns kontonavn\n int kontoReg = rs.getInt(\"konto_Reg\"); //returns kontoreg\n double kontoID = rs.getDouble(\"konto_ID\"); //returns kontoID\n double kontoSaldo = rs.getDouble(\"konto_Saldo\"); //returns kontoSaldo\n System.out.println(fNavn + \"\\t\\t\" + eNavn + \"\\t\\t\" + kontoNavn + \"\\t\\t\" + kontoReg + \"\\t\\t\" + kontoID + \"\\t\\t\" + kontoSaldo);\n }\n }\n catch (SQLException ex){\n System.out.println(\"\\n--Query did not execute--\");\n ex.printStackTrace();\n }\n\n\n }", "@Override\n public List<Beheerder> select() {\n ArrayList<Beheerder> beheerders = new ArrayList<>();\n Connection connection = createConnection();\n try {\n PreparedStatement preparedStatement = connection.prepareStatement(\"SELECT * FROM gebruiker ORDER BY id;\");\n ResultSet resultSet = preparedStatement.executeQuery();\n beheerders = fillListFromResultSet(resultSet, beheerders);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n closeConnection(connection);\n return beheerders;\n }", "private void getSelectStatements()\n\t{\n\t\tString[] sqlIn = new String[] {m_sqlOriginal};\n\t\tString[] sqlOut = null;\n\t\ttry\n\t\t{\n\t\t\tsqlOut = getSubSQL (sqlIn);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tlog.log(Level.SEVERE, m_sqlOriginal, e);\n\t\t\tthrow new IllegalArgumentException(m_sqlOriginal);\n\t\t}\n\t\t//\ta sub-query was found\n\t\twhile (sqlIn.length != sqlOut.length)\n\t\t{\n\t\t\tsqlIn = sqlOut;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tsqlOut = getSubSQL (sqlIn);\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\tlog.log(Level.SEVERE, m_sqlOriginal, e);\n\t\t\t\tthrow new IllegalArgumentException(sqlOut.length + \": \"+ m_sqlOriginal);\n\t\t\t}\n\t\t}\n\t\tm_sql = sqlOut;\n\t\t/** List & check **\n\t\tfor (int i = 0; i < m_sql.length; i++)\n\t\t{\n\t\t\tif (m_sql[i].indexOf(\"SELECT \",2) != -1)\n\t\t\t\tlog.log(Level.SEVERE, \"#\" + i + \" Has embedded SQL - \" + m_sql[i]);\n\t\t\telse\n\t\t\t\tlog.fine(\"#\" + i + \" - \" + m_sql[i]);\n\t\t}\n\t\t/** **/\n\t}", "public List<Dishes> select(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where 1=1 \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n /*list.add(book.getBookname());\n list.add(book.getPrice());\n list.add(book.getAuthor());\n list.add(book.getPic());\n list.add(book.getPublish());*/\n }\n return dao.select(sql.toString(), list.toArray());\n }", "private static void selectEx() throws SQLException {\n ResultSet rs = stmt.executeQuery(\"SELECT name,score FROM students \\n\" +\n \"WHERE score >50;\");\n\n while (rs.next()) {\n System.out.println(rs.getString(\"name\") + \" \" + rs.getInt(\"score\"));\n }\n rs.close();\n }", "public List<Dishes> selectWest(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='Î÷²Í' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public ResultSet querySelect(String query) throws SQLException {\n\t \t\t// Création de l'objet gérant les requêtes\n\t \t\tstatement = cnx.createStatement();\n\t \t\t\n\t \t\t// Exécution d'une requête de lecture\n\t \t\tResultSet result = statement.executeQuery(query);\n\t \t\t\n\t \t\treturn result;\n\t \t}", "SELECT createSELECT();", "private Cursor selectStatements(TransferObject feature) throws Exception {\r\n\t //ContentValues cv = new ContentValues(); \r\n\t List<FieldTO> fields = feature.getFields();\r\n\t String[] selectionArgs = new String[fields.size()];\r\n\t for (int i=0; i<fields.size();i++) {\r\n\t \tFieldTO fieldTO = fields.get(i);\r\n\t \tString name = fieldTO.getName();\r\n\t \tObject value = fieldTO.getValue();\r\n\t \tselectionArgs[i] = String.valueOf(value);\r\n\r\n\t\t}\r\n\t // return getDb().insert(getTableName(), null, cv);\r\n\t\tStatementFactory statement = new StatementFactory(feature);\r\n StringBuilder sqls = statement.createStatementSQL();\r\n Cursor c = getDb().rawQuery(sqls.toString(), selectionArgs);\r\n\t return c;\r\n\t}", "@Override\n public Collection<KlantBedrijf> select() {\n return null;\n }", "@Override\r\n\tpublic String select() {\n\t\tList<Object> paramList=new ArrayList<Object>();\r\n\t\tparamList.add(numPerPage*(pageIndex-1));\r\n\t\tparamList.add(numPerPage);\r\n\t\tthis.setResultMesg(adminDao.doCount(), adminDao.doSelect(paramList));\r\n\t\treturn SUCCESS;\r\n\t}", "private void selectOperator() {\n String query = \"\";\n System.out.print(\"Issue the Select Query: \");\n query = sc.nextLine();\n query.trim();\n if (query.substring(0, 6).compareToIgnoreCase(\"select\") == 0) {\n sqlMngr.selectOp(query);\n } else {\n System.err.println(\"No select statement provided!\");\n }\n }", "public static String getSelectStatement() {\n return SELECT_STATEMENT;\n }", "public SelectStatement() {\n\t\tthis.columnSpecs = new ArrayList<>();\n\t}", "private String buildSelect() {\r\n\t\tString select = \"select all_source.line, ' '||replace(all_source.TEXT,chr(9),' ')|| ' ' line from all_source where 2=2 \";\r\n\t\tString ownerCondition = \"\";\r\n\t\tString ownerInnerCondition = \"\";\r\n\t\tString beginProcedureCondition = \"\";\r\n\r\n\t\tif (!oraJdbcDTO.dbSchema.equals(\"\")) {\r\n\t\t\townerCondition = \" and all_source.OWNER = ? \";\r\n\t\t\townerInnerCondition = \" and all_source1.OWNER = ? \";\r\n\t\t}\r\n\t\tif (!oraJdbcDTO.packageName.equals(\"\")) {\r\n\t\t\t// Procedure in package\r\n\t\t\tbeginProcedureCondition = \"and all_source.name = ?\\n\"\r\n\t\t\t\t\t+ \"and all_source.TYPE = 'PACKAGE'\\n\"\r\n\t\t\t\t\t+ \"and all_source.line >=\\n\"\r\n\t\t\t\t\t+ \" (select min(all_source1.line)\\n\"\r\n\t\t\t\t\t+ \" from all_source all_source1 where 2=2 \"\r\n\t\t\t\t\t+ ownerInnerCondition\r\n\t\t\t\t\t+ \" and all_source1.name = ?\\n\"\r\n\t\t\t\t\t+ \" and all_source1.TYPE = 'PACKAGE'\\n\"\r\n\t\t\t\t\t+ \" and instr(upper(all_source1.TEXT), ?) > 0)\";\r\n\t\t\t;\r\n\t\t} else {\r\n\t\t\t// Single procedure or function\r\n\t\t\tbeginProcedureCondition = \"and all_source.name = ?\\n\"\r\n\t\t\t\t\t+ \"and all_source.TYPE in ('PROCEDURE','FUNCTION')\";\r\n\t\t}\r\n\t\tselect = select + beginProcedureCondition + \" and all_source.line >= ?\"\r\n\t\t\t\t+ ownerCondition + \" order by all_source.line\";\r\n\r\n\t\treturn select;\r\n\t}", "String getSelect();", "String getSelect();", "private void ini_SelectDB()\r\n\t{\r\n\r\n\t}", "public void onSelect(Statement select, Connection cx, SimpleFeatureType featureType) throws SQLException {\r\n }", "public void select()\n {\n super.select();\n SwingUtilities.invokeLater(() -> _sqlPanel.getSQLEntryPanel().requestFocus());\n }", "public void Select(){\n Cursor cursor = sqlDB.rawQuery(\"SELECT * FROM posts \",null);\n\n if (cursor != null && cursor.moveToFirst()) {\n String title = cursor.getString(cursor.getColumnIndex(PostDatabase.COL_TITLE));\n String content = cursor.getString(cursor.getColumnIndex(PostDatabase.COL_CONTENT));\n\n // Dumps \"Title: Test Title Content: Test Content\"\n Log.d(\"PostDataBase\", \"Title: \" + title + \" Content: \" + content);\n\n cursor.close();\n }\n\n // `query()` method\n /* Cursor query (String table, String[] columns, String selection, String[] selectionArgs,\n String groupBy, String having, String orderBy, String limit)*/\n }", "public List<Dishes> selectYue(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='ÔÁ²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public List<NhanVien> select() {\n String sql = \"SELECT * FROM NhanVien\";\n return select(sql);\n }", "public void refresh() {\n String sql = \"\";\n sql += \"select m.id\"\n + \", m.data\"\n + \", CAST(CONCAT(dep.nome, ' [', dep.id, ']') AS CHAR(50)) as deposito\"\n + \", cau.descrizione as causale\"\n + \", m.articolo\"\n + \", if (cau.segno = -1 , -m.quantita, m.quantita) as quantita\"\n + \", m.note\"\n + \", cast(concat(IF(m.da_tipo_fattura = 7, 'Scontr.', \"\n + \" IF(m.da_tabella = 'test_fatt', 'Fatt. Vend.', \"\n + \" IF(m.da_tabella = 'test_ddt', 'DDT Vend.',\"\n + \" IF(m.da_tabella = 'test_fatt_acquisto', 'Fatt. Acq.',\"\n + \" IF(m.da_tabella = 'test_ddt_acquisto', 'DDT Acq.', m.da_tabella)))))\"\n + \" , da_serie, ' ', da_numero, '/', da_anno, ' - [ID ', da_id, ']') as CHAR)as origine\"\n // + \", m.da_tabella\"\n // + \", m.da_anno\"\n // + \", m.da_serie\"\n // + \", m.da_numero\"\n // + \", m.da_id\"\n + \", m.matricola\"\n + \", m.lotto\"\n + \", a.codice_fornitore, a.codice_a_barre from movimenti_magazzino m left join articoli a on m.articolo = a.codice\"\n + \" left join tipi_causali_magazzino cau on m.causale = cau.codice\"\n + \" left join depositi dep ON m.deposito = dep.id\";\n sql += \" where 1 = 1\";\n System.out.println(\"articolo_selezionato_filtro_ref = \" + articolo_selezionato_filtro_ref);\n System.out.println(\"articolo_selezionato_filtro_ref get = \" + articolo_selezionato_filtro_ref.get());\n if (articolo_selezionato_filtro_ref.get() != null && StringUtils.isNotBlank(articolo_selezionato_filtro_ref.get().codice)) {\n sql += \" and m.articolo like '\" + Db.aa(articolo_selezionato_filtro_ref.get().codice) + \"'\";\n }\n if (filtro_barre.getText().length() > 0) {\n sql += \" and a.codice_a_barre like '%\" + Db.aa(filtro_barre.getText()) + \"%'\";\n }\n if (filtro_lotto.getText().length() > 0) {\n sql += \" and m.lotto like '%\" + Db.aa(filtro_lotto.getText()) + \"%'\";\n }\n if (filtro_matricola.getText().length() > 0) {\n sql += \" and m.matricola like '%\" + Db.aa(filtro_matricola.getText()) + \"%'\";\n }\n if (filtro_fornitore.getText().length() > 0) {\n sql += \" and a.codice_fornitore like '%\" + Db.aa(filtro_fornitore.getText()) + \"%'\";\n }\n if (filtro_deposito.getSelectedIndex() >= 0) {\n sql += \" and m.deposito = \" + cu.s(filtro_deposito.getSelectedKey());\n }\n sql += \" order by m.data desc, id desc\";\n System.out.println(\"sql movimenti: \" + sql);\n griglia.dbOpen(Db.getConn(), sql, Db.INSTANCE, true);\n griglia.dbSelezionaRiga();\n }", "private StringBuilder getSqlSelectContadorDocProrroga() {\n StringBuilder query = new StringBuilder();\n\n query.append(\" \");\n query.append(\" SELECT \\n\");\n query.append(\" PRO.ID_PRORROGA_ORDEN, \\n\");\n query.append(\" PRO.ID_ORDEN, \\n\");\n query.append(\" PRO.FECHA_CARGA, \\n\");\n query.append(\" PRO.RUTA_ACUSE,\\n\");\n query.append(\" PRO.CADENA_CONTRIBUYENTE, \\n\");\n query.append(\" PRO.FIRMA_CONTRIBUYENTE, \\n\");\n query.append(\" PRO.APROBADA, \\n\");\n query.append(\" PRO.ID_ASOCIADO_CARGA, \\n\");\n query.append(\" PRO.ID_AUDITOR, \\n\");\n query.append(\" PRO.ID_FIRMANTE, \\n\");\n query.append(\" PRO.RUTA_RESOLUCION, \\n\");\n query.append(\" PRO.CADENA_FIRMANTE, \\n\");\n query.append(\" PRO.FIRMA_FIRMANTE,\\n\");\n query.append(\" PRO.FECHA_FIRMA, \\n\");\n query.append(\" PRO.ID_ESTATUS, \\n\");\n query.append(\" PRO.FOLIO_NYV, \\n\");\n query.append(\" PRO.FECHA_NOTIF_NYV, \\n\");\n query.append(\" PRO.FECHA_NOTIF_CONT, \\n\");\n query.append(\" PRO.FECHA_SURTE_EFECTOS, \\n\");\n query.append(\" PRO.ID_NYV, \\n\");\n query.append(\" (SELECT COUNT(0) FROM \");\n query.append(FecetDocProrrogaOrdenDaoImpl.getTableName());\n query.append(\" DOCPRO WHERE PRO.ID_PRORROGA_ORDEN = DOCPRO.ID_PRORROGA_ORDEN) TOTAL_DOC_PRORROGA, \\n\");\n query.append(\" ASOCIADO.ID_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.RFC_CONTRIBUYENTE, \\n\");\n query.append(\" ASOCIADO.RFC, \\n\");\n query.append(\" ASOCIADO.ID_ORDEN, \\n\");\n query.append(\" ASOCIADO.ID_TIPO_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.NOMBRE, \\n\");\n query.append(\" ASOCIADO.CORREO, \\n\");\n query.append(\" ASOCIADO.TIPO_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.FECHA_BAJA, \\n\");\n query.append(\" ASOCIADO.FECHA_ULTIMA_MOD, \\n\");\n query.append(\" ASOCIADO.FECHA_ULTIMA_MOD_IDC, \\n\");\n query.append(\" ASOCIADO.MEDIO_CONTACTO, \\n\");\n query.append(\" ASOCIADO.ESTATUS, \\n\");\n query.append(\" ESTATUS.ID_ESTATUS, \\n\");\n query.append(\" ESTATUS.DESCRIPCION, \\n\");\n query.append(\" ESTATUS.MODULO, \\n\");\n query.append(\" ESTATUS.ID_MODULO \\n\");\n\n query.append(\"FROM \");\n query.append(getTableName());\n query.append(\" PRO \\n\");\n query.append(\" INNER JOIN FECEC_ESTATUS ESTATUS \\n\");\n query.append(\" ON PRO.ID_ESTATUS = ESTATUS.ID_ESTATUS \\n\");\n query.append(\" LEFT JOIN FECET_ASOCIADO ASOCIADO \\n\");\n query.append(\" ON PRO.ID_ASOCIADO_CARGA = ASOCIADO.ID_ASOCIADO \\n\");\n return query;\n }", "private void mbushetabelen() {\n try {\n Statement stmt = LidhjaMeDb.hapelidhjen();\n //CallableStatement stmt = conn.prepareCall(\"{call procedura1(?)}\");\n //stmt.setInt(1, 1);\n //ResultSet rs=stmt.executeQuery();\n String sql = \"SELECT kerkesat.kompania AS 'Kompania', llojet_lejes.lloji_lejes AS 'Lloji i Lejes'\"\n + \" ,kerkesat.adresa AS 'Adresa', kerkesat.tel AS 'Tel',kerkesat.data_pranimit AS 'Data e Pranimit'\"\n + \" ,kerkesat.nr_protokollit AS 'Numri i Protokollit', aktivitetet.aktiviteti AS 'Aktiviteti'\"\n + \" ,komunat.komuna AS 'Komuna', kerkesat.taksa AS 'Taksa', kerkesat.statusi_lendes AS 'Statusi i Lendes'\"\n + \" ,kerkesat.data_leshimit AS 'Data e Leshimit'\"\n + \" ,pergjigjjet_komisionit.pergjigjja AS 'Pergjigjja e Komisionit' FROM kerkesat \"\n + \" JOIN llojet_lejes ON kerkesat.idlloji = llojet_lejes.idlloji \"\n + \" JOIN aktivitetet ON kerkesat.idaktiviteti = aktivitetet.idaktiviteti \"\n + \" JOIN pergjigjjet_komisionit ON kerkesat.idpergjigjja = pergjigjjet_komisionit.idpergjigjja \"\n + \" JOIN komunat ON kerkesat.idkomuna=komunat.idkomuna \"\n + \"WHERE kompania LIKE '%\" + txtkompania.getText() + \"%' \"\n + \"AND aktiviteti like '%\" + (String) kmbaktiviteti.getSelectedItem() + \"%' \"\n + \"AND komuna like '%\" + (String) kmbkomunat.getSelectedItem() + \"%' \"\n + \"AND pergjigjja like '%\" + (String) kmbpergjigjja.getSelectedItem() + \"%' \"\n + \"AND data_pranimit >= '\" + new java.sql.Date(jdataprej.getDate().getTime()) + \"' AND data_pranimit <= '\" + new java.sql.Date(jdataderi.getDate().getTime()) + \"' \";\n System.out.println(sql);\n ResultSet rs = stmt.executeQuery(sql);\n tblkerkesat.setModel(DBUtils.resultSetToTableModel(rs));\n//boolean Zgjedhur=false;jTable1.addColumn(Zgjedhur);\n LidhjaMeDb.mbyllelidhjen();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "void defSelect(Variable var){\r\n \t//if (isSelectAll()){\r\n \t\taddSelect(var);\r\n \t//}\r\n }", "public List<Dishes> selectTian(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='Ìðµã' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "private static String db2selectFields() {\n return \"ID, EXTERNAL_ID, CREATED, CLAIMED, COMPLETED, MODIFIED, PLANNED, RECEIVED, DUE, NAME, \"\n + \"CREATOR, DESCRIPTION, NOTE, PRIORITY, MANUAL_PRIORITY, STATE, CLASSIFICATION_CATEGORY, \"\n + \"TCLASSIFICATION_KEY, CLASSIFICATION_ID, \"\n + \"WORKBASKET_ID, WORKBASKET_KEY, DOMAIN, \"\n + \"BUSINESS_PROCESS_ID, PARENT_BUSINESS_PROCESS_ID, OWNER, POR_COMPANY, POR_SYSTEM, \"\n + \"POR_INSTANCE, POR_TYPE, POR_VALUE, IS_READ, IS_TRANSFERRED, CUSTOM_1, CUSTOM_2, \"\n + \"CUSTOM_3, CUSTOM_4, CUSTOM_5, CUSTOM_6, CUSTOM_7, CUSTOM_8, CUSTOM_9, CUSTOM_10, \"\n + \"CUSTOM_11, CUSTOM_12, CUSTOM_13, CUSTOM_14, CUSTOM_15, CUSTOM_16, \"\n + \"CUSTOM_INT_1, CUSTOM_INT_2, CUSTOM_INT_3, CUSTOM_INT_4, CUSTOM_INT_5, \"\n + \"CUSTOM_INT_6, CUSTOM_INT_7, CUSTOM_INT_8\"\n + \"<if test=\\\"addClassificationNameToSelectClauseForOrdering\\\">, CNAME</if>\"\n + \"<if test=\\\"addAttachmentClassificationNameToSelectClauseForOrdering\\\">, ACNAME</if>\"\n + \"<if test=\\\"addAttachmentColumnsToSelectClauseForOrdering\\\">\"\n + \", ACLASSIFICATION_ID, ACLASSIFICATION_KEY, CHANNEL, REF_VALUE, ARECEIVED\"\n + \"</if>\"\n + \"<if test=\\\"addWorkbasketNameToSelectClauseForOrdering\\\">, WNAME</if>\"\n + \"<if test=\\\"joinWithUserInfo\\\">, ULONG_NAME </if>\";\n }", "protected void initializer() {\n\t\tselect = new DBSelect();\n\t\ttry {\n\t\t\tselect.setDriverName(\"com.ibm.as400.access.AS400JDBCDriver\");\n\t\t\tselect.setUrl(\"jdbc:as400://192.168.101.14\");\n\t\t\tselect.setCommand(\n\t\t\t\"SELECT DISTINCT artitda.codaat, articulo.descma, articulo.des1ma, articulo.des2ma, articulo.unvema, SUBSTR(VARCHAR(ARTITDA.CODAAT), 1, 2) as departamento, SUBSTR(VARCHAR(ARTITDA.CODAAT), 3, 2) as lineaseccion, costos.coslllca, artitda.prevat, artitda.impuat as impuesto, articulo.empvma as empaque, articulo.povema as descuentoempaque, articulo.deemma as descuentoempleado, articulo.esrema, articulo.fecama \t\t\tFROM SISTEMA.ARTICULO as articulo inner join COMPRAS.LMLCA03 as costos on (articulo.codama = costos.artillca) inner join COMPRAS.ARTITDA as artitda on (articulo.codama = artitda.codaat) \t\t\tWHERE artitda.codaat IN (SELECT articulo.codama FROM SISTEMA.ARTICULO as articulo, COMPRAS.ARTITDA as artitda \t\t\tWHERE (CAST (ARTITDA.TIENAT AS SMALLINT) = 3) AND (ARTICULO.ESREMA = 'V') AND (ARTITDA.EXACAT <> 0) AND ((SUBSTR(VARCHAR(ARTITDA.CODAAT), 1, 2) = '90') OR (ARTITDA.CODAAT < 3500000)) and (articulo.codama = artitda.codaat) )\"); \n\t\t\t\t//\"SELECT * FROM COMPRAS.ARTITDA, SISTEMA.ARTICULO WHERE (COMPRAS.ARTITDA.CODAAT = SISTEMA.ARTICULO.CODAMA) AND (CAST (COMPRAS.ARTITDA.TIENAT AS SMALLINT) = 3) AND (SISTEMA.ARTICULO.ESREMA = 'V') AND (COMPRAS.ARTITDA.EXACAT <> 0) AND ((SUBSTR(VARCHAR(COMPRAS.ARTITDA.CODAAT), 1, 2) = '90') OR (COMPRAS.ARTITDA.CODAAT < 3500000))\");\n\t\t\t//\"SELECT count(*) FROM SISTEMA.ARTICULO as articulo inner join COMPRAS.ARTITDA as artitda on (articulo.codama = artitda.codaat) WHERE (CAST (ARTITDA.TIENAT AS SMALLINT) = 3) AND (ARTICULO.ESREMA = 'V') AND (ARTITDA.EXACAT <> 0) AND ((SUBSTR(VARCHAR(ARTITDA.CODAAT), 1, 2) = '90') OR (ARTITDA.CODAAT < 3500000))\"\t\t\t\n\t\t\t//DBParameterMetaData parmMetaData = select.getParameterMetaData();\n\t\t} catch (SQLException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "protected String buildDataQuery() {\n StringBuilder sql = new StringBuilder(\"select\");\n String delim = \" \";\n for (String vname : getColumnNames()) {\n sql.append(delim).append(vname);\n delim = \", \";\n }\n \n Element ncElement = getNetcdfElement();\n \n String table = ncElement.getAttributeValue(\"dbTable\");\n if (table == null) {\n String msg = \"No database table defined. Must set 'dbTable' attribute.\";\n _logger.error(msg);\n throw new TSSException(msg);\n }\n sql.append(\" from \" + table);\n \n String predicate = ncElement.getAttributeValue(\"predicate\");\n if (predicate != null) sql.append(\" where \" + predicate);\n \n //Order by time.\n String tname = getTimeVarName();\n sql.append(\" order by \"+tname+\" ASC\");\n \n return sql.toString();\n }", "@Override\n\tpublic List<MyFoodDTO> selectAll() {\n\t\tString sql = \" SELECT * FROM view_식품정보 \";\n\t\tPreparedStatement pStr = null;\n\t\ttry {\n\t\t\tpStr = dbConn.prepareStatement(sql);\n\t\t\tList<MyFoodDTO> brList = this.select(pStr);\n\t\t\tpStr.close();\n\t\t\treturn brList;\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "protected void createSelectStatement() throws Exception\n {\n selectStatement = new SQLStatementWithParams();\n\n // Generate the SQL and collect all host variables needed to execute it later\n generateSelectClause( wrqInfo, selectStatement );\n generateFromClause( wrqInfo, selectStatement );\n generateWhereClause( wrqInfo, selectStatement );\n generateGroupingClause( wrqInfo, selectStatement );\n generateHavingClause( wrqInfo, selectStatement );\n generateOrderClause( wrqInfo, selectStatement );\n }", "@Override\n public List<DataDict> select(String condt)\n {\n List<DataDict> ddictList = null;\n ddictList = new LinkedList<DataDict>();\n try\n {\n String sql = \"select dict_id, dict_parent_id, dict_index , dict_name , dict_value from data_dict \";\n condt.trim();\n if (!condt.isEmpty())\n sql += \" where \" + condt;\n\n DBUtil db = new DBUtil();\n if (!db.openConnection())\n {\n System.out.print(\"fail to connect database\");\n return null;\n }\n ResultSet rst = db.execQuery(sql);\n\n if (rst != null)\n {\n while (rst.next())\n {\n DataDict ddict = new DataDict();\n ddict.setId(rst.getInt(\"dict_id\"));\n ddict.setSuperId(rst.getInt(\"dict_parent_id\"));\n ddict.setIndex(rst.getInt(\"dict_index\"));\n ddict.setName(rst.getString(\"dict_name\"));\n ddict.setValue(rst.getString(\"dict_value\"));\n ddictList.add(ddict);\n }\n }\n db.close(rst);\n db.close();\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n finally\n {\n\n }\n\n return ddictList;\n }", "Object executeSelectQuery(String sql) { return null;}", "protected void generateSelectClause( WrqInfo wrqInfo, SQLStatementWithParams sqlStatement ) throws BindingNotFoundException\n {\n StringBuilder sql = new StringBuilder();\n List<Element> boundVariables = new LinkedList<Element>();\n\n sql.append(\"SELECT \");\n Iterator<String> it = wrqInfo.getFullSelectListBRefs().iterator();\n String concat=\"\";\n while( it.hasNext() )\n {\n WrqBindingItem bi = wrqInfo.getAllBRefAggrs().get(it.next());\n sql.append(concat);\n // We may want to not calculate this value if another bRef part of Grouping Set is on (sub)total level\n // Typical case is the caption. It could be part of the Grouping Set itself but this keeps the query simpler, see scorecard\n if( wrqInfo.reqHasGroupingFunction() && wrqInfo.getGroupingBRefs().contains(bi.getSkipForTotals()) ) {\n String[] grpFM = DatabaseCompatibility.getInstance().getCalcFktMapping(wrqQueryBuilder.getJdbcResourceName()).get(\"Grouping\");\n WrqBindingItem sftBi = wrqInfo.getAllBRefs().get(bi.getSkipForTotals());\n sql.append(\"CASE WHEN \").append(grpFM[1]).append(sftBi.getQColumnExpression()).append(grpFM[3]).append(\" = 0 THEN \");\n sql.append(bi.getQColumnExpressionWithAggr()).append(\" END \");\n } else {\n sql.append(bi.getQColumnExpressionWithAggr()).append(\" \");\n }\n sql.append( bi.getAlias() );\n concat = \", \";\n boundVariables.addAll( bi.getBoundVariables() );\n }\n sqlStatement.append(sql.toString(), boundVariables, wrqInfo.getResultingBindingSet());\n }", "public SelectStatement getSelectStatement() {\r\n return selectStatement;\r\n }", "public List<Dishes> selectLU(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='³²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public ResultSet select(String pCampos, String pTabla, String pCondicion) {\n ResultSet rs = null; //obtener los datos del select\n Statement s = null; // se utiliza para inicializar la conexión\n String sentencia = \"\";\n try {\n s = this.conn.createStatement();\n sentencia = \" SELECT \" + pCampos + \" FROM \" + pTabla; // se crea el select\n if (!pCondicion.isEmpty()) {\n sentencia += \" WHERE \" + pCondicion;\n }\n rs = s.executeQuery(sentencia); // \n } catch (Exception e) {\n System.out.printf(\"Error: \" + e.toString());\n }\n return rs;\n }", "private void executeSelect(String query){\n try {\n statement = connection.createStatement();\n rs = statement.executeQuery(query);\n } catch (SQLException e) {\n throw new RuntimeException(e);\n } \n }", "public java.sql.ResultSet consultapormedicofecha2(String CodigoMedico,String fecha){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"SELECT phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo,su.usu_codigo,SUBSTRING(phm.horas,7,3) AS jornada FROM pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes,seg_datos_personales sdp,seg_usuario su WHERE pmd.codigo=\"+CodigoMedico+\" AND phm.fechas='\"+fecha+\"' AND phm.codMedico_fk = pmd.codigo AND pmd.codEspe_fk = pes.codigo AND sdp.numeroDocumento=pmd.numeroDocumento AND su.dat_codigo_fk=sdp.dat_codigo AND phm.fechas >= CURDATE() ORDER BY jornada,phm.horas \");\r\n \tSystem.out.println(\"SELECT phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo,su.usu_codigo,SUBSTRING(phm.horas,7,3) AS jornada FROM pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes,seg_datos_personales sdp,seg_usuario su WHERE pmd.codigo=\"+CodigoMedico+\" AND phm.fechas='\"+fecha+\"' AND phm.codMedico_fk = pmd.codigo AND pmd.codEspe_fk = pes.codigo AND sdp.numeroDocumento=pmd.numeroDocumento AND su.dat_codigo_fk=sdp.dat_codigo AND phm.fechas >= CURDATE() ORDER BY jornada,phm.horas \");\r\n \t\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultapormedicofecha \"+ex);\r\n }\t\r\n return rs;\r\n }", "private static void showsSqlSelectOnNormalEntityBean() {\n\n\t\tQuery<Bug> query = Ebean.createQuery(Bug.class, \"simple\");\n\t\tquery.where().eq(\"status.code\", \"ACTIVE\");\n\n\t\tList<Bug> list = query.findList();\n\n\t\tSystem.out.println(list);\n\t\t\n\t\tfor (Bug bug : list) {\n\t\t\tString body = bug.getBody();\n\t\t\tSystem.out.println(body);\n\t\t}\n\n\t}", "@Override\n protected void processSelect() {\n \n }", "protected abstract void select();", "public List<Dishes> selectChuan(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='´¨²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "@Override\n\tpublic List<StuXK> select() throws SQLException {\n\t\tList<StuXK> list=new ArrayList<StuXK>();\n\t\tString sql=\"select * from V_Stuxk \";\t\n\t\tBaseDAO dao=new BaseDAO();\t\n\t\tResultSet rs=dao.select(sql);\n\t\twhile(rs.next()){\t\n\t\t\tStuXK sxk=new StuXK();\n\t\t\tsxk.setCourseName(rs.getString(\"CourseName\"));\n\t\t\tsxk.setTeacherName(rs.getString(\"TeacherName\"));\n\t\t\tsxk.setWeekday(rs.getString(\"Weekday\"));\n\t\t\tsxk.setClassfestival(rs.getString(\"Classfestival\"));\n\t\t\tsxk.setClassRoomName(rs.getString(\"ClassRoomName\"));\n\t\t\tsxk.setCrediy(rs.getString(\"Crediy\"));\n\t\t\tsxk.setTeachTaskID(rs.getInt(\"ID\"));\n\t\t\tsxk.setProfessionName(rs.getString(\"ProfessionName\"));\n\t\t\tlist.add(sxk);\n\t\t}\n\t\treturn list;\n\t}", "private void llenarListado1() {\r\n\t\tString sql1 = Sentencia1()\r\n\t\t\t\t+ \" where lower(cab.descripcion) = 'concurso' \" + \"and (\"\r\n\t\t\t\t+ \"\t\tdet.id_estado_det = (\" + \"\t\t\t\tselect est.id_estado_det \"\r\n\t\t\t\t+ \"\t\t\t\tfrom planificacion.estado_det est \"\r\n\t\t\t\t+ \"\t\t\t\twhere lower(est.descripcion)='libre'\" + \"\t\t) \"\r\n\t\t\t\t+ \"\t\tor det.id_estado_det is null\" + \"\t) \"\r\n\t\t\t\t+ \" and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t\t+ \" AND det.activo=true\";\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO SIMPLIFICADO Se despliegan los puestos\r\n\t\t * PERMANENTES o CONTRATADOS, con estado = LIBRE o NULO Los puestos\r\n\t\t * deben ser de nivel 1\r\n\t\t */\r\n\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n\t\t\t\t.equalsIgnoreCase(CONCURSO_SIMPLIFICADO)) {\r\n\t\t\tsql1 += \" and cpt.nivel=1 and cpt.activo=true and (det.permanente is true or det.contratado is true) \";\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INSTITUCIONAL Se\r\n\t\t * despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_OPOSICION)) {\r\n\t\t\tsql1 += \" and det.permanente is true \";\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INTER INSTITUCIONAL\r\n\t\t * Se despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_INTERINSTITUCIONAL)) {\r\n\t\t\tsql1 += \" and det.permanente is true \";\r\n\t\t}\r\n\t\tString sql2 = Sentencia2()\r\n\t\t\t\t+ \" where lower(estado_det.descripcion) = 'en reserva' \"\r\n\t\t\t\t+ \"and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t\t+ \" and concurso.id_concurso = \" + concurso.getIdConcurso()\r\n\t\t\t\t+ \" and puesto_det.activo=true\";\r\n\r\n\t\tcargarLista(sql1, sql2);\r\n\t}", "@Select({\n \"select\",\n \"courseid, code, name, teacher, credit, week, day_detail1, day_detail2, location, \",\n \"remaining, total, extra, index\",\n \"from generalcourseinformation\",\n \"where courseid = #{courseid,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"courseid\", property=\"courseid\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"code\", property=\"code\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"teacher\", property=\"teacher\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"credit\", property=\"credit\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"week\", property=\"week\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"day_detail1\", property=\"day_detail1\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"day_detail2\", property=\"day_detail2\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"location\", property=\"location\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"remaining\", property=\"remaining\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"total\", property=\"total\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"extra\", property=\"extra\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"index\", property=\"index\", jdbcType=JdbcType.INTEGER)\n })\n GeneralCourse selectByPrimaryKey(String courseid);", "public static ResultSet selectAll(){\n String sql = \"SELECT Codigo, Nombre, PrecioC, PrecioV, Stock FROM articulo\";\n ResultSet rs = null;\n try{\n Connection conn = connect();\n Statement stmt = conn.createStatement();\n rs = stmt.executeQuery(sql);\n }\n catch(SQLException e) {\n System.out.println(\"Error. No se han podido sacar los productos de la base de datos.\");\n //Descomentar la siguiente linea para mostrar el mensaje de error.\n //System.out.println(e.getMessage());\n }\n return rs;\n }", "@Override\n public KlantBedrijf select(int id) {\n return null;\n }", "public Select getSelect()\n {\n return select;\n }", "@Override\n\tpublic ResultSet select() {\n\t\treturn null;\n\t}", "public List select(String sql, Object[] obj) {\n\t\treturn null;\n\t}", "public static String selectDef60CA42CC2D6246D6AF02CFED573960F1_4(ConnectionProvider connectionProvider, String FIN_Payment_IDR) throws ServletException {\n String strSql = \"\";\n strSql = strSql + \n \" SELECT ( COALESCE(TO_CHAR(TO_CHAR(COALESCE(TO_CHAR(table2.DocumentNo), ''))), '') || ' - ' || COALESCE(TO_CHAR(TO_CHAR(table2.Paymentdate, 'DD-MM-YYYY')), '') || ' - ' || COALESCE(TO_CHAR(TO_CHAR(COALESCE(TO_CHAR(table3.Name), ''))), '') || ' - ' || COALESCE(TO_CHAR(TO_CHAR(COALESCE(TO_CHAR(table2.Amount), ''))), '') ) as FIN_Payment_ID FROM FIN_Payment left join (select FIN_Payment_ID, DocumentNo, Paymentdate, C_Bpartner_ID, Amount from FIN_Payment) table2 on (FIN_Payment.FIN_Payment_ID = table2.FIN_Payment_ID)left join (select C_BPartner_ID, Name from C_BPartner) table3 on (table2.C_Bpartner_ID = table3.C_BPartner_ID) WHERE FIN_Payment.isActive='Y' AND FIN_Payment.FIN_Payment_ID = ? \";\n\n ResultSet result;\n String strReturn = \"\";\n PreparedStatement st = null;\n\n int iParameter = 0;\n try {\n st = connectionProvider.getPreparedStatement(strSql);\n QueryTimeOutUtil.getInstance().setQueryTimeOut(st, SessionInfo.getQueryProfile());\n iParameter++; UtilSql.setValue(st, iParameter, 12, null, FIN_Payment_IDR);\n\n result = st.executeQuery();\n if(result.next()) {\n strReturn = UtilSql.getValue(result, \"fin_payment_id\");\n }\n result.close();\n } catch(SQLException e){\n log4j.error(\"SQL error in query: \" + strSql + \"Exception:\"+ e);\n throw new ServletException(\"@CODE=\" + Integer.toString(e.getErrorCode()) + \"@\" + e.getMessage());\n } catch(Exception ex){\n log4j.error(\"Exception in query: \" + strSql + \"Exception:\"+ ex);\n throw new ServletException(\"@CODE=@\" + ex.getMessage());\n } finally {\n try {\n connectionProvider.releasePreparedStatement(st);\n } catch(Exception ignore){\n ignore.printStackTrace();\n }\n }\n return(strReturn);\n }", "private void yas(){\n System.out.println(namn);\n \n try{\n String fraga = \"SELECT TEXT FROM INLAGG WHERE RUBRIK = 'Borttappad strumpa'\";\n String XD = db.fetchSingle(fraga);\n System.out.println(XD);\n txtInlagg.append(XD);\n }\n catch(InfException e){\n JOptionPane.showMessageDialog(null, \"Kunde ej hämta inlägg\");\n }\n }", "public String selectByExample(CarExample example) {\n SQL sql = new SQL();\n if (example != null && example.isDistinct()) {\n sql.SELECT_DISTINCT(\"car_id\");\n } else {\n sql.SELECT(\"car_id\");\n }\n sql.SELECT(\"car_brand_id\");\n sql.SELECT(\"car_model\");\n sql.SELECT(\"car_type\");\n sql.SELECT(\"alias\");\n sql.SELECT(\"seat_type\");\n sql.SELECT(\"seat_num\");\n sql.SELECT(\"car_class\");\n sql.SELECT(\"guest_num\");\n sql.SELECT(\"luggage_num\");\n sql.SELECT(\"spell\");\n sql.SELECT(\"en_name\");\n sql.SELECT(\"updated_at\");\n sql.SELECT(\"created_at\");\n sql.FROM(\"`basedata_car`\");\n applyWhere(sql, example, false);\n \n if (example != null && example.getOrderByClause() != null) {\n sql.ORDER_BY(example.getOrderByClause());\n }\n \n String sqlStr = sql.toString();\n if(example.getPage()!=null){\n sqlStr = sqlStr+\" limit \"+example.getPage().getOffset()+\",\"+example.getPage().getLimit()+\"\";\n }\n return sqlStr;\n }", "@Select({\n \"select\",\n \"id_soggetto, codice_fiscale, id_asr, cognome, nome, data_nascita_str, comune_residenza_istat, \",\n \"comune_domicilio_istat, indirizzo_domicilio, telefono_recapito, data_nascita, id_soggetto_fk,\",\n \"asl_residenza, asl_domicilio, email, lat, lng, id_tipo_soggetto, utente_operazione, \",\n \"data_creazione, data_modifica, data_cancellazione, id_medico\",\n \"from soggetto_personale_scolastico\",\n \"where id_soggetto = #{idSoggetto,jdbcType=BIGINT}\"\n })\n @Results({\n @Result(column=\"id_soggetto\", property=\"idSoggetto\", jdbcType=JdbcType.BIGINT, id=true),\n @Result(column=\"codice_fiscale\", property=\"codiceFiscale\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_asr\", property=\"idAsr\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"cognome\", property=\"cognome\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"nome\", property=\"nome\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"data_nascita_str\", property=\"dataNascitaStr\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"comune_residenza_istat\", property=\"comuneResidenzaIstat\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"comune_domicilio_istat\", property=\"comuneDomicilioIstat\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"indirizzo_domicilio\", property=\"indirizzoDomicilio\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"telefono_recapito\", property=\"telefonoRecapito\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"data_nascita\", property=\"dataNascita\", jdbcType=JdbcType.DATE),\n @Result(column=\"asl_residenza\", property=\"aslResidenza\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"asl_domicilio\", property=\"aslDomicilio\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"email\", property=\"email\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"lat\", property=\"lat\", jdbcType=JdbcType.NUMERIC),\n @Result(column=\"lng\", property=\"lng\", jdbcType=JdbcType.NUMERIC),\n @Result(column=\"id_tipo_soggetto\", property=\"idTipoSoggetto\", jdbcType=JdbcType.INTEGER),\n @Result(column = \"id_soggetto_fk\", property = \"idSoggettoFk\", jdbcType = JdbcType.BIGINT),\n @Result(column=\"utente_operazione\", property=\"utenteOperazione\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"data_creazione\", property=\"dataCreazione\", jdbcType=JdbcType.TIMESTAMP),\n @Result(column=\"data_modifica\", property=\"dataModifica\", jdbcType=JdbcType.TIMESTAMP),\n @Result(column=\"data_cancellazione\", property=\"dataCancellazione\", jdbcType=JdbcType.TIMESTAMP),\n @Result(column=\"id_medico\", property=\"idMedico\", jdbcType=JdbcType.BIGINT)\n })\n SoggettoPersonaleScolastico selectByPrimaryKey(Long idSoggetto);", "public void parseSelect(StatementTree sTree) {\r\n\r\n\t}", "private String getSelectQuery() {\n String query = null;\n try {\n query = crudQueryComposer.composeReadQuery();\n } catch (MissingPropertyException e) {\n logger.error(e);\n }\n return query;\n }", "public void select(String komenda) throws Exception {\n komenda = komenda.substring(7);\n char[] zbiorSymboli = komenda.toCharArray();\n\n boolean wystapilaNazwaTablicy = false;\n boolean wystapilFROM = false;\n boolean wystapilWHERE = false;\n boolean wystapilaZmiana = false;\n boolean wystapilyKolumny = false;\n\n String temp = \"\";\n String kolumny = \"\";\n String nazwaTablicy = \"\";\n String warunek = \"\";\n\n // SELECT SYNTAX CHECKER\n for (int i = 0; i < zbiorSymboli.length; i++) {\n // ; - wyjscie\n if (i == zbiorSymboli.length - 1 || zbiorSymboli[i] == ';') {\n if (zbiorSymboli[i] != ';')\n throw new Exception(\"Oczekiwano ';'\");\n else {\n // to średnik ; i jest sens sprawdzac\n if (wystapilFROM == true & wystapilWHERE == true) {\n if (temp.matches(\".*[a-z].*\")) {\n warunek = temp; // bez srednika\n wystapilaZmiana = true;\n break;\n } else\n throw new Exception(\"Wprowadz warunek\");\n }\n if (wystapilyKolumny == true) {\n if (temp.matches(\".*[a-z].*\")) {\n nazwaTablicy = temp; // bez srednika\n wystapilaZmiana = true;\n break;\n } else\n throw new Exception(\"Wprowadz nazwe tablicy\");\n }\n }\n }\n\n if (temp.contains(\" FROM\")) {\n if (wystapilFROM == true)\n throw new Exception(\"Błąd składni, dwukrotne wystąpienie FROM!\");\n wystapilFROM = true;\n kolumny = temp.substring(0, temp.length() - 5);\n if (kolumny.matches(\".*[a-z].*\") || kolumny.contains(\"*\")) {\n wystapilyKolumny = true;\n temp = \"\";\n continue;\n } else\n throw new Exception(\"Kolumny nie zawieraja liter\");\n }\n\n if (temp.contains(\" WHERE\")) {\n if (wystapilWHERE == true)\n throw new Exception(\"Błąd składni, dwukrotne wystąpienie WHERE!\");\n\n wystapilWHERE = true;\n nazwaTablicy = temp.substring(0, temp.length() - 6);\n if (nazwaTablicy.matches(\".*[a-z].*\")) {\n wystapilaNazwaTablicy = true;\n temp = \"\";\n continue;\n } else\n throw new Exception(\"Nazwa tablicy nie zawiera liter\");\n }\n\n temp += zbiorSymboli[i];\n }\n\n if (wystapilaZmiana == false)\n throw new Exception(\"Błąd składni!\");\n\n if (czyIstniejeTabela(nazwaTablicy) == false)\n throw new Exception(\"Nie ma takiej tablicy\");\n\n temp = \"\";\n\n String[] zbiorKolumn = kolumny.replaceAll(\" \", \"\").split(\",\");\n String[] warunekKolumnaWartosc = warunek.replaceAll(\" \", \"\").split(\"=\");\n\n // SELECT co WHERE warunek\n if (wystapilWHERE == true) {\n if (warunek.contains(\"=\") == false)\n throw new Exception(\"Warunek musi skladac się z kolumna = tresc\");\n Tabela tabela = new Tabela();\n tabela = zbiorTabel.get(nazwaTablicy);\n tabela.wypiszKolumnyZTablicyGdzieKolumnaSpelniaWarunek(zbiorKolumn, warunekKolumnaWartosc);\n\n } else {\n // wypisz wszystkie kolumny / wypisz kolumne\n Tabela tabela = new Tabela();\n tabela = zbiorTabel.get(nazwaTablicy);\n\n for (String kolumna : zbiorKolumn) {\n if (kolumna.equals(\"*\")) {\n tabela.wypiszWszystkieKolumnyWrazZZawaroscia();\n break;\n } else\n tabela.wypiszZawartoscKolumny(kolumna);\n }\n }\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 }", "@Override\n\tpublic ArrayList select(String... args) throws SQLException {\n\t\treturn null;\n\t}", "String select(String name, String[] columns, String[] tablesList, String[] conds) {\n\n try {\n for (String tableName : tablesList) {\n\n if (tables.get(tableName) == null) {\n return \"ERROR: Table does not exist\";\n }\n }\n //Regular Select or Conditioned Selected? Pass to a new function accordingly\n if (conds != null) {\n Table t = (condSelect(name, columns, tablesList, conds));\n if (name.equals(\"temp\")) {\n tables.remove(name);\n return t.print();\n } else {\n tables.put(name, t);\n }\n return \"\";\n }\n Table t = (regularSelect(name, columns, tablesList));\n if (name.equals(\"temp\")) {\n tables.remove(name);\n return t.print();\n } else {\n tables.put(name, t);\n }\n return \"\";\n } catch (IndexOutOfBoundsException e) {\n return \"ERROR:\" + e;\n } catch (ArithmeticException e) {\n return \"ERROR: \" + e;\n }\n // Check if tables exist\n\n\n }", "private void selectAll() {\n //To change body of generated methods, choose Tools | Templates.\n \n tabelpulsa.setModel(model);\n model.getDataVector().removeAllElements();\n model.fireTableDataChanged();\n \n \n try {\n Connection c=koneksidb.getkoneksi();\n Statement s=c.createStatement();\n ResultSet r=s.executeQuery(\"select* from pulsa\");\n while(r.next()){\n Object[] pulsa = new Object[5]; \n pulsa[0]=r.getString(\"operator\");\n pulsa[1]=r.getString(\"id_pulsa\");\n pulsa[2]=r.getString(\"harga_default\");\n pulsa[3]=r.getString(\"harga_jual\");\n pulsa[4]=r.getString(\"harga_member\");\n model.addRow(pulsa);\n }\n }catch (SQLException e){\n System.out.println(\"terjadi error :\" +e);\n }\n }", "public void selectSomeField() {\n\t\tList<com.service.JpaSelectSpecificColumns.SubOrder> findAllSubOrder = springDataSelectSpecificColumns.findAllSubOrder();\n\t\tfindAllSubOrder.forEach(t -> System.out.println(t));\n\t}", "public void select() {}", "public void select();", "@Override\n\tpublic void select() {\n\t}", "@Select({ \"select\", \"priorita_id, priorita_cod, priorita_desc, validita_inizio, validita_fine, utente_operazione, \",\n\t\t\t\"data_creazione, data_modifica, data_cancellazione\", \"from d_notifica_priorita\",\n\t\t\t\"where priorita_id = #{prioritaId,jdbcType=INTEGER}\" })\n\t@Results({ @Result(column = \"priorita_id\", property = \"prioritaId\", jdbcType = JdbcType.INTEGER, id = true),\n\t\t\t@Result(column = \"priorita_cod\", property = \"prioritaCod\", jdbcType = JdbcType.VARCHAR),\n\t\t\t@Result(column = \"priorita_desc\", property = \"prioritaDesc\", jdbcType = JdbcType.VARCHAR),\n\t\t\t@Result(column = \"validita_inizio\", property = \"validitaInizio\", jdbcType = JdbcType.TIMESTAMP),\n\t\t\t@Result(column = \"validita_fine\", property = \"validitaFine\", jdbcType = JdbcType.TIMESTAMP),\n\t\t\t@Result(column = \"utente_operazione\", property = \"utenteOperazione\", jdbcType = JdbcType.VARCHAR),\n\t\t\t@Result(column = \"data_creazione\", property = \"dataCreazione\", jdbcType = JdbcType.TIMESTAMP),\n\t\t\t@Result(column = \"data_modifica\", property = \"dataModifica\", jdbcType = JdbcType.TIMESTAMP),\n\t\t\t@Result(column = \"data_cancellazione\", property = \"dataCancellazione\", jdbcType = JdbcType.TIMESTAMP) })\n\tDNotificaPriorita selectByPrimaryKey(Integer prioritaId);", "public static String getSelectQuery(boolean selectIDs)\r\n {\r\n\r\n String columnSetUp = getSelectColumns(selectIDs);\r\n\r\n String query = \"SELECT \" + columnSetUp + \" FROM Course \" + CourseTable.getTableAlias() + \" join Teacher \" + CourseTable.getTeacherAlias() + \" on \" + CourseTable.TEACHERID.getWithAlias() + \"=\" + CourseTable.getTeacherAlias() + \".\" + CourseTable.TEACHERID.getName()\r\n + \" join Subject \" + CourseTable.getSubjectAlias() + \" on \" + CourseTable.SUBJECTID.getWithAlias() + \"=\" + CourseTable.getSubjectAlias() + \".\" + CourseTable.SUBJECTID.getName() + \" join Category \" + CourseTable.getCategoryAlias() + \" on \" + CourseTable.SUBJECTCATEGORYID.getWithAlias() + \" = \" + CourseTable.getCategoryAlias() + \".\" + CourseTable.SUBJECTCATEGORYID.getName();\r\n\r\n return query;\r\n }", "public void selectQuery(String query) {\n\t\tQuery q = QueryFactory.create(query);\n\t\tQueryExecution qe = QueryExecutionFactory.create(q, model);\n\t\tResultSet result = qe.execSelect();\n\t\tprintResultSet(result);\n\t\tqe.close();\n\t}", "protected T selectImpl(String sql, String... paramentros) {\n\t\tCursor cursor = null;\n\t\ttry {\n\t\t\tcursor = BancoHelper.db.rawQuery(sql, paramentros);\n\t\t\t\n\t\t\tif (cursor.getCount() > 0 && cursor.moveToFirst()) {\n\t\t\t\treturn fromCursor(cursor);\n\t\t\t}\n\n\t\t\tthrow new RuntimeException(\"Não entrou no select\");\n\n\t\t} finally {\n\n\t\t\tif (cursor != null && !cursor.isClosed()) {\n\t\t\t\tcursor.close();\n\t\t\t}\n\t\t}\n\n\t}", "public static void selectAll() {\n\n String sql = \"SELECT id, level, score, hearts, sound ,speed, path FROM dateGame\";\n\n try (Connection conn = connect();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(sql)) {\n\n // loop through the result set\n while (rs.next()) {\n level = rs.getInt(\"level\");\n score = rs.getInt(\"score\");\n hearts = rs.getInt(\"hearts\");\n sound = rs.getInt(\"sound\");\n speed = rs.getInt(\"speed\");\n path = rs.getString(\"path\");\n\n System.out.println(rs.getInt(\"id\") + \"\\t\" +\n rs.getInt(\"level\") + \"\\t\" +\n rs.getInt(\"score\") + \"\\t\" +\n rs.getInt(\"hearts\") + \"\\t\" +\n rs.getInt(\"sound\") + \"\\t\" +\n rs.getInt(\"speed\") + \"\\t\" +\n rs.getString(\"path\"));\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "public static String todosLosEmpleados_baja(){\n String query=\"SELECT empleado.idEmpleado, persona.nombre, persona.apePaterno, persona.apeMaterno, empleado.codigo, empleado.fechaIngreso,persona.codigoPostal,persona.domicilio,\" +\n\"empleado.puesto, empleado.salario from persona inner join empleado on persona.idPersona=empleado.idPersona where activo=0;\";\n return query;\n }", "public void selectValuesFromTable(Connection conn) {\n\t// select queries\n\n\t\n\tthis.selectValuesIncidentTicketTables(conn);\n\n\n\t\n}", "private String createSelectWithNameAndAddress() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"SELECT * FROM client\");\n sb.append(\" WHERE name =?\");\n sb.append(\" AND address =?\");\n\n return sb.toString();\n }", "public void query(String sql) throws SQLException {\r\n Statement st = con.createStatement();\r\n ResultSet rs = st.executeQuery(sql);\r\n\r\n while (rs.next()){\r\n System.out.println(rs.getInt(\"id\")+\" \"+rs.getString(\"name\")+\" \"+rs.getString(\"surname\")+\" \"+rs.getFloat(\"grade\"));\r\n }\r\n\r\n }", "public ResultSet selectData(String sql) throws java.sql.SQLException {\n\t\treturn selectData(sql, -1);\n\t}", "protected String getSQLString() {\n \t\treturn queryTranslator.getSQLString();\n \t}", "public static String todosLosEmpleados(){\n String query=\"SELECT empleado.idEmpleado, persona.nombre, persona.apePaterno, persona.apeMaterno, empleado.codigo, empleado.fechaIngreso,persona.codigoPostal,persona.domicilio,\" +\n\"empleado.puesto, empleado.salario from persona inner join empleado on persona.idPersona=empleado.idPersona where activo=1;\";\n return query;\n }", "public void execute() throws SQLException {\n\t\ttry {\n\t\t\tselect.setUsername(\"INTRANET\");\n\t\t\tselect.setPassword(\"INTRANET\");\n\t\t\tselect.execute();\n\t\t}\n\n\t\t// Liberar recursos del objeto select.\n\t\tfinally {\n\t\t\tselect.close();\n\t\t}\n\t}", "@Override\n public SqlDatabaseTable select(SqlDatabaseTable table, List<SelectionRule> selectionRules) {\n StringBuilder sql = new StringBuilder();\n if (selectionRules.isEmpty()) {\n sql.append(\"SELECT 0 AS `id`\");\n } else {\n sql.append(\"SELECT 0 AS `id`\");\n for (int i = 0; i < selectionRules.size(); i++) {\n sql.append(\", \");\n SelectionRule rule = selectionRules.get(i);\n if (rule instanceof NullSelectionRule) {\n sql.append(\"NULL\");\n } else if (rule instanceof ConstantSelectionRule) {\n sql.append(\"'\").append(((ConstantSelectionRule) rule).getValue()).append(\"'\");\n } else if (rule instanceof VariableSelectionRule) {\n sql.append(\"`_\").append(((VariableSelectionRule) rule).getVariableIndex()).append(\"`\");\n }\n sql.append(\" AS `_\").append(i).append(\"`\");\n }\n sql.append(\" FROM \").append(table.getFullRef());\n }\n return new SqlDatabaseQueryTable(sql.toString(), selectionRules.size());\n }", "private String stageDetailsFromDB(String queryString){\n\t\tString RET=\"\";\n\t\ttry\n\t\t{\n\t\t\tcon = Globals.getDatasource().getConnection();\n\t\t\tps = con.prepareStatement(queryString); \n\t\t\tresult = ps.executeQuery();\n\t\t\tif (result.first()) {\n\t\t\t\tRET = result.getString(1);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\tcatch(SQLException sqle){sqle.printStackTrace();}\n\t\tfinally {\n\t\t Globals.closeQuietly(con, ps, result);\n\t\t}\n\t\treturn RET;\n\t}", "public List<TransferObject> select(WhereStatement whereClause){\r\n\t long start, end;\r\n\t start = (new java.util.Date()).getTime(); \r\n\t String tableName = this.getTableName();\r\n\t List<TransferObject> items = new ArrayList<TransferObject>();\r\n\t Cursor c = null;\r\n\t StatementArguments arguments = new StatementArguments(tableName);\r\n\t \r\n\t arguments.setWhereClause(whereClause.createWhereStatement().toString());\r\n\t SelectStatement sql = new SelectStatement(arguments);\r\n\t\ttry {\r\n\t\t\tc = getDb().rawQuery(sql.createStatement().toString(), whereClause.getArguments());\r\n\t\t\tLog.i(\"GPA\", sql.createStatement().toString());\r\n\t c.moveToFirst(); \r\n\t while(!c.isAfterLast()){ \r\n\t \tTransferObject bean = this.fill(c);\r\n\t \titems.add( bean ); \r\n\t \tc.moveToNext(); \r\n\t } \r\n\t c.close();\r\n\t return items;\r\n\t\t} catch (Exception e) {\r\n\t\t\tLog.e(\"GPALOG\" , e.getMessage(),e); \r\n\t\t}finally{\r\n\t\t\t if(c!=null){c.close();}\r\n\t end = (new java.util.Date()).getTime();\r\n\t Log.i(\"GPALOG\", \"Time to query: \" + (end - start) + \" ms\");\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public JwSqlSelect getSelect()\n {\n JwSqlSelect st = createSelect();\n populateSelectColumnsToCompose(st, ALIAS);\n st.from(TABLE, ALIAS);\n return st;\n }", "public JwSqlSelect getSelect()\n {\n JwSqlSelect st = createSelect();\n populateSelectColumnsToCompose(st, ALIAS);\n st.from(TABLE, ALIAS);\n return st;\n }", "@Override\r\npublic List<Possalesdetail> selectByExample(PossalesdetailExample example) {\n\treturn possalesdetail.selectByExample(example);\r\n}", "public String getWhere()\n {\n // StringBuffer ==> String\n return this.whSelect.toString(); \n }", "public String getFindByIdSql() {\r\n\t\treturn getSelectPrefix() + \" where NOTICEID=? \";\r\n\t}", "public void consultarDatos() throws SQLException {\n String instruccion = \"SELECT * FROM juegos.juegos\";\n try {\n comando = conexion.createStatement();\n resultados = comando.executeQuery(instruccion);\n } catch (SQLException e) {\n e.printStackTrace();\n throw e;\n }\n }", "void LlenarModelo(){\n datos.addColumn(\"ID\");\n datos.addColumn(\"Descripcion\");\n datos.addColumn(\"Cantidad\");\n String []ingresar=new String[4];\n try {\n Connection con = Conexion.getConection();\n Statement estado = con.createStatement();\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo>=\" + SIGEPSA.IDOtrosPagosMin + \";\");\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago ;\");\n ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo<9 or codigo>10 and activo = 1;\");\n while(resultado.next()){\n ingresar[0]=String.valueOf((String)resultado.getObject(\"CODIGO\").toString());\n ingresar[1]=String.valueOf((String)resultado.getObject(\"DESCRIPCION\").toString());\n ingresar[2]=String.valueOf((String)resultado.getObject(\"CANTIDAD\").toString());\n datos.addRow(ingresar);\n }\n }catch (Exception ex) {\n \n }\n }", "@Select({\n \"select\",\n \"JNLNO, TRANDATE, ACCOUNTDATE, CHECKTYPE, STATUS, DONETIME, FILENAME\",\n \"from B_UMB_CHECKING_LOG\",\n \"where JNLNO = #{jnlno,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"JNLNO\", property=\"jnlno\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"TRANDATE\", property=\"trandate\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"ACCOUNTDATE\", property=\"accountdate\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"CHECKTYPE\", property=\"checktype\", jdbcType=JdbcType.CHAR),\n @Result(column=\"STATUS\", property=\"status\", jdbcType=JdbcType.CHAR),\n @Result(column=\"DONETIME\", property=\"donetime\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"FILENAME\", property=\"filename\", jdbcType=JdbcType.VARCHAR)\n })\n BUMBCheckingLog selectByPrimaryKey(BUMBCheckingLogKey key);", "public String getFindByIdSql() {\r\n\t\treturn getSelectPrefix() + \" and XH=? \";\r\n\t}", "public void nom_ven(){\n \n String SQL_select = \"SELECT Nombres FROM `vendedor` WHERE User = '\"+login.a+\"'\";\n String lolo = \"\";\n try {\n ps = con.getConnection().prepareStatement(SQL_select);\n RS = ps.executeQuery();\n while (RS.next()) { \n lolo = RS.getString(1);\n }\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"no encontro el usuario\");\n }\n \n txtVendedor.setText(lolo);\n }", "public abstract Statement queryToRetrieveData();", "private void table(String where_condition){\n \n String query = \"SELECT reports.id,patients.patient_name,reports.report,doctors.doctor_name,reports.admitted FROM reports INNER JOIN patients on reports.patient_id = patients.id INNER JOIN doctors on reports.doctor_id = doctors.id WHERE (reports.patient_id = \"+global_patient_id+\") \"+where_condition+\" ORDER BY reports.id DESC\" ;\n\n ResultSet rs = null;\n \n try\n {\n rs = database().prepareStatement(query).executeQuery();\n displayTable.setModel(DbUtils.resultSetToTableModel(rs));\n displayTable.setVisible(true);\n }\n catch(Exception ex)\n { JOptionPane.showMessageDialog(null,ex); }\n}", "public List<Dishes> selectHuai(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='»´Ñï²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }" ]
[ "0.70033354", "0.6966904", "0.69455135", "0.6773513", "0.6515893", "0.6504965", "0.641164", "0.6283273", "0.6215858", "0.6196345", "0.6188408", "0.61570597", "0.6133962", "0.61303574", "0.61246467", "0.611411", "0.6099005", "0.60971147", "0.6089534", "0.6077596", "0.6077596", "0.60761905", "0.60599166", "0.60539395", "0.60523885", "0.60463065", "0.60319424", "0.602312", "0.601469", "0.600522", "0.5974763", "0.59705573", "0.59689295", "0.5959051", "0.5953495", "0.59476024", "0.5933193", "0.5932455", "0.59319097", "0.5911183", "0.59077305", "0.5898726", "0.58953047", "0.58894604", "0.5888184", "0.5884823", "0.5878814", "0.5877689", "0.5872004", "0.58694404", "0.58558214", "0.5849081", "0.5845805", "0.58430594", "0.58254033", "0.58201104", "0.580477", "0.57829666", "0.57792145", "0.5778993", "0.5776595", "0.57762754", "0.57654107", "0.5760862", "0.57492286", "0.5736046", "0.57280296", "0.5727153", "0.57069194", "0.5705255", "0.57048553", "0.5702285", "0.5701173", "0.5700414", "0.56928444", "0.5689402", "0.56884646", "0.56867945", "0.56863123", "0.5677932", "0.56756574", "0.5673725", "0.56688374", "0.5665557", "0.5658736", "0.5657851", "0.5654198", "0.56518954", "0.56485194", "0.56485194", "0.5641987", "0.5638316", "0.5638262", "0.5633994", "0.56325656", "0.56315845", "0.5628499", "0.5628358", "0.56214005", "0.5618655", "0.56170255" ]
0.0
-1
Deze methode geeft een lijst met beheerders uit de resultset van de database terug.
private ArrayList<Beheerder> fillListFromResultSet(ResultSet resultSet, ArrayList<Beheerder> beheerders) throws SQLException{ while (resultSet.next()) { Beheerder beheerder = new Beheerder(); beheerder.setId(resultSet.getInt("id")); beheerder.setVoornaam(resultSet.getString("voornaam")); beheerder.setAchternaam(resultSet.getString("achternaam")); beheerder.setAdres(resultSet.getString("adres")); beheerder.setPostcode(resultSet.getString("postcode")); beheerder.setWoonplaats(resultSet.getString("woonplaats")); beheerder.setTelefoon(resultSet.getString("telefoon")); beheerder.setEmail(resultSet.getString("email")); beheerder.setWachtwoord(resultSet.getString("wachtwoord")); beheerder.setRechten_id(resultSet.getInt("rechten_id")); beheerder.setActief(resultSet.getBoolean("isactief")); beheerders.add(beheerder); } return beheerders; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public List<Beheerder> select() {\n ArrayList<Beheerder> beheerders = new ArrayList<>();\n Connection connection = createConnection();\n try {\n PreparedStatement preparedStatement = connection.prepareStatement(\"SELECT * FROM gebruiker ORDER BY id;\");\n ResultSet resultSet = preparedStatement.executeQuery();\n beheerders = fillListFromResultSet(resultSet, beheerders);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n closeConnection(connection);\n return beheerders;\n }", "ArrayList<Bet> takeBets(ResultSet set) throws SQLException;", "public List<Usuarios> getUsuarios(){ //retorna una lista con todos los Usuarios en la database\n List<Usuarios> listaUsuarios = new ArrayList<Usuarios>();\n conexion = base.GetConnection();\n try{\n String consulta = \"select Cedula from usuarios\";\n PreparedStatement select = conexion.prepareStatement(consulta);\n boolean r = select.execute();\n if(r){\n ResultSet result = select.getResultSet();\n while(result.next()){\n Usuarios usuario = new Usuarios(result.getString(1));\n System.out.println(usuario);\n listaUsuarios.add(usuario);\n }\n result.close();\n }\n conexion.close();\n }catch(SQLException ex){\n System.out.println(ex.toString());\n }\n return listaUsuarios;\n}", "private void getScholsFromDatabase() {\n schols = new Select().all().from(Scholarship.class).execute();\n }", "@Override\n public Collection<FasciaOrariaBean> doRetrieveAll() throws SQLException {\n Connection con = null;\n PreparedStatement statement = null;\n String sql = \"SELECT * FROM fasciaoraria\";\n ArrayList<FasciaOrariaBean> collection = new ArrayList<>();\n try {\n con = DriverManagerConnectionPool.getConnection();\n statement = con.prepareStatement(sql);\n System.out.println(\"DoRetriveAll\" + statement);\n ResultSet rs = statement.executeQuery();\n while (rs.next()) {\n FasciaOrariaBean bean = new FasciaOrariaBean();\n bean.setId(rs.getInt(\"id\"));\n bean.setFascia(rs.getString(\"fascia\"));\n collection.add(bean);\n }\n return collection;\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n\n try {\n\n statement.close();\n DriverManagerConnectionPool.releaseConnection(con);\n\n } catch (SQLException e) {\n\n e.printStackTrace();\n }\n }\n return collection;\n }", "public ArrayList<Info_laboral> findAll(){\n ConexionBD con = new ConexionBD();\n Connection c = con.conOracle();\n\n ArrayList<Info_laboral> eeg = new ArrayList();\n\n try{\n ResultSet gs = con.ejecutaCon(\" Select * from Info_laboral\"); \n while(gs.next()){\n \n Estudios_Egresado ee=new Estudios_Egresado();\n Info_laboral i =new Info_laboral();\n Egresado eg = new Egresado();\n Estudios es = new Estudios();\n \n i.setId(gs.getInt(1));\n i.setJefe(gs.getString(2));\n i.setCargo(gs.getString(3));\n i.setFuncion(gs.getString(4));\n i.setFecha_ini(gs.getDate(5));\n i.setFecha_fin(gs.getDate(6));\n i.setMotivo_retiro(gs.getString(7));\n eg.setId(gs.getLong(8));\n i.setId_egresado(eg);\n i.setPerfil(gs.getString(9));\n \n eeg.add(i);\n }\n }catch(SQLException e){\n System.out.println(\"error \"+e);\n return null;\n }\n return eeg;\n }", "public List<TblRetur>getAllDataRetur();", "public List<Sale> saleListSong() {\n List<Sale> saleList = new ArrayList<Sale>();\n\n try {\n conn = DBConnection.getConnection();\n stm = conn.createStatement();\n result = stm.executeQuery(\"SELECT * FROM disquera.sale \"\n + \"join disquera.song on sale.id_song=song.id_song \"\n + \"join disquera.artist on song.id_artist=artist.id_artist \"\n + \"join disquera.album on song.id_album=album.id_album\");\n //result_album = stm.executeQuery(\"SELECT * FROM disquera.sale join disquera.album on sale.id_album=album.id_album\");\n //result_artist=stm.executeQuery(\"SELECT * FROM disquera.sale join disquera.artist on sale.id_artist=artist.id_artist\");\n while (result.next()) {\n Sale newSale = new Sale();\n newSale.setId_sale(result.getInt(1));\n newSale.setId_song(result.getInt(2));\n newSale.setPrice(result.getDouble(3));\n newSale.setId_album(result.getInt(4));\n newSale.setId_user(result.getInt(5));\n newSale.setId_genre(result.getInt(6));\n newSale.setSongName(result.getString(10));\n newSale.setArtistName(result.getString(14));\n newSale.setAlbumName(result.getString(20));\n\n System.out.println(\"\\n\\n Received data: \\n Id: \" + newSale.getId_sale() + \"\\nPrecio: \" + newSale.getPrice());\n saleList.add(newSale);\n /*\n System.out.println(\"No existe un usuario con esa contraseña\");\n conn.close();\n return null;\n */\n }\n result.close();\n stm.close();\n conn.close();\n } catch (SQLException ex) {\n ex.getStackTrace();\n return null;\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(DAOGenre.class.getName()).log(Level.SEVERE, null, ex);\n }\n return saleList;\n }", "public List<Sale> saleListGenre() {\n List<Sale> saleList = new ArrayList<Sale>();\n\n try {\n conn = DBConnection.getConnection();\n stm = conn.createStatement();\n result = stm.executeQuery(\"SELECT * FROM disquera.sale \\n\"\n + \"join disquera.genre on sale.id_genre=genre.id_genre\");\n //result_album = stm.executeQuery(\"SELECT * FROM disquera.sale join disquera.artist on sale.id_artist=artist.id_artist\");\n //result_artist=stm.executeQuery(\"SELECT * FROM disquera.sale join disquera.artist on sale.id_artist=artist.id_artist\");\n while (result.next()) {\n Sale newSale = new Sale();\n newSale.setId_sale(result.getInt(1));\n newSale.setId_album(result.getInt(4));\n newSale.setId_user(result.getInt(5));\n newSale.setId_genre(result.getInt(6));\n //newSale.setSongName(result.getString(10));\n //newSale.setAlbumName(result_album.getString(8));\n newSale.setGenre(result.getString(8));\n\n System.out.println(\"\\n\\n Received data: \\n Id: \" + newSale.getId_sale() + \"\\nPrecio: \" + newSale.getPrice());\n saleList.add(newSale);\n /*\n System.out.println(\"No existe un usuario con esa contraseña\");\n conn.close();\n return null;\n */\n }\n result.close();\n stm.close();\n conn.close();\n } catch (SQLException ex) {\n ex.getStackTrace();\n return null;\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(DAOGenre.class.getName()).log(Level.SEVERE, null, ex);\n }\n return saleList;\n }", "@Override\n\tpublic ArrayList<ClienteFisico> listar() throws SQLException {\n\t\t\n\t\tArrayList<ClienteFisico> listar = new ArrayList<ClienteFisico>();\n\t\t\n\t\t\n\t\tfor(ClienteFisico c : this.set){\n\t\t\t\n\t\t\tlistar.add(c);\n\t\t}\n\t\n\t\t\n\t\treturn listar;\n\t}", "public List<Aflevering> readAll() {\n List<Aflevering> lijst = new ArrayList<>();\n try {\n ResultSet rs = sqlConnection.executeSql(\"SELECT * FROM AFLEVERING\");\n while(rs.next()) {\n lijst.add(new Aflevering(rs.getString(\"ID\"),\n rs.getString(\"Serie\"),\n rs.getString(\"Seizoen\"),\n rs.getString(\"Titel\"),\n rs.getString(\"Tijdsduur\")));\n }\n }\n catch(Exception e) {\n System.out.println(e);\n }\n return lijst;\n }", "public ArrayList<rubro> obtenerTodoslosRubros() {\n ArrayList<rubro> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n PreparedStatement pr = conn.prepareStatement(\"select id_rubro , nombre, descripcion, estado, ruta \\n\"\n + \" from rubros \");\n\n ResultSet rs = pr.executeQuery();\n\n while (rs.next()) {\n int id = rs.getInt(1);\n String nombre = rs.getString(2);\n String descripcion = rs.getString(3);\n boolean estado = rs.getBoolean(4);\n String ruta = rs.getString(5);\n\n rubro r = new rubro(id, nombre, estado, descripcion, ruta);\n\n lista.add(r);\n }\n\n rs.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n\n }", "@Override\n\tprotected List<?> processResult(ResultSet rs) throws SQLException {\n\t\tList<Book> aList=new ArrayList<Book>();\n\t\t\n\t\twhile(rs.next()){\n\t\t\tBook a=new Book ();\n\t\t\ta.setBookId(rs.getInt(\"bookId\"));\n\t\t\ta.setTitle(rs.getString(\"title\"));\n\t\t\t\n\t\t\taList.add(a);\n\t\t\t\n\t\t}\n\t\treturn aList;\n\t}", "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 }", "private List<FollowItem> query(String sql)\r\n {\r\n DbManager db=new DbManager();\r\n ResultSet rs=null;\r\n List<FollowItem> list=new ArrayList<FollowItem>();\r\n rs = db.getRs(sql);\r\n try {\r\n while(rs.next())\r\n {\r\n FollowItem followItem = new FollowItem();\r\n followItem.setUserId(rs.getInt(\"UserID\"));\r\n followItem.setListingId(rs.getInt(\"ListingID\"));\r\n \r\n list.add(followItem);\r\n }\r\n } catch (SQLException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n } finally{\r\n db.destory();\r\n }\r\n return list;\r\n }", "@Override\n\tpublic List<WanchengPO> mapRow(ResultSet rs) throws Exception {\n\t\treturn null;\n\t}", "public KTableModelScheduleChange(ResultSet rs) {\n ResultSets=new ArrayList<String[]>(); \n try{\n while(rs.next()){\n String[] row={\n rs.getString(\"short_name\"),rs.getString(\"name\"),rs.getString(\"surname\"), rs.getString(\"hours_today\"), rs.getString(\"hours_count_s\"), rs.getString(\"hours_count_t\"), rs.getString(\"hours_t\"), rs.getString(\"debt\")\n };\n String[] row1={\n rs.getString(\"short_name\"),rs.getString(\"name\"),rs.getString(\"surname\"), rs.getString(\"hours_today\"), rs.getString(\"hours_count_s\"), rs.getString(\"hours_count_d\"), rs.getString(\"hours_d\"), rs.getString(\"debt\")\n };\n if (MainForm_v2.week==1){\n ResultSets.add(row);}\n else {\n ResultSets.add(row1);}\n }}\n catch(Exception e){\n e.printStackTrace(MainForm_v2.er);\n System.out.println(\"Ошибка в получение информации из базы данных для таблицы Расписание Замен\");\n }\n }", "public ArrayList<oferta> listadoOfertaxComercio(int idComercio) {\n ArrayList<oferta> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n PreparedStatement st = conn.prepareStatement(\"select o.nombre, o.cantidad, o.precio , c.id_comercio, id_oferta, descripcion, fecha, o.ruta, o.estado\\n\"\n + \"from Comercios c \\n\"\n + \"join Ofertas o on c.id_comercio = o.id_comercio \\n\"\n + \"where c.id_comercio = ?\");\n st.setInt(1, idComercio);\n ResultSet rs = st.executeQuery();\n\n while (rs.next()) {\n String nombreO = rs.getString(1);\n int cantidad = rs.getInt(2);\n Float precio = rs.getFloat(3);\n int id = rs.getInt(4);\n int ido = rs.getInt(5);\n String descripcion = rs.getString(6);\n String fecha = rs.getString(7);\n String ruta = rs.getString(8);\n boolean estado = rs.getBoolean(9);\n\n rubro rf = new rubro(0, \"\", true, \"\", \"\");\n comercio c = new comercio(\"\", \"\", \"\", id, true, \"\", \"\", rf, \"\");\n oferta o = new oferta(ido, nombreO, cantidad, precio, c, estado, descripcion, fecha,ruta );\n\n lista.add(o);\n }\n\n st.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n }", "java.util.List<io.dstore.engine.procedures.FoModifyForumsInCategoriesAd.Response.Row> \n getRowList();", "public ArrayList < Dataclass > getData() {\n ArrayList < Dataclass > dataList = new ArrayList < Dataclass > ();\n Connection connection = getConnection();\n String query = \"SELECT * FROM `przychodnia` \";\n if (option == 1) query = \"SELECT * FROM `lekarz` \";\n if (option == 2) query = \"SELECT * FROM `wizyta` \";\n if (option == 3) query = \"SELECT * FROM `badanie` \";\n Statement st;\n ResultSet rs;\n\n try {\n st = connection.createStatement();\n rs = st.executeQuery(query);\n Dataclass dc;\n while (rs.next()) {\n if (option == 1) dc = new Dataclass(rs.getInt(\"ID\"), rs.getString(\"Imię\"), rs.getString(\"Nazwisko\"), rs.getString(\"Specjalizacja\"), rs.getInt(\"ID_Przychodni\"));\n else if (option == 2) dc = new Dataclass(rs.getInt(\"ID\"), rs.getString(\"Data\"), rs.getString(\"Opis Badania\"), rs.getString(\"Imię i nazwisko pacjenta\"), rs.getInt(\"ID_Lekarza\"));\n else if (option == 3) dc = new Dataclass(rs.getInt(\"ID\"), rs.getString(\"Data\"), rs.getBlob(\"Załącznik\"));\n else dc = new Dataclass(rs.getInt(\"ID\"), rs.getString(\"Nazwa\"), rs.getString(\"Adres\"), rs.getString(\"Miasto\"));\n dataList.add(dc);\n }\n } catch (Exception e) {\n System.err.print(e);\n }\n return dataList;\n }", "private static void selectRecordsFromDbUserTable() throws SQLException {\n\n\t\tConnection dbConnection = null;\n\t\tStatement statement = null;\n\n\t\tString selectTableSQL = \"SELECT * from spelers\";\n\n\t\ttry {\n\t\t\tdbConnection = getDBConnection();\n\t\t\tstatement = dbConnection.createStatement();\n\n\t\t\tSystem.out.println(selectTableSQL);\n\n\t\t\t// execute select SQL stetement\n\t\t\tResultSet rs = statement.executeQuery(selectTableSQL);\n\n\t\t\twhile (rs.next()) {\n \n String naam = rs.getString(\"naam\");\n\t\t\t\tint punten = rs.getInt(\"punten\");\n \n System.out.println(\"naam : \" + naam);\n\t\t\t\tSystem.out.println(\"punten : \" + punten);\n\t\t\t\t\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\n\t\t\tSystem.out.println(e.getMessage());\n\n\t\t} finally {\n\n\t\t\tif (statement != null) {\n\t\t\t\tstatement.close();\n\t\t\t}\n\n\t\t\tif (dbConnection != null) {\n\t\t\t\tdbConnection.close();\n\t\t\t}\n\n\t\t}\n\n\t}", "public List<Beheerder> selectActive(){\n ArrayList<Beheerder> beheerders = new ArrayList<>();\n Connection connection = createConnection();\n try {\n PreparedStatement preparedStatement = connection.prepareStatement(\"SELECT * FROM gebruiker WHERE isactief = true ORDER BY id;\");\n ResultSet resultSet = preparedStatement.executeQuery();\n beheerders = fillListFromResultSet(resultSet, beheerders);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n closeConnection(connection);\n return beheerders;\n }", "void all_Data_retrieve() {\n\t\tStatement stm=null;\n\t\tResultSet rs=null;\n\t\ttry{\n\t\t\t//Retrieve tuples by executing SQL command\n\t\t stm=con.createStatement();\n\t String sql=\"select * from \"+tableName+\" order by id desc\";\n\t\t rs=stm.executeQuery(sql);\n\t\t DataGUI.model.setRowCount(0);\n\t\t //Add rows to table model\n\t\t while (rs.next()) {\n Vector<Object> newRow = new Vector<Object>();\n //Add cells to each row\n for (int i = 1; i <=colNum; i++) \n newRow.addElement(rs.getObject(i));\n DataGUI.model.addRow(newRow);\n }//end of while\n\t\t //Catch SQL exception\n }catch (SQLException e ) {\n \te.printStackTrace();\n\t } finally {\n\t \ttry{\n\t if (stm != null) stm.close(); \n\t }\n\t \tcatch (SQLException e ) {\n\t \t\te.printStackTrace();\n\t\t }\n\t }\n\t}", "public List<Bill> getBill() {\n\tString sql =\"SELECT * FROM bills JOIN employees e on bills.Id_employees = e.Id_employees JOIN food f on bills.Id_food = f.Id_food\";\n\tList<Bill> list = new ArrayList<Bill>();\n\ttry {\n\t\tPreparedStatement preparedStatement = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\tResultSet resultSet = preparedStatement.executeQuery();\n\t\t\n\t\twhile(resultSet.next()) {\n\t\t\tBill getBill = new Bill();\n\t\t\tgetBill.setId(resultSet.getInt(\"Id_bills\"));\n\t\t\tgetBill.setFood(resultSet.getString(\"Name\"));\n\t\t\tgetBill.setEmployyes(resultSet.getString(\"Name_and_surname\"));\n\t\t\tgetBill.setPrice(resultSet.getDouble(\"Price\"));\n\t\t\tgetBill.setSerialNumber(resultSet.getString(\"Serial_Number_Bill\"));\n\t\t\tgetBill.setTotal(resultSet.getDouble(\"TOTAL\"));\n\t\t\tlist.add(getBill);\n\t\t}\n\t\t\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\treturn list;\n}", "List<Bill> all() throws SQLException;", "public ArrayList<ArrayList<Integer>> selectForQuoiEntre(int id) throws DAOException;", "public ArrayList<clsPago> consultaDataPagosCuotaInicial(int codigoCli)\n { \n ArrayList<clsPago> data = new ArrayList<clsPago>(); \n try{\n bd.conectarBaseDeDatos();\n sql = \" SELECT a.id_pagos_recibo idPago, a.id_usuario, b.name name_usuario, \"\n + \" a.referencia referencia, \"\n + \" a.fecha_pago fecha_pago, a.estado, \"\n + \" a.valor valor_pago, a.id_caja_operacion, e.name_completo nombre_cliente, \"\n + \" a.fecha_pago fecha_registro\"\n + \" FROM ck_pagos_recibo AS a\"\n + \" JOIN ck_usuario AS b ON a.id_usuario = b.id_usuario\"\n + \" JOIN ck_cliente AS e ON a.codigo = e.codigo\"\n + \" WHERE a.estado = 'A'\"\n + \" AND a.cuota_inicial = 'S'\"\n + \" AND a.estado_asignado = 'N'\"\n + \" AND a.codigo = \" + codigoCli; \n \n System.out.println(sql);\n bd.resultado = bd.sentencia.executeQuery(sql);\n \n if(bd.resultado.next())\n { \n do \n { \n clsPago oListaTemporal = new clsPago();\n \n oListaTemporal.setReferencia(bd.resultado.getString(\"referencia\"));\n oListaTemporal.setFechaPago(bd.resultado.getString(\"fecha_pago\"));\n oListaTemporal.setNombreUsuario(bd.resultado.getString(\"name_usuario\"));\n oListaTemporal.setNombreCliente(bd.resultado.getString(\"nombre_cliente\"));\n oListaTemporal.setValor(bd.resultado.getDouble(\"valor_pago\"));\n oListaTemporal.setFechaRegistro(bd.resultado.getString(\"fecha_registro\"));\n oListaTemporal.setIdPago(bd.resultado.getInt(\"idPago\"));\n data.add(oListaTemporal);\n }\n while(bd.resultado.next()); \n //return data;\n }\n else\n { \n data = null;\n } \n }\n catch(Exception ex)\n {\n System.out.print(ex);\n data = null;\n } \n bd.desconectarBaseDeDatos();\n return data;\n }", "public List<Bill> getDrinkforBill() {\n\t\n\tString sql = \"SELECT * FROM bills join employees e on bills.Id_employees = e.Id_employees join drink d on bills.Id_drink = d.Id_drink\";\n\t\n\tList<Bill>getDrinkForBill = new ArrayList<Bill>();\n\t\n\ttry {\n\t\tPreparedStatement ps = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\tResultSet rs = ps.executeQuery();\n\t\t\n\t\twhile(rs.next()) {\n\t\t\t\n\t\t\tBill drinkBill = new Bill();\n\t\t\tdrinkBill.setId(rs.getInt(\"Id_bills\"));\n\t\t\tdrinkBill.setDrink(rs.getString(\"Name_Drink\"));\n\t\t\tdrinkBill.setEmployyes(rs.getString(\"Name_and_surname\"));\n\t\t\tdrinkBill.setPrice(rs.getDouble(\"Price\"));\n\t\t\tdrinkBill.setSerialNumber(rs.getString(\"Serial_Number_Bill\"));\n\t\t\tdrinkBill.setTotal(rs.getDouble(\"TOTAL\"));\n\t\t\t\n\t\t\tgetDrinkForBill.add(drinkBill);\n\t\t\t\n\t\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} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\t\n\t\n\treturn getDrinkForBill;\n}", "public List<NewsItem> getNewsItemDataFromDB() throws SQLException;", "private List<Budget> listResults(ResultSet rs) throws SQLException{\n List<Budget> found = new ArrayList<Budget>();\n while (rs.next()){\n Budget x = new Budget();\n x.setDescription(rs.getString(\"bud_description\"));\n x.setCategory(rs.getString(\"bud_category\"));\n x.setBudgetAmount(rs.getDouble(\"bud_budgeted_amount\"));\n x.setActualAmount(rs.getDouble(\"bud_actual_amount\"));\n x.setId(rs.getInt(\"bud_key_id\"));\n }\n return found;\n }", "public List<Revista> getRevistas(){\n List<Revista> revistas = new ArrayList<>();\n Revista r = null;\n String id, nome, categoria, nrConsultas, editorID, empresaID;\n LocalDate edicao;\n\n\n try {\n connection = con.connect();\n PreparedStatement stm = connection.prepareStatement(\"SELECT * FROM Revista\");\n ResultSet rs = stm.executeQuery();\n\n while(rs.next()){\n id = rs.getString(\"ID\");\n nome = rs.getString(\"Nome\");\n edicao = rs.getDate(\"Edicao\").toLocalDate();\n categoria = rs.getString(\"Categoria\");\n nrConsultas = rs.getString(\"NrConsultas\");\n editorID = rs.getString(\"Editor_ID\");\n empresaID = rs.getString(\"Empresa_ID\");\n r = new Revista(id,nome,edicao,categoria,nrConsultas,editorID,empresaID);\n revistas.add(r);\n }\n } catch (SQLException e1) {\n e1.printStackTrace();\n }\n finally{\n con.close(connection);\n }\n return revistas;\n }", "@Override\r\n\tpublic ArrayList<Object> getAllStu_result() {\n\t\tConnection conn = null;\r\n\t\tPreparedStatement stmt = null;\r\n\t\tResultSet rs = null;\r\n\t\tArrayList<Object> list = new ArrayList<Object>(); // 考卷集合\r\n\t\ttry {\r\n\t\t\tconn = DBHelper.getConnection();\r\n\t\t\tString sql = \"select * from stu_result order by stu_r_id desc;\"; // SQL语句\r\n\t\t\tstmt = conn.prepareStatement(sql);\r\n\t\t\trs = stmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tStu_result stu_r = new Stu_result();\r\n\t\t\t\tstu_r.setStu_r_id(rs.getInt(\"stu_r_id\"));\r\n\t\t\t\tstu_r.setSid(rs.getInt(\"sid\"));\r\n\t\t\t\tstu_r.setKj_id(rs.getInt(\"kj_id\"));\r\n\t\t\t\tstu_r.setStu_dxt_r(rs.getString(\"stu_dxt_r\"));\r\n\t\t\t\tstu_r.setStu_dxt_c(rs.getString(\"stu_dxt_c\"));\r\n\t\t\t\tstu_r.setStu_dxts_r(rs.getString(\"stu_dxts_r\"));\r\n\t\t\t\tstu_r.setStu_dxts_c(rs.getString(\"stu_dxts_c\"));\r\n\t\t\t\tstu_r.setStu_pdt_r(rs.getString(\"stu_pdt_r\"));\r\n\t\t\t\tstu_r.setStu_pdt_c(rs.getString(\"stu_pdt_c\"));\r\n\t\t\t\tlist.add(stu_r);// 把一个考试试卷加入集合\r\n\t\t\t}\r\n\t\t\treturn list; // 返回集合。\r\n\t\t} catch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t} finally {\r\n\t\t\t// 释放数据集对象\r\n\t\t\tif (rs != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\trs.close();\r\n\t\t\t\t\trs = null;\r\n\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// 释放语句对象\r\n\t\t\tif (stmt != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tstmt.close();\r\n\t\t\t\t\tstmt = null;\r\n\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public RecordSet obtenerResumen(DTOResumen dtoe) throws MareException{\n UtilidadesLog.info(\"DAOParametrizacionCOB.obtenerResumen(DTOResumen dtoe): Entrada\");\n \n RecordSet rs = new RecordSet();\n StringBuffer query = new StringBuffer();\n BelcorpService bs;\n try\n { bs = BelcorpService.getInstance();\n }\n catch(MareMiiServiceNotFoundException ex)\n { throw new MareException(ex, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n } \n /*query.append(\" SELECT distinct p.IDPRINCIPAL AS OID,CONCAT(p.name,CONCAT(' ',CONCAT(pv.STRINGVALUE,CONCAT(' ',CONCAT(pv2.STRINGVALUE,CONCAT(' ',CONCAT(pv3.STRINGVALUE,CONCAT(' ',pv4.STRINGVALUE)))))))) NOMBRE, \");\n query.append(\" gen.VAL_I18N AS CANAL, \");\n query.append(\" sma.DES_MARC AS MARCA, \"); \n query.append(\" subvta.DES_SUBG_VENT AS SUBGERVENTA, \");\n query.append(\" gen2.VAL_I18N AS REGION, \");\n query.append(\" gen3.VAL_I18N AS ZONA, \");\n query.append(\" secc.DES_SECCI AS SECCION, \");\n query.append(\" gen5.VAL_I18N AS TERRITORIO \");\n query.append(\" FROM v_gen_i18n_sicc gen, \");\n query.append(\" v_gen_i18n_sicc gen2, \");\n query.append(\" v_gen_i18n_sicc gen3, \");\n query.append(\" v_gen_i18n_sicc gen5, \");\n query.append(\" seg_marca sma, \");\n query.append(\" zon_secci secc, \");\n query.append(\" cob_usuar_etapa_cobra_detal cdetal, \");\n query.append(\" zon_sub_geren_venta subvta, \");\n query.append(\" cob_usuar_etapa_cobra_cabec ccabe, \");\n query.append(\" cob_usuar_cobra usucob, \");\n query.append(\" own_mare.principals p, \");\n query.append(\" propertyvalues pv, \");\n query.append(\" propertyvalues pv2, \");\n query.append(\" propertyvalues pv3, \");\n query.append(\" propertyvalues pv4, \");\n query.append(\" own_mare.users u \");\n query.append(\" WHERE cdetal.zsgv_oid_subg_vent = subvta.oid_subg_vent \");\n query.append(\" AND ccabe.oid_usua_etap_cobr = cdetal.oid_usua_etap_cobr_deta \");\n query.append(\" AND secc.oid_secc(+) = cdetal.zscc_oid_secc \");\n query.append(\" AND sma.oid_marc = subvta.marc_oid_marc \");\n query.append(\" AND ccabe.usco_oid_usua_cobr = usucob.oid_usua_cobr \");\n query.append(\" AND gen.val_oid = subvta.cana_oid_cana \");\n query.append(\" AND gen.attr_enti = 'SEG_CANAL' \");\n query.append(\" AND gen.attr_num_atri = 1 \");\n query.append(\" AND gen.idio_oid_idio = '\" + dtoe.getOidIdioma() + \" ' \");\n query.append(\" AND pv.idproperty(+) = 2 \");\n query.append(\" AND pv.idprincipal(+) = p.idprincipal \");\n query.append(\" AND pv2.idproperty(+) = 3 \");\n query.append(\" AND pv2.idprincipal(+) = p.idprincipal \");\n query.append(\" AND pv3.idproperty = 5 \");\n query.append(\" AND pv3.idprincipal = p.idprincipal \");\n query.append(\" AND pv4.idproperty = 6 \");\n query.append(\" AND pv4.idprincipal = p.idprincipal \");\n query.append(\" AND gen2.val_oid(+) = '\" + dtoe.getOidIdioma() + \" ' \");\n query.append(\" AND gen2.attr_enti(+) = 'ZON_REGIO' \");\n query.append(\" AND gen2.attr_num_atri(+) = 1 \");\n query.append(\" AND gen2.idio_oid_idio(+) = '\" + dtoe.getOidIdioma() + \" ' \");\n query.append(\" AND gen3.val_oid(+) = cdetal.zzon_oid_zona \");\n query.append(\" AND gen3.attr_enti(+) = 'ZON_ZONA' \");\n query.append(\" AND gen3.attr_num_atri(+) = 1 \");\n query.append(\" AND gen3.idio_oid_idio(+) = '\" + dtoe.getOidIdioma() + \" ' \");\n query.append(\" AND gen5.val_oid(+) = cdetal.terr_oid_terr \");\n query.append(\" AND gen5.attr_enti(+) = 'ZON_TERRI' \");\n query.append(\" AND gen5.attr_num_atri(+) = 1 \");\n query.append(\" AND gen5.idio_oid_idio(+) = '\" + dtoe.getOidIdioma() + \" ' \");\n query.append(\" AND u.iduser = p.idprincipal \");\n query.append(\" AND p.idprincipal = ccabe.usco_oid_usua_cobr \");\n */\n \n /*query.append(\" SELECT distinct p.IDPRINCIPAL AS OID, \");\n query.append(\" p.name AS USUARIO, \");\n */\n //Se le agega \"p.IDPRINCIPAL,\" segun BELC300017927 \n //query.append(\" SELECT distinct p.name AS USUARIO, \"); \n query.append(\" SELECT distinct p.IDPRINCIPAL, p.name AS USUARIO, \");\n query.append(\" CONCAT(p.name,CONCAT(' ',CONCAT(pv.STRINGVALUE,CONCAT(' ',CONCAT(pv2.STRINGVALUE,CONCAT(' ',CONCAT(pv3.STRINGVALUE,CONCAT(' ',pv4.STRINGVALUE)))))))) NOMBRE, \");\n query.append(\" sma.DES_MARC AS MARCA, \");\n query.append(\" gen.VAL_I18N AS CANAL, \"); \n query.append(\" subvta.DES_SUBG_VENT AS SUBGERVENTA, \");\n query.append(\" regio.DES_REGI AS REGION, \");\n query.append(\" zona.DES_ZONA AS ZONA, \"); \n \t query.append(\" secc.DES_SECCI AS SECCION, \"); \n query.append(\" terri.COD_TERR AS TERRITORIO \");\n query.append(\" FROM v_gen_i18n_sicc gen, \");\n query.append(\" SEG_CANAL canal, \");\n query.append(\" ZON_TERRI terri, \");\n query.append(\" ZON_ZONA zona, \");\n query.append(\" ZON_REGIO regio, \");\n query.append(\" seg_marca sma, \");\n query.append(\" zon_secci secc, \");\n query.append(\" cob_usuar_etapa_cobra_detal cdetal, \");\n query.append(\" zon_sub_geren_venta subvta, \");\n query.append(\" cob_usuar_etapa_cobra_cabec ccabe, \");\n query.append(\" cob_usuar_cobra usucob, \");\n query.append(\" principals p, \");\n query.append(\" propertyvalues pv, \");\n query.append(\" propertyvalues pv2, \");\n query.append(\" propertyvalues pv3, \");\n query.append(\" propertyvalues pv4, \");\n query.append(\" users u \");\n query.append(\" WHERE cdetal.zsgv_oid_subg_vent = subvta.oid_subg_vent \");\n query.append(\" AND ccabe.oid_usua_etap_cobr = cdetal.UECC_OID_USUA_ETAP_COBR \");\n query.append(\" AND secc.oid_secc(+) = cdetal.zscc_oid_secc \");\n query.append(\" AND sma.oid_marc = subvta.marc_oid_marc \");\n query.append(\" AND ccabe.usco_oid_usua_cobr = usucob.oid_usua_cobr \");\n query.append(\" AND gen.val_oid = subvta.cana_oid_cana \");\n query.append(\" AND gen.attr_enti = 'SEG_CANAL' \");\n query.append(\" AND gen.attr_num_atri = 1 \");\n query.append(\" AND gen.idio_oid_idio = '1' \");\n query.append(\" AND pv.idproperty(+) = 2 \");\n query.append(\" AND pv.idprincipal(+) = p.idprincipal \");\n query.append(\" AND pv2.idproperty(+) = 3 \");\n query.append(\" AND pv2.idprincipal(+) = p.idprincipal \");\n query.append(\" AND pv3.idproperty = 5 \");\n query.append(\" AND pv3.idprincipal = p.idprincipal \");\n query.append(\" AND pv4.idproperty = 6 \");\n query.append(\" AND pv4.idprincipal = p.idprincipal \t\t \");\n query.append(\" AND terri.OID_TERR = cdetal.terr_oid_terr\t\t \");\n query.append(\" AND zona.OID_ZONA = cdetal.zzon_oid_zona\t\t \");\n query.append(\" AND regio.OID_REGI = cdetal.ZORG_OID_REGI\t\t \");\n query.append(\" AND u.iduser = p.idprincipal \");\n query.append(\" AND p.idprincipal = usucob.USER_OID_USUA_COBR \");\n \n /* Validaciones */\n if( dtoe.getOidMarca()!= null ){\n query.append(\" AND subvta.MARC_OID_MARC = \" + dtoe.getOidMarca() );\n }\n if( dtoe.getOidCanal() != null){\n query.append(\" AND subvta.CANA_OID_CANA = \" + dtoe.getOidCanal() );\n }\n if( dtoe.getOidSGV() != null ){\n query.append(\" AND subvta.OID_SUBG_VENT = \" + dtoe.getOidSGV() );\n }\n if( dtoe.getOidRegion() != null ){\n query.append(\" AND cdetal.ZORG_OID_REGI = \" + dtoe.getOidRegion() ); \n }\n if( dtoe.getOidZona() != null ){\n query.append(\" AND cdetal.ZZON_OID_ZONA = \" + dtoe.getOidZona() ); \n }\n if( dtoe.getOidSeccion() != null ){\n query.append(\" AND cdetal.ZSCC_OID_SECC = \" + dtoe.getOidSeccion() );\n }\n if( dtoe.getOidTerritorio() != null ){\n query.append(\" AND cdetal.TERR_OID_TERR = \" + dtoe.getOidTerritorio() );\n }\n UtilidadesLog.debug(\"query \" + query.toString() );\n try \n { rs = bs.dbService.executeStaticQuery(query.toString());\n }\n catch (Exception ex) \n { throw new MareException(ex, UtilidadesError.armarCodigoError(CodigosError.ERROR_DE_ACCESO_A_BASE_DE_DATOS));\n }\t\n \n UtilidadesLog.info(\"DAOParametrizacionCOB.obtenerResumen(DTOResumen dtoe): Salida\");\n \n return rs; \n }", "public ArrayList<T> all() throws SQLException {\n\t\tPreparedStatement stmt = DatabaseConnection.get().prepareStatement(\"select * from \"+table_name() + order_string());\n\t\treturn where(stmt);\n\t}", "public Collection<FlujoDetalleDTO> cargarTodos(int codigoFlujo) {\n/* 138 */ Collection<FlujoDetalleDTO> resultados = new ArrayList<FlujoDetalleDTO>();\n/* */ try {\n/* 140 */ String s = \"select t.codigo_flujo,t.secuencia,t.servicio_inicio,r1.descripcion as nombre_servicio_inicio,t.accion,t.codigo_estado,r3.descripcion as nombre_codigo_estado,t.servicio_destino,r4.descripcion as nombre_servicio_destino,t.nombre_procedimiento,t.correo_destino,t.enviar_solicitud,t.ind_mismo_proveedor,t.ind_mismo_cliente,t.estado,t.caracteristica,t.valor_caracteristica,t.caracteristica_correo,m5.descripcion as nombre_estado,c.DESCRIPCION nombre_caracteristica,cv.DESCRIPCION descripcion_valor,t.metodo_seleccion_proveedor,t.ind_correo_clientes,t.usuario_insercion,t.fecha_insercion,t.usuario_modificacion,t.fecha_modificacion from wkf_detalle t left join SERVICIOS r1 on (r1.CODIGO=t.servicio_inicio) left join ESTADOS r3 on (r3.codigo=t.codigo_estado) left join SERVICIOS r4 on (r4.CODIGO=t.servicio_destino) left join sis_multivalores m5 on (m5.tabla='ESTADO_REGISTRO' and m5.valor=t.estado) LEFT JOIN CARACTERISTICAS c ON (t.Caracteristica = c.CODIGO) LEFT JOIN CARACTERISTICAS_VALOR cv ON (t.CARACTERISTICA=cv.CARACTERISTICA AND t.VALOR_CARACTERISTICA = cv.VALOR) where t.codigo_flujo=\" + codigoFlujo + \" order by t.secuencia\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 178 */ boolean rtaDB = this.dat.parseSql(s);\n/* 179 */ if (!rtaDB) {\n/* 180 */ return resultados;\n/* */ }\n/* 182 */ this.rs = this.dat.getResultSet();\n/* 183 */ while (this.rs.next()) {\n/* 184 */ resultados.add(leerRegistro());\n/* */ }\n/* */ }\n/* 187 */ catch (Exception e) {\n/* 188 */ e.printStackTrace();\n/* 189 */ Utilidades.writeError(\"FlujoDetalleDAO:cargarTodos \", e);\n/* */ } \n/* 191 */ return resultados;\n/* */ }", "public void addAll() throws SQLException {\r\n DbHandler dbHandler = new DbHandler();\r\n\r\n ResultSet resultSet = dbHandler.getAll();\r\n while (resultSet.next()) {\r\n Photographer photographer = new Photographer();\r\n photographer.setId(resultSet.getString(1));\r\n System.out.println(photographer.getId());\r\n photographer.setName(resultSet.getString(2));\r\n System.out.println(photographer.getName());\r\n photographer.setSurname(resultSet.getString(3));\r\n System.out.println(photographer.getSurname());\r\n photographer.setStage(resultSet.getString(4));\r\n System.out.println(photographer.getStage());\r\n photographer.setPortfolio(resultSet.getString(5));\r\n System.out.println(photographer.getPortfolio());\r\n photographer.setLocation_(resultSet.getString(6));\r\n System.out.println(photographer.getLocation_());\r\n readersList.add(photographer);\r\n }\r\n }", "List fetchAll() throws AdaptorException ;", "@Override\n\tpublic Iterator<Student> selectAll() {\n\t\tString sql=\"SELECT a.id,a.num,a.name,a.email,a.phone,a.degree,a.project,a.school,b.name,a.is_cap from tc_student as a,tc_school as b where a.school=b.id\";\n\t\tArrayList<Student> arr=new ArrayList<Student>();\n\t\tResultSet rs=mysql.query(sql);\n\t\ttry {\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tStudent stu=new Student();\n\t\t\t\tstu.setId(rs.getInt(1));\n\t\t\t\tstu.setNum(rs.getString(2));\n\t\t\t\tstu.setName(rs.getString(3));\n\t\t\t\tstu.setEmail(rs.getString(4));\n\t\t\t\tstu.setPhone(rs.getString(5));\n\t\t\t\tstu.setDegree(rs.getShort(6));\n\t\t\t\tstu.setProject(rs.getInt(7));\n\t\t\t\tstu.setSchool(rs.getInt(8));\n\t\t\t\tstu.setSchoolstring(rs.getString(9));\n\t\t\t\tstu.setIs_cap(rs.getInt(10));\n\t\t\t\tstu.setDegreestring(degreemap[stu.getDegree()]);\n\t\t\t\tarr.add(stu);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn arr.iterator();\n\t}", "public static ArrayList<Representation> getAll() throws SQLException {\n ArrayList<Representation> arrObjRepresentation = new ArrayList<Representation>();\n Representation objRepresentation;\n ResultSet rs;\n PreparedStatement pstmt;\n Jdbc jdbc = Jdbc.getInstance();\n // préparer la requête\n String requete = \"SELECT id, daterepr, id_lieu, id_groupe, heure_debut, heure_fin, nombre_place_restante FROM Representation\";\n pstmt = jdbc.getConnexion().prepareStatement(requete);\n rs = pstmt.executeQuery();\n while (rs.next()) {\n objRepresentation = RepresentationDao.RepresentationFromResultSet(rs);\n arrObjRepresentation.add(objRepresentation);\n }\n return arrObjRepresentation;\n }", "private List<SharedBasket> initResultSet(ResultSet rs) throws SQLException {\n List<SharedBasket> sharedBasketList = new ArrayList<SharedBasket>();\n while (rs.next()) {\n SharedBasket basket = new SharedBasket();\n basket.setId(rs.getLong(1));\n basket.setCashierId(rs.getLong(2));\n basket.setPaymentDate(rs.getDate(3));\n basket.setPaymentTotal(rs.getBigDecimal(4));\n basket.setBoughtItems(fetchCollectionField(SharedBasket.class, basket.getId()));\n sharedBasketList.add(basket);\n }\n\n return sharedBasketList;\n }", "public List<TdiaryArticle> list(Object rp) throws SQLException {\n\t\treturn null;\r\n\t}", "public List<Artigo> getArtigos(String idRevista){\n List<Artigo> artigos = new ArrayList<>();\n Artigo a;\n String id, revistaID, titulo, corpo, nrConsultas,categoria;\n LocalDate data;\n\n try{\n connection = con.connect();\n PreparedStatement\n stm = connection.prepareStatement(\"SELECT * FROM Artigo \" +\n \"INNER JOIN Revista ON Artigo.Revista_ID = Revista.ID \" +\n \"WHERE Artigo.Revista_ID = \" + idRevista);\n ResultSet rs = stm.executeQuery();\n while(rs.next()){\n id = rs.getString(\"ID\");\n revistaID = rs.getString(\"Revista_ID\");\n data = rs.getDate(\"Data\").toLocalDate();\n titulo = rs.getString(\"Titulo\");\n corpo = rs.getString(\"Corpo\");\n nrConsultas = rs.getString(\"NrConsultas\");\n categoria = rs.getString(\"Categoria\");\n a = new Artigo(id,revistaID,data,titulo,corpo,nrConsultas, categoria);\n artigos.add(a);\n }\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n finally {\n con.close(connection);\n }\n return artigos;\n }", "public List<Books> showAllBooks(){\n String sql=\"select * from Book\";\n BaseDao baseDao=dao.executeQuery(sql,new Object[]{});\n List<Books> list=new ArrayList<>();\n list=resultSetToBook(baseDao);\n return list;\n }", "public List<Joueur> List_Joueur_HommesForComboBox() \r\n {\r\n List<Joueur> j = new ArrayList<>();\r\n String req= \"SELECT * FROM personne WHERE datedestruction is NULL and role = 'Joueur' and sexe='Homme' \";\r\n try {\r\n ResultSet res = ste.executeQuery(req);\r\n while (res.next()) {\r\n \r\n Joueur Jou = new Joueur(\r\n res.getInt(\"idpersonne\"),\r\n \r\n res.getString(\"nom\"),\r\n res.getString(\"prenom\")\r\n );\r\n j.add(Jou);\r\n \r\n System.out.println(\"------- joueurs selectionné avec succés----\");\r\n \r\n }\r\n \r\n } catch (SQLException ex) {\r\n System.out.println(\"----------Erreur lors methode : List_Joueur_Hommes()------\");\r\n }\r\n return j;\r\n \r\n}", "public ResultSet queryList()\n\t\t\tthrows SQLException\n\t{\n\t\treturn queryList(this.dbColumnNames,\"ID\",true);\n\t}", "@Override\n public Collection<resumenSemestre> resumenSemestre(int idCurso, int mesApertura, int mesCierre) throws Exception {\n Collection<resumenSemestre> retValue = new ArrayList();\n Connection c = null;\n PreparedStatement pstmt = null;\n ResultSet rs = null;\n try {\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"select ma.nombremateria, p.idcuestionario as test, \"\n + \"round(avg(p.puntaje),2) as promedio, cue.fechainicio, MONTH(cue.fechacierre) as mes \"\n + \"from puntuaciones p, cuestionario cue, curso cu, materia ma \"\n + \"where cu.idcurso = ma.idcurso and ma.idmateria = cue.idmateria \"\n + \"and cue.idcuestionario = p.idcuestionario and cu.idcurso = ? \"\n + \"and MONTH(cue.fechacierre) >= ? AND MONTH(cue.fechacierre) <= ? and YEAR(cue.fechacierre) = YEAR(NOW())\"\n + \"GROUP by ma.nombremateria, MONTH(cue.fechacierre) ORDER BY ma.nombremateria\");\n pstmt.setInt(1, idCurso );\n pstmt.setInt(2, mesApertura);\n pstmt.setInt(3, mesCierre);\n rs = pstmt.executeQuery();\n while (rs.next()) { \n retValue.add(new resumenSemestre(rs.getString(\"nombremateria\"), rs.getInt(\"test\"), rs.getInt(\"promedio\"), rs.getInt(\"mes\")));\n }\n return retValue;\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (rs != null) {\n rs.close();\n }\n if (pstmt != null) {\n pstmt.close();\n }\n DBUtils.closeConnection(c);\n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return retValue;\n\n\n }", "public List<Aluguel> listarAlugueisPorFilme(Filme filme) throws Exception{\n \n StringBuilder sql = new StringBuilder();\n sql.append(\" SELECT a.id id, a.data_aluguel data_aluguel, a.data_devolucao data_devolucao, a.valor valor, c.nome nome FROM aluguel a \"); \n sql.append(\" INNER JOIN aluguel_filme af ON af.aluguel_id = a.id INNER JOIN filme f ON f.id = af.filme_id \") ;\n sql.append(\" INNER JOIN cliente c on c.id = a.cliente_id \") ;\n sql.append(\" where f.titulo like ? \");\n sql.append(\" GROUP BY a.id, a.data_aluguel, a.data_devolucao, a.valor, c.nome \");\n \n Connection connection = ConexaoUtil.getConnection();\n PreparedStatement preparedStatement = connection.prepareStatement(sql.toString());\n preparedStatement.setString(1, \"%\" + filme.getTitulo() + \"%\");\n ResultSet resultSet = preparedStatement.executeQuery();\n \n List<Aluguel> alugueis = new ArrayList<Aluguel>();\n while(resultSet.next()){\n Aluguel aluguel = new Aluguel();\n aluguel.setId(resultSet.getLong(\"id\"));\n aluguel.setDataAluguel(resultSet.getDate(\"data_aluguel\"));\n aluguel.setDataDevolucao(resultSet.getDate(\"data_devolucao\"));\n aluguel.setValor(resultSet.getDouble(\"valor\"));\n Cliente cliente = new Cliente();\n cliente.setNome(resultSet.getString(\"nome\"));\n aluguel.setCliente(cliente);\n alugueis.add(aluguel);\n }\n resultSet.close();\n preparedStatement.close();\n connection.close();\n return alugueis;\n }", "public ArrayList<Desserts> getAllDesserts() { \r\n\t ArrayList<Desserts> AllDesserts = new ArrayList<Desserts>();\r\n\t try {\r\n\t Class.forName(\"com.mysql.jdbc.Driver\");\r\n\t Connection conn = DriverManager.getConnection(url+dbName,userName,password);\r\n\t statement=conn.createStatement();\r\n\t resultSet=statement.executeQuery(\"select * from g13restaurant.Desserts\");\r\n\t \r\n\t while ( resultSet.next() ) {\r\n\t \t Desserts nextDesserts = new Desserts(\r\n\t \t\t\t resultSet.getInt(\"dessert_ID\"), \r\n\t \t\t\t resultSet.getString(\"dessert_Name\"),\r\n\t resultSet.getString(\"dessert_Description\"), \r\n\t resultSet.getFloat(\"dessert_Cost\"),\r\n\t resultSet.getString(\"dessert_Type\").toString() ); \r\n\t AllDesserts.add(nextDesserts);\r\n\t }\r\n\t conn.close();\r\n\t } \r\n\t catch (Exception e) {\r\n\t e.printStackTrace();\r\n\t }\r\n\t return AllDesserts; \r\n\t }", "public List<Empleat> obtenirEmpleatsQueTreballenOnViuen() throws UtilitatJdbcSQLException {\r\n JdbcPreparedQueryDao jdbcDao = new JdbcPreparedQueryDao() {\r\n @Override\r\n public Object writeObject(ResultSet rs) throws SQLException {\r\n int field=0;\r\n Empleat empleat = new Empleat();\r\n empleat.setCodi(rs.getInt(++field));\r\n empleat.setNom(rs.getString(++field));\r\n empleat.setCiutat(rs.getString(++field));\r\n \r\n Establiment est=new Establiment();\r\n est.setCodi(rs.getInt(++field));\r\n if(!rs.wasNull()){\r\n est.setNom(rs.getString(++field));\r\n est.setCiutat(rs.getString(++field));\r\n }else{\r\n est=null;\r\n }\r\n empleat.setEstabliment(est);\r\n \r\n return empleat;\r\n }\r\n\r\n @Override\r\n public String getStatement() {\r\n return \"SELECT e.codi, e.nom, e.ciutat, e.establiment, es.nom, es.ciutat FROM Empleat e JOIN Establiment es ON e.establiment = es.codi WHERE e.ciutat = es.ciutat\";\r\n }\r\n\r\n @Override\r\n public void setParameter(PreparedStatement pstm) throws SQLException {\r\n \r\n }\r\n };\r\n List<Empleat> empleat = UtilitatJdbcPlus.obtenirLlista(con, jdbcDao); \r\n return empleat;\r\n }", "public List<Food> getFood() {\n\tString sql =\"select * from food\";\n\tList<Food>list = new ArrayList<Food>();\n\t\n\ttry {\n\t\tPreparedStatement preparedStatement = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\tResultSet rs = preparedStatement.executeQuery();\n\t\twhile(rs.next()) {\n\t\t\tFood food = new Food();\n\t\t\tfood.setId(rs.getInt(\"Id_food\"));\n\t\t\tfood.setName(rs.getString(\"Name\"));\n\t\t\tfood.setPrice(rs.getDouble(\"Price\"));\n\t\t\tlist.add(food);\n\t\t}\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\treturn list;\n}", "@Override\r\n\t\tpublic List<Boimpl> extractData(ResultSet rs) throws SQLException, DataAccessException {\n\t\t\tdata = new ArrayList<Boimpl>();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\t// | id | name | address | city | sallary | job | DEPARTMENT\r\n\r\n\t\t\t\tBoimpl obj = new Boimpl();\r\n\t\t\t\tobj.setId(rs.getInt(\"id\"));\r\n\t\t\t\tobj.setName(rs.getString(\"name\"));\r\n\t\t\t\tobj.setAddress(rs.getString(\"address\"));\r\n\t\t\t\tobj.setJob(rs.getString(\"job\"));\r\n\t\t\t\tobj.setSallary(rs.getFloat(\"sallary\"));\r\n\t\t\t\tobj.setDEPARTMENT(rs.getString(\"DEPARTMENT\"));\r\n\t\t\t\tobj.setCity(rs.getString(\"city\"));\r\n\t\t\t\tdata.add(obj);\r\n\t\t\t}\r\n\t\t\treturn data;\r\n\t\t}", "public ListaPartidas recuperarPartidas() throws SQLException {\n ListaPartidas listaPartidas = null;\n try {\n getConexion();\n String consulta = \"SELECT MANOS.id_mano, CARTAS.valor, CARTAS.palo, JUGADORES.nombre, PARTIDAS.id_partida \" +\n \"FROM MANOS \" +\n \"LEFT JOIN PARTIDAS ON PARTIDAS.id_mano = MANOS.id_mano \" +\n \"LEFT JOIN CARTAS ON CARTAS.id_carta = MANOS.id_carta \" +\n \"LEFT JOIN JUGADORES ON JUGADORES.id_jug = PARTIDAS.id_jug \" +\n \"ORDER BY PARTIDAS.id_mano\";\n Statement statement = conexion.createStatement();\n ResultSet registros = statement.executeQuery(consulta);\n // Compruebo que se han devuelto datos\n if (registros.next()) {\n // Inicializo el contenedor que se devolverá\n listaPartidas = new ListaPartidas();\n // Declaro e inicializo los objetos que servirán de buffer para añadir datos a cada partida\n LinkedList<Jugador> listaJugadores = new LinkedList<Jugador>();\n LinkedList<Mano> resultado = new LinkedList<Mano>();\n Mano mano = new Mano();\n // Variable que sirve para controlar cuando hay una nueva partida\n int numPartida = registros.getInt(\"PARTIDAS.id_partida\");\n // Variable que sirve para controlar cuando hay una nueva mano\n int numMano = registros.getInt(\"MANOS.id_mano\");\n // Devuelvo el cursor del ResultSet a su posición inicial\n registros.beforeFirst();\n // Bucle encargado de añadir datos a los contenedores\n while (registros.next()) {\n // Declaración de variables\n String palo = registros.getString(\"CARTAS.palo\");\n String valor = registros.getString(\"CARTAS.valor\");\n String nombre = registros.getString(\"JUGADORES.nombre\");\n // Se crea una carta con el palo y el valor devuelto por la consulta SQL\n Carta carta = new Carta(palo, valor);\n // Agrego la carta a la mano\n mano.agregarCarta(carta);\n // Agrego jugadores al contenedor de jugadores controlando si hay duplicados\n if (!listaJugadores.contains(nombre) || listaJugadores.isEmpty()) {\n Jugador jugador = new Jugador(nombre);\n listaJugadores.add(jugador);\n }\n // Cuando hay una nueva mano, la añado al contenedor resultados y creo una nueva Mano\n if (numMano != registros.getInt(\"MANOS.id_mano\") || registros.isLast()) {\n numMano = registros.getInt(\"MANOS.id_mano\");\n mano.setPropietario(nombre);\n resultado.add(mano);\n mano = new Mano();\n }\n // Cuando hay una nueva partida, guardo un objeto Partida en el contenedor de partidas\n if (numPartida != registros.getInt(\"PARTIDAS.id_partida\") || registros.isLast()) {\n numPartida = registros.getInt(\"PARTIDAS.id_partida\");\n Partida partida = new Partida(numPartida, listaJugadores, resultado);\n listaPartidas.agregarPartida(partida);\n // Reinicio los buffers de datos\n listaJugadores = new LinkedList<Jugador>();\n resultado = new LinkedList<Mano>();\n }\n }\n }\n } finally {\n closeConexion();\n }\n return listaPartidas;\n }", "private ArrayList<Order> extractProductFromResultSet(ResultSet rs){\n ArrayList<Order> orderList = new ArrayList<>();\n\n try {\n Order order = new Order();\n ProdOrder ps;\n ProductDao pd;\n Product p;\n AddressDao ad;\n Address a;\n int i = 0;\n\n while (rs.next()){\n\n // creo inserisco dati ordine generale\n order = new Order();\n i++;\n order.setOrderID(rs.getInt(\"OrderID\"));\n order.setUserID(rs.getInt(\"UserID\"));\n order.setDate(new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").parse(rs.getString(\"Date\")));\n //System.out.println(\"[ INFO ] Data: \" + order.getDate().toString());\n // creo prodotto con dati venditore\n pd = new ProductDaoImpl();\n p = pd.getProduct(rs.getInt(\"ProductID\"),rs.getInt(\"ShopID\"));\n //System.out.println(\"[ INFO ] Prodotto : \" + p.getProductName());\n\n // creo indirizzo spedizione\n ad = new AddressDaoImpl();\n a = ad.getAddress(rs.getInt(\"AddressID\"));\n\n // creo l'ordine del prodotto particolare e lo aggiungo alla lista dell'ordine generale\n ps = extractProdOrder(rs,p,a);\n\n // aggiungo l'ordine del prodotto al corrispettivo ordine generale\n order.getProductList().add(ps);\n //System.out.println(order.toString());\n // ciclo sugli elementi successivi dell'ordine (basta aggiungere gli progelem alla lista ordine)\n while (rs.next()){\n\n // se trovo un elemento che non appartiene più all'ordine corrente\n if (rs.getInt(\"OrderID\") != order.getOrderID()){\n // finalizzo l'ordine\n System.out.println(\"[ INFO ] Ordine \" + order.getOrderID() + \" aggiunto\");\n orderList.add(order);\n // torno all'elemento precedente (perchè poi nel while esterno ritorno avanti di uno e dichiaro un nuovo ordine)\n rs.previous();\n // esco dal while interno (ovvero non ho più prodotti relativi all'ordine corrente)\n break;\n }\n\n // creo prodotto con dati venditore\n pd = new ProductDaoImpl();\n p = pd.getProduct(rs.getInt(\"ProductID\"), rs.getInt(\"ShopID\"));\n //System.out.println(\"[ INFO ] Prodotto : \" + p.getProductName());\n\n // creo indirizzo spedizione\n ad = new AddressDaoImpl();\n a = ad.getAddress(rs.getInt(\"AddressID\"));\n\n // creo l'ordine del prodotto particolare e lo aggiungo alla lista dell'ordine generale\n ps = extractProdOrder(rs,p,a);\n\n // aggiungo l'ordine del prodotto al corrispettivo ordine generale\n order.getProductList().add(ps);\n }\n\n }\n if (i > 0){\n orderList.add(order);\n //System.out.println(\"[ INFO ] Ordine \" + order.getOrderID() + \" aggiunto\");\n }\n\n return orderList;\n } catch (SQLException | ParseException e) {\n e.printStackTrace();\n }\n return null;\n }", "public List<T> selectAll() {\n Logger logger = getLogger();\n List<T> objectList = new ArrayList<>();\n try (Connection connection = getConnection();\n PreparedStatement preparedStatement = connection.prepareStatement(getSelectAll())) {\n\n logger.info(\"Executing statement: \" + preparedStatement);\n ResultSet rs = preparedStatement.executeQuery();\n\n while (rs.next()) {\n T object = setObjectParams(rs);\n setObjectId(rs, object);\n objectList.add(object);\n }\n } catch (SQLException e) {\n logger.error(e.getMessage());\n }\n logger.info(\"Select all: success\");\n return objectList;\n }", "public String[] getArtistsList() {\n Connection con = null;\n PreparedStatement st = null;\n ResultSet rs = null;\n Vector<String> list = new Vector<String>();\n String[] result = null;\n try {\n //obtain the database connection by calling getConn()\n con = getConn();\n //create the PreparedStatement from the Connection object by calling prepareStatementl\n //method, passing it the sql \n st = con.prepareStatement(\"select * from Artist\");\n \n //Calls executeQuery and the resulting data is returned in the resultset\n rs = st.executeQuery();\n \n //loop through the result set and save the data in the datamodel objects\n while (rs.next()){\n //System.out.println(\"inside while....\");\n list.add(rs.getString(\"id\") + \",\" + rs.getString(\"NAME\"));\n \n }\n result = new String[list.size()];\n for (int i = 0 ; i< list.size() ; i++){\n result[i] = list.get(i);\n \n }\n }\n catch (SQLException e){\n \n }\n //close the resultset,preparedstatement and connection to relase resources \n if (rs != null){\n try{\n rs.close();\n rs = null;\n }\n catch (SQLException e){\n \n }\n }\n if (st != null){\n try{\n st.close();\n st = null;\n }\n catch (SQLException e){\n \n }\n }\n \n if (con != null){\n try{\n con.close();\n con = null;\n }\n catch (SQLException e){\n \n }\n }\n \n return result;\n }", "public ArrayList<DTOcomentarioRta> listadoComentarioxComercio(int idComercio) {\n ArrayList<DTOcomentarioRta> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n PreparedStatement st = conn.prepareStatement(\" select co.id_comercio, c.id_comentario, c.nombreUsuario, c.descripcion, c.valoracion, c.fecha, co.nombre , r.descripcion, r.fecha, r.id_rta, co.id_rubro\\n\"\n + \" from Comentarios c join Comercios co on c.id_comercio = co.id_comercio\\n\"\n + \" left join Respuestas r on r.id_comentario = c.id_comentario\\n\"\n + \" where co.id_comercio = ?\");\n st.setInt(1, idComercio);\n ResultSet rs = st.executeQuery();\n\n while (rs.next()) {\n int id = rs.getInt(1);\n int idcomentario = rs.getInt(2);\n String nombreU = rs.getString(3);\n String descripC = rs.getString(4);\n int valoracion = rs.getInt(5);\n String fechaC = rs.getString(6);\n String nombrecomercio = rs.getString(7);\n String descripcionR = rs.getString(8);\n String fechaR = rs.getString(9);\n int idR = rs.getInt(10);\n int rubro = rs.getInt(11);\n\n rubro rf = new rubro(rubro, \"\", true, \"\", \"\");\n comercio come = new comercio(nombrecomercio, \"\", \"\", id, true, \"\", \"\", rf, \"\");\n Comentario c = new Comentario(idcomentario, descripC, valoracion, nombreU, fechaC, come);\n respuestas r = new respuestas(idR, descripcionR, c, fechaR);\n DTOcomentarioRta cr = new DTOcomentarioRta(c, r);\n\n lista.add(cr);\n }\n\n st.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n }", "public ResultSet fetchSelectAllParkLots() {\r\n\t\ttry {\r\n\t\t\t/**\r\n\t\t\t*\tTo create connection to the DataBase\r\n\t\t\t*/\r\n\t\t\tnew DbConnection();\r\n\t\t\t/**\r\n\t\t\t*\tStore the table data in ResultSet rs and then return it\r\n\t\t\t*/\r\n\t\t\trs = stmt.executeQuery(SELECT_ALL_PARKLOT_QUERY);\r\n\t\t} catch(SQLException SqlExcep) {\r\n\t\t\tSqlExcep.printStackTrace();\r\n\t\t} catch(ClassNotFoundException cnfExecp) {\r\n\t\t\tcnfExecp.printStackTrace();\r\n\t\t} finally {\r\n\t\t\t/*try {\r\n\t\t\t\tcloseDbConnection();\r\n\t\t\t} catch(SQLException SqlExcep) {\r\n\t\t\t\tSqlExcep.printStackTrace();\r\n\t\t\t}*/\r\n\t\t}\r\n\t\treturn rs;\r\n\t}", "@Override\n public Collection<Curso> getAll() {\n Collection<Curso> retValue = new ArrayList();\n\n Connection c = null;\n PreparedStatement pstmt = null;\n ResultSet rs = null;\n\n try {\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"SELECT c.idcurso, c.idprofesor, p.nombre as nombreprofesor,p.apellido as apellido, c.nombrecurso, c.claveprofesor,\\n\" +\n\" c.clavealumno from curso c, persona p\\n\" +\n\"where c.idprofesor = p.id\");\n \n\n rs = pstmt.executeQuery();\n\n while (rs.next()) {\n String nombre=\"\\\"\"+rs.getString(\"nombreprofesor\")+\" \"+rs.getString(\"apellido\")+\"\\\"\";\n retValue.add(new Curso(rs.getInt(\"idcurso\"), rs.getString(\"nombrecurso\"), rs.getInt(\"idprofesor\"), nombre,rs.getString(\"claveprofesor\"), rs.getString(\"clavealumno\")));\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (rs != null) {\n rs.close();\n }\n if (pstmt != null) {\n pstmt.close();\n }\n DBUtils.closeConnection(c);\n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return retValue;\n }", "public List<ReporteRetencionesResumido> getRetencionSRIResumido(int mes, int anio, int idOrganizacion)\r\n/* 27: */ {\r\n/* 28: 58 */ String sql = \"SELECT new ReporteRetencionesResumido(f.fechaEmisionRetencion,f.fechaRegistro,f.fechaEmision, CONCAT(f.establecimiento,'-',f.puntoEmision,'-',f.numero),\\tf.identificacionProveedor,c.descripcion,CASE WHEN c.tipoConceptoRetencion = :tipoConceptoFUENTE then (SUM(COALESCE(dfp.baseImponibleRetencion, 0)+COALESCE(dfp.baseImponibleTarifaCero, 0) +COALESCE(dfp.baseImponibleDiferenteCero, 0)+COALESCE(dfp.baseImponibleNoObjetoIva, 0))) else COALESCE(dfp.baseImponibleRetencion, 0) end,dfp.porcentajeRetencion,dfp.valorRetencion,\\tc.codigo,CASE WHEN c.tipoConceptoRetencion = :tipoConceptoIVA then 'IVA' WHEN c.tipoConceptoRetencion = :tipoConceptoFUENTE then 'FUENTE' WHEN c.tipoConceptoRetencion = :tipoConceptoISD then 'ISD' else '' end,f.numeroRetencion) FROM DetalleFacturaProveedorSRI dfp INNER JOIN dfp.facturaProveedorSRI f INNER JOIN dfp.conceptoRetencionSRI c WHERE MONTH(f.fechaRegistro) =:mes\\tAND YEAR(f.fechaRegistro) =:anio AND f.estado!=:estadoAnulado AND f.indicadorSaldoInicial!=true AND f.idOrganizacion = :idOrganizacion\\tGROUP BY c.codigo,f.numero,f.puntoEmision,\\tf.establecimiento, f.identificacionProveedor,\\tc.descripcion,dfp.baseImponibleRetencion,dfp.porcentajeRetencion,dfp.valorRetencion,f.fechaEmisionRetencion,f.fechaRegistro,f.fechaEmision,f.numeroRetencion, c.tipoConceptoRetencion ORDER BY c.tipoConceptoRetencion, c.codigo \";\r\n/* 29: */ \r\n/* 30: */ \r\n/* 31: */ \r\n/* 32: */ \r\n/* 33: */ \r\n/* 34: */ \r\n/* 35: */ \r\n/* 36: */ \r\n/* 37: */ \r\n/* 38: */ \r\n/* 39: */ \r\n/* 40: */ \r\n/* 41: */ \r\n/* 42: */ \r\n/* 43: */ \r\n/* 44: */ \r\n/* 45: 75 */ Query query = this.em.createQuery(sql);\r\n/* 46: 76 */ query.setParameter(\"mes\", Integer.valueOf(mes));\r\n/* 47: 77 */ query.setParameter(\"anio\", Integer.valueOf(anio));\r\n/* 48: 78 */ query.setParameter(\"estadoAnulado\", Estado.ANULADO);\r\n/* 49: 79 */ query.setParameter(\"idOrganizacion\", Integer.valueOf(idOrganizacion));\r\n/* 50: 80 */ query.setParameter(\"tipoConceptoIVA\", TipoConceptoRetencion.IVA);\r\n/* 51: 81 */ query.setParameter(\"tipoConceptoFUENTE\", TipoConceptoRetencion.FUENTE);\r\n/* 52: 82 */ query.setParameter(\"tipoConceptoISD\", TipoConceptoRetencion.ISD);\r\n/* 53: 83 */ List<ReporteRetencionesResumido> lista = query.getResultList();\r\n/* 54: */ \r\n/* 55: 85 */ return lista;\r\n/* 56: */ }", "public List<Brands> LoadAllBrands() {\n Brands brands = null;\n List<Brands> brandsList = new ArrayList<>();\n try {\n Connection connection = DBConnection.getConnectionToDatabase();\n // String sql = \"SELECT * FROM `humusam_root`.`Users` WHERE UserEmail=\" + email;\n String sql = \"SELECT * FROM `brands`\";\n Statement statment = connection.createStatement();\n ResultSet set = statment.executeQuery(sql);\n ListBrands(brandsList, set);\n } catch (SQLException exception) {\n System.out.println(\"sqlException in Application in LoadAllBrands Section : \" + exception);\n exception.printStackTrace();\n }\n\n return brandsList;\n }", "@Override\n\tpublic List<StudentRMBO> getAllStudent() {\n\t\tStudentRMBO bo=null;\n\t\tList<StudentRMBO> lrmbo=null;\n\t\ttry {\n\t\t\t\n\t\t\tMap<String ,RowMapper<?>> logginMapper=new HashMap<String , RowMapper<?>>();\n\t\t\tlogginMapper.put(\"result-1\", new RowMapper<StudentBO>() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic StudentBO mapRow(ResultSet rs, int pos) throws SQLException {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tStudentBO sbo=new StudentBO();\n\t\t\t\t\tList<StudentBO> lbo=new ArrayList<StudentBO>();\n\t\t\t\t\tResultSetMetaData rsmd=(ResultSetMetaData) rs.getMetaData();\n\t\t\t\t\tint columnCount=rsmd.getColumnCount();\n\t\t\t\n\t\t\t\t\tif(columnCount>1) {\n\t\t\t\t\t\n\t\t\t\t\t\tsbo.setName(rs.getString(\"name\"));\n\t\t\t\t\t\tsbo.setRollNumber(rs.getString(\"rollNumber\"));\n\t\t\t\t\t\tsbo.setMaths(rs.getInt(\"Maths\"));\n\t\t\t\t\t\tsbo.setEnglish(rs.getInt(\"English\"));\n\t\t\t\t\t\tsbo.setScience(rs.getInt(\"Science\"));\n\t\t\t\t\t\tlbo.add(sbo);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\treturn sbo;\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tbo=new StudentRMBO();\n\t\t\tlrmbo=new ArrayList<StudentRMBO>();\n\t\t\tMap<String ,Integer> outParam=SPutil.getEmptyOutputParams();\n\t\t\tMapSqlParameterSource inputParam=SPutil.spInputParameters();\n\t\t\tMap<String, Object> m=SPutil.executeMultiple(ds, null, SPutil.get_Student, inputParam, outParam, logginMapper);\n\t\t\tArrayList al=(ArrayList) m.get(\"result-1\");\n\t\t\tSystem.out.println(\"array in dao \"+al);\n\t\t\tSystem.out.println(\"array size \"+al.size());\n\n\t\t\tfor(int i=0 ;i<=al.size()-1;i++) {\n\t\t\tbo.setBo( (StudentBO) al.get(i));\n\t\t\tlrmbo.add(bo);\n\t\t\tSystem.out.println(\"in for i= \"+ i);\n\t\t\tSystem.out.println(\"in for \"+ bo);\n\t\t\t}\n\t\t\t\n\t\t\t\t\t}\n\t\tcatch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\t\n\n\t\tSystem.out.println(\"student info\"+bo);\n\n\t\treturn lrmbo;\n\t}", "public List<SpasaCRN> obtenerSpasaFiltros() {\n\n if (conectado) {\n try {\n String bool = \"false\";\n List<SpasaCRN> filtrosCRNs = new ArrayList();\n\n String Query = \"SELECT * FROM `spasa_filtros` WHERE anio = YEAR(NOW()) AND ciclo = CURRENT_CICLO() ;\";\n Logy.mi(\"Query: \" + Query);\n Statement st = Conexion.createStatement();\n ResultSet resultSet;\n resultSet = st.executeQuery(Query);\n while (resultSet.next()) {\n\n SpasaCRN crn = new SpasaCRN();\n SpasaMateria mat = new SpasaMateria();\n crn.setCodigoProf(resultSet.getString(\"usuario\")); //modificado ahora que se cambio in a String\n crn.setCrnCpr(resultSet.getString(\"crn\"));\n String mc = resultSet.getString(\"materia_cod\");\n if (mc != null && !mc.isEmpty() && !mc.equals(\"null\")) {\n crn.setMateriaRuta(mc);\n mat.setMateriaRuta(mc);\n }\n String m = resultSet.getString(\"materia_nom\");\n if (m != null && !m.isEmpty() && !m.equals(\"null\")) {\n mat.setNombreMat(m);\n }\n String d = resultSet.getString(\"departamento_nom\");\n if (d != null && !d.isEmpty() && !d.equals(\"null\")) {\n mat.setNombreDepto(d);\n }\n String dia = resultSet.getString(\"dia\");\n if (dia != null && !dia.isEmpty() && !dia.equals(\"null\")) {\n crn.setDiaHr(dia);\n }\n String h = resultSet.getString(\"hora\");\n if (h != null && !h.isEmpty() && !h.equals(\"null\")) {\n crn.setHiniHr(h);\n }\n crn.setMateria(mat);\n filtrosCRNs.add(crn);\n }\n\n return filtrosCRNs;\n\n } catch (SQLException ex) {\n Logy.me(\"No se pudo consultar tabla spasa_filtros : \" + ex.getMessage());\n return null;\n }\n } else {\n Logy.me(\"No se ha establecido previamente una conexion a la DB\");\n return null;\n }\n }", "private void listAll() throws SQLException { \n\t\t List<SearchList> bookList = searchListDao.listAll();\n\t\t System.out.printf(\"%-5s %-35s %-30s %-30s \\n\",\"Id#\", \"Title\", \"Author\", \"Series\"); \n\t\t for (SearchList book : bookList) { \n\t\t\t System.out.printf(\"%-5s %-35s %-30s %-30s \\n\", book.getBookIdNum(), book.getTitle(), book.getAuthor(), book.getSeries());\n\t\t }\n\t }", "public List<Object> getKitxCadena(Long idRetailer) {\r\n \r\n Connection conn=null;\r\n String storedProcedure;\r\n CallableStatement stmt=null;\r\n String av_message; \r\n \r\n ResultSet rs = null;\r\n av_message = null;\r\n storedProcedure = \"begin NpProduct_PKG.sp_get_kitxretailer_lst(?,?,?); end;\";\r\n List<Object> lstAllEntities = new ArrayList<Object>();\r\n try{\r\n conn = ConnectionDB.getConnection();\r\n stmt = conn.prepareCall(storedProcedure);\r\n\r\n //Se registra el parámetro de salida \r\n stmt.registerOutParameter(2, OracleTypes.CURSOR);\r\n stmt.registerOutParameter(3, OracleTypes.VARCHAR);\r\n //Se configuran los demás parámetros del stored\r\n stmt = configureProductSKU(stmt, idRetailer);\r\n\r\n //Se ejecuta el statement\r\n stmt.execute();\r\n\r\n //Se obtiene la respuesta error/exito del stored\r\n av_message = (String)stmt.getObject(3);\r\n boolean resultado=false;\r\n resultado=this.handleErrorResult(av_message);\r\n\r\n if(resultado){\r\n //Se obtiene el objeto del cursor\r\n rs = (ResultSet)stmt.getObject(2);\r\n\r\n while(rs.next()){\r\n Object npAddress = setEntityAttributesKitxCadena(rs);\r\n lstAllEntities.add(npAddress);\r\n }\r\n }else{\r\n logger.error(\"[NPProductDAO][Metodo: getProductSKU][SP: \"+storedProcedure+\"][MensajeError: \"+av_message+\"]\" +\r\n \"[Parametros][idRetailer:\"+idRetailer+\"]\");\r\n }\r\n\r\n }catch (Exception e){\r\n throw new UnhandledException( \"getKitxCadena [ \"+ Constant.PARAMETER_ERROREXCEPTION +\" ] \"+ e.getMessage(),e);\r\n }finally{\r\n //Se limpian las variables de conexión\r\n ConnectionDB.close(conn, rs, stmt);\r\n }\r\n return(lstAllEntities);\r\n }", "public List<ItemVenda> getItemVenda(Lancamento lancamento) {\r\n\r\n List<ItemVenda> resultado = new ArrayList<ItemVenda>();\r\n Connection con = pool.getConnection();\r\n PreparedStatement ps = null;\r\n ResultSet rs = null;\r\n String sqlSelect = \"SELECT \\n\" +\r\n \" *\\n\" +\r\n \"FROM\\n\" +\r\n \" (SELECT \\n\" +\r\n \" A.CODIGO_LANCAMENTO,\\n\" +\r\n \" D.CODIGO_PRODUTO AS CODIGO_PRODUTO,\\n\" +\r\n \" D.NOME_PRODUTO AS DESCRICAO,\\n\" +\r\n \" C.QUANTIDADE,\\n\" +\r\n \" C.PRECO_TOTAL,\\n\" +\r\n \" C.PRECO_UNITARIO,\\n\" +\r\n \" C.TYPE_PRODUCT\\n\" +\r\n \" FROM\\n\" +\r\n \" LANCAMENTO A, VENDA B, ITEM_VENDA C, PRODUTO D\\n\" +\r\n \" WHERE\\n\" +\r\n \" A.VENDA_CODIGO_VENDA = B.CODIGO_VENDA\\n\" +\r\n \" AND B.CODIGO_VENDA = C.VENDA_CODIGO_VENDA\\n\" +\r\n \" AND C.PRODUTO_CODIGO_PRODUTO = D.CODIGO_PRODUTO UNION ALL SELECT \\n\" +\r\n \" A.CODIGO_LANCAMENTO,\\n\" +\r\n \" D.CODIGO_PACOTE_PROMOCIONAL AS CODIGO_PRODUTO,\\n\" +\r\n \" D.DESCRICAO,\\n\" +\r\n \" C.QUANTIDADE,\\n\" +\r\n \" C.PRECO_TOTAL,\\n\" +\r\n \" C.PRECO_UNITARIO,\\n\" +\r\n \" C.TYPE_PRODUCT\\n\" +\r\n \" FROM\\n\" +\r\n \" LANCAMENTO A, VENDA B, ITEM_VENDA C, PACOTE_PROMOCIONAL D\\n\" +\r\n \" WHERE\\n\" +\r\n \" A.VENDA_CODIGO_VENDA = B.CODIGO_VENDA\\n\" +\r\n \" AND B.CODIGO_VENDA = C.VENDA_CODIGO_VENDA\\n\" +\r\n \" AND C.PACOTE_PROMOCIONAL_CODIGO_PACOTE_PROMOCIONAL = D.CODIGO_PACOTE_PROMOCIONAL) AS CONSULTA\\n\" +\r\n \" WHERE CODIGO_LANCAMENTO = ?\";\r\n\r\n try {\r\n ps = con.prepareStatement(sqlSelect);\r\n ps.setInt(1, lancamento.getCodigo_lancamento());\r\n\r\n rs = ps.executeQuery();\r\n\r\n resultado = getListaItensVenda(rs);\r\n\r\n ps.close();\r\n } catch (ParseException ex) {\r\n return null;\r\n\r\n } catch (SQLException ex) {\r\n Logger.getLogger(LocacaoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n pool.liberarConnection(con);\r\n }\r\n return resultado;\r\n }", "public List<Marka> markaFullList() {\n\n String sql = \"SELECT id, ad, aciklama, resimyolu FROM eticaretio.marka;\";\n List<Marka> markaArrayList = new ArrayList<>();\n\n try {\n // SELECT id, sirket_ad, adres, telefon, website, email FROM eticaretio.kargo;\n\n Connection connection = DatabaseConnection.getConnection();\n\n PreparedStatement preparedStatement = connection.prepareStatement(sql);\n ResultSet resultSet = preparedStatement.executeQuery();\n\n while (resultSet.next()) {\n\n Marka marka = new Marka();\n\n marka.setId(resultSet.getInt(\"id\"));\n marka.setAd(resultSet.getString(\"ad\"));\n marka.setAciklama(resultSet.getString(\"aciklama\"));\n marka.setResimYol(resultSet.getString(\"resimyolu\"));\n\n markaArrayList.add(marka);\n\n }\n\n } catch (SQLException ex) {\n System.out.println(\"markadao sinifi markaifulllistmetodu : \" + ex.toString());\n return null;\n }\n return markaArrayList;\n }", "public ResultSet getRecords() throws SQLException{\n Statement stmt = getConnection().createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,\n ResultSet.CONCUR_UPDATABLE);\n String sqlGet = \"SELECT * FROM myStudents\";\n stmt.executeQuery(sqlGet);\n ResultSet rs = stmt.getResultSet();\n return rs;\n }", "List<StockList> fetchAll();", "public List<String> Mutfakkullanici(int masa_no) throws SQLException {\n ArrayList<Integer> kull = new ArrayList<>();\r\n ArrayList<String> kullad = new ArrayList<>();\r\n sqlsorgular.baglanti vb = new baglanti();\r\n vb.baglan();\r\n try {\r\n\r\n String sorgu = \"select kullanici_no from ilisk_masa where masa_no=\" + masa_no + \";\";\r\n ps = vb.con.prepareStatement(sorgu);\r\n rs = ps.executeQuery(sorgu);\r\n\r\n while (rs.next()) {\r\n kull.add(rs.getInt(1));\r\n }\r\n System.out.println(\"mutfak kullanici girdi\");\r\n System.out.println(kull);\r\n } catch (Exception e) {\r\n System.out.println(\"Mutfak kullanicisini alirken hata olustu\");\r\n return null;\r\n }\r\n\r\n for (Integer kullanici_no : kull) {\r\n boolean durum = false;\r\n String deger = \"\";\r\n String sorgu2 = \"select kullanici_adi from kullanicilar where kullanici_no=\" + kullanici_no + \" and durum='MUTFAK';\";\r\n try {\r\n ps = vb.con.prepareStatement(sorgu2);\r\n rs1 = ps.executeQuery(sorgu2);\r\n while (rs1.next()) {\r\n deger = rs1.getString(1);\r\n\r\n if (deger != null) {\r\n kullad.add(deger);\r\n System.out.println(\"null\");\r\n System.out.println(deger);\r\n }\r\n System.out.println(kullad);\r\n durum = true;\r\n }\r\n } catch (Exception e) {\r\n durum = false;\r\n }\r\n\r\n System.out.println(kullad);\r\n\r\n }\r\n vb.con.close();\r\n return kullad;\r\n\r\n }", "static ResultSet dataOphalen(String querry) {\n //declaratie anders kan er niks worden gereturnt\n ResultSet rs = null;\n try {\n Statement stmt = connectieMaken().createStatement(); //\n rs = stmt.executeQuery(querry);\n } catch (SQLException se) {\n se.printStackTrace();\n }\n return rs;\n }", "public ArrayList<ArrayList<Object>> getRowSet()\r\n {\r\n ArrayList<ArrayList<Object>> list = new ArrayList<>();\r\n try {\r\n int c = 0; \r\n while(c < rows)\r\n {\r\n rs.next();\r\n System.out.println(c);\r\n ArrayList<Object> obj = new ArrayList<>();\r\n int col = rs.getMetaData().getColumnCount();\r\n for(int i = 1; i < col; i++)\r\n {\r\n obj.add(rs.getObject(i));\r\n }\r\n list.add(obj);\r\n c++;\r\n }\r\n return list;\r\n \r\n } catch (SQLException ex) {\r\n return list;\r\n }\r\n }", "public List<Object[]> getRetencionesAnuladas(int mes, int anio, int idOrganizacion, Sucursal sucursalFP, Sucursal sucursalRetencion, PuntoDeVenta puntoVentaRetencion, String orden, TipoComprobanteSRI tipoComprobante)\r\n/* 125: */ {\r\n/* 126:175 */ StringBuilder sql = new StringBuilder();\r\n/* 127: */ \r\n/* 128:177 */ sql.append(\" SELECT a.fechaEmisionDocumento, f.fechaRegistro, f.fechaEmision, CONCAT(f.establecimiento,'-',f.puntoEmision,'-',f.numero), f.identificacionProveedor, \");\r\n/* 129: */ \r\n/* 130:179 */ sql.append(\" \\t'', f.montoIva*0, f.montoIva*0, f.montoIva*0, '', '', \");\r\n/* 131: */ \r\n/* 132:181 */ sql.append(\" \\tCONCAT(a.establecimiento,'-',a.puntoEmision,'-',a.numeroDesde), f.montoIva*0, f.montoIva*0, f.montoIva*0, f.nombreProveedor, \");\r\n/* 133: */ \r\n/* 134:183 */ sql.append(\"\\tf.montoIva*0, f.montoIva*0, '', a.autorizacion, f.fechaRegistro, f.autorizacion, '', 'ANULADO', f.idFacturaProveedorSRI,'' \");\r\n/* 135:184 */ sql.append(\" FROM AnuladoSRI a, FacturaProveedorSRI f \");\r\n/* 136:185 */ sql.append(\" WHERE a.documentoRelacionado = f.idFacturaProveedorSRI \");\r\n/* 137:186 */ sql.append(\" AND a.tipoComprobanteSRI = :tipoComprobante \");\r\n/* 138:187 */ sql.append(\" AND a.anio = :anio AND a.mes = :mes \");\r\n/* 139:188 */ sql.append(\" AND a.idOrganizacion = :idOrganizacion \");\r\n/* 140:189 */ if (sucursalFP != null) {\r\n/* 141:190 */ sql.append(\" AND f.idSucursal = :idSucursal \");\r\n/* 142: */ }\r\n/* 143:192 */ if (sucursalRetencion != null) {\r\n/* 144:193 */ sql.append(\" AND a.establecimiento = :sucursalRetencion \");\r\n/* 145: */ }\r\n/* 146:195 */ if (puntoVentaRetencion != null) {\r\n/* 147:196 */ sql.append(\" AND a.puntoEmision = :puntoVentaRetencion \");\r\n/* 148: */ }\r\n/* 149:198 */ Query query = this.em.createQuery(sql.toString());\r\n/* 150:199 */ query.setParameter(\"mes\", Integer.valueOf(mes));\r\n/* 151:200 */ query.setParameter(\"anio\", Integer.valueOf(anio));\r\n/* 152:201 */ query.setParameter(\"idOrganizacion\", Integer.valueOf(idOrganizacion));\r\n/* 153:202 */ query.setParameter(\"tipoComprobante\", tipoComprobante);\r\n/* 154:203 */ if (sucursalFP != null) {\r\n/* 155:204 */ query.setParameter(\"idSucursal\", Integer.valueOf(sucursalFP.getId()));\r\n/* 156: */ }\r\n/* 157:206 */ if (sucursalRetencion != null) {\r\n/* 158:207 */ query.setParameter(\"sucursalRetencion\", sucursalRetencion.getCodigo());\r\n/* 159: */ }\r\n/* 160:209 */ if (puntoVentaRetencion != null) {\r\n/* 161:210 */ query.setParameter(\"puntoVentaRetencion\", puntoVentaRetencion.getCodigo());\r\n/* 162: */ }\r\n/* 163:213 */ return query.getResultList();\r\n/* 164: */ }", "public List<Produto> consultarProdutos(int consulta, String valor) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n Statement stmt = null;\r\n ResultSet rs = null;\r\n List<Produto> produtos = new ArrayList<>();\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.createStatement();\r\n //Se a consulta for igual a zero(0) uma lista de todos os produtos \"cervejas\" e recuperada\r\n if (consulta == 0) {\r\n rs = stmt.executeQuery(consultas[consulta]);\r\n //Se a consulta for igual a tres(3) uma lista de todos os produtos \"cervejas\" e recuperada a parti do preco\r\n } else {\r\n rs = stmt.executeQuery(consultas[consulta] + \"'\" + valor + \"'\");\r\n }\r\n Produto produto;\r\n while (rs.next()) {\r\n produto = new Produto();\r\n produto.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n produto.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n produto.setPais(rs.getString(\"PAIS\"));\r\n produto.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n produto.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n produto.setRotulo(rs.getString(\"ROTULO\"));\r\n produto.setPreco(rs.getString(\"PRECO\"));\r\n produto.setVolume(rs.getString(\"VOLUME\"));\r\n produto.setTeor(rs.getString(\"TEOR\"));\r\n produto.setCor(rs.getString(\"COR\"));\r\n produto.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n produto.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n produto.setDescricao(rs.getString(\"DESCRICAO\"));\r\n produto.setSabor(rs.getString(\"SABOR\"));\r\n produto.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n produto.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n produto.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n produtos.add(produto);\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return produtos;\r\n }", "@Override\r\n\tpublic ArrayList<theaterVO> selectList() {\n\t\treturn theaterRentalDaoImpl.selectList();\r\n\t}", "public List<Match> getListMatchCompetition(int i) {\r\nList<Match> M = new ArrayList<>();\r\n\r\nString req4=\"SELECT idmatch,m.type,m.niveau,m.categorie,t.idticket idticket, l.libelle libelleCompetition, p1.nom joueur1, p2.nom joueur2, a1.nom arbitre, s.libellestade, m.datematch, t.nbrticket, t.prix\\n\" +\r\n\"FROM personne p1, personne p2, personne a1, `matchs` m, stade s, competition l, ticket t\\n\" +\r\n\"WHERE p1.idpersonne = m.idjoueur1\\n\" +\r\n\"AND p2.idpersonne = m.idjoueur2\\n\" +\r\n\"AND a1.idpersonne = m.idarbitre\\n\" +\r\n\"AND m.idstade = s.idstade\\n\" +\r\n\"AND m.idticket = t.idticket\\n\" +\r\n\"AND l.idcompetition = m.idcompetition\\n\" +\r\n\"AND m.datedestruction IS NULL \\n\" +\r\n\" AND l.idcompetition like \" + i;\r\n try {\r\n ResultSet res = ste.executeQuery(req4);\r\n while (res.next()) {\r\n\r\n Match m = new Match\r\n (\r\n res.getInt(\"idmatch\"),\r\n TrancheAge.valueOf(res.getString(\"type\")),\r\n Niveau.valueOf(res.getString(\"niveau\")),\r\n Categorie.valueOf(res.getString(\"categorie\")),\r\n res.getInt(\"idticket\"),\r\n res.getString(\"libelleCompetition\"),\r\n res.getString(\"joueur1\"),\r\n res.getString(\"joueur2\"),\r\n res.getString(\"arbitre\"),\r\n res.getString(\"libellestade\"),\r\n res.getDate(\"datematch\"),\r\n res.getInt(\"nbrticket\"),\r\n res.getInt(\"prix\")\r\n \r\n );\r\n \r\n M.add(m);\r\n \r\n \r\n }\r\n \r\n } catch (SQLException ex) {\r\n Logger.getLogger(MatchDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n System.out.println(ex);\r\n System.out.println(\"erreur affichage matchCompetion \");\r\n }\r\n \r\n return M;\r\n }", "public static void getProduto(){\r\n try {\r\n PreparedStatement stmn = connection.prepareStatement(\"select id_produto, codigo, produto.descricao pd,preco, grupo.descricao gd from produto inner join grupo on grupo.id_grupo = produto.idgrupo order by codigo\");\r\n ResultSet result = stmn.executeQuery();\r\n\r\n System.out.println(\"id|codigo|descricao|preco|grupo\");\r\n while (result.next()){\r\n long id_produto = result.getLong(\"id_produto\");\r\n String codigo = result.getString(\"codigo\");\r\n String pd = result.getString(\"pd\");\r\n String preco = result.getString(\"preco\");\r\n String gd = result.getString(\"gd\");\r\n\r\n\r\n\r\n System.out.println(id_produto+\"\\t\"+codigo+\"\\t\"+pd+\"\\t\"+preco+\"\\t\"+gd);\r\n }\r\n\r\n }catch (Exception throwables){\r\n throwables.printStackTrace();\r\n }\r\n\r\n }", "private ArrayList<Klant> fillKlantListFromResultSet(ResultSet resultSet, ArrayList<Klant> list) throws SQLException {\n while (resultSet.next()) {\n Klant klant = new Klant();\n klant.setId(resultSet.getInt(\"id\"));\n klant.setVoornaam(resultSet.getString(\"Voornaam\"));\n klant.setAchternaam(resultSet.getString(\"Achternaam\"));\n klant.setWoonplaats(resultSet.getString(\"Woonplaats\"));\n klant.setAdres(resultSet.getString(\"Adres\"));\n klant.setPostcode(resultSet.getString(\"Postcode\"));\n klant.setGeboortedatum(resultSet.getDate(\"Geboortedatum\"));\n klant.setTelefoon(resultSet.getString(\"Telefoon\"));\n klant.setEmail(resultSet.getString(\"email\"));\n klant.setLinkedin(resultSet.getString(\"LinkedIn\"));\n list.add(klant);\n }\n return list;\n }", "public List<CustomerModel> readDatabase() throws Exception{\n\nList<CustomerModel> list = new ArrayList<CustomerModel>();\n\ntry{\nlog.info(\"Loading MySql driver\");\nClass.forName(\"com.mysql.jdbc.Driver\");\n\nlog.info(\"Setting up connection with db\");\nconnect= DriverManager.getConnection(\"jdbc:mysql://localhost:3306/apidft\",\"root\",\"cisco\");\nlog.info(\"Database connection successful\");\nstatement = connect.createStatement();\n\nresultSet= statement.executeQuery(\"select * from customer\");\n\nwhile(resultSet.next()){\nlist.add(processRow(resultSet));\n}\n}\n\ncatch(Exception e){\nlog.error(\"Database connection fail\");\n}\n\nfinally{\nconnect.close();\n}\nreturn list;\n}", "public static ResultSet selectAll(){\n String sql = \"SELECT Codigo, Nombre, PrecioC, PrecioV, Stock FROM articulo\";\n ResultSet rs = null;\n try{\n Connection conn = connect();\n Statement stmt = conn.createStatement();\n rs = stmt.executeQuery(sql);\n }\n catch(SQLException e) {\n System.out.println(\"Error. No se han podido sacar los productos de la base de datos.\");\n //Descomentar la siguiente linea para mostrar el mensaje de error.\n //System.out.println(e.getMessage());\n }\n return rs;\n }", "public List<Clientes> read(){\n Connection con = ConectionFactory.getConnection();\n PreparedStatement pst = null;\n ResultSet rs = null;\n \n List<Clientes> cliente = new ArrayList<>();\n \n try {\n pst = con.prepareStatement(\"SELECT * from clientes ORDER BY fantasia\");\n rs = pst.executeQuery();\n \n while (rs.next()) { \n Clientes clientes = new Clientes();\n clientes.setCodigo(rs.getInt(\"codigo\"));\n clientes.setFantasia(rs.getString(\"fantasia\"));\n clientes.setCep(rs.getString(\"cep\"));\n clientes.setUf(rs.getString(\"uf\"));\n clientes.setLogradouro(rs.getString(\"logradouro\"));\n clientes.setNr(rs.getString(\"nr\"));\n clientes.setCidade(rs.getString(\"cidade\"));\n clientes.setBairro(rs.getString(\"bairro\"));\n clientes.setContato(rs.getString(\"contato\"));\n clientes.setEmail(rs.getString(\"email\"));\n clientes.setFixo(rs.getString(\"fixo\"));\n clientes.setCelular(rs.getString(\"celular\"));\n clientes.setObs(rs.getString(\"obs\"));\n cliente.add(clientes); \n }\n } catch (SQLException ex) {\n \n }finally{\n ConectionFactory.closeConnection(con, pst, rs);\n }\n return cliente;\n}", "@Override\n public List<T> getAll() throws SQLException {\n\n return this.dao.queryForAll();\n\n }", "private ArrayList<HashMap<String, String>> processRetrieve() {\n //Transform and Return Rows to a List of HashMaps\n try {\n if (rs == null) {\n System.out.println(\"rs is null\");\n } else {\n return rsToMaps();\n }\n } catch (SQLException ex) {\n throw new RuntimeException(ex);\n }\n return null;\n }", "public List listar() {\n ArrayList<Empleado> lista = new ArrayList<>();\r\n String sql = \"SELECT * FROM empleado\";\r\n \r\n try {\r\n con = cn.getConexion();\r\n ps = con.prepareStatement(sql); \r\n rs = ps.executeQuery();\r\n \r\n while (rs.next()) {\r\n Empleado emp = new Empleado(); \r\n emp.setId(rs.getInt(\"Id\")); //campos de la tabla\r\n emp.setNombre(rs.getString(\"Nombre\"));\r\n emp.setSalario(rs.getDouble(\"Salario\")); \r\n lista.add(emp); \r\n } \r\n } catch(Exception e) {\r\n System.out.println(e.getMessage());\r\n }\r\n \r\n return lista;\r\n }", "@Override\n\tpublic final Iterable<R> execute() {\n\t\t\n\t\treturn new Iterable<R>() {\n\t\t\t\n\t\t\t@Override \n\t\t\tpublic Iterator<R> iterator() {\n\t\t\t\t\n\t\t\t\treturn AbstractMultiQuery.this.iterator();\n\t\t\t\t\n\t\t\t}\n\t\t};\n\t\t\n\t}", "@Override\n public ArrayList<Asesor> getListaAsesores() {\n ArrayList<Asesor> listaAsesores = new ArrayList();\n ConexionSQL conexionSql = new ConexionSQL();\n Connection conexion = conexionSql.getConexion();\n try{\n PreparedStatement orden = conexion.prepareStatement(\"select * from asesor\");\n ResultSet resultadoConsulta = orden.executeQuery();\n String numeroPersonal;\n String nombre;\n String idioma;\n String telefono;\n String correo;\n Asesor asesor;\n while(resultadoConsulta.next()){\n numeroPersonal = resultadoConsulta.getString(1);\n nombre = resultadoConsulta.getString(4) +\" \"+ resultadoConsulta.getString(6) +\" \"+ resultadoConsulta.getString(5);\n idioma = resultadoConsulta.getString(2);\n telefono = resultadoConsulta.getString(8);\n correo = resultadoConsulta.getString(7);\n asesor = new Asesor(numeroPersonal, nombre, idioma,telefono,correo);\n listaAsesores.add(asesor);\n }\n }catch(SQLException | NullPointerException excepcion){\n Logger logger = Logger.getLogger(\"Logger\");\n logger.log(Level.WARNING, \"La conexión podría ser nula | la sentencia SQL esta mal\");\n }\n return listaAsesores;\n }", "public List<Object> getRepoKitxCadena(Long idRetailer, Long idProduct) {\r\n \r\n Connection conn=null;\r\n String storedProcedure;\r\n CallableStatement stmt=null;\r\n String av_message; \r\n \r\n ResultSet rs = null;\r\n av_message = null;\r\n storedProcedure = \"begin NpProduct_PKG.sp_get_repokitxretailer_lst(?,?,?,?); end;\";\r\n List<Object> lstAllEntities = new ArrayList<Object>();\r\n try{\r\n conn = ConnectionDB.getConnection();\r\n stmt = conn.prepareCall(storedProcedure);\r\n\r\n //Se registra el parámetro de salida \r\n stmt.registerOutParameter(3, OracleTypes.CURSOR);\r\n stmt.registerOutParameter(4, OracleTypes.VARCHAR);\r\n //Se configuran los demás parámetros del stored\r\n stmt = configureRepoKitxCadena(stmt, idRetailer, idProduct);\r\n\r\n //Se ejecuta el statement\r\n stmt.execute();\r\n\r\n //Se obtiene la respuesta error/exito del stored\r\n av_message = (String)stmt.getObject(4);\r\n boolean resultado=false;\r\n resultado=this.handleErrorResult(av_message);\r\n \r\n\r\n if(resultado){\r\n //Se obtiene el objeto del cursor\r\n rs = (ResultSet)stmt.getObject(3);\r\n\r\n while(rs.next()){\r\n Object npAddress = setEntityAttributesRepoKitxCadena(rs);\r\n lstAllEntities.add(npAddress);\r\n }\r\n }else{\r\n logger.error(\"[NPProductDAO][Metodo: getRepoKitxCadena][SP: \"+storedProcedure+\"][MensajeError: \"+av_message+\"]\" +\r\n \"[Parametros][idRetailer:\"+idRetailer+\"][idProduct:\"+idProduct+\"]\");\r\n }\r\n\r\n }catch (Exception e){\r\n throw new UnhandledException( \"getRepoKitxCadena [ \"+ Constant.PARAMETER_ERROREXCEPTION +\" ] \"+ e.getMessage(),e);\r\n }finally{\r\n //Se limpian las variables de conexión\r\n ConnectionDB.close(conn, rs, stmt);\r\n }\r\n return(lstAllEntities);\r\n }", "public Collection cargarDeObjetivo(int codigoCiclo, int codigoPlan, int objetivo, int periodo, String estado) {\n/* 121 */ Collection resultados = new ArrayList();\n/* */ try {\n/* 123 */ String s = \"select m.Codigo_Ciclo, m.Codigo_Plan, m.Codigo_Meta, m.Codigo_Objetivo, m.Descripcion, m.Valor_Meta, m.Tipo_Medicion, m.Frecuencia_Medicion, m.Justificacion, m.Estado, m.Fecha_Insercion, m.Usuario_Insercion, m.Fecha_Modificacion, m.Usuario_Modificacion, m.Mes01, m.Mes02, m.Mes03, m.Mes04, m.Mes05, m.Mes06, m.Mes07, m.Mes08, m.Mes09, m.Mes10, m.Mes11, m.Mes12, m.Fuente_Dato, m.Aplica_En, m.Unidad_Medida, m.Valor_Minimo, m.Valor_Maximo, m.Tipo_Grafica, Tm.Descripcion as Nombretipomedicion, Est.Descripcion as Nombreestado, Um.Descripcion as Nombre_Unidad_Medida, SUM(CASE WHEN ac.NUMERO IS NOT NULL THEN 1 ELSE 0 END) acciones from Cal_Plan_Metas m left join Am_Acciones Ac on( m.Codigo_Ciclo = Ac.Codigo_Ciclo and m.Codigo_Plan = Ac.Codigo_Plan and m.Codigo_Meta = Ac.Codigo_Meta and Ac.Asociado = 'P'), \\t\\t Sis_Multivalores Tm, \\t\\t Sis_Multivalores Est, \\t\\t Sis_Multivalores Um where m.Tipo_Medicion = Tm.Valor and Tm.Tabla = 'CAL_TIPO_MEDICION' and m.Estado = Est.Valor and Est.Tabla = 'CAL_ESTADO_META' and m.Unidad_Medida = Um.Valor and Um.Tabla = 'CAL_UNIDAD_MEDIDA_META' and m.codigo_ciclo=\" + codigoCiclo + \" and m.codigo_plan=\" + codigoPlan + \" and m.codigo_objetivo=\" + objetivo;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 180 */ if (estado.length() > 0) {\n/* 181 */ s = s + \" and m.estado='A'\";\n/* */ }\n/* */ \n/* 184 */ if (periodo == 1) {\n/* 185 */ s = s + \" and m.mes01='S'\";\n/* */ }\n/* 187 */ else if (periodo == 2) {\n/* 188 */ s = s + \" and m.mes02='S'\";\n/* */ }\n/* 190 */ else if (periodo == 3) {\n/* 191 */ s = s + \" and m.mes03='S'\";\n/* */ }\n/* 193 */ else if (periodo == 4) {\n/* 194 */ s = s + \" and m.mes04='S'\";\n/* */ }\n/* 196 */ else if (periodo == 5) {\n/* 197 */ s = s + \" and m.mes05='S'\";\n/* */ }\n/* 199 */ else if (periodo == 6) {\n/* 200 */ s = s + \" and m.mes06='S'\";\n/* */ }\n/* 202 */ else if (periodo == 7) {\n/* 203 */ s = s + \" and m.mes07='S'\";\n/* */ }\n/* 205 */ else if (periodo == 8) {\n/* 206 */ s = s + \" and m.mes08='S'\";\n/* */ }\n/* 208 */ else if (periodo == 9) {\n/* 209 */ s = s + \" and m.mes09='S'\";\n/* */ }\n/* 211 */ else if (periodo == 10) {\n/* 212 */ s = s + \" and m.mes10='S'\";\n/* */ }\n/* 214 */ else if (periodo == 11) {\n/* 215 */ s = s + \" and m.mes11='S'\";\n/* */ }\n/* 217 */ else if (periodo == 12) {\n/* 218 */ s = s + \" and m.mes12='S'\";\n/* */ } \n/* */ \n/* 221 */ s = s + \" GROUP BY m.Codigo_Ciclo, m.Codigo_Plan, m.Codigo_Meta, m.Codigo_Objetivo, m.Descripcion, m.Valor_Meta, m.Tipo_Medicion, m.Frecuencia_Medicion, m.Justificacion, m.Estado, m.Fecha_Insercion, m.Usuario_Insercion, m.Fecha_Modificacion, m.Usuario_Modificacion, m.Mes01, m.Mes02, m.Mes03, m.Mes04, m.Mes05, m.Mes06, m.Mes07, m.Mes08, m.Mes09, m.Mes10, m.Mes11, m.Mes12, m.Fuente_Dato, m.Aplica_En, m.Unidad_Medida, m.Valor_Minimo, m.Valor_Maximo, m.Tipo_Grafica, Tm.Descripcion, Est.Descripcion, Um.Descripcion order by m.descripcion\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 259 */ boolean rtaDB = this.dat.parseSql(s);\n/* 260 */ if (!rtaDB) {\n/* 261 */ return resultados;\n/* */ }\n/* */ \n/* 264 */ this.rs = this.dat.getResultSet();\n/* 265 */ while (this.rs.next()) {\n/* 266 */ resultados.add(leerRegistro());\n/* */ }\n/* */ }\n/* 269 */ catch (Exception e) {\n/* 270 */ e.printStackTrace();\n/* 271 */ Utilidades.writeError(\"CalPlanMetasFactory:cargarTodos \", e);\n/* */ } \n/* 273 */ return resultados;\n/* */ }", "public ArrayList<ModelAprendizagemTeorica> getListaAprendizagemTeoricaDAO(){\n ArrayList<ModelAprendizagemTeorica> listamodelAprendizagemTeorica = new ArrayList();\n ModelAprendizagemTeorica modelAprendizagemTeorica = new ModelAprendizagemTeorica();\n try {\n this.conectar();\n this.executarSQL(\n \"SELECT \"\n + \"id,\"\n + \"descricao,\"\n + \"texto\"\n + \" FROM\"\n + \" aprendizagem_teorica\"\n + \";\"\n );\n\n while(this.getResultSet().next()){\n modelAprendizagemTeorica = new ModelAprendizagemTeorica();\n modelAprendizagemTeorica.setId(this.getResultSet().getInt(1));\n modelAprendizagemTeorica.setDescricao(this.getResultSet().getString(2));\n modelAprendizagemTeorica.setTexto(this.getResultSet().getString(3));\n listamodelAprendizagemTeorica.add(modelAprendizagemTeorica);\n }\n }catch(Exception e){\n e.printStackTrace();\n }finally{\n this.fecharConexao();\n }\n return listamodelAprendizagemTeorica;\n }", "Tablero consultarTablero();", "@Test\n public void retriveAllTest() throws SQLException {\n manager = new TableServizioManager(mockDb);\n List<Servizio> lista = manager.retriveAll();\n assertEquals(7,lista.size(),\"It should return a list of length 7\");\n }", "public ArrayList<Book> getBooks()\n {\n ArrayList<Book> books = new ArrayList<>();\n String sql = \"SELECT [book_id]\\n\" +\n \" ,[book_title]\\n \" +\n \" ,[book_author]\\n\" +\n \" ,[book_publish_year]\\n\" +\n \" ,[book_category]\\n\" +\n \" ,[book_keyword]\\n\" +\n \" ,[book_status]\\n \" +\n \" FROM [lib_book_master]\";\n try {\n PreparedStatement statement = connection.prepareStatement(sql);\n ResultSet rs = statement.executeQuery();\n //cursor\n while(rs.next()) \n { \n int book_id = rs.getInt(\"book_id\");\n String book_title = rs.getString(\"book_title\");\n String book_author = rs.getString(\"book_author\");\n String book_publish_year = rs.getString(\"book_publish_year\");\n String book_category = rs.getString(\"book_category\");\n String book_keyword = rs.getString(\"book_keyword\");\n String book_status = rs.getString(\"book_status\");\n \n Book s = new Book(book_id,book_title, book_author, book_publish_year,book_category,book_keyword,book_status);\n books.add(s);\n }\n \n } catch (SQLException ex) {\n Logger.getLogger(DBContext.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return books;\n }", "@Override\n public Collection<KlantBedrijf> select() {\n return null;\n }", "@Override\n public ResultSet getResultSet() throws SQLException {\n\n ResultSet r;\n\n r = result; // save the existing result set\n result = null; // null out the existing result set\n return r; // return the previously extant result set\n }", "@Override\n\tpublic List<Persona> getPersona() throws SQLException {\n\t\tList<Persona> listaPersona1 = new ArrayList<Persona>();\n\t\t\n Single<List<DbRow>> rows = dbClient.execute(exec -> exec\n \t\t.createQuery(\"select * from persona;\").execute()).collectList();\n \n try {\n List<DbRow> listasPersonas = rows.get();\n \n if(!listasPersonas.isEmpty()) {\n \t\n \tfor(int i=0; i< listasPersonas.size(); i++) {\n \t\tPersona p = new Persona();\n \t\tp.setId((int)listasPersonas.get(i).column(\"id\").value());\n \t\tp.setNombre((String)listasPersonas.get(i).column(\"nombre\").value());\n \t\tp.setDireccion((String)listasPersonas.get(i).column(\"direccion\").value());\n \t\tp.setCorreo((String)listasPersonas.get(i).column(\"correo\").value()); \t\t\n \t\tlistaPersona1.add(p);\n \t}\n \t\n }\n // listasPersonas.forEach(System.out::println);\n \n } catch (InterruptedException e) {\n e.printStackTrace();\n return null;\n } catch (ExecutionException e) {\n e.printStackTrace();\n return null;\n }\n return listaPersona1;\n\t\t\n\t}", "List<ItemStockDO> selectAll();", "private ArrayList<Bedrijf> fillBedrijfListFromResultSet(ResultSet resultSet, ArrayList<Bedrijf> list) throws SQLException {\n\n while (resultSet.next()) {\n Bedrijf bedrijf = new Bedrijf();\n bedrijf.setId(resultSet.getInt(\"id\"));\n bedrijf.setBedrijfsnaam(resultSet.getString(\"bedrijfsnaam\"));\n bedrijf.setAdres(resultSet.getString(\"adres\"));\n bedrijf.setPostcode(resultSet.getString(\"postcode\"));\n bedrijf.setWebsite(resultSet.getString(\"website\"));\n bedrijf.setPlaats(resultSet.getString(\"plaats\"));\n bedrijf.setContactpersoon(resultSet.getString(\"contactpersoon\"));\n bedrijf.setTelefoon(resultSet.getString(\"telefoon\"));\n bedrijf.setEmail(resultSet.getString(\"email\"));\n list.add(bedrijf);\n }\n return list;\n }", "public ResultSet getItemList() throws IllegalStateException{\n\t \n\t if(!isLoggedIn())\n\t throw new IllegalStateException(\"MUST BE LOGGED IN FIRST!\");\n\t try{\n\t \t stmt = con.createStatement();\n String queryString = \"SELECT INUMBER , INAME , CATEG, auc_start, auc_end_date , startbid , currentbid,status \" \n \t\t+ \"FROM ITEM \"\n + \" WHERE SELLERNO = '\" + this.id +\"' \";\n\n result = stmt.executeQuery(queryString);\n \n\t }\n\t catch (Exception E) {\n\t E.printStackTrace();\n\t }\n\t return result; \n\t }", "@Override\n\tpublic List<StuXK> select() throws SQLException {\n\t\tList<StuXK> list=new ArrayList<StuXK>();\n\t\tString sql=\"select * from V_Stuxk \";\t\n\t\tBaseDAO dao=new BaseDAO();\t\n\t\tResultSet rs=dao.select(sql);\n\t\twhile(rs.next()){\t\n\t\t\tStuXK sxk=new StuXK();\n\t\t\tsxk.setCourseName(rs.getString(\"CourseName\"));\n\t\t\tsxk.setTeacherName(rs.getString(\"TeacherName\"));\n\t\t\tsxk.setWeekday(rs.getString(\"Weekday\"));\n\t\t\tsxk.setClassfestival(rs.getString(\"Classfestival\"));\n\t\t\tsxk.setClassRoomName(rs.getString(\"ClassRoomName\"));\n\t\t\tsxk.setCrediy(rs.getString(\"Crediy\"));\n\t\t\tsxk.setTeachTaskID(rs.getInt(\"ID\"));\n\t\t\tsxk.setProfessionName(rs.getString(\"ProfessionName\"));\n\t\t\tlist.add(sxk);\n\t\t}\n\t\treturn list;\n\t}", "public ResultSet getResults() {\r\n return resultSet;\r\n }", "public void extractObjectDB() {\n\n\t\ttry {\n\t\t\t\n\t\t\tstatement = c.createStatement();\n\t\t\tResultSet rs = stmt.executeQuery(\"SELECT * FROM User WHERE id NOT IN (SELECT id FROM OrderManager)\");\n\t\t\tResultSet results = statement.executeQuery(\"select FirstName , LastName, Password,Phonenumber,AFM,User.id, Company,Regular,Season from User INNER JOIN OrderManager on User.id=OrderManager.Id\"); \n\t\t \n\n\t\t\twhile (rs.next()) {\n\t\t\t\n\t\t\t\tUser us = new User();\n\t\t\t\tus.setFirstName(rs.getString(\"FirstName\"));\n\t\t\t\tus.setSurName(rs.getString(\"LastName\"));\n\t\t\t\tus.setPassword(rs.getString(\"Password\"));\n\t\t\t\tus.setTelephone(rs.getString(\"Phonenumber\"));\n\t\t\t\tus.setAFM(rs.getString(\"AFM\"));\n\t\t\t\tus.setId(rs.getString(\"id\"));\n\t\t\t\tus.setCompany(rs.getString(\"Company\"));\n\t\t\t\tusers.add(us);\n\t\t\t\t\n\t\t\t}\n\t\t\tfor(User u: users)\n\t\t\t{\n\t\t\t\tint index = users.indexOf(u);\n\t\t\t\tif (u instanceof Stockkeeper) {\n\t\t\t\t\tStockkeeper st = (Stockkeeper) u;\n\t\t\t\t\tusers.set(index,st);\n\t\t\t\t}\n\t\t\t\telse if(u instanceof Seller){\n\t\t\t\t\tSeller se = (Seller) u;\n\t\t\t\t\tusers.set(index, se);\n\t\t\t}\n\t\t\t}\n\t\t\twhile (results.next()) {\n\t\t\t\t\n\t\t\t\tOrderManager om = new OrderManager(\"\",\"\",\"\",\"\",\"\",\"\",true,\"\");\n\t\t\t\tom.setFirstName(results.getString(\"FirstName\"));\n\t\t\t\tom.setSurName(results.getString(\"LastName\"));\n\t\t\t\tom.setPassword(results.getString(\"Password\"));\n\t\t\t\tom.setTelephone(results.getString(\"Phonenumber\"));\n\t\t\t\tom.setAFM(results.getString(\"AFM\"));\n\t\t\t\tom.setId(results.getString(\"id\"));\n\t\t\t\tom.setCompany(results.getString(\"Company\"));\n\t\t\t\tif (results.getInt(\"Regular\")== 0) \n\t\t\t\t\tom.setRegular(true);\n\t\t\t\telse \n\t\t\t\t\tom.setRegular(false);\n\t\t\t\tom.setSeason(results.getString(\"Season\"));\n\t\t\t\tusers.add(om);\n\t\t\t\t\n\t\t\t}\n\t\t\tc.close();\n\t\t}catch(SQLException | ClassNotFoundException e){\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\t\n\t\t\n\t}" ]
[ "0.66552794", "0.6463382", "0.6318827", "0.630673", "0.627891", "0.6273898", "0.6222975", "0.61944634", "0.61796445", "0.6169499", "0.6169066", "0.61627847", "0.6148517", "0.614733", "0.6146524", "0.61436665", "0.61414766", "0.6135384", "0.61344653", "0.6125146", "0.61242384", "0.6109016", "0.6094788", "0.609039", "0.6084552", "0.6078601", "0.6072787", "0.6048323", "0.60463244", "0.6042163", "0.6036456", "0.603457", "0.6019689", "0.60027224", "0.60023755", "0.6000438", "0.5998903", "0.59967333", "0.5996043", "0.59894466", "0.598901", "0.59889704", "0.59874415", "0.5987076", "0.59751284", "0.59659296", "0.5963788", "0.59637636", "0.59612525", "0.5958105", "0.59512335", "0.59484136", "0.5945903", "0.5941209", "0.5941105", "0.59404385", "0.59251904", "0.59249645", "0.59197557", "0.59190136", "0.59173334", "0.5917119", "0.5914772", "0.59142846", "0.5911852", "0.5906257", "0.59025866", "0.590077", "0.5899153", "0.5887127", "0.5880806", "0.5880143", "0.5878283", "0.5871751", "0.5870944", "0.5870111", "0.58592737", "0.5857909", "0.585687", "0.58545345", "0.585184", "0.58425516", "0.5841233", "0.5833895", "0.58330077", "0.58325154", "0.5832184", "0.5829924", "0.5829546", "0.5827395", "0.58266723", "0.582636", "0.58240855", "0.58240277", "0.5822881", "0.58196336", "0.58145916", "0.5808286", "0.5806448", "0.5805331" ]
0.61237776
21
QR Decomposition. For an mbyn matrix A with m >= n, the QR decomposition is an mbyn orthogonal matrix Q and an nbyn upper triangular matrix R so that A = QR. The QR decompostion always exists, even if the matrix does not have full rank, so the constructor will never fail. The primary use of the QR decomposition is in the least squares solution of nonsquare systems of simultaneous linear equations. This will fail if isFullRank() returns false.
public QRDecompositionAdapter(MatrixAdapter matrix) { super(matrix); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void dormqr_(CHARACTER SIDE,CHARACTER TRANS,INTEGER M,INTEGER N,INTEGER K,double[] A,INTEGER LDA,double[] TAU,double[] C,INTEGER LDC,double[] WORK,INTEGER LWORK,INTEGER INFO);", "@Test\n public void checkGetRInputSize()\n {\n int width = 5;\n int height = 10;\n\n QRDecomposition<DMatrixRMaj> alg = createQRDecomposition();\n\n SimpleMatrix A = new SimpleMatrix(height,width, DMatrixRMaj.class);\n RandomMatrices_DDRM.fillUniform((DMatrixRMaj)A.getMatrix(),rand);\n\n alg.decompose((DMatrixRMaj)A.getMatrix());\n\n // check the case where it creates the matrix first\n assertEquals(width, alg.getR(null, true).numRows);\n assertEquals(height, alg.getR(null, false).numRows);\n\n // check the case where a matrix is provided\n alg.getR(new DMatrixRMaj(width,width),true);\n alg.getR(new DMatrixRMaj(height,width),false);\n\n // check some negative cases\n {\n DMatrixRMaj R = new DMatrixRMaj(height,width);\n alg.getR(R,true);\n assertEquals(width,R.numCols);\n assertEquals(width,R.numRows);\n }\n\n {\n DMatrixRMaj R = new DMatrixRMaj(width-1,width);\n alg.getR(R,false);\n assertEquals(width,R.numCols);\n assertEquals(height,R.numRows);\n }\n }", "@Test\n public void checkGetNullVersusNot() {\n int width = 5;\n int height = 10;\n\n QRDecomposition<DMatrixRMaj> alg = createQRDecomposition();\n\n SimpleMatrix A = new SimpleMatrix(height,width, DMatrixRMaj.class);\n RandomMatrices_DDRM.fillUniform((DMatrixRMaj)A.getMatrix(),rand);\n\n alg.decompose((DMatrixRMaj)A.getMatrix());\n\n // get the results from a provided matrix\n DMatrixRMaj Q_provided = RandomMatrices_DDRM.rectangle(height,height,rand);\n DMatrixRMaj R_provided = RandomMatrices_DDRM.rectangle(height,width,rand);\n\n assertSame(R_provided, alg.getR(R_provided, false));\n assertSame(Q_provided, alg.getQ(Q_provided, false));\n\n // get the results when no matrix is provided\n DMatrixRMaj Q_null = alg.getQ(null, false);\n DMatrixRMaj R_null = alg.getR(null,false);\n\n // see if they are the same\n assertTrue(MatrixFeatures_DDRM.isEquals(Q_provided,Q_null));\n assertTrue(MatrixFeatures_DDRM.isEquals(R_provided,R_null));\n }", "@Test\n public void checkCompactFormat()\n {\n int height = 10;\n int width = 5;\n\n QRDecomposition<DMatrixRMaj> alg = createQRDecomposition();\n\n SimpleMatrix A = new SimpleMatrix(height,width, DMatrixRMaj.class);\n RandomMatrices_DDRM.fillUniform((DMatrixRMaj)A.getMatrix(),rand);\n\n alg.decompose((DMatrixRMaj)A.getMatrix());\n\n SimpleMatrix Q = new SimpleMatrix(height,width, DMatrixRMaj.class);\n alg.getQ((DMatrixRMaj)Q.getMatrix(), true);\n\n // see if Q has the expected properties\n assertTrue(MatrixFeatures_DDRM.isOrthogonal((DMatrixRMaj)Q.getMatrix(),UtilEjml.TEST_F64_SQ));\n\n // try to extract it with the wrong dimensions\n Q = new SimpleMatrix(height,height, DMatrixRMaj.class);\n alg.getQ((DMatrixRMaj)Q.getMatrix(), true);\n assertEquals(height,Q.numRows());\n assertEquals(width,Q.numCols());\n }", "public void dorgqr_(INTEGER M,INTEGER N,INTEGER K,double[] A,INTEGER LDA,double[] TAU,double[] WORK,INTEGER LWORK,INTEGER INFO);", "public Matrix solve(Matrix B) throws JPARSECException {\n return (m == n ? (new LUDecomposition(this)).solve(B) :\n (new QRDecomposition(this)).solve(B));\n }", "public Board(int n){\n openPositions = new boolean[n][n];\n numberOfQueensPlaced = 0;\n rowUsedByColNumber = new int[n];\n validConfigOfQueens = new ArrayList<String[]>();\n sizeOfBoard = n;\n QueenInRow = generatePositions();\n }", "public Board(int n){\n attackLeftDiag = new boolean[2*n - 1];\n attackRightDiag = new boolean[2*n - 1];\n attackSide = new boolean[n];\n \n sizeOfBoard = n;\n numberOfQueensPlaced = 0;\n \n rowUsedByColNumber = new int[n];\n validConfigOfQueens = new ArrayList<String[]>();\n QueenInRow = generatePositions();\n }", "public Matrix(int m, int n) {\n this.m = m;\n this.n = n;\n data = new double[m][n];\n }", "public SchurDecomposition(FieldMatrix<Complex> A){\n\t\tint maxIter = 10;\n\t\tint n = A.getColumnDimension();\n\t\t\n\t\tFieldMatrix<Complex> Ak = A;\n\t\tFieldMatrix<Complex> Uk = MatrixUtils.createFieldIdentityMatrix(ComplexField.getInstance(), n);\n\t\t\n\t\tfor(int i = 1; i <= maxIter; i++){\n\t\t\tHausHolderQR myHaus = new HausHolderQR(Ak);\n\t\t\tAk = (myHaus.getR()).multiply(myHaus.getQ());\n\t\t\tUk = Uk.multiply(myHaus.getQ());\n\t\t\t\t\t\n\t\t}\n\t\t\n\t\tthis.T = Ak;\n\t\tthis.U = Uk;\n\t}", "public Matrix(int n) {\n\t\tif (n < 1) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tthis.n = n;\n\t\tthis.content = new double[n][n];\n\t\tthis.hash = hashCode();\n\t}", "@SuppressWarnings(\"Duplicates\")\n public static Solver makeNQueenWithBinaryConstraints(int n){\n Solver solver = new Solver();\n IntVar[] vars = new IntVar[n];\n for (int i = 0; i < vars.length; i++) {\n vars[i] = VariableFactory.enumerated(\"Q_\" + i, 1, n, solver);\n }\n solver.addHook(\"vars\", vars);\n for (int i = 0; i < n - 1; i++) {\n for (int j = i + 1; j < n; j++) {\n int k = j - i;\n solver.post(IntConstraintFactory.arithm(vars[i], \"!=\", vars[j]));\n solver.post(IntConstraintFactory.arithm(vars[i], \"!=\", vars[j], \"+\", -k));\n solver.post(IntConstraintFactory.arithm(vars[i], \"!=\", vars[j], \"+\", k));\n }\n }\n return solver;\n }", "public Queen(int r, int c)\r\n {\r\n row = r;\r\n column = c;\r\n }", "public Matrix rref() {\n\t\tMatrix m = ref();\n\t\tint pivotRow = m.M - 1;\n\t\tArrayList<Integer> pivotColumns = m.pivotColumns();\n\t\tCollections.reverse(pivotColumns);\n\t\tfor (int i = 0; i < pivotColumns.size(); i++) {\n\t\t\tint pivotCol = pivotColumns.get(i);\n\t\t\twhile (pivotRow >= 0 && m.ROWS[pivotRow][pivotCol].equals(new ComplexNumber(0))) {\n\t\t\t\tpivotRow--;\n\t\t\t}\n\t\t\tfor (int upperRow = pivotRow - 1; upperRow > -1; upperRow--) {\n\t\t\t\tComplexNumber factor1 = new ComplexNumber(-1);\n\t\t\t\tComplexNumber factor2 = m.ROWS[upperRow][pivotCol];\n\t\t\t\tComplexNumber factor3 = m.ROWS[pivotRow][pivotCol];\n\t\t\t\tComplexNumber factor4 = new ComplexNumber(1);\n\t\t\t\tComplexNumber factor5 = factor1.multiply(factor2);\n\t\t\t\tComplexNumber factor6 = factor4.divide(factor3);\n\t\t\t\tComplexNumber weight = factor5.multiply(factor6);\n\n\t\t\t\tm = m.rowAdd(upperRow, pivotRow, weight);\n\t\t\t}\n\t\t\tpivotRow--;\n\t\t}\n\t\treturn m;\n\t}", "public Matrix(int nrOfRows, int nrOfCols, Random rand, BigInteger q) {\n this(nrOfRows, nrOfCols);\n for (int col = 0; col < nrOfCols; col++) {\n for (int row = 0; row < nrOfRows; row++) {\n inner[row][col] = rand.nextRandom(q);\n }\n }\n }", "public ArrayList<String[]> solveNQueens(int n) {\n ArrayList<String[]> res= new ArrayList<String[]>();\n int[] board=new int[n];\n dfs(res,board,n,0);\n return res;\n }", "@SuppressWarnings(\"ParameterName\")\n public static SimpleMatrix discreteAlgebraicRiccatiEquation(\n Matrix A,\n Matrix B,\n Matrix Q,\n Matrix R) {\n return discreteAlgebraicRiccatiEquation(A.getStorage(), B.getStorage(), Q.getStorage(),\n R.getStorage());\n }", "public Matrix(int nrOfRows, int nrOfCols) {\n this.nrOfRows = nrOfRows;\n this.nrOfCols = nrOfCols;\n inner = new BigInteger[nrOfRows][nrOfCols];\n }", "public PQR() {}", "@SuppressWarnings({\"LocalVariableName\", \"ParameterName\"})\n public static SimpleMatrix discreteAlgebraicRiccatiEquation(\n SimpleMatrix A,\n SimpleMatrix B,\n SimpleMatrix Q,\n SimpleMatrix R) {\n var S = new SimpleMatrix(A.numRows(), A.numCols());\n DrakeJNI.discreteAlgebraicRiccatiEquation(A.getDDRM().getData(), B.getDDRM().getData(),\n Q.getDDRM().getData(), R.getDDRM().getData(), A.numCols(), B.numCols(),\n S.getDDRM().getData());\n return S;\n }", "public ArrayList<String[]> solveNQueens(int n) {\n int[] board=new int[n];\n res=new ArrayList<String[]>();\n dfs(board,0);\n return res;\n }", "public Matrix(int n) {\n\t\tsize = n;\n\t\tm = new int[size][size];\n\t}", "public Matrix4rad() {\r\n\t\tthis(false);\r\n\t}", "public void dormrq_(CHARACTER SIDE,CHARACTER TRANS,INTEGER M,INTEGER N,INTEGER K,double[] A,INTEGER LDA,double[] TAU,double[] C,INTEGER LDC,double[] WORK,INTEGER LWORK,INTEGER INFO);", "public Matrix(double[][] A, int m, int n) {\n this.data = A;\n this.m = m;\n this.n = n;\n }", "public List<List<String>> solveNQueens(int n) {\n if (n < 1) return Collections.EMPTY_LIST;\n\n char[][] board = new char[n][n];\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) board[i][j] = '.';\n }\n\n List<List<String>> result = new ArrayList<>();\n boolean[][] visited = new boolean[3][2 * n];\n backtracking(0, n, board, result, visited);\n return result;\n }", "public static void test() {\n // create M-by-N matrix that doesn't have full rank\n int M = 8, N = 5;\n Matrix B = Matrix.random(5, 3);\n Matrix A = Matrix.random(M, N).times(B).times(B.transpose());\n System.out.print(\"A = \");\n A.print(9, 6);\n\n // compute the singular vallue decomposition\n System.out.println(\"A = U S V^T\");\n System.out.println();\n SingularValueDecomposition s = A.svd();\n System.out.print(\"U = \");\n Matrix U = s.getU();\n U.print(9, 6);\n System.out.print(\"Sigma = \");\n Matrix S = s.getS();\n S.print(9, 6);\n System.out.print(\"V = \");\n Matrix V = s.getV();\n V.print(9, 6);\n System.out.println(\"rank = \" + s.rank());\n System.out.println(\"condition number = \" + s.cond());\n System.out.println(\"2-norm = \" + s.norm2());\n\n // print out singular values\n System.out.print(\"singular values = \");\n Matrix svalues = new Matrix(s.getSingularValues(), 1);\n svalues.print(9, 6);\n\n\t\t Matrix C = U.times(S).times(V.transpose());\n\t\t C.print(9, 6);\n\n\t\t Matrix D = A.transpose();\n\t\t D.print(9, 6);\n\n\t\t Matrix E = D.times(A);\n\t\t E.print(9, 6);\n }", "public void dorgrq_(INTEGER M,INTEGER N,INTEGER K,double[] A,INTEGER LDA,double[] TAU,double[] WORK,INTEGER LWORK,INTEGER INFO);", "public static BigInteger rho(BigInteger N){\r\n\t\tBigInteger ys = null, x = null;\r\n\t\tBigInteger \r\n\t\t\t\ty = new BigInteger(N.bitLength(),rand), \r\n\t\t\t\tc = new BigInteger(N.bitLength(),rand), \r\n\t\t\t\tm = new BigInteger(N.bitLength(),rand);\r\n\t\tBigInteger \tg = RichardPollard.ONE,\r\n\t\t\t\t\tr = RichardPollard.ONE,\r\n\t\t\t\t\tq = RichardPollard.ONE;\r\n\t\twhile(g.compareTo(RichardPollard.ONE)==0){\r\n//\t\t\tSystem.out.println(\"wa\");\r\n\t\t\tx = y;\r\n\t\t\tfor(int i = 0; i<r.doubleValue();i++){\r\n\t\t\t\ty = y.multiply(y).remainder(N).add(c).remainder(N);\r\n\t\t\t}\r\n\t\t\tBigInteger k = RichardPollard.ZERO;\r\n\t\t\twhile(k.compareTo(r)<1 && g.equals(RichardPollard.ONE)){\r\n\t\t\t\tys = y;\r\n\t\t\t\tBigInteger mrk = r.subtract(k).min(m);\r\n\t\t\t\tfor(BigInteger i = RichardPollard.ZERO; i.compareTo(mrk)<1; i=i.add(RichardPollard.ONE)){\r\n\t\t\t\t\ty = y.multiply(y).remainder(N).add(c).remainder(N);\r\n\t\t\t\t\tq = q.multiply(x.subtract(y).abs()).remainder(N);\r\n\t\t\t\t}\r\n\t\t\t\tg = q.gcd(N);\r\n\t\t\t\tk = k.add(m);\r\n\t\t\t}\r\n\t\t\tr = r.multiply(RichardPollard.TWO);\r\n\t\t\t\r\n\t\t}\r\n\t\tif(g.equals(N)){\r\n\t\t\twhile(true) {\r\n\t\t\t\tys = ys.multiply(ys).remainder(N).add(c).remainder(N);\r\n\t\t\t\tg = x.subtract(ys).abs().gcd(N);\r\n\t\t\t\tif(g.compareTo(RichardPollard.ONE)==1){\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\t\r\n//\t\tSystem.out.println(y.doubleValue()+\" \"+r.doubleValue());\r\n\t\treturn g;\r\n\t\t\r\n\t}", "public int getQRcodeNumber() {\n return QRcodeNumber;\n }", "public Matrix(int nrow, int ncol){\r\n\t\tthis.nrow = nrow;\r\n\t\tthis.ncol = ncol;\r\n\t \tthis.matrix = new double[nrow][ncol];\r\n\t\tthis.index = new int[nrow];\r\n for(int i=0;i<nrow;i++)this.index[i]=i;\r\n }", "public List<List<String>> solveNQueens(int n) {\n N = n;\n results = new ArrayList<List<String>>();\n\n putQueenInRow(0, null, null);\n\n return results;\n }", "public void dormrz_(CHARACTER SIDE,CHARACTER TRANS,INTEGER M,INTEGER N,INTEGER K,INTEGER L,double[] A,INTEGER LDA,double[] TAU,double[] C,INTEGER LDC,double[] WORK,INTEGER LWORK,INTEGER INFO);", "public MatrixArrayCR (int n, long[] in_array) throws WrongLength{\n\t\tif (in_array.length != n){ //throws error if length of array != n\n\t\t\tthrow new WrongLength (n, in_array.length, \"in_array\");\n\t\t}\n\t\telse{ //updates record with in_array if in_array.length == n\n\t\t\tthis.mat = transpose(flatTo2D(in_array));\n\t\t}\n\t}", "protected void rebuildRateMatrix(double[][] rate, double[] parameters)\t{\n // Q matrix\n rate[0][1] = 0.610810; rate[0][2] = 0.569079;\n rate[0][3] = 0.821500; rate[0][4] = 1.141050;\n rate[0][5] = 1.011980; rate[0][6] = 1.756410;\n rate[0][7] = 1.572160; rate[0][8] = 0.354813;\n rate[0][9] = 0.219023; rate[0][10] = 0.443935;\n rate[0][11] = 1.005440; rate[0][12] = 0.989475;\n rate[0][13] = 0.233492; rate[0][14] = 1.594890;\n rate[0][15] = 3.733380; rate[0][16] = 2.349220;\n rate[0][17] = 0.125227; rate[0][18] = 0.268987;\n rate[0][19] = 2.221870;\n\n rate[1][2] = 0.711690; rate[1][3] = 0.165074;\n rate[1][4] = 0.585809; rate[1][5] = 3.360330;\n rate[1][6] = 0.488649; rate[1][7] = 0.650469;\n rate[1][8] = 2.362040; rate[1][9] = 0.206722;\n rate[1][10] = 0.551450; rate[1][11] = 5.925170;\n rate[1][12] = 0.758446; rate[1][13] = 0.116821;\n rate[1][14] = 0.753467; rate[1][15] = 1.357640;\n rate[1][16] = 0.613776; rate[1][17] = 1.294610;\n rate[1][18] = 0.423612; rate[1][19] = 0.280336;\n\n rate[2][3] = 6.013660; rate[2][4] = 0.296524;\n rate[2][5] = 1.716740; rate[2][6] = 1.056790;\n rate[2][7] = 1.253910; rate[2][8] = 4.378930;\n rate[2][9] = 0.615636; rate[2][10] = 0.147156;\n rate[2][11] = 3.334390; rate[2][12] = 0.224747;\n rate[2][13] = 0.110793; rate[2][14] = 0.217538;\n rate[2][15] = 4.394450; rate[2][16] = 2.257930;\n rate[2][17] = 0.078463; rate[2][18] = 1.208560;\n rate[2][19] = 0.221176;\n\n rate[3][4] = 0.033379; rate[3][5] = 0.691268;\n rate[3][6] = 6.833400; rate[3][7] = 0.961142;\n rate[3][8] = 1.032910; rate[3][9] = 0.043523;\n rate[3][10] = 0.093930; rate[3][11] = 0.533362;\n rate[3][12] = 0.116813; rate[3][13] = 0.052004;\n rate[3][14] = 0.472601; rate[3][15] = 1.192810;\n rate[3][16] = 0.417372; rate[3][17] = 0.146348;\n rate[3][18] = 0.363243; rate[3][19] = 0.169417;\n\n rate[4][5] = 0.109261; rate[4][6] = 0.023920;\n rate[4][7] = 0.341086; rate[4][8] = 0.275403;\n rate[4][9] = 0.189890; rate[4][10] = 0.428414;\n rate[4][11] = 0.083649; rate[4][12] = 0.437393;\n rate[4][13] = 0.441300; rate[4][14] = 0.122303;\n rate[4][15] = 1.560590; rate[4][16] = 0.570186;\n rate[4][17] = 0.795736; rate[4][18] = 0.604634;\n rate[4][19] = 1.114570;\n\n rate[5][6] = 6.048790; rate[5][7] = 0.366510;\n rate[5][8] = 4.749460; rate[5][9] = 0.131046;\n rate[5][10] = 0.964886; rate[5][11] = 4.308310;\n rate[5][12] = 1.705070; rate[5][13] = 0.110744;\n rate[5][14] = 1.036370; rate[5][15] = 1.141210;\n rate[5][16] = 0.954144; rate[5][17] = 0.243615;\n rate[5][18] = 0.252457; rate[5][19] = 0.333890;\n\n rate[6][7] = 0.630832; rate[6][8] = 0.635025;\n rate[6][9] = 0.141320; rate[6][10] = 0.172579;\n rate[6][11] = 2.867580; rate[6][12] = 0.353912;\n rate[6][13] = 0.092310; rate[6][14] = 0.755791;\n rate[6][15] = 0.782467; rate[6][16] = 0.914814;\n rate[6][17] = 0.172682; rate[6][18] = 0.217549;\n rate[6][19] = 0.655045;\n\n rate[7][8] = 0.276379; rate[7][9] = 0.034151;\n rate[7][10] = 0.068651; rate[7][11] = 0.415992;\n rate[7][12] = 0.194220; rate[7][13] = 0.055288;\n rate[7][14] = 0.273149; rate[7][15] = 1.486700;\n rate[7][16] = 0.251477; rate[7][17] = 0.374321;\n rate[7][18] = 0.114187; rate[7][19] = 0.209108;\n\n rate[8][9] = 0.152215; rate[8][10] = 0.555096;\n rate[8][11] = 0.992083; rate[8][12] = 0.450867;\n rate[8][13] = 0.756080; rate[8][14] = 0.771387;\n rate[8][15] = 0.822459; rate[8][16] = 0.525511;\n rate[8][17] = 0.289998; rate[8][18] = 4.290350;\n rate[8][19] = 0.131869;\n\n rate[9][10] = 3.517820; rate[9][11] = 0.360574;\n rate[9][12] = 4.714220; rate[9][13] = 1.177640;\n rate[9][14] = 0.111502; rate[9][15] = 0.353443;\n rate[9][16] = 1.615050; rate[9][17] = 0.234326;\n rate[9][18] = 0.468951; rate[9][19] = 8.659740;\n\n rate[10][11] = 0.287583; rate[10][12] = 5.375250;\n rate[10][13] = 2.348200; rate[10][14] = 0.462018;\n rate[10][15] = 0.382421; rate[10][16] = 0.364222;\n rate[10][17] = 0.740259; rate[10][18] = 0.443205;\n rate[10][19] = 1.997370;\n\n rate[11][12] = 1.032220; rate[11][13] = 0.098843;\n rate[11][14] = 0.619503; rate[11][15] = 1.073780;\n rate[11][16] = 1.537920; rate[11][17] = 0.152232;\n rate[11][18] = 0.147411; rate[11][19] = 0.342012;\n\n rate[12][13] = 1.320870; rate[12][14] = 0.194864;\n rate[12][15] = 0.556353; rate[12][16] = 1.681970;\n rate[12][17] = 0.570369; rate[12][18] = 0.473810;\n rate[12][19] = 2.282020;\n\n rate[13][14] = 0.179896; rate[13][15] = 0.606814;\n rate[13][16] = 0.191467; rate[13][17] = 1.699780;\n rate[13][18] = 7.154480; rate[13][19] = 0.725096;\n\n rate[14][15] = 1.786490; rate[14][16] = 0.885349;\n rate[14][17] = 0.156619; rate[14][18] = 0.239607;\n rate[14][19] = 0.351250;\n\n rate[15][16] = 4.847130; rate[15][17] = 0.578784;\n rate[15][18] = 0.872519; rate[15][19] = 0.258861;\n\n rate[16][17] = 0.126678; rate[16][18] = 0.325490;\n rate[16][19] = 1.547670;\n\n rate[17][18] = 2.763540; rate[17][19] = 0.409817;\n\n rate[18][19] = 0.347826;\n }", "public AdvancedMagicSquare(int n){//constructor\n\t\tm = new int[n * n];//array of length n*n\n\t\tthis.order = n;\n\t\tmaxNum = n * n;//calculate the the biggest number in the square\n\t\tMagic_Constant = n * (n * n + 1) / 2;//calculate the sum of each row, column and diagonal\n\t\tthis.count = 0;\n\t}", "public void antiQuity(final int m, final int n) {\n Queue<Integer> queue = new Queue<Integer>();\n for (int i = 0; i < m; i++) {\n queue.enqueue(i);\n }\n\n while (!queue.isEmpty() && queue.peekFirst() != null) {\n for (int i = 0; i < n - 1; i++) {\n queue.enqueue(queue.dequeue());\n }\n System.out.print(queue.dequeue() + \" \");\n }\n System.out.print(queue.dequeue());\n System.out.println();\n }", "private Bitmap generateQR() {\n //save information of reservation into string\n StringBuilder infoB = new StringBuilder(film.getTitle() + \" \" + time + \"\\n Places: \");\n for (int i : listPlaces) {\n infoB = infoB.append(i + 1);\n infoB = infoB.append(\", \");\n }\n //delete last comma\n infoB.deleteCharAt(infoB.length() - 2);\n String info = infoB.toString();\n System.out.println(info);\n\n //generate bitmap with QR generated\n Bitmap bitmap = null;\n MultiFormatWriter multiFormatWriter = new MultiFormatWriter();\n try {\n BitMatrix bitMatrix = multiFormatWriter.encode(info, BarcodeFormat.QR_CODE, 200, 200);\n BarcodeEncoder barcodeEncoder = new BarcodeEncoder();\n bitmap = barcodeEncoder.createBitmap(bitMatrix);\n } catch (WriterException e) {\n e.printStackTrace();\n }\n\n return bitmap;\n }", "public Queen(int initX, int initY, Color color, StandardBoard board) {\n\t\tsuper(initX, initY, color, board);\n\t\tthis.nameOfPiece = \"queen\";\n\t}", "public Matrix luDecomp(){\r\n \tif(this.nrow!=this.ncol)throw new IllegalArgumentException(\"A matrix is not square\");\r\n \tint n = this.nrow;\r\n\t \tint imax = 0;\r\n\t \tdouble dum = 0.0D, temp = 0.0D, big = 0.0D;\r\n\t \tdouble[] vv = new double[n];\r\n\t \tdouble sum = 0.0D;\r\n\t \tdouble dumm = 0.0D;\r\n\r\n\t \tthis.matrixCheck = true;\r\n\r\n\t \tMatrix ludmat = Matrix.copy(this);\r\n\t \tdouble[][] ludarray = ludmat.getArrayReference();\r\n\r\n \t\tludmat.dswap=1.0D;\r\n\t \tfor (int i=0;i<n;i++) {\r\n\t\t \tbig=0.0D;\r\n\t\t \tfor (int j=0;j<n;j++)if ((temp=Math.abs(ludarray[i][j])) > big) big=temp;\r\n \t\tif (big == 0.0D){\r\n \t \t\tSystem.out.println(\"Attempted LU Decomposition of a singular matrix in Matrix.luDecomp()\");\r\n \t \t\tSystem.out.println(\"NaN matrix returned and matrixCheck set to false\");\r\n \r\n \t \t\tthis.matrixCheck=false;\r\n \t \t\tfor(int k=0;k<n;k++)for(int j=0;j<n;j++)ludarray[k][j]=Double.NaN;\r\n System.exit(-1);\r\n \t \t\treturn ludmat;\r\n \t\t}\r\n \t\t\tvv[i]=1.0/big;\r\n\t \t}\r\n\t \tfor (int j=0;j<n;j++) {\r\n\t\t \tfor (int i=0;i<j;i++) {\r\n\t\t\t \tsum=ludarray[i][j];\r\n\t\t\t \tfor (int k=0;k<i;k++) sum -= ludarray[i][k]*ludarray[k][j];\r\n\t\t\t \tludarray[i][j]=sum;\r\n\t\t \t}\r\n\t\t \tbig=0.0D;\r\n\t\t \tfor (int i=j;i<n;i++) {\r\n \t\t\t\tsum=ludarray[i][j];\r\n\t \t\t\tfor (int k=0;k<j;k++)\r\n\t\t\t\t \tsum -= ludarray[i][k]*ludarray[k][j];\r\n\t\t\t \t\tludarray[i][j]=sum;\r\n \t\t\t\t\tif ((dum=vv[i]*Math.abs(sum)) >= big) {\r\n\t\t\t\t \tbig=dum;\r\n\t\t\t\t \timax=i;\r\n\t\t\t \t\t}\r\n\t\t \t\t}\r\n\t\t \t\tif (j != imax) {\r\n\t\t\t \tfor (int k=0;k<n;k++) {\r\n\t\t\t\t \tdumm=ludarray[imax][k];\r\n\t\t\t\t \tludarray[imax][k]=ludarray[j][k];\r\n \t\t\t\t\tludarray[j][k]=dumm;\r\n\t\t\t \t}\r\n\t\t\t \tludmat.dswap = -ludmat.dswap;\r\n \t\t\t\tvv[imax]=vv[j];\r\n\t \t\t}\r\n\t\t \tludmat.index[j]=imax;\r\n\r\n\t\t \tif(ludarray[j][j]==0.0D){\r\n\t\t \tludarray[j][j]=TINY;\r\n\t\t \t}\r\n\t\t \tif(j != n-1) {\r\n\t\t\t \tdumm=1.0/ludarray[j][j];\r\n \t\t\t\tfor (int i=j+1;i<n;i++){\r\n \t\t\t \t\tludarray[i][j]*=dumm;\r\n\t \t \t\t}\r\n\t \t\t}\r\n\t \t}\r\n\t \treturn ludmat;\r\n\t }", "ArrayList<ArrayList<String>> solveNQueens(int n) {\n ArrayList<ArrayList<String>> results = new ArrayList<>();\n if (n <= 0) {\n return results;\n }\n\n search(results, new ArrayList<Integer>(), n);\n return results;\n }", "@Override\n\tpublic void setMatrix(int n) {\n\t\tthis.baris = DeretAngka.getLastTriAngluar(n);\n\t\tthis.kolom = n*n;\n\t\tthis.matrix = new String[this.baris][this.kolom];\n\t\t//int[] bil1 = {1,2,3,4};\n\t\t//int[] bil2 = {1,3,5,7};\n\t\t//int[] bil3 = {0,1,2,3};\n\t\tint[] bil4 = DeretAngka.getTriAngluar(n);//{0,1,3,6};\n\t\tint[] bil5 = DeretAngka.getPangkat(n);//{0,1,4,9};\n\t\tint addBangun = 1;\n\t\tint addGanjil = 1;\n\t\tfor(int bangun =0; bangun < n; bangun++) {\n\t\t\t//int pangkat = bangun * bangun; //0*0,1*1,2*2,3*3\n\t\t\tfor (int i = 0; i < addBangun; i++) {\n\t\t\t\tfor (int j = 0; j < addGanjil; j++) {\n\t\t\t\t\tif(i+j >= bangun && j - i <= bangun) {\n\t\t\t\t\t\tthis.matrix[i + bil4[bangun]][j+bil5[bangun]] = \"*\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\taddBangun = addBangun + 1;\n\t\t\taddGanjil = addGanjil + 2;\n\t\t}\n\t\t\n\t\t\n//\t\tfor (int i = 0; i < bil1[0]; i++) {\n//\t\t\tfor (int j = 0; j < bil2[0]; j++) {\n//\t\t\t\tif(i+j >= 0 && j - i <= 0) {\n//\t\t\t\t\tthis.matrix[i+0][j+0] = \"*\";\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t}\n//\t\t}\n//\t\tfor (int i = 0; i < bil1[1]; i++) {\n//\t\t\tfor (int j = 0; j < bil2[1]; j++) {\n//\t\t\t\tif(i+j >= 1 && j - i <= 1) {\n//\t\t\t\t\tthis.matrix[i+1][j+1] = \"*\";\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t}\n//\t\t}\n//\t\tfor (int i = 0; i < bil1[2]; i++) {\n//\t\t\tfor (int j = 0; j < bil2[2]; j++) {\n//\t\t\t\tif(i+j >= 2 && j - i <= 2) {\n//\t\t\t\t\tthis.matrix[i+3][j+4] = \"*\";\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t}\n//\t\t}\n\t\t\n\t}", "public QcRecsExtImpl getqr() {\n return (QcRecsExtImpl) getEntity(1);\n }", "public boolean irreducibleQuadratic(int rIndex, int sIndex) {\n for (int k = 0; k < cardinality() ; k++) {\n //System.out.println(\"rIndex = \" + rIndex + \", sIndex = \" + sIndex + \", k = \" + k);\n if (timesInt(k,k) == plusInt(timesInt(rIndex, k), sIndex)) return false;\n }\n return true;\n }", "public Matrix33() {\r\n // empty\r\n }", "public FactorBase(final Z n, final int bound) {\n final ArrayList<Z> fb = new ArrayList<>();\n fb.add(Z.NEG_ONE);\n if (bound >= 2L && n.jacobi(Z.TWO) == 1) {\n fb.add(Z.TWO);\n }\n int p = 3;\n Z zp = Z.valueOf(3L);\n while (p <= bound) {\n if (n.jacobi(zp) == 1) {\n fb.add(zp);\n }\n do {\n p += 2;\n zp = zp.add(2L);\n } while (!zp.isPrime());\n }\n mFactorBase = new int[fb.size()];\n for (int i = 0; i < fb.size(); ++i) {\n mFactorBase[i] = fb.get(i).intValue();\n }\n\n final Z sqrtN = n.sqrt();\n mShanks1 = new int[mFactorBase.length];\n mShanks2 = new int[mFactorBase.length];\n for (int i = 0; i < mFactorBase.length; ++i) {\n final Z fbi = fb.get(i);\n final Z t = n.modSqrt(fbi);\n if (t != null) {\n mShanks1[i] = t.subtract(sqrtN).mod(fbi).intValue();\n mShanks2[i] = t.negate().subtract(sqrtN).mod(fbi).intValue();\n }\n }\n }", "public TriDiagonalMatrixF(int n) {\n this.A = new double[n];\n this.B = new double[n];\n this.C = new double[n];\n }", "public Matrix Q (double t, double dt, EstSTM x);", "public boolean SolveNQueenProblem(int columIndex) {\n if (columIndex >= this.SIZE_OF_CHESS_BOARD) {\n return true;\n }\n\n for (int i = 0; i < this.SIZE_OF_CHESS_BOARD; i++) {\n if (this.IsSafe(i, columIndex)) {\n this.maps[i][columIndex] = true;\n\n //if this case is true and we can set all queen i the chess board\n if (this.SolveNQueenProblem(columIndex + 1) == true) {\n return true;\n }\n this.maps[i][columIndex] = false;//back tracking\n }\n }\n return false;\n }", "public QRFragment() {\n }", "@Override\n\tpublic Mat GetRomateMatrix()\n\t{\n\t\treturn mR;\n\t}", "boolean ompleMatriuRestant(int i, int j) {\r\n // System.out.println(i+\" \"+j); \r\n if (j >= N && i < N - 1) {\r\n i = i + 1;\r\n j = 0;\r\n }\r\n if (i >= N && j >= N) {\r\n return true;\r\n }\r\n\r\n if (i < SRN) {\r\n if (j < SRN) {\r\n j = SRN;\r\n }\r\n } else if (i < N - SRN) {\r\n if (j == (int) (i / SRN) * SRN) {\r\n j = j + SRN;\r\n }\r\n } else {\r\n if (j == N - SRN) {\r\n i = i + 1;\r\n j = 0;\r\n if (i >= N) {\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n for (int num = 1; num <= N; num++) {\r\n if (validaNumero(i, j, num)) {\r\n mat[i][j] = num;\r\n if (ompleMatriuRestant(i, j + 1)) {\r\n return true;\r\n }\r\n\r\n mat[i][j] = 0;\r\n }\r\n }\r\n return false;\r\n }", "private boolean isValid(char [][] nQueens, int row, int col, int n){\n\t\tfor(int i=0;i!=row;i++){\n\t\t\tif(nQueens[i][col] == 'Q') return false;\n\t\t}\n\t\t//diagonal\n\t\tfor(int i=row-1, j=col-1;i>=0 &&j>=0;i--,j--){\n\t\t\tif(nQueens[i][j] == 'Q') return false;\n\t\t}\n\t\t//check another diagonal\n\t\tfor(int i=row-1, j=col+1;i>=0 && j<n; i--,j++){\n\t\t\tif(nQueens[i][j] == 'Q') return false;\n\t\t}\n\t\treturn true;\n\t}", "public Queens(int[] riesenie) {\n this.riesenie = riesenie.clone();\n }", "public int sqr(int n) {\n\t\tif(n>=Integer.MAX_VALUE)\n\t\t\treturn (int) Double.NaN;\n\t\treturn n*n;\n\t}", "public static Region RegionQueensCarteNY() {\n\t\t\t\t\treturn new Region(\"Queens\",Territoire.listeTerritoireRegionQueens());\n\t\t\t\t}", "private void generateMatrix(int n) throws InvalidSizeException{\n\t\tif(n%2 == 0 || n == 0 || n < 0) {\n\t\t\tthrow new InvalidSizeException(n);\n\t\t}else {\n\t\t\tmatrix = new int[n][n];\n\t\t\tsize = n;\n\t\t}\n\t}", "public static int[][] trabalhaMatriz(QRCode qr, BitVector vector){\n \tint versao = qr.getVersion().getBits();\n \tint ecLevel = qr.getErrorCorrectionLevel().getBits();\n int[][] a = new int[largura][altura];\n\n //instanciacao elemento a elemento dos arrays\n int m=0, n=0;\n for(m=0; m<largura; m++)\n for(n=0; n<altura; n++)\n a[m][n]=3; //valor de iniciacao = indica disponibilidade de uso\n\n //System.err.println(\"Debugando em 2\");\n \n //Desenha os Detectores de Posicao da Mascara\n int aX=3, aY=3;\n\n //formando os quadrados de dentro pra fora\n //quadrado superior esquerdo\n a[aX][aY]=1;\n a[aX-1][aY-1]=1; a[aX][aY-1]=1;a[aX+1][aY-1]=1;a[aX+1][aY]=1;a[aX+1][aY+1]=1;a[aX][aY+1]=1;a[aX-1][aY+1]=1;a[aX-1][aY]=1;\n a[aX-2][aY-2]=0;a[aX-1][aY-2]=0;a[aX][aY-2]=0;a[aX+1][aY-2]=0;a[aX+2][aY-2]=0;a[aX+2][aY-1]=0;a[aX+2][aY]=0;a[aX+2][aY+1]=0;a[aX+2][aY+2]=0;a[aX+1][aY+2]=0;a[aX][aY+2]=0;a[aX-1][aY+2]=0;a[aX-2][aY+2]=0;a[aX-2][aY+1]=0;a[aX-2][aY]=0;a[aX-2][aY-1]=0;\n a[aX-3][aY-3]=1;a[aX-2][aY-3]=1;a[aX-1][aY-3]=1;a[aX][aY-3]=1;a[aX+1][aY-3]=1;a[aX+2][aY-3]=1;a[aX+3][aY-3]=1;a[aX+3][aY-2]=1;a[aX+3][aY-1]=1;a[aX+3][aY]=1;a[aX+3][aY+1]=1;a[aX+3][aY+2]=1;a[aX+3][aY+3]=1;a[aX+2][aY+3]=1;a[aX+1][aY+3]=1;a[aX][aY+3]=1;a[aX-1][aY+3]=1;a[aX-2][aY+3]=1;a[aX-3][aY+3]=1;a[aX-3][aY+2]=1;a[aX-3][aY+1]=1;a[aX-3][aY]=1;a[aX-3][aY-1]=1;a[aX-3][aY-2]=1;\n for(int g=aX-3; g<8; g++)\n a[g][aY+4]=0;\n for(int f=aY+4; f>=0; f--)\n a[aX+4][f]=0;\n\n //quadrado inferior esquerdo\n aX=3; aY=altura-4;\n a[aX][aY]=1;\n a[aX-1][aY-1]=1; a[aX][aY-1]=1;a[aX+1][aY-1]=1;a[aX+1][aY]=1;a[aX+1][aY+1]=1;a[aX][aY+1]=1;a[aX-1][aY+1]=1;a[aX-1][aY]=1;\n a[aX-2][aY-2]=0;a[aX-1][aY-2]=0;a[aX][aY-2]=0;a[aX+1][aY-2]=0;a[aX+2][aY-2]=0;a[aX+2][aY-1]=0;a[aX+2][aY]=0;a[aX+2][aY+1]=0;a[aX+2][aY+2]=0;a[aX+1][aY+2]=0;a[aX][aY+2]=0;a[aX-1][aY+2]=0;a[aX-2][aY+2]=0;a[aX-2][aY+1]=0;a[aX-2][aY]=0;a[aX-2][aY-1]=0;\n a[aX-3][aY-3]=1;a[aX-2][aY-3]=1;a[aX-1][aY-3]=1;a[aX][aY-3]=1;a[aX+1][aY-3]=1;a[aX+2][aY-3]=1;a[aX+3][aY-3]=1;a[aX+3][aY-2]=1;a[aX+3][aY-1]=1;a[aX+3][aY]=1;a[aX+3][aY+1]=1;a[aX+3][aY+2]=1;a[aX+3][aY+3]=1;a[aX+2][aY+3]=1;a[aX+1][aY+3]=1;a[aX][aY+3]=1;a[aX-1][aY+3]=1;a[aX-2][aY+3]=1;a[aX-3][aY+3]=1;a[aX-3][aY+2]=1;a[aX-3][aY+1]=1;a[aX-3][aY]=1;a[aX-3][aY-1]=1;a[aX-3][aY-2]=1;\n for(int g=aX-3; g<8; g++)\n a[g][aY-4]=0;\n for(int f=aY-4; f<altura; f++)\n a[aX+4][f]=0;\n\n //quadrado superior direito\n aX=largura-4; aY=3;\n a[aX][aY]=1;\n a[aX-1][aY-1]=1; a[aX][aY-1]=1;a[aX+1][aY-1]=1;a[aX+1][aY]=1;a[aX+1][aY+1]=1;a[aX][aY+1]=1;a[aX-1][aY+1]=1;a[aX-1][aY]=1;\n a[aX-2][aY-2]=0;a[aX-1][aY-2]=0;a[aX][aY-2]=0;a[aX+1][aY-2]=0;a[aX+2][aY-2]=0;a[aX+2][aY-1]=0;a[aX+2][aY]=0;a[aX+2][aY+1]=0;a[aX+2][aY+2]=0;a[aX+1][aY+2]=0;a[aX][aY+2]=0;a[aX-1][aY+2]=0;a[aX-2][aY+2]=0;a[aX-2][aY+1]=0;a[aX-2][aY]=0;a[aX-2][aY-1]=0;\n a[aX-3][aY-3]=1;a[aX-2][aY-3]=1;a[aX-1][aY-3]=1;a[aX][aY-3]=1;a[aX+1][aY-3]=1;a[aX+2][aY-3]=1;a[aX+3][aY-3]=1;a[aX+3][aY-2]=1;a[aX+3][aY-1]=1;a[aX+3][aY]=1;a[aX+3][aY+1]=1;a[aX+3][aY+2]=1;a[aX+3][aY+3]=1;a[aX+2][aY+3]=1;a[aX+1][aY+3]=1;a[aX][aY+3]=1;a[aX-1][aY+3]=1;a[aX-2][aY+3]=1;a[aX-3][aY+3]=1;a[aX-3][aY+2]=1;a[aX-3][aY+1]=1;a[aX-3][aY]=1;a[aX-3][aY-1]=1;a[aX-3][aY-2]=1;\n for(int g=aX-3; g<largura; g++)\n a[g][aY+4]=0;\n for(int f=aY-3; f<8; f++)\n a[aX-4][f]=0;\n\n //Adjustment Pattern = ajuste padronizado\n int auxilia0[]=getListaAdjustmentPattern(versao);\n if(auxilia0[0]!=0){\n for(int hi=0; hi<auxilia0.length; hi++){\n aX=auxilia0[hi];\n for(int hj=0; hj<auxilia0.length; hj++){\n aY=auxilia0[hj];\n if(a[aX][aY]==3){\n a[aX][aY]=1;\n a[aX-1][aY-1]=0;a[aX][aY-1]=0;a[aX+1][aY-1]=0;a[aX+1][aY]=0;a[aX+1][aY+1]=0;a[aX][aY+1]=0;a[aX-1][aY+1]=0;a[aX-1][aY]=0;\n a[aX-2][aY-2]=1;a[aX-1][aY-2]=1;a[aX][aY-2]=1;a[aX+1][aY-2]=1;a[aX+2][aY-2]=1;a[aX+2][aY-1]=1;a[aX+2][aY]=1;a[aX+2][aY+1]=1;a[aX+2][aY+2]=1;a[aX+1][aY+2]=1;a[aX][aY+2]=1;a[aX-1][aY+2]=1;a[aX-2][aY+2]=1;a[aX-2][aY+1]=1;a[aX-2][aY]=1;a[aX-2][aY-1]=1;\n }\n }\n }\n }\n\n //System.err.println(\"Debugando em 3\");\n\n //Caminho dos Timing Patterns\n // *Horizontal\n int x=0, y=0;\n for(x=3+5, y=6; x<largura-8; x++){\n if(x%2==0){\n a[x][y]=1;//infoTimingH[x-8];}\n } else {\n a[x][y]=0;}\n }\n // *Vertical\n for(x=3+3, y=3+5; y<largura-8; y++){\n if(y%2==0){\n a[x][y]=1;//infoTimingV[x-8];}\n } else {\n a[x][y]=0;}\n }\n\n //Desenha o Black pixel\n a[8][altura-8]=1;\n\n\n int z=0;\n //Type Version Information = Tipo de Informacao\n int[] typeInformationMask = getTypeInformationMask(ecLevel, 0);\n\n // *bit 0 a 7\n x=0; y=0;\n for(x=largura-1, y=8, z=14; x>largura-9; x--, z--)\n a[x][y]=typeInformationMask[z];\n for(x=8, y=0, z=14; y<9; y++)\n if(a[x][y]==3){\n a[x][y]=typeInformationMask[z];\n z--;\n }\n // *bit 8 a 14\n for(x=7, y=8, z=6; x>=0; x--)\n if(a[x][y]==3){\n a[x][y]=typeInformationMask[z];\n z--;\n }\n for(x=8, y=altura-7, z=6; y<altura; y++, z--)\n a[x][y]=typeInformationMask[z];\n\n //System.err.println(\"Debugando em 4\");\n\n //Version Information\n if(versao>=7){\n int[] versionInformation = getVersionInformation(versao);\n // *Vertical\n x=0; y=0; z=0;\n for(y=0, x=largura-11, z=0; y<7 && z<18; y++)\n for(x=largura-11; x<largura-8; x++, z++)\n a[x][y]=versionInformation[z];\n\n // *Horizontal\n x=0; y=0; z=0;\n for(x=0, y=altura-11, z=0; x<7 && z<18; x++)\n for(y=altura-11; y<largura-8; y++, z++)\n a[x][y]=versionInformation[z];\n }\n\n //System.err.println(\"Debugando em 5\");\n \n //Insercao do Vetor Data de Binario\n int loop=largura-1;\n int aI=0;\n x=largura-1; y=altura-1;\n int teste=0;\n int itera=0;\n do{\n \t System.out.println(vector.getBitWise(itera));\n for(y=largura-1, x=loop; y>=0 && (x==loop || x==loop-1) && loop>=0; y--){\n x=loop;\n if(UseMaskPatt(x,y,0)==1 && a[x][y]==3) {\n if(vector.getBitWise(itera)==1)\n a[x][y]=0;\n else\n a[x][y]=1;\n itera++;\n aI=itera;\n } else if(UseMaskPatt(x,y,0)==0 && a[x][y]==3){\n a[x][y]=vector.getBitWise(itera);\n itera++;\n aI=itera;\n }\n if(loop>0){\n x=loop-1;\n if(UseMaskPatt(x,y,0)==1 && a[x][y]==3) {\n if(vector.getBitWise(itera)==1)\n a[x][y]=0;\n else\n a[x][y]=1;\n itera++;\n aI=itera;\n } else if(UseMaskPatt(x,y,0)==0 && a[x][y]==3){\n a[x][y]=vector.getBitWise(itera);\n itera++;\n aI=itera;\n }\n }\n }\n if(aI!=0)\n loop=loop-2;\n for(y=0, x=loop; y<=largura-1 && (x==loop || x==loop-1) && loop>=0; y++){\n x=loop;\n if(UseMaskPatt(x,y,0)==1 && a[x][y]==3) {\n if(vector.getBitWise(itera)==1)\n a[x][y]=0;\n else\n a[x][y]=1;\n itera++;\n aI=itera;\n } else if(UseMaskPatt(x,y,0)==0 && a[x][y]==3){\n a[x][y]=vector.getBitWise(itera);\n itera++;\n aI=itera;\n }\n if(loop>0){\n x=loop-1;\n if(UseMaskPatt(x,y,0)==1 && a[x][y]==3) {\n if(vector.getBitWise(itera)==1)\n a[x][y]=0;\n else\n a[x][y]=1;\n itera++;\n aI=itera;\n } else if(UseMaskPatt(x,y,0)==0 && a[x][y]==3){\n a[x][y]=vector.getBitWise(itera);\n itera++;\n aI=itera;\n }\n }\n }\n if(aI!=0)\n loop=loop-2;\n aI=0;\n if(x<=0 && y<=0) break;\n //System.err.println(\"Debugando em 6... com itera: \"+itera+\" e aI: \"+aI+\" e x: \"+x+\" e y: \"+y);\n }while(itera<(vector.getOffset()));\n\n\n System.err.println(\"[1] Matriz de inteiros como representacao do QR Code gerada com sucesso!\");\n System.out.println(\"Ultimo valor do itera: \"+itera);\n\n System.err.println(\"[1.5] Testando Penalizar Máscara!\");\n System.out.println(\"Valor de penalização: \"+PenalizeMask.TestMask(a, largura));\n\n return a;\n }", "public final void mo59469qD() {\n AppMethodBeat.m2504i(94717);\n try {\n C45018f c45018f = this.aRr;\n if (c45018f.aQP || !c45018f.isInitialized()) {\n AppMethodBeat.m2505o(94717);\n return;\n }\n if (c45018f.mo72533qo()) {\n c45018f.aQc.mo2535L(c45018f.mo72538qt());\n c45018f.aQo = 0;\n c45018f.aQP = true;\n }\n AppMethodBeat.m2505o(94717);\n } catch (C37227h e) {\n C25533e b = C25533e.m40358b(e, this.index);\n AppMethodBeat.m2505o(94717);\n throw b;\n }\n }", "public Matrix(int M, int N) {\n this.M = M;\n this.N = N;\n data = new double[M][N];\n }", "public static QuadricRobustEstimator create(double[] qualityScores) {\n return create(qualityScores, DEFAULT_ROBUST_METHOD);\n }", "private static void createQRImage(File qrFile, String qrCodeText, int size,String fileType) throws WriterException, IOException, BadElementException {\n\t\tHashtable hintMap = new Hashtable();\r\n\t\thintMap.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.L);\r\n\t\tQRCodeWriter qrCodeWriter = new QRCodeWriter();\r\n\t\tByteMatrix byteMatrix = qrCodeWriter.encode(qrCodeText,\r\n\t\t\t\tBarcodeFormat.QR_CODE, size, size, hintMap);\r\n\t\t// Make the BufferedImage that are to hold the QRCode\r\n\t\tint matrixWidth = byteMatrix.getWidth();\r\n\t\tBufferedImage image = new BufferedImage(matrixWidth, matrixWidth,\r\n\t\t\t\tBufferedImage.TYPE_INT_RGB);\r\n\t\timage.createGraphics();\r\n\r\n\t\tGraphics2D graphics = (Graphics2D) image.getGraphics();\r\n\t\tgraphics.setColor(Color.WHITE);\r\n\t\tgraphics.fillRect(0, 0, matrixWidth, matrixWidth);\r\n\t\t// Paint and save the image using the ByteMatrix\r\n\t\tgraphics.setColor(Color.BLACK);\r\n\r\n\t\tfor (int i = 0; i < matrixWidth; i++) {\r\n\t\t\tfor (int j = 0; j < matrixWidth; j++) {\r\n\t\t\t\tif (byteMatrix.equals(byteMatrix.get(i, j))) {\r\n\t\t\t\t\tgraphics.fillRect(i, j, 1, 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tImageIO.write(image, fileType, qrFile);\r\n \r\n\r\n\r\n\t}", "private Bitmap encodeToQrCode(String text) throws WriterException {\n BitMatrix bitMatrix;\n try {\n bitMatrix = new MultiFormatWriter().encode(\n text,\n BarcodeFormat.DATA_MATRIX.QR_CODE,\n QR_CODE_WIDTH, QR_CODE_WIDTH, null\n );\n\n } catch (IllegalArgumentException Illegalargumentexception) {\n return null;\n }\n int bitMatrixWidth = bitMatrix.getWidth();\n int bitMatrixHeight = bitMatrix.getHeight();\n int[] pixels = new int[bitMatrixWidth * bitMatrixHeight];\n\n for (int y = 0; y < bitMatrixHeight; y++) {\n int offset = y * bitMatrixWidth;\n for (int x = 0; x < bitMatrixWidth; x++) {\n pixels[offset + x] = bitMatrix.get(x, y) ?\n context.getResources().getColor(R.color.qrCodeBlack):context.getResources().getColor(R.color.qrCodeWhite);\n }\n }\n Bitmap bitmap = Bitmap.createBitmap(bitMatrixWidth, bitMatrixHeight, Bitmap.Config.ARGB_4444);\n bitmap.setPixels(pixels, 0, QR_CODE_WIDTH, 0, 0, bitMatrixWidth, bitMatrixHeight);\n return bitmap;\n }", "protected String getQRData() {\n String data = \"\";\n\n // positions de départ hardcodées (i,j), sens de parcours nombres de lignes (0:down, 1:up),\n // nombres de lignes à lire (nb_lines), spécial 1 colonnes (0:2 col, 1:1 col)\n int[][] start_bits_list = new int[][] {{28,28,1,20,0}, {9,26,0,20,0}, {28,24,1,4,0}, {19,24,1,11,0}, {9,22,0,11,0}, {25,22,0,4,0},\n {28,20,1,4,0}, {24,19,1,5,1}, {19,20,1,13,0}, {5,20,1,6,0}, {0,18,0,6,0}, {7,18,0,22,0},\n {28,16,1,22,0}, {5,16,1,6,0}, {0,14,0,6,0}, {7,14,0,22,0}, {28,12,1,22,0}, {5,12,1,6,0},\n {0,10,0,6,0}, {7,10,0,22,0}, {20,8,1,12,0}, {9,5,0,12,0}, {20,3,1,12,0}, {9,1,0,8,0},\n {17,1,0,1,1}};\n int[] start_bit;\n\n /* --- Traitement --- */\n for (int l = 0; l < start_bits_list.length; l++) {\n start_bit = start_bits_list[l];\n\n if (start_bit[2] == 1) { // sens de parcours : UP\n data += this.getDataUp(start_bit[0], start_bit[1], start_bit[3], start_bit[4]);\n }\n else { // sens de parcours : DOWN\n data += this.getDataDown(start_bit[0], start_bit[1], start_bit[3], start_bit[4]);\n }\n }\n\n return data;\n }", "public void newQueen() throws SQLException {\r\n\t\tnewQueenPanel = new AddQueenPanel();\r\n\t\tcardPanel.add(newQueenPanel);\r\n\t\tCardLayout cl = (CardLayout)(cardPanel.getLayout());\r\n\t\tcl.last(cardPanel);\r\n\t}", "Sudoku(int N, int K) {\r\n this.N = N; //COLUMNES\r\n this.K = K; //BUITS\r\n\r\n // CALCULA ARREL QUADRADA del nombre N \r\n // \r\n Double SRNd = Math.sqrt(N);\r\n SRN = SRNd.intValue();\r\n\r\n // ASSIGNA A LA MATRIU COLUMNES \r\n mat = new int[N][N];\r\n\r\n }", "public void dormlq_(CHARACTER SIDE,CHARACTER TRANS,INTEGER M,INTEGER N,INTEGER K,double[] A,INTEGER LDA,double[] TAU,double[] C,INTEGER LDC,double[] WORK,INTEGER LWORK,INTEGER INFO);", "public BigRational reciprocal() {\n return valueOf(den, num);\n }", "public BitSet factor(Z n) {\n if (n == null || Z.ZERO.equals(n)) {\n return null;\n }\n final BitSet v = new BitSet(size());\n if (n.signum() < 0) {\n v.set(0);\n n = n.negate();\n }\n for (int i = 1; i < size(); ++i) {\n final int p = mFactorBase[i];\n // check for 2 since we can do this quicker than normal\n if (p == 2) {\n final Z on = n.makeOdd();\n if ((n.auxiliary() & 1) != 0) {\n v.set(i);\n }\n n = on;\n continue;\n }\n boolean c = false;\n Z t = n.divide(p);\n while (n.auxiliary() == 0) {\n n = t;\n c ^= true;\n t = n.divide(p);\n }\n if (c) {\n v.set(i);\n }\n if (Z.ONE.equals(n)) {\n return v;\n }\n }\n return null;\n }", "public void printQR(String str, int errCorrect, int moduleSize)\n throws IOException {\n\n // save data function 80\n alignQr(1, moduleSize);\n writer.write(0x1D);// init\n writer.write(\"(k\");// adjust height of barcode\n writer.write(str.length() + 3); // pl\n writer.write(0); // ph\n writer.write(49); // cn\n writer.write(80); // fn\n writer.write(48); //\n writer.write(str);\n\n // error correction function 69\n writer.write(0x1D);\n writer.write(\"(k\");\n writer.write(3); // pl\n writer.write(0); // ph\n writer.write(49); // cn\n writer.write(69); // fn\n writer.write(errCorrect); // 48<= n <= 51\n\n // size function 67\n writer.write(0x1D);\n writer.write(\"(k\");\n writer.write(3);\n writer.write(0);\n writer.write(49);\n writer.write(67);\n writer.write(moduleSize);// 1<= n <= 16\n\n // print function 81\n writer.write(0x1D);\n writer.write(\"(k\");\n writer.write(3); // pl\n writer.write(0); // ph\n writer.write(49); // cn\n writer.write(81); // fn\n writer.write(48); // m\n\n writer.flush();\n }", "public int R_M(){\n\t\tBigInteger nminus1=n.subtract(BigInteger.ONE);\n\t\tdo{\n\t\t\tif(nminus1.mod(two.pow(a)).equals(BigInteger.ZERO)){\n\t\t\t\ttable.add(a);\n\t\t\t}\n\t\t\titerator++;\n\t\t\ta++;\n\t\t}while(!(two.pow(a).compareTo(n)>0));\n\t\t\n\t\ta=table.get(table.size()-1);\n\t\tBigInteger m=nminus1.divide(two.pow(a));\n\t\tint wlen=n.bitLength();\n\t\tBigInteger b;\n\t\tBigInteger z;\n\t\tfor(int i=0;i<iterations;i++){\n\t\t\tint straznik=0;\n\t\t\tint straznik1=0;\n\t\t\tdo{\n\t\t\t b=new BigInteger(wlen,new Random());\n\t\t\t}while(!(b.compareTo(BigInteger.ONE)>0) && !(b.compareTo(nminus1)<0));\n\t\t\tz=b.modPow(m, n);\n\t\t\tif(z.equals(BigInteger.ONE) || z.equals(nminus1)){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int j=0;j<a-1;j++){\n\t\t\t\t\tz=z.pow(2).mod(n);\n\t\t\t\t\tif(z.equals(nminus1)){\n\t\t\t\t\t\tstraznik++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif(z.equals(BigInteger.ONE)){\n\t\t\t\t\t\tstraznik1++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(straznik==1){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(straznik1==1){\n\t\t\t\t\tgetComposite();\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\t}\n\t\t\tgetComposite();\n\t\t\treturn 0;\n\t\t}\n\t\tgetProbablyPrime();\n\t\treturn 1;\n\t\t}", "public static void printQueens(int[] q) {\n int n = q.length;\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n System.out.print(\"|\");\n if (q[i] == j) System.out.print(\"Q\");\n else System.out.print(\" \");\n }\n System.out.println(\"|\");\n }\n System.out.println();\n }", "@Test\n public void testGetSetInternalMatrixAndAvailability()\n throws WrongSizeException, NotReadyException, LockedException,\n DecomposerException, com.irurueta.algebra.NotAvailableException,\n InvalidFundamentalMatrixException, NotAvailableException {\n final Matrix a = Matrix.createWithUniformRandomValues(FUND_MATRIX_ROWS,\n FUND_MATRIX_COLS, MIN_RANDOM_VALUE, MAX_RANDOM_VALUE);\n\n final SingularValueDecomposer decomposer =\n new SingularValueDecomposer(a);\n\n decomposer.decompose();\n\n final Matrix u = decomposer.getU();\n final Matrix w = decomposer.getW();\n final Matrix v = decomposer.getV();\n\n // transpose V\n final Matrix transV = v.transposeAndReturnNew();\n\n // set last singular value to zero to enforce rank 2\n w.setElementAt(2, 2, 0.0);\n\n Matrix fundamentalInternalMatrix = u.multiplyAndReturnNew(\n w.multiplyAndReturnNew(transV));\n\n // Instantiate empty fundamental matrix\n final FundamentalMatrix fundMatrix = new FundamentalMatrix();\n\n assertFalse(fundMatrix.isInternalMatrixAvailable());\n try {\n fundMatrix.getInternalMatrix();\n fail(\"NotAvailableException expected but not thrown\");\n } catch (final NotAvailableException ignore) {\n }\n\n // set internal matrix\n fundMatrix.setInternalMatrix(fundamentalInternalMatrix);\n\n // Check correctness\n assertTrue(fundMatrix.isInternalMatrixAvailable());\n assertEquals(fundamentalInternalMatrix, fundMatrix.getInternalMatrix());\n assertNotSame(fundamentalInternalMatrix,\n fundMatrix.getInternalMatrix());\n\n // Force InvalidFundamentalMatrixException\n\n // try with a non 3x3 matrix\n fundamentalInternalMatrix = new Matrix(FUND_MATRIX_ROWS + 1,\n FUND_MATRIX_COLS + 1);\n try {\n fundMatrix.setInternalMatrix(fundamentalInternalMatrix);\n fail(\"InvalidFundamentalMatrixException expected but not thrown\");\n } catch (final InvalidFundamentalMatrixException ignore) {\n }\n\n // try with a non rank-2 3x3 matrix\n fundamentalInternalMatrix = Matrix.createWithUniformRandomValues(\n FUND_MATRIX_ROWS, FUND_MATRIX_COLS, MIN_RANDOM_VALUE,\n MAX_RANDOM_VALUE);\n while (Utils.rank(fundamentalInternalMatrix) == 2) {\n fundamentalInternalMatrix = Matrix.createWithUniformRandomValues(\n FUND_MATRIX_ROWS, FUND_MATRIX_COLS, MIN_RANDOM_VALUE,\n MIN_RANDOM_VALUE);\n }\n\n try {\n fundMatrix.setInternalMatrix(fundamentalInternalMatrix);\n fail(\"InvalidFundamentalMatrixException expected but not thrown\");\n } catch (final InvalidFundamentalMatrixException ignore) {\n }\n }", "public int totalNQueens(int n) {\n mRet = 0;\n mSize = n;\n mMask = (1 << mSize) - 1;\n queen(0, 0, 0, 0);\n return mRet;\n }", "@Test\n public void testIsValidInternalMatrix() throws WrongSizeException,\n NotReadyException, LockedException, DecomposerException,\n com.irurueta.algebra.NotAvailableException {\n final Matrix a = Matrix.createWithUniformRandomValues(FUND_MATRIX_ROWS,\n FUND_MATRIX_COLS, MIN_RANDOM_VALUE, MAX_RANDOM_VALUE);\n\n final SingularValueDecomposer decomposer = new SingularValueDecomposer(a);\n\n decomposer.decompose();\n\n final Matrix u = decomposer.getU();\n final Matrix w = decomposer.getW();\n final Matrix v = decomposer.getV();\n\n // transpose V\n final Matrix transV = v.transposeAndReturnNew();\n\n // Set last singular value to zero to enforce rank 2\n w.setElementAt(2, 2, 0.0);\n\n Matrix fundamentalInternalMatrix = u.multiplyAndReturnNew(\n w.multiplyAndReturnNew(transV));\n\n assertTrue(FundamentalMatrix.isValidInternalMatrix(\n fundamentalInternalMatrix));\n\n // try with a non 3x3 matrix\n fundamentalInternalMatrix = new Matrix(FUND_MATRIX_ROWS + 1,\n FUND_MATRIX_COLS + 1);\n assertFalse(FundamentalMatrix.isValidInternalMatrix(\n fundamentalInternalMatrix));\n\n // try with a non rank-2 3x3 matrix\n fundamentalInternalMatrix = Matrix.createWithUniformRandomValues(\n FUND_MATRIX_ROWS, FUND_MATRIX_COLS, MIN_RANDOM_VALUE,\n MAX_RANDOM_VALUE);\n while (Utils.rank(fundamentalInternalMatrix) == 2) {\n fundamentalInternalMatrix = Matrix.createWithUniformRandomValues(\n FUND_MATRIX_ROWS, FUND_MATRIX_COLS, MIN_RANDOM_VALUE,\n MAX_RANDOM_VALUE);\n }\n\n assertFalse(FundamentalMatrix.isValidInternalMatrix(\n fundamentalInternalMatrix));\n }", "public RK(int m) {\n\t\tthis.exponent = exponent;\n\t\tthis.hash = 0;\n\t\tthis.workingHash = 0;\n\t\tthis.deletion = 0;\n\t\tthis.querySize = m;\n\t\tthis.buffer = new int [m];\n\t\tfor (int j = 0; j<m; j++){\n\t\t\texponent = (31*exponent)%511;\n\t\t}\n\t\tthis.index = 0;\n\t\t\n\t}", "public static QuadricRobustEstimator create() {\n return create(DEFAULT_ROBUST_METHOD);\n }", "public void toQueen(Point pos){\r\n model.getCurrentPlayer().setQueenNumber(+1);\r\n if(isBlack(pos)){ \r\n model.setValueAt(pos,Cells.BLACK_QUEEN);\r\n model.setBlackQueenCount(+1);\r\n model.setBlackCount(-1);\r\n } else {\r\n model.setValueAt(pos,Cells.RED_QUEEN);\r\n model.setRedQueenCount(+1);\r\n model.setRedCount(-1);\r\n }\r\n }", "private void printQueens() {\n StringBuffer buffer = new StringBuffer();\n\n for (int i = 0; i < Main.N; ++i) {\n for (int j = 0; j < Main.N; ++j) {\n if (j == positions[i]) {\n buffer.append(\"Q\");\n } else {\n buffer.append(\"-\");\n }\n }\n\n buffer.append(\"\\n\");\n }\n\n System.out.println(buffer);\n \n }", "private static void createQRImage(String qrFile, String qrCodeText, int size,\n\t\t\tHashtable hintMap) throws WriterException, IOException {\n\t\tQRCodeWriter qrCodeWriter = new QRCodeWriter();\n\t\tBitMatrix byteMatrix = qrCodeWriter.encode(qrCodeText,\n\t\t\t\tBarcodeFormat.QR_CODE, size, size, hintMap);\n\t\tMatrixToImageWriter.writeToFile(byteMatrix, qrFile.substring(qrFile\n\t\t\t\t.lastIndexOf('.') + 1), new File(qrFile));\n\t\t// Make the BufferedImage that are to hold the QRCode\n\t}", "private boolean isQueen(Point pos){\r\n Cells aux = model.getValueAt(pos);\r\n return (aux == Cells.BLACK_QUEEN || aux == Cells.RED_QUEEN);\r\n }", "public static void run(){\n\t\t\n\t\tMatrix A = null;\n\t\tVector b = null;\n\t\tVector c = null;\n\t\t\n\t\tfor (int n= 3; n<=11; n+=2 )\n\t\t{\n\t\t\tk=n-2;\n\t\t\tA = createConstraint(n, k) ;\n\t\t\tb = create_b(k, 0.5);\n\t\t\tc = create_c(n);\n\t\t\ttable = new SimplexTable(A, b, c, SimplexTable.MODE.EQUALITY);\n\t\t table.solve(); \n\t\t\tp(\"q_n( n=\"+n+\")= \" + (double) table.getMaxValue()); //(Math.round() / 100000);\n\t\t}\n\t\t\n\t}", "public MagicSquare(int n){\n\t\tthis.size = n;\n\t\tif(n%2!=1) // we don't have an odd number\n\t\t\treturn;\n\t\tthis.numbers = new int[n][n];\n\n\t\tint row = n-1;\n\t\tint column = n/2;\n\t\tint k = 0;\n\t\tfor(k=1; k<=n*n; k++){\n\t\t\tthis.numbers[row][column] = k;\n\t\t\tif(this.numbers[(row+1)%n][(column+1)%n]!=0){\n\t\t\t\trow --;\n\t\t\t}else{\n\t\t\t\tcolumn = (column + 1) % n;\n\t\t\t\trow = (row + 1) % n;\n\t\t\t}\n\t\t}\n\t}", "public Matrix(Matrix bb){\r\n\t\tthis.nrow = bb.nrow;\r\n\t\tthis.ncol = bb.ncol;\r\n\t\tthis.matrix = bb.matrix;\r\n\t\tthis.index = bb.index;\r\n this.dswap = bb.dswap;\r\n \t}", "@Override\r\n\tprotected Resultful getQRCodeURL() {\n\t\tString result = HttpRequest.post(domainName).body(getParamStr()).execute().body();\r\n\t\tlogger.info(\"【银联下单请求参数:{}】\",getParamStr());\r\n\t\tlogger.info(\"【银联商务下单响应:{}】:\",result);\r\n\t\tif (!StringUtils.isEmpty(result)){\r\n\t\t\tJSONObject ob = JSONObject.parseObject(result);\r\n\t\t\tif (\"SUCCESS\".equals(ob.getString(\"errCode\")))\r\n\t\t\t\treturn Resultful.qrCodeURL(ob.getString(\"billQRCode\"), billNo,String.format(\"%.2f\", Double.valueOf(totalAmount)));\t\r\n\t\t\telse\r\n\t\t\t\treturn Resultful.error(ob.getString(\"errMsg\"));\r\n\t\t}\r\n\t\treturn Resultful.error(\"下单失败\");\r\n\t}", "public int totalNQueens(int n) {\r\n\t\t// Note: The Solution object is instantiated only once and is reused by\r\n\t\t// each test case.\r\n\t\tint[] cols = new int[n];\r\n\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\tcols[i] = -1;\r\n\t\t}\r\n\t\tint number = createNQueens(n, cols, 0);\r\n\t\treturn number;\r\n\r\n\t}", "public CircularArrayDeque(int n){\n front = -1;\n rear = -1;\n container = (T[]) new Object[n];\n size = 0;\n capacity = n;\n }", "public static void queenSet() {\n\n boolean[][] boxes = new boolean[4][4];\n // System.out.println(queenPermutation2D(boxes, 4, 0, \"\"));\n System.out.println(queenCombination2D(boxes, 4, 0, \"\"));\n }", "public Board(int[][] n) {\n\t\tdimension = n.length;\n\t\tif(n.length != n[0].length) \n\t\t\tthrow new IllegalArgumentException(\"Parameter must be a square 2D array\");\n\t\tif(!isPerfectSquare(dimension))\n\t\t\tthrow new IllegalArgumentException(\"Parameter must have dimensions of a perfect square\");\n\t\tpuzzle = new int[dimension][dimension];\n\t\t//Deep copy of 2D Array\n\t\tfor(int row = 0; row < n.length; row++) {\n\t\t\tfor(int col = 0; col < n[0].length; col++) {\n\t\t\t\tpuzzle[row][col] = n[row][col];\n\t\t\t\tif(puzzle[row][col] < 0 || puzzle[row][col] > dimension)\n\t\t\t\t\tthrow new IllegalArgumentException(\"All values must be between 0-dimension inclusive\");\n\t\t\t}\n\t\t}\n\t}", "public static void printQueens(int[] q) {\n\n\t\tif (q[firstY] == firstX) {\t\t\t\t\t\t\t\t\t\t\t\t// Checks if the permutation contains the Queen position given by user.\n\t\t\tSystem.out.println(\" |1 2 3 4 5 6 7 8 \");\n\t\t\tSystem.out.println(\"-+----------------\");\n\t\t\tfor (int i = 0; i < 8; i++) {\n\t\t\t\tSystem.out.print(letters[i] + \"|\");\n\t\t\t\tfor (int j = 0; j < 8; j++) {\n\t\t\t\t\tif (q[i] == j) System.out.print(\"Q \");\n\t\t\t\t\telse System.out.print(\"* \");\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t} \n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public static QuadricRobustEstimator create(double[] qualityScores,\n RobustEstimatorMethod method) {\n switch (method) {\n case LMedS:\n return new LMedSQuadricRobustEstimator();\n case MSAC:\n return new MSACQuadricRobustEstimator();\n case PROSAC:\n return new PROSACQuadricRobustEstimator(qualityScores);\n case PROMedS:\n return new PROMedSQuadricRobustEstimator(qualityScores);\n case RANSAC:\n default:\n return new RANSACQuadricRobustEstimator();\n }\n }", "private void resetMatrixB() {\n\t\t// find the magnitude of the largest diagonal element\n\t\tdouble maxDiag = 0;\n\t\tfor( int i = 0; i < N; i++ ) {\n\t\t\tdouble d = Math.abs(B.get(i,i));\n\t\t\tif( d > maxDiag )\n\t\t\t\tmaxDiag = d;\n\t\t}\n\n\t\tB.zero();\n\t\tfor( int i = 0; i < N; i++ ) {\n\t\t\tB.set(i,i,maxDiag);\n\t\t}\n\t}", "@Test\n public void foo2()\n {\n double[][] entries = new double[][]{\n {1.000, 0.001}};\n \n DMatrixRMaj matrixJ = new DMatrixRMaj(entries);\n \n int numRows = matrixJ.getNumRows();\n int numColumns = matrixJ.getNumCols();\n boolean needU = true;\n boolean needV = true;\n boolean compact = false;\n \n SingularValueDecomposition_F64<DMatrixRMaj> svd = DecompositionFactory_DDRM.svd(numRows, numColumns, needU, needV, compact);\n svd.decompose(matrixJ);\n \n double[] singularValues = svd.getSingularValues();\n DMatrixRMaj matrixU = new DMatrixRMaj(numRows, numRows);\n DMatrixRMaj matrixW = new DMatrixRMaj(numRows, numColumns);\n DMatrixRMaj matrixVTranspose = new DMatrixRMaj(numColumns, numColumns);\n \n boolean transposeU = false;\n boolean transposeV = true;\n svd.getU(matrixU, transposeU);\n svd.getV(matrixVTranspose, transposeV);\n svd.getW(matrixW);\n \n System.out.println(\"matrixJ = \" + matrixJ);\n System.out.println(\"matrixU = \" + matrixU);\n System.out.println(\"matrixW = \" + matrixW);\n System.out.println(\"matrixV = \" + matrixVTranspose);\n \n DMatrixRMaj matrixJReconstructed = reconstructMatrix(matrixU, matrixW, matrixVTranspose);\n System.out.println(\"matrixJReconstructed = \" + matrixJReconstructed);\n\n MatrixTestTools.assertMatrixEquals(matrixJ, matrixJReconstructed, 1e-7);\n \n DMatrixRMaj matrixJTranspose = new DMatrixRMaj(matrixJ);\n CommonOps_DDRM.transpose(matrixJTranspose);\n \n DMatrixRMaj matrixJJTranspose = new DMatrixRMaj(matrixJ.getNumRows(), matrixJ.getNumRows());\n CommonOps_DDRM.mult(matrixJ, matrixJTranspose, matrixJJTranspose);\n \n DMatrixRMaj matrixJJTransposeInverse = new DMatrixRMaj(matrixJJTranspose);\n CommonOps_DDRM.invert(matrixJJTransposeInverse);\n \n\n DMatrixRMaj jPlus = new DMatrixRMaj(matrixJ.getNumCols(), matrixJ.getNumRows());\n CommonOps_DDRM.mult(matrixJTranspose, matrixJJTransposeInverse, jPlus);\n\n System.out.println(\"jPlus = \" + jPlus);\n\n \n DMatrixRMaj jPlusJ = new DMatrixRMaj(jPlus.getNumRows(), matrixJ.getNumCols());\n CommonOps_DDRM.mult(jPlus, matrixJ, jPlusJ);\n \n System.out.println(\"jPlusJ = \" + jPlusJ);\n \n DMatrixRMaj identity = CommonOps_DDRM.identity(jPlusJ.getNumRows());\n DMatrixRMaj matrixQ = new DMatrixRMaj(identity.getNumRows(), identity.getNumCols());\n \n CommonOps_DDRM.subtract(identity, jPlusJ, matrixQ);\n System.out.println(\"matrixQ = \" + matrixQ);\n\n\n }", "public List<List<Integer>> nqueens(int n) {\n List<List<Integer>> solu = new ArrayList<List<Integer>>();\n List<Integer> curr = new ArrayList<Integer>();\n if (n <=0)\n return solu;\n nqueens(n, 0, curr, solu);\n return solu;\n }", "public int totalNQueens(int n) {\n if(n<=0) return 0;\n dfs(0, n);\n return res;\n }", "public void enqueueRear(int n);", "public List<List<Integer>> nqueens(int n) {\n\t\tList<List<Integer>> result = new ArrayList<List<Integer>>();\n\t\t// cur will be a list of size n, and cur[i] is the column number where the queen\n\t\t// on row i positioned\n\t\tList<Integer> cur = new ArrayList<Integer>();\n\t\thelper(n, cur, result);\n\t\treturn result;\n\t}", "public KernelQedeqBo getKernelQedeq();", "void fillMatrixFromQuaternion(DoubleBuffer matrix, double m_x, double m_y, double m_z, double m_w)\n\t{\t\t\n\t\t// First row\n\t\tmatrix.put(1.0 - 2.0 * ( m_y * m_y + m_z * m_z ));\n\t\tmatrix.put(2.0 * (m_x * m_y + m_z * m_w));\n\t\tmatrix.put(2.0 * (m_x * m_z - m_y * m_w));\n\t\tmatrix.put(0.0);\n\t\t\n\t\t// Second row\n\t\tmatrix.put(2.0 * ( m_x * m_y - m_z * m_w ));\n\t\tmatrix.put(1.0 - 2.0 * ( m_x * m_x + m_z * m_z ));\n\t\tmatrix.put(2.0 * (m_z * m_y + m_x * m_w ));\n\t\tmatrix.put(0.0);\n\n\t\t// Third row\n\t\tmatrix.put(2.0 * ( m_x * m_z + m_y * m_w ));\n\t\tmatrix.put(2.0 * ( m_y * m_z - m_x * m_w ));\n\t\tmatrix.put(1.0 - 2.0 * ( m_x * m_x + m_y * m_y ));\n\t\tmatrix.put(0.0);\n\n\t\t// Fourth row\n\t\tmatrix.put(0.0);\n\t\tmatrix.put(0.0);\n\t\tmatrix.put(0.0);\n\t\tmatrix.put(1.0);\n\t\t\n\t\tmatrix.flip();\n\t}", "@SuppressWarnings(\"hiding\")\n public MWBMatchingAlgorithm(int n, int m) {\n reset(n, m);\n }" ]
[ "0.5626863", "0.5577619", "0.549951", "0.54137653", "0.5368699", "0.48681447", "0.4769714", "0.47436157", "0.47297055", "0.46969086", "0.46897134", "0.4655911", "0.4619572", "0.46069723", "0.4585528", "0.45620382", "0.45613405", "0.4486426", "0.44775686", "0.44615072", "0.4461027", "0.44337648", "0.4428026", "0.44156787", "0.4390735", "0.4388177", "0.43523523", "0.4351348", "0.4325405", "0.43193725", "0.43034512", "0.42999497", "0.4283739", "0.4247222", "0.42409733", "0.4220411", "0.4219604", "0.42182872", "0.42042512", "0.42028978", "0.41876933", "0.41873237", "0.41829327", "0.4167109", "0.41651124", "0.41366825", "0.41361675", "0.4133076", "0.4129129", "0.41291216", "0.4128884", "0.4128731", "0.4116122", "0.41102302", "0.41054052", "0.4094386", "0.40935075", "0.40888566", "0.4086037", "0.40845945", "0.4084387", "0.40783155", "0.40766078", "0.40666825", "0.40646374", "0.4061886", "0.40557286", "0.40494663", "0.4048403", "0.40442362", "0.40435183", "0.40337607", "0.40318343", "0.40304062", "0.4024181", "0.40238526", "0.40200174", "0.40183568", "0.4013141", "0.4007497", "0.39973813", "0.39824256", "0.39756748", "0.39754534", "0.39750558", "0.3974684", "0.39711365", "0.39699396", "0.39524853", "0.39490342", "0.39404047", "0.39401788", "0.39377612", "0.39368388", "0.3933598", "0.39247584", "0.39198244", "0.39172098", "0.3911795", "0.39087954" ]
0.53535855
5
public static final String PREFERENCES_NAME = "preferences";
public static GameManager getInstance() { return ourInstance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static interface Prefs{\n /**\n * The key-value pair stores the name of the file\n */\n public static final String FILE_NAME = \"game_preferences\";\n\n /**\n * The key that stores the field name: the best score\n */\n public static final String KEY_BEST_SCORE = \"best_score\";\n }", "public interface PreferenceHelper {\r\n // Preference Name\r\n String PREFERENCE_NAME = \"Embedded_Downloads_preference\";\r\n // Preference mode\r\n int PRIVATE_MODE = 0;\r\n String INITIAL_START = \"initial_start\";\r\n String WALLET_ADDRESS = \"wallet_address\";\r\n String WALLET_NAME = \"wallet_name\";\r\n String TRANSACTION_WALLET_ADDRESS = \"transaction_wallet_address\";\r\n String WALLET_POSITION =\"wallet_position\";\r\n String CALL_TRANSACTION_STATUS = \"call_transaction_status\";\r\n String CALL_INCOMING = \"call_incoming\";\r\n String CALL_OUTGOING = \"call_outgoing\";\r\n}", "public interface GeneralPreferenceHelper {\n String PREF_USER_NAME = \"pref_name_user\";\n String PREF_ENABLE_SOCIAL = \"pref_social_recomendation\";\n}", "@Override\n public void onCreatePreferences(Bundle bundle, String s) {\n addPreferencesFromResource(R.xml.preferences);\n }", "public interface Constants {\n /**\n * String representation for the name of the preferences object storing\n * the Parabank connection settings.\n */\n String PREFS_PARABANK = \"parabankConnectionSettings\";\n\n /**\n * String representation for the key within the Parabank preferences\n * object which stores the protocol for the HTTP requests.\n */\n @Deprecated\n String PREFS_PARABANK_PROTOCOL = \"protocol\";\n\n /**\n * String representation for the key within the Parabank preferences\n * object which stores the host for the HTTP requests.\n */\n String PREFS_PARABANK_HOST = \"host\";\n\n /**\n * String representation for the key within the Parabank preferences\n * object which stores the port for the HTTP requests.\n */\n String PREFS_PARABANK_PORT = \"port\";\n\n /**\n * String representation for key within the {@link android.content.Intent}\n * object which stores the {@link com.parabank.parasoft.app.android.adts.User}\n * object data.\n */\n String INTENT_USER = \"user\";\n String INTENT_PARABANK_URI = \"parabankConnection\";\n}", "@Override\n public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {\n setPreferencesFromResource(R.xml.prefs, rootKey);\n setVersionName();\n }", "@JavascriptInterface\n public String getPreference(String name) {\n Log.d(TAG, \"getPreference: \" + name);\n return preferences.getString(name, \"\");\n }", "private void saveInPreferences(String gameName) {\n //Store name in shared preferences\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putString(\"gameName\", gameName);\n editor.commit();\n\n //Check if gameName stored\n //String storedPreference = preferences.getString(\"gameName\",\"none\");\n //Log.d(\"checkGameName\", storedPreference);\n }", "public void saveName(String name, Context context){\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n prefs.edit().putString(\"spillernavn\", name).apply();\n }", "@Override\n public void onCreatePreferences(Bundle bundle, String s) {\n addPreferencesFromResource(R.xml.pref);\n sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getActivity());\n //onSharedPreferenceChanged(sharedPreferences, getString(R.string.language_key));\n onSharedPreferenceChanged(sharedPreferences, getString(R.string.difficulty_key));\n onSharedPreferenceChanged(sharedPreferences, getString(R.string.word_category_key));\n }", "public XmlParserPref(Context cont, String name) {\n\t\tcontext = cont;\n\t\tprefEdit = PreferenceManager.getDefaultSharedPreferences(context).edit();\n\t\tprofileName = name;\n\t}", "public static java.lang.String getDefaultSharedPreferencesName(android.content.Context context) { throw new RuntimeException(\"Stub!\"); }", "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}", "public IPreferenceStore getPreferenceStore(String name);", "ReadOnlyUserPrefs getUserPrefs();", "ReadOnlyUserPrefs getUserPrefs();", "ReadOnlyUserPrefs getUserPrefs();", "ReadOnlyUserPrefs getUserPrefs();", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n addPreferencesFromResource(R.xml.preferences);\n\n SharedPreferences SP = PreferenceManager.getDefaultSharedPreferences(getBaseContext());\n\n //String ip = SP.getString(\"ip\", \"NULL\");\n // Config.ip = SP.getString(\"ip\", \"NULL\");\n // Log.e(\"IP\",Config.ip );\n String language = SP.getString(\"language\",\"NULL\");\n // Toast.makeText(getApplicationContext(),Config.ip,Toast.LENGTH_SHORT).show();\n //Toast.makeText(getApplicationContext(),language,Toast.LENGTH_SHORT).show();\n }", "public static File getPreferencesDirectory() {\n\t\treturn PREFERENCES_DIRECTORY;\n\t}", "@Override\n public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {\n setPreferencesFromResource(R.xml.preferences, rootKey);\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tPreferenceManager prefMgr = getPreferenceManager();\n\t\tprefMgr.setSharedPreferencesName(\"appPreferences\");\n\t\t\n\t\taddPreferencesFromResource(R.xml.mappreference);\n\t}", "@Override\r\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\r\n getPreferenceManager().setSharedPreferencesName(PreferManager.PPEFER_FILE);\r\n addPreferencesFromResource(R.xml.preference);\r\n }", "public static String getPreferenceDirectory() {\n\t\treturn PREF_DIR;\n\t}", "public String getPrefsAutoLoadDescription();", "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 interface PrefsKey {\n\n String Ssid = \"Ssid\";\n String HotKeys = \"HotKeys\";\n String HistoryKeys = \"HistoryKeys\";\n String HistoryCooking = \"HistoryCooking\";\n\n String Guided = \"Guided\";\n}", "private void setPreferences(Preferences preferences) {\n this.preferences = preferences;\n }", "public interface Constants {\n String SHARED_PREF = \"SHARED_PREF\";\n String SHARED_PREF_AUTH_CODE = \"SHARED_PREF_AUTH_CODE\";\n String BASE_URL = \"http://pakhi.net\";\n\n String DB_NAME = \"iforgot_db\";\n String FILE_PATH = \"file_path\";\n String FILE_ID = \"file_id\";\n\n int WRITE_EXTERNAL_STORAGE_PERMISSION = 113;\n int REQUEST_CAMERA_PERMISSION = 114;\n}", "public void saveInPreference(String name, String content) {\n\t\tSharedPreferences preferences = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(this);\n\t\tSharedPreferences.Editor editor = preferences.edit();\n\t\teditor.putString(name, content);\n\t\teditor.commit();\n\t}", "public void setPreferences(Preferences preferences) {\n\n this.preferences = preferences;\n }", "public Preferences getPrefs() {\n return _prefs;\n }", "public SharedPreferences getPrefs() { return this.prefs; }", "public static String getSharedPrefs() {\n return SHARED_PREFS;\n }", "public HLSAppSharedPreferences(Context context, String strName) {\n\n mContext = context;\n mPreference = context.getSharedPreferences(strName, Activity.MODE_PRIVATE);\n mEditor = mPreference.edit();\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n addPreferencesFromResource(R.xml.framework_setting);\n SharedPreferences sharedPreferences = this.getPreferenceManager().getSharedPreferences();\n String preference_smartbar_default_type = getResources().getString(R.string.preference_smartbar_default_type);\n final ListPreference listPreference = (ListPreference) findPreference(preference_smartbar_default_type);\n //修改Smartbar类型\n String smart_type = sharedPreferences.getString(preference_smartbar_default_type, null);\n int index = listPreference.findIndexOfValue(String.valueOf(smart_type));\n if (index != -1) {\n CharSequence[] entries = listPreference.getEntries();\n listPreference.setTitle(entries[index]);\n }\n if (listPreference != null) {\n listPreference.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {\n @Override\n public boolean onPreferenceChange(Preference preference, Object newValue) {\n int index = listPreference.findIndexOfValue(newValue.toString());\n CharSequence[] entries = listPreference.getEntries();\n listPreference.setTitle(entries[index]);\n return true;\n }\n });\n }\n }", "@Override\n public void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n addPreferencesFromResource(R.xml.settings);\n }", "@Override\n public Path getUserPrefsFilePath() {\n return userPrefsStorage.getUserPrefsFilePath();\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.display_prefs);\n\t\t// TODO Auto-generated method stub\n\n\t\tTextView tvStore = (TextView) findViewById(R.id.textViewFaveJeansBrand);\n\n\t\tSharedPreferences settings = getSharedPreferences(PREFS_NAME, 0);\n\t\t// same name\n\n\t\ttvStore.setText(settings.getString(\"faveStore\", \"Aˇropostale\"));\n\t\t// default value is Jackie if it can't find a name\n\n\t}", "Preferences userRoot();", "String getFlashPref();", "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 }", "public interface Constants {\n\n String KEY_BOOK_INFO = \"key_book_info\";\n\n}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tprefMgr = getPreferenceManager();\n\t\t\n\t\taddPreferencesFromResource(R.xml.layout_pref);\n\t\t\n\t\tprefName = (EditTextPreference) prefMgr.findPreference(\"name\");\n\t\tprefName.setSummary(prefName.getText());\n\t\t\n\t\tprefName.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic boolean onPreferenceChange(Preference preference, Object newValue) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\tprefName.setSummary((CharSequence) newValue);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t});\n\t}", "public static void savePaguthiName(Context context, String type) {\n SharedPreferences sharedPreferences = PreferenceManager\n .getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(GMSConstants.PAGUTHI, type);\n editor.apply();\n }", "@Override\n public void onCreatePreferences(Bundle bundle, String s) {\n addPreferencesFromResource(R.xml.settings_main);\n\n Preference orderBy = findPreference(getString(R.string.settings_order_by_key));\n bindPreferenceSummaryToValue(orderBy);\n\n Preference filterByCompany = findPreference(getString(R.string.settings_filter_by_company_key));\n bindPreferenceSummaryToValue(filterByCompany);\n\n Preference filterBySection = findPreference(getString(R.string.settings_filter_by_section_key));\n bindPreferenceSummaryToValue(filterBySection);\n }", "public static Collection<String> getPreferences(){\n\t\treturn preferences;\n\t}", "public File getPreferencesFile() {\n\t\treturn preferencesFile;\n\t}", "@SuppressLint(\"CommitPrefEdits\")\n public HaloPreferencesStorageEditor(SharedPreferences preferences) {\n mPreferencesEditor = preferences.edit();\n }", "public String getPrefrence(String key) {\n SharedPreferences prefrence = context.getSharedPreferences(\n context.getString(R.string.app_name), 0);\n String data = prefrence.getString(key, \"\");\n return data;\n }", "public String getPrefrence(String key) {\n SharedPreferences prefrence = context.getSharedPreferences(\n context.getString(R.string.app_name), 0);\n String data = prefrence.getString(key, \"\");\n return data;\n }", "@Override\n\tprotected void onPause() {\n\t\tSharedPreferences.Editor editor = myprefs.edit();\n\t\teditor.putString(\"userN\", userName);\n\t\teditor.putString(\"name\",person_name);\n\t\teditor.commit();\n\t\tsuper.onPause();\n\t}", "protected abstract String getHintGivenSharedPreferencesKey();", "protected abstract IPreferenceStore getPreferenceStore();", "private GlobalPrefs() {\n\t\tprops = new Properties();\n\t}", "protected String getName(){\n sharedPref = getSharedPreferences(AppCSTR.PREF_NAME, Context.MODE_PRIVATE);\n //Log.d(\"TYPE\", sharedPref.getString(\"accountType\", null));\n return sharedPref.getString(AppCSTR.ACCOUNT_NAME, null);\n }", "protected void savePreferences() {\n String tmp_hostname = hostname.getHostName();\n System.out.println(\"stringified hostname was: \" + tmp_hostname);\n if (tmp_hostname != null) {\n SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor editor = settings.edit();\n editor.putString(\"last_hostname\", tmp_hostname);\n editor.commit();\n }\n }", "public interface DataVar {\n String APP_ROOT_FILE = Environment.getExternalStorageDirectory().getPath()\n + File.separator + \"NoteMyLife\";\n String APP_IMG_FILE = APP_ROOT_FILE + File.separator + \"img\";\n\n //把当前用户的登陆信息保存到本地时的键\n String SP_FILE = \"USER_DATA\";\n String SP_USER_ID = \"userId\";\n String SP_EMAIL = \"userAccount\";\n String SP_PASSWORD = \"userPassword\";\n String SP_HEAD = \"head\";\n String INIT_HEAD_IMAGE_FILE_NAME = \"0.png\";\n}", "private LODEParameters(){\n prefsFile=new File(LODEConstants.PARAMS_FILE);\n }", "public void savePreferences(SharedPreferences preferences){\r\n\t\tSharedPreferences.Editor editor = preferences.edit();\r\n editor.putBoolean(\"initialSetupped\", initialSetuped);\r\n editor.putString(\"username\", userName);\r\n editor.putString(\"useremail\", userEmail);\r\n editor.putString(\"recipientemail\", recipientEmail);\r\n editor.putBoolean(\"option\", option.isPound());\r\n\r\n // Commit the edits!\r\n editor.commit();\r\n\t}", "Preferences systemRoot();", "@Override\n public void setNotificationPreferences(String notificationPreferences) {\n this.notificationPreferences = notificationPreferences;\n SharedPreferences sharedPreferences = this.getSharedPreferences(KEY_SHAREDPREF_FILE, Context.MODE_PRIVATE);\n sharedPreferences.edit()\n .putString(KEY_SHARED_PREF_NOTIF,notificationPreferences)\n .apply();\n\n Log.i(TAG_MAIN, \"setNotificationPreferences: \" + notificationPreferences);\n }", "SharedPreferences mo117960a();", "protected void makePref(){\n //Creates a shared pref called MyPref and 0-> MODE_PRIVATE\n sharedPref = getSharedPreferences(AppCSTR.PREF_NAME, Context.MODE_PRIVATE);\n //so the pref can be edit\n edit = sharedPref.edit();\n}", "protected void SavePreferences(String key, String value) {\n SharedPreferences data = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor editor = data.edit();\n editor.putString(key, value);\n editor.commit();\n\n\n }", "private static SharedPreferences getSharedPreferences(Context context) {\n return PreferenceManager.getDefaultSharedPreferences(context);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n requestWindowFeature(Window.FEATURE_NO_TITLE);\n super.onCreate(savedInstanceState);\n\n addPreferencesFromResource(R.xml.preferences);\n\n // Intent intent = getIntent();\n }", "private static SharedPreferences getSharedPreference(Context context){\n return PreferenceManager.getDefaultSharedPreferences(context);\n }", "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 }", "private void savePrefsData() {\n SharedPreferences pref = getApplicationContext().getSharedPreferences(\"myPrefs\", MODE_PRIVATE);\n SharedPreferences.Editor editor = pref.edit();\n editor.putBoolean(\"isIntroOpnend\", true);\n editor.commit();\n }", "public static void setPreferences (ArrayList<String> ipreferences){\n\t\t\tpreferences = ipreferences;\n\t}", "public String getFromPreference(String variable_name) {\n\t\tString preference_return;\n\t\tSharedPreferences preferences = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(this);\n\t\tpreference_return = preferences.getString(variable_name, \"\");\n\n\t\treturn preference_return;\n\t}", "public void save() {\n savePrefs();\n }", "@Override\n protected void onPause() {\n super.onPause();\n\n SharedPreferences.Editor preferencesEditor = mPreferences.edit();\n preferencesEditor.putString(FULLNAME_KEY, myFullname);\n preferencesEditor.apply();\n }", "private String getPlayerName() {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);\n String storedName = preferences.getString(\"playerName\",\"none\");\n return storedName;\n }", "private MinesweeperPreferences getPrefs() {\n return Main.getPrefs();\n }", "public interface DBName {\n final static String DB = \"menu.db\";\n final static String Coffee = \"Menu\";\n final static String Ade = \"Ade\";\n final static String Basket = \"Basket\";\n final static String OrderList = \"OrderList\";\n}", "@Override\n\tpublic String toString() {\n\t\treturn \"Preferences [\" + \"language=\" + language +\"]\" ;\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\t//requestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\taddPreferencesFromResource(R.xml.setting_preference);\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 interface Constants {\n\n /*TODO KEY VALUE 参数*/\n String BUNDLE = \"bundle\";\n\n /*TODO APP 渠道*/\n String APP_SHANXI = \"SHANXI\";\n}", "public SharedPreferenceStorage(Context context, String prefName) {\n prefs = context.getSharedPreferences(prefName == null ?\n SharedPreferenceStorage.class.getCanonicalName() : prefName, MODE_PRIVATE);\n }", "String getPreference(String user, String preferenceName) throws OntimizeJEERuntimeException;", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\taddPreferencesFromResource(R.xml.task_preference);\r\n\t}", "private String getPrefAddress() {\n\t\treturn mPreferences.getString( PREF_ADDR, DEFAULT_ADDR );\n\t}", "private PreferencesModule() {\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n // Load the preferences from an XML resource\n addPreferencesFromResource(R.xml.preferences);\n\n wifi = (CheckBoxPreference) findPreference(KEY_PREF_UPLOAD_WIFI);\n wifiData = (CheckBoxPreference) findPreference(KEY_PREF_UPLOAD_WIFI_DATA);\n data = (CheckBoxPreference) findPreference(KEY_PREF_UPLOAD_DATA);\n\n wifi.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {\n @Override\n public boolean onPreferenceChange(Preference preference, Object newVal) {\n final boolean value = (Boolean) newVal;\n if(value) {\n wifiData.setChecked(false);\n data.setChecked(false);\n wifi.setChecked(true);\n }\n return true;\n }\n });\n\n wifiData.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {\n @Override\n public boolean onPreferenceChange(Preference preference, Object newVal) {\n final boolean value = (Boolean) newVal;\n if(value) {\n wifi.setChecked(false);\n data.setChecked(false);\n wifiData.setChecked(true);\n }\n return true;\n }\n });\n\n data.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {\n @Override\n public boolean onPreferenceChange(Preference preference, Object newVal) {\n final boolean value = (Boolean) newVal;\n if(value) {\n wifiData.setChecked(false);\n wifi.setChecked(false);\n data.setChecked(true);\n }\n return true;\n }\n });\n\n Preference button = findPreference(KEY_PREF_UPDATE);\n button.setSummary(getString(R.string.current_version) + \" \" + ApplicationController.VERSION);\n\n button.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {\n @Override\n public boolean onPreferenceClick(Preference preference) {\n UpdateController.getInstance(getActivity()).checkVersion();\n return true;\n }\n });\n }", "public GamePreferences getPrefs() {\n\t\treturn prefs;\n\t}", "private void guardarPreferences() {\n\n\t\t// se capturan aqui, solo es leer los editText, no tienen metodos\n\t\t// propios en esta clase\n\t\tEditText nicknameText = (EditText) findViewById(R.id.nicknameEditText);\n\t\tEditText emailText = (EditText) findViewById(R.id.emailEditText);\n\n\t\tstrNickname = nicknameText.getText().toString();\n\t\tstrEmail = emailText.getText().toString();\n\t\t\n\t\t\n\t\tEditor editor = mGameSettings.edit();\n\t\t\n\t\t\t\teditor.putString(Constants.GAME_PREFERENCES_NICKNAME, strNickname);\n\t\t\t\teditor.putString(Constants.GAME_PREFERENCES_EMAIL, strEmail);\n\t\t\t\t\n\t\t\t\t//editor.putString(Constants.GAME_PREFERENCES_PASSWORD, strPassword);\n\t\t\t\t//editor.putLong(Constants.GAME_PREFERENCES_DOB, dayOfBirth);\n\t\t\t\teditor.putInt(Constants.GAME_PREFERENCES_GENDER, gender);\n\t\t\t\t//editor.putString(Constants.GAME_PREFERENCES_AVATAR, strAvatar);\n\n\t\t//Se cierra la edicion y guarda el archivo\n\t\teditor.commit();\n\t}", "public void handlePreferences() {\n displayPrefs ();\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 }", "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 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}", "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 String getPref(String key) {\n\t SharedPreferences settings = activity.getSharedPreferences(PREFS_NAME, 0);\n\t settings = activity.getSharedPreferences(PREFS_NAME, 0);\n\t String value = settings.getString(key, \"\");\n\t return value;\n\t}", "public interface ActivityConstants {\n public static final int SCAN_ACTIVITY = 1001;\n public static final int PREVIOUS_ORDERS_ACTIVITY = 1002;\n public static final String PREFS_NAME = \"LoginData\";\n public static final String PREFS_LOGGED = \"LoggedIn\";\n}", "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 void setPrefs(GamePreferences prefs) {\n\t\tthis.prefs = prefs;\n\t}", "public String readStringPrefs(String prefName) {\n return sPrefs.getString(prefName, \"\");\n }", "@Provides\n @Singleton\n SharedPreferences providesDefaultSharedPreferences(Application application) {\n return PreferenceManager.getDefaultSharedPreferences(application);\n }" ]
[ "0.74063134", "0.68910164", "0.6755778", "0.6673163", "0.6650362", "0.65102273", "0.6479063", "0.64171946", "0.6390326", "0.63896304", "0.63829875", "0.63821214", "0.6371394", "0.6342515", "0.63029623", "0.63029623", "0.63029623", "0.63029623", "0.62838906", "0.6282776", "0.62806666", "0.6261944", "0.625732", "0.6223017", "0.6195615", "0.6185055", "0.6169167", "0.6128685", "0.6112373", "0.6104858", "0.6084435", "0.60770327", "0.6075559", "0.60707456", "0.60605425", "0.6035384", "0.60316783", "0.6020201", "0.59983253", "0.59958816", "0.5985312", "0.5984215", "0.5967828", "0.5941575", "0.5928164", "0.592388", "0.5906177", "0.5897587", "0.588658", "0.58780104", "0.58780104", "0.58767265", "0.5870038", "0.58329743", "0.5831405", "0.5831337", "0.58164364", "0.581096", "0.58096623", "0.58090395", "0.5806982", "0.58051795", "0.57818836", "0.5775348", "0.577199", "0.5771065", "0.5760751", "0.57560456", "0.5755734", "0.5748738", "0.57486254", "0.573836", "0.572155", "0.57201046", "0.57157546", "0.5715006", "0.57076114", "0.56790495", "0.5672652", "0.56716716", "0.56633365", "0.5662991", "0.5659945", "0.5656621", "0.5655574", "0.5651239", "0.5649962", "0.56443745", "0.5629257", "0.56281227", "0.562481", "0.562481", "0.5623016", "0.56196135", "0.5616105", "0.5614787", "0.56134397", "0.5609354", "0.56050897", "0.5599912", "0.559617" ]
0.0
-1
CPU usage percents calculation. It is possible negative values or values higher than 100% may appear.
public float getCpuUsage() { try { mReader = new BufferedReader(new FileReader(mCpuUsageFilePath)); mSa = mReader.readLine().split("[ ]+", 9); mWork = Long.parseLong(mSa[1]) + Long.parseLong(mSa[2]) + Long.parseLong(mSa[3]); mTotal = mWork + Long.parseLong(mSa[4]) + Long.parseLong(mSa[5]) + Long.parseLong(mSa[6]) + Long.parseLong(mSa[7]); if (mTotalBefore != 0) { mTotalT = mTotal - mTotalBefore; mWorkT = mWork - mWorkBefore; mCpuTotal = restrictPercentage(mWorkT * 100 / (float) mTotalT); //Log.d(TAG, "CPU Usage: " + restrictPercentage(mWorkT * 100 / (float) mTotalT) + "%"); } mTotalBefore = mTotal; mWorkBefore = mWork; mReader.close(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return mCpuTotal; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static double doCPU_usage() {\n double totalProgramRunTime = endProgramTime - startProgramTime;\n return (processingTimeTotal / totalProgramRunTime) * 100;\n }", "private float getCpuUsage() {\n\t\tString processName = ManagementFactory.getRuntimeMXBean().getName();\n\t\tString processId = processName.split(\"@\")[0];\n\n\t\tlong utimeBefore, utimeAfter, totalBefore, totalAfter;\n\t\tfloat usage = 0;\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(\"/proc/\" + processId + \"/stat\"));\n\t\t\tString line = br.readLine();\n\t\t\tutimeBefore = Long.parseLong(line.split(\" \")[13]);\n\t\t\tbr.close();\n\n\t\t\ttotalBefore = 0;\n\t\t\tbr = new BufferedReader(new FileReader(\"/proc/stat\"));\n\t\t\tline = br.readLine();\n\t\t\twhile (line != null) {\n\t\t\t\tString[] items = line.split(\" \");\n\t\t\t\tif (items[0].equals(\"cpu\")) {\n\t\t\t\t\tfor (int i = 1; i < items.length; i++)\n\t\t\t\t\t\tif (!items[i].trim().equals(\"\") && items[i].matches(\"[0-9]*\"))\n\t\t\t\t\t\t\ttotalBefore += Long.parseLong(items[i]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbr.close();\n\n\t\t\tThread.sleep(1000);\n\n\t\t\tbr = new BufferedReader(new FileReader(\"/proc/\" + processId + \"/stat\"));\n\t\t\tline = br.readLine();\n\t\t\tutimeAfter = Long.parseLong(line.split(\" \")[13]);\n\t\t\tbr.close();\n\n\t\t\ttotalAfter = 0;\n\t\t\tbr = new BufferedReader(new FileReader(\"/proc/stat\"));\n\t\t\tline = br.readLine();\n\t\t\twhile (line != null) {\n\t\t\t\tString[] items = line.split(\" \");\n\t\t\t\tif (items[0].equals(\"cpu\")) {\n\t\t\t\t\tfor (int i = 1; i < items.length; i++)\n\t\t\t\t\t\tif (!items[i].trim().equals(\"\") && items[i].matches(\"[0-9]*\"))\n\t\t\t\t\t\t\ttotalAfter += Long.parseLong(items[i]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbr.close();\n\n\t\t\tusage = 100f * (utimeAfter - utimeBefore) / (totalAfter - totalBefore);\n\t\t} catch (Exception e) {}\n\t\treturn usage;\n\t}", "public double getCpuUsage() {\n \t\tif (cpuUsage > 100) {\n \t\t\treturn 100;\n \t\t}\n \t\treturn cpuUsage;\n \t}", "private void updateCpuStats() {\n\t\tmNumStatsUpdated = 0;\n\t\tList<String> stats = ShellHelper.getProc(CPU_STAT_PROC);\n\t\tif (stats == null || stats.isEmpty()) return;\n\t\t\n\t\tString[] parts = null;\n\t\tString line = null;\n\t\tfor (int i = 0; i < stats.size(); ++i) {\n\t\t\tline = stats.get(i);\n\t\t\tif (line.startsWith(\"cpu\")) { //TODO if 0% usage the cpu is omitted\n\t\t\t\tparts = line.split(\"\\\\s+\");\t\t\t\t\n\t\t\t\tif (parts[0].endsWith(String.valueOf(i - 1))) {\n\t\t\t\t\tif (mLogicalCpus.size() >= i &&\n\t\t\t\t\t\t\tmLogicalCpus.get(i - 1).getCpuStat().update(parts)) {\t\t\t\t\t\n\t\t\t\t\t\t++mNumStatsUpdated;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (mCpuStat.update(parts)) {\n\t\t\t\t\t++mNumStatsUpdated;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void collectCpuMemoryUsage(){\r\n\t\tHmDomain hmDomain = CacheMgmt.getInstance().getCacheDomainByName(\"home\");\r\n\t\tfloat cpuUsage = LinuxSystemInfoCollector.getInstance().getCpuInfo() * 100;\r\n\t\tfloat memoryUsage = 0;\r\n\t\ttry {\r\n\t\t\tlong count[] = LinuxSystemInfoCollector.getInstance().getMemInfo();\r\n\t\t\tif(count[0] != 0){\r\n\t\t\t\tmemoryUsage = ((float)(count[0] - count[1] - count[2] - count[3]) * 100 / count[0]);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tBeLogTools.error(HmLogConst.M_PERFORMANCE,\"calculate memory usage failure.\", e);\r\n\t\t}\r\n\t\tCpuMemoryUsage cmu = new CpuMemoryUsage();\r\n\t\tcmu.setCpuUsage(cpuUsage);\r\n\t\tcmu.setMemUsage(memoryUsage);\r\n\t\tcmu.setOwner(hmDomain);\r\n\t\tcmu.setTimeStamp((new Date()).getTime());\r\n\t\ttry {\r\n\t\t\tQueryUtil.createBo(cmu);\r\n\t\t} catch (Exception e) {\r\n\t\t\tBeLogTools.error(HmLogConst.M_PERFORMANCE,\"create CpuMemoryUsage failure.\", e);\r\n\t\t}\r\n\t}", "private double getCpuStatistic(String args) throws Exception\n {\n /*\n ORDER OF COLLUMNS FROM PROC/STAT\n user: normal processes executing in user mode\n nice: niced processes executing in user mode\n system: processes executing in kernel mode\n idle: twiddling thumbs\n iowait: waiting for I/O to \"complete\n irq: servicing interrupts\n softirq: servicing softirqs\n */\n //TODO:IMPLEMENT CPU STATISTICS\n RandomAccessFile reader;\n reader = new RandomAccessFile(\"/proc/stat\", \"r\");\n String cpuInfo = reader.readLine();\n String[] parts = cpuInfo.split(\" \");\n if(args.toLowerCase() == userArg)\n {\n return(Integer.decode(parts[2]));\n }\n else if(args.toLowerCase() == systemArg)\n {\n return(Integer.decode(parts[4]));\n }\n else if(args.toLowerCase() == idleArg)\n {\n return(Integer.decode(parts[5]));\n }\n else\n {\n int total = 0;\n int idle = Integer.decode(parts[5]);;\n for (int i = 2; i < parts.length; i++)\n {\n total += Integer.decode(parts[i]);\n }\n double retVal = (double)idle / (double) total;\n return (retVal);\n }\n }", "public double evaluateLoad() {\n double result = 0;\n result += cpuLoad;\n if (freeSystemMem < 1024 * 100) result += 80;\n if (freeSystemMem < 1024 * 20) result += 100;\n if (diskUsage>50)result+=10;\n if (diskUsage>80)result+=40;\n if (diskUsage>90)result+=150;\n if (diskUsage>95)result+=200;\n System.out.println(diskUsage);\n return result;\n }", "public double getTotalNumCpus () { return n.getResources(RESOURCETYPE_CPU).stream().mapToDouble(r->r.getCapacity()).sum (); }", "public static void getCpuUsage(){\r\n CPUmeasurement currentCpuUsage = new CPUmeasurement();\r\n cpuUsageList.add(currentCpuUsage);\r\n //CPUmeasurement.printCpuUsage(currentCpuUsage);\r\n }", "public native int getCpuUsage();", "public double usagePercentage() {\n return 1.0 * (this.rectangleCount() - 1) / (this.M * this.nodeCount()); // -1 in order to ignore de root\n }", "public double getUtilization(Myhost myhost)\n {\n return ((double)(myhost.getTotalCpu()-myhost.getAvaliableCpu()) / myhost.getTotalCpu());\n }", "private void getCpuInfo() {\n\t\ttry {\n\t\t\tRandomAccessFile reader = new RandomAccessFile(\"/proc/stat\", \"r\");\n\t\t\tString load = reader.readLine();\n\n\t\t\tString[] toks = load.split(\" \");\n\n\t\t\tlong idle1 = Long.parseLong(toks[5]);\n\t\t\tlong cpu1 = Long.parseLong(toks[2]) + Long.parseLong(toks[3])\n\t\t\t\t\t+ Long.parseLong(toks[4]) + Long.parseLong(toks[6])\n\t\t\t\t\t+ Long.parseLong(toks[7]) + Long.parseLong(toks[8]);\n\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (Exception e) {\n\n\t\t\t}\n\t\t\t//get process name list in this time\n\t\t\tgetTopCpu();\n\n\t\t\treader.seek(0);\n\t\t\tload = reader.readLine();\n\t\t\treader.close();\n\n\t\t\ttoks = load.split(\" \");\n\n\t\t\t// find right data is the key\n\t\t\t// System.out.println(toks[0]+\" 1 \"+toks[1]+\" 2 \"+toks[2]+\" \"+toks[3]+\" \"+toks[4]+\" \"+toks[5]+\" \"+toks[6]+\" \"+toks[7]+\" 8 \"+toks[8]);\n\t\t\tlong idle2 = Long.parseLong(toks[5]);\n\t\t\tlong cpu2 = Long.parseLong(toks[2]) + Long.parseLong(toks[3])\n\t\t\t\t\t+ Long.parseLong(toks[4]) + Long.parseLong(toks[6])\n\t\t\t\t\t+ Long.parseLong(toks[7]) + Long.parseLong(toks[8]);\n\n\t\t\t// System.out.println(idle2+\" \"+cpu2);\n\t\t\trate = (float) (cpu2 - cpu1)\n\t\t\t\t\t/ (float) ((cpu2 + idle2) - (cpu1 + idle1));\n\t\t\t// System.out.println(rate);\n\t\t\tint temprate = (int) ((rate + 0.05) * 100);\n\t\t\tif (temprate < 0 || temprate > 100) {\n\t\t\t\t// System.out.println(toks[0]+\" 1 \"+toks[1]+\" 2 \"+toks[2]+\" \"+toks[3]+\" \"+toks[4]+\" \"+toks[5]+\" \"+toks[6]+\" \"+toks[7]+\" 8 \"+toks[8]);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcpuChart.addData(temprate);\n\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "public double getPercentRem(){\n return ((double)freeSpace / (double)totalSpace) * 100d;\n }", "public double calculateHpPercent();", "int getPercentageHeated();", "public float getProgressPct() {\n return (float) currentCompactedKVs / getTotalCompactingKVs();\n }", "@Test\n public void testCpuMetric() {\n MetricValue mv = new MetricValue.Builder().load(30).add();\n\n CPU_METRICS.forEach(cmt -> testUpdateMetricWithoutId(cmt, mv));\n CPU_METRICS.forEach(cmt -> testLoadMetric(nodeId, cmt, mv));\n }", "public void utilization() {\r\n\t\tfloat fAktuell = this.aktuelleLast;\r\n\t\tfloat fMax = this.raumsonde.getMaxNutzlast();\r\n\t\tfloat prozent = fAktuell / fMax * 100;\r\n\r\n\t\tSystem.out.println(\" \" + fAktuell + \"/\" + fMax + \" (\" + prozent + \"%)\");\r\n\t}", "java.lang.String getPercentage();", "double getLeftoverCPUPercentile() {\n return MathUtils.toPercentile(getLeftoverCPU(), pm.getCPU());\n }", "public int percent() {\n\t\tdouble meters = meters();\n\t\tif (meters < MIN_METERS) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn (int) (Math.pow((meters - MIN_METERS)\n\t\t\t\t/ (MAX_METERS - MIN_METERS) * Math.pow(100, CURVE),\n\t\t\t\t1.000d / CURVE));\n\t}", "public static String retornaPercentualUsadoDeMemoriaJVM() {\r\n\t\tRuntime runtime = Runtime.getRuntime();\r\n\t\t\r\n\t\tlong max = runtime.maxMemory();\r\n\t\tlong free = runtime.freeMemory();\r\n\t\tlong used = max - free;\r\n\r\n\t\tNumberFormat format = NumberFormat.getInstance();\r\n\r\n\t\t// Retorna o percentual da memoria usada\r\n\t\tString percentualMemoriaUsada = format.format(((used * 100) / max));\r\n\r\n\t\treturn percentualMemoriaUsada;\r\n\t}", "public double getAverageUsage() {\n \tif(lastData.size() > 0) {\n\t \tdouble total = 0.0;\n\t \t\n\t \tfor(double data : lastData) {\n\t \t\ttotal += data;\n\t \t}\n\t \t\n \t\tSystem.out.println(\"Current average load (last minute): \" + total / lastData.size());\n\t \t\n\t \treturn total / lastData.size();\n \t} else {\n \t\t// Calculate CPU usage\n \t\tdouble per = 0;\n\t\t\ttry {\n\t\t\t\tper = sigar.getCpuPerc().getCombined();\n\t\t\t} catch (SigarException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n \t\t\n \t\treturn per;\n \t}\n }", "Optional<Duration> totalCpuTime();", "public static float calculatePercent(float numOfSpecificTrees, float totalTrees){\n\t\tfloat percent= numOfSpecificTrees/totalTrees*100;\n\t\treturn percent;\n\t\t\n\t}", "public double getOccupiedCpus () { return getCpuBaseResource().getOccupiedCapacity(); }", "private void computePerformance(int ticks) {\n System.out.println(\"Avergae number of packets in queue: \" + (_cumulativePacketsInQueue / (double)ticks));\n \n // Average time spent in queue per packet\n System.out.println(\"Average sojurn time: \" + (_totalSojurnTime / (double)_numPacketsProcessed));\n\n // Percentage idle time\n System.out.println(\"Percentage idle time: \" + ((_totalIdleTime / (double)ticks) * 100) + \"%\");\n\n // Packet loss probability\n System.out.println(\"Packet loss proability: \" + ((_numPacketsDropped / (double)(_numPacketsDropped + _numPacketsProcessed)) * 100) + \"%\");\n }", "private SensorData collectCPUUsageInfo() throws SigarException {\n \n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Collecting CPU Usage Information\");\n }\n SensorData data = new SensorData();\n \n CpuPerc cpuPerc = sigar.getCpuPerc();\n \n data.add(SensorAttributeConstants.CPUConstants.CPU_IDLE, (cpuPerc.getIdle() * 100));\n data.add(SensorAttributeConstants.CPUConstants.CPU_USAGE_USER, (cpuPerc.getUser() * 100));\n data.add(SensorAttributeConstants.CPUConstants.CPU_USAGE_SYSTEM, (cpuPerc.getSys() * 100));\n data.add(SensorAttributeConstants.CPUConstants.CPU_USAGE_TOTAL, (cpuPerc.getCombined() * 100));\n \n return data;\n }", "public int getCurrentCpuFailoverResourcesPercent() {\r\n return currentCpuFailoverResourcesPercent;\r\n }", "public double getPercentRem(long used){\n long left = freeSpace - used;\n return ((double)left / (double)totalSpace) * 100d;\n }", "private float getPercentage(int count, int total) {\n return ((float) count / total) * 100;\n }", "private void calculateAndGraph(ArrayList<String> first, ArrayList<String> second) {\n\t\tfor(int i = 0; i < numCores; i++) {\n\t\t\t\tString[] firstTokens = first.get(i).split(\" \");\n\t\t\t\tString[] secondTokens = second.get(i).split(\" \");\n\t\t\t\t\n\t\t\t\t// calculate user2 - user1\n\t\t\t\tdouble user = Double.parseDouble(secondTokens[0]);\n\t\t\t\tdouble userPrevious = Double.parseDouble(firstTokens[0]);\n\t\t\t\tdouble userDiff = Math.abs(user-userPrevious);\n\t\t\t\t\n\t\t\t\t// calculate system2 - system1\n\t\t\t\tdouble system = Double.parseDouble(secondTokens[1]);\n\t\t\t\tdouble systemPrevious = Double.parseDouble(firstTokens[1]);\n\t\t\t\tdouble systemDiff = Math.abs(system-systemPrevious);\n\t\t\t\t\n\t\t\t\t// calculate nice2 - nice1\n\t\t\t\tdouble nice = Double.parseDouble(secondTokens[2]);\n\t\t\t\tdouble nicePrevious = Double.parseDouble(firstTokens[2]);\n\t\t\t\tdouble niceDiff = Math.abs(nice-nicePrevious);\n\t\t\t\t\n\t\t\t\t// calculate idle2 - idle1\n\t\t\t\tdouble idle = Double.parseDouble(secondTokens[3]);\n\t\t\t\tdouble idlePrevious = Double.parseDouble(firstTokens[3]);\n\t\t\t\tdouble idleDiff = Math.abs(idle-idlePrevious);\n\t\t\t\t\t\t\t\t\n//\t\t\t\t// calculate CPU usage using method from http://www.pplusdomain.net/cgi-bin/blosxom.cgi/2009/04/02\n//\t\t\t\tdouble total = userDiff + systemDiff + niceDiff + idleDiff;\n//\t\t\t\tdouble idlePercent = idleDiff / total * 100;\n//\t\t\t\tint cpuUtil2 = (int) (100.0 - idlePercent);\n\t\t\t\t\n\t\t\t\t// calculate CPU usage using method from https://piazza.com/class/ic02ole9e534k8?cid=137\n\t\t\t\tdouble numerator = systemDiff + userDiff;\n\t\t\t\tdouble denominator = numerator + idleDiff;\n\t\t\t\tint cpuUtil = (int) ((numerator / denominator) * 100.0);\n\t\t\t\t\n\t\t\t\t// Write cpu usage for this core to the graph\n\t\t\t\tuserInterface.getCPUGraph().addDataPoint(i, cpuUtil);\n\t\t\t\tuserInterface.getCPUGraph().repaint();\n\t\t}\n\t}", "public void setExecutionPercentage(double percentage);", "public BigDecimal getUsagePercentage() {\n return this.usagePercentage;\n }", "float getPercentHealth();", "@ApiModelProperty(required = true, value = \"The number (across all cores) of micro-seconds per second.\")\n public BigDecimal getCpu() {\n return cpu;\n }", "public double getHitsPercentual()\n\t{\n\t\t//Convert int to double values\n\t\tdouble doubleHits = hits;\n\t\tdouble doubleTotalProcessedStops = totalProcessedStops;\n\t\t\n\t\t//Hits percentual obtained by Jsprit algorithm\n\t\treturn Math.round(100 * (doubleHits / doubleTotalProcessedStops));\n\t}", "public void readCpuStat() {\n\t\ttry {\n\t\t\t// monitor total and idle cpu stat of certain process\n\t\t\tRandomAccessFile cpuInfo = new RandomAccessFile(\"/proc/stat\", \"r\");\n\t\t\tString[] toks = cpuInfo.readLine().split(\"\\\\s+\");\n\t\t\tidleCpu = Long.parseLong(toks[4]);\n\t\t\ttotalCpu = Long.parseLong(toks[1]) + Long.parseLong(toks[2])\n\t\t\t\t\t+ Long.parseLong(toks[3]) + Long.parseLong(toks[4])\n\t\t\t\t\t+ Long.parseLong(toks[6]) + Long.parseLong(toks[5])\n\t\t\t\t\t+ Long.parseLong(toks[7]);\n\t\t\tcpuInfo.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t} catch (IOException e) {\n\t\t}\n\t}", "public Double getProgressPercent();", "public void increaseCpuUsage(double val) {\n \t\tcpuUsage += val;\n \n \t}", "private double getThreadStatistics(String args) throws Exception\n {\n //TODO: IMPLEMENT THIS IF WE HAVE TIME, CURRENTLY CANT GET ALL PIDS\n /*\n File f = new File(\"/proc/\" + args + \"/stat\");\n if(f.exists() && !f.isDirectory()) { //if valid pid passed as arg\n RandomAccessFile reader = new RandomAccessFile(\"/proc/\" + args + \"/stat\", \"r\");\n String newLine = reader.readLine();\n String[] parts = newLine.split(\" \");\n return(Double.parseDouble(parts[20]));\n }\n else if(args.toLowerCase() == defaultArg)\n {\n int[] allPids = getAllPids(contextToUse);\n double retVal = 0;\n for(int i = 0; i < allPids.length; i++)\n {\n retVal += getThreadStatistics(\"\" + allPids[i], contextToUse) + 1;\n }\n return(retVal);\n }\n else\n {\n return(-1);\n }\n */\n return(-1);\n }", "private double calcScorePercent() {\n\t\tdouble adjustedLab = totalPP * labWeight;\n\t\tdouble adjustedProj = totalPP * projWeight;\n\t\tdouble adjustedExam = totalPP * examWeight;\n\t\tdouble adjustedCodeLab = totalPP * codeLabWeight;\n\t\tdouble adjustedFinal = totalPP * finalWeight;\n\n\t\tlabScore = (labScore / labPP) * adjustedLab;\n\t\tprojScore = (projScore / projPP) * adjustedProj;\n\t\texamScore = (examScore / examPP) * adjustedExam;\n\t\tcodeLabScore = (codeLabScore / codeLabPP) * adjustedCodeLab;\n\t\tfinalExamScore = (finalExamScore / finalExamPP) * adjustedFinal;\n\n//\t\tdouble labPercent = labScore / adjustedLab;\n//\t\tdouble projPercent = projScore / adjustedProj;\n//\t\tdouble examPercent = examScore / adjustedExam;\n//\t\tdouble codeLabPercent = codeLabScore / adjustedCodeLab;\n//\t\tdouble finalPercent = finalExamScore / adjustedFinal;\n\n\t\tdouble totalPercent = (labScore + projScore + examScore + codeLabScore + finalExamScore) / totalPP;\n\t\t\n\t\tscorePercent = totalPercent;\n\t\t\n\t\treturn totalPercent;\n\t}", "public double getOccupancyPercentage() throws SQLException {\n\t\tdouble result = (double) getOccupancy() / getMaxOccupancy() * 100;\n\t\tresult = Math.round (result * 100.0) / 100.0; \n\t\treturn result;\n\t}", "public float getCPUCost() {\n return this.cpuCost;\n }", "public float getGoodPercentage(){\n float result;\n try {\n result = ((float)(goodFrameCount)) / (goodFrameCount + badFrameCount)*100;\n Log.d(\"PROCESSING_SERVICE\", \"goodTimePercentage = \"+result);\n } catch(ArithmeticException ex){\n result = 100;\n Log.d(\"PROCESSING_SERVICE\", \"goodTimePercentage = \"+result);\n }\n Log.d(\"PROCESSING_SERVICE\", \"goodTimePercentage = \"+result);\n if(Float.isNaN(result)){\n Log.d(\"PROCESSING_SERVICE\", \"goodTimePercentage = \"+result);\n result=100;\n Log.d(\"PROCESSING_SERVICE\", \"goodTimePercentage = \"+result);\n }\n return result;\n }", "public double percentage(double value) {\n return basicCalculation(value, 100, Operator.DIVIDE);\n }", "private double calculatePercentProgress(BigDecimal projectId) {\r\n log.debug(\"calculatePercentProgress.START\");\r\n ModuleDao moduleDao = new ModuleDao();\r\n LanguageDao languageDao = new LanguageDao();\r\n List<Module> modules = moduleDao.getModuleByProject(projectId);\r\n double totalCurrentLoc = 0;\r\n double totalCurrentPage = 0;\r\n double totalCurrentTestCase = 0;\r\n double totalCurrentSheet = 0;\r\n\r\n double totalPlannedLoc = 0;\r\n double totalPlannedPage = 0;\r\n double totalPlannedTestCase = 0;\r\n double totalPlannedSheet = 0;\r\n for (int i = 0; i < modules.size(); i++) {\r\n Language language = languageDao.getLanguageById(modules.get(i).getPlannedSizeUnitId());\r\n if (language.getSizeUnit().toUpperCase().contains(Constant.LOC.toUpperCase())) {\r\n totalCurrentLoc += modules.get(i).getActualSize().doubleValue();\r\n totalPlannedLoc += modules.get(i).getPlannedSize().doubleValue();\r\n }\r\n\r\n if (language.getSizeUnit().toUpperCase().contains(Constant.TESTCASE.toUpperCase())) {\r\n totalCurrentTestCase += modules.get(i).getActualSize().doubleValue();\r\n totalPlannedTestCase += modules.get(i).getPlannedSize().doubleValue();\r\n }\r\n\r\n if (language.getSizeUnit().toUpperCase().contains(Constant.PAGE_WORD.toUpperCase())) {\r\n totalCurrentPage += modules.get(i).getActualSize().doubleValue();\r\n totalPlannedPage += modules.get(i).getPlannedSize().doubleValue();\r\n }\r\n if (language.getSizeUnit().toUpperCase().contains(Constant.SHEET_EXCEL.toUpperCase())) {\r\n totalCurrentSheet += modules.get(i).getActualSize().doubleValue();\r\n totalPlannedSheet += modules.get(i).getPlannedSize().doubleValue();\r\n }\r\n\r\n }\r\n\r\n double percentProgress = ((totalCurrentLoc * Constant.LOC_WEIGHT)\r\n + (totalCurrentTestCase * Constant.TESTCASE_WEIGHT) + (totalCurrentPage * Constant.PAGE_WEIGHT) + (totalCurrentSheet * Constant.PAGE_WEIGHT))\r\n / ((totalPlannedLoc * Constant.LOC_WEIGHT) + (totalPlannedTestCase * Constant.TESTCASE_WEIGHT)\r\n + (totalPlannedPage * Constant.PAGE_WEIGHT) + (totalPlannedSheet * Constant.PAGE_WEIGHT)) * 100;\r\n\r\n return Math.round(percentProgress * 100.0) / 100.0;\r\n }", "public Long get_cachepercentpethits() throws Exception {\n\t\treturn this.cachepercentpethits;\n\t}", "public int getCpuLoad() { return cpuLoad; }", "private void percentageScaling() {\n switch (slot) {\n case Torso -> updateBonusStats(1);\n case Head -> updateBonusStats(0.8);\n case Legs -> updateBonusStats(0.6);\n }\n }", "public double getPercentMutants() {\n\t\tdouble count = (double) getNumMutants();\n\t\tdouble pSize = (double) this.getPopSize();\n\n\t\treturn count*100.0 / pSize;\n\t}", "@Nullable\n Integer getVcpuCount();", "public long getTotalThreadCpuTime(long[] tids) {\t\t\t\t//get multiple threads cpu time usage to prevent overhead for multiple \n\t\tThreadMXBean bean = ManagementFactory.getThreadMXBean();\t\t//method invocations of getThreadCpuTime(long tid)\n\t\tif(!bean.isThreadCpuTimeSupported()) \t\t\t\t\t\t\t//If JVM supports for CPU time measurement for any thread, it returns true\n\t\t\treturn -1L;\n\t\tfor(long i : tids) {\n\t\t\tlong currentTime = bean.getThreadCpuTime(i);\n\t\t\tif(currentTime != -1) {\t\t\t\t\t\t\t\t\t\t//Check if the thread CPU measurement is enableed.\n\t\t\t\ttotalTime += currentTime;\n\t\t\t}\n\t\t}\n\t\treturn totalTime;\n\t}", "public double getEfficiencyPercentual()\n\t{\n\t\t//Difference from Jsprit algorithm path cost and transport service provider path cost\n\t\tdouble difference = algBestPathDistance - providerBestPathDistance;\n\t\t\n\t\t//Efficiency percentual obtained by Jsprit algorithm\n\t\treturn Math.round(100 * (1 - difference / providerBestPathDistance));\n\t}", "int getBatteryPercentage();", "public Integer getCpus() {\n return cpus;\n }", "public Integer getCpus() {\n return cpus;\n }", "public double getTotalCellularityPercentage()\r\n \t{\r\n \t\treturn totalCellularityPercentage;\r\n \t}", "private double fillPercent() {\n\t\tdouble percent = 0;\n\t\t\n\t\tfor (LinkedList<WordCode<K, V>> ll : myBuckets) {\n\t\t\tif (ll.size() != 0) percent++;\n\t\t}\n\t\treturn (percent / myBuckets.size()) * 100;\n\t}", "public static int getProgressPercentage(long currentDuration, long totalDuration){\r\n Double percentage = (double) 0;\r\n \r\n long currentSeconds = (int) (currentDuration / 1000);\r\n long totalSeconds = (int) (totalDuration / 1000);\r\n \r\n // calculating percentage\r\n percentage =(((double)currentSeconds)/totalSeconds)*100;\r\n \r\n // return percentage\r\n return percentage.intValue();\r\n }", "String getCpusetcpus();", "public static void main(String[] args) {\n \tdouble num1 = 7.15;\n \tdouble num2 = 10.0;\n\t\t// 创建一个数值格式化对象\n\t\tNumberFormat numberFormat = NumberFormat.getInstance();\n\t\tDecimalFormat decimalFormat = new DecimalFormat(\"#.00\");\n\t\t// 设置精确到小数点后2位\n\t\tnumberFormat.setMaximumFractionDigits(2);\n\t\tString result = numberFormat.format((num1 / num2 * 100));\n\t\tSystem.out.println(\"num1和num2的百分比为:\" + result + \"%\");\n\t\tSystem.out.println(\"num1和num2的百分比为:\" + decimalFormat.format(Double.valueOf(result)) + \"%\");\n\t}", "public double getCpuTimeSec() {\n\treturn getCpuTime() / Math.pow(10, 9);\t\t\n}", "public static double calculateValueInPercentage(double value) {\r\n return value * 0.01;\r\n }", "@DISPID(70)\r\n\t// = 0x46. The runtime will prefer the VTID if present\r\n\t@VTID(68)\r\n\tint averageCPUTime_Seconds();", "public float loadsPerGame() {\n if (totalGames() == 0) return 0;\n float res = (float) loads / (float) (totalGames());\n return Math.round(res * 10) / 10f;\n }", "double greenPercentage();", "public double getUnitsPerPercent()\n {\n return unitsPerPercent;\n }", "private float calculateTip( float amount, int percent, int totalPeople ) {\n\t\tfloat result = (float) ((amount * (percent / 100.0 )) / totalPeople);\n\t\treturn result;\n\t}", "public int getProgressPercentage(long currentDuration, long totalDuration){\n\t\tDouble percentage = (double) 0;\n\t\t\n\t\tlong currentSeconds = (int) (currentDuration / 1000);\n\t\tlong totalSeconds = (int) (totalDuration / 1000);\n\t\t\n\t\t// calculating percentage\n\t\tpercentage =(((double)currentSeconds)/totalSeconds)*100;\n\t\t\n\t\t// return percentage\n\t\treturn percentage.intValue();\n\t}", "public double measurePowerUsage(String packageNameString, HashMap<String, Long> appCpuTimeBefor, long r_time) {\n //targetAppTime: CPU Running time of app, totalTime: Total CPU Running time\n HashMap<String, Long> appCpuTimeAfter = new HashMap<String, Long>();\n appCpuTimeAfter = getAppCpuTime(packageNameString);\n\n double targetAppTimeAfter = appCpuTimeAfter.get(\"targetAppTime\");\n double targetAppTimeBefor = appCpuTimeBefor.get(\"targetAppTime\");\n Log.i(TAG, \"appCpuTimeAfter \" + targetAppTimeAfter);\n Log.i(TAG, \"appCpuTimeBefor \" + targetAppTimeBefor);\n\n double totalTimeAfter = appCpuTimeAfter.get(\"totalTime\");\n double totalTimeBefor = appCpuTimeBefor.get(\"totalTime\");\n Log.i(TAG, \"totalTimeAfter \" + totalTimeAfter);\n Log.i(TAG, \"totalTimeBefor \" + totalTimeBefor);\n\n double ratio = (targetAppTimeAfter - targetAppTimeBefor + r_time ) / (totalTimeAfter - totalTimeBefor + r_time);\n Log.i(TAG, \"ratio \" + ratio);\n double[] currentSteps = getCurrentSteps();\n\n Log.i(TAG, \"currentSteps.length \" + currentSteps.length);\n\n\n return ratio; //second to hour\n }", "public static double indexScanCpuMultiplier(IndexType type) {\n if (type == IndexType.HASH) {\n return INDEX_SCAN_CPU_MULTIPLIER_HASH;\n } else {\n assert type == IndexType.SORTED;\n\n return INDEX_SCAN_CPU_MULTIPLIER_SORTED;\n }\n }", "public int getOverallProgressPercent() {\n return overallProgressPercent;\n }", "public void allocationPct(float d) {\n float incr = 1.0f/(MAX_ALLOCATION_TICKS+1);\n float sum = 0;\n for (int i=0;i<MAX_ALLOCATION_TICKS+1;i++) {\n sum += incr;\n if (d <= sum) {\n allocation(i);\n return;\n }\n }\n allocation(MAX_ALLOCATION_TICKS);\n }", "public static String getCurCpuFreq() {\n String result = \"N/A\";\n try {\n FileReader fr = new FileReader(PATH_CUR);\n BufferedReader br = new BufferedReader(fr);\n String text = br.readLine();\n result = text.trim();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return result;\n }", "private double calculatePercentTime(Date startDate, Date endDate) {\r\n log.debug(\"calculatePercentTime.START\");\r\n Date currentDate = new Date();\r\n double percentTime = ((double) currentDate.getTime() - (double) startDate.getTime())\r\n / ((double) endDate.getTime() - (double) startDate.getTime()) * 100;\r\n\r\n return Math.round(percentTime * 100.0) / 100.0;\r\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tmCpuinfo = ShellHelper.getProc(CPU_INFO_PROC);\n\t\t\t\tupdateCpuStats();\n\t\t\t\tfor (LogicalCpu c : mLogicalCpus) {\n\t\t\t\t\tc.updateFrequency();\n\t\t\t\t\tc.updateGovernor();\n\t\t\t\t\tc.updateTimeInFrequency();\n\t\t\t\t\tc.updateTotalTransitions();\n\t\t\t\t}\n\t\t\t}", "public float getPercentage(int n, int total) {\n\n float proportion = ((float) n) / ((float) total);\n\n return proportion * 100;\n }", "public abstract double getPercentDead();", "public int getPercentage() {\r\n return Percentage;\r\n }", "float getBonusPercentHP();", "public BigDecimal getPercentageProfitPStd();", "public Long getCpu() {\n return this.Cpu;\n }", "public int getPercentageComplete() {\n\t\tlong rawPercentage = (100*(System.currentTimeMillis() - startingTime))/(duration);\n\t\treturn rawPercentage >= 100 ? 100 : (int) rawPercentage;\n\t}", "public String percentCompleteCountQATasks() {\n\t\tint fixed = closedQATasks().count();\n\t\tint total = qaTasks().count();\n\t\t\n return percentCompleteStringFromDouble(((double)fixed/(double)total) * 100);\n\t}", "public double[] proportionPercentage(){\n if(!this.pcaDone)this.pca();\n return this.proportionPercentage;\n }", "double redPercentage();", "public double getPercent() { return this.percentage; }", "com.google.protobuf.ByteString\n getPercentageBytes();", "public static int getSpeedCpuSO() {\n int retorno = 0;\n\n //Try necessário para os casos onde as DLLs não estão presentes.\n try {\n Sigar.load();\n retorno = new Sigar().getCpuInfoList()[0].getMhz();\n\n } catch (SigarException e) {\n CSPLog.error(\"problema ao coletar informacoes da maquina\");\n CSPException.register(e);\n }\n\n return retorno;\n }", "public int getQuality()\n {\n int sleeplatencyScore = getSleepLatencyScore();\n int sleepDurationScore = getSleepDurationScore();\n int sleepEfficiencyScore= getSleepEfficiencyScore();\n int sleepDeepsleepRatioScore = getDeepSleepRatioScore();\n int nightTimeWakeScore = getNightTimeAwakeningScore();\n int sum = sleeplatencyScore + sleepDurationScore+ sleepEfficiencyScore+ sleepDeepsleepRatioScore+ nightTimeWakeScore;\n sum = sum *4;\n return sum;\n }", "public void calculateDiskUsage() {\n\t\tdiskUsage = 0;\n\t\t// FIXME the speed of this can be improved by using a static map of content/ncc doc sizes \n\t\tfor (FilesetFile fsf : allFiles) {\n\t\t\tdiskUsage += fsf.getFile().length();\n\t\t}\t\t\n\t}", "public void setTotalNumCpus (double totalNumCpus) \n\t{ \n\t\tfinal Set<Resource> res = n.getResources(RESOURCETYPE_CPU);\n\t\tif (res.size() > 1) throw new Net2PlanException (\"Format error\");\n\t\tif (res.isEmpty()) \n\t\t\tn.getNetPlan().addResource(RESOURCETYPE_CPU, RESOURCETYPE_CPU, Optional.of(n), totalNumCpus, RESOURCETYPE_CPU, new HashMap<> (), 0.0, null);\n\t\telse \n\t\t\tres.iterator().next().setCapacity(totalNumCpus, new HashMap<> ());\n\t}", "@DISPID(23)\r\n\t// = 0x17. The runtime will prefer the VTID if present\r\n\t@VTID(25)\r\n\tjava.lang.String averageCPUTime();", "private static void computePercentage(int numberOfA[], int numberOfB[], int percentageOfB[]) {\n\t\tfor ( int i = 0; i < percentageOfB.length; i++ )\n\t\t\tpercentageOfB[i] = (int) Math.round( numberOfB[i] * 100.0 / ( numberOfB[i] + numberOfA[i] ));\n\t}", "private void percent()\n\t{\n\t\tDouble percent;\t\t//holds the right value percentage of the left value\n\t\tString newText = \"\";//Holds the updated text \n\t\tif(calc.getLeftValue ( ) != 0.0 && Fun != null)\n\t\t{\n\t\t\tsetRightValue();\n\t\t\tpercent = calc.getRightValue() * 0.01 * calc.getLeftValue();\n\t\t\tleftValue = calc.getLeftValue();\n\t\t\tnewText += leftValue;\n\t\t\tswitch (Fun)\n\t\t\t{\n\t\t\t\tcase ADD:\n\t\t\t\t\tnewText += \" + \";\n\t\t\t\t\tbreak;\n\t\t\t\tcase SUBTRACT:\n\t\t\t\t\tnewText += \" - \";\n\t\t\t\t\tbreak;\n\t\t\t\tcase DIVIDE:\n\t\t\t\t\tnewText += \" / \";\n\t\t\t\t\tbreak;\n\t\t\t\tcase MULTIPLY:\n\t\t\t\t\tnewText += \" * \";\n\t\t\t\t\tbreak;\n\t\t\t}//end switch\n\t\t\t\n\t\t\tnewText += \" \" + percent;\n\t\t\tentry.setText(newText);\n\t\t\t\n\t\t}//end if\n\t\t\n\t}", "public int getCurrentMemoryFailoverResourcesPercent() {\r\n return currentMemoryFailoverResourcesPercent;\r\n }", "@SuppressWarnings(\"deprecation\")\n private void updateResourceCounters() {\n updateHeapUsageCounter();\n\n // Updating resources specified in ResourceCalculatorProcessTree\n if (pTree == null) {\n return;\n }\n pTree.updateProcessTree();\n long cpuTime = pTree.getCumulativeCpuTime();\n long pMem = pTree.getCumulativeRssmem();\n long vMem = pTree.getCumulativeVmem();\n // Remove the CPU time consumed previously by JVM reuse\n cpuTime -= initCpuCumulativeTime;\n PSAgentContext.get().getMetrics().put(AngelCounter.CPU_MILLISECONDS, Long.toString(cpuTime));\n PSAgentContext.get().getMetrics().put(AngelCounter.PHYSICAL_MEMORY_BYTES, Long.toString(pMem));\n PSAgentContext.get().getMetrics().put(AngelCounter.VIRTUAL_MEMORY_BYTES, Long.toString(vMem));\n }", "public void setOverallProgressPercent(int value) {\n this.overallProgressPercent = value;\n }" ]
[ "0.7598686", "0.74416834", "0.72927433", "0.6856065", "0.6766564", "0.6734719", "0.66205364", "0.66040945", "0.63712925", "0.636135", "0.63491875", "0.62717617", "0.62482095", "0.6232475", "0.6190597", "0.61857873", "0.6150177", "0.6135741", "0.61112595", "0.6106031", "0.6090261", "0.60594", "0.6052732", "0.6038065", "0.60197985", "0.60086656", "0.5988804", "0.5988218", "0.59789246", "0.59584224", "0.5933349", "0.5924467", "0.59241384", "0.591736", "0.59147", "0.5906896", "0.5901294", "0.5883955", "0.5879694", "0.58775", "0.5873164", "0.5863779", "0.5844252", "0.5820748", "0.57792336", "0.57690865", "0.5727914", "0.57163", "0.57039326", "0.5689807", "0.5670732", "0.56609464", "0.5659948", "0.5651174", "0.56479", "0.5642877", "0.56094456", "0.560305", "0.56000197", "0.55966794", "0.5592728", "0.55864906", "0.5585751", "0.5582109", "0.55745614", "0.5553545", "0.5521763", "0.5487086", "0.54574704", "0.54545766", "0.5438028", "0.5426826", "0.54256535", "0.5424509", "0.5402615", "0.54002094", "0.53939027", "0.5390998", "0.53854287", "0.53805155", "0.5367797", "0.53643554", "0.5352017", "0.534231", "0.53403294", "0.5334982", "0.5326666", "0.5325427", "0.5324215", "0.53210026", "0.53180754", "0.531674", "0.5315478", "0.5288437", "0.5285438", "0.52719843", "0.52704334", "0.5256982", "0.5255748", "0.52533317" ]
0.7412894
2
read RSA private key from keystore
public static void main(String[] args) throws Exception { final String fileName = "src/main/resources/keystore.jks"; final char[] storePass = "storepass".toCharArray(); final String alias = "foo-client"; final char[] keyPass = storePass; final KeyStore store = KeyStore.getInstance("JKS"); final InputStream input = Files.newInputStream(Paths.get(fileName)); store.load(input, storePass); final Certificate certificate = store.getCertificate(alias); // final java.security.interfaces.RSAKey key = (java.security.interfaces.RSAKey) store.getKey(alias, keyPass); // convert to nimbus key final RSAKey nimbusRsaKey = new RSAKey.Builder((RSAPublicKey) certificate.getPublicKey()).build(); // build the JWS header final JWSHeader jwsHeader = new JWSHeader.Builder(JWSAlgorithm.RS256) .keyID("-RtrYV6X0U5WkXBGjbXDlb2APg8vkWY_hhFjQey3mrY") .build(); // build the JWS payload final Map<String, Object> claims = new HashMap<>(); claims.put("username", "admin"); final String client_id = "45d8d6b6-de7c-449f-b7f7-b4e05ced432d"; claims.put("iss", client_id); claims.put("sub", client_id); claims.put("aud", "https://api.fusionfabric.cloud/login/v1"); claims.put("exp", System.currentTimeMillis() / 1000 + TimeUnit.HOURS.toSeconds(1)); claims.put("jti", UUID.randomUUID().toString()); // create signer from private key final JWSSigner signer = new RSASSASigner(nimbusRsaKey.toRSAKey()); // signe the JWS final JWSObject jwsObject = new JWSObject(jwsHeader, new Payload(claims)); jwsObject.sign(signer); System.out.println(jwsObject.serialize()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "PrivateKey getPrivateKey();", "public String getPrivateKey();", "public String getPrivateKey();", "private static RSAPrivateKey getPrivateKey() throws GeneralSecurityException {\n String privateKeyPath = getPrivateKeyPath();\n String keyStorePath = getKeyStorePath();\n String keyStorePrivateKeyAlias = getKeyStoreAlias();\n if (privateKeyPath != null) {\n File privateKeyFile = new File(privateKeyPath);\n if (privateKeyFile.isFile()) {\n //load privateKey from file\n return loadPrivateKeyFromFile(privateKeyPath, passphrase);\n } else {\n throw new IllegalArgumentException(\n \"The specified privateKey path '\" + privateKeyPath + \"' is invalid\");\n }\n } else if (keyStorePath != null && keyStorePrivateKeyAlias != null) {\n return new KeyStoreManager()\n .getKeyStorePrivateKey(keyStorePath, getKeyStorePassword(), keyStorePrivateKeyAlias);\n } else {\n throw new IllegalArgumentException(\n \"Could not load the privateKey for authentication. Please check the privateKey parameters in your input.\");\n }\n }", "private static void readPrivateKeyFromPKCS11() throws KeyStoreException {\n String configFileName = jarPath + \"pkcs11.cfg\";\r\n\r\n Provider p = null;\r\n try {\r\n p = new SunPKCS11(configFileName);\r\n Security.addProvider(p);\r\n } catch (ProviderException e) {\r\n LanzaError( \"no es correcto el fichero de configuración de la tarjeta\" );\r\n }\r\n \r\n KeyStore ks = null;\r\n try {\r\n ks = KeyStore.getInstance(\"pkcs11\", p);\r\n ks.load(null, clave );\r\n } catch (NoSuchAlgorithmException e) {\r\n LanzaError( \"leyendo la tarjeta (n.1)\" );\r\n } catch (CertificateException e) {\r\n LanzaError( \"leyendo la tarjeta (n.2)\" );\r\n } catch (IOException e) {\r\n LanzaError( \"leyendo la tarjeta (n.3)\" );\r\n }\r\n\r\n String alias = \"\";\r\n try {\r\n alias = (String) ks.aliases().nextElement();\r\n privateKey = (PrivateKey) ks.getKey(alias, clave);\r\n } catch (NoSuchElementException e) {\r\n LanzaError( \"leyendo la clave de la tarjeta (n.1)\" );\r\n } catch (NoSuchAlgorithmException e) {\r\n LanzaError( \"leyendo la clave de la tarjeta (n.2)\" );\r\n } catch (UnrecoverableKeyException e) {\r\n LanzaError( \"leyendo la clave de la tarjeta (n.3)\" );\r\n }\r\n certificateChain = ks.getCertificateChain(alias);\r\n }", "public PrivateKey getKey();", "private synchronized PrivateKey getPrivateKey() throws Exception {\n if (privateKey == null) {\n KeyStore keyStore = loadKeyStore();\n privateKey = (PrivateKey)keyStore.getKey(aliasName, password.toCharArray());\n }\n\t\treturn privateKey;\n\t}", "@Override\n public byte[] getRSAKeyById(String id) throws IOException, DecoderException {\n // TODO: bring that back after LocalEGA key server becomes able to register itself against Eureka\n // ResponseEntity<Resource> responseEntity =\n // restTemplate.getForEntity(keyServiceURL + \"/temp/rsa/\" + id, Resource.class);\n\n String rawKey = IOUtils.toString(new URL(keyServiceURL + \"/temp/rsa/\" + id).openStream(), Charset.defaultCharset());\n System.out.println(\"DEBUG getRSAKey: rawKey=\" + rawKey);\n String privateKey = String.valueOf(rawKey);\n byte[] privateKeyBytes = Hex.decodeHex(privateKey.toCharArray());\n try (PemReader pemReader = new PemReader(new InputStreamReader(new ByteArrayInputStream(privateKeyBytes)))) {\n return pemReader.readPemObject().getContent();\n }\n }", "public void readPrivateKey(String filename) {\n FileHandler fh = new FileHandler();\n Map<String, BigInteger> skMap= fh.getKeyFromFile(filename);\n this.n = skMap.get(\"n\");\n this.d = skMap.get(\"key\");\n }", "@Nullable\n private synchronized KeyPair readKeyPair() throws GeneralSecurityException, IOException {\n final String methodTag = TAG + \":readKeyPair\";\n\n Logger.v(methodTag, \"Reading Key entry\");\n try {\n final KeyStore keyStore = KeyStore.getInstance(ANDROID_KEY_STORE);\n keyStore.load(null);\n\n final Certificate cert = keyStore.getCertificate(KEY_STORE_CERT_ALIAS);\n final Key privateKey = keyStore.getKey(KEY_STORE_CERT_ALIAS, null);\n\n if (cert == null || privateKey == null) {\n Logger.v(methodTag, \"Key entry doesn't exist.\");\n return null;\n }\n\n return new KeyPair(cert.getPublicKey(), (PrivateKey) privateKey);\n } catch (final RuntimeException e) {\n // There is an issue in android keystore that resets keystore\n // Issue 61989: AndroidKeyStore deleted after changing screen lock type\n // https://code.google.com/p/android/issues/detail?id=61989\n // in this case getEntry throws\n // java.lang.RuntimeException: error:0D07207B:asn1 encoding routines:ASN1_get_object:header too long\n // handle it as regular KeyStoreException\n throw new KeyStoreException(e);\n }\n }", "public final RSAPrivateKey getRSAPrivateKey() {\n return (RSAPrivateKey) encryptedRSAKeyPair.getRSAKeyPair().getPrivate();\n }", "private KeyPair getPrivateKeyPair() throws IOException {\n final PEMParser pemParser = new PEMParser(new StringReader(sshKey));\n final PEMKeyPair keypair = (PEMKeyPair) pemParser.readObject();\n final JcaPEMKeyConverter converter = new JcaPEMKeyConverter();\n return new KeyPair(\n converter.getPublicKey(SubjectPublicKeyInfo.getInstance(keypair.getPublicKeyInfo())),\n converter.getPrivateKey(keypair.getPrivateKeyInfo()));\n }", "public PrivateKey readPrivateKeyFromFile(String fileName)throws IOException {\n FileInputStream fis = null;\n ObjectInputStream ois = null;\n try{\n fis = new FileInputStream(new File(fileName));\n ois = new ObjectInputStream(fis);\n BigInteger modulus = (BigInteger) ois.readObject();\n BigInteger Exponent = (BigInteger) ois.readObject();\n \n RSAPrivateKeySpec rsaPrivateKeySpec = new RSAPrivateKeySpec(modulus, Exponent);\n KeyFactory fact = KeyFactory.getInstance(\"RSA\");\n PrivateKey privateKey = fact.generatePrivate(rsaPrivateKeySpec);\n return privateKey;\n }\n catch(ClassNotFoundException | NoSuchAlgorithmException | InvalidKeySpecException e){\n e.printStackTrace();\n }\n finally{\n if(ois != null){\n ois.close();\n if(fis != null){\n fis.close();\n }\n }\n }\n return null;\n \n }", "@Override\n\tpublic PrivateKey readPrivateKey(String file, String alias, String password) {\n\t\tKeyStore ks;\n\t\ttry {\n\t\t\tks = KeyStore.getInstance(\"JKS\", \"SUN\");\n\t\t\tBufferedInputStream in = new BufferedInputStream(new FileInputStream(file));\n\t\t\tks.load(in, password.toCharArray());\n\n\t\t\tif (ks.isKeyEntry(alias)) {\n\t\t\t\tPrivateKey pk = (PrivateKey) ks.getKey(alias, password.toCharArray());\n\t\t\t\treturn pk;\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} catch (KeyStoreException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (NoSuchProviderException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (CertificateException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (UnrecoverableKeyException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\n\t}", "public PrivateKey getPrivateKey(){\n\t\treturn this.privatekey;\n\t}", "public static PrivateKey loadPrivateKey(String path, String alias, String storepassword) {\n\n PrivateKey privateKey = null;\n try {\n KeyStore keyStore = KeyStore.getInstance(\"JKS\");\n keyStore.load(new FileInputStream(path), storepassword.toCharArray());\n KeyStore.PrivateKeyEntry prvKeyEntry = (KeyStore.PrivateKeyEntry) keyStore.getEntry(alias, new KeyStore.PasswordProtection(storepassword.toCharArray()));\n privateKey = prvKeyEntry.getPrivateKey();\n } catch (Exception e) {\n Logger.error(\"Error loading private key\");\n } finally {\n return privateKey;\n }\n }", "protected abstract InputStream openPrivateKeyStream(String id)\n throws FileNotFoundException, KeyStorageException, IOException;", "OpenSSLKey mo134201a();", "public static PrivateKey getPrivateKey(String privKey) {\n try {\n PemReader pemReader = new PemReader(new StringReader(privKey));\n byte[] content = pemReader.readPemObject().getContent();\n PKCS8EncodedKeySpec spec = new PKCS8EncodedKeySpec(content);\n KeyFactory kf = KeyFactory.getInstance(\"RSA\");\n return kf.generatePrivate(spec);\n } catch (IOException | NoSuchAlgorithmException | InvalidKeySpecException ex) {\n return null;\n }\n }", "private PrivateKey getMyPrivateKey() throws Exception {\n\n\t\tKey myKeyPair = null;\n\t\ttry {\n\t\t\tmyKeyPair = keyStore.getKey(keyPairAlias, keyPairPassword.toCharArray());\n\t\t} catch (UnrecoverableKeyException | KeyStoreException | NoSuchAlgorithmException e) {\n\t\t\twriteToLog(\"The key: \\\"\" + keyPairAlias + \"\\\" cannot be recovered.\");\n\t\t\tLogWriter.close();\n\t\t\tthrow new Exception(\"The key: \\\"\" + keyPairAlias + \"\\\" cannot be recovered.\", e);\n\t\t}\n\n\t\tPrivateKey myPrivateKey;\n\t\tif (myKeyPair instanceof PrivateKey) {\n\t\t\tmyPrivateKey = (PrivateKey) myKeyPair;\n\t\t} else {\n\t\t\twriteToLog(\"The key: \" + keyPairAlias + \" is not a private-key\");\n\t\t\tLogWriter.close();\n\t\t\tthrow new Exception(\"The key: \" + keyPairAlias + \" is not a private-key\");\n\t\t}\n\t\treturn myPrivateKey;\n\t}", "public PrivateKey getPrivateKey(String file) throws IOException, NoSuchAlgorithmException, InvalidKeySpecException{\n byte[] keyBytes = Files.readAllBytes(new File(file).toPath());\n PKCS8EncodedKeySpec spec = new PKCS8EncodedKeySpec(keyBytes);\n KeyFactory keyFactory = KeyFactory.getInstance(\"RSA\");\n return keyFactory.generatePrivate(spec);\n }", "public PrivateKey readPrivateKeyFromPem(File file) {\n FileReader reader = null;\n PEMParser parser = null;\n try {\n reader = new FileReader(file);\n parser = new PEMParser(reader);\n PrivateKeyInfo keyInfo = (PrivateKeyInfo) parser.readObject();\n return new JcaPEMKeyConverter().getPrivateKey(keyInfo);\n } catch (RuntimeException | IOException e) {\n throw new RuntimeException(\"Failed to load private key from [\"+file+\"]\", e);\n } finally {\n \tCloseablesExt.closeQuietly(parser);\n \tCloseablesExt.closeQuietly(reader);\n }\n }", "public PrivateKey getMyPrivateKey() {\n return myKeyPair.getPrivate();\n }", "public String getKeyPrivate() throws LibMCryptException {\n\t\t\r\n\t\tString privateK = priK.getModulus().toString(16);\r\n\t\treturn privateK;\r\n\t}", "public PrivateKey getPrivateKey() {\n File keyFile = new File(baseDirectory, pvtKeyFileName);\n if (!keyFile.exists()) {\n if (!generateKeys()) {\n return null;\n }\n }\n if (!keyFile.exists()) {\n return null;\n }\n try {\n byte[] bytes = FileUtils.readFileToByteArray(keyFile);\n PKCS8EncodedKeySpec ks = new PKCS8EncodedKeySpec(bytes);\n KeyFactory kf = KeyFactory.getInstance(\"RSA\");\n PrivateKey pvt = kf.generatePrivate(ks);\n return pvt;\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "private static PrivateKey getPrivateKey(String keyStr)\n throws Exception\n {\n return KeyFactory.getInstance(RSA).generatePrivate(new PKCS8EncodedKeySpec(Base64.decode(keyStr)));\n }", "public PrivateKey getPrivateKey(String alias) {\n if (alias != null)\n\t\t System.out.println(\"==KeyManager. Get private key for \" + alias);\n\t\tPrivateKey pk = myKeyManager.getPrivateKey(alias);\n\t\treturn pk;\n\t}", "java.lang.String getPubkey();", "public static RSAPrivateKey getPrivateKeyFromPem (String pem)\n throws NoSuchAlgorithmException, InvalidKeySpecException {\n KeyFactory kf = KeyFactory.getInstance(\"RSA\");\n PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(parseDERfromPEM(pem.getBytes()));\n return (RSAPrivateKey) kf.generatePrivate(keySpec);\n }", "public byte[] decrypt(PrivateKey privateKey){\n SecretKey symmetricKey = null;\n try {\n Cipher symmetricKeyDecryption = Cipher.getInstance(\"RSA\");\n symmetricKeyDecryption.init(Cipher.DECRYPT_MODE, privateKey);\n symmetricKey = new SecretKeySpec(symmetricKeyDecryption.doFinal(getEncryptedSymmetricKey()), getSymmetricEncryption().getEncryptionAlgorithm());\n } catch (NoSuchAlgorithmException | NoSuchPaddingException | InvalidKeyException | IllegalBlockSizeException | BadPaddingException e) {\n e.printStackTrace();\n }\n\n // decrypt license with symmetric encryption\n return getSymmetricEncryption().decrypt(symmetricKey);\n /*\n License license = null;\n try {\n ObjectInputStream objectInputStream = new ObjectInputStream(new ByteArrayInputStream(licenseBytes));\n license = (License) objectInputStream.readObject();\n objectInputStream.close();\n } catch (IOException | ClassNotFoundException e) {\n e.printStackTrace();\n }\n return license;\n */\n }", "@Accessor(qualifier = \"privateKey\", type = Accessor.Type.GETTER)\n\tpublic String getPrivateKey()\n\t{\n\t\treturn getPersistenceContext().getPropertyValue(PRIVATEKEY);\n\t}", "public BigInteger getPrivateKey()\n {\n\treturn privateKey;\n }", "public void RSAyoyo() throws NoSuchAlgorithmException, GeneralSecurityException, IOException {\r\n\r\n KeyPairGenerator kPairGen = KeyPairGenerator.getInstance(\"RSA\");\r\n kPairGen.initialize(2048);\r\n KeyPair kPair = kPairGen.genKeyPair();\r\n publicKey = kPair.getPublic();\r\n System.out.println(publicKey);\r\n privateKey = kPair.getPrivate();\r\n\r\n KeyFactory fact = KeyFactory.getInstance(\"RSA\");\r\n RSAPublicKeySpec pub = fact.getKeySpec(kPair.getPublic(), RSAPublicKeySpec.class);\r\n RSAPrivateKeySpec priv = fact.getKeySpec(kPair.getPrivate(), RSAPrivateKeySpec.class);\r\n serializeToFile(\"public.key\", pub.getModulus(), pub.getPublicExponent()); \t\t\t\t// this will give public key file\r\n serializeToFile(\"private.key\", priv.getModulus(), priv.getPrivateExponent());\t\t\t// this will give private key file\r\n\r\n \r\n }", "public PrivateKey getPrivateKey() {\n \tif(testingPrivateKey!=null){\n\t\t\t//for unit testing\n\t\t\treturn testingPrivateKey;\t\n\t\t}\n\t\treturn keypair.getPrivate();\n }", "public java.security.PrivateKey getPrivateKey() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: java.security.Signer.getPrivateKey():java.security.PrivateKey, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: java.security.Signer.getPrivateKey():java.security.PrivateKey\");\n }", "public void loadKey(File in, File privateKeyFile) throws GeneralSecurityException, IOException {\n\t byte[] encodedKey = new byte[(int)privateKeyFile.length()];\n\t FileInputStream is = new FileInputStream(privateKeyFile);\n\t is.read(encodedKey);\n\t \n\t // create private key\n\t PKCS8EncodedKeySpec privateKeySpec = new PKCS8EncodedKeySpec(encodedKey);\n\t KeyFactory kf = KeyFactory.getInstance(\"RSA\");\n\t PrivateKey pk = kf.generatePrivate(privateKeySpec);\n\t \n\t // read AES key\n\t pkCipher.init(Cipher.DECRYPT_MODE, pk);\n\t aesKey = new byte[256/8];\n\t CipherInputStream cis = new CipherInputStream(new FileInputStream(in), pkCipher);\n\t cis.read(aesKey);\n\t aesKeySpec = new SecretKeySpec(aesKey, \"AES\");\n\t cis.close();\n\t is.close();\n\t }", "private PrivateKey getUserKey() throws KeyChainException, InterruptedException {\n return KeyChain.getPrivateKey(getApplicationContext(), mCurrentProfile.getUserCertificateAlias());\n\n }", "@VisibleForTesting\n KeyStore.PrivateKeyEntry getRSAKeyEntry() throws CryptoException, IncompatibleDeviceException {\n try {\n KeyStore keyStore = KeyStore.getInstance(ANDROID_KEY_STORE);\n keyStore.load(null);\n if (keyStore.containsAlias(OLD_KEY_ALIAS)) {\n //Return existing key. On weird cases, the alias would be present but the key not\n KeyStore.PrivateKeyEntry existingKey = getKeyEntryCompat(keyStore, OLD_KEY_ALIAS);\n if (existingKey != null) {\n return existingKey;\n }\n } else if (keyStore.containsAlias(KEY_ALIAS)) {\n KeyStore.PrivateKeyEntry existingKey = getKeyEntryCompat(keyStore, KEY_ALIAS);\n if (existingKey != null) {\n return existingKey;\n }\n }\n\n Calendar start = Calendar.getInstance();\n Calendar end = Calendar.getInstance();\n end.add(Calendar.YEAR, 25);\n AlgorithmParameterSpec spec;\n X500Principal principal = new X500Principal(\"CN=Auth0.Android,O=Auth0\");\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n spec = new KeyGenParameterSpec.Builder(KEY_ALIAS, KeyProperties.PURPOSE_DECRYPT | KeyProperties.PURPOSE_ENCRYPT)\n .setCertificateSubject(principal)\n .setCertificateSerialNumber(BigInteger.ONE)\n .setCertificateNotBefore(start.getTime())\n .setCertificateNotAfter(end.getTime())\n .setKeySize(RSA_KEY_SIZE)\n .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_RSA_PKCS1)\n .setBlockModes(KeyProperties.BLOCK_MODE_ECB)\n .build();\n } else {\n //Following code is for API 18-22\n //Generate new RSA KeyPair and save it on the KeyStore\n KeyPairGeneratorSpec.Builder specBuilder = new KeyPairGeneratorSpec.Builder(context)\n .setAlias(KEY_ALIAS)\n .setSubject(principal)\n .setKeySize(RSA_KEY_SIZE)\n .setSerialNumber(BigInteger.ONE)\n .setStartDate(start.getTime())\n .setEndDate(end.getTime());\n\n KeyguardManager kManager = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE);\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {\n //The next call can return null when the LockScreen is not configured\n Intent authIntent = kManager.createConfirmDeviceCredentialIntent(null, null);\n boolean keyguardEnabled = kManager.isKeyguardSecure() && authIntent != null;\n if (keyguardEnabled) {\n //If a ScreenLock is setup, protect this key pair.\n specBuilder.setEncryptionRequired();\n }\n }\n spec = specBuilder.build();\n }\n\n KeyPairGenerator generator = KeyPairGenerator.getInstance(ALGORITHM_RSA, ANDROID_KEY_STORE);\n generator.initialize(spec);\n generator.generateKeyPair();\n\n return getKeyEntryCompat(keyStore, KEY_ALIAS);\n } catch (CertificateException | InvalidAlgorithmParameterException | NoSuchProviderException | NoSuchAlgorithmException | KeyStoreException | ProviderException e) {\n /*\n * This exceptions are safe to be ignored:\n *\n * - CertificateException:\n * Thrown when certificate has expired (25 years..) or couldn't be loaded\n * - KeyStoreException:\n * - NoSuchProviderException:\n * Thrown when \"AndroidKeyStore\" is not available. Was introduced on API 18.\n * - NoSuchAlgorithmException:\n * Thrown when \"RSA\" algorithm is not available. Was introduced on API 18.\n * - InvalidAlgorithmParameterException:\n * Thrown if Key Size is other than 512, 768, 1024, 2048, 3072, 4096\n * or if Padding is other than RSA/ECB/PKCS1Padding, introduced on API 18\n * or if Block Mode is other than ECB\n * - ProviderException:\n * Thrown on some modified devices when KeyPairGenerator#generateKeyPair is called.\n * See: https://www.bountysource.com/issues/45527093-keystore-issues\n *\n * However if any of this exceptions happens to be thrown (OEMs often change their Android distribution source code),\n * all the checks performed in this class wouldn't matter and the device would not be compatible at all with it.\n *\n * Read more in https://developer.android.com/training/articles/keystore#SupportedAlgorithms\n */\n Log.e(TAG, \"The device can't generate a new RSA Key pair.\", e);\n throw new IncompatibleDeviceException(e);\n } catch (IOException | UnrecoverableEntryException e) {\n /*\n * Any of this exceptions mean the old key pair is somehow corrupted.\n * We can delete both the RSA and the AES keys and let the user retry the operation.\n *\n * - IOException:\n * Thrown when there is an I/O or format problem with the keystore data.\n * - UnrecoverableEntryException:\n * Thrown when the key cannot be recovered. Probably because it was invalidated by a Lock Screen change.\n */\n deleteRSAKeys();\n deleteAESKeys();\n throw new CryptoException(\"The existing RSA key pair could not be recovered and has been deleted. \" +\n \"This occasionally happens when the Lock Screen settings are changed. You can safely retry this operation.\", e);\n }\n }", "public Key getPrivateKey(String alias, String password) throws CryptoException {\n\t\ttry {\n\t\t\tKey key = keystore.getKey(alias, (password != null ? password.toCharArray() : null));\n\t\t\tif(key instanceof PrivateKey) {\n\t\t\t\treturn key;\n\t\t\t}\t\t\t\n\t\t} catch (UnrecoverableKeyException e) {\n\t\t\tlogger.error(\"error recovering key for alias '\" + alias + \"' from the keystore\", e);\n\t\t\tthrow new CryptoException(\"error recovering key for alias '\" + alias + \"' from the keystore\", e);\t\t\t\n\t\t} catch (KeyStoreException e) {\n\t\t\tlogger.error(\"error accessing the keystore\", e);\n\t\t\tthrow new CryptoException(\"error accessing the keystore\", e);\t\t\t\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\tlogger.error(\"invalid algorithm specified in keystore access\", e);\n\t\t\tthrow new CryptoException(\"invalid algorithm specified in keystore access\", e);\n\t\t}\n\t\treturn null;\n\t}", "public String getPrivateKey() {\n return privateKey;\n }", "public String getPrivateKey() {\n return privateKey;\n }", "public String getPrivateKey() {\n return privateKey;\n }", "private static PrivateKey extractPrivateKey(String privateKeyAlias, String privateKeyPass, KeyStore ks)\n\t\t\tthrows KeyStoreException, NoSuchAlgorithmException, UnrecoverableKeyException {\n\t\tPrivateKey privateKey = null;\n\n\t\t// Samsung cert has diferent alias\n\t\tjava.util.Enumeration<String> alias = ks.aliases();\n\t\twhile (alias.hasMoreElements()) {\n\t\t\tString recievedAliasEntry = alias.nextElement();\n\t\t\tif (ks.isKeyEntry(recievedAliasEntry)) {\n\t\t\t\tprivateKeyAlias = recievedAliasEntry;\n\n\t\t\t\tprivateKey = (PrivateKey) ks.getKey(recievedAliasEntry, privateKeyPass.toCharArray());\n\t\t\t}\n\t\t}\n\n\t\t// get the private key for signing.\n\t\tprivateKey = (PrivateKey) ks.getKey(privateKeyAlias, privateKeyPass.toCharArray());\n\n\t\treturn privateKey;\n\t}", "public final PrivateKey getPrivateKey() {\n return this.key;\n }", "private void getKeyAndCerts(String filePath, String pw)\n throws GeneralSecurityException, IOException {\n System.out\n .println(\"reading signature key and certificates from file \" + filePath + \".\");\n\n FileInputStream fis = new FileInputStream(filePath);\n KeyStore store = KeyStore.getInstance(\"PKCS12\", \"IAIK\");\n store.load(fis, pw.toCharArray());\n\n Enumeration<String> aliases = store.aliases();\n String alias = (String) aliases.nextElement();\n privKey_ = (PrivateKey) store.getKey(alias, pw.toCharArray());\n certChain_ = Util.convertCertificateChain(store.getCertificateChain(alias));\n fis.close();\n }", "private void setPrivateKey(String b64key) {\n\t\ttry {\n\t\t\tbyte[] bytes = Base64.decodeBase64(b64key);\n\t\t\tPKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(bytes);\n\t\t\tKeyFactory fact = KeyFactory.getInstance(\"RSA\");\n\t\t\tpk = fact.generatePrivate(keySpec);\n\t\t} catch (NoSuchAlgorithmException | InvalidKeySpecException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public KeyStore.PrivateKeyEntry getPrivateKeyEntry() throws Exception {\n KeyStore.Entry entry = keyStore.getEntry(aliasName, null);\n if (!(entry instanceof KeyStore.PrivateKeyEntry)) {\n return null;\n }\n else {\n return ((KeyStore.PrivateKeyEntry) entry);\n }\n }", "public static PrivateKey getPrivateKey(File file) throws IOException, NoSuchAlgorithmException, InvalidKeySpecException {\n FileInputStream fis = new FileInputStream(file);\n DataInputStream dis = new DataInputStream(fis);\n byte[] keyBytes = new byte[(int) file.length()];\n dis.readFully(keyBytes);\n dis.close();\n PKCS8EncodedKeySpec spec = new PKCS8EncodedKeySpec(keyBytes);\n KeyFactory kf = KeyFactory.getInstance(\"RSA\");\n return kf.generatePrivate(spec);\n }", "public BigInteger getPrivKey() {\n if (priv == null)\n throw new MissingPrivateKeyException();\n return priv;\n }", "public PrivateKey getPrivateKey(String keyFilePath) throws Exception {\n\t\tFileInputStream fis = new FileInputStream(keyFilePath);\n\t\tbyte[] encodedKey = new byte[fis.available()];\n\t\tfis.read(encodedKey);\n\t\tfis.close();\n\t\tPKCS8EncodedKeySpec privateKeySpec = new PKCS8EncodedKeySpec(encodedKey);\n\t\tPrivateKey privateKey = keyFactory.generatePrivate(privateKeySpec);\n\t\treturn privateKey;\n\t}", "public PrivateKey getPrivKey() {\r\n\t\treturn this.privKey;\r\n\t}", "public char[] getPrivateKey() {\n\t\treturn privateKey;\n\t}", "@NonNull\n public PrivateKey getPrivateKey() {\n return mPrivateKey;\n }", "public KeyPair loadKeystoreKeyPair(String privateKeyAlias) throws ProviderException {\n try {\n return HwUniversalKeyStoreProvider.loadAndroidKeyStoreKeyPairFromKeystore(this.mKeyStore, privateKeyAlias, this.mEntryUid);\n } catch (UnrecoverableKeyException e) {\n throw new ProviderException(\"Failed to load generated key pair from keystore\", e);\n }\n }", "private void receiveKey() throws Exception {\n System.out.println(\"Receive Key\");\n DataInputStream dis = new DataInputStream(is);\n String keyBase64 = dis.readUTF();\n byte[] key = Util.convertBase64ToBytes(keyBase64);\n byte[] rc4key = Util.RSADecrypt(key, prikey);\n synchronized (GUITracker.onlinePeer) {\n GUITracker.RC4KeyByte = rc4key;\n }\n RC4Key = RC4.convertBytesToSecretKey(rc4key);\n encrypt = new RC4(RC4Key, RC4.ENCRYPT);\n decrypt = new RC4(RC4Key, RC4.DECRYPT);\n CipherInputStream cis = decrypt.getBindingInputStream(socket.getInputStream());\n CipherOutputStream cos = encrypt.getBindingOutputStream(socket.getOutputStream());\n is = cis;\n os = cos;\n System.out.println(\"Get symmetric key from: \" + addressPort);\n }", "public Key getPrivateKey(String alias) throws CryptoException {\n\t\treturn getPrivateKey(alias, null);\n\t}", "private static String RSAdecrypt(byte[] signedhash) {\n String ab = new String(signedhash);\n //private keys\n BigInteger e = new BigInteger(\"65537\");\n BigInteger n = new BigInteger(\"2688520255179015026237478731436571621031218154515572968727588377065598663770912513333018006654248650656250913110874836607777966867106290192618336660849980956399732967369976281500270286450313199586861977623503348237855579434471251977653662553\");\n BigInteger m = new BigInteger(ab);\n BigInteger dataHash = m.modPow(e, n);\n String ComputeddataHash = new String(dataHash.toByteArray());\n return ComputeddataHash;\n }", "private static PrivateKey getKeyStorePrivateKey(File keyStoreFile, String keyStorePwd) throws Exception{\n\t\tKeyStore ks = getLoadKeyStore(keyStoreFile, keyStorePwd);\n\t\tPrivateKey privateKey = null;\n\n\t\ttry {\n\t\t\tEnumeration<String> aliasEnum = ks.aliases();\n\t\t\twhile (aliasEnum.hasMoreElements()) {\n\t\t\t\tString alias = aliasEnum.nextElement();\n\t\t\t\tif (ks.isKeyEntry(alias)) {\n\t\t\t\t\tKey key = ks.getKey(alias, keyStorePwd.toCharArray());\n\t\t\t\t\tif (key instanceof PrivateKey) {\n\t\t\t\t\t\tprivateKey = (PrivateKey) key;\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} catch (Exception ex) {\n\t\t\tthrow new Exception(\"获取私钥[\" + keyStoreFile.getName() + \"]出现异常,口令[\" + keyStorePwd + \"],原因[\"+ ex.getMessage() + \"]\");\n\t\t}\n\t\treturn privateKey;\n\t}", "private static String getKey(String filename) throws IOException {\n\t\tString strKeyPEM = \"\";\n\t\tBufferedReader br = new BufferedReader(new FileReader(filename));\n\t\tString line;\n\t\twhile ((line = br.readLine()) != null) {\n\t\t\tstrKeyPEM += line;\n\t\t}\n\t\tbr.close();\n\t\treturn strKeyPEM;\n\t}", "public static String getPrivateKeyPath() {\n return privateKeyPath;\n }", "private static PrivateKey buildPrivateKeyFromString(String privateKeyAsString) throws IOException, NoSuchAlgorithmException, InvalidKeySpecException, KeyStoreException, CertificateException {\n String privateKeyStrWithoutHeaderFooter = privateKeyAsString.\n replaceAll(\"-----BEGIN PRIVATE KEY-----\", \"\").\n replaceAll(\"-----END PRIVATE KEY-----\", \"\").\n replaceAll(\"\\n\", \"\");\n byte[] privateKeyBytes =\n Base64.getDecoder().decode(privateKeyStrWithoutHeaderFooter.getBytes());\n PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(privateKeyBytes);\n KeyFactory fact = KeyFactory.getInstance(\"RSA\");\n return fact.generatePrivate(keySpec);\n }", "public static void main(String[] args) {\n KeyPairGenerator keygen = null;\n try {\n keygen = KeyPairGenerator.getInstance(\"RSA\");\n SecureRandom secrand = new SecureRandom();\n // secrand.setSeed(\"17\".getBytes());//初始化随机产生器\n keygen.initialize(2048, secrand);\n KeyPair keys = keygen.genKeyPair();\n PublicKey publicKey = keys.getPublic();\n PrivateKey privateKey = keys.getPrivate();\n String pubKey = Base64.encode(publicKey.getEncoded());\n String priKey = Base64.encode(privateKey.getEncoded());\n System.out.println(\"pubKey = \" + new String(pubKey));\n System.out.println(\"priKey = \" + new String(priKey));\n\n/*\n X509EncodedKeySpec keySpec = new X509EncodedKeySpec(pubkey.getEncoded());\n KeyFactory keyFactory = KeyFactory.getInstance(\"RSA\");\n PublicKey publicKey = keyFactory.generatePublic(keySpec);\n pubKey = Base64.encode(publicKey.getEncoded());\n System.out.println(\"pubKey = \" + new String(pubKey));\n*/\n\n/*\n PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(prikey.getEncoded());\n KeyFactory keyFactory = KeyFactory.getInstance(\"RSA\");\n PrivateKey privateKey = keyFactory.generatePrivate(keySpec);\n priKey = Base64.encode(privateKey.getEncoded());\n System.out.println(\"priKey = \" + new String(priKey));\n*/\n //(N,e)是公钥\n RSAPublicKey rsaPublicKey = (RSAPublicKey) publicKey;\n System.out.println(\"RSAPublicKey:\");\n System.out.println(\"Modulus.length=\" +\n rsaPublicKey.getModulus().bitLength());\n System.out.println(\"Modulus=\" + rsaPublicKey.getModulus().toString());//n\n System.out.println(\"PublicExponent.length=\" +\n rsaPublicKey.getPublicExponent().bitLength());\n System.out.println(\"PublicExponent=\" + rsaPublicKey.getPublicExponent().toString());//e\n\n\n //(N,d)是私钥\n RSAPrivateKey rsaPrivateKey = (RSAPrivateKey) privateKey;\n System.out.println(\"RSAPrivateKey:\");\n System.out.println(\"Modulus.length=\" +\n rsaPrivateKey.getModulus().bitLength());\n System.out.println(\"Modulus=\" + rsaPrivateKey.getModulus().toString());//n\n System.out.println(\"PrivateExponent.length=\" +\n rsaPrivateKey.getPrivateExponent().bitLength());\n System.out.println(\"PrivateExponent=\" + rsaPrivateKey.getPrivateExponent().toString());//d\n\n String encodeData = encode(\" public static String encode(String toEncode,String D, String N) {\\n\" +\n \" // BigInteger var2 = new BigInteger(\\\"17369712262290647732768133445861332449863405383733306695896586821166245382729380222118948668590047591903813382253186640467063376463309880263824085810383552963627855603429835060435976633955217307266714318344160886538360012623239010786668755679438900124601074924850696725233212494777766999123952653273738958617798460338184668049410136792403729341479373919634041235053823478242208651592611582439749292909499663165109004083820192135244694907138372731716013807836312280426304459316963033144149631900633817073029029413556757588486052978078614048837784810650766996280232645714319416096306667876390555673421669667406990886847\\\");\\n\" +\n \" // BigInteger var3 = new BigInteger(\\\"65537\\\");\\n\" +\n \" int MAX_ENCRYPT_BLOCK = 128;\\n\" +\n \" int offSet = 0;\\n\" +\n \" byte[] cache;\\n\" +\n \" int i = 0;\\n\" +\n \" ByteArrayOutputStream out = new ByteArrayOutputStream();\\n\" +\n \" try {\\n\" +\n \" RSAPrivateKeySpec rsaPrivateKeySpec = new java.security.spec.RSAPrivateKeySpec(new BigInteger(N),new BigInteger(D));\\n\" +\n \" KeyFactory keyFactory = java.security.KeyFactory.getInstance(\\\"RSA\\\");\\n\" +\n \" PrivateKey privateKey = keyFactory.generatePrivate(rsaPrivateKeySpec);\\n\" +\n \" Cipher cipher = javax.crypto.Cipher.getInstance(\\\"RSA\\\");\\n\" +\n \" cipher.init(Cipher.ENCRYPT_MODE,privateKey);\\n\" +\n \"\\n\" +\n \" byte[] data = toEncode.getBytes(StandardCharsets.UTF_8);\\n\" +\n \" int inputLen = data.length;\\n\" +\n \" // 对数据分段加密\\n\" +\n \" while (inputLen - offSet > 0) {\\n\" +\n \" if (inputLen - offSet > MAX_ENCRYPT_BLOCK) {\\n\" +\n \" cache = cipher.doFinal(data, offSet, MAX_ENCRYPT_BLOCK);\\n\" +\n \" } else {\\n\" +\n \" cache = cipher.doFinal(data, offSet, inputLen - offSet);\\n\" +\n \" }\\n\" +\n \" out.write(cache, 0, cache.length);\\n\" +\n \" i++;\\n\" +\n \" offSet = i * MAX_ENCRYPT_BLOCK;\\n\" +\n \" }\\n\" +\n \" byte[] datas = out.toByteArray();\\n\" +\n \" out.close();\\n\" +\n \"\\n\" +\n \" //byte[] datas = datas = cipher.doFinal(toEncode.getBytes());\\n\" +\n \" datas = org.apache.commons.codec.binary.Base64.encodeBase64(datas);\\n\" +\n \" return new String(datas,StandardCharsets.UTF_8);\\n\" +\n \" } catch (NoSuchAlgorithmException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (InvalidKeySpecException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (NoSuchPaddingException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (InvalidKeyException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (BadPaddingException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (IllegalBlockSizeException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (IOException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" }\\n\" +\n \" return null;\\n\" +\n \" }\",rsaPrivateKey.getPrivateExponent().toString(),rsaPrivateKey.getModulus().toString());\n String decodeData = decode(encodeData,rsaPublicKey.getPublicExponent().toString(),rsaPublicKey.getModulus().toString());\n\n System.out.println(encodeData);\n System.out.println(decodeData);\n\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }/* catch (InvalidKeySpecException e) {\n e.printStackTrace();\n }*/\n }", "@Override\n public InputStream decrypt(InputStream in, DecryptionKey privateKey) throws IOException {\n byte[] keyLenBytes = new byte[4];\n int triesLeft = 10;\n for (int i = 0; i < 4; i++) {\n while (in.read(keyLenBytes, i, 1) < 1 && --triesLeft > 0) {\n ;\n }\n }\n if (triesLeft == 0)\n throw new IOException(\"didn't get keylen data from ciphertext\");\n int keyLen = ByteBuffer.wrap(keyLenBytes).getInt();\n\n //Deserialize the encapsulated key\n byte[] encapsulatedKeyBytes = new byte[keyLen];\n triesLeft = 10;\n for (int i = 0; i < keyLen; i++) {\n while (in.read(encapsulatedKeyBytes, i, 1) < 1 && --triesLeft > 0) {\n ; //TODO: don't read byte by byte...\n }\n }\n if (triesLeft == 0)\n throw new IOException(\"couldn't read encapulated key from ciphertext\");\n CipherText encapsulatedKey =\n kem.restoreEncapsulatedKey(new JSONConverter().deserialize(new String(encapsulatedKeyBytes)));\n\n //decaps the encapsulated key\n SymmetricKey symmetricKey = kem.decaps(encapsulatedKey, privateKey);\n\n //Return a stream where caller can read the decrypted payload\n return symmetricScheme.decrypt(in, symmetricKey);\n }", "java.lang.String getPublicEciesKey();", "private KeyStore askForPin() throws KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException {\n char newPin[] = PinDialog.getPIN(this.providerDesc);\n try {\n KeyStore ks = getKeyStore(newPin);\n pin = newPin;\n return ks;\n } catch (IOException e2) {\n e2.printStackTrace();\n if (e2.getCause() instanceof LoginException) {\n JOptionPane.showMessageDialog(null, \"Wrong PIN\", \"Cryptographic card\", JOptionPane.WARNING_MESSAGE);\n }\n throw e2;\n }\n }", "public byte[] decryptKek(byte[] privateKey, byte[] encryptedKey){\n\n try {\n AsymmetricBlockCipher cipher = new OAEPEncoding(new RSAEngine(), new SHA1Digest());\n RSAPrivateKey rsaPrivateKey = RSAPrivateKey.getInstance(ASN1Sequence.fromByteArray(privateKey));\n cipher.init(false, new RSAKeyParameters(true, rsaPrivateKey.getModulus(), rsaPrivateKey.getPrivateExponent()));\n return cipher.processBlock(encryptedKey, 0, encryptedKey.length);\n\n } catch (Exception e) {\n LOG.error(\"There was an error decrypting kek: \", e);\n }\n return null;\n }", "public static PrivateKey getStoredPrivateKey(String filePath) {\n PrivateKey privateKey = null;\n byte[] keydata = getKeyData(filePath);\n PKCS8EncodedKeySpec encodedPrivateKey = new PKCS8EncodedKeySpec(keydata);\n KeyFactory keyFactory = null;\n try {\n keyFactory = KeyFactory.getInstance(ALGORITHM);\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n try {\n privateKey = keyFactory.generatePrivate(encodedPrivateKey);\n } catch (InvalidKeySpecException e) {\n e.printStackTrace();\n }\n\n return privateKey;\n }", "public String getPrivateKeyPassword() {\n\t\treturn privateKeyPassword;\n\t}", "public static PrivateKey getPrivateKeyFromString(String stringkey){\n byte[] byte_privkey = android.util.Base64.decode(stringkey, android.util.Base64.DEFAULT);\n System.out.println(\"BYTE KEY::\" + byte_privkey);\n\n\n //converting it back to public key\n KeyFactory factory = null;\n try {\n factory = KeyFactory.getInstance(\"ECDSA\", \"SC\");\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n } catch (NoSuchProviderException e) {\n e.printStackTrace();\n }\n try {\n PKCS8EncodedKeySpec privateKeySpec = new PKCS8EncodedKeySpec(\n byte_privkey);\n return (factory != null ? factory.generatePrivate(privateKeySpec) : null);\n } catch (InvalidKeySpecException e) {\n e.printStackTrace();\n }\n return null;\n }", "public static PrivateKey loadPrivateKey(byte[] data) throws Exception {\n\n\n ECPrivateKeySpec prvkey = new ECPrivateKeySpec(new BigInteger(data), ecParams);\n return kf.generatePrivate(prvkey);\n }", "private static String extractBase64EncodedKey(String pemKey) throws GeneralSecurityException\n {\n Matcher matcher = KEY_PATTERN.matcher(pemKey);\n if (matcher.find())\n {\n return matcher.group(1).replaceAll(\"\\\\s\", \"\");\n }\n else\n {\n throw new GeneralSecurityException(\"Invalid private key format\");\n }\n }", "private BigInteger setPrivateKey(BigInteger modulus){\n BigInteger privateKey = null;\n \n do {\n \tprivateKey = BigInteger.probablePrime(N / 2, random);\n }\n /* n'a aucun autre diviseur que 1 */\n while (privateKey.gcd(phi0).intValue() != 1 ||\n /* qu'il est plus grand que p1 et p2 */\n privateKey.compareTo(modulus) != -1 ||\n /* qu'il est plus petit que p1 * p2 */\n privateKey.compareTo(p1.max(p2)) == -1);\n \n return privateKey;\n }", "@Test\n public void privatekeyFileTest() {\n // TODO: test privatekeyFile\n }", "public String decryptAESKey(String encryptedAESKey, PrivateKey privateKey) throws Exception {\r\n Cipher cipher = Cipher.getInstance(\"RSA\");\r\n cipher.init(Cipher.DECRYPT_MODE, privateKey);\r\n return new String(cipher.doFinal(Base64.getDecoder().decode(encryptedAESKey)));\r\n }", "KeyStore loadKeystore(char[] keystorePassword) {\n try {\n // Load the keystore in the user's home directory\n bufferedInputStream.reset();\n keystore.load(bufferedInputStream, keystorePassword);\n return keystore;\n // TODO: EOFException might mean we're skipping guesses\n } catch (CertificateException | NoSuchAlgorithmException | FileNotFoundException e) {\n throw new KeystoreException(e);\n } catch (IOException e) {\n if ((e.getCause() instanceof UnrecoverableKeyException) &&\n (e.getCause().getMessage().contains(\"Password verification failed\"))) return null;\n\n throw new KeystoreException(e);\n }\n }", "public KeyStore getKeyStore(InputStream keystoreIS, String password) throws CertException;", "public PrivateKey makePrivateKey() {\n return new PrivateKey(decryptingBigInt, primesMultiplied);\n }", "public int getRsaKeyB(){\n\treturn this.rsaKeyB;\n }", "Object getAuthInfoKey();", "public static PrivateKey load3tierTestRootCAPrivateKey() {\n return loadPrivateKeyFromResourcePath(\"classpath:attestation/3tier/private/3tier-test-root-CA.der\");\n }", "String getSecretByKey(String key);", "private static byte[] readKeyMaterial( String endMarker, BufferedReader reader ) throws IOException {\n String line = null;\n StringBuffer buf = new StringBuffer();\n\n while ( ( line = reader.readLine() ) != null ) {\n if ( line.contains( endMarker ) ) {\n\n return DatatypeConverter.parseBase64Binary( buf.toString() );\n }\n\n buf.append( line.trim() );\n }\n\n throw new IOException(\n BaseMessages.getString( MQTTPublisherMeta.PKG, \"MQTTClientSSL.Error.InvalidPEMFileNoEndMarker\" ) );\n }", "public byte[] retrieveKey(String keyName, String token) throws InternalSkiException {\n byte[] retKey;\n byte[] systemKey = getSystemKey();\n byte[] tokenKey = getTokenKey();\n ISki skiDao = getSkiDao();\n Token tkn = th.decodeToken(token, tokenKey);\n if (tkn!=null) {\n boolean bl = skiDao.checkBlacklist(tkn.getIdentity());\n if (!bl) {\n try {\n byte[] comboKey = SkiKeyGen.getComboKey(tkn.getKey(), systemKey);\n\n String encComboKey = skiDao.fetchKey(keyName);\n\n if (encComboKey!=null) {\n\n byte[] encKey = SkiUtils.b64decode(encComboKey);\n byte[] decryptedKey = crypter.decrypt(encKey, comboKey);\n\n retKey = decryptedKey;\n } else {\n log.warning(\"Unable to fetch key (is null) by name: \" + keyName);\n retKey = null;\n }\n } catch (SkiException e) {\n log.warning(\"Unable to retrieve key. Access denied. Check logs for error: \" + e.getMessage());\n log.log(Level.WARNING, e.getMessage(), e);\n retKey = null;\n }\n } else {\n log.warning(\"Access denied. Attempt to retrieve key from blacklisted identity: \" + tkn.getIdentity());\n retKey = null;\n }\n } else {\n log.warning(\"Access denied. Unable to decode token during key creation!\");\n retKey = null;\n }\n return retKey;\n }", "public RsaKey(DbLink dbLink) throws IOException, InvalidKeySpecException, NoSuchAlgorithmException, CertificateException, InvalidKeyException, NoSuchProviderException, SignatureException{\r\n\r\n\t\t// Loading private key file\r\n\r\n\t\tString keyFile = \"src/cakey.p8c\";\r\n\t\tInputStream inStream = new FileInputStream(keyFile);\r\n\t\tbyte[] encKey = new byte[inStream.available()];\r\n\t\tinStream.read(encKey);\r\n\t\tinStream.close();\r\n\r\n\t\t// Read the private key from file\r\n\r\n\t\tSystem.out.println(\"RSA PrivateKeyInfo: \" + encKey.length + \" bytes\\n\");\r\n\t\tPKCS8EncodedKeySpec privKeySpec = new PKCS8EncodedKeySpec(encKey);\r\n\t\tKeyFactory keyFactory = KeyFactory.getInstance(\"RSA\");\r\n\t\tSystem.out.println(\"KeyFactory Object Info:\");\r\n\t\tSystem.out.println(\"Algorithm = \"+ keyFactory.getAlgorithm());\r\n\t\tSystem.out.println(\"Provider = \"+ keyFactory.getProvider());\r\n\t\tthis.privKey = (RSAPrivateKey) keyFactory.generatePrivate(privKeySpec);\r\n\t\tSystem.out.println(\"Loaded \" + this.privKey.getAlgorithm() + \" \" + this.privKey.getFormat() + \" private key.\");\r\n\r\n\t\t//loading admin certificate\r\n\r\n\t\tkeyFile = \"src/admincert.crt\";\r\n\t\tinStream = new FileInputStream(keyFile);\r\n\t\tCertificateFactory cf = CertificateFactory.getInstance(\"X.509\");\r\n\t\tthis.adminCert = cf.generateCertificate(inStream);\r\n\t\t\r\n\t\t//loading AS cert\r\n\t\t\r\n\t\tthis.myCert = dbLink.getCertificateByUserID(0);\r\n\t\ttry {\r\n\t\t\tthis.myCert.verify(this.adminCert.getPublicKey()); // On verifie que notre certificat a bien ete signe avec la cle publique presente sur le certificat de l'admin\r\n\t\t\tSystem.out.println(myCert);\r\n\t\t} catch (SignatureException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.out.println(\"You have the wrong key !\");\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private static void keyPairGenerator() throws NoSuchAlgorithmException, IOException {\n KeyPairGenerator kpg = KeyPairGenerator.getInstance(\"RSA\");\n kpg.initialize(2048);\n KeyPair keyPair = kpg.generateKeyPair();\n\n //Get public and private keys\n Key publicKey = keyPair.getPublic();\n Key privateKey = keyPair.getPrivate();\n\n String outFile = files_path + \"/Client_public\";\n PrintStream out = null;\n out = new PrintStream(new FileOutputStream(outFile + \".key\"));\n out.write(publicKey.getEncoded());\n out.close();\n\n outFile = files_path + \"/Client_private\";\n out = new PrintStream(new FileOutputStream(outFile + \".key\"));\n out.write(privateKey.getEncoded());\n out.close();\n\n System.err.println(\"Private key format: \" + privateKey.getFormat());\n // prints \"Private key format: PKCS#8\" on my machine\n\n System.err.println(\"Public key format: \" + publicKey.getFormat());\n // prints \"Public key format: X.509\" on my machine\n\n }", "protected boolean decrypt(PrivateKey privateKey, InputStream encryptedStream, OutputStream plainStream) {\n boolean result = checkEncryptionInputData(privateKey, encryptedStream, plainStream) && initialize();\n if (result) {\n try {\n RSAPrivateKeySpec keySpec = getKeyFactory().getKeySpec(privateKey, RSAPrivateKeySpec.class);\n int keySize = keySpec.getModulus().bitLength();\n LOGGER.debug(\"Private key length: {}\", keySize);\n Cipher cipher = getCipherInstance();\n cipher.init(Cipher.DECRYPT_MODE, privateKey);\n CipherInputStream cis = null;\n try {\n cis = new CipherInputStream(encryptedStream, cipher, keySize / 8);\n byte[] buffer = new byte[8192];\n int length;\n while ((length = cis.read(buffer)) != -1) {\n plainStream.write(buffer, 0, length);\n }\n plainStream.flush();\n } catch (IOException e) {\n LOGGER.error(\"Error reading encrypted stream. {}\", e.getMessage());\n result &= false;\n } finally {\n if (cis != null) {\n try {\n cis.close();\n } catch (IOException e) {\n result &= false;\n LOGGER.error(\"Error reading encrypted stream. {}\", e.getMessage());\n }\n }\n }\n } catch (GeneralSecurityException e1) {\n LOGGER.error(\"Error during specifying key details. {}\", e1.getMessage());\n result &= false;\n }\n }\n return result;\n }", "public static X509Certificate readCertificate(BufferedReader reader)\n throws IOException, GeneralSecurityException {\n String line;\n StringBuffer buff = new StringBuffer();\n boolean isCert = false;\n boolean isKey = false;\n boolean notNull = false;\n while ((line = reader.readLine()) != null) {\n // Skip key info, if any\n if (line.indexOf(\"BEGIN RSA PRIVATE KEY\") != -1 ||\n line.indexOf(\"BEGIN PRIVATE KEY\") != -1) {\n isKey = true;\n continue;\n } else if (isKey && (line.indexOf(\"END RSA PRIVATE KEY\") != -1 ||\n line.indexOf(\"END PRIVATE KEY\") != -1)) {\n isKey = false;\n continue;\n } else if (isKey)\n continue;\n\n notNull = true;\n if (line.indexOf(\"BEGIN CERTIFICATE\") != -1) {\n isCert = true;\n } else if (isCert && line.indexOf(\"END CERTIFICATE\") != -1) {\n byte[] data = Base64.decode(buff.toString().getBytes());\n return loadCertificate(new ByteArrayInputStream(data));\n } else if (isCert) {\n buff.append(line);\n }\n }\n if (notNull && !isCert) {\n throw new GeneralSecurityException(\n \"Certificate needs to start with \"\n + \" BEGIN CERTIFICATE\");\n }\n return null;\n }", "PGPPrivateKey decryptSecretKey(PGPSecretKey secretKey, String password);", "public PGPPrivateKey findPrivateKey(final InputStream keyIn, final long keyID, final char[] pass) throws Exception {\n try (InputStream decoderInputStream = PGPUtil.getDecoderStream(keyIn)) {\n PGPSecretKeyRingCollection keyRingCollection = new PGPSecretKeyRingCollection(decoderInputStream, new BcKeyFingerprintCalculator());\n\n return findPrivateKey(keyRingCollection.getSecretKey(keyID), pass);\n }\n }", "protected final String getPrivateKeyLocation() {\n return this.privateKeyLocation;\n }", "public final KeyStore.PrivateKeyEntry mo10698f(KeyStore keyStore) {\n PrivateKey privateKey;\n if (Build.VERSION.SDK_INT < 28 || (privateKey = (PrivateKey) keyStore.getKey(this.f723a, (char[]) null)) == null) {\n return (KeyStore.PrivateKeyEntry) keyStore.getEntry(this.f723a, (KeyStore.ProtectionParameter) null);\n }\n return new KeyStore.PrivateKeyEntry(privateKey, new Certificate[]{keyStore.getCertificate(this.f723a)});\n }", "public PGPPrivateKey findPrivateKey(final PGPSecretKey secretKey, final char[] pass) throws Exception {\n if (secretKey == null) {\n return null;\n // throw new IllegalArgumentException(\"Can't find private key in the key ring.\");\n }\n\n // // Validate secret key\n // if (!secretKey.isSigningKey())\n // {\n // throw new IllegalArgumentException(\"Private key does not allow signing.\");\n // }\n //\n // if (secretKey.getPublicKey().isRevoked())\n // {\n // throw new IllegalArgumentException(\"Private key has been revoked.\");\n // }\n //\n // if (!hasKeyFlags(secretKey.getPublicKey(), KeyFlags.SIGN_DATA))\n // {\n // throw new IllegalArgumentException(\"Key cannot be used for signing.\");\n // }\n\n PBESecretKeyDecryptor decryptor = new BcPBESecretKeyDecryptorBuilder(new BcPGPDigestCalculatorProvider()).build(pass);\n\n return secretKey.extractPrivateKey(decryptor);\n }", "com.google.protobuf.ByteString\n getPubkeyBytes();", "public void testPubliKeyField() throws Exception {\r\n // Create new key pair\r\n KeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"RSA\", \"BC\");\r\n keyGen.initialize(1024, new SecureRandom());\r\n KeyPair keyPair = keyGen.generateKeyPair();\r\n\r\n PublicKeyRSA rsa1 = (PublicKeyRSA)KeyFactory.createInstance(keyPair.getPublic(), \"SHA1WITHRSA\", null);\r\n byte[] der = rsa1.getEncoded();\r\n\r\n CVCObject cvcObj = CertificateParser.parseCVCObject(der);\r\n assertTrue(\"Parsed array was not a PublicKeyRSA\", (cvcObj instanceof PublicKeyRSA));\r\n\r\n RSAPublicKey rsaKey = (RSAPublicKey)keyPair.getPublic();\r\n\r\n RSAPublicKey rsa2 = (RSAPublicKey)cvcObj; // This casting should be successful\r\n assertEquals(\"Key modulus\", rsaKey.getModulus(), rsa2.getModulus());\r\n assertEquals(\"Key exponent\", rsaKey.getPublicExponent(), rsa2.getPublicExponent());\r\n assertEquals(\"Key algorithm\", \"RSA\", rsa2.getAlgorithm());\r\n \r\n PublicKeyRSA rsa3 = (PublicKeyRSA)rsa2;\r\n assertEquals(\"OIDs\", rsa1.getObjectIdentifier(), rsa3.getObjectIdentifier());\r\n }", "public KeyProvider getKeyProvider() {\n return keystore; \n }", "@Test\n\tpublic void getMyKeyPairs() {\n\t\tRsaKeyStore ks = new RsaKeyStore();\n\t\tks.createNewMyKeyPair(\"ichi\");\n\t\tks.createNewMyKeyPair(\"ni\");\n\t\tKeyPair kp = ks.getMyKeyPair(\"ichi\");\n\t\tassertNotNull(\"should have returned keypair\", kp);\n\t\tKeyPair kpp = ks.getMyKeyPair(\"ni\");\n\t\tassertNotNull(\"should have returned keypair\", kpp);\n\t}", "private KeyManager getKeyManager() {\n\t\tDefaultResourceLoader loader = new FileSystemResourceLoader();\n\t\tResource storeFile = loader.getResource(\"file:\" + samlProps.get(\"keyStoreFilePath\"));\n\t\tMap<String, String> keyPasswords = new HashMap<String, String>();\n\t\tkeyPasswords.put(samlProps.get(\"keyAlias\"), samlProps.get(\"keyPasswd\"));\n\n\t\treturn new JKSKeyManager(storeFile, samlProps.get(\"keyStorePasswd\"), keyPasswords, samlProps.get(\"keyAlias\"));\n\t}", "public static PrivateKeyInfo createPrivateKeyInfo(AsymmetricKeyParameter privateKey) throws IOException\n {\n return createPrivateKeyInfo(privateKey, null);\n }", "private String exportkey() {\n\n\t\ttry {\n\t\t\tbyte[] keyBytes = serversharedkey.getEncoded();\n\t\t\tString encodedKey = new String(Base64.encodeBase64(keyBytes), \"UTF-8\");\n\t\t\tFile file = new File(\"serversharedKey\");\n\t\t\t//System.out.println(\"The server Private key: \" + encodedKey);\n\t\t\tPrintWriter writer = new PrintWriter(file, \"UTF-8\");\n\t\t\twriter.println(encodedKey);\n\t\t\twriter.close();\n\n\t\t\treturn encodedKey;\n\n\t\t} catch (UnsupportedEncodingException | FileNotFoundException ex) {\n\t\t\tLogger.getLogger(ClientTCP.class.getName()).log(Level.SEVERE, null, ex);\n\t\t}\n\t\treturn null;\n\t}", "public void importKeyFromJcaKeystore(KeyStore jcaKeystore,\n String alias, String domain)\n throws IOException, GeneralSecurityException {\n X509Certificate cert;\n byte[] der;\n TLV tbsCert;\n TLV subjectName;\n RSAPublicKey rsaKey;\n String owner;\n long notBefore;\n long notAfter;\n byte[] rawModulus;\n int i;\n int keyLen;\n byte[] modulus;\n byte[] exponent;\n Vector keys;\n\n // get the cert from the keystore\n try {\n cert = (X509Certificate)jcaKeystore.getCertificate(alias);\n } catch (ClassCastException cce) {\n throw new CertificateException(\"Certificate not X.509 type\");\n }\n\n if (cert == null) {\n throw new CertificateException(\"Certificate not found\");\n }\n\n /*\n * J2SE reorders the attributes when building a printable name\n * so we must build a printable name on our own.\n */\n\n /*\n * TBSCertificate ::= SEQUENCE {\n * version [0] EXPLICIT Version DEFAULT v1,\n * serialNumber CertificateSerialNumber,\n * signature AlgorithmIdentifier,\n * issuer Name,\n * validity Validity,\n * subject Name,\n * subjectPublicKeyInfo SubjectPublicKeyInfo,\n * issuerUniqueID [1] IMPLICIT UniqueIdentifier OPTIONAL,\n * -- If present, version shall be v2 or v3\n * subjectUniqueID [2] IMPLICIT UniqueIdentifier OPTIONAL,\n * -- If present, version shall be v2 or v3\n * extensions [3] EXPLICIT Extensions OPTIONAL\n * -- If present, version shall be v3\n * }\n */\n der = cert.getTBSCertificate();\n tbsCert = new TLV(der, 0);\n\n // walk down the tree of TLVs to find the subject name\n try {\n // Top level a is Sequence, drop down to the first child\n subjectName = tbsCert.child;\n\n // skip the version if present.\n if (subjectName.type == TLV.VERSION_TYPE) {\n subjectName = subjectName.next;\n }\n\n // skip the serial number\n subjectName = subjectName.next;\n \n // skip the signature alg. id.\n subjectName = subjectName.next;\n \n // skip the issuer\n subjectName = subjectName.next;\n \n // skip the validity\n subjectName = subjectName.next;\n\n owner = parseDN(der, subjectName);\n } catch (NullPointerException e) {\n throw new CertificateException(\"TBSCertificate corrupt 1\");\n } catch (IndexOutOfBoundsException e) {\n throw new CertificateException(\"TBSCertificate corrupt 2\");\n }\n\n notBefore = cert.getNotBefore().getTime();\n notAfter = cert.getNotAfter().getTime();\n\n // get the key from the cert\n try {\n rsaKey = (RSAPublicKey)cert.getPublicKey();\n } catch (ClassCastException cce) {\n throw new RuntimeException(\"Key in certificate is not an RSA key\");\n }\n\n // get the key parameters from the key\n rawModulus = rsaKey.getModulus().toByteArray();\n\n /*\n * the modulus is given as the minimum positive integer,\n * will not padded to the bit size of the key, or may have a extra\n * pad to make it positive. SSL expects the key to be signature\n * bit size. but we cannot get that from the key, so we should\n * remove any zero pad bytes and then pad out to a multiple of 8 bytes\n */\n for (i = 0; i < rawModulus.length && rawModulus[i] == 0; i++);\n\n keyLen = rawModulus.length - i;\n keyLen = (keyLen + 7) / 8 * 8;\n modulus = new byte[keyLen];\n\n int k, j;\n for (k = rawModulus.length - 1, j = keyLen - 1;\n k >= 0 && j >= 0; k--, j--) {\n modulus[j] = rawModulus[k];\n }\n\n exponent = rsaKey.getPublicExponent().toByteArray();\n\n // add the key\n keys = keystore.findKeys(owner);\n if (keys != null) {\n boolean duplicateKey = false;\n\n for (int n = 0; !duplicateKey && n < keys.size(); n++) {\n PublicKeyInfo key = (PublicKeyInfo)keys.elementAt(n);\n\n if (key.getOwner().equals(owner)) {\n byte[] temp = key.getModulus();\n\n if (modulus.length == temp.length) {\n duplicateKey = true;\n for (int m = 0; j < modulus.length && m < temp.length;\n m++) {\n if (modulus[m] != temp[m]) {\n duplicateKey = false;\n break;\n }\n }\n }\n }\n }\n \n if (duplicateKey) {\n throw new CertificateException(\n \"Owner already has this key in the ME keystore\");\n }\n }\n \n keystore.addKey(new PublicKeyInfo(owner, notBefore, notAfter,\n modulus, exponent, domain));\n }", "public interface DHPrivateKey extends DHKey, java.security.PrivateKey {\n \n /**\n * Returns the private value, <code>x</code>.\n *\n * @return the private value, <code>x</code>\n */\n BigInteger getX();\n}" ]
[ "0.7162062", "0.68655205", "0.68655205", "0.67301875", "0.6708761", "0.65736514", "0.6525162", "0.64961964", "0.64216197", "0.6390707", "0.63726735", "0.6357237", "0.634248", "0.62688947", "0.62350535", "0.6211713", "0.6184776", "0.6177054", "0.617609", "0.61573255", "0.6120561", "0.60993487", "0.6090292", "0.6074634", "0.605269", "0.6024589", "0.5976756", "0.5969809", "0.5963561", "0.59630513", "0.59590703", "0.59566706", "0.59340495", "0.59151083", "0.5911996", "0.5911526", "0.59032315", "0.58992064", "0.5876219", "0.5874117", "0.5874117", "0.5874117", "0.5869114", "0.58579314", "0.5856633", "0.58478665", "0.5837027", "0.57275707", "0.5711472", "0.5710481", "0.5676747", "0.56522405", "0.5651053", "0.56205946", "0.56064713", "0.5601366", "0.55869246", "0.558609", "0.55828345", "0.5582759", "0.5582019", "0.5554913", "0.5517809", "0.5516039", "0.5503508", "0.5500791", "0.54901075", "0.5485941", "0.54768884", "0.54533166", "0.54135084", "0.54105407", "0.5382354", "0.5380708", "0.5362788", "0.535598", "0.5355852", "0.5327756", "0.5323004", "0.53189385", "0.53103095", "0.529863", "0.5274267", "0.52696764", "0.52678585", "0.52479124", "0.52283984", "0.5213939", "0.5188924", "0.5169311", "0.51663923", "0.5154029", "0.5149226", "0.514277", "0.51382774", "0.51322967", "0.51146466", "0.51034886", "0.5102638", "0.5100993", "0.5089235" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(View arg0) { System.exit(0); }
{ "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
Gets the energy matrix. Time complexity is height width
private double[][] getEnergyMatrix() { double[][] energi = new double[height()][width()]; for (int i = 0; i < height(); i++) { for (int j = 0; j < width(); j++) { energi[i][j] = energy(j, i); } } return energi; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double getRecEnergy(){\n\t\tdebugMatrix = new double[CELL_SIDE_COUNT][CELL_SIDE_COUNT];\n\t\tconvolutedMatrix = new Complex[CELL_SIDE_COUNT][CELL_SIDE_COUNT];\n\t\t//initiliaze the whole convolutedMatrix array to zero\n\t\tfor(int x = 0; x < CELL_SIDE_COUNT; x++)\n\t\t{\n\t\t\tfor(int y = 0; y < CELL_SIDE_COUNT; y++)\n\t\t\t{\n\t\t\t\tconvolutedMatrix[x][y] = Complex.zero;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Pg. 180 Lee[05]\n\t\tint indexTop = CELL_SIDE_COUNT * CELL_SIDE_COUNT;\n\t\t//Eq 19 Lee[05]\n\t\t//Also Eq 3.9 Essman[95]\n\t\tdouble sum = 0;\n\t\tint indtop = CELL_SIDE_COUNT * CELL_SIDE_COUNT;\n\t\tint midPoint = CELL_SIDE_COUNT / 2;\n\t\tif (midPoint << 1 < CELL_SIDE_COUNT) {\n\t\t\t++midPoint;\n\t\t}\n\t\t\n\t\tfor (int ind = 1; ind <= (indtop - 1); ++ind) {\n\t\t\t\n\t\t\tint y = ind / CELL_SIDE_COUNT + 1;\n\t\t\tint x = ind - (y - 1) * CELL_SIDE_COUNT + 1;\n\t\t\tint mXPrime = x - 1;\n\t\t\tif (x > midPoint) {\n\t\t\t\tmXPrime = x - 1 - CELL_SIDE_COUNT;\n\t\t\t}\n\t\t\tint mYPrime = y - 1;\n\t\t\tif (y > midPoint) {\n\t\t\t\tmYPrime = y - 1 - CELL_SIDE_COUNT;\n\t\t\t}\n\t\t\tdouble m = mXPrime * 1.0 + mYPrime * 1.0; //Was inverseMeshWidth - theory is reciprocal lattice vectors are for the entire cell U rather than one cell\n\t\t\tdouble mSquared = squared(mXPrime * 1.0) + squared(mYPrime * 1.0);\n\t\t\t\n\t\t\tdouble V = 1; //working in the unit mesh\n\t\t\tdouble bterm = M.bspmod[x]*M.bspmod[y];\n\t\t\tdouble eterm = Math.exp(-squared(Math.PI/ewaldCoefficient)*mSquared) / (bterm * Math.PI * V * mSquared);\n\t\t\t//Section 3.2.8 Lee[05]\n\t\t\tdouble inverseQPart = (squared(inverseFTQComplex[x-1][y-1].re())+squared(inverseFTQComplex[x-1][y-1].im())); //Lee[05]\n\t\t\tdouble thisContribution = eterm * inverseQPart;\n\t\t\tconvolutedMatrix[x-1][y-1] = inverseFTQComplex[x-1][y-1].scale(eterm); //Save this for the force calculation\n\t\t\tsum += thisContribution; //from the argument that F(Q(M))*F(Q(-M))=F-1(Q)^2\n\t\t}\n\t\treturn 0.5*sum;\n\t}", "public int[] findHorizontalSeam() {\n int[][] matrixTo = new int[height()][width()];\n double[][] energyMatrix = new double[height()][width()];\n //reset(energyMatrix);\n\n for(int i = 0; i < energyMatrix.length; i++) {\n for(int j = 0; j < energyMatrix[i].length; j++) {\n energyMatrix[i][j] = Double.MAX_VALUE;\n }\n }\n\n for (int row = 0; row < height(); row++) {\n energyMatrix[row][0] = 1000;\n }\n // this is for relaxation.\n for (int col = 0; col < width() - 1; col++) {\n for (int row = 0; row < height(); row++) {\n //relaxH(row, col, matrixTo, energyMatrix);\n int nextcol = col + 1;\n for (int i = -1; i <= 1; i++) {\n int nextrow = row + i;\n if (nextrow < 0 || nextrow >= height()) continue;\n if(i == 0) {\n if(energyMatrix[nextrow][nextcol] >= energyMatrix[row][col] + energy(nextcol, nextrow)) {\n energyMatrix[nextrow][nextcol] = energyMatrix[row][col] + energy(nextcol, nextrow);\n matrixTo[nextrow][nextcol] = i;\n }\n }\n if (energyMatrix[nextrow][nextcol] > energyMatrix[row][col] + energy(nextcol, nextrow)) {\n energyMatrix[nextrow][nextcol] = energyMatrix[row][col] + energy(nextcol, nextrow);\n matrixTo[nextrow][nextcol] = i;\n }\n }\n\n }\n }\n\n double minDist = Double.MAX_VALUE;\n int minRow = 0;\n for (int row = 0; row < height(); row++) {\n if (minDist > energyMatrix[row][width() - 1]) {\n minDist = energyMatrix[row][width() - 1];\n minRow = row;\n }\n }\n\n int[] indices = new int[width()];\n for (int col = width() - 1, row = minRow; col >= 0; col--) {\n indices[col] = row;\n row -= matrixTo[row][col];\n }\n return indices;\n }", "public int[] findVerticalSeam() {\n\n double[][] energyMatrix = new double[width()][height()];\n int[][] matrixTo = new int[width()][height()];\n\n for(int x =0; x< width(); x++) {\n for(int y=0; y< height(); y++) {\n energyMatrix[x][y] = Double.POSITIVE_INFINITY;\n }\n }\n for(int x =0; x < width(); x++) {\n energyMatrix[x][0] = 1000;\n }\n \n for(int j=0; j< height() - 1; j++) {\n for(int i=0; i < width(); i++ ) {\n if(i>0) {\n if(energyMatrix[i-1][j+1] > energyMatrix[i][j] + energy(i-1,j+1)) {\n energyMatrix[i-1][j+1] = energyMatrix[i][j] + energy(i-1,j+1);\n matrixTo[i-1][j+1] = i;\n }\n\n }\n\n if(energyMatrix[i][j+1] > energyMatrix[i][j] + energy(i,j+1)) {\n energyMatrix[i][j+1] = energyMatrix[i][j] + energy(i,j+1);\n matrixTo[i][j+1] = i;\n }\n \n\n if(i < width()-1) {\n if(energyMatrix[i+1][j+1] > energyMatrix[i][j] + energy(i+1,j+1)) {\n energyMatrix[i+1][j+1] = energyMatrix[i][j] + energy(i+1,j+1);\n matrixTo[i+1][j+1] = i;\n }\n }\n }\n }\n \n double minEnergy = Double.POSITIVE_INFINITY;\n int minEnergyX = -1;\n for(int w =0; w < width() ; w++) {\n if(energyMatrix[w][height()-1] < minEnergy) {\n minEnergyX = w;\n minEnergy = energyMatrix[w][height() - 1];\n }\n }\n\n int[] seam = new int[height()];\n seam[height() -1] = minEnergyX;\n int prevX = matrixTo[minEnergyX][height() - 1];\n\n for(int h = height() - 2; h >= 0 ; h--) {\n seam[h] = prevX;\n prevX = matrixTo[prevX][h];\n }\n return seam;\n \n }", "public static int[][] getEdgeMatrix() {\n\t\treturn edge;\n\t}", "public void calcMatrix() {\n \n FockState rowState = new FockState(_systemSize, _epsilon, _mass);\n FockState opedState = new FockState(_systemSize, _epsilon, _mass);\n Integer column;\n int[] momenta = new int[_phiPow-1]; \n for(int row=0; row<_numStates; row++) {\n \n // Run through the matrix rows\n \t// Set the row state and create the row Map\n \t\n rowState.setAsIndex(row);\n Map<Integer, Double> rowMap = new HashMap<Integer, Double>();\n \t\t_elements.add(row, rowMap);\n\n \t// Reset the momenta combinations array\n \t\n \tfor(int i=0; i<(_phiPow-1); i++) {\n momenta[i]=0;\n } \n for(int j=0; j<_momCombs; j++) {\n \n // Run through the various momenta combinations\n \n for(int opType=0; opType<_opCombs; opType++) {\n \n // Run through the various operator combinations\n \n opedState.makeSameAs(rowState);\n applyOperators(opedState, momenta, opType); \n if(opedState.isValid()==true) {\n \t\n \t// Calculate the column\n \t\n \tcolumn = opedState.calcIndex(); \n \tif((column != null) && (column < _numStates)) {\n \t\t\n \t\t// If the resulting state is valid and within the cutoff, store the result\n \t\t\n \t\tstore(row, column, momenta);\n \n \t} \t\n } \n }\n \n // Increment the momenta label array unless this is the final run through\n \n if(j != (_momCombs-1)) {\n \tincrementMomentaLabel(momenta);\n } \n } \n }\n \n }", "public Matrix getD() {\n Matrix x = new DenseMatrix(n, n);\n x.assign(0);\n x.viewDiagonal().assign(d);\n for (int i = 0; i < n; i++) {\n double v = e.getQuick(i);\n if (v > 0) {\n x.setQuick(i, i + 1, v);\n } else if (v < 0) {\n x.setQuick(i, i - 1, v);\n }\n }\n return x;\n }", "public E[][] getMatrix() {\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tE[][] matrix = (E[][]) new Object[mColumnCount][mRowCount];\r\n\t\tfor(int i=0; i<mColumnCount; i++)\r\n\t\t\tfor(int j=0; j<mRowCount; j++)\r\n\t\t\t\tmatrix[i][j] = getFromArray(i, j);\r\n\t\treturn matrix;\r\n\t}", "double energy() {\n\n // brightness values\n double brU = 0;\n double brD = 0;\n double brR = 0;\n double brL = 0;\n double brDR = 0;\n double brTR = 0;\n double brDL = 0;\n double brTL = 0;\n if (this.up != null) {\n brU = this.up.brightness;\n }\n if (this.down != null) {\n brD = this.down.brightness;\n }\n\n if (this.right != null) {\n brR = this.right.brightness;\n }\n\n if (this.left != null) {\n brL = this.left.brightness;\n }\n\n if (this.downRight() != null) {\n brDR = this.downRight().brightness;\n }\n\n if (this.downLeft() != null) {\n brDL = this.downLeft().brightness;\n }\n\n if (this.topLeft() != null) {\n brTL = this.topLeft().brightness;\n }\n\n if (this.topRight() != null) {\n brTR = this.topRight().brightness;\n }\n\n\n double vertEnergy = (brTL + brL + brDL) - (brTR + brR + brDR);\n double horizEnergy = (brTL + brU + brTR) - (brDL + brD + brDR);\n\n return Math.sqrt((vertEnergy * vertEnergy) + (horizEnergy * horizEnergy));\n\n }", "public Estados[][] getMatrix() {\n return matrix;\n }", "private double[] energyVector(double[][] distanceMatrix) {\r\n // Ignore the set (maxSize + 1)'th archive member since it's the new\r\n // solution that is tested for eligibility of replacement.\r\n double[] energyVector = new double[distanceMatrix.length - 1];\r\n for (int i = 0; i < energyVector.length - 1; i++) {\r\n for (int j = i + 1; j < energyVector.length; j++) {\r\n energyVector[i] += scalarization.getAttribute(archive.get(j)) / distanceMatrix[i][j];\r\n energyVector[j] += scalarization.getAttribute(archive.get(i)) / distanceMatrix[i][j];\r\n }\r\n energyVector[i] *= scalarization.getAttribute(archive.get(i));\r\n }\r\n return energyVector;\r\n }", "public int[][] getMatrix(){\n\t\treturn matrix;\n\t}", "public Matrix getInversematrixS()\n {\n // Build alpha * I\n double [][] alphainvmatrix;\n alphainvmatrix = new double[x + 1][x + 1];\n for(int i = 0; i < x + 1; i++)\n {\n alphainvmatrix[i][i] = alpha;\n\n }\n Matrix alphamatrixnew = new Matrix(alphainvmatrix);\n\n // calculate summation\n Matrix sum = new Matrix(x + 1, 1);\n int i = 1;\n while (i <= arraylistofprices.size() - 1) {\n phimatrix(i);\n\n sum.plusEquals(phi);\n\n i++;\n }\n Matrix summation = sum.times(phiT);\n summation.timesEquals(beta); \n\n // alpha * I + beta * sum\n Matrix sInv = alphamatrixnew.plus(summation);\n return sInv;\n }", "public int[] findVerticalSeam() {\n double[][] energy = new double[height][width];\n int[][] edgeTo = new int[height][width];\n double[][] distTo = new double[height][width];\n reset(distTo);\n int[] indices = new int[height];\n if (width == 1 || height == 1) {\n return indices;\n }\n for (int i = 0; i < width; i++) {\n distTo[0][i] = 1000.0;\n }\n // this is for relaxation.\n for (int i = 0; i < height - 1; i++) {\n for (int j = 0; j < width; j++) {\n relaxVertical(i, j, edgeTo, distTo);\n }\n }\n // calculating from last rows\n // column wise\n double minDist = Double.MAX_VALUE;\n int minCol = 0;\n for (int columns = 0; columns < width; columns++) {\n if (minDist > distTo[height - 1][columns]) {\n minDist = distTo[height - 1][columns];\n minCol = columns;\n }\n }\n //indices values of shortest path.\n for (int rows = height -1, columns = minCol; rows >= 0; rows--) {\n indices[rows] = columns;\n columns -= edgeTo[rows][columns];\n }\n indices[0] = indices[1];\n return indices;\n }", "public double[][] eigenVectors(){\n if(!this.pcaDone)this.pca();\n return this.eigenVectorsAsColumns;\n }", "public double energy(int x, int y) {\r\n validate(x, y);\r\n return energy[x][y];\r\n }", "public double[][][] getMatrix() {\n return matrix;\n }", "protected void expand() {\n matrix = matrix.power(e);\n }", "private Double[][] makeAdjacencyMatrix()\n {\n Double[][] matrix = new Double[this.numIntxns][this.numIntxns];\n\n for (int i = 0; i < this.numIntxns; i++)\n {\n for (int j = 0; j < this.numIntxns; j++)\n {\n // if the indices are the same the distance is 0.0.\n // otherwise, it's infinite.\n matrix[i][j] = (i != j) ? null : 0.0;\n }\n }\n\n // populate the matrix\n for (int intxn = 0; intxn < this.numIntxns; intxn++)\n {\n for (Road road : this.roads)\n {\n if (intxn == road.start())\n {\n matrix[intxn][road.end()] = road.length();\n matrix[road.end()][intxn] = road.length();\n }\n }\n }\n\n return matrix;\n }", "public double[] eigenValues(){\n if(!this.pcaDone)this.pca();\n return this.eigenValues;\n }", "public int[] findVerticalSeam() {\n\n int[] seam = new int[height()];\n\n // Tracks columns of least-energy seams.\n int[][] edgeTo = new int[width()][height()];\n\n // Store cumulative energy of the seams that go through each pixel.\n double[][] distTo = new double[width()][height()];\n\n // Initialize all distances to infinity, except top row.\n for (int col = 0; col < width(); col++) {\n for (int row = 0; row < height(); row++) {\n if (row == 0) distTo[col][row] = energy[col][row];\n else distTo[col][row] = Double.POSITIVE_INFINITY;\n }\n }\n\n // Builds least-energy seams through picture.\n for (int row = 1; row < height(); row++) {\n for (int col = 0; col < width(); col++) {\n\n if (col > 0 && distTo[col - 1][row] > (energy[col - 1][row]\n + distTo[col][row - 1])) {\n\n distTo[col - 1][row] = energy[col - 1][row] + distTo[col][row - 1];\n edgeTo[col - 1][row] = col;\n }\n if (distTo[col][row] > (energy[col][row] + distTo[col][row - 1])) {\n\n distTo[col][row] = energy[col][row] + distTo[col][row - 1];\n edgeTo[col][row] = col;\n }\n if (col < width() - 1 && distTo[col + 1][row] > (energy[col + 1][row]\n + distTo[col][row - 1])) {\n\n distTo[col + 1][row] = energy[col + 1][row] + distTo[col][row - 1];\n edgeTo[col + 1][row] = col;\n }\n }\n }\n // Find the end of the least total energy seam.\n double leastEnergy = Double.POSITIVE_INFINITY;\n for (int col = 0; col < width() - 1; col++) {\n double currentEnergy = distTo[col][height() - 1];\n if (currentEnergy < leastEnergy) {\n leastEnergy = currentEnergy;\n seam[height() - 1] = col;\n }\n }\n // Back-track from end of seam to beginning.\n for (int row = height() - 1; row > 0; row--) {\n seam[row - 1] = edgeTo[seam[row]][row];\n }\n return seam;\n }", "public Vector getImagEigenvalues() {\n return e;\n }", "public double getEnergy() { return energy; }", "public ArrayList<double[]> getMatrix() {\n return matrix;\n }", "public int[][] getMatriceAdjacence()\n {\n return matriceAdjacence;\n }", "public BoxModel getEnergyModel()\r\n/* 111: */ {\r\n/* 112:118 */ BoxModel boxes = new BoxModel();\r\n/* 113:119 */ boxes.add(new Box(0.1875F, 0.3125F, 0.3125F, 0.8125F, 0.6875F, 0.6875F));\r\n/* 114:120 */ boxes.add(new Box(0.3125F, 0.1875F, 0.3125F, 0.6875F, 0.8125F, 0.6875F));\r\n/* 115:121 */ boxes.add(new Box(0.3125F, 0.3125F, 0.1875F, 0.6875F, 0.6875F, 0.8125F));\r\n/* 116:122 */ boxes.add(new Box(0.25F, 0.25F, 0.25F, 0.75F, 0.75F, 0.75F));\r\n/* 117:123 */ return boxes;\r\n/* 118: */ }", "public double[][] getData() {\n\t\treturn mat_;\n\t}", "public int[][] getAdjacencyMatrix();", "public double getEnergy(){\n\t\t return energy;\n\t}", "int getSize(){\n return this.matrixSize;\n }", "public ArrayList<ArrayList<T>> getMatrix() {\n\t\treturn matrix;\n\t}", "public double getEnergy() {\n\t\treturn energy;\n\t}", "public double getEnergy() {\n\t\treturn _energy;\n\t}", "public Matrix getValue();", "@Override\n public Matrix dct(final MatrixView in) {\n check(in);\n double[][] out = new double[in.getRows()][in.getColumns()];\n double tmpm0 = 0, tmpm1 = 0, tmpm2 = 0, tmpm3 = 0, tmpm4 = 0, tmpm5 = 0, tmpm6 = 0, tmpm7 = 0;\n double tmpm20 = 0, tmpm21 = 0, tmpm22 = 0, tmpm23 = 0, tmpm24 = 0, tmpm25 = 0, tmpm26 = 0, tmpm27 = 0;\n\n for (int my = 0; my < in.getRows(); my += SIZE) {\n for (int mx = 0; mx < in.getColumns(); mx += SIZE) {\n\n for (int i = 0; i < SIZE; i++) { // HT\n\n tmpm0 = in.getInt(my + i, mx + 0);\n tmpm1 = in.getInt(my + i, mx + 1);\n tmpm2 = in.getInt(my + i, mx + 2);\n tmpm3 = in.getInt(my + i, mx + 3);\n tmpm4 = in.getInt(my + i, mx + 4);\n tmpm5 = in.getInt(my + i, mx + 5);\n tmpm6 = in.getInt(my + i, mx + 6);\n tmpm7 = in.getInt(my + i, mx + 7);\n\n tmpm20 = tmpm0 + tmpm7;\n tmpm27 = tmpm0 - tmpm7;\n tmpm21 = tmpm1 + tmpm6;\n tmpm26 = tmpm1 - tmpm6;\n tmpm22 = tmpm2 + tmpm5;\n tmpm25 = tmpm2 - tmpm5;\n tmpm23 = tmpm3 + tmpm4;\n tmpm24 = tmpm3 - tmpm4;\n\n double outmyi[] = out[my + i];\n\n tmpm0 = tmpm20 + tmpm23;\n tmpm1 = tmpm21 + tmpm22;\n tmpm2 = tmpm21 - tmpm22;\n tmpm3 = tmpm20 - tmpm23;\n tmpm4 = tmpm24;\n tmpm5 = (tmpm26 - tmpm25) * Z0;\n tmpm6 = (tmpm26 + tmpm25) * Z0;\n tmpm7 = tmpm27;\n outmyi[mx + 0] = (tmpm0 + tmpm1) * Z4;\n outmyi[mx + 4] = (tmpm0 - tmpm1) * Z4;\n outmyi[mx + 2] = (tmpm2 * Z6) + (tmpm3 * Z2);\n outmyi[mx + 6] = (tmpm3 * Z6) - (tmpm2 * Z2);\n tmpm24 = tmpm4 + tmpm5;\n tmpm27 = tmpm7 + tmpm6;\n tmpm25 = tmpm4 - tmpm5;\n tmpm26 = tmpm7 - tmpm6;\n outmyi[mx + 1] = (tmpm24 * Z7) + (tmpm27 * Z1);\n outmyi[mx + 5] = (tmpm25 * Z3) + (tmpm26 * Z5);\n outmyi[mx + 7] = (tmpm27 * Z7) - (tmpm24 * Z1);\n outmyi[mx + 3] = (tmpm26 * Z3) - (tmpm25 * Z5);\n }\n\n for (int i = 0; i < SIZE; i++) { // VT\n tmpm20 = out[my + 0][mx + i] + out[my + 7][mx + i];\n tmpm27 = out[my + 0][mx + i] - out[my + 7][mx + i];\n tmpm21 = out[my + 1][mx + i] + out[my + 6][mx + i];\n tmpm26 = out[my + 1][mx + i] - out[my + 6][mx + i];\n tmpm22 = out[my + 2][mx + i] + out[my + 5][mx + i];\n tmpm25 = out[my + 2][mx + i] - out[my + 5][mx + i];\n tmpm23 = out[my + 3][mx + i] + out[my + 4][mx + i];\n tmpm24 = out[my + 3][mx + i] - out[my + 4][mx + i];\n\n tmpm0 = tmpm20 + tmpm23;\n tmpm1 = tmpm21 + tmpm22;\n tmpm2 = tmpm21 - tmpm22;\n tmpm3 = tmpm20 - tmpm23;\n tmpm4 = tmpm24;\n tmpm5 = (tmpm26 - tmpm25) * Z0;\n tmpm6 = (tmpm26 + tmpm25) * Z0;\n tmpm7 = tmpm27;\n out[my + 0][mx + i] = (tmpm0 + tmpm1) * Z4;\n out[my + 4][mx + i] = (tmpm0 - tmpm1) * Z4;\n out[my + 2][mx + i] = (tmpm2 * Z6) + (tmpm3 * Z2);\n out[my + 6][mx + i] = (tmpm3 * Z6) - (tmpm2 * Z2);\n tmpm24 = tmpm4 + tmpm5;\n tmpm27 = tmpm7 + tmpm6;\n tmpm25 = tmpm4 - tmpm5;\n tmpm26 = tmpm7 - tmpm6;\n out[my + 1][mx + i] = (tmpm24 * Z7) + (tmpm27 * Z1);\n out[my + 5][mx + i] = (tmpm25 * Z3) + (tmpm26 * Z5);\n out[my + 7][mx + i] = (tmpm27 * Z7) - (tmpm24 * Z1);\n out[my + 3][mx + i] = (tmpm26 * Z3) - (tmpm25 * Z5);\n }\n }\n }\n\n return new DoubleMatrix(in.getRows(), in.getColumns(), out);\n }", "public double[][] eigenVectorsAsRows(){\n if(!this.pcaDone)this.pca();\n return this.eigenVectorsAsRows;\n }", "public double energy(int x, int y) {\n if (x < 0 || x >= width() || y < 0 || y >= height()) {\n throw new IllegalArgumentException(\"x, y outside picture boundary\");\n }\n return this.energy[x][y];\n }", "public Matrix RSW2ECI()\n\t{\n\t\tVectorN r = this.getR();\n\t\t//VectorN v = this.getV();\n\t\tVectorN h = this.getH();\n\t\tVectorN rhat = r.unitVector();\n\t\tVectorN what = h.unitVector();\n\t\tVectorN s = what.crossProduct(rhat);\n\t\tVectorN shat = s.unitVector();\n\t\tMatrix out = new Matrix(3, 3);\n\t\tout.setColumn(0, rhat);\n\t\tout.setColumn(1, shat);\n\t\tout.setColumn(2, what);\n\t\treturn out;\n\t}", "private List<Integer> getCells(Edge e) {\r\n\t\treturn getCells(e.getMBR());\r\n\t}", "public Energy getEnergy() {\n return energy;\n }", "MatrixElement(int edgesQuantity) {\r\n\t\tthis.edgesQuantity = edgesQuantity;\r\n\t}", "private Float[][] expandEntries(ArrayList<Float[][]> emb)\n {\n int rows = 0;\n for (int i = 0; i < emb.size(); i++)\n {\n rows += emb.get(i).length;\n }\n\n // Define the new array and assign the values\n int previous_size = 0;\n Float[][] all_emb = new Float[rows][512];\n for (Float[][] mat: emb)\n {\n for (int i = 0; i < mat.length; i++)\n {\n for (int j = 0; j < mat[i].length; j++)\n {\n all_emb[i + previous_size][j] = mat[i][j];\n }\n }\n previous_size += mat.length;\n }\n\n return all_emb;\n }", "public Matrix getBasis() {\n\t\treturn eigenvectors;\n\t}", "private double[][] calculateExafsEnergiesConstantKStep() {\n\t\tdouble lowK = evToK(cEnergy);\n\t\tdouble highK = evToK(finalEnergy);\n\t\tdouble[][] kArray = createStepArray(lowK, highK, exafsStep, exafsTime, true, numberDetectors);\n\t\t// convert from k to energy in each element\n\t\tfor (int i = 0; i < kArray.length; i++)\n\t\t\tkArray[i][0] = kToEv(kArray[i][0]);\n\t\treturn kArray;\n\t}", "public int[][] getMazeMatrix(){ return maze;}", "public long[] dimensions()\n\t{\n\t\tint dimcount=multimemory.dims.length;\n\t\tlong[] o=new long[dimcount];\n\t\tfor (int i=0; i<o.length; i++)\n\t\t{\n\t\t\to[i]=multimemory.dims[i];\n\t\t\t\n\t\t}\n\t\t\n\t\treturn o;\n\t}", "public List<Double> getEnergyDensityBand() {\n return energyDensityBand;\n }", "private void constructECMatrix() \n {\n final int COLUMNS = dimSquared * CONSTRAINTS;\n ecMatrix = new boolean[dimCubed][COLUMNS];\n int r, c, v, v1, v2;\n\n //Loop through each row of the ECM\n for(int i = 0; i < dimCubed; i++)\n {\n //Get the grid row, column and value for the current row in the ECM\n r = matrixRowToGridRow(i);\n c = matrixRowToGridCol(i);\n v = matrixRowToGridVal(i);\n //Loop through each column of the ECM\n for(int j = 0; j < COLUMNS; j++)\n {\n //Get the values for the current constraint column using j\n v1 = matrixColToV1(j);\n v2 = matrixColToV2(j);\n\n //Compare with the values for the current row, if equal set to true\n if(j < dimSquared) //Cell occupied constraint\n {\n if(v1 == r && v2 == c)\n {\n ecMatrix[i][j] = true;\n }\n }\n else if(j >= dimSquared && j < dimSquared * 2) //Row value constraint\n {\n if(v1 == r && v2 == v)\n {\n ecMatrix[i][j] = true;\n }\n }\n else if(j >= dimSquared * 2 && j < dimSquared * 3) //Column value constraint\n {\n if(v1 == c && v2 == v)\n {\n ecMatrix[i][j] = true;\n }\n }\n else if(j >= dimSquared * 3 && j < dimSquared * 4) //Box value constraint\n {\n if(v1 == getBox(r, c) && v2 == v)\n {\n ecMatrix[i][j] = true;\n }\n }\n }\n }\n }", "int getEnergy();", "public float [][] GetMatrix() {\n \n\t/*\n\tinputs--\n\t*/\n\t\n\t/*\n\toutputs--\n\t\n\tmat_f_m :\n\t The self matrix\n\t*/\n\t\n\treturn this.mat_f_m;\n \n }", "public int[] findVerticalSeam() {\n double[][] energyTo = new double[width][height]; // will hold smallest energy path to each entry\n int[] edgeTo = new int[height]; // will hold smallest energy path\n \n // initialiaze energy path array\n for (int j = 0; j < height(); j++) {\n for (int i = 0; i < width(); i++) {\n if (j == 0) {\n energyTo[i][j] = energy[i][j]; // top row has initial energyTo it equal to its energy\n }\n else\n energyTo[i][j] = Double.POSITIVE_INFINITY; // initialize every other value to Infinity\n }\n }\n \n // Calculate smallest energy path to each entry in energyTo array\n for (int y = 0; y < height(); y++) {\n for (int x = 0; x < width(); x++) {\n relax(x, y, energyTo, edgeTo);\n }\n }\n \n // find the seam with the smallest total energy\n findSeam(energyTo, edgeTo);\n \n return edgeTo;\n }", "public Matrix xMatrix(){\n if(!this.pcaDone)this.pca();\n double denom = this.nItems;\n if(!super.nFactorOption)denom -= 1.0;\n Matrix mat = dataMinusMeans.times(1.0/Math.sqrt(denom));\n return mat;\n }", "public double getFreeEnergy(){\n\n\t\tdouble freeEnergy = 0.;\n\n\t\tfor(int i = 0; i < this.layers[0].length; i++){\n\t\t\tfreeEnergy -= this.layers[0][i].getState()*this.layers[0][i].getBias();\n\t\t}\n\n\n\t\tfor(int j = 0; j < this.layers[1].length; j++){\n\t\t\tdouble x = this.layers[1][j].getBias();\n\t\t\t//System.out.println(\"x = \" + x);\n\t\t\tfor(int i = 0; i < this.layers[0].length; i++){\n\t\t\t\tx += this.layers[0][i].getState()*this.connections[i][j];\n\t\t\t\t/*System.out.println(\"1 = \" + this.layers[0][i].getState());\n\t\t\t\tSystem.out.println(\"2 = \" + this.connections[i][j]);\n\t\t\t\tSystem.out.println(\"x = \" + x);\n\t\t\t\tif(x != x){ this.layers[3] = null;}*/\n\t\t\t}\n\t\t\t//System.out.println(\"x = \" + x);\n\t\t\tfreeEnergy -= Math.log(1 + Math.exp(x));\n\t\t}\n\n\t\t/*\n\t\tfor(int j = 0; j < this.layers[1].length; j++){\n\t\t\tdouble x = this.layers[1][j].getBias();\n\t\t\tfor(int i = 0; i < this.layers[0].length; i++){\n\t\t\t\tx += this.layers[0][i].getState()*this.connections[i][j];\n\t\t\t}\n\t\t\tfreeEnergy -= x*Sigmoid.getINSTANCE().apply(x);\n\t\t}\n\n\t\tfor(int j = 0; j < this.layers[1].length; j++){\n\t\t\tdouble x = this.layers[1][j].getBias();\n\t\t\tfor(int i = 0; i < this.layers[0].length; i++){\n\t\t\t\tx += this.layers[0][i].getState()*this.connections[i][j];\n\t\t\t}\n\t\t\tdouble p = Sigmoid.getINSTANCE().apply(x);\n\t\t\tfreeEnergy += p*Math.log10(p) + (1. - p)*Math.log10(1. - p);\n\t\t}\n\t\t */\n\n\t\treturn freeEnergy;\n\t}", "public int[] eigenValueIndices(){\n if(!this.pcaDone)this.pca();\n return this.eigenValueIndices;\n }", "public static int[][] computeTable() {\n\t\tint [][] ret = new int[10][10];\n\t\tfor (int m = 0; m < 10; m++) {\n\t\t\tfor (int n = 0; n < 10; n++) {\n\t\t\t\tret[m][n] = m*n;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "public SimpleEVD<T> eig() {\n return new SimpleEVD(mat);\n }", "public double magnetization(){\n double total = 0;\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < m; j++) {\n total+=lattice[i][j];\n }\n }\n \n return total;\n }", "public int getEnergy()\n {\n return energy;\n }", "private void scanMatrixStructure() {\n dofs = computeDofs();\n nnz = computeNNZ();\n int[] IAaux = new int[nnz];\n JA = new int[nnz];\n HA = new double[nnz];\n\n IAaux[0] = 0;\n int si = 1;\n int sj = 0;\n blocks = new double[elems.length][][][];\n for (int i = 0; i < elems.length; i++) {\n Element elem = elems[i];\n int nBlockRow = 1; // number of blocks in a row\n for (int k = 0; k < elem.TT.length; k++) {\n if (elem.TT[k] > -1) {\n nBlockRow++;\n }\n }\n\n blocks[i] = new double[nBlockRow][][]; // alocation of row matrixes\n int[] indexes = new int[nBlockRow];\n blocks[i][0] = ((Implicit)elem.ti).ADiag;\n indexes[0] = elem.index;\n nBlockRow = 1;\n for (int k = 0; k < elem.TT.length; k++) {\n if (elem.TT[k] > -1) {\n blocks[i][nBlockRow] = ((Implicit)elem.ti).ANeighs[k].A;\n indexes[nBlockRow] = elems[elem.TT[k]].index;\n nBlockRow++;\n }\n }\n\n // sorting of matrix at rows acording to element indexes (bublesort)\n double[][] aux;\n int pom;\n for (int p = 0; p < nBlockRow - 1; p++) {\n for (int q = 0; q < nBlockRow - 1; q++) {\n if (indexes[q] > indexes[q + 1]) {\n aux = blocks[i][q];\n blocks[i][q] = blocks[i][q + 1];\n blocks[i][q + 1] = aux;\n pom = indexes[q];\n indexes[q] = indexes[q + 1];\n indexes[q + 1] = pom;\n }\n }\n }\n\n // create sparse structure\n int n = elem.getNEqs() * elem.nBasis;\n for (int k = 0; k < n; k++) {\n for (int q = 0; q < nBlockRow; q++) {\n int[] glob = elems[indexes[q]].gIndex;\n for (int j = 0; j < glob.length; j++) { // row cycle\n JA[sj] = glob[j];\n sj++;\n }\n }\n IAaux[si] = sj;\n si++;\n }\n }\n\n IA = new int[si];\n System.arraycopy(IAaux, 0, IA, 0, si);\n IAaux = null;\n\n // Find the indices to the diagonal entries for ILU(0)\n diagind = findDiagonalIndices(dofs, JA, IA);\n }", "public int getEnergy() {\n return energy;\n }", "@Override\n public byte[] getMatrix() {\n return luminances;\n }", "public int getEnergy() {\n\t\treturn energy;\n\t}", "public org.apache.spark.mllib.linalg.distributed.BlockMatrix cache () { throw new RuntimeException(); }", "private int[][] initialStateMatrix() {\n return new int[][]{{2,1,-1,3,0,-1},\n {2,-1,-1,3,-1,-1},\n {2,-1,5,4,8,-1},\n {4,-1,-1,-1,-1,-1},\n {4,-1,5,-1,8,-1},\n {7,6,-1,-1,-1,-1},\n {7,-1,-1,-1,-1,-1},\n {7,-1,-1,-1,8,-1},\n {-1,-1,-1,-1,8,-1}};\n }", "@Override\n public double getEnergyLevel() {\n return energy;\n }", "float[] getModelMatrix();", "public Matrix calculate();", "private double calcEnergy(int x, int y) {\n if (x == 0 || y == 0 || x == width - 1 || y == height - 1) return BORDER_ENERGY;\n return Math.sqrt(\n Math.pow(getRGBColor(x + 1, y, R) - getRGBColor(x - 1, y, R), 2)\n + Math.pow(getRGBColor(x + 1, y, G) - getRGBColor(x - 1, y, G), 2)\n + Math.pow(getRGBColor(x + 1, y, B) - getRGBColor(x - 1, y, B), 2)\n + Math.pow(getRGBColor(x, y + 1, R) - getRGBColor(x, y - 1, R), 2)\n + Math.pow(getRGBColor(x, y + 1, G) - getRGBColor(x, y - 1, G), 2)\n + Math.pow(getRGBColor(x, y + 1, B) - getRGBColor(x, y - 1, B), 2)\n );\n }", "@Override\n\tprotected int energyUnitsNeeded() {\n\t\tint incOrDecR = destRow > curRow ? 1 : -1, \n\t\t\tincOrDecC = destCol > curCol ? 1 : -1, \n\t\t\ttempRow=curRow, tempCol=curCol;\n\t\ttempRow+=(incOrDecR*diagonalCount());\n\t\ttempCol+=(incOrDecC*diagonalCount());\n\t\treturn diagonalCount() + Math.abs(tempRow-destRow)+\n\t\t\t\tMath.abs(tempCol-destCol);\n\t}", "private int size() {\n\treturn matrix.length; //# of rows\n }", "public void GE() {\n for (int pivot = 0; pivot < rowSize; pivot++) {\n if (matrix.get(pivot).get(pivot) < EPSILON) {\n for (int i = pivot + 1; i < rowSize; i++) {\n if (matrix.get(i).get(pivot) < EPSILON) {\n swapRow(pivot, i);\n break;\n }\n }\n }\n Vector<Double> row = matrix.get(pivot);\n int cores = Runtime.getRuntime().availableProcessors();\n ExecutorService threadPool = Executors.newFixedThreadPool(cores);\n Vector<TargetCell> cells = new Vector<>();\n int cellAmount = (rowSize - pivot - 1) * (colSize - pivot) / cores + 1;\n row = multiplyRow(row, 1 / row.get(pivot));\n for (int r = pivot + 1; r < rowSize; r++) {\n Double value = -1 * matrix.get(r).get(pivot) / row.get(pivot);\n for (int c = pivot; c < colSize; c++) {\n if (cells.size() >= cellAmount) {\n threadPool.submit(new GEThread(matrix, copy(cells)));\n cells.clear();\n }\n cells.add(new TargetCell(r, c, value));\n }\n }\n threadPool.shutdown();\n /*\n System.out.println();\n matrix.forEach((n) -> System.out.println(n));*/\n }\n }", "@Override\r\n\t\tpublic int cube() {\n\t\t\treturn width*width*width;\r\n\t\t}", "@Override\n public Matrix idct(final MatrixView in) {\n check(in);\n double[][] out = new double[in.getRows()][in.getColumns()];\n double tmp1, tmp2, tmp3, tmp4;\n double tmpm0 = 0, tmpm1 = 0, tmpm2 = 0, tmpm3 = 0, tmpm4 = 0, tmpm5 = 0, tmpm6 = 0, tmpm7 = 0;\n double tmpm20, tmpm21, tmpm22, tmpm23, tmpm24, tmpm25, tmpm26, tmpm27 = 0;\n double[] outtmpmyi = null;\n\n for (int my = 0; my < in.getRows(); my += SIZE) {\n for (int mx = 0; mx < in.getColumns(); mx += SIZE) {\n for (int i = 0; i < 8; i++) {\n outtmpmyi = out[my + i];\n\n tmpm0 = in.getDouble(my + i, mx + 0);\n tmpm1 = in.getDouble(my + i, mx + 1);\n tmpm2 = in.getDouble(my + i, mx + 2);\n tmpm3 = in.getDouble(my + i, mx + 3);\n tmpm4 = in.getDouble(my + i, mx + 4);\n tmpm5 = in.getDouble(my + i, mx + 5);\n tmpm6 = in.getDouble(my + i, mx + 6);\n tmpm7 = in.getDouble(my + i, mx + 7);\n\n tmp1 = (tmpm1 * Z7) - (tmpm7 * Z1);\n tmp4 = (tmpm7 * Z7) + (tmpm1 * Z1);\n tmp2 = (tmpm5 * Z3) - (tmpm3 * Z5);\n tmp3 = (tmpm3 * Z3) + (tmpm5 * Z5);\n\n tmpm20 = (tmpm0 + tmpm4) * Z4;\n tmpm21 = (tmpm0 - tmpm4) * Z4;\n tmpm22 = (tmpm2 * Z6) - (tmpm6 * Z2);\n tmpm23 = (tmpm6 * Z6) + (tmpm2 * Z2);\n tmpm4 = tmp1 + tmp2;\n tmpm25 = tmp1 - tmp2;\n tmpm26 = tmp4 - tmp3;\n tmpm7 = tmp4 + tmp3;\n\n tmpm5 = (tmpm26 - tmpm25) * Z0;\n tmpm6 = (tmpm26 + tmpm25) * Z0;\n tmpm0 = tmpm20 + tmpm23;\n tmpm1 = tmpm21 + tmpm22;\n tmpm2 = tmpm21 - tmpm22;\n tmpm3 = tmpm20 - tmpm23;\n\n outtmpmyi[mx + 0] = tmpm0 + tmpm7;\n outtmpmyi[mx + 7] = tmpm0 - tmpm7;\n outtmpmyi[mx + 1] = tmpm1 + tmpm6;\n outtmpmyi[mx + 6] = tmpm1 - tmpm6;\n outtmpmyi[mx + 2] = tmpm2 + tmpm5;\n outtmpmyi[mx + 5] = tmpm2 - tmpm5;\n outtmpmyi[mx + 3] = tmpm3 + tmpm4;\n outtmpmyi[mx + 4] = tmpm3 - tmpm4;\n\n }\n\n for (int i = 0; i < 8; i++) {\n\n tmpm0 = out[my + 0][mx + i];\n tmpm1 = out[my + 1][mx + i];\n tmpm2 = out[my + 2][mx + i];\n tmpm3 = out[my + 3][mx + i];\n tmpm4 = out[my + 4][mx + i];\n tmpm5 = out[my + 5][mx + i];\n tmpm6 = out[my + 6][mx + i];\n tmpm7 = out[my + 7][mx + i];\n\n tmp1 = (tmpm1 * Z7) - (tmpm7 * Z1);\n tmp4 = (tmpm7 * Z7) + (tmpm1 * Z1);\n tmp2 = (tmpm5 * Z3) - (tmpm3 * Z5);\n tmp3 = (tmpm3 * Z3) + (tmpm5 * Z5);\n\n tmpm20 = (tmpm0 + tmpm4) * Z4;\n tmpm21 = (tmpm0 - tmpm4) * Z4;\n tmpm22 = (tmpm2 * Z6) - (tmpm6 * Z2);\n tmpm23 = (tmpm6 * Z6) + (tmpm2 * Z2);\n tmpm4 = tmp1 + tmp2;\n tmpm25 = tmp1 - tmp2;\n tmpm26 = tmp4 - tmp3;\n tmpm7 = tmp4 + tmp3;\n\n tmpm5 = (tmpm26 - tmpm25) * Z0;\n tmpm6 = (tmpm26 + tmpm25) * Z0;\n tmpm0 = tmpm20 + tmpm23;\n tmpm1 = tmpm21 + tmpm22;\n tmpm2 = tmpm21 - tmpm22;\n tmpm3 = tmpm20 - tmpm23;\n\n out[my + 0][mx + i] = tmpm0 + tmpm7;\n out[my + 7][mx + i] = tmpm0 - tmpm7;\n out[my + 1][mx + i] = tmpm1 + tmpm6;\n out[my + 6][mx + i] = tmpm1 - tmpm6;\n out[my + 2][mx + i] = tmpm2 + tmpm5;\n out[my + 5][mx + i] = tmpm2 - tmpm5;\n out[my + 3][mx + i] = tmpm3 + tmpm4;\n out[my + 4][mx + i] = tmpm3 - tmpm4;\n }\n }\n }\n\n return new DoubleMatrix(in.getRows(), in.getColumns(), out);\n }", "public double[][][] getState() {\r\n return this.state;\r\n }", "public double[][] orderedEigenVectors(){\n if(!this.pcaDone)this.pca();\n return this.orderedEigenVectorsAsColumns;\n }", "public BitSet[] getAdjacencyMatrix() {\n\t\treturn adjacencyMatrix;\n\t}", "@java.lang.Override\n public int getEnergy() {\n return energy_;\n }", "protected int getEnergy() {\n\t\treturn energy;\n\t}", "public int[] findHorizontalSeam() \n {\n double[][] transNrgs = transpose(energiesArray());\n return findMinVertPath(transNrgs);\n }", "public int size() {\n return _matrix.length;\n }", "public RealMatrix eye(int dim) {\n\t\tRealMatrix m = new BlockRealMatrix(dim, dim);\n\t\tfor(int i = 0; i < dim; i++) {\n\t\t\tm.setEntry(i, i, 1);\n\t\t}\n\t\treturn m;\n\t}", "public LdpcMatrix(int width, int height) {\r\n this.width = width;\r\n this.height = height;\r\n this.matrix = new byte[height][width];\r\n populate(matrix);\r\n }", "protected abstract float[] computeLeafModelMatrix();", "public short[] get_entries_receiveEst() {\n short[] tmp = new short[11];\n for (int index0 = 0; index0 < numElements_entries_receiveEst(0); index0++) {\n tmp[index0] = getElement_entries_receiveEst(index0);\n }\n return tmp;\n }", "public int[] findVerticalSeam() {\n checkTransposed();\n int[] seam = new int[height];\n if (height <= 2) return seam;\n\n int[] edgeTo = new int[width * height];\n double[] distTo = new double[width * height];\n\n // Initiate distTo to Infinity\n for (int x = 0; x < width; x++) {\n for (int y = 1; y < height; y++) {\n distTo[xyTo1D(x, y)] = Double.POSITIVE_INFINITY;\n }\n }\n // You should not need recursion. Note that the underlying DAG has such special structure\n // that you don’t need to compute its topological order explicitly\n // Run BFS (topological sort) for the implicit DAG to search energy and save at distTo[]\n // The row-major or column-major traverse order make a difference here\n for (int y = 1; y < height; y++) {\n for (int x = 0; x < width; x++) {\n if (x > 0 && distTo[xyTo1D(x - 1, y)] > energy[xyTo1D(x - 1, y)] + distTo[xyTo1D(x, y - 1)]) {\n distTo[xyTo1D(x - 1, y)] = energy[xyTo1D(x - 1, y)] + distTo[xyTo1D(x, y - 1)];\n edgeTo[xyTo1D(x - 1, y)] = x;\n }\n if (distTo[xyTo1D(x, y)] > energy[xyTo1D(x, y)] + distTo[xyTo1D(x, y - 1)]) {\n distTo[xyTo1D(x, y)] = energy[xyTo1D(x, y)] + distTo[xyTo1D(x, y - 1)];\n edgeTo[xyTo1D(x, y)] = x;\n }\n if (x < width - 1 && distTo[xyTo1D(x + 1, y)] > energy[xyTo1D(x + 1, y)] + distTo[xyTo1D(x, y - 1)]) {\n distTo[xyTo1D(x + 1, y)] = energy[xyTo1D(x + 1, y)] + distTo[xyTo1D(x, y - 1)];\n edgeTo[xyTo1D(x + 1, y)] = x;\n }\n }\n }\n // Find the seam endpoint of minimum energy at the last line\n for (int x = 1; x < width - 1; x++) {\n if (distTo[xyTo1D(seam[height - 2], height - 2)] > distTo[xyTo1D(x, height - 2)]) {\n seam[height - 2] = x;\n }\n }\n // Use edgeTo to backtrack the path of minimum energy\n for (int y = height - 2; y > 0; y--) {\n seam[y - 1] = edgeTo[xyTo1D(seam[y], y)];\n }\n // Follow set at border of test examples\n // helpful to reset energy when shifting array elements\n // cutoff to be 0\n seam[height - 1] = Math.max(seam[height - 2] - 1, 0);\n return seam;\n }", "public int[] findVerticalSeam() {\n double minDist = Double.POSITIVE_INFINITY;\n int[] minPixel = new int[2];\n double[][] distToPixel = new double[width()][height()];\n HashMap<Integer, int[]> pixelToPixel = new HashMap<Integer, int[]>();\n for (double[] row : distToPixel) { Arrays.fill(row, Double.POSITIVE_INFINITY); }\n for (int i = 0; i < width(); i++) {\n distToPixel[i][0] = 0;\n }\n for (int y = 0; y < height() - 1; y++) {\n for (int x = 0; x < width(); x++) {\n\n for (int[] ap : adjacentPixels(x, y)) {\n if (distToPixel[ap[0]][ap[1]] > distToPixel[x][y] + energy(ap[0], ap[1])) {\n distToPixel[ap[0]][ap[1]] = distToPixel[x][y] + energy(ap[0], ap[1]);\n pixelToPixel.put(pixelHash(ap[0], ap[1]), new int[] { x, y });\n }\n }\n }\n }\n for (int i = 0; i < width(); i++) {\n if (distToPixel[i][height() - 1] < minDist) {\n minDist = distToPixel[i][height() - 1];\n minPixel = new int[] { i, height() - 1 };\n }\n }\n int[] outputSeam = new int[height()];\n Stack<Integer> pixPath = new Stack<Integer>();\n pixPath.push(minPixel[0]);\n int mp = pixelHash(minPixel[0], minPixel[1]);\n while (true) {\n int[] pixelArr = pixelToPixel.get(mp);\n if (pixelArr == null) { break; }\n pixPath.push(pixelArr[0]);\n mp = pixelHash(pixelArr[0], pixelArr[1]);\n }\n for (int i = 0; i < outputSeam.length; i++) { outputSeam[i] = pixPath.pop(); }\n return outputSeam;\n }", "private double[][] vett_mat( double[] d, double[] ds, double[] di, int n ) {\n double[][] A = new double[n][n];\n for( int i = 0; i < n; i++ ) {\n for( int j = 0; j < n; j++ )\n A[i][j] = 0.0;\n }\n A[0][1] = ds[0];\n A[n - 1][n - 2] = di[n - 2];\n for( int i = 0; i < n; i++ )\n A[i][i] = d[i];\n for( int i = 1; i < n - 1; i++ ) {\n A[i][i + 1] = ds[i];\n A[i][i - 1] = di[i - 1];\n }\n return A;\n }", "private Matrix33d getMatrix() {\n final Matrix33d m = new Matrix33d();\n m.setMatrixColumn(new Vector3d(V1), 0);\n m.setMatrixColumn(new Vector3d(V2), 1);\n m.setMatrixColumn(new Vector3d(V3), 2);\n return m;\n }", "public Matrix basis() {\r\n\t\treturn new Matrix(LeapJNI.Hand_basis(this.swigCPtr, this), true);\r\n\t}", "@Override\r\n double computeAccelerations() {\r\n double potentialEnergy;\r\n \r\n potentialEnergy = computeWallForces();\r\n assignMoleculesToCells(); \r\n potentialEnergy += computeForcesWithinCells();\r\n potentialEnergy += computeForcesWithNeighbourCells();\r\n \r\n return potentialEnergy;\r\n }", "public Matrix getMatrix() {\n\t\treturn matrix;\n\t}", "public ArrayList<String> getMatrixes() {\n ArrayList<String> matrixes = new ArrayList<>();\n getData(matrixes, \"getMatrixes\");\n return matrixes;\n }", "public int[] findVerticalSeam() \n {\n double[][] nrgs = energiesArray();\n return findMinVertPath(nrgs);\n }", "@Override\n\tpublic double[][] calc() {\n\t\tfor (int i=0; i<this.singleMatrix.length; i++) {\n\t\t\t\n\t\t\tfor (int j=0; j<this.singleMatrix[i].length; j++) {\n\t\t\t\t\n\t\t\t\tthis.inverse = new double[this.singleMatrix.length][this.singleMatrix[i].length];\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tif (this.det != 0) {\t//if determinant is not 0.\n\t\t\t\n\t\t\tfor (int i=0; i<this.singleMatrix.length; i++) {\t\n\t\t\t\t\n\t\t\t\tfor (int j=0; j<this.singleMatrix[i].length; j++) {\n\t\t\t\t\t\n\t\t\t\t\tthis.cT = new double[this.singleMatrix.length][this.singleMatrix[i].length];\t//declare the size of co-factor matrix transposed\n\n\t\t\t\t\tthis.cT[i][j] = this.coFactor[j][i];\t//the rows of cT = the cols of coFactor matrix. the cols of cT = the rows of coFactor matrix\n\t\t\t\t\t\n\t\t\t\t\t/* # you might want to initialize this.inverse and calculate right after the above cT calculation done as follow,\n\t\t\t\t\t \n\t\t\t\t\t \t--------------------------------------------------------------------------------------\n\t\t\t\t\t \t- this.inverse = new double[this.singleMatrix.length][this.singleMatrix[i].length]; -\n\t\t\t\t\t \t- this.inverse[i][j] = 1 / this.det * this.cT[i][j]; -\n\t\t\t\t\t \t--------------------------------------------------------------------------------------\n\t\t\t\t\t \n\t\t\t\t\t technically, it's not really a problem when it comes to initializing one more variable in the same loop.\n\t\t\t\t\t however, this specific situation, that three variables (coFacotr, cT and inverse) and their values are involved in, occurs an unexpected result which is still not an error.\n\t\t\t\t\t \n\t\t\t\t\t this.coFactor is done in a loop in initializing and calculating \n\t\t\t\t\t this.cT and this.inverse are done in a loop in initializing and calculating\n\t\t\t\t\t \n\t\t\t\t\t # thus, calculation goes as it goes and this.inverse will be kept initializing until the loop ends.\n\t\t\t\t\t this.inverse will then always & only store its running value at a current location depending on increment of i and j.\n\t\t\t\t\t you will see only one result at the last index and won't see all the values stored correctly.\n\t\t\t\t\t (all of the values will be zero except the last value at the last index)\n\t\t\t\t\t \n\t\t\t\t\t # one simple solution is to initialize and calculate a variable -inverse in this case- in a separate for-loop\n\t\t\t\t\t \n\t\t\t\t\t */\n\n\t\t\t\t\t//calculate inverse here but initialize it in another for-loop\n\t\t\t\t\tthis.inverse[i][j] = 1 / this.det * this.cT[i][j]; //formula: A-1 = 1 / det * cT\n\t\t\t\t}\t\n\t\t\t}\n\t\t\t\n\t\t}else {\t//det is 0\n\t\t\t\n\t\t\tSystem.out.println(\"\\nThe matrix is a singular. singular matrices can not have inverses.\");\n\t\t}\n\t\t\n\t\t//print\n\t\tSystem.out.println(\"\\nInverse of the current matrix is: \");\n\t\tfor (int i=0; i<this.singleMatrix.length; i++) {\n\t\t\t\t\t\n\t\t\tfor (int j=0; j<this.singleMatrix[i].length; j++) {\n\t\t \t\t\n\t\t\t\tSystem.out.print(String.format(\"%.2f\", this.inverse[i][j]) + \" \");\t//display the result with a space between value representing as two decimal point\n//\t\t\t\tSystem.out.print(this.inverse[i][j] + \" \");\t//display the result with a space between value representing as two decimal point\n\t\t\t}\n\t\tSystem.out.println();\t//a new line for the next row and cols\n\t\t}\n\t\t\n\t\treturn inverse;\t//return the value of inverse\n\t}", "public double energy(int x, int y) {\n if(x < 0 || x >= width() || y < 0 || y >= height()) {\n throw new IndexOutOfBoundsException();\n }\n if(x == 0 || x == width() - 1 || y == 0 || y == height() - 1) {\n return 1000;\n }\n\n int deltaX = del_energyCal(x + 1, y, x - 1, y);\n int deltaY = del_energyCal(x - 1, y, x - 1, y);\n \n double energy = Math.sqrt(deltaX + deltaY);\n return energy;\n }", "@java.lang.Override\n public int getEnergy() {\n return energy_;\n }", "public DistanceMatrix getDistanceMatrix() {\n\t\tsynchronized(this) {\n\t\t\treturn distanceMatrix;\n\t\t}\n\t}", "public static void matrixDis()\n\t{\n\t\t\n\t\tclade = clad[k];\n\t\t//System.err.println(\"\\n\\n\" + clade.cladeName);\n\n\t\tfor(c=0; c<clade.numSubClades; c++)\n\t\t{\n\t\t\tclade.Dc[c]=0;\n\t\t\tclade.Dn[c]=0;\n\t\t\t//clade.varDc[c]=0;\n\t\t\t//clade.varDn[c]=0;\n\t\t\tsum1 = sum2 = sum3 = 0;\n\t\t\tsumc1 = sumc2 = sumc3 = 0;\n\n\t\t\tfor(i=0; i<clade.numCladeLocations; i++) \t\n\t\t\t{\t\n\t\t\t\t\n\t\t\t\tsum2 += clade.obsMatrix[c][i] * (clade.obsMatrix[c][i]-1) / 2 ;\n\t\t\t\tsumc2 += (clade.obsMatrix[c][i] * (clade.obsMatrix[c][i]-1) / 2) + \n\t\t\t (clade.obsMatrix[c][i] * (clade.columnTotal[i] - clade.obsMatrix[c][i]));\t\n\t\t\t\n\t\t\t\tfor (j=0; j<clade.numCladeLocations; j++)\n\t\t\t\t{\t\n\t\t\t\t\tpopA = clade.cladeLocIndex[i];\n\t\t\t\t\tpopB = clade.cladeLocIndex[j];\n\t\t\t\t\t\n\t\t\t\t\tif (j != i)\n\t\t\t\t\t{\n\t\t\t\t\t\tsum1 += (double) clade.obsMatrix[c][i] * clade.obsMatrix[c][j] * distance[popA-1][popB-1];\n\t\t\t\t\t\tsum3 += clade.obsMatrix[c][i] * clade.obsMatrix[c][j];\t\t\t\n\t\t\t\t\t\tsumc1 += (double) clade.obsMatrix[c][i] * clade.columnTotal[j] * distance[popA-1][popB-1];\t\n\t\t\t\t\t\tsumc3 += clade.obsMatrix[c][i] * clade.columnTotal[j];\n\t\t\t\t\t\t//System.err.println(\"\\npopA = \" + popA + \" popB = \" + popB + \" dist= \" + distance[popA-1][popB-1]);\n\t\t\t\t\t\t//System.err.println(\"sumc1: \" + clade.obsMatrix[c][i] + \" * \" + clade.columnTotal[j] +\" * \" + distance[popA-1][popB-1] + \" = \" + sumc1); \n\t\t\t\t\t\t//System.err.println(\"\\nOBS[\" + c +\"][\" + i+ \"]= \" + clade.obsMatrix[c][i]); \n\t\t\t\t\t\t//System.err.println(\"\\nCT[\" + j +\"]= \" + clade.columnTotal[j]); \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} \n\n\t\t\t//System.err.println(\"\\nOBS[\" + c +\"][\" + i+ \"]= \" + clade.obsMatrix[c][i]); \n\t\t\n\t\t\t\n\t\t\tif (sum3 == 0.0)\n\t\t\t\tclade.Dc[c] = 0.0;\n\t\t\telse\n\t\t\t\tclade.Dc[c] = sum1 / (sum2 + sum3);\t\t\t\t\n\t\n\t\n\t\t\tif (sumc3 == 0.0)\n\t\t\t\tclade.Dn[c] = 0.0;\n\t\t\telse\n\t\t\t\tclade.Dn[c] = sumc1 / (sumc2 + sumc3);\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t//System.err.println(\"\\nClade \" + clade.cladeName + \" subclade \" + c + \n\t\t\t// \" Dc= \" + clade.Dc[c] + \" Dn= \" + clade.Dn[c]); \t\t\n\t\t\t//System.err.println(\"sum1= \" + sum1 + \" sum2= \" + sum2 + \" sum3= \" + sum3); \n\t\t\t//System.err.println(\"sumc1= \" + sumc1 + \" sumc2= \" + sumc2 + \" sumc3= \" + sumc3); \t\n\t\t}\t\t\n\n\t}", "public Matrix extract(){\r\n\t\t\r\n\t\tDouble[][] newVal = new Double[col][row - 1];\r\n\t\t\r\n\t\tfor(Double[] row: AllVal){\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}", "public int m(){\n int m = 0;\n // looping through adj matrix to check if edge.\n // increments counter if so.\n for (int i = 0; i < n; i++){\n for (int j = 0; j < n; j++){\n if (edges[i][j] > 0){\n m++;\n }\n }\n }\n return m / 2;\n }", "public float[] getInverseA(\n int na, int ka, float[][] u, float[][] f, float[][] g)\n {\n Check.argument(-na<ka,\"-na<ka\");\n Check.argument(ka<=0,\"ka<=0\");\n\n //Set default weights (equal weight to all samples)\n if (_weights==false) {\n int nf = f.length;\n _w1D = fillfloat(1.0f,nf);\n }\n\n Stopwatch sw = new Stopwatch(); \n sw.start();\n DMatrix z = computeZ(na,ka,u,f,g);\n sw.stop();\n System.out.println(\"time = \"+sw.time());\n _z = z;\n \n float[] a = new float[na];\n DMatrixEvd evd = new DMatrixEvd(z);\n double[][][] eigvalvect = sort(evd.getD().get(), evd.getV().get());\n _eigval = eigvalvect[0];\n _eigvect = eigvalvect[1];\n //System.out.println(\"z\");\n //System.out.println(z.toString());//Smallest eigenvalue position (0,0) in D\n //System.out.println(\"V\");\n //System.out.println(evd.getV().toString());//Smallest eigenvalue position (0,0) in D\n //System.out.println(evd.getV().get(0,1));//Smallest eigenvalue position (0,0) in D\n //System.out.println(\"D\");\n //System.out.println(evd.getD().toString());//Smallest eigenvalue position (0,0) in D\n //System.out.println(evd.getD().get(0,0));\n //_eigval = evd.getD().get();//eigvalvect[0];\n //_eigvect = evd.getV().get();//eigvalvect[1];\n //dump(_eigval);\n\n for (int i=0; i<na; ++i) {\n a[i] = (float) _eigvect[i][0];\n }\n _a = a;\n\n return a;\n }" ]
[ "0.68820417", "0.6520632", "0.61845994", "0.61262", "0.5963668", "0.58535475", "0.57090837", "0.5703172", "0.5644793", "0.5577598", "0.5576888", "0.5573606", "0.55491614", "0.55319315", "0.54982835", "0.54946655", "0.54936135", "0.5493526", "0.54884315", "0.546962", "0.5455795", "0.5426166", "0.5414717", "0.5404458", "0.54021627", "0.53977305", "0.53822064", "0.53750294", "0.5374819", "0.53621644", "0.533186", "0.5324564", "0.53198886", "0.5311666", "0.53010374", "0.52790475", "0.52766335", "0.5276606", "0.5275613", "0.526762", "0.5252717", "0.5251162", "0.52418244", "0.5222522", "0.5221609", "0.5212803", "0.5205402", "0.5192716", "0.518955", "0.5189205", "0.5188824", "0.51849407", "0.5166794", "0.5163649", "0.5162678", "0.5161002", "0.51601136", "0.5152913", "0.5133704", "0.5117762", "0.5116064", "0.50917494", "0.5081104", "0.50740147", "0.5070027", "0.5069703", "0.5061074", "0.5052504", "0.50455123", "0.5027703", "0.5023024", "0.50209016", "0.50167453", "0.5013702", "0.49970192", "0.4994555", "0.49844947", "0.49820128", "0.4976209", "0.4975462", "0.49740988", "0.49715418", "0.49651828", "0.4960852", "0.49587527", "0.49547726", "0.49502635", "0.49461418", "0.49447864", "0.494297", "0.49361795", "0.49356353", "0.49331734", "0.49235165", "0.4917396", "0.4906451", "0.49058488", "0.4905086", "0.4897216", "0.4893202" ]
0.85247165
0
Removes a horizontal seam. Time complexity is O(N ^ 2)
public void removeHorizontalSeam(final int[] seam) { if (height() <= 1 || !isValid(seam, width(), height() - 1)) { throw new java.lang.IllegalArgumentException( "IllegalArgumentException"); } Picture picture1 = new Picture(width(), height() - 1); for (int wi = 0; wi < width(); wi++) { for (int hei = 0; hei < seam[wi]; hei++) { picture1.set(wi, hei, this.pict.get(wi, hei)); } for (int hei = seam[wi] + 1; hei < height(); hei++) { picture1.set(wi, hei - 1, this.pict.get(wi, hei)); } } this.pict = picture1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeHorizontalSeam(int[] a) {\n // Check there are seams to remove\n if (current.height() <= 1)\n throw new IllegalArgumentException(\"Current height <= 1\");\n // Check the seam is of height length and inside bounds\n if (a.length != current.width())\n throw new IllegalArgumentException(\"Seam is not complete\");\n for (int i = 0; i < a.length; i++) {\n if (a[i] < 0 || a[i] >= current.height()) {\n throw new IllegalArgumentException(\"Seam out of bounds\");\n }\n }\n // Check the seam elements have distance of one\n for (int i = 1; i < a.length; i++) {\n if (Math.abs(a[i - 1] - a[i]) > 1)\n throw new IllegalArgumentException(\n \"Too much distance in the seam\");\n }\n\n Picture newPicture = new Picture(current.width(), current.height() - 1);\n for (int i = 0; i < current.width(); i++) {\n int removedY = a[i];\n int posY = 0;\n for (int j = 0; j < current.height(); j++) {\n if (j != removedY) {\n newPicture.set(i, posY, current.get(i, j));\n posY++;\n }\n }\n }\n\n current = newPicture;\n }", "public void removeHorizontalSeam(int[] seam) {\n\n transpose();\n removeVerticalSeam(seam);\n transpose();\n }", "public void removeHorizontalSeam(int[] seam) {\n if (seam == null) { throw new NullPointerException(\"seam can't be null\"); }\n if (!validSeam(seam, false)) { throw new IllegalArgumentException(\"invalid seam\"); }\n if (height() <= 1) { throw new IllegalArgumentException(\"too short\"); }\n\n picture = flip(picture);\n removeVerticalSeam(seam);\n picture = flip(picture);\n }", "public void removeHorizontalSeam(int[] seam) {\r\n validateHorizSeam(seam);\r\n Picture newPic = new Picture(width, --height);\r\n for (int col = 0; col < width; col++) {\r\n for (int row = 0; row < height; row++) {\r\n if (row < seam[col]) {\r\n newPic.set(col, row, pic.get(col, row));\r\n energy[col][row] = energy[col][row];\r\n }\r\n else {\r\n newPic.set(col, row, pic.get(col, row + 1));\r\n energy[col][row] = energy[col][row + 1];\r\n }\r\n }\r\n }\r\n\r\n pic = newPic;\r\n\r\n for (int col = 0; col < width; col++) {\r\n if (seam[col] > 0) energy[col][seam[col] - 1] = calcEnergy(col, seam[col] - 1);\r\n if (seam[col] < height - 1) energy[col][seam[col]] = calcEnergy(col, seam[col]);\r\n }\r\n }", "void removeNextSeamHoriz() {\n\n SeamInfo toRemove = this.curLowest;\n\n toRemove.removeSeamHoriz();\n\n if (toRemove.containsPixel(this.curPixel)) {\n this.curPixel = this.curPixel.down;\n }\n\n this.removedSeams.add(toRemove);\n\n this.draw();\n\n }", "public void removeHorizontalSeam(int[] seam) {\n //handle exceptions\n for (int columns = 0; columns < width; columns++) {\n for (int rows = seam[columns]; rows < height - 1; rows++) {\n this.pic.set(columns, rows, this.pic.get(columns, rows + 1));\n }\n }\n height--;\n }", "public void removeHorizontalSeam(int[] seam) {\n if (seam == null)\n throw new java.lang.IllegalArgumentException(\"null seam\");\n if (seam.length != width())\n throw new java.lang.IllegalArgumentException(\"invalid seam length\");\n if (!validateSeam(seam))\n throw new java.lang.IllegalArgumentException(\"invalid seam\");\n transpose();\n removeVerticalSeam(seam);\n transpose();\n }", "public void removeHorizontalSeam(int[] seam) {\n isHorizontalCall = true;\n checkTransposed();\n validate(seam);\n removeVerticalSeam(seam);\n isHorizontalCall = false;\n }", "public void removeVerticalSeam(int[] seam) {\n\n validate(seam);\n\n // Remove the seam.\n for (int row = 0; row < height(); row++) {\n\n // Disregard right border pixel, 'width--' will ignore it.\n if (!(seam[row] == width() - 1)) {\n\n // For pixels to the right of the seam, move left by 1.\n for (int col = seam[row]; col < width() - 1; col++) {\n rgb[col][row] = rgb[col + 1][row];\n }\n }\n }\n width--;\n\n // Update energy for pixels adjacent to the removed seam.\n for (int row = 1; row < height - 1; row++) {\n if (seam[row] > 1) {\n energy[seam[row] - 1][row] = calcPixelEnergy(seam[row] - 1, row);\n }\n if (seam[row] < width - 1) {\n energy[seam[row]][row] = calcPixelEnergy(seam[row], row);\n }\n }\n }", "public void removeVerticalSeam(int[] seam) {\n if (seam == null) { throw new NullPointerException(\"seam can't be null\"); }\n if (!validSeam(seam, true)) { throw new IllegalArgumentException(\"invalid seam\"); }\n if (width() <= 1) { throw new IllegalArgumentException(\"too narrow\"); }\n\n for (int row = 0; row < height(); row++) {\n int[] temp = new int[colorArray[row].length - 1];\n System.arraycopy(colorArray[row], 0, temp, 0, temp.length);\n System.arraycopy(colorArray[row], seam[row] + 1, temp, seam[row], colorArray[row].length - seam[row] - 1);\n colorArray[row] = temp;\n }\n width--;\n\n }", "public void removeHorizontalSeam(int[] seam) {\n if (seam == null) {\n throw new IllegalArgumentException(\"Null horizontal seam\");\n }\n\n if (picture().width() <= 1) {\n throw new IllegalArgumentException(\"Picture too small\");\n }\n }", "public void removeHorizontalSeam(int[] seam) {\n Picture original = picture;\n Picture transpose = new Picture(original.height(), original.width());\n\n for (int w = 0; w < transpose.width(); w++) {\n for (int h = 0; h < transpose.height(); h++) {\n transpose.set(w, h, original.get(h, w));\n }\n }\n\n this.picture = transpose;\n transpose = null;\n original = null;\n\n // call removeVerticalSeam\n removeVerticalSeam(seam);\n\n // Transpose back.\n original = picture;\n transpose = new Picture(original.height(), original.width());\n\n for (int w = 0; w < transpose.width(); w++) {\n for (int h = 0; h < transpose.height(); h++) {\n transpose.set(w, h, original.get(h, w));\n }\n }\n\n this.picture = transpose;\n transpose = null;\n original = null;\n }", "public void removeHorizontalSeam(int[] seam) {\n if (seam == null) {\n throw new NullPointerException();\n }\n\n if (seam.length != width()) {\n throw new IllegalArgumentException();\n }\n\n Picture original = this.pic;\n Picture carvedPic = new Picture(original.width() , original.height()-1);\n\n for (int h = 0; h < carvedPic.width(); h++) {\n for (int w = 0; w < seam[h]; w++) {\n carvedPic.set(h,w, original.get(h,w));\n }\n for (int w = seam[h]; w < carvedPic.height()-1; w++) {\n carvedPic.set(h,w, original.get(h,w+1));\n }\n }\n\n this.pic = carvedPic;\n \n width = pic.width();\n height = pic.height();\n }", "public void removeVerticalSeam(int[] a) {\n // Check there are seams to remove\n if (current.width() <= 1)\n throw new IllegalArgumentException(\"Current width <= 1\");\n // Check the seam is of height length and inside bounds\n if (a.length != current.height())\n throw new IllegalArgumentException(\"Seam is not complete\");\n for (int i = 0; i < a.length; i++) {\n if (a[i] < 0 || a[i] >= current.width()) {\n throw new IllegalArgumentException(\"Seam out of bounds\");\n }\n }\n // Check the seam elements have distance of one\n for (int i = 1; i < a.length; i++) {\n if (Math.abs(a[i - 1] - a[i]) > 1)\n throw new IllegalArgumentException(\n \"Too much distance in the seam\");\n }\n\n Picture newPicture = new Picture(current.width() - 1, current.height());\n for (int j = 0; j < current.height(); j++) {\n int removedX = a[j];\n int posX = 0;\n for (int i = 0; i < current.width(); i++) {\n if (i != removedX) {\n newPicture.set(posX, j, current.get(i, j));\n posX++;\n }\n }\n }\n\n current = newPicture;\n }", "public void removeVerticalSeam(int[] seam) {\n checkTransposed();\n validate(seam);\n // Fail to make this method transpose-agnostic as the use of 1D representation does not\n // allow System.arraycopy() in calls from removeHorizontalSeam().\n // Compared to 2D representation, 1D reduces the transpose overhead of swapping [x][y],\n // yet introduces function call overhead to xyTo1D() and complex like xyTo1DAfterwards().\n // In all, 1D array representation is not recommended to implement.\n if (!isTransposed) {\n for (int y = 0; y < height; y++) {\n System.arraycopy(pic, xyTo1D(seam[y], y) + 1, pic, xyTo1DAfterwards(seam[y], y),\n width - seam[y] - 1 + (y < height - 1 ? seam[y + 1] : 0));\n System.arraycopy(energy, xyTo1D(seam[y], y) + 1, energy, xyTo1DAfterwards(seam[y], y),\n width - seam[y] - 1 + (y < height - 1 ? seam[y + 1] : 0));\n // Corner case when (0, y) is at seam\n // seam[y] must not reach (width - 1), as we shift seam at border smaller by 1\n if (seam[y] == 0) energy[xyTo1DAfterwards(0, y)] = BORDER_ENERGY;\n }\n } else {\n for (int y = 0; y < height; y++) {\n for (int x = 0; x < width; x++) {\n if (x > seam[y]) {\n pic[xyTo1D(x - 1, y)] = pic[xyTo1D(x, y)];\n energy[xyTo1D(x - 1, y)] = energy[xyTo1D(x, y)];\n }\n }\n if (seam[y] == 0) energy[xyTo1D(0, y)] = BORDER_ENERGY;\n }\n }\n width--;\n // Recalculate the energies only for the pixels along the seam that was just removed\n for (int y = 1; y < height - 1; y++) {\n if (seam[y] > 1) energy[xyTo1D(seam[y] - 1, y)] = calcEnergy(seam[y] - 1, y);\n if (seam[y] < width - 1) energy[xyTo1D(seam[y], y)] = calcEnergy(seam[y], y);\n }\n }", "public void removeVerticalSeam(int[] seam) {\n for (int rows = 0; rows < height; rows++) {\n for (int columns = seam[rows]; columns < width - 1; columns++) {\n this.pic.set(columns, rows, this.pic.get(columns + 1, rows));\n }\n }\n width--;\n }", "void removeNextSeamVert() {\n SeamInfo toRemove = this.curLowest;\n\n toRemove.removeSeamVert();\n\n if (toRemove.containsPixel(this.curPixel)) {\n\n this.curPixel = this.curPixel.right;\n }\n\n this.removedSeams.add(toRemove);\n\n this.draw();\n }", "public void removeVerticalSeam(int[] seam) {\r\n\r\n validateVertSeam(seam);\r\n Picture newPic = new Picture(--width, height);\r\n for (int col = 0; col < width; col++) {\r\n for (int row = 0; row < height; row++) {\r\n if (col < seam[row]) {\r\n newPic.set(col, row, pic.get(col, row));\r\n energy[col][row] = energy[col][row];\r\n }\r\n else {\r\n newPic.set(col, row, pic.get(col + 1, row));\r\n energy[col][row] = energy[col + 1][row];\r\n }\r\n }\r\n }\r\n\r\n pic = newPic;\r\n\r\n for (int row = 0; row < height; row++) {\r\n if (seam[row] > 0) energy[seam[row] - 1][row] = calcEnergy(seam[row] - 1, row);\r\n if (seam[row] < width - 1) energy[seam[row]][row] = calcEnergy(seam[row], row);\r\n }\r\n\r\n }", "public void removeHorizontalSeam(int[] a) \n {\n if (height() <= 1 || !isValidSeam(a, width(), height()-1))\n throw new java.lang.IllegalArgumentException();\n Picture pic = new Picture(width(), height()-1);\n for (int w = 0; w < width(); w++)\n {\n for (int h = 0; h < a[w]; h++)\n pic.set(w, h, this.picture.get(w, h));\n \n for (int h = a[w]+1; h < height(); h++)\n pic.set(w, h-1, this.picture.get(w, h));\n \n }\n this.picture = pic;\n }", "public void removeVerticalSeam(int[] seam) {\n if (seam == null) {\n throw new IllegalArgumentException(\"Null horizontal seam\");\n }\n\n if (picture().height() <= 1) {\n throw new IllegalArgumentException(\"Picture too small\");\n }\n }", "public void removeVerticalSeam(int[] seam) {\n if (seam == null)\n throw new java.lang.IllegalArgumentException(\"null seam\");\n if (seam.length != height())\n throw new java.lang.IllegalArgumentException(\"invalid seam length\");\n if (!validateSeam(seam))\n throw new java.lang.IllegalArgumentException(\"invalid seam\");\n Picture p = new Picture(width - 1, height);\n for (int y = 0; y < height(); y++) {\n int k = 0;\n for (int x = 0; x < width(); x++) {\n if (x != seam[y]) {\n p.set(k, y, pic.get(x, y));\n k++;\n }\n }\n }\n this.pic = p;\n width = pic.width();\n height = pic.height();\n }", "public int[] findHorizontalSeam() {\r\n int[] seam = new int[width]; // seam length is same as the width of pic\r\n double distance = Double.POSITIVE_INFINITY;\r\n double[][] distTo = new double[width][height];\r\n Point[][] edgeTo = new Point[width][height]; //from each point i know the latest point\r\n\r\n\r\n for (int col = 0; col < width; col++)\r\n for (int row = 0; row < height; row++)\r\n if (col == 0) distTo[col][row] = 0;\r\n else distTo[col][row] = Double.POSITIVE_INFINITY;\r\n\r\n\r\n\r\n for (int col = 0; col < width; col++) {\r\n for (int row = 0; row < height; row++) {\r\n Point p = new Point(col, row); // initialize the point.\r\n\r\n for (Point adj : getAdjHoriz(p)) {\r\n if (distTo[adj.x][adj.y] > distTo[p.x][p.y] + energy[p.x][p.y]) {\r\n distTo[adj.x][adj.y] = distTo[p.x][p.y] + energy[p.x][p.y]; // the first row of point is distto array is 0 ( 0 + energy)\r\n edgeTo[adj.x][adj.y] = p;\r\n if (adj.x == width - 1 && distTo[adj.x][adj.y] < distance) { // i pick the best seam from the distance\r\n distance = distTo[adj.x][adj.y];\r\n for (int count = width; adj != null; adj = edgeTo[adj.x][adj.y])\r\n seam[--count] = adj.y;\r\n }\r\n }\r\n }\r\n\r\n }\r\n }\r\n return seam;\r\n }", "public void removeVerticalSeam(int[] seam) {\n if (seam == null) {\n throw new NullPointerException();\n }\n\n if (seam.length != height()) {\n throw new IllegalArgumentException();\n }\n\n Picture original = this.picture;\n Picture seamed = new Picture(original.width() - 1, original.height());\n\n for (int h = 0; h < seamed.height(); h++) {\n for (int w = 0; w < seam[h]; w++) {\n seamed.set(w, h, original.get(w, h));\n }\n for (int w = seam[h]; w < seamed.width(); w++) {\n seamed.set(w, h, original.get(w + 1, h));\n }\n }\n this.picture = seamed;\n }", "void removeHoriz(Pixel toRemove) {\n\n if (this.right == toRemove) {\n if (toRemove.up != null) {\n toRemove.up.down = toRemove.down;\n }\n if (toRemove.down != null) {\n toRemove.down.up = toRemove.up;\n }\n }\n\n else if (this.topRight() == toRemove) {\n if (toRemove.up != null) {\n toRemove.up.down = toRemove.down;\n }\n if (toRemove.down != null) {\n toRemove.down.up = toRemove.up;\n }\n if (toRemove.down != null) {\n toRemove.down.left = toRemove.left;\n }\n if (toRemove.left != null) {\n toRemove.left.right = toRemove.down;\n }\n }\n else if (this.downRight() == toRemove) {\n if (toRemove.up != null) {\n toRemove.up.down = toRemove.down;\n }\n if (toRemove.down != null) {\n toRemove.down.up = toRemove.up;\n }\n if (toRemove.up != null) {\n toRemove.up.left = toRemove.left;\n }\n if (toRemove.left != null) {\n toRemove.left.right = toRemove.up;\n }\n }\n else {\n throw new RuntimeException(\"Illegal disconnected seam\");\n }\n }", "public int[] findHorizontalSeam() {\n int[][] edgeTo = new int[height][width];\n double[][] distTo = new double[height][width];\n reset(distTo);\n for (int rows = 0; rows < height; rows++) {\n distTo[rows][0] = 1000;\n }\n // this is for relaxation.\n for (int columns = 0; columns < width - 1; columns++) {\n for (int rows = 0; rows < height; rows++) {\n relaxHorizontal(rows, columns, edgeTo, distTo);\n }\n }\n double minDist = Double.MAX_VALUE;\n int minRow = 0;\n for (int rows = 0; rows < height; rows++) {\n if (minDist > distTo[rows][width - 1]) {\n minDist = distTo[rows][width - 1];\n minRow = rows;\n }\n }\n int[] indices = new int[width];\n //to find the horizontal seam.\n for (int columns = width - 1, rows = minRow; columns >= 0; columns--) {\n indices[columns] = rows;\n rows -= edgeTo[rows][columns];\n }\n return indices;\n }", "public void RemoveRowsIfStackedTooHigh() {\n \t\t\n while (rowHasBlocks(Parameters.RemoveBiggestPartialRowIfBlockInRow)) {\n int NoOfPiecesRemoved = \n eraseBiggestRowGreaterThan(Parameters.RemoveBiggestPartialRowIfBlockInRow);\n //remove points for each empty square\n ComputeScoreAndDelay(-(COLUMNS - NoOfPiecesRemoved) * Parameters.PointsSubtractedPerEmptySpaceFromPartialRow);\n \n }\n game_grid.repaint();\n LogEvent(\"row_removed\");\n }", "public void removeVerticalSeam(int[] seam) {\n if (seam == null) {\n throw new NullPointerException();\n }\n\n if (seam.length != height()) {\n throw new IllegalArgumentException();\n }\n\n Picture original = this.pic;\n Picture carvedPic = new Picture(original.width() - 1, original.height());\n\n for (int h = 0; h < carvedPic.height(); h++) {\n for (int w = 0; w < seam[h]; w++) {\n carvedPic.set(w, h, original.get(w, h));\n }\n for (int w = seam[h]; w < carvedPic.width(); w++) {\n carvedPic.set(w, h, original.get(w + 1, h));\n }\n }\n\n this.pic = carvedPic;\n \n width = pic.width();\n height = pic.height();\n }", "public void removeVerticalSeam(int[] a) \n {\n if (width() <= 1 || !isValidSeam(a, height(), width()))\n throw new java.lang.IllegalArgumentException();\n Picture pic = new Picture(width()-1, height());\n \n for (int h = 0; h < height(); h++)\n { \n for (int w = 0; w < a[h]; w++)\n pic.set(w, h, this.picture.get(w, h)); \n \n for (int w = a[h]+1; w < width(); w++) \n pic.set(w-1, h, this.picture.get(w, h)); \n \n }\n this.picture = pic;\n }", "public void removeVerticalSeam(final int[] seam) {\n if (width() <= 1 || !isValid(seam, height(), width())) {\n throw new java.lang.IllegalArgumentException(\n \"IllegalArgumentException\");\n }\n Picture picture2 = new Picture(width() - 1, height());\n for (int hei = 0; hei < height(); hei++) {\n for (int wi = 0; wi < seam[hei]; wi++) {\n picture2.set(wi, hei, this.pict.get(wi, hei));\n }\n for (int wi = seam[hei] + 1; wi < width(); wi++) {\n picture2.set(wi - 1, hei, this.pict.get(wi, hei));\n }\n }\n this.pict = picture2;\n }", "public int[] findHorizontalSeam() {\n picture = flip(picture);\n int[] horizontalSeam = findVerticalSeam();\n picture = flip(picture);\n return horizontalSeam;\n }", "public int[] findHorizontalSeam() {\n int[][] matrixTo = new int[height()][width()];\n double[][] energyMatrix = new double[height()][width()];\n //reset(energyMatrix);\n\n for(int i = 0; i < energyMatrix.length; i++) {\n for(int j = 0; j < energyMatrix[i].length; j++) {\n energyMatrix[i][j] = Double.MAX_VALUE;\n }\n }\n\n for (int row = 0; row < height(); row++) {\n energyMatrix[row][0] = 1000;\n }\n // this is for relaxation.\n for (int col = 0; col < width() - 1; col++) {\n for (int row = 0; row < height(); row++) {\n //relaxH(row, col, matrixTo, energyMatrix);\n int nextcol = col + 1;\n for (int i = -1; i <= 1; i++) {\n int nextrow = row + i;\n if (nextrow < 0 || nextrow >= height()) continue;\n if(i == 0) {\n if(energyMatrix[nextrow][nextcol] >= energyMatrix[row][col] + energy(nextcol, nextrow)) {\n energyMatrix[nextrow][nextcol] = energyMatrix[row][col] + energy(nextcol, nextrow);\n matrixTo[nextrow][nextcol] = i;\n }\n }\n if (energyMatrix[nextrow][nextcol] > energyMatrix[row][col] + energy(nextcol, nextrow)) {\n energyMatrix[nextrow][nextcol] = energyMatrix[row][col] + energy(nextcol, nextrow);\n matrixTo[nextrow][nextcol] = i;\n }\n }\n\n }\n }\n\n double minDist = Double.MAX_VALUE;\n int minRow = 0;\n for (int row = 0; row < height(); row++) {\n if (minDist > energyMatrix[row][width() - 1]) {\n minDist = energyMatrix[row][width() - 1];\n minRow = row;\n }\n }\n\n int[] indices = new int[width()];\n for (int col = width() - 1, row = minRow; col >= 0; col--) {\n indices[col] = row;\n row -= matrixTo[row][col];\n }\n return indices;\n }", "public void Remove(int row, int column) {\n if (row < 0 || column < 0 || row > (numberOfRows - 1) || column > (numberOfColumns - 1)\n || grid[row][column] != LASER) {\n message = (\"Error removing laser at: (\" + row + \", \" + column + \")\");\n } else {\n grid[row][column] = EMPTY;\n // Remove a laser beam to the North direction until we reach a pillar or the top\n for (int i = row - 1; i >= 0; i--) {\n if (grid[i][column] == X || grid[i][column] == ZERO ||\n grid[i][column] == ONE || grid[i][column] == TWO ||\n grid[i][column] == THREE || grid[i][column] == FOUR ||\n grid[i][column] == LASER) {\n break;\n } else {\n grid[i][column] = EMPTY;\n }\n }\n // Remove a laser beam to the South direction until we reach a pillar or the bottom\n for (int i = row + 1; i < numberOfRows; i++) {\n if (grid[i][column] == X || grid[i][column] == ZERO ||\n grid[i][column] == ONE || grid[i][column] == TWO ||\n grid[i][column] == THREE || grid[i][column] == FOUR ||\n grid[i][column] == LASER) {\n break;\n } else {\n grid[i][column] = EMPTY;\n }\n }\n // Remove a laser beam to the West direction until we reach a pillar or the left corner\n for (int i = column - 1; i >= 0; i--) {\n if (grid[row][i] == X || grid[row][i] == ZERO ||\n grid[row][i] == ONE || grid[row][i] == TWO ||\n grid[row][i] == THREE || grid[row][i] == FOUR ||\n grid[row][i] == LASER) {\n break;\n } else {\n grid[row][i] = EMPTY;\n }\n }\n // Remove a laser beam to the East direction until we reach a pillar or the right direction\n for (int i = column + 1; i < numberOfColumns; i++) {\n if (grid[row][i] == X || grid[row][i] == ZERO ||\n grid[row][i] == ONE || grid[row][i] == TWO ||\n grid[row][i] == THREE || grid[row][i] == FOUR ||\n grid[row][i] == LASER) {\n break;\n } else {\n grid[row][i] = EMPTY;\n }\n }\n for (int k = 0; k < numberOfRows; k++) {\n for (int j = 0; j < numberOfColumns; j++ ) {\n if (grid[k][j] == LASER) {\n // Set up a laser beam to the North direction until we reach a pillar, laser or the top\n for (int i = k - 1; i >= 0; i--) {\n if (grid[i][j] == X || grid[i][j] == ZERO ||\n grid[i][j] == ONE || grid[i][j] == TWO ||\n grid[i][j] == THREE || grid[i][j] == FOUR ||\n grid[i][j] == LASER) {\n break;\n } else {\n grid[i][j] = LASER_BEAM;\n }\n }\n // Set up a laser beam to the South direction until we reach a pillar, laser or the bottom\n for (int i = k + 1; i < numberOfRows; i++) {\n if (grid[i][j] == X || grid[i][j] == ZERO ||\n grid[i][j] == ONE || grid[i][j] == TWO ||\n grid[i][j] == THREE || grid[i][j] == FOUR ||\n grid[i][j] == LASER) {\n break;\n } else {\n grid[i][j] = LASER_BEAM;\n }\n }\n // Set up a laser beam to the West direction until we reach a pillar, laser or the left corner\n for (int i = j - 1; i >= 0; i--) {\n if (grid[k][i] == X || grid[k][i]== ZERO ||\n grid[k][i] == ONE || grid[k][i] == TWO ||\n grid[k][i] == THREE || grid[k][i] == FOUR ||\n grid[k][i] == LASER) {\n break;\n } else {\n grid[k][i] = LASER_BEAM;\n }\n }\n // Set up a laser beam to the East direction until we reach a pillar, laser or the right direction\n for (int i = j + 1; i < numberOfColumns; i++) {\n if (grid[k][i] == X || grid[k][i]== ZERO ||\n grid[k][i] == ONE || grid[k][i] == TWO ||\n grid[k][i] == THREE || grid[k][i] == FOUR ||\n grid[k][i] == LASER) {\n break;\n } else {\n grid[k][i] = LASER_BEAM;\n }\n }\n }\n }\n }\n message = (\"Laser removed at: (\" + row + \", \" + column + \")\");\n }\n }", "public int hamming() {\n int ham = 0;\n for (int i = 0; i < this.tiles.length; i++) {\n int n = this.tiles[i];\n if (n != i+1 && n > 0) {\n ham++;\n }\n }\n return ham;\n }", "private Element removeHiElements(Element p_seg)\n {\n ArrayList elems = new ArrayList();\n\n findHiElements(elems, p_seg);\n\n for (int i = 0; i < elems.size(); i++)\n {\n Element hi = (Element)elems.get(i);\n\n removeHiElement(hi);\n }\n\n return p_seg;\n }", "void removeNearbyPixels(Stroke theStroke){\n\t\tint index;\n\t\tint CurvIndex;\n\t\tint SpeedIndex;\n\t\tVector ptList = theStroke.getM_ptList();\n\t\tfor(index=0; index < CommonSegmentPts.size(); index++){\n\t\t\tPoint CommonPt = (PixelInfo)ptList.get((Integer)CommonSegmentPts.get(index));\n\t\t\tfor(CurvIndex = 0; CurvIndex < CurvVector.size(); CurvIndex++){\n\t\t\t\tPoint CurvPt = (PixelInfo)ptList.get((Integer)CurvVector.get(CurvIndex));\n\t\t\t\tif(CommonPt.distance(CurvPt) <= TolerantDistance){\n\t\t\t\t\tCurvVector.remove(CurvIndex--);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(SpeedIndex = 0; SpeedIndex < SpeedVector.size(); SpeedIndex++){\n\t\t\t\tPoint SpeedPt = (PixelInfo)ptList.get((Integer)SpeedVector.get(SpeedIndex));\n\t\t\t\tif(CommonPt.distance(SpeedPt) <= TolerantDistance){\n\t\t\t\t\tSpeedVector.remove(SpeedIndex--);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public int[] findHorizontalSeam() {\n return null;\n }", "public int hamming() {\n int count = 0;\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N && i+j < 2*N-2; j++) {\n if (blocks[i][j] != i*N + j + 1) {\n count++;\n }\n }\n }\n return count;\n }", "public int clearLine()\n {\n int count = 0;\n for (int i = grid.length-1; i >= 1;)\n {\n //check if it's a row to remove\n boolean z = true;\n for (int j = 0; j < grid[i].length; j++)\n {\n if (grid[i][j] == 0)\n {\n z = false;\n break;\n }\n }\n \n //remove it, shift everything down one\n if (z)\n {\n for (int k = i; k >= 1; k--)\n {\n for (int l = 0; l < grid[i].length; l++)\n {\n grid[k][l] = grid[k-1][l];\n }\n }\n count++;\n } else\n {\n i--;\n }\n }\n return count;\n }", "protected void removeLine(int row) {\n\t\t// clear out the true values from row/filled blocks\n\t\tfor(int j = 0; j < blockMatrix[row].length; j++) { \n\t\t\tblockMatrix[row][j] = false; \n\t\t}\n\t}", "void removeRoadside(int i);", "private synchronized void removeWall(int desiredRow, int desiredColumn) {\n \tint topBlock = m.maze[desiredRow - 1][desiredColumn];\t\t\t\t\t// block directly above the current block\r\n \tint leftBlock = m.maze[desiredRow][desiredColumn - 1];\t\t\t\t\t// block directly left of the current block\r\n \tint bottomBlock = m.maze[desiredRow + 1][desiredColumn];\t\t\t\t// block directly below the current block\r\n \tint rightBlock = m.maze[desiredRow][desiredColumn + 1];\t\t\t\t\t// block directly right of the current block\r\n \t\r\n if (desiredRow % 2 == 1 && leftBlock != rightBlock) {\t\t\t\t\t// wall is vertical\r\n \tm.fixBlocks(desiredRow, desiredColumn - 1, leftBlock, rightBlock);\t// fix all blocks so a loop is not created when the wall is removed\r\n m.maze[desiredRow][desiredColumn] = rightBlock;\t\t\t\t\t\t// set current block with wall to be empty (no wall) thus removing the wall\r\n } else if (desiredRow % 2 == 0 && topBlock != bottomBlock) {\t\t\t// wall is horizontal\r\n \tm.fixBlocks(desiredRow - 1, desiredColumn, topBlock, bottomBlock);\t// fix all blocks so a loop is not created when the wall is removed\r\n m.maze[desiredRow][desiredColumn] = bottomBlock;\t\t\t\t\t// set current block with wall to be empty (no wall) thus removing the wall\r\n }\r\n repaint();\r\n try { wait(1); }\r\n catch (InterruptedException e) { }\r\n }", "public int[] findHorizontalSeam() {\n Picture transposed = new Picture(this.height(), this.width());\n for (int i = 0; i < this.height(); i++) {\n for (int j = 0; j < this.width(); j++) {\n transposed.set(i, j, picture.get(j, i));\n }\n }\n SeamCarver s = new SeamCarver(transposed);\n return s.findVerticalSeam();\n }", "public int[] findHorizontalSeam() \n {\n double[][] transNrgs = transpose(energiesArray());\n return findMinVertPath(transNrgs);\n }", "public int hamming() {\n int count = 1;\n int hamming = 0;\n for (int row = 0; row < dimension(); row++) {\n for (int column = 0; column < dimension(); column++) {\n if (row == dimension() - 1 && column == dimension()-1) break; // Skip last value of the board\n if (blocks[row][column] != count) hamming++;\n count++;\n }\n } \n return hamming;\n }", "public int hamming() {\n int c = 0;\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n int x = tiles[i][j];\n if (x == 0) continue;\n if (x != i*n + j + 1) c++;\n }\n }\n return c;\n }", "public int[] findHorizontalSeam() {\n\n int[] seam = findVerticalSeam();\n transpose();\n return seam;\n }", "public int hamming() \n {\n int hamming = 0; \n for (int i = 0; i < SIZE; i++)\n {\n if (i + 1 != (int) (blocks[i]) && (int) blocks[i] != 0) \n { \n hamming++;\n }\n }\n return hamming;\n }", "public int[] findHorizontalSeam() {\n transpose();\n int[] horizontalSeam = findVerticalSeam();\n transpose();\n return horizontalSeam;\n }", "public int[] findHorizontalSeam() {\n isHorizontalCall = true;\n checkTransposed();\n int[] seam = findVerticalSeam();\n isHorizontalCall = false;\n return seam;\n }", "public int[] findVerticalSeam() {\n double minDist = Double.POSITIVE_INFINITY;\n int[] minPixel = new int[2];\n double[][] distToPixel = new double[width()][height()];\n HashMap<Integer, int[]> pixelToPixel = new HashMap<Integer, int[]>();\n for (double[] row : distToPixel) { Arrays.fill(row, Double.POSITIVE_INFINITY); }\n for (int i = 0; i < width(); i++) {\n distToPixel[i][0] = 0;\n }\n for (int y = 0; y < height() - 1; y++) {\n for (int x = 0; x < width(); x++) {\n\n for (int[] ap : adjacentPixels(x, y)) {\n if (distToPixel[ap[0]][ap[1]] > distToPixel[x][y] + energy(ap[0], ap[1])) {\n distToPixel[ap[0]][ap[1]] = distToPixel[x][y] + energy(ap[0], ap[1]);\n pixelToPixel.put(pixelHash(ap[0], ap[1]), new int[] { x, y });\n }\n }\n }\n }\n for (int i = 0; i < width(); i++) {\n if (distToPixel[i][height() - 1] < minDist) {\n minDist = distToPixel[i][height() - 1];\n minPixel = new int[] { i, height() - 1 };\n }\n }\n int[] outputSeam = new int[height()];\n Stack<Integer> pixPath = new Stack<Integer>();\n pixPath.push(minPixel[0]);\n int mp = pixelHash(minPixel[0], minPixel[1]);\n while (true) {\n int[] pixelArr = pixelToPixel.get(mp);\n if (pixelArr == null) { break; }\n pixPath.push(pixelArr[0]);\n mp = pixelHash(pixelArr[0], pixelArr[1]);\n }\n for (int i = 0; i < outputSeam.length; i++) { outputSeam[i] = pixPath.pop(); }\n return outputSeam;\n }", "void removeVert(Pixel toRemove) {\n\n // is the given below this\n if (this.down == toRemove) {\n if (toRemove.right != null) {\n toRemove.right.left = toRemove.left;\n }\n if (toRemove.left != null) {\n toRemove.left.right = toRemove.right;\n }\n }\n\n // is the given downright to this\n else if (this.downRight() == toRemove) {\n if (toRemove.right != null) {\n toRemove.right.left = toRemove.left;\n }\n if (toRemove.left != null) {\n toRemove.left.right = toRemove.right;\n toRemove.left.up = toRemove.up;\n }\n if (toRemove.up != null) {\n toRemove.up.down = toRemove.left;\n }\n }\n\n //is the given downleft to this\n else if (this.downLeft() == toRemove) {\n if (toRemove.right != null) {\n toRemove.right.left = toRemove.left;\n }\n if (toRemove.left != null) {\n toRemove.left.right = toRemove.right;\n }\n if (toRemove.right != null) {\n toRemove.right.up = toRemove.up;\n }\n if (toRemove.up != null) {\n toRemove.up.down = toRemove.right;\n }\n }\n // if the connections were incorrect\n else {\n throw new RuntimeException(\"Illegal vertical seam\");\n }\n }", "public int[] findVerticalSeam() {\n checkTransposed();\n int[] seam = new int[height];\n if (height <= 2) return seam;\n\n int[] edgeTo = new int[width * height];\n double[] distTo = new double[width * height];\n\n // Initiate distTo to Infinity\n for (int x = 0; x < width; x++) {\n for (int y = 1; y < height; y++) {\n distTo[xyTo1D(x, y)] = Double.POSITIVE_INFINITY;\n }\n }\n // You should not need recursion. Note that the underlying DAG has such special structure\n // that you don’t need to compute its topological order explicitly\n // Run BFS (topological sort) for the implicit DAG to search energy and save at distTo[]\n // The row-major or column-major traverse order make a difference here\n for (int y = 1; y < height; y++) {\n for (int x = 0; x < width; x++) {\n if (x > 0 && distTo[xyTo1D(x - 1, y)] > energy[xyTo1D(x - 1, y)] + distTo[xyTo1D(x, y - 1)]) {\n distTo[xyTo1D(x - 1, y)] = energy[xyTo1D(x - 1, y)] + distTo[xyTo1D(x, y - 1)];\n edgeTo[xyTo1D(x - 1, y)] = x;\n }\n if (distTo[xyTo1D(x, y)] > energy[xyTo1D(x, y)] + distTo[xyTo1D(x, y - 1)]) {\n distTo[xyTo1D(x, y)] = energy[xyTo1D(x, y)] + distTo[xyTo1D(x, y - 1)];\n edgeTo[xyTo1D(x, y)] = x;\n }\n if (x < width - 1 && distTo[xyTo1D(x + 1, y)] > energy[xyTo1D(x + 1, y)] + distTo[xyTo1D(x, y - 1)]) {\n distTo[xyTo1D(x + 1, y)] = energy[xyTo1D(x + 1, y)] + distTo[xyTo1D(x, y - 1)];\n edgeTo[xyTo1D(x + 1, y)] = x;\n }\n }\n }\n // Find the seam endpoint of minimum energy at the last line\n for (int x = 1; x < width - 1; x++) {\n if (distTo[xyTo1D(seam[height - 2], height - 2)] > distTo[xyTo1D(x, height - 2)]) {\n seam[height - 2] = x;\n }\n }\n // Use edgeTo to backtrack the path of minimum energy\n for (int y = height - 2; y > 0; y--) {\n seam[y - 1] = edgeTo[xyTo1D(seam[y], y)];\n }\n // Follow set at border of test examples\n // helpful to reset energy when shifting array elements\n // cutoff to be 0\n seam[height - 1] = Math.max(seam[height - 2] - 1, 0);\n return seam;\n }", "public int[] findVerticalSeam() {\n\n double[][] energyMatrix = new double[width()][height()];\n int[][] matrixTo = new int[width()][height()];\n\n for(int x =0; x< width(); x++) {\n for(int y=0; y< height(); y++) {\n energyMatrix[x][y] = Double.POSITIVE_INFINITY;\n }\n }\n for(int x =0; x < width(); x++) {\n energyMatrix[x][0] = 1000;\n }\n \n for(int j=0; j< height() - 1; j++) {\n for(int i=0; i < width(); i++ ) {\n if(i>0) {\n if(energyMatrix[i-1][j+1] > energyMatrix[i][j] + energy(i-1,j+1)) {\n energyMatrix[i-1][j+1] = energyMatrix[i][j] + energy(i-1,j+1);\n matrixTo[i-1][j+1] = i;\n }\n\n }\n\n if(energyMatrix[i][j+1] > energyMatrix[i][j] + energy(i,j+1)) {\n energyMatrix[i][j+1] = energyMatrix[i][j] + energy(i,j+1);\n matrixTo[i][j+1] = i;\n }\n \n\n if(i < width()-1) {\n if(energyMatrix[i+1][j+1] > energyMatrix[i][j] + energy(i+1,j+1)) {\n energyMatrix[i+1][j+1] = energyMatrix[i][j] + energy(i+1,j+1);\n matrixTo[i+1][j+1] = i;\n }\n }\n }\n }\n \n double minEnergy = Double.POSITIVE_INFINITY;\n int minEnergyX = -1;\n for(int w =0; w < width() ; w++) {\n if(energyMatrix[w][height()-1] < minEnergy) {\n minEnergyX = w;\n minEnergy = energyMatrix[w][height() - 1];\n }\n }\n\n int[] seam = new int[height()];\n seam[height() -1] = minEnergyX;\n int prevX = matrixTo[minEnergyX][height() - 1];\n\n for(int h = height() - 2; h >= 0 ; h--) {\n seam[h] = prevX;\n prevX = matrixTo[prevX][h];\n }\n return seam;\n \n }", "public int hamming() {\n int hammingDis = 0;\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n if (matrix[i][j] == 0) continue;\n if (i*N+j+1 != matrix[i][j]) hammingDis++;\n }\n }\n return hammingDis;\n }", "public void reset() {\n for (int i = 0; i < numberOfRows; i++ ) {\n for (int j =0; j < numberOfColumns; j++) {\n if (grid[i][j] == LASER) {\n this.Remove(i,j);\n }\n }\n }\n }", "public void lowerHalf() {\n\t\t// TODO: Implement\n\t\tint sumOfSlotCounts = getSumOfSlotCount()-1;\n\t\tif(sumOfSlotCounts < 0) return;\n\t\t//if(getSlotCount() == 1 && getSumOfSlotCount() == 1) return;\n\t\tint slot = getSlotCount()-1;\n\t\tint beanNumber = getSlotBeanCount(slot)-1;\n\t\tint deleted=0;\n\t\t//System.out.println(\"sumOfCounts: \" + sumOfSlotCounts);\n\t\twhile(deleted < Math.floor(sumOfSlotCounts / 2) ){\n\t\t\t/*if (slotBean.get(slot).isEmpty()) {\n\t\t\t\tslot++;\n\t\t\t\tbeanNumber = 0;\n\t\t\t\tSystem.out.println(\"slot empty: slot: \" + slot + \" beanN: \" + beanNumber);\n\t\t\t}*/\n\t\t\t\n\t\t\t//System.out.println(\"i: \" + deleted + \" count: \" + getSlotBeanCount(slot)+\" beanNumber: \" + beanNumber);\n\t\t\tif(beanNumber < getSlotBeanCount(slot) && beanNumber >= 0 && getSlotBeanCount(slot) > 0 ) {\n\t\t\t\t//System.out.println(\"slot not empty: slot: \" + slot + \" beanN: \" + beanNumber);\n\t\t\t\tslotBean.get(slot).remove(beanNumber--);\n\t\t\t\tdeleted++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//System.out.println(\"slot empty: slot: \" + slot + \" beanN: \" + beanNumber);\n\t\t\t\tif(slot >= 0) slot--;\n\t\t\t\tif(getSlotBeanCount(slot) > 0) beanNumber = getSlotBeanCount(slot)-1;\n\t\t\t\telse beanNumber = 0;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "public int hamming() {\n int hamming = 0;\n for (int i = 0; i < dimension; i++)\n for (int j = 0; j < dimension; j++)\n if (isWrongPosition(i, j)) hamming++;\n\n return hamming;\n }", "public void removeCutVertices() {\n boolean found;\n LinkedList<Integer> isolated = new LinkedList<>();\n do {\n found = false;\n for (Map.Entry<Integer, Set<Integer>> entry : adjacencyMap.entrySet()) {\n// System.out.println(\"adjacency print key: \" + entry.getKey() + \"value: \" +\n// entry.getValue() + \"set size: \" + entry.getValue().size());\n if (entry.getValue().size() == 1) {\n// System.out.println(\"found cut vertex\");\n found = true; // loop yielded a cut vertex\n // get the only vertex in the set\n for (Integer integer : entry.getValue()) {\n// System.out.println(\"started set iterator\" + integer);\n int removalSet = integer; // take the value of the set element\n // create a temp set\n Set<Integer> tempSet = adjacencyMap.get(removalSet);\n tempSet.remove(entry.getKey()); // remove the cut vertex from this set\n adjacencyMap.replace(removalSet, tempSet); // put the smaller set in place\n }\n isolated.add(entry.getKey());\n\n\n }\n\n }\n // remove isolated vertices\n for (Integer vert : isolated) {\n adjacencyMap.remove(vert);\n }\n isolated.clear();\n } while (found);\n }", "void removeEdge(int x, int y);", "private int clearLines() {\n\t\tint numGarbageLines = 0;\n\t\tArrayList<Integer> linesToShift = new ArrayList<Integer>();\n\t\tfor (int r = 0; r < matrixHeight; r++) {\n\t\t\tif (isLineFull(r)) {\n\t\t\t\tif (isGarbageLine(r)) {\n\t\t\t\t\tnumGarbageLines++;\n\t\t\t\t}\n\t\t\t\tlinesToShift.add(r);\n\t\t\t\tnumLinesCleared++;\n\t\t\t\tfor (int c = 0; c < matrixWidth; c++) {\n\t\t\t\t\tboardTiles[r][c] = backgroundColor;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (Integer removedRow : linesToShift) {\n\t\t\tshiftDownBoard(removedRow);\n\t\t}\n\t\tupdateView();\n\t\treturn linesToShift.size() - numGarbageLines;\n\t}", "private void collapseIgloo() {\n blocks.sort(Comparator.comparing(a -> a.center.getY()));\n\n double minDistance, distance;\n Point3D R = new Point3D(0, -1, 0);\n for (int i = 0; i < blocks.size(); i++) {\n minDistance = Double.MAX_VALUE;\n for (int j = i - 1; j >= 0; j--) {\n if (boundingSpheresIntersect(blocks.get(i), blocks.get(j))) {\n distance = minDistance(blocks.get(i), blocks.get(j), R);\n if (distance < minDistance) {\n minDistance = distance;\n }\n }\n }\n if (minDistance != Double.MAX_VALUE) {\n blocks.get(i).move(R.multiply(minDistance));\n }\n }\n }", "private void removeMine(int i, int j) {\n current[i][j] = new Empty();\n for (int k = -1; k <= 1; k++) {\n for (int l = -1; l <= 1; l++) {\n //pas de omliggende vlaggetjes aan\n if ((k != 0 || l != 0) && inField(i + k, j + l) && current[i + k][j + l].isBound()) {\n current[i + k][j + l].increment();\n }\n }\n }\n }", "public int[] findHorizontalSeam() {\n return findSeam(true);\n }", "public void removeSpriteOnGrid(Sprite s, int x, int y) {\n\t\tint i;\n\t\tint id=-1;\n\t\tif(s.getDirection()==Sprite.Direction.HORIZONTAL) {\n\t\t\t\n\t\t\tfor(i=0; i<s.getSize(); i++) {\n\t\t\t\t//set squares occupied by the length of the sprite, starting at grid[x][y] to sprite id -1 to\n\t\t\t\t//signal they are now free\n\t\t\t\tgrid[x+i][y].setSpriteID(id);\n\t\t\t}\n\t\t\t\n\t\t}else { \n\t\t\tfor(i=0; i<s.getSize(); i++) {\n\n\t\t\t\tgrid[x][y+i].setSpriteID(id);\n\t\t\t}\n\t\t\t\n\t\t\n\t\t}\n\t\t\n\t\t\n\t}", "void deleteMedian () {\n if (fillLength > 0) {\n for (int i = fillLength / 2; i < fillLength - 1; i++) {\n array[i] = array[i + 1];\n }\n array[fillLength - 1] = 0;\n fillLength--;\n }\n }", "@Test\n\tpublic void testEliminationByColumn(){\n\t\tsetBoardUp();\n\t\tColumn col = new Column(board, 1);\n\t\tint[] toBeRemoved = {1, 3, 4};\n\t\tint[] fromCesll = {1, 2, 3, 5, 6, 8};\n\t\talgorithm.applyEliminationInColumn(col);\n\t\tboolean condition = true;\n\t\tfor(int i = 0; i < toBeRemoved.length; i++)\n\t\t\tfor(int j = 0; j < fromCesll.length; j++)\n\t\t\t\tcondition &= !col.cell[fromCesll[j]].possibilities.contains(toBeRemoved[i]);\t\t\n\t\tassertTrue(condition);\n\t}", "public abstract int removeStone(int whoseTurn, int numberToRemove, int upperBound, int currentStone,\n\t\t\tint initialStones, Scanner scanner);", "public int[] findVerticalSeam() {\n\n int[] seam = new int[height()];\n\n // Tracks columns of least-energy seams.\n int[][] edgeTo = new int[width()][height()];\n\n // Store cumulative energy of the seams that go through each pixel.\n double[][] distTo = new double[width()][height()];\n\n // Initialize all distances to infinity, except top row.\n for (int col = 0; col < width(); col++) {\n for (int row = 0; row < height(); row++) {\n if (row == 0) distTo[col][row] = energy[col][row];\n else distTo[col][row] = Double.POSITIVE_INFINITY;\n }\n }\n\n // Builds least-energy seams through picture.\n for (int row = 1; row < height(); row++) {\n for (int col = 0; col < width(); col++) {\n\n if (col > 0 && distTo[col - 1][row] > (energy[col - 1][row]\n + distTo[col][row - 1])) {\n\n distTo[col - 1][row] = energy[col - 1][row] + distTo[col][row - 1];\n edgeTo[col - 1][row] = col;\n }\n if (distTo[col][row] > (energy[col][row] + distTo[col][row - 1])) {\n\n distTo[col][row] = energy[col][row] + distTo[col][row - 1];\n edgeTo[col][row] = col;\n }\n if (col < width() - 1 && distTo[col + 1][row] > (energy[col + 1][row]\n + distTo[col][row - 1])) {\n\n distTo[col + 1][row] = energy[col + 1][row] + distTo[col][row - 1];\n edgeTo[col + 1][row] = col;\n }\n }\n }\n // Find the end of the least total energy seam.\n double leastEnergy = Double.POSITIVE_INFINITY;\n for (int col = 0; col < width() - 1; col++) {\n double currentEnergy = distTo[col][height() - 1];\n if (currentEnergy < leastEnergy) {\n leastEnergy = currentEnergy;\n seam[height() - 1] = col;\n }\n }\n // Back-track from end of seam to beginning.\n for (int row = height() - 1; row > 0; row--) {\n seam[row - 1] = edgeTo[seam[row]][row];\n }\n return seam;\n }", "public int[] findVerticalSeam() {\r\n int[] seam = new int[height];\r\n double distance = Double.POSITIVE_INFINITY;\r\n double[][] distTo = new double[width][height];\r\n Point[][] edgeTo = new Point[width][height];\r\n\r\n for (int col = 0; col < width; col++)\r\n for (int row = 0; row < height; row++)\r\n if (row == 0) distTo[col][row] = 0;\r\n else distTo[col][row] = Double.POSITIVE_INFINITY;\r\n\r\n\r\n for (int row = 0; row < height; row++) {\r\n for (int col = 0; col < width; col++) {\r\n Point p = new Point(col, row);\r\n\r\n for (Point adj : getAdjVert(p)) {\r\n if (distTo[adj.x][adj.y] > distTo[p.x][p.y] + energy[p.x][p.y]) {\r\n distTo[adj.x][adj.y] = distTo[p.x][p.y] + energy[p.x][p.y];\r\n edgeTo[adj.x][adj.y] = p;\r\n if (adj.y == height - 1 && distTo[adj.x][adj.y] < distance) {\r\n distance = distTo[adj.x][adj.y];\r\n for (int count = height; adj != null; adj = edgeTo[adj.x][adj.y])\r\n seam[--count] = adj.x;\r\n }\r\n }\r\n }\r\n\r\n }\r\n }\r\n return seam;\r\n\r\n }", "public void compact() {\n\t\tint n = vertices.size();\n\t\t// ids utilizados de 1 a n\n\t\tint[] small = new int[n + 1];\n\t\tVertice[] big = new Vertice[n];\n\n\t\tint qbig = 0;\n\t\tfor (Vertice v1 : vertices.values()) {\n\t\t\tif (v1.id <= n)\n\t\t\t\tsmall[v1.id] = 1;\n\t\t\telse\n\t\t\t\tbig[qbig++] = v1;\n\t\t}\n\n\t\tint i = 1;\n\t\tfor (int pairs = 0; pairs < qbig; i++) {\n\t\t\tif (small[i] == 0)\n\t\t\t\tsmall[pairs++] = i;\n\t\t}\n\n\t\tfor (i = 0; i < qbig; i++) {\n\t\t\tint old_id = big[i].id;\n\t\t\tbig[i].id = small[i];\n\n\t\t\tvertices.remove(old_id);\n\t\t\tvertices.put(big[i].id, big[i]);\n\n\t\t\tfor (Vertice v1 : vertices.values()) {\n\t\t\t\tif (v1.vizinhos.get(old_id) != null) {\n\t\t\t\t\tv1.vizinhos.remove(old_id);\n\t\t\t\t\tv1.vizinhos.put(big[i].id, big[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private Node deleteMin(Node h) {\n if (h.left == null)\n return null;\n\n if (!isRed(h.left) && !isRed(h.left.left))\n h = moveRedLeft(h);\n\n h.left = deleteMin(h.left);\n return balance(h);\n }", "private void deleteCheck(int hash){\r\n for(int i = 1; i < M; i++){ //Doesn't consider the index of the removed pair\r\n if(hash + i < M){\r\n \tif(keys[hash + i] == null) continue;\r\n \tif(hash == hash(keys[hash + i])){\r\n \tmove(hash, hash + i);\r\n \tbreak;\r\n }\r\n }else{\r\n if(keys[hash + i - M] == null) continue;\r\n if(hash == hash(keys[hash + i - M])){\r\n \tmove(hash, hash + i - M);\r\n \tbreak;\r\n }\r\n }\r\n }\r\n }", "public int remove() \r\n { \r\n int v = h[1];\r\n hPos[v] = 0; // v is no longer in heap\r\n h[N+1] = 0; // put null node into empty spot\r\n \r\n h[1] = h[N--];\r\n siftDown(1);\r\n \r\n return v;\r\n }", "public void removeByLeftShift(int pos){\n int nshift=size-(pos);\n int to=(start+pos)%cir.length;\n int from=(to+1)%cir.length;\n for(int i=0;i<nshift;i++){\n cir[to]=cir[from];\n to=from;\n from=(from+1)%cir.length;\n \n }\n int index=(start+size-1)%cir.length;\n cir[index]=null;\n size--;\n \n }", "private void shrink(int hole) {\n int i = hole + 1;\n while (s[i] != null) {\n s[i-1] = s[i];\n s[i] = null;\n i++;\n if (i >= s.length) break;\n }\n }", "public void removeTile(Tile a_tile){\n for(int i = 0; i < playerHand.size(); i++){\n if(playerHand.get(i).getRight() == a_tile.getRight() && playerHand.get(i).getLeft() == a_tile.getLeft()){\n playerHand.remove(i);\n break;\n }\n }\n }", "public void removeVertex (T vertex){\n int index = vertexIndex(vertex);\n \n if (index < 0) return; // vertex does not exist\n \n n--;\n // IF THIS DOESN'T WORK make separate loop for column moving\n for (int i = index; i < n; i++){\n vertices[i] = vertices[i + 1];\n for (int j = 0; j < n; j++){\n edges[j][i] = edges[j][i + 1]; // moving row up\n edges[i] = edges[i + 1]; // moving column over\n }\n }\n }", "private void swim(int x) {\n while (x > 1 && less(heap[x / 2], heap[x])) {\n exch(heap, x, x / 2);\n x = x / 2;\n }\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 }", "void removeNeighbors();", "private void eliminarAsteroide(int num){\n\t\t\n\t\tnumAsteroides--;\n\t\t\n\t\tfor(int i=num;i<numAsteroides;i++){\n\t\t\tasteroides[i]=asteroides[i+1];\n\t\t}\n\t\tasteroides[numAsteroides]=null;\n\t}", "public int hamming() {\n int wrong = 0;\n for (int row = 0; row < N; ++row) {\n for (int col = 0; col < N; ++col) {\n int goalValue = N * row + col + 1;\n if (tiles[row][col] != 0 && tiles[row][col] != goalValue) {\n wrong++;\n }\n }\n }\n\n return wrong;\n }", "public int hamming() {\r\n\t\tint n = dimension();\r\n\t\tint[] tmp = IntStream.rangeClosed(1, n * n - 1).toArray();\r\n\t\tint[] tmp2 = new int[n * n - 1];\r\n\t\tint k = 0;\r\n\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\tfor (int j = 0; j < n; j++) {\r\n\t\t\t\tif (k < tmp2.length) {\r\n\t\t\t\t\ttmp2[k] = this.blocks[i][j];\r\n\t\t\t\t}\r\n\t\t\t\tk++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tint hamming = IntStream.rangeClosed(0, tmp.length - 1).map(i -> tmp[i] == tmp2[i] ? 0 : 1).reduce(0,\r\n\t\t\t\t(x, y) -> x + y);\r\n\t\treturn hamming;\r\n\t}", "void removeContactMeans(int i);", "public int[][] removeOne(int[][] matrix, int x, int y) {\n while(x < matrix.length){\n if(matrix[x][y] == 1)\n matrix[x][y] = 0;\n x++;\n }\n return matrix;\n }", "public int trap_old(int[] height) {\n if(height.length <=2){\n return 0;\n }\n int result = 0;\n List<Integer> peaks = new ArrayList<>();\n for(int i=0; i<height.length; i++){\n //if(i+1==height.length && height[i-1]<height[i]){\n // peaks.add(i);\n if(i<height.length-1 && height[i]!=height[i+1]){\n peaks.add(i);\n }\n }\n List<Integer> remove = new ArrayList<>();\n //merge top\n for(int i=0; i<peaks.size(); i++){\n boolean left = false;\n boolean right = false;\n for(int j=0; j<i; j++){ //left\n if(height[peaks.get(j)]>height[peaks.get(i)]){\n left = true;\n }\n }\n for(int j=i+1; j<peaks.size(); j++){ //right\n if(height[peaks.get(j)]>height[peaks.get(i)]){\n right = true;\n }\n }\n if(left&&right){\n remove.add(peaks.get(i));\n }\n }\n System.out.println(Arrays.toString(remove.toArray()));\n peaks.removeAll(remove);\n System.out.println(\"=============\");\n System.out.println(Arrays.toString(peaks.toArray()));\n for(int i=0; i<peaks.size()-1; i++){\n Integer a = peaks.get(i);\n Integer b = peaks.get(i+1);\n int min = Math.min(height[a],height[b]);\n for(int j=a+1; j<b; j++){\n int df = min - height[j];\n if(df > 0 ){\n result += df;\n }\n }\n }\n return result;\n }", "void removeScans(int i);", "void remove(int v){\n if(isEmpty()!=1){\n for(int i=0;i<size;i++){\n if(values[i]==v){\n int j = i;\n while((j+1)!=size){\n values[j] = values[j+1];\n j++;\n\n }\n values[j] = (-1);\n break;\n }\n }\n }\n }", "private void removePiece(int row, int col, int storedRow, int storedCol){\r\n int pieceRow = -1;\r\n int pieceCol = -1;\r\n if(col > storedCol && row > storedRow){\r\n pieceRow = row-1;\r\n pieceCol = col-1;\r\n }\r\n if(col > storedCol && row < storedRow){\r\n pieceRow = row+1;\r\n pieceCol = col-1;\r\n }\r\n if(col < storedCol && row > storedRow){\r\n pieceRow = row-1;\r\n pieceCol = col+1;\r\n }\r\n if(col < storedCol && row < storedRow){\r\n pieceRow = row+1;\r\n pieceCol = col+1;\r\n }\r\n checks[pieceRow][pieceCol] = 0;\r\n if(isGame) nextPlayer.subCheck();\r\n }", "public void removeEdge() {\n Graph GO = new Graph(nbOfVertex + 1);\n Value.clear();\n for (int i = 0; i < x.length; i++) {\n for (int j : x[i].getDomain()) {\n Value.add(j);\n if (MaxMatch[i] == Map.get(j)) {\n GO.addEdge(Map.get(j), i);\n } else {\n GO.addEdge(i, Map.get(j));\n }\n }\n }\n\n for (int i : V2) {\n for (int j : Value) {\n if (!V2.contains(j)) {\n GO.addEdge(i, j);\n }\n }\n }\n //System.out.println(\"GO : \");\n //System.out.println(GO);\n int[] map2Node = GO.findStrongConnectedComponent();\n //GO.printSCC();\n\n ArrayList<Integer>[] toRemove = new ArrayList[n];\n for (int i = 0; i < n; i++) {\n toRemove[i] = new ArrayList<Integer>();\n }\n for (int i = 0; i < n; i++) {\n for (int j : x[i].getDomain()) {\n ////System.out.println(i + \" \" + j);\n if (map2Node[i] != map2Node[Map.get(j)] && MaxMatch[i] != Map.get(j)) {\n toRemove[i].add(j);\n if (debug == 1) System.out.println(\"Remove arc : \" + i + \" => \" + j);\n }\n }\n }\n for (int i = 0; i < n; i++) {\n for (int j : toRemove[i]) {\n x[i].removeValue(j);\n }\n }\n }", "public int[] findVerticalSeam() {\n double[][] energyTo = new double[width][height]; // will hold smallest energy path to each entry\n int[] edgeTo = new int[height]; // will hold smallest energy path\n \n // initialiaze energy path array\n for (int j = 0; j < height(); j++) {\n for (int i = 0; i < width(); i++) {\n if (j == 0) {\n energyTo[i][j] = energy[i][j]; // top row has initial energyTo it equal to its energy\n }\n else\n energyTo[i][j] = Double.POSITIVE_INFINITY; // initialize every other value to Infinity\n }\n }\n \n // Calculate smallest energy path to each entry in energyTo array\n for (int y = 0; y < height(); y++) {\n for (int x = 0; x < width(); x++) {\n relax(x, y, energyTo, edgeTo);\n }\n }\n \n // find the seam with the smallest total energy\n findSeam(energyTo, edgeTo);\n \n return edgeTo;\n }", "public Card removeCard(){\n Card temp = pile[0]; //removes top card. putting placement card to avoid null pointer\n for(int i = 0; i < pilePlace; i++){ //shifts cards\n pile[i] = pile[i+1];\n }\n pilePlace--;\n return temp;\n\n }", "public void deleteRow(int row){\n\t\tfor(int j = row; j > 0; j--)\n\t\t\tfor(int i = 0; i < well.length; i++)\n\t\t\t\twell[i][j] = well[i][j-1];\n\t}", "void dropcard()\n{\nfor (int i=0;i<hc.size()-1;i++)\n\t{\n\tif(hc.get(i)==1||hc.get(i)==2)\n\t\tcontinue;\n\telse if((((hc.get(i))-3)/4)==(((hc.get(i+1))-3)/4))\n\t\t{hc.remove(i);\n\t\thc.remove(i);\n\t\ti--;}\t\n\t}\n}", "private State removeWest() \r\n\t{\r\n\t\tProject2.stateStack.push(westQueue[westFront++]);\r\n\t\treturn westQueue[westElem];\r\n\t}", "private List<Individual<T>> removeWorst(List<Individual<T>> tournament) {\n Individual<T> worst = selWorstOp.select(tournament);\n tournament.remove(worst);\n return tournament;\n }", "public int removeStones(int[][] stones) {\n DSet ds = new DSet(20000);\n for(int[] stone: stones){\n ds.union( stone[0], stone[1] + 10000);\n }\n Set<Integer> parents = new HashSet<>();\n for(int[] stone: stones){\n parents.add( ds.find(stone[0]));\n }\n return stones.length - parents.size();\n }", "@Test\n\tpublic void testEliminationByMediumBox(){\n\t\tsetBoardUp();\n\t\tMediumBox mBox = new MediumBox(board, 1, 1);\n\t\talgorithm.applyEliminationInMediumBox(mBox);\n\t\tint[] toBeRemoved = {1, 2, 8, 9};\n\t\tint[] fromCells = {0, 1, 4, 7, 8};\n\t\tboolean condition = true;\n\t\tfor(int i = 0; i < toBeRemoved.length; i++)\n\t\t\tfor(int j = 0; j < fromCells.length; j++)\n\t\t\t\tcondition &= !mBox.cell[fromCells[j]].possibilities.contains(toBeRemoved[i]);\t\t\n\t\t\n\t\tassertTrue(condition);\n\t}", "void removeDecisionSightDistance(int i);", "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 }" ]
[ "0.7361816", "0.7344246", "0.7311071", "0.7276901", "0.7272878", "0.7185678", "0.7151538", "0.71214914", "0.7068083", "0.68853134", "0.68613744", "0.6836632", "0.6833281", "0.6830002", "0.678641", "0.6636312", "0.6604697", "0.6474677", "0.64095324", "0.62468904", "0.62247866", "0.6132123", "0.60772353", "0.6076565", "0.60600865", "0.60524905", "0.60057044", "0.59464824", "0.5923197", "0.57207394", "0.57023543", "0.56736183", "0.5657157", "0.5654217", "0.5650407", "0.56351346", "0.56177074", "0.5575112", "0.5568568", "0.5477841", "0.54754084", "0.54741246", "0.54639125", "0.54450446", "0.5429231", "0.5424602", "0.5423076", "0.5403063", "0.5396602", "0.5378085", "0.5361114", "0.5358949", "0.5345715", "0.53448695", "0.5338748", "0.5318345", "0.53100324", "0.53065807", "0.5285319", "0.52784866", "0.52670836", "0.52667403", "0.52663064", "0.5258608", "0.5240491", "0.51782715", "0.5158762", "0.51582336", "0.51568425", "0.51376516", "0.5136582", "0.5135934", "0.51278824", "0.511971", "0.5110859", "0.5097148", "0.5092376", "0.5087887", "0.5080143", "0.5079664", "0.5077883", "0.50705224", "0.5065709", "0.50499004", "0.50463575", "0.50290686", "0.50195026", "0.50137854", "0.50130695", "0.5008049", "0.5007626", "0.4998486", "0.49956095", "0.4992888", "0.4992563", "0.49900228", "0.49851543", "0.49745002", "0.49656147", "0.49645612" ]
0.6741685
15
Removes a vertical seam. Time complexity is O(N ^ 2)
public void removeVerticalSeam(final int[] seam) { if (width() <= 1 || !isValid(seam, height(), width())) { throw new java.lang.IllegalArgumentException( "IllegalArgumentException"); } Picture picture2 = new Picture(width() - 1, height()); for (int hei = 0; hei < height(); hei++) { for (int wi = 0; wi < seam[hei]; wi++) { picture2.set(wi, hei, this.pict.get(wi, hei)); } for (int wi = seam[hei] + 1; wi < width(); wi++) { picture2.set(wi - 1, hei, this.pict.get(wi, hei)); } } this.pict = picture2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeVerticalSeam(int[] seam) {\n\n validate(seam);\n\n // Remove the seam.\n for (int row = 0; row < height(); row++) {\n\n // Disregard right border pixel, 'width--' will ignore it.\n if (!(seam[row] == width() - 1)) {\n\n // For pixels to the right of the seam, move left by 1.\n for (int col = seam[row]; col < width() - 1; col++) {\n rgb[col][row] = rgb[col + 1][row];\n }\n }\n }\n width--;\n\n // Update energy for pixels adjacent to the removed seam.\n for (int row = 1; row < height - 1; row++) {\n if (seam[row] > 1) {\n energy[seam[row] - 1][row] = calcPixelEnergy(seam[row] - 1, row);\n }\n if (seam[row] < width - 1) {\n energy[seam[row]][row] = calcPixelEnergy(seam[row], row);\n }\n }\n }", "public void removeVerticalSeam(int[] seam) {\n if (seam == null) { throw new NullPointerException(\"seam can't be null\"); }\n if (!validSeam(seam, true)) { throw new IllegalArgumentException(\"invalid seam\"); }\n if (width() <= 1) { throw new IllegalArgumentException(\"too narrow\"); }\n\n for (int row = 0; row < height(); row++) {\n int[] temp = new int[colorArray[row].length - 1];\n System.arraycopy(colorArray[row], 0, temp, 0, temp.length);\n System.arraycopy(colorArray[row], seam[row] + 1, temp, seam[row], colorArray[row].length - seam[row] - 1);\n colorArray[row] = temp;\n }\n width--;\n\n }", "public void removeVerticalSeam(int[] seam) {\n checkTransposed();\n validate(seam);\n // Fail to make this method transpose-agnostic as the use of 1D representation does not\n // allow System.arraycopy() in calls from removeHorizontalSeam().\n // Compared to 2D representation, 1D reduces the transpose overhead of swapping [x][y],\n // yet introduces function call overhead to xyTo1D() and complex like xyTo1DAfterwards().\n // In all, 1D array representation is not recommended to implement.\n if (!isTransposed) {\n for (int y = 0; y < height; y++) {\n System.arraycopy(pic, xyTo1D(seam[y], y) + 1, pic, xyTo1DAfterwards(seam[y], y),\n width - seam[y] - 1 + (y < height - 1 ? seam[y + 1] : 0));\n System.arraycopy(energy, xyTo1D(seam[y], y) + 1, energy, xyTo1DAfterwards(seam[y], y),\n width - seam[y] - 1 + (y < height - 1 ? seam[y + 1] : 0));\n // Corner case when (0, y) is at seam\n // seam[y] must not reach (width - 1), as we shift seam at border smaller by 1\n if (seam[y] == 0) energy[xyTo1DAfterwards(0, y)] = BORDER_ENERGY;\n }\n } else {\n for (int y = 0; y < height; y++) {\n for (int x = 0; x < width; x++) {\n if (x > seam[y]) {\n pic[xyTo1D(x - 1, y)] = pic[xyTo1D(x, y)];\n energy[xyTo1D(x - 1, y)] = energy[xyTo1D(x, y)];\n }\n }\n if (seam[y] == 0) energy[xyTo1D(0, y)] = BORDER_ENERGY;\n }\n }\n width--;\n // Recalculate the energies only for the pixels along the seam that was just removed\n for (int y = 1; y < height - 1; y++) {\n if (seam[y] > 1) energy[xyTo1D(seam[y] - 1, y)] = calcEnergy(seam[y] - 1, y);\n if (seam[y] < width - 1) energy[xyTo1D(seam[y], y)] = calcEnergy(seam[y], y);\n }\n }", "public void removeVerticalSeam(int[] a) {\n // Check there are seams to remove\n if (current.width() <= 1)\n throw new IllegalArgumentException(\"Current width <= 1\");\n // Check the seam is of height length and inside bounds\n if (a.length != current.height())\n throw new IllegalArgumentException(\"Seam is not complete\");\n for (int i = 0; i < a.length; i++) {\n if (a[i] < 0 || a[i] >= current.width()) {\n throw new IllegalArgumentException(\"Seam out of bounds\");\n }\n }\n // Check the seam elements have distance of one\n for (int i = 1; i < a.length; i++) {\n if (Math.abs(a[i - 1] - a[i]) > 1)\n throw new IllegalArgumentException(\n \"Too much distance in the seam\");\n }\n\n Picture newPicture = new Picture(current.width() - 1, current.height());\n for (int j = 0; j < current.height(); j++) {\n int removedX = a[j];\n int posX = 0;\n for (int i = 0; i < current.width(); i++) {\n if (i != removedX) {\n newPicture.set(posX, j, current.get(i, j));\n posX++;\n }\n }\n }\n\n current = newPicture;\n }", "public void removeVerticalSeam(int[] seam) {\r\n\r\n validateVertSeam(seam);\r\n Picture newPic = new Picture(--width, height);\r\n for (int col = 0; col < width; col++) {\r\n for (int row = 0; row < height; row++) {\r\n if (col < seam[row]) {\r\n newPic.set(col, row, pic.get(col, row));\r\n energy[col][row] = energy[col][row];\r\n }\r\n else {\r\n newPic.set(col, row, pic.get(col + 1, row));\r\n energy[col][row] = energy[col + 1][row];\r\n }\r\n }\r\n }\r\n\r\n pic = newPic;\r\n\r\n for (int row = 0; row < height; row++) {\r\n if (seam[row] > 0) energy[seam[row] - 1][row] = calcEnergy(seam[row] - 1, row);\r\n if (seam[row] < width - 1) energy[seam[row]][row] = calcEnergy(seam[row], row);\r\n }\r\n\r\n }", "void removeNextSeamVert() {\n SeamInfo toRemove = this.curLowest;\n\n toRemove.removeSeamVert();\n\n if (toRemove.containsPixel(this.curPixel)) {\n\n this.curPixel = this.curPixel.right;\n }\n\n this.removedSeams.add(toRemove);\n\n this.draw();\n }", "public void removeVerticalSeam(int[] seam) {\n for (int rows = 0; rows < height; rows++) {\n for (int columns = seam[rows]; columns < width - 1; columns++) {\n this.pic.set(columns, rows, this.pic.get(columns + 1, rows));\n }\n }\n width--;\n }", "public void removeVerticalSeam(int[] seam) {\n if (seam == null)\n throw new java.lang.IllegalArgumentException(\"null seam\");\n if (seam.length != height())\n throw new java.lang.IllegalArgumentException(\"invalid seam length\");\n if (!validateSeam(seam))\n throw new java.lang.IllegalArgumentException(\"invalid seam\");\n Picture p = new Picture(width - 1, height);\n for (int y = 0; y < height(); y++) {\n int k = 0;\n for (int x = 0; x < width(); x++) {\n if (x != seam[y]) {\n p.set(k, y, pic.get(x, y));\n k++;\n }\n }\n }\n this.pic = p;\n width = pic.width();\n height = pic.height();\n }", "public void removeVerticalSeam(int[] seam) {\n if (seam == null) {\n throw new IllegalArgumentException(\"Null horizontal seam\");\n }\n\n if (picture().height() <= 1) {\n throw new IllegalArgumentException(\"Picture too small\");\n }\n }", "public void removeVerticalSeam(int[] seam) {\n if (seam == null) {\n throw new NullPointerException();\n }\n\n if (seam.length != height()) {\n throw new IllegalArgumentException();\n }\n\n Picture original = this.pic;\n Picture carvedPic = new Picture(original.width() - 1, original.height());\n\n for (int h = 0; h < carvedPic.height(); h++) {\n for (int w = 0; w < seam[h]; w++) {\n carvedPic.set(w, h, original.get(w, h));\n }\n for (int w = seam[h]; w < carvedPic.width(); w++) {\n carvedPic.set(w, h, original.get(w + 1, h));\n }\n }\n\n this.pic = carvedPic;\n \n width = pic.width();\n height = pic.height();\n }", "public void removeVerticalSeam(int[] seam) {\n if (seam == null) {\n throw new NullPointerException();\n }\n\n if (seam.length != height()) {\n throw new IllegalArgumentException();\n }\n\n Picture original = this.picture;\n Picture seamed = new Picture(original.width() - 1, original.height());\n\n for (int h = 0; h < seamed.height(); h++) {\n for (int w = 0; w < seam[h]; w++) {\n seamed.set(w, h, original.get(w, h));\n }\n for (int w = seam[h]; w < seamed.width(); w++) {\n seamed.set(w, h, original.get(w + 1, h));\n }\n }\n this.picture = seamed;\n }", "public void removeHorizontalSeam(int[] a) {\n // Check there are seams to remove\n if (current.height() <= 1)\n throw new IllegalArgumentException(\"Current height <= 1\");\n // Check the seam is of height length and inside bounds\n if (a.length != current.width())\n throw new IllegalArgumentException(\"Seam is not complete\");\n for (int i = 0; i < a.length; i++) {\n if (a[i] < 0 || a[i] >= current.height()) {\n throw new IllegalArgumentException(\"Seam out of bounds\");\n }\n }\n // Check the seam elements have distance of one\n for (int i = 1; i < a.length; i++) {\n if (Math.abs(a[i - 1] - a[i]) > 1)\n throw new IllegalArgumentException(\n \"Too much distance in the seam\");\n }\n\n Picture newPicture = new Picture(current.width(), current.height() - 1);\n for (int i = 0; i < current.width(); i++) {\n int removedY = a[i];\n int posY = 0;\n for (int j = 0; j < current.height(); j++) {\n if (j != removedY) {\n newPicture.set(i, posY, current.get(i, j));\n posY++;\n }\n }\n }\n\n current = newPicture;\n }", "public void removeHorizontalSeam(int[] seam) {\n\n transpose();\n removeVerticalSeam(seam);\n transpose();\n }", "void removeNextSeamHoriz() {\n\n SeamInfo toRemove = this.curLowest;\n\n toRemove.removeSeamHoriz();\n\n if (toRemove.containsPixel(this.curPixel)) {\n this.curPixel = this.curPixel.down;\n }\n\n this.removedSeams.add(toRemove);\n\n this.draw();\n\n }", "public void removeHorizontalSeam(int[] seam) {\n //handle exceptions\n for (int columns = 0; columns < width; columns++) {\n for (int rows = seam[columns]; rows < height - 1; rows++) {\n this.pic.set(columns, rows, this.pic.get(columns, rows + 1));\n }\n }\n height--;\n }", "public void removeHorizontalSeam(int[] seam) {\n if (seam == null) { throw new NullPointerException(\"seam can't be null\"); }\n if (!validSeam(seam, false)) { throw new IllegalArgumentException(\"invalid seam\"); }\n if (height() <= 1) { throw new IllegalArgumentException(\"too short\"); }\n\n picture = flip(picture);\n removeVerticalSeam(seam);\n picture = flip(picture);\n }", "public void removeHorizontalSeam(int[] seam) {\r\n validateHorizSeam(seam);\r\n Picture newPic = new Picture(width, --height);\r\n for (int col = 0; col < width; col++) {\r\n for (int row = 0; row < height; row++) {\r\n if (row < seam[col]) {\r\n newPic.set(col, row, pic.get(col, row));\r\n energy[col][row] = energy[col][row];\r\n }\r\n else {\r\n newPic.set(col, row, pic.get(col, row + 1));\r\n energy[col][row] = energy[col][row + 1];\r\n }\r\n }\r\n }\r\n\r\n pic = newPic;\r\n\r\n for (int col = 0; col < width; col++) {\r\n if (seam[col] > 0) energy[col][seam[col] - 1] = calcEnergy(col, seam[col] - 1);\r\n if (seam[col] < height - 1) energy[col][seam[col]] = calcEnergy(col, seam[col]);\r\n }\r\n }", "public void removeVerticalSeam(int[] a) \n {\n if (width() <= 1 || !isValidSeam(a, height(), width()))\n throw new java.lang.IllegalArgumentException();\n Picture pic = new Picture(width()-1, height());\n \n for (int h = 0; h < height(); h++)\n { \n for (int w = 0; w < a[h]; w++)\n pic.set(w, h, this.picture.get(w, h)); \n \n for (int w = a[h]+1; w < width(); w++) \n pic.set(w-1, h, this.picture.get(w, h)); \n \n }\n this.picture = pic;\n }", "public void removeHorizontalSeam(int[] seam) {\n isHorizontalCall = true;\n checkTransposed();\n validate(seam);\n removeVerticalSeam(seam);\n isHorizontalCall = false;\n }", "public void removeHorizontalSeam(int[] seam) {\n if (seam == null)\n throw new java.lang.IllegalArgumentException(\"null seam\");\n if (seam.length != width())\n throw new java.lang.IllegalArgumentException(\"invalid seam length\");\n if (!validateSeam(seam))\n throw new java.lang.IllegalArgumentException(\"invalid seam\");\n transpose();\n removeVerticalSeam(seam);\n transpose();\n }", "void removeVert(Pixel toRemove) {\n\n // is the given below this\n if (this.down == toRemove) {\n if (toRemove.right != null) {\n toRemove.right.left = toRemove.left;\n }\n if (toRemove.left != null) {\n toRemove.left.right = toRemove.right;\n }\n }\n\n // is the given downright to this\n else if (this.downRight() == toRemove) {\n if (toRemove.right != null) {\n toRemove.right.left = toRemove.left;\n }\n if (toRemove.left != null) {\n toRemove.left.right = toRemove.right;\n toRemove.left.up = toRemove.up;\n }\n if (toRemove.up != null) {\n toRemove.up.down = toRemove.left;\n }\n }\n\n //is the given downleft to this\n else if (this.downLeft() == toRemove) {\n if (toRemove.right != null) {\n toRemove.right.left = toRemove.left;\n }\n if (toRemove.left != null) {\n toRemove.left.right = toRemove.right;\n }\n if (toRemove.right != null) {\n toRemove.right.up = toRemove.up;\n }\n if (toRemove.up != null) {\n toRemove.up.down = toRemove.right;\n }\n }\n // if the connections were incorrect\n else {\n throw new RuntimeException(\"Illegal vertical seam\");\n }\n }", "public void removeHorizontalSeam(int[] seam) {\n if (seam == null) {\n throw new NullPointerException();\n }\n\n if (seam.length != width()) {\n throw new IllegalArgumentException();\n }\n\n Picture original = this.pic;\n Picture carvedPic = new Picture(original.width() , original.height()-1);\n\n for (int h = 0; h < carvedPic.width(); h++) {\n for (int w = 0; w < seam[h]; w++) {\n carvedPic.set(h,w, original.get(h,w));\n }\n for (int w = seam[h]; w < carvedPic.height()-1; w++) {\n carvedPic.set(h,w, original.get(h,w+1));\n }\n }\n\n this.pic = carvedPic;\n \n width = pic.width();\n height = pic.height();\n }", "public int[] findVerticalSeam() {\n checkTransposed();\n int[] seam = new int[height];\n if (height <= 2) return seam;\n\n int[] edgeTo = new int[width * height];\n double[] distTo = new double[width * height];\n\n // Initiate distTo to Infinity\n for (int x = 0; x < width; x++) {\n for (int y = 1; y < height; y++) {\n distTo[xyTo1D(x, y)] = Double.POSITIVE_INFINITY;\n }\n }\n // You should not need recursion. Note that the underlying DAG has such special structure\n // that you don’t need to compute its topological order explicitly\n // Run BFS (topological sort) for the implicit DAG to search energy and save at distTo[]\n // The row-major or column-major traverse order make a difference here\n for (int y = 1; y < height; y++) {\n for (int x = 0; x < width; x++) {\n if (x > 0 && distTo[xyTo1D(x - 1, y)] > energy[xyTo1D(x - 1, y)] + distTo[xyTo1D(x, y - 1)]) {\n distTo[xyTo1D(x - 1, y)] = energy[xyTo1D(x - 1, y)] + distTo[xyTo1D(x, y - 1)];\n edgeTo[xyTo1D(x - 1, y)] = x;\n }\n if (distTo[xyTo1D(x, y)] > energy[xyTo1D(x, y)] + distTo[xyTo1D(x, y - 1)]) {\n distTo[xyTo1D(x, y)] = energy[xyTo1D(x, y)] + distTo[xyTo1D(x, y - 1)];\n edgeTo[xyTo1D(x, y)] = x;\n }\n if (x < width - 1 && distTo[xyTo1D(x + 1, y)] > energy[xyTo1D(x + 1, y)] + distTo[xyTo1D(x, y - 1)]) {\n distTo[xyTo1D(x + 1, y)] = energy[xyTo1D(x + 1, y)] + distTo[xyTo1D(x, y - 1)];\n edgeTo[xyTo1D(x + 1, y)] = x;\n }\n }\n }\n // Find the seam endpoint of minimum energy at the last line\n for (int x = 1; x < width - 1; x++) {\n if (distTo[xyTo1D(seam[height - 2], height - 2)] > distTo[xyTo1D(x, height - 2)]) {\n seam[height - 2] = x;\n }\n }\n // Use edgeTo to backtrack the path of minimum energy\n for (int y = height - 2; y > 0; y--) {\n seam[y - 1] = edgeTo[xyTo1D(seam[y], y)];\n }\n // Follow set at border of test examples\n // helpful to reset energy when shifting array elements\n // cutoff to be 0\n seam[height - 1] = Math.max(seam[height - 2] - 1, 0);\n return seam;\n }", "public void removeHorizontalSeam(int[] seam) {\n Picture original = picture;\n Picture transpose = new Picture(original.height(), original.width());\n\n for (int w = 0; w < transpose.width(); w++) {\n for (int h = 0; h < transpose.height(); h++) {\n transpose.set(w, h, original.get(h, w));\n }\n }\n\n this.picture = transpose;\n transpose = null;\n original = null;\n\n // call removeVerticalSeam\n removeVerticalSeam(seam);\n\n // Transpose back.\n original = picture;\n transpose = new Picture(original.height(), original.width());\n\n for (int w = 0; w < transpose.width(); w++) {\n for (int h = 0; h < transpose.height(); h++) {\n transpose.set(w, h, original.get(h, w));\n }\n }\n\n this.picture = transpose;\n transpose = null;\n original = null;\n }", "public int[] findVerticalSeam() {\r\n int[] seam = new int[height];\r\n double distance = Double.POSITIVE_INFINITY;\r\n double[][] distTo = new double[width][height];\r\n Point[][] edgeTo = new Point[width][height];\r\n\r\n for (int col = 0; col < width; col++)\r\n for (int row = 0; row < height; row++)\r\n if (row == 0) distTo[col][row] = 0;\r\n else distTo[col][row] = Double.POSITIVE_INFINITY;\r\n\r\n\r\n for (int row = 0; row < height; row++) {\r\n for (int col = 0; col < width; col++) {\r\n Point p = new Point(col, row);\r\n\r\n for (Point adj : getAdjVert(p)) {\r\n if (distTo[adj.x][adj.y] > distTo[p.x][p.y] + energy[p.x][p.y]) {\r\n distTo[adj.x][adj.y] = distTo[p.x][p.y] + energy[p.x][p.y];\r\n edgeTo[adj.x][adj.y] = p;\r\n if (adj.y == height - 1 && distTo[adj.x][adj.y] < distance) {\r\n distance = distTo[adj.x][adj.y];\r\n for (int count = height; adj != null; adj = edgeTo[adj.x][adj.y])\r\n seam[--count] = adj.x;\r\n }\r\n }\r\n }\r\n\r\n }\r\n }\r\n return seam;\r\n\r\n }", "public void removeHorizontalSeam(final int[] seam) {\n if (height() <= 1 || !isValid(seam, width(), height() - 1)) {\n throw new java.lang.IllegalArgumentException(\n \"IllegalArgumentException\");\n }\n Picture picture1 = new Picture(width(), height() - 1);\n for (int wi = 0; wi < width(); wi++) {\n for (int hei = 0; hei < seam[wi]; hei++) {\n picture1.set(wi, hei, this.pict.get(wi, hei));\n }\n\n for (int hei = seam[wi] + 1; hei < height(); hei++) {\n picture1.set(wi, hei - 1, this.pict.get(wi, hei));\n }\n }\n this.pict = picture1;\n }", "public void removeHorizontalSeam(int[] seam) {\n if (seam == null) {\n throw new IllegalArgumentException(\"Null horizontal seam\");\n }\n\n if (picture().width() <= 1) {\n throw new IllegalArgumentException(\"Picture too small\");\n }\n }", "public int[] findVerticalSeam() {\n\n double[][] energyMatrix = new double[width()][height()];\n int[][] matrixTo = new int[width()][height()];\n\n for(int x =0; x< width(); x++) {\n for(int y=0; y< height(); y++) {\n energyMatrix[x][y] = Double.POSITIVE_INFINITY;\n }\n }\n for(int x =0; x < width(); x++) {\n energyMatrix[x][0] = 1000;\n }\n \n for(int j=0; j< height() - 1; j++) {\n for(int i=0; i < width(); i++ ) {\n if(i>0) {\n if(energyMatrix[i-1][j+1] > energyMatrix[i][j] + energy(i-1,j+1)) {\n energyMatrix[i-1][j+1] = energyMatrix[i][j] + energy(i-1,j+1);\n matrixTo[i-1][j+1] = i;\n }\n\n }\n\n if(energyMatrix[i][j+1] > energyMatrix[i][j] + energy(i,j+1)) {\n energyMatrix[i][j+1] = energyMatrix[i][j] + energy(i,j+1);\n matrixTo[i][j+1] = i;\n }\n \n\n if(i < width()-1) {\n if(energyMatrix[i+1][j+1] > energyMatrix[i][j] + energy(i+1,j+1)) {\n energyMatrix[i+1][j+1] = energyMatrix[i][j] + energy(i+1,j+1);\n matrixTo[i+1][j+1] = i;\n }\n }\n }\n }\n \n double minEnergy = Double.POSITIVE_INFINITY;\n int minEnergyX = -1;\n for(int w =0; w < width() ; w++) {\n if(energyMatrix[w][height()-1] < minEnergy) {\n minEnergyX = w;\n minEnergy = energyMatrix[w][height() - 1];\n }\n }\n\n int[] seam = new int[height()];\n seam[height() -1] = minEnergyX;\n int prevX = matrixTo[minEnergyX][height() - 1];\n\n for(int h = height() - 2; h >= 0 ; h--) {\n seam[h] = prevX;\n prevX = matrixTo[prevX][h];\n }\n return seam;\n \n }", "public int[] findVerticalSeam() {\n double minDist = Double.POSITIVE_INFINITY;\n int[] minPixel = new int[2];\n double[][] distToPixel = new double[width()][height()];\n HashMap<Integer, int[]> pixelToPixel = new HashMap<Integer, int[]>();\n for (double[] row : distToPixel) { Arrays.fill(row, Double.POSITIVE_INFINITY); }\n for (int i = 0; i < width(); i++) {\n distToPixel[i][0] = 0;\n }\n for (int y = 0; y < height() - 1; y++) {\n for (int x = 0; x < width(); x++) {\n\n for (int[] ap : adjacentPixels(x, y)) {\n if (distToPixel[ap[0]][ap[1]] > distToPixel[x][y] + energy(ap[0], ap[1])) {\n distToPixel[ap[0]][ap[1]] = distToPixel[x][y] + energy(ap[0], ap[1]);\n pixelToPixel.put(pixelHash(ap[0], ap[1]), new int[] { x, y });\n }\n }\n }\n }\n for (int i = 0; i < width(); i++) {\n if (distToPixel[i][height() - 1] < minDist) {\n minDist = distToPixel[i][height() - 1];\n minPixel = new int[] { i, height() - 1 };\n }\n }\n int[] outputSeam = new int[height()];\n Stack<Integer> pixPath = new Stack<Integer>();\n pixPath.push(minPixel[0]);\n int mp = pixelHash(minPixel[0], minPixel[1]);\n while (true) {\n int[] pixelArr = pixelToPixel.get(mp);\n if (pixelArr == null) { break; }\n pixPath.push(pixelArr[0]);\n mp = pixelHash(pixelArr[0], pixelArr[1]);\n }\n for (int i = 0; i < outputSeam.length; i++) { outputSeam[i] = pixPath.pop(); }\n return outputSeam;\n }", "public int[] findVerticalSeam() {\n\n int[] seam = new int[height()];\n\n // Tracks columns of least-energy seams.\n int[][] edgeTo = new int[width()][height()];\n\n // Store cumulative energy of the seams that go through each pixel.\n double[][] distTo = new double[width()][height()];\n\n // Initialize all distances to infinity, except top row.\n for (int col = 0; col < width(); col++) {\n for (int row = 0; row < height(); row++) {\n if (row == 0) distTo[col][row] = energy[col][row];\n else distTo[col][row] = Double.POSITIVE_INFINITY;\n }\n }\n\n // Builds least-energy seams through picture.\n for (int row = 1; row < height(); row++) {\n for (int col = 0; col < width(); col++) {\n\n if (col > 0 && distTo[col - 1][row] > (energy[col - 1][row]\n + distTo[col][row - 1])) {\n\n distTo[col - 1][row] = energy[col - 1][row] + distTo[col][row - 1];\n edgeTo[col - 1][row] = col;\n }\n if (distTo[col][row] > (energy[col][row] + distTo[col][row - 1])) {\n\n distTo[col][row] = energy[col][row] + distTo[col][row - 1];\n edgeTo[col][row] = col;\n }\n if (col < width() - 1 && distTo[col + 1][row] > (energy[col + 1][row]\n + distTo[col][row - 1])) {\n\n distTo[col + 1][row] = energy[col + 1][row] + distTo[col][row - 1];\n edgeTo[col + 1][row] = col;\n }\n }\n }\n // Find the end of the least total energy seam.\n double leastEnergy = Double.POSITIVE_INFINITY;\n for (int col = 0; col < width() - 1; col++) {\n double currentEnergy = distTo[col][height() - 1];\n if (currentEnergy < leastEnergy) {\n leastEnergy = currentEnergy;\n seam[height() - 1] = col;\n }\n }\n // Back-track from end of seam to beginning.\n for (int row = height() - 1; row > 0; row--) {\n seam[row - 1] = edgeTo[seam[row]][row];\n }\n return seam;\n }", "public int[] findVerticalSeam() {\n double[][] energyTo = new double[width][height]; // will hold smallest energy path to each entry\n int[] edgeTo = new int[height]; // will hold smallest energy path\n \n // initialiaze energy path array\n for (int j = 0; j < height(); j++) {\n for (int i = 0; i < width(); i++) {\n if (j == 0) {\n energyTo[i][j] = energy[i][j]; // top row has initial energyTo it equal to its energy\n }\n else\n energyTo[i][j] = Double.POSITIVE_INFINITY; // initialize every other value to Infinity\n }\n }\n \n // Calculate smallest energy path to each entry in energyTo array\n for (int y = 0; y < height(); y++) {\n for (int x = 0; x < width(); x++) {\n relax(x, y, energyTo, edgeTo);\n }\n }\n \n // find the seam with the smallest total energy\n findSeam(energyTo, edgeTo);\n \n return edgeTo;\n }", "public int[] findVerticalSeam() {\n double[][] energy = new double[height][width];\n int[][] edgeTo = new int[height][width];\n double[][] distTo = new double[height][width];\n reset(distTo);\n int[] indices = new int[height];\n if (width == 1 || height == 1) {\n return indices;\n }\n for (int i = 0; i < width; i++) {\n distTo[0][i] = 1000.0;\n }\n // this is for relaxation.\n for (int i = 0; i < height - 1; i++) {\n for (int j = 0; j < width; j++) {\n relaxVertical(i, j, edgeTo, distTo);\n }\n }\n // calculating from last rows\n // column wise\n double minDist = Double.MAX_VALUE;\n int minCol = 0;\n for (int columns = 0; columns < width; columns++) {\n if (minDist > distTo[height - 1][columns]) {\n minDist = distTo[height - 1][columns];\n minCol = columns;\n }\n }\n //indices values of shortest path.\n for (int rows = height -1, columns = minCol; rows >= 0; rows--) {\n indices[rows] = columns;\n columns -= edgeTo[rows][columns];\n }\n indices[0] = indices[1];\n return indices;\n }", "public int[] findVerticalSeam() {\n ArrayList<Integer> seam = new ArrayList<>();\n double[][] energies = SCUtility.toEnergyMatrix(this);\n for (int r = 1; r < this.height(); r++) {\n for (int c = 0; c < this.width(); c++) {\n energies[c][r] = findVert(c, r, energies);\n }\n }\n\n double[] first = new double[this.width()];\n for (int c = 0; c < this.width(); c++) {\n first[c] = energies[c][this.height() - 1];\n }\n\n int bottomRowIndex = getMinIndex(first);\n seam.add(bottomRowIndex);\n connectLeast(bottomRowIndex, this.height() - 1, energies, seam);\n int[] correctSeam = new int[seam.size()];\n for (int i = 0; i < seam.size(); i++) {\n correctSeam[i] = seam.get(i);\n }\n return correctSeam;\n }", "private void removeMine(int i, int j) {\n current[i][j] = new Empty();\n for (int k = -1; k <= 1; k++) {\n for (int l = -1; l <= 1; l++) {\n //pas de omliggende vlaggetjes aan\n if ((k != 0 || l != 0) && inField(i + k, j + l) && current[i + k][j + l].isBound()) {\n current[i + k][j + l].increment();\n }\n }\n }\n }", "public void RemoveSol()\r\n {\r\n for (int i = 0; i <maze.Struct.length ; i++) {\r\n for (int j = 0; j <maze.Struct[0].length ; j++) {\r\n if (maze.Struct[i][j]== 2)\r\n maze.Struct[i][j]= 0;\r\n }\r\n }\r\n setChanged();\r\n notifyObservers(\"RemoveSol\");\r\n }", "public void compact() {\n\t\tint n = vertices.size();\n\t\t// ids utilizados de 1 a n\n\t\tint[] small = new int[n + 1];\n\t\tVertice[] big = new Vertice[n];\n\n\t\tint qbig = 0;\n\t\tfor (Vertice v1 : vertices.values()) {\n\t\t\tif (v1.id <= n)\n\t\t\t\tsmall[v1.id] = 1;\n\t\t\telse\n\t\t\t\tbig[qbig++] = v1;\n\t\t}\n\n\t\tint i = 1;\n\t\tfor (int pairs = 0; pairs < qbig; i++) {\n\t\t\tif (small[i] == 0)\n\t\t\t\tsmall[pairs++] = i;\n\t\t}\n\n\t\tfor (i = 0; i < qbig; i++) {\n\t\t\tint old_id = big[i].id;\n\t\t\tbig[i].id = small[i];\n\n\t\t\tvertices.remove(old_id);\n\t\t\tvertices.put(big[i].id, big[i]);\n\n\t\t\tfor (Vertice v1 : vertices.values()) {\n\t\t\t\tif (v1.vizinhos.get(old_id) != null) {\n\t\t\t\t\tv1.vizinhos.remove(old_id);\n\t\t\t\t\tv1.vizinhos.put(big[i].id, big[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void removeHorizontalSeam(int[] a) \n {\n if (height() <= 1 || !isValidSeam(a, width(), height()-1))\n throw new java.lang.IllegalArgumentException();\n Picture pic = new Picture(width(), height()-1);\n for (int w = 0; w < width(); w++)\n {\n for (int h = 0; h < a[w]; h++)\n pic.set(w, h, this.picture.get(w, h));\n \n for (int h = a[w]+1; h < height(); h++)\n pic.set(w, h-1, this.picture.get(w, h));\n \n }\n this.picture = pic;\n }", "public void RemoveRowsIfStackedTooHigh() {\n \t\t\n while (rowHasBlocks(Parameters.RemoveBiggestPartialRowIfBlockInRow)) {\n int NoOfPiecesRemoved = \n eraseBiggestRowGreaterThan(Parameters.RemoveBiggestPartialRowIfBlockInRow);\n //remove points for each empty square\n ComputeScoreAndDelay(-(COLUMNS - NoOfPiecesRemoved) * Parameters.PointsSubtractedPerEmptySpaceFromPartialRow);\n \n }\n game_grid.repaint();\n LogEvent(\"row_removed\");\n }", "public int[] findVerticalSeam() {\n return null;\n }", "public void removeEdge() {\n Graph GO = new Graph(nbOfVertex + 1);\n Value.clear();\n for (int i = 0; i < x.length; i++) {\n for (int j : x[i].getDomain()) {\n Value.add(j);\n if (MaxMatch[i] == Map.get(j)) {\n GO.addEdge(Map.get(j), i);\n } else {\n GO.addEdge(i, Map.get(j));\n }\n }\n }\n\n for (int i : V2) {\n for (int j : Value) {\n if (!V2.contains(j)) {\n GO.addEdge(i, j);\n }\n }\n }\n //System.out.println(\"GO : \");\n //System.out.println(GO);\n int[] map2Node = GO.findStrongConnectedComponent();\n //GO.printSCC();\n\n ArrayList<Integer>[] toRemove = new ArrayList[n];\n for (int i = 0; i < n; i++) {\n toRemove[i] = new ArrayList<Integer>();\n }\n for (int i = 0; i < n; i++) {\n for (int j : x[i].getDomain()) {\n ////System.out.println(i + \" \" + j);\n if (map2Node[i] != map2Node[Map.get(j)] && MaxMatch[i] != Map.get(j)) {\n toRemove[i].add(j);\n if (debug == 1) System.out.println(\"Remove arc : \" + i + \" => \" + j);\n }\n }\n }\n for (int i = 0; i < n; i++) {\n for (int j : toRemove[i]) {\n x[i].removeValue(j);\n }\n }\n }", "void returnLastSeamVert() {\n SeamInfo toReturn = this.removedSeams.remove(this.removedSeams.size() - 1);\n\n toReturn.returnSeamVert();\n }", "void removeRoadside(int i);", "public void Remove(int row, int column) {\n if (row < 0 || column < 0 || row > (numberOfRows - 1) || column > (numberOfColumns - 1)\n || grid[row][column] != LASER) {\n message = (\"Error removing laser at: (\" + row + \", \" + column + \")\");\n } else {\n grid[row][column] = EMPTY;\n // Remove a laser beam to the North direction until we reach a pillar or the top\n for (int i = row - 1; i >= 0; i--) {\n if (grid[i][column] == X || grid[i][column] == ZERO ||\n grid[i][column] == ONE || grid[i][column] == TWO ||\n grid[i][column] == THREE || grid[i][column] == FOUR ||\n grid[i][column] == LASER) {\n break;\n } else {\n grid[i][column] = EMPTY;\n }\n }\n // Remove a laser beam to the South direction until we reach a pillar or the bottom\n for (int i = row + 1; i < numberOfRows; i++) {\n if (grid[i][column] == X || grid[i][column] == ZERO ||\n grid[i][column] == ONE || grid[i][column] == TWO ||\n grid[i][column] == THREE || grid[i][column] == FOUR ||\n grid[i][column] == LASER) {\n break;\n } else {\n grid[i][column] = EMPTY;\n }\n }\n // Remove a laser beam to the West direction until we reach a pillar or the left corner\n for (int i = column - 1; i >= 0; i--) {\n if (grid[row][i] == X || grid[row][i] == ZERO ||\n grid[row][i] == ONE || grid[row][i] == TWO ||\n grid[row][i] == THREE || grid[row][i] == FOUR ||\n grid[row][i] == LASER) {\n break;\n } else {\n grid[row][i] = EMPTY;\n }\n }\n // Remove a laser beam to the East direction until we reach a pillar or the right direction\n for (int i = column + 1; i < numberOfColumns; i++) {\n if (grid[row][i] == X || grid[row][i] == ZERO ||\n grid[row][i] == ONE || grid[row][i] == TWO ||\n grid[row][i] == THREE || grid[row][i] == FOUR ||\n grid[row][i] == LASER) {\n break;\n } else {\n grid[row][i] = EMPTY;\n }\n }\n for (int k = 0; k < numberOfRows; k++) {\n for (int j = 0; j < numberOfColumns; j++ ) {\n if (grid[k][j] == LASER) {\n // Set up a laser beam to the North direction until we reach a pillar, laser or the top\n for (int i = k - 1; i >= 0; i--) {\n if (grid[i][j] == X || grid[i][j] == ZERO ||\n grid[i][j] == ONE || grid[i][j] == TWO ||\n grid[i][j] == THREE || grid[i][j] == FOUR ||\n grid[i][j] == LASER) {\n break;\n } else {\n grid[i][j] = LASER_BEAM;\n }\n }\n // Set up a laser beam to the South direction until we reach a pillar, laser or the bottom\n for (int i = k + 1; i < numberOfRows; i++) {\n if (grid[i][j] == X || grid[i][j] == ZERO ||\n grid[i][j] == ONE || grid[i][j] == TWO ||\n grid[i][j] == THREE || grid[i][j] == FOUR ||\n grid[i][j] == LASER) {\n break;\n } else {\n grid[i][j] = LASER_BEAM;\n }\n }\n // Set up a laser beam to the West direction until we reach a pillar, laser or the left corner\n for (int i = j - 1; i >= 0; i--) {\n if (grid[k][i] == X || grid[k][i]== ZERO ||\n grid[k][i] == ONE || grid[k][i] == TWO ||\n grid[k][i] == THREE || grid[k][i] == FOUR ||\n grid[k][i] == LASER) {\n break;\n } else {\n grid[k][i] = LASER_BEAM;\n }\n }\n // Set up a laser beam to the East direction until we reach a pillar, laser or the right direction\n for (int i = j + 1; i < numberOfColumns; i++) {\n if (grid[k][i] == X || grid[k][i]== ZERO ||\n grid[k][i] == ONE || grid[k][i] == TWO ||\n grid[k][i] == THREE || grid[k][i] == FOUR ||\n grid[k][i] == LASER) {\n break;\n } else {\n grid[k][i] = LASER_BEAM;\n }\n }\n }\n }\n }\n message = (\"Laser removed at: (\" + row + \", \" + column + \")\");\n }\n }", "void removeHoriz(Pixel toRemove) {\n\n if (this.right == toRemove) {\n if (toRemove.up != null) {\n toRemove.up.down = toRemove.down;\n }\n if (toRemove.down != null) {\n toRemove.down.up = toRemove.up;\n }\n }\n\n else if (this.topRight() == toRemove) {\n if (toRemove.up != null) {\n toRemove.up.down = toRemove.down;\n }\n if (toRemove.down != null) {\n toRemove.down.up = toRemove.up;\n }\n if (toRemove.down != null) {\n toRemove.down.left = toRemove.left;\n }\n if (toRemove.left != null) {\n toRemove.left.right = toRemove.down;\n }\n }\n else if (this.downRight() == toRemove) {\n if (toRemove.up != null) {\n toRemove.up.down = toRemove.down;\n }\n if (toRemove.down != null) {\n toRemove.down.up = toRemove.up;\n }\n if (toRemove.up != null) {\n toRemove.up.left = toRemove.left;\n }\n if (toRemove.left != null) {\n toRemove.left.right = toRemove.up;\n }\n }\n else {\n throw new RuntimeException(\"Illegal disconnected seam\");\n }\n }", "void remove(int v){\n if(isEmpty()!=1){\n for(int i=0;i<size;i++){\n if(values[i]==v){\n int j = i;\n while((j+1)!=size){\n values[j] = values[j+1];\n j++;\n\n }\n values[j] = (-1);\n break;\n }\n }\n }\n }", "@Test\n\tpublic void testEliminationByColumn(){\n\t\tsetBoardUp();\n\t\tColumn col = new Column(board, 1);\n\t\tint[] toBeRemoved = {1, 3, 4};\n\t\tint[] fromCesll = {1, 2, 3, 5, 6, 8};\n\t\talgorithm.applyEliminationInColumn(col);\n\t\tboolean condition = true;\n\t\tfor(int i = 0; i < toBeRemoved.length; i++)\n\t\t\tfor(int j = 0; j < fromCesll.length; j++)\n\t\t\t\tcondition &= !col.cell[fromCesll[j]].possibilities.contains(toBeRemoved[i]);\t\t\n\t\tassertTrue(condition);\n\t}", "public void removeCutVertices() {\n boolean found;\n LinkedList<Integer> isolated = new LinkedList<>();\n do {\n found = false;\n for (Map.Entry<Integer, Set<Integer>> entry : adjacencyMap.entrySet()) {\n// System.out.println(\"adjacency print key: \" + entry.getKey() + \"value: \" +\n// entry.getValue() + \"set size: \" + entry.getValue().size());\n if (entry.getValue().size() == 1) {\n// System.out.println(\"found cut vertex\");\n found = true; // loop yielded a cut vertex\n // get the only vertex in the set\n for (Integer integer : entry.getValue()) {\n// System.out.println(\"started set iterator\" + integer);\n int removalSet = integer; // take the value of the set element\n // create a temp set\n Set<Integer> tempSet = adjacencyMap.get(removalSet);\n tempSet.remove(entry.getKey()); // remove the cut vertex from this set\n adjacencyMap.replace(removalSet, tempSet); // put the smaller set in place\n }\n isolated.add(entry.getKey());\n\n\n }\n\n }\n // remove isolated vertices\n for (Integer vert : isolated) {\n adjacencyMap.remove(vert);\n }\n isolated.clear();\n } while (found);\n }", "public int[] findHorizontalSeam() {\r\n int[] seam = new int[width]; // seam length is same as the width of pic\r\n double distance = Double.POSITIVE_INFINITY;\r\n double[][] distTo = new double[width][height];\r\n Point[][] edgeTo = new Point[width][height]; //from each point i know the latest point\r\n\r\n\r\n for (int col = 0; col < width; col++)\r\n for (int row = 0; row < height; row++)\r\n if (col == 0) distTo[col][row] = 0;\r\n else distTo[col][row] = Double.POSITIVE_INFINITY;\r\n\r\n\r\n\r\n for (int col = 0; col < width; col++) {\r\n for (int row = 0; row < height; row++) {\r\n Point p = new Point(col, row); // initialize the point.\r\n\r\n for (Point adj : getAdjHoriz(p)) {\r\n if (distTo[adj.x][adj.y] > distTo[p.x][p.y] + energy[p.x][p.y]) {\r\n distTo[adj.x][adj.y] = distTo[p.x][p.y] + energy[p.x][p.y]; // the first row of point is distto array is 0 ( 0 + energy)\r\n edgeTo[adj.x][adj.y] = p;\r\n if (adj.x == width - 1 && distTo[adj.x][adj.y] < distance) { // i pick the best seam from the distance\r\n distance = distTo[adj.x][adj.y];\r\n for (int count = width; adj != null; adj = edgeTo[adj.x][adj.y])\r\n seam[--count] = adj.y;\r\n }\r\n }\r\n }\r\n\r\n }\r\n }\r\n return seam;\r\n }", "void removeNearbyPixels(Stroke theStroke){\n\t\tint index;\n\t\tint CurvIndex;\n\t\tint SpeedIndex;\n\t\tVector ptList = theStroke.getM_ptList();\n\t\tfor(index=0; index < CommonSegmentPts.size(); index++){\n\t\t\tPoint CommonPt = (PixelInfo)ptList.get((Integer)CommonSegmentPts.get(index));\n\t\t\tfor(CurvIndex = 0; CurvIndex < CurvVector.size(); CurvIndex++){\n\t\t\t\tPoint CurvPt = (PixelInfo)ptList.get((Integer)CurvVector.get(CurvIndex));\n\t\t\t\tif(CommonPt.distance(CurvPt) <= TolerantDistance){\n\t\t\t\t\tCurvVector.remove(CurvIndex--);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(SpeedIndex = 0; SpeedIndex < SpeedVector.size(); SpeedIndex++){\n\t\t\t\tPoint SpeedPt = (PixelInfo)ptList.get((Integer)SpeedVector.get(SpeedIndex));\n\t\t\t\tif(CommonPt.distance(SpeedPt) <= TolerantDistance){\n\t\t\t\t\tSpeedVector.remove(SpeedIndex--);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private synchronized void removeWall(int desiredRow, int desiredColumn) {\n \tint topBlock = m.maze[desiredRow - 1][desiredColumn];\t\t\t\t\t// block directly above the current block\r\n \tint leftBlock = m.maze[desiredRow][desiredColumn - 1];\t\t\t\t\t// block directly left of the current block\r\n \tint bottomBlock = m.maze[desiredRow + 1][desiredColumn];\t\t\t\t// block directly below the current block\r\n \tint rightBlock = m.maze[desiredRow][desiredColumn + 1];\t\t\t\t\t// block directly right of the current block\r\n \t\r\n if (desiredRow % 2 == 1 && leftBlock != rightBlock) {\t\t\t\t\t// wall is vertical\r\n \tm.fixBlocks(desiredRow, desiredColumn - 1, leftBlock, rightBlock);\t// fix all blocks so a loop is not created when the wall is removed\r\n m.maze[desiredRow][desiredColumn] = rightBlock;\t\t\t\t\t\t// set current block with wall to be empty (no wall) thus removing the wall\r\n } else if (desiredRow % 2 == 0 && topBlock != bottomBlock) {\t\t\t// wall is horizontal\r\n \tm.fixBlocks(desiredRow - 1, desiredColumn, topBlock, bottomBlock);\t// fix all blocks so a loop is not created when the wall is removed\r\n m.maze[desiredRow][desiredColumn] = bottomBlock;\t\t\t\t\t// set current block with wall to be empty (no wall) thus removing the wall\r\n }\r\n repaint();\r\n try { wait(1); }\r\n catch (InterruptedException e) { }\r\n }", "public void EliminarVertice(int v) {\n\t\tNodoGrafo aux = origen;\n\t\tif (origen.nodo == v) \n\t\t\torigen = origen.sigNodo;\t\t\t\n\t\twhile (aux != null){\n\t\t\t// remueve de aux todas las aristas hacia v\n\t\t\tthis.EliminarAristaNodo(aux, v);\n\t\t\tif (aux.sigNodo!= null && aux.sigNodo.nodo == v) {\n\t\t\t\t// Si el siguiente nodo de aux es v , lo elimina\n\t\t\t\taux.sigNodo = aux.sigNodo.sigNodo;\n\t\t\t}\n\t\t\taux = aux.sigNodo;\n\t\t}\t\t\n\t}", "public int[] findVerticalSeam() {\n return findSeam(false);\n }", "void removeEdge(int x, int y);", "protected void removeLine(int row) {\n\t\t// clear out the true values from row/filled blocks\n\t\tfor(int j = 0; j < blockMatrix[row].length; j++) { \n\t\t\tblockMatrix[row][j] = false; \n\t\t}\n\t}", "public int[] findVerticalSeam() \n {\n double[][] nrgs = energiesArray();\n return findMinVertPath(nrgs);\n }", "public void removeVertex (T vertex){\n int index = vertexIndex(vertex);\n \n if (index < 0) return; // vertex does not exist\n \n n--;\n // IF THIS DOESN'T WORK make separate loop for column moving\n for (int i = index; i < n; i++){\n vertices[i] = vertices[i + 1];\n for (int j = 0; j < n; j++){\n edges[j][i] = edges[j][i + 1]; // moving row up\n edges[i] = edges[i + 1]; // moving column over\n }\n }\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 }", "public int clearLine()\n {\n int count = 0;\n for (int i = grid.length-1; i >= 1;)\n {\n //check if it's a row to remove\n boolean z = true;\n for (int j = 0; j < grid[i].length; j++)\n {\n if (grid[i][j] == 0)\n {\n z = false;\n break;\n }\n }\n \n //remove it, shift everything down one\n if (z)\n {\n for (int k = i; k >= 1; k--)\n {\n for (int l = 0; l < grid[i].length; l++)\n {\n grid[k][l] = grid[k-1][l];\n }\n }\n count++;\n } else\n {\n i--;\n }\n }\n return count;\n }", "public boolean hidden(Square[][] square)\n {\n \tboolean rem = false;\n \tArrayList<ArrayList<Integer>> poss = new ArrayList<ArrayList<Integer>>();\n for(int x = 1; x <= 9; x++)\n {\n \tArrayList<Integer> pos = new ArrayList<Integer>();\n \tfor(int r = 0; r < 9; r++)\n \t{\n \t\tif(square[r][colNum].returnPossible().indexOf(x) != -1)\n \t\t{\n \t\t\tpos.add(r);\n \t\t}\n \t}\n \tposs.add(pos);\n }\n \n for(int x = 0; x < poss.size(); x++)\n {\n \tif(poss.get(x).size() != 1)\n \t{\n \t\tArrayList<Integer> other = new ArrayList<Integer>();\n \t\tfor(int x2 = 0; x2 < poss.size(); x2++)\n \t\t{\n \t\t\tif(contains(poss.get(x), poss.get(x2)))\n \t\t{\n \t\t\t\tother.add(x2 + 1);\t\n \t\t}\t\n \t\t}\n \t\tif(other.size() == poss.get(x).size())\n \t\t{\n \t\t\tboolean now = removeElse(square, other, poss.get(x));\n \t\t\tif(now)\n \trem = true;\n \t\t}\n \t}\n }\n return rem;\n }", "private void removeStatement(){\n\t\tsynchronized(m_viz){\n\t\t\tTuple firstTuple;\n\t\t\tsynchronized(statementList){\n\t\t\t\tfirstTuple = statementList.getFirst();\n\t\t\t}\n\n\t\t\t// Remove action is synchronized to prevent PreFuse from drawing at the same time\n\t\t\tremoveMessage(firstTuple);\n\t\t\tm_statements.removeTuple(firstTuple);\n\t\t\tstatementList.removeFirst();\t\t\t\n\t\t}\n\t}", "public int hamming() {\n int count = 0;\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N && i+j < 2*N-2; j++) {\n if (blocks[i][j] != i*N + j + 1) {\n count++;\n }\n }\n }\n return count;\n }", "private Element removeHiElements(Element p_seg)\n {\n ArrayList elems = new ArrayList();\n\n findHiElements(elems, p_seg);\n\n for (int i = 0; i < elems.size(); i++)\n {\n Element hi = (Element)elems.get(i);\n\n removeHiElement(hi);\n }\n\n return p_seg;\n }", "private List<Individual<T>> removeWorst(List<Individual<T>> tournament) {\n Individual<T> worst = selWorstOp.select(tournament);\n tournament.remove(worst);\n return tournament;\n }", "private void eliminarAsteroide(int num){\n\t\t\n\t\tnumAsteroides--;\n\t\t\n\t\tfor(int i=num;i<numAsteroides;i++){\n\t\t\tasteroides[i]=asteroides[i+1];\n\t\t}\n\t\tasteroides[numAsteroides]=null;\n\t}", "@Test\n\tpublic void testEliminationByMediumBox(){\n\t\tsetBoardUp();\n\t\tMediumBox mBox = new MediumBox(board, 1, 1);\n\t\talgorithm.applyEliminationInMediumBox(mBox);\n\t\tint[] toBeRemoved = {1, 2, 8, 9};\n\t\tint[] fromCells = {0, 1, 4, 7, 8};\n\t\tboolean condition = true;\n\t\tfor(int i = 0; i < toBeRemoved.length; i++)\n\t\t\tfor(int j = 0; j < fromCells.length; j++)\n\t\t\t\tcondition &= !mBox.cell[fromCells[j]].possibilities.contains(toBeRemoved[i]);\t\t\n\t\t\n\t\tassertTrue(condition);\n\t}", "private void checkVertical() {\n\n for(int i = 0; i < 2; i++){ // winning column can be either 0-1-2-(3) or (0)-1-2-3\n for (int j = 0; j < stateArray[3].length; j++) {\n\n if (check3Vertical(i, j)) {\n maskResultArray[stateArray[i][j]] = 1;\n maskArray[i][j] = 1;\n maskArray[i+1][j] = 1;\n maskArray[i+2][j] = 1;\n }\n\n }\n }\n\n }", "private void collapseIgloo() {\n blocks.sort(Comparator.comparing(a -> a.center.getY()));\n\n double minDistance, distance;\n Point3D R = new Point3D(0, -1, 0);\n for (int i = 0; i < blocks.size(); i++) {\n minDistance = Double.MAX_VALUE;\n for (int j = i - 1; j >= 0; j--) {\n if (boundingSpheresIntersect(blocks.get(i), blocks.get(j))) {\n distance = minDistance(blocks.get(i), blocks.get(j), R);\n if (distance < minDistance) {\n minDistance = distance;\n }\n }\n }\n if (minDistance != Double.MAX_VALUE) {\n blocks.get(i).move(R.multiply(minDistance));\n }\n }\n }", "public void removeVertex();", "public void removeDeadVampires() {\n\n for (int i = 0; i < Vampiro.getNumVamp(); i++) {\n if (lista[i].getVida() <= 0)\n delVampire(i);\n }\n }", "public void symmetric() {\n\t\tint i,j,segment=0;\n\t\tint symmetry = _geneticCode.getSymmetry();\n\t\tint mirror = _geneticCode.getMirror();\n\t\tint sequence = _segments / symmetry;\n\t\tint left=0, right=0, top=0, bottom=0;\n\t\tint centerX, centerY;\n\t\tdouble cx, cy;\n\n\t\tfor (i=0; i<symmetry; i++) {\n\t\t\tfor (j=0; j<sequence; j++,segment++) {\n\t\t\t\t// Here, we take the vector that forms the segment, scale it depending on\n\t\t\t\t// the relative size of the organism and rotate it depending on the\n\t\t\t\t// symmetry and mirroring.\n\t\t\t\tv.setModulus(_geneticCode.getGene(j).getLength()/Utils.scale[_growthRatio-1]);\n\t\t\t\tif (j==0) {\n\t\t\t\t\t_startPointX[segment] = 0;\n\t\t\t\t\t_startPointY[segment] = 0;\n\t\t\t\t\tif (mirror == 0 || i%2==0)\n\t\t\t\t\t\tv.setTheta(_geneticCode.getGene(j).getTheta()+i*2*FastMath.PI/symmetry);\n\t\t\t\t\telse {\n\t\t\t\t\t\tv.setTheta(_geneticCode.getGene(j).getTheta()+(i-1)*2*FastMath.PI/symmetry);\n\t\t\t\t\t\tv.invertX();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (_geneticCode.getGene(j).getBranch() == -1) {\n\t\t\t\t\t\t_startPointX[segment] = _endPointX[segment - 1];\n\t\t\t\t\t\t_startPointY[segment] = _endPointY[segment - 1];\n\t\t\t\t\t\tif (mirror == 0 || i%2==0)\n\t\t\t\t\t\t\tv.addDegree(_geneticCode.getGene(j).getTheta());\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tv.addDegree(-_geneticCode.getGene(j).getTheta());\n\t\t\t\t\t} else {\n\t\t\t\t\tif (_geneticCode.getGene(j).getBranch() == 0) {\n\t\t\t\t\t\t_startPointX[segment] = 0;\n\t\t\t\t\t _startPointY[segment] = 0;\n\t\t\t\t\t if (mirror == 0 || i%2==0)\n\t\t\t\t\t\t\tv.addDegree(_geneticCode.getGene(j).getTheta());\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tv.addDegree(-_geneticCode.getGene(j).getTheta());\n\t\t\t\t\t} else {\n\t\t\t\t\t\t_startPointX[segment] = _endPointX[(i * sequence) + _geneticCode.getGene(j).getBranch() - 1];\n\t\t\t\t\t _startPointY[segment] = _endPointY[(i * sequence) + _geneticCode.getGene(j).getBranch() - 1];\n\t\t\t\t\t if (mirror == 0 || i%2==0)\n\t\t\t\t\t\t\tv.addDegree(_geneticCode.getGene(j).getTheta());\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tv.addDegree(-_geneticCode.getGene(j).getTheta());\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Apply the vector to the starting point to get the ending point.\n\t\t\t\t_endPointX[segment] = (int) FastMath.round(v.getX() + _startPointX[segment]);\n\t\t\t\t_endPointY[segment] = (int) FastMath.round(v.getY() + _startPointY[segment]);\n\t\t\t // Calculate the bounding rectangle of this organism\n\t\t\t left = Math.min(left, _endPointX[segment]);\n\t\t\t right = Math.max(right, _endPointX[segment]);\n\t\t\t top = Math.min(top, _endPointY[segment]);\n\t\t\t bottom = Math.max(bottom, _endPointY[segment]);\n\t\t\t}\n\t\t}\n\t\t_sizeRect.setBounds(left, top, right-left+1, bottom-top+1);\n\t\t// image center\n\t\tcenterX = (left+right)>>1;\n\t\tcenterY = (top+bottom)>>1;\n\t\t_mass = 0;\n\t\t_I = 0;\n\t\tfor (i=0; i<_segments; i++) {\n\t\t\t// express points relative to the image center\n\t\t\t_startPointX[i]-=centerX;\n\t\t\t_startPointY[i]-=centerY;\n\t\t\t_endPointX[i]-=centerX;\n\t\t\t_endPointY[i]-=centerY;\n\t\t\t// calculate points distance of the origin and modulus\n\t\t\t_m1[i] = FastMath.sqrt(_startPointX[i]*_startPointX[i]+_startPointY[i]*_startPointY[i]);\n\t\t\t_m2[i] = FastMath.sqrt(_endPointX[i]*_endPointX[i]+_endPointY[i]*_endPointY[i]);\n\t\t\t_m[i] = FastMath.sqrt(FastMath.pow(_endPointX[i]-_startPointX[i],2) +\n FastMath.pow(_endPointY[i]-_startPointY[i],2));\n\t\t\t_mass += _m[i];\n\t\t\t_mphoto[i] = (0.6 + (0.48 / (double)sequence) + (1.44 / (double)symmetry)) * _m[i];\n\t\t\t// calculate inertia moment\n\t\t\t// the mass center of a segment is its middle point\n\t\t\tcx = (_startPointX[i] + _endPointX[i]) / 2d;\n\t\t\tcy = (_startPointY[i] + _endPointY[i]) / 2d;\n\t\t\t// add the effect of this segment, following the parallel axis theorem\n\t\t\t_I += FastMath.pow(_m[i],3)/12d +\n\t\t\t\t_m[i] * cx*cx + cy*cy;// mass * length^2 (center is at 0,0)\n\t\t}\n\t}", "void updateAvailMovesInLineInBoxVertical(int num, int line, int box) {\n\t\tfor (int i = 0; i < boardSize; i++) {\n\t\t\tif (availMoves[line][i][num-1] == true) {\n\t\t\t\t// we don't want to remove the elements from the box we are inside so we do this check.\n\t\t\t\tif (i/boxSize != box) {\n\t\t\t\t\t//System.out.println(\"removing \" + num + \" vertically, found another at (\" + line + \",\" + i + \")\");\n\t\t\t\t\tchangesMade = true;\n\t\t\t\t\tavailMoves[line][i][num-1] = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "void unsetSegmented();", "public void deleteEven(){\n\t\tNode temp = this.head;\n\t\tint cnt = 0;\n\t\twhile(cnt != this.length()){\n\t\t\tif(cnt%2 == 0){\n\t\t\t\tthis.deleteAtPos(cnt);\n\t\t\t}\n\t\t\tcnt++;\n\t\t}\n\t}", "private void shrink(int hole) {\n int i = hole + 1;\n while (s[i] != null) {\n s[i-1] = s[i];\n s[i] = null;\n i++;\n if (i >= s.length) break;\n }\n }", "void removeDecisionSightDistance(int i);", "public void testRemoveEdge_betweenVertices() {\n System.out.println(\"removeEdge\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n\n for (int i = 0; i < 25; i++) {\n for (int j = 0; j < 25; j++) {\n if ((i + j) % 2 != 0) {\n continue;\n }\n\n Assert.assertNotNull(graph.removeEdge(new Integer(i), new Integer(j)));\n Assert.assertFalse(graph.containsEdge(new Integer(i), new Integer(j)));\n }\n }\n }", "public int trap_old(int[] height) {\n if(height.length <=2){\n return 0;\n }\n int result = 0;\n List<Integer> peaks = new ArrayList<>();\n for(int i=0; i<height.length; i++){\n //if(i+1==height.length && height[i-1]<height[i]){\n // peaks.add(i);\n if(i<height.length-1 && height[i]!=height[i+1]){\n peaks.add(i);\n }\n }\n List<Integer> remove = new ArrayList<>();\n //merge top\n for(int i=0; i<peaks.size(); i++){\n boolean left = false;\n boolean right = false;\n for(int j=0; j<i; j++){ //left\n if(height[peaks.get(j)]>height[peaks.get(i)]){\n left = true;\n }\n }\n for(int j=i+1; j<peaks.size(); j++){ //right\n if(height[peaks.get(j)]>height[peaks.get(i)]){\n right = true;\n }\n }\n if(left&&right){\n remove.add(peaks.get(i));\n }\n }\n System.out.println(Arrays.toString(remove.toArray()));\n peaks.removeAll(remove);\n System.out.println(\"=============\");\n System.out.println(Arrays.toString(peaks.toArray()));\n for(int i=0; i<peaks.size()-1; i++){\n Integer a = peaks.get(i);\n Integer b = peaks.get(i+1);\n int min = Math.min(height[a],height[b]);\n for(int j=a+1; j<b; j++){\n int df = min - height[j];\n if(df > 0 ){\n result += df;\n }\n }\n }\n return result;\n }", "public void moverVerticalSuave( int posicion )\n {\n brazo.moverVerticalSuave( posicion );\n }", "public int[] findHorizontalSeam() {\n int[][] edgeTo = new int[height][width];\n double[][] distTo = new double[height][width];\n reset(distTo);\n for (int rows = 0; rows < height; rows++) {\n distTo[rows][0] = 1000;\n }\n // this is for relaxation.\n for (int columns = 0; columns < width - 1; columns++) {\n for (int rows = 0; rows < height; rows++) {\n relaxHorizontal(rows, columns, edgeTo, distTo);\n }\n }\n double minDist = Double.MAX_VALUE;\n int minRow = 0;\n for (int rows = 0; rows < height; rows++) {\n if (minDist > distTo[rows][width - 1]) {\n minDist = distTo[rows][width - 1];\n minRow = rows;\n }\n }\n int[] indices = new int[width];\n //to find the horizontal seam.\n for (int columns = width - 1, rows = minRow; columns >= 0; columns--) {\n indices[columns] = rows;\n rows -= edgeTo[rows][columns];\n }\n return indices;\n }", "private State removeSouth() \r\n\t{\r\n\t\tProject2.stateStack.push(southQueue[southFront++]);\r\n\t\treturn southQueue[southElem];\r\n\t}", "public int[] findHorizontalSeam() {\n int[][] matrixTo = new int[height()][width()];\n double[][] energyMatrix = new double[height()][width()];\n //reset(energyMatrix);\n\n for(int i = 0; i < energyMatrix.length; i++) {\n for(int j = 0; j < energyMatrix[i].length; j++) {\n energyMatrix[i][j] = Double.MAX_VALUE;\n }\n }\n\n for (int row = 0; row < height(); row++) {\n energyMatrix[row][0] = 1000;\n }\n // this is for relaxation.\n for (int col = 0; col < width() - 1; col++) {\n for (int row = 0; row < height(); row++) {\n //relaxH(row, col, matrixTo, energyMatrix);\n int nextcol = col + 1;\n for (int i = -1; i <= 1; i++) {\n int nextrow = row + i;\n if (nextrow < 0 || nextrow >= height()) continue;\n if(i == 0) {\n if(energyMatrix[nextrow][nextcol] >= energyMatrix[row][col] + energy(nextcol, nextrow)) {\n energyMatrix[nextrow][nextcol] = energyMatrix[row][col] + energy(nextcol, nextrow);\n matrixTo[nextrow][nextcol] = i;\n }\n }\n if (energyMatrix[nextrow][nextcol] > energyMatrix[row][col] + energy(nextcol, nextrow)) {\n energyMatrix[nextrow][nextcol] = energyMatrix[row][col] + energy(nextcol, nextrow);\n matrixTo[nextrow][nextcol] = i;\n }\n }\n\n }\n }\n\n double minDist = Double.MAX_VALUE;\n int minRow = 0;\n for (int row = 0; row < height(); row++) {\n if (minDist > energyMatrix[row][width() - 1]) {\n minDist = energyMatrix[row][width() - 1];\n minRow = row;\n }\n }\n\n int[] indices = new int[width()];\n for (int col = width() - 1, row = minRow; col >= 0; col--) {\n indices[col] = row;\n row -= matrixTo[row][col];\n }\n return indices;\n }", "private int clearLines() {\n\t\tint numGarbageLines = 0;\n\t\tArrayList<Integer> linesToShift = new ArrayList<Integer>();\n\t\tfor (int r = 0; r < matrixHeight; r++) {\n\t\t\tif (isLineFull(r)) {\n\t\t\t\tif (isGarbageLine(r)) {\n\t\t\t\t\tnumGarbageLines++;\n\t\t\t\t}\n\t\t\t\tlinesToShift.add(r);\n\t\t\t\tnumLinesCleared++;\n\t\t\t\tfor (int c = 0; c < matrixWidth; c++) {\n\t\t\t\t\tboardTiles[r][c] = backgroundColor;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (Integer removedRow : linesToShift) {\n\t\t\tshiftDownBoard(removedRow);\n\t\t}\n\t\tupdateView();\n\t\treturn linesToShift.size() - numGarbageLines;\n\t}", "public void removeEdge(int start, int end);", "private Vector<Integer> getSeam(float[][] minCosts) {\n\t Vector<Integer> seam = new Vector<Integer>();\n\t int m = minCosts.length;\n\t int n = minCosts[0].length;\n\t \n\t //initialize minimums\n\t float min = minCosts[m-1][0];\n\t int minIndex = 0;\n\t \n\t //find minimum in bottom row\n\t for(int j = 1; j < n; j++) {\n\t\t if(minCosts[m-1][j] < min) {\n\t\t\t min = minCosts[m-1][j];\n\t\t\t minIndex = j;\n\t\t }\n\t }\n\t seam.insertElementAt(minIndex, 0);\n\t \n\t //work upwards from bottom (use minimum of 3 adjacent cells above)\n\t for(int i = m-2; i >= 0; i--) {\n\t\t float left = INFINITY, right = INFINITY;\n\t\t float middle = minCosts[i][minIndex];\n\t\t \n\t\t //away from left edge: include left-most term\n\t\t if(minIndex > 0)\n\t\t\t left = minCosts[i][minIndex-1];\n\t\t //away from right edge: include right-most term\n\t\t if(minIndex < n-1)\n\t\t\t right = minCosts[i][minIndex+1];\n\t\t \n\t\t if(left < middle && left < right) //if left is min, move left\n\t\t\t minIndex--;\n\t\t else if(right < middle && right < left) //if right is min, move right\n\t\t\t minIndex++;\n\t\t //else do not change column\n\t\t \n\t\t //insert coordinate into vector in reverse order\n\t\t seam.insertElementAt(minIndex, 0);\n\t }\n\t \n\t return seam;\n }", "void unsetStraight();", "void deleteMedian () {\n if (fillLength > 0) {\n for (int i = fillLength / 2; i < fillLength - 1; i++) {\n array[i] = array[i + 1];\n }\n array[fillLength - 1] = 0;\n fillLength--;\n }\n }", "public void compactDown() {\n\t// Iteramos a través del tablero partiendo de la primera fila\n\t// y última columna. Si esta contiene un 0 y la fila anterior\n\t// de la misma columna es distinta de 0, el valor se intercambia.\n\t// El proceso se repite hasta que todas las posiciones susceptibles\n\t// al cambio se hayan comprobado.\n\tfor (int i = 0; i < board.length; i++) {\n\t for (int j = board.length - 1; j > 0; j--) {\n\t\tif (board[j][i] == EMPTY && board[j - 1][i] != EMPTY) {\n\t\t board[j][i] = board[j - 1][i];\n\t\t board[j - 1][i] = EMPTY;\n\t\t compactDown();\n\t\t}\n\t }\n\t}\n }", "private void removePiece(int row, int col, int storedRow, int storedCol){\r\n int pieceRow = -1;\r\n int pieceCol = -1;\r\n if(col > storedCol && row > storedRow){\r\n pieceRow = row-1;\r\n pieceCol = col-1;\r\n }\r\n if(col > storedCol && row < storedRow){\r\n pieceRow = row+1;\r\n pieceCol = col-1;\r\n }\r\n if(col < storedCol && row > storedRow){\r\n pieceRow = row-1;\r\n pieceCol = col+1;\r\n }\r\n if(col < storedCol && row < storedRow){\r\n pieceRow = row+1;\r\n pieceCol = col+1;\r\n }\r\n checks[pieceRow][pieceCol] = 0;\r\n if(isGame) nextPlayer.subCheck();\r\n }", "public void lowerHalf() {\n\t\t// TODO: Implement\n\t\tint sumOfSlotCounts = getSumOfSlotCount()-1;\n\t\tif(sumOfSlotCounts < 0) return;\n\t\t//if(getSlotCount() == 1 && getSumOfSlotCount() == 1) return;\n\t\tint slot = getSlotCount()-1;\n\t\tint beanNumber = getSlotBeanCount(slot)-1;\n\t\tint deleted=0;\n\t\t//System.out.println(\"sumOfCounts: \" + sumOfSlotCounts);\n\t\twhile(deleted < Math.floor(sumOfSlotCounts / 2) ){\n\t\t\t/*if (slotBean.get(slot).isEmpty()) {\n\t\t\t\tslot++;\n\t\t\t\tbeanNumber = 0;\n\t\t\t\tSystem.out.println(\"slot empty: slot: \" + slot + \" beanN: \" + beanNumber);\n\t\t\t}*/\n\t\t\t\n\t\t\t//System.out.println(\"i: \" + deleted + \" count: \" + getSlotBeanCount(slot)+\" beanNumber: \" + beanNumber);\n\t\t\tif(beanNumber < getSlotBeanCount(slot) && beanNumber >= 0 && getSlotBeanCount(slot) > 0 ) {\n\t\t\t\t//System.out.println(\"slot not empty: slot: \" + slot + \" beanN: \" + beanNumber);\n\t\t\t\tslotBean.get(slot).remove(beanNumber--);\n\t\t\t\tdeleted++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//System.out.println(\"slot empty: slot: \" + slot + \" beanN: \" + beanNumber);\n\t\t\t\tif(slot >= 0) slot--;\n\t\t\t\tif(getSlotBeanCount(slot) > 0) beanNumber = getSlotBeanCount(slot)-1;\n\t\t\t\telse beanNumber = 0;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "public int remove() \r\n { \r\n int v = h[1];\r\n hPos[v] = 0; // v is no longer in heap\r\n h[N+1] = 0; // put null node into empty spot\r\n \r\n h[1] = h[N--];\r\n siftDown(1);\r\n \r\n return v;\r\n }", "protected void shrink() {\n int cellsToDrop = snakeSize/2;\n this.snakeSize = snakeSize - cellsToDrop;\n // AMD: Reset the tip of the tail to be snake-free\n for (int xCell = 0; xCell < maxX; xCell++) {\n for (int yCell = 0; yCell < maxY; yCell++) {\n if (snakeSquares[xCell][yCell] > snakeSize) {\n snakeSquares[xCell][yCell] = NOT_A_SEGMENT;\n }\n }\n }\n }", "public void removeFromCol(int value, int col){\n\tfor(int r = 0; r < 9; r++){\r\n\t if (board[r][col].remove(value) == true) {\r\n\t\tassign (board[r][col].getGuess(), r, col);\r\n\t }\r\n\t}\r\n }", "public void upperHalf() {\n\t\t// TODO: Implement\n\t\tint sumOfSlotCounts = getSumOfSlotCount()-1;\n\t\tint slot = 0;\n\t\tint beanNumber = getSlotBeanCount(slot)-1;\n\t\tint deleted = 0;\n\t\t//System.out.println(\"sumOfCounts: \" + sumOfSlotCounts);\n\t\twhile(deleted < Math.floor(sumOfSlotCounts / 2) ){\n\t\t\t/*if (slotBean.get(slot).isEmpty()) {\n\t\t\t\tslot++;\n\t\t\t\tbeanNumber = 0;\n\t\t\t\tSystem.out.println(\"slot empty: slot: \" + slot + \" beanN: \" + beanNumber);\n\t\t\t}*/\n\t\t\t\n\t\t\t//System.out.println(\"i: \" + deleted + \" count: \" + getSlotBeanCount(slot)+\" beanNumber: \" + beanNumber);\n\t\t\tif(beanNumber < getSlotBeanCount(slot) && beanNumber >= 0 && getSlotBeanCount(slot) > 0 ) {\n\t\t\t\t//System.out.println(\"slot not empty: slot: \" + slot + \" beanN: \" + beanNumber);\n\t\t\t\tslotBean.get(slot).remove(beanNumber--);\n\t\t\t\tdeleted++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//System.out.println(\"slot empty: slot: \" + slot + \" beanN: \" + beanNumber);\n\t\t\t\tif(slot < getSlotCount()-1) slot++;\n\t\t\t\tif(getSlotBeanCount(slot) > 0) beanNumber = getSlotBeanCount(slot)-1;\n\t\t\t\telse beanNumber = 0;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t}", "private void discardSegment() {\n synchronized (lastSegment) {\n lastSegment.clear();\n lastSegmentTimes.clear();\n lastSegmentCurve.clear();\n }\n }", "public void reset() {\n for (int i = 0; i < numberOfRows; i++ ) {\n for (int j =0; j < numberOfColumns; j++) {\n if (grid[i][j] == LASER) {\n this.Remove(i,j);\n }\n }\n }\n }", "private Element removeSubElements(Element p_seg)\n {\n ArrayList elems = new ArrayList();\n\n findSubElements(elems, p_seg);\n\n for (int i = 0; i < elems.size(); i++)\n {\n Element sub = (Element)elems.get(i);\n\n removeSubElement(sub);\n }\n\n return p_seg;\n }", "public int[] findHorizontalSeam() {\n return null;\n }", "public void romperEnlaces(Red red) {\r\n\t\tfor (CanalOptico canal : canales) {\r\n\t\t\tNodo vecino = canal.getOtroExtremo(this);\r\n\r\n\t\t\t/* Se elimina el enlace del vecino al nodo */\r\n\t\t\tCanalOptico canalInverso = vecino.romperEnlace(this);\r\n\r\n\t\t\t/* Se elimina el enlace del nodo al vecino */\r\n\t\t\tcanales.remove(canal);\r\n\r\n\t\t\t/* Se elimina ambos enlaces de la red */\r\n\t\t\tred.removeCanal(canal);\r\n\t\t\tred.removeCanal(canalInverso);\r\n\t\t}\r\n\t}", "public void removeEdge(int i, int j)\n {\n \tint v = i;\n \tint w = j;\n \t//Create an iterator on the adjacency list of i \n \tIterator<DirectedEdge> it = adj[v].iterator();\n \t//Loop through adj and look for any edge between i and j\n \twhile(it.hasNext())\n \t{\n \t\tDirectedEdge ed = it.next();\n \t\t//If an edge is found, remove it and its reciprocal\n \t\tif(ed.from() == v && ed.to() == w)\n \t\t{\n \t\t\tit.remove();\n \t\t\tit = adj[w].iterator();\n \t\t\twhile(it.hasNext())\n \t\t\t{\n \t\t\t\ted = it.next();\n \t\t\t\tif(ed.from() == w && ed.to() == v)\n \t\t\t\t{\n \t\t\t\t\tit.remove();\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\t\n \t} \t\n \tE-=2;\n }", "private void removeEdge() {\n boolean go = true;\n int lastNode;\n int proxNode;\n int atualNode;\n if ((parentMatrix[randomChild][0] != 1) &&\n (childMatrix[randomParent][0] != 1)) {\n lastNode =\n parentMatrix[randomChild][parentMatrix[randomChild][0] - 1];\n for (int i = (parentMatrix[randomChild][0] - 1); (i > 0 && go); i--)\n { // remove element from parentMatrix\n atualNode = parentMatrix[randomChild][i];\n if (atualNode != randomParent) {\n proxNode = atualNode;\n parentMatrix[randomChild][i] = lastNode;\n lastNode = proxNode;\n }\n else {\n parentMatrix[randomChild][i] = lastNode;\n go = false;\n }\n }\n if ((childMatrix[randomParent][0] != 1) &&\n (childMatrix[randomParent][0] != 1)) {\n lastNode = childMatrix[randomParent][\n childMatrix[randomParent][0] - 1];\n go = true;\n for (int i = (childMatrix[randomParent][0] - 1); (i > 0 &&\n go); i--) { // remove element from childMatrix\n atualNode = childMatrix[randomParent][i];\n if (atualNode != randomChild) {\n proxNode = atualNode;\n childMatrix[randomParent][i] = lastNode;\n lastNode = proxNode;\n }\n else {\n childMatrix[randomParent][i] = lastNode;\n go = false;\n }\n } // end of for\n }\n childMatrix[randomParent][(childMatrix[randomParent][0] - 1)] = -4;\n childMatrix[randomParent][0]--;\n parentMatrix[randomChild][(parentMatrix[randomChild][0] - 1)] = -4;\n parentMatrix[randomChild][0]--;\n }\n }" ]
[ "0.7645999", "0.7437044", "0.7371152", "0.7250168", "0.71923625", "0.71085304", "0.70728135", "0.69054276", "0.68505085", "0.6815248", "0.67622006", "0.66183895", "0.6586639", "0.6553677", "0.65317047", "0.6453653", "0.6414827", "0.63535756", "0.63074005", "0.62994075", "0.6166512", "0.6162798", "0.616256", "0.6154753", "0.6057884", "0.5986358", "0.5917026", "0.5869432", "0.58460736", "0.5656072", "0.56418085", "0.5638757", "0.5556268", "0.5515054", "0.5514224", "0.5509052", "0.5462307", "0.5430542", "0.5430242", "0.54227525", "0.5383823", "0.5375178", "0.5372419", "0.5371098", "0.53676355", "0.53640366", "0.5331823", "0.53106016", "0.5305167", "0.530235", "0.5298849", "0.52969337", "0.52920073", "0.52768624", "0.5258321", "0.52100724", "0.5180033", "0.5179113", "0.51663435", "0.5134827", "0.5092004", "0.50897324", "0.50861996", "0.5085808", "0.5015541", "0.49938133", "0.49751714", "0.49721026", "0.49688655", "0.49396044", "0.4924522", "0.49163955", "0.49148297", "0.488758", "0.48845232", "0.48835185", "0.4881687", "0.48812866", "0.48710436", "0.48693234", "0.48677891", "0.48548317", "0.484713", "0.48340356", "0.4833829", "0.48337108", "0.48283023", "0.48182154", "0.48164737", "0.48118177", "0.48077503", "0.47925758", "0.47880867", "0.4787099", "0.4785011", "0.478411", "0.47816852", "0.47751784", "0.47744894", "0.47738427" ]
0.66398436
11
TODO Autogenerated method stub
protected String getDatabaseName() { return database; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); int year = stdIn.nextInt(); if((year % 4) == 0 && (year % 100) != 0 || (year % 400 == 0)) System.out.print("yes"); else System.out.print("no"); }
{ "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
gives the list of the users with their role
@RequestMapping(value ="/{projectId}/users_manager", method = RequestMethod.GET) @PreAuthorize("@userRoleService.isMember(#projectID)") public ModelAndView usersManager(ModelMap Model, @PathVariable("projectId") int projectID) throws IOException{ List<User> listUsers = usersDAO.getAllUsersByProjectID(projectID); List<Role> listroles=new ArrayList<Role>(); for(User u :listUsers ){ listroles.add(roleDAO.getRoleByUserIdAndProjectId(u.getUserID(), projectID)); } User user = authenticationUserService.getCurrentUser(); Role role=roleDAO.getRoleByUserIdAndProjectId(user.getUserID(), projectID); ModelAndView model = new ModelAndView("usersmanager"); //set of roles that exist (for the select) model.addObject("roles",roles); //role of the actual user (to display or not deleted button) model.addObject("userrole",role.getRole()); //list of users with their role model.addObject("listUsers", listUsers); model.addObject("listRoles",listroles); model.setViewName("usersmanager"); model.addObject("projectId",projectID); return model; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<User> getUsersByRole(Role role);", "public List<UserRole> queryAllUsersRoles() {\n \tList<UserRole> userRoleList = new ArrayList<>();\n\tUserRole userRole;\n String sql = \"SELECT * FROM users_roles\";\n\ttry {\t\n this.statement = connection.prepareStatement(sql);\n this.resultSet = this.statement.executeQuery();\n while(this.resultSet.next()) {\n\t\tuserRole = new UserRole();\n userRole.setUserName(this.resultSet.getString(\"user_name\"));\n userRole.setRoleName(this.resultSet.getString(\"role_name\"));\n\t\tuserRoleList.add(userRole);\n }\t\n this.statement.close();\n\t} \n catch(SQLException ex) {\n Logger.getLogger(UserDBManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n return userRoleList;\n }", "List<User_Role> selectAll();", "List<SysRole> getUserRoles(int userId);", "private String getUserRoleListQuery() throws APIManagementException {\n StringBuilder rolesQuery = new StringBuilder();\n rolesQuery.append('(');\n rolesQuery.append(APIConstants.NULL_USER_ROLE_LIST);\n String[] userRoles = APIUtil.getListOfRoles(userNameWithoutChange);\n String skipRolesByRegex = APIUtil.getSkipRolesByRegex();\n if (StringUtils.isNotEmpty(skipRolesByRegex)) {\n List<String> filteredUserRoles = new ArrayList<>(Arrays.asList(userRoles));\n String[] regexList = skipRolesByRegex.split(\",\");\n for (int i = 0; i < regexList.length; i++) {\n Pattern p = Pattern.compile(regexList[i]);\n Iterator<String> itr = filteredUserRoles.iterator();\n while(itr.hasNext()) {\n String role = itr.next();\n Matcher m = p.matcher(role);\n if (m.matches()) {\n itr.remove();\n }\n }\n }\n userRoles = filteredUserRoles.toArray(new String[0]);\n }\n if (userRoles != null) {\n for (String userRole : userRoles) {\n rolesQuery.append(\" OR \");\n rolesQuery.append(ClientUtils.escapeQueryChars(APIUtil.sanitizeUserRole(userRole.toLowerCase())));\n }\n }\n rolesQuery.append(\")\");\n if(log.isDebugEnabled()) {\n \tlog.debug(\"User role list solr query \" + APIConstants.PUBLISHER_ROLES + \"=\" + rolesQuery.toString());\n }\n return APIConstants.PUBLISHER_ROLES + \"=\" + rolesQuery.toString();\n }", "List<String> getRoles();", "List<Role> getRoles();", "@Override\n\tpublic List<RoleUtilisateur> listRoleUtilisateur() {\n\t\treturn roleUtilisateurDAO.listRoleUtilisateur();\n\t}", "public List<UserRole> getAllUserRoles() throws ClassNotFoundException, SQLException {\n\t\treturn read(\"select * from user_role\", null);\n\t}", "public List<UserModel> getAllUsers() {\n List<UserModel> totalUsers = userRepository.findAll();\n URole role = uRoleRepository.findByName(\"ROLE_ADMIN\");\n return totalUsers\n .stream()\n .filter(userModel -> !userModel.getRoles().contains(role))\n .collect(Collectors.toList());\n }", "List<UserRole> searchUserRole(UserRole userRole);", "java.util.List<Role>\n getRolesList();", "java.util.List<Role>\n getRolesList();", "public List<Role> getAllRoles();", "@Override\n\tpublic List<HashMap<String, Object>> findRoleUser(XtParmas parmas) {\n\t\treturn roleMapper.findRoleUser(parmas);\n\t}", "@Transient\n public List<LabelValue> getRoleList() {\n List<LabelValue> userRoles = new ArrayList<LabelValue>();\n\n if (this.roles != null) {\n for (Role role : roles) {\n // convert the user's roles to LabelValue Objects\n userRoles.add(new LabelValue(role.getName().substring(5), role.getName()));\n }\n }\n\n return userRoles;\n }", "public List<SecRole> getRolesByUser(SecUser aUser);", "public List<UserAccount> getUserAccountListByRole(Serializable roleId,\r\n Serializable creatorId, Serializable subsystemId);", "public List<SecRole> getAllRoles();", "@Override\n\tpublic List<AccountUser> getRoles() {\n\t\treturn auMapper.getRoles();\n\t}", "@PermitAll\n @Override\n public List<Role> getCurrentUserRoles() {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_QUERY, Role.QUERY_GET_ROLES_BY_USER_NAME);\n params.put(User.PARAM_USERNAME, this.getUserName());\n return getRepository().getEntityList(Role.class, params);\n }", "Set<String> getUserRoles(String email);", "@Override\n\tpublic List<Map<String, Object>> getUserRoleList(Map<String, Object> filterMap) {\n\t\treturn adminUserRoleMapper.selectUserRoleList(filterMap);\n\t}", "Collection<Role> getRoles();", "public List<User> readAllUsers(int roleId) {\n return read(\"SELECT * FROM user WHERE role_id = ?\",\n new Object[] {roleId});\n }", "@Override\n\tpublic List<Role> getRoleList() {\n\t\treturn this.jdbcTemplate.query(\"SELECT * FROM role\", new RoleRowMapper());\n\t}", "List<Rol> obtenerRoles() throws Exception;", "@Override\n\tpublic List<UserRole> list(UserRole vo) {\n\t\treturn dao.list(vo);\n\t}", "public List<Roles> selectAllRole(){\n\treturn rolesDao.findAll();\n\t}", "public List<Role> getRole() {\n\t\treturn userDao.getRole();\r\n\t}", "@Override\n\tpublic List<ERSUser> getAllUsers(int roleId) {\n\t\treturn userDao.selectUsersByRoleID(roleId);\n\t}", "List<RoleEntity> getSystemRoles();", "public List<String> getRoles(String userId) throws UserManagementException;", "@Override\n\tpublic List<VUserRoles> getUserRoleList(String vcAccount,String qUserName,\n\t\t\tInteger offset, Integer pageSize,Integer cFlag) {\n\t\tStringBuffer hql = new StringBuffer();\n\t\thql.append(\" select * from v_user_roles h where 1=1 \");\n\t\tif (qUserName != null && !qUserName.equals(\"\")) {\n\t\t\thql.append(\" and h.vcName like '%\" + qUserName + \"%' \");\n\t\t}\n\t\tif (vcAccount != null && !vcAccount.equals(\"\")) {\n\t\t\thql.append(\" and h.vcAccount like '%\" + vcAccount + \"%' \");\n\t\t}\n\t\tif (cFlag != null && cFlag!=99) {\n\t\t\thql.append(\" and h.cFlag =\"+cFlag+\" \");\n\t\t}\n\t\thql.append(\" order by h.vcEmployeeId \");\n\t\tQuery query = sessionFactory.getCurrentSession().createSQLQuery(hql.toString());\n\t\tif(offset !=null && pageSize != null){\n\t\t\tquery.setFirstResult(offset);\n\t\t\tquery.setMaxResults(pageSize);\n\t\t}\n\t\tList<VUserRoles> result = new ArrayList<VUserRoles>();\n\t\tList<Object[]> tempResult = query.list();\n\t\tfor(int i = 0; i < tempResult.size(); i++ ){\n\t\t\tObject[] tempObj = tempResult.get(i);\n\t\t\tVUserRoles entity = new VUserRoles();\n\t\t\tentity.setId(tempObj[0]==null?\"\":tempObj[0].toString());\n\t\t\tentity.setVcEmployeeID(tempObj[1]==null?\"\":tempObj[1].toString());\n\t\t\tentity.setVcName(tempObj[2]==null?\"\":tempObj[2].toString());\n\t\t\tentity.setVcFullName(tempObj[3]==null?\"\":tempObj[3].toString());\n\t\t\tentity.setVcAccount(tempObj[4]==null?\"\":tempObj[4].toString());\n\t\t\tentity.setRoleIds(tempObj[5]==null?\"\":tempObj[5].toString());\n\t\t\tentity.setRoleNames(tempObj[6]==null?\"\":tempObj[6].toString());\n\t\t\tentity.setcFlag(tempObj[7]==null?99:Integer.parseInt(tempObj[7].toString()));\n\t\t\tresult.add(entity);\n\t\t}\n\t\treturn result;\n\t}", "Set<String> getRoles();", "public List<UserRole> queryUserRole(String userName) {\n List<UserRole> userRoleList = new ArrayList<>();\n \tUserRole userRoleResult;\n String sql = \"SELECT * FROM users_roles WHERE user_name = ?\";\n\ttry {\n this.statement = connection.prepareStatement(sql);\n this.statement.setString(1, userName);\n this.resultSet = this.statement.executeQuery();\n\n while(this.resultSet.next()){\n userRoleResult = new UserRole(); \n\t\tuserRoleResult.setUserName(this.resultSet.getString(\"user_name\"));\n userRoleResult.setRoleName(this.resultSet.getString(\"role_name\"));\n userRoleList.add(userRoleResult);\n }\n statement.close();\n }\n catch(SQLException ex) {\n Logger.getLogger(UserDBManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n\treturn userRoleList;\n }", "public List<Utilizator> listUsers();", "@Override\r\n\tpublic Object getRoles() throws DataAccessException, SQLException {\n\t\tlogger.info(\"start : getRoles UsersMngDaoImpl \");\r\n\t\t \r\n\t\tList<Roles> roleList = roleRepository.findAll();\r\n\t\tlogger.info(\"End : getRoles UsersMngDaoImpl \");\r\n\t\treturn roleList;\r\n\t}", "public String[] listUsers();", "java.util.List<com.rpg.framework.database.Protocol.User> \n getUsersList();", "java.util.List<com.rpg.framework.database.Protocol.User> \n getUsersList();", "public abstract Collection getRoles();", "@Override\r\n\tpublic void getAllRole() {\n\t\tSystem.out.println(roles);\r\n\t\t\r\n\t}", "@NotNull\r\n Collection<String> getRoles();", "public List getAllUsers();", "public List<User> getEnabledUsers();", "@Override\n\tpublic List<UserRole> buscarUserRoleSemPermissoes() {\n\t\t// TODO Auto-generated method stub\n\t\tQuery query = getCurrentSession().createQuery(\"select ur from UserRole ur where ur.permissions\");\n\t\treturn query.list();\n\t}", "@Transactional\n\tpublic List<UmTbUserRole> findAll() {\n\t\treturn dao.findAll();\n\t}", "@Override\n\tpublic List<Role> getAllRoleInfo() {\n\t\treturn roleMapper.queryAll();\n\t}", "public List<User> getUserList();", "@Transactional(readOnly = true)\n\t@Override\n\tpublic List<Map<String, Object>> getList(Map<String, Object> params) {\n\t\tDataManager dataManager = new DataManager(entityManager);\n\t\tdataManager.add(\"SELECT A.*,B.ENABLE FROM USER_PROFILE A LEFT JOIN USERS B ON A.USERNAME=B.USERNAME WHERE 1=1\");\n\t\tfor(String index : params.keySet()) {\n\t\t\tif(!StringUtils.isBlank(String.valueOf(params.get(index)))) {\n\t\t\t\tif(!index.equals(\"role\")) {\n\t\t\t\t\tdataManager.add(\"AND A.\"+index.toUpperCase()+\" = :\"+index+\" \",params.get(index));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdataManager.add(\" ORDER BY A.USERNAME\");\n\t\tList<Map<String, Object>> result = (List<Map<String, Object>>) dataManager.getResult();\n\t\tfor( Map<String, Object> index : result) {\n\t\t\tDataManager subDataManager = new DataManager(entityManager);\n\t\t\tsubDataManager.add(\"SELECT * FROM ROLES WHERE USERNAME = :username\",index.get(\"USERNAME\"));\n\t\t\tsubDataManager.add(\"AND ROLE = :role\",params.get(\"role\"));\n\t\t\tList<Map<String, Object>> subResult = (List<Map<String, Object>>) subDataManager.getResult();\n\t\t\tString roles=\"\";\n\t\t\tfor( Map<String, Object> subIndex : subResult) {\n\t\t\t\tif(roles.length()>0) {\n\t\t\t\t\troles+=\",\";\n\t\t\t\t}\n\t\t\t\troles+=subIndex.get(\"ROLE\");\n\t\t\t}\n\t\t\tindex.put(\"ROLE\", roles);\n\t\t}\n\t\treturn result;\n\t}", "@Query(\"select u from User u where u.role = 'PM'\")\n List<User> getAllManagers();", "@OneToMany(mappedBy = \"user\", fetch = FetchType.LAZY)\n\t@Fetch(FetchMode.SELECT)\n\tpublic List<UserRole> getUserRoles() {\n\t\treturn userRoles;\n\t}", "@Override\n public List getAllRole() {\n \tMap mSession = ActionContext.getContext().getSession();\n \tInteger clientId = (Integer) mSession.get(\"CLIENT_INFO\");\n Session session = HibernateUtil.getSession();\n try {\n Criteria crit = session.createCriteria(RoleVO.class);\n crit.addOrder(Order.asc(\"roleName\"));\n crit.add(Restrictions.eq(\"isActive\", 1));\n crit.add(Restrictions.eq(\"clientId\", clientId));\n return crit.list();\n } finally {\n session.flush();\n session.close();\n }\n }", "public List<User> getUsers();", "@Override\r\n\tpublic List<Role> getUserRoles(String userId) {\n\t\treturn userMapper.getRoles(userId);\r\n\t}", "public List<Role> getAllRole() {\n\t\treturn (List<Role>) roleDao.findAll();\n\t}", "@Override\r\n\tpublic List<Role> findAll() {\n\t\treturn roleDao.findAll();\r\n\t}", "List<RoleDto> findAllRoles();", "@Override\r\n\tpublic List<Role> getAllRole() {\n\t\tString hql = \"from Role\";\r\n\t\treturn (List<Role>) getHibernateTemplate().find(hql);\r\n\t}", "public List<Systemuser> getUserList() throws Exception {\n\r\n List<Systemuser> userRoleList = new ArrayList<Systemuser>();\r\n Session session = null;\r\n try {\r\n session = HibernateInit.sessionFactory.openSession();\r\n String sql = \"from Systemuser u order by Upper(u.username) asc\";\r\n Query query = session.createQuery(sql);\r\n userRoleList = query.list();\r\n\r\n } catch (Exception e) {\r\n throw e;\r\n } finally {\r\n try {\r\n session.flush();\r\n session.close();\r\n } catch (Exception e) {\r\n throw e;\r\n }\r\n }\r\n return userRoleList;\r\n }", "public List<RoleDto> getRolesList() {\n return roleDBManager.fetchRolesList();\n }", "Role getRoles(int index);", "Role getRoles(int index);", "public List<Role> getRoleList(Integer from, Integer pageSize) {\n\t\treturn userDao.getRoleList(from, pageSize);\r\n\t}", "@ModelAttribute(\"allRoles\")\r\n\tpublic List<Role> getAllRoles(){\t\r\n\t\treturn roleService.findAdminRoles();\r\n\t\t\r\n\t}", "public int getCountAllSecRoles();", "List<Role> findAll();", "@Override\n\tpublic Set<String> getRoles(String username) {\n\t\tSet<String> roles = userDao.getRoles(username);\n\t\treturn roles;\n\t}", "@Override\n\tpublic ArrayList<UsersBean> getUsersList() throws AirlineException {\n\t\t\n\t\tUsersBean usersBean = null;\n\t\tArrayList<UsersBean> usersList = new ArrayList<>();\n\t\t\n\t\tString qry = \"select * from USERS\";\n\t\t\n\t\ttry(PreparedStatement stmt = connect.prepareStatement(qry);\n\t\t\t\tResultSet rs = stmt.executeQuery();\n\t\t\t){\n\t\t\t\twhile(rs.next()){\n\t\t\t\tString userName = rs.getString(1);\n\t\t\t\tString password = rs.getString(2);\n\t\t\t\tString role = rs.getString(3);\n\t\t\t\t\n\t\t\t\tusersBean = new UsersBean(userName, password, role);\n\t\t\t\tusersList.add(usersBean);\n\t\t\t\t}\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\tthrow new AirlineException(\"Probelm in getting the movie details!!!\",e);\n\t\t\t\t}\n\t\t\treturn usersList;\n\t\t}", "List<User> getUsers();", "List<User> getUsers();", "public Set<String> getUserRoles() {\n\t\treturn userRoles;\n\t}", "public RoleList getRoles() {\n return roleList;\n }", "boolean allGranted(String roles);", "@Override\n\tpublic List<Role> findAll() {\n\t\treturn this.roleMapper.findQueryAll();\n\t}", "public List<AppUser> getAllUserByRolesAndApp(@Valid AppUser appUser) {\n\t\n\t\tList<Roles> role =(List<Roles>) appUserRepository.getRolesByAppuser();\n\t\tSystem.out.println(\"get roles by user \"+role);\n\t\tSet<Roles> hSet = new HashSet<Roles>(role); \n hSet.addAll(role); \n\t\tappUser.setRoles(hSet);\n\t\tApp app = appUser.getApp();\n\t\tSystem.out.println(\"app and roles \"+app+\"roles ==\"+role);\n\t\treturn appUserRepository.findByAppAndRolesIn(app, role);\n//\t\treturn null;\n\t}", "@Override\n public List<Role> getRoleByUser(String userId, int type) {\n StringBuilder vstrSql = new StringBuilder(\"select r.role_id as roleId, r.role_code as roleCode, r.role_name as roleName,r.description as description\");\n vstrSql.append(\" from roles r\");\n if (type == 1) {\n vstrSql.append(\" where r.role_id in (select ur.role_id from user_role ur where ur.user_id = :userId and ur.status = 1)\");\n } else {\n vstrSql.append(\" where r.role_id not in (select ur.role_id from user_role ur where ur.user_id = :userId and ur.status = 1)\");\n }\n vstrSql.append(\" and r.status <> 0\");\n Query query = getCurrentSession()\n .createSQLQuery(vstrSql.toString())\n .addScalar(\"roleId\", StandardBasicTypes.LONG)\n .addScalar(\"roleCode\", StandardBasicTypes.STRING)\n .addScalar(\"roleName\", StandardBasicTypes.STRING)\n .addScalar(\"description\", StandardBasicTypes.STRING)\n .setResultTransformer(\n Transformers.aliasToBean(Role.class));\n query.setParameter(\"userId\", userId);\n return (List<Role>) query.list();\n }", "@Override\n public java.util.List<Role> getRolesList() {\n return roles_;\n }", "@Override\n public java.util.List<Role> getRolesList() {\n return roles_;\n }", "List<UserRepresentation> getUsers(final String realm);", "java.util.List<com.heroiclabs.nakama.api.User> \n getUsersList();", "@Override\n\tpublic List<Role> findAll() {\n\t\treturn (List<Role>) roleDao.findAll();\n\t}", "public List<Users> getUserList(){\n\t\tList<Users> users = (List<Users>) this.userDao.findAll();\n\t\treturn users;\n\t}", "public List<String> listUsers() \n\t{\n\t\treturn this.userList.keys();\n\t\t\n\t}", "public List<UserTO> checkAdminAcsi(String allRoleIds) throws Exception {\r\n\t\tConnection conn = null;\r\n\t\tPreparedStatement pstmt = null;\r\n\t\tResultSet rs = null;\r\n\t\tList<UserTO> allUsers = new ArrayList<UserTO>();\r\n\t\tUserTO user = null;\r\n\t\ttry {\r\n\t\t\tconn = driver.connect(DATA_SOURCE, null);\r\n\r\n\t\t\tString query = \" SELECT rle.role_name, urle.userid FROM role rle, user_role urle \" + \"WHERE urle.roleid = rle.roleID AND rle.role_name = 'ROLE_ADMIN' \" + \"AND urle.userid in ( \"\r\n\t\t\t\t\t+ allRoleIds + \" )\";\r\n\t\t\tpstmt = conn.prepareCall(query);\r\n\t\t\t// pstmt.setString(1, allRoleIds);\r\n\t\t\t// logger.info(query);\r\n\t\t\trs = pstmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tuser = new UserTO();\r\n\t\t\t\tString roleName = rs.getString(1);\r\n\t\t\t\tif (\"ROLE_ADMIN\".equals(roleName)) {\r\n\t\t\t\t\tuser.setAdminUser(Boolean.TRUE);\r\n\t\t\t\t}\r\n\t\t\t\tuser.setUserId(rs.getString(2));\r\n\t\t\t\tallUsers.add(user);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tthrow new Exception(e.getMessage());\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\trs.close();\r\n\t\t\t} catch (Exception e2) {\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\tpstmt.close();\r\n\t\t\t} catch (Exception e2) {\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\tconn.close();\r\n\t\t\t} catch (Exception e2) {\r\n\t\t\t}\r\n\t\t}\r\n\t\tlogger.info(\"Returning \" + allUsers.size() + \" Admins\");\r\n\t\treturn allUsers;\r\n\t}", "public String getRoles() {\n return roles;\n }", "@Override\r\n\tpublic List<User> getUsersList(String key) {\n\t\treturn loginDao.findByUsernameAndRole(key,\"USER\");\r\n\t}", "@Override\n\tpublic List<InforRoles> selectRoles() {\n\t\treturn md.selectRoles();\n\t}", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\t@Transactional\n\tpublic ArrayList<ApplicationUserRole> getAllRoles() throws Exception {\n\t\tArrayList<ApplicationUserRole> roleList = null;\n\t\ttry {\n\t\t\tSession session = sessionFactory.getCurrentSession();\n\t\t\tQuery query = session.createQuery(\"from ApplicationUserRole\");\n\t\t\troleList = (ArrayList<ApplicationUserRole>) query.list();\n\n\t\t} catch (Exception e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t\tthrow e;\n\t\t}\n\t\treturn roleList;\n\t\t\n\t}", "public void findAllUsers(Model model) {\n\t\tList<User> users = userRepo.findAll(Sort.by(Sort.Direction.ASC, \"role\"));\n\t\tmodel.addAttribute(\"listUsers\", users);\n\t}", "List<User> getActivatedUserList();", "public List<User> getAllUsers();", "@GetMapping(\"/listrole\")\r\n\tpublic String listRole(Model model) {\n\t\tList<Authorities> roles = authoritiesService.getAuthorities();\r\n\t\t\r\n\t\t// add the users to the model\r\n\t\tmodel.addAttribute(\"roles\",roles);\r\n\t\t\r\n\t\t// add page title\r\n\t\tmodel.addAttribute(\"pageTitle\", \"List of Roles\");\r\n\t\treturn \"list-role\";\r\n\t}", "@Override\r\n public List<Role> getRoles() {\r\n return roles;\r\n }", "@Override\n\tpublic List<ExtUser> getUserIdByRoleId(long roleid) {\n\t\treturn extUserDao.getUserIdByRoleId(roleid);\n\t}", "public List<User> listUsers(String userName);", "public List<User> getUsers(Boolean enabled, Date startDate, Date endDate, int offset, int length) throws UserManagementException;", "@Test\n public void testGetUserRoles() {\n User user = userRepo.findUserByEmail(\"test@mail.ru\");\n System.out.println(user.getRoles());\n }", "Set getRoles();", "@Override\n\tpublic List<User> getUserList(String userType) {\n\t\tStringBuilder sb = new StringBuilder(\n\t\t\t\t\"SELECT e.`FAILED_ATTEMPTS`, e.`EXPIRES_ON`, e.`LAST_LOGIN_DATE`, e.`NAME`, e.`USERNAME`, e.`ACTIVE`, e.`OUTSIDE_ACCESS`, e.USER_ID, er.ROLE_ID, r.ROLE_NAME FROM user e LEFT JOIN user_role er ON e.USER_ID=er.USER_ID LEFT JOIN role r ON er.ROLE_ID=r.ROLE_ID WHERE 1 \");\n\t\tMap<String, Object> params = new HashMap<>();\n\t\tif (userType.equals(\"1\")) { // only active users\n\t\t\tsb.append(\" AND e.`ACTIVE`\");\n\t\t} else if (userType.equals(\"-1\")) { // only deactive users\n\t\t\tsb.append(\" AND e.`ACTIVE`=false\");\n\t\t}\n\n\t\treturn this.namedParameterJdbcTemplate.query(sb.toString(), params, new UserRowMapper());\n\t}" ]
[ "0.8430846", "0.7659854", "0.75104314", "0.75099295", "0.7432227", "0.7426467", "0.7414749", "0.7364951", "0.735598", "0.73465294", "0.72533244", "0.7240823", "0.7240823", "0.72161955", "0.7185605", "0.7174022", "0.71659434", "0.71609414", "0.7060674", "0.7055773", "0.7052982", "0.7031639", "0.7016412", "0.6962824", "0.69085485", "0.6897882", "0.68947095", "0.6889079", "0.6878222", "0.68775547", "0.68524265", "0.6835085", "0.68294966", "0.67926896", "0.6790422", "0.6776021", "0.6726329", "0.6718199", "0.67154527", "0.66993827", "0.66989", "0.66772074", "0.6665899", "0.6665865", "0.6662282", "0.66584486", "0.6656685", "0.66537815", "0.6643482", "0.6641327", "0.6634949", "0.6618976", "0.6602981", "0.6600872", "0.6599742", "0.65867865", "0.6585023", "0.6576105", "0.65756804", "0.6570006", "0.65677077", "0.6558308", "0.6557942", "0.6557942", "0.65572137", "0.6530401", "0.65231484", "0.6516919", "0.65095997", "0.6506758", "0.65021193", "0.65021193", "0.6491693", "0.64764464", "0.64756465", "0.64592785", "0.64507145", "0.64488065", "0.6446584", "0.6446584", "0.64458066", "0.6442417", "0.64309376", "0.6422891", "0.6410224", "0.6405968", "0.6404033", "0.64040005", "0.64020264", "0.63993627", "0.6396989", "0.63957256", "0.63946605", "0.6380207", "0.6379457", "0.6376724", "0.6371549", "0.6360068", "0.6355868", "0.63557637", "0.6354193" ]
0.0
-1
to change the roles of the users if the role is null, user will be deleted from the project
@RequestMapping(value="/{projectId}/users_manager",method=RequestMethod.POST) @PreAuthorize("@userRoleService.isManager(#projectID)") public ModelAndView changeRoles(@RequestParam HashMap<String,String> allRequestParams,@PathVariable("projectId") int projectID){ allRequestParams.remove("_csrf"); ModelAndView model = new ModelAndView("usersmanager"); User user1 = authenticationUserService.getCurrentUser(); Role role=roleDAO.getRoleByUserIdAndProjectId(user1.getUserID(), projectID); //set of roles that exist (for the select) model.addObject("roles",roles); //role of the actual user (to display or not deleted button) model.addObject("userrole",role.getRole()); //must as at less a manager if(allRequestParams.containsValue("MANAGER")){ for(Map.Entry<String, String>node : allRequestParams.entrySet()){ User user=usersDAO.getUserByUsername(node.getKey()); Project project=projectDAO.getProjectById(projectID); //user can be deleted if(node.getValue().equals("null")|| node.getValue()==null){ roleDAO.deleteRole(user,project); } //user can be updated else{ roleDAO.updateRole(user, project, node.getValue()); } } model.addObject("success", "The users have been updated."); } //there isn't any manager else{ //get the roles again model.addObject("error", "The project must have at less a manager."); } List<User> listUsers = usersDAO.getAllUsersByProjectID(projectID); List<Role> listroles=new ArrayList<Role>(); for(User u :listUsers ){ listroles.add(roleDAO.getRoleByUserIdAndProjectId(u.getUserID(), projectID)); } model.addObject("listUsers", listUsers); model.addObject("projectId",projectID); model.addObject("listRoles",listroles); model.setViewName("usersmanager"); return model; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "LoggedUser changeRole(String roleId) throws IOException;", "void changeRole(User user, Role role, String token) throws AuthenticationException;", "@PreRemove\n private void removeRolesFromUsers() {\n for (User user : users) {\n user.getRoles().remove(this);\n }\n }", "private void assignUsersToDefaultRole() {\n List<Role> roles = (List<Role>) roleService.listAll();\n List<CustomUser> users = (List<CustomUser>) userService.listAll();\n\n users.forEach(user -> {\n if(user.getRoles().size() < 1) {\n roles.forEach(role -> {\n user.addRole(role);\n userService.save(user);\n });\n }\n });\n log.debug(\"Default roles have been assigned to users!\");\n }", "public synchronized void createDefaultRoles() {\n if (roleDAO.findByName(getUserRole()) == null) {\n createRole(getUserRole());\n }\n if (roleDAO.findByName(getAdminRole()) == null) {\n createRole(getAdminRole());\n }\n }", "void setRole(String roles);", "@Override\r\n\tpublic int delUserRole(long urId) {\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic void deleteUserRole(UserDto userDto, RoleDto role) {\n\t\t\n\t}", "public void setRole(java.lang.String value) {\n this.role = value;\n }", "private void updatesRoles(final UserFormData formData, final Boolean checkAccess) {\n\t\tfinal AccessControlService acs = BEANS.get(AccessControlService.class);\n\t\tfinal UserFormData existingUserRoles = this.getRoles(formData.getUserId().getValue(), checkAccess);\n\n\t\tfinal Set<Long> addedRoles = this.getItemsAdded(existingUserRoles.getRolesBox().getValue(),\n\t\t\t\tformData.getRolesBox().getValue());\n\t\tfinal Set<Long> removedRoles = this.getItemsRemoved(existingUserRoles.getRolesBox().getValue(),\n\t\t\t\tformData.getRolesBox().getValue());\n\n\t\t// TODO Djer13 : for \"standard\" roles history is lost. Use something\n\t\t// similar to Subscriptions ? (How to add a \"role\" which discard the old\n\t\t// one ?)\n\t\tif (!addedRoles.isEmpty()) {\n\t\t\tLOG.info(new StringBuilder().append(\"Adding new roles : \").append(addedRoles).append(\" for User \")\n\t\t\t\t\t.append(formData.getUserId().getValue()).toString());\n\t\t\tSQL.update(SQLs.USER_ROLE_INSERT, new NVPair(\"userId\", formData.getUserId().getValue()),\n\t\t\t\t\tnew NVPair(\"rolesBox\", addedRoles));\n\t\t\tacs.clearUserCache(this.buildNotifiedUsers(formData));\n\t\t} else {\n\t\t\tif (LOG.isDebugEnabled()) {\n\t\t\t\tLOG.debug(\"No new roles to add for user \" + formData.getUserId().getValue());\n\t\t\t}\n\t\t}\n\t\tif (!removedRoles.isEmpty()) {\n\t\t\tLOG.info(new StringBuilder().append(\"Removing roles : \").append(removedRoles).append(\" for User \")\n\t\t\t\t\t.append(formData.getUserId().getValue()).toString());\n\t\t\tSQL.update(SQLs.USER_ROLE_REMOVE, new NVPair(\"userId\", formData.getUserId().getValue()),\n\t\t\t\t\tnew NVPair(\"rolesBox\", removedRoles));\n\t\t\tacs.clearUserCache(this.buildNotifiedUsers(formData));\n\t\t} else {\n\t\t\tif (LOG.isDebugEnabled()) {\n\t\t\t\tLOG.debug(\"No roles to remove for user \" + formData.getUserId().getValue());\n\t\t\t}\n\t\t}\n\t}", "public void setRoles(String roles) {\n this.roles = roles;\n }", "@Override\r\n\tpublic int updRole(Role role) {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic Admin changeRole(Admin admin) {\n\t\treturn null;\r\n\t}", "public void setRole(String role)\n {\n _role=role;\n }", "public void saveRoles(){\r\n\t\tif(roles == null)\r\n\t\t\treturn;\r\n\r\n\t\tif(!rolesTreeView.isValidRolesList())\r\n\t\t\treturn;\r\n\r\n\t\tList<Role> deletedRoles = rolesTreeView.getDeletedRoles();\r\n\t\tSaveAsyncCallback callback = new SaveAsyncCallback(MainViewControllerUtil.getDirtyCount(roles) + (deletedRoles != null ? deletedRoles.size() : 0),\r\n\t\t\t\tOpenXdataText.get(TextConstants.ROLES_SAVED_SUCCESSFULLY),OpenXdataText.get(TextConstants.PROBLEM_SAVING_ROLES),roles,deletedRoles,this);\r\n\r\n\t\t//Save new and modified roles.\r\n\t\tfor(Role role : roles) {\r\n\t\t\tif(!role.isDirty())\r\n\t\t\t\tcontinue;\r\n\t\t\telse{\r\n\t\t\t\tcallback.setCurrentItem(role);\r\n\t\t\t\tMainViewControllerUtil.setEditableProperties(role);\r\n\t\t\t}\r\n\r\n\t\t\tContext.getPermissionService().saveRole(role, callback);\r\n\t\t}\r\n\r\n\t\t//Save deleted roles.\r\n\t\tif(deletedRoles != null){\r\n\t\t\tfor(Role role : deletedRoles) {\r\n\t\t\t\tcallback.setCurrentItem(role);\r\n\t\t\t\tContext.getPermissionService().deleteRole(role, callback);\r\n\t\t\t}\r\n\t\t\tdeletedRoles.clear();\r\n\t\t}\r\n\t}", "void addRoleToUser(int userID,int roleID);", "public void removeAdminRole()\r\n {\r\n getSemanticObject().removeProperty(swpres_adminRole);\r\n }", "public void setUserRoles(List<UserRole> userRoles) {\n\t\tthis.userRoles = userRoles;\n\t}", "public void addRole(String username, String role) throws UserNotExistsException ;", "public void setUserRole(java.lang.String userRole) {\r\n this.userRole = userRole;\r\n }", "public void setUserRole(Byte userRole) {\r\n this.userRole = userRole;\r\n }", "public boolean updateUserRole(String oldUserName, String oldRoleName, String newUserName, String newRoleName) {\n \tboolean updateResult = false;\n\tString sql = \"UPDATE users_roles SET user_name = ? , role_name = ? WHERE user_name = ? and role_name = ?\";\n \ttry {\t\t\t\n this.statement = connection.prepareStatement(sql);\n this.statement.setString(1, newUserName);\n this.statement.setString(2, newRoleName);\n this.statement.setString(3, oldUserName);\n this.statement.setString(4, oldRoleName);\n \n this.statement.executeUpdate();\n updateResult = true;\n this.statement.close();\n\t}\n catch(SQLException ex) {\n Logger.getLogger(UserDBManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n return updateResult; \n }", "public void setRoles(final Collection<Role> roles) {\n this.roles = roles;\n }", "private void onRemoveRole() {\n\t\troleProxy.removeRoleFromUser(user, selectedRole);\n\t}", "public void setRole(String role) {\r\n this.role = role;\r\n }", "public void revokeRole(String roleName, User user) throws UserManagementException;", "public void setRole(String role) {\r\n this.role = role;\r\n }", "@Override\n\tpublic void delete(UserRole vo) {\n\n\t}", "public void supprimerRole(Long idRoUt);", "public boolean deleteUserRole(String userName, String roleName) {\n boolean deleteResult = false;\n String sql;\n if(roleName == null)\n sql = \"DELETE FROM users_roles WHERE user_name = ?\";\n else\n sql = \"DELETE FROM users_roles WHERE user_name = ? and role_name = ?\";\n \ttry {\t\t\t\n this.statement = connection.prepareStatement(sql);\n this.statement.setString(1, userName); \n if(roleName != null)\n this.statement.setString(2, roleName);\n this.statement.executeUpdate();\n deleteResult = true;\n this.statement.close();\n\t}\n catch(SQLException ex) {\n Logger.getLogger(UserDBManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n return deleteResult; \n }", "@Override\n\tpublic void editRole(Role role) {\n\t\trd.editRole(role);\n\t}", "@Test\n\tpublic void testCrudRole() {\n\t\tRoleUtilisateur r1 = new RoleUtilisateur();\n\t\tr1.setId(1);\n\t\tr1.setNom(\"Commercial\");\n\t\t\n\t\tRoleUtilisateur r2 = new RoleUtilisateur();\n\t\tr2.setId(2);\n\t\tr2.setNom(\"Magasinier\");\n\t\t\n\t\tSystem.err.println(daoRole.getDao());\n\t\tdaoRole.createRoleUtilisateur(r1);\n\t\tdaoRole.createRoleUtilisateur(r2);\n\t\t\n\t\t//Récuperation des deux rôles crées\n\t\tRoleUtilisateur r1Recup = daoRole.findByIdRoleUtilisateur(1);\n\t\t\n\t\tassertNotNull(r1Recup);\n\t\tassertEquals(\"Commercial\", r1Recup.getNom());\n\t\t\n\t\t\n\t\tRoleUtilisateur r2Recup = daoRole.findByIdRoleUtilisateur(2);\n\t\t\n\t\tassertNotNull(r2Recup);\n\t\tassertEquals(\"Magasinier\", r2Recup.getNom());\n\t\t\n\t\n\t\t//Modification des deux roles\n\t\tRoleUtilisateur r1Modifie = r1;\n\t\tr1Modifie.setNom(\"CommercialMod\");\n\t\t\n\t\tRoleUtilisateur r2Modifie = r2;\n\t\tr2Modifie.setNom(\"MagasinierMod\");\n\t\t\n\t\tdaoRole.updateRoleUtilisateur(r1Modifie);\n\t\tdaoRole.updateRoleUtilisateur(r2Modifie);\n\t\t\n\t\t\n\t\t\n\t\tRoleUtilisateur rRecupModifie1 = daoRole.findByIdRoleUtilisateur(1);\n\t\tassertEquals(\"CommercialMod\", rRecupModifie1.getNom());\n\n\t\tRoleUtilisateur rRecupModifie2 = daoRole.findByIdRoleUtilisateur(2);\n\t\tassertEquals(\"MagasinierMod\", rRecupModifie2.getNom());\n\t\t\n\t\t\n\t\t//Afficher la liste des roles\n\t\tList<RoleUtilisateur> allRoleUtilisateur = daoRole.findAllRoleUtilisateur();\n\t\tassertEquals(2, allRoleUtilisateur.size());\n\t\t\n\t\tassertEquals(\"CommercialMod\", allRoleUtilisateur.get(0).getNom());\n\t\tassertEquals(\"MagasinierMod\", allRoleUtilisateur.get(1).getNom());\n\n\n\t}", "public final void setRoles(final String roles) {\n this.roles = roles;\n }", "@Override\n public void setRole(User u) {\n loginTrue(u.getName());\n uRole = u.getUserRole();\n switch (uRole) {\n case 1:\n nhanvien.setEnabled(true);\n break;\n case 2:\n quanly.setEnabled(false);\n break;\n case 3:\n break;\n case 4:\n dathang.setEnabled(false);\n break;\n case 5:\n baocao.setEnabled(false);\n break;\n }\n }", "public SecUserrole getNewSecUserrole();", "public void setRoles( Set<String> roles )\n {\n this.roles = roles;\n }", "@Override\r\n\tpublic int delRole(int id) {\n\t\treturn 0;\r\n\t}", "@Override\n public void assignUsersToRole(Project project, String role, Developer... developers) {\n for (Developer developer : developers) {\n assignUserToRole(project, developer.getId(), role);\n }\n }", "@Override\n\tpublic int modifyUser(User_role newUser) throws Exception{\n\t\treturn userMapper.updateUser(newUser);\n\t}", "long addUserRole(UserRole userRole);", "public void setAdminRole(org.semanticwb.model.Role value)\r\n {\r\n if(value!=null)\r\n {\r\n getSemanticObject().setObjectProperty(swpres_adminRole, value.getSemanticObject());\r\n }else\r\n {\r\n removeAdminRole();\r\n }\r\n }", "@Override\n\tpublic void updateRoleUtilisateur(RoleUtilisateur r) {\n\t\troleUtilisateurDAO.udpateRoleUtilisateur(r);\n\t}", "public void setRole(String role) {\n this.role = role;\n }", "void setRole(final SecurityRole role);", "@Override\n\tpublic void update(UserRole vo) {\n\n\t}", "public void setRole(User user, UserRole role) {\n\t user.setRole(role);\n\t}", "void removeRole(String id) throws DataException;", "@Test\n @IfProfileValue(name=\"dept-test-group\", values={\"all\",\"role\"})\n public void _4_3_1_delExistRole() throws Exception {\n this.mockMvc.perform(delete(\"/api/v1.0/companies/\"+\n r_2.getCompany()+\n \"/departments/\"+\n r_2.getDepartment()+\n \"/roles/\"+\n r_2.getId())\n .header(AUTHORIZATION, ACCESS_TOKEN))\n .andDo(print())\n .andExpect(status().isOk());\n thrown.expect(NameNotFoundException.class);\n repository.findRole(r_2.getId());\n }", "@RequestMapping(value =\"/{projectId}/users_manager\", method = RequestMethod.GET)\r\n\t @PreAuthorize(\"@userRoleService.isMember(#projectID)\")\r\n\t public ModelAndView usersManager(ModelMap Model, @PathVariable(\"projectId\") int projectID) throws IOException{\r\n\t \r\n\t\t \tList<User> listUsers = usersDAO.getAllUsersByProjectID(projectID);\r\n\t\t \tList<Role> listroles=new ArrayList<Role>();\r\n\t\t \tfor(User u :listUsers ){\r\n\t\t \t\tlistroles.add(roleDAO.getRoleByUserIdAndProjectId(u.getUserID(), projectID));\r\n\t\t \t}\r\n\t\t \tUser user = authenticationUserService.getCurrentUser();\r\n\t\t \tRole role=roleDAO.getRoleByUserIdAndProjectId(user.getUserID(), projectID);\r\n\t ModelAndView model = new ModelAndView(\"usersmanager\");\r\n\t \r\n\t //set of roles that exist (for the select)\r\n\t model.addObject(\"roles\",roles);\r\n\t \r\n\t \r\n\t //role of the actual user (to display or not deleted button)\r\n\t model.addObject(\"userrole\",role.getRole());\r\n\t \r\n\t //list of users with their role\r\n\t model.addObject(\"listUsers\", listUsers);\r\n\t model.addObject(\"listRoles\",listroles);\r\n\t \r\n\t model.setViewName(\"usersmanager\");\r\n\t\t\tmodel.addObject(\"projectId\",projectID);\r\n\t return model;\r\n\t }", "public void updateUserRole(UserRole userRole) throws ClassNotFoundException, SQLException {\n\t\tsave(\"update user_role set name = ? where id = ?\", new Object[] { userRole.getName(), userRole.getId() });\n\t}", "@Override\r\n\tpublic void updateRole(Role role) {\n\t\troleDao.updateRole(role);\r\n\t}", "@Test\n public void removeRole() throws Exception {\n\n doReturn(role).when(roleRepository).findOne(anyLong());\n doAnswer(invocationOnMock -> users).when(userRepository).findUsersByRolesContains(any(Role.class));\n doAnswer(invocationOnMock -> users).when(userRepository).save(any(List.class));\n doNothing().when(roleRepository).delete(any(Role.class));\n\n boolean result = roleService.removeRole(anyLong());\n\n Assert.assertTrue(\"Remove role failed\", result);\n }", "@Override\n\tpublic void deleteRole(long id) {\n\t\t\n\t}", "public void setRole(Map<String, Object> role) {\n //First create a dummy Repo class object for customer.\n RoleRepository roleRepository = new RoleRepository();\n Role role1 = roleRepository.createObject(role);\n setRole(role1);\n }", "void resolveRoles(UserData user, ActionListener<Set<String>> listener);", "public void initialize() {\n\n // DO NOT DELETE\n if (userRoleRepository.count() == 0) {\n userRoleRepository.saveAll(List.of(\n userRoleFactory.of(ROLE_USER.name()),\n userRoleFactory.of(ROLE_ADMIN.name())\n ));\n }\n\n // DO NOT DELETE\n if (userRepository.count() == 0) {\n userRepository.saveAll(List.of(\n userFactory.ofSecurity(\n List.of(retrieveAdminRole(), retrieveUserRole()),\n \"lens.huygh@gmail.com\",\n new BCryptPasswordEncoder().encode(\"Lens\"),\n \"Lens Huygh\"),\n userFactory.ofSecurity(\n List.of(retrieveAdminRole(), retrieveUserRole()),\n \"thomasf0n7a1n3@gmail.com\",\n new BCryptPasswordEncoder().encode(\"Thomas\"),\n \"Thomas Fontaine\"),\n userFactory.ofSecurity(\n List.of(retrieveAdminRole(), retrieveUserRole()),\n \"paul.gerarts@juvo.be\",\n new BCryptPasswordEncoder().encode(\"Paul\"),\n \"Paul Gerarts\"),\n userFactory.ofSecurity(\n List.of(retrieveUserRole()),\n \"user@email.com\",\n new BCryptPasswordEncoder().encode(\"user\"),\n \"User McUserson\"),\n userFactory.ofSecurity(\n List.of(retrieveAdminRole()),\n \"admin@email.com\",\n new BCryptPasswordEncoder().encode(\"admin\"),\n \"Admin McAdminson\"\n )\n ));\n }\n }", "@Override\n\tpublic Users getDefaultRole(Object id) {\n\t\treturn null;\n\t}", "void deleteRole(UserRole role) {\n\t\tuserRoleRepository.delete(role.getId());\n\t}", "public void clearSupportRoles() {\n\t\tsupportRoles.clear();\n\t\tconfig.save();\n\t\tif (!config.isLoading()) { TMEventManager.departmentChange(this, ChangeType.Dept.ROLES); }\n\t}", "Set getRoles();", "public int editUserRoles(List<UUserRole> userRoles,String user_id) {\n\t\tint r=0;\n\n\t\ttry {\n\t\t\troleMapper.deleteUserRole(new String[]{user_id});\n\t\t\tif(userRoles!=null&&userRoles.size()>0){\n\t\t\t\troleMapper.insertUserRoles(userRoles);\n\t\t\t}\n\t\t\tr=2000;\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn r;\n\t}", "public void ajouterRole(RoleUtilisateur ru);", "@Override\n\tpublic void deleteUserRole(Integer id, String vcEmployeeIds) {\n\t\tString hql = \"delete from HhUsersrole h where h.vcEmployeeId in (\" + vcEmployeeIds + \") and h.roleId in \"+\n\t\t\t\t\t \"(select g.roleId from HhGroupUserRole g where g.groupId = \" + id + \" ) \";\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\n\t\tquery.executeUpdate();\n\t}", "public void setRoles(Role a, Role b, Role c){\n roles = new Role[] {a, b, c};\n }", "@Override\r\n\tpublic void setRole(Long accountId, List<Role> roles) throws ServiceException {\n\r\n\t}", "public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder clearRole() {\n role = null;\n fieldSetFlags()[6] = false;\n return this;\n }", "@Override\n public void removeUser(Project project, Developer developer) {\n TracCommand removeUserFromRoleCommand = new TracRemoveUserFromRoleCommand(configuration, developer.getId(), project);\n TracCommand removeUserCommand = new TracRemoveUserCommand(developer, configuration, project);\n try {\n executor.addCommand(removeUserFromRoleCommand);\n executor.addCommand(removeUserCommand);\n success = executor.executeBatch();\n } catch (Exception e) {\n // TODO Auto-generated catch block\n logger.error(e.getMessage(), e);\n }\n }", "void setRoles(Set<String> roles);", "public void filterByUserRole(final Role role) {\n leftJoin(\"user.userRoles as userRole\");\n andWhere(\"userRole.role = :\" + ROLE);\n setParameter(ROLE, role);\n }", "public void testCreateRoles3() throws Exception {\r\n SeleniumTestBase mySeleniumTestBase = new SeleniumTestBase(browser);\r\n mySeleniumTestBase.addNewRole(\"Role3\", \"user3\", \"manage-security\");\r\n\r\n }", "@Test\n public void testDefaultRoleWithinRoleList() {\n configure().roles();\n realmRolesPage.table().clickRole(Constants.DEFAULT_ROLES_ROLE_PREFIX + \"-test\");\n defaultRolesPage.assertCurrent();\n\n //test role edit button leads to Default Roles tab \n configure().roles();\n realmRolesPage.table().editRole(Constants.DEFAULT_ROLES_ROLE_PREFIX + \"-test\");\n defaultRolesPage.assertCurrent();\n\n //test delete default role doesn't work\n configure().roles();\n realmRolesPage.table().deleteRole(Constants.DEFAULT_ROLES_ROLE_PREFIX + \"-test\");\n assertTrue(realmRolesPage.table().containsRole(Constants.DEFAULT_ROLES_ROLE_PREFIX + \"-test\"));\n }", "void createUserAccounts(Set<Role> roles, User u);", "public void setRole(HashMap<String, Object> role) {\n //First create a dummy Repo class object for customer.\n RoleRepository roleRepository = new RoleRepository();\n Role role1 = roleRepository.createObject(role);\n setRole(role1);\n }", "private void checkUserAuthorities() {\n\t\tAuthority auth = authorityRepository.findTop1ByName(AuthorityType.ROLE_ADMIN);\n\t\tif (null == auth) {\n\t\t\tauth = Authority.createAdmin();\n\t\t\tauthorityRepository.save(auth);\n\t\t}\n\t\tAuthority authUser = authorityRepository.findTop1ByName(AuthorityType.ROLE_USER);\n\t\tif (null == authUser) {\n\t\t\tauthUser = Authority.createUser();\n\t\t\tauthorityRepository.save(authUser);\n\t\t}\n\t}", "@Test\r\n public void findUserRoleValid() {\r\n\r\n UserRoleEto userRole = this.usermanagement.findUserRole(0L);\r\n\r\n assertThat(userRole).isNotNull();\r\n assertThat(userRole.getName()).isEqualTo(\"Customer\");\r\n }", "public void removeRole(String roleName) throws UnsupportedOperationException {\r\n log.debug(\"User [ Anonymous ] has no roles\");\r\n }", "@PostMapping(\"/nuevo\")\n public ResponseEntity<?> nuevo(@Valid @RequestBody NewUser nuevoUsuario, BindingResult bindingResult){\n \t\n \n if(bindingResult.hasErrors())\n return new ResponseEntity(new Mensaje(\"campos vacíos o email inválido\"), HttpStatus.BAD_REQUEST);\n \n if(iRepoUser.existsByEmail(nuevoUsuario.getEmail()))\n return new ResponseEntity(new Mensaje(\"ese email ya existe\"), HttpStatus.BAD_REQUEST);\n Usuario usuario =\n new Usuario(nuevoUsuario.getEmail(),nuevoUsuario.getRol(),\n passwordEncoder.encode(nuevoUsuario.getPassword()));\n Set<String> rolesStr = nuevoUsuario.getRoles();\n Set<Rol> roles = new HashSet<>();\n \n for (String rol : rolesStr) {\n switch (rol) {\n case \"ADMINISTRADOR\":\n Rol rolAdmin = iRepoRol.findByRolNombre(RolNombre.ADMINISTRADOR).get();\n roles.add(rolAdmin);\n break;\n case \"RECEPCIONISTA\":\n Rol rolAdmin2 = iRepoRol.findByRolNombre(RolNombre.RECEPCIONISTA).get();\n roles.add(rolAdmin2);\n break;\n case \"DOMICILIARIO\":\n Rol rolAdmin3 = iRepoRol.findByRolNombre(RolNombre.DOMICILIARIO).get();\n roles.add(rolAdmin3);\n break;\n case \"LOGISTICO\":\n Rol rolAdmin4 = iRepoRol.findByRolNombre(RolNombre.LOGISTICO).get();\n roles.add(rolAdmin4);\n break;\n case \"USUARIO_FINAL\":\n Rol rolAdmin5 = iRepoRol.findByRolNombre(RolNombre.USUARIO_FINAL).get();\n roles.add(rolAdmin5);\n break;\n \n default:\n Rol rolUser = iRepoRol.findByRolNombre(RolNombre.USUARIO_FINAL).get();\n roles.add(rolUser);\n }\n }\n usuario.setRoles(roles);\n iRepoUser.save(usuario);\n return new ResponseEntity(new Mensaje(\"usuario guardado\"), HttpStatus.CREATED);\n }", "public boolean checkUniqueLoginOnUpdate(Object objectOfRole) {\n \tif(objectOfRole instanceof Patient) {\n \t\tPatient patient = (Patient) objectOfRole;\n \t\tOptional<User> updatingUser = userRepository.findById(patient.getUser().getId());\n// If username/login is not change\n \t\tif (updatingUser.get().getUsername().equals(patient.getUser().getUsername())) {\n \t\t\treturn true;\n \t\t} else {\n \t\t\tUser findUser = userRepository.findByUsername(patient.getUser().getUsername());\n \t\t\tif (findUser == null) {\n \t\t\t\treturn true;\n \t\t\t}\n \t\t}\n \t} else if(objectOfRole instanceof Employee) {\n \t\tEmployee employee = (Employee) objectOfRole;\n \t\tOptional<User> updatingUser = userRepository.findById(employee.getUser().getId());\n// If username/login is not change\n \t\tif (updatingUser.get().getUsername().equals(employee.getUser().getUsername())) {\n \t\t\treturn true;\n \t\t} else {\n \t\t\tUser findUser = userRepository.findByUsername(employee.getUser().getUsername());\n \t\t\tif (findUser == null) {\n \t\t\t\treturn true;\n \t\t\t}\n \t\t}\n \t} else if(objectOfRole instanceof Doctor) {\n \t\tDoctor doctor = (Doctor) objectOfRole;\n \t\tOptional<User> updatingUser = userRepository.findById(doctor.getUser().getId());\n// If username/login is not change\n \t\tif (updatingUser.get().getUsername().equals(doctor.getUser().getUsername())) {\n \t\t\treturn true;\n \t\t} else {\n \t\t\tUser findUser = userRepository.findByUsername(doctor.getUser().getUsername());\n \t\t\tif (findUser == null) {\n \t\t\t\treturn true;\n \t\t\t}\n \t\t}\n \t} else if(objectOfRole instanceof Owner) {\n \t\tOwner owner = (Owner) objectOfRole;\n \t\tOptional<User> updatingUser = userRepository.findById(owner.getUser().getId());\n// If username/login is not change\n \t\tif (updatingUser.get().getUsername().equals(owner.getUser().getUsername())) {\n \t\t\treturn true;\n \t\t} else {\n \t\t\tUser findUser = userRepository.findByUsername(owner.getUser().getUsername());\n \t\t\tif (findUser == null) {\n \t\t\t\treturn true;\n \t\t\t}\n \t\t}\n \t} \n return false;\n }", "public void setRole() throws SQLException\r\n\t{\r\n\t\tString SQL_USER = \"UPDATE user SET role = 'Student' WHERE id=?;\";\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Prepare the statement\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\r\n\t\t\t//Bind the variables\r\n\t\t\tstatement.setInt(1, userId);\r\n\r\n\t\t\t//Execute the update\r\n\t\t\tstatement.executeUpdate();\r\n\r\n\t\t} catch (SQLException e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in SQL: Student->setRole()\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\t\r\n\t\t}\r\n\t\t\r\n\t\t//commit change\r\n\t\tDatabase.get().commit();\r\n\t}", "public void resetCreationRights() {\r\n creationRights = false;\r\n \r\n try {\r\n String[] roles = processModel.getCreationRoles();\r\n \r\n for (int i = 0; i < roles.length; i++) {\r\n if (roles[i].equals(currentRole))\r\n creationRights = true;\r\n }\r\n } catch (Exception e) {\r\n creationRights = false;\r\n }\r\n }", "private void loadRoles() {\n if(roleService.listAll().size() > 0) {\n log.debug(\"Test roles have already been loaded.\");\n return ;\n }\n\n Role role = new Role();\n role.setRole(SpringJPABootstrap.USER);\n roleService.save(role);\n\n log.debug(\"Test roles have been loaded!\");\n }", "public synchronized void setRole(final Role newValue) {\n checkWritePermission();\n role = newValue;\n }", "public void setUserRoles(Set<String> userRoles) {\n\t\tthis.userRoles = userRoles;\n\t}", "@Override\n\tpublic void deleteAllUserRole(Integer id) {\n\t\tString hql = \"delete from HhUsersrole h where h.vcEmployeeId in (select u.vcEmployeeId from HhGroupUser u where u.groupId = \" + id + \") and h.roleId in \"+\n\t\t\t\t \t \"(select g.roleId from HhGroupUserRole g where g.groupId = \" + id + \" ) \";\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\n\t\tquery.executeUpdate();\n\t}", "@Override\n\tpublic List<UserRoleDto> getUserRole(UserDto userDto) {\n\t\treturn null;\n\t}", "private boolean isRoleModified(User user) {\n\t\treturn isAdmin != null && !user.getRole().equals(getRole());\n\t}", "public void setRole(String role) {\r\n\t\tthis.role = role;\r\n\t}", "public void deleteUserRole(UserRole userRole) throws ClassNotFoundException, SQLException {\n\t\tsave(\"delete from user_role where id = ?\", new Object[] { userRole.getId() });\n\t}", "public final void addRole(RepoUserRole role){\n if(!rolesAsEnum.contains(role)){\n try{\n rolesAsEnum.add(role);\n } catch(UnsupportedOperationException ex){\n LOGGER.warn(\"Adding roles is not supported for this instance of RepoUser with roles {}. Probably, the user is inactive.\", rolesAsEnum);\n }\n }\n }", "public Boolean isRoleValid(String userName,String password, Vector roles)\n {\n try\n {\n UserEntityInterface userEntityInterface = UserEntityFactory.getInstance();\n UserInterface userInterface = userEntityInterface.getUser(userName);\n \n if(userInterface.getRole() == null)\n {\n if(org.allbinary.logic.communication.log.config.type.LogConfigTypes.LOGGING.contains(org.allbinary.logic.communication.log.config.type.LogConfigTypeFactory.getInstance().TAGHELPER))\n {\n LogUtil.put(LogFactory.getInstance(\"Role is null: \" + userInterface.getRole() +\n \" Valid Roles: \" + roles.toString(),\n this, \"isRoleValid()\"));\n }\n \n return Boolean.FALSE;\n }\n \n Iterator iter = roles.iterator();\n while(iter.hasNext())\n {\n BasicUserRole nextRole = (BasicUserRole) iter.next();\n if(userInterface.getRole().getBasicUserRole().equals(nextRole))\n {\n //role is verified\n \n //validate permissions to set session\n //this should be seperated into hasPermissions method\n \n /*if(userInterface.hasPermission(new RequestParams(this.request)))\n {\n userInterface.validateSession(weblisketSession,new RequestParams(this.request));\n }\n else\n {\n if(org.allbinary.logic.communication.log.config.type.LogConfigTypes.LOGGING.contains(org.allbinary.logic.communication.log.config.type.LogConfigTypeFactory.getInstance().TAGHELPER))\n {\n LogUtil.put(LogFactory.getInstance(\"Role is not valid: \" + userInterface.getRole() +\n \" Valid Roles: \" + roles.toString(),\n this,\"isRoleValid()\"));\n }\n \n return Boolean.FALSE;\n }\n */\n \n userInterface.validateSession((WeblisketSessionInterface) weblisketSession);\n \n this.request.removeAttribute(WeblisketSessionData.REMOVABLEUSERNAME);\n this.request.removeAttribute(WeblisketSessionData.REMOVABLEPASSWORD);\n return Boolean.TRUE;\n }\n }\n \n if(org.allbinary.logic.communication.log.config.type.LogConfigTypes.LOGGING.contains(org.allbinary.logic.communication.log.config.type.LogConfigTypeFactory.getInstance().TAGHELPER))\n {\n \t StringBuffer stringBuffer = new StringBuffer();\n \t \n \t stringBuffer.append(\"Role is not valid: \");\n \t stringBuffer.append(userInterface.getRole());\n \t stringBuffer.append(\" Valid Roles: \");\n \t stringBuffer.append(roles.toString());\n \t \n LogUtil.put(LogFactory.getInstance(stringBuffer.toString(), this, \"isRoleValid()\"));\n }\n //on userInterface.getRole() failure\n return Boolean.FALSE;\n }\n catch(Exception e)\n {\n String error = \"Failed to check if Role is valid\";\n if(org.allbinary.logic.communication.log.config.type.LogConfigTypes.LOGGING.contains(org.allbinary.logic.communication.log.config.type.LogConfigTypeFactory.getInstance().TAGHELPERERROR))\n {\n LogUtil.put(LogFactory.getInstance(error, this, \"isRoleValid()\", e));\n }\n return Boolean.FALSE;\n }\n }", "private void onAddRole() {\n\t\troleProxy.addRoleToUser(user, selectedRole);\n\t}", "public void testCreateRoles4() throws Exception {\r\n SeleniumTestBase mySeleniumTestBase = new SeleniumTestBase(browser);\r\n mySeleniumTestBase.addNewRole(\"Role4\", \"user4\", \"upload-services\");\r\n\r\n }", "public void testCreateRoles2() throws Exception {\r\n SeleniumTestBase mySeleniumTestBase = new SeleniumTestBase(browser);\r\n mySeleniumTestBase.addNewRole(\"Role2\", \"user2\", \"manage-configuration\");\r\n\r\n }", "@Override\n\tpublic List<UserRole> buscarUserRoleSemPermissoes() {\n\t\t// TODO Auto-generated method stub\n\t\tQuery query = getCurrentSession().createQuery(\"select ur from UserRole ur where ur.permissions\");\n\t\treturn query.list();\n\t}", "public void setUserRole(String userName, String userRole) {\r\n\t\t// may need a wait or method for waiting for list to load\r\n\t\telement(userListContainer).waitUntilVisible();\r\n\r\n\t\tList<WebElement> resultsList = userListContainer.findElements(By\r\n\t\t\t\t.cssSelector(\"tbody.yui-dt-data tr\"));\r\n\t\tSystem.out.println(\"found List\");\r\n\t\ttheBigFor: for (WebElement resultNow : resultsList) {\r\n\t\t\tif (resultNow\r\n\t\t\t\t\t.findElement(By.cssSelector(\"td[headers*='displayName']\"))\r\n\t\t\t\t\t.getText().contains(userName)) {\r\n\t\t\t\tSystem.out.println(\"found element\");\r\n\t\t\t\t// click on the role dropdown\r\n\t\t\t\tresultNow.findElement(By.tagName(\"button\")).click();\r\n\t\t\t\t// build the option list - for selecting the role\r\n\t\t\t\tList<WebElement> roleOptionsList = resultNow.findElements(By\r\n\t\t\t\t\t\t.cssSelector(\"ul.first-of-type li a\"));\r\n\r\n\t\t\t\tfor (WebElement optionNow : roleOptionsList) {\r\n\t\t\t\t\tif (optionNow.getText().contains(userRole)) {\r\n\t\t\t\t\t\tSystem.out.println(\"found role\");\r\n\t\t\t\t\t\toptionNow.sendKeys(\"\");\r\n\t\t\t\t\t\toptionNow.click();\r\n\r\n\t\t\t\t\t\tbreak theBigFor;\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}", "@Override\r\n\tpublic void updateRole(Role role) {\n\t\tRole r = getRoleById(role.getRole_id());\r\n\t\tr.setDescription(role.getDescription());\r\n\t\tr.setFunctionSet(role.getFunctionSet());\r\n\t\tr.setName(role.getName());\r\n\t\tr.setUserSet(role.getUserSet());\r\n\t\tr.setRole_id(role.getRole_id());\r\n\t\tgetHibernateTemplate().update(r);\r\n\t}", "private static String setRoleFromDatabase () {\n String sqlRetrieveUserRole = \"SELECT user_role.role FROM user_role, users WHERE (users.user_id=? AND user_role.role_id=users.role)\";\n\n try (Connection conn = Database.getConnection();\n PreparedStatement pstmt = conn.prepareStatement(sqlRetrieveUserRole)) {\n \n pstmt.setInt(1, userId);\n \n ResultSet rs = pstmt.executeQuery();\n \n if (rs.next() == false) {\n roleFromDatabase = \"\";\n } else {\n roleFromDatabase = rs.getString(\"role\");\n }\n } catch (SQLException se) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(1), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (IOException ioe) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (Exception e) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n }\n \n return roleFromDatabase;\n }", "public void UserServiceTest_Edit()\r\n {\r\n User user = new User();\r\n user.setId(\"1234\");\r\n user.setName(\"ABCEdited\");\r\n user.setPassword(\"123edited\");\r\n ArrayList<Role> roles = new ArrayList<>();\r\n roles.add(new Role(\"statio manager\"));\r\n user.setRoles(roles);\r\n \r\n UserService service = new UserService(); \r\n try {\r\n service.updateUser(user);\r\n } catch (SQLException e) {\r\n fail();\r\n System.out.println(e);\r\n }catch (NotFoundException e) {\r\n fail();\r\n System.out.println(e);\r\n }\r\n }", "@Test\n public void updateRole() throws Exception {\n\n doReturn(null).when(roleRepository).findByName(anyString());\n doReturn(role).when(roleRepository).findOne(anyLong());\n doReturn(role).when(roleRepository).save(any(Role.class));\n\n boolean result = roleService.updateRole(anyLong(), requestVO);\n\n Assert.assertTrue(\"Update role failed\", result);\n }", "public void testCreateRoles1() throws Exception {\r\n SeleniumTestBase mySeleniumTestBase = new SeleniumTestBase(browser);\r\n mySeleniumTestBase.addNewRole(\"Role1\", \"user1\", \"Login to admin console\");\r\n }" ]
[ "0.68345404", "0.68324625", "0.6809246", "0.6609307", "0.65911096", "0.6492731", "0.642756", "0.6374808", "0.6335184", "0.6255908", "0.62158877", "0.62152237", "0.6183229", "0.6171613", "0.6168415", "0.6129936", "0.61214745", "0.61139315", "0.6089047", "0.6066733", "0.6066523", "0.6010756", "0.5972392", "0.5963999", "0.59613425", "0.59443146", "0.59318924", "0.5931222", "0.5930221", "0.5919203", "0.59174657", "0.5913334", "0.5909884", "0.5899013", "0.5892272", "0.5891518", "0.58882797", "0.586838", "0.5862197", "0.5859755", "0.584631", "0.5844496", "0.5837508", "0.5833062", "0.5830947", "0.582559", "0.5824747", "0.5819126", "0.58179426", "0.5817468", "0.58149123", "0.5804652", "0.5803902", "0.58027923", "0.5793043", "0.57913625", "0.5783973", "0.5772862", "0.57723475", "0.57609427", "0.57543623", "0.57498807", "0.5749657", "0.5747478", "0.5731525", "0.57281786", "0.5726779", "0.57240105", "0.5704872", "0.5704411", "0.5702159", "0.5693999", "0.5690565", "0.568842", "0.56882405", "0.5684392", "0.568406", "0.56829274", "0.56803274", "0.5679684", "0.56767213", "0.5676262", "0.56652206", "0.56634617", "0.5638731", "0.56299424", "0.56290084", "0.561789", "0.5603043", "0.5599949", "0.55922234", "0.5585319", "0.5584529", "0.5578108", "0.5565904", "0.55482167", "0.55473965", "0.5532449", "0.5530895", "0.5530781" ]
0.65203416
5
display users that can be adding to the project
@RequestMapping(value="/{projectId}/users",method=RequestMethod.GET) @ResponseBody public ArrayList<User> autocompleteusers(@RequestParam String username){ User user = authenticationUserService.getCurrentUser(); ArrayList<User> listUsers = (ArrayList<User>) usersDAO.getUsersStartedwith(username,user); return listUsers; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<String> displayuser() {\n\t\t// TODO Auto-generated method stub\n\t\tList<String> list = new ArrayList<>();\n\t\tlist = crud1.displayUsers();\n\t\treturn list;\n\t}", "public String listUsers(){\n \tStringBuilder sb = new StringBuilder();\n \tif(users.isEmpty()){\n \t\tsb.append(\"No existing Users yet\\n\");\n \t}else{\n \t\tsb.append(\"Meeting Manager Users:\\n\");\n \t\tfor(User u : users){\n \t\t\tsb.append(\"*\"+u.getEmail()+\" \"+ u.getPassword()+\" \\n\"+u.listInterests()+\"\\n\");\n \t\t}\n \t}\n \treturn sb.toString();\n }", "public void addUserBtn(){\n\t\t\n\t\t// TODO: ERROR CHECK\n\t\t\n\t\tUserEntry user = new UserEntry(nameTF.getText(), (String)usertypeCB.getValue(), emailTF.getText());\n\t\tAdminController.userEntryList.add(user);\n\t\t\n\t\t\n\t\t// Create a UserEntry and add it to the observable list\n\t\tAdminController.userList.add(user);\t\t\n\t\t\n\t //AdminController.adminTV.setItems(AdminController.userList);\n\t\t\n\t\t//Close current stage\n\t\tAdminController.addUserStage.close();\n\t\t\n\t}", "public ArrayList<User> showUsers(){\n\t\treturn this.userList;\n\t}", "@Override\n public String toString(){\n StringBuilder s = new StringBuilder();\n\n s.append(\"User\\n\");\n s.append(\"User's name: \" + this.name + \"\\n\");\n s.append(\"User's email: \" + this.email + \"\\n\");\n s.append(\"User's projects:\\n\");\n for(Project p : this.projects.getProjects().values()){\n s.append(\" -> \" + p.toString() + \"\\n\");\n }\n\n return s.toString();\n }", "public void listOpenUserCollections() {\n menuAddToCollection.removeAll();\n ArrayList<ModelUserCollection> openUserCollections = modelOpenUserCollections.getOpenCollections();\n if(openUserCollections.size() > 0) {\n menuAddToCollection.setEnabled(true);\n for(ModelUserCollection modelUserCollection : openUserCollections) {\n JMenuItem menuItemUserCollection = new JMenuItem(\n new ActionAddReleaseToUserCollection(modelUserCollection.getName(), modelUserCollection, modelSelectedRelease));\n menuAddToCollection.add(menuItemUserCollection);\n // Toevoegen aan de collectie die openstaat in onmogelijk\n if(modelUserCollection == modelCollection) {\n menuItemUserCollection.setEnabled(false);\n }\n }\n } else {\n menuAddToCollection.setEnabled(false);\n }\n }", "public void displayUsers(){\n //go through the userName arraylist and add them to the listView\n for(String val:this.userNames){\n this.userListView.getItems().add(val);\n }\n }", "public String addUser() {\n\t\t\t\treturn null;\r\n\t\t\t}", "private void createUserList() {\n\t\tif (!userList.isEmpty() && !listUsers.isSelectionEmpty()) {\n\t\t\tlistUsers.clearSelection();\n\t\t}\t\t\n\t\tif (!archivedUserList.isEmpty() && !listArchivedUsers.isSelectionEmpty()) {\n\t\t\tlistArchivedUsers.clearSelection();\n\t\t}\t\t\n\t\tarchivedUserList.clear();\n\t\tuserList.clear();\n\t\tArrayList<User> users = jdbc.get_users();\n\t\tfor (int i = 0; i < users.size(); i++) {\n\t\t\tif (users.get(i).active()) {\n\t\t\t\tuserList.addElement(String.format(\"%s, %s [%s]\", users.get(i).get_lastname(), users.get(i).get_firstname(), users.get(i).get_username()));\n\t\t\t} else {\n\t\t\t\tarchivedUserList.addElement(String.format(\"%s, %s [%s]\", users.get(i).get_lastname(), users.get(i).get_firstname(), users.get(i).get_username()));\n\t\t\t}\t\t\n\t\t}\n\t}", "@Override\r\n\tpublic List<User> viewUsers() {\n\t\treturn user.viewUsers();\r\n\t}", "public List<String> grantpermission() {\n\t\tList<Integer> userids = new ArrayList<>();\n\t\tuserids = crud1.grantPermission();\n\t\tList<String> username = new ArrayList<>();\n\t\tfor (Integer x : userids) {\n\n\t\t\tusername.add(crud1.findById(x).get().getUsername());\n\t\t}\n\t\treturn username;\n\t}", "@Override\n public void initializeUsersForImportation() {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"initializeUsersForImportation\");\n }\n clearAddPanels();\n setRenderImportUserPanel(true);\n\n List<User> users;\n\n usersForImportation = new ArrayList<Pair<Boolean, User>>();\n\n if (Role.isLoggedUserAdmin() || Role.isLoggedUserProjectManager()) {\n choosenInstitutionForAdmin = (Institution) Component.getInstance(CHOOSEN_INSTITUTION_FOR_ADMIN);\n\n if (choosenInstitutionForAdmin != null) {\n users = User.listUsersForCompany(choosenInstitutionForAdmin);\n } else {\n users = User.listAllUsers();\n }\n } else {\n users = User.listUsersForCompany(Institution.getLoggedInInstitution());\n }\n boolean emailAlreadyExists;\n for (User user : users) {\n emailAlreadyExists = false;\n\n for (ConnectathonParticipant cp : connectathonParticipantsDataModel().getAllItems(FacesContext.getCurrentInstance())) {\n\n if (user.getEmail().equals(cp.getEmail())) {\n emailAlreadyExists = true;\n }\n }\n\n if (!emailAlreadyExists) {\n usersForImportation.add(new Pair<Boolean, User>(false, user));\n }\n }\n }", "private void createUserListQual() {\n\t\tuserListAvailQual.clear();\n\t\tArrayList<User> users = jdbc.get_users();\n\t\tfor (int i = 0; i < users.size(); i++) {\n\t\t\tuserListAvailQual.addElement(String.format(\"%s, %s [%s]\", users.get(i).get_lastname(), users.get(i).get_firstname(), users.get(i).get_username()));\n\t\t}\n\t}", "@Override\n public String getTypeForDisplay() {\n return \"User\";\n }", "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 }", "@Override\n\tpublic List<String> viewAllProjects(String userId) {\n\t\treturn fileDao.getUserAllProjectsName(userId);\n\t}", "public List<String> show () {\n\t\treturn userDao.show();\n\t}", "List<User> addUsersToShowableList(UserListRequest userListRequest);", "String checkUserAccessOnProject(Long id, String username);", "public void viewUser() {\n\t\tsuper.viewUser();\n\t}", "public void viewUsers(){\n Database manager = new Database(\n this,\n \"mypets\",\n null,\n 1\n );\n //2. Let write on DB\n SQLiteDatabase mypets = manager.getWritableDatabase();\n //3. Get information from database\n int idAdmin = 1;\n Cursor row = mypets.rawQuery(\n \"SELECT * FROM users WHERE id not in (?)\",\n idAdmin\n );\n\n if (row.getCount() == 0) {\n Toast.makeText(\n this,\n \"::: There isn't any user registered:::\",\n Toast.LENGTH_SHORT\n ).show();\n } else {\n while(row.moveToNext()) {\n listUsers.add(row.getString(1));\n listUsers.add(row.getString(3));\n }\n adapter = new ArrayAdapter<>(\n this,\n android.R.layout.simple_list_item_1,\n listUsers\n );\n userList.setAdapter(adapter);\n }\n }", "@Test\n public void shouldListExpectedUsers() {\n OrgMembersListPage theMembersPage = open(OrgMembersListPage.class, organization.getName());\n theMembersPage.entriesContainer().shouldHave(text(\"Admin User (admin)\"));\n }", "public String ListUsers(){\r\n StringBuilder listUsers = new StringBuilder();\r\n for (Utente u: utenti) { // crea la lista degli utenti registrati al servizio\r\n listUsers.append(u.getUsername()).append(\" \");\r\n \tlistUsers.append(u.getStatus()).append(\"\\n\");\r\n }\r\n return listUsers.toString(); \r\n }", "public List<User> displayUsers() {\n\t\t\r\n\t\ttry {\r\n\t\t\treturn sessionFactory.getCurrentSession().createQuery(\"from com.niit.model.User\").list();\r\n\t\t\t\r\n\t\t} \r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "private void addPrivilegedUser(ActionEvent actionEvent) {\n if (addUserMenu.getSelectionModel().getSelectedItem() != null) {\n for (User user : server.getUser()) {\n if (user.getName().equals(addUserMenu.getSelectionModel().getSelectedItem())) {\n selectedAddUser = user;\n }\n }\n // set selected user to channel as privileged\n channel.withPrivilegedUsers(selectedAddUser);\n // update addMenu\n addUserMenu.getItems().clear();\n for (User user : server.getUser()) {\n if (!user.getPrivileged().contains(channel)) {\n addUserMenu.getItems().add(user.getName());\n }\n }\n // update removeMenu\n removeUserMenu.getItems().clear();\n for (User user : server.getUser()) {\n if (user.getPrivileged().contains(channel)) {\n removeUserMenu.getItems().add(user.getName());\n }\n }\n channelPrivilegedUserUpdate();\n }\n }", "private void createAllUsersList(){\n\t\tunassignedUsersList.clear();\n\t\tlistedUsersAvailList.clear();\n\t\tArrayList<User> users = jdbc.get_users();\n\t\tfor (int i = 0; i < users.size(); i++) {\n\t\t\tunassignedUsersList.addElement(String.format(\"%s, %s\", users.get(i).get_lastname(), users.get(i).get_firstname()));\n\t\t\tlistedUsersAvailList.addElement(String.format(\"%s, %s\", users.get(i).get_lastname(), users.get(i).get_firstname()));\n\t\t}\n\t}", "public void printUsers() {\n userAnya.printInfo();\n userRoma.printInfo();\n }", "@Override\n\tpublic void showTaggedUsers() {\n\t\t\n\t}", "public List<Utilizator> listUsers();", "public static void displayUsers()\r\n\t{\n\t\tObservableList<Employee> employees = listEmployees();\r\n\t\t\r\n\t\t//create table\r\n\t\tTableView<Employee> table = Employee.createEmployeeTable();\r\n\t\t\r\n\t\t//menu\r\n\t\tMenuItem deleteUser = new MenuItem(\"Delete User\");\r\n\t\tMenuItem createUser = new MenuItem(\"Create User\");\r\n\t\tMenuItem demote = new MenuItem(\"Demote/Promote User\");\r\n\t\tMenu actions = new Menu(\"Actions\");\r\n\t\tMenuBar menu = new MenuBar();\r\n\t\t\r\n\t\t//create stage\r\n\t\tStage window = new Stage();\r\n\t\t\r\n\t\t//set menu\r\n\t\tmenu.prefWidthProperty().bind(window.widthProperty());\r\n\t\t\r\n\t\t//add items to menu\r\n\t\tactions.getItems().addAll(deleteUser, createUser, demote);\r\n\t\t\r\n\t\t//add menu to menu bar\r\n\t\tmenu.getMenus().add(actions);\r\n\t\t\r\n\t\t//set on action\r\n\t\tdemote.setOnAction(new EventHandler<ActionEvent>() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t if(Integer.parseInt(Configs.getProperty(\"Privilege\")) == 3)\r\n\t\t\t {\r\n\t\t\t\t if(table.getSelectionModel().getSelectedItem() != null)\r\n\t\t\t\t {\t \r\n\t\t\t //promote user\r\n\t\t\t\t updatePrivilegeLevel(table.getSelectionModel().getSelectedItem().getUsername());\r\n\t\t\t\t } \r\n\t\t\t\t else\r\n\t\t\t\t {\r\n\t\t\t\t AlertBox.display(\"FASS Nova\", \"Select a user\");\t \r\n\t\t\t\t }\t \r\n\t\t\t }\t\r\n\t\t\t else\r\n\t\t\t {\r\n\t\t\t\t AlertBox.display(\"FASS Nova\", \"You do not have permission to perform this action\"); \r\n\t\t\t } \r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\tcreateUser.setOnAction(new EventHandler<ActionEvent>() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t if(Integer.parseInt(Configs.getProperty(\"Privilege\")) == 3)\r\n\t\t\t {\r\n\t\t\t UserDisplay.addUserDisplay(); \t \r\n\t\t\t }\t\r\n\t\t\t else\r\n\t\t\t {\r\n\t\t\t\t AlertBox.display(\"FASS Nova\", \"You do not have permission to perform this action\"); \r\n\t\t\t }\t \r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\t\r\n\t\tdeleteUser.setOnAction(new EventHandler<ActionEvent>() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t if(Integer.parseInt(Configs.getProperty(\"Privilege\")) == 3)\r\n\t\t\t {\r\n\t\t\t\t if(table.getSelectionModel().getSelectedItem() != null)\r\n\t\t\t\t {\t \r\n\t\t\t //delete user\r\n\t\t\t\t User.deleteUser(table.getSelectionModel().getSelectedItem().getUsername());\r\n\t\t\t\t }\r\n\t\t\t\t else\r\n\t\t\t\t {\r\n\t\t\t\t AlertBox.display(\"FASS Nova\", \"You do not have permission to perform this action\");\t \r\n\t\t\t\t }\t \r\n\t\t\t }\t\r\n\t\t\t else\r\n\t\t\t {\r\n\t\t\t\t AlertBox.display(\"FASS Nova\", \"You do not have permission to perform this action\"); \r\n\t\t\t }\t \r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\t\r\n\t\t//root layout\r\n\t\tVBox root = new VBox();\r\n\t\t\r\n\t\t//set items\r\n\t\ttable.setItems(employees);\r\n\t\t\r\n\t\t//setup root\r\n\t\troot.setSpacing(10);\r\n\t\troot.setAlignment(Pos.TOP_CENTER);\r\n\t\t\r\n\t\t//add nodes to root\r\n\t\troot.getChildren().addAll(menu, table);\r\n\t\t\r\n\t\t//set id\r\n\t\troot.setId(\"border\");\r\n\t\t\r\n\t\t//load stylesheet\r\n\t\troot.getStylesheets().add(User.class.getResource(\"MainScreen.css\").toExternalForm());\r\n\t\t\r\n\t\t//create scene\r\n\t\tScene list = new Scene(root);\r\n\t\t\r\n\t\t//setup stage\r\n\t\twindow.setTitle(\"FASS Nova - \" + Configs.getProperty(\"StoreName\") + \" Employee List\");\r\n\t\twindow.setMinWidth(600);\r\n\t\twindow.centerOnScreen();\r\n\t\twindow.initModality(Modality.APPLICATION_MODAL);\r\n\t\twindow.setResizable(false);\r\n\t\twindow.centerOnScreen();\r\n\t\t\r\n\t\t//set scene and show\r\n\t\twindow.setScene(list);\r\n\t\twindow.showAndWait();\r\n\t}", "private String makeUserReadableMessage(String username, String projectStr) {\n //return \"User \" + username + \" requested projects '\" + projectStr + \"' but may not access one or more of them.\";\n return \"You do not have permission to view or edit the project.\";\n }", "@Override\r\n\tpublic void viewAllUsers() {\n\t\tList<User> allUsers = new ArrayList<User>();\r\n\t\tallUsers = udao.getAllUsers();\r\n\t\t\r\n\t\tSystem.out.println(\"ALL USERS:\");\r\n\t\tSystem.out.println(\"ID\\tUsername\\tName\");\r\n\t\t\r\n\t\tfor(int i = 0; i < allUsers.size(); i++) {\r\n\t\t\tUser tempUser = allUsers.get(i);\r\n\t\t\tSystem.out.println(tempUser.getUserID() + \"\\t\" + tempUser.getUsername() + \"\\t\"\r\n\t\t\t\t\t+ tempUser.getFirstName() + \" \" + tempUser.getLastName());\r\n\t\t}\r\n\r\n\t}", "@GET\n @Path(\"/admin/list\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response getUserAdminProjects() {\n HttpSession session = request.getSession();\n\n if (session.getAttribute(\"projectAdmin\") == null) {\n throw new ForbiddenRequestException(\"You must be the project's admin.\");\n }\n String username = session.getAttribute(\"user\").toString();\n\n projectMinter project= new projectMinter();\n String response = project.listUserAdminProjects(username);\n project.close();\n\n return Response.ok(response).build();\n }", "private String users(ModelMap model, Integer user_id) {\n\t\tList<Object> users = userservice.fetchUser(user_id);\n\t\tfor (Iterator<Object> iterator1 = users.iterator(); iterator1.hasNext();) {\n\t\t\tUser user = (User) iterator1.next();\n\t\t\tmodel.addAttribute(\"userdetail\", user);\n\t\t\tmodel.addAttribute(\"addresses\", user.getAddress());\n\t\t\tmodel.addAttribute(\"files\", user.getFile());\n\t\t}\n\t\treturn \"register\";\n\t}", "private void showUser() {\n\t\tCommonADO ado=CommonADO.getCommonADO();\r\n\t\tString sql=\"select * from Users\";\r\n\t\tResultSet rs=ado.executeSelect(sql);\r\n\t\tString str=\"\";\r\n\t\ttry {\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\tString user=rs.getString(\"UserName\");\r\n\t\t\t\tString pass=rs.getString(\"Password\");\r\n\t\t\t\tString type=rs.getString(\"UserType\");\r\n\t\t\t\tif(type.equals(\"管理员\"))\r\n\t\t\t\t\tpass=\"******\";\r\n\t\t\t\tif(user.length()<12){\r\n\t\t\t\t\tfor(int i=user.length();i<=12;i++)\r\n\t\t\t\t\t\tuser+=\" \";\r\n\t\t\t\t}\r\n\t\t\t\tif(pass.length()<12){\r\n\t\t\t\t\tfor(int i=pass.length();i<=12;i++)\r\n\t\t\t\t\t\tpass+=\" \";\r\n\t\t\t\t}\r\n\t\t\t\tif(type.length()<12){\r\n\t\t\t\t\tfor(int i=type.length();i<=12;i++)\r\n\t\t\t\t\t\ttype+=\" \";\r\n\t\t\t\t}\r\n\t\t\t\tstr+=\"用户名:\"+user;\r\n\t\t\t\tstr+=\" 密码:\"+pass;\r\n\t\t\t\tstr+=\" 用户类型:\"+type+\"\\n\";\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\ttextAreaUser.setText(str);\r\n\t}", "@RequestMapping(value =\"/{projectId}/users_manager\", method = RequestMethod.GET)\r\n\t @PreAuthorize(\"@userRoleService.isMember(#projectID)\")\r\n\t public ModelAndView usersManager(ModelMap Model, @PathVariable(\"projectId\") int projectID) throws IOException{\r\n\t \r\n\t\t \tList<User> listUsers = usersDAO.getAllUsersByProjectID(projectID);\r\n\t\t \tList<Role> listroles=new ArrayList<Role>();\r\n\t\t \tfor(User u :listUsers ){\r\n\t\t \t\tlistroles.add(roleDAO.getRoleByUserIdAndProjectId(u.getUserID(), projectID));\r\n\t\t \t}\r\n\t\t \tUser user = authenticationUserService.getCurrentUser();\r\n\t\t \tRole role=roleDAO.getRoleByUserIdAndProjectId(user.getUserID(), projectID);\r\n\t ModelAndView model = new ModelAndView(\"usersmanager\");\r\n\t \r\n\t //set of roles that exist (for the select)\r\n\t model.addObject(\"roles\",roles);\r\n\t \r\n\t \r\n\t //role of the actual user (to display or not deleted button)\r\n\t model.addObject(\"userrole\",role.getRole());\r\n\t \r\n\t //list of users with their role\r\n\t model.addObject(\"listUsers\", listUsers);\r\n\t model.addObject(\"listRoles\",listroles);\r\n\t \r\n\t model.setViewName(\"usersmanager\");\r\n\t\t\tmodel.addObject(\"projectId\",projectID);\r\n\t return model;\r\n\t }", "public String showUser(){\n String dataUser = \"\";\n for(int i = 0; i<MAX_USER; i++){\n if(user[i] != null){\n dataUser += user[i].showDataUser();\n }\n }\n return dataUser;\n }", "public String getAllUsers() {\n\t\tString s = \"\";\n\t\tSet<String> ids = usersList.keySet();\n\t\tfor (String userId : ids) {\n\t\t\ts += \"<b>UserId :</b> \" + userId + \"&nbsp<b> UserName : </b>\" + usersList.get(userId).getName()\n\t\t\t\t\t+ \"<b>&nbsp Profession :</b> \" + usersList.get(userId).getProfession() + \"<br><br>\";\n\t\t}\n\t\treturn s;\n\n\t}", "@Override\n\tpublic void output() {\n\t\tfor(User u :list) {\n\t\t\tif(list.size() > MIN_USER) {\n\t\t\t\tSystem.out.println(\"이름 : \"+u.getName());\n\t\t\t\tSystem.out.println(\"나이 : \"+u.getAge());\n\t\t\t\tSystem.out.println(\"주소 : \"+u.getAddr());\n\t\t\t\tSystem.out.println(\"=======================\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"입력된 정보가 없습니다.\");\n\t\t}", "public void addUser() {\n\t\tSystem.out.println(\"com.zzu.yhl.a_jdk addUser\");\r\n\t}", "public abstract Collection<RepositoryUser> getProjectMembers(KenaiProject kp) throws IOException;", "public List<String> getAvailableAssignees()\n {\n // TODO stefan an Rollen knüpfen\n final Matcher<String> m = new BooleanListRulesFactory<String>().createMatcher(\"admin/user/*\");\n final List<GWikiElementInfo> userInfos = wikiContext.getElementFinder()\n .getPageInfos(new GWikiPageIdMatcher(wikiContext, m));\n\n List<String> users = new ArrayList<String>();\n for (final GWikiElementInfo user : userInfos) {\n users.add(GWikiContext.getNamePartFromPageId(user.getId()));\n }\n return users;\n }", "List<User> getActivatedUserList();", "private static void displayUserMenu() {\n\t\tSystem.out.println(\"\\t User Menu Help \\n\" \n\t\t\t\t+ \"====================================\\n\"\n\t\t\t\t+ \"ar <reponame> : To add a new repo \\n\"\n\t\t\t\t+ \"dr <reponame> : To delete a repo \\n\"\n\t\t\t\t+ \"or <reponame> : To open repo \\n\"\n\t\t\t\t+ \"lr : To list repo \\n\"\n\t\t\t\t+ \"lo : To logout \\n\"\n\t\t\t\t+ \"====================================\\n\");\n\t}", "public Map<Long, User> showUsers() throws UserException {\n\t\treturn null;\r\n\t}", "protected void getUserList() {\n\t\tmyDatabaseHandler db = new myDatabaseHandler();\n\t\tStatement statement = db.getStatement();\n\t\t// db.createUserTable(statement);\n\t\tuserList = new ArrayList();\n\t\tsearchedUserList = new ArrayList();\n\t\tsearchedUserList = db.getUserList(statement);\n\t\tuserList = db.getUserList(statement);\n\t\tusers.removeAllElements();\n\t\tfor (User u : userList) {\n\t\t\tusers.addElement(u.getName());\n\t\t}\n\t}", "public void ShowAllUsers()\r\n {\r\n userList.forEach((s) -> { System.out.println(s); });\r\n }", "private static void multipleUsersExample()\t{\n\t}", "void getAllProjectList(int id, UserType userType);", "private RLabel getLicenseCurrentUsers() {\n if (licenseCurrentUsers == null) {\n licenseCurrentUsers = new RLabel();\n licenseCurrentUsers.setText(\"<%= ivy.cms.co(\\\"/Dialogs/about/licenseTotalUsers\\\") %>\");\n licenseCurrentUsers.setStyleProperties(\"{/insetsTop \\\"2\\\"}\");\n licenseCurrentUsers.setName(\"licenseCurrentUsers\");\n }\n return licenseCurrentUsers;\n }", "public void printByUser() {\r\n TUseStatus useStatus;\r\n\t for (int a=0; a < m_current_resources_count; a++)\r\n\t for (int b=0; b < m_current_users_count; b++) {\r\n\t useStatus = m_associations[a][b];\r\n\t if (useStatus!=null) System.out.println(useStatus.toString()); \r\n\t } \r\n }", "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 }", "private void displayUsers(List<User> users) {\n userAdapter.updateList(users);\n\n }", "@FXML\n protected void displayUsers(List<String> loggedUsers) {\n ObservableList<String> users = observableArrayList();\n users.addAll(loggedUsers);\n activeUsers.setItems(users);\n }", "public void displayUserInformations() {\n println(\"getLocation(): \"+user.getLocation());\n println(\"getFriendsCount(): \"+user.getFriendsCount());\n println(\"getFollowersCount(): \"+user.getFollowersCount());\n println(\"getDescription(): \"+user.getDescription());\n println(\"getCreatedAt() : \"+user.getCreatedAt() );\n println(\"getDescriptionURLEntities(): \"+user.getDescriptionURLEntities());\n println(\"getFavouritesCount() : \"+user.getFavouritesCount() );\n }", "@GET\n @Path(\"/listProjectUsersAsTable/{project_id}\")\n @Produces(MediaType.TEXT_HTML)\n public String getSystemUsers(@PathParam(\"project_id\") Integer projectId) {\n HttpSession session = request.getSession();\n\n if (session.getAttribute(\"projectAdmin\") == null) {\n // only display system users to project admins\n throw new ForbiddenRequestException(\"You are not an admin to this project\");\n }\n\n projectMinter p = new projectMinter();\n String response = p.listProjectUsersAsTable(projectId);\n p.close();\n return response;\n }", "boolean hasUserList();", "public String[] listUsers();", "@Override\r\n\tpublic void getAllUser() {\n\t\tSystem.out.println(users);\r\n\t\t\r\n\t}", "void add(User user) throws AccessControlException;", "public List<User> list(String currentUsername);", "public static void viewListOfRegistrants() {\n\t\tArrayList<Registrant> list_reg = getRegControl().listOfRegistrants();\r\n\t\tif (list_reg.size() == 0) {\r\n\t\t\tSystem.out.println(\"No Registrants loaded yet\\n\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"List of registrants:\\n\");\r\n\t\t\tfor (Registrant registrant : list_reg) {\r\n\t\t\t\tSystem.out.println(registrant.toString());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void addUser() {\n\t\t//check for the user limit, and if it is reached, return an error.\n\t\tif(!(users[users.length-1].equals(\"\"))) {\n\t\t\terror(USER_LIMIT_REACHED);\n\t\t\tProgramGUI.this.dispose();\n\t\t}\n\t\telse {\n\t\t\tProgramGUI.this.dispose();\n\t\t\tindex = nextUserIndex();\n\t\t\tframe = new JFrame(\"Adding user #\" + (index+1));\n\t\t\tframe.setSize(FRAME_WIDTH, FRAME_HEIGHT);\n\t\t\tframe.setLocationRelativeTo(null);\n\t\t\tframe.setDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\t\tJPanel panel = new JPanel();\n\t\t\tpanel.setLayout(new GridLayout(2, 2));\n\t\t\tpanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,10));\n\t\t\tpanel.add(new JLabel(\"Enter Username: \"));\n\t\t\tuser = new JTextField();\n\t\t\tpanel.add(user);\n\t\t\tpanel.add(new JLabel(\"Enter Password: \"));\n\t\t\tpass = new JPasswordField();\n\t\t\tpanel.add(pass);\n\t\t\tframe.add(panel, BorderLayout.NORTH);\n\t\t\tJPanel button = new JPanel();\n\t\t\tJButton ok = new JButton(\"Confirm User\");\n\t\t\tok.addActionListener(new AddListener());\n\t\t\tJButton cancel = new JButton(\"Cancel\");\n\t\t\tcancel.addActionListener(new ButtonListener());\n\t\t\tbutton.add(ok);\n\t\t\tbutton.add(cancel);\n\t\t\tframe.add(button, BorderLayout.SOUTH);\n\t\t\tframe.setVisible(true);\n\t\t}\n\t}", "public boolean hasUser(){\n return numUser < MAX_USER;\n }", "public List<User> getUserList();", "void add_collab_prnc() {\n\t\ttry {\n\t\t\tjdbc.setConnection();\n\t\t\tStatement stm=jdbc.setConnection().createStatement();\n\t\t\tString strcheck=\"select id from utilisateur where username=\"+'\"'+login_class.UsernameLog+'\"';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\tResultSet res = stm.executeQuery(strcheck);\n\t\t\t\n\t\t\t\n\t\t\twhile (res.next()) {\n\t\t\t\tsimple_users_select_list_id.add(res.getInt(\"id\"));\n\t\t\t}\n\t\t\tjdbc.setConnection().close();\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}", "public static void add() {\n Application.currentUserCan( 1 );\n render();\n }", "private void updateUserList() {\n\t\tUser u = jdbc.get_user(lastClickedUser);\n\t\tString s = String.format(\"%s, %s [%s]\", u.get_lastname(), u.get_firstname(), u.get_username());\n\t\tuserList.setElementAt(s, lastClickedIndex);\n\t}", "public List<Person> UserSelect() {\n\t\t System.out.println(\"UserSelect\");\n\t\t return personDAO.getPersons();\n\t}", "private void addUserAsMarker() {\n firestoreService.findUserById(new OnUserDocumentReady() {\n @Override\n public void onReady(UserDocument userDocument) {\n if(userDocument != null && userDocument.getUserid().equals(preferences.get(\"user_id\",0L))) {\n String id = preferences.get(DOCUMENT_ID, \"\");\n //Add current user to ListInBounds\n userDocumentAll.setDocumentid(id);\n userDocumentAll.setUsername(userDocument.getUsername());\n userDocumentAll.setPicture(userDocument.getPicture());\n userDocumentAll.setLocation(userDocument.getLocation());\n userDocumentAll.setFollowers(userDocument.getFollowers());\n userDocumentAll.setIsvisible(userDocument.getIsvisible());\n userDocumentAll.setIsprivate(userDocument.getIsprivate());\n userDocumentAll.setIsverified(userDocument.getIsverified());\n userDocumentAll.setUserid(userDocument.getUserid());\n userDocumentAll.setToken(userDocument.getToken());\n oneTimeAddableList.add(userDocumentAll);\n }\n }\n\n @Override\n public void onFail() {\n\n }\n\n @Override\n public void onFail(Throwable cause) {\n\n }\n });\n\n }", "public List<User> getEnabledUsers();", "@Override\r\n\tpublic Utilisateur addUser() {\n\t\treturn null;\r\n\t}", "public ListOfUsers() {\n initComponents();\n }", "public static void userDisplay() {\n\n String nameList = \" | \";\n for (String username : students.keySet()) {\n nameList += \" \" + username + \" | \";\n\n\n }\n System.out.println(nameList);\n// System.out.println(students.get(nameList).getGrades());\n\n }", "List<Project> findProjectsOfAccount(String username);", "public List getAllUsers();", "public void displayUSerList(List<User> userList) {\n for (User currentUser : userList) {\n String userInfo = \"\"; \n \n userInfo = currentUser.getUserId()+\" \"+currentUser.getName();\n for(String s : currentUser.getBorrowedItem()){\n userInfo = userInfo + s; \n }\n \n\n\n\n io.print(userInfo);\n }\n io.readString(\"Please hit enter to continue.\");\n }", "void printUsers() {\n if (server.hasUsers()) {\n writer.println(\"Connected users: \" + server.getUserNames());\n } else {\n writer.println(\"No other users connected\");\n }\n }", "private void displayUserInfo(String name) {\n\t\tString username = null;\n\t\tPattern p = Pattern.compile(\"\\\\[(.*?)\\\\]\");\n\t\tMatcher m = p.matcher(name);\n\t\tif (m.find())\n\t\t{\n\t\t username = m.group(1);\n\t\t lastClickedUser = username;\n\t\t}\n\t\tUser u = jdbc.get_user(username);\n\t\ttextFirstName.setText(u.get_firstname());\n\t\ttextLastName.setText(u.get_lastname());\n\t\ttextUsername.setText(u.get_username());\n\t\tif (u.get_usertype() == 1) {\n\t\t\trdbtnAdminDetails.setSelected(true);\n\t\t} else if (u.get_usertype() == 2) {\n\t\t\trdbtnManagerDetails.setSelected(true);\n\t\t} else {\n\t\t\trdbtnWorkerDetails.setSelected(true);\n\t\t}\n\t\tif (u.get_email() != null) {textEmail.setText(u.get_email());} else {textEmail.setText(\"No Email Address in Database.\");}\n\t\tif (u.get_phone() != null) {textPhone.setText(u.get_phone());} else {textPhone.setText(\"No Phone Number in Database.\");}\t\t\t\t\n\t\tcreateQualLists(u.get_userID());\n\t}", "public Vector getEditUsers() {\n\t\treturn m_vtUsersEdit;\n\t}", "public void makeCurrentUser() {\n // Remove the Add Friend ImageView\n mFriendIv.setVisibility(View.GONE);\n\n // Show the \"You\" TextView\n mYouTv.setVisibility(View.VISIBLE);\n }", "public String add() {\r\n\t\tuserAdd = new User();\r\n\t\treturn \"add\";\r\n\t}", "@Override\n\tpublic List<ReProjectUser> selectReProjectUserInfo(int projectId) {\n\t\treturn reProjectUserDAO.selectReProjectUserInfo(projectId);\n\t}", "public Collection<String> getUsers() {\r\n \t\tCollection<String> users = new TreeSet<>();\r\n \t\tusers.addAll(this.dataLayer.getUser());\r\n \r\n \t\treturn users;\r\n \t}", "@RequestMapping(value=\"/admin/viewAllUsers.htm\", method=RequestMethod.GET)\n public String viewAllUsers(Model model) {\n \tList<User> userList = dao.getAllUsers();\n \t//Create user list categories\n \tList<User> pendingUsers = new ArrayList<User>();\n \tList<User> basicUsers = new ArrayList<User>();\n \tList<User> adminUsers = new ArrayList<User>();\n \t//Add users to lists\n \tfor(User user: userList){\n \t\tSet<UserRole> roles = user.getRoles();\n \t\tif(roles.isEmpty()){\n \t\t\tpendingUsers.add(user);\n \t\t}else{\n \t\t\tboolean isAdmin = false;\n \t\t\tfor(UserRole role:roles){\n \t\t\t\t//admins only shown in admin list\n \t\t\t\tif(role.getAuthority().equals(UserRole.ROLE_ADMIN)){\n \t\t\t\t\tisAdmin = true;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif(isAdmin){\n\t\t\t\t\tadminUsers.add(user);\n\t\t\t\t}else{\n\t\t\t\t\tbasicUsers.add(user);\n\t\t\t\t}\n \t\t}\n \t}\n \t\n model.addAttribute(\"pendingUsers\", pendingUsers);\n model.addAttribute(\"basicUsers\", basicUsers);\n model.addAttribute(\"adminUsers\", adminUsers);\n \t\n return \"admin/all-users\";\n }", "boolean hasSelectedUser();", "public adminUsuarios() {\n initComponents();\n showUsuarios();\n }", "public void initUsers() {\n User user1 = new User(\"Alicja\", \"Grzyb\", \"111111\", \"grzyb\");\n User user2 = new User(\"Krzysztof\", \"Kowalski\", \"222222\", \"kowalski\");\n User user3 = new User(\"Karolina\", \"Nowak\", \"333333\", \"nowak\");\n User user4 = new User(\"Zbigniew\", \"Stonoga \", \"444444\", \"stonoga\");\n User user5 = new User(\"Olek\", \"Michnik\", \"555555\", \"michnik\");\n users.add(user1);\n users.add(user2);\n users.add(user3);\n users.add(user4);\n users.add(user5);\n }", "public List<User> list();", "private static void displayUserTeam() {\n\t\tif (game.getCurrentRound()==1) {\n\t\t\tfor (int i = 0; i<11; i++) {\n\t\t\t\tplayerNameArray[i].setText(\"Name\");\n\t\t\t\timageArray[i].setIcon(MainGui.getShirt(\"noTeam\"));\n\t\t\t\tbuttonArray[i].setText(\"+\");\n\t\t\t}\n\t\t}\n\t}", "@GetMapping\n public String displayUser(Model model) {\n User newUser = new User(\"Sven Svennis\",\"Svennegatan 2\", new ArrayList<Loan>());\n userRepository.save(newUser);\n\n //TODO this is where we need to fetch the current user instead!\n User user = userRepository.getOne(1l);\n\n model.addAttribute(\"user\", user);\n\n return \"displayUser\";\n }", "@RequestMapping(value={\"/projects\"}, method= RequestMethod.GET)\r\n\tpublic String myOwnedProjects(Model model) {\r\n\t\tUser loggedUser= sessionData.getLoggedUser();\r\n\t\tList<Project> projectsList= this.projectService.retrieveProjectsOwnedBy(loggedUser);\r\n\t\tmodel.addAttribute(\"loggedUser\", loggedUser);\r\n\t\tmodel.addAttribute(\"projectsList\", projectsList);\r\n\t\treturn \"projects\";\r\n\t\t\r\n\t}", "public void testManageUsersForWorkspace()\n {\n open(\"/xwiki/bin/view/Main/\");\n clickLinkWithXPath(\"//a[@href='/xwiki/bin/view/XWiki/XWikiPreferences?section=Users']\", true);\n\n // moving user - Jean Valjean\n // 1.to power users\n assertElementPresent(\"//tr[@id='table1_line_XWiki.JeanValjean']\");\n clickLinkWithXPath(\"//a[@id='a11_XWiki.JeanValjean']\", false);\n assertElementPresent(\"//tr[@id='table2_line_XWiki.JeanValjean']\");\n clickLinkWithXPath(\"//a[text()='Click here to save your selection']\");\n\n // 2.to global admin\n assertElementPresent(\"//tr[@id='table2_line_XWiki.JeanValjean']\");\n clickLinkWithXPath(\"//a[@id='a21_XWiki.JeanValjean']\", false);\n assertElementPresent(\"//tr[@id='table3_line_XWiki.JeanValjean']\");\n clickLinkWithXPath(\"//a[text()='Cancel']\");\n\n // 3.to simple users\n assertElementPresent(\"//tr[@id='table2_line_XWiki.JeanValjean']\");\n clickLinkWithXPath(\"//a[@id='a22_XWiki.JeanValjean']\", false);\n assertElementPresent(\"//tr[@id='table1_line_XWiki.JeanValjean']\");\n clickLinkWithXPath(\"//a[text()='Click here to save your selection']\");\n }", "List<UserDisplayDto> findeAdmins();", "public String toString () {\n\t\treturn \"User, name = \" + this.getName() + \" id = \" + this.getId();\n \t}", "@Override\r\n\tpublic List listAllUser() {\n\t\treturn userDAO.getUserinfoList();\r\n\t}", "public void addUser() {\n\t\tthis.users++;\n\t}", "public UserList list();", "@Override\n public BlueUserContainer getUsers() {\n return users;\n }", "@GetMapping(\"/userTasks\")\n\tResponseEntity getUserTasks() {\n\t\tString username = this.tokenUtils.getUsernameFromToken(this.httpServletRequest.getHeader(\"X-Auth-Token\"));\n\t\tSystem.out.println(\"Trazim taskove za: \" + username);\n\t\tfinal List<TaskDto> tasks = rspe.getTasks(null, username);\n\t\tSystem.out.println(\"User ima : \" + tasks.size() + \" taskova\");\n\n\t\treturn ResponseEntity.ok(tasks);\n\n\t}", "public List getOwnerUsersList(Map map) {\n\t String currentUser = UserUtil.getCurrentPrincipalUser();\r\n\t\t List ls = (List)map.get(currentUser);\r\n//\t\t System.out.println(\"map.size()\"+currentUser) ;\r\n//\t\t System.out.println(map.size()) ;\r\n\t\treturn ls;\r\n\t}" ]
[ "0.6559735", "0.6208146", "0.6187482", "0.61725456", "0.6153348", "0.6120819", "0.6106377", "0.6095992", "0.60829264", "0.6077365", "0.60420734", "0.5951997", "0.5951274", "0.5949404", "0.5943333", "0.5936742", "0.5917505", "0.5908421", "0.59075946", "0.5892347", "0.5884686", "0.58825886", "0.58705086", "0.5857455", "0.5816708", "0.58158636", "0.57887423", "0.5773536", "0.5754992", "0.57229996", "0.5714012", "0.57134753", "0.5696906", "0.56910074", "0.56902367", "0.56860167", "0.56805664", "0.56758094", "0.56705254", "0.56561553", "0.5645803", "0.56413186", "0.56393087", "0.56387925", "0.5619429", "0.5618644", "0.5608911", "0.5597685", "0.5586971", "0.5580375", "0.55793697", "0.55743283", "0.5552612", "0.5551772", "0.5543577", "0.5537698", "0.5536506", "0.5530267", "0.5530018", "0.5524516", "0.55181503", "0.5516391", "0.55105007", "0.5486795", "0.54823434", "0.5464163", "0.54637825", "0.5454131", "0.54474115", "0.54423773", "0.54401445", "0.54298395", "0.54114485", "0.5410283", "0.54096353", "0.5409307", "0.54060453", "0.5405076", "0.5403716", "0.5395353", "0.53904784", "0.53880125", "0.5386791", "0.5383823", "0.53742445", "0.53732157", "0.53679717", "0.5366154", "0.53638405", "0.53610563", "0.5350848", "0.5347071", "0.5345057", "0.53420645", "0.5340927", "0.5335841", "0.5334127", "0.5329864", "0.5327327", "0.53216326", "0.5317639" ]
0.0
-1
add a user to the project if it doesn't exist
@RequestMapping(value="/{projectId}/adduser", method=RequestMethod.POST) @ResponseBody @PreAuthorize("@userRoleService.isManager(#projectID)") public User adduser(@RequestParam String username, @PathVariable("projectId") int projectID, Role role){ User user = usersDAO.getUserByUsername(username); Project project=projectDAO.getProjectById(projectID); if(!(roleDAO.getProjectIDByUser(user)!=null &&roleDAO.getProjectIDByUser(user).contains(project))){ role.setUser(user); roleDAO.createRole(user, project,"DEVELOPER"); if(roleDAO.getProjectIDByUser(user).contains(project)){ return user; } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addUser() {\n\t\tUser user = dataManager.findCurrentUser();\r\n\t\tif (user != null) {\r\n\t\t\tframeManager.addUser(user);\r\n\t\t\tpesquisar();\r\n\t\t} else {\r\n\t\t\tAlertUtils.alertSemPrivelegio();\r\n\t\t}\r\n\t}", "public void addUser(User user) {\n\t\t\r\n\t}", "void addUser(Username username) throws UserAlreadyExistsException;", "public void addUser() {\n\t\tSystem.out.println(\"com.zzu.yhl.a_jdk addUser\");\r\n\t}", "public boolean addUser(User user) {\n\t\treturn false;\r\n\t}", "void addToMyProjects(String userId,\n String projectGUID) throws InvalidParameterException,\n PropertyServerException,\n UserNotAuthorizedException;", "@Override\r\n\tpublic boolean addNewUser(User user) {\n\t\treturn false;\r\n\t}", "@Override\n\tpublic boolean addNewUser() {\n\t\treturn false;\n\t}", "void addUser(User user);", "void addUser(User user);", "@Override\r\n\tpublic Utilisateur addUser() {\n\t\treturn null;\r\n\t}", "public void addUser(User user);", "void addUser(String parUsername, String parGroup)\n {\n if (getUserGroup(parUsername) == null)\n {\n users.put(parUsername, parGroup);\n }\n }", "public void addUser() {\n\t\tthis.users++;\n\t}", "void add(User user) throws AccessControlException;", "public Boolean addUser(User user) throws ApplicationException;", "public String addUser() {\n\t\t\t\treturn null;\r\n\t\t\t}", "public eu.aladdin_project.xsd.User addNewUser()\n {\n synchronized (monitor())\n {\n check_orphaned();\n eu.aladdin_project.xsd.User target = null;\n target = (eu.aladdin_project.xsd.User)get_store().add_element_user(USER$0);\n return target;\n }\n }", "public void addUser(User user){\r\n users.add(user);\r\n }", "public void register(User user) {\n\t\tboolean exists = false ;\n\t\tfor ( User currentUser : users )\n\t\t\tif ( currentUser.getId().equals(user.getId()) )\n\t\t\t\texists = true ;\n\t\tif ( !exists ) {\n\t\t\taddUser(user) ;\n\t\t\tSystem.out.println(\"[USER CREATED]\") ;\n\t\t\tSystem.out.println() ;\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"[INVALID ACTION] User Already Exists\") ;\n\t\t\tSystem.out.println() ;\n\t\t}\n\t}", "private void checkForUser(){\n if(mUserId != -1){\n return;\n }\n\n if(mPreferences == null) {\n getPrefs();\n }\n\n mUserId = mPreferences.getInt(USER_ID_KEY, -1);\n\n if(mUserId != -1){\n return;\n }\n\n //do we have any users at all?\n List<User> users = mUserDAO.getAllUsers();\n if(users.size() <= 0 ){\n User defaultUser = new User(\"din_djarin\",\"baby_yoda_ftw\");\n mUserDAO.insert(defaultUser);\n }\n }", "public void newUser(User user) {\n users.add(user);\n }", "@Override\n public boolean addUser(User user) {\n return controller.addUser(user);\n }", "private String createUser(String name) {\n\t\treturn null;\n\t}", "public User addUser(User user) {\n\t\treturn null;\r\n\t}", "private int addLinuxUser(int userId, String username, String email, Set<Entry<Integer, String>> projectSet)\r\n\t{\n\t\tResetPasswordAndSendEmailImpl sendEmail = new ResetPasswordAndSendEmailImpl();\r\n\t\tint userDirAdded = sendEmail.createUserDirectories(username);\r\n\t\tif(userDirAdded == 0)\r\n\t\t{\r\n\t\t\taddUserProjects(userId, username, projectSet);\r\n\t \tsendEmail.resetAndEmail(userId, username, email);\r\n\t\t}\r\n\t\treturn userDirAdded;\t\t\r\n\t}", "Boolean registerNewUser(User user);", "public void addToFile(User newUser){\r\n //If the user name is not already in the file then we do not want to re-add the user.\r\n if (f.searchForUsername(newUser.getUsername()) == -1) {\r\n newUser.setPassword(encrypt(newUser.getPassword()));\r\n f.write(newUser);\r\n } else {\r\n System.err.println(\"User already exists\");\r\n }\r\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 }", "public static void addUser(String name)\n {\n userList.add(name);\n }", "private void addUser(People value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureUserIsMutable();\n user_.add(value);\n }", "public void addUser(UserModel user);", "public void addUser(String u, String p) {\n \t//users.put(\"admin\",\"12345\");\n users.put(u, p);\n }", "public void createUser(User user) {\n\n\t}", "public void addUserUI() throws IOException {\n System.out.println(\"Add user: id;surname;first name;username;password\");\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String line = reader.readLine();\n String[] a = line.split(\";\");\n User user = new User(a[1], a[2], a[3], a[4], \" \");\n user.setId(Long.parseLong(a[0]));\n try\n {\n User newUser = service.addUser(user);\n if(newUser != null)\n System.out.println(\"ID already exists for \" + user.toString());\n else\n System.out.println(\"User added successfully!\");\n }\n catch (ValidationException ex)\n {\n System.out.println(ex.getMessage());\n }\n catch (IllegalArgumentException ex)\n {\n System.out.println(ex.getMessage());\n }\n }", "@SuppressWarnings({ \"unchecked\", \"unused\" })\n\tprivate void addUser(TextField nameField, TextField passwordField) {\n\t\t\n\t\tString name = nameField.getText();\n\t\tString password = passwordField.getText();\n\t\tname.trim();\n\t\tpassword.trim();\n\t\t\n\t\tif(name.isEmpty()) {\n\t\t\tAlertMe alert = new AlertMe(\"You must enter a user name!\");\n\t\t}\n\t\telse if(password.isEmpty()) {\n\t\t\tAlertMe alert = new AlertMe(\"You must enter a user password!\");\n\t\t}\n\t\telse if(admin == null) {\n\t\t\tAlertMe alert = new AlertMe(\"You must select an account type!\");\n\t\t}\n\t\telse {\n\t\t\tArrayList<Student> students = JukeBox.getUsers();\n\t\t\t\n\t\t\tif(JukeBox.locateUser(name) != -1) {\n\t\t\t\tAlertMe alert = new AlertMe(\"User \" + name + \" already exists!\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tStudent newStudent;\n\t\t\t\tif(admin) {\n\t\t\t\t\tnewStudent = new Student(name, password, true);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tnewStudent = new Student(name, password, false);\n\t\t\t\t}\n\t\t\t\tstudents.add(newStudent);\n\t\t\t\t\n\t\t\t\tnameField.setText(\"\");\n\t\t\t\tpasswordField.setText(\"\");\n\t\t\t\t\n\t\t\t\tusers.setItems(null); \n\t\t\t\tusers.layout(); \n\n\t\t\t\tObservableList<Student> data = FXCollections.observableArrayList(JukeBox.getUsers());\n\t\t\t\tusers.setItems(data);\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic void add(User user) {\n\r\n\t}", "public void addAccount(String user, String password);", "@Test(groups = \"user\", priority = 1)\n public void testUserAdd() throws ExecutionException, InterruptedException {\n this.authDisabledAuthClient.userAdd(root, rootPass).get();\n this.authDisabledAuthClient.userAdd(user, userPass).get();\n }", "@Override\r\n\tpublic User addUser(User user) {\n\t\treturn userReposotory.save(user);\r\n\t}", "public void addUserBtn(){\n\t\t\n\t\t// TODO: ERROR CHECK\n\t\t\n\t\tUserEntry user = new UserEntry(nameTF.getText(), (String)usertypeCB.getValue(), emailTF.getText());\n\t\tAdminController.userEntryList.add(user);\n\t\t\n\t\t\n\t\t// Create a UserEntry and add it to the observable list\n\t\tAdminController.userList.add(user);\t\t\n\t\t\n\t //AdminController.adminTV.setItems(AdminController.userList);\n\t\t\n\t\t//Close current stage\n\t\tAdminController.addUserStage.close();\n\t\t\n\t}", "void addUser(String uid, String firstname, String lastname, String pseudo);", "public void addUser(String name)\r\n\t{\r\n\t\tperson= new User(name);\r\n\t\tusers.put(name, person);\r\n\t}", "@Override\n\tpublic void addNewUser(User user) {\n\t\tusersHashtable.put(user.getAccount(),user);\n\t}", "private void addUser(\n int index, People value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureUserIsMutable();\n user_.add(index, value);\n }", "public boolean addUser(User newUser){\n try {\n if (searchUserInCourse(newUser)) {\n throw new Exception();\n }\n\n getUserListInCourse().add(newUser);\n return true;\n } catch (Exception exception) {\n System.err.println(\"This user already exists!\");\n return false;\n\n }\n\n }", "void registerUser(User newUser);", "public eu.aladdin_project.storagecomponent.CreateUserDocument.CreateUser addNewCreateUser()\n {\n synchronized (monitor())\n {\n check_orphaned();\n eu.aladdin_project.storagecomponent.CreateUserDocument.CreateUser target = null;\n target = (eu.aladdin_project.storagecomponent.CreateUserDocument.CreateUser)get_store().add_element_user(CREATEUSER$0);\n return target;\n }\n }", "public void setExistingUser(boolean isExistingUser) {\r\n this.isExistingUser = isExistingUser;\r\n }", "public User addUser(User user) {\n Boolean isExistingUser = users.stream()\n .map(User::getUserid)\n .anyMatch(user.getUserid()::equals);\n\n if (isExistingUser) {\n throw new IllegalArgumentException(user.getUserid() + \" user id already exists\");\n } else {\n user.setId(UUID.randomUUID().toString());\n users.add(user);\n return user;\n }\n }", "@Override\r\n\tpublic boolean createUser(Utilisateur u) {\n\t\treturn false;\r\n\t}", "@Override\n\tpublic User addUser(User user) {\n\t\treturn userDatabase.put(user.getEmail(), user);\n\t}", "public void setupUser() {\n }", "public void addUser(User user) {\n\t\tSystem.out.println(\"adding user :\"+user.toString());\n\t\tuserList.add(user);\n\t}", "private boolean addUser(User user) {\r\n\t\tthis.storer.storeUser(user);\r\n\t\tmapping.put(user.getUsername(), user);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean addUser(user user) {\n\t\tif(userdao.insert(user)==1){\r\n\t\t\treturn true;}else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t}", "public void addUser(User tmpUser, User user) {\n\t\t\n\t}", "private boolean checkNameExistAdd(String userName) {\n\n\t\tUser user = this.userDAO.getUserByName(userName);\n\t\tif (null != user) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "@Override\n\tpublic void add(User user) throws UserAlreadyExistsException {\n\t\tOptional<User> op = userRepo.findById(user.getUsername());\n\t\tif(op.isPresent()) {\n\t\t\tthrow new UserAlreadyExistsException(\"Sorry! User with username \"+ user.getUsername()+ \" Already Exists\");\n\t\t}\n\t\telse {\n\t\t\tuserRepo.save(user);\n\t\t}\n\t}", "private void addNewUser(User user) {\n\t\tSystem.out.println(\"BirdersRepo. Adding new user to DB: \" + user.getUsername());\n\t\tDocument document = Document.parse(gson.toJson(user));\n\t\tcollection.insertOne(document);\n\t}", "@Test\n\tpublic void testAddUser() throws IOException, InvalidUserException{\n\t\tassertFalse(Model.addUserName(username));\n\t}", "public void addUser(User user) {\n\t\tuserList.addUser(user);\n\t}", "@Override\r\n\tpublic String addUser(taskPojo addUser,HttpServletRequest request, HttpServletResponse response) {\n\t\treturn dao.addUser(addUser,request,response);\r\n\t}", "boolean addUser(int employeeId, String name, String password, String role);", "public void addUser(String userId) {\n addUser(new IndividualUser(userId));\n }", "void addDeveloper(long id, String emailDev, String emailCreatedBy) throws ProjectException, CustomUserException;", "public void newUser(User user);", "public void addUserToFirestore() {\n if (isSignedIn()) {\n getUserTask().addOnCompleteListener(\n new OnCompleteListener<DocumentSnapshot>()\n {\n @Override\n public void onComplete(@NonNull Task<DocumentSnapshot> task) {\n if (task.isSuccessful() && !task.getResult().exists()) {\n setUser(userMap(false));\n setAnalysis(analysisMap(new ArrayList<String>()));\n setSlouches(slouchMap(new ArrayList<Date>(), new ArrayList<Double>()));\n }\n }\n });\n }\n }", "@Override\n public TechGalleryUser addUser(final TechGalleryUser user) throws BadRequestException {\n if (!userDataIsValid(user)) {\n throw new BadRequestException(i18n.t(\"User's email cannot be blank.\"));\n } else {\n userDao.add(user);\n UserProfileServiceImpl.getInstance().createProfile(user);\n return user;\n }\n }", "@Override\n\tpublic void linkProjectWithUser(ProjectCreate project, String role,User user) {\n\t\tprojectDao.linkProjectWithUser(project, role,user);\n\t}", "@POST\n @Path(\"/addUser\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response addUser(@FormParam(\"project_id\") Integer projectId,\n @FormParam(\"user_id\") Integer userId) {\n HttpSession session = request.getSession();\n Object username = session.getAttribute(\"user\");\n\n // userId of 0 means create new user, using ajax to create user, shouldn't ever receive userId of 0\n if (userId == 0) {\n throw new BadRequestException(\"invalid userId\");\n }\n\n\n if (username == null) {\n throw new UnauthorizedRequestException(\"You must login to access this service.\");\n }\n database db = new database();\n Integer lodedInUserId = db.getUserId(username.toString());\n db.close();\n\n projectMinter p = new projectMinter();\n if (!p.userProjectAdmin(lodedInUserId, projectId)) {\n p.close();\n throw new ForbiddenRequestException(\"You are not this project's admin\");\n }\n p.addUserToProject(userId, projectId);\n p.close();\n\n return Response.ok(\"{\\\"success\\\": \\\"User has been successfully added to this project\\\"}\").build();\n }", "User addUser(IDAOSession session, String fullName, String userName,\n\t\t\tString password);", "void createUser(User newUser, String token) throws AuthenticationException, InvalidUserException, UserAlreadyExistsException;", "public void createUser(User user);", "ResponseMessage addUser(User user);", "@Override\n\tpublic void addUser(User user) {\n mapper.addUser(user);\n\t}", "public void testGetProjectByNameUserRole() throws Exception {\r\n ProjectServiceRemote projectService = lookupProjectServiceRemoteWithUserRole();\r\n\r\n ProjectData projectData = new ProjectData();\r\n projectData.setName(\"project1\");\r\n projectData.setDescription(\"Hello\");\r\n\r\n projectService.createProject(projectData);\r\n\r\n // 1 is the user id\r\n ProjectData pd = projectService.getProjectByName(\"project1\", 1);\r\n\r\n assertNotNull(\"null project data received\", pd);\r\n }", "@Override\n\tpublic String addUser(Map<String, Object> reqs) {\n\t\treturn null;\n\t}", "@Override\n\tpublic int AddUser(UserBean userbean) {\n\t\treturn 0;\n\t}", "@Test\n\tpublic void testAddUser() {\n\t\tresetTestVars();\n\t\tuser1.setID(\"1\");\n\t\tuser2.setID(\"1\");\n\t\tassertFalse(\"User is invalid\", sn.addUser(user3));\n\t\tassertTrue(\"User is valid\", sn.addUser(user1));\n\t\tassertFalse(\"Same user cant be added\", sn.addUser(user1));\n\t\tassertFalse(\"ID already exists\", sn.addUser(user2));\n\t}", "public boolean add(User user)\n\t\t{\n\t\t\t\treturn users.add(user);\n\t\t}", "@Override\r\n\tpublic int addUser(User user) {\n\t\treturn userMapper.addUser(user);\r\n\t}", "public void Adduser(User u1) {\n\t\tUserDao ua=new UserDao();\n\t\tua.adduser(u1);\n\t\t\n\t}", "private void addUser(\n People.Builder builderForValue) {\n ensureUserIsMutable();\n user_.add(builderForValue.build());\n }", "public void addUser(String userName) throws Exception {\r\n try {\r\n if (users.size() < MAX_USERS) {\r\n for (int i = 0; i < users.size(); i++) {\r\n if (users.get(i).getUserName().equalsIgnoreCase(userName) && users.get(i) != null)\r\n throw new Exception(\"Error: Name Already Exist\");\r\n }\r\n users.add(new User(userName, users.size(), users.size() + 1));\r\n } else throw new Exception(\"Error: Reached Maximum User Capacity\");\r\n } catch (Exception e) {\r\n System.out.println(e);\r\n }\r\n }", "void addUser(String page, String userId, String uid);", "void addUserpan(String userid,String username,String userpwd);", "@Override\n\tpublic ResponseEntity<String> addUser() {\n\t\treturn null;\n\t}", "private static ErrorType handleAddUser(String username) {\n\t\tif (VersionControlDb.addUser(username) != null) {\n\t\t\treturn ErrorType.SUCCESS;\n\t\t}\n\t\telse {\n\t\t\treturn ErrorType.USERNAME_ALREADY_EXISTS;\n\t\t}\n\t}", "@Override\n\tpublic void addPerson(User pUser) {\n\t\t\n\t}", "private void register_user() {\n\n\t\tHttpRegister post = new HttpRegister();\n\t\tpost.execute(Config.URL + \"/api/newuser\");\n\n\t}", "@Test (priority = 0)\n public void test001createUserWithUserNameOnlyTest() {\n close();\n login();\n\n checkLoginIsPerformed();\n //create user with filled user name only\n createUser(SIMPLE_USER_NAME, new HashMap<String, String>());\n checkOperationStatusOk(\"Save (GUI)\");\n\n //search for the created in users list\n searchForElement(SIMPLE_USER_NAME);\n $(By.linkText(SIMPLE_USER_NAME)).shouldBe(visible).click();\n }", "private void setCreateUser(entity.User value) {\n __getInternalInterface().setFieldValue(CREATEUSER_PROP.get(), value);\n }", "public void addUser() {\r\n PutItemRequest request = new PutItemRequest().withTableName(\"IST440Users\").withReturnConsumedCapacity(\"TOTAL\");\r\n PutItemResult response = client.putItem(request);\r\n }", "void addNewUser(User user, int roleId) throws DAOException;", "public void signup(View view){\r\n if(editText1.getText().toString().isEmpty()||editText2.getText().toString().isEmpty()||editText3.getText().toString().isEmpty()\r\n ||editText4.getText().toString().isEmpty()||editText5.getText().toString().isEmpty()){\r\n Toast.makeText(this, \"Παρακαλώ εισάγετε όλα τα απαραίτητα πεδία προκειμένου να εγγραφείτε.\", Toast.LENGTH_SHORT).show();\r\n }\r\n else{\r\n mAuth.createUserWithEmailAndPassword(editText1.getText().toString(), editText2.getText().toString())\r\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\r\n @Override\r\n public void onComplete(@NonNull Task<AuthResult> task) {\r\n\r\n if (task.isSuccessful()) {\r\n new_user = mAuth.getCurrentUser();\r\n create_users_list(new_user.getUid());\r\n String userid=new_user.getUid();\r\n String firstname=editText3.getText().toString();\r\n String lastname=editText4.getText().toString();\r\n String address=editText5.getText().toString();\r\n SharedPreferences.Editor editor=pref.edit();\r\n editor.putString(userid+\"firstname\",firstname);\r\n editor.putString(userid+\"lastname\",lastname);\r\n editor.putString(userid+\"address\",address);\r\n editor.apply();\r\n Intent intent = new Intent(getApplicationContext(), MainActivity3.class);\r\n intent.putExtra(\"userid\", new_user.getUid());\r\n\r\n startActivity(intent);\r\n\r\n\r\n } else {\r\n Toast.makeText(getApplicationContext(), task.getException().getMessage(),\r\n Toast.LENGTH_SHORT).show();\r\n\r\n }\r\n }\r\n }\r\n );}}", "public void addUser() throws AccountException {\n System.out.println(\"----------------- Add User -----------------\");\n System.out.print(\"Account: \");\n String username = this.checkUsername(); // Call method to check input of username\n\n System.out.print(\"Password: \");\n String password = this.checkEmpty(\"Password\"); // Call method to check input of password\n\n System.out.print(\"Name: \");\n String name = this.checkEmpty(\"Name\"); // Call method to check input of name\n\n System.out.print(\"Phone: \");\n String phone = this.checkPhone(); // Call method to check nput of phone\n\n System.out.print(\"Email: \");\n String email = this.checkEmail(); // Call method to check input of email\n\n System.out.print(\"Address: \");\n String address = this.checkEmpty(\"Address\"); // Call method to check input of address\n\n System.out.print(\"DOB: \");\n Date dob = this.checkDate(); // Call method to check input of dob\n\n // Add new user and print success if created\n this.addUser(username, password, name, phone, email, address, dob);\n System.out.println(\"Create account success.\");\n }", "private void createAccount()\n {\n // check for blank or invalid inputs\n if (Utils.isEmpty(edtFullName))\n {\n edtFullName.setError(\"Please enter your full name.\");\n return;\n }\n\n if (Utils.isEmpty(edtEmail) || !Utils.isValidEmail(edtEmail.getText().toString()))\n {\n edtEmail.setError(\"Please enter a valid email.\");\n return;\n }\n\n if (Utils.isEmpty(edtPassword))\n {\n edtPassword.setError(\"Please enter a valid password.\");\n return;\n }\n\n // check for existing user\n AppDataBase database = AppDataBase.getAppDataBase(this);\n User user = database.userDao().findByEmail(edtEmail.getText().toString());\n\n if (user != null)\n {\n edtEmail.setError(\"Email already registered.\");\n return;\n }\n\n user = new User();\n user.setId(database.userDao().findMaxId() + 1);\n user.setFullName(edtFullName.getText().toString());\n user.setEmail(edtEmail.getText().toString());\n user.setPassword(edtPassword.getText().toString());\n\n database.userDao().insert(user);\n\n Intent intent = new Intent(this, LoginActivity.class);\n intent.putExtra(\"user\", user);\n startActivity(intent);\n }", "public boolean addUser(UserDTO user);", "public void onClickcreateUserSignup(View view){\n\n String newName = ((EditText)findViewById(R.id.createUserUsername)).getText().toString();\n if(!newName.equals(\"\")) {\n Account.getInstance().setName(newName);\n\n SharedPreferences settings = getSharedPreferences(Utils.ACCOUNT_PREFS, 0);\n SharedPreferences.Editor editor = settings.edit();\n editor.putString(\"accountName\", newName);\n editor.commit();\n\n startActivity(new Intent(this, MainActivity.class));\n }\n }" ]
[ "0.6699345", "0.65093225", "0.6499633", "0.64822614", "0.643511", "0.6378896", "0.6354586", "0.63473064", "0.6329626", "0.6329626", "0.6320456", "0.630638", "0.6293698", "0.62683684", "0.6257293", "0.62499183", "0.62273806", "0.6218303", "0.6199199", "0.6162504", "0.61536425", "0.6129851", "0.6119944", "0.61093223", "0.61017406", "0.6099558", "0.60927254", "0.6089694", "0.60872984", "0.6080322", "0.60796964", "0.60601974", "0.60312", "0.60016984", "0.5990287", "0.59826624", "0.5982501", "0.5965641", "0.5942773", "0.5937624", "0.5934575", "0.593452", "0.5933913", "0.5929981", "0.5907247", "0.5905308", "0.58999497", "0.5884675", "0.58818287", "0.5875183", "0.5871719", "0.58585405", "0.5851299", "0.5851111", "0.5829095", "0.5822053", "0.58157545", "0.5810091", "0.57952005", "0.5792144", "0.57918453", "0.5787489", "0.5775777", "0.57744735", "0.57693064", "0.576827", "0.57574666", "0.5754798", "0.5749926", "0.57454205", "0.57387805", "0.57368374", "0.5726656", "0.5724381", "0.5720551", "0.5715116", "0.57096344", "0.5704361", "0.5699756", "0.5689266", "0.5681436", "0.5681377", "0.5680447", "0.5675887", "0.5666742", "0.5661971", "0.56615585", "0.5659084", "0.56558377", "0.5651854", "0.5651784", "0.5644004", "0.56434786", "0.5640724", "0.56391776", "0.56310153", "0.562591", "0.5621882", "0.5618396", "0.56173724" ]
0.65064347
2
This saveContact method is for Save the Contact in DB table if Id is null then it save the data(record), if Id is there then it update the data(record) in save(entity) method save the data and return entity object
@Override public boolean saveContact(Contact c) { ContactDetailsEntity entity = new ContactDetailsEntity(); BeanUtils.copyProperties(c, entity); entity.setActiveSwitch("y"); ContactDetailsEntity savedEntity = contactRepositeries.save(entity); boolean isSaved = savedEntity.getContactId() > 0 ; if(isSaved) { forwardMail(savedEntity.getContactEmail()); } return isSaved; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void saveContact() throws SQLException {\n \n if (checkFieldsForSaving()) {\n\n clsContactsDetails mContactDetails = new clsContactsDetails();\n\n //Differentiate between the two saving modes new and modify.\n clsContacts.enmSavingMode mSavingMode = null;\n if (this.pStatus == enmStatus.New) {\n mSavingMode = clsContacts.enmSavingMode.New;\n } else if (this.pStatus == enmStatus.Modify) {\n mSavingMode = clsContacts.enmSavingMode.Modify;\n\n int mID = ((clsContactsTableModel) tblContacts.getModel()).getID(tblContacts.getSelectedRow());\n int mIDModifications = ((clsContactsTableModel) tblContacts.getModel()).getIDModifications(tblContacts.getSelectedRow());\n mContactDetails.setID(mID);\n mContactDetails.setIDModification(mIDModifications);\n }\n\n //Create the contact details.\n mContactDetails.setFirstName(txtFirstName.getText());\n mContactDetails.setMiddleName(txtMiddleName.getText());\n mContactDetails.setLastName(txtLastName.getText());\n mContactDetails.setBirthday(dtpBirthday.getDate());\n mContactDetails.setGender(getGender());\n mContactDetails.setStreet(txtStreet.getText());\n mContactDetails.setPostcode(txtPostcode.getText());\n mContactDetails.setCity(txtCity.getText());\n mContactDetails.setCountry(txtCountry.getText());\n mContactDetails.setAvailability(txtAvailability.getText());\n mContactDetails.setComment(txtComment.getText());\n \n int mIDContacts = this.pModel.saveContact(mSavingMode, mContactDetails);\n if (mIDContacts > 0) {\n this.pStatus = enmStatus.View;\n setComponents();\n \n //Select the created or modified row.\n if (mSavingMode == clsContacts.enmSavingMode.New) {\n this.pSelectedRow = getRowOfID(mIDContacts);\n }\n selectContact();\n }\n }\n }", "@Override\n\tpublic void save(Contact contact) throws Exception {\n\t\tupdate(\"insert into contact values (null,?,?,?,?,?,?,?)\",\n\t\t\t\tcontact.toArray());\n\t}", "@Override\r\n\tpublic boolean saveContact(Contact contact) {\r\n\t\tContactEntity contactEntity = new ContactEntity();\r\n\t\tBeanUtils.copyProperties(contact, contactEntity);\r\n\t\tContactEntity saveEntity = repository.save(contactEntity);\r\n\t\treturn (saveEntity != null);\r\n\t}", "private void save() {\n Toast.makeText(ContactActivity.this, getString(R.string.save_contact_toast), Toast.LENGTH_SHORT).show();\n\n String nameString = name.getText().toString();\n String titleString = title.getText().toString();\n String emailString = email.getText().toString();\n String phoneString = phone.getText().toString();\n String twitterString = twitter.getText().toString();\n \n if (c != null) {\n datasource.editContact(c, nameString, titleString, emailString, phoneString, twitterString);\n }\n else {\n \tc = datasource.createContact(nameString, titleString, emailString, phoneString, twitterString);\n }\n }", "@PostMapping\n\t@ResponseStatus(value = HttpStatus.CREATED)\n\tpublic Contact save ( @RequestBody Contact contact) {\n\t\t\n\t\treturn repository.save(contact);\n\t}", "public String saveNewContact(\n String name,\n String phone,String email) {\n\n String newContactId = null;\n boolean success = false;\n Connection conn = getConnection();\n if (conn != null) {\n success = beginTransaction(conn, \"Guardar Contacto\");\n if (success) {\n String newId = this.generatePrimaryKey(conn, \"_contact\");\n if (newId == null || newId.length() == 0) {\n success = false;\n }\n\n if (success) {\n success = sql.insertIntoContact(conn, newId, name, phone,email);\n }\n if (success) {\n newContactId = newId;\n }\n if (success) {\n commitTransaction(conn, \"saveNewContact\");\n } else {\n rollbackTransaction(conn, \"saveNewContact\");\n }\n }\n closeConnection(conn);\n }\n return newContactId;\n }", "private void saveContact() {\n ArrayList <ContentProviderOperation> contentProviderOperations = new ArrayList <ContentProviderOperation>();\n contentProviderOperations.add(ContentProviderOperation.newInsert(ContactsContract.RawContacts.CONTENT_URI)\n .withValue(ContactsContract.RawContacts.ACCOUNT_TYPE, null).withValue(ContactsContract.RawContacts.ACCOUNT_NAME, null).build());\n //add contact name\n contentProviderOperations.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI)\n .withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0).withValue(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE)\n .withValue(ContactsContract.CommonDataKinds.StructuredName.DISPLAY_NAME, name).build());\n //add contact number\n contentProviderOperations.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI)\n .withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0).withValue(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE)\n .withValue(ContactsContract.CommonDataKinds.Phone.NUMBER, phoneNumber).withValue(ContactsContract.CommonDataKinds.Phone.TYPE, ContactsContract.CommonDataKinds.Phone.TYPE_MOBILE).build());\n try {\n ContentProviderResult[] results = getApplicationContext().getContentResolver().\n applyBatch(ContactsContract.AUTHORITY, contentProviderOperations);\n Toast.makeText(this, \"Contact Saved\", Toast.LENGTH_SHORT).show();\n // After save, clear fields\n mNameEdT.setText(\"\");\n mPhoneNumberEdT.setText(\"\");\n } catch (RemoteException e) {\n Log.e(TAG, \"RemoteException: \" + e.getMessage());\n } catch (OperationApplicationException e) {\n Log.e(TAG, \"OperationApplicationException: \" + e.getMessage());\n }\n }", "public void addContact(Contact contact){\n\n Contact qContact = contactRepository.findByNameAndLastName(contact.getName(), contact.getLastName());\n\n if(qContact != null ){\n qContact.getPhones().addAll(contact.getPhones());\n contact = qContact;\n }\n contactRepository.save(contact);\n }", "public void addContact(Addendance_DB_Model contact) {\n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\n\t\tContentValues values = new ContentValues();\n\t\tvalues.put(KEY_COMP_ID, contact.get_CompId()); // Addendance_DB_Model Name\n\t\tvalues.put(KEY_DATETIME, contact.get_DateTime());\n\t\tvalues.put(KEY_EMP_ID,contact.get_EmpId());\n\t\tvalues.put(KEY_IBEACON_ID,contact.get_IbeaconId());// Addendance_DB_Model Phone\n\t\tvalues.put(KEY_Status,contact.getStatus());\n\t\tvalues.put(KEY_Latitude,contact.getLatit());\n\t\tvalues.put(KEY_Longitude,contact.getLogni());\n\t\t// Inserting Row\n\t\tdb.insert(TABLE_CONTACTS, null, values);\n\t\tdb.close(); // Closing database connection\n\t}", "public long guardarContacto(Contacto c )\n {\n ContentValues initialValues=new ContentValues();\n initialValues.put(\"nombre\", c.getNombre());\n initialValues.put(\"email\", c.getEmail());\n initialValues.put(\"edad\", c.getEdad());\n return db.insert(\"contactos\", null, initialValues);\n }", "@Secured({ })\n\t\t@RequestMapping(value = \"/contacts\", method = RequestMethod.POST, headers = \"Accept=application/json\")\n\tpublic Contact insert(@RequestBody Contact obj) {\n\t\tContact result = contactService.insert(obj);\n\n\t \n\t\t\n\t\treturn result;\n\t}", "public int save(SaveQuery saveQuery, EntityDetails entityDetails, ObjectWrapper<Object> idGenerated);", "public void addContact(Contact contact) {\n SQLiteDatabase db = null;\n try {\n db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n //values.put(KEY_ID, contact.getID()); // Contact ID id identity\n values.put(KEY_DEVICE_ID, contact.getDeviceID()); // Contact DeviceID\n values.put(KEY_DISPLAY_WIDTH, contact.getDisplayWidth()); // Contact DisplayWidth\n values.put(KEY_DISPLAY_HEIGHT, contact.getDisplayHeight()); // Contact DisplayHeight\n values.put(KEY_SURNAME, contact.getSurname()); // Contact Surname\n values.put(KEY_IP, contact.getIP()); // Contact IP\n values.put(KEY_HOST_NAME, contact.getHostName()); // Contact hostName\n values.put(KEY_AVATAR, contact.getAvatar()); // Contact Avatar\n values.put(KEY_OSTYPE, contact.getOSType()); // Contact OSType\n values.put(KEY_VER_NO, contact.getVersionNumber()); // Contact versionNumber\n values.put(KEY_PH_NO, contact.getPhoneNumber()); // Contact PhoneNumber\n values.put(KEY_SERVICE_NAME, contact.getServiceName()); // Contact ServiceName\n values.put(KEY_IS_ONLINE, contact.getOnline()?1:0); // Contact PhoneNumber\n\n // Inserting Row\n db.insert(TABLE_CONTACT, null, values);\n }catch (Exception e){\n Log.e(TAG,\"addContact:\"+e.getMessage());\n throw e;\n }finally {\n if(db!= null && db.isOpen())\n db.close(); // Closing database connection\n }\n\n }", "@Override\r\n\tpublic void addContact(Contact contact) {\n\t\tsuper.save(contact);\r\n\t}", "public Observable<Contact> saveContact(Contact contact) {\n return RxPaper.book(CONTACT_BOOK).write(ACTIVE_CONTACT_KEY, contact);\n }", "public void setContactId(Long contactId) {\n this.contactId = contactId;\n }", "@PutMapping(\"/contacts/{id}\")\r\n\tEntityModel<Contact> replaceContact(@RequestBody Contact newContact, @PathVariable Long id) {\r\n\t\t\r\n\t\treturn repo.findById(id).map(contact -> {\r\n\t\t\tcontact.setName((newContact.getName()));\r\n\t\t\tcontact.setRelation(newContact.getRelation());\r\n\t\t\treturn assembler.toModel(repo.save(contact));\r\n\t\t}).orElseGet(() -> {\r\n\t\t\tnewContact.setId(id);\r\n\t\t\treturn assembler.toModel(repo.save(newContact));\r\n\t\t});\r\n\t}", "public int updateContact(Contact contact) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n\n values.put(KEY_NAME, contact.get_name()); // Contact Name\n values.put(KEY_AUDIOS, contact.get_audios());\n values.put(KEY_CONTENTS, contact.get_contents());\n values.put(KEY_CAPTURED_IMAGE, contact.get_captured_image());\n values.put(KEY_DELETE_VAR, contact.get_delelte_var());\n values.put(KEY_GALLERY_IMAGE, contact.get_gallery_image());\n values.put(KEY_PHOTO, contact.get_photo());\n values.put(KEY_RRECYCLE_DELETE, contact.get_recycle_delete());\n\n // updating row\n return db.update(TABLE_CONTACTS, values, KEY_ID + \" = ?\",\n new String[]{String.valueOf(contact.get_id())});\n }", "public L7ServiceConfig saveContact(L7ServiceConfig l7ServiceConfig) {\n\t\thibernateTemplate.saveOrUpdate(l7ServiceConfig);\n\t\treturn l7ServiceConfig;\n\t}", "public long getContactId() {\n return contactId;\n }", "void addContact(Contact contact) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_NAME, contact.get_name()); // Contact Name\n values.put(KEY_AUDIOS, contact.get_audios());\n values.put(KEY_CONTENTS, contact.get_contents());\n values.put(KEY_CAPTURED_IMAGE, contact.get_captured_image());\n values.put(KEY_DELETE_VAR, contact.get_delelte_var());\n values.put(KEY_GALLERY_IMAGE, contact.get_gallery_image());\n values.put(KEY_PHOTO, contact.get_photo());\n values.put(KEY_RRECYCLE_DELETE, contact.get_recycle_delete());\n\n // Inserting Row\n db.insert(TABLE_CONTACTS, null, values);\n //2nd argument is String containing nullColumnHack\n db.close(); // Closing database connection\n }", "void setContactId(long contactId) {\n\t\tthis.contactId = contactId;\n\t}", "public Long getContactId() {\n return contactId;\n }", "@Transactional\n\tpublic ContactDetail insertContactDetail(ContactDetail contactDetail) {\n\t\tContactDetail result = contactDetailRepository.save(contactDetail);\n\t\t\n\t\treturn result;\n\t}", "public static int handleUpdateContact(Request req, Response res) {\n \n try {\n \n ObjectMapper objectMapper = new ObjectMapper();\n \n logger.info(\"raw body in handleUpdate = \\n\" + req.body());\n \n String data = Jsoup.parse(req.body()).text()\n .replaceAll(Path.Web.OK_PATTERN, \"\");\n \n logger.info(\"Jsoup parsed and escaped data = \\n\" + data);\n \n \n Contact c = objectMapper.readValue(data, Contact.class);\n \n String userIdNew = req.session(false).attribute(Path.Web.ATTR_USER_ID);\n String id = req.params(\"id\");\n \n if(userIdNew != null && !userIdNew.isEmpty() && id != null && !id.isEmpty()) {\n ObjectId objectId = new ObjectId(id); \n c.setUserId(userIdNew);\n c.setId(objectId.toString());\n c.setUpdatedAt(new Date());\n ds = dbHelper.getDataStore();\n\t ds.save(c);\n res.status(200);\n logger.info(\"updated contact object after mapping and setting id = \\n\" + c.toString());\n \n } else {\n //you managed not to login and get here\n logger.info(\"No user id found for the update operation\");\n res.status(500);\n }\n \n } catch(Exception e) {\n logger.info(\"error parsing data from handleUpdateContact \\n\");\n e.printStackTrace();\n res.status(500);\n }\n \n return res.status();\n\t}", "public void addContact(String on_cloudkibo, String lname, String phone, String uname, String uid, String shareddetails,\r\n \t\tString status) {\r\n\r\n\r\n ContentValues values = new ContentValues();\r\n //values.put(Contacts.CONTACT_FIRSTNAME, fname); // FirstName\r\n //values.put(Contacts.CONTACT_LASTNAME, lname); // LastName\r\n values.put(Contacts.CONTACT_PHONE, phone); // Phone\r\n values.put(\"display_name\", uname); // UserName\r\n values.put(Contacts.CONTACT_UID, uid); // Uid\r\n values.put(Contacts.CONTACT_STATUS, status); // Status\r\n values.put(Contacts.SHARED_DETAILS, shareddetails); // Created At\r\n values.put(\"on_cloudkibo\", on_cloudkibo);\r\n\r\n // Inserting Row\r\n try {\r\n// if(getContactName(phone) != null){\r\n// SQLiteDatabase db = this.getWritableDatabase();\r\n// db.update(Contacts.TABLE_CONTACTS,values,\"phone='\"+phone+\"'\",null);\r\n// db.close();\r\n// }else{\r\n SQLiteDatabase db = this.getWritableDatabase();\r\n db.replace(Contacts.TABLE_CONTACTS, null, values);\r\n db.close();\r\n// }\r\n } catch (android.database.sqlite.SQLiteConstraintException e){\r\n Log.e(\"SQLITE_CONTACTS\", uname + \" - \" + phone);\r\n ACRA.getErrorReporter().handleSilentException(e);\r\n }\r\n // Closing database connection\r\n }", "public com.vh.locker.ejb.Contact create(java.lang.Long id, java.lang.String name, java.lang.String nickName, java.lang.String phone, java.lang.String email, com.vh.locker.ejb.User anUser) throws javax.ejb.CreateException;", "public void setContactId(String contactId) {\n this.contactId = contactId;\n }", "@Override\n public Contact addContact(String firstName, String secondName, String fathersName,\n String mobilePhoneNumber, String homePhoneNumber,\n String homeAddress, String email, long userId) {\n\n Contact contact = new Contact(firstName, secondName, fathersName, mobilePhoneNumber,\n homePhoneNumber, homeAddress, email, userRepository.findOne(userId));\n\n contactRepository.save(contact);\n return null;\n }", "private EmergencyContactInfo persistEmergencyContactInfo(Intent data){\n\t //Declarations\n\t\t\tEmergencyContactInfo emergencyContactInfo;\n\t\t\t\n\t\t\t//Get the contact details\n \tContactProvider contactProvider = ContactProvider.getContactProvider(getActivity());\n \tContactDetail contactDetail = contactProvider.getContact(data);\t\t\t \t \t \t\n \t\n \t//Check its availability in data store\n \tif(DataStore.getEmergencyContactInfo(getActivity()) == null)\n \t\temergencyContactInfo = new EmergencyContactInfo();\t \t\n \telse\n \t\temergencyContactInfo = DataStore.getEmergencyContactInfo(getActivity());\n \t\n \temergencyContactInfo.getContactDetails().put(mContactTag, contactDetail);\t \t\n \tDataStore.setEmergencyContactInfo(emergencyContactInfo);\n \tDataStore.commitEmergencyContactInfo(getActivity());\n \t\n \t\n \treturn emergencyContactInfo;\n\t\t}", "public int getContactId() {\n return contactId;\n }", "public Contract save(Contract entity) {\n\t\treturn null;\r\n\t}", "public PersonalRecord save(PersonalRecord entity) {\n\t\treturn personalRecordRepository.save(entity);\n\t}", "com.spirit.crm.entity.ClienteContactoIf addClienteContacto(com.spirit.crm.entity.ClienteContactoIf model) throws GenericBusinessException;", "Entity save(Entity entity);", "protected void saveRecord() throws DAOException {\r\n\t\t// Prepara para actualizar\r\n\t\tobject.prepareToUpdate();\r\n\t\t// Guarda objecto\r\n\t\tobjectDao.save(object);\r\n\t\t// Guarda registros de relaciones\r\n\t\tfor (Sedrelco relco : object.getRelcos()) {\r\n\t\t\t// Asigna Id padre\r\n\t\t\trelco.getId().setDconsecnk(object.getDconsecnk());\r\n\t\t\tsedrelcoDao.save(relco);\r\n\t\t}\r\n\t}", "@RequestMapping(\"/addContact\")\n\tprivate ResponseEntity<String> addContact(Contacts contact) throws JsonProcessingException {\n\t\t\n\t\tHttpHeaders responseHeaders = new HttpHeaders();\n\t\t\n//\t\t// check if id taken\n//\t\tif(c_service.getContactById(contact.getId()) != null) {\n//\t\t\treturn new ResponseEntity<String>(responseHeaders, HttpStatus.NOT_FOUND); \n//\t\t}\n\t\t\n\t\t\n\t\tContacts validation_contact = c_service.addContact(contact);\n\t\t\n\t\t\n\t if (validation_contact == null) {\n\t return new ResponseEntity<String>(\"Adding failed\", responseHeaders, HttpStatus.NOT_FOUND);\n\t } else {\n\t responseHeaders.add(\"Content-Type\", \"application/json\");\n\t String json = convertToJson(validation_contact);\n\t return new ResponseEntity<String>(json, responseHeaders, HttpStatus.OK); \n\t }\t\n\t}", "T save(T entity) throws DataConcurrencyException, DataIntegrityViolationException;", "public String getContactId() {\n return this.contactId;\n }", "public void testUpdateDataToDb() {\n String accountType = SimUtils.ACCOUNT_TYPE_USIM;\n ContentResolver resolver = mTargetContext.getContentResolver();\n\n ArrayList<String> arrNickname = new ArrayList<String>();\n String updateNickname = \"ghjkk\";\n String oldNickname = \"abc\";\n arrNickname.add(updateNickname);// 0\n arrNickname.add(oldNickname);// 1\n long rawId = 0; // TODO how to get the rawId,// Contacts.CONTENT_URI\n int type = 0;// DB_UPDATE_NICKNAME = 0;DB_UPDATE_ANR=1\n // 1.sim\n accountType = SimUtils.ACCOUNT_TYPE_SIM;\n boolean updateSuccess = mOpContactAccountExtension.updateDataToDb(accountType, resolver, arrNickname, null,\n rawId, type, Utils.COMMD_FOR_SNE);\n assertFalse(updateSuccess);\n\n // 2.type not 0,\n type = 1;\n updateSuccess = mOpContactAccountExtension\n .updateDataToDb(accountType, resolver, arrNickname, null, rawId, type, Utils.COMMD_FOR_SNE);\n assertFalse(updateSuccess);\n\n // 3.usim--update\n accountType = SimUtils.ACCOUNT_TYPE_USIM;\n type = 0;\n updateSuccess = mOpContactAccountExtension\n .updateDataToDb(accountType, resolver, arrNickname, null, rawId, type, Utils.COMMD_FOR_SNE);\n assertTrue(updateSuccess);\n\n // 4.--arrNickname null ,or do not have 2 values--false\n arrNickname.clear();\n updateSuccess = mOpContactAccountExtension\n .updateDataToDb(accountType, resolver, arrNickname, null, rawId, type, Utils.COMMD_FOR_SNE);\n assertFalse(updateSuccess);\n\n // 04--insert\n updateNickname = \"newnicknamein\";\n oldNickname = \"\";\n arrNickname.add(updateNickname);\n arrNickname.add(oldNickname);\n updateSuccess = mOpContactAccountExtension\n .updateDataToDb(accountType, resolver, arrNickname, null, rawId, type, Utils.COMMD_FOR_SNE);\n assertTrue(updateSuccess);\n\n // 05--delete--\n arrNickname.clear();\n updateNickname = \"\";\n oldNickname = \"haveaname\";\n arrNickname.add(updateNickname);\n arrNickname.add(oldNickname);\n updateSuccess = mOpContactAccountExtension\n .updateDataToDb(accountType, resolver, arrNickname, null, rawId, type, Utils.COMMD_FOR_SNE);\n assertTrue(updateSuccess);\n }", "public void save(Address entity);", "@Override\r\n\tpublic Contact findById(String contactId) {\n\t\treturn (Contact)super.load(contactId);\r\n\t}", "@Override\n public CerereDePrietenie save(CerereDePrietenie entity) {\n\n String SQL = \"INSERT INTO cereredeprietenie(id, id_1,id_2,status,datac) VALUES(?,?,?,?,?)\";\n\n long id = 0;\n\n\n try (Connection conn = connect();\n PreparedStatement pstmt = conn.prepareStatement(SQL,\n Statement.RETURN_GENERATED_KEYS)) {\n\n\n pstmt.setInt(1, Math.toIntExact(entity.getId()));\n pstmt.setInt(2, Math.toIntExact(entity.getTrimite().getId()));\n pstmt.setInt(3, Math.toIntExact(entity.getPrimeste().getId()));\n pstmt.setString(4, entity.getStatus());\n pstmt.setObject(5, entity.getData());\n\n\n int affectedRows = pstmt.executeUpdate();\n // check the affected rows\n if (affectedRows > 0) {\n // get the ID back\n try (ResultSet rs = pstmt.getGeneratedKeys()) {\n if (rs.next()) {\n id = rs.getLong(1);\n }\n } catch (SQLException ex) {\n System.out.println(ex.getMessage());\n }\n }\n } catch (SQLException ex) {\n System.out.println(ex.getMessage());\n }\n\n\n return entity;\n\n }", "public void addContactPeupler(IContact contact) {\n\n\t\ttry {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"*******************je suis dans addContact peupler *******************************************\");\n\t\t\tsessionFactory.getCurrentSession().save(contact);\n\n\t\t} catch (HibernateException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void saveContact(View view) {\n EditText nameField = (EditText) findViewById(R.id.name);\n EditText emailField = (EditText) findViewById(R.id.email);\n EditText phoneField = (EditText) findViewById(R.id.phone);\n String name = nameField.getText().toString();\n String email = emailField.getText().toString();\n String phone = phoneField.getText().toString();\n String image = name.replace(' ', '_') + \".jpg\";\n\n //create and save image to internal storage, and save image name in DB\n Bitmap bitmap = null;\n ContextWrapper cw = new ContextWrapper(getApplicationContext());\n File directory = cw.getDir(\"imageDir\", Context.MODE_PRIVATE);\n\n File mypath = new File(directory, image);\n\n FileOutputStream fos = null;\n\n //create bitmap Image\n try{\n bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), selectedImageUri);\n fos = new FileOutputStream(mypath);\n bitmap.compress(Bitmap.CompressFormat.PNG, 100, fos);\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n //Save directory to use for specifying path of image\n setDir(directory.getAbsolutePath());\n\n int end = 0;\n\n //update contacts info and image\n for(int i=0; i < contacts.size(); i++){\n name = nameField.getText().toString();\n email = emailField.getText().toString();\n phone = phoneField.getText().toString();\n if(contacts.get(i).name.equals(name)){\n contacts.get(i).setEmail(email);\n contacts.get(i).setMobile(phone);\n contacts.get(i).setImage(image);\n contactRepository.update(contacts.get(i));\n }else{\n end += 1;\n }\n }\n\n if(end == contacts.size()){\n contactRepository.insert(new Contact(image, name, email, phone));\n }\n\n Toast.makeText(this, \"Contact saved\",\n Toast.LENGTH_SHORT).show();\n }", "@Override\n\tpublic T save(T entity) {\n\t\treturn getDao().save(entity);\n\t}", "@Override\n\tpublic void update(Contact contact) throws Exception {\n\t\tObject[] params = contact.toEditArray();\n\t\tparams = ArrayUtils.add(params, contact.getId());\n\t\tupdate(\"update contact set customer=?, gender=?, age=?, position=?, phone=?, relation=? where id = ?\",\n\t\t\t\tparams);\n\t}", "public void contact_update(contact contact){\n \tSQLiteDatabase db = this.getWritableDatabase();\n\n \t// 2. create ContentValues to add key \"column\"/value\n \tContentValues values = new ContentValues();\n \tvalues.put(KEY_CONTACT_ADDRESS, contact.address_get());\n \tvalues.put(KEY_CONTACT_NAME, contact.name_get());\n \tvalues.put(KEY_CONTACT_TYPE, contact.type_get());\n \tvalues.put(KEY_CONTACT_KEYSTAT, contact.keystat_get());\n \tif (contact.type_get() == contact.TYPE_GROUP)\n \t\tvalues.put(KEY_CONTACT_MEMBERS, contact.members_get_string());\n \tvalues.put(KEY_CONTACT_LASTACT, contact.time_lastact_get());\n \tvalues.put(KEY_CONTACT_UNREAD, contact.unread_get());\n \tvalues.put(KEY_CONTACT_GROUP, contact.group_get());\n\n \tLog.d(\"contact_update\", \"update contact with id \" + contact.id_get());\n \t// 3. update\n \tdb.update(TABLE_CONTACT, // table\n \t\t\tvalues, // key/value -> keys = column names/ values = column values\n \t\t\t\"id = \" + contact.id_get(), null);\n \t\n \t// 4. close\n \tdb.close();\n }", "public Company saveCompany(Company company);", "ID saveWithId(T entity);", "@Override\n\tpublic Contact findById(String id) {\n\t\treturn null;\n\t}", "public void addContact(Contact contact) {\n\n\t\tContentValues values = new ContentValues();\n\t\tvalues.put(KEY_ID, contact.get_id());\n\t\tvalues.put(KEY_USER_FIRST_NAME, contact.getFirst_name());\n\t\tvalues.put(KEY_USER_LAST_NAME, contact.getLast_name());\n\t\tvalues.put(KEY_USER_NAME, contact.getUser_name());\n\t\tvalues.put(KEY_USER_PWD, contact.getPwd());\n\t\tvalues.put(KEY_USER_CONFIRMPWD, contact.getConfirm_pwd());\n\t\tvalues.put(KEY_PH_NO, contact.getPhone_number());\n\t\tvalues.put(KEY_GENDER, contact.getGenderValue());\n\t\tvalues.put(KEY_ADDR_ONE, contact.getAddr_1());\n\t\tvalues.put(KEY_ADDR_TWO, contact.getAddr_2());\n\t\tvalues.put(KEY_CITY, contact.getCity());\n\t\tvalues.put(KEY_STATE, contact.getState());\n\t\tvalues.put(KEY_ZIP, contact.getZipcode());\n\t\tvalues.put(KEY_DOB, contact.getDob());\n\n\t\t// Inserting Row\n\t\tmSqLiteDatabase.insert(USERDETAILS_TABLE, null, values);\n\t\t// mSqLiteDatabase.close(); // Closing database connection\n\t}", "public void setContactId(java.lang.String contactId) {\r\n this.contactId = contactId;\r\n }", "Optional<Contact> getContact(long id);", "public Optional<Contact> findById(int id){\n return contactRepository.findById(id);\n }", "@Override\r\n\tpublic boolean editContact(ContentResolver contentResolver, ContactInfo cInfo) {\r\n\t\tif(cInfo != null) {\r\n\t\t\tlong id = Integer.parseInt(cInfo.get_ID());\r\n\t\t\t\r\n\t\t\t//Update with new name\r\n\t\t\tUri uri = ContentUris.withAppendedId(People.CONTENT_URI, id);\r\n\t\t\tContentValues values = new ContentValues();\r\n\t\t\tvalues.put(PeopleColumns.NAME, cInfo.getDisplayName());\r\n\t\t\tint effectedRows = contentResolver.update(uri, values, null, null);\r\n\t\t\t\r\n\t\t\t//Used to test the above mentioned bug. \r\n\t\t\t//Currently program shows the phone_ID and the _ID as being the same\r\n\t\t\t//This is WRONG\r\n\t\t\tLog.d(TAG, TAG + \" nameSt \" + cInfo.getDisplayName());\r\n\t\t\tLog.d(TAG, TAG + \" nameID \" + cInfo.get_ID());\r\n\t\t\tLog.d(TAG, TAG + \" phoneSt \" + cInfo.getPhoneNumber());\r\n\t\t\tLog.d(TAG, TAG + \" phoneID \" + cInfo.getPhone_ID());\r\n\t\t\t\r\n\t\t\t//Update with new number\r\n\t\t\tUri numberUri = Uri.withAppendedPath(uri, People.Phones.CONTENT_DIRECTORY);\r\n\t\t\tvalues.clear();\r\n\t\t\tvalues.put(Contacts.Phones.TYPE, getPhoneType(cInfo.getPhoneType()));\r\n\t\t\tvalues.put(People.Phones.NUMBER, cInfo.getPhoneNumber());\r\n\t\t\teffectedRows += contentResolver.update(Uri.withAppendedPath(numberUri, cInfo.getPhone_ID()), values, null, null);\r\n\t\t\t\r\n\t\t\tif(effectedRows <= 0)\r\n\t\t\t\treturn false;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void contact_add(contact contact){\n \t\n \tif (contact.type_get() == contact.TYPE_PERSON) {\n \t\tcontact check_contact = contact_get_person_by_address(contact.address_get());\n \t\tif (check_contact != null) {\n \t\t\tLog.d(\"contact_add\", \"contact exists with address \" + contact.address_get());\n \t\t\treturn;\n \t\t}\n \t} else {\n \t\tcontact check_contact = contact_get_group_by_address_and_group(contact.address_get(), contact.group_get());\n \t\tif (check_contact != null) {\n \t\t\tLog.d(\"contact_add\", \"contact exists with address \" + contact.address_get());\n \t\t\treturn;\n \t\t}\n \t}\n \t\n \t// 1. get reference to writable DB\n \tSQLiteDatabase db = this.getWritableDatabase();\n\n \t// 2. create ContentValues to add key \"column\"/value\n \tContentValues values = new ContentValues();\n \tvalues.put(KEY_CONTACT_ADDRESS, contact.address_get());\n \tvalues.put(KEY_CONTACT_NAME, contact.name_get());\n \tvalues.put(KEY_CONTACT_TYPE, contact.type_get());\n \tvalues.put(KEY_CONTACT_KEYSTAT, contact.keystat_get());\n \tif (contact.type_get() == contact.TYPE_GROUP)\n \t\tvalues.put(KEY_CONTACT_MEMBERS, contact.members_get_string());\n \tvalues.put(KEY_CONTACT_LASTACT, contact.time_lastact_get());\n \tvalues.put(KEY_CONTACT_UNREAD, contact.unread_get());\n \tvalues.put(KEY_CONTACT_GROUP, contact.group_get());\n\n \t// 3. insert\n \tdb.insert(TABLE_CONTACT, // table\n \t\t\tnull, //nullColumnHack\n \t\t\tvalues); // key/value -> keys = column names/ values = column values\n\n \t// 4. close\n \tdb.close();\n }", "EmployeeDetail save(EmployeeDetail detail) throws DBException;", "public void insert(Contact c);", "public Contact getContactById(int contactId);", "public Contactos consultarContactosId(int idContacto) {\n Contactos con = null;\r\n SessionFactory factory = HibernateUtil.getSessionFactory();\r\n Session session = factory.openSession();\r\n\r\n try {\r\n session.beginTransaction();\r\n con = (Contactos) session.get(Contactos.class, idContacto);\r\n // Query q = session.createQuery(\"from Contactos where idContacto = \"+idContacto );\r\n // listaContactos = (List<Contactos>) q.list();\r\n session.getTransaction().commit();\r\n System.out.println(\"Consultar por id Correcto ContactoMantenimiento \");\r\n } catch (Exception e) {\r\n if (session.getTransaction().isActive()) {\r\n session.getTransaction().rollback();\r\n System.out.println(\"Errro en consultar por id ContactoMantenimiento \" + e);\r\n con = null;\r\n }\r\n } finally {\r\n session.close();\r\n }\r\n return con;\r\n }", "public void saveFormData() {\r\n if(!saveRequired) return;\r\n if(cvHierarchyData != null && cvHierarchyData.size()>0) {\r\n SponsorHierarchyBean sponsorHierarchyBean;\r\n for(int index=0; index<cvHierarchyData.size(); index++) {\r\n try {\r\n sponsorHierarchyBean = (SponsorHierarchyBean)cvHierarchyData.get(index);\r\n if(sponsorHierarchyBean.getAcType() != null) {\r\n if(sponsorHierarchyBean.getAcType() == TypeConstants.UPDATE_RECORD) {\r\n queryEngine.update(queryKey,sponsorHierarchyBean);\r\n }else if(sponsorHierarchyBean.getAcType() == TypeConstants.INSERT_RECORD) {\r\n queryEngine.insert(queryKey,sponsorHierarchyBean);\r\n }else if(sponsorHierarchyBean.getAcType() == TypeConstants.DELETE_RECORD) {\r\n queryEngine.delete(queryKey,sponsorHierarchyBean);\r\n }\r\n }\r\n }catch(CoeusException coeusException){\r\n coeusException.printStackTrace();\r\n }\r\n }\r\n }\r\n saveRequired = false;\r\n }", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\tif (!nameEditText.getText().toString().equalsIgnoreCase(\"\")\n\t\t\t\t\t&& !phoneNumberEditText.getText().toString()\n\t\t\t\t\t\t\t.equalsIgnoreCase(\"\")) {\n\t\t\t\t\n\t\t\t\tSCContact scContact = new SCContact();\n\t\t\t\tscContact.setName(nameEditText.getText().toString());\n\t\t\t\tscContact.setNumber(phoneNumberEditText.getText().toString());\n\t\t\t\tscContact.setId(contactID);\n\t\t\t\tif (insertOrUpdate) {\n\t\t\t\t\t\n\t\t\t\t\tcontactRepository = new ContactRepository(AddEmergencyContactsActivity.this);\n\t\t\t\t\tcontactRepository.insertContact(scContact);\n\t\t\t\t} else {\n\t\t\t\t\tcontactRepository = new ContactRepository(AddEmergencyContactsActivity.this);\n\t\t\t\t\tcontactRepository.updateContact(scContact);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}", "public static void store(Context context, Contact contact) {\n Intent intent = new Intent(ContactsContract.Intents.Insert.ACTION);\n intent.setType(ContactsContract.RawContacts.CONTENT_TYPE);\n\n intent.putExtra(ContactsContract.Intents.Insert.NAME, contact.name)\n .putExtra(ContactsContract.Intents.Insert.PHONE, contact.phoneNumber);\n\n context.startActivity(intent);\n }", "@Override\n public Building save(Building entity) {\n return dao.save(entity);\n }", "public void addDoctorPerInfo(String doc_id, String doctor_login_id, String membership_id, String first_name, String middle_name, String last_name, String email_id, String phone_no, String company_id) {\n SQLiteDatabase db = this.getWritableDatabase();\n try {\n\n ContentValues values = new ContentValues();\n\n values.put(DOCTOR_ID, doc_id);\n values.put(DOCTOR_LOGIN_ID, doctor_login_id);\n values.put(DOCTOR_MEMBERSHIP_ID, membership_id);\n values.put(FIRST_NAME, first_name); // Name\n values.put(MIDDLE_NAME, middle_name);\n values.put(LAST_NAME, last_name);\n values.put(KEY_EMAIL, email_id);\n values.put(PHONE_NUMBER, phone_no);\n values.put(COMPANY_ID, company_id);\n values.put(\"created_at\", new AppController().getCurrentDate());\n //this will update record if exist else create new record 02-03-2017\n\n // db.insertWithOnConflict(TABLE_DOCTORINFO, DOCTOR_ID, values, SQLiteDatabase.CONFLICT_REPLACE);\n\n int u = db.update(TABLE_DOCTORINFO, values, \"doctor_id=?\", new String[]{doc_id});\n if (u == 0) {\n db.insertWithOnConflict(TABLE_DOCTORINFO, DOCTOR_ID, values, SQLiteDatabase.CONFLICT_REPLACE);\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n if (db != null) {\n\n db.close(); // Closing database connection\n }\n }\n }", "public java.lang.String getContactId() {\r\n return contactId;\r\n }", "T save(T entity);", "T save(T entity);", "T save(T entity);", "E save(E entity);", "IContact getContactById(String contactId);", "Boolean save(T entity);", "@ApiMethod(name = \"createContact\", path = \"contact\", httpMethod = HttpMethod.POST)\n\tpublic Contact createContact(final ContactForm form) {\n\t\tfinal Key<Contact> key = Contact.allocateKey();\n\t\tContact contact = new Contact(key.getId(), form);\n\n\t\tofy().save().entity(contact).now();\n\n\t\treturn contact;\n\t}", "void updateContact(String id, int status);", "protected void createCompaniesContacts() {\n\n log.info(\"CompaniesContactsBean => method : createCompaniesContacts()\");\n\n EntityManager em = EMF.getEM();\n EntityTransaction tx = null;\n\n try {\n tx = em.getTransaction();\n tx.begin();\n for (CompaniesEntity c : selectedCompaniesContacts) {\n CompaniesContactsEntity companiesContactsEntity1 = new CompaniesContactsEntity();\n companiesContactsEntity1.setContactsByIdContacts(contactsBean.getContactsEntity());\n companiesContactsEntity1.setCompaniesByIdCompanies(c);\n companiesContactsDao.update(em, companiesContactsEntity1);\n }\n tx.commit();\n log.info(\"Persist ok\");\n } catch (Exception ex) {\n if (tx != null && tx.isActive()) tx.rollback();\n log.info(\"Persist failed\");\n } finally {\n em.clear();\n em.clear();\n }\n\n }", "@Override\n public void onClick(View v) {\n String name = edtName.getText().toString();\n String phone = edtPhone.getText().toString();\n String id = contact.getId();\n\n //tim id tren firebase\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference myRef = database.getReference(\"DBContact\");\n myRef.child(id).child(\"name\").setValue(name);\n myRef.child(id).child(\"phone\").setValue(phone);\n finish();\n Toast.makeText(getApplicationContext(),\"Sua thanh cong\",Toast.LENGTH_LONG).show();\n }", "public void setIdContacto(String idContacto) {\r\n\t\tthis.idContacto = idContacto;\r\n\t}", "public void SaveDataMConfig(SQLiteDatabase db, mAbsenCheckInData data) {\n\t\tmAbsenCheckInData dt = new mAbsenCheckInData();\n\t\tdb.execSQL(\"INSERT OR REPLACE into \" + TABLE_CONTACTS + \" (\"\n\t\t\t\t+ dt.Property_IntId\n\t\t\t\t+ \",\" + dt.Property_dtDateCheckIn \n\t\t\t\t+ \",\"+ dt.Property_dtDateCheckOut \n\t\t\t\t+ \",\" + dt.Property_txtAcc \n\t\t\t\t+ \",\" + dt.Property_txtBranchCode\n\t\t\t\t+ \",\" + dt.Property_txtDeviceId\n\t\t\t\t+ \",\" + dt.Property_txtLatitude\n\t\t\t\t+ \",\" + dt.Property_txtLongitude\n\t\t\t\t+ \",\" + dt.Property_txtNik\n\t\t\t\t+ \",\" + dt.Property_txtOutletCode\n\t\t\t\t+ \",\" + dt.Property_txtUserId\n\t\t\t\t+ \") \" + \"values('\"\n\t\t\t\t+ String.valueOf(data.get_IntId()) + \"','\"\n\t\t\t\t+ String.valueOf(data.get_dtDateCheckIn()) + \"','\"\n\t\t\t\t+ String.valueOf(data.get_dtDateCheckOut()) + \"','\"\n\t\t\t\t+ String.valueOf(data.get_txtAcc()) + \"','\"\n\t\t\t\t+ String.valueOf(data.get_txtBranchCode()) + \"','\"\n\t\t\t\t+ String.valueOf(data.get_txtDeviceId()) + \"','\"\n\t\t\t\t+ String.valueOf(data.get_txtLatitude()) + \"','\"\n\t\t\t\t+ String.valueOf(data.get_txtLongitude()) + \"','\"\n\t\t\t\t+ String.valueOf(data.get_txtNik()) + \"','\"\n\t\t\t\t+ String.valueOf(data.get_txtOutletCode()) + \"','\"\n\t\t\t\t+ String.valueOf(data.get_txtUserId()) + \"')\");\n\t\t// db.insert(TABLE_CONTACTS, null, values);\n\t\t// db.close(); // Closing database connection\n\t}", "void save(Object entity);", "@Override\n\tpublic Contact handRequest() {\n\t\tIvalidation valid = new ValidContact();\n\t\t\n\t\t\n\t\tContact newContact = new Contact(this.name, this.noPhone, this.email);\t//create new contact\n\t\t\n\t\tvalid = new ValidContact();\n\t\tif(valid.valid(newContact)) {\n\t\t\tAppContact2Data.addContactToData(newContact);\n\t\t\tSystem.out.print(\"\\nSuccessfull!\\n\");\n\t\t\treturn newContact;\n\t\t}\n\t\treturn null;\n\t}", "public long insertContact(String name,String email)\n {\n ContentValues initialValues = new ContentValues();\n initialValues.put(KEY_NAME, name);\n initialValues.put(KEY_EMAIL, email);\n return db.insert(DATABASE_TABLE, null, initialValues);\n }", "public void setIdContacto(int aIdContacto) {\r\n idContacto = aIdContacto;\r\n }", "public interface ContactService {\n\n /**\n * 保存联系人对象\n *\n * @param contact\n */\n public void saveContact(Contact contact);\n\n\n /**\n * 保存联系人组\n *\n * @param contactGroup\n */\n public void saveContactGroup(ContactGroup contactGroup);\n\n\n /**\n * 获取联系人组列表\n *\n * @return\n */\n public List<ContactGroup> getContactGroup();\n\n\n /**\n * 分页面读取联系人\n *\n * @param page\n * @param size\n * @return\n */\n public List<Contact> getContactByPage(int page, int size);\n\n /**\n * 获取所有联系人\n *\n * @return\n */\n public List<Contact> getAllContact();\n\n /**\n * 读取总页面\n *\n * @param size\n * @return\n */\n public int getContactPage(int size);\n\n /**\n * 删除联系人\n * @param id\n * @return\n */\n public boolean deleteContact(long id);\n\n /**\n * 删除联系人组\n * @param id\n * @return\n */\n public boolean deleteContactGroup(long id);\n}", "private static CompletionStage<Void> persistOrUpdate(ReactiveMongoCollection collection, Object entity) {\n BsonDocument document = getBsonDocument(collection, entity);\n\n //then we get its id field and create a new Document with only this one that will be our replace query\n BsonValue id = document.get(ID);\n if (id == null) {\n //insert with autogenerated ID\n return collection.insertOne(entity);\n } else {\n //insert with user provided ID or update\n BsonDocument query = new BsonDocument().append(ID, id);\n return collection.replaceOne(query, entity, ReplaceOptions.createReplaceOptions(new UpdateOptions().upsert(true)))\n .thenApply(u -> null);\n }\n }", "public String updateContactStatement() {\n\t\treturn \"UPDATE CONTACTS SET (name, surname, title, address, city, \"\n\t\t\t\t+ \"province, postal_Code, region, country , company_Name, \"\n\t\t\t\t+ \"workstation, work_Phone, work_Extension, mobile_Phone, \"\n\t\t\t\t+ \"fax_Number, email, contact_type_id, notes) = (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) \" + \"WHERE id=?\";\n\n\t}", "Contact getContact(int id) {\n SQLiteDatabase db = this.getReadableDatabase();\n\n Cursor cursor = db.query(TABLE_CONTACTS, new String[]{KEY_ID,\n KEY_NAME, KEY_AUDIOS, KEY_CAPTURED_IMAGE, KEY_CONTENTS, KEY_DELETE_VAR, KEY_GALLERY_IMAGE, KEY_RRECYCLE_DELETE, KEY_PHOTO}, KEY_ID + \"=?\",\n new String[]{String.valueOf(id)}, null, null, null, null);\n if (cursor != null)\n cursor.moveToFirst();\n\n Contact contact = new Contact(cursor.getInt(0),\n cursor.getString(1), cursor.getString(2), cursor.getString(3), cursor.getString(4), cursor.getInt(5), cursor.getString(6), cursor.getInt(7), cursor.getString(8));\n // return contact\n return contact;\n }", "@Override\r\n\tpublic CertMaster save(CertMaster entity) {\n\t\treturn certMasterRepository.save(entity);\r\n\t\t\r\n\t}", "CustDataNotesResponseDTO saveCustDataNotes(CustDataNotesRequestDTO custDataNotesRequestDTO) throws Exception;", "public int getContactID() {\r\n return contactID;\r\n }", "public void setContactInfo(ContactInfo contactInfo) {\n\n this.contactInfo = contactInfo;\n this.needToSave = Boolean.TRUE;\n }", "@Override\n\tpublic Collaborator saveData(String collaboratorMail,Long noteId) {\n Notes notes = noteRepos.findByNoteId(noteId);\n if(notes!=null) {\n \t Collaborator collaborator = collaboRepo.findByMail(collaboratorMail, noteId);\n \t if(collaborator==null) {\n \t\t Collaborator collaboratorModel = new Collaborator();\n \t\t collaboratorModel.setCollaborator(collaboratorMail);\n \t\t collaboratorModel.setNotes(notes);\n \t\tcollaboRepo.insertData(collaboratorModel.getCollaborator(), noteId);\n \t\treturn collaboratorModel;\n \t }\n }\n throw new UserException(\"User not found \");\n\t}", "public void guardar() {\n try {\n objConec.conectar();\n objConec.Sql = objConec.con.prepareStatement(\"insert into contacto values(null,?,?,?,?,?)\");\n objConec.Sql.setString(1, getNom_con());\n objConec.Sql.setInt(2, getTel_con()); \n objConec.Sql.setString(3, getEma_con());\n objConec.Sql.setString(4, getAsu_con());\n objConec.Sql.setString(5, getMen_con());\n objConec.Sql.executeUpdate();\n objConec.cerrar();\n JOptionPane.showMessageDialog(null, \"Mensaje enviado correctamente\");\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, \"Error al enviar el mensaje\");\n\n }\n\n }", "public <T> T save(T entity);", "public Boolean updateData(int position, String oldemail, String category, String name, String dob, String email, String phone){\n return databaseManager.updateInfo(position,oldemail,category,name,dob,email,phone);\n }", "public void updateORInsert(Company company,\n\t\t\tDataImportParametersDTO dataImportParametersDTO, Long companyId) {\n\t\tList<DataImportKeyValueDTO> empCompanyName = dataImportParametersDTO\n\t\t\t\t.getEmpColName();\n\t\tString rowNumber = dataImportParametersDTO.getRowNumber();\n\t\tboolean isDynamic = dataImportParametersDTO.isDynamic();\n\t\tList<Long> formIds = dataImportParametersDTO.getFormIds();\n\t\tlong entityId = dataImportParametersDTO.getEntityId();\n\t\tList<String> tableNames = dataImportParametersDTO.getTableNames();\n\t\tList<HashMap<String, String>> colFormMapList = dataImportParametersDTO\n\t\t\t\t.getColFormMapList();\n\t\tList<String> dynRecordsName = dataImportParametersDTO\n\t\t\t\t.getDynRecordsName();\n\t\tList<DataImportLogDTO> updateAndInsertLogs = new ArrayList<DataImportLogDTO>();\n\n\t\ttry {\n\t\t\tCompanyConditionDTO companyDTO = new CompanyConditionDTO();\n\t\t\tcompanyDTO.setCompanyCode(company.getCompanyCode());\n\t\t\tCompany existingCompanyRecord = companyDAO\n\t\t\t\t\t.findByCondition(companyDTO);\n\n\t\t\tif (empCompanyName.size() == 1\n\t\t\t\t\t&& empCompanyName\n\t\t\t\t\t\t\t.get(0)\n\t\t\t\t\t\t\t.getMethodName()\n\t\t\t\t\t\t\t.equalsIgnoreCase(\n\t\t\t\t\t\t\t\t\tPayAsiaConstants.CAMEL_CASE_COMPANY_CODE)) {\n\t\t\t\tif (existingCompanyRecord != null) {\n\t\t\t\t\tcompany.setCompanyId(existingCompanyRecord.getCompanyId());\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tif (existingCompanyRecord != null) {\n\t\t\t\t\tcompany.setCompanyId(existingCompanyRecord.getCompanyId());\n\t\t\t\t\tBeanUtils.copyProperties(\n\t\t\t\t\t\t\tcompany,\n\t\t\t\t\t\t\tcopyCompanyData(empCompanyName, company,\n\t\t\t\t\t\t\t\t\texistingCompanyRecord));\n\t\t\t\t\tcompanyDAO.update(company);\n\t\t\t\t} else {\n\t\t\t\t\tcompany = companyDAO.saveReturn(company);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isDynamic) {\n\t\t\t\tif (company.getCompanyId() != 0) {\n\t\t\t\t\tfor (Long formId : formIds) {\n\t\t\t\t\t\tDynamicFormRecord dynamicFormRecord = new DynamicFormRecord();\n\n\t\t\t\t\t\tdynamicFormRecord.setForm_ID(formId);\n\t\t\t\t\t\tdynamicFormRecord.setCompany_ID(companyId);\n\t\t\t\t\t\tdynamicFormRecord.setEntity_ID(entityId);\n\t\t\t\t\t\tdynamicFormRecord.setEntityKey(company.getCompanyId());\n\t\t\t\t\t\tDynamicFormRecord existingFormRecord = dynamicFormRecordDAO\n\t\t\t\t\t\t\t\t.getEmpRecords(company.getCompanyId(), null,\n\t\t\t\t\t\t\t\t\t\tformId, entityId, companyId);\n\n\t\t\t\t\t\tsuper.setDynamicValuesForUpdate(\n\t\t\t\t\t\t\t\tdataImportParametersDTO, tableNames,\n\t\t\t\t\t\t\t\tcolFormMapList, dynRecordsName, formId,\n\t\t\t\t\t\t\t\tdynamicFormRecord, existingFormRecord,\n\t\t\t\t\t\t\t\tcompanyId, \"update\");\n\n\t\t\t\t\t\tif (existingFormRecord == null) {\n\t\t\t\t\t\t\tdynamicFormRecordDAO.save(dynamicFormRecord);\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tdynamicFormRecord.setRecordId(existingFormRecord\n\t\t\t\t\t\t\t\t\t.getRecordId());\n\t\t\t\t\t\t\tBeanUtils.copyProperties(dynamicFormRecord,\n\t\t\t\t\t\t\t\t\tdataImportUtils.copyDynamicRecordData(\n\t\t\t\t\t\t\t\t\t\t\tdynRecordsName, dynamicFormRecord,\n\t\t\t\t\t\t\t\t\t\t\texistingFormRecord));\n\t\t\t\t\t\t\tdynamicFormRecordDAO.update(dynamicFormRecord);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} catch (PayAsiaSystemException ex) {\n\t\t\tsuper.handleException(rowNumber, updateAndInsertLogs, ex);\n\n\t\t} catch (IllegalAccessException | InvocationTargetException e) {\n\t\t\tLOGGER.error(e.getMessage(), e);\n\t\t\tthrow new PayAsiaSystemException(e.getMessage(), e);\n\t\t}\n\n\t\tif (updateAndInsertLogs != null && !updateAndInsertLogs.isEmpty()) {\n\t\t\tthrow new PayAsiaDataException(updateAndInsertLogs);\n\t\t}\n\n\t}", "@Override\r\n\tpublic Staff save(Staff entity) {\n\t\treturn staffDao.save(entity);\r\n\t}", "@FXML\r\n\tprotected void handleSaveButtonAction(final ActionEvent event) {\r\n\t\tgetContact();\r\n\r\n\t\tif (contactsService != null) {\r\n\t\t\tint id;\r\n\t\t\ttry {\r\n\t\t\t\tif (contact.getPhoto() != null) {\r\n\t\t\t\t\tInputStream photoStream = new BufferedInputStream(new FileInputStream(contact.getPhoto()));\r\n\t\t\t\t\tid = contactsService.saveContact(contact.toContact(), photoStream);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tid = contactsService.saveContact(contact.toContact(), null);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (contact.getId() == 0) {\r\n\t\t\t\t\tcontact.setId(id);\r\n\t\t\t\t\tcontacts.add(contact);\r\n\t\t\t\t}\r\n\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\tlog.error(\"Couldn't find the file: \" + contact.getPhoto());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public void save(Customer model) {\n if (model.getId() != null){\n em.merge(model);\n } else {\n em.persist(model);\n }\n }", "@PUT\n\t@Produces({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML})\n\t@Consumes({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML})\n\t@Path(\"/contact/{name}\")\n\tpublic Response update(@PathParam(\"name\") String name,Contact contact){\n\t\tcontact.setName(name);\n\t\tAddressBookResponse addressBookResponse = new AddressBookResponse();\n\t\tif(processor.update(contact)){\n\t\t\taddressBookResponse.setCode(Status.OK);\n\t\t\taddressBookResponse.setMessage(\"Success\");\n\t\t\taddressBookResponse.setMessage(\"Entery got successfully created\");\n\t\t}else{\n\t\t\taddressBookResponse.setCode(Status.NOT_FOUND);\n\t\t\taddressBookResponse.setMessage(\"contact for \" + contact.getName() \n\t\t\t\t\t+ \" \"+ contact.getlName() + \" does not exist\");\n\t\t}\n\t\t\n\t\treturn Response.ok().entity(addressBookResponse).build();\n\t\t\n\t}" ]
[ "0.72532463", "0.7035317", "0.6866669", "0.6516528", "0.6363536", "0.6344951", "0.6281203", "0.59851223", "0.5975842", "0.5971673", "0.59537226", "0.5928355", "0.5925642", "0.58655065", "0.58473533", "0.58334845", "0.58052564", "0.56949383", "0.5687056", "0.5658863", "0.5656059", "0.5653759", "0.56425256", "0.5634211", "0.56302637", "0.5593807", "0.5557244", "0.5547079", "0.5539967", "0.5524399", "0.55215967", "0.55209345", "0.55110145", "0.5506196", "0.5476288", "0.5466087", "0.5464761", "0.5455292", "0.5441979", "0.544164", "0.54028225", "0.5384871", "0.53680074", "0.5346921", "0.53325874", "0.53256327", "0.53169835", "0.53138345", "0.52799386", "0.5278967", "0.52770865", "0.5265753", "0.5252708", "0.5248911", "0.5246555", "0.52464485", "0.52369595", "0.52260363", "0.5223526", "0.52069277", "0.5206601", "0.5205833", "0.52052474", "0.52042055", "0.5202982", "0.5202464", "0.52004737", "0.52000505", "0.52000505", "0.52000505", "0.51945037", "0.5191069", "0.5189036", "0.5187085", "0.5174363", "0.51734066", "0.5151525", "0.5148095", "0.5148025", "0.514427", "0.5142821", "0.51315916", "0.5127487", "0.51199085", "0.5119577", "0.50922585", "0.5085015", "0.50822794", "0.5081799", "0.5071282", "0.506178", "0.50548863", "0.5051198", "0.5046656", "0.5035053", "0.5034481", "0.5010258", "0.5008117", "0.5003061", "0.50025076" ]
0.668871
3
This method is to get All contact from Database
@Override public List<Contact> getAllContact() { List<Contact> contactList = new ArrayList<>(); List<ContactDetailsEntity> entityList = contactRepositeries.findAll(); List<ContactDetailsEntity> filterEntity = entityList.stream() .filter(entity -> "y".equals(entity.getActiveSwitch())).collect(Collectors.toList()); if (!filterEntity.isEmpty()) { filterEntity.forEach(entity -> { Contact c = new Contact(); BeanUtils.copyProperties(entity, c); contactList.add(c); }); } return contactList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Contact> getAllContacts() {\n List<Contact> contactList = new ArrayList<Contact>();\n // Select All Query\n String selectQuery = \"SELECT * FROM \" + TABLE_CONTACTS;\n\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (cursor.moveToFirst()) {\n do {\n Contact contact = new Contact();\n contact.set_id((cursor.getInt(0)));\n contact.set_name(cursor.getString(1));\n contact.set_audios(cursor.getString(2));\n contact.set_captured_image(cursor.getString(3));\n contact.set_contents(cursor.getString(4));\n contact.set_delelte_var(cursor.getInt(5));\n contact.set_gallery_image(cursor.getString(6));\n contact.set_recycle_delete(cursor.getInt(7));\n contact.set_photo(cursor.getString(8));\n // Adding contact to list\n contactList.add(contact);\n } while (cursor.moveToNext());\n }\n\n // return contact list\n return contactList;\n }", "public List<Contact> getAllContacts();", "public Cursor getAllContact()\n {\n return db.query(DATABASE_TABLE,new String[]{KEY_ROWID,KEY_NAME,\n KEY_EMAIL},null,null,null,null,null);\n }", "public String getAllContacts() {\n\t\treturn \"SELECT * FROM CONTACTS\";\n\t}", "private ArrayList<Contact> getContactList(Context context) {\n String[] selectCol = new String[] { ContactsContract.Contacts.DISPLAY_NAME,\n ContactsContract.Contacts.HAS_PHONE_NUMBER, ContactsContract.Contacts._ID };\n\n final int COL_NAME = 0;\n final int COL_HAS_PHONE = 1;\n final int COL_ID = 2;\n\n // the selected cols for phones of a user\n String[] selPhoneCols = new String[] { ContactsContract.CommonDataKinds.Phone.NUMBER,\n ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME, ContactsContract.CommonDataKinds.Phone.TYPE };\n\n final int COL_PHONE_NUMBER = 0;\n final int COL_PHONE_NAME = 1;\n final int COL_PHONE_TYPE = 2;\n\n String select = \"((\" + Contacts.DISPLAY_NAME + \" NOTNULL) AND (\" + Contacts.HAS_PHONE_NUMBER + \"=1) AND (\"\n + Contacts.DISPLAY_NAME + \" != '' ))\";\n\n ArrayList<Contact> list = new ArrayList<Contact>();\n Cursor cursor = context.getContentResolver().query(ContactsContract.Contacts.CONTENT_URI, selectCol, select,\n null, ContactsContract.Contacts.DISPLAY_NAME + \" COLLATE LOCALIZED ASC\");\n if (cursor == null) {\n return list;\n }\n if (cursor.getCount() == 0) {\n return list;\n }\n\n cursor.moveToFirst();\n while (!cursor.isAfterLast()) {\n int contactId;\n contactId = cursor.getInt(cursor.getColumnIndex(ContactsContract.Contacts._ID));\n if (cursor.getInt(COL_HAS_PHONE) > 0) {\n // the contact has numbers\n // 获得联系人的电话号码列表\n String displayName;\n displayName = cursor.getString(COL_NAME);\n Cursor phoneCursor = context.getContentResolver().query(\n ContactsContract.CommonDataKinds.Phone.CONTENT_URI, selPhoneCols,\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \"=\" + contactId, null, null);\n if (phoneCursor.moveToFirst()) {\n do {\n // 遍历所有的联系人下面所有的电话号码\n String phoneNumber = phoneCursor.getString(COL_PHONE_NUMBER);\n Contact contact = new Contact(0, displayName);\n contact.phoneNumber = phoneNumber;\n list.add(contact);\n } while (phoneCursor.moveToNext());\n \n phoneCursor.close();\n }\n }\n cursor.moveToNext();\n }\n \n cursor.close();\n\n return list;\n }", "public List<Person> readContactlist()\n {\n List<Person> personList=new ArrayList<Person>();\n\n ContentResolver resolver = getContentResolver();\n Cursor cursor = resolver.query(ContactsContract.Contacts.CONTENT_URI, null, null, null, null);\n\n while (cursor.moveToNext()) {\n String id = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts._ID));\n String name = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));\n\n\n Cursor phoneCursor = resolver.query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null,\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \"= ?\", new String[]{id}, null);\n\n\n while (phoneCursor.moveToNext()) {\n String phoneNumber = phoneCursor.getString(phoneCursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n\n personList.add(new Person(name, phoneNumber));\n }\n }\n return personList;\n }", "public ArrayList<Contact> getAllContacts(){\r\n\t\t\r\n\t\tArrayList<Contact> contacts = new ArrayList<Contact>();\r\n\t\tSQLiteDatabase db = this.getReadableDatabase();\r\n\t\t\r\n\t\tCursor cursor = db.query(DBHelper.CONTACT_TABLE_NAME,\r\n\t\t\t\tnew String[] {DBHelper.COLUMN_NAME, DBHelper.COLUMN_GROUP,\r\n\t\t\t\tDBHelper.COLUMN_LATITUDE, DBHelper.COLUMN_LONGITUDE,\r\n\t\t\t\tDBHelper.COLUMN_MESSAGE, DBHelper.COLUMN_SHARE},\r\n\t\t\t\tnull, null,\r\n\t\t\t\tnull, null, null);\r\n\t\t\r\n\t\tcursor.moveToFirst();\r\n\t while (!cursor.isAfterLast()) {\r\n\t contacts.add(new Contact(cursor.getString(0), cursor.getString(1),\r\n\t \t\t cursor.getDouble(2), cursor.getDouble(3), cursor.getString(4),\r\n\t \t\t int_to_boolean(cursor.getInt(5))));\r\n\t cursor.moveToNext();\r\n\t }\r\n\t \r\n\t cursor.close();\r\n\t db.close();\r\n\t \r\n\t return contacts;\r\n\t}", "@Override\n\tpublic List<Contact> getAllContacts() {\n\t\t\n\t\treturn repository.findAll();\n\t}", "public ArrayList<String[]> getAllContacts() {\n ArrayList<String[]> returnlist = new ArrayList<String[]>();\n // Select All Query\n String selectQuery = \"SELECT * FROM \" + TABLE_NAME;\n\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (cursor.moveToFirst()) {\n do {\n ArrayList<String> data = new ArrayList<String>();\n for (int i =0; i<cursor.getColumnCount(); i++){\n data.add(cursor.getString(i));\n }\n // Adding contact to list\n returnlist.add(data.toArray(new String[returnlist.size()]));\n } while (cursor.moveToNext());\n }\n\n // return contact list\n cursor.close();\n db.close();\n return returnlist;\n }", "public List<ContactBE> getContacts() {\n List<ContactBE> contacts = new ArrayList<>();\n\n try (ContactCurserWrapper cursor = queryContacts(null, null)) {\n cursor.moveToFirst();\n while (!cursor.isAfterLast()) {\n contacts.add(cursor.getContact());\n cursor.moveToNext();\n }\n }\n return contacts;\n }", "private void getContactList() {\r\n\r\n\t\tgroupData.clear();\r\n\t\tchildData.clear();\r\n\t\tDataHelper dataHelper = new DataHelper(ContactsActivity.this);\r\n\t\tdataHelper.openDatabase();\r\n\t\tgroupData = dataHelper.queryZoneAndCorpInfo(childData);\r\n\t\tdataHelper.closeDatabase();\r\n\t\thandler.sendEmptyMessage(1);\r\n\r\n\t\tif (groupData == null || groupData.size() == 0) {\r\n\t\t\tDataTask task = new DataTask(ContactsActivity.this);\r\n\t\t\ttask.execute(Constants.KServerurl + \"GetAllOrgList\", \"\");\r\n\t\t}\r\n\t}", "@Override\n\tpublic List<Contact> findAll() throws Exception {\n\t\treturn queryEntity(\"select * from contact\", null);\n\t}", "public ArrayList<Contact> loadContacts()\n\t{\n\t\t//TODO gestion des infos\n\t\t\n\t\t/* Requete SQL */\n\t\tCursor cursor = mainDatabase.rawQuery(\"SELECT \" + DBContract.ContactTable.CONTACT_ID[0] + \", \" +\n\t\t\t\tDBContract.ContactTable.NAME[0] + \", \" + DBContract.ContactTable.SURNAME[0] + \", \" + \n\t\t\t\tDBContract.ContactTable.BILL[0] + \" FROM \" + DBContract.ContactTable.TABLE_NAME, null);\n\t\t\n\t\tArrayList<Contact> result = new ArrayList<Contact>();\n\t\t\n\t\t/* Parcour du resultat */\n\t\tif(cursor.moveToFirst())\n\t\t{\n\t\t\t\twhile(!cursor.isAfterLast())\n\t\t\t\t{\n\t\t\t\t\t/* Instancie le nouveau contact : id-nom-prenom */\n\t\t\t\t\tContact tmp = new Contact(cursor.getInt(0), cursor.getString(1), cursor.getString(2));\n\t\t\t\t\ttmp.addToBill(cursor.getDouble(3));\t\n\t\t\t\t\tresult.add((int) (tmp.getId() - 1), tmp); //TODO mod -1 //TODO verifier qu'il n'y a pas d'id 0 et que tout se passe bien !\n\t\t\t\t\tcursor.moveToNext();\n\t\t\t\t}\n\t\t}\n\t\tcursor.close();\n\t\treturn result;\n\t}", "@Override\n\tpublic List<Contact> listContact() {\n\t\ttry {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"************************* je suis dans Liste des contacts *********************************\");\n\t\t\tsession = HibernateUtil.getSessionFactory().openSession();\n\t\t\ttx = session.beginTransaction();\n\n\t\t\tQuery query = session.createQuery(\"from Contact\");\n\n\t\t\tSystem.out.println(\"\\n\");\n\t\t\tSystem.out.println(\"liste des contacts: \" + String.valueOf(query.list()));\n\n\t\t\tList<Contact> lc = (List<Contact>) query.list();\n\t\t\ttx.commit();\n\t\t\tsession.close();\n\n\t\t\treturn lc;\n\n\t\t} catch (HibernateException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "public ArrayList<Contacto> obtenerDatos(){\n\n BaseDatos db=new BaseDatos(context);\n insertarContactos(db);\n\n return db.obtenerTodosContactos();\n\n }", "public Collection<Contact> getContacts();", "public List<contact> contact_get_all() {\n \treturn contact_get(null, KEY_CONTACT_LASTACT + \" DESC\");\n }", "public List getAllContacts() {\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor mCursor = db.query(DATABASE_TABLE, new String[]{KEY_ROWID, KEY_EVENT, KEY_TIME, KEY_TAG}, null, null, null, null, null, null);\n if (mCursor != null) {\n while (mCursor.moveToNext()) {\n String event = mCursor.getString(mCursor.getColumnIndex(\"event\"));\n String time = mCursor.getString(mCursor.getColumnIndex(\"time\"));\n int tag = mCursor.getInt(mCursor.getColumnIndex(\"tag\"));\n int ID=mCursor.getInt(mCursor.getColumnIndex(\"_id\"));\n Log.d(\"55555555555\",String.valueOf(ID)+\"getallcontacts\");\n if (tag==0) {\n eventbeanList.add(new eventbean(false, event, time, ID));\n }\n }\n }\n mCursor.close();\n db.close();\n return eventbeanList;\n }", "private List<ModelContacts> getContact(){\n String contenue_ecran = tableView.getText().toString().trim();\n List<ModelContacts> list = new ArrayList<>();\n if (!contenue_ecran.equals(\"\")) {\n Cursor cursor = this.getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n null, null, null,\n ContactsContract.Contacts.DISPLAY_NAME + \" ASC\");\n assert cursor != null;\n cursor.moveToFirst();\n while (cursor.moveToNext()) {\n String phoneNumber = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n String name = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME));\n String image = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.PHOTO_ID));\n String formatPhoneNumber = \"<font color='#42A5F5'><b>\" + contenue_ecran + \"</b></font>\";\n String formatPhone = phoneNumber.replace(contenue_ecran, formatPhoneNumber);\n if (phoneNumber.contains(contenue_ecran)) {\n list.add(new ModelContacts(name, image, formatPhone));\n }\n }\n cursor.close();\n }\n return list;\n }", "public List<HashMap<String,String>> contacts() {\n final Uri uriContact = ContactsContract.CommonDataKinds.Phone.CONTENT_URI;\n ContentResolver cr = getActivity().getContentResolver();\n Cursor cur = cr.query(uriContact, null, null, null, null);\n\n List<HashMap<String,String>> contacts=new ArrayList<>();\n if (cur.getCount() > 0) {\n while (cur.moveToNext()) {\n String id = cur.getString(\n cur.getColumnIndex(ContactsContract.CommonDataKinds.Phone._ID));\n String name = cur.getString(\n cur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME));\n\n\n String has_phone = cur.getString(cur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.HAS_PHONE_NUMBER));\n HashMap<String,String> contact=new HashMap();\n if(!has_phone.endsWith(\"0\"))\n {\n contact.put(\"name\", name);\n String phoneNumber = cur.getString(cur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n contact.put(\"number\",phoneNumber);\n contacts.add(contact);\n }\n }\n }\n this.contacts_phone=contacts;\n contacts=filter_to_app(contacts);\n return contacts;\n }", "public static ObservableList<Contacts> getAllContacts() {\n try {\n Connection conn = DBConnection.getConnection();\n DBQuery.setStatement(conn);\n Statement statement = DBQuery.getStatement();\n String query = \"SELECT * FROM contacts\";\n ResultSet rs = statement.executeQuery(query);\n while(rs.next()) {\n\n Contacts newContact = new Contacts();\n newContact.setContact_ID(rs.getInt(\"Contact_ID\"));\n newContact.setContact_Name(rs.getString(\"Contact_Name\"));\n newContact.setEmail(rs.getString(\"Email\"));\n Contacts.addContacts(newContact); \n\n }\n statement.close();\n return contact;\n } catch (SQLException e) {\n System.out.println(\"SQLException: \" + e.getMessage());\n return null;\n }\n}", "public List<MessageInfo> getAllInfo() {\n List<MessageInfo> messageList = new ArrayList<MessageInfo>();\n // Select All Query\n String selectQuery = \"SELECT * FROM \" + TABLE_CONTACTS;\n\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (cursor.moveToFirst()) {\n do {\n\n MessageInfo messageInfo = new MessageInfo();\n messageInfo.setBankName(cursor.getString(0));\n messageInfo.setDate(cursor.getString(1));\n messageInfo.setCreDeb(cursor.getString(2));\n messageInfo.setAccNumber(cursor.getString(3));\n messageInfo.setBal(cursor.getFloat(4));\n messageInfo.setAmount(cursor.getFloat(5));\n messageList.add(messageInfo);\n\n\n } while (cursor.moveToNext());\n }\n\n // return contact list\n cursor.close();\n return messageList;\n }", "private void requestContactInformation() {\n CONTACTS = new ArrayList<>();\n\n Cursor c = getContentResolver().query(ContactsContract.Contacts.CONTENT_URI,\n null, null, null,\n ContactsContract.Contacts.DISPLAY_NAME_PRIMARY + \" asc\");\n\n while(c.moveToNext()) {\n HashMap<String, String> map = new HashMap<String, String>();\n String id = c.getString(c.getColumnIndex(ContactsContract.Contacts._ID));\n String name = c.getString(c.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME_PRIMARY));\n\n Cursor phoneCursor = getContentResolver().query(\n ContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n null,\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \" = \" + id,\n null, null\n );\n\n if (phoneCursor.moveToFirst()) {\n String number = phoneCursor.getString(phoneCursor.getColumnIndex(\n ContactsContract.CommonDataKinds.Phone.NUMBER\n ));\n CONTACTS.add(Pair.create(name, number));\n }\n\n phoneCursor.close();\n }\n\n }", "@Override\n @Transactional\n public List<Contacts> findAll() {\n Session currentSession = entiyManager.unwrap(Session.class);\n\n //create the query\n\n Query<Contacts> theQuery = currentSession.createQuery(\"from Contacts\", Contacts.class);\n\n //execute query and get result list\n\n List<Contacts> contacts = theQuery.getResultList();\n\n //return the results\n\n return contacts;\n }", "public void allContacts(){\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(\"./src/data/contactInfo.text\"));\n\t\t\tString line;\n\t\t\twhile((line = reader.readLine()) != null){\n\t\t\t\tSystem.out.println(line);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "private List<Contact> getContactsList() {\n\n\t\tList<Contact> contactsList = new ArrayList<>();\n\n\t\tContentResolver cr = getActivity().getContentResolver();\n\n\t\t// Obtiene toda la informarciónd de los contactos\n\t\tCursor cursor = getActivity().getContentResolver().query(\n\t\t\t\tContactsContract.Contacts.CONTENT_URI, null, null, null,\n\t\t\t\t\"display_name\");\n\t\t// Obtiene el número de la columnas que queremos almacenar.\n\t\tint idIndex = cursor.getColumnIndex(ContactsContract.Contacts._ID);\n\t\tint displayNameIndex = cursor\n\t\t\t\t.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME);\n\n\t\tcursor.moveToFirst();\n\t\twhile (cursor.moveToNext()) {\n\t\t\t// Comprueba que tenga numero de teléfono\n\t\t\tif (Integer\n\t\t\t\t\t.parseInt(cursor.getString(cursor\n\t\t\t\t\t\t\t.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER))) > 0) {\n\t\t\t\tString id = cursor.getString(idIndex);\n\t\t\t\tString name = cursor.getString(displayNameIndex);\n\t\t\t\tString phone = null;\n\n\t\t\t\tString selectionArgs = Phone.CONTACT_ID + \" = ? AND \"\n\t\t\t\t\t\t+ Phone.TYPE + \"= \" + Phone.TYPE_MOBILE;\n\n\t\t\t\tCursor pCur = cr.query(\n\t\t\t\t\t\tContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n\t\t\t\t\t\tnew String[] { Phone.NUMBER }, selectionArgs,\n\t\t\t\t\t\tnew String[] { id }, null);\n\n\t\t\t\tif (pCur.moveToFirst()) {\n\t\t\t\t\tphone = pCur.getString(0);\n\n\t\t\t\t}\n\t\t\t\tpCur.close();\n\n\t\t\t\t// Crea el objeto contact\n\t\t\t\tContact contact = new Contact(id, name, phone);\n\t\t\t\tcontactsList.add(contact);\n\t\t\t}\n\n\t\t}\n\n\t\treturn contactsList;\n\n\t}", "@Override\n\tpublic List<Contact> allContacts() {\n\t\treturn null;\n\t}", "private List getContactNames() {\n List<Contact> contacts = new ArrayList<>();\n // Get the ContentResolver\n ContentResolver cr = getContentResolver();\n // Get the Cursor of all the contacts\n Cursor cursor = cr.query(ContactsContract.Contacts.CONTENT_URI, null, null, null, null);\n while (cursor.moveToNext()) {\n\n\n //Sjekker om kontakt har et tlf nummer\n String hasNumber = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.HAS_PHONE_NUMBER));\n String contactName = \"\";\n if (hasNumber.equals(\"1\")) {\n contactName = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME));\n\n Contact contact = new Contact(contactName);\n contacts.add(contact);\n\n\n }\n }\n cursor.close();\n return contacts;\n }", "public static Cursor getDashboardContactList() {\n\t\tLog.d(\" QuizApp--SQLHelper\", \"Contact--Querying Data\");\n\t\treturn db.rawQuery(\"select * from Contact order by name\", null);\n\t}", "private void getContactDataBefore() {\n int i = 0;\n List<String> list = new ArrayList<>();\n\n Cursor c1 = getContentResolver()\n .query(ContactsContract.Contacts.CONTENT_URI, null, null, null, null);\n\n if ((c1 != null) && c1.moveToFirst()) {\n\n // add contact id's to the mIDs list\n do {\n String id = c1.getString(c1.getColumnIndexOrThrow(ContactsContract.Contacts._ID));\n String name = c1.getString(c1.getColumnIndexOrThrow(ContactsContract.Contacts.DISPLAY_NAME));\n\n // query all contact numbers corresponding to current id\n Cursor c2 = getContentResolver()\n .query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n new String[]{ContactsContract.CommonDataKinds.Phone.NUMBER},\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \"=?\",\n new String[]{id}, null);\n\n if (c2 != null && c2.moveToFirst()) {\n // Log.d(\"DEBUG\",\"name =\" + name);\n list = new ArrayList<>();\n\n if (idsHash.containsKey(name)) {\n list = idsHash.get(name);\n } else {\n mIDs.add(id);\n mNames.add(name);\n mNumbers.add(c2.getString(c2\n .getColumnIndexOrThrow(ContactsContract.CommonDataKinds.Phone.NUMBER)));\n }\n\n list.add(id);\n idsHash.put(name, list);\n\n c2.close();\n } else {\n c2.close();\n }\n\n i++;\n } while (c1.moveToNext() && i < c1.getCount());\n\n c1.close();\n }\n }", "@GetMapping(\"/contacts\")\r\n\tCollectionModel<EntityModel<Contact>> all() {\r\n\t\t//Use map to call toModel on each Contact resource\r\n\t List<EntityModel<Contact>> contacts = repo.findAll().stream()\r\n\t .map(assembler::toModel)\r\n\t .collect(Collectors.toList());\r\n\t return CollectionModel.of(contacts, linkTo(methodOn(ContactController.class).all()).withSelfRel());\r\n\t}", "public static ArrayList<Contact> read(Context context){\n ContactUtil contactUtil = new ContactUtil();\n ArrayList<Contact> result = contactUtil.getContactList(context);\n return result;\n }", "public ReactorResult<Contact> getAllConductor_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), CONDUCTOR, Contact.class);\r\n\t}", "@GetMapping(\"getAll\")\n\tpublic ServiceResponse<ContactAllResponse> getAll() {\n\t\treturn contactService.getAll();\n\t}", "private List<String> queryForAll() {\n // query for all of the data objects in the database\n List<Contact> list = dao.queryForAll();\n List<String> creadentials = new ArrayList<String>();\n for (Contact contact : list) {\n creadentials.add(contact.email);\n creadentials.add(contact.password);\n }\n return creadentials;\n }", "@Override\n public List<User> getContacts() {\n if (contacts.isEmpty()) {\n contacts.addAll(readFromFile());\n }\n\n // else return the current list of contacts\n return contacts;\n }", "public static List<Contact> getContacts() {\n List<Contact> contacts = new ArrayList<>();\n contacts.add(new Contact(\"Rabbit\", R.drawable.rabbit, \"4153508881\"));\n contacts.add(new Contact(\"Sheep\", R.drawable.sheep, \"4153508882\"));\n contacts.add(new Contact(\"Octopus\", R.drawable.octopus, \"4153508883\"));\n contacts.add(new Contact(\"Cat\", R.drawable.cat, \"4153508884\"));\n contacts.add(new Contact(\"Lion\", R.drawable.lion, \"4153508885\"));\n contacts.add(new Contact(\"Sheep\", R.drawable.sheep, \"4153508886\"));\n contacts.add(new Contact(\"Dog\", R.drawable.dog, \"4153508887\"));\n contacts.add(new Contact(\"Horse\", R.drawable.horse, \"4153508888\"));\n return contacts;\n }", "public List<String> getContactosEmpresa(String idEmpresa) {\n List<String> contactos = new ArrayList<>();\n String contacto;\n\n try{\n connection = con.connect();\n PreparedStatement stm = connection.prepareStatement(\"SELECT Contacto FROM Contactos \" +\n \"WHERE Empresa_ID = \" + idEmpresa);\n ResultSet rs = stm.executeQuery();\n\n while(rs.next()){\n contacto = rs.getString(\"Contacto\");\n contactos.add(contacto);\n }\n }\n catch (Exception e){\n e.getMessage();\n }\n finally {\n con.close(connection);\n }\n return contactos;\n }", "public void findContact(){\n EtecsaDB database = new EtecsaDB(this.getContext());\n if (!database.hasDatabase()){\n Toast.makeText(this.getContext(), R.string.no_database, Toast.LENGTH_SHORT).show();\n }\n else //buscar contacto\n new Search(this.getActivity()).execute(advancedSearch);\n }", "public List<IContact> getContacts();", "java.util.List<org.multibit.hd.core.protobuf.MBHDContactsProtos.Contact> \n getContactList();", "public void loadContacts()\n {\n Contact sdhb = new Contact(\"SDHB\", \"(03) 474 00999\");\n //Hospitals\n Contact southland = new Contact(\"Southland Hospital\", \"(03) 218 1949\");\n Contact lakes = new Contact(\"Lakes District Hostpital\", \"(03) 441 0015\");\n Contact dunedin = new Contact(\"Dunedin Hospital\", \"(03) 474 0999\");\n Contact wakari = new Contact(\"Wakari Hospital\", \"(03) 476 2191\");\n //Departments\n Contact compD = new Contact(\"Complements & Complaints (Otago)\", \"(03) 470 9534\");\n Contact compS = new Contact(\"Complements & Complaints (Southland)\", \"(03) 214 5738\");\n\n contacts = new Contact[]{sdhb, dunedin, southland, lakes, wakari, compD, compS};\n }", "com.ubtrobot.phone.PhoneCall.Contact getContactList(int index);", "com.ubtrobot.phone.PhoneCall.Contact getContactList(int index);", "com.ubtrobot.phone.PhoneCall.Contact getContactList(int index);", "com.ubtrobot.phone.PhoneCall.Contact getContactList(int index);", "public static ArrayList<Contact> getAllContacts() {\n class Local {\n }\n String function_name = Local.class.getEnclosingMethod().getName();\n System.out.println(\"Function name: \" + function_name);\n Connection conn = null;\n Statement stmt = null;\n ArrayList<Contact> theList = new ArrayList<>();\n try {\n //STEP 2: Register JDBC driver\n Class.forName(Constants.JDBC_DRIVER);\n\n //STEP 3: Open a connection\n //System.out.println(\"Connecting to database...\");\n conn = DriverManager.getConnection(Constants.DB_URL, Constants.DB_USER,\n Constants.DB_PASS);\n\n //STEP 4: Execute a query\n //System.out.println(\"Creating statement...\");\n stmt = conn.createStatement();\n String sql;\n sql = \"SELECT * FROM Contact ;\";\n //STEP 5: Extract data from result set\n try (ResultSet rs = stmt.executeQuery(sql)) {\n //STEP 5: Extract data from result set\n while (rs.next()) {\n Contact tobeAdded = new Contact();\n //Retrieve by column name\n tobeAdded.setId(rs.getLong(\"idContact\"));\n tobeAdded.setName(rs.getString(\"Name\"));\n tobeAdded.setEmail(rs.getString(\"email\"));\n tobeAdded.setMobile(rs.getString(\"mobile\"));\n tobeAdded.setPhone(rs.getString(\"phone\"));\n tobeAdded.setAddressOffice(rs.getString(\"addressoffice\"));\n tobeAdded.setAddressHome(rs.getString(\"addresshome\"));\n\n //Add to the list\n theList.add(tobeAdded);\n }\n //STEP 6: Clean-up environment\n }\n stmt.close();\n conn.close();\n return theList;\n } catch (SQLException | ClassNotFoundException se) {\n //Handle errors for JDBC\n System.out.println(se.getMessage());\n } //Handle errors for Class.forName\n finally {\n //finally block used to close resources\n try {\n if (stmt != null) {\n stmt.close();\n }\n } catch (SQLException se2) {\n System.out.println(se2.getMessage());\n }// nothing we can do\n try {\n if (conn != null) {\n conn.close();\n }\n } catch (SQLException se) {\n System.out.println(se.getMessage());\n }//end finally try\n }//end try\n //System.out.println(\"Goodbye!\");\n return null;\n }", "java.util.List<com.ubtrobot.phone.PhoneCall.Contact>\n getContactListList();", "java.util.List<com.ubtrobot.phone.PhoneCall.Contact>\n getContactListList();", "java.util.List<com.ubtrobot.phone.PhoneCall.Contact>\n getContactListList();", "java.util.List<com.ubtrobot.phone.PhoneCall.Contact>\n getContactListList();", "@Override\n\tpublic Set<Contact> getContacts(){\n\t\treturn contacts;\n\t}", "public List<Contact> getContactsInGroup() {\r\n\t\t/**\r\n\t\t * re-fresh the group attribute by re-getting the group object in the\r\n\t\t * database to keep updated all modifications made in group before.\r\n\t\t */\r\n\t\tthis.group = this.groupEjb.getGroupById(this.getGroupId());\r\n\t\treturn this.groupEjb.getAllContactsInGroup(this.group);\r\n\t}", "public String getContacts() {\n return contacts;\n }", "private List<BasicContact> getDataForListView() {\n\t\tlong groupId = getIntent().getLongExtra(Constants.INTENT_LONG_GROUP_ID, -1L);\r\n\t\tHashSet<Long> rawContactIds;\r\n\t\tif (groupId != -1) { // a group was selected\r\n\t\t\tList<Long> groupIds = new ArrayList<Long>(1);\r\n\t\t\tgroupIds.add(groupId);\r\n\t\t\trawContactIds = ContactsHelper.getRawContactIds(LabelView.this, groupIds);\r\n\t\t} else { // a tag was selected\r\n\t\t\trawContactIds = ContactsHelper.getRawContactIdsGivenTag(LabelView.this,\r\n\t\t\t\t\tmLabel);\r\n\t\t}\r\n\t\t\r\n\t\treturn ApplicationData.getBasicContacts(rawContactIds);\r\n\t}", "public List<Contact> getAllContactsByName(String searchByName);", "public List<Contact> getContacts(Long id){\n contacts.clear();\n return contactsAndChildrenParser.getContacts(id);\n }", "public static List<Contact> getContacts() {\n return new ArrayList<>(contacts.values());\n }", "public List<PersonContact> getContacts() {\n if (this.contacts == null) {\n this.contacts = new ArrayList<>();\n }\n return contacts;\n }", "public Collection<Contact> getContacts() {\n\t\treturn this.contacts.values();\n\t}", "public CallSpec<List<XingUser>, HttpError> getYourContacts() {\n return getContacts(ME);\n }", "public List<Donor> getAllDonors() {\n List<Donor> donorList = new ArrayList<Donor>();\n // Select All Query\n String selectQuery = \"SELECT * FROM \" + TABLE_CONTACTS;\n\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (cursor.moveToFirst()) {\n do {\n Donor donor = new Donor();\n donor.setName(cursor.getString(0));\n donor.setContuctNumber(cursor.getString(1));\n donor.setCity(cursor.getString(2));\n donor.setBloodGroup(cursor.getString(3));\n donor.setLat(cursor.getString(4));\n donor.setLan(cursor.getString(5));\n // Adding contact to list\n donorList.add(donor);\n } while (cursor.moveToNext());\n }\n\n // return contact list\n return donorList;\n }", "private void fetchContacts() {\n tableList.clear();\n for(int i = 0;i<8;i++){\n Table table = new Table();\n table.setImage(image[i]);\n Log.d(\"trieu\",string1[i]);\n table.setString1(string1[i]);\n table.setString2(string2[i]);\n tableList.add(table);\n }\n\n //MyApplication.getInstance().addToRequestQueue(request);\n }", "public ArrayList<String> getContacts()\r\n\t{\r\n\t\treturn contacts;\r\n\t}", "public ReactorResult<Contact> getAllComposer_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), COMPOSER, Contact.class);\r\n\t}", "public ArrayList<Mascota> obtenerDatos(){\n\n BaseDatos db = new BaseDatos(context);\n\n ArrayList<Mascota> aux = db.obtenerTodoslosContactos();\n\n if(aux.size()==0){\n insertarMascotas(db);\n aux = db.obtenerTodoslosContactos();\n }\n\n return aux;\n }", "public void prepareContactData(long num) {\n\n //ASSIGN SELECTION VARIABLE WITH NUMBER FROM NUMPAD\n String[] selectionArgs = {String.valueOf(num) + \"%\"};\n\n List<Contact> contactList = new ArrayList<>();\n\n cAdapter = new ContactAdapter(contactList);\n recyclerView.setAdapter(cAdapter);\n\n //DISPLAY ALL\n if(num == 0) {\n cursor = database.query(DBContract.Contact.TABLE_NAME, projection, null, null, null, null, null, null);\n }\n //DISPLAY ONLY SELECTED DATA\n else {\n cursor = database.query(DBContract.Contact.TABLE_NAME, projection, selection, selectionArgs, null, null, null, null);\n }\n\n String name, phone, id;\n\n while(cursor.moveToNext()) {\n int index;\n\n index = cursor.getColumnIndexOrThrow(\"name\");\n name = cursor.getString(index);\n\n index = cursor.getColumnIndexOrThrow(\"phone\");\n phone = cursor.getString(index);\n\n index = cursor.getColumnIndexOrThrow(\"uid\");\n id = cursor.getString(index);\n\n contactList.add(new Contact(name, Long.valueOf(phone)));\n\n Log.d(\"TAG\", \"Name : \" + name);\n Log.d(\"TAG\", \"Phone : \" + phone);\n Log.d(\"TAG\", \"ID : \" + id);\n }\n\n //REFRESH ADAPTER LIST\n cAdapter.notifyDataSetChanged();\n }", "private void getAll(){\n if (!LOADED_ALL) {\n Message msg_getpersons = Message.obtain(getPersonsHandlerThread.getHandler());\n msg_getpersons.what = GetPersonsHandlerThread.TASK_GET_PERSONS;\n int table1 = TABLE_ALL;\n msg_getpersons.arg1 = table1;\n Log.d(TAG, \"DbOperationsRunnable: run(): preparing message msg_getperson with following attributes:\");\n Log.d(TAG, \"DbOperationsRunnable: run(): msg_getpersons.what = \" + msg_getpersons.what);\n Log.d(TAG, \"DbOperationsRunnable: run(): msg_getpersons.arg1 = \" + msg_getpersons.arg1);\n Log.d(TAG, \"DbOperationsRunnable: run(): sending message...\");\n msg_getpersons.sendToTarget();\n while (true) {\n if (DONE_TASK_GETPERSONS) {\n DONE_TASK_GETPERSONS = false;\n break;\n }\n }\n LOADED_ALL = true;\n } else {\n persons_list.clear();\n persons_list.addAll(all_list);\n }\n }", "@Override\r\n protected Cursor doInBackground(Long... params)\r\n {\r\n databaseConnector.open();\r\n \r\n // get a cursor containing all data on given entry\r\n return databaseConnector.getOneContact(params[0]);\r\n }", "public void viewAllContacts(AddressBookDict addressBook) {\n\t\tlog.info(\"Enter the address book name of whose contact list you want to see\");\n\t\tString addressBookName = obj.next();\n\t\tList<PersonInfo> ContactList = addressBook.getContactList(addressBookName);\n\t\tif (ContactList.isEmpty()) {\n\t\t\tlog.info(\"List is empty\");\n\t\t} else {\n\t\t\tlog.info(\"Contacts in address book \" + addressBookName + \"are :\");\n\t\t\tContactList.stream().forEach((System.out::println));\n\t\t\tlog.info(\"\\n\");\n\t\t}\n\t}", "public ReactorResult<Contact> getAllEncodedBy_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), ENCODEDBY, Contact.class);\r\n\t}", "public void mostrarContactos() {\n\t\tfor (int i = 0; i < this.listaContactos.size(); i++) {\n\t\t\tSystem.out.println(this.listaContactos.get(i).mostrarDatos());\n\t\t}\n\t}", "public ReactorResult<Contact> getAllLicensee_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), LICENSEE, Contact.class);\r\n\t}", "public ReactorResult<Contact> getAllInterpretedBy_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), INTERPRETEDBY, Contact.class);\r\n\t}", "private String populateContacts() {\n // fetch the additional information (currently phone numbers)\n Map<Integer, List<Pair<String, Integer>>> numberCache = getAdditionalInformation();\n\n Cursor cursor = mContentResolver.query(\n ContactsContract.Contacts.CONTENT_URI, QUERY_PROJECTION_CONTACT, null, null, QUERY_ORDERING_CONTACT);\n\n int idIndex = cursor.getColumnIndex(ContactsContract.Contacts._ID);\n int nameIndex = cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME_PRIMARY);\n int hasNumberIndex = cursor.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER);\n\n StringBuilder concatList = new StringBuilder();\n\n // First thing we need to do is sanitize the queryString and split into tokens. One\n // important purpose of doing this is to verify if we truly have tokens to apply to a\n // search process. If we are left with an empty query, then we can simply return the\n // entire contact list. The way the algorithm logic flows, there must be at least one\n // query token in the list, even if a blank placeholder.\n ArrayList<String> sanitizedQueryTokens = new ArrayList<String>();\n if (mQueryString != null) {\n // split up the query string into tokens, based on whitespace and asterisks\n String[] queryTokens = mQueryString.trim().split(\"[\\\\*\\\\s]+\");\n // get rid of any empty string references\n for (String currentString : queryTokens) {\n if (!currentString.equals(\"\")) {\n sanitizedQueryTokens.add(currentString);\n }\n }\n // if the ArrayList is empty, then we assume match everything\n if (sanitizedQueryTokens.size() == 0) {\n mQueryString = null;\n }\n }\n\n // Now perform the search. If the queryString is null, then the search reduces\n // to a dump of all contacts\n if ( mQueryString == null) {\n // The search algorithm is designed to work without search criteria (reduction to\n // entire list dumped). However we need at least one query token to enter the main\n // search loop.\n sanitizedQueryTokens.add(\"\");\n }\n\n StringBuilder concatListMatches = new StringBuilder();\n int numMatches = 0;\n\n while (cursor.moveToNext()) {\n String currentName = cursor.getString(nameIndex);\n\n if (currentName != null && !currentName.isEmpty()) {\n // If we are not actually performing a search, we still need to enter this loop\n // once (hence why we added a blank term above).\n for (String currentString : sanitizedQueryTokens) {\n // Add this contact to the list if we are either not performing a search\n // or if the current search criteria (token) matches\n if (mQueryString == null || currentName.toLowerCase().contains(\n currentString.toLowerCase())) {\n\n concatListMatches.append(currentName).append(\"\\n\");\n\n // If this contact has phone number(s), display them\n if (cursor.getInt(hasNumberIndex) > 0) {\n // grab the number(s) from the phat cache\n List<Pair<String, Integer>> phNums;\n if ((phNums = numberCache.get(cursor.getInt(idIndex))) != null) {\n // Pair<Phone Number, Type of Number>\n for (Pair<String, Integer> phNum : phNums) {\n concatListMatches.append(\"\\t\").append(phNum.first);\n switch(phNum.second) {\n case ContactsContract.CommonDataKinds.Phone.TYPE_HOME:\n concatListMatches.append(\" [HOME]\");\n break;\n case ContactsContract.CommonDataKinds.Phone.TYPE_MOBILE:\n concatListMatches.append(\" [MOBILE]\");\n break;\n case ContactsContract.CommonDataKinds.Phone.TYPE_WORK:\n concatListMatches.append(\" [WORK]\");\n break;\n }\n concatListMatches.append(\"\\n\");\n }\n } else {\n // This should not happen. Means that there is a contact in which a\n // phone number is associated but yet no such number actually can\n // be found in the DB\n concatList.append(\"\\t<Phone number referenced, but not found>\\n\");\n }\n }\n\n ++numMatches;\n break;\n }\n }\n }\n }\n concatList.append(numMatches).append(\" Contacts Found\\n\\n\").append(concatListMatches);\n\n Log.d(\"populate contact list \",\"str \"+concatList.toString());\n return concatList.toString();\n }", "public static List<Contact> getContacts(String user) {\n UserInfo userInfo = UserInfo.find().where().eq(\"email\", user).findUnique();\n if (userInfo == null) {\n return null;\n }\n else {\n return userInfo.getContacts();\n }\n }", "public JSONArray getContactsWithImages() throws JSONException {\r\n JSONArray contacts = new JSONArray();\r\n// String selectQuery = \"SELECT member_phone, isAdmin, date_joined, display_name FROM GROUPMEMBER LEFT JOIN \"+ Contacts.TABLE_CONTACTS +\" ON phone = member_phone where group_unique_id='\"+ group_id +\"' AND membership_status='joined'\";\r\n// String selectQuery = \"SELECT contacts.phone, display_name, _id, detailsshared, status, on_cloudkibo, image_uri FROM \" + Contacts.TABLE_CONTACTS +\" LEFT JOIN CONTACT_IMAGE ON contacts.phone = CONTACT_IMAGE.phone where on_cloudkibo='true'\";\r\n String selectQuery = \"SELECT contacts.phone, display_name, _id, detailsshared, status, on_cloudkibo, image_uri FROM \" + Contacts.TABLE_CONTACTS +\" where on_cloudkibo='true' and blocked_by_me='false' and blocked_me='false'\";\r\n SQLiteDatabase db = this.getReadableDatabase();\r\n Cursor cursor = db.rawQuery(selectQuery, null);\r\n // Move to first row\r\n cursor.moveToFirst();\r\n if(cursor.getCount() > 0){\r\n\r\n while (cursor.isAfterLast() != true) {\r\n\r\n JSONObject contact = new JSONObject();\r\n //contact.put(Contacts.CONTACT_FIRSTNAME, cursor.getString(1));\r\n //contact.put(Contacts.CONTACT_LASTNAME, cursor.getString(2));\r\n contact.put(Contacts.CONTACT_PHONE, cursor.getString(0));\r\n contact.put(\"display_name\", cursor.getString(1));\r\n contact.put(Contacts.CONTACT_UID, cursor.getString(2));\r\n contact.put(Contacts.SHARED_DETAILS, cursor.getString(3));\r\n contact.put(Contacts.CONTACT_STATUS, cursor.getString(4));\r\n contact.put(\"on_cloudkibo\", cursor.getString(5));\r\n contact.put(\"image_uri\", cursor.getString(6));\r\n\r\n contacts.put(contact);\r\n\r\n cursor.moveToNext();\r\n }\r\n }\r\n cursor.close();\r\n db.close();\r\n // return user\r\n return contacts;\r\n }", "@RequestMapping(value = \"contacts/all\", method = RequestMethod.GET)\n public String getContacts(Model model) {\n\n List<Contact> allBlocksContact = adminService.getAllBlocksContact();\n model.addAttribute(\"contactBlocks\", allBlocksContact);\n model.addAttribute(\"faIcons\", faIcon);\n\n return \"/admin/contacts/contacts\";\n }", "public java.util.List<org.multibit.hd.core.protobuf.MBHDContactsProtos.Contact> getContactList() {\n return contact_;\n }", "public Result<List<Contact>> listContacts(Long addressBookId) {\n return listContacts(addressBookId, false, 0);\n }", "public Set<Contact> getAllContactByUserID(Integer ID) throws Exception {\n\n\t\tlogger.info(\"DEBUT MessagerieDao getAllContactByID\");\n\n\t\tEntityManager em = OpenJPAUtils.openEntityManager();\n\n\t\tTypedQuery<Contact> queryContact = em.createQuery(\n\n\t\t\"SELECT c FROM Contact c WHERE c.id_user = :id OR c.id_contact = :id\",\n\t\t\t\tContact.class);\n\n\t\tList<Contact> contactslist = queryContact.setParameter(\"id\", ID)\n\t\t\t\t.getResultList();\n\n\t\tOpenJPAUtils.closeEntityManager(em);\n\n\t\treturn new HashSet<Contact>(contactslist);\n\t}", "Page<Contact> getContacts(int index, int size);", "public void getContactInfo(Intent intent, int tag)\n\t{\n\t\ttry{\n\t\t\tllenaCorreo(tag+\"\",\"\");\n\t\t\tllenaCelular(tag+\"\", \"\");\n\t\t\t\n\t\t\tCursor cursor = managedQuery(intent.getData(), null, null, null, null); \n\t\t\t if(!cursor.isClosed()&&cursor!=null){\n\t\t\t while (cursor.moveToNext()) \n\t\t\t { \n\t\t\t String contactId = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts._ID));\n\t\t\t String hasPhone = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER));\n\t\t\n\t\t\t if ( hasPhone.equalsIgnoreCase(\"1\")){\n\t\t\t hasPhone = \"true\";\n\t\t\t \n\t\t\t }else{\n\t\t\t hasPhone = \"false\" ;\n\t\t\t }\n\t\t\t if (Boolean.parseBoolean(hasPhone)) \n\t\t\t {\n\t\t\t Cursor phones = getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null,ContactsContract.CommonDataKinds.Phone.CONTACT_ID +\" = \"+ contactId,null, null);\n\t\t\t listaCels= new ArrayList<String>();\n\t\t\t while (phones.moveToNext()) \n\t\t\t {\n\t\t\t \n\t\t\t String phoneNumber = phones.getString(phones.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n\t\t\t phoneNumber= phoneNumber.replaceAll(\" \", \"\");\n\t\t\t \n\t\t\t final char c = phoneNumber.charAt(0);\n\t\t\t if(c=='+'){\n\t\t\t \t try{\n\t\t\t \t\t phoneNumber = phoneNumber.substring(3, 13); \n\t\t\t \t }catch(Exception e){\n\t\t\t \t\t DatosLogBean.setDescripcion(Utils.getStackTrace(e));\n\t\t\t \t }\n\t\t\t }\n\t\t\t \n\t\t\t listaCels.add(phoneNumber);\n\t\t\t }\n\t\t\t if(listaCels.size()==1){ //si tiene solo un telefono\n\t\t\t \tllenaCelular(tag+\"\",listaCels.get(0)); \n\t\t\t \t\n\t\t\t }else if(listaCels.size()==0){//si no tiene telefono\n\t\t\t \tllenaCelular(tag+\"\",\"\");\n\t\t\t }else{\n\t\t\t \tdialogoLista(tag+\"\");\n\t\t\t }\n\t\t\t phones.close();\n\t\t\t }\n\t\t\n\t\t\t // Find Email Addresses\n\t\t\t Cursor emails = getContentResolver().query(ContactsContract.CommonDataKinds.Email.CONTENT_URI,null,ContactsContract.CommonDataKinds.Email.CONTACT_ID + \" = \" + contactId,null, null);\n\n\t\t\t while (emails.moveToNext()) \n\t\t\t {\n\t\t\t String emailAddress = emails.getString(emails.getColumnIndex(ContactsContract.CommonDataKinds.Email.DATA));\n\t\t\t \n\t\t\t \tllenaCorreo(tag+\"\",emailAddress);\n\t\t\t \n\t\t\t break;\n\t\t\t }\n\t\t\t \n\t\t\t emails.close();\n\t\t\t break;\n\t\t\t } \n\t\t\t }\n\t\t}catch(Exception e){\n\t\t\tDatosLogBean.setDescripcion(Utils.getStackTrace(e));\n\t\t}\n\t}", "public Cursor fetchAll() {\n\t\tCursor cursor = db.query(CertificationConstants.DB_TABLE, CertificationConstants.fields(), null, null, null, null, null);\n\t\treturn cursor;\n\t}", "public String getAllContactId() {\n return getContact().getUid();\n }", "private ArrayList<VOContactRecord> getContactRecordsFromEditor()\n\t{\n\t\tArrayList<VOContactRecord> list = new ArrayList();\n\t\t\n\t\tfor(Integer type_id : contact_editors.keySet()) \n\t\t{\n\t\t\tContactEditor editor = contact_editors.get(type_id);\n\t\t\tHashMap<ContactRecord, ContactRank> contacts = editor.getContactRecords();\n\t\t\tfor(ContactRecord contact : contacts.keySet()) {\n\t\t\t\tVOContactRecord rec = new VOContactRecord();\n\t\t\t\tContactRank rank = contacts.get(contact);\n\t\t\t\trec.contact_id = contact.id;\n\t\t\t\trec.contact_type_id = type_id;\n\t\t\t\trec.contact_rank_id = rank.id;\n\t\t\t\tlist.add(rec);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn list;\n\t}", "@Override\n\tpublic List<CreditCard> getAll(){\n\t\t\n\t\treturn creditCardDao.findAll();\n\t}", "public java.util.List<org.multibit.hd.core.protobuf.MBHDContactsProtos.Contact> getContactList() {\n if (contactBuilder_ == null) {\n return java.util.Collections.unmodifiableList(contact_);\n } else {\n return contactBuilder_.getMessageList();\n }\n }", "public List<ProbeObject> getAll() {\n List<ProbeObject> probeList = new ArrayList<ProbeObject>();\n\n // Select All Query\n String selectQuery = \"SELECT * FROM \" + TABLE_MOBILE_SENSOR;\n\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (cursor.moveToFirst()) {\n do {\n JsonParser parser = new JsonParser();\n\n ProbeObject obj = new ProbeObject(\n Integer.parseInt(cursor.getString(0)),\n (JsonObject) (parser.parse(cursor.getString(1))),\n (JsonObject) (parser.parse(cursor.getString(2))),\n cursor.getString(3),\n cursor.getString(4)\n );\n // Adding contact to list\n probeList.add(obj);\n } while (cursor.moveToNext());\n }\n\n // return contact list\n return probeList;\n }", "public ArrayList<Contact> getContactByGroup(String groupname){\r\n\t\t\r\n\t\tArrayList<Contact> contacts = new ArrayList<Contact>();\r\n\t\tSQLiteDatabase db = this.getReadableDatabase();\r\n\t\t\r\n\t\tCursor cursor = db.query(DBHelper.CONTACT_TABLE_NAME,\r\n\t\t\t\tnew String[] {DBHelper.COLUMN_NAME, DBHelper.COLUMN_GROUP,\r\n\t\t\t\tDBHelper.COLUMN_LATITUDE, DBHelper.COLUMN_LONGITUDE,\r\n\t\t\t\tDBHelper.COLUMN_MESSAGE, DBHelper.COLUMN_SHARE},\r\n\t\t\t\tDBHelper.COLUMN_GROUP + \"=?\", new String[]{groupname},\r\n\t\t\t\tnull, null, null);\r\n\t\t\r\n\t\tcursor.moveToFirst();\r\n\t while (!cursor.isAfterLast()) {\r\n\t contacts.add(new Contact(cursor.getString(0), cursor.getString(1),\r\n\t \t\t cursor.getDouble(2), cursor.getDouble(3), cursor.getString(4),\r\n\t \t\t int_to_boolean(cursor.getInt(5))));\r\n\t cursor.moveToNext();\r\n\t }\r\n\t \r\n\t cursor.close();\r\n\t db.close();\r\n\t \r\n\t return contacts;\r\n\t}", "public Vector<MailsTO> mailContacts() throws ConnectionException, SQLException;", "@Override\n\tpublic List<EmpContactDetail> listEmpContactDetails() {\n\t\treturn template.loadAll(EmpContactDetail.class);\n\t}", "public List<Contact> getContactByIp(String ip) {\n SQLiteDatabase db = null;\n List<Contact> contactList = new ArrayList<Contact>();\n Cursor cursor = null;\n try {\n db = this.getWritableDatabase();\n\n cursor = db.query(TABLE_CONTACT, new String[] { KEY_ID,\n KEY_DEVICE_ID,KEY_DISPLAY_WIDTH, KEY_DISPLAY_HEIGHT, KEY_SURNAME, KEY_IP, KEY_HOST_NAME, KEY_AVATAR, KEY_OSTYPE,KEY_VER_NO, KEY_PH_NO, KEY_SERVICE_NAME, KEY_IS_ONLINE }, KEY_IP + \"=?\",\n new String[] { ip }, null, null, null, null);\n\n contactList = mapToContacts(cursor);\n }catch (Exception e){\n Log.e(TAG,\"getContactByIp:\"+e.getMessage());\n throw e;\n }finally {\n if(db!= null && db.isOpen())\n db.close(); // Closing database connection\n if(cursor != null && !cursor.isClosed())\n cursor.close();\n }\n // return contact list\n return contactList;\n }", "private List<User> retrieveTravelContacts() {\n if (checkIfContactKeysExists()) {\n return SharedPrefsUtils.convertSharedPrefsToTravelContacts(context);\n }\n //TODO: display no contacts UI below header\n return new ArrayList<>();\n }", "@Override\n\tpublic List<EmpContactDetail> listEmpContactDetails() {\n\t\treturn this.empContactDetailDAO.listEmpContactDetails();\n\t}", "@Override\n\tpublic List<Contact> listContactForGroup(Set<Contact> contactsinGroup) {\n\t\ttry {\n\t\t\tsession = HibernateUtil.getSessionFactory().openSession();\n\t\t\ttx = session.beginTransaction();\n\t\t\t\n\t\t\tArrayList<Long> listIds = new ArrayList<Long>();\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"************************* \" + listIds.toString());\n\t\t\tList<Contact> lc = null;\n\t\t\tfor (Contact c : contactsinGroup) {\n\t\t\t\tlistIds.add(c.getId());\n\t\t\t}\n\t\t\t\t\n\t\t\tif (listIds.isEmpty()) {\n\t\t\t\tQuery query = session.createQuery(\"from Contact\");\n\t\t\t\tSystem.out.println(\"\\n\");\n\t\t\t\tSystem.out.println(\"liste des contacts: \" + String.valueOf(query.list()));\n\t\t\t\tlc = (List<Contact>) query.list();\n\t\t\t} else {\n\t\t\t\tQuery query = session.createQuery(\"from Contact where id not in (:ids)\");\n\t\t\t\tquery.setParameterList(\"ids\", listIds);\n\t\t\t\tSystem.out.println(\"\\n\");\n\t\t\t\tSystem.out.println(\"liste des contacts: \" + String.valueOf(query.list()));\n\t\t\t\tlc = (List<Contact>) query.list();\n\t\t\t}\n\t\t\ttx.commit();\n\t\t\tsession.close();\n\n\t\t\treturn lc;\n\n\t\t} catch (HibernateException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "@RequestMapping(\"/getAllContacts\")\n\tprivate ResponseEntity<String> getAllContacts() throws JsonProcessingException {\n\t\t\n\t\tList<Contacts> contactlist = c_service.getAllContacts();\t\t\n\t HttpHeaders responseHeaders = new HttpHeaders();\n\t \n\t if (contactlist == null) {\n\t return new ResponseEntity<String>(\"No Users found\", \n\t responseHeaders, HttpStatus.UNAUTHORIZED);\n\t } else {\n\t responseHeaders.add(\"Content-Type\", \"application/json\");\n\t String json = convertListToJson(contactlist);\n\t return new ResponseEntity<String>(json, responseHeaders, HttpStatus.OK); \n\t }\t\t\n\t}", "public ArrayList<BusinessContact> getContacts() \n\t{\n\t\treturn this.contacts;\n\t}", "@Override\r\n\tpublic List<CustVO> getAll() {\n\t\tList<CustVO> list = new ArrayList<CustVO>();\r\n\t\tCustVO custVO = null;\r\n\r\n\t\tConnection con = null;\r\n\t\tPreparedStatement pstmt = null;\r\n\t\tResultSet rs = null;\r\n\r\n\t\ttry {\r\n\t\t\tcon = ds.getConnection();\r\n\t\t\tpstmt = con.prepareStatement(GET_ALL_STMT);\r\n\t\t\trs = pstmt.executeQuery();\r\n\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustVO = new CustVO();\r\n\t\t\t\tcustVO.setCust_ID(rs.getString(\"CUST_ID\"));\r\n\t\t\t\tcustVO.setCust_acc(rs.getString(\"CUST_ACC\"));\r\n\t\t\t\tcustVO.setCust_pwd(rs.getString(\"CUST_PWD\"));\r\n\t\t\t\tcustVO.setCust_name(rs.getString(\"CUST_NAME\"));\r\n\t\t\t\tcustVO.setCust_sex(rs.getString(\"CUST_SEX\"));\r\n\t\t\t\tcustVO.setCust_tel(rs.getString(\"CUST_TEL\"));\r\n\t\t\t\tcustVO.setCust_addr(rs.getString(\"CUST_ADDR\"));\r\n\t\t\t\tcustVO.setCust_pid(rs.getString(\"CUST_PID\"));\r\n\t\t\t\tcustVO.setCust_mail(rs.getString(\"CUST_MAIL\"));\r\n\t\t\t\tcustVO.setCust_brd(rs.getDate(\"CUST_BRD\"));\r\n\t\t\t\tcustVO.setCust_reg(rs.getDate(\"CUST_REG\"));\r\n\t\t\t\tcustVO.setCust_pic(rs.getBytes(\"CUST_PIC\"));\r\n\t\t\t\tcustVO.setCust_status(rs.getString(\"CUST_STATUS\"));\r\n\t\t\t\tcustVO.setCust_niname(rs.getString(\"CUST_NINAME\"));\r\n\t\t\t}\r\n\t\t} catch (SQLException se) {\r\n\t\t\tthrow new RuntimeException(\"A database error occured. \" + se.getMessage());\r\n\t\t} finally {\r\n\t\t\tif (rs != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\trs.close();\r\n\t\t\t\t} catch (SQLException se) {\r\n\t\t\t\t\tse.printStackTrace(System.err);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (pstmt != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tpstmt.close();\r\n\t\t\t\t} catch (SQLException se) {\r\n\t\t\t\t\tse.printStackTrace(System.err);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (con != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tcon.close();\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace(System.err);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn list;\r\n\t}", "public List<student> getAllStudent() { \n List<student> studentArrayList = new ArrayList<>();\n // Select All Query\n String selectQuery = \"SELECT * FROM \" + table; // PALITAN TO NG TABLE NAME NIYO\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (cursor.moveToFirst()) {\n do {\n student student = new student(); //PALITAN NG MGA DAPAT PALITAN NA VARIABLES\n student.setId(Integer.parseInt(cursor.getString(0)));\n student.setfName(cursor.getString(1));\n student.setlName(cursor.getString(2));\n studentArrayList.add(student);\n } while (cursor.moveToNext());\n }\n\n // return contact list\n return studentArrayList;\n }" ]
[ "0.83478683", "0.834039", "0.82219696", "0.7875638", "0.78608", "0.78299636", "0.78171957", "0.7767742", "0.7730405", "0.7729551", "0.7728374", "0.7672174", "0.7638621", "0.76201147", "0.7448118", "0.7443441", "0.743218", "0.74178195", "0.73806524", "0.73570454", "0.73209", "0.7293155", "0.72919", "0.7280401", "0.7263949", "0.72371626", "0.7232266", "0.71853304", "0.718025", "0.71431845", "0.71404", "0.7139963", "0.7088952", "0.7081809", "0.70511556", "0.70394206", "0.698069", "0.68864965", "0.6878018", "0.6856393", "0.6850855", "0.68228495", "0.6822503", "0.6822503", "0.6822503", "0.6822503", "0.6805028", "0.67842126", "0.67842126", "0.67842126", "0.67842126", "0.6780414", "0.6762059", "0.67206126", "0.66853344", "0.6681479", "0.6668902", "0.66537005", "0.6647671", "0.6646349", "0.66400546", "0.66330147", "0.6598274", "0.6594642", "0.659295", "0.659184", "0.6583334", "0.6568128", "0.65660954", "0.6534477", "0.6530784", "0.65095234", "0.6503265", "0.65011245", "0.64893174", "0.6485232", "0.64839864", "0.64728826", "0.6471771", "0.64685464", "0.64670634", "0.6444381", "0.6436617", "0.6436292", "0.643046", "0.64281857", "0.64239866", "0.6421941", "0.642056", "0.640882", "0.6389674", "0.6388066", "0.6386845", "0.6378916", "0.63726795", "0.63660616", "0.6361271", "0.6353472", "0.634863", "0.63479394" ]
0.78138447
7
This Method to get Contact Details by Id
@Override public Contact getContactById(Integer cid) { Contact c = null; Optional<ContactDetailsEntity> optional = contactRepositeries.findById(cid); if (optional.isPresent()) { ContactDetailsEntity entity = optional.get(); c = new Contact(); BeanUtils.copyProperties(entity, c); } return c; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(value = \"/contact/list/{id}\", method = RequestMethod.GET)\n public Contact contactGetById(@PathVariable Long id) {\n Contact contact = contactService.list(id);\n return contact;\n }", "Contact getContact(int id) {\n SQLiteDatabase db = this.getReadableDatabase();\n\n Cursor cursor = db.query(TABLE_CONTACTS, new String[]{KEY_ID,\n KEY_NAME, KEY_AUDIOS, KEY_CAPTURED_IMAGE, KEY_CONTENTS, KEY_DELETE_VAR, KEY_GALLERY_IMAGE, KEY_RRECYCLE_DELETE, KEY_PHOTO}, KEY_ID + \"=?\",\n new String[]{String.valueOf(id)}, null, null, null, null);\n if (cursor != null)\n cursor.moveToFirst();\n\n Contact contact = new Contact(cursor.getInt(0),\n cursor.getString(1), cursor.getString(2), cursor.getString(3), cursor.getString(4), cursor.getInt(5), cursor.getString(6), cursor.getInt(7), cursor.getString(8));\n // return contact\n return contact;\n }", "public Contact getContactById(int contactId);", "Optional<Contact> getContact(long id);", "@Override\n\tpublic EmpContactDetail getEmpContactDetailByID(int id) {\n\t\treturn template.get(EmpContactDetail.class, new Integer(id));\n\t}", "IContact getContactById(String contactId);", "@GET\n @Path(\"{id}\")\n @Produces({\n \"application/json\"\n })\n ContactsResource.GetContactsByIdResponse getContactsById(\n @PathParam(\"id\")\n @NotNull\n String id)\n throws Exception\n ;", "@Override\n\tpublic EmpContactDetail getEmpContactDetailByID(int id) {\n\t\treturn this.empContactDetailDAO.getEmpContactDetailByID(id);\n\t}", "@RequestMapping(\"/getContact\")\n\tprivate ResponseEntity<String> getContact(@RequestParam int id) throws JsonProcessingException {\n\t\t\n\t\tContacts contact = c_service.getContactById(id);\t\t\n\t HttpHeaders responseHeaders = new HttpHeaders();\n\t \n\t if (contact == null) {\n\t return new ResponseEntity<String>(\"No User with that Id found\", \n\t responseHeaders, HttpStatus.UNAUTHORIZED);\n\t } else {\n\t responseHeaders.add(\"Content-Type\", \"application/json\");\n\t String json = convertToJson(contact);\n\t return new ResponseEntity<String>(json, responseHeaders, HttpStatus.OK); \n\t }\t\t\n\t}", "public void getContact(int contactId) {\n view.printRecordsFromNotepad(notepad.getContacts().get(contactId).toString());\n }", "public Optional<Contact> findById(int id){\n return contactRepository.findById(id);\n }", "public Contact getContact(UUID id) {\n\t\treturn this.contacts.get(id);\n\t}", "public static String getContactNameById(Integer _id, Context context){\n\t\t\n\t\t\t//Map<String, String> result = new HashMap<String, String>();\n\n\t \tString cid = _id.toString(); \n\t\t \t//String contactNumber = \"\";\n\t\t \tString contactName = \"\";\n\t \tCursor cursor = context.getContentResolver().query( \n\t \t\t\tContactsContract.Contacts.CONTENT_URI, null, \n\t \t\t\tContactsContract.Contacts._ID + \"=?\", \n\t \t new String[]{cid}, null); \n\t \t\n\t \t//Log.e(\"PARSER\", \"1\");\n\t \tif(cursor.moveToFirst()){\n\t //String id = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts._ID));\n\t\n\t //if(Integer.parseInt(cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER))) > 0)\n\t //{\n\t\t\n\t\t\n\t \t//Log.e(\"PARSER\", \"2\");\n\t \t\n\t \tcontactName = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));\n\t \t//contactName = cursor.getString(ContactsQuery.DISPLAY_NAME);\n Cursor pCur = context.getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,null,ContactsContract.CommonDataKinds.Phone.CONTACT_ID +\" = ?\",new String[]{ _id.toString() }, null);\n while (pCur.moveToNext()){\n \t\n \t\n // contactNumber = pCur.getString(pCur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n // contactName = pCur.getString(pCur.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));\n \n //Log.e(\"PARSER\"+contactNumber, \"Name\"+contactName);\n //result.put(contactNumber, contactName);\n } \n pCur.close();\n\t //}\n\t \n\t\t\t}\n\t \tcursor.close();\n return contactName;\n\t}", "public static Contact getContact(long id) {\n Contact contact = contacts.get(id);\n if (contact == null) {\n throw new RuntimeException(\"Can't find contact with given id.\");\n }\n return contact;\n }", "@Override\n\tpublic Contact findById(String id) {\n\t\treturn null;\n\t}", "@GetMapping(value = \"editcontactDetailsAddress\")\n\tpublic JsonResponse<RestPatientDetailsNewModel> editcontactDetailsAddress(@RequestParam String id) {\n\t\tlogger.info(\"Method : editcontactDetailsAddress starts\");\n\t\t\n\t\tlogger.info(\"Method : editcontactDetailsAddress ends\");\n\t\treturn PatientDetailsDao.editcontactDetailsAddress(id);\n\t}", "@Cacheable(value=\"contacts\")\r\n\tOptional<Contact> find(Long id) {\r\n\t\treturn repo.findById(id);\r\n\t}", "@RequestMapping(\"/{cId}/contact\")\n\tpublic String showContactDetail(@PathVariable(\"cId\") Integer cId,Model model,Principal principal) {\n\t\tSystem.out.println(\"CID \"+cId);\n\t\t\n\t\tOptional<Contact> contactOptional = this.contactRepository.findById(cId);\t\t\n\t\tContact contact = contactOptional.get();\n\t\t\n\t\t//\n\t\tString userName = principal.getName();\n\t\tUser user = this.userRepository.getUserByUserName(userName);\n\t\t\n\t\tif(user.getId()==contact.getUser().getId()) {\n\t\t\tmodel.addAttribute(\"contact\",contact);\t\n\t\t\tmodel.addAttribute(\"title\",contact.getName());\n\t\t}\n\t\treturn \"normal/contact_detail\";\n\t}", "@Override\r\n\tpublic Contact findById(String contactId) {\n\t\treturn (Contact)super.load(contactId);\r\n\t}", "protected List<CompaniesContactsEntity> findByIdContacts(int id) {\n log.info(\"CompaniesContactsBean => method : findByIdContacts()\");\n FacesMessage facesMessage;\n\n if (id == 0) {\n log.error(\"Contact ID is null\");\n facesMessage = new FacesMessage(FacesMessage.SEVERITY_ERROR, JsfUtils.returnMessage(getLocale(), \"contact.error\"), null);\n FacesContext.getCurrentInstance().addMessage(null, facesMessage);\n return null;\n }\n\n EntityManager em = EMF.getEM();\n try {\n return companiesContactsDao.findByIdContacts(em, id);\n } catch (Exception ex) {\n log.info(\"Nothing\");\n throw new EntityNotFoundException(\n \"Aucun contact avec l ID \" + id + \" n'a été trouvé dans la DB\",\n ErrorCodes.CONTACT_NOT_FOUND\n );\n } finally {\n em.clear();\n em.close();\n }\n }", "protected CompaniesContactsEntity findById(int id) {\n log.info(\"CompaniesContact => method : findById()\");\n\n FacesMessage msg;\n\n if (id == 0) {\n log.error(\"CompaniesContact ID is null\");\n msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, JsfUtils.returnMessage(getLocale(), \"note.notExist\"), null);\n FacesContext.getCurrentInstance().addMessage(null, msg);\n throw new EntityNotFoundException(\n \"L ID de la note est incorrect\",\n ErrorCodes.COMPANY_NOT_FOUND\n );\n }\n\n EntityManager em = EMF.getEM();\n Optional<CompaniesContactsEntity> optionalCompaniesContactsEntity;\n try {\n optionalCompaniesContactsEntity = companiesContactsDao.findById(em, id);\n } finally {\n em.clear();\n em.close();\n }\n return optionalCompaniesContactsEntity.orElseThrow(() ->\n new EntityNotFoundException(\n \"Aucune Note avec l ID \" + id + \" n a ete trouvee dans la BDD\",\n ErrorCodes.CONTACT_NOT_FOUND\n ));\n }", "public String getContactId() {\n return this.contactId;\n }", "public Cursor getContactInfo(String bookingId) {\r\n\t\tCursor c = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tLog.v(\"derp\", bookingId);\r\n\t\t\tc = database.rawQuery(\"SELECT \" + DatabaseHelper.COLUMN_BOOKING_CONTACT_ID \r\n\t\t\t\t\t+ \" FROM \" + DatabaseHelper.TABLE_BOOKING + \" WHERE \"\r\n\t\t\t\t\t+ DatabaseHelper.COLUMN_BOOKING_ID + \" = '\" + bookingId + \"'\", null);\r\n\t\t\t\r\n\t\t\tc.moveToFirst();\r\n\t\t\tString id = String.valueOf(c.getInt(c.getColumnIndex(DatabaseHelper.COLUMN_BOOKING_CONTACT_ID)));\r\n\t\t\t\r\n\t\t\tc = database.rawQuery(\"SELECT * FROM \" + DatabaseHelper.TABLE_CONTACT + \" WHERE \"\r\n\t\t\t\t\t+ DatabaseHelper.COLUMN_CONTACT_ID + \" = '\" + id + \"';\", null);\r\n\t\t\treturn c;\r\n\t\t} catch (SQLException ex) {\r\n\t\t\tthrow ex;\r\n\t\t}\r\n\t}", "public List<Contact> getContacts(Long id){\n contacts.clear();\n return contactsAndChildrenParser.getContacts(id);\n }", "public int getContactId() {\n return contactId;\n }", "public String getContactPhone(Integer id) {\n\t\t// On 0 invocation the current contact's will be returned\n\t\tif (id == 0) {\n\t\t\tif (currentContact == null)\n\t\t\t\treturn null;\n\t\t\treturn currentContact.getPhone();\n\t\t}\n\t\tOptional<Contacto> result = currentUser.getContacts().stream().filter(c -> c.getId() == id).findFirst();\n\t\tif (result.isPresent())\n\t\t\treturn result.get().getPhone();\n\t\treturn null;\n\t}", "public Long getContactId() {\n return contactId;\n }", "public static String getPhoneById(String cid, Context context){\n\t\t\n\n\t\t \tString contactNumber = \"\";\n\t\t \t//String contactName = \"\";\n\t \tCursor cursor = context.getContentResolver().query( \n\t \t\t\tContactsContract.Contacts.CONTENT_URI, null, \n\t \t\t\tContactsContract.Contacts._ID + \"=?\", \n\t \t new String[]{cid}, null); \n\t \t\n\t \t//Log.e(\"PARSER\", \"1\");\n\t \tif(cursor.moveToFirst()){\n\t\n\t \t//contactName = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));\n\n Cursor pCur = context.getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,null,ContactsContract.CommonDataKinds.Phone.CONTACT_ID +\" = ?\",new String[]{ cid }, null);\n while (pCur.moveToNext()){\n \t\n \t\n contactNumber = pCur.getString(pCur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n contactNumber = contactNumber.replaceAll(\" \", \"\");\n // contactName = pCur.getString(pCur.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));\n //Log.e(\"PARSER\"+contactNumber, \"Name\"+contactNumber);\n //result.put(contactNumber, contactName);\n } \n pCur.close();\n\t //}\n\t \n\t\t\t}\n\t \tcursor.close();\n return contactNumber;\n\t}", "public java.lang.String getContactId() {\r\n return contactId;\r\n }", "@GetMapping(value = \"patientemercontactnew\")\n\tpublic JsonResponse<List<RestPatientDetailsNewModel>> editpatientemercontactnew(@RequestParam String id) {\n\t\tlogger.info(\"Method :patient emercontact contact starts\");\n\t\t\n\t\t\n\t\tlogger.info(\"Method :patient emercontact ends\");\n\t\treturn PatientDetailsDao.patientemercontactnew(id);\n\t\t\n\t}", "public static Contact getContact(String user, long id) {\n Contact contact = Contact.find().byId(id);\n if (contact == null) {\n throw new RuntimeException(\"Contact ID not found: \" + id);\n }\n UserInfo userInfo = contact.getUserInfo();\n if (!user.equals(userInfo.getEmail())) {\n throw new RuntimeException(\"User is not same one store with the contect.\");\n }\n return contact;\n }", "public long getContactId() {\n return contactId;\n }", "@GET(API_ROUTE + \"/contactos-empleado/{emp_id}\")\n Call<List<Persona>> getContactsByEmployeeId(@Path(\"emp_id\") long emp_id);", "public String getContactName(Integer id) {\n\t\t// On 0 invocation the current contact's will be returned\n\t\tif (id == 0) {\n\t\t\tif (currentContact == null)\n\t\t\t\treturn null;\n\t\t\treturn currentContact.getName();\n\t\t}\n\t\tOptional<Contacto> result = currentUser.getContacts().stream().filter(c -> c.getId() == id).findFirst();\n\t\tif (result.isPresent())\n\t\t\treturn result.get().getName();\n\t\treturn null;\n\t}", "private void requestContactInformation() {\n CONTACTS = new ArrayList<>();\n\n Cursor c = getContentResolver().query(ContactsContract.Contacts.CONTENT_URI,\n null, null, null,\n ContactsContract.Contacts.DISPLAY_NAME_PRIMARY + \" asc\");\n\n while(c.moveToNext()) {\n HashMap<String, String> map = new HashMap<String, String>();\n String id = c.getString(c.getColumnIndex(ContactsContract.Contacts._ID));\n String name = c.getString(c.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME_PRIMARY));\n\n Cursor phoneCursor = getContentResolver().query(\n ContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n null,\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \" = \" + id,\n null, null\n );\n\n if (phoneCursor.moveToFirst()) {\n String number = phoneCursor.getString(phoneCursor.getColumnIndex(\n ContactsContract.CommonDataKinds.Phone.NUMBER\n ));\n CONTACTS.add(Pair.create(name, number));\n }\n\n phoneCursor.close();\n }\n\n }", "CustDataNotesResponseDTO getById(String id) throws Exception;", "public void getDetail(int id) {\n\t\t\n\t}", "public List<VendorContact> getContactByVendorId(int vendorid) {\r\n\t\t\treturn template.query(\"select contactid,vendorid,contactname,contactDepartment,contactEmail,contactPhone from contactTable where vendorid=\"+vendorid+\"\", new RowMapper<VendorContact>() {\r\n\t\t\t\tpublic VendorContact mapRow(ResultSet rs, int row)\r\n\t\t\t\t\t\tthrows SQLException {\r\n\t\t\t\t\tVendorContact vendorContact = new VendorContact();\r\n\t\t\t\t\tvendorContact.setContactId(rs.getInt(1));\r\n\t\t\t\t\tvendorContact.setVendorId(rs.getInt(2));\r\n\t\t\t\t\tvendorContact.setContactName(rs.getString(3));\r\n\t\t\t\t\tvendorContact.setContactDepartment(rs.getString(4));\r\n\t\t\t\t\tvendorContact.setContactEmail(rs.getString(5));\r\n\t\t\t\t\tvendorContact.setContactPhone(rs.getString(6));\r\n\t\t\t\t\treturn vendorContact;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t}", "public int getContactID() {\r\n return contactID;\r\n }", "public String getContactPicture(Integer id) {\n\t\t// On 0 invocation the current contact's will be returned\n\t\tif (id == 0) {\n\t\t\tif (currentContact == null)\n\t\t\t\treturn null;\n\t\t\treturn currentContact.getPicture();\n\t\t}\n\t\tOptional<Contacto> result = currentUser.getContacts().stream().filter(c -> c.getId() == id).findFirst();\n\t\tif (result.isPresent())\n\t\t\treturn result.get().getPicture();\n\t\treturn null;\n\t}", "public static NmsContact nmsGetContactInfoViaDbId(short ipDbId) {\n NmsLog.trace(HissageTag.api, \"Get ContactInfo by DbId:\" + ipDbId);\n if (ipDbId < 0) {\n NmsLog.error(HissageTag.api, \"ipDbId is invalid!\");\n return null;\n }\n\n short engineContactId = (short) engineadapter.get().nmsContactKeyRecordId(ipDbId);\n if (engineContactId <= 0) {\n NmsLog.error(HissageTag.api, \"engineContactId is invalid!\");\n return null;\n }\n\n NmsContact contact = NmsIpMessageApiNative.nmsGetContactInfoViaEngineId(engineContactId);\n\n return contact;\n }", "public List<Person> readContactlist()\n {\n List<Person> personList=new ArrayList<Person>();\n\n ContentResolver resolver = getContentResolver();\n Cursor cursor = resolver.query(ContactsContract.Contacts.CONTENT_URI, null, null, null, null);\n\n while (cursor.moveToNext()) {\n String id = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts._ID));\n String name = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));\n\n\n Cursor phoneCursor = resolver.query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null,\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \"= ?\", new String[]{id}, null);\n\n\n while (phoneCursor.moveToNext()) {\n String phoneNumber = phoneCursor.getString(phoneCursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n\n personList.add(new Person(name, phoneNumber));\n }\n }\n return personList;\n }", "public String getContactByIdStatement() {\n\t\treturn \"SELECT CONTACTS.ID, NAME , SURNAME , TITLE , ADDRESS , CITY , \"\n\t\t\t\t+ \"PROVINCE , POSTAL_CODE , REGION , COUNTRY , COMPANY_NAME , \"\n\t\t\t\t+ \"WORKSTATION, WORK_PHONE , WORK_EXTENSION , MOBILE_PHONE , \"\n\t\t\t\t+ \"FAX_NUMBER , EMAIL, NOTES, CONTACT_TYPE_ID, CONTACT_TYPE \"\n\t\t\t\t+ \"FROM CONTACTS LEFT JOIN CONTACTSTYPES ON CONTACTSTYPES.ID = CONTACTS.CONTACT_TYPE_ID \"\n\t\t\t\t+ \"WHERE CONTACTS.ID=?;\";\n\t}", "public Cursor getContact(long rowId) throws SQLException\n {\n Cursor mCursor = db.query(true, DATABASE_TABLE, new String[] {KEY_ROWID,\n KEY_NAME,KEY_EMAIL},KEY_ROWID + \"=\" + rowId,null,null,null,null,null);\n if(mCursor != null)\n {\n mCursor.moveToFirst();\n }\n return mCursor;\n }", "public ArrayList<Address> getAddress(int personId)\n\t{\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\tResultSet rs = null;\n\t\tString sqlQuery=\"\";\n\t\tArrayList<Address> addressList = new ArrayList<Address>();\n\t\tAddress addressObj;\n\t\ttry\n\t\t{\n\t\t\t conn = ConnectionObj.getConnection();\n\t\t\t sqlQuery = \"select * from contact_info where person_id=?\";\n\t\t\t \n\t\t stmt = conn.prepareStatement(sqlQuery);\n\t\t stmt.setInt(1, personId);\n\n\t\t rs = stmt.executeQuery();\n\t\t \n\t\t while (rs.next()) {\n\t\t \t addressObj = new Address(rs.getString(1),rs.getString(2),rs.getString(4),\n\t\t \t\t\t rs.getString(5),rs.getString(6),rs.getString(7),rs.getString(8),\n\t\t \t\t\t rs.getString(9),rs.getString(3),\"\",\"\",\"\",\"\");\n\n\t\t \t addressList.add(addressObj);\n\t\t \t \n\t\t }\n\t\t \n\t\t try\n\t\t { \n\t\t \t getPhoneNumberDetails(addressList, personId);\n\t\t \t getEmailIdDetails(addressList, personId);\n\t\t }\n\t\t catch(Exception e )\n\t\t {\n\t\t \t System.out.println(\"Row Miss match in Fields \");\n\t\t }\n\t\t \n\t\t}\n\t\tcatch(Exception e )\n\t\t{\n\t\t\tSystem.out.println(\"Problem in Searching Person Data \");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\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\te.printStackTrace();\n\t\t\t\t}\n\t\t\tif(stmt!=null)\n\t\t\t\ttry {\n\t\t\t\t\tstmt.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\tif(rs!=null)\n\t\t\t\ttry {\n\t\t\t\t\trs.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t\t\n\t\treturn addressList;\n\t}", "public Contactos consultarContactosId(int idContacto) {\n Contactos con = null;\r\n SessionFactory factory = HibernateUtil.getSessionFactory();\r\n Session session = factory.openSession();\r\n\r\n try {\r\n session.beginTransaction();\r\n con = (Contactos) session.get(Contactos.class, idContacto);\r\n // Query q = session.createQuery(\"from Contactos where idContacto = \"+idContacto );\r\n // listaContactos = (List<Contactos>) q.list();\r\n session.getTransaction().commit();\r\n System.out.println(\"Consultar por id Correcto ContactoMantenimiento \");\r\n } catch (Exception e) {\r\n if (session.getTransaction().isActive()) {\r\n session.getTransaction().rollback();\r\n System.out.println(\"Errro en consultar por id ContactoMantenimiento \" + e);\r\n con = null;\r\n }\r\n } finally {\r\n session.close();\r\n }\r\n return con;\r\n }", "public Result<List<Contact>> listContacts(Long addressBookId) {\n return listContacts(addressBookId, false, 0);\n }", "private void displayContactDetails() {\n System.out.println(\"displaying contact details :\");\n for (int i = 0; i < contactList.size(); i++) {\n System.out.println(\"contact no\" + (i + 1));\n Contact con = contactList.get(i);\n System.out.println(\"first name is :\" + con.getFirstName());\n\n System.out.println(\" last name is :\" + con.getLastName());\n\n System.out.println(\" address is :\" + con.getAddress());\n\n System.out.println(\" city name is :\" + con.getCity());\n\n System.out.println(\" state name is :\" + con.getState());\n\n System.out.println(\" zip code is :\" + con.getZip());\n\n System.out.println(\" phone number is :\" + con.getPhone());\n\n System.out.println(\" email address is :\" + con.getEmail());\n }\n }", "@Override\n\tpublic List getByContactsId(Integer contactsId) throws DAOException {\n\t\treturn null;\n\t}", "private ArrayList<Contact> getContactList(Context context) {\n String[] selectCol = new String[] { ContactsContract.Contacts.DISPLAY_NAME,\n ContactsContract.Contacts.HAS_PHONE_NUMBER, ContactsContract.Contacts._ID };\n\n final int COL_NAME = 0;\n final int COL_HAS_PHONE = 1;\n final int COL_ID = 2;\n\n // the selected cols for phones of a user\n String[] selPhoneCols = new String[] { ContactsContract.CommonDataKinds.Phone.NUMBER,\n ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME, ContactsContract.CommonDataKinds.Phone.TYPE };\n\n final int COL_PHONE_NUMBER = 0;\n final int COL_PHONE_NAME = 1;\n final int COL_PHONE_TYPE = 2;\n\n String select = \"((\" + Contacts.DISPLAY_NAME + \" NOTNULL) AND (\" + Contacts.HAS_PHONE_NUMBER + \"=1) AND (\"\n + Contacts.DISPLAY_NAME + \" != '' ))\";\n\n ArrayList<Contact> list = new ArrayList<Contact>();\n Cursor cursor = context.getContentResolver().query(ContactsContract.Contacts.CONTENT_URI, selectCol, select,\n null, ContactsContract.Contacts.DISPLAY_NAME + \" COLLATE LOCALIZED ASC\");\n if (cursor == null) {\n return list;\n }\n if (cursor.getCount() == 0) {\n return list;\n }\n\n cursor.moveToFirst();\n while (!cursor.isAfterLast()) {\n int contactId;\n contactId = cursor.getInt(cursor.getColumnIndex(ContactsContract.Contacts._ID));\n if (cursor.getInt(COL_HAS_PHONE) > 0) {\n // the contact has numbers\n // 获得联系人的电话号码列表\n String displayName;\n displayName = cursor.getString(COL_NAME);\n Cursor phoneCursor = context.getContentResolver().query(\n ContactsContract.CommonDataKinds.Phone.CONTENT_URI, selPhoneCols,\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \"=\" + contactId, null, null);\n if (phoneCursor.moveToFirst()) {\n do {\n // 遍历所有的联系人下面所有的电话号码\n String phoneNumber = phoneCursor.getString(COL_PHONE_NUMBER);\n Contact contact = new Contact(0, displayName);\n contact.phoneNumber = phoneNumber;\n list.add(contact);\n } while (phoneCursor.moveToNext());\n \n phoneCursor.close();\n }\n }\n cursor.moveToNext();\n }\n \n cursor.close();\n\n return list;\n }", "public List<Contact> getAllContacts() {\n List<Contact> contactList = new ArrayList<Contact>();\n // Select All Query\n String selectQuery = \"SELECT * FROM \" + TABLE_CONTACTS;\n\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (cursor.moveToFirst()) {\n do {\n Contact contact = new Contact();\n contact.set_id((cursor.getInt(0)));\n contact.set_name(cursor.getString(1));\n contact.set_audios(cursor.getString(2));\n contact.set_captured_image(cursor.getString(3));\n contact.set_contents(cursor.getString(4));\n contact.set_delelte_var(cursor.getInt(5));\n contact.set_gallery_image(cursor.getString(6));\n contact.set_recycle_delete(cursor.getInt(7));\n contact.set_photo(cursor.getString(8));\n // Adding contact to list\n contactList.add(contact);\n } while (cursor.moveToNext());\n }\n\n // return contact list\n return contactList;\n }", "public static Cursor getDashboardContactList(int ID) {\n\t\tLog.d(\" QuizApp--SQLHelper\", \"Contact--Querying Data\");\n\t\treturn db.rawQuery(\"select * from Contact where ID = \" + ID, null);\n\t}", "public List<Contact> getAllContacts();", "org.multibit.hd.core.protobuf.MBHDContactsProtos.Contact getContact(int index);", "private void openContactDetails(int id) {\n wd.findElement(By.xpath(String.format(\"//tr[@name='entry']/td[text()='Special']/../td[7]/a\", id))).click();\n // click(By.xpath(\"//input[@id = '\" + id + \"']/../following-sibling::td[6]/a\"));\n }", "@GetMapping(\"/id/{id}\")\n public ResponseEntity<ServiceResult> findById(@PathVariable String id) {\n ServiceResult serviceResult = new ServiceResult();\n AdCampaign adCampaign = new AdCampaign();\n logger.info(\"Start controller call get data from ID - \"+id);\n try {\n adCampaign = adCampaignService.findByIdCustom(id);\n serviceResult.setMessage(\"Get Data from ID\"+id+\" Success\");\n serviceResult.setData(adCampaignService.findByIdCustom(id));\n serviceResult.setStatus(ServiceResult.Status.SUCCESS);\n }catch (Exception ex){\n logger.info(\"Error call get data from ID - \"+id);\n serviceResult.setMessage(ex.getMessage());\n }\n logger.info(\"End call get data from ID - \"+id);\n return new ResponseEntity<ServiceResult>(serviceResult, HttpStatus.OK);\n }", "private void getContactDataBefore() {\n int i = 0;\n List<String> list = new ArrayList<>();\n\n Cursor c1 = getContentResolver()\n .query(ContactsContract.Contacts.CONTENT_URI, null, null, null, null);\n\n if ((c1 != null) && c1.moveToFirst()) {\n\n // add contact id's to the mIDs list\n do {\n String id = c1.getString(c1.getColumnIndexOrThrow(ContactsContract.Contacts._ID));\n String name = c1.getString(c1.getColumnIndexOrThrow(ContactsContract.Contacts.DISPLAY_NAME));\n\n // query all contact numbers corresponding to current id\n Cursor c2 = getContentResolver()\n .query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n new String[]{ContactsContract.CommonDataKinds.Phone.NUMBER},\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \"=?\",\n new String[]{id}, null);\n\n if (c2 != null && c2.moveToFirst()) {\n // Log.d(\"DEBUG\",\"name =\" + name);\n list = new ArrayList<>();\n\n if (idsHash.containsKey(name)) {\n list = idsHash.get(name);\n } else {\n mIDs.add(id);\n mNames.add(name);\n mNumbers.add(c2.getString(c2\n .getColumnIndexOrThrow(ContactsContract.CommonDataKinds.Phone.NUMBER)));\n }\n\n list.add(id);\n idsHash.put(name, list);\n\n c2.close();\n } else {\n c2.close();\n }\n\n i++;\n } while (c1.moveToNext() && i < c1.getCount());\n\n c1.close();\n }\n }", "public void setContactId(String contactId) {\n this.contactId = contactId;\n }", "@Secured({ })\n\t@RequestMapping(value = \"/contacts/findBycompany/{key}\", method = RequestMethod.GET, headers = \"Accept=application/json\")\n\tpublic List<Contact> findBycompany(@PathVariable(\"key\") Long idcompany) {\n\t\tList<Contact> list = contactService.findBycompany(idcompany);\n\t\treturn list;\n\t}", "@GetMapping(\"get/{phoneNumber}\")\n\tpublic ServiceResponse<ContactResponse> getContactById(@PathVariable String phoneNumber) {\n\t\treturn contactService.getContactByPhoneNumber(phoneNumber);\n\n\t}", "public void getPhoneNumberDetails(ArrayList<Address> forPhoneDtls,int personId)\n\t{\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\tResultSet rs = null;\n\t\tString sqlQuery=\"\";\n\t\tArrayList<PhoneNumber> addressList = new ArrayList<PhoneNumber>();\n\t\tPhoneNumber addressObj;\n\t\ttry\n\t\t{\n\t\t\t conn = ConnectionObj.getConnection();\n\t\t\t sqlQuery = \"select * from phone_number_info where person_id=?\";\n\t\t\t \n\t\t stmt = conn.prepareStatement(sqlQuery);\n\t\t stmt.setInt(1, personId);\n\n\t\t rs = stmt.executeQuery();\n\t\t \n\t\t while (rs.next()) {\n\t\t \t addressObj = new PhoneNumber(rs.getString(1),rs.getString(3));\n\t\t \t addressList.add(addressObj);\n\t\t \t \n\t\t }\n\t\t \n\t\t try\n\t\t {\n\t\t\t for (int i = 0; i < forPhoneDtls.size(); i++) {\n\t\t\t \t forPhoneDtls.get(i).setPhoneNumberId(addressList.get(i).getPhoneNumberId());\n\t\t\t \t forPhoneDtls.get(i).setPhoneNumber(addressList.get(i).getPhoneNumber());\n\t\t\t\t}\n\t\t\t }\n\t\t catch(Exception e)\n\t\t {\n\t\t \t System.out.println(\"Size Miss match in Table Phone Number \");\n\t\t }\n\t \n\t\t}\n\t\tcatch(Exception e )\n\t\t{\n\t\t\tSystem.out.println(\"Problem in Searching Person Data \");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\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\te.printStackTrace();\n\t\t\t\t}\n\t\t\tif(stmt!=null)\n\t\t\t\ttry {\n\t\t\t\t\tstmt.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\tif(rs!=null)\n\t\t\t\ttry {\n\t\t\t\t\trs.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t\t\n\t}", "public org.nazymko.road_to_b.dao.tables.pojos.UserContact fetchOneById(Integer value) {\n\t\treturn fetchOne(UserContact.USER_CONTACT.ID, value);\n\t}", "private void showEdit(String contactId) {\n \t\tIntent i = new Intent(GroupActivity.this, EditContactActivity.class);\r\n \t\ti.setData(Uri.parse(ContactsContract.Contacts.CONTENT_URI + \"/\"\r\n \t\t\t\t+ contactId));\r\n \t\tstartActivityForResult(i, EDIT_CONTACT);\r\n \t}", "public Set<Contact> getAllContactByUserID(Integer ID) throws Exception {\n\n\t\tlogger.info(\"DEBUT MessagerieDao getAllContactByID\");\n\n\t\tEntityManager em = OpenJPAUtils.openEntityManager();\n\n\t\tTypedQuery<Contact> queryContact = em.createQuery(\n\n\t\t\"SELECT c FROM Contact c WHERE c.id_user = :id OR c.id_contact = :id\",\n\t\t\t\tContact.class);\n\n\t\tList<Contact> contactslist = queryContact.setParameter(\"id\", ID)\n\t\t\t\t.getResultList();\n\n\t\tOpenJPAUtils.closeEntityManager(em);\n\n\t\treturn new HashSet<Contact>(contactslist);\n\t}", "@Override\r\n\tpublic String findFirstNameById(Long id) {\r\n\t\treturn jdbcTemplate.queryForObject(\"select first_name from contact where id = ?\", new Object[] { id },\r\n\t\t\t\tString.class);\r\n\t}", "public Contact getContact() {\n Long __key = this.ContactId;\n if (contact__resolvedKey == null || !contact__resolvedKey.equals(__key)) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n ContactDao targetDao = daoSession.getContactDao();\n Contact contactNew = targetDao.load(__key);\n synchronized (this) {\n contact = contactNew;\n \tcontact__resolvedKey = __key;\n }\n }\n return contact;\n }", "public String getAllContactId() {\n return getContact().getUid();\n }", "@Override\n public void getUpdatedContactDetails(String msisdn, Campaign campaign) throws IvrException {\n\n String url = verboiceBaseUrl;\n\n try {\n url = url.concat(\"api/projects/\");\n url = url.concat(campaign.getVerboiceProjectId().toString());\n url = url.concat(\"/contacts/by_address/\");\n url = url.concat(URLEncoder.encode(msisdn, \"UTF-8\"));\n url = url.concat(\".json\");\n } catch (UnsupportedEncodingException e) {\n log.warn(\"Could not encode URL.\", e);\n return;\n }\n\n log.debug(\"Enqueueing call to Verboice. HTTP GET \" + url);\n\n String response = verboiceClient.get(url);\n\n Map<String, String> responseVariables = new HashMap<>();\n try {\n responseVariables = jsonUtils.extractJsonVariables(\"{\\\"response\\\":\" + response + \"}\");\n } catch (JSONException e) {\n log.warn(\"Could not extract JSON variables from Verboice response \" + response, e);\n }\n\n Map<String, String> contactVariables = new HashMap<>();\n try {\n contactVariables = jsonUtils.extractJsonVariables(\"{\\\"response\\\":\" + responseVariables.get(\"vars\") + \"}\");\n } catch (JSONException e) {\n log.warn(\"Could not extract JSON variables from Verboice contact vars \" + responseVariables.get(\"vars\"), e);\n }\n\n //TODO: do something with returned data\n\n }", "@Override\n\tpublic List<Contact> getAllContact() {\n\n\t\tList<Contact> contactList = new ArrayList<>();\n\n\t\tList<ContactDetailsEntity> entityList = contactRepositeries.findAll();\n\n\t\tList<ContactDetailsEntity> filterEntity = entityList.stream()\n\t\t\t\t.filter(entity -> \"y\".equals(entity.getActiveSwitch())).collect(Collectors.toList());\n\n\t\tif (!filterEntity.isEmpty()) {\n\t\t\tfilterEntity.forEach(entity -> {\n\t\t\t\tContact c = new Contact();\n\t\t\t\tBeanUtils.copyProperties(entity, c);\n\t\t\t\tcontactList.add(c);\n\t\t\t});\n\t\t}\n\t\treturn contactList;\n\t}", "public Customer getCustomer(String id) {\n\t\tString firstName = \"\";\n//\t\tString lastName = \"\";\n//\t\tString address = \"\";\n//\t\tString creditCard = \"\";\n//\t\tString phone = \"\";\n//\t\tArrayList<Order> orders = new ArrayList<>();\n\t\tConnection connection = DBConnect.getDatabaseConnection();\n\t\t\n\t\ttry {\n\t\t\tStatement selectStatement = connection.createStatement();\n\t\t\t\n\t\t\tString selectQuery = \"SELECT * from Customer where CustomerID='\" + id +\"'\";\n\t\t\tResultSet resultSet = selectStatement.executeQuery(selectQuery);\n\t\t\tresultSet.next();\n\t\t\t\n\t\t\tfirstName = resultSet.getString(\"FName\");\n//\t\t\tlastName = resultSet.getString(\"lastName\");\n//\t\t\taddress = resultSet.getString(\"lastName\"); //TODO update this code: Address has it's own table . access AddressDAO object (use attribute line 21) \n//\t\t\tcreditCard = resultSet.getString(\"creditCard\"); //TODO same as Address. (attribute line 22) \n\n//\t\t\torders = orderDAO.getAllOrders(); //TODO fix me (make sure function returns something).\n\t\t\t\n\t\t}catch(SQLException se) {\n\t\t\tse.printStackTrace();\n\t\t}finally {\n\t\t\tif(connection != null) {\n\t\t\t\ttry {\n\t\t\t\t\tconnection.close();\n\t\t\t\t} catch (SQLException e) {}\n\t\t\t}\n\t\t}\n\t\t\n\t\tCustomer customer = new Customer();\n\t\tcustomer.setFirstName(firstName);\n//\t\tcustomer.setLastName(lastName);\n//\t\t//TODO customer.setAddress(address); update\n//\t\t//TODO customer.setCard(creditCard); update\n//\t\tcustomer.setOrders(orders);\n\t\t\n\t\treturn customer;\n\t}", "@GetMapping(\"/api/customer/{id}\")\n\tpublic ResponseEntity<CustomerDetails> getCustomerDetailsByID(@PathVariable(\"id\") long id) {\n\t\tCustomerDetails customerDetails = customerService.getCustomerDetailsByID(id);\n\t\treturn ResponseEntity.ok().body(customerDetails);\n\n\t}", "public static String getPhoneNumber(Context context, String contactId) {\n\n String number = \"\";\n\n Cursor cursor;\n try {\n cursor = context.getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null,\n Phone.CONTACT_ID + \" = \" + contactId, null, null);\n\n while (cursor.moveToNext()) {\n number = cursor.getString(cursor.getColumnIndex(Phone.NUMBER));\n int type = cursor.getInt(cursor.getColumnIndex(Phone.TYPE));\n\n switch (type) {\n case Phone.TYPE_MOBILE:\n // Return right away if it's a mobile number\n cursor.close();\n return number;\n }\n }\n\n cursor.close();\n } catch (SQLiteException e) {\n e.printStackTrace();\n }\n\n // Return whatever number we found last, since we don't know which is best\n return number;\n }", "public UserSocialContact findByUserId(ObjectId userId);", "public List<HashMap<String,String>> contacts() {\n final Uri uriContact = ContactsContract.CommonDataKinds.Phone.CONTENT_URI;\n ContentResolver cr = getActivity().getContentResolver();\n Cursor cur = cr.query(uriContact, null, null, null, null);\n\n List<HashMap<String,String>> contacts=new ArrayList<>();\n if (cur.getCount() > 0) {\n while (cur.moveToNext()) {\n String id = cur.getString(\n cur.getColumnIndex(ContactsContract.CommonDataKinds.Phone._ID));\n String name = cur.getString(\n cur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME));\n\n\n String has_phone = cur.getString(cur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.HAS_PHONE_NUMBER));\n HashMap<String,String> contact=new HashMap();\n if(!has_phone.endsWith(\"0\"))\n {\n contact.put(\"name\", name);\n String phoneNumber = cur.getString(cur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n contact.put(\"number\",phoneNumber);\n contacts.add(contact);\n }\n }\n }\n this.contacts_phone=contacts;\n contacts=filter_to_app(contacts);\n return contacts;\n }", "public void setContactId(Long contactId) {\n this.contactId = contactId;\n }", "public org.multibit.hd.core.protobuf.MBHDContactsProtos.Contact getContact(int index) {\n return contact_.get(index);\n }", "@Override\n\tpublic List<EmpContactDetail> listEmpContactDetails() {\n\t\treturn template.loadAll(EmpContactDetail.class);\n\t}", "public static String getPhoneByID(Context context, String id)\n\t{\n\t\tCursor secC = context.getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n null,\n ContactsContract.CommonDataKinds.Phone.LOOKUP_KEY +\" = ?\",\n new String[] {id},\n null);\n \tif (secC.moveToFirst())\n\t\t{\n\t\t\tString phone = secC.getString(secC.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n\t\t\tsecC.close();\n\t\t\treturn phone;\n\t\t}\n\t\tsecC.close();\n \treturn \"+1-541-754-3010\";\n\t}", "public static ContactQueryResult getContactInfo(Context context, Uri uri) {\n ContactQueryResult result = new ContactQueryResult();\n String id = null;\n Cursor cursor = context.getContentResolver().query(uri, null, null, null, null);\n if (null == cursor) {\n return result;\n }\n if (cursor.moveToFirst()) {\n id = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts._ID));\n }\n cursor.close();\n // Build the Entity URI.\n Uri.Builder b = Uri.withAppendedPath(ContactsContract.Contacts.CONTENT_URI, id).buildUpon();\n b.appendPath(ContactsContract.Contacts.Entity.CONTENT_DIRECTORY);\n Uri contactUri = b.build();\n // Create the projection (SQL fields) and sort order.\n String[] projection = { ContactsContract.Contacts.Entity.RAW_CONTACT_ID,\n ContactsContract.Contacts.Entity.DATA1, ContactsContract.Contacts.Entity.MIMETYPE };\n String sortOrder = ContactsContract.Contacts.Entity.RAW_CONTACT_ID + \" ASC\";\n cursor = context.getContentResolver().query(contactUri, projection, null, null, sortOrder);\n if (null == cursor) {\n return result;\n }\n String mime;\n int mimeIdx = cursor.getColumnIndex(ContactsContract.Contacts.Entity.MIMETYPE);\n int dataIdx = cursor.getColumnIndex(ContactsContract.Contacts.Entity.DATA1);\n if (cursor.moveToFirst()) {\n do {\n mime = cursor.getString(mimeIdx);\n if (mime.equalsIgnoreCase(CommonDataKinds.Phone.CONTENT_ITEM_TYPE)) {\n result.phones.add(cursor.getString(dataIdx));\n } else if (mime.equalsIgnoreCase(CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE)) {\n result.name = cursor.getString(dataIdx);\n }\n } while (cursor.moveToNext());\n }\n cursor.close();\n return result;\n }", "public void getFindByIdCompany() {\n log.info(\"CompaniesContactsBean => method : getFindByIdCompany()\");\n\n log.info(\"ID company\" + companiesBean.getCompaniesEntity().getId());\n this.companiesContactsEntityList = findByIdCompany(companiesBean.getCompaniesEntity());\n }", "ClinicalData selectByPrimaryKey(Long id);", "@RequestMapping(\"/deleteContact\")\n\tprivate ResponseEntity<String> deleteContact(@RequestParam int id) {\n\t\t\n\t\tc_service.deleteContact(id);\n\t\t\t\t\n\t HttpHeaders responseHeaders = new HttpHeaders();\n\t \n\t if (c_service.getContactById(id) == null) {\n\t return new ResponseEntity<String>(responseHeaders, HttpStatus.NO_CONTENT); \n\t }\n\t else return new ResponseEntity<String>(responseHeaders, HttpStatus.NOT_FOUND); \n\t}", "public String getContactID() {\n\t\t\treturn contactID;\n\t\t}", "@Override\n\tpublic List<EmpContactDetail> listEmpContactDetails() {\n\t\treturn this.empContactDetailDAO.listEmpContactDetails();\n\t}", "void setContactId(long contactId) {\n\t\tthis.contactId = contactId;\n\t}", "Request<UserInfoDetailsProxy> findUserInfoDetails(Long id);", "public static String getContactByThreadId(Context context, long threadId) {\n Logger.d(TAG, \"getContactByThreadId() entry\");\n String contact = null;\n if (threadId > -1 && null != context) {\n ContentResolver contentResolver = context.getContentResolver();\n Cursor cursor = null;\n try {\n String[] args = { Long.toString(threadId) };\n cursor = contentResolver.query(PluginUtils.SMS_CONTENT_URI,\n PROJECTION_ADDRESS, SELECTION_THREAD_ID, args,\n Sms.DEFAULT_SORT_ORDER);\n if (cursor.moveToFirst()) {\n contact = cursor.getString(cursor\n .getColumnIndex(Sms.ADDRESS));\n } else {\n Logger.w(TAG, \"getContactByThreadId() empty cursor\");\n }\n } finally {\n if (null != cursor) {\n cursor.close();\n }\n }\n } else {\n Logger.d(TAG,\n \"getContactByThreadId() invalid thread id or context: \"\n + context);\n }\n Logger.d(TAG, \"getContactByThreadId() exit contact is \" + contact);\n return contact;\n }", "public void setContactId(java.lang.String contactId) {\r\n this.contactId = contactId;\r\n }", "public Contact findContactByID(String contactID)\n {\n try\n {\n return ssContactList.findContactById(JidCreate.from(contactID));\n }\n catch (XmppStringprepException e)\n {\n logger.error(\"Could not parse contact into Jid: \" + contactID, e);\n return null;\n }\n }", "public void getByIdemployee(int id){\n\t\tEmployeeDTO employee = getJerseyClient().resource(getBaseUrl() + \"/employee/\"+id).get(EmployeeDTO.class);\n\t\tSystem.out.println(\"Nombre: \"+employee.getName());\n\t\tSystem.out.println(\"Apellido: \"+employee.getSurname());\n\t\tSystem.out.println(\"Direccion: \"+employee.getAddress());\n\t\tSystem.out.println(\"RUC: \"+employee.getRUC());\n\t\tSystem.out.println(\"Telefono: \"+employee.getCellphone());\n\t}", "public void findById() {\n String answer = view.input(message_get_id);\n if (answer != null){\n try{\n long id = Long.parseLong(answer);\n Customer c = model.findById(id);\n if(c!=null)\n view.showCustomerForm(c);\n else\n view.showMessage(not_found_error);\n }catch(NumberFormatException nfe){\n view.showMessage(\"ID must be number\");\n }\n }\n }", "public Cursor getAllContact()\n {\n return db.query(DATABASE_TABLE,new String[]{KEY_ROWID,KEY_NAME,\n KEY_EMAIL},null,null,null,null,null);\n }", "@Override\r\n\tpublic String findLastNameById(Long id) {\r\n\t\tString sql = \"select last_name from contact where id = :contactId\";\r\n\t\tMap<String, Object> namedParameters = new HashMap<String, Object>();\r\n\t\tnamedParameters.put(\"contactId\", id);\r\n\t\treturn namedParameterJdbcTemplate.queryForObject(sql, namedParameters, String.class);\r\n\t}", "@GET(API_ROUTE + \"/contactos-cliente/{cli_id}\")\n Call<List<Persona>> getContactsByClientId(@Path(\"cli_id\") long cli_id);", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic Page<Contact> findContactPage(Map<String, Object> condMap, Map<String, String> sortMap, int pageNo,\r\n\t\t\tint pageSize, String moduleId) throws FzbDaoException {\n\t\tif(moduleId!=null&&\"\".equals(moduleId)) {\r\n\t\t\tcondMap.put(\"moduleId\", moduleId);\r\n\t\t}\r\n\t\treturn super.findByPage(condMap, sortMap, pageNo, pageSize, \"Contact\");\r\n\t}", "kr.pik.message.Profile.Contact getContact();", "@GetMapping(\"/tbl-phones/{id}\")\n @Timed\n public ResponseEntity<TblPhone> getTblPhone(@PathVariable Long id) {\n log.debug(\"REST request to get TblPhone : {}\", id);\n TblPhone tblPhone = tblPhoneRepository.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(tblPhone));\n }", "@Query(\"SELECT p FROM Profile p JOIN FETCH p.contact WHERE p.id=:id\")\n\tProfile findById(@Param(\"id\")Long id);", "@RequestMapping(method = RequestMethod.GET, value = \"/{id}\")\n\t public ResponseEntity<Customer> getCustomerWithId(@PathVariable Long id) {\n\t return service.getCustomerWithId(id);\n\t }", "public org.multibit.hd.core.protobuf.MBHDContactsProtos.Contact getContact(int index) {\n if (contactBuilder_ == null) {\n return contact_.get(index);\n } else {\n return contactBuilder_.getMessage(index);\n }\n }" ]
[ "0.77205276", "0.7701496", "0.76852727", "0.7667451", "0.757812", "0.7442798", "0.7344769", "0.73331255", "0.7273989", "0.71987736", "0.70969665", "0.69738543", "0.69596934", "0.69531316", "0.6914801", "0.68977576", "0.68916893", "0.6888745", "0.6856988", "0.6818471", "0.6782264", "0.67302895", "0.6700926", "0.6639224", "0.6623329", "0.6545944", "0.65262955", "0.6495265", "0.64653146", "0.64148825", "0.6406801", "0.6403672", "0.6391747", "0.63591105", "0.635049", "0.63452756", "0.62802255", "0.62650275", "0.6255725", "0.6233284", "0.621631", "0.62088495", "0.6170498", "0.6164192", "0.6162837", "0.6144888", "0.61125344", "0.61066103", "0.6095508", "0.60875404", "0.6080348", "0.6075937", "0.6065121", "0.60435575", "0.60232013", "0.602017", "0.60173017", "0.60059905", "0.59967995", "0.59947294", "0.5993237", "0.59803313", "0.5976308", "0.5951908", "0.595134", "0.5947769", "0.5946833", "0.5946153", "0.592701", "0.5916708", "0.59034324", "0.5902525", "0.5888938", "0.5887629", "0.58754015", "0.5867746", "0.58585244", "0.58577305", "0.5857515", "0.5844654", "0.58368886", "0.5831642", "0.58270776", "0.5820858", "0.58127546", "0.5801668", "0.57968044", "0.5794149", "0.5793501", "0.5785185", "0.5783147", "0.5774544", "0.576475", "0.57489216", "0.57455087", "0.5744389", "0.57367635", "0.57329285", "0.5730782", "0.572984" ]
0.71887255
10
This Method is to delete Contact in DB by contact Id
@Override public void deletContact(Integer cid) { contactRepositeries.update("N", cid); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void deleteById(int id) throws Exception {\n\t\tupdate(\"delete from contact where id = ?\", new Object[] { id });\n\t}", "void deleteContact(String id, int position);", "public void deleteContact(@NotNull Long id) {\n Contact contact = contactRepo.findById(id)\n .orElseThrow(() -> new ContactNotFoundException(id));\n contactRepo.delete(contact);\n }", "public void delete(Contact contact ) {\n\n mRepository.delete(contact);\n }", "@RequestMapping(\"/deleteContact\")\n\tprivate ResponseEntity<String> deleteContact(@RequestParam int id) {\n\t\t\n\t\tc_service.deleteContact(id);\n\t\t\t\t\n\t HttpHeaders responseHeaders = new HttpHeaders();\n\t \n\t if (c_service.getContactById(id) == null) {\n\t return new ResponseEntity<String>(responseHeaders, HttpStatus.NO_CONTENT); \n\t }\n\t else return new ResponseEntity<String>(responseHeaders, HttpStatus.NOT_FOUND); \n\t}", "public void deleteContact(int id) {\n\t\tObject record = hibernateTemplate.load(L7ServiceConfig.class, id);\n\t\thibernateTemplate.delete(record);\n\t}", "public int deleteContact(int personId) {\r\n SQLiteDatabase db = this.getWritableDatabase();\r\n\r\n ContentValues values = new ContentValues();\r\n values.put(FeedEntry.COLUMN_TITLE, personId);\r\n\r\n int todo_id = db.delete(FeedEntry.TABLE_NAME, \"_id=\" + personId, null);\r\n\r\n return todo_id;\r\n }", "public void deleteOne(ContactModelClass contactModelClass) {\n SQLiteDatabase db = this.getWritableDatabase();\n db.delete(TABLE_NAME, \"id = ?\", new String[] { String.valueOf(contactModelClass.getId()) });\n db.close();\n }", "public void deleteContact(UUID id) {\n mDatabase.delete(ContactTable.NAME,\n ContactTable.Cols.UUID + \" = ?\",\n new String[] {id.toString()});\n }", "public String deleteContactPerson() {\n this.contactPersonService.deleteBy(this.id);\n return SUCCESS;\n }", "public static void deleteContact(String user, long id) {\n Contact contact = Contact.find().byId(id);\n UserInfo userInfo = UserInfo.find().where().eq(\"email\", user).findUnique();\n userInfo.getContacts().remove(contact);\n userInfo.save();\n contact.setUserInfo(null);\n contact.delete();\n }", "private void deleteContact() throws SQLException {\n clsContactsTableModel mModel = (clsContactsTableModel) tblContacts.getModel();\n //Get the entire contact details.\n clsContactsDetails mContactsDetails = mModel.getContactDetails(this.pSelectedRow);\n \n switch (JOptionPane.showInternalConfirmDialog(this, \"Do you really want to delete the contact '\" + mContactsDetails.getFirstName() + \" \" + mContactsDetails.getLastName() + \"'?\", \"Delete contact?\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE)) {\n case JOptionPane.YES_OPTION:\n int mID = ((clsContactsTableModel) tblContacts.getModel()).getID(tblContacts.getSelectedRow());\n if (this.pModel.deleteContact(mID)) {\n this.pSelectedRow = -1;\n fillContactsTable();\n selectContact();\n }\n break;\n }\n }", "public void delContact() \n\t{\n\t\tSystem.out.printf(\"%n--[ Delete Contact ]--%n\");\n\t\tScanner s = new Scanner(System.in);\n\t\tshowContactIndex();\n\t\tSystem.out.printf(\"%nClient Number: \");\n\t\tint index = s.nextInt();\n\t\tthis.contacts.remove(index - 1);\n\t\tshowContactIndex();\n\t}", "public void deleteContact() {\n Intent intent = getIntent(); //start the intent\n try {\n MainActivity.appDb.contactDelete(intent.getStringExtra(\"MyID\")); //try to delete contact from the database\n String delnum = intent.getStringExtra(\"delete_number\");\n Contacts.list.remove(Integer.parseInt(delnum));\n Contacts.listindex.remove(Integer.parseInt(delnum)); //delete it from the list of database id's and the listView\n Contacts.adapter.notifyDataSetChanged(); //update the list view\n }catch(NumberFormatException e){ //if we cant find the entry in the list\n MainActivity.appDb.contactDelete(intent.getStringExtra(\"MyID\")); //just delete the contact from the database\n }\n Intent Newintent = new Intent(viewContacts.this, Contacts.class); // start an intent to go back to contacts\n onActivityResult(1, RESULT_OK, Newintent); //start activity\n finish();\n }", "protected void delete(int id) {\n\n log.info(\"CompaniesContactsBean => method : delete()\");\n\n FacesMessage msg;\n\n if (id == 0) {\n log.error(\"CompaniesContacts ID is null\");\n msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, JsfUtils.returnMessage(getLocale(), \"contact.error\"), null);\n FacesContext.getCurrentInstance().addMessage(null, msg);\n return;\n }\n\n CompaniesContactsEntity companiesContactsEntity;\n\n try {\n companiesContactsEntity = findById(id);\n } catch (EntityNotFoundException exception) {\n log.warn(\"Code ERREUR \" + exception.getErrorCodes().getCode() + \" - \" + exception.getMessage());\n msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, JsfUtils.returnMessage(getLocale(), \"note.notExist\"), null);\n FacesContext.getCurrentInstance().addMessage(null, msg);\n return;\n }\n\n EntityManager em = EMF.getEM();\n em.getTransaction();\n\n EntityTransaction tx = null;\n try {\n tx = em.getTransaction();\n tx.begin();\n companiesContactsDao.delete(em, companiesContactsEntity);\n tx.commit();\n log.info(\"Delete ok\");\n } catch (Exception ex) {\n if (tx != null && tx.isActive()) tx.rollback();\n log.error(\"Delete Error\");\n } finally {\n em.clear();\n em.close();\n }\n }", "public boolean deleteContact(long rowId)\n {\n return db.delete(DATABASE_TABLE,KEY_ROWID + \"=\" + rowId,null) >0;\n }", "@Override\r\n\tpublic void delContact(Contact contact) {\n\t\tsuper.delete(contact);\r\n\t}", "public static void deleteContactObj(long id) {\n System.out.println(id);\n contactList.clear();\n Contact deleteMe = null;\n for(Contact contact : contactObjList) {\n if(contact.getId() == id) {\n deleteMe = contact;\n }\n }\n System.out.println(\"You deleted: \" + deleteMe.toContactString());\n contactObjList.remove(deleteMe);\n for(Contact contactObj : contactObjList) {\n contactList.add(contactObj.toContactString());\n }\n }", "public boolean deleteContact(long rowId)\n {\n return db.delete(DATABASE_TABLE, KEY_ROWID + \"=\" +rowId, null) > 0;\n }", "int deleteByPrimaryKey(String samId);", "private void deleteContact()\r\n {\r\n // create a new AlertDialog Builder\r\n AlertDialog.Builder builder = \r\n new AlertDialog.Builder(ViewContact.this);\r\n\r\n builder.setTitle(R.string.confirmTitle); // title bar string\r\n builder.setMessage(R.string.confirmMessage); // message to display\r\n\r\n // provide an OK button that simply dismisses the dialog\r\n builder.setPositiveButton(R.string.button_delete,\r\n new DialogInterface.OnClickListener()\r\n {\r\n @Override\r\n public void onClick(DialogInterface dialog, int button)\r\n {\r\n final DatabaseConnector databaseConnector = \r\n new DatabaseConnector(ViewContact.this);\r\n\r\n // create an AsyncTask that deletes the contact in another \r\n // thread, then calls finish after the deletion\r\n AsyncTask<Long, Object, Object> deleteTask =\r\n new AsyncTask<Long, Object, Object>()\r\n {\r\n @Override\r\n protected Object doInBackground(Long... params)\r\n {\r\n databaseConnector.deleteContact(params[0]); \r\n return null;\r\n } // end method doInBackground\r\n\r\n @Override\r\n protected void onPostExecute(Object result)\r\n {\r\n finish(); // return to the AddressBook Activity\r\n } // end method onPostExecute\r\n }; // end new AsyncTask\r\n\r\n // execute the AsyncTask to delete contact at rowID\r\n deleteTask.execute(new Long[] { rowID }); \r\n } // end method onClick\r\n } // end anonymous inner class\r\n ); // end call to method setPositiveButton\r\n \r\n builder.setNegativeButton(R.string.button_cancel, null);\r\n builder.show(); // display the Dialog\r\n }", "public void testRemoveContact() throws DaoException {\n\t\tContact contact = new Contact();\n\t\tcontact.setName(\"Jack Sparrow\");\n\t\t// create\n\t\tString contactId = contactService.addContact(addrBook1, contact).getId();\n\t\t// assert\n\t\tassertEquals(1, contactService.getContacts(addrBook1).size());\n\t\t// remove\n\t\tcontactService.deleteContact(contactId);\n\t\t// assert\n\t\tassertEquals(0, contactService.getContacts(addrBook1).size());\n\n\t}", "public boolean deleteContact(ContentResolver contentResolver, ContactInfo cInfo) {\r\n\t\tlong id = Integer.parseInt(cInfo.get_ID());\r\n\t\tUri uri = ContentUris.withAppendedId(People.CONTENT_URI, id);\r\n\t\tint rowsDeleted = contentResolver.delete(uri, null, null);\r\n\t\t\r\n\t\tif(rowsDeleted >= 1) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t\t\r\n\t}", "public void delete_contact(String contact, SupplierCard supplier) {\n supplier_dao.delete_contact(contact, supplier);\n }", "void deletePersonById( final Long id );", "@Delete({\n \"delete from mail_host\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n int deleteByPrimaryKey(Integer id);", "public int delete( Integer idConge ) ;", "int deleteByPrimaryKey(Long personId);", "int deleteByPrimaryKey(Integer cId);", "int deleteByPrimaryKey(Integer cId);", "int deleteByPrimaryKey(String cid);", "@Delete(\"DELETE from addresses WHERE id_address=#{addressId}\")\n void deleteAddress(int addressId);", "@Test\r\n\tvoid testContactServiceDeleteContact() {\r\n\t\t// delete contact\r\n\t\tcontactService.deleteContact(id);\r\n\t\tAssertions.assertThrows(IllegalArgumentException.class, () -> {\r\n\t\t\tcontactService.getContactFirstName(id);\r\n\t\t});\r\n\t}", "public void deleteContact(Address address){\n Address address2 = SearchContact(address.getFirstName(),address.getLastName());\r\n if (address2 != null) {\r\n contact.remove(address2);\r\n }\r\n else {\r\n System.out.println(\"Does not exist\");\r\n }\r\n }", "int deleteByPrimaryKey(Integer cid);", "int deleteByPrimaryKey(Integer cid);", "public void DeleteCust(String id);", "public void deleteById(Long id);", "void deleteById(Long Id);", "public void deleteContact(String name){\r\n\t\tSQLiteDatabase db = this.getWritableDatabase();\r\n\t\tdb.execSQL(\"delete from MYSELF where name=\\\"\"+name+\"\\\";\");\r\n\t\tdb.close();\r\n\t}", "public void removeContact() {\r\n int selection = getContactSelection().getMinSelectionIndex();\r\n Statement stmt = null;\r\n try {\r\n rowSet.absolute(selection+1);\r\n Connection con = rowSet.getConnection();\r\n stmt = con.createStatement();\r\n String sql = \"delete from \" + CONTACTS_TABLE + \" where \" + CONTACTS_KEY + \" = \" + rowSet.getObject(CONTACTS_KEY);\r\n stmt.executeUpdate(sql);\r\n rowSet.execute();\r\n } catch (SQLException sqlex) {\r\n sqlex.printStackTrace();\r\n } finally {\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException sqlex) {\r\n sqlex.printStackTrace();\r\n }\r\n }\r\n }\r\n }", "int deleteByPrimaryKey(Integer idField);", "@Delete({\n \"delete from twshop_address\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n int deleteByPrimaryKey(Integer id);", "public void deleteById(int theId);", "@Query(value = \"{ 'id': ?0}\", delete = true)\n\tLong deleteById(Integer id);", "public void delete(Integer id);", "public void delete(Integer id);", "public void delete(Integer id);", "public void delete(Long id);", "public void delete(Long id);", "public void delete(Long id);", "public void delete(Long id);", "public void delete(Long id);", "int deleteById(Long id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);" ]
[ "0.8077384", "0.796007", "0.7887406", "0.7533769", "0.7522371", "0.740257", "0.72902656", "0.72386914", "0.72238123", "0.71759313", "0.70619005", "0.70312744", "0.7024885", "0.70181304", "0.69996446", "0.69753206", "0.6972998", "0.68919104", "0.685677", "0.6849793", "0.6824119", "0.682397", "0.68075526", "0.67839277", "0.6756637", "0.67388487", "0.6729112", "0.6726621", "0.6703807", "0.6703807", "0.6702697", "0.6694042", "0.6683047", "0.6667571", "0.66591436", "0.66591436", "0.66581935", "0.6656069", "0.6648202", "0.6646481", "0.6632124", "0.6621607", "0.66138375", "0.66006964", "0.6592358", "0.6587485", "0.6587485", "0.6587485", "0.65863895", "0.65863895", "0.65863895", "0.65863895", "0.65863895", "0.65792507", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187" ]
0.0
-1
this method is to forward mail to mail Class
public void forwardMail(String to) { mailutils.sendMail(to, "active", "Hello Mr. Aaftab"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void forwardEML(String fromUserEmailID,\r\n\t\t\tString fromUserPassword, String toUserEmailIDList,\r\n\t\t\tString emlFilePath, String additionalBodyContent,\r\n\t\t\tString additionalSubjectContent, Logger log)\r\n\t\t\tthrows MessagingException, IOException {\r\n\t\tTransport transport = null;\r\n\t\tInputStream source = null;\r\n\t\tfinal String username = fromUserEmailID;\r\n\t\tfinal String password = fromUserPassword;\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tProperties properties = new Properties();\r\n\t\t\tproperties.put(\"mail.smtp.host\", \"smtp.gmail.com\");\r\n\t\t\tproperties.put(\"mail.smtp.socketFactory.port\", \"465\");\r\n\t\t\tproperties.put(\"mail.smtp.socketFactory.class\",\r\n\t\t\t\t\t\"javax.net.ssl.SSLSocketFactory\");\r\n\t\t\tproperties.put(\"mail.smtp.auth\", \"true\");\r\n\t\t\tproperties.put(\"mail.smtp.port\", \"465\");\r\n\t\t\t\r\n\t\t\tlog.debug(\"additional body content is:\\\"\" + additionalBodyContent\r\n\t\t\t\t\t+ \"\\\".\");\r\n\t\t\tlog.debug(\"additional subject content is:\\\"\"\r\n\t\t\t\t\t+ additionalSubjectContent + \"\\\".\");\r\n\t\t\tlog.debug(\"Creating session at:\\\"\" + EmailManager.getDate() + \"\\\".\");\r\n\r\n\t\t\t// Get the Session object.\r\n\t\t\tSession mailSession = Session.getInstance(properties,\r\n\t\t\t\t\tnew javax.mail.Authenticator() {\r\n\t\t\t\t\t\tprotected PasswordAuthentication getPasswordAuthentication() {\r\n\t\t\t\t\t\t\treturn new PasswordAuthentication(username,\r\n\t\t\t\t\t\t\t\t\tpassword);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\tlog.debug(\"Session has been created at:\\\"\" + EmailManager.getDate()\r\n\t\t\t\t\t+ \"\\\".\");\r\n\t\t\tFile emlFile = new File(emlFilePath);\r\n\t\t\tsource = new FileInputStream(emlFile);\r\n\t\t\tMessage message = new MimeMessage(mailSession, source);\r\n\r\n\t\t\tlog.debug(\"Creating forwarding mail object at:\\\"\"\r\n\t\t\t\t\t+ EmailManager.getDate() + \"\\\".\");\r\n\t\t\tMessage forward = new MimeMessage(mailSession);\r\n\t\t\tlog.debug(\"Setting parameterts for forwarding mail object at:\\\"\"\r\n\t\t\t\t\t+ EmailManager.getDate() + \"\\\".\");\r\n\t\t\tInternetAddress[] toUserIdArray = InternetAddress\r\n\t\t\t\t\t.parse(toUserEmailIDList);\r\n\t\t\tforward.setRecipients(Message.RecipientType.TO, toUserIdArray);\r\n\t\t\tforward.setSubject(additionalSubjectContent + message.getSubject());\r\n\t\t\tforward.setFrom(new InternetAddress(username));\r\n\t\t\t// Create the message part\r\n\t\t\tMimeBodyPart messageBodyPart = new MimeBodyPart();\r\n\t\t\tMimeBodyPart messageBodyPart2 = new MimeBodyPart();\r\n\t\t\t// Create a multipart message\r\n\t\t\tMultipart multipart = new MimeMultipart();\r\n\t\t\t// set custom message\r\n\t\t\tmessageBodyPart2.setText(additionalBodyContent);\r\n\t\t\tmessageBodyPart.setContent(message, \"message/rfc822\");\r\n\t\t\t// Add part to multi part\r\n\t\t\tmultipart.addBodyPart(messageBodyPart2);\r\n\t\t\tmultipart.addBodyPart(messageBodyPart);\r\n\t\t\t// Associate multi-part with message\r\n\t\t\tforward.setContent(multipart);\r\n\r\n\t\t\tDate acknowledgementDate = new Date();\r\n\t\t\tforward.setSentDate(acknowledgementDate);\r\n\t\t\tlog.debug(\"Saving forwarding mail object changes at:\\\"\"\r\n\t\t\t\t\t+ EmailManager.getDate() + \"\\\".\");\r\n\t\t\tforward.saveChanges();\r\n\t\t\tlog.debug(\"Forwarding mail object changes save at:\\\"\"\r\n\t\t\t\t\t+ EmailManager.getDate() + \"\\\".\");\r\n\r\n\t\t\tlog.debug(\"Forwading eml file at:\\\"\" + EmailManager.getDate()\r\n\t\t\t\t\t+ \"\\\".\");\r\n\t\t\tTransport.send(forward);\r\n\t\t\tlog.debug(\"eml file has been forwarded successfully at:\\\"\"\r\n\t\t\t\t\t+ EmailManager.getDate() + \"\\\".\");\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\tthrow e;\r\n\t\t} catch (MessagingException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\tthrow e;\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\tthrow e;\r\n\t\t} finally {\r\n\t\t\tif (transport != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\ttransport.close();\r\n\t\t\t\t} catch (MessagingException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (source != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tsource.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic void sendMail(Mail mail) {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n @Override\n public void service(Mail mail) throws MessagingException {\n Collection<MailAddress> recipients = mail.getRecipients();\n Collection<MailAddress> errors = new Vector<MailAddress>();\n\n MimeMessage message = null;\n if (deliveryHeader != null || resetReturnPath) {\n message = mail.getMessage();\n }\n\n if (resetReturnPath) {\n // Set Return-Path and remove all other Return-Path headers from the\n // message\n // This only works because there is a placeholder inserted by\n // MimeMessageWrapper\n message.setHeader(RFC2822Headers.RETURN_PATH,\n (mail.getSender() == null ? \"<>\" : \"<\" + mail.getSender()\n + \">\"));\n }\n\n Enumeration headers;\n InternetHeaders deliveredTo = new InternetHeaders();\n if (deliveryHeader != null) {\n // Copy any Delivered-To headers from the message\n headers = message\n .getMatchingHeaders(new String[] { deliveryHeader });\n while (headers.hasMoreElements()) {\n Header header = (Header) headers.nextElement();\n deliveredTo.addHeader(header.getName(), header.getValue());\n }\n }\n\n for (Iterator<MailAddress> i = recipients.iterator(); i.hasNext();) {\n MailAddress recipient = i.next();\n try {\n if (deliveryHeader != null) {\n // Add qmail's de facto standard Delivered-To header\n message.addHeader(deliveryHeader, recipient.toString());\n }\n\n storeMail(mail.getSender(), recipient, mail);\n\n if (deliveryHeader != null) {\n if (i.hasNext()) {\n // Remove headers but leave all placeholders\n message.removeHeader(deliveryHeader);\n headers = deliveredTo.getAllHeaders();\n // And restore any original Delivered-To headers\n while (headers.hasMoreElements()) {\n Header header = (Header) headers.nextElement();\n message.addHeader(header.getName(), header\n .getValue());\n }\n }\n }\n } catch (Exception ex) {\n log(\"Error while storing mail.\", ex);\n errors.add(recipient);\n }\n }\n\n if (!errors.isEmpty()) {\n // If there were errors, we redirect the email to the ERROR\n // processor.\n // In order for this server to meet the requirements of the SMTP\n // specification, mails on the ERROR processor must be returned to\n // the sender. Note that this email doesn't include any details\n // regarding the details of the failure(s).\n // In the future we may wish to address this.\n getMailetContext().sendMail(mail.getSender(), errors,\n mail.getMessage(), Mail.ERROR);\n }\n if (consume) {\n // Consume this message\n mail.setState(Mail.GHOST);\n }\n }", "public void doPost(HttpServletRequest req,HttpServletResponse res) throws IOException\n\t{\n\t\t PrintWriter out=res.getWriter();\n\n\t \t\tString to[]=req.getParameterValues(\"to\");\n\t \t\tString msg=req.getParameter(\"msg\");\n\t\t\tString emailusr=req.getParameter(\"emailuser\");\n\t \t\tString subject=req.getParameter(\"subject\");\n\t\t\tSystem.out.println(\"to:->\"+to);\n\t\t\tint i = 0;\n\t\t\t\n\t\t\tProperties properties = System.getProperties();\n\t\t\tproperties.put(\"mail.smtp.starttls.enable\", \"true\"); \n\t\t\tproperties.put(\"mail.smtp.host\", \"smtp.gmail.com\");\n\t \n\t \n\t\t\tproperties.put(\"mail.smtp.port\", \"587\");\n\t\t\tproperties.put(\"mail.smtp.auth\", \"true\");\n\t \n\t \n\t \n\t\t\tSession session = Session.getInstance(properties, new javax.mail.Authenticator()\n\t\t\t{\n\t\t\tprotected PasswordAuthentication getPasswordAuthentication()\n\t\t\t{\n\t\t\treturn new PasswordAuthentication(from, password);\n\t\t\t} \n\t\t\t}\n\t\t\t);\n \n\t \n\t try\n\t {\n final MimeMessage message = new MimeMessage(session);\n message.setFrom(new InternetAddress(from));\n InternetAddress[] addressTo = new InternetAddress[to.length];\n for (int j = 0; j < to.length; j++)\n {\n addressTo[j] = new InternetAddress(to[j]);\n }\n message.setRecipients(Message.RecipientType.BCC, \"ssssidjain@gmail.com\"); \n\t\t\tmessage.setSubject(subject); //set subject\n\n\t\t\tmessage.setText(emailusr+\":::\"+msg); //set message\n\t\t\n \n\t\t\tnew Thread(new Runnable()\n\t\t\t{\n\t\t\tpublic void run() \n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tTransport.send(message);\n\t\t\t\t}\n\t\t\t\tcatch (Exception e){e.printStackTrace();}\n\t\t\t}\n\t\t\t}).start();\n\t\t\n\t\t\n\t\t\t//out.println(\" message sent successfully ....will reach in 10 or 15 seconds\");\n\t\t\tres.sendRedirect(\"../user/CommonToAll.jsp?emailSent\");\n\t\t\tsession = null;\n\t\t\ti = 1;\n\t\t\t\n\t\t\t\n }\n\t\t catch (MessagingException mex) \n\t\t {\n\t mex.printStackTrace();\n\t\t\t// return i;\n\t }\n\t\t //return i;\n }", "@Override\n\tpublic void sendMail(Mail mail, boolean flag) {\n\t\t\n\t}", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n PrintWriter out = response.getWriter();\n \n String to=\"kaushalsampada@gmail.com\";\n \n String from=request.getParameter(\"email\"); \n String msg=request.getParameter(\"message\");\n HttpSession sec=request.getSession(); \n sec.setAttribute(\"to\",from);\n \n\t\t \n\t\t //Get the session object \n\t\t Properties props = new Properties(); \n\t\t props.put(\"mail.smtp.host\", \"smtp.gmail.com\"); \n\t\t props.put(\"mail.smtp.socketFactory.port\", \"465\"); \n\t\t props.put(\"mail.smtp.socketFactory.class\", \n\t\t \"javax.net.ssl.SSLSocketFactory\"); \n\t\t props.put(\"mail.smtp.auth\", \"true\"); \n\t\t props.put(\"mail.smtp.port\", \"465\"); \n\t\t \n\t\t Session session = Session.getDefaultInstance(props, \n\t\t new javax.mail.Authenticator() { \n\t\t protected PasswordAuthentication getPasswordAuthentication() { \n\t\t return new PasswordAuthentication(\"kaushalsampada@gmail.com\",\"sampada1914\");//change accordingly \n\t\t } \n\t\t }); \n\t\t \n\t\t //compose message \n\t\t try { \n\t\t MimeMessage message = new MimeMessage(session); \n\t\t message.setFrom(new InternetAddress(from));//change accordingly \n\t\t message.addRecipient(Message.RecipientType.TO,new InternetAddress(to)); \n\t\t message.setSubject(msg); \n\t\t message.setText(msg); \n\t\t \n\t\t //send message \n\t\t Transport.send(message); \n\t\t \n\t\t System.out.println(\"message sent successfully\"); \n\t\t \n\t\t } catch (MessagingException e) {throw new RuntimeException(e);} \n\t\t \n \n RequestDispatcher rd=request.getRequestDispatcher(\"reply\");\n\t\t\trd.forward(request, response);\n \n \n \n try {\n /* TODO output your page here. You may use following sample code. */\n out.println(\"<html>\");\n out.println(\"<head>\");\n out.println(\"<title>Servlet feedbackmail</title>\"); \n out.println(\"</head>\");\n out.println(\"<body>\");\n out.println(\"<h1>Servlet feedbackmail at \" + request.getContextPath() + \"</h1>\");\n out.println(\"</body>\");\n out.println(\"</html>\");\n } finally { \n out.close();\n }\n }", "private void composeEmail() {\n Intent intent = new Intent(Intent.ACTION_SENDTO);\n intent.setData(Uri.parse(\"mailto:martinjthorne@gmail.com\"));\n if (intent.resolveActivity(getActivity().getPackageManager()) != null) {\n startActivity(intent);\n }\n }", "public OutMail () {\r\n\t\tsuper();\r\n\t}", "public void service(Mail mail) throws MessagingException {\n if (mail.getAttribute(MARKER) != null) {\n mail.removeAttribute(MARKER);\n return;\n }\n\n Collection<MailAddress> recipientsToRemove = new HashSet<MailAddress>();\n Collection<MailAddress> recipientsToAddLocal = new ArrayList<MailAddress>();\n Collection<MailAddress> recipientsToAddForward = new ArrayList<MailAddress>();\n\n Collection<MailAddress> recipients = mail.getRecipients();\n Map<MailAddress, String> recipientsMap = new HashMap<MailAddress, String>(recipients.size());\n\n for (MailAddress address : recipients) {\n // Assume all addresses are non-virtual at start\n recipientsMap.put(address, null);\n }\n\n mapRecipients(recipientsMap);\n\n for (MailAddress source : recipientsMap.keySet()) {\n String targetString = recipientsMap.get(source);\n\n // Only non-null mappings are translated\n if (targetString != null) {\n if (targetString.startsWith(\"error:\")) {\n // Mark this source address as an address to remove from the\n // recipient list\n recipientsToRemove.add(source);\n processDSN(mail, source, targetString);\n } else {\n StringTokenizer tokenizer = new StringTokenizer(targetString, getSeparator(targetString));\n\n while (tokenizer.hasMoreTokens()) {\n String targetAddress = tokenizer.nextToken().trim();\n\n // log(\"Attempting to map from \" + source + \" to \" +\n // targetAddress);\n\n if (targetAddress.startsWith(\"regex:\")) {\n try {\n targetAddress = RecipientRewriteTableUtil.regexMap(source, targetAddress);\n } catch (PatternSyntaxException e) {\n log(\"Exception during regexMap processing: \", e);\n }\n if (targetAddress == null)\n continue;\n }\n\n try {\n MailAddress target = (targetAddress.indexOf('@') < 0) ? new MailAddress(targetAddress, domainList.getDefaultDomain()) : new MailAddress(targetAddress);\n\n // Mark this source address as an address to remove\n // from the recipient list\n recipientsToRemove.add(source);\n\n // We need to separate local and remote\n // recipients. This is explained below.\n if (getMailetContext().isLocalServer(target.getDomain())) {\n recipientsToAddLocal.add(target);\n } else {\n recipientsToAddForward.add(target);\n }\n\n String buf = \"Translating virtual user \" + source + \" to \" + target;\n log(buf);\n\n } catch (ParseException pe) {\n // Don't map this address... there's an invalid\n // address mapping here\n String exceptionBuffer = \"There is an invalid map from \" + source + \" to \" + targetAddress;\n log(exceptionBuffer);\n } catch (DomainListException e) {\n log(\"Unable to access DomainList\", e);\n }\n }\n }\n }\n }\n\n // Remove mapped recipients\n recipients.removeAll(recipientsToRemove);\n\n // Add mapped recipients that are local\n recipients.addAll(recipientsToAddLocal);\n\n // We consider an address that we map to be, by definition, a\n // local address. Therefore if we mapped to a remote address,\n // then we want to make sure that the mail can be relayed.\n // However, the original e-mail would typically be subjected to\n // relay testing. By posting a new mail back through the\n // system, we have a locally generated mail, which will not be\n // subjected to relay testing.\n\n // Forward to mapped recipients that are remote\n if (recipientsToAddForward.size() != 0) {\n // Can't use this ... some mappings could lead to an infinite loop\n // getMailetContext().sendMail(mail.getSender(),\n // recipientsToAddForward, mail.getMessage());\n\n // duplicates the Mail object, to be able to modify the new mail\n // keeping the original untouched\n MailImpl newMail = new MailImpl(mail);\n try {\n try {\n newMail.setRemoteAddr(dns.getLocalHost().getHostAddress());\n } catch (UnknownHostException e) {\n newMail.setRemoteAddr(\"127.0.0.1\");\n }\n try {\n newMail.setRemoteHost(dns.getLocalHost().getHostName());\n } catch (UnknownHostException e) {\n newMail.setRemoteHost(\"localhost\");\n }\n\n newMail.setRecipients(recipientsToAddForward);\n newMail.setAttribute(MARKER, Boolean.TRUE);\n getMailetContext().sendMail(newMail);\n } finally {\n newMail.dispose();\n }\n }\n\n // If there are no recipients left, Ghost the message\n if (recipients.size() == 0) {\n mail.setState(Mail.GHOST);\n }\n }", "public void processMail() {\n\t\tmessageList.clear();\n\t\tSession session = null;\n\t\tStore store = null;\n\t\tMessage message = null;\n\t\tMessage[] messages = null;\n\t\tObject messagecontentObject = null;\n\t\tString sender = null;\n\t\tString replyTo = null;\n\t\tString subject = null;\n\t\tMultipart multipart = null;\n\t\tPart part = null;\n\t\tString contentType = null;\n\t\tProperties properties = System.getProperties();\n\t\tsession = Session.getDefaultInstance(properties, new javax.mail.Authenticator(){\n\t\t\tprotected PasswordAuthentication getPasswordAuthentication(){\n\t\t\t\t\treturn new PasswordAuthentication(username, password);\n\t\t\t}\n\t\t});\n\t\t\n\t\ttry {\n\t\t\tstore = session.getStore(\"imaps\");\n\t\t\t\n\t\t\tstore.connect(\"imap.gmail.com\", username,\n\t\t\t\t\tpassword);\n\t\t\tSystem.out.println(\"Login Successful\");\n\n\t\t\t// Get a handle on the default folder\n\t\t\tfolder = store.getDefaultFolder();\n\n\t\t\t//printData(\"Getting the Inbox folder.\");\n\n\t\t\t// Retrieve the \"Inbox\"\n\t\t\tfolder = folder.getFolder(\"inbox\");\n\n\t\t\t// Reading the Email Index in Read / Write Mode\n\t\t\tfolder.open(Folder.READ_WRITE);\n\n\t\t\t// Retrieve the messages\n\t\t\tmessages = folder.getMessages();\n\n\t\t\t// Loop over all of the messages\n\t\t\tfor (int messageNumber = 0; messageNumber < messages.length; messageNumber++) {\n\t\t\t\t// Retrieve the next message to be read\n\t\t\t\tmessage = messages[messageNumber];\n\n\t\t\t\t// Retrieve the message content\n\t\t\t\tmessagecontentObject = message.getContent();\n\t\t\t\tDate messageDate = message.getReceivedDate();\n\n\t\t\t\t// Determine email type\n\t\t\t\tif (messagecontentObject instanceof Multipart) {\n\t\t\t\t\t//printData(\"Found Email with Attachment\");\n\t\t\t\t\tsender = ((InternetAddress) message.getFrom()[0])\n\t\t\t\t\t\t\t.getPersonal();\n\t\t\t\t\treplyTo = ((InternetAddress)message.getReplyTo()[0]).getAddress();\n\n\t\t\t\t\t// If the \"personal\" information has no entry, check the\n\t\t\t\t\t// address for the sender information\n\t\t\t\t\t//printData(\"If the personal information has no entry, check the address for the sender information.\");\n\n\t\t\t\t\tif (sender == null) {\n\t\t\t\t\t\tsender = ((InternetAddress) message.getFrom()[0])\n\t\t\t\t\t\t\t\t.getAddress();\n\t\t\t\t\t\treplyTo = ((InternetAddress)message.getReplyTo()[0]).getAddress();\n\t\t\t\t\t\t//printData(\"sender in NULL. Printing Address:\" + sender);\n\t\t\t\t\t}\n\t\t\t\t\t//printData(\"Sender:\" + sender);\n\n\t\t\t\t\t// Get the subject information\n\t\t\t\t\tsubject = message.getSubject();\n\n\t\t\t\t\t//printData(\"Subject:\" + subject);\n\n\t\t\t\t\t// Retrieve the Multipart object from the message\n\t\t\t\t\tmultipart = (Multipart) message.getContent();\n\n\t\t\t\t\t// printData(\"Retrieve the Multipart object from the message\");\n\t\t\t\t\tString text = \"\";\n\t\t\t\t\t// Loop over the parts of the email\n\t\t\t\t\tfor (int i = 0; i < multipart.getCount(); i++) {\n\t\t\t\t\t\t// Retrieve the next part\n\t\t\t\t\t\tpart = multipart.getBodyPart(i);\n\n\t\t\t\t\t\t// Get the content type\n\t\t\t\t\t\tcontentType = part.getContentType();\n\n\t\t\t\t\t\t// Display the content type\n\t\t\t\t\t\t// printData(\"Content: \" + contentType);\n\n\t\t\t\t\t\tif (contentType.startsWith(\"TEXT/PLAIN\")) {\n\t\t\t\t\t\t\ttext = part.getContent().toString();\n\t\t\t\t\t\t\t// printData(\"---------reading content type text/plain mail -------------\");\n\t\t\t\t\t\t\tSystem.out.println(text);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Retrieve the file name\n\t\t\t\t\t\t\tString fileName = part.getFileName();\n\t\t\t\t\t\t\t// printData(\"retrive the fileName=\"+ fileName);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tmessageList.add(new MyMessage(message, sender, replyTo, subject, text, messageDate));\n\t\t\t\t} else {\n\t\t\t\t\t//printData(\"Found Mail Without Attachment\");\n\t\t\t\t\tsender = ((InternetAddress) message.getFrom()[0])\n\t\t\t\t\t\t\t.getPersonal();\n\t\t\t\t\treplyTo = ((InternetAddress)message.getReplyTo()[0]).getAddress();\n\n\t\t\t\t\t// If the \"personal\" information has no entry, check the\n\t\t\t\t\t// address for the sender information\n\t\t\t\t\t//printData(\"If the personal information has no entry, check the address for the sender information.\");\n\n\t\t\t\t\tif (sender == null) {\n\t\t\t\t\t\tsender = ((InternetAddress) message.getFrom()[0])\n\t\t\t\t\t\t\t\t.getAddress();\n\t\t\t\t\t\treplyTo = ((InternetAddress)message.getReplyTo()[0]).getAddress();\n\t\t\t\t\t\t//printData(\"sender in NULL. Printing Address:\" + sender);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Get the subject information\n\t\t\t\t\tsubject = message.getSubject();\n\t\t\t\t\t//printData(\"subject=\" + subject);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Close the folder\n\t\t\tfolder.close(true);\n\n\t\t\t// Close the message store\n\t\t\tstore.close();\n\t\t} catch (AuthenticationFailedException e) {\n\t\t\tSystem.out.println(\"Not able to process the mail reading.\");\n\t\t\te.printStackTrace();\n\t\t} catch (FolderClosedException e) {\n\t\t\tSystem.out.println(\"Not able to process the mail reading.\");\n\t\t\te.printStackTrace();\n\t\t} catch (FolderNotFoundException e) {\n\t\t\tSystem.out.println(\"Not able to process the mail reading.\");\n\t\t\te.printStackTrace();\n\t\t} catch (NoSuchProviderException e) {\n\t\t\tSystem.out.println(\"Not able to process the mail reading.\");\n\t\t\te.printStackTrace();\n\t\t} catch (ReadOnlyFolderException e) {\n\t\t\tSystem.out.println(\"Not able to process the mail reading.\");\n\t\t\te.printStackTrace();\n\t\t} catch (StoreClosedException e) {\n\t\t\tSystem.out.println(\"Not able to process the mail reading.\");\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Not able to process the mail reading.\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void sendMail(final String mail, final String name, final String message) {\n /* new Thread(){\n public void run() {\n Properties props = System.getProperties();\n props.put(\"mail.smtps.host\",\"smtp.gmail.com\");\n props.put(\"mail.smtps.auth\",\"true\");\n Session session = Session.getInstance(props, null);\n Message msg = new MimeMessage(session);\n try {\n msg.setFrom(new InternetAddress(\"thoughtgalore@gmail.com\"));\n msg.setRecipients(Message.RecipientType.TO,\n InternetAddress.parse(\"aji.b2w@gmail.com\", false));\n msg.setSubject(\"Yoga Mandira :: Feedback \" + System.currentTimeMillis());\n msg.setText(\"MAIL:\"+mail+\"\\nNAME:\"+name+\"\\nMESSAGE:\"+message);\n msg.setHeader(\"X-Mailer\", \"Yoga Mandira\");\n msg.setSentDate(new Date());\n SMTPTransport t =\n (SMTPTransport) session.getTransport(\"smtps\");\n t.connect(\"smtp.gmail.com\", \"thoughtgalore@gmail.com\", \"#30ija11an\");\n t.sendMessage(msg, msg.getAllRecipients());\n System.out.println(\"Response: \" + t.getLastServerResponse());\n t.close();\n }catch (AddressException e) {\n e.printStackTrace();\n } catch (SendFailedException e) {\n e.printStackTrace();\n } catch (NoSuchProviderException e) {\n e.printStackTrace();\n } catch (MessagingException e) {\n e.printStackTrace();\n }\n }\n }.start();*/\n }", "public void forwardEMLFileAsMail(int emailQueueId,\r\n\t\t\tString fromUserEmailID, String fromUserPassword,\r\n\t\t\tString toUserEmailIDList, String additionalBodyContent,\r\n\t\t\tString additionalSubjectContent, Logger log) throws Exception {\r\n\t\tlog.debug(\"getting eml file location for emailQueueId:\\\"\"\r\n\t\t\t\t+ emailQueueId + \"\\\" at:\\\"\" + EmailManager.getDate() + \"\\\".\");\r\n\t\tString emlFilePath = OrderEmailQueueServices\r\n\t\t\t\t.getEMLFileLocation(emailQueueId);\r\n\t\tlog.debug(\"Got eml file location:\\\"\" + emlFilePath\r\n\t\t\t\t+ \"\\\" for emailQueueId:\\\"\" + emailQueueId + \"\\\" at:\\\"\"\r\n\t\t\t\t+ EmailManager.getDate() + \"\\\".\");\r\n\t\tlog.debug(\"Forwarding eml file in Email for fromUserEmailID:\\\"\"\r\n\t\t\t\t+ fromUserEmailID + \"\\\" to toUserEmailIDList:\\\"\"\r\n\t\t\t\t+ toUserEmailIDList + \"\\\" at:\\\"\" + EmailManager.getDate()\r\n\t\t\t\t+ \"\\\".\");\r\n\r\n\t\tFile emilFile = new File(emlFilePath);\r\n\t\tString fileLocation = emlFilePath.substring(0,\r\n\t\t\t\temlFilePath.lastIndexOf(File.separatorChar));\r\n\t\tString fileName = emilFile.getName();\r\n\t\tString fileNameWithoutExtension = FilenameUtils.getBaseName(fileName);\r\n\t\tString fileextension = FilenameUtils.getExtension(fileName);\r\n\t\tif (fileextension.equalsIgnoreCase(\"html\")) {\r\n\t\t\tfileextension = \"eml\";\r\n\t\t}\r\n\t\temlFilePath = fileLocation + File.separatorChar\r\n\t\t\t\t+ fileNameWithoutExtension + \".\" + fileextension;\r\n\t\t//#CSAUGDS-41[Support multiple emailID in CSREmail field of PartnerProfile]\r\n\t\tif(toUserEmailIDList.contains(\",\")){\r\n\t\t\tString toMail[]=toUserEmailIDList.split(\",\");\r\n\t\t\tfor(int i=0;i<toMail.length;i++){\r\n\t\t\t\tif(toMail[i] != null && !toMail[i].isEmpty()){\r\n\t\t\t\t\tforwardEML(fromUserEmailID, fromUserPassword, toMail[i],\r\n\t\t\t\t\t\t\temlFilePath, additionalBodyContent, additionalSubjectContent,\r\n\t\t\t\t\t\t\tlog);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(toUserEmailIDList != null && !toUserEmailIDList.isEmpty()){\r\n\t\t\t\tforwardEML(fromUserEmailID, fromUserPassword, toUserEmailIDList,\r\n\t\t\t\t\t\temlFilePath, additionalBodyContent, additionalSubjectContent,\r\n\t\t\t\t\t\tlog);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\r\n\t}", "public void sendregisteruser(registerDTO register) {\n MimeMessagePreparator preparator = new MimeMessagePreparator()\n {\n public void prepare(MimeMessage mimeMessage) throws Exception\n {\n mimeMessage.setRecipient(Message.RecipientType.TO, new InternetAddress(register.getEmail()));\n mimeMessage.setSubject(\"Welcome to The Indian Bus Service\");\n\n MimeMessageHelper helper = new MimeMessageHelper(mimeMessage, true);\n\n helper.setText(\"<html><body>\"\n + \"<br>\"\n + \"<h2>Hello \"+register.getFirstname()+\" \"+register.getLastname()+\"</h2>\"\n + \"<p>Welcome to <b>Indian Bus Service</b></p>\"\n + \"<br>\"\n + \"<p>Username:- \"+register.getEmail()+\"</p>\"\n + \"<p>Hope you are doing well in this lockdown.</b></p>\"\n + \"<p>Date your login : </p>'\"+new Date()+\"'</body></html>\", true);\n }\n };\n\n try {\n mailSender.send(preparator);\n }\n catch (MailException ex) {\n // simply log it and go on...\n System.err.println(ex.getMessage());\n }\n }", "public interface MailService\r\n{\r\n public static final String FROM_ADDRESS = \"noreply@ecovoiturage.com\";\r\n \r\n \r\n /**\r\n * Envoi un mail aux distinataires dont les adresses sont fournies.\r\n * \r\n * @param recipients Liste des adresses mail des destinataires (non null, non vide)\r\n * @param object Sujet du mail\r\n * @param message Message du mail\r\n * @throws IllegalArgumentException Si recipients est null ou vide\r\n * @throws MailException En cas de problème pour envoyer le mail\r\n */\r\n void sendMail(List<String> recipients, String object, String message) throws MailException;\r\n \r\n /**\r\n * Envoi un mail pour chaque distinataires dont les adresses sont fournies.\r\n * Il y a un mail d'envoyé par destinataire et non un seul mail avec tous\r\n * les destinataires en copie.\r\n * \r\n * @param recipients Liste des adresses mail des destinataires (non null, non vide)\r\n * @param object Sujet du mail\r\n * @param message Message du mail\r\n * @throws IllegalArgumentException Si recipients est null ou vide\r\n * @throws MailException En cas de problème pour envoyer le mail pour 1 ou plusieurs destinataires\r\n */\r\n void sendSeparateMail(List<String> recipients, String object, String message) throws MailException;\r\n}", "public void onPressMail(View view) {\r\n MailHelper.mailRecipient(this, event.mail);\r\n }", "@Override\n protected void receiveMail(long id, EnclaveMail mail, String routingHint) {\n\n try {\n ArrayList list = new ArrayList<UserProfile>();\n ByteArrayInputStream bis = null;\n ObjectInputStream is = null;\n byte[] bytes = mail.getBodyAsBytes();\n try {\n if (bytes != null) {\n bis = new ByteArrayInputStream(bytes);\n is = new ObjectInputStream(bis);\n while (true) {\n Object obj = is.readObject();\n if (obj == null) {\n break;\n } else {\n list.add((UserProfile) obj);\n }\n }\n is.close();\n bis.close();\n }\n String result = dataAnalysis(list);\n // Get the post office object for responding back to this mail and use it to encrypt our response.\n final byte[] responseBytes = postOffice(mail).encryptMail(result.getBytes());\n postMail(responseBytes, routingHint);\n } catch (Exception e) {\n System.err.println(\"Failed to process mail received at enclave\");\n e.printStackTrace();\n }\n } catch (Exception e) {\n System.err.println(\"Failed to process mail received at enclave\");\n e.printStackTrace();\n }\n\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tMimeMessage msg=javaMailSender.createMimeMessage();\n\t\t\t\tMimeMessageHelper helper=null;\n\t\t\t\ttry {\n\t\t\t\t\thelper = new MimeMessageHelper(msg,true,\"utf-8\");\n\t\t\t\t} catch (MessagingException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\thelper.setTo(to);\n\t\t\t\t\thelper.setSubject(subject);\n\t\t\t\t\thelper.setText(text,true);\n\t\t\t\t\t\n\t\t\t\t\thelper.setFrom(getFromAddress());\n\t\t\t\t} catch (MessagingException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tjavaMailSender.send(msg);\n\t\t\t\tSystem.out.println(\"send ---------\");\n\t\t\t}", "void send(Mail mail) {\n this.mail = mail;\n new Thread(sendingMethod).start();\n }", "public void sendemail(String sender,String to,String pass,String companyname){\n final String username = sender;\n final String password = pass;\n\n Properties props = new Properties();\n props.put(\"mail.smtp.auth\", true);\n props.put(\"mail.smtp.starttls.enable\", true);\n props.put(\"mail.smtp.host\", \"smtp.gmail.com\");\n props.put(\"mail.smtp.port\", \"587\");\n\n Session session = Session.getInstance(props,\n new javax.mail.Authenticator() {\n protected javax.mail.PasswordAuthentication getPasswordAuthentication() {\n return new javax.mail.PasswordAuthentication(username, password);\n }\n });\n\n try {\n\n Message message = new MimeMessage(session);\n message.setFrom(new InternetAddress(\"josephmwawasi29@gmail.com\"));\n message.setRecipients(Message.RecipientType.TO,\n InternetAddress.parse(to));\n message.setSubject(companyname+\" Db Backup\");\n message.setText(\"Security system at \"+companyname+\" database attached...\");\n\n MimeBodyPart messageBodyPart = new MimeBodyPart();\n\n Multipart multipart = new MimeMultipart();\n\n messageBodyPart = new MimeBodyPart();\n String file = path;\n //String fileName = companyname+\" Database Backup\";\n DataSource source = new FileDataSource(file);\n messageBodyPart.setDataHandler(new DataHandler(source));\n messageBodyPart.setFileName(path);\n multipart.addBodyPart(messageBodyPart);\n\n message.setContent(multipart);\n\n System.out.println(\"Sending...\");\n\n Transport.send(message);\n\n System.out.println(\"Done\");\n\n } catch (MessagingException e) {\n \n }\n }", "private void sendmailuserregister(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException, ClassNotFoundException {\n String email = request.getParameter(\"email\");\n\n String to = \"yevhen@yevhen-Lenovo-ideapad-320-15ISK\";\n String from = \"wwwwnewbob@localhost\";\n String host = \"localhost\";\n\n Properties properties = System.getProperties();\n properties.setProperty(\"yevhen-Lenovo-ideapad-320-15ISK\", host);\n\n Session session = Session.getDefaultInstance(properties);\n response.setContentType(\"text/html\");\n PrintWriter out = response.getWriter();\n\n try{\n MimeMessage message = new MimeMessage(session);\n message.setFrom(new InternetAddress(from));\n message.addRecipients(Message.RecipientType.TO, String.valueOf(new InternetAddress(to)));\n message.setSubject(\"This is the Subject Line!\");\n message.setText(\"This is actual message from \" + email);\n\n logger.info(\" user.getEmail() \" + email);\n\n Transport.send(message);\n String title = \"Send Email\";\n String res = \"Sent message successfully....<a href='/bookstore/shop'>Back</a>\";\n String docType = \"<!doctype html public \\\"-//w3c//dtd html 4.0 \" + \"transitional//en\\\">\\n\";\n\n out.println(docType +\n \"<html>\\n\" +\n \"<head><title>\" + title + \"</title><head>\\n\" +\n \"<body bgcolor = \\\"#f0f0f0\\\">\\n\" +\n \"<h1 align = \\\"center\\\">\" + title + \"</h1>\\n\" +\n \"<p align = \\\"center\\\">\" + res + \"</p>\\n\" +\n \"</body>\\n\" +\n \"</html>\"\n );\n\n } catch (MessagingException mex){\n mex.printStackTrace();\n }\n\n\n }", "public Historique SendMail( Historique h,String resultat ,String date,String heure) throws Exception {\n\r\n\r\n Logger log = LoggerFactory.getLogger(MailController.class);\r\n\r\n \r\n\r\n \r\n log.info(\"Spring Mail - Sending Simple Email with JavaMailSender Example\");\r\n\r\n Mail mail = new Mail();\r\n mail.setFrom(\"harb.nihel55@gmail.com\");\r\n \r\n //mail.setTo(h.get().getEmails());\r\n String [] res =h.getEmails().split(\"\\\\s\");\r\n for(int i=0; i<res.length;i++)\r\n \r\n {\r\n \tSystem.out.println(res[i]);\r\n mail.setTo(res[i]);\r\n \r\n if(resultat.equals(\"echec\"))\r\n { \t mail.setSubject(\" échec d'éxécution du test\");\r\n mail.setContent(\"Echec de test \"+h.getNom()+\" éffectué à \"+date+\"à l'heure \"+heure);}\r\n else\r\n { \t\r\n mail.setSubject(\"Retard d'éxécution du test\");\r\n mail.setContent(\"Retard d'éxecution :temps de réponse réél est \"+h.getTemps_rep_reel()+\" et le temps de réponse attendu = est:\"+h.getResultat_attendu());}\r\n emailService.sendSimpleMessage(mail);\r\n }\r\n \r\n\r\n \r\n\t\treturn null; \r\n\r\n }", "private SendMail SendMail(WebDriver driver2) {\n return null;\n }", "@Override\r\n\tpublic void sendMail(EmailNotificationVO emailNotification) throws ImbibeException\r\n\t{\n\t\tMimeMessage message = null;\r\n\t\tMimeMessageHelper helper = null;\r\n\t\ttry\r\n\t\t{\r\n\r\n\r\n\t\t\tmessage = this.mailSender.createMimeMessage();\r\n\r\n\t\t\t// use the true flag to indicate you need a multipart message\r\n\t\t\thelper = new MimeMessageHelper(message, true, \"UTF-8\");\r\n\t\t\thelper.setFrom(emailNotification.getFrom());\r\n\t\t\t// msg.setTo(Arrays.asList(emailNotification.getToRecipients()));\r\n\t\t\tList<String> toList = emailNotification.getToRecipients();\r\n\t\t\t/*toList.add(\"nchinthakindi@havigs.com\");*/\r\n\t\t\tif(toList != null)\r\n\t\t\t{\r\n\t\t\t\tString to[] = toList.toArray(new String[toList.size()]);\r\n\t\t\t\thelper.setTo(to);\r\n\t\t\t}\r\n\t\t\tList<String> ccList = emailNotification.getCcRecipients();\r\n\t\t\tif(ccList != null)\r\n\t\t\t{\r\n\t\t\t\tString cc[] = ccList.toArray(new String[ccList.size()]);\r\n\t\t\t\thelper.setCc(cc);\r\n\t\t\t}\r\n\r\n\t\t\tif(emailNotification.getFilepath() != null)\r\n\t\t\t{\r\n\t\t\t\tFile file = new File(emailNotification.getFilepath());\r\n\r\n\t\t\t\tif(file != null && file.exists())\r\n\t\t\t\t{\r\n\t\t\t\t\tint dotPos = file.getName().lastIndexOf(\".\");\r\n\t\t\t\t\tString extension = file.getName().substring(dotPos);\r\n\t\t\t\t\thelper.addAttachment(MimeUtility.encodeText(emailNotification.getSubject()+extension, \"UTF-8\", \"Q\"), file);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\thelper.setText(emailNotification.getMessage(),true);\r\n\t\t\thelper.setSubject(emailNotification.getSubject());\r\n\t\t\thelper.setSentDate(Calendar.getInstance().getTime());\r\n\r\n\t\t\tthis.mailSender.send(message);\r\n\t\t}\r\n\t\tcatch(MailException ex) \r\n\t\t{\r\n\t\t\t//logger.error(ex.getMessage()); \r\n\t\t\tthrow new ImbibeException(ex.getMessage());\r\n\t\t}\r\n\t\tcatch (Exception ex) \r\n\t\t{\r\n\t\t\t//logger.error(ex.getMessage()); \r\n\t\t\tthrow new ImbibeException(ex.getMessage());\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\tmessage = null;\r\n\t\t\thelper = null;\r\n\t\t}\r\n\t\t//logger.debug(\"Exit from sendEmail(EmailNotification emailNotification)\");\r\n\t}", "@Override\n\tpublic void showMailDialog() {\n\t\t\n\t}", "public void sendMail(String to) throws URISyntaxException, IOException {\n final String username = \"kicsikacsacodecool\";//change accordingly\n final String password = \"codecool\";//change accordingly\n\n // Assuming you are sending email through relay.jangosmtp.net\n String host = \"relay.jangosmtp.net\";\n\n Properties props = new Properties();\n props.put(\"mail.smtp.auth\", \"true\");\n props.put(\"mail.smtp.starttls.enable\", \"true\");\n props.put(\"mail.smtp.host\", \"smtp.gmail.com\");\n props.put(\"mail.smtp.port\", \"587\");\n\n // Get the Session object.\n Session session = Session.getInstance(props,\n new javax.mail.Authenticator() {\n protected PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(username, password);\n }\n });\n\n try {\n // Create a default MimeMessage object.\n Message message = new MimeMessage(session);\n\n // Set From: header field of the header.\n message.setFrom(new InternetAddress(\"kicsikacsacodecool@gmail.com\"));\n\n // Set To: header field of the header.\n message.setRecipients(Message.RecipientType.TO,\n InternetAddress.parse(to));\n\n // Set Subject: header field\n message.setSubject(\"Webshop Registration\");\n\n // Now set the actual message\n message.setText(\"Welcome to the codecool webshop !!\");\n\n // Send message\n try {\n Transport.send(message);\n } catch (Exception e) {\n System.out.println(e);\n }\n\n System.out.println(\"Sent message successfully....\");\n\n } catch (MessagingException e) {\n throw new RuntimeException(e);\n }\n }", "SendEmail() {\t\n\t}", "private void sendMailInit() {\r\n\t\tif(mailSender == null){\r\n\t\t\tmailSender = new JavaMailSenderImpl();\r\n\t\t\tmailSender.setHost(ConfigManager.getInstance().getString(\"mail.host\"));\r\n\t\t\tmailSender.setPort(ConfigManager.getInstance().getInt(\"mail.port\", 25));\r\n\t\t\tmailSender.setUsername(ConfigManager.getInstance().getString(\"mail.username\"));\r\n\t\t\tmailSender.setPassword(ConfigManager.getInstance().getString(\"mail.password\"));\r\n\t\t\tmailSender.setDefaultEncoding(\"utf-8\");\r\n\t\t\tlogger.info(\"HOST>>>>>>>>>>>>>>>Host=\" + mailSender.getHost() + \",Port=\"+ mailSender.getPort());\r\n\t\t\tProperties props = new Properties();\r\n\t\t\tprops.setProperty(\"mail.smtp.auth\", \"true\");\r\n\t\t\tprops.setProperty(\"mail.smtp.timeout\", \"0\");\r\n\t\t\tmailSender.setJavaMailProperties(props);\r\n\t\t\tthis.setMailSender(mailSender);\r\n\t\t}\r\n\t}", "public ResponseUpdDao sendSimpleEmail(String tsSubject, \n String tsMessage,\n String tsProcess,\n List<EmailDestinationAddress> toEmailDestinationAddress\n ) {\n ResponseUpdDao loResponse = new ResponseUpdDao();\n try{\n String lsHtml =\n \"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Strict//EN\\\" \\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-\" +\n \"strict.dtd\\\">\\n\" + \n \" <html xmlns=\\\"http://www.w3.org/1999/xhtml\\\" dir=\\\"ltr\\\" lang=\\\"es-ES\\\">\\n\" + \n \" <head>\\n\" + \n \" <title>\"+tsProcess+\"</title>\\n\" + \n \" <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=ISO-8859-1\\\" />\\n\" + \n \" <meta name=\\\"language\\\" content=\\\"es\\\" />\\n\" + \n \" </head>\\n\" + \n \" <body>\\n\" + \n \" <div style='background-color:#0F2F62; height:25px;background:linear-gradient(#040545, \" +\n \"#0172AE);background:-webkit-linear-gradient(#040545, #0172AE);background: -ms-linear-background(\" +\n \"#040545, #0172AE);filter:progid:DXImageTransform.Microsoft.gradient(startColorStr='#040545', \" +\n \"EndColorStr='#0172AE');'></div>\\n\" + \n \" <div style='background-color:#fff'> \\n\" + \n \" <br/>\\n\" + \n \" <label style='font-family:Arial, Helvetica, sans-serif; font-size:16px; font-weight:\" +\n \"bold '>El Proceso de Integraci&oacute;n para \"+tsProcess+\" ha Finalizado</label><p/>\\n\" + \n \" <label style='font-family:Arial, Helvetica, sans-serif; font-size:12px; \" +\n \"font-weight:bold '>\"+tsMessage+\"</label><p/>\\n\" + \n /*\" <table cellpadding='0' cellspacing='0' style='border-bottom-color:#F79646;border-\" +\n \"bottom-width:3px;border-bottom-style:solid;border-top-color:#F79646;border-top-style:solid;border-\" +\n \"top-width:3px; '> \\n\" + \n \" <tr>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Bcsttim</th>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Channelid</th>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Date</th>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Orderid</th>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Spotid</th>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Buyuntid</th>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Breakid</th>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Hour</th>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Duration</th>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Spotformatid</th>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Mediaid</th>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Productid</th>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Spotprice</th>\\n\" + \" </tr>\\n\";\n \n lsHtml += \" </table> \\n\" + \n */\" <br/> \\n\" + \n \" <br/>\\n\" + \n \" <label style='font-family:Arial, Helvetica, sans-serif; font-size:12px; font-weight:\" +\n \"bold '>Integraci&oacute;n Paradigm-Landmark, 2019 Televisa S.A. de C.V</label> \\n\" + \n \" <br/>\\n\" + \n \" </div>\\n\" + \n \" <div style='float:left; background-color:#F58220;width:7%;height:25px;background:-moz-\" +\n \"linear-gradient(#F1A345, #E17521); background:-webkit-linear-gradient(#F1A345, #E17521);\" +\n \"background: -ms-linear-background(#F1A345, #E17521);filter:progid:DXImageTransform.Microsoft.gradient(\" +\n \"startColorStr='#F1A345', EndColorStr='#E17521');'>\\n\" + \n \" </div> \\n\" + \n \" <div style='float:left; ;width:86%;height:25px;background:linear-gradient(#040545, \" +\n \"#0172AE);background:-webkit-linear-gradient(#040545, #0172AE);background: -ms-linear-\" +\n \"background(#040545, #0172AE);filter:progid:DXImageTransform.Microsoft.gradient(startColorStr=\" +\n \"'#040545', EndColorStr='#0172AE');'>\\n\" + \n \" </div>\\n\" + \n \" <div style='float:left; background-color:#F58220;width:7%;height:25px;background:-\" +\n \"moz-linear-gradient(#F1A345, #E17521);background:-webkit-linear-gradient(#F1A345, #E17521);\" +\n \"background: -ms-linear-background(#F1A345, #E17521);filter:progid:DXImageTransform.Microsoft.gradient(\" +\n \"startColorStr='#F1A345', EndColorStr='#E17521');'></div> \\n\" + \n \" </body>\\n\" + \n \" </html>\"; \n System.out.println(\"Html generado para el correo ================>\");\n System.out.println(lsHtml);\n //writeFile(lsHtml);\n SecmanDasEnviarCorreo loSecmanDasSendMail = getDynaWebServiceURLEmail();\n if(loSecmanDasSendMail != null){\n try{\n Map<String, Object> loRequestContext =\n ((BindingProvider)loSecmanDasSendMail).getRequestContext(); \n setPortCredentialProviderList(loRequestContext); \n Mail loEmail = new Mail(); \n MailHeader loEmailHeader = new MailHeader();\n MailAddress loEmailAddresFrom = new MailAddress(); \n loEmailAddresFrom.setUserNameAdress(\"Landmark Integration\");\n loEmailAddresFrom.setAddress(\"service_integration_lmk@televisa.com.mx\");\n loEmailHeader.setAddressFrom(loEmailAddresFrom);\n MailAddressCollection loMailAddressCollection =\n new MailAddressCollection();\n for(EmailDestinationAddress loDest: toEmailDestinationAddress){ \n MailAddress loEmailAdd = new MailAddress();\n //System.out.println(\"AddressTO username[\"+loDest.getLsNameTo()+\"] address[\"+loDest.getLsAddressTo()+\"]\");\n loEmailAdd.setUserNameAdress(loDest.getLsNameTo());\n loEmailAdd.setAddress(loDest.getLsAddressTo()); \n loMailAddressCollection.getMailAddress().add(loEmailAdd);\n }\n loEmailHeader.setTo(loMailAddressCollection);\n loEmailHeader.setSubject(tsSubject);\n loEmail.setMailHeader(loEmailHeader);\n MailBody loMailBody = new MailBody();\n loMailBody.setBodyType(\"HTML\");\n loMailBody.setMessage(lsHtml);\n loEmail.setMailBody(loMailBody);\n loSecmanDasSendMail.enviarCorreo(loEmail);\n loResponse.setLsResponse(\"OK\");\n loResponse.setLiAffected(0);\n loResponse.setLsMessage(\"Correo enviado satisfactoriamente\");\n System.out.println(\"Fin enviar correo - ok\");\n } catch (Exception loException) {\n System.out.println(\"Error al enviar correo: \"+loException.getMessage());\n loResponse.setLsResponse(\"ERROR\");\n loResponse.setLiAffected(0);\n loResponse.setLsMessage(loException.getMessage());\n }\n }\n } catch (Exception loException) {\n System.out.println(\"Error crear instancia del servicio de correo de secman: \"+loException.getMessage());\n loResponse.setLsResponse(\"ERROR\");\n loResponse.setLiAffected(0);\n loResponse.setLsMessage(loException.getMessage()); \n }\n return loResponse;\n }", "@Jpf.Action(forwards = { @Jpf.Forward(name = \"success\", action=\"verVacantes\"), @Jpf.Forward(name = \"start\", path = \"index.jsp\")})\n\tpublic Forward enviarVacantePorMail() throws Exception{\n\t\tForward forward = new Forward(\"success\");\n\t\t\n\t\tif(getCurrentUser()==null){\n\t\t\tforward = new Forward(\"start\");\n\t\t\tforward.addActionOutput(\"errors\", \"Necesitas registrarte para enviarte una vacante.\");\n\t\t\treturn forward;\n\t\t}else{\n\t\t\tif(getCurrentUser().getCurriculum()!=null){\n\t\t\t\tString nombreCompleto = getCurrentUser().getName()+\" \"+getCurrentUser().getLastname()+\" \"+getCurrentUser().getSecondlastname();\n\t\t\t\tif(getRequest().getParameter(\"idVacante\")!= null){\n\t\t\t\t\tUcmUtil.sendMailVacante(nombreCompleto, getCurrentUser().getEmail(), \n\t\t\t\t\t\t\tgetRequest().getParameter(\"idVacante\"), getRequest());\n\t\t\t\t\t\n\t\t\t\t\tforward.addActionOutput(\"mailOk\", getRequest().getParameter(\"idVacante\"));\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tforward = new Forward(\"success\");\n\t\t\t\tforward.addActionOutput(\"errors\", \"Necesitas Actualizar tu Curiculum antes de enviarte una vacante\");\n\t\t\t}\n\t\t}\n\t\treturn forward;\n\t}", "private void SendEmail(String password, String emailTo, String staffNames)\n {\n String to = emailTo;\n\n // Sender's email ID needs to be mentioned\n String from = \"noreply@HelpManager.com\";\n\n // Assuming you are sending email from localhost\n String host = \"smtp.upcmail.ie\";\n\n // Get system properties\n Properties properties = System.getProperties();\n\n // Setup mail server\n properties.setProperty(\"mail.smtp.host\", host);\n \n // Get the default Session object.\n Session session = Session.getDefaultInstance(properties);\n\n try{\n // Create a default MimeMessage object.\n MimeMessage message = new MimeMessage(session);\n\n // Set From: header field of the header.\n message.setFrom(new InternetAddress(from));\n\n // Set To: header field of the header.\n message.addRecipient(Message.RecipientType.TO,\n new InternetAddress(to));\n\n // Set Subject: header field\n message.setSubject(\"Password Change From Help Manager\");\n\n // Now set the actual message\n message.setText(\"Hello \"+staffNames +\", \\n\\n Your new Password is: \"+ password +\".\\n\\n Regards \\n Help Manager Team\");\n\n // Send message\n Transport.send(message);\n System.out.println(\"Sent message successfully....\");\n }catch (MessagingException mex) {\n mex.printStackTrace();\n }\n }", "public void sendMail(View view) {\n\n contentManager = new ContentManager(this);\n contentManager.sendEmail(helpBinding.mail.getText().toString(), new EmailListener() {\n @Override\n public void onSuccess(EmailResponse emailResponse) {\n showToast(emailResponse.getMessage());\n }\n\n @Override\n public void onFailed(String message, int responseCode) {\n showToast(message);\n }\n\n @Override\n public void startLoading(String requestId) {\n showToast(getString(R.string.sendEmail));\n }\n\n @Override\n public void endLoading(String requestId) {\n\n }\n });\n }", "@Override\n public void sendEmail() {\n return;\n }", "public boolean send() {\n\t\tAuthenticator auth = new Authenticator() {\n\t\t\tprotected PasswordAuthentication getPasswordAuthentication() {\n\t\t\t\treturn new PasswordAuthentication(props.getProperty(MAIL_USER), props.getProperty(MAIL_PASSWORD));\n\t\t\t}\n\t\t};\n\n\t\tSession session = Session.getInstance(props, auth);\n\n\t\ttry {\n\t\t\tMimeMessage message = new MimeMessage(session);\n\n\t\t\tif (props.containsKey(MAIL_FROM)) {\n\t\t\t\tInternetAddress[] addresses = InternetAddress.parse(props.getProperty(MAIL_FROM));\n\n\t\t\t\tif ((addresses != null) && (addresses.length > 0)) {\n\t\t\t\t\tmessage.addFrom(addresses);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (props.containsKey(MAIL_REPLY_TO)) {\n\t\t\t\tInternetAddress[] addresses = InternetAddress.parse(props.getProperty(MAIL_REPLY_TO));\n\n\t\t\t\tif ((addresses != null) && (addresses.length > 0)) {\n\t\t\t\t\tmessage.setReplyTo(addresses);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (props.containsKey(MAIL_TO)) {\n\t\t\t\tInternetAddress[] addresses = InternetAddress.parse(props.getProperty(MAIL_TO));\n\n\t\t\t\tif ((addresses != null) && (addresses.length > 0)) {\n\t\t\t\t\tmessage.addRecipients(Message.RecipientType.TO, addresses);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (props.containsKey(MAIL_CC)) {\n\t\t\t\tInternetAddress[] addresses = InternetAddress.parse(props.getProperty(MAIL_CC));\n\n\t\t\t\tif ((addresses != null) && (addresses.length > 0)) {\n\t\t\t\t\tmessage.addRecipients(Message.RecipientType.CC, addresses);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (props.containsKey(MAIL_BCC)) {\n\t\t\t\tInternetAddress[] addresses = InternetAddress.parse(props.getProperty(MAIL_BCC));\n\n\t\t\t\tif ((addresses != null) && (addresses.length > 0)) {\n\t\t\t\t\tmessage.addRecipients(Message.RecipientType.BCC, addresses);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (props.containsKey(\"EPCX_ABSTIME\")) {\n\t\t\t\tmessage.setSentDate(Util.getDateFromAbstime(props.getProperty(\"EPCX_ABSTIME\")));\n\n\t\t\t} else if (props.containsKey(\"mail.sentdate\")) {\n\t\t\t\tmessage.setSentDate(Util.getDateFromAbstime(props.getProperty(\"mail.sentdate\")));\n\t\t\t}\n\n\t\t\t// Set subject.\n\t\t\t// Doc for setSubject method says the application must ensure that the subject does not contain any line breaks.\n\t\t\t// Need to default subject to UTF-8 as properties are Java strings, otherwise the setSubject method defaults to platform default encoding that may be an EBCDIC codepage. \n\t\t\tmessage.setSubject(props.getProperty(MAIL_SUBJECT).replaceAll(\"[\\\\n\\\\r]+\",\" \"), \"UTF-8\");\n\n\t\t\t// Create a multipart message to hold the message parts\n\t\t\tMultipart mimeMultipart = new MimeMultipart();\n\n\t\t\t// Add the mail body (content) as a message part.\n\t\t\taddBody(mimeMultipart);\n\n\t\t\t// Add the attachments as message parts to the mail.\n\t\t\taddAttachments(mimeMultipart);\n\n\t\t\tif (mimeMultipart.getCount() == 0) {\n\t\t\t\t// JavaMail requires at least a blank string to be set as the content, otherwise it will throw an exception when sending.\n\t\t\t\tmessage.setText(\"\");\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t// Add the multipart to the message.\n\t\t\t\tmessage.setContent(mimeMultipart);\n\t\t\t}\n\n\t\t\t// Add todays date\n\t\t\tmessage.setSentDate(new Date());\n\n\t\t\t// Change the default classloader to work around issues documented\n\t\t\t// at site\n\t\t\t// http://blog.hpxn.net/2009/12/02/tomcat-java-6-and-javamail-cant-load-dch/\n\t\t\tClassLoader cl = Thread.currentThread().getContextClassLoader();\n\t\t\ttry {\n\t\t\t\tThread.currentThread().setContextClassLoader(Transport.class.getClassLoader());\n\n\t\t\t\t// Send the message. Note this calls the saveChanges method on\n\t\t\t\t// the message before sending.\n\t\t\t\tTransport.send(message);\n\n\t\t\t} finally {\n\t\t\t\tThread.currentThread().setContextClassLoader(cl);\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\tlogger.warning(Emit.messages.getString(\"MailLogFail\") + \" - \" + getMessageSummary());\n\n\t\t\te.printStackTrace();\n\n\t\t\treturn false;\n\t\t}\n\n\t\tif (logger.isLoggable(Level.INFO)) {\n\t\t\tlogger.info(Emit.messages.getString(\"MailLogSuccess\") + \" - \" + getMessageSummary());\n\t\t}\n\n\t\treturn true;\n\t}", "public void send() {\n\t\tfinal String username = \"oneplanner.sys@gmail.com\";\n\t\tfinal String password = \"Oneplanner2017*\";\n\n\t\tProperties props = new Properties();\n\t\tprops.put(\"mail.smtp.auth\", \"true\");\n\t\tprops.put(\"mail.smtp.starttls.enable\", \"true\");\n\t\tprops.put(\"mail.smtp.host\", \"smtp.gmail.com\");\n\t\tprops.put(\"mail.smtp.port\", \"587\");\n\n\t\ttry {\n\t\t\tSession session = Session.getInstance(props,\n\t\t\t\t\t new javax.mail.Authenticator() {\n\t\t\t\t\t\tprotected PasswordAuthentication getPasswordAuthentication() {\n\t\t\t\t\t\t\treturn new PasswordAuthentication(username, password);\n\t\t\t\t\t\t}\n\t\t\t\t\t });\n\n\t\t\t\t\tMessage message = new MimeMessage(session);\n\t\t\t\t\tmessage.setFrom(new InternetAddress(\"oneplanner.sys@gmail.com\"));\n\t\t\t\t\tmessage.setRecipients(Message.RecipientType.TO,\n\t\t\t\t\t\tInternetAddress.parse(\"jinnonsbox@gmail.com\"));\n\t\t\tmessage.setSubject(\"test\");\n\t\t\tmessage.setText(\"test\");\n\t\t\t\n\t\t\tTransport.send(message);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n }", "public void sendWithDefaultMessage() {\r\n String _from = \"A78B347F656\";\r\n String _password = \"55EE29A8C\";\r\n //Get properties object\r\n Properties props = new Properties();\r\n props.put(\"mail.smtp.host\", \"smtp.gmail.com\");\r\n props.put(\"mail.smtp.socketFactory.port\", \"465\");\r\n props.put(\"mail.smtp.socketFactory.class\",\r\n \"javax.net.ssl.SSLSocketFactory\");\r\n props.put(\"mail.smtp.auth\", \"true\");\r\n props.put(\"mail.smtp.port\", \"465\");\r\n //get Session \r\n Session session = Session.getInstance(props,\r\n new javax.mail.Authenticator() {\r\n protected PasswordAuthentication getPasswordAuthentication() {\r\n return new PasswordAuthentication(_from, _password);\r\n }\r\n });\r\n //compose message \r\n try {\r\n MimeMessage message = new MimeMessage(session);\r\n message.addRecipient(Message.RecipientType.TO, new InternetAddress(_to));\r\n message.setSubject(\"WELCOME TO TAHDIG\");\r\n message.setContent(\"<body>\"\r\n + \"<h1>TAHDIG</h1>\"\r\n + \"<h3>Dear \" + firstName + \" \" + lastName\r\n + \"</h3><h2>Thank you for Registering on TAHDIG,</h2>\"\r\n + \"<h3>The First Meal Sharing Platform</h3>\"\r\n + \"<em>Your Username: \" + username\r\n + \"</em><br/><em>Your Password: \" + userpass\r\n + \"</em><br/><a href='http://localhost:8080/msabouri-fp/'>Click here to go to the TAHDIG service</a></body>\",\r\n \"text/html; charset=utf8\");\r\n Transport.send(message);\r\n LOG.info(\"The email was sent successfully\");\r\n } catch (MessagingException e) {\r\n throw new RuntimeException(e);\r\n }\r\n }", "public String sendEmail() {\n String to = theModel.getEmail();\n\n // Sender's email ID needs to be mentioned\n String from = \"IT353Uconnect@gmail.com\";\n\n // Assuming you are sending email from this host\n String host = \"smtp.gmail.com\";\n\n // Get system properties\n Properties properties = System.getProperties();\n\n // Setup mail server\n properties.setProperty(\"mail.smtp.host\", host);\n properties.setProperty(\"mail.smtp.starttls.enable\", \"true\");\n properties.setProperty(\"mail.smtp.auth\", \"true\");\n properties.setProperty(\"mail.smtp.port\", \"587\");\n // Get the default Session object.\n Session session = Session.getInstance(properties, new javax.mail.Authenticator() {\n protected PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(\"IT353Uconnect@gmail.com\", \"itkstuadmin\");\n }\n });\n\n try {\n // Create a default MimeMessage object.\n MimeMessage message = new MimeMessage(session);\n\n // Set From: header field of the header.\n message.setFrom(new InternetAddress(from));\n\n // Set To: header field of the header.\n message.addRecipient(Message.RecipientType.TO,\n new InternetAddress(to));\n\n // Set Subject: header field\n message.setSubject( subject, \"text/html\");\n\n // Send the actual HTML message, as big as you like\n message.setContent( text , \"text/html\");\n\n // Send message\n Transport.send(message);\n System.out.println(\"Sent message successfully....\");\n } catch (MessagingException mex) {\n mex.printStackTrace();\n }\n return \"UniLog.xhtml\";\n }", "private void sendBookingConfirmMailWithMailtrapProvider(String userEmail, String token) throws MessagingException {\n String to = userEmail;//change accordingly \n// Gmail’s SMTP account,\n\n String userName = \"91c28c9b77f112\";//from mailtrap\n String password = \"9d4d7fbf411267\";\n\n //Get the session object \n //1. sets SMTP server properties\n Properties properties = new Properties();\n properties.put(\"mail.smtp.auth\", true);\n properties.put(\"mail.smtp.starttls.enable\", \"true\");\n properties.put(\"mail.smtp.host\", \"smtp.mailtrap.io\");\n properties.put(\"mail.smtp.port\", \"25\");\n properties.put(\"mail.smtp.ssl.trust\", \"smtp.mailtrap.io\");\n //2. creates a new session with an authenticator\n Authenticator auth = new Authenticator() {\n @Override\n public PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(userName, password);\n }\n };\n\n Session session = Session.getInstance(properties, auth);\n\n //3. Creates a new e-mail message\n Message msg = new MimeMessage(session);\n\n msg.setFrom(new InternetAddress(\"hungbsse130615@fpt.edu.vn\"));\n InternetAddress[] toAddresses = {new InternetAddress(to)};\n msg.setRecipients(Message.RecipientType.TO, toAddresses);\n msg.setSubject(\"Test send mail\");\n msg.setSentDate(new Date());\n msg.setText(\"Hello, this is example of sending email. ?token=\" + token);\n\n// MimeMessage message = new MimeMessage(session);\n// message.setFrom(new InternetAddress(from));\n// message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));\n //4. Send the message\n Transport.send(msg);\n System.out.println(\"message sent successfully....\");\n\n }", "public void EnvoyerEmailSurveillant(Utilisateur user) {\n\t\t\t\t MimeMessage mimeMessage = mailSender.createMimeMessage(); \n\t\t\t try {\n\t\t\t MimeMessageHelper mimeMessageHelper = new MimeMessageHelper(mimeMessage, true);\n\t\t\t mimeMessageHelper.setSubject(\"Compte Surveillant \");\n\t\t\t mimeMessageHelper.setFrom(\"naifarsara@gmail.com\");\n\n\t\t\t mimeMessageHelper.setTo(user.getEmail());\n\t\t\t String url =\"scolarity.dpc.com.tn\";\n\t\t String content = \"Bonjour Mr ( Mmme), \" + user.getNom()+\" + \" + user.getPrenom()\n\t\t + \", votre nom d'utilisateur par la platforme scolarity est : \\n \" + user.getUsername() +\" \\n\"+\"et votre mot de passe est : \\n\"+ user.getPassword()+\"\\n\"+\"vous pouvez accéder au espace surveillant via l'adresse suivante : \\n\"+url+\"\\n\"+\" \\n Cordialement.\";\n\t\t System.out.println(content);\n\n\t\t\t mimeMessageHelper.setTo(user.getEmail());\n\t\t mimeMessageHelper.setText(content);\n\t\t // Add a resource as an attachment\n\t\t mimeMessageHelper.setText(\"<html><body><p>\" + content + \"</p> <img src=\\\"http://207.180.211.158:/logodpc.bmp\\\" width=\\\"50\\\" alt=\\\"Apen\\\"></body></html>\", true);\n\n\t\t\t \n\t\t\t \n\t\t\t mailSender.send(mimeMessageHelper.getMimeMessage());\n\t\t\t } catch (MessagingException e) {\n\t\t\t e.printStackTrace();\n\t\t\t }\n\t\t\t\t\n\t\t\t}", "public void sendMessage() throws DLException{\n // adjust mail properties\n Properties properties = System.getProperties();\n properties.put(\"mail.smtp.port\", \"587\");\n properties.put(\"mail.smtp.starttls.enable\", \"true\");\n properties.put(\"mail.smtp.auth\", \"true\");\n properties.setProperty(\"mail.smtp.host\", host);\n Session session = Session.getInstance(properties,\n new javax.mail.Authenticator() {\n protected PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(sender, senderPassword);\n }\n });\n \n try { \n // MimeMessage object. \n MimeMessage message = new MimeMessage(session); \n \n // Set From Field: adding senders email to from field. \n message.setFrom(new InternetAddress(sender)); \n \n // Set To Field: adding recipient's email to from field. \n message.addRecipient(Message.RecipientType.TO, new InternetAddress(recipient)); \n \n // Set Subject: subject of the email \n message.setSubject(\"Reset Password Request\"); \n \n // set body of the email. \n message.setText(\"Here is your temporary password: \" + password + \"\\nIt will expire in 5 minutes.\"); \n \n // Send email. \n Transport.send(message); \n System.out.println(\"Mail successfully sent\");\n \n } catch (MessagingException mex) { \n new DLException(mex);\n System.out.println(\"Something went wrong in sending an email\");\n } \n }", "public boolean enviarMailConfirmacion(Agente agente, Usuario usuario){\n\n try {\n\n //seteamos el asunto\n// message.setSubject(\"UNDEC - Activar Cuenta Nortia UNDEC\");\n//\n// //seteamos el mensaje que vamos a enviar\n// message.setContent(\"<html>\\n\" +\n// \"<body>\\n\" +\n// \"\\n Hola, para poder activar la cuenta haga click en el siguiente link ----> \" +\n// \"<a href=\\\"\"+new URLWEB().getAbsoluteApplicationUrl()+\"/activarcuenta.xhtml?username=\"+usuario.getUsuarionombre()+\n// \"&hash=\"+usuario.getUsuarioclave()+\n// \"\\\">\\n\" +\n// \"Activar cuenta</a>\\n\" +\n// \"\\n\" +\n// \"En caso de no poder pegue en el browser lo siguiente\\n \"+\n// new URLWEB().getAbsoluteApplicationUrl()+\"/activarcuenta.xhtml?username=\"+usuario.getUsuarionombre()+\n// \"&hash=\"+usuario.getUsuarioclave()+\"\\n\"+\n// \"Muchas Gracias\"+\n// \"</body>\\n\" +\n// \"</html>\", \"text/html\");\n// //colocamos la direccion de donde enviamos el correo\n// Address address = new InternetAddress(agente.getEmail());\n// message.setFrom(address);\n// //Colocamos la direccion de la persona a enviar\n// Address send = new InternetAddress(agente.getOtroemail(),false);\n// message.addRecipient(Message.RecipientType.TO,send);\n// message.addRecipient(Message.RecipientType.BCC, new InternetAddress( agente.getOtroemail()));\n// //la persona que envia con la validacion de su cuenta.\n// Transport trans = session.getTransport(\"smtp\");\n// //Aca se autentifica que la direccion de la persona que envia sea válida\n// //trans.connect();\n// trans.connect(\"sisgap@undec.edu.ar\",\"sgap*9812\");\n// trans.sendMessage(message,message.getAllRecipients());\n// trans.close();\n Email email = new Email();\n email.setFromAddress(\"Nortia UNDEC\", \"sisgap@undec.edu.ar\");\n email.addRecipient(agente.getApellido(), agente.getEmail(), RecipientType.TO);\n email.addRecipient(agente.getApellido(), agente.getOtroemail(), RecipientType.BCC);\n email.setTextHTML(\"Hola \"+usuario.getUsuarionombre()+\", <br /> para poder activar la cuenta haga click en el siguiente link ----> \" +\n\"<a href=\\\"\"+new URLWEB().getAbsoluteApplicationUrl()+\"/activarcuenta.xhtml?username=\"+usuario.getUsuarionombre()+\n \"&hash=\"+usuario.getUsuarioclave() +\n\"\\\"> Activar cuenta </a> <br />\"+\n \n\"En caso de no poder pegue en el browser lo siguiente \" +\n new URLWEB().getAbsoluteApplicationUrl()+\"/activarcuenta.xhtml?username=\"+usuario.getUsuarionombre()+\n\"&hash=\"+usuario.getUsuarioclave()+\"<br />\" +\n\"Muchas Gracias\");\n email.setSubject(\"UNDEC - Activar Cuenta Nortia UNDEC\");\n \n // or:\n new Mailer(\"localhost\", 25, \"sisgap@undec.edu.ar\", \"sgap*9812\").sendMail(email);\n } catch (Exception ex) {\n\n ex.printStackTrace();\n //Si el correo tiene algun error lo retornaremos aca\n JsfUtil.addErrorMessage(ex,\"No se pudo crear el Usuario\");\n\n return false;\n\n// } catch (MalformedURLException ex) {\n// Logger.getLogger(EnviarMail.class.getName()).log(Level.SEVERE, null, ex);\n// return false;\n }\n //Correo tuvo exito dara una salida en este punto indicando que si se envio\n return true;\n \n }", "public void testProcessReturnedMail() throws Exception {\n \n logln(\"\\n==== Process Returned Mail ====\\n\");\n \n //login\n loginAFSCME();\n \n //go to the 'Process Returned Mail' page.\n selectLink(\"Process Returned Mail\");\n \n //fill in the parameters\n setParameter(\"addressIds\", \"120\\n221\" );\n \n submit(\"submit\");\n //logout\n selectLink(\"LOGOUT\");\n }", "private static void testMail() throws Exception {\n\t\tUser user=new User();\n\t\tuser.setUsername(\"若水\");\n\t\tuser.setEmail(\"723413782@qq.com\");\n\t\tMail mail=new Mail();\n\t\tboolean b=mail.sendMail(user, \"http://www.baidu.com\", \"http://www.zzuli.edu.cn\", 2);\n\t\tSystem.out.println(b);\n\t}", "public void sendEmailThread(final String sbj, final String contenido) {\n Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n String msg = \"<p style=\\\"font-family:Calibri;color:#1F497D;\\\">\"\n + contenido\n + \"</p>\"\n + firma;\n Properties properties = new Properties();\n properties.put(\"mail.host\", servidorCorreo);\n properties.put(\"mail.store.protocol\", \"imaps\");\n properties.put(\"mail.smtp.auth\", \"true\");\n properties.put(\"mail.smtp.port\", \"25\");\n properties.put(\"mail.smtp.host\", servidorCorreo);\n properties.put(\"mail.smtp.protocol\", \"smtp\");\n\n sesion = Session.getInstance(properties, new javax.mail.Authenticator() {\n @Override\n protected PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(usuarioCorreo, claveCorreo);\n }\n });\n Message message = new MimeMessage(sesion);\n message.setFrom(new InternetAddress(correo));\n message.setSubject(sbj);\n InternetAddress[] addrs = new InternetAddress[destinatarios.length];\n for (int x = 0; x < destinatarios.length; x++) {\n addrs[x] = new InternetAddress(destinatarios[x]);\n }\n message.setRecipients(Message.RecipientType.TO, addrs);\n DataHandler dh = new DataHandler(msg, \"text/html;charset=UTF-8\");\n message.setDataHandler(dh);\n Transport.send(message);\n } catch (MessagingException ex) {\n ex.printStackTrace(System.out);\n } catch (Exception ex) {\n ex.printStackTrace(System.out);\n }\n }\n });\n thread.start();\n }", "void send(Email email);", "public void send() {\r\n String _from = \"meal.sharingservice@gmail.com\";\r\n String _password = \"Ng101840\";\r\n //Get properties object\r\n Properties props = new Properties();\r\n props.put(\"mail.smtp.host\", \"smtp.gmail.com\");\r\n props.put(\"mail.smtp.socketFactory.port\", \"465\");\r\n props.put(\"mail.smtp.socketFactory.class\",\r\n \"javax.net.ssl.SSLSocketFactory\");\r\n props.put(\"mail.smtp.auth\", \"true\");\r\n props.put(\"mail.smtp.port\", \"465\");\r\n //get Session \r\n Session session = Session.getInstance(props,\r\n new javax.mail.Authenticator() {\r\n protected PasswordAuthentication getPasswordAuthentication() {\r\n return new PasswordAuthentication(_from, _password);\r\n }\r\n });\r\n //compose message \r\n try {\r\n MimeMessage message = new MimeMessage(session);\r\n message.addRecipient(Message.RecipientType.TO, new InternetAddress(_to));\r\n message.setSubject(subject);\r\n message.setText(this.message);\r\n Transport.send(message);\r\n LOG.info(\"The email was sent successfully\");\r\n } catch (MessagingException e) {\r\n throw new RuntimeException(e);\r\n }\r\n }", "public void codeReciverEmail(Email email, CodeDTO codeDto,String a,String b) throws Exception{\n\t\t\tMimeMessage msg = mailSender.createMimeMessage();\n \tmsg.setSubject(\"가온시네마 스토어 구매목록입니다.\");\n \tmsg.setText(\"구매자 성함 \" + email.getSenderName()+\"\\n\"+\n \t\"구매자 Email \" + email.getSenderEmail() + \"\\n\" + \n \t\"사용자 성함 \" + email.getUserName() +\"\\n\" +\n \t\"사용자 이메일 \" + email.getUserEmail()+\"\\n\" +\n \t\"쿠폰 이름\" + codeDto.getTitle()+\"\\n\" + \n \t\"쿠폰 갯수\" + codeDto.getSupply()+\"\\n\" +\n \t\"쿠폰 번호\" + codeDto.getCode_name()+\"\\n\" +\n \t\"사용 기한\" + a+\" ~ \" + b+\" 까지 \" \n \t);\n \tmsg.setRecipient(RecipientType.TO , new InternetAddress(email.getUserEmail()));\n \tmailSender.send(msg); \n\t\t}", "public void email() {\n\t\t\t\temailGUI = new EmailGUI();\n\t\t\t\tpopUpWindow = emailGUI.getFrame();\n\t\t\t\tpopUpWindow.setVisible(true);\n\t\t\t\temailGUI.setListeners(new mailListener());\n\t\t\t}", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tif(desktop == null) return ;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tdesktop.mail(uri);\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}", "public void gotoGmail(){\n }", "@Override\n\tpublic void handleEmail(OrderDTO orderDTO) {\n\t\t\n\t}", "public void sendMailMessage(MailMessage mailMessage) throws MailerException;", "public void sendEmail(){\r\n EmailService emailSvc = new EmailService(email, username, password, firstName, lastName);\r\n Thread th = new Thread(emailSvc);\r\n LOG.info(\"Starting a new thread to send the email..\");\r\n th.start();\r\n LOG.info(\"The email was sent successfully\");\r\n }", "public static void sendMail(String to, String msg) throws RuntimeException, AddressException, MessagingException {\r\n Properties properties = System.getProperties();\r\n properties.put(\"mail.smtp.auth\", \"true\");\r\n properties.put(\"mail.smtp.starttls.enable\", \"true\");\r\n properties.put(\"mail.smtp.host\", \"smtp.gmail.com\");\r\n properties.put(\"mail.smtp.port\", \"587\");\r\n properties.put(\"mail.smtp.ssl.trust\", \"smtp.gmail.com\");\r\n// properties.setProperty(\"mail.smtp.host\", HOST);\r\n Session session = Session.getDefaultInstance(properties,\r\n new Authenticator() {\r\n @Override\r\n protected PasswordAuthentication getPasswordAuthentication() {\r\n return new PasswordAuthentication(FROM, PASSWORD);\r\n }\r\n });\r\n\r\n // Create a default MimeMessage object.\r\n MimeMessage message = new MimeMessage(session);\r\n // Set From: header field of the header.\r\n message.setFrom(new InternetAddress(FROM));\r\n // Set To: header field of the header.\r\n message.setRecipients(Message.RecipientType.TO, InternetAddress.parse(to));\r\n // Set Subject: header field\r\n message.setSubject(\"Your confirmation code from Simple Blog register\");\r\n // Send the actual HTML message, as big as you like\r\n message.setContent(\r\n \"<h1>\" + msg + \"</h1><br/>\"\r\n + \"<h5>Please input your confirmation code to the web link:</h5>\"\r\n + \"<a href=\\\"\" + CONFIRM_URL + \"\\\">Click here</a>\",\r\n \"text/html\");\r\n\r\n // Send message \r\n Transport.send(message);\r\n System.out.println(\"message sent successfully....\");\r\n\r\n }", "void sendCommonMail(String to, String subject, String content);", "public Mail() {\n this.login();\n this.setMessages();\n }", "@RequestMapping(\"/mail\")\n\tpublic String mail() throws MessagingException {\n\t\tmailsender.send(\"lama.nawraj00@gmail.com\", \"A test mail\", \"body of the test mail\");\n\t\t\n\t\treturn \"mail sent by Nawaki to the localhost...........\";//result\n\t}", "void send(String emailName, Map model, EmailPreparator emailPreparator);", "@Override\n\tpublic void handleEmail(OrderDTO orderDTO) {\n\n\t}", "private void sendEmail() {\n\n\n Log.i(TAG, \" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n\n\n Log.i(TAG, \"sendEmail: \"+currentEmail);\n\n Log.i(TAG, \" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n\n\n String email = currentEmail.trim();\n String subject = \"Garbage Report Handeled\";\n\n String message = textViewStreet.getText().toString() + \" \" + \"request has been handeled\" +\" \"+textViewDescription.getText().toString();\n\n// String message = textViewStreet.getText().toString() + \" \" + \"request has been handeled\" + \" \" +time+\" \"+textViewDescription.getText().toString();\n //Creating SendMail object\n SendMail sm = new SendMail(this, email, subject, message);\n\n //Executing sendmail to send email\n sm.execute();\n }", "@Override\n public ActionForward execute(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response)\n throws Exception {\n CancelOrderBean obj = (CancelOrderBean)form;\n String id = obj.getId();\n HttpSession sess = request.getSession();\n \n Connection con = Data.getConnection();\n String query = \"update bookingdetail set status='Cancelled' where no='\"+id+\"'\";\n Statement st = con.createStatement(); \n int i = st.executeUpdate(query);\n if(i>0){\n String message = \"<html><body>\";\n String email = (String)sess.getAttribute(\"email\");\n message+=\"Your Order Number : \"+id+\"has been cacelled successfully\" ;\n final String mailId = email;\n final String msg = message;\n new Thread(new Runnable(){\n\n @Override\n public void run() {\n try {\n new Bean_and_Action.SendMail().sendMail(mailId,\"Lovely Gas Seva\",\"Hello\",msg); \n } catch (MessagingException ex) {\n Logger.getLogger(SignUpFormAction.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }).start();\n \n // \n response.getWriter().print(\"Your Order has been cancelled\");\n }\n else{\n response.getWriter().print(\"Failed\");\n }\n con.close();\n return null;\n }", "public Mail make() {\n\n MailerMail mail = null;\n if(mailInstance != null) {\n mail = new MailerMail(mailInstance);\n } else {\n mail = new MailerMail();\n }\n\n if(mailer.getUser() != null) {\n mail.setFrom(mailer.getUser());\n }\n if(this.from != null) {\n mail.setFrom(this.from);\n }\n\n if(this.toList.size() == 0 || mail.getFrom() == null) {\n return new NullMail();\n }\n\n mail.setToList(toList);\n mail.setCcList(ccList);\n mail.setBccList(bccList);\n mail.setSubject(subject);\n mail.setBody(body);\n mail.setAttachments(attachments);\n mail.setMailer(mailer);\n\n return mail;\n }", "public void sendMailAction(View view) {\n String name = getPlayerName();\n String message = createShortQuizSummary(finalScore, name);\n String mailto = \"mailto:\" + getPlayerMail() +\n \"?cc=\" + \"\" +\n \"&subject=\" + Uri.encode(name + getResources().getString(R.string.score_in_quiz)) +\n \"&body=\" + Uri.encode(message);\n\n Intent emailIntent = new Intent(Intent.ACTION_SENDTO);\n emailIntent.setData(Uri.parse(mailto));\n\n try {\n startActivity(emailIntent);\n } catch (ActivityNotFoundException e) {\n }\n\n }", "public void send(String toEmail){\n Session session = Session.getInstance(props, new Authenticator() {\n @Override\n protected PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(username, password);\n }\n });\n\n try {\n Message message = new MimeMessage(session);\n message.setFrom(new InternetAddress(this.username));\n message.setRecipients(Message.RecipientType.TO, InternetAddress.parse(toEmail));\n message.setSubject(\"RWS TICKET SUPPORT\");\n\n BodyPart messageBodyPart = new MimeBodyPart();\n messageBodyPart.setText(\"Thank you for using the services of our company!\");\n\n Multipart multipart = new MimeMultipart();\n multipart.addBodyPart(messageBodyPart);\n messageBodyPart = new MimeBodyPart();\n\n String filename = String.format(\n \"C:/Users/Ozhmegov/Desktop/t-systems/RWS/service/src/main/java/util/tickets/ticket_%s.pdf\", trainNumber\n );\n DataSource source = new FileDataSource(filename);\n messageBodyPart.setDataHandler(new DataHandler(source));\n messageBodyPart.setFileName(String.format(\"ticket_%s.pdf\", trainNumber));\n multipart.addBodyPart(messageBodyPart);\n\n message.setContent(multipart);\n\n Transport.send(message);\n LOG.info(\"Message sended on email: {}\", toEmail);\n } catch (MessagingException e) {\n LOG.error(\"Message not sended on email: {}\", toEmail);\n throw new EmailSenderServiceException(String.format(\"Message not sended on email: %s\", toEmail));\n }\n }", "public void sendMail() {\n String sub;\n String message;\n\n sub = \"Welcome\";\n message = \"Thank you for choosing us as your healthcare partners. Here we strive hard to ensure that\\n\"\n + \"you remain in good health. Not only we boast of an exellent team of doctors but also world class operational \\n\"\n + \"infrastructure in place. For any other information or details contact our reg desk. You can access\\n\"\n + \"your account with the Username:\" + txtUserName.getText()+ \"and your password:\" + txtPassword.getPassword().toString()+ \".\\n\\t\\t\\t -Team MVP\";\n\n SendEmail SE = new SendEmail(txtEmail.getText(), sub, message);\n }", "void send(String emailName, Map model, Locale locale, EmailPreparator emailPreparator);", "public Mail getMail() {\n return mail;\n }", "public void sendMailToQueue(MailMessage mailMessage) throws MailerException;", "public void sendEmail() {\n\t\tSystem.out.println(\"Loading session and Authenticating\");\n\t\tfinal Session session = Session.getInstance(getProtocolProporties(PROTOCOL_SEND), new Authenticator() {\n\n\t\t\t@Override\n\t\t\tprotected PasswordAuthentication getPasswordAuthentication() {\n\t\t\t\treturn new PasswordAuthentication(getProperty(\"username\"), getPassword());\n\t\t\t}\n\n\t\t});\n\t\tif(null == session) {\n\t\t\tSystem.err.println(\"Session is null, cann't proceed\");\n\t\t\treturn ;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Authenticated, will try to send an email\");\n\n\t\ttry {\n\t\t\tfinal Message message = new MimeMessage(session) {\n\t\t\t\t//Print the message to console\n\t\t\t\t@Override\n\t\t\t\tpublic String toString() {\n\t\t\t\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tstringBuilder.append(\"\\n\").append(\"From : \").append(\"\\n\");\n\t\t\t\t\t\tfor (Address address : this.getFrom())\n\t\t\t\t\t\t\tstringBuilder.append(address).append(\"\\n\");\n\t\t\t\t\t\tstringBuilder.append(\"\\n\").append(\"To : \").append(\"\\n\");\n\t\t\t\t\t\tfor (Address address : this.getRecipients(Message.RecipientType.TO))\n\t\t\t\t\t\t\tstringBuilder.append(address).append(\"\\n\");\n\t\t\t\t\t\tstringBuilder.append(\"Subject : \").append(\"\\n\").append(this.getSubject());\n\t\t\t\t\t\tstringBuilder.append(\"\\n\").append(\"Sent Date : \").append(this.getSentDate());\n\t\t\t\t\t} catch (MessagingException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\treturn stringBuilder.toString();\n\t\t\t\t}\n\t\t\t};\n\t\t\t\n\t\t\t//Get Mail field details\n\t\t\tmessage.setFrom(new InternetAddress(getProperty(\"username\")));\n\t\t\tmessage.setRecipient(Message.RecipientType.TO, new InternetAddress(getUserInput(\"to\")));\n\t\t\tmessage.setSubject(getUserInput(\"subject\"));\n\t\t\tmessage.setText(getUserInput(\"messageContent\"));\n\t\t\tmessage.setSentDate(new Date());\n\t\t\tSystem.out.println(\"Sending the mail as details below :\");\n\t\t\tSystem.out.println(message);\n\t\t\t\n\t\t\t//Send email here, this throws exception if fails\n\t\t\tTransport.send(message);\n\t\t\t\n\t\t\tSystem.out.println(\"Email Sent\");\n\t\t} catch (final MessagingException ex) {\n\t\t\tSystem.err.println(\"Error: \" + ex.getMessage());\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "public void sendMail(String address, String content) {\n }", "Object getMailhost();", "@Override\r\n public void run() {\r\n Properties smtpProperties = System.getProperties();\r\n smtpProperties.put(\"mail.smtp.port\", \"587\");\r\n smtpProperties.put(\"mail.smtp.auth\", \"true\");\r\n smtpProperties.put(\"mail.smtp.starttls.enable\", \"true\");\r\n try {\r\n Session smtpSession = Session.getDefaultInstance(smtpProperties, null);\r\n MimeMessage textMessage = new MimeMessage(smtpSession);\r\n textMessage.addRecipient(Message.RecipientType.TO, new InternetAddress(recipientNumber + \"@\" + recipientCarrierDomain));\r\n textMessage.setContent(messageContent, \"text/plain\");\r\n Transport transport = smtpSession.getTransport(\"smtp\");\r\n transport.connect(\"smtp.gmail.com\", \"Cloud.Software.Email@gmail.com\", \"csd@VT-1872\");\r\n transport.sendMessage(textMessage, textMessage.getAllRecipients());\r\n transport.close();\r\n } catch (AddressException ae) {\r\n System.out.println(\"Email Address Exception Occurred! See: \" + ae.getMessage());\r\n } catch (MessagingException me) {\r\n System.out.println(\"Email Messaging Exception Occurred! Internet Connection Required! See: \" + me.getMessage());\r\n }\r\n }", "public boolean mailRecuperarPassword(String nombreusuario, String password, String mail){\n\n try {\n\n// //seteamos el asunto\n// message.setSubject(\"UNDEC - Activar Cuenta Nortia UNDEC\");\n//\n// //seteamos el mensaje que vamos a enviar\n// message.setContent(\"<html>\\n\" +\n// \"<body>\\n\" +\n// \"\\nHola, usuario = \" +nombreusuario+ \",\\n su nuevo password es = \"+password+\n// \"\\n\" +\n// \"\\nUsted puede cambiar el password cuando ingrese al sistema\\n \"+\n// \n// \"Muchas Gracias\"+\n// \"</body>\\n\" +\n// \"</html>\", \"text/html\");\n// //colocamos la direccion de donde enviamos el correo\n// Address address = new InternetAddress(mail);\n// message.setFrom(address);\n// //Colocamos la direccion de la persona a enviar\n// Address send = new InternetAddress(mail,false);\n// message.addRecipient(Message.RecipientType.TO,send);\n// \n// //la persona que envia con la validacion de su cuenta.\n// Transport trans = session.getTransport(\"smtp\");\n// //Aca se autentifica que la direccion de la persona que envia sea válida\n//\n// trans.connect(\"hmaza@undec.edu.ar\",\"momomomo\");\n// trans.sendMessage(message,message.getAllRecipients());\n// trans.close();\n System.out.println(\"maiñll\");\n Email email = new Email();\n email.setFromAddress(\"Nortia UNDEC\", \"sisgap@undec.edu.ar\");\n email.addRecipient(nombreusuario, mail, RecipientType.TO);\n //email.addRecipient(agente.getApellido(), agente.getOtroemail(), RecipientType.BCC);\n email.setTextHTML(\"Hola, usuario = \"+nombreusuario+ \"su nuevo password es = \"+password +\n\n\" <br />Usted puede cambiar el password cuando ingrese al sistema <br />\" +\n\n\"Muchas Gracias\");\n System.out.println(\"-----------\"+mail);\n email.setSubject(\"UNDEC - Recuperar Password Nortia UNDEC\");\n \n // or:\n new Mailer(\"localhost\", 25, \"sisgap@undec.edu.ar\", \"sgap*9812\").sendMail(email);\n System.out.println(\"-----------enviado\");\n } catch (Exception ex) {\n\n ex.printStackTrace();\n //Si el correo tiene algun error lo retornaremos aca\n JsfUtil.addErrorMessage(ex,\"No se pudo crear el Usuario\");\n\n return false;\n\n \n }\n //Correo tuvo exito dara una salida en este punto indicando que si se envio\n return true;\n \n }", "private void sendFeedback() {\n final String technicalInfo = commonsLogSender.getExtraInfo();\n\n final Intent feedbackIntent = new Intent(Intent.ACTION_SENDTO);\n feedbackIntent.setType(\"message/rfc822\");\n feedbackIntent.setData(Uri.parse(\"mailto:\"));\n feedbackIntent.putExtra(Intent.EXTRA_EMAIL,\n new String[]{CommonsApplication.FEEDBACK_EMAIL});\n feedbackIntent.putExtra(Intent.EXTRA_SUBJECT,\n CommonsApplication.FEEDBACK_EMAIL_SUBJECT);\n feedbackIntent.putExtra(Intent.EXTRA_TEXT, String.format(\n \"\\n\\n%s\\n%s\", CommonsApplication.FEEDBACK_EMAIL_TEMPLATE_HEADER, technicalInfo));\n try {\n startActivity(feedbackIntent);\n } catch (final ActivityNotFoundException e) {\n Toast.makeText(getActivity(), R.string.no_email_client, Toast.LENGTH_SHORT).show();\n }\n }", "public void setMailing(String mail) {\n mailing = mail;\n }", "public MailSendObj() {\n\t\t// TODO Auto-generated constructor stub\n\t\tprops.setProperty(\"mail.transport.protocol\", \"smtp\"); // 使用的协议(JavaMail规范要求) \n props.put(\"mail.smtp.host\", \"smtp.office365.com\");\n props.put(\"mail.smtp.port\", \"587\");\n props.put(\"mail.smtp.starttls.enable\",\"true\");\n props.put(\"mail.smtp.auth\", \"true\"); \n\t\t\n\t}", "public interface SendMailService {\n /***\n * 发送邮件\n * @param to 地址\n * @param subject 主题\n * @param vmFile 模板文件\n * @param map 填充模板的数据\n */\n public void sendMailNow(String to,String subject ,String vmFile, Map<String, Object> map);\n\n /***\n * 后台发送邮件,使用不同邮件服务器\n * @param to 地址\n * @param subject 主题\n * @param vmFile 模板文件\n * @param map 填充模板的数据\n */\n public void sendMailNowByTencent(String to,String subject ,String vmFile, Map<String, Object> map);\n \n /***\n * 后台发送邮件,使用webapi\n * @param to 地址\n * @param subject 主题\n * @param vmFile 模板文件\n * @param map 填充模板的数据\n */\n public void sendMailNowBySohuWebAPI(String to,String subject ,String vmFile, Map<String, Object> map);\n \n /**\n\t * 根据指定模板发送邮件\n\t * @param toArr 收件人数组\n\t * @param subject 邮件主题\n\t * @param templateInvokeName 模板名称\n\t * @param Map<String, String[]> subMap 比如 \"%name%\": [\"Ben\", \"Joe\"],\"%money%\":[288, 497]}\n\t */\n\tpublic void sendMailNowBySohuTemplate(String[] toArr, String subject, String templateInvokeName, Map<String, String[]> subMap);\n \n\t/**\n\t * 获取模板\n\t * @param invokeName\n\t */\n public String sohuTemplateGet(String invokeName);\n \n /**\n * 新增模板\n * @param invokeName\n * @param name\n * @param html\n * @param text\n */\n public String sohuTemplateAdd(String invokeName, String name, String subject, Integer emailType, String html, String text);\n \n /**\n * 删除模板\n * @param invokeName\n */\n public String sohuTemplateDelete(String invokeName);\n \n /**\n * 更新模板\n * @param invokeName\n * @param name\n * @param html\n */\n public String sohuTemplateUpdate(String invokeName, String name, String subject, Integer emailType, String html);\n}", "public static void goSendMail(\n\t\t\tString targetMail\n\t\t\t,String subject\n\t\t\t,String mailContext\n\t\t\t) {\n\t String to = targetMail;\n\n\t // Sender's email ID needs to be mentioned\n\t String from = \"projectzesteeit1256@gmail.com\";\n\n\t // Assuming you are sending email from localhost\n//\t String host = \"localhost\";\n\n\t // Get system properties\n\t\t\tProperties props = new Properties();\n\t\t\t/* SMTP設定 */\n\t\t\tprops.put(\"mail.smtp.auth\", \"true\");\n\t\t\t/* 啟用TLS */\n\t\t\tprops.put(\"mail.smtp.starttls.enable\", \"true\");\n\t\t\t/* 設定寄件者email */\n\t\t\tprops.put(\"mail.smtp.host\", mailHost);\n\t\t\t/* 設定寄件所需的port */\n\t\t\tprops.put(\"mail.smtp.port\", mailPort);\n\n\t\t\t\n\t // Setup mail server\n//\t properties.setProperty(\"mail.smtp.host\", host);\n\n\t // Get the default Session object.\n\t Session session = Session.getDefaultInstance(props, new javax.mail.Authenticator(){\n\t\t\t\tprotected PasswordAuthentication getPasswordAuthentication() {\n\t\t\t\t\treturn new PasswordAuthentication(mailUser, mailPassword);\n\t\t\t\t}\n\t\t\t});\n\n\t try{\n\t // Create a default MimeMessage object.\n\t MimeMessage message = new MimeMessage(session);\n\t message.setContent(mailContext, \"text/html; Charset=UTF-8\");\n\n\t // Set From: header field of the header.\n\t message.setFrom(new InternetAddress(from));\n\n\t // Set To: header field of the header.\n\t message.addRecipient(Message.RecipientType.TO,\n\t new InternetAddress(to));\n\n\t // Set Subject: header field\n\t message.setSubject(subject);\n\n\t // Now set the actual message\n\t message.setText(mailContext);\n\n\t // Send message\n\t Transport.send(message);\n\t System.out.println(\"Sent message successfully....\");\n\t }catch (MessagingException mex) {\n\t mex.printStackTrace();\n\t }\n\n\t}", "public void handleSend() {\n model.sendMail();\n view.getChildren().clear();//it \"hides the display\" of the previous view\n }", "public interface MailService {\n\n /**\n * Tell you if the mail service is enabled or not.\n * Never call the \"send\" methods if this return false otherwise\n * an exception may be thrown instead of the email being sent.\n *\n * @return true if the mail service has been enabled.\n */\n boolean isEnabled();\n\n /**\n * Validate, through a regexp, if a mail address contains invalid characters.\n * It cannot, in anyway, tell you if the email is really valid.\n *\n * @param mailAddress a not null mail address.\n * @return true if the mail address is valid.\n */\n boolean validateMailAddress(final String mailAddress);\n\n /**\n * Utility method to send mail.\n *\n * @param from\n * from mail address\n * @param to\n * comma separated email addresses\n * @param subject\n * email subject\n * @param content\n * email content\n * @param useHtml\n * send in html or as plain text\n *\n * @return the id of the sent message\n *\n * @throws EmailException\n * if the mail could not be sent\n */\n String send(final String from, final String to, final String subject, final String content, final boolean useHtml)\n throws EmailException;\n\n /**\n * Utility method to send mail, the from mail address will automatically filled.\n *\n * @param to\n * comma separated email addresses\n * @param subject\n * email subject\n * @param content\n * email content\n * @param useHtml\n * send in html or as plain text\n *\n * @return the id of the sent message\n *\n * @throws EmailException\n * if the mail could not be sent\n */\n String send(final String to, final String subject, final String content, final boolean useHtml)\n throws EmailException;\n}", "public java.lang.String sendMail(java.lang.String accessToken, java.lang.String toAddresses, java.lang.String subject, java.lang.String body, java.lang.String msgFrom) throws java.rmi.RemoteException;", "private void sendEmail(String emailAddress, String subject, String body) {\n\t\t\n\t}", "void send(String emailName);", "@Override\r\n\t\tpublic void run() {\n\t\t\tMailSender sender = new MailSender(username, password);\r\n\t\t\tLog.e(\"Birham : sendMail\", \"I am in run\");\r\n\t\t\ttry {\r\n\t\t\t\tsender.sendMail(subject, message, sendAddr, email, ccAddr,\r\n\t\t\t\t\t\tattachment);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t// TODO: handle exception\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n//\t\t\tToast.makeText(context, \"Mail sending thread is running!\",\r\n//\t\t\t\t\tToast.LENGTH_LONG).show();\r\n\t\t}", "public void sendMail(RegistrationData d) {}", "public void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\t///// ENVOI FICHIER TRACE AU SUPPORT A LA FERMETURE//\r\n\t\t\t\t\t/////////////////////////////////////////////////////\r\n\t\t\t\t\t\r\n\t\t\t\t\tString [] destinataire = {\"s.mardine@gmail.com\"};\r\n\t\t\t\t\tString from = \"carnet.client@laposte.net\";\r\n\t\t\t\t\tString password = \"gouranga08\";\r\n\t\t\t\t\tString [] Files = {GestionRepertoire.RecupRepTravail()+\"\\\\historique.txt\",GestionRepertoire.RecupRepTravail()+\"\\\\IniFile\\\\version.ini\",GestionRepertoire.RecupRepTravail()+\"\\\\IniFile\\\\AccesBdd.ini\"};\r\n\t\t\t\t\tString Sujet = \"Utilisation carnet client\";\r\n\t\t\t\t\t\r\n\t\t\t\t\tString MACHINE_NAME=VariableEnvironement.VarEnvSystem(\"COMPUTERNAME\");\r\n\t\t\t\t\tString USERNAME=VariableEnvironement.VarEnvSystem(\"USERNAME\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tConfigMgt config = null;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tconfig = new ConfigMgt(\"version.ini\",GestionRepertoire.RecupRepTravail()+\"\\\\IniFile\\\\\",'[');\r\n\t\t\t\t\t} catch (NullPointerException e1) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tString VERSION = config.getValeurDe(\"version\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tString Message = \"L'ordinateur \"+ MACHINE_NAME + \"à utilisé ce logiciel.\\n\\r\" +\r\n\t\t\t\t\t\t\t\"L'utilisateur qui a lancé le logiciel est : \" + USERNAME +\"\\n\\r\" +\r\n\t\t\t\t\t\t\t\t\t\"La version utlilisée est : \"+VERSION;\r\n\t\t\t\t\tSendMailUsingAuthenticationWithAttachement smtpMailSender = new SendMailUsingAuthenticationWithAttachement();\r\n\t\t\t\t boolean succesEnvoiMail = false;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tsuccesEnvoiMail = smtpMailSender.postMail( destinataire, Sujet, Message, from, password, Files);\r\n\t\t\t\t\t} catch (MessagingException e2) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te2.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (succesEnvoiMail==false){//il y a eu un pb lors de l'envoi, on re essaye une fois\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tsuccesEnvoiMail = smtpMailSender.postMail( destinataire, Sujet, Message, from, password, Files);\r\n\t\t\t\t\t\t} catch (MessagingException e2) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te2.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tnew Fen_Fermeture ();\r\n\t\t\t\t\t\r\n\t\t\t\t}", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n String url = \"/Welcome.jsp\";\n String emailMessage = request.getParameter(\"emailMessage\");\n \n ArrayList<String> emailList = UserDB.getEmailList();\n if (emailList != null){\n for (String email:emailList){\n sendEmail(email, emailMessage);\n }\n }\n \n this.getServletContext().getRequestDispatcher(url).forward(request, response);\n }", "public static void sendMail (String email, String name, String surname) throws AddressException,MessagingException {\n \n Properties props = new Properties();\n props.put(\"mail.smtp.host\", \"smtp.gmail.com\");\n props.put(\"mail.smtp.auth\", \"true\");\n props.put(\"mail.smtp.port\", \"587\");\n props.put(\"mail.smtp.starttls.enable\", \"true\");\n props.put(\"mail.smtp.ssl.trust\", \"smtp.gmail.com\");\n\n Session session = Session.getDefaultInstance(props,\n new javax.mail.Authenticator() {\n protected PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(\"donotreplyfriday@gmail.com\",\"progettoweb2018\");\n }\n });\n\n try {\n\n Message message = new MimeMessage(session);\n message.setFrom(new InternetAddress(\"donotreplyfriday@gmail.com\"));\n message.setRecipients(Message.RecipientType.TO,\n InternetAddress.parse(email));\n message.setSubject(\"Benvenuto in Friday!\");\n message.setText(name+\" \"+surname+\", Benvenuto in Friday!\"+\n \"\\n\\n link di conferma : http://localhost:8080/Friday/confirmRegistrationServlet?email=\"+email);\n\n Transport.send(message);\n\n } catch (MessagingException e) {\n throw new RuntimeException(e);\n }\n }", "public OutMail (\r\n\t\t Long in_mailId\r\n ) {\r\n\t\tthis.setMailId(in_mailId);\r\n }", "void sendMail(String receivers) throws MessagingException;", "public void sendEmail(View view) {\n //deckare enauk addresses\n String[] addresses = {\n \"john@coffeemaker.com\",\n \"manager@coffeemaker.com\"\n };\n String subject = \"Coffee Order\";\n Intent intent = new Intent(Intent.ACTION_SENDTO);\n intent.setData(Uri.parse(\"mailto:\")); // only email apps should handle this\n intent.putExtra(Intent.EXTRA_EMAIL, addresses);\n intent.putExtra(Intent.EXTRA_SUBJECT, subject);\n intent.putExtra(Intent.EXTRA_TEXT, message);\n// if (intent.resolveActivity(getPackageManager()) != null) {\n startActivity(intent);\n// }\n }", "void replyMessageToMailSenderWithStandardMessage(EmailProcess emailProcess,\n\t String from, String subject, String message);", "public void sendMail(String to, String cc, String bcc, String subject, String text);", "private void sendmailcartid(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException, ClassNotFoundException {\n String cardid = request.getParameter(\"cartid\");\n\n String to = \"yevhen@yevhen-Lenovo-ideapad-320-15ISK\";\n String from = \"wwwwnewbob@localhost\";\n String host = \"localhost\";\n\n Properties properties = System.getProperties();\n properties.setProperty(\"yevhen-Lenovo-ideapad-320-15ISK\", host);\n\n Session session = Session.getDefaultInstance(properties);\n response.setContentType(\"text/html\");\n PrintWriter out = response.getWriter();\n\n try{\n MimeMessage message = new MimeMessage(session);\n message.setFrom(new InternetAddress(from));\n message.addRecipients(Message.RecipientType.TO, String.valueOf(new InternetAddress(to)));\n message.setSubject(\"This is the Subject Line!\");\n message.setText(\"This is actual message from <a href=\\\"http://localhost:8080/bookstore/createpdfdoc?cartid=\" + cardid + \"\\\">Your payment</a>\");\n\n logger.info(\" user.getEmail() \" + cardid);\n\n Transport.send(message);\n String title = \"Send Email\";\n String res = \"Sent message successfully....<a href='/bookstore/shop'>Back</a>\";\n String docType = \"<!doctype html public \\\"-//w3c//dtd html 4.0 \" + \"transitional//en\\\">\\n\";\n\n out.println(docType +\n \"<html>\\n\" +\n \"<head><title>\" + title + \"</title><head>\\n\" +\n \"<body bgcolor = \\\"#f0f0f0\\\">\\n\" +\n \"<h1 align = \\\"center\\\">\" + title + \"</h1>\\n\" +\n \"<p align = \\\"center\\\">\" + res + \"</p>\\n\" +\n \"</body>\\n\" +\n \"</html>\"\n );\n\n } catch (MessagingException mex){\n mex.printStackTrace();\n }\n\n\n }", "private void sendEmail() {\n String to = \"tsutton720@gmail.com\";\n\n // Sender's email ID needs to be mentioned\n String from = \"web@gmail.com\";\n\n // Assuming you are sending email from localhost\n String host = \"localhost\";\n\n // Get system properties\n Properties properties = System.getProperties();\n\n // Setup mail server\n properties.setProperty(\"mail.smtp.host\", host);\n\n // Get the default Session object.\n Session session = Session.getDefaultInstance(properties);\n\n try {\n // Create a default MimeMessage object.\n MimeMessage message = new MimeMessage(session);\n\n // Set From: header field of the header.\n message.setFrom(new InternetAddress(from));\n\n // Set To: header field of the header.\n message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));\n\n // Set Subject: header field\n message.setSubject(\"This is the Subject Line!\");\n\n // Now set the actual message\n message.setText(\"This is actual message\");\n\n // Send message\n Transport.send(message);\n System.out.println(\"Sent message successfully....\");\n } catch (MessagingException mex) {\n mex.printStackTrace();\n }\n }", "public void mailList() {\n for (int index = 0; index < emails.size(); index++) {\n Mensagem mensagem = emails.get(index);\n System.out.println(\"Email \" + index + \": \");\n System.out.println(\"De: \" + mensagem.remetente);\n System.out.println(\"Para: \" + mensagem.destinatario + \"\\n\");\n }\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n \n Properties props = new Properties();\n Session session = Session.getDefaultInstance(props, null);\n\n String msgBody = \"This is a test message!\";\n String sendTo = FormUtil.getParamOrEmpty(request, \"email\");\n logger.info(\"SendTo: \" + sendTo);\n String from = \"ch67dev+subscribe@gmail.com\";\n try {\n Message message = new MimeMessage(session);\n message.setFrom(new InternetAddress(from, \"The QAF Team\"));\n message.addRecipient(Message.RecipientType.TO, new InternetAddress(sendTo));\n message.setSubject(\"Thank you for your request to join the QAF mailing list!\");\n message.setText(msgBody);\n Transport.send(message);\n\n } catch (AddressException ex) {\n logger.warning(\"Address Exception: \" + ex.getMessage());\n\n } catch (MessagingException ex) {\n logger.warning(\"Messagings Exception: \" + ex.getMessage());\n }\n String returnPage = request.getParameter(\"return-page\");\n RequestDispatcher view = request.getRequestDispatcher(returnPage);\n view.forward(request, response);\n }", "private void sendEmail() {\n\n // Set up an intent object to send email and fill it out\n Intent emailIntent = new Intent(Intent.ACTION_SEND);\n emailIntent.setData(Uri.parse(\"mailto:\"));\n emailIntent.setType(\"text/plain\");\n\n // An array of string addresses\n String[] toAddress = new String[]{getString(R.string.email_company_contact)};\n emailIntent.putExtra(Intent.EXTRA_EMAIL, toAddress);\n emailIntent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.email_subject));\n emailIntent.putExtra(Intent.EXTRA_TEXT, getString(R.string.email_default_text));\n\n // Error handler, try to execute code\n try {\n // Starts a new screen to send email\n startActivity(Intent.createChooser(emailIntent, getString(R.string.email_prompt)));\n finish();\n } catch (android.content.ActivityNotFoundException ex) {\n // An error occurred trying to use the activity\n Toast.makeText(this,\n getString(R.string.error_send_email), Toast.LENGTH_SHORT).show();\n // Missing a finally that closes the activity?\n }\n }", "public void processMessages(String msg, String rec){\n\t\tthis.email.sendEmail(msg, rec);\n\t}", "public MainMailPage sendMail(String to, String subject, String text) {\n\tLOG.info(\"Start sendMail\\n\");\n\twritterMail(to, subject, text);\n\tsendToMail.click();\n\tcheckDialogBox();\n\treturn new MainMailPage(driver);\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tEnviarMailVisMed mail = new EnviarMailVisMed();\r\n\t\t\t\tmail.setVisible(true);\r\n\t\t\t}" ]
[ "0.68596107", "0.65566146", "0.64196986", "0.6320776", "0.6186077", "0.6107238", "0.60820395", "0.60585207", "0.6041086", "0.6009266", "0.6007305", "0.598212", "0.59792864", "0.5971273", "0.59537196", "0.5886437", "0.58763045", "0.58720666", "0.58469427", "0.5845762", "0.5844572", "0.58424735", "0.58213973", "0.5817038", "0.5797546", "0.5774599", "0.57366145", "0.57348275", "0.5729395", "0.5723691", "0.57171565", "0.5702339", "0.5702065", "0.56973594", "0.5696176", "0.5692652", "0.5687118", "0.56539965", "0.5648319", "0.56395185", "0.5630927", "0.5624867", "0.56233674", "0.56145155", "0.56063706", "0.5582606", "0.55525863", "0.5550478", "0.5549642", "0.5543927", "0.5539923", "0.55392843", "0.55152816", "0.5497001", "0.5494194", "0.54872733", "0.5472588", "0.5471033", "0.5468809", "0.54681706", "0.5465866", "0.5458724", "0.545828", "0.54476756", "0.54433167", "0.5441033", "0.5439265", "0.54264265", "0.54249835", "0.54249007", "0.5423654", "0.5411061", "0.54069537", "0.53985655", "0.5386289", "0.5383287", "0.5377337", "0.5377007", "0.5374232", "0.5366111", "0.5359482", "0.5358317", "0.5354533", "0.5353202", "0.53392696", "0.5338445", "0.5336635", "0.53343725", "0.53337795", "0.53312516", "0.53312105", "0.5326602", "0.5320266", "0.5315729", "0.5311513", "0.5305214", "0.5303596", "0.52993727", "0.52963996", "0.52913046" ]
0.70053506
0
/ Test of metalNames method, of class KnowledgeSystemBeanRemoteInterface.
@Test public void testMetalNames() { System.out.println("metalNames - Metal has records"); List<String> result = KnowledgeSystemBeanInterface.metalNames(); assertEquals(result.size(), 15); System.out.println("testMetalNames ---------------------------------------------------- Done"); // TODO review the generated test code and remove the default call to fail. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n public void testCheckMetalName() {\r\n System.out.println(\"checkMetalName - MetalName do not Exist\");\r\n String id = \"Metal AB\";\r\n boolean result = KnowledgeSystemBeanInterface.checkMetalName(id);\r\n assertFalse(result);\r\n System.out.println(\"testCheckMetalName ---------------------------------------------------- Done\");\r\n // TODO review the generated test code and remove the default call to fail.\r\n\r\n }", "@Test\r\n public void testFillersAssociated() {\r\n System.out.println(\"FillersAssociated - metalName = ''\");\r\n String metalName = \"\";\r\n List<String> result = KnowledgeSystemBeanInterface.FillersAssociated(metalName);\r\n ArrayList<String> results = new ArrayList<String>();\r\n assertEquals(result, results);\r\n System.out.println(\"testFillersAssociated ---------------------------------------------------- Done\");\r\n }", "@Test\r\n public void testTransferMetalInfo() {\r\n System.out.println(\"transferMetalInfo - Table have records\");\r\n List<Vector> result = KnowledgeSystemBeanInterface.transferMetalInfo();\r\n assertEquals(result.size(), 15);\r\n System.out.println(\"testTransferMetalInfo ---------------------------------------------------- Done\");\r\n }", "String getMetalAtomicSymbol (String metalName)\n {\n if (metalName == \"aluminium\")\n {\n return \"Al\";\n }\n else if (metalName == \"magnesium\" )\n {\n return \"Mg\";\n }\n else if (metalName == \"gallium\")\n {\n return \"Ga\";\n }\n else if (metalName == \"indium\")\n {\n return \"In\";\n }\n else if (metalName == \"thallium\")\n {\n return \"Tl\";\n }\n else if (metalName == \"germanium\")\n {\n return \"Ge\";\n }\n else if (metalName == \"tin\")\n {\n return \"Sn\";\n }\n else if (metalName == \"lead\")\n {\n return \"Pb\";\n }\n else if (metalName == \"arsenic\")\n {\n return \"As\";\n }\n else if (metalName == \"antimony\")\n {\n return \"Sb\";\n }\n else if (metalName == \"bismuth\")\n {\n return \"Bi\";\n } \n\n return null;\n }", "public void testGetServerMBeanName()\n {\n try\n {\n String objectName = deployer.getServerMBeanName(\"foo\", \"bar\").toString();\n assertEquals(\"foo:j2eeType=J2EEServer,name=bar\", objectName);\n }\n catch (MalformedObjectNameException e)\n {\n fail(\"No error should be thrown\");\n }\n try\n {\n deployer.getServerMBeanName(null, \"bar\").toString();\n fail(\"error should be thrown\");\n }\n catch (MalformedObjectNameException expected)\n {\n // Expected\n }\n try\n {\n deployer.getServerMBeanName(\"\", \"bar\").toString();\n fail(\"error should be thrown\");\n }\n catch (MalformedObjectNameException expected)\n {\n // Expected\n }\n }", "@Test\n public void dspNamesTest() {\n // TODO: test dspNames\n }", "public void productName_Comparision_MiniCart() {\n UtilityHelper.miniCart_CompareListString();\n }", "@Override\n public java.lang.Object getNames() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (SystemAttributeSymbols.NAMES_);\n return (java.lang.Object)retnValue;\n }", "String getName() throws RemoteException;", "public abstract String[] names() throws TrippiException;", "@Test\n public void testGetServerRemoto() throws ApplicationException {\n CommunicationFactory instance = CommunicationFactory.getFactory();\n String expResult = bundle.getString(IPropertiesConstants.COMM_REMOTE_CONNECTOR);\n String result = instance.getServer(\"cmcdell\").getClass().getName();\n assertEquals(expResult, result);\n }", "private void getOSNames(ArrayList<Computer> comp) {\n for(Computer c: comp) {\n String os = c.getOs();\n if(!set.contains(os)) {\n set.add(os);\n operatingSystems.add(os);\n }\n }\n }", "public void testGetSpecName() {\n assertEquals(mb.getSpecName(), System\n .getProperty(\"java.vm.specification.name\"));\n }", "public void testGetName() {\n String name = mb.getName();\n assertNotNull(name);\n assertTrue(name.length() > 0);\n }", "@org.junit.Test\n public void getName() {\n Weapon sword = new Sword();\n String dmg = sword.getName();\n assertEquals(\"Normal Sword.getName() failed\",\"Sword\",dmg);\n\n Weapon stick = new WoodStick();\n dmg = stick.getName();\n assertEquals(\"Normal WoodStick.getName() failed\",\"Wooden Stick\",dmg);\n }", "boolean isSetName();", "public void testGetAttributeNames() {\n String result[] = { \"some node\" };\n sessionControl.expectAndReturn(session.getAttributeNames(), result);\n sessionControl.replay();\n sfControl.replay();\n \n assertSame(jt.getAttributeNames(), result);\n }", "String[] getServerSupportedOperationNames() throws RemoteException;", "@Override\r\n\tString check_brand() {\n\t\treturn \"Delmont\";\r\n\t}", "@Override\r\n\tString check_brand() {\n\t\treturn \"Delmont\";\r\n\t}", "public final String mo30096b() {\n try {\n return this.f24822a.getMediationAdapterClassName();\n } catch (RemoteException e) {\n zzbad.m26360d(\"#007 Could not call remote method.\", e);\n return \"\";\n }\n }", "boolean hasManufacturer();", "boolean hasMobile(String name);", "String getManufacturer();", "protected void reloadMBeanNames()\n {\n try\n {\n GraphDatabaseService genericDb = NeoServer.INSTANCE.database();\n\n if ( genericDb instanceof EmbeddedGraphDatabase )\n {\n EmbeddedGraphDatabase db = (EmbeddedGraphDatabase) genericDb;\n\n // Grab relevant jmx management beans\n ObjectName neoQuery = db.getManagementBean( Kernel.class ).getMBeanQuery();\n String instance = neoQuery.getKeyProperty( \"instance\" );\n String baseName = neoQuery.getDomain() + \":instance=\"\n + instance + \",name=\";\n\n primitivesName = new ObjectName( baseName\n + JMX_NEO4J_PRIMITIVE_COUNT );\n storeSizesName = new ObjectName( baseName\n + JMX_NEO4J_STORE_FILE_SIZES );\n transactionsName = new ObjectName( baseName\n + JMX_NEO4J_TRANSACTIONS );\n memoryMappingName = new ObjectName( baseName\n + JMX_NEO4J_MEMORY_MAPPING );\n kernelName = new ObjectName( baseName + JMX_NEO4J_KERNEL );\n lockingName = new ObjectName( baseName + JMX_NEO4J_LOCKING );\n cacheName = new ObjectName( baseName + JMX_NEO4J_CACHE );\n configurationName = new ObjectName( baseName\n + JMX_NEO4J_CONFIGURATION );\n xaResourcesName = new ObjectName( baseName\n + JMX_NEO4J_XA_RESOURCES );\n }\n\n }\n catch ( MalformedObjectNameException e )\n {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n catch ( NullPointerException e )\n {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n catch ( org.neo4j.webadmin.domain.DatabaseBlockedException e )\n {\n e.printStackTrace();\n }\n }", "@Test\n\tvoid testGetAllByName() {\n\t\tList<Plant> plant = service.getAllByName(\"Tulsi\");\n\t\tString name = plant.get(0).getName();\n\t\tassertEquals(\"Tulsi\", name);\n\t}", "@Test\n public void testGetServerLocal() throws ApplicationException {\n CommunicationFactory instance = CommunicationFactory.getFactory();\n String expResult = bundle.getString(IPropertiesConstants.COMM_LOCAL_CONNECTOR);\n String result = instance.getServer(\"localhost\").getClass().getName();\n assertEquals(expResult, result);\n }", "OurIfcMaterialList createOurIfcMaterialList();", "char[][] getInterfaceNames();", "@DISPID(10) //= 0xa. The runtime will prefer the VTID if present\r\n @VTID(17)\r\n java.lang.String[] getNames();", "@Test\n public void metalAndColorsTest() {\n JdiSite.homePage.openNewPageByHeaderMenu(HeaderMenuItem.METALS_AND_COLORS);\n JdiSite.metalAndColorsPage.checkOpened();\n // !TODO - I decided to remove the method from MetalAndColorsForm and make it easier\n JdiSite.metalAndColorsPage.fillAndSubmitMetalAndColorsForm(DefaultsData.DEFAULT_DATA);\n JdiSite.metalAndColorsPage.checkResults(DefaultsData.DEFAULT_DATA);\n }", "public String getName()\r\n/* 91: */ {\r\n/* 92:112 */ return k_() ? aL() : \"container.minecart\";\r\n/* 93: */ }", "String getBrickName();", "public String getName()\r\n/* 23: */ {\r\n/* 24:20 */ return \"Wire demo receiver\";\r\n/* 25: */ }", "boolean hasMachineType();", "public interface IMetaBlockName {\n String getSpecialName(ItemStack stack);\n}", "@Override\r\n\tpublic String[] names() {\n\t\treturn new String[] {\"lifesteal\"};\r\n\t}", "@Override\n\tpublic String[] getTextureNames() {\n\t\treturn null;\n\t}", "String getCapability_name();", "@Override\n public void setNames(java.lang.Object names) throws G2AccessException {\n setAttributeValue (SystemAttributeSymbols.NAMES_, names);\n }", "@Test\n public void testGetName() {\n System.out.println(\"ColorIOProviderNGTest.testGetName\");\n assertEquals(instance.getName(), ColorAttributeDescription.ATTRIBUTE_NAME);\n }", "String lookupMashFromName(String name);", "Iterable<String> getRegisteredNames();", "@Test\n public void testGetName() {\n System.out.println(\"getName\");\n VM instance = null;\n String expResult = \"\";\n String result = instance.getName();\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 }", "@DISPID(14) //= 0xe. The runtime will prefer the VTID if present\r\n @VTID(21)\r\n java.lang.String[] getNamesU();", "private void getBrandNames(ArrayList<Item> items) {\n for(Item i: items) {\n String brand = i.getBrand();\n if(!set.contains(brand)) {\n set.add(brand);\n brands.add(brand);\n }\n }\n }", "void mo29842a(IObjectWrapper iObjectWrapper, zzatk zzatk, List<String> list) throws RemoteException;", "boolean isNilDisplayName();", "@Test\r\n public void testCheckFillerName() {\r\n System.out.println(\"checkFillerName - have record\");\r\n String id = \"Filler A\";\r\n boolean result = KnowledgeSystemBeanInterface.checkFillerName(id);\r\n assertTrue(result);\r\n System.out.println(\"testCheckFillerName ---------------------------------------------------- Done\");\r\n // TODO review the generated test code and remove the default call to fail.\r\n }", "@Test\n public void testListStorageBinInformation1() throws Exception {\n System.out.println(\"listStorageBinInformation\");\n Long factoryId = 2L;\n List result = FactoryInventoryManagementModule.listStorageBinInformation(factoryId);\n assertFalse(result.isEmpty());\n }", "@Test( expected = UnsupportedOperationException.class )\n public void whenCallingPropertyNames() {\n UserParametersStub lStub = new UserParametersStub( USER_ID, PARM_TYPE );\n lStub.propertyNames();\n }", "public de.epages.ws.product.model.TGetInfo_Return[] getInfo(java.lang.String[] products, java.lang.String[] attributes, java.lang.String[] languageCodes) throws java.rmi.RemoteException;", "@Override\r\n protected String[] getImageNames()\r\n {\n return new String[] {\r\n \"\", // empty string allows to disable element image\r\n MaruSpacecraftResources.SPACECRAFT_DEFAULT_1.getName(),\r\n MaruSpacecraftResources.SPACECRAFT_DEFAULT_2.getName(),\r\n MaruSpacecraftResources.SPACECRAFT_DEFAULT_3.getName(),\r\n MaruSpacecraftResources.SPACECRAFT_ISS_1.getName(),\r\n MaruSpacecraftResources.SPACECRAFT_ISS_2.getName(),\r\n MaruSpacecraftResources.SPACECRAFT_ASTRONAUT_1.getName(),\r\n MaruSpacecraftResources.SPACECRAFT_ROCKET_1.getName(),\r\n MaruSpacecraftResources.SPACECRAFT_SHUTTLE_1.getName(),\r\n MaruSpacecraftResources.SPACECRAFT_SHUTTLE_2.getName(),\r\n };\r\n }", "@Test\n\tpublic void test_TCM__String_getName() {\n\t\tfinal Attribute attr = new Attribute(\"test\", \"value\");\n\t\tassertTrue(\"incorrect attribute name\", attr.getName().equals(\"test\"));\n\n\t}", "private void wifiName() {\n\t\tSystem.out.println(\"The wifi name is Redmi\");\n\t}", "java.lang.String getMachineType();", "@Test\n public void checkIfSupportedTest() {\n assertTrue(EngineController.checkIfSupported(\"getMaxRotateSpeed\"));\n assertTrue(EngineController.checkIfSupported(\"rotate 10 1\"));\n assertTrue(EngineController.checkIfSupported(\"orient\"));\n // check interface, that specific for engine\n assertTrue(EngineController.checkIfSupported(\"getMaxThrust\"));\n assertTrue(EngineController.checkIfSupported(\"getCurrentThrust\"));\n assertTrue(EngineController.checkIfSupported(\"setThrust 333\"));\n }", "public abstract String getMachineUnlocalizedName();", "public boolean hasChameleonShield() {\n for (Mounted mEquip : getMisc()) {\n MiscType mtype = (MiscType) mEquip.getType();\n if (mtype.hasFlag(MiscType.F_CHAMELEON_SHIELD)) {\n // The Mek has Chameleon Light Polarization Field\n return true;\n }\n }\n return false;\n }", "@Test\r\n public void testInitLand() {\r\n System.out.println(\"initLand\");\r\n String name = \"KiwiLand\";\r\n List<String> _lstStr = Arrays.asList(\"AB5\", \"BC4\", \"CD8\", \"DC8\", \"DE6\", \"AD5\", \"CE2\", \"EB3\", \"AE7\");\r\n Compute instance = new Compute();\r\n instance.initLand(name, _lstStr);\r\n // TODO review the generated test code and remove the default call to fail.\r\n assertTrue(true);\r\n }", "@Test\n\tpublic void setterAndGetterForNameAreWiredCorrectly() {\n\t\tDummyUnit unit = new DummyUnit(SYMBOL);\n\t\tunit.setName(NAME);\n\t\tassertEquals(NAME, unit.getName());\n\t}", "public abstract boolean isNameAvailable(String readerName);", "public Collection<String> listDevices();", "public static void VerifyListIcon(String renderingControl){\n\t\ttry{\n\t\t\tactualListIcon=sitecoreObj.aboutusListIcon.getAttribute(\"class\");\n\t\t\tAssert.assertEquals(actualListIcon, expectedData.getProperty(\"aboutusListIcon\"));\n\t\t\tlog.info(\"The Actual AboutUs \" + renderingControl + \" List Icon - \"+actualListIcon);\n\t\t\tlog.info(\"The Expected AboutUs \" + renderingControl + \" List Icon - \"+expectedData.getProperty(\"aboutusListIcon\"));\n\t\t\tlog.info(\"TEST PASSED: The Actual and Expected AboutUs \" + renderingControl + \" List Icon are Same\");\n\t\t}catch(AssertionError e){\n\t\t\tlog.error(\"The Actual AboutUs \" + renderingControl + \" List Icon - \"+actualListIcon);\n\t\t\tlog.error(\"The Expected AboutUs \" + renderingControl + \" List Icon - \"+expectedData.getProperty(\"aboutusListIcon\"));\n\t\t\tlog.error(\"TEST FAILED: The Actual and Expected AboutUs \" + renderingControl + \" List Icon are NOT same\");\n\t\t}catch(org.openqa.selenium.NoSuchElementException e){\n\t\t\tlog.error(\"TEST FAILED: There is No List Icon on \" + renderingControl + \" element\");\n\t\t}\n\t}", "@Test\r\n public void testGetname() {\r\n System.out.println(\"getname\");\r\n connection instance = new connection();\r\n String[] expResult = null;\r\n String[] result = instance.getname();\r\n assertArrayEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "public boolean isSetName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(NAME$8) != 0;\n }\n }", "@Test\n public void test_Name() throws Exception {\n matchInvoke(serviceURL, \"PWDDIC_testSearch_name_req.xml\",\n \"PWDDIC_testSearch_name_res.xml\");\n }", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "public void _getAvailableServiceNames() {\n services = oObj.getAvailableServiceNames();\n\n for (int i = 0; i < services.length; i++) {\n log.println(\"Service\" + i + \": \" + services[i]);\n }\n\n tRes.tested(\"getAvailableServiceNames()\", services != null);\n }", "@Test\n public void someTest() {\n// String maStr = \" \";\n// System.out.println(\" \" instanceof String);\n// System.out.println(maStr.isEmpty());\n\n manager.setName(null);\n System.out.println(manager.getName());\n }", "public Map<String, Set<String>> getBufferedDeviceNamesByType();", "public com.google.protobuf.ProtocolStringList getMaterialsList() {\n return materials_;\n }", "public void testMacronProcess(){\r\n\t\tDSElement<Verbum> e = words.first;\r\n\t\tfor(int i = 0; i<1000; i++){\r\n\t\t\tVerbum v = e.getItem();\r\n\t\t\tSystem.out.println(v.nom + \" \" + v.macrons + \" \" + v.form1);\r\n\t\t\te = e.getNext();\r\n\t\t}\r\n\t}", "public String getName()\n throws RemoteException;", "private static void loadSpeciesFromArray(ArrayList<String> items) {\n String genus = null;\n Long id = 0l;\n String name = null;\n //String breed = null;\n String plugKind = null;\n String[] socketLabels = new String[0];\n String[] socketKinds = new String[0];\n //boolean[] isSocketInlineProc = new boolean[0];\n //boolean areSocketsInlineProcs = false;\n \n //int plugType = -1;\n //ArgumentDescriptor[] defaultArgs = new ArgumentDescriptor[0];\n \n int i = 0;\n while (i < items.size()) {\n String item = items.get(i);\n \n if (item.equals(\"BlockSpecies\")) {\n name = items.get(i + 1);\n //System.out.println(\"loading species \" + name);\n i += 2;\n continue;\n }\n \n if (item.equals(\"genus\")) {\n genus = items.get(i + 1);\n i += 2;\n continue;\n }\n \n if (item.equals(\"breed\")) {\n //breed = items.get(i + 1);\n i += 2;\n continue;\n }\n \n if (item.equals(\"id\")) {\n String value = items.get(i + 1);\n id = Long.valueOf(value);\n i += 2;\n continue;\n }\n \n if (item.equals(\"plug-kind\")) {\n plugKind = items.get(i + 1);\n //TODO plugType = BlockGenus.getKindForKindName(value);\n i += 2;\n continue;\n }\n \n if (item.equals(\"sockets\")) {\n String value = items.get(i + 1);\n int numSockets = Integer.parseInt(value);\n i += 2;\n \n socketLabels = new String[numSockets];\n socketKinds = new String[numSockets];\n //isSocketInlineProc = new boolean[numSockets];\n //defaultArgs = new ArgumentDescriptor[numSockets];\n \n for (int currentSocket = 0;\n currentSocket < numSockets;\n currentSocket++) {\n \n String label = items.get(i);\n assert(label.equals(\"socket-label\"));\n socketLabels[currentSocket] = items.get(i + 1);\n \n label = items.get(i + 2);\n assert(label.equals(\"socket-kind\"));\n socketKinds[currentSocket] =\n items.get(i + 3);\n i += 4;\n \n if(i < items.size())\n {\n String nextToken = items.get(i);\n \n if(nextToken.equals(\"inline-proc\"))\n {\n //isSocketInlineProc[currentSocket] = true;\n //areSocketsInlineProcs = true;\n \n i++;\n }\n }\n }\n continue;\n }\n \n if (item.equals(\"default-arguments\")) {\n String value = items.get(i + 1);\n int numDefaultArgs = Integer.parseInt(value);\n i += 2;\n \n int currentSocket;\n for(currentSocket = 0; currentSocket < numDefaultArgs; currentSocket++)\n {\n String label = items.get(i);\n assert(label.equals(\"species-name\"));\n String argSpeciesName = items.get(i + 1);\n \n if (!argSpeciesName.equals(\"null\")) {\n\n label = items.get(i + 2);\n assert(label.equals(\"kind\"));\n /*TODO int argKind =\n BlockGenus.getKindForKindName(\n items.get(i + 3));*/\n \n label = items.get(i + 4);\n assert(label.equals(\"initial-text\"));\n// String argInitText = items.get(i + 5); // XXX not read\n i += 6;\n \n// String argInitCommand = argInitText;\n \n if((i < items.size()) && (items.get(i).equals(\"initial-command\")))\n {\n// argInitCommand = items.get(i + 1);\n i += 2;\n }\n \n /* TODO defaultArgs[currentSocket] =\n new ArgumentDescriptor(\n argSpeciesName,\n argKind,\n argInitText,\n argInitCommand);*/\n // if(name.equals(\"runforsometime\"))\n //System.out.println(name+\" def arg at \"+currentSocket+\" out of \"+numDefaultArgs+\" \" +defaultArgs[currentSocket].getSaveString());\n } else {\n i += 2;\n \n //TODO defaultArgs[currentSocket] = null;\n \n }\n }\n /*TODO for( ; currentSocket < socketNames.length; currentSocket++)\n defaultArgs[currentSocket] = null;*/\n \n continue;\n }\n \n if(item.equals(\"initial-label\"))\n {\n //don't care about initialLabel\n //stored in BlockGenus\n //initialLabel = items.get(i + 1);\n \n i += 2;\n \n continue;\n }\n \n if(item.equals(\"initial-command\"))\n {\n //don't care about initial command\n //stored in block genus\n //initialCommand = items.get(i + 1);\n \n i += 2;\n \n continue;\n }\n \n // skip the next if we haven't found anything we know\n i += 2;\n }\n \n assert(name != null);\n assert(genus != null);\n assert(id.longValue() >= 0l);\n \n \n speciesMap.put(id+name, new SpeciesData(name, plugKind, socketKinds, socketLabels));\n \n if(DEBUG)\n \tSystem.out.println(\"Loaded species: \"+id+\": \"+speciesMap.get(id+name));\n }", "@Test\r\n public void testGetAtoms() {\r\n List<CMLAtom> atoms = spectator.getAtoms();\r\n Assert.assertEquals(\"atoms\", 2, atoms.size());\r\n\r\n }", "public Map<String,Object> getCharacteristics(String[] names) throws DataExchangeException;", "public void testGetName() throws Exception {\n System.out.println(\"getName\");\n Properties properties = new Properties();\n properties.put(OntologyConstants.ONTOLOGY_MANAGER_CLASS,\n \"com.rift.coad.rdf.semantic.ontology.jena.JenaOntologyManager\");\n File testFile = new File(\"./base.xml\");\n FileInputStream in = new FileInputStream(testFile);\n byte[] buffer = new byte[(int)testFile.length()];\n in.read(buffer);\n in.close();\n properties.put(OntologyConstants.ONTOLOGY_CONTENTS, new String(buffer));\n JenaOntologyManager instance =\n (JenaOntologyManager)OntologyManagerFactory.init(properties);\n\n String expResult = \"JenaOntologyManager\";\n String result = instance.getName();\n assertEquals(expResult, result);\n \n JenaOntologyManager instance2 =\n (JenaOntologyManager)OntologyManagerFactory.init(properties);\n assertEquals(instance2, instance);\n }" ]
[ "0.68605864", "0.6357526", "0.5657252", "0.54741305", "0.5381409", "0.5248583", "0.52403605", "0.5146157", "0.5128191", "0.5118019", "0.5100302", "0.5083698", "0.5057237", "0.5030999", "0.50154465", "0.49952564", "0.4981946", "0.49795023", "0.49383095", "0.49383095", "0.4931796", "0.4929864", "0.49132785", "0.49127263", "0.48841155", "0.4870523", "0.48260307", "0.47949702", "0.47949058", "0.47886717", "0.47802556", "0.4778582", "0.4777108", "0.4766664", "0.4759321", "0.47393927", "0.47343898", "0.4720276", "0.47046915", "0.47024113", "0.46926704", "0.4689687", "0.4663975", "0.46633965", "0.4659918", "0.46568483", "0.4656054", "0.4651906", "0.465027", "0.4648514", "0.4644764", "0.46422473", "0.46346065", "0.46294987", "0.46286675", "0.4625896", "0.46193805", "0.46098602", "0.46081823", "0.46065602", "0.46009076", "0.4587248", "0.45856747", "0.4584795", "0.45839843", "0.45825073", "0.45753306", "0.45606488", "0.45606488", "0.45606488", "0.45606488", "0.45606488", "0.45606488", "0.45606488", "0.45606488", "0.45606488", "0.45606488", "0.45606488", "0.45606488", "0.45606488", "0.45606488", "0.45606488", "0.45606488", "0.45606488", "0.45606488", "0.45606488", "0.45606488", "0.45606488", "0.45606488", "0.45606488", "0.45578063", "0.4556401", "0.45563367", "0.45552388", "0.4551543", "0.45467466", "0.4545779", "0.4544927", "0.45400357", "0.4525422" ]
0.7984714
0
/ Test of FillersAssociated method, of class KnowledgeSystemBeanRemoteInterface.
@Test public void testFillersAssociated() { System.out.println("FillersAssociated - metalName = ''"); String metalName = ""; List<String> result = KnowledgeSystemBeanInterface.FillersAssociated(metalName); ArrayList<String> results = new ArrayList<String>(); assertEquals(result, results); System.out.println("testFillersAssociated ---------------------------------------------------- Done"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void fillFormBean(IBookFormBean formBean);", "@Test\r\n public void testCheckFillerName() {\r\n System.out.println(\"checkFillerName - have record\");\r\n String id = \"Filler A\";\r\n boolean result = KnowledgeSystemBeanInterface.checkFillerName(id);\r\n assertTrue(result);\r\n System.out.println(\"testCheckFillerName ---------------------------------------------------- Done\");\r\n // TODO review the generated test code and remove the default call to fail.\r\n }", "public void fillMachine() throws InvalidValueException{\n TypeConverter converter = new TypeConverter();\n // TODO: 19-Oct-16 make factory\n if (this.coffeeMachine.getIngredientSet().isEmpty()) {\n initIngredientSet();\n }\n int chosenFiller = converter.getInt(\"Input number\");\n switch (chosenFiller){\n case 1:\n fillCoffee();\n break;\n case 2:\n fillSugar();\n break;\n case 3:\n fillMilk();\n break;\n case 4:\n fillCoffee();\n fillSugar();\n fillMilk();\n }\n\n System.out.println(\"CoffeeMachine was refilled.\");\n }", "public void fill(Object requestor);", "public void populate() {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tLOGGER.info(\"Entering into populate method\");\n\t\t\tsetZoneIdpk(null);\n\t\t\tsetZoneDescPk(null);\n\t\t\tsetZoneDescLocalPk(null);\n\t\t\tsetZoneDescription(null);\n\t\t\tsetZoneDescriptionLocal(null);\n\t\t\tzones = zoneMasterService.getZoneList(getZoneCode());\n\t\t\tif (zones.size() > 0) {\n\t\t\t\tif (zones.get(0).getIsactive().equalsIgnoreCase(Constants.Yes)) {\n\t\t\t\t\tsetDynamicLabelForActivateDeactivate(Constants.DEACTIVATE);\n\t\t\t\t\tsetRenderEditButton(true);\n\n\t\t\t\t} else if (zones.get(0).getIsactive().equalsIgnoreCase(Constants.D)) {\n\t\t\t\t\tsetDynamicLabelForActivateDeactivate(Constants.ACTIVATE);\n\t\t\t\t\tsetRenderEditButton(true);\n\n\t\t\t\t} else if (zones.get(0).getIsactive().equalsIgnoreCase(Constants.U)) {\n\t\t\t\t\tsetDynamicLabelForActivateDeactivate(Constants.DELETE);\n\t\t\t\t\tsetRenderEditButton(true);\n\n\t\t\t\t}\n\t\t\t\tsetCreatedBy(zones.get(0).getCreatedBy());\n\t\t\t\tsetCreatedDate(zones.get(0).getCreatedDate());\n\t\t\t\tsetZoneIdpk(zones.get(0).getZoneId());\n\t\t\t\tsetIsActive(zones.get(0).getIsactive());\n\t\t\t\tzoneDescriptionList = zoneMasterService.getZoneDescriptionList(zones.get(0).getZoneId());\n\t\t\t\tfor (ZoneMasterDesc zoneMasterDesc : zoneDescriptionList) {\n\t\t\t\t\tif (zoneMasterDesc.getLanguageType().getLanguageId().toString().equals(Constants.ENGLISH_LANGUAGE_ID)) {\n\t\t\t\t\t\tsetZoneDescPk(zoneMasterDesc.getZoneDescId());\n\t\t\t\t\t\tsetZoneDescription(zoneMasterDesc.getZoneDescription());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsetZoneDescLocalPk(zoneMasterDesc.getZoneDescId());\n\t\t\t\t\t\tsetZoneDescriptionLocal(zoneMasterDesc.getZoneDescription());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tLOGGER.info(\"Exit into populate method\");\n\t\t\t\n\t\t} catch(NullPointerException ne){\n\t\tLOGGER.info(\"ne.getMessage():::::::::::::::::::::::::::::::\"+ne.getMessage());\n\t\t setErrorMessage(\"Method Name::populate\"); \n\t\t RequestContext.getCurrentInstance().execute(\"nullPointerId.show();\");\n\t\t return; \n}catch(Exception exception){\n LOGGER.info(\"exception.getMessage():::::::::::::::::::::::::::::::\"+exception.getMessage());\n setErrorMessage(exception.getMessage()); \n RequestContext.getCurrentInstance().execute(\"error.show();\");\n return; \n}\n\t\t\n\t}", "@Test(dataProvider = \"populateTestDataProvider\")\n public void testPopulate(Boolean isToOverrideMetaData) {\n List<MetaStb> list = new ArrayList<MetaStb>();\n MetaStb stb1 = new MetaStb();\n stb1.setId(\"id1\");\n MetaStb stb2 = new MetaStb();\n stb2.setId(\"id2\");\n list.add(stb1);\n list.add(stb2);\n\n String token = \"4cb2e04d-5fed-4f52-83e7-c05f29acb432\";\n HouseRestController controller = new HouseRestController();\n ReflectionTestUtils.setField(controller, \"serverUtils\", utils);\n\n PopulatingClient client = EasyMock.createMock(PopulatingClient.class);\n\n try {\n EasyMock.expect(client.populate((String) EasyMock.anyObject())).andReturn(list).anyTimes();\n } catch (Exception e) {\n Assert.fail(e.getMessage());\n }\n\n MockHouseService mockService = new MockHouseService();\n EasyMock.replay(client);\n ReflectionTestUtils.setField(controller, \"service\", mockService);\n ReflectionTestUtils.setField(controller, \"client\", client);\n\n Assert.assertEquals(controller.populate(token, isToOverrideMetaData), 2);\n Assert.assertNotNull(mockService.getById(\"id1\"));\n Assert.assertNotNull(mockService.getById(\"id2\"));\n Assert.assertNull(mockService.getById(\"id3\"));\n }", "public void initRMIBindings() {\n\tString name = null;\n\ttry {\n Configuration configuration=proxy.getConfiguration();\n if (configuration.accessLogViaRMI) {\n SipStack sipStack=proxy.getSipStack();\n Iterator it =sipStack.getListeningPoints();\n ListeningPoint lp = (ListeningPoint) it.next();\n String stackIPAddress = sipStack.getIPAddress();\n name = \"//\" + stackIPAddress + \":\" + 0 + \"/\" +\n sipStack.getStackName()\n + \"/\" + \"test.jainproxy.Registrar\";\n if (ProxyDebug.debug) {\n ProxyDebug.println(\"Exporting Registration Table \" + name);\n }\n Naming.rebind(name,this);\n }\n else {\n if (ProxyDebug.debug)\n ProxyDebug.println\n (\"We don't export the registrations because RMI is disabled.\");\n }\n } \n catch (Exception ex) {\n if (ProxyDebug.debug) {\n ProxyDebug.println\n (\"Problem trying to export the Registration Table: \" + name);\n }\n\t ex.printStackTrace();\n\t}\n }", "@Test\r\n public void testCheckFillerID() {\r\n System.out.println(\"checkFillerID - Have existing record\");\r\n String id = \"Filler A\";\r\n boolean result = KnowledgeSystemBeanInterface.checkFillerID(id);\r\n assertTrue(result);\r\n System.out.println(\"testCheckFillerID ---------------------------------------------------- Done\");\r\n // TODO review the generated test code and remove the default call to fail.\r\n\r\n }", "private void setData() {\n populateInterfaceElements();\n }", "@Override\n\tpublic void fillData() {\n\t}", "@Test\n void fillBeans() {\n machine.setCurrentBeans(0);\n Assertions.assertEquals(machine.getCurrentBeans(), 0);\n\n //ensure, water fills up to maximum\n machine.fillBeans();\n Assertions.assertEquals(machine.maxBeans, machine.getCurrentBeans());\n }", "public void fillIn(Context context, Iterator<IReferable> _actualParams);", "@Remote\r\npublic interface EcheanceReglementManagerRemote\r\n extends EcheanceReglementManager\r\n{\r\n\r\n\r\n}", "private void callFormDetailFunctions() {\n ArrayList<Item> items = new ArrayList<>();\n items.addAll(computers);\n items.addAll(printers);\n getBuildingNames(items);\n getBrandNames(items);\n getOSNames(computers);\n setAdapters();\n }", "public void testRegisterBeanMulti() throws Exception\n {\n checkBeanRegistration(MULTI_BEANREG_BUILDER, \"Expansion\", \"Action\",\n \"Focus\");\n }", "@Test\n\tpublic void testSettersAddress() {\n\t\tassertTrue(beanTester.testSetters());\n\t}", "@Test\n\tpublic void canFillAllInformation() {\n\t\t\n\t\tuserData John = People.getJohnInfo();\n\t\tboolean expected = true;\n\t\tboolean actual = new AutomationPracticeFormPageObject(driver, baseUrl)\n\t\t.openAutomationWebPage()\n\t\t.inputFirstName(John.getFirstName())\n\t\t.inputLastName(John.getLastName())\n\t\t.selectGender(John.getGender())\n\t\t.selectYearsOfExperience(John.getYearsOfExperience())\n\t\t.inputDate(John.getDate().toString())\n\t\t.selectProfession(John.getProfession())\n\t\t.selectAutomationTool(John.getAutomationTool())\n\t\t.selectContinent(John.getContinent())\n\t\t.selectMultipleContinents(John.getContinentList())\n\t\t.selectSeleniumCommand(John.getSeleniumCommands())\n\t\t.areFieldsCompleted();\n\t\t\n\t\tAssert.assertEquals(actual, expected);\n\t}", "private void fillComboBox(ServiceManager serviceManager){\n for (String vendingMachineName : serviceManager.getVmManager().getVendingMachineNames()) {\n getItems().add(vendingMachineName); \n }\n }", "public interface DataReference extends java.rmi.Remote{\n\n // <editor-fold defaultstate=\"collapsed\" desc=\" UML Marker \">\n // #[regen=yes,regenBody=yes,id=DCE.4BCCE1AB-78B5-AA3C-932B-883E5D1775B5]\n // </editor-fold>\n /**\n * Getter for the CreationDate attribute.\n * @return Date\n * @throws java.rmi.RemoteException\n */\n Date getCreationDate()\n throws RemoteException;\n\n // <editor-fold defaultstate=\"collapsed\" desc=\" UML Marker \">\n // #[regen=yes,regenBody=yes,id=DCE.FCABA384-0469-0962-060E-28BE0D0E7C82]\n // </editor-fold>\n /**\n * Getter for the ID attribute.\n * @return int\n * @throws java.rmi.RemoteException\n */\n int getID()\n throws RemoteException;\n\n // <editor-fold defaultstate=\"collapsed\" desc=\" UML Marker \">\n // #[regen=yes,regenBody=yes,id=DCE.86FD70C6-270D-42C5-EFB5-AB6602CF95B1]\n // </editor-fold>\n /**\n * Setter for the CreationDate attribute.\n * @param val\n * @throws java.rmi.RemoteException\n */\n void setCreationDate(Date val)\n throws RemoteException;\n\n // <editor-fold defaultstate=\"collapsed\" desc=\" UML Marker \">\n // #[regen=yes,regenBody=yes,id=DCE.FDCE10AB-E236-B3C7-2407-6A09EA4717F4]\n // </editor-fold>\n /**\n * Setter for the ID attribute.\n * @param val\n * @throws java.rmi.RemoteException\n */\n void setID(int val)\n throws RemoteException;\n \n}", "private void fillData()\n {\n\n }", "protected abstract boolean populateAttributes();", "public void testRegisterBeanMixed() throws Exception\n {\n checkBeanRegistration(MIXED_BEANREG_BUILDER, \"Action\");\n checkFormEventRegistration(\"textBeanReg -> ACTION\");\n }", "@Override\n\t\tpublic void refreshBeanElement() {\n\n\t\t}", "public void refreshCopyHelper() throws java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException {\n refreshCopyHelper(ejbRef());\n }", "public void refreshCopyHelper() throws java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException {\n refreshCopyHelper(ejbRef());\n }", "public void refreshCopyHelper() throws java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException {\n refreshCopyHelper(ejbRef());\n }", "public void refreshCopyHelper() throws java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException {\n refreshCopyHelper(ejbRef());\n }", "public void refreshCopyHelper() throws java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException {\n refreshCopyHelper(ejbRef());\n }", "@Test\r\n public void testTambahSupplierBenar() throws RemoteException, NotBoundException{\n f = new Form_Data_Supplier_Tambah();\r\n Supplier sup = new Supplier();\r\n sup.setNama_Supplier(\"Merry\");\r\n sup.setAlamat_Supplier(\"Jalan lalala\");\r\n sup.setJenis_pajak_Supplier(\"jenispajak\");\r\n sup.setKode_Pajak_Supplier(\"018298128\");\r\n sup.setKota_Supplier(\"surabaya\");\r\n sup.setNPWP_Supplier(\"17987\");\r\n sup.setTelepon_Supplier(\"08129127676\");\r\n f.setNama(sup.getNama_Supplier()); \r\n f.setAlamat(sup.getAlamat_Supplier());\r\n f.setJenisPajak(sup.getJenis_pajak_Supplier());\r\n f.setKodePajak(sup.getKode_Pajak_Supplier());\r\n f.setNPWP(sup.getNPWP_Supplier());\r\n f.setKota(sup.getKota_Supplier());\r\n f.setTelp(sup.getTelepon_Supplier());\r\n boolean output = f.TambahSupplier();\r\n boolean target = true;\r\n assertEquals(target, output);\r\n Supplier s = ss.getLastSupplier();\r\n assertEquals(s.getNama_Supplier(), sup.getNama_Supplier());\r\n assertEquals(s.getAlamat_Supplier(), sup.getAlamat_Supplier());\r\n assertEquals(s.getJenis_pajak_Supplier(), sup.getJenis_pajak_Supplier());\r\n assertEquals(s.getKode_Pajak_Supplier(), sup.getKode_Pajak_Supplier());\r\n assertEquals(s.getKota_Supplier(), sup.getKota_Supplier());\r\n assertEquals(s.getNPWP_Supplier(), sup.getNPWP_Supplier());\r\n assertEquals(s.getTelepon_Supplier(), sup.getTelepon_Supplier());\r\n }", "@Before\n public void setUp(){\n Cic.populate();\n }", "public void populateList() {\n }", "@Override\n\tprotected void setup() {\n\t\tDFAgentDescription dfd = new DFAgentDescription();\n\t\tdfd.setName(getAID());\n\t\tServiceDescription sd = new ServiceDescription();\n\t\tsd.setType(\"supplier\");\n\t\tsd.setName(getLocalName() + \"-supplier-agent\");\n\t\tdfd.addServices(sd);\n\t\ttry{\n\t\t\tDFService.register(this, dfd);\n\t\t}\n\t\tcatch(FIPAException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\tgetContentManager().registerLanguage(codec);\n\t\tgetContentManager().registerOntology(ontology);\n\t\targs = (String[])this.getArguments();\n\n\t\tbuyerAID = new AID(\"manufacturer\",AID.ISLOCALNAME);\n\n\t\tif(args[0] == \"zero\") {\n\t\t\tScreen screen = new Screen();\n\t\t\tscreen.setInch(\"5inch\");\n\t\t\tscreen.setSerialNumber(101);\n\t\t\tcomponents.add(screen.getSerialNumber());\n\t\t\tBattery battery = new Battery();\n\t\t\tbattery.setSerialNumber(201);\n\t\t\tbattery.setCapacity(\"2000mAh\");\n\n\t\t\tcomponents.add(battery.getSerialNumber());\n\n\t\t\tRAM ram = new RAM();\n\t\t\tram.setSerialNumber(301);\n\t\t\tram.setAmmount(\"4Gb\");\n\t\t\tcomponents.add(ram.getSerialNumber());\n\n\t\t\tStorage storage = new Storage();\n\t\t\tstorage.setSpace(\"64GB\");\n\t\t\tstorage.setSerialNumber(401);\n\t\t\tcomponents.add(storage.getSerialNumber());\n\n\t\t\tScreen screen2 = new Screen();\n\t\t\tscreen2.setInch(\"7inch\");\n\t\t\tscreen2.setSerialNumber(102);\n\t\t\tcomponents.add(screen2.getSerialNumber());\n\n\t\t\tBattery battery2 = new Battery();\n\t\t\tbattery2.setCapacity(\"3000mAh\");\n\t\t\tbattery2.setSerialNumber(202);\n\t\t\tcomponents.add(battery2.getSerialNumber());\n\n\t\t\tRAM ram2 = new RAM();\n\t\t\tram2.setAmmount(\"8Gb\");\n\t\t\tram2.setSerialNumber(302);\n\t\t\tcomponents.add(ram2.getSerialNumber());\n\n\t\t\tStorage storage2 = new Storage();\n\t\t\tstorage2.setSpace(\"256GB\");\n\t\t\tstorage2.setSerialNumber(402);\n\t\t\tcomponents.add(storage2.getSerialNumber());\n\t\t}else {\n\n\t\t\tRAM ram = new RAM();\n\t\t\tram.setAmmount(\"4Gb\");\n\t\t\tram.setSerialNumber(301);\n\t\t\tcomponents.add(ram.getSerialNumber());\n\n\t\t\tStorage storage = new Storage();\n\t\t\tstorage.setSpace(\"64GB\");\n\t\t\tstorage.setSerialNumber(401);\n\t\t\tcomponents.add(storage.getSerialNumber());\n\n\t\t\tRAM ram2 = new RAM();\n\t\t\tram2.setAmmount(\"8Gb\");\n\t\t\tram2.setSerialNumber(302);\n\t\t\tcomponents.add(ram2.getSerialNumber());\n\n\t\t\tStorage storage2 = new Storage();\n\t\t\tstorage2.setSpace(\"256GB\");\n\t\t\tstorage2.setSerialNumber(402);\n\t\t\tcomponents.add(storage2.getSerialNumber());\n\n\t\t}\n\n\t\t/*\n\t\tif(args[0] == \"1\") {\n\t\t\tScreen screen = new Screen();\n\t\t\tscreen.setInch(\"5inch\");\n\t\t\tcomponents.put(screen.getSerialNumber(),screen);\n\n\t\t\tBattery battery = new Battery();\n\t\t\tbattery.setCapacity(\"2000mAh\");\n\t\t\tcomponents.put(battery.getSerialNumber(),battery);\n\n\t\t\tRAM ram = new RAM();\n\t\t\tram.setAmmount(\"4Gb\");\n\t\t\tcomponents.put(ram.getSerialNumber(),ram);\n\n\t\t\tStorage storage = new Storage();\n\t\t\tstorage.setSpace(\"64GB\");\n\t\t\tcomponents.put(storage.getSerialNumber(),storage);\n\n\t\t\tScreen screen2 = new Screen();\n\t\t\tscreen2.setInch(\"7inch\");\n\t\t\tcomponents.put(screen2.getSerialNumber(),screen2);\n\n\t\t\tBattery battery2 = new Battery();\n\t\t\tbattery2.setCapacity(\"3000mAh\");\n\t\t\tcomponents.put(battery2.getSerialNumber(),battery2);\n\n\t\t\tRAM ram2 = new RAM();\n\t\t\tram2.setAmmount(\"8Gb\");\n\t\t\tcomponents.put(ram2.getSerialNumber(),ram2);\n\n\t\t\tStorage storage2 = new Storage();\n\t\t\tstorage2.setSpace(\"256GB\");\n\t\t\tcomponents.put(storage2.getSerialNumber(),storage2);\n\t\t}else {\n\n\t\t\tRAM ram = new RAM();\n\t\t\tram.setAmmount(\"4Gb\");\n\t\t\tcomponents.put(ram.getSerialNumber(),ram);\n\n\t\t\tStorage storage = new Storage();\n\t\t\tstorage.setSpace(\"64GB\");\n\t\t\tcomponents.put(storage.getSerialNumber(),storage);\n\n\t\t\tRAM ram2 = new RAM();\n\t\t\tram2.setAmmount(\"8Gb\");\n\t\t\tcomponents.put(ram2.getSerialNumber(),ram2);\n\n\t\t\tStorage storage2 = new Storage();\n\t\t\tstorage2.setSpace(\"256GB\");\n\t\t\tcomponents.put(storage2.getSerialNumber(),storage2);\n\n\t\t}\n\n\t\t */\n\n\n\t\taddBehaviour(new TickerWaiter(this));\n\t}", "@Test\r\n public void testMetalNames() {\r\n System.out.println(\"metalNames - Metal has records\");\r\n List<String> result = KnowledgeSystemBeanInterface.metalNames();\r\n assertEquals(result.size(), 15);\r\n System.out.println(\"testMetalNames ---------------------------------------------------- Done\");\r\n // TODO review the generated test code and remove the default call to fail.\r\n }", "private void populateAvailableProviders() {\n allAvailableProviders = new HashSet<Provider>();\n\n DataType dataType = DataType.valueOfIgnoreCase(this.dataType);\n try {\n for (Provider provider : DataDeliveryHandlers.getProviderHandler()\n .getAll()) {\n\n ProviderType providerType = provider.getProviderType(dataType);\n if (providerType != null) {\n allAvailableProviders.add(provider);\n }\n }\n } catch (RegistryHandlerException e) {\n statusHandler.handle(Priority.PROBLEM,\n \"Unable to retrieve the list of providers.\", e);\n }\n }", "private void initializeHelpersAndDatasourceCheck()\n\t\tthrows OfbizDataException {\n\t\tGenericDelegator delegator =\n\t\t\tGenericDelegator.getGenericDelegator(delegatorName);\n\t\tif (delegator == null) {\n\t\t\tLOG.warn(\"Null delegator in initializeHelpersAndDatasourceCheck().\");\n\t\t\treturn;\n\t\t}\n\t\t// initialize helpers by group\n\t\tIterator<?> groups =\n\t\t\tUtilMisc.toIterator(delegator.getModelGroupReader().getGroupNames());\n\n\t\twhile (groups != null &&\n\t\t\tgroups.hasNext()) {\n\t\t\tString groupName = (String)groups.next();\n\t\t\tString helperName = delegator.getGroupHelperName(groupName);\n if(LOG.isDebugEnabled()) {\n LOG.debug(String.format(\"Delegator %s initializing helper %s \" +\n \"for entity group %s \",\n delegator.getDelegatorName(),\n helperName,\n groupName));\n }\n\t\t\tTreeSet<String> helpersDone = new TreeSet<String>();\n\n\t\t\tif (helperName != null &&\n\t\t\t\thelperName.length() > 0) {\n\t\t\t\t// make sure each helper is only loaded once\n\t\t\t\tif (helpersDone.contains(helperName)) {\n if(LOG.isDebugEnabled()) {\n\t\t\t\t\t LOG.debug(String.format(\"Helper %s already initialized,\" +\n\t\t\t\t\t\t \" not re-initializing.\",\n helperName));\n }\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\thelpersDone.add(helperName);\n\t\t\t\t// pre-load field type defs, the return value is ignored\n\t\t\t\tModelFieldTypeReader.getModelFieldTypeReader(helperName);\n\t\t\t\t// get the helper and if configured, do the datasource check\n\t\t\t\tGenericHelper helper =\n\t\t\t\t\tGenericHelperFactory.getHelper(helperName);\n\n\t\t\t\ttry {\n\t\t\t\t\thelper.checkDataSource(delegator\n\t\t\t\t\t\t.getModelEntityMapByGroup(groupName), null, true);\n\t\t\t\t} catch (GenericEntityException e) {\n\t\t\t\t\tLOG.warn(e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "void populateData();", "public interface FunctionalSignificanceTypeRemoteBusiness {\n int getFstid() throws java.rmi.RemoteException;\n\n String getName() throws java.rmi.RemoteException;\n\n void setName(java.lang.String name) throws java.rmi.RemoteException;\n\n String getComm() throws java.rmi.RemoteException;\n\n void setComm(java.lang.String comm) throws java.rmi.RemoteException;\n\n java.sql.Date getTs() throws java.rmi.RemoteException;\n\n UserRemote getUser() throws java.rmi.RemoteException;\n\n ProjectRemote getProject() throws java.rmi.RemoteException;\n\n Collection getFunctionalSignificances() throws ApplicationException, java.rmi.RemoteException;\n\n /**\n * Sets the caller for the functional significance\n * @param caller The caller\n */\n void setCaller(com.arexis.mugen.MugenCaller caller) throws java.rmi.RemoteException;\n \n}", "public void initExpTypeBeanForExistingExperiment(){\r\n \t\r\n }", "public static void populateData() {\n\n }", "public abstract void setUpElementsWithData();", "private void initERF_GuiBean() {\n // create the ERF Gui Bean object\n ArrayList erf_Classes = new ArrayList();\n erf_Classes.add(FRANKEL2000_ADJ_FORECAST_CLASS_NAME);\n erf_Classes.add(FRANKEL_ADJ_FORECAST_CLASS_NAME);\n erf_Classes.add(STEP_FORECAST_CLASS_NAME);\n erf_Classes.add(WG02_ERF_LIST_CLASS_NAME);\n erf_Classes.add(STEP_ALASKA_ERF_CLASS_NAME);\n erf_Classes.add(POISSON_FAULT_ERF_CLASS_NAME);\n erf_Classes.add(PEER_AREA_FORECAST_CLASS_NAME);\n erf_Classes.add(PEER_NON_PLANAR_FAULT_FORECAST_CLASS_NAME);\n erf_Classes.add(PEER_MULTI_SOURCE_FORECAST_CLASS_NAME);\n erf_Classes.add(PEER_LOGIC_TREE_FORECAST_CLASS_NAME);\n\n try{\n if(erfGuiBean == null)\n erfGuiBean = new ERF_GuiBean(erf_Classes);\n }catch(InvocationTargetException e){\n throw new RuntimeException(\"Connection to ERF's failed\");\n }\n erfPanel.setLayout(gridBagLayout5);\n erfPanel.removeAll();\n erfPanel.add(erfGuiBean, new GridBagConstraints( 0, 0, 1, 1, 1.0, 1.0,\n GridBagConstraints.CENTER,GridBagConstraints.BOTH, defaultInsets, 0, 0 ));\n erfPanel.validate();\n erfPanel.repaint();\n }", "@Test\n\tpublic void testGettersAndSetters() {\n\t\tnew BeanTester().testBean(LeastCommonNodeInput.class, configuration);\n\n\t}", "private void initERFSelector_GuiBean() {\n // create the ERF Gui Bean object\n ArrayList erf_Classes = new ArrayList();\n erf_Classes.add(FRANKEL_ADJ_FORECAST_CLASS_NAME);\n erf_Classes.add(FRANKEL2000_ADJ_FORECAST_CLASS_NAME);\n erf_Classes.add(STEP_FORECAST_CLASS_NAME);\n erf_Classes.add(WG02_FORECAST_CLASS_NAME);\n erf_Classes.add(POISSON_FAULT_ERF_CLASS_NAME);\n erf_Classes.add(PEER_AREA_FORECAST_CLASS_NAME);\n erf_Classes.add(PEER_NON_PLANAR_FAULT_FORECAST_CLASS_NAME);\n erf_Classes.add(PEER_MULTI_SOURCE_FORECAST_CLASS_NAME);\n erf_Classes.add(PEER_LOGIC_TREE_FORECAST_CLASS_NAME);\n\n try{\n if(erfRupSelectorGuiBean == null)\n erfRupSelectorGuiBean = new EqkRupSelectorGuiBean(erf_Classes);\n }catch(InvocationTargetException e){\n throw new RuntimeException(\"Connection to ERF's failed\");\n }\n\n erfPanel.removeAll();\n //erfGuiBean = null;\n erfPanel.add(erfRupSelectorGuiBean, new GridBagConstraints( 0, 0, 1, 1, 1.0, 1.0,\n GridBagConstraints.CENTER,GridBagConstraints.BOTH, defaultInsets, 0, 0 ));\n erfRupSelectorGuiBean.getParameter(ERF_GuiBean.ERF_PARAM_NAME).addParameterChangeListener(this);\n erfPanel.validate();\n erfPanel.repaint();\n }", "@Test\r\n public void testLoadReglement() {\r\n System.out.println(\"loadReglement\");\r\n chequeBeans instance = new chequeBeans();\r\n instance.loadReglement();\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n void fillContainerTest() {\n Container container = new Container();\n container.fillContainer(Resource.SHIELD);\n assertEquals(Resource.SHIELD,container.takeResource());\n }", "public void elSetValue(Object bean, Object value, boolean populate, boolean reference);", "private void remplirFabricantData() {\n\t}", "public void setupConvenienceObjects();", "com.hps.july.persistence.Worker getTechStuff() throws java.rmi.RemoteException, javax.ejb.FinderException;", "@Test(description = \"update interface with all relationships for existing interface with one relationship\")\n public void updateAllRelationships4ExistingRelationship()\n throws Exception\n {\n final DataCollection data = new DataCollection(this);\n final RelationshipData rel = data.getRelationship(\"TestType\");\n final InterfaceData inter = data.getInterface(\"TestInterface\").addRelationship(rel);\n data.create();\n\n inter.addAllRelationships();\n this.update(inter);\n\n Assert.assertEquals(this.mql(\"print interface '\" + inter.getName() + \"' select relationship dump\"),\n \"all\",\n \"check that only all relationship is defined\");\n }", "@Override\n\tpublic void setup() {\n\t\tfor (Communication communication: listCommunication) {\n\t\t\tcommunication.setup();\n\t\t}\n\t}", "private void initialiseAll() {\n // now that all the BeanDescriptors are in their map\n // we can initialise them which sorts out circular\n // dependencies for OneToMany and ManyToOne etc\n BeanDescriptorInitContext initContext = new BeanDescriptorInitContext(asOfTableMap, draftTableMap, asOfViewSuffix);\n\n // PASS 1:\n // initialise the ID properties of all the beans\n // first (as they are needed to initialise the\n // associated properties in the second pass).\n for (BeanDescriptor<?> d : descMap.values()) {\n d.initialiseId(initContext);\n }\n\n // PASS 2:\n // now initialise all the inherit info\n for (BeanDescriptor<?> d : descMap.values()) {\n d.initInheritInfo();\n }\n\n // PASS 3:\n // now initialise all the associated properties\n for (BeanDescriptor<?> d : descMap.values()) {\n // also look for intersection tables with\n // associated history support and register them\n // into the asOfTableMap\n d.initialiseOther(initContext);\n }\n\n // PASS 4:\n // now initialise document mapping which needs target descriptors\n for (BeanDescriptor<?> d : descMap.values()) {\n d.initialiseDocMapping();\n }\n\n // create BeanManager for each non-embedded entity bean\n for (BeanDescriptor<?> d : descMap.values()) {\n d.initLast();\n if (!d.isEmbedded()) {\n beanManagerMap.put(d.fullName(), beanManagerFactory.create(d));\n checkForValidEmbeddedId(d);\n }\n }\n }", "public void fillCardInventoryDetail() throws UserManagementException {\n \n CardInventoryDataBean cardInventory = cardInventoryTransformerBean.retrieveCardInventoryDetail(id);\n cardInventoryDataBean.setId(cardInventory.getId());\n cardInventoryDataBean.setAssigneUserId(cardInventory.getAssigneUserId());\n cardInventoryDataBean.setCardEnrollNo(cardInventory.getCardEnrollNo());\n cardInventoryDataBean.setCardId(cardInventory.getCardId());\n cardInventoryDataBean.setName(cardInventory.getName());\n cardInventoryDataBean.setReason(cardInventory.getReason());\n cardInventoryDataBean.setVendor(cardInventory.getVendor());\n cardInventoryDataBean.setTempCardEnrollNo(id);\n\n }", "private void fillCombos() {\r\n\t\tthis.combos = new LinkedHashMap<String, Boolean>();\r\n\t\t\r\n\t\tfor(int i = 0; i < this.comboNames.length; i++) {\r\n\t\t\tthis.combos.put(this.comboNames[i], true);\r\n\t\t}\r\n\t}", "protected abstract void initHardwareCriteria();", "private void fillTeachers() {\n for(Teacher t : MainFrame.etablissement.getTeachers()) {\n principalTeacher.addItem(t);\n }\n }", "void mo749s() throws RemoteException;", "public abstract void populatePeripheralMethods(@Nonnull final List<ComputerMethod> methods);", "@Before\n public void setUp()\n {\n clientIn1 = new ClientInformation();\n clientIn1.setReaderToArray();\n clientIn1.printClientList();\n clientIn1.setAlphabetically();\n }", "@Test(description = \"update interface with special characters\")\n public void updateWithSpecialCharacters()\n throws Exception\n {\n final DataCollection data = new DataCollection(this);\n final InterfaceData parent1 = data.getInterface(\"TestInterfaceParent \\\" 1\");\n final InterfaceData parent2 = data.getInterface(\"TestInterfaceParent \\\" 2\");\n final AttributeStringData attr1 = data.getAttributeString(\"Attribute \\\" 1\");\n final AttributeStringData attr2 = data.getAttributeString(\"Attribute \\\" 2\");\n final TypeData type1 = data.getType(\"TestType \\\" 1\");\n final TypeData type2 = data.getType(\"TestType \\\" 2\");\n final RelationshipData rel1 = data.getRelationship(\"TestRel \\\" 1\");\n final RelationshipData rel2 = data.getRelationship(\"TestRel \\\" 2\");\n data.create();\n\n final InterfaceData inter = data.getInterface(\"TestInterface \\\"\")\n .addParent(parent1)\n .addParent(parent2)\n .addAttribute(attr1)\n .addAttribute(attr2)\n .addType(type1)\n .addType(type2)\n .addRelationship(rel1)\n .addRelationship(rel2);\n this.update(inter);\n\n final Set<String> resultParent = new HashSet<String>();\n resultParent.add(parent1.getName());\n resultParent.add(parent2.getName());\n Assert.assertEquals(this.mqlAsSet(\"print interface '\" + inter.getName() + \"' select derived dump '\\n'\"),\n resultParent,\n \"check that all parent interfaces are defined\");\n\n final Set<String> resultAttrs = new HashSet<String>();\n resultAttrs.add(attr1.getName());\n resultAttrs.add(attr2.getName());\n Assert.assertEquals(this.mqlAsSet(\"escape print interface \\\"\"\n + AbstractTest.convertMql(inter.getName()) + \"\\\" select attribute dump '\\n'\"),\n resultAttrs,\n \"check that all types are defined\");\n\n final Set<String> resultTypes = new HashSet<String>();\n resultTypes.add(type1.getName());\n resultTypes.add(type2.getName());\n Assert.assertEquals(this.mqlAsSet(\"escape print interface \\\"\"\n + AbstractTest.convertMql(inter.getName()) + \"\\\" select type dump '\\n'\"),\n resultTypes,\n \"check that all types are defined\");\n\n final Set<String> resultRels = new HashSet<String>();\n resultRels.add(rel1.getName());\n resultRels.add(rel2.getName());\n Assert.assertEquals(this.mqlAsSet(\"escape print interface \\\"\"\n + AbstractTest.convertMql(inter.getName()) + \"\\\" select relationship dump '\\n'\"),\n resultRels,\n \"check that all relationships are defined\");\n }", "protected void thoroughInspection() {}", "abstract void initializeNeededData();", "@Override\n\tpublic void setUpScreenElements() {\n\t\t\n\t}", "@Remote\r\npublic interface AdministrarGestionarLocalesCentroComercialBORemote {\r\n\r\n /**\r\n * Metodo encargado de obtener los registros de LocalCentroComercial de la\r\n * base de datos\r\n *\r\n * @return Lista de LocalCentroComercial\r\n */\r\n public List<LocalCentroComercial> consultarLocalesCentroComercialRegistrados();\r\n\r\n /**\r\n * Metodo encargado de obtener los registros de LocalCentroComercial por\r\n * medio de parametros de busqueda\r\n *\r\n * @param filtros Parametros de busqueda\r\n * @return Lista de LocalCentroComercial\r\n */\r\n public List<LocalCentroComercial> consultarLocalesCentroComercialPorParametro(Map<String, String> filtros);\r\n\r\n /**\r\n * Metodo encargado de obtener un LocalCentroComercial por medio de su id\r\n *\r\n * @param idLocalCentroComercial Id del local\r\n * @return LocalCentroComercial identificado por el id dado\r\n */\r\n public LocalCentroComercial obtenerLocalCentroComercialPorID(BigInteger idLocalCentroComercial);\r\n\r\n /**\r\n * Metodo encargado de actualizar la informacion de un LocalCentroComercial\r\n *\r\n * @param localCentroComercial LocalCentroComercial a editar\r\n */\r\n public void actualizarInformacionLocalCentroComercial(LocalCentroComercial localCentroComercial);\r\n\r\n /**\r\n * Metodo encargado de registrar un LocalCentroComercial en la base de datos\r\n *\r\n * @param localCentroComercialNuevo LocalCentroComercial a registrar\r\n */\r\n public void almacenarNuevoLocalCentroComercialEnSistema(LocalCentroComercial localCentroComercialNuevo);\r\n\r\n /**\r\n * Metodo encargado de validar si el numero de local ya esta registradp\r\n *\r\n * @param numeroLocal Numero local\r\n * @return true -> no existe / false -> ya existe\r\n */\r\n public Boolean obtenerLocalPorNumeroLocal(String numeroLocal);\r\n}", "public final void mo27572a() {\n this.f19763c.f19791a.f19852n.f19828q = this.f19763c.m21468g();\n ArrayList<Client> arrayList = this.f19762b;\n int size = arrayList.size();\n int i = 0;\n while (i < size) {\n Object obj = arrayList.get(i);\n i++;\n ((Client) obj).getRemoteService(this.f19763c.f19805o, this.f19763c.f19791a.f19852n.f19828q);\n }\n }", "void mo13026b() throws RemoteException;", "@Test\n public void testAddEligibleSetters() {\n System.out.println(\"addEligibleSetters\");\n int[] IDs = new int[2];\n IDs[0] = 98;\n IDs[1] = 99;\n\n instance.addEligibleSetters(IDs);\n\n assertTrue(\"Setters not added to eligibility lists\", instance.isSetterEligible(98)\n && instance.isSetterEligible(99));\n // TODO review the generated test code and remove the default call to fail.\n // fail(\"The test case is a prototype.\");\n }", "private Set<BoardObject> populateBoard(){\r\n\t\tSet<BoardObject> ob = new HashSet<BoardObject>();\r\n\t\tob.addAll(createCharacters());\r\n\t\tob.addAll(createWeapons());\r\n\t\treturn ob;\r\n\t}", "@Before\n public void setUpTheObjects() {\n mh.setMessageDate(new Date());\n mr.setMessageHeader(mh);\n mr.getVaccinations().add(v);\n v.setAdministered(true);\n v.setAdminCvxCode(\"143\");\n }", "void mo748r() throws RemoteException;", "@Test\n\tpublic void testGettersAddress() {\n\t\tassertTrue(beanTester.testGetters());\n\t}", "public interface IRelationService<DependenciesBean, AssociationTreeBean> {\n\n /**\n * Method to obtain a list of dependencies.\n *\n * @param path the resource path.\n *\n * @return the list of dependencies.\n * @throws RegistryException if the operation failed.\n */\n DependenciesBean getDependencies(String path) throws RegistryException;\n\n /**\n * Method to add an association (or dependency).\n *\n * @param path the resource path.\n * @param type the type of association. If the type of association is 'depends' a\n * dependency will be created.\n * @param associationPaths the list of associations to be added.\n *\n * @throws RegistryException if the operation failed.\n */\n void addAssociation(String path, String type, String associationPaths,\n String operation) throws RegistryException;\n\n // TODO: FIXME: The operation parameter is not required. Get rid of that and fix the\n // addAssociation method on the BE service.\n\n /**\n * Method to obtain a list of associations.\n * \n * @param path the resource path.\n * @param type the type of association.\n *\n * @return the list of associations.\n * @throws RegistryException if the operation failed.\n */\n AssociationTreeBean getAssociationTree(String path, String type) throws RegistryException;\n}", "public static void tryFill(Object target, Map<String, Object> source) {\n\ttry {\n\t fill(target, source);\n\t} catch (IntrospectionException ie) {\n\t ie.printStackTrace();\n\t} catch (IllegalAccessException iae) {\n\t iae.printStackTrace();\n\t} catch (InvocationTargetException ite) {\n\t ite.printStackTrace();\n\t}\n }", "@Test\n void refillingContainerTest(){\n Container container = new Container();\n container.fillContainer(Resource.SHIELD);\n container.takeResource();\n container.fillContainer(Resource.COIN);\n assertEquals(Resource.COIN,container.takeResource());\n }", "public Result testGetBeanDescriptor() {\n try {\n if (!beanInfo.getBeanDescriptor().getBeanClass()\n .equals(Bean3.class)) {\n throw new LocationException(\"mistake BeanDescriptor\");\n }\n Bean1BeanInfo.verifyException();\n return passed();\n } catch (Exception e) {\n e.printStackTrace();\n return failed(e.getMessage());\n }\n\n }", "@Remote\r\npublic interface InscriptionChoiceDAORemote\r\n extends InscriptionChoiceDAO\r\n{\r\n\r\n\r\n}", "@Test\r\n public void testSetListCheque() {\r\n System.out.println(\"setListCheque\");\r\n List<Cheque> listCheque = null;\r\n chequeBeans instance = new chequeBeans();\r\n instance.setListCheque(listCheque);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "boolean fillElement(Object o, boolean preserveDerivedCells) \r\n\t{\r\n\t\tboolean setSome = false;\r\n\t\tboolean readOnlyExceptionEncountered = false;\r\n\t\tboolean nullValueExceptionEncountered = false;\r\n\t\t\r\n\t\tfor (Cell c : cells()) {\r\n\t\t if (c != null) {\r\n\t\t if (preserveDerivedCells && isDerived(c)) \r\n\t\t continue;\r\n\t\t else\r\n\t\t \tc.clearDerivation();\r\n\t\t \r\n\t\t try {\r\n\t\t if (((CellImpl)c).setCellValue(o, true, false))\r\n\t\t setSome = true;\r\n\t\t }\r\n\t\t catch (ReadOnlyException e) {\r\n\t\t readOnlyExceptionEncountered = true;\r\n\t\t }\r\n\t\t catch (NullValueException e) {\r\n\t\t nullValueExceptionEncountered = true;\r\n\t\t }\r\n\t\t }\t\t \t \r\n\t\t}\r\n\t\t\r\n\t\t// if we set any, ignore exceptions caused by attempting to set a read-only cell\r\n\t\t// or set a cell that can't hold nulls to null\r\n\t\tif (!setSome) {\r\n\t\t\tif (readOnlyExceptionEncountered)\r\n\t\t\t throw new ReadOnlyException(this, TableProperty.CellValue);\r\n\t\t\telse if (nullValueExceptionEncountered)\r\n\t\t\t throw new NullValueException(this, TableProperty.CellValue);\r\n\t\t}\r\n\t\t\r\n\t\treturn setSome;\r\n\t}", "@Override\n\tpublic void getAllFamilies() {\n\n\t}", "@Override\n protected void setup() {\n DFAgentDescription dfd = new DFAgentDescription();\n ServiceDescription sd = new ServiceDescription();\n sd.setType(\"ControladorAgent\");\n sd.setName(getName());\n sd.setOwnership(\"soonho\");\n dfd.setName(getAID());\n dfd.addServices(sd);\n try {\n DFService.register(this, dfd);\n ControladorBehaviour comportamento = new ControladorBehaviour(this);\n addBehaviour(comportamento);\n } catch (FIPAException e) {\n myLogger.log(Logger.SEVERE, \"Agent \" + getLocalName() + \" - Cannot register with DF\", e);\n doDelete();\n }\n }", "@Test\n\tpublic void populate_map() {\n\t\t//Arrange\n\t\t//testSteve.populateProductMap();\n\t\t\n\t\t//Act\n\t\ttestSteve.populateProductMap();\n\t\t\n\t\t//Assert\n\t\tAssert.assertEquals(testSteve.getProductGenerator().size(), (16));\n\t}", "@Before\n public void setup() {\n Helpers.fillData();\n }", "void setTechStuff(com.hps.july.persistence.Worker aTechStuff) throws java.rmi.RemoteException;", "@Test\n public void testAccessAndClone()\n {\n DefaultRemoteInvocationServiceDependencies deps1 =\n new DefaultRemoteInvocationServiceDependencies();\n System.out.println(deps1.toString());\n\n populate(deps1).validate();\n System.out.println(deps1.toString());\n\n DefaultRemoteInvocationServiceDependencies deps2 =\n new DefaultRemoteInvocationServiceDependencies(deps1);\n assertCloneEquals(deps1, deps2);\n deps2.validate();\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public void repeat() {\n\t\t// TODO: Implement\n\t\t//System.out.println(\"size remainingBeans: \" + remainingBeans.size());\n\t\t//System.out.println(\"getallbeans: \" + this.getSumOfSlotCount());\n\t\t//System.out.println(\"size of inflight: \" + inFlightBeans.size());\n\n\t\tfor (int i = 0; i < this.getSlotCount(); i++) {\n\t\t\tif (slotBean.isEmpty())\n\t\t\t\tbreak;\n\t\t\tfor(int k=0; k < slotBean.get(i).size(); k++)\n\t\t\t{\n\t\t\t\tif(slotBean.get(i).get(k) != null)\n\t\t\t\t\tthis.remainingBeans.add(slotBean.get(i).get(k));\n\t\t\t}\n\t\t\t//this.remainingBeans\n\t\t\t\t\t//.addAll(this.slotBean.get(i).stream().filter(x -> x != null).collect(Collectors.toList()));\n\t\t\tif(this.inFlightBeans.get(i) != null)\n\t\t\t\tthis.remainingBeans.add(this.inFlightBeans.get(i));\n\t\t}\n\t\tinFlightBeans.clear();\t\t\n\t\tthis.slotBean.clear();\n\t\tfor(int i=0; i < getSlotCount(); i++)\n\t\t{\n\t\t\tArrayList<Bean> e = new ArrayList<>();\n\t\t\tslotBean.add(e);\n\t\t\tinFlightBeans.add(null);\n\t\t}\n\t\tinsertBean();\n\t\tif(inFlightBeans.get(0) != null) inFlightBeans.get(0).reset();\n\t}", "public interface MiniPowerPCUIIfc {\n //TODO Initializing the Memory Tabel needs a separate methode\n \n /**\n * Sets the Text in the Textfield of the Akkumulator\n */\n public void setAkku(String inMemoryEntry);\n /**\n * Sets the Text in the Textfield of the Register1\n */\n public void setReg1(String inMemoryEntry);\n /**\n * Sets the Text in the Textfield of the Register2\n */\n public void setReg2(String inMemoryEntry);\n /**\n * Sets the Text in the Textfield of the Register3\n */\n public void setReg3(String inMemoryEntry);\n /**\n * Sets the Text in the Textfield of the Befehlszähler\n */\n public void setBefZ(String inMemoryEntry);\n \n /**\n * Sets the String in the Mnemonic-Column and the Value-Column in the Befehlsregister\n */\n public void setBefReg(String inMnemonic, String inValue);\n \n /**\n * Sets the String in the Mnemonic-Column and the Value-Column in the Befehlsregister\n */\n public void setMemoryEntries(MemoryEntry[] inMemory);\n \n \n /**\n * Sets the String in the Textfield of the \"Anzahl durchgeführter Befehle\"\n */\n public void setCountBef(String inMemoryEntry);\n \n /**\n * Sets the Text in the Textfield of the Befehlszähler\n */\n public void setCarryBit(String inMemoryEntry);\n\n /**\n * Returns True, if the Binary Exposition is selected. If Decimal Exposition\n * is selected the Method returns false.\n */\n public boolean isBinaryExpositionSelected();\n \n /**\n * Eventually there might be needed a Method to notify the GUI that the Simulation\n * is finished\n */\n //public void onSimulationFinished();\n}", "void fillPool(List<RocketInterface> rockets);", "@objid (\"ee775503-e151-4bb7-9921-40692858641e\")\n ICheckerFactory getModelShieldCheckers();", "public interface IBookManager extends IInterface {\n //DESCRIPTOR是一个标识来的,生成子类对象(IBookManager的实现者 和 Binder的实现者)时要用到\n static final String DESCRIPTOR = \"com.example.benjious.theart_02.manualbinder.IBookManager\";\n\n static final int TRANSACTION_getBookList = (IBinder.FIRST_CALL_TRANSACTION + 0);\n static final int TRANSACTION_addBook = (IBinder.FIRST_CALL_TRANSACTION + 1);\n\n public List<Book> getBookList() throws RemoteException;\n\n public void addBook(Book book) throws RemoteException;\n}", "void processWaitingDerivedAssociations() {\n \tList<FamixInvocation> addedInvocations = new ArrayList<FamixInvocation>();\n \tfor (FamixInvocation invocation : waitingDerivedAssociations) {\n \t\n \t/* Test helper\n \tif (invocation.from.equals(\"domain.indirect.violatingfrom.AccessObjectReferenceIndirect_AsReturnValue_MethodDerivedViaArgumentType\")){\n \t\tif (invocation.lineNumber == 27) {\n \t\t\tboolean breakpoint = true;\n \t\t\t}\n \t} */\n \t\n \t// 1) Split invocationName. Precondition: invocation.to is a type and invocationName contains the remainder of the string (determined in the previous process step).\n \tString originalToType = invocation.to;\n \tString nextToString = \"\";\n \t\tboolean continueChaining = false;\n \tString toRemainderChainingInvocation = \"\";\n String[] allSubstrings = invocation.invocationName.split(\"\\\\.\");\n if ((allSubstrings.length > 0) && (!allSubstrings[0].equals(\"\"))) {\n \tnextToString = allSubstrings[0];\n\t invocation.to = invocation.to + \".\" + nextToString; \n\t // Put the remainder in a variable; needed to create a separate indirect association, later on\n\t if (allSubstrings.length > 1) {\n\t \tcontinueChaining = true;\n\t toRemainderChainingInvocation = allSubstrings[1];\n\t for (int i = 2; i < allSubstrings.length ; i++) {\n\t \ttoRemainderChainingInvocation = toRemainderChainingInvocation + \".\" + allSubstrings[i];\n\t }\n\t }\n }\n\n \t/* 2) Determine if the second substring is an (inherited) attribute. If so determine the type of the attribute. \n \t * If the type refers to a FamixClass or FamixLibrary, set this type as invocation.to. */\n \tboolean addInvocation = false;\n \tString toTypeNewIndirectInvocation = \"\";\n if (!invocation.to.endsWith(\")\")) {\n\t \tboolean attributeFound = false;\n\t \tString searchKey = invocation.to;\n\t if (theModel.structuralEntities.containsKey(searchKey)) {\n\t \tattributeFound = true;\n\t } else { // Determine if nextToString is an inherited attribute \n\t \t\tString superClassName = indirectAssociations_findSuperClassThatDeclaresVariable(originalToType, nextToString);\n\t \t\tif ((superClassName != null) && !superClassName.equals(\"\")) {\n\t \t\t\tsearchKey = superClassName + \".\" + nextToString;\n\t \t\t\tif (theModel.structuralEntities.containsKey(searchKey)) {\n\t \tattributeFound = true;\n\t\t \t// Create an access dependency on the superclass;\n\t\t \t\t\t\tFamixInvocation newInvocation = indirectAssociations_AddIndirectInvocation(\"AccessPropertyOrField\", invocation.from, superClassName, invocation.lineNumber, invocation.belongsToMethod, invocation.to, invocation.nameOfInstance, true);\n\t\t \taddToModel(newInvocation); \n\t\t\t \t\t\tnumberOfDerivedAssociations ++;\n\t }\n\t \t\t\t}\n\t \t}\n \t// This current association should be added as an access call dependency on the original to-type or on the superclass\n \t\t\tinvocation.to = originalToType;\n \t\t\tinvocation.type = \"AccessPropertyOrField\";\n \t\t\tinvocation.invocationName = nextToString;\n \t\t\taddInvocation = true;\n\t if (attributeFound) {\n \t\t\t// Determine if a next invocation in the chain needs to be created\n\t \t\tFamixStructuralEntity entity = theModel.structuralEntities.get(searchKey);\n\t \t\tif (entity.declareType != null && !entity.declareType.equals(\"\")){\n\t \t\t\ttoTypeNewIndirectInvocation = entity.declareType;\n\t \t\t} else {\n\t \t\t\tcontinueChaining = false;\n\t \t\t}\n\t \t}\n }\n\n \n \t/* 3) Determine if the second substring is an (inherited) method. If so determine the return type of the method. \n \t * If not a primitive type, but an FamixClass or FamixLibrary,set this type as invocation.to. */\n if (invocation.to.endsWith(\")\")) {\n // Try to find the method; first as a method of the originalToType class\n boolean methodFound = false;\n FamixMethod foundMethod = findInvokedMethodOnName(invocation.from, invocation.belongsToMethod, originalToType, nextToString);\n if (foundMethod != null) {\n\t \tmethodFound = true;\n\t } else { // Determine if nextToString is an inherited method \n\t \t\tString superClassName = indirectAssociations_findSuperClassThatContainsMethod(invocation.from, invocation.belongsToMethod, originalToType, nextToString);\n\t \t\tif ((superClassName != null) && !superClassName.equals(\"\")) {\n\t \t\t\tfoundMethod = findInvokedMethodOnName(invocation.from, invocation.belongsToMethod, superClassName, nextToString);\n\t if (foundMethod != null) {\n\t \t\t\t\tmethodFound = true;\n\t\t \t// Create a call dependency on the superclass;\n\t\t \t\t\t\tFamixInvocation newInvocation = indirectAssociations_AddIndirectInvocation(\"InvocMethod\", invocation.from, superClassName, invocation.lineNumber, invocation.belongsToMethod, invocation.to, invocation.nameOfInstance, true);\n\t\t \taddToModel(newInvocation); \n\t\t\t \t\t\tnumberOfDerivedAssociations ++;\n\t }\n\t \t\t\t}\n\t }\n \t// This current association should be added as a call dependency on the original to-type\n \t\t\tinvocation.to = originalToType;\n \t\t\tinvocation.type = \"InvocMethod\";\n \t\t\tinvocation.invocationName = nextToString;\n \t\t\taddInvocation = true;\n\t if (methodFound) {\n \t\t\t// Determine if a next invocation in the chain needs to be created\n\t \tif (foundMethod.declaredReturnType != null && !foundMethod.declaredReturnType.equals(\"\")){\n\t \t\ttoTypeNewIndirectInvocation = foundMethod.declaredReturnType;\n\t \t\t} else {\n\t \t\t\tcontinueChaining = false;\n\t \t\t}\n\t \t}\n \t}\n \n \t\tif (addInvocation) { \n \t\t\tif (!invocation.from.equals(invocation.to) && (theModel.classes.containsKey(invocation.to) || theModel.libraries.containsKey(\"xLibraries.\" + invocation.to))) {\n\t \t\t\taddToModel(invocation);\n\t\t\t\t\tif (continueChaining) { \n\t\t\t\t\t\t// Create an indirect association to identify dependencies to the remaining parts of the chain. Store it temporarily; it is processed in a separate method. \n\t\t\t\t\t\tFamixInvocation newIndirectInvocation = indirectAssociations_AddIndirectInvocation(\"Undetermined\", invocation.from, toTypeNewIndirectInvocation, invocation.lineNumber, invocation.belongsToMethod, toRemainderChainingInvocation, invocation.nameOfInstance, true);\n\t addedInvocations.add(newIndirectInvocation);\n\t\t \t\t\tnumberOfDerivedAssociations ++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (toRemainderChainingInvocation.equals(\"\") && !toTypeNewIndirectInvocation.equals(\"\")) {\n\t\t\t\t\t\t\t// Create an access invocation to the referred type; the return value of the complete string.\n\t\t\t\t\t\t\tFamixInvocation newIndirectInvocation = indirectAssociations_AddIndirectInvocation(\"AccessPropertyOrField\", invocation.from, toTypeNewIndirectInvocation, invocation.lineNumber, invocation.belongsToMethod, toRemainderChainingInvocation, invocation.nameOfInstance, true);\n\t\t addedInvocations.add(newIndirectInvocation);\n\t\t\t \t\t\tnumberOfDerivedAssociations ++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n \twaitingDerivedAssociations.clear();\n \tif (addedInvocations.size() > 0) {\n \t\twaitingDerivedAssociations.addAll(addedInvocations);\n \t\taddedInvocations.clear();\n \tthis.logger.info(new Date().toString() + \" Number of derived Associations: \" + numberOfDerivedAssociations);\n \t\tprocessWaitingDerivedAssociations();\n \t}\n }", "private void setupAllMafiosis()\n {\n }", "@Remote\r\npublic interface RappelManagerRemote\r\n extends RappelManager\r\n{\r\n\r\n\r\n}", "private void reconnectSupplier() {\n try {\n Registry registry = LocateRegistry.getRegistry(host, port);\n supplier = (SupplierInterface) registry.lookup(remoteName);\n connected = true;\n System.out.println(\"Connected to \"+supplierName);\n } catch (NotBoundException | RemoteException e) {\n e.printStackTrace();\n }\n }", "@Test\r\n public void testSetListBanque() {\r\n System.out.println(\"setListBanque\");\r\n List<Banque> listBanque = null;\r\n chequeBeans instance = new chequeBeans();\r\n instance.setListBanque(listBanque);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test \nvoid testFillPrescripNoRefills() {\n\tprescrip.setRefills(0);\n\t testPharm.receivePrescription(prescrip);\n\tBoolean success = testPharm.fillPrescription(prescrip.getId()); //doesn't exist\n assertFalse(success);\n}", "@Remote\r\npublic interface ReponseToCommandeDAORemote\r\n extends ReponseToCommandeDAO\r\n{\r\n\r\n\r\n}", "protected abstract void populateBeanFromRequest(BeanType bean, Request request);", "public interface AddressbookService extends Service, Addressbook\n{\n /**\n * Liefert die Liste aller gefundenen Adressbuecher.\n * @return Liste der Adressbuecher.\n * Die Funktion liefert niemals <code>null</code> und auch\n * nie ein leeres Array. Denn da <code>AddressbookService</code>\n * selbst ebenfalls das <code>Addressbook</code>-Interface\n * implementiert, wird mindestens dieses zurueckgeliefert.\n * Allerdings wuerde es in diesem Fall keine Adressen finden,\n * da ja keine tatsaechlichen \"Backend\"-Adressbuecher existieren.\n * Zumindest das Hibiscus-eigene Adressbuch sollte aber immer\n * enthalten sein. \n * @throws RemoteException\n */\n public Addressbook[] getAddressbooks() throws RemoteException;\n \n /**\n * Liefert true, wenn neben dem Hibiscus-eigenen Adressbuch noch weitere gefunden wurden.\n * In diesem Fall koennte dem Benutzer z.Bsp. ein Auswahl-Dialog\n * angezeigt werden, in dem er das gewuenschte Adressbuch auswaehlen kann.\n * @return true, wenn weitere Adressbuecher existieren.\n * @throws RemoteException\n */\n public boolean hasExternalAddressbooks() throws RemoteException;\n}", "void mo753w() throws RemoteException;" ]
[ "0.5464782", "0.5445887", "0.54295117", "0.5201624", "0.5163763", "0.5085177", "0.5055353", "0.5017604", "0.5007785", "0.50067896", "0.4998021", "0.49719518", "0.4952892", "0.49032074", "0.4827097", "0.48177522", "0.4805211", "0.4788419", "0.47726697", "0.47621432", "0.47571522", "0.47467163", "0.47237545", "0.47208655", "0.47208655", "0.47208655", "0.47208655", "0.47208655", "0.47202396", "0.47060618", "0.47036272", "0.46973652", "0.46973503", "0.46912408", "0.46853763", "0.46851915", "0.46822688", "0.46810383", "0.46802315", "0.46691173", "0.46638763", "0.46498802", "0.46474186", "0.46351388", "0.46293628", "0.46281457", "0.46214628", "0.46197167", "0.46154732", "0.46108255", "0.45921326", "0.45900777", "0.45839757", "0.45831597", "0.4581151", "0.4577071", "0.45751005", "0.4565505", "0.45643434", "0.45637384", "0.4557072", "0.45520934", "0.45490322", "0.45354027", "0.45331365", "0.45324484", "0.4529781", "0.45256317", "0.45244217", "0.45216054", "0.45202968", "0.4511862", "0.4498474", "0.44960627", "0.44940254", "0.44885522", "0.4487405", "0.4485287", "0.4469645", "0.44696087", "0.4462181", "0.44616303", "0.44576648", "0.4456724", "0.44553724", "0.44539458", "0.44439593", "0.44405702", "0.44389024", "0.44356143", "0.44348338", "0.4430799", "0.44306883", "0.44264045", "0.44223967", "0.44142923", "0.44095415", "0.4407941", "0.44056857", "0.43975347" ]
0.66377276
0
/ Test of transferMetalInfo method, of class KnowledgeSystemBeanRemoteInterface.
@Test public void testTransferMetalInfo() { System.out.println("transferMetalInfo - Table have records"); List<Vector> result = KnowledgeSystemBeanInterface.transferMetalInfo(); assertEquals(result.size(), 15); System.out.println("testTransferMetalInfo ---------------------------------------------------- Done"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n public void testCheckMetalName() {\r\n System.out.println(\"checkMetalName - MetalName do not Exist\");\r\n String id = \"Metal AB\";\r\n boolean result = KnowledgeSystemBeanInterface.checkMetalName(id);\r\n assertFalse(result);\r\n System.out.println(\"testCheckMetalName ---------------------------------------------------- Done\");\r\n // TODO review the generated test code and remove the default call to fail.\r\n\r\n }", "@Test\r\n public void testMetalNames() {\r\n System.out.println(\"metalNames - Metal has records\");\r\n List<String> result = KnowledgeSystemBeanInterface.metalNames();\r\n assertEquals(result.size(), 15);\r\n System.out.println(\"testMetalNames ---------------------------------------------------- Done\");\r\n // TODO review the generated test code and remove the default call to fail.\r\n }", "@DISPID(1610940425) //= 0x60050009. The runtime will prefer the VTID if present\n @VTID(31)\n AnyObject sheetMetalParameters();", "@Test\n public void testGetServerRemoto() throws ApplicationException {\n CommunicationFactory instance = CommunicationFactory.getFactory();\n String expResult = bundle.getString(IPropertiesConstants.COMM_REMOTE_CONNECTOR);\n String result = instance.getServer(\"cmcdell\").getClass().getName();\n assertEquals(expResult, result);\n }", "@ApiOperation(value = \"metals\", produces=\"application/json\")\n\t@ApiResponses(value={\n\t\t\t@ApiResponse(code = 200, message=\"Ok\", response = MetalResponse.class, responseContainer=\"Object\"),\n\t\t\t@ApiResponse(code = 400, message=\"Bad request\"),\n\t\t\t@ApiResponse(code = 500, message=\"Internal server error\")\n\t})\n\t@RequestMapping(value=\"/consumer-services/catalogs/metals\", method = RequestMethod.GET)\n\tpublic MetalResponse retrieveMetal(\n\t\t\t@RequestHeader (name = \"client-id\", required = false) String clientId,\n\t\t\t@RequestHeader (name = \"Authorization\", required = false) String authorization,\n\t\t\t@RequestHeader (name = \"uuid\", required = false) String uuid){\t\t\n\t\treturn metalFormatter.metalResponseFormatter(\n\t\t\t\tmetalService.fetchMetalsByKeys(Util.getSummNameMetal(), Util.getSummKeyMetal()));\t\t\n\t}", "public interface IBluetoothHeadset\n extends IInterface {\n public static abstract class Stub extends Binder\n implements IBluetoothHeadset {\n private static class Proxy\n implements IBluetoothHeadset {\n\n public boolean acceptIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(13, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public IBinder asBinder() {\n return mRemote;\n }\n\n public boolean cancelConnectThread() throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = false;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n int i;\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n mRemote.transact(15, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n if(i != 0)\n flag = true;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean connect(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_75;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(1, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean connectHeadsetInternal(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(16, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean createIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(12, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean disconnect(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_75;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(2, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean disconnectHeadsetInternal(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(17, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public int getAudioState(BluetoothDevice bluetoothdevice) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_65;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(19, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return i;\n parcel.writeInt(0);\n goto _L1\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public int getBatteryUsageHint(BluetoothDevice bluetoothdevice) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_65;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(11, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return i;\n parcel.writeInt(0);\n goto _L1\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public List getConnectedDevices() throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n java.util.ArrayList arraylist;\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n mRemote.transact(3, parcel, parcel1, 0);\n parcel1.readException();\n arraylist = parcel1.createTypedArrayList(BluetoothDevice.CREATOR);\n parcel1.recycle();\n parcel.recycle();\n return arraylist;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public int getConnectionState(BluetoothDevice bluetoothdevice) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_64;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(5, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return i;\n parcel.writeInt(0);\n goto _L1\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public List getDevicesMatchingConnectionStates(int ai[]) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n java.util.ArrayList arraylist;\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n parcel.writeIntArray(ai);\n mRemote.transact(4, parcel, parcel1, 0);\n parcel1.readException();\n arraylist = parcel1.createTypedArrayList(BluetoothDevice.CREATOR);\n parcel1.recycle();\n parcel.recycle();\n return arraylist;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public String getInterfaceDescriptor() {\n return \"android.bluetooth.IBluetoothHeadset\";\n }\n\n public int getPriority(BluetoothDevice bluetoothdevice) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_65;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(7, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return i;\n parcel.writeInt(0);\n goto _L1\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean isAudioConnected(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(10, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean rejectIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(14, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean setAudioState(BluetoothDevice bluetoothdevice, int i) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_88;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int j;\n parcel.writeInt(i);\n mRemote.transact(18, parcel, parcel1, 0);\n parcel1.readException();\n j = parcel1.readInt();\n Exception exception;\n if(j == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean setPriority(BluetoothDevice bluetoothdevice, int i) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_88;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int j;\n parcel.writeInt(i);\n mRemote.transact(6, parcel, parcel1, 0);\n parcel1.readException();\n j = parcel1.readInt();\n Exception exception;\n if(j == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean startScoUsingVirtualVoiceCall(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(20, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean startVoiceRecognition(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(8, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean stopScoUsingVirtualVoiceCall(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(21, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean stopVoiceRecognition(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(9, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n private IBinder mRemote;\n\n Proxy(IBinder ibinder) {\n mRemote = ibinder;\n }\n }\n\n\n public static IBluetoothHeadset asInterface(IBinder ibinder) {\n Object obj;\n if(ibinder == null) {\n obj = null;\n } else {\n IInterface iinterface = ibinder.queryLocalInterface(\"android.bluetooth.IBluetoothHeadset\");\n if(iinterface != null && (iinterface instanceof IBluetoothHeadset))\n obj = (IBluetoothHeadset)iinterface;\n else\n obj = new Proxy(ibinder);\n }\n return ((IBluetoothHeadset) (obj));\n }\n\n public IBinder asBinder() {\n return this;\n }\n\n public boolean onTransact(int i, Parcel parcel, Parcel parcel1, int j) throws RemoteException {\n int k;\n boolean flag;\n k = 0;\n flag = true;\n i;\n JVM INSTR lookupswitch 22: default 192\n // 1: 215\n // 2: 278\n // 3: 341\n // 4: 366\n // 5: 395\n // 6: 449\n // 7: 516\n // 8: 570\n // 9: 633\n // 10: 696\n // 11: 759\n // 12: 813\n // 13: 876\n // 14: 939\n // 15: 1002\n // 16: 1036\n // 17: 1099\n // 18: 1162\n // 19: 1229\n // 20: 1283\n // 21: 1346\n // 1598968902: 206;\n goto _L1 _L2 _L3 _L4 _L5 _L6 _L7 _L8 _L9 _L10 _L11 _L12 _L13 _L14 _L15 _L16 _L17 _L18 _L19 _L20 _L21 _L22 _L23\n_L1:\n flag = super.onTransact(i, parcel, parcel1, j);\n_L25:\n return flag;\n_L23:\n parcel1.writeString(\"android.bluetooth.IBluetoothHeadset\");\n continue; /* Loop/switch isn't completed */\n_L2:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice17;\n boolean flag15;\n if(parcel.readInt() != 0)\n bluetoothdevice17 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice17 = null;\n flag15 = connect(bluetoothdevice17);\n parcel1.writeNoException();\n if(flag15)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L3:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice16;\n boolean flag14;\n if(parcel.readInt() != 0)\n bluetoothdevice16 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice16 = null;\n flag14 = disconnect(bluetoothdevice16);\n parcel1.writeNoException();\n if(flag14)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L4:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n List list1 = getConnectedDevices();\n parcel1.writeNoException();\n parcel1.writeTypedList(list1);\n continue; /* Loop/switch isn't completed */\n_L5:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n List list = getDevicesMatchingConnectionStates(parcel.createIntArray());\n parcel1.writeNoException();\n parcel1.writeTypedList(list);\n continue; /* Loop/switch isn't completed */\n_L6:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice15;\n int k1;\n if(parcel.readInt() != 0)\n bluetoothdevice15 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice15 = null;\n k1 = getConnectionState(bluetoothdevice15);\n parcel1.writeNoException();\n parcel1.writeInt(k1);\n continue; /* Loop/switch isn't completed */\n_L7:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice14;\n boolean flag13;\n if(parcel.readInt() != 0)\n bluetoothdevice14 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice14 = null;\n flag13 = setPriority(bluetoothdevice14, parcel.readInt());\n parcel1.writeNoException();\n if(flag13)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L8:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice13;\n int j1;\n if(parcel.readInt() != 0)\n bluetoothdevice13 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice13 = null;\n j1 = getPriority(bluetoothdevice13);\n parcel1.writeNoException();\n parcel1.writeInt(j1);\n continue; /* Loop/switch isn't completed */\n_L9:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice12;\n boolean flag12;\n if(parcel.readInt() != 0)\n bluetoothdevice12 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice12 = null;\n flag12 = startVoiceRecognition(bluetoothdevice12);\n parcel1.writeNoException();\n if(flag12)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L10:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice11;\n boolean flag11;\n if(parcel.readInt() != 0)\n bluetoothdevice11 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice11 = null;\n flag11 = stopVoiceRecognition(bluetoothdevice11);\n parcel1.writeNoException();\n if(flag11)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L11:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice10;\n boolean flag10;\n if(parcel.readInt() != 0)\n bluetoothdevice10 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice10 = null;\n flag10 = isAudioConnected(bluetoothdevice10);\n parcel1.writeNoException();\n if(flag10)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L12:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice9;\n int i1;\n if(parcel.readInt() != 0)\n bluetoothdevice9 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice9 = null;\n i1 = getBatteryUsageHint(bluetoothdevice9);\n parcel1.writeNoException();\n parcel1.writeInt(i1);\n continue; /* Loop/switch isn't completed */\n_L13:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice8;\n boolean flag9;\n if(parcel.readInt() != 0)\n bluetoothdevice8 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice8 = null;\n flag9 = createIncomingConnect(bluetoothdevice8);\n parcel1.writeNoException();\n if(flag9)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L14:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice7;\n boolean flag8;\n if(parcel.readInt() != 0)\n bluetoothdevice7 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice7 = null;\n flag8 = acceptIncomingConnect(bluetoothdevice7);\n parcel1.writeNoException();\n if(flag8)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L15:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice6;\n boolean flag7;\n if(parcel.readInt() != 0)\n bluetoothdevice6 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice6 = null;\n flag7 = rejectIncomingConnect(bluetoothdevice6);\n parcel1.writeNoException();\n if(flag7)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L16:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n boolean flag6 = cancelConnectThread();\n parcel1.writeNoException();\n if(flag6)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L17:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice5;\n boolean flag5;\n if(parcel.readInt() != 0)\n bluetoothdevice5 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice5 = null;\n flag5 = connectHeadsetInternal(bluetoothdevice5);\n parcel1.writeNoException();\n if(flag5)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L18:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice4;\n boolean flag4;\n if(parcel.readInt() != 0)\n bluetoothdevice4 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice4 = null;\n flag4 = disconnectHeadsetInternal(bluetoothdevice4);\n parcel1.writeNoException();\n if(flag4)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L19:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice3;\n boolean flag3;\n if(parcel.readInt() != 0)\n bluetoothdevice3 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice3 = null;\n flag3 = setAudioState(bluetoothdevice3, parcel.readInt());\n parcel1.writeNoException();\n if(flag3)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L20:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice2;\n int l;\n if(parcel.readInt() != 0)\n bluetoothdevice2 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice2 = null;\n l = getAudioState(bluetoothdevice2);\n parcel1.writeNoException();\n parcel1.writeInt(l);\n continue; /* Loop/switch isn't completed */\n_L21:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice1;\n boolean flag2;\n if(parcel.readInt() != 0)\n bluetoothdevice1 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice1 = null;\n flag2 = startScoUsingVirtualVoiceCall(bluetoothdevice1);\n parcel1.writeNoException();\n if(flag2)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L22:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice;\n boolean flag1;\n if(parcel.readInt() != 0)\n bluetoothdevice = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice = null;\n flag1 = stopScoUsingVirtualVoiceCall(bluetoothdevice);\n parcel1.writeNoException();\n if(flag1)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n if(true) goto _L25; else goto _L24\n_L24:\n }\n\n private static final String DESCRIPTOR = \"android.bluetooth.IBluetoothHeadset\";\n static final int TRANSACTION_acceptIncomingConnect = 13;\n static final int TRANSACTION_cancelConnectThread = 15;\n static final int TRANSACTION_connect = 1;\n static final int TRANSACTION_connectHeadsetInternal = 16;\n static final int TRANSACTION_createIncomingConnect = 12;\n static final int TRANSACTION_disconnect = 2;\n static final int TRANSACTION_disconnectHeadsetInternal = 17;\n static final int TRANSACTION_getAudioState = 19;\n static final int TRANSACTION_getBatteryUsageHint = 11;\n static final int TRANSACTION_getConnectedDevices = 3;\n static final int TRANSACTION_getConnectionState = 5;\n static final int TRANSACTION_getDevicesMatchingConnectionStates = 4;\n static final int TRANSACTION_getPriority = 7;\n static final int TRANSACTION_isAudioConnected = 10;\n static final int TRANSACTION_rejectIncomingConnect = 14;\n static final int TRANSACTION_setAudioState = 18;\n static final int TRANSACTION_setPriority = 6;\n static final int TRANSACTION_startScoUsingVirtualVoiceCall = 20;\n static final int TRANSACTION_startVoiceRecognition = 8;\n static final int TRANSACTION_stopScoUsingVirtualVoiceCall = 21;\n static final int TRANSACTION_stopVoiceRecognition = 9;\n\n public Stub() {\n attachInterface(this, \"android.bluetooth.IBluetoothHeadset\");\n }\n }\n\n\n public abstract boolean acceptIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean cancelConnectThread() throws RemoteException;\n\n public abstract boolean connect(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean connectHeadsetInternal(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean createIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean disconnect(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean disconnectHeadsetInternal(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract int getAudioState(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract int getBatteryUsageHint(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract List getConnectedDevices() throws RemoteException;\n\n public abstract int getConnectionState(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract List getDevicesMatchingConnectionStates(int ai[]) throws RemoteException;\n\n public abstract int getPriority(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean isAudioConnected(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean rejectIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean setAudioState(BluetoothDevice bluetoothdevice, int i) throws RemoteException;\n\n public abstract boolean setPriority(BluetoothDevice bluetoothdevice, int i) throws RemoteException;\n\n public abstract boolean startScoUsingVirtualVoiceCall(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean startVoiceRecognition(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean stopScoUsingVirtualVoiceCall(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean stopVoiceRecognition(BluetoothDevice bluetoothdevice) throws RemoteException;\n}", "@Override public java.lang.String getUserAvaibility(int status) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\njava.lang.String _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(status);\nmRemote.transact(Stub.TRANSACTION_getUserAvaibility, _data, _reply, 0);\n_reply.readException();\n_result = _reply.readString();\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}", "public abstract void queryRemoteCardInfo();", "public interface CfgAntenna extends javax.ejb.EJBObject, com.ibm.ivj.ejb.runtime.CopyHelper {\n\n\n\n\n\n\t/**\n\t * Get accessor for persistent attribute: resource\n\t */\n\tpublic int getResource() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: resource\n\t */\n\tpublic void setResource(int newResource) throws java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: num_ant\n\t */\n\tpublic java.lang.String getNum_ant() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: num_ant\n\t */\n\tpublic void setNum_ant(java.lang.String newNum_ant)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: kind_ant\n\t */\n\tpublic java.lang.String getKind_ant() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: kind_ant\n\t */\n\tpublic void setKind_ant(java.lang.String newKind_ant)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: nakl\n\t */\n\tpublic java.math.BigDecimal getNakl() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: nakl\n\t */\n\tpublic void setNakl(java.math.BigDecimal newNakl)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: az_ant\n\t */\n\tpublic java.math.BigDecimal getAz_ant() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: az_ant\n\t */\n\tpublic void setAz_ant(java.math.BigDecimal newAz_ant)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: kswn\n\t */\n\tpublic java.math.BigDecimal getKswn() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: kswn\n\t */\n\tpublic void setKswn(java.math.BigDecimal newKswn)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: h_set1\n\t */\n\tpublic java.math.BigDecimal getH_set1() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: h_set1\n\t */\n\tpublic void setH_set1(java.math.BigDecimal newH_set1)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: len_cable\n\t */\n\tpublic java.math.BigDecimal getLen_cable() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: len_cable\n\t */\n\tpublic void setLen_cable(java.math.BigDecimal newLen_cable)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: cableres\n\t */\n\tpublic java.lang.Integer getCableres() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: cableres\n\t */\n\tpublic void setCableres(java.lang.Integer newCableres)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: equipment\n\t */\n\tpublic int getEquipment() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: equipment\n\t */\n\tpublic void setEquipment(int newEquipment) throws java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: az_variation\n\t */\n\tpublic java.lang.String getAz_variation() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: az_variation\n\t */\n\tpublic void setAz_variation(java.lang.String newAz_variation)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: nakl_variation\n\t */\n\tpublic java.lang.String getNakl_variation()\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: nakl_variation\n\t */\n\tpublic void setNakl_variation(java.lang.String newNakl_variation)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: input_power\n\t */\n\tpublic java.math.BigDecimal getInput_power()\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: input_power\n\t */\n\tpublic void setInput_power(java.math.BigDecimal newInput_power)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: operator\n\t */\n\tpublic java.lang.Integer getOperator() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: operator\n\t */\n\tpublic void setOperator(java.lang.Integer newOperator)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: byhand\n\t */\n\tpublic java.lang.Boolean getByhand() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: byhand\n\t */\n\tpublic void setByhand(java.lang.Boolean newByhand)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: groundresource\n\t */\n\tpublic java.lang.Integer getGroundresource()\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: groundresource\n\t */\n\tpublic void setGroundresource(java.lang.Integer newGroundresource)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: groundcnt\n\t */\n\tpublic java.lang.Integer getGroundcnt() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: groundcnt\n\t */\n\tpublic void setGroundcnt(java.lang.Integer newGroundcnt)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: locationtype\n\t */\n\tpublic java.lang.String getLocationtype() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: locationtype\n\t */\n\tpublic void setLocationtype(java.lang.String newLocationtype)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: electricaltilt\n\t */\n\tpublic java.math.BigDecimal getElectricaltilt()\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: electricaltilt\n\t */\n\tpublic void setElectricaltilt(java.math.BigDecimal newElectricaltilt)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: StorageCard\n\t */\n\tpublic java.lang.Integer getStorageCard() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: StorageCard\n\t */\n\tpublic void setStorageCard(java.lang.Integer newStorageCard)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: qty\n\t */\n\tpublic java.math.BigDecimal getQty() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: qty\n\t */\n\tpublic void setQty(java.math.BigDecimal newQty)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: datasource\n\t */\n\tpublic int getDatasource() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: datasource\n\t */\n\tpublic void setDatasource(int newDatasource)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: ObjectStatus\n\t */\n\tpublic java.lang.String getObjectStatus() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: ObjectStatus\n\t */\n\tpublic void setObjectStatus(java.lang.String newObjectStatus)\n\t\tthrows java.rmi.RemoteException;\n\t/**\n\t * @return\n\t */\n\tpublic int getId_anten() throws java.rmi.RemoteException;\n\t/**\n\t * @return\n\t */\n\tpublic int getSavconfigid() throws java.rmi.RemoteException;\n\t/**\n\t * Get accessor for persistent attribute: commcable\n\t */\n\tpublic java.lang.Boolean getCommcable() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: commcable\n\t */\n\tpublic void setCommcable(java.lang.Boolean newCommcable)\n\t\tthrows java.rmi.RemoteException;\n}", "protected void onGetTankCapacity(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}", "@Test\n public void testMetatypeInformationInstalledBundle() throws IOException, InterruptedException\n {\n MessageListener listener = new MessageListener(socket);\n\n //find the test bundle\n long testBundleId = BundleNamespaceUtils.getBundleBySymbolicName(\n \"mil.dod.th.ose.integration.example.metatype\", socket);\n\n //construct request to stop bundle\n StopRequestData request = StopRequestData.newBuilder().setBundleId(testBundleId).build();\n TerraHarvestMessage message = BundleNamespaceUtils.createBundleMessage(request, BundleMessageType.StopRequest);\n\n //send message\n message.writeDelimitedTo(socket.getOutputStream());\n\n int regId = RemoteEventRegistration.regRemoteEventMessages(socket, \n RemoteMetatypeConstants.TOPIC_METATYPE_INFORMATION_AVAILABLE);\n\n //construct request to start bundle\n StartRequestData requestStart = StartRequestData.newBuilder().setBundleId(testBundleId).build();\n message = BundleNamespaceUtils.createBundleMessage(requestStart, BundleMessageType.StartRequest);\n\n //send message\n message.writeDelimitedTo(socket.getOutputStream());\n\n //going to be at least one because there is the example XML class\n List<MessageDetails> responses = listener.waitForRemoteEvents(\n RemoteMetatypeConstants.TOPIC_METATYPE_INFORMATION_AVAILABLE, TIME_OUT, MatchCount.atLeast(1));\n \n //unreg listener\n MessageListener.unregisterEvent(regId, socket);\n\n //parse Response\n EventAdminNamespace namespace = (EventAdminNamespace)responses.get(0).getNamespaceMessage();\n SendEventData event = SendEventData.parseFrom(namespace.getData());\n\n //Look at property keys find the bundle id, this should be the same ID of the bundle that was stopped\n \n Map<String, Object> props = SharedRemoteInterfaceUtils.getSimpleMapFromComplexTypesMap(event.getPropertyList());\n assertThat(props, rawMapHasEntry(RemoteMetatypeConstants.EVENT_PROP_BUNDLE_ID, testBundleId));\n }", "@DISPID(1610940424) //= 0x60050008. The runtime will prefer the VTID if present\n @VTID(30)\n Factory sheetMetalFactory();", "@Override\n\tpublic void testEtherNet() {\n\t\tSystem.out.println(\"ethernet test success\");\n\t\t\n\t}", "void mo750t() throws RemoteException;", "public boolean DecodeGetSystemInfoResponse(byte[] GetSystemInfoResponse) {\r\n DataDevice ma = (DataDevice) getApplication();\r\n //if the tag has returned a good response\r\n if (GetSystemInfoResponse[0] == (byte) 0x00 && GetSystemInfoResponse.length >= 12) {\r\n //DataDevice ma = (DataDevice)getApplication();\r\n String uidToString = \"\";\r\n byte[] uid = new byte[8];\r\n // change uid format from byteArray to a String\r\n for (int i = 1; i <= 8; i++) {\r\n uid[i - 1] = GetSystemInfoResponse[10 - i];\r\n uidToString += Helper.ConvertHexByteToString(uid[i - 1]);\r\n }\r\n\r\n //***** TECHNO ******\r\n ma.setUid(uidToString);\r\n if (uid[0] == (byte) 0xE0)\r\n ma.setTechno(\"ISO 15693\");\r\n else if (uid[0] == (byte) 0xD0)\r\n ma.setTechno(\"ISO 14443\");\r\n else\r\n ma.setTechno(\"Unknown techno\");\r\n\r\n //***** MANUFACTURER ****\r\n if (uid[1] == (byte) 0x02)\r\n ma.setManufacturer(\"STMicroelectronics\");\r\n else if (uid[1] == (byte) 0x04)\r\n ma.setManufacturer(\"NXP\");\r\n else if (uid[1] == (byte) 0x07)\r\n ma.setManufacturer(\"Texas Instruments\");\r\n else if (uid[1] == (byte) 0x01) //MOTOROLA (updated 20140228)\r\n ma.setManufacturer(\"Motorola\");\r\n else if (uid[1] == (byte) 0x03) //HITASHI (updated 20140228)\r\n ma.setManufacturer(\"Hitachi\");\r\n else if (uid[1] == (byte) 0x04) //NXP SEMICONDUCTORS\r\n ma.setManufacturer(\"NXP\");\r\n else if (uid[1] == (byte) 0x05) //INFINEON TECHNOLOGIES (updated 20140228)\r\n ma.setManufacturer(\"Infineon\");\r\n else if (uid[1] == (byte) 0x06) //CYLINC (updated 20140228)\r\n ma.setManufacturer(\"Cylinc\");\r\n else if (uid[1] == (byte) 0x07) //TEXAS INSTRUMENTS TAG-IT\r\n ma.setManufacturer(\"Texas Instruments\");\r\n else if (uid[1] == (byte) 0x08) //FUJITSU LIMITED (updated 20140228)\r\n ma.setManufacturer(\"Fujitsu\");\r\n else if (uid[1] == (byte) 0x09) //MATSUSHITA ELECTRIC INDUSTRIAL (updated 20140228)\r\n ma.setManufacturer(\"Matsushita\");\r\n else if (uid[1] == (byte) 0x0A) //NEC (updated 20140228)\r\n ma.setManufacturer(\"NEC\");\r\n else if (uid[1] == (byte) 0x0B) //OKI ELECTRIC (updated 20140228)\r\n ma.setManufacturer(\"Oki\");\r\n else if (uid[1] == (byte) 0x0C) //TOSHIBA (updated 20140228)\r\n ma.setManufacturer(\"Toshiba\");\r\n else if (uid[1] == (byte) 0x0D) //MITSUBISHI ELECTRIC (updated 20140228)\r\n ma.setManufacturer(\"Mitsubishi\");\r\n else if (uid[1] == (byte) 0x0E) //SAMSUNG ELECTRONICS (updated 20140228)\r\n ma.setManufacturer(\"Samsung\");\r\n else if (uid[1] == (byte) 0x0F) //HUYNDAI ELECTRONICS (updated 20140228)\r\n ma.setManufacturer(\"Hyundai\");\r\n else if (uid[1] == (byte) 0x10) //LG SEMICONDUCTORS (updated 20140228)\r\n ma.setManufacturer(\"LG\");\r\n else\r\n ma.setManufacturer(\"Unknown manufacturer\");\r\n\r\n if (uid[1] == (byte) 0x02) {\r\n //**** PRODUCT NAME *****\r\n if (uid[2] >= (byte) 0x04 && uid[2] <= (byte) 0x07) {\r\n ma.setProductName(\"LRI512\");\r\n ma.setMultipleReadSupported(false);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n } else if (uid[2] >= (byte) 0x14 && uid[2] <= (byte) 0x17) {\r\n ma.setProductName(\"LRI64\");\r\n ma.setMultipleReadSupported(false);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n } else if (uid[2] >= (byte) 0x20 && uid[2] <= (byte) 0x23) {\r\n ma.setProductName(\"LRI2K\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n } else if (uid[2] >= (byte) 0x28 && uid[2] <= (byte) 0x2B) {\r\n ma.setProductName(\"LRIS2K\");\r\n ma.setMultipleReadSupported(false);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n } else if (uid[2] >= (byte) 0x2C && uid[2] <= (byte) 0x2F) {\r\n ma.setProductName(\"M24LR64\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n } else if (uid[2] >= (byte) 0x40 && uid[2] <= (byte) 0x43) {\r\n ma.setProductName(\"LRI1K\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n } else if (uid[2] >= (byte) 0x44 && uid[2] <= (byte) 0x47) {\r\n ma.setProductName(\"LRIS64K\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n } else if (uid[2] >= (byte) 0x48 && uid[2] <= (byte) 0x4B) {\r\n ma.setProductName(\"M24LR01E\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n } else if (uid[2] >= (byte) 0x4C && uid[2] <= (byte) 0x4F) {\r\n ma.setProductName(\"M24LR16E\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n if (ma.isBasedOnTwoBytesAddress() == false)\r\n return false;\r\n } else if (uid[2] >= (byte) 0x50 && uid[2] <= (byte) 0x53) {\r\n ma.setProductName(\"M24LR02E\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n } else if (uid[2] >= (byte) 0x54 && uid[2] <= (byte) 0x57) {\r\n ma.setProductName(\"M24LR32E\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n if (ma.isBasedOnTwoBytesAddress() == false)\r\n return false;\r\n } else if (uid[2] >= (byte) 0x58 && uid[2] <= (byte) 0x5B) {\r\n ma.setProductName(\"M24LR04E\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n } else if (uid[2] >= (byte) 0x5C && uid[2] <= (byte) 0x5F) {\r\n ma.setProductName(\"M24LR64E\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n if (ma.isBasedOnTwoBytesAddress() == false)\r\n return false;\r\n } else if (uid[2] >= (byte) 0x60 && uid[2] <= (byte) 0x63) {\r\n ma.setProductName(\"M24LR08E\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n } else if (uid[2] >= (byte) 0x64 && uid[2] <= (byte) 0x67) {\r\n ma.setProductName(\"M24LR128E\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n if (ma.isBasedOnTwoBytesAddress() == false)\r\n return false;\r\n } else if (uid[2] >= (byte) 0x6C && uid[2] <= (byte) 0x6F) {\r\n ma.setProductName(\"M24LR256E\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n if (ma.isBasedOnTwoBytesAddress() == false)\r\n return false;\r\n } else if (uid[2] >= (byte) 0xF8 && uid[2] <= (byte) 0xFB) {\r\n ma.setProductName(\"detected product\");\r\n ma.setBasedOnTwoBytesAddress(true);\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n } else {\r\n ma.setProductName(\"Unknown product\");\r\n ma.setBasedOnTwoBytesAddress(false);\r\n ma.setMultipleReadSupported(false);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n }\r\n\r\n //*** DSFID ***\r\n ma.setDsfid(Helper.ConvertHexByteToString(GetSystemInfoResponse[10]));\r\n\r\n //*** AFI ***\r\n ma.setAfi(Helper.ConvertHexByteToString(GetSystemInfoResponse[11]));\r\n\r\n //*** MEMORY SIZE ***\r\n if (ma.isBasedOnTwoBytesAddress()) {\r\n String temp = new String();\r\n temp += Helper.ConvertHexByteToString(GetSystemInfoResponse[13]);\r\n temp += Helper.ConvertHexByteToString(GetSystemInfoResponse[12]);\r\n ma.setMemorySize(temp);\r\n } else\r\n ma.setMemorySize(Helper.ConvertHexByteToString(GetSystemInfoResponse[12]));\r\n\r\n //*** BLOCK SIZE ***\r\n if (ma.isBasedOnTwoBytesAddress())\r\n ma.setBlockSize(Helper.ConvertHexByteToString(GetSystemInfoResponse[14]));\r\n else\r\n ma.setBlockSize(Helper.ConvertHexByteToString(GetSystemInfoResponse[13]));\r\n\r\n //*** IC REFERENCE ***\r\n if (ma.isBasedOnTwoBytesAddress())\r\n ma.setIcReference(Helper.ConvertHexByteToString(GetSystemInfoResponse[15]));\r\n else\r\n ma.setIcReference(Helper.ConvertHexByteToString(GetSystemInfoResponse[14]));\r\n } else {\r\n ma.setProductName(\"Unknown product\");\r\n ma.setBasedOnTwoBytesAddress(false);\r\n ma.setMultipleReadSupported(false);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n //ma.setAfi(\"00 \");\r\n ma.setAfi(Helper.ConvertHexByteToString(GetSystemInfoResponse[11])); //changed 22-10-2014\r\n //ma.setDsfid(\"00 \");\r\n ma.setDsfid(Helper.ConvertHexByteToString(GetSystemInfoResponse[10])); //changed 22-10-2014\r\n //ma.setMemorySize(\"FF \");\r\n ma.setMemorySize(Helper.ConvertHexByteToString(GetSystemInfoResponse[12])); //changed 22-10-2014\r\n //ma.setBlockSize(\"03 \");\r\n ma.setBlockSize(Helper.ConvertHexByteToString(GetSystemInfoResponse[13])); //changed 22-10-2014\r\n //ma.setIcReference(\"00 \");\r\n ma.setIcReference(Helper.ConvertHexByteToString(GetSystemInfoResponse[14])); //changed 22-10-2014\r\n }\r\n\r\n return true;\r\n }\r\n\r\n // in case of Inventory OK and Get System Info HS\r\n else if (ma.getTechno() == \"ISO 15693\") {\r\n ma.setProductName(\"Unknown product\");\r\n ma.setBasedOnTwoBytesAddress(false);\r\n ma.setMultipleReadSupported(false);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n ma.setAfi(\"00 \");\r\n ma.setDsfid(\"00 \");\r\n ma.setMemorySize(\"3F \"); //changed 22-10-2014\r\n ma.setBlockSize(\"03 \");\r\n ma.setIcReference(\"00 \");\r\n return true;\r\n }\r\n\r\n //if the tag has returned an error code\r\n else\r\n return false;\r\n\r\n }", "UsageInfo(PhysicalMachine pm) {\n this.pm = pm;\n }", "public MetalDetector clickMetalDetector(){\n driver.findElement(metalDetector).click();\n return new MetalDetector(driver);\n }", "void mo752v() throws RemoteException;", "@Override\n public String getMailetInfo() {\n return \"Sieve Mailbox Mailet\";\n }", "private void setMeteredInterface(java.lang.String r10, boolean r11) {\n /*\n r9 = this;\n if (r10 != 0) goto L_0x0003;\n L_0x0002:\n return;\n L_0x0003:\n r0 = \"network_management\";\n r0 = android.os.ServiceManager.getService(r0);\n if (r0 != 0) goto L_0x0014;\n L_0x000b:\n r1 = \"network-policy\";\n r2 = \"setIfWhitelist networkManager is null\";\n android.util.Log.e(r1, r2);\n return;\n L_0x0014:\n r1 = android.os.Parcel.obtain();\n r2 = android.os.Parcel.obtain();\n r3 = \"bandwidth\";\n r4 = 2;\n r4 = new java.lang.String[r4];\n if (r11 != 0) goto L_0x0026;\n L_0x0023:\n r5 = \"enable_ifwhitelist\";\n goto L_0x0028;\n L_0x0026:\n r5 = \"disable_ifwhitelist\";\n L_0x0028:\n r6 = 0;\n r4[r6] = r5;\n r5 = 1;\n r4[r5] = r10;\n r1.writeString(r3);\t Catch:{ Exception -> 0x005e }\n r1.writeArray(r4);\t Catch:{ Exception -> 0x005e }\n r7 = 201; // 0xc9 float:2.82E-43 double:9.93E-322;\t Catch:{ Exception -> 0x005e }\n r0.transact(r7, r1, r2, r6);\t Catch:{ Exception -> 0x005e }\n r6 = r9.sIncreaseCmdCount;\t Catch:{ Exception -> 0x005e }\n r6 = r6 + r5;\t Catch:{ Exception -> 0x005e }\n r9.sIncreaseCmdCount = r6;\t Catch:{ Exception -> 0x005e }\n r5 = \"network-policy\";\t Catch:{ Exception -> 0x005e }\n r6 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x005e }\n r6.<init>();\t Catch:{ Exception -> 0x005e }\n r7 = \"\";\t Catch:{ Exception -> 0x005e }\n r6.append(r7);\t Catch:{ Exception -> 0x005e }\n r6.append(r2);\t Catch:{ Exception -> 0x005e }\n r6 = r6.toString();\t Catch:{ Exception -> 0x005e }\n android.util.Log.e(r5, r6);\t Catch:{ Exception -> 0x005e }\n if (r1 == 0) goto L_0x0059;\n L_0x0056:\n r1.recycle();\n L_0x0059:\n if (r2 == 0) goto L_0x0080;\n L_0x005b:\n goto L_0x007d;\n L_0x005c:\n r5 = move-exception;\n goto L_0x0081;\n L_0x005e:\n r5 = move-exception;\n r6 = \"HwNetworkPolicy\";\t Catch:{ all -> 0x005c }\n r7 = new java.lang.StringBuilder;\t Catch:{ all -> 0x005c }\n r7.<init>();\t Catch:{ all -> 0x005c }\n r8 = \"setIfWhitelist-->\";\t Catch:{ all -> 0x005c }\n r7.append(r8);\t Catch:{ all -> 0x005c }\n r7.append(r5);\t Catch:{ all -> 0x005c }\n r7 = r7.toString();\t Catch:{ all -> 0x005c }\n android.util.Slog.e(r6, r7);\t Catch:{ all -> 0x005c }\n if (r1 == 0) goto L_0x007b;\n L_0x0078:\n r1.recycle();\n L_0x007b:\n if (r2 == 0) goto L_0x0080;\n L_0x007d:\n r2.recycle();\n L_0x0080:\n return;\n L_0x0081:\n if (r1 == 0) goto L_0x0086;\n L_0x0083:\n r1.recycle();\n L_0x0086:\n if (r2 == 0) goto L_0x008b;\n L_0x0088:\n r2.recycle();\n L_0x008b:\n throw r5;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.server.net.HwNetworkPolicyManagerService.setMeteredInterface(java.lang.String, boolean):void\");\n }", "@Test\n @ConnectionConfiguration(user = \"stranger\", password = \"1234567\")\n public void testServerSideCalls() {\n ManagementService service = ManagementService.getManagementService(server.getCache());\n MemberMXBean bean = service.getMemberMXBean();\n bean.compactAllDiskStores();\n }", "public ManagementInfo getManagementInfo() {\n return managementInfo;\n }", "@Test\n public void testConvertHalCellInfoList_1_2ForLTEWithEmptyMccMnc() {\n ArrayList<CellInfo> ret = getCellInfoListForLTE(\n String.valueOf(Integer.MAX_VALUE), String.valueOf(Integer.MAX_VALUE),\n ALPHA_LONG, ALPHA_SHORT);\n\n assertEquals(1, ret.size());\n CellInfoLte cellInfoLte = (CellInfoLte) ret.get(0);\n CellInfoLte expected = new CellInfoLte();\n expected.setRegistered(false);\n expected.setTimeStamp(TIMESTAMP);\n CellIdentityLte cil = new CellIdentityLte(\n CI, PCI, TAC, EARFCN, new int[] {}, BANDWIDTH, null, null, ALPHA_LONG,\n ALPHA_SHORT, Collections.emptyList(), null);\n CellSignalStrengthLte css = new CellSignalStrengthLte(\n RSSI, RSRP, RSRQ, RSSNR, CQI, TIMING_ADVANCE);\n expected.setCellIdentity(cil);\n expected.setCellSignalStrength(css);\n expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE);\n cellInfoLte.setTimeStamp(TIMESTAMP); // override the timestamp\n assertEquals(expected, cellInfoLte);\n }", "public void mo750t() throws RemoteException {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(\"android.support.v4.media.session.IMediaSession\");\n this.f822a.transact(19, obtain, obtain2, 0);\n obtain2.readException();\n } finally {\n obtain2.recycle();\n obtain.recycle();\n }\n }", "private void invokeSync()\n \t{\n if (iDeviceList.size() == 0)\n {\n System.out.println(\"No devices found, so nothing to test\");\n return;\n }\n CpDevice device = iDeviceList.get(0);\n System.out.println(\"\\n\\nSync call to device \" + device.getUdn());\n \n CpProxyUpnpOrgConnectionManager1 connMgr = new CpProxyUpnpOrgConnectionManager1(device);\n try {\n GetProtocolInfo points = connMgr.syncGetProtocolInfo();\n System.out.println(\"source is \" + points.getSource() + \"\\nsink is \" + points.getSink());\n } catch (ProxyError pe) { }\n connMgr.dispose();\n \t}", "public interface UserServiceInformationBase extends ISUPParameter {\n \t\n \t//for parameters list see ITU-T Q.763 (12/1999) 3.57\n \t//Recommendation Q.931 (05/98) Table 4-6/Q.931 Bearer capability information element\n \t//Dialogic User Service Information structure : http://www.dialogic.com/webhelp/NASignaling/Release%205.1/NA_ISUP_Layer_Dev_Ref_Manual/user_service_information.htm\n\n \t//LAYER IDENTIFIERS\n \tpublic static final int _LAYER1_IDENTIFIER=0x1;\n\n \tpublic static final int _LAYER2_IDENTIFIER=0x2;\n\n\tpublic static final int _LAYER3_IDENTIFIER=0x3;\n\n \t//CODING STANDART OPTIONS\n \tpublic static final int _CS_CCITT=0;\n \t\n \tpublic static final int _CS_INTERNATIONAL=1;\n \t\n \tpublic static final int _CS_NATIONAL=2;\n \t\n \tpublic static final int _CS_NETWORK=3;\n \t\n \t//INFORMATION TRANSFER CAPABILITIES OPTIONS\n \tpublic static final int _ITS_SPEECH=0;\n \t\n \tpublic static final int _ITS_UNRESTRICTED_DIGITAL=8;\n \t\n \tpublic static final int _ITS_RESTRICTED_DIGITAL=9;\n \t\n \tpublic static final int _ITS_3_1_KHZ=16;\n \t\n \tpublic static final int _ITS_UNRESTRICTED_DIGITAL_WITH_TONES=17;\n \t\n \tpublic static final int _ITS_VIDEO=24;\n \t\n \t//TRANSFER MODE OPTIONS\n \tpublic static final int _TM_CIRCUIT=0;\n \t\n \tpublic static final int _TM_PACKET=2;\n \t\n \t//INFORMATION TRANSFER RATE OPTIONS\n \tpublic static final int _ITR_PACKET_MODE=0;\n \t\n \tpublic static final int _ITR_64=16;\n \t\n \tpublic static final int _ITR_64x2=17;\n \t\n \tpublic static final int _ITR_384=19;\n \t\n \tpublic static final int _ITR_1536=21;\n \t\n \tpublic static final int _ITR_1920=23;\n \t\n \tpublic static final int _ITR_MULTIRATE=24;\n \t\n \t//SYNC/ASYNC OPTIONS\n \tpublic static final int _SA_SYNC=0;\n \t\n \tpublic static final int _SA_ASYNC=1;\n \t\n \t//NEGOTIATION OPTIONS\t\t\n \tpublic static final int _NG_INBAND_NOT_POSSIBLE=0;\n \t\n \tpublic static final int _NG_INBAND_POSSIBLE=1;\n \t\n \t//USER RATE OPTIONS\n \tpublic static final int _UR_EBITS=0;\n \t\n \tpublic static final int _UR_0_6=1;\n \t\n \tpublic static final int _UR_1_2=2;\n \t\n \tpublic static final int _UR_2_4=3;\n \t\n \tpublic static final int _UR_3_6=4;\n \t\n \tpublic static final int _UR_4_8=5;\n \t\n \tpublic static final int _UR_7_2=6;\n \t\n \tpublic static final int _UR_8_0=7;\n \t\n \tpublic static final int _UR_9_6=8;\n \t\n \tpublic static final int _UR_14_4=9;\n \t\n \tpublic static final int _UR_16_0=10;\n \t\n \tpublic static final int _UR_19_2=11;\n \t\n \tpublic static final int _UR_32_0=12;\n \t\n \tpublic static final int _UR_38_4=13;\n \t\n \tpublic static final int _UR_48_0=14;\n \t\n \tpublic static final int _UR_56_0=15;\n \t\n \tpublic static final int _UR_57_6=18;\n \t\n \tpublic static final int _UR_28_8=19;\n \t\n \tpublic static final int _UR_24_0=20;\n \t\n \tpublic static final int _UR_0_1345=21;\n \t\n \tpublic static final int _UR_0_1=22;\n \t\n \tpublic static final int _UR_0_075_ON_1_2=23;\n \t\n \tpublic static final int _UR_1_2_ON_0_075=24;\n \t\n \tpublic static final int _UR_0_050=25;\n \t\n \tpublic static final int _UR_0_075=26;\n \t\n \tpublic static final int _UR_0_110=27;\n \t\n \tpublic static final int _UR_0_150=28;\n \t\n \tpublic static final int _UR_0_200=29;\n \t\n \tpublic static final int _UR_0_300=30;\n \t\n \tpublic static final int _UR_12_0=31;\n \t\n \t//INTERMEDIATE RATE OPTIONS\n \tpublic static final int _IR_NOT_USED=0;\n \t\n \tpublic static final int _IR_8_0=1;\n \t\n \tpublic static final int _IR_16_0=2;\n \t\n \tpublic static final int _IR_32_0=3;\n \t\n \t//NETWORK INDEPENDENT CLOCK ON TX\n \tpublic static final int _NICTX_NOT_REQUIRED=0;\n \t\n \tpublic static final int _NICTX_REQUIRED=1;\n \t\n \t//NETWORK INDEPENDENT CLOCK ON RX\n \tpublic static final int _NICRX_CANNOT_ACCEPT=0;\n \t\n \tpublic static final int _NICRX_CAN_ACCEPT=1;\n \t\n \t//FLOW CONTROL ON TX\n \tpublic static final int _FCTX_NOT_REQUIRED=0;\n \t\n \tpublic static final int _FCTX_REQUIRED=1;\n \t\n \t//FLOW CONTROL ON RX\n \tpublic static final int _FCRX_CANNOT_ACCEPT=0;\n \t\n \tpublic static final int _FCRX_CAN_ACCEPT=1;\n \t\n \t//RATE ADAPTATION HEADER OPTIONS\n \tpublic static final int _HDR_INCLUDED=0;\n \t\n \tpublic static final int _HDR_NOT_INCLUDED=1;\n \t\n \t//MULTIFRAME OPTIONS\n \tpublic static final int _MF_NOT_SUPPORTED=0;\n \t\n \tpublic static final int _MF_SUPPORTED=1;\n \t\n \t//MODE OPTIONS\n \tpublic static final int _MODE_BIT_TRANSPARENT=0;\n \t\n \tpublic static final int _MODE_PROTOCOL_SENSITIVE=1;\n \t\n \t//LOGICAL LINK IDENTIFIER OPTIONS\n \tpublic static final int _LLI_256=0;\n \t\n \tpublic static final int _LLI_FULL_NEGOTIATION=1;\n \t\n \t//ASSIGNOR / ASSIGNEE OPTIONS\n \tpublic static final int _ASS_DEFAULT_ASSIGNEE=0;\n \t\n \tpublic static final int _ASS_ASSIGNOR_ONLY=1;\n \t\n \t//INBAND/OUT OF BAND NEGOTIATION OPTIONS\n \tpublic static final int _NEG_USER_INFORMATION=0;\n \t\t\n \tpublic static final int _NEG_INBAND=1;\n \t\t\n \t//STOP BITS OPTIONS\n \tpublic static final int _SB_NOT_USED=0;\n \t\n \tpublic static final int _SB_1BIT=1;\n \t\n \tpublic static final int _SB_1_5BITS=2;\n \t\n \tpublic static final int _SB_2BITS=3;\n \t\n \t//DATA BITS OPTIONS\n \tpublic static final int _DB_NOT_USED=0;\n \t\t\n \tpublic static final int _DB_5BITS=1;\n \t\t\n \tpublic static final int _DB_7BITS=2;\n \t\t\n \tpublic static final int _DB_8BITS=3;\n \t\t\n \t//PARITY INFORMATION\n \tpublic static final int _PAR_ODD=0;\n \t\t\t\n \tpublic static final int _PAR_EVEN=2;\n \t\t\t\n \tpublic static final int _PAR_NONE=3;\n \t\t\n \tpublic static final int _PAR_FORCED_0=4;\n \t\t\n \tpublic static final int _PAR_FORCED_1=5;\n \t\n \t//DUPLEX INFORMATION\n \tpublic static final int _DUP_HALF=0;\n \t\n \tpublic static final int _DUP_FULL=1;\n \t\t\t\n \t//MODEM TYPE INFORMATION\n \tpublic static final int _MODEM_V21=17;\n \t\n \tpublic static final int _MODEM_V22=18;\n \t\n \tpublic static final int _MODEM_V22_BIS=19;\n \t\n \tpublic static final int _MODEM_V23=20;\n \t\n \tpublic static final int _MODEM_V26=21;\n \t\n \tpublic static final int _MODEM_V26_BIS=22;\n \t\n \tpublic static final int _MODEM_V26_TER=23;\n \t\n \tpublic static final int _MODEM_V27=24;\n \t\n \tpublic static final int _MODEM_V27_BIS=25;\n \t\n \tpublic static final int _MODEM_V27_TER=26;\n \t\n \tpublic static final int _MODEM_V29=27;\n \t\n \tpublic static final int _MODEM_V32=29;\n \t\n \tpublic static final int _MODEM_V34=30;\n \t\n \t//LAYER 1 USER INFORMATION OPTIONS\n \tpublic static final int _L1_ITUT_110=1;\n \t\n \tpublic static final int _L1_G11_MU=2;\n \t\n \tpublic static final int _L1_G711_A=3;\n \t\n \tpublic static final int _L1_G721_ADPCM=4;\n \t\t\n \tpublic static final int _L1_G722_G725=5;\n \t\n \tpublic static final int _L1_H261=6;\n \t\n \tpublic static final int _L1_NON_ITUT=7;\n \t\n \tpublic static final int _L1_ITUT_120=8;\n \t\n \tpublic static final int _L1_ITUT_X31=9;\n \t\n \t//LAYER 2 USER INFORMATION OPTIONS\n \tpublic static final int _L2_BASIC=1;\n \t\n \tpublic static final int _L2_Q921=2;\n \t\n \tpublic static final int _L2_X25_SLP=6;\n \t\n \tpublic static final int _L2_X25_MLP=7;\n \t\n \tpublic static final int _L2_T71=8;\n \t\n \tpublic static final int _L2_HDLC_ARM=9;\n \t\n \tpublic static final int _L2_HDLC_NRM=10;\n \t\n \tpublic static final int _L2_HDLC_ABM=11;\n \t\n \tpublic static final int _L2_LAN_LLC=12;\n \t\n \tpublic static final int _L2_X75_SLP=13;\n \t\n \tpublic static final int _L2_Q922=14;\n \t\n \tpublic static final int _L2_USR_SPEC=16;\n \t\n \tpublic static final int _L2_T90=17;\n \t\n \t\n \t//LAYER 3 USER INFORMATION OPTIONS\n \tpublic static final int _L3_Q931=2;\n \t\n \tpublic static final int _L3_T90=5;\n \t\n \tpublic static final int _L3_X25_PLP=6;\n \t\n \tpublic static final int _L3_ISO_8208=7;\n \t\n \tpublic static final int _L3_ISO_8348=8;\n \t\n \tpublic static final int _L3_ISO_8473=9;\n \t\n \tpublic static final int _L3_T70=10;\n \t\n \tpublic static final int _L3_ISO_9577=11;\n \t\n \tpublic static final int _L3_USR_SPEC=16;\n \t\n \t\n \t//LAYER 3 PROTOCOL OPTIONS;\n \tpublic static final int _L3_PROT_IP=204;\n \t\n \tpublic static final int _L3_PROT_P2P=207;\n \t\n \tpublic int getCodingStandart();\n \n \tpublic void setCodingStandart(int codingStandart);\n \t\n \tpublic int getInformationTransferCapability();\n \n \tpublic void setInformationTransferCapability(int informationTransferCapability);\n \n \tpublic int getTransferMode();\n \n \tpublic void setTransferMode(int transferMode);\n \t\n \tpublic int getInformationTransferRate();\n \n \tpublic void setInformationTransferRate(int informationTransferRate);\n \t\n \t//custom rate in 64Kbps units\n \tpublic int getCustomInformationTransferRate();\n \t\n \tpublic void setCustomInformationTransferRate(int informationTransferRate);\n \t\n \t//TO CLEAR USER INFORMATION ON EACH LAYER SET IT TO 0\n \tpublic int getL1UserInformation();\n \n \tpublic void setL1UserInformation(int l1UserInformation);\n \t\n \tpublic int getL2UserInformation();\n \n \tpublic void setL2UserInformation(int l2UserInformation);\n \t\n \tpublic int getL3UserInformation();\n \n \tpublic void setL3UserInformation(int l3UserInformation);\n \t\n \tpublic int getSyncMode();\n \n \tpublic void setSyncMode(int syncMode);\n \t\n \tpublic int getNegotiation();\n \n \tpublic void setNegotiation(int negotiation);\n \t\n \tpublic int getUserRate();\n \n \tpublic void setUserRate(int userRate);\n \t\n \tpublic int getIntermediateRate();\n \n \tpublic void setIntermediateRate(int intermediateRate);\n \t\n \tpublic int getNicOnTx();\n \n \tpublic void setNicOnTx(int nicOnTx);\n \t\n \tpublic int getNicOnRx();\n \n \tpublic void setNicOnRx(int nicOnRx);\n \t\n \tpublic int getFlowControlOnTx();\n \n \tpublic void setFlowControlOnTx(int fcOnTx);\n \t\n \tpublic int getFlowControlOnRx();\n \n \tpublic void setFlowControlOnRx(int fcOnRx);\n \t\n \tpublic int getHDR();\n \n \tpublic void setHDR(int hdr);\n \t\n \tpublic int getMultiframe();\n \n \tpublic void setMultiframe(int multiframe);\n \t\n \tpublic int getMode();\n \n \tpublic void setMode(int mode);\n \t\n \tpublic int getLLINegotiation();\n \n \tpublic void setLLINegotiation(int lli);\n \t\n \tpublic int getAssignor();\n \n \tpublic void setAssignor(int assignor);\n \t\n \tpublic int getInBandNegotiation();\n \n \tpublic void setInBandNegotiation(int inBandNegotiation);\n \t\n \tpublic int getStopBits();\n \n \tpublic void setStopBits(int stopBits);\n \t\n \tpublic int getDataBits();\n \n \tpublic void setDataBits(int dataBits);\n \t\n \tpublic int getParity();\n \n \tpublic void setParity(int parity);\n \t\n \tpublic int getDuplexMode();\n \n \tpublic void setDuplexMode(int duplexMode);\n \t\n \tpublic int getModemType();\n \n \tpublic void setModemType(int modemType);\n \t\n \tpublic int getL3Protocol();\n \n \tpublic void setL3Protocol(int l3Protocol);\n \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 }", "@Test\r\n public void info() throws Exception {\r\n //Provider Info\r\n assertProviderInfo(mManager, PROVIDER_URN,\r\n new String[]{ModuleURN.class.getName()}, new Class[]{ModuleURN.class},\r\n Messages.PROVIDER_DESCRIPTION.getText(),\r\n true, true);\r\n //Create a module and test its info\r\n ModuleURN instanceURN = new ModuleURN(PROVIDER_URN, \"mymodule\");\r\n assertEquals(instanceURN, mManager.createModule(\r\n PROVIDER_URN,\r\n instanceURN));\r\n assertModuleInfo(mManager, instanceURN, ModuleState.STARTED, null,\r\n null, false, true, true, true, false);\r\n //verify that the module has no flow attributes.\r\n assertTrue(getAttributes(instanceURN).isEmpty());\r\n //Stop and Delete the module\r\n mManager.stop(instanceURN);\r\n mManager.deleteModule(instanceURN);\r\n }", "@Override\r\n\tpublic void tvRemote() {\n\t\tSystem.out.println(\"불가능\");\r\n\t}", "@Test\r\n public void testFillersAssociated() {\r\n System.out.println(\"FillersAssociated - metalName = ''\");\r\n String metalName = \"\";\r\n List<String> result = KnowledgeSystemBeanInterface.FillersAssociated(metalName);\r\n ArrayList<String> results = new ArrayList<String>();\r\n assertEquals(result, results);\r\n System.out.println(\"testFillersAssociated ---------------------------------------------------- Done\");\r\n }", "@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}", "public void transferWrite( String sContract,String sMchCode,String sMchNameDes,String sMchCodeCont,String sTestPointId,String sPmNo,String pmDescription,String insNote) \n {\n ASPManager mgr = getASPManager();\n String repby=null;\n\n cmd = trans.addEmptyCommand(\"HEAD\",\"FAULT_REPORT_API.New__\",headblk);\n cmd.setOption(\"ACTION\",\"PREPARE\");\n trans = mgr.perform(trans);\n data = trans.getBuffer(\"HEAD/DATA\");\n\n trans.clear();\n cmd = trans.addCustomFunction(\"GETUSER\",\"Fnd_Session_API.Get_Fnd_User\",\"ISUSER\");\n\n cmd = trans.addCustomFunction(\"GETREPBY\",\"Person_Info_API.Get_Id_For_User\",\"REPORTED_BY\");\n cmd.addReference(\"ISUSER\",\"GETUSER/DATA\");\n\n cmd = trans.addCustomFunction(\"REPBYID\",\"Company_Emp_API.Get_Max_Employee_Id\",\"REPORTED_BY_ID\");\n cmd.addParameter(\"COMPANY\",data.getFieldValue(\"COMPANY\"));\n cmd.addReference(\"REPORTED_BY\",\"GETREPBY/DATA\");\n\n trans = mgr.perform(trans);\n repby = trans.getValue(\"GETREPBY/DATA/REPORTED_BY\");\n reportById = trans.getValue(\"REPBYID/DATA/REPORTED_BY_ID\");\n\n data.setValue(\"REPORTED_BY\",repby);\n data.setValue(\"REPORTED_BY_ID\",reportById);\n data.setValue(\"CONTRACT\",sContract);\n data.setValue(\"MCH_CODE\",sMchCode);\n data.setValue(\"MCH_CODE_DESCRIPTION\",sMchNameDes);\n data.setValue(\"MCH_CODE_CONTRACT\",sMchCodeCont);\n data.setValue(\"TEST_POINT_ID\",sTestPointId);\n data.setValue(\"PM_NO\",sPmNo);\n data.setValue(\"PM_DESCR\",pmDescription);\n data.setValue(\"NOTE\",insNote);\n //Bug 76003, start\n data.setValue(\"CONNECTION_TYPE_DB\",\"EQUIPMENT\");\n //Bug 76003, end\n\n headset.addRow(data);\n }", "public void updateAmmetersById(Ammeter ammeter) {\n String flag=\"\";\n //System.out.println(String.format(\"%1$04x\", 123));\n String pn_old_string=\"\" , addr_old_string=\"\";\n int pn_old_int=0 , addr_old_int=0;\n if(ammeter.getGatewayid() != null){\n flag=flag+\",F_GATEWAYS_UUID=\"+\"'\"+ammeter.getGatewayid()+\"'\";\n }\n if(ammeter.getPn() != 0){\n flag=flag+\",F_PN=\"+ammeter.getPn()+\",F_NUMBER=\"+ammeter.getPn();\n pn_old_string = \"F_PN=\"+ammeter.getPn()+\",F_NUMBER=\"+ammeter.getPn();\n pn_old_int = ammeter.getPn();\n }\n if(ammeter.getPort() != 0){\n if(ammeter.getSpeed()!=0){\n if(ammeter.getPort() == 15)\n flag=flag+\",F_SPEED_PORT=31\";\n else {\n flag=flag+\",F_SPEED_PORT=\"+(ammeter.getPort()+ammeter.getSpeed());\n }\n }\n else{\n flag=flag+\",F_SPEED_PORT=bitand(F_SPEED_PORT,240)+\"+ammeter.getPort();//&0xf0后再加上port的值\n }\n\n }\n else if(ammeter.getSpeed()!=0){//如果当前仅进行设置波特率,此时不需要考虑speed=15 无需设置的情况\n flag=flag+\",F_SPEED_PORT=bitand(F_SPEED_PORT,15)+\"+ammeter.getSpeed();//&0x0f后再加上speed的值\n }\n\n if(ammeter.getProtocol() != 0){\n flag=flag+\",F_PROTOCOL=\"+ammeter.getProtocol();\n }\n if(ammeter.getAddress() != null){\n flag=flag+\",F_ADDRESS=\"+\"'\"+ammeter.getAddress().toUpperCase()+\"'\";\n addr_old_string = \"F_ADDRESS=\"+\"'\"+ammeter.getAddress().toUpperCase()+\"'\";\n addr_old_int = Integer.parseInt(ammeter.getAddress().toUpperCase(), 16);\n }\n if(ammeter.getPassword() != null){\n flag=flag+\",F_PASSWORD=\"+\"'\"+ammeter.getPassword()+\"'\";\n }\n if(ammeter.getRatecount() != 99999999){\n flag=flag+\",F_RATE_COUNT=\"+ammeter.getRatecount();\n }\n if(ammeter.getDataformat() != 99999999){\n flag=flag+\",F_DATA_FORMAT=\"+ammeter.getDataformat();\n }\n if(ammeter.getClassnumber() != 99999999){\n flag=flag+\",F_CLASS_NUMBER=\"+ammeter.getClassnumber();\n }\n if(ammeter.getLast_15() != null){\n flag = flag+\",F_LAST_15=to_date('\"+ammeter.getLast_15()+\"','YYYY-MM-dd HH24:mi')\";\n }\n if(ammeter.getLast_day() != null){\n flag = flag+\",F_LAST_DAY=to_date('\"+ammeter.getLast_day()+\"','YYYY-MM-dd')\";\n }\n if(ammeter.getLast_mon() != null){\n flag = flag+\",F_LAST_MON=to_date('\"+ammeter.getLast_mon()+\"','YYYY-MM')\";\n }\n if(ammeter.getRemarkinfo() != null){\n flag = flag+\",F_REMARKINFO='\"+ammeter.getRemarkinfo()+\"'\";\n }\n\n flag=flag.substring(1);\n //根据uuid进行数据更新\n String sql=\"update T_BE_AMMETER set \"+flag+\" ,F_IS_CHANGED=?,F_NEED_OPEN_TRG=0 where F_UUID=?\";//需要把时间拷贝到ecsstemp表里去,需要触发触发器!因此将F_NEED_OPEN_TRG放到update下,具体的值无所谓!!!\n String[] uuid=ammeter.getUuid().split(\",\");\n String pn_next_string=\"\" , addr_next_string=\"\";\n int pn_next_int=0 , addr_next_int=0;\n int need_set_cmd=0;\n for(int i=0;i<uuid.length;i++){\n if(pn_old_int != 0){\n pn_next_int = pn_old_int + i;\n pn_next_string = \"F_PN=\"+pn_next_int+\",F_NUMBER=\"+pn_next_int;\n sql=sql.replace(pn_old_string, pn_next_string);\n pn_old_string=pn_next_string;\n }\n\n if(addr_old_int != 0){\n addr_next_int = addr_old_int + i;\n addr_next_string = \"F_ADDRESS=\"+\"'\"+String.format(\"%1$012x\", addr_next_int).toUpperCase()+\"'\";\n sql=sql.replace(addr_old_string, addr_next_string);\n addr_old_string=addr_next_string;\n }\n if(uuid[i].split(\":\")[1].equals(\"1\")){\n need_set_cmd = 1;\n }\n Object[] args={uuid[i].split(\":\")[1],uuid[i].split(\":\")[0]};\n jdbcTemplate.update(sql,args);\n }\n if(need_set_cmd == 1){\n sql=\"insert into t_tasks(F_UUID,F_TYPE,F_FLAG) values(SYS_GUID(),'3','1')\";\n jdbcTemplate1.update(sql);\n sql=\"insert into t_tasks(F_UUID,F_TYPE_BACKUP,F_FLAG_BACKUP) values(SYS_GUID(),'3','1')\";\n jdbcTemplate1.update(sql);\n }\n\n }", "@Test\r\n\tpublic void eac_infoTest_25() throws IOException, URISyntaxException,\r\n\t\t\tGeneralSecurityException {\r\n\t\tfinal TestSpy spy = new TestSpy();\r\n\r\n\t\tfinal URL tcTokenURL = new URL(serviceURL);\r\n\r\n\t\tMockUp<EAC_Info> mockUp = new MockUp<EAC_Info>() {\r\n\t\t\t@Mock\r\n\t\t\tpublic byte[] getAuxiliaryData(mockit.Invocation inv) {\r\n\r\n\t\t\t\ttry {\r\n\r\n\t\t\t\t\tfinal byte[] auxiliaryData = inv.proceed();\r\n\t\t\t\t\tassertNotNull(\"auxiliaryData is null.\", auxiliaryData);\r\n\t\t\t\t\treturn auxiliaryData;\r\n\r\n\t\t\t\t} catch (final AssertionError ae) {\r\n\t\t\t\t\tspy.setStringValue(ae.getMessage());\r\n\t\t\t\t\tthrow new AssertionError(ae.getMessage(), ae);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfinal String refreshURL = ECardWorker.start(tcTokenURL);\r\n\t\tassertNotNull(\"no refresh URL\", refreshURL);\r\n\r\n\t\tif (spy.getStringValue() != null\r\n\t\t\t\t&& !spy.getStringValue().trim().isEmpty()) {\r\n\t\t\tmockUp.tearDown();\r\n\t\t\tfail(spy.getStringValue());\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"refreshURL: \" + refreshURL);\r\n\t\tconnectToRefreshURL(refreshURL, true);\r\n\t\tmockUp.tearDown();\r\n\r\n\t}", "private final void m75326a(KmMixtapeDetailInfo kmMixtapeDetailInfo) {\n m75351f().mo77911g();\n this.f53734l = kmMixtapeDetailInfo;\n String str = kmMixtapeDetailInfo.catalog.type;\n C32569u.m150513a((Object) str, C6969H.m41409d(\"G6D86C11BB63C8227E001DE4BF3F1C2DB66849B0EA620AE\"));\n this.f53735m = str;\n m75327a(m75353g());\n this.f53741t = m75353g().mo78084a(LoadState.NO_LOADING, (String) null, (Boolean) null, C6969H.m41409d(\"G6E8FDA18BE3C9420E216\"));\n m75351f().mo77903a(m75342c(), this.f53735m);\n m75337b(m75353g());\n m75345c(m75353g());\n this.f53729g.compose(RxLifecycleAndroid.m49793b(lifecycle())).observeOn(AndroidSchedulers.m147557a()).subscribe(new C15210t(this));\n KmMixtapeDetailInfo.CatalogBean catalogBean = kmMixtapeDetailInfo.catalog;\n C32569u.m150513a((Object) catalogBean, C6969H.m41409d(\"G6D86C11BB63C8227E001DE4BF3F1C2DB6684\"));\n m75325a(catalogBean);\n }", "public interface MiniPowerPCUIIfc {\n //TODO Initializing the Memory Tabel needs a separate methode\n \n /**\n * Sets the Text in the Textfield of the Akkumulator\n */\n public void setAkku(String inMemoryEntry);\n /**\n * Sets the Text in the Textfield of the Register1\n */\n public void setReg1(String inMemoryEntry);\n /**\n * Sets the Text in the Textfield of the Register2\n */\n public void setReg2(String inMemoryEntry);\n /**\n * Sets the Text in the Textfield of the Register3\n */\n public void setReg3(String inMemoryEntry);\n /**\n * Sets the Text in the Textfield of the Befehlszähler\n */\n public void setBefZ(String inMemoryEntry);\n \n /**\n * Sets the String in the Mnemonic-Column and the Value-Column in the Befehlsregister\n */\n public void setBefReg(String inMnemonic, String inValue);\n \n /**\n * Sets the String in the Mnemonic-Column and the Value-Column in the Befehlsregister\n */\n public void setMemoryEntries(MemoryEntry[] inMemory);\n \n \n /**\n * Sets the String in the Textfield of the \"Anzahl durchgeführter Befehle\"\n */\n public void setCountBef(String inMemoryEntry);\n \n /**\n * Sets the Text in the Textfield of the Befehlszähler\n */\n public void setCarryBit(String inMemoryEntry);\n\n /**\n * Returns True, if the Binary Exposition is selected. If Decimal Exposition\n * is selected the Method returns false.\n */\n public boolean isBinaryExpositionSelected();\n \n /**\n * Eventually there might be needed a Method to notify the GUI that the Simulation\n * is finished\n */\n //public void onSimulationFinished();\n}", "public de.epages.ws.product.model.TGetInfo_Return[] getInfo(java.lang.String[] products, java.lang.String[] attributes, java.lang.String[] languageCodes) throws java.rmi.RemoteException;", "@Test\n public void testPassingFootstepData() throws IOException\n {\n Random random = new Random(5642769L);\n\n // setup comms\n NetworkPorts port = NetworkPorts.createRandomTestPort(random);\n // QueueBasedStreamingDataProducer<FootstepData> queueBasedStreamingDataProducer = new QueueBasedStreamingDataProducer<FootstepData>(\"FootstepData\");\n PacketCommunicator tcpServer = createAndStartStreamingDataTCPServer(port);\n FootstepDataConsumer footstepDataConsumer = new FootstepDataConsumer();\n PacketCommunicator tcpClient = createStreamingDataConsumer(FootstepDataMessage.class, footstepDataConsumer, port);\n ThreadTools.sleep(SLEEP_TIME);\n // queueBasedStreamingDataProducer.startProducingData();\n\n // create test footsteps\n ArrayList<Footstep> sentFootsteps = createRandomFootsteps(50);\n for (Footstep footstep : sentFootsteps)\n {\n FootstepDataMessage footstepData = HumanoidMessageTools.createFootstepDataMessage(footstep);\n tcpServer.send(footstepData);\n // queueBasedStreamingDataProducer.queueDataToSend(footstepData);\n }\n\n ThreadTools.sleep(SLEEP_TIME);\n\n tcpClient.disconnect();\n tcpServer.disconnect();\n\n // verify received correctly\n ArrayList<Footstep> receivedFootsteps = footstepDataConsumer.getReconstructedFootsteps();\n\n compareFootstepsSentWithReceived(sentFootsteps, receivedFootsteps);\n }", "@Override\n public final boolean checkMachine(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) {\n return checkMachine_EM(iGregTechTileEntity, itemStack);\n }", "public org.tempuri.HISWebServiceStub.GetChargetariffResponse getChargetariff(\r\n org.tempuri.HISWebServiceStub.GetChargetariff getChargetariff38)\r\n throws java.rmi.RemoteException {\r\n org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\r\n\r\n try {\r\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[19].getName());\r\n _operationClient.getOptions()\r\n .setAction(\"http://tempuri.org/GetChargetariff\");\r\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\r\n\r\n addPropertyToOperationClient(_operationClient,\r\n org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\r\n \"&\");\r\n\r\n // create SOAP envelope with that payload\r\n org.apache.axiom.soap.SOAPEnvelope env = null;\r\n\r\n env = toEnvelope(getFactory(_operationClient.getOptions()\r\n .getSoapVersionURI()),\r\n getChargetariff38,\r\n optimizeContent(\r\n new javax.xml.namespace.QName(\"http://tempuri.org/\",\r\n \"getChargetariff\")),\r\n new javax.xml.namespace.QName(\"http://tempuri.org/\",\r\n \"GetChargetariff\"));\r\n\r\n //adding SOAP soap_headers\r\n _serviceClient.addHeadersToEnvelope(env);\r\n // set the message context with that soap envelope\r\n _messageContext.setEnvelope(env);\r\n\r\n // add the message contxt to the operation client\r\n _operationClient.addMessageContext(_messageContext);\r\n\r\n //execute the operation client\r\n _operationClient.execute(true);\r\n\r\n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\r\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\r\n\r\n java.lang.Object object = fromOM(_returnEnv.getBody()\r\n .getFirstElement(),\r\n org.tempuri.HISWebServiceStub.GetChargetariffResponse.class);\r\n\r\n return (org.tempuri.HISWebServiceStub.GetChargetariffResponse) object;\r\n } catch (org.apache.axis2.AxisFault f) {\r\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\r\n\r\n if (faultElt != null) {\r\n if (faultExceptionNameMap.containsKey(\r\n new org.apache.axis2.client.FaultMapKey(\r\n faultElt.getQName(), \"GetChargetariff\"))) {\r\n //make the fault by reflection\r\n try {\r\n java.lang.String exceptionClassName = (java.lang.String) faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(\r\n faultElt.getQName(), \"GetChargetariff\"));\r\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\r\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(java.lang.String.class);\r\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\r\n\r\n //message class\r\n java.lang.String messageClassName = (java.lang.String) faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(\r\n faultElt.getQName(), \"GetChargetariff\"));\r\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\r\n java.lang.Object messageObject = fromOM(faultElt,\r\n messageClass);\r\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\r\n new java.lang.Class[] { messageClass });\r\n m.invoke(ex, new java.lang.Object[] { messageObject });\r\n\r\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\r\n } catch (java.lang.ClassCastException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.ClassNotFoundException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.NoSuchMethodException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.reflect.InvocationTargetException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.IllegalAccessException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.InstantiationException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n }\r\n } else {\r\n throw f;\r\n }\r\n } else {\r\n throw f;\r\n }\r\n } finally {\r\n if (_messageContext.getTransportOut() != null) {\r\n _messageContext.getTransportOut().getSender()\r\n .cleanup(_messageContext);\r\n }\r\n }\r\n }", "public SharedMemory infos();", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"system protocol handler\", \"system protocol handler\", (Content) null, 0.0F, 0.0F, \"\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-1970), homeTexture0, 3, homeTexture0, 11, (-1970));\n homeEnvironment0.setPhotoQuality(1260);\n int int0 = homeEnvironment0.getPhotoQuality();\n assertEquals(1260, int0);\n }", "@Test\n public void testMetatypeInformationTestBundle() throws IOException, InterruptedException\n {\n MessageListener listener = new MessageListener(socket);\n\n //install test bundle\n final long testBundleId = BundleNamespaceUtils.installBundle(\n ResourceUtils.getExampleProjectBundleFile(), \"test.RemoteInterface.bundle\", false, socket);\n\n //register to listen to event\n int regId = RemoteEventRegistration.regRemoteEventMessages(\n socket, RemoteMetatypeConstants.TOPIC_METATYPE_INFORMATION_AVAILABLE);\n\n //construct request to start bundle\n StartRequestData requestStart = StartRequestData.newBuilder().setBundleId(testBundleId).build();\n TerraHarvestMessage message = \n BundleNamespaceUtils.createBundleMessage(requestStart, BundleMessageType.StartRequest);\n\n //send message\n message.writeDelimitedTo(socket.getOutputStream());\n\n //listen for response\n try\n {\n listener.waitForMessage(Namespace.EventAdmin, EventAdminMessageType.SendEvent, TIME_OUT);\n fail(\"Expected exception because we do not expect a message.\");\n }\n catch (AssertionError e)\n {\n //expecting exception\n }\n\n //unreg listener\n MessageListener.unregisterEvent(regId, socket);\n\n //uninstall bundle\n BundleNamespaceUtils.uninstallBundle(testBundleId, socket);\n }", "protected abstract SharedMemory make_infos();", "public interface TestMBean {\n\n /**\n * Returns the value of a string attribute.\n * \n * @return String\n */\n public String getStringAttribute();\n\n /**\n * Returns the value of a double attribute.\n * \n * @return Double\n */\n public Double getDoubleAttribute();\n\n /**\n * Returns the value of a float attribute.\n * \n * @return Float\n */\n public Float getFloatAttribute();\n\n /**\n * Returns the value of a long integer attribute.\n * \n * @return Long\n */\n public Long getLongAttribute();\n\n /**\n * Returns the value of a integer attribute.\n * \n * @return Integer\n */\n public Integer getIntegerAttribute();\n\n /**\n * Returns the value of a short attribute.\n * \n * @return Short\n */\n public Short getShortAttribute();\n\n /**\n * Returns the value of a byte attribute.\n * \n * @return Byte\n */\n public Byte getByteAttribute();\n\n /**\n * Returns the value of a big integer attribute.\n * \n * @return BigInteger\n */\n public BigInteger getBigIntegerAttribute();\n\n /**\n * Returns the value of a big decimal attribute.\n * \n * @return BigDecimal\n */\n public BigDecimal getBigDecimalAttribute();\n\n /**\n * Returns the value of a boolean attribute.\n * \n * @return Boolean\n */\n public Boolean getBooleanAttribute();\n\n /**\n * Returns a structured data attribute.\n * \n * @return StructuredData\n */\n public StructuredData getStructuredDataAttribute();\n\n /**\n * Returns an attribute with a data type that is invalid for the check_jmx plugin.\n * \n * @return String[]\n */\n public String[] getInvalidAttribute();\n\n /**\n * Returns an attribute with an invalid numeric type.\n * \n * @return Fraction\n */\n public Fraction getInvalidNumberAttribute();\n\n /**\n * Returns a null attribute value.\n * \n * @return String\n */\n public String getNullAttribute();\n\n /**\n * Operation that can be called as part of the check_jmx plugin flow.\n */\n public void testOperation();\n\n}", "@Test\n public void testOncoKBInfo() {\n // TODO: test OncoKBInfo\n }", "public interface MetalFragmentCommunicator {\n void updateThickness();\n}", "@Test\r\n public void simpleFlowAndJMX() throws Exception {\r\n ModuleURN instanceURN = new ModuleURN(PROVIDER_URN, \"mymodule\");\r\n //Set up the data\r\n Object []requestParm = {BigDecimal.ONE, 2, \"three\"};\r\n CopierModule.SynchronousRequest req =\r\n new CopierModule.SynchronousRequest(requestParm);\r\n req.semaphore.acquire();\r\n //Set up the sink listener\r\n BlockingSinkDataListener listener = new BlockingSinkDataListener();\r\n mManager.addSinkListener(listener);\r\n //Create the data flow.\r\n DataFlowID flowID = mManager.createDataFlow(new DataRequest[]{\r\n new DataRequest(CopierModuleFactory.INSTANCE_URN,\r\n req),\r\n new DataRequest(instanceURN, null)\r\n });\r\n //wait for the data to be emitted.\r\n req.semaphore.acquire();\r\n //wait for the data to be received\r\n for(Object o: requestParm) {\r\n assertEquals(o, listener.getNextData());\r\n }\r\n //verify the flow info\r\n DataFlowInfo flowInfo = mManager.getDataFlowInfo(flowID);\r\n assertFlowInfo(flowInfo, flowID, 3, true, false, null, null);\r\n //verify the last 2 flow steps\r\n assertFlowStep(flowInfo.getFlowSteps()[1], instanceURN, true, 3, 0,\r\n null, true, 3, 0, null, instanceURN, null);\r\n assertFlowStep(flowInfo.getFlowSteps()[2],\r\n SinkModuleFactory.INSTANCE_URN, false, 0, 0, null, true, 3, 0,\r\n null, SinkModuleFactory.INSTANCE_URN, null);\r\n //verify the module info to double check that it's auto-created.\r\n assertModuleInfo(mManager, instanceURN, ModuleState.STARTED, null,\r\n new DataFlowID[]{flowID}, true, true, true, true, false);\r\n //verify JMX MXBean Info\r\n final ObjectName on = instanceURN.toObjectName();\r\n final MBeanServer beanServer = getMBeanServer();\r\n assertTrue(beanServer.isRegistered(on));\r\n MBeanInfo beanInfo = beanServer.getMBeanInfo(on);\r\n assertEquals(SimpleAsyncProcessor.class.getName(), beanInfo.getClassName());\r\n assertEquals(Messages.JMX_MXBEAN_DESCRIPTION.getText(), beanInfo.getDescription());\r\n assertEquals(0, beanInfo.getOperations().length);\r\n assertEquals(0, beanInfo.getConstructors().length);\r\n assertEquals(0, beanInfo.getNotifications().length);\r\n assertEquals(0, beanInfo.getDescriptor().getFieldNames().length);\r\n MBeanAttributeInfo[] attributeInfos = beanInfo.getAttributes();\r\n assertEquals(1, attributeInfos.length);\r\n final String validAttribute = SimpleAsyncProcessor.ATTRIB_PREFIX + flowID;\r\n assertEquals(validAttribute, attributeInfos[0].getName());\r\n assertEquals(Integer.class.getName(), attributeInfos[0].getType());\r\n assertEquals(Messages.JMX_ATTRIBUTE_FLOW_CNT_DESCRIPTION.getText(flowID), attributeInfos[0].getDescription());\r\n assertEquals(0, attributeInfos[0].getDescriptor().getFieldNames().length);\r\n assertFalse(attributeInfos[0].isIs());\r\n assertFalse(attributeInfos[0].isWritable());\r\n assertTrue(attributeInfos[0].isReadable());\r\n \r\n //verify Attributes\r\n Object value = beanServer.getAttribute(on, SimpleAsyncProcessor.ATTRIB_PREFIX + flowID);\r\n assertEquals((Integer)0, (Integer)value);\r\n final String invalidAttribute = SimpleAsyncProcessor.ATTRIB_PREFIX + 1;\r\n new ExpectedFailure<AttributeNotFoundException>(invalidAttribute){\r\n @Override\r\n protected void run() throws Exception {\r\n beanServer.getAttribute(on, invalidAttribute);\r\n }\r\n };\r\n new ExpectedFailure<AttributeNotFoundException>(\"blah\"){\r\n @Override\r\n protected void run() throws Exception {\r\n beanServer.getAttribute(on, \"blah\");\r\n }\r\n };\r\n AttributeList attribList = beanServer.getAttributes(on,\r\n new String[]{validAttribute, invalidAttribute});\r\n assertEquals(1, attribList.size());\r\n assertEquals(new Attribute(validAttribute, 0), attribList.get(0));\r\n new ExpectedFailure<AttributeNotFoundException>(){\r\n @Override\r\n protected void run() throws Exception {\r\n beanServer.setAttribute(on, new Attribute(validAttribute, 34));\r\n }\r\n };\r\n new ExpectedFailure<AttributeNotFoundException>(){\r\n @Override\r\n protected void run() throws Exception {\r\n beanServer.setAttribute(on, new Attribute(invalidAttribute, 34));\r\n }\r\n };\r\n AttributeList list = new AttributeList(Arrays.asList(\r\n new Attribute(validAttribute, 12),\r\n new Attribute(invalidAttribute, 13)\r\n ));\r\n assertEquals(0, beanServer.setAttributes(on, list).size());\r\n //verify no operations can be performed\r\n ReflectionException excpt = new ExpectedFailure<ReflectionException>() {\r\n @Override\r\n protected void run() throws Exception {\r\n beanServer.invoke(on, \"getQueueSizes\", null, null);\r\n }\r\n }.getException();\r\n assertTrue(excpt.toString(), excpt.getCause() instanceof NoSuchMethodException);\r\n\r\n //stop the flow\r\n mManager.cancel(flowID);\r\n //verify that the module is deleted.\r\n List<ModuleURN> instances = mManager.getModuleInstances(PROVIDER_URN);\r\n assertTrue(instances.toString(), instances.isEmpty());\r\n //remove the listener\r\n mManager.removeSinkListener(listener);\r\n }", "public boolean hasTileEntity(int metadata)\r\n/* 259: */ {\r\n/* 260:304 */ return true;\r\n/* 261: */ }", "private boolean isSupportedInternal() {\n boolean z = false;\n synchronized (this.mLock) {\n if (this.mServiceManager == null) {\n Log.e(TAG, \"isSupported: called but mServiceManager is null!?\");\n return false;\n }\n try {\n if (this.mServiceManager.getTransport(IWifi.kInterfaceName, HAL_INSTANCE_NAME) != (byte) 0) {\n z = true;\n }\n } catch (RemoteException e) {\n Log.wtf(TAG, \"Exception while operating on IServiceManager: \" + e);\n return false;\n }\n }\n }", "@Override\n public void onCarTunelInfo(BNRGCarTunelInfo arg0) {\n Log.d(BNRemoteConstants.MODULE_TAG, \"onCarTunelInfo...... \");\n }", "public int GetSizeOfComputerHand(){\n return handComputer.size();\n }", "public interface MaternalTransfer extends org.eclipse.mdht.uml.cda.Observation {\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Maternal TransferTemplateId'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.templateId->exists(id : datatypes::II | id.root = \\'2.16.840.1.113883.10.20.26.35\\')'\"\n\t * @generated\n\t */\n\tboolean validateMaternalTransferTemplateId(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Maternal TransferClassCode'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.classCode=vocab::ActClassObservation::OBS'\"\n\t * @generated\n\t */\n\tboolean validateMaternalTransferClassCode(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Maternal TransferMoodCode'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.moodCode=vocab::x_ActMoodDocumentObservation::EVN'\"\n\t * @generated\n\t */\n\tboolean validateMaternalTransferMoodCode(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Maternal TransferCodeP'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='(self.code.oclIsUndefined() or self.code.isNullFlavorUndefined()) implies (not self.code.oclIsUndefined())'\"\n\t * @generated\n\t */\n\tboolean validateMaternalTransferCodeP(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Maternal TransferCode'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='(self.code.oclIsUndefined() or self.code.isNullFlavorUndefined()) implies (not self.code.oclIsUndefined() and self.code.oclIsKindOf(datatypes::CD) and \\nlet value : datatypes::CD = self.code.oclAsType(datatypes::CD) in \\nvalue.code = \\'73763-5\\' and value.codeSystem = \\'2.16.840.1.113883.6.1\\')'\"\n\t * @generated\n\t */\n\tboolean validateMaternalTransferCode(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Maternal TransferValue'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='(self.value->isEmpty() or self.value->exists(element | element.isNullFlavorUndefined())) implies (self.value->size() = 1 and self.value->forAll(element | element.oclIsTypeOf(datatypes::BL)))'\"\n\t * @generated\n\t */\n\tboolean validateMaternalTransferValue(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Maternal TransferParticipant'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.participant->one(participant : cda::Participant2 | not participant.oclIsUndefined() and participant.oclIsKindOf(cda::Participant2))'\"\n\t * @generated\n\t */\n\tboolean validateMaternalTransferParticipant(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tpublic MaternalTransfer init();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tpublic MaternalTransfer init(\n\t\t\tIterable<? extends org.eclipse.mdht.emf.runtime.util.Initializer<? extends EObject>> initializers);\n}", "void smem_install_memory(IdentifierImpl state, long /* smem_lti_id */ lti_id, IdentifierImpl lti, boolean activate_lti, List<SymbolTriple> meta_wmes, List<SymbolTriple> retrieval_wmes)\n throws SQLException\n {\n // //////////////////////////////////////////////////////////////////////////\n // TODO SMEM Timers: my_agent->smem_timers->ncb_retrieval->start();\n // //////////////////////////////////////////////////////////////////////////\n \n // get the ^result header for this state\n final SemanticMemoryStateInfo info = smem_info(state);\n final IdentifierImpl result_header = info.smem_result_header;\n \n // get identifier if not known\n boolean lti_created_here = false;\n if(lti == null)\n {\n db.lti_letter_num.setLong(1, lti_id);\n try(ResultSet rs = db.lti_letter_num.executeQuery())\n {\n if(!rs.next())\n {\n throw new IllegalStateException(\"Expected non-empty result\");\n }\n lti = smem_lti_soar_make(lti_id, (char) rs.getLong(0 + 1), rs.getLong(1 + 1), result_header.level);\n }\n lti_created_here = true;\n }\n \n // activate lti\n if(activate_lti)\n {\n smem_lti_activate(lti_id, true);\n }\n \n // point retrieved to lti\n smem_buffer_add_wme(meta_wmes, result_header, predefinedSyms.smem_sym_retrieved, lti);\n if(lti_created_here)\n {\n // if the identifier was created above we need to remove a single\n // ref count AFTER the wme is added (such as to not deallocate the\n // symbol prematurely)\n // Not needed in JSoar\n // symbol_remove_ref( my_agent, lti );\n }\n \n // if no children, then retrieve children\n // merge may override this behavior\n if((this.params.merge.get() == MergeChoices.add) || ((lti.goalInfo == null || lti.goalInfo.getImpasseWmes() == null) && (lti.getInputWmes() == null) && (lti.slots == null)))\n {\n // get direct children: attr_type, attr_hash, value_type,\n // value_hash, value_letter, value_num, value_lti\n db.web_expand.setLong(1, lti_id);\n try(ResultSet rs = db.web_expand.executeQuery())\n {\n while(rs.next())\n {\n // make the identifier symbol irrespective of value type\n final SymbolImpl attr_sym = smem_reverse_hash(rs.getInt(0 + 1), rs.getLong(1 + 1));\n \n // identifier vs. constant\n final SymbolImpl value_sym;\n final long lti_rs = rs.getLong(6 + 1);\n if(lti_rs != SMEM_AUGMENTATIONS_NULL)\n {\n value_sym = smem_lti_soar_make(lti_rs, (char) rs.getLong(4 + 1), rs.getLong(5 + 1), lti.level);\n }\n else\n {\n value_sym = smem_reverse_hash(rs.getInt(2 + 1), rs.getLong(3 + 1));\n }\n \n // add wme\n smem_buffer_add_wme(retrieval_wmes, lti, attr_sym, value_sym);\n \n // deal with ref counts - attribute/values are always\n // created in this function\n // (thus an extra ref count is set before adding a wme)\n // Not needed in JSoar\n // symbol_remove_ref( my_agent, attr_sym );\n // symbol_remove_ref( my_agent, value_sym );\n }\n }\n \n }\n \n // //////////////////////////////////////////////////////////////////////////\n // TODO SMEM Timers: my_agent->smem_timers->ncb_retrieval->stop();\n // //////////////////////////////////////////////////////////////////////////\n }", "public ParcelableVolumeInfo mo736f() throws RemoteException {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(\"android.support.v4.media.session.IMediaSession\");\n this.f822a.transact(10, obtain, obtain2, 0);\n obtain2.readException();\n return obtain2.readInt() != 0 ? (ParcelableVolumeInfo) ParcelableVolumeInfo.CREATOR.createFromParcel(obtain2) : null;\n } finally {\n obtain2.recycle();\n obtain.recycle();\n }\n }", "@Test(timeout = 4000)\n public void test046() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"system protocol handler\", \"system protocol handler\", (Content) null, 0.0F, 0.0F, \"\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-1970), homeTexture0, 3, homeTexture0, 11, (-1970));\n homeEnvironment0.setPhotoQuality(1260);\n homeEnvironment0.clone();\n assertEquals(1260, homeEnvironment0.getPhotoQuality());\n }", "@Override public java.util.Map getExtra(int status) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\njava.util.Map _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(status);\nmRemote.transact(Stub.TRANSACTION_getExtra, _data, _reply, 0);\n_reply.readException();\njava.lang.ClassLoader cl = (java.lang.ClassLoader)this.getClass().getClassLoader();\n_result = _reply.readHashMap(cl);\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}", "@Test\r\n public void testGetAttestationFromVmwareHost() throws Exception {\r\n TxtHostRecord host = new TxtHostRecord();\r\n host.HostName = \"10.1.71.174\";\r\n host.AddOn_Connection_String = \"https://10.1.71.162:443/sdk;administrator;intel123!\";\r\n VMwareClient client = new VMwareClient();\r\n client.connect(host.AddOn_Connection_String);\r\n String report = client.getHostAttestationReport(host, \"0,17,18,20\");\r\n System.out.println(report);\r\n }", "@Test\n public void testGetServerLocal() throws ApplicationException {\n CommunicationFactory instance = CommunicationFactory.getFactory();\n String expResult = bundle.getString(IPropertiesConstants.COMM_LOCAL_CONNECTOR);\n String result = instance.getServer(\"localhost\").getClass().getName();\n assertEquals(expResult, result);\n }", "@Override\n\tpublic void showInfo() {\n\t\tSystem.out.println(\"Machine Interface \" + id);\n\t}", "@Override\n public void detectAndSendChanges()\n {\n super.detectAndSendChanges();\n \n ((TileAstralInfuser) this.worldObj.getBlockTileEntity(this.posX, this.posY, this.posZ)).setInventorySlotContents(5,\n ((TileAstralInfuser) this.worldObj.getBlockTileEntity(this.posX, this.posY, this.posZ)).getResult());\n }", "public AddressInfo getManagementInterface() {\r\n return managementInterface;\r\n }", "protected boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) {\n return false;\n }", "@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean checkInfoPort() {\n\t\tboolean flag = oTest.checkInfoPort();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn flag;\r\n\t}", "@Test\r\n\tpublic void eac_infoTest_9() throws IOException, URISyntaxException,\r\n\t\t\tGeneralSecurityException {\r\n\t\tfinal TestSpy spy = new TestSpy();\r\n\r\n\t\tfinal URL tcTokenURL = new URL(serviceURL);\r\n\r\n\t\tMockUp<EAC_Info> mockUp = new MockUp<EAC_Info>() {\r\n\t\t\t@Mock\r\n\t\t\tpublic byte[] getTerminalDescription(mockit.Invocation inv) {\r\n\r\n\t\t\t\ttry {\r\n\r\n\t\t\t\t\tfinal byte[] terminalDescription = inv.proceed();\r\n\t\t\t\t\tassertNotNull(\"terminalDescription is null.\",\r\n\t\t\t\t\t\t\tterminalDescription);\r\n\t\t\t\t\treturn terminalDescription;\r\n\r\n\t\t\t\t} catch (final AssertionError ae) {\r\n\t\t\t\t\tspy.setStringValue(ae.getMessage());\r\n\t\t\t\t\tthrow new AssertionError(ae.getMessage(), ae);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfinal String refreshURL = ECardWorker.start(tcTokenURL);\r\n\t\tassertNotNull(\"no refresh URL\", refreshURL);\r\n\r\n\t\tif (spy.getStringValue() != null\r\n\t\t\t\t&& !spy.getStringValue().trim().isEmpty()) {\r\n\t\t\tmockUp.tearDown();\r\n\t\t\tfail(spy.getStringValue());\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"refreshURL: \" + refreshURL);\r\n\t\tconnectToRefreshURL(refreshURL, true);\r\n\t\tmockUp.tearDown();\r\n\r\n\t}", "private void updateTargetProductMetadata() {\n }", "private void cmdInfoModel() throws NoSystemException {\n MSystem system = system();\n MMVisitor v = new MMPrintVisitor(new PrintWriter(System.out, true));\n system.model().processWithVisitor(v);\n int numObjects = system.state().allObjects().size();\n System.out.println(numObjects + \" object\"\n + ((numObjects == 1) ? \"\" : \"s\") + \" total in current state.\");\n }", "public void helloVM()\n {\n \ttry {\n\n\t\t\t\n\t\t\tVirtualMachineConfigInfo vminfo = vm.getConfig();\n\t\t\tVirtualMachineCapability vmc = vm.getCapability();\n\t\t\tVirtualMachineRuntimeInfo vmri = vm.getRuntime();\n\t\t\tVirtualMachineSummary vmsum = vm.getSummary();\n\n\t\t\t\n\t\t\tSystem.out.println(\"------------------------------------------\");\n\t\t\tSystem.out.println(\"VM Information : \");\n\t\t\t\n\t\t\tSystem.out.println(\"VM Name: \" + vminfo.getName());\n\t\t\tSystem.out.println(\"VM OS: \" + vminfo.getGuestFullName());\n\t\t\tSystem.out.println(\"VM ID: \" + vminfo.getGuestId());\n\t\t\tSystem.out.println(\"VM Guest IP Address is \" +vm.getGuest().getIpAddress());\n\t\t\t\n\n\t\t\tSystem.out.println(\"------------------------------------------\");\n\t\t\tSystem.out.println(\"Resource Pool Informtion : \");\n\t\t\t\n\t\t\tSystem.out.println(\"Resource pool: \" +vm.getResourcePool());\n\t\t\t\n\t\t\tSystem.out.println(\"VM Parent: \" +vm.getParent());\n\t\t\t//System.out.println(\"VM Values: \" +vm.getValues());\n\t\t\tSystem.out.println(\"Multiple snapshot supported: \"\t+ vmc.isMultipleSnapshotsSupported());\n\t\t\tSystem.out.println(\"Powered Off snapshot supported: \"+vmc.isPoweredOffSnapshotsSupported());\n\t\t\tSystem.out.println(\"Connection State: \" + vmri.getConnectionState());\n\t\t\tSystem.out.println(\"Power State: \" + vmri.getPowerState());\n\t\t\t\n\n\t\t\t//CPU Statistics\n\n\t\t\tSystem.out.println(\"------------------------------------------\");\n\t\t\tSystem.out.println(\"CPU and Memory Statistics\" );\n\t\t\t\n\t\t\tSystem.out.println(\"CPU Usage: \" +vmsum.getQuickStats().getOverallCpuUsage());\n\t\t\tSystem.out.println(\"Max CPU Usage: \" + vmri.getMaxCpuUsage());\n\t\t\tSystem.out.println(\"Memory Usage: \"+vmsum.getQuickStats().getGuestMemoryUsage());\n\t\t\tSystem.out.println(\"Max Memory Usage: \" + vmri.getMaxMemoryUsage());\n\t\t\tSystem.out.println(\"------------------------------------------\");\n\n\t\t} catch (InvalidProperty e) {\n\t\t\te.printStackTrace();\n\t\t} catch (RuntimeFault e) {\n\t\t\te.printStackTrace();\n\t\t} catch (RemoteException e) {\n\t\t\te.printStackTrace();\n\t\t}\n }", "public java.lang.Boolean getByhand() throws java.rmi.RemoteException;", "@Test(expected = org.apache.axis.NoEndPointException.class)\n\tpublic void testGetComputerSystem_5()\n\t\tthrows Exception {\n\t\tSAPHostControl_BindingStub fixture = new SAPHostControl_BindingStub((URL) null, new DeployWSServiceLocator());\n\t\tProperty[] aArguments = new Property[] {};\n\n\t\tCIMObject result = fixture.getComputerSystem(aArguments);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "@ApiOperation(value = \"metalsSummary\", produces=\"application/json\")\n\t@ApiResponses(value={\n\t\t\t@ApiResponse(code = 200, message=\"Ok\", response = MetalSummaryResponse.class, responseContainer=\"Object\"),\n\t\t\t@ApiResponse(code = 400, message=\"Bad request\"),\n\t\t\t@ApiResponse(code = 500, message=\"Internal server error\")\n\t})\n\t@RequestMapping(value=\"/consumer-services/catalogs/metals/summary\", method = RequestMethod.GET)\n\tpublic MetalSummaryResponse metalSummary(\n\t\t\t@RequestHeader (name = \"client-id\", required = false) String clientId,\n\t\t\t@RequestHeader (name = \"Authorization\", required = false) String authorization,\n\t\t\t@RequestHeader (name = \"uuid\", required = false) String uuid){\n\t\treturn metalSummaryFormatter.metalResponseFormatter(\n\t\t\t\tmetalSummaryService.fetchMetalsByKey(Util.getSummaryKeyMetal()));\t\t\n\t}", "public interface MetaInfo {\n\n String DIR_EMPTY = \"empty\";\n\n\n //===========================\n float WEIGHT_CAMERA_MOTION = 1;\n float WEIGHT_LOCATION = 1;\n float WEIGHT_MEDIA_TYPE = 1;\n float WEIGHT_SHORT_TYPE = 1;\n\n float WEIGHT_MEDIA_DIR = 3f;\n float WEIGHT_TIME = 3;\n float WEIGHT_VIDEO_TAG = 2.5f;\n float WEIGHT_SHOT_KEY = 5f;\n float WEIGHT_SHOT_CATEGORY = 2.5f;\n\n int FLAG_TIME = 0x0001;\n int FLAG_LOCATION = 0x0002;\n int FLAG_MEDIA_TYPE = 0x0004;\n int FLAG_MEDIA_DIR = 0x0008;\n int FLAG_SHOT_TYPE = 0x0010;\n int FLAG_CAMERA_MOTION = 0x0020;\n int FLAG_VIDEO_TAG = 0x0040;\n int FLAG_SHOT_KEY = 0x0080;\n int FLAG_SHOT_CATEGORY = 0x0100;\n\n //================= location ==================\n int LOCATION_NEAR_GPS = 1;\n int LOCATION_SAME_COUNTRY = 2;\n int LOCATION_SAME_PROVINCE = 3; //省,市,区\n int LOCATION_SAME_CITY = 4;\n int LOCATION_SAME_REGION = 5;\n\n //=================== for camera motion ====================\n int STILL = 0; // 静止, class 0\n int ZOOM = 3; // 前后移动(zoomIn or zoomOut), class 1\n int ZOOM_IN = 4;\n int ZOOM_OUT = 5;\n int PAN = 6; // 横向移动(leftRight or rightLeft), class 2\n int PAN_LEFT_RIGHT = 7;\n int PAN_RIGHT_LEFT = 8;\n int TILT = 9; // 纵向移动(upDown or downUp), class 3\n int TILT_UP_DOWN = 10;\n int TILT_DOWN_UP = 11;\n int CATEGORY_STILL = 1;\n int CATEGORY_ZOOM = 2;\n int CATEGORY_PAN = 3;\n int CATEGORY_TILT = 4;\n\n //图像类型。视频,图片。 已有\n\n //============== shooting device =================\n /**\n * the shoot device: cell phone\n */\n int SHOOTING_DEVICE_CELLPHONE = 1;\n /**\n * the shoot device: camera\n */\n int SHOOTING_DEVICE_CAMERA = 2;\n\n /**\n * the shoot device: drone\n */\n int SHOOTING_DEVICE_DRONE = 3; //无人机\n\n\n //====================== shooting mode ===========================\n /**\n * shooting mode: normal\n */\n int SHOOTING_MODE_NORMAL = 1;\n /**\n * shooting mode: slow motion\n */\n int SHOOTING_MODE_SLOW_MOTION = 2;\n /**\n * shooting mode: time lapse\n */\n int SHOOTING_MODE_TIME_LAPSE = 3;\n\n //=========================== shot type =======================\n /**\n * shot type: big - long- short ( 大远景)\n */\n int SHOT_TYPE_BIG_LONG_SHORT = 5;\n /**\n * shot type: long short ( 远景)\n */\n int SHOT_TYPE_LONG_SHORT = 4;\n\n /** medium long shot. (中远景) */\n int SHOT_TYPE_MEDIUM_LONG_SHOT = 3;\n /**\n * shot type: medium shot(中景)\n */\n int SHOT_TYPE_MEDIUM_SHOT = 2;\n /**\n * shot type: close up - chest ( 特写-胸)\n */\n int SHOT_TYPE_MEDIUM_CLOSE_UP = 1;\n\n /**\n * shot type: close up -head ( 特写-头)\n */\n int SHOT_TYPE_CLOSE_UP = 0;\n\n int SHOT_TYPE_NONE = -1;\n\n int CATEGORY_CLOSE_UP = 12; //特写/近景\n int CATEGORY_MIDDLE_VIEW = 11; //中景\n int CATEGORY_VISION = 10; //远景\n\n //========================== time ==========================\n int[] MORNING_HOURS = {7, 8, 9, 10, 11};\n int[] AFTERNOON_HOURS = {12, 13, 14, 15, 16, 17};\n //int[] NIGHT_HOURS = {18, 19, 20, 21, 22, 24, 1, 2, 3, 4, 5, 6};\n int TIME_SAME_DAY = 1;\n int TIME_SAME_PERIOD_IN_DAY = 2; //timeSamePeriodInDay\n\n class LocationMeta {\n private double longitude, latitude;\n /**\n * 高程精度比水平精度低原因,主要是GPS测出的是WGS-84坐标系下的大地高,而我们工程上,也就是电子地图上采用的高程一般是正常高,\n * 它们之间的转化受到高程异常和大地水准面等误差的制约。\n * 卫星在径向的定轨精度较差,也限制了GPS垂直方向的精度。\n */\n private int gpsHeight; //精度不高\n private String country, province, city, region; //国家, 省, 市, 区\n\n public double getLongitude() {\n return longitude;\n }\n\n public void setLongitude(double longitude) {\n this.longitude = longitude;\n }\n\n public double getLatitude() {\n return latitude;\n }\n\n public void setLatitude(double latitude) {\n this.latitude = latitude;\n }\n\n public String getCountry() {\n return country;\n }\n\n public void setCountry(String country) {\n this.country = country;\n }\n\n public String getProvince() {\n return province;\n }\n\n public void setProvince(String province) {\n this.province = province;\n }\n\n public String getCity() {\n return city;\n }\n\n public void setCity(String city) {\n this.city = city;\n }\n\n public String getRegion() {\n return region;\n }\n\n public void setRegion(String region) {\n this.region = region;\n }\n\n public int getGpsHeight() {\n return gpsHeight;\n }\n\n public void setGpsHeight(int gpsHeight) {\n this.gpsHeight = gpsHeight;\n }\n\n @Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n\n LocationMeta that = (LocationMeta) o;\n\n if (Double.compare(that.longitude, longitude) != 0) return false;\n if (Double.compare(that.latitude, latitude) != 0) return false;\n if (gpsHeight != that.gpsHeight) return false;\n if (country != null ? !country.equals(that.country) : that.country != null)\n return false;\n if (province != null ? !province.equals(that.province) : that.province != null)\n return false;\n if (city != null ? !city.equals(that.city) : that.city != null) return false;\n return region != null ? region.equals(that.region) : that.region == null;\n }\n }\n\n /**\n * the meta data of image/video ,something may from 'AI'.\n */\n class ImageMeta extends SimpleCopyDelegate{\n private String path;\n private int mediaType;\n /** in mills */\n private long date;\n\n /** in mill-seconds */\n private long duration;\n private int width, height;\n\n private LocationMeta location;\n\n /**\n * frames/second\n */\n private int fps = 30;\n /** see {@linkplain IShotRecognizer#CATEGORY_ENV} and etc. */\n private int shotCategory;\n /**\n * the shot type\n */\n private String shotType;\n\n /** shot key */\n private String shotKey;\n /**\n * 相机运动\n */\n private String cameraMotion;\n /** video tags */\n private List<List<Integer>> tags;\n\n /** the whole frame data of video(from analyse , like AI. ), after read should not change */\n private SparseArray<VideoDataLoadUtils.FrameData> frameDataMap;\n /** the high light data. key is the time in seconds. */\n private SparseArray<List<? extends IHighLightData>> highLightMap;\n private HighLightHelper mHighLightHelper;\n\n /** 主人脸个数 */\n private int mainFaceCount = -1;\n private int mBodyCount = -1;\n\n /** 通用tag信息 */\n private List<FrameTags> rawVideoTags;\n /** 人脸框信息 */\n private List<FrameFaceRects> rawFaceRects;\n\n //tag indexes\n private List<Integer> nounTags;\n private List<Integer> domainTags;\n private List<Integer> adjTags;\n\n private Location subjectLocation;\n\n //-------------------------- start High-Light ----------------------------\n /** set metadata for high light data. (from load high light) */\n public void setMediaData(MediaData mediaData) {\n List<MediaData.HighLightPair> hlMap = mediaData.getHighLightDataMap();\n if(!Predicates.isEmpty(hlMap)) {\n highLightMap = new SparseArray<>();\n VisitServices.from(hlMap).fire(new FireVisitor<MediaData.HighLightPair>() {\n @Override\n public Boolean visit(MediaData.HighLightPair pair, Object param) {\n List<MediaData.HighLightData> highLightData = VEGapUtils.filterHighLightByScore(pair.getDatas());\n if(!Predicates.isEmpty(highLightData)){\n highLightMap.put(pair.getTime(), highLightData);\n }\n return null;\n }\n });\n }\n mHighLightHelper = new HighLightHelper(highLightMap, mediaType == IPathTimeTraveller.TYPE_IMAGE);\n }\n @SuppressWarnings(\"unchecked\")\n public KeyValuePair<Integer, List<IHighLightData>> getHighLight(int time){\n return mHighLightHelper.getHighLight(time);\n }\n @SuppressWarnings(\"unchecked\")\n public KeyValuePair<Integer, List<IHighLightData>> getHighLight(ColorGapContext context, ITimeTraveller tt){\n return mHighLightHelper.getHighLight(context, tt);\n }\n\n public List<KeyValuePair<Integer, List<IHighLightData>>> getHighLights(ColorGapContext context, ITimeTraveller tt){\n return mHighLightHelper.getHighLights(context, tt);\n }\n @SuppressWarnings(\"unchecked\")\n public HighLightArea getHighLightArea(ColorGapContext context, ITimeTraveller tt){\n return mHighLightHelper.getHighLightArea(context, tt);\n }\n\n public void setHighLightMap(SparseArray<List<? extends IHighLightData>> highLightMap) {\n this.highLightMap = highLightMap;\n this.mHighLightHelper = new HighLightHelper(highLightMap, mediaType == IPathTimeTraveller.TYPE_IMAGE);\n }\n\n //-------------------------- end High-Light ----------------------------\n public SparseArray<VideoDataLoadUtils.FrameData> getFrameDataMap() {\n if(frameDataMap == null){\n frameDataMap = new SparseArray<>();\n }\n return frameDataMap;\n }\n public void setFrameDataMap(SparseArray<VideoDataLoadUtils.FrameData> frameDataMap) {\n this.frameDataMap = frameDataMap;\n }\n public void travelAllFrameDatas(Map.MapTravelCallback<Integer, VideoDataLoadUtils.FrameData> traveller){\n Throwables.checkNull(frameDataMap);\n CollectionUtils.travel(frameDataMap, traveller);\n }\n\n public List<Integer> getNounTags() {\n return nounTags != null ? nounTags : Collections.emptyList();\n }\n public void setNounTags(List<Integer> nounTags) {\n this.nounTags = nounTags;\n }\n\n public List<Integer> getDomainTags() {\n return domainTags != null ? domainTags : Collections.emptyList();\n }\n public void setDomainTags(List<Integer> domainTags) {\n this.domainTags = domainTags;\n }\n\n public List<Integer> getAdjTags() {\n return adjTags != null ? adjTags : Collections.emptyList();\n }\n public void setAdjTags(List<Integer> adjTags) {\n this.adjTags = adjTags;\n }\n public void setShotCategory(int shotCategory) {\n this.shotCategory = shotCategory;\n }\n\n public int getShotCategory() {\n return shotCategory;\n }\n public String getShotKey() {\n return shotKey;\n }\n public void setShotKey(String shotKey) {\n this.shotKey = shotKey;\n }\n\n public int getMainFaceCount() {\n return mainFaceCount;\n }\n public void setMainFaceCount(int mainFaceCount) {\n this.mainFaceCount = mainFaceCount;\n }\n public int getMediaType() {\n return mediaType;\n }\n public void setMediaType(int mediaType) {\n this.mediaType = mediaType;\n }\n\n public String getPath() {\n return path;\n }\n\n public void setPath(String path) {\n this.path = path;\n }\n\n /** date in mills */\n public long getDate() {\n return date;\n }\n /** date in mills */\n public void setDate(long date) {\n this.date = date;\n }\n\n public long getDuration() {\n return duration;\n }\n\n /** set duration in mill-seconds */\n public void setDuration(long duration) {\n this.duration = duration;\n }\n\n public int getWidth() {\n return width;\n }\n\n public void setWidth(int width) {\n this.width = width;\n }\n\n public int getHeight() {\n return height;\n }\n\n public void setHeight(int height) {\n this.height = height;\n }\n\n public int getFps() {\n return fps;\n }\n\n public void setFps(int fps) {\n this.fps = fps;\n }\n\n public String getShotType() {\n return shotType;\n }\n\n public void setShotType(String shotType) {\n this.shotType = shotType;\n }\n\n public String getCameraMotion() {\n return cameraMotion;\n }\n\n public void setCameraMotion(String cameraMotion) {\n this.cameraMotion = cameraMotion;\n }\n\n public List<List<Integer>> getTags() {\n return tags;\n }\n public void setTags(List<List<Integer>> tags) {\n this.tags = tags;\n }\n public LocationMeta getLocation() {\n return location;\n }\n public void setLocation(LocationMeta location) {\n this.location = location;\n }\n public void setBodyCount(int size) {\n this.mBodyCount = size;\n }\n public int getBodyCount(){\n return mBodyCount;\n }\n public int getPersonCount() {\n return Math.max(mBodyCount, mainFaceCount);\n }\n\n public Location getSubjectLocation() {\n return subjectLocation;\n }\n public void setSubjectLocation(Location subjectLocation) {\n this.subjectLocation = subjectLocation;\n }\n\n //============================================================\n public List<FrameFaceRects> getAllFaceRects() {\n if(frameDataMap == null){\n return Collections.emptyList();\n }\n List<FrameFaceRects> result = new ArrayList<>();\n final int size = frameDataMap.size();\n for (int i = 0; i < size ; i++) {\n FrameFaceRects faceRects = frameDataMap.valueAt(i).getFaceRects();\n if(faceRects != null) {\n result.add(faceRects);\n }else{\n //no face we just add a mock\n }\n }\n return result;\n }\n public List<FrameTags> getVideoTags(ITimeTraveller part) {\n return getVideoTags(part.getStartTime(), part.getEndTime());\n }\n\n /** get all video tags. startTime and endTime in frames */\n public List<FrameTags> getVideoTags(long startTime, long endTime) {\n if(frameDataMap == null){\n return Collections.emptyList();\n }\n List<FrameTags> result = new ArrayList<>();\n final int size = frameDataMap.size();\n for (int i = 0; i < size ; i++) {\n long key = CommonUtils.timeToFrame(frameDataMap.keyAt(i), TimeUnit.SECONDS);\n if(key >= startTime && key <= endTime){\n FrameTags tag = frameDataMap.valueAt(i).getTag();\n if(tag != null) {\n result.add(tag);\n }\n }\n }\n return result;\n }\n public List<FrameTags> getAllVideoTags() {\n if(frameDataMap == null){\n return Collections.emptyList();\n }\n List<FrameTags> result = new ArrayList<>();\n final int size = frameDataMap.size();\n for (int i = 0; i < size ; i++) {\n //long key = CommonUtils.timeToFrame(frameDataMap.keyAt(i), TimeUnit.SECONDS);\n FrameTags tag = frameDataMap.valueAt(i).getTag();\n if(tag != null) {\n result.add(tag);\n }\n }\n return result;\n }\n public List<FrameFaceRects> getFaceRects(ITimeTraveller part) {\n return getFaceRects(part.getStartTime(), part.getEndTime());\n }\n /** get all face rects. startTime and endTime in frames */\n public List<FrameFaceRects> getFaceRects(long startTime, long endTime) {\n if(frameDataMap == null){\n return Collections.emptyList();\n }\n List<FrameFaceRects> result = new ArrayList<>();\n final int size = frameDataMap.size();\n for (int i = 0; i < size ; i++) {\n long key = CommonUtils.timeToFrame(frameDataMap.keyAt(i), TimeUnit.SECONDS);\n if(key >= startTime && key <= endTime){\n FrameFaceRects faceRects = frameDataMap.valueAt(i).getFaceRects();\n if(faceRects != null) {\n result.add(faceRects);\n }\n }\n }\n return result;\n }\n\n public void setRawVideoTags(List<FrameTags> tags) {\n rawVideoTags = tags;\n }\n public List<FrameTags> getRawVideoTags() {\n return rawVideoTags;\n }\n\n public List<FrameFaceRects> getRawFaceRects() {\n return rawFaceRects;\n }\n public void setRawFaceRects(List<FrameFaceRects> rawFaceRects) {\n this.rawFaceRects = rawFaceRects;\n }\n /** 判断这段原始视频内容是否是“人脸为主”. work before cut */\n public boolean containsFaces(){\n if(rawFaceRects == null){\n if(frameDataMap == null){\n return false;\n }\n rawFaceRects = getAllFaceRects();\n }\n if(Predicates.isEmpty(rawFaceRects)){\n return false;\n }\n List<FrameFaceRects> tempList = new ArrayList<>();\n VisitServices.from(rawFaceRects).visitForQueryList((ffr, param) -> ffr.hasRect(), tempList);\n float result = tempList.size() * 1f / rawFaceRects.size();\n Logger.d(\"ImageMeta\", \"isHumanContent\", \"human.percent = \"\n + result + \" ,path = \" + path);\n return result > 0.55f;\n }\n\n /** 判断这段原始视频是否被标记原始tag(人脸 or 通用) . work before cut */\n public boolean hasRawTags(){\n return frameDataMap != null && frameDataMap.size() > 0;\n }\n\n @Override\n public void setFrom(SimpleCopyDelegate sc) {\n if(sc instanceof ImageMeta){\n ImageMeta src = (ImageMeta) sc;\n setShotType(src.getShotType());\n setShotCategory(src.getShotCategory());\n setShotKey(src.getShotKey());\n\n setMainFaceCount(src.getMainFaceCount());\n setDuration(src.getDuration());\n setMediaType(src.getMediaType());\n setPath(src.getPath());\n setCameraMotion(src.getCameraMotion());\n setDate(src.getDate());\n setFps(src.getFps());\n setHeight(src.getHeight());\n setWidth(src.getWidth());\n //not deep copy\n setTags(src.tags);\n setAdjTags(src.adjTags);\n setNounTags(src.nounTags);\n setDomainTags(src.domainTags);\n\n setLocation(src.getLocation());\n setRawFaceRects(src.getRawFaceRects());\n setRawVideoTags(src.getRawVideoTags());\n setFrameDataMap(src.frameDataMap);\n setHighLightMap(src.highLightMap);\n }\n }\n }\n\n}", "public msg_gimbal_device_information(MAVLinkPacket mavLinkPacket){\n this.sysid = mavLinkPacket.sysid;\n this.compid = mavLinkPacket.compid;\n this.msgid = MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION;\n unpack(mavLinkPacket.payload); \n }", "public interface ILamportServer extends Remote {\n public String SERVICE_NAME = \"LAMPORT_RMI\"; // Nom du service\n \n /**\n * Envoie un Message REQUEST aux autres serveurs pour annoncer le fait de \n * vouloir rentrer dans la section critique\n * @param message Le message envoyé avec une requête\n * @throws RemoteException \n */\n public void request(Message message) throws RemoteException;\n \n /**\n * Envoi du Message RESPONSE après avoir Reçu le Message REQUEST\n * @param message Le message envoyé avec une réponse\n * @throws RemoteException \n */\n public void response(Message message) throws RemoteException;\n \n /**\n * Envoie du message FREE pour indiquer aux autres serveur que l'on sort de\n * la section critique\n * @param message Le message envoyé pour libérer la section critique\n * @throws RemoteException \n */\n public void freeSC(Message message) throws RemoteException;\n \n /**\n * Métode pour modifier la variable globalle dans tous les serveurs\n * @param newValue La nouvelle valeur de la variable\n * @throws RemoteException \n */\n public void setVariableGlobally(int newValue) throws RemoteException;\n}", "public interface OdlOpenFlowStats2MBean {\n\n /**\n * Getter for the \"OdlOpenflowFlowstats2\" variable.\n */\n public String getOdlOpenflowFlowstats2() throws SnmpStatusException;\n\n /**\n * Setter for the \"OdlOpenflowFlowstats2\" variable.\n */\n public void setOdlOpenflowFlowstats2(String x) throws SnmpStatusException;\n\n /**\n * Checker for the \"OdlOpenflowFlowstats2\" variable.\n */\n public void checkOdlOpenflowFlowstats2(String x) throws SnmpStatusException;\n\n /**\n * Getter for the \"OdlOpenflowStatus2\" variable.\n */\n public String getOdlOpenflowStatus2() throws SnmpStatusException;\n\n /**\n * Setter for the \"OdlOpenflowStatus2\" variable.\n */\n public void setOdlOpenflowStatus2(String x) throws SnmpStatusException;\n\n /**\n * Checker for the \"OdlOpenflowStatus2\" variable.\n */\n public void checkOdlOpenflowStatus2(String x) throws SnmpStatusException;\n\n /**\n * Getter for the \"OdlOpenflowManufacturer2\" variable.\n */\n public String getOdlOpenflowManufacturer2() throws SnmpStatusException;\n\n /**\n * Setter for the \"OdlOpenflowManufacturer2\" variable.\n */\n public void setOdlOpenflowManufacturer2(String x) throws SnmpStatusException;\n\n /**\n * Checker for the \"OdlOpenflowManufacturer2\" variable.\n */\n public void checkOdlOpenflowManufacturer2(String x) throws SnmpStatusException;\n\n /**\n * Getter for the \"OdlOpenflowMacAddress2\" variable.\n */\n public String getOdlOpenflowMacAddress2() throws SnmpStatusException;\n\n /**\n * Setter for the \"OdlOpenflowMacAddress2\" variable.\n */\n public void setOdlOpenflowMacAddress2(String x) throws SnmpStatusException;\n\n /**\n * Checker for the \"OdlOpenflowMacAddress2\" variable.\n */\n public void checkOdlOpenflowMacAddress2(String x) throws SnmpStatusException;\n\n /**\n * Getter for the \"OdlOpenflowInterface2\" variable.\n */\n public String getOdlOpenflowInterface2() throws SnmpStatusException;\n\n /**\n * Setter for the \"OdlOpenflowInterface2\" variable.\n */\n public void setOdlOpenflowInterface2(String x) throws SnmpStatusException;\n\n /**\n * Checker for the \"OdlOpenflowInterface2\" variable.\n */\n public void checkOdlOpenflowInterface2(String x) throws SnmpStatusException;\n\n /**\n * Getter for the \"OdlOpenflowNode2\" variable.\n */\n public String getOdlOpenflowNode2() throws SnmpStatusException;\n\n /**\n * Setter for the \"OdlOpenflowNode2\" variable.\n */\n public void setOdlOpenflowNode2(String x) throws SnmpStatusException;\n\n /**\n * Checker for the \"OdlOpenflowNode2\" variable.\n */\n public void checkOdlOpenflowNode2(String x) throws SnmpStatusException;\n\n /**\n * Getter for the \"OdlOpenflowMeterstats2\" variable.\n */\n public String getOdlOpenflowMeterstats2() throws SnmpStatusException;\n\n /**\n * Setter for the \"OdlOpenflowMeterstats2\" variable.\n */\n public void setOdlOpenflowMeterstats2(String x) throws SnmpStatusException;\n\n /**\n * Checker for the \"OdlOpenflowMeterstats2\" variable.\n */\n public void checkOdlOpenflowMeterstats2(String x) throws SnmpStatusException;\n\n}", "public void mo1533b() {\n C2201w.m8373a(\"Photo TransferData success!\", 1);\n }", "public void testGetManagementSpecVersion() {\n String specVersion = mb.getManagementSpecVersion();\n assertNotNull(specVersion);\n assertTrue(specVersion.length() > 0);\n }", "public void info() {\n\t\tstate.info();\n\t}", "public SammelTransfer getSammelTransfer() throws RemoteException;", "public org.tempuri.HISWebServiceStub.GetBillInfoResponse getBillInfo(\r\n org.tempuri.HISWebServiceStub.GetBillInfo getBillInfo76)\r\n throws java.rmi.RemoteException {\r\n org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\r\n\r\n try {\r\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[38].getName());\r\n _operationClient.getOptions()\r\n .setAction(\"http://tempuri.org/GetBillInfo\");\r\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\r\n\r\n addPropertyToOperationClient(_operationClient,\r\n org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\r\n \"&\");\r\n\r\n // create SOAP envelope with that payload\r\n org.apache.axiom.soap.SOAPEnvelope env = null;\r\n\r\n env = toEnvelope(getFactory(_operationClient.getOptions()\r\n .getSoapVersionURI()),\r\n getBillInfo76,\r\n optimizeContent(\r\n new javax.xml.namespace.QName(\"http://tempuri.org/\",\r\n \"getBillInfo\")),\r\n new javax.xml.namespace.QName(\"http://tempuri.org/\",\r\n \"GetBillInfo\"));\r\n\r\n //adding SOAP soap_headers\r\n _serviceClient.addHeadersToEnvelope(env);\r\n // set the message context with that soap envelope\r\n _messageContext.setEnvelope(env);\r\n\r\n // add the message contxt to the operation client\r\n _operationClient.addMessageContext(_messageContext);\r\n\r\n //execute the operation client\r\n _operationClient.execute(true);\r\n\r\n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\r\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\r\n\r\n java.lang.Object object = fromOM(_returnEnv.getBody()\r\n .getFirstElement(),\r\n org.tempuri.HISWebServiceStub.GetBillInfoResponse.class);\r\n\r\n return (org.tempuri.HISWebServiceStub.GetBillInfoResponse) object;\r\n } catch (org.apache.axis2.AxisFault f) {\r\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\r\n\r\n if (faultElt != null) {\r\n if (faultExceptionNameMap.containsKey(\r\n new org.apache.axis2.client.FaultMapKey(\r\n faultElt.getQName(), \"GetBillInfo\"))) {\r\n //make the fault by reflection\r\n try {\r\n java.lang.String exceptionClassName = (java.lang.String) faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(\r\n faultElt.getQName(), \"GetBillInfo\"));\r\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\r\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(java.lang.String.class);\r\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\r\n\r\n //message class\r\n java.lang.String messageClassName = (java.lang.String) faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(\r\n faultElt.getQName(), \"GetBillInfo\"));\r\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\r\n java.lang.Object messageObject = fromOM(faultElt,\r\n messageClass);\r\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\r\n new java.lang.Class[] { messageClass });\r\n m.invoke(ex, new java.lang.Object[] { messageObject });\r\n\r\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\r\n } catch (java.lang.ClassCastException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.ClassNotFoundException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.NoSuchMethodException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.reflect.InvocationTargetException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.IllegalAccessException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.InstantiationException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n }\r\n } else {\r\n throw f;\r\n }\r\n } else {\r\n throw f;\r\n }\r\n } finally {\r\n if (_messageContext.getTransportOut() != null) {\r\n _messageContext.getTransportOut().getSender()\r\n .cleanup(_messageContext);\r\n }\r\n }\r\n }", "void mo29860m(IObjectWrapper iObjectWrapper) throws RemoteException;", "@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean readDeviceInfo() {\n\t\tboolean flag = oTest.readDeviceInfo();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn flag;\r\n\t}", "@Override public boolean getOnlineStatus(int status) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\nboolean _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(status);\nmRemote.transact(Stub.TRANSACTION_getOnlineStatus, _data, _reply, 0);\n_reply.readException();\n_result = (0!=_reply.readInt());\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}", "public void addProductInspect(String accessKey, Map<String,String> dataMap) throws org.apache.thrift.TException;", "@Test\n public void bmpTest() throws Exception {\n BrowserMobProxy proxy = new BrowserMobProxyServer();\n proxy.start(0);\n\n // get the Selenium proxy object\n Proxy seleniumProxy = ClientUtil.createSeleniumProxy(proxy);\n\n // configure it as a desired capability\n DesiredCapabilities capabilities = new DesiredCapabilities();\n capabilities.setCapability(CapabilityType.PROXY, seleniumProxy);\n\n // start the browser up\n WebDriver driver = new ChromeDriver(capabilities);\n // enable more detailed HAR capture, if desired (see CaptureType for the complete list)\n proxy.enableHarCaptureTypes(CaptureType.REQUEST_CONTENT, CaptureType.RESPONSE_CONTENT);\n proxy.newHar(\"testlink\");\n driver.get(\"http://172.29.160.1/\");\n\n Har har = proxy.getHar();\n proxy.getHar().writeTo(new File(\"logs/Test.har\"));\n\n driver.quit();\n proxy.stop();;\n\n }", "@Override\n\tprotected void GetDataFromNative() {\n\t\tAverageFuelRate = CAN1Comm.Get_AverageFuelRate_333_PGN65390();\n\t\tLatestFuelConsumed = CAN1Comm.Get_ADaysFuelUsed_1405_PGN65390();\t\n\t}", "public int getEquipment() throws java.rmi.RemoteException;", "public static float getMetalMake(UnitDef def) {\n if (def.getName().equals(\"armmakr\") || def.getName().equals(\"armmmkr\") || def.getName().equals(\"cormakr\") || def.getName().equals(\"cormmkr\")) {\n return 0.000666f;\n } else {\n return 0;\n }\n }", "public void testGetObjTemp() {\n System.out.println(\"getObjTemp\");\n int modo= 0;\n ObjectTempSwapWizard instance = new ObjectTempSwapWizard(modo);\n Object expResult = null;\n Object result = instance.getObjTemp();\n assertEquals(expResult, result);\n }", "@Test\n public void testListStorageBinInformation2() throws Exception {\n System.out.println(\"listStorageBinInformation\");\n Long factoryId = 90L;\n String result = \"\";\n try {\n FactoryInventoryManagementModule.listStorageBinInformation(factoryId);\n } catch (Exception ex) {\n result = ex.getMessage();\n }\n assertEquals(\"Factory is not found!\", result);\n }", "@Test\n public void testCFMetaDataSerialization() throws IOException\n {\n for (String table : DatabaseDescriptor.getNonSystemTables())\n {\n for (CFMetaData cfm : DatabaseDescriptor.getTableMetaData(table).values())\n {\n byte[] ser = CFMetaData.serialize(cfm);\n CFMetaData cfmDupe = CFMetaData.deserialize(new ByteArrayInputStream(ser));\n assert cfmDupe != null;\n assert cfmDupe.equals(cfm);\n }\n }\n\n }", "public static Boolean sync(Management management) {\n final List<Relay> relays = RelayConfigReader.getRelayList();\n if (!relays.isEmpty()) {\n for (Relay relay : relays) {\n final String appId = relay\n .getCustomPropertyByName(management.getAppType().toString().toLowerCase() + \"Id\");\n if (OpenHabRestApiClient.checkItemExists(management, appId)) {\n OpenHabRestApiClient.updateItemState(management, appId,\n translateOutputState(relay, Gpio.digitalRead(relay.getPin()) == 0));\n IoTLogger.getInstance().info(\"Item with id (\" + appId + \") exists in OpenHAB. Synced.\");\n } else {\n IoTLogger.getInstance().error(\"No item with id (\" + appId + \") in OpenHAB\");\n }\n }\n }\n // Sync contact states known to agent\n final List<ContactSensor> contactSensors = ContactsConfigReader.getContacts();\n if (!contactSensors.isEmpty()) {\n for (ContactSensor contactSensor : contactSensors) {\n final String appId = contactSensor\n .getCustomPropertyByName(management.getAppType().toString().toLowerCase() + \"Id\");\n if (OpenHabRestApiClient.checkItemExists(management, appId)) {\n OpenHabRestApiClient.updateItemState(management, appId,\n translateContactState(contactSensor, Gpio.digitalRead(contactSensor.getPin()) == 1));\n IoTLogger.getInstance().info(\"Item with id (\" + appId + \") exists in OpenHAB. Synced.\");\n } else {\n IoTLogger.getInstance().error(\"No item with id (\" + appId + \") in OpenHAB\");\n }\n }\n }\n // Sync temperature sensors known to agent\n final List<TemperatureSensor> tempSensors = TemperatureConfigReader.getTemperatureSesorList();\n if (!tempSensors.isEmpty()) {\n for (TemperatureSensor tempSensor : tempSensors) {\n final String appId = tempSensor\n .getCustomPropertyByName(management.getAppType().toString().toLowerCase() + \"Id\");\n if (OpenHabRestApiClient.checkItemExists(management, appId)) {\n try {\n OpenHabRestApiClient.updateItemState(management, appId,\n Float.toString(TemperatureSensorControllerFactory.getTemperatureSensorReader()\n .readTemperature(tempSensor)));\n } catch (ThingException e) {\n IoTLogger.getInstance().error(\"Failed to read temperature sensor value.\");\n }\n IoTLogger.getInstance().info(\"Item with id (\" + appId + \") exists in OpenHAB. Synced.\");\n } else {\n IoTLogger.getInstance().error(\"No item with id (\" + appId + \") in OpenHAB\");\n }\n }\n }\n return true;\n }", "@Test\n public void testGetInfo_1()\n throws Exception {\n LogicStep fixture = new LogicStep();\n fixture.setScript(\"\");\n fixture.setName(\"\");\n fixture.setOnFail(\"\");\n fixture.setScriptGroupName(\"\");\n fixture.stepIndex = 1;\n\n String result = fixture.getInfo();\n\n assertEquals(\"Logic Step: \", result);\n }", "@Test\n public void metalAndColorsTest() {\n JdiSite.homePage.openNewPageByHeaderMenu(HeaderMenuItem.METALS_AND_COLORS);\n JdiSite.metalAndColorsPage.checkOpened();\n // !TODO - I decided to remove the method from MetalAndColorsForm and make it easier\n JdiSite.metalAndColorsPage.fillAndSubmitMetalAndColorsForm(DefaultsData.DEFAULT_DATA);\n JdiSite.metalAndColorsPage.checkResults(DefaultsData.DEFAULT_DATA);\n }", "private boolean isMeterSupported(OpenFlowSwitch sw) {\n if (sw.factory().getVersion() == OFVersion.OF_10 ||\n sw.factory().getVersion() == OFVersion.OF_11 ||\n sw.factory().getVersion() == OFVersion.OF_12 ||\n NO_METER_SUPPORT.contains(sw.deviceType()) ||\n !isMeterCapable(sw)) {\n log.debug(\"{} does not support Meter.\\n\", sw.getDpid());\n return false;\n }\n\n return true;\n }", "public interface IMountService extends IInterface {\n /** Local-side IPC implementation stub class. */\n public static abstract class Stub extends Binder implements IMountService {\n private static class Proxy implements IMountService {\n private final IBinder mRemote;\n\n Proxy(IBinder remote) {\n mRemote = remote;\n }\n\n public IBinder asBinder() {\n return mRemote;\n }\n\n public String getInterfaceDescriptor() {\n return DESCRIPTOR;\n }\n\n /**\n * Registers an IMountServiceListener for receiving async\n * notifications.\n */\n public void registerListener(IMountServiceListener listener) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeStrongBinder((listener != null ? listener.asBinder() : null));\n mRemote.transact(Stub.TRANSACTION_registerListener, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Unregisters an IMountServiceListener\n */\n public void unregisterListener(IMountServiceListener listener) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeStrongBinder((listener != null ? listener.asBinder() : null));\n mRemote.transact(Stub.TRANSACTION_unregisterListener, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Returns true if a USB mass storage host is connected\n */\n public boolean isUsbMassStorageConnected() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n boolean _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_isUsbMassStorageConnected, _data, _reply, 0);\n _reply.readException();\n _result = 0 != _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Enables / disables USB mass storage. The caller should check\n * actual status of enabling/disabling USB mass storage via\n * StorageEventListener.\n */\n public void setUsbMassStorageEnabled(boolean enable) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt((enable ? 1 : 0));\n mRemote.transact(Stub.TRANSACTION_setUsbMassStorageEnabled, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Returns true if a USB mass storage host is enabled (media is\n * shared)\n */\n public boolean isUsbMassStorageEnabled() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n boolean _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_isUsbMassStorageEnabled, _data, _reply, 0);\n _reply.readException();\n _result = 0 != _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Mount external storage at given mount point. Returns an int\n * consistent with MountServiceResultCode\n */\n public int mountVolume(String mountPoint) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(mountPoint);\n mRemote.transact(Stub.TRANSACTION_mountVolume, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Safely unmount external storage at given mount point. The unmount\n * is an asynchronous operation. Applications should register\n * StorageEventListener for storage related status changes.\n */\n public void unmountVolume(String mountPoint, boolean force, boolean removeEncryption)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(mountPoint);\n _data.writeInt((force ? 1 : 0));\n _data.writeInt((removeEncryption ? 1 : 0));\n mRemote.transact(Stub.TRANSACTION_unmountVolume, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Format external storage given a mount point. Returns an int\n * consistent with MountServiceResultCode\n */\n public int formatVolume(String mountPoint) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(mountPoint);\n mRemote.transact(Stub.TRANSACTION_formatVolume, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Returns an array of pids with open files on the specified path.\n */\n public int[] getStorageUsers(String path) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int[] _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(path);\n mRemote.transact(Stub.TRANSACTION_getStorageUsers, _data, _reply, 0);\n _reply.readException();\n _result = _reply.createIntArray();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Gets the state of a volume via its mountpoint.\n */\n public String getVolumeState(String mountPoint) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(mountPoint);\n mRemote.transact(Stub.TRANSACTION_getVolumeState, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readString();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Creates a secure container with the specified parameters. Returns\n * an int consistent with MountServiceResultCode\n */\n public int createSecureContainer(String id, int sizeMb, String fstype, String key,\n int ownerUid, boolean external) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n _data.writeInt(sizeMb);\n _data.writeString(fstype);\n _data.writeString(key);\n _data.writeInt(ownerUid);\n _data.writeInt(external ? 1 : 0);\n mRemote.transact(Stub.TRANSACTION_createSecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Destroy a secure container, and free up all resources associated\n * with it. NOTE: Ensure all references are released prior to\n * deleting. Returns an int consistent with MountServiceResultCode\n */\n public int destroySecureContainer(String id, boolean force) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n _data.writeInt((force ? 1 : 0));\n mRemote.transact(Stub.TRANSACTION_destroySecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Finalize a container which has just been created and populated.\n * After finalization, the container is immutable. Returns an int\n * consistent with MountServiceResultCode\n */\n public int finalizeSecureContainer(String id) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n mRemote.transact(Stub.TRANSACTION_finalizeSecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Mount a secure container with the specified key and owner UID.\n * Returns an int consistent with MountServiceResultCode\n */\n public int mountSecureContainer(String id, String key, int ownerUid, boolean readOnly)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n _data.writeString(key);\n _data.writeInt(ownerUid);\n _data.writeInt(readOnly ? 1 : 0);\n mRemote.transact(Stub.TRANSACTION_mountSecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Unount a secure container. Returns an int consistent with\n * MountServiceResultCode\n */\n public int unmountSecureContainer(String id, boolean force) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n _data.writeInt((force ? 1 : 0));\n mRemote.transact(Stub.TRANSACTION_unmountSecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Returns true if the specified container is mounted\n */\n public boolean isSecureContainerMounted(String id) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n boolean _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n mRemote.transact(Stub.TRANSACTION_isSecureContainerMounted, _data, _reply, 0);\n _reply.readException();\n _result = 0 != _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Rename an unmounted secure container. Returns an int consistent\n * with MountServiceResultCode\n */\n public int renameSecureContainer(String oldId, String newId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(oldId);\n _data.writeString(newId);\n mRemote.transact(Stub.TRANSACTION_renameSecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Returns the filesystem path of a mounted secure container.\n */\n public String getSecureContainerPath(String id) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n mRemote.transact(Stub.TRANSACTION_getSecureContainerPath, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readString();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Gets an Array of currently known secure container IDs\n */\n public String[] getSecureContainerList() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String[] _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_getSecureContainerList, _data, _reply, 0);\n _reply.readException();\n _result = _reply.createStringArray();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Shuts down the MountService and gracefully unmounts all external\n * media. Invokes call back once the shutdown is complete.\n */\n public void shutdown(IMountShutdownObserver observer)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeStrongBinder((observer != null ? observer.asBinder() : null));\n mRemote.transact(Stub.TRANSACTION_shutdown, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Call into MountService by PackageManager to notify that its done\n * processing the media status update request.\n */\n public void finishMediaUpdate() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_finishMediaUpdate, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Mounts an Opaque Binary Blob (OBB) with the specified decryption\n * key and only allows the calling process's UID access to the\n * contents. MountService will call back to the supplied\n * IObbActionListener to inform it of the terminal state of the\n * call.\n */\n public void mountObb(String rawPath, String canonicalPath, String key,\n IObbActionListener token, int nonce) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(rawPath);\n _data.writeString(canonicalPath);\n _data.writeString(key);\n _data.writeStrongBinder((token != null ? token.asBinder() : null));\n _data.writeInt(nonce);\n mRemote.transact(Stub.TRANSACTION_mountObb, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Unmounts an Opaque Binary Blob (OBB). When the force flag is\n * specified, any program using it will be forcibly killed to\n * unmount the image. MountService will call back to the supplied\n * IObbActionListener to inform it of the terminal state of the\n * call.\n */\n public void unmountObb(\n String rawPath, boolean force, IObbActionListener token, int nonce)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(rawPath);\n _data.writeInt((force ? 1 : 0));\n _data.writeStrongBinder((token != null ? token.asBinder() : null));\n _data.writeInt(nonce);\n mRemote.transact(Stub.TRANSACTION_unmountObb, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Checks whether the specified Opaque Binary Blob (OBB) is mounted\n * somewhere.\n */\n public boolean isObbMounted(String rawPath) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n boolean _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(rawPath);\n mRemote.transact(Stub.TRANSACTION_isObbMounted, _data, _reply, 0);\n _reply.readException();\n _result = 0 != _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Gets the path to the mounted Opaque Binary Blob (OBB).\n */\n public String getMountedObbPath(String rawPath) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(rawPath);\n mRemote.transact(Stub.TRANSACTION_getMountedObbPath, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readString();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Returns whether the external storage is emulated.\n */\n public boolean isExternalStorageEmulated() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n boolean _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_isExternalStorageEmulated, _data, _reply, 0);\n _reply.readException();\n _result = 0 != _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public int getEncryptionState() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_getEncryptionState, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public int decryptStorage(String password) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(password);\n mRemote.transact(Stub.TRANSACTION_decryptStorage, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public int encryptStorage(int type, String password) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(type);\n _data.writeString(password);\n mRemote.transact(Stub.TRANSACTION_encryptStorage, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public int changeEncryptionPassword(int type, String password) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(type);\n _data.writeString(password);\n mRemote.transact(Stub.TRANSACTION_changeEncryptionPassword, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public int verifyEncryptionPassword(String password) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(password);\n mRemote.transact(Stub.TRANSACTION_verifyEncryptionPassword, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public int getPasswordType() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_getPasswordType, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public String getPassword() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_getPassword, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readString();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public void clearPassword() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_clearPassword, _data, _reply, IBinder.FLAG_ONEWAY);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n public void setField(String field, String data) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(field);\n _data.writeString(data);\n mRemote.transact(Stub.TRANSACTION_setField, _data, _reply, IBinder.FLAG_ONEWAY);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n public String getField(String field) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(field);\n mRemote.transact(Stub.TRANSACTION_getField, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readString();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public boolean isConvertibleToFBE() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n boolean _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_isConvertibleToFBE, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt() != 0;\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public StorageVolume[] getVolumeList(int uid, String packageName, int flags)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n StorageVolume[] _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(uid);\n _data.writeString(packageName);\n _data.writeInt(flags);\n mRemote.transact(Stub.TRANSACTION_getVolumeList, _data, _reply, 0);\n _reply.readException();\n _result = _reply.createTypedArray(StorageVolume.CREATOR);\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Returns the filesystem path of a mounted secure container.\n */\n public String getSecureContainerFilesystemPath(String id) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n mRemote.transact(Stub.TRANSACTION_getSecureContainerFilesystemPath, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readString();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Fix permissions in a container which has just been created and\n * populated. Returns an int consistent with MountServiceResultCode\n */\n public int fixPermissionsSecureContainer(String id, int gid, String filename)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n _data.writeInt(gid);\n _data.writeString(filename);\n mRemote.transact(Stub.TRANSACTION_fixPermissionsSecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public int mkdirs(String callingPkg, String path) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(callingPkg);\n _data.writeString(path);\n mRemote.transact(Stub.TRANSACTION_mkdirs, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public int resizeSecureContainer(String id, int sizeMb, String key)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n _data.writeInt(sizeMb);\n _data.writeString(key);\n mRemote.transact(Stub.TRANSACTION_resizeSecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public long lastMaintenance() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n long _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_lastMaintenance, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readLong();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public void runMaintenance() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_runMaintenance, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return;\n }\n\n @Override\n public void waitForAsecScan() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_waitForAsecScan, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return;\n }\n\n @Override\n public DiskInfo[] getDisks() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n DiskInfo[] _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_getDisks, _data, _reply, 0);\n _reply.readException();\n _result = _reply.createTypedArray(DiskInfo.CREATOR);\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public VolumeInfo[] getVolumes(int _flags) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n VolumeInfo[] _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(_flags);\n mRemote.transact(Stub.TRANSACTION_getVolumes, _data, _reply, 0);\n _reply.readException();\n _result = _reply.createTypedArray(VolumeInfo.CREATOR);\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public VolumeRecord[] getVolumeRecords(int _flags) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n VolumeRecord[] _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(_flags);\n mRemote.transact(Stub.TRANSACTION_getVolumeRecords, _data, _reply, 0);\n _reply.readException();\n _result = _reply.createTypedArray(VolumeRecord.CREATOR);\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public void mount(String volId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(volId);\n mRemote.transact(Stub.TRANSACTION_mount, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void unmount(String volId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(volId);\n mRemote.transact(Stub.TRANSACTION_unmount, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void format(String volId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(volId);\n mRemote.transact(Stub.TRANSACTION_format, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public long benchmark(String volId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(volId);\n mRemote.transact(Stub.TRANSACTION_benchmark, _data, _reply, 0);\n _reply.readException();\n return _reply.readLong();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void partitionPublic(String diskId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(diskId);\n mRemote.transact(Stub.TRANSACTION_partitionPublic, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void partitionPrivate(String diskId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(diskId);\n mRemote.transact(Stub.TRANSACTION_partitionPrivate, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void partitionMixed(String diskId, int ratio) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(diskId);\n _data.writeInt(ratio);\n mRemote.transact(Stub.TRANSACTION_partitionMixed, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void setVolumeNickname(String fsUuid, String nickname) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(fsUuid);\n _data.writeString(nickname);\n mRemote.transact(Stub.TRANSACTION_setVolumeNickname, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void setVolumeUserFlags(String fsUuid, int flags, int mask) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(fsUuid);\n _data.writeInt(flags);\n _data.writeInt(mask);\n mRemote.transact(Stub.TRANSACTION_setVolumeUserFlags, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void forgetVolume(String fsUuid) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(fsUuid);\n mRemote.transact(Stub.TRANSACTION_forgetVolume, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void forgetAllVolumes() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_forgetAllVolumes, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void setDebugFlags(int _flags, int _mask) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(_flags);\n _data.writeInt(_mask);\n mRemote.transact(Stub.TRANSACTION_setDebugFlags, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public String getPrimaryStorageUuid() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_getPrimaryStorageUuid, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readString();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public void setPrimaryStorageUuid(String volumeUuid, IPackageMoveObserver callback)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(volumeUuid);\n _data.writeStrongBinder((callback != null ? callback.asBinder() : null));\n mRemote.transact(Stub.TRANSACTION_setPrimaryStorageUuid, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void createUserKey(int userId, int serialNumber, boolean ephemeral)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(userId);\n _data.writeInt(serialNumber);\n _data.writeInt(ephemeral ? 1 : 0);\n mRemote.transact(Stub.TRANSACTION_createUserKey, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void destroyUserKey(int userId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(userId);\n mRemote.transact(Stub.TRANSACTION_destroyUserKey, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void addUserKeyAuth(int userId, int serialNumber,\n byte[] token, byte[] secret) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(userId);\n _data.writeInt(serialNumber);\n _data.writeByteArray(token);\n _data.writeByteArray(secret);\n mRemote.transact(Stub.TRANSACTION_addUserKeyAuth, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void fixateNewestUserKeyAuth(int userId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(userId);\n mRemote.transact(Stub.TRANSACTION_fixateNewestUserKeyAuth, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void unlockUserKey(int userId, int serialNumber,\n byte[] token, byte[] secret) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(userId);\n _data.writeInt(serialNumber);\n _data.writeByteArray(token);\n _data.writeByteArray(secret);\n mRemote.transact(Stub.TRANSACTION_unlockUserKey, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void lockUserKey(int userId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(userId);\n mRemote.transact(Stub.TRANSACTION_lockUserKey, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public boolean isUserKeyUnlocked(int userId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n boolean _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(userId);\n mRemote.transact(Stub.TRANSACTION_isUserKeyUnlocked, _data, _reply, 0);\n _reply.readException();\n _result = 0 != _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public void prepareUserStorage(\n String volumeUuid, int userId, int serialNumber, int flags)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(volumeUuid);\n _data.writeInt(userId);\n _data.writeInt(serialNumber);\n _data.writeInt(flags);\n mRemote.transact(Stub.TRANSACTION_prepareUserStorage, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void destroyUserStorage(String volumeUuid, int userId, int flags)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(volumeUuid);\n _data.writeInt(userId);\n _data.writeInt(flags);\n mRemote.transact(Stub.TRANSACTION_destroyUserStorage, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public ParcelFileDescriptor mountAppFuse(String name) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n ParcelFileDescriptor _result = null;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(name);\n mRemote.transact(Stub.TRANSACTION_mountAppFuse, _data, _reply, 0);\n _reply.readException();\n _result = _reply.<ParcelFileDescriptor>readParcelable(\n ClassLoader.getSystemClassLoader());\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n }\n\n private static final String DESCRIPTOR = \"IMountService\";\n\n static final int TRANSACTION_registerListener = IBinder.FIRST_CALL_TRANSACTION + 0;\n\n static final int TRANSACTION_unregisterListener = IBinder.FIRST_CALL_TRANSACTION + 1;\n\n static final int TRANSACTION_isUsbMassStorageConnected = IBinder.FIRST_CALL_TRANSACTION + 2;\n\n static final int TRANSACTION_setUsbMassStorageEnabled = IBinder.FIRST_CALL_TRANSACTION + 3;\n\n static final int TRANSACTION_isUsbMassStorageEnabled = IBinder.FIRST_CALL_TRANSACTION + 4;\n\n static final int TRANSACTION_mountVolume = IBinder.FIRST_CALL_TRANSACTION + 5;\n\n static final int TRANSACTION_unmountVolume = IBinder.FIRST_CALL_TRANSACTION + 6;\n\n static final int TRANSACTION_formatVolume = IBinder.FIRST_CALL_TRANSACTION + 7;\n\n static final int TRANSACTION_getStorageUsers = IBinder.FIRST_CALL_TRANSACTION + 8;\n\n static final int TRANSACTION_getVolumeState = IBinder.FIRST_CALL_TRANSACTION + 9;\n\n static final int TRANSACTION_createSecureContainer = IBinder.FIRST_CALL_TRANSACTION + 10;\n\n static final int TRANSACTION_finalizeSecureContainer = IBinder.FIRST_CALL_TRANSACTION + 11;\n\n static final int TRANSACTION_destroySecureContainer = IBinder.FIRST_CALL_TRANSACTION + 12;\n\n static final int TRANSACTION_mountSecureContainer = IBinder.FIRST_CALL_TRANSACTION + 13;\n\n static final int TRANSACTION_unmountSecureContainer = IBinder.FIRST_CALL_TRANSACTION + 14;\n\n static final int TRANSACTION_isSecureContainerMounted = IBinder.FIRST_CALL_TRANSACTION + 15;\n\n static final int TRANSACTION_renameSecureContainer = IBinder.FIRST_CALL_TRANSACTION + 16;\n\n static final int TRANSACTION_getSecureContainerPath = IBinder.FIRST_CALL_TRANSACTION + 17;\n\n static final int TRANSACTION_getSecureContainerList = IBinder.FIRST_CALL_TRANSACTION + 18;\n\n static final int TRANSACTION_shutdown = IBinder.FIRST_CALL_TRANSACTION + 19;\n\n static final int TRANSACTION_finishMediaUpdate = IBinder.FIRST_CALL_TRANSACTION + 20;\n\n static final int TRANSACTION_mountObb = IBinder.FIRST_CALL_TRANSACTION + 21;\n\n static final int TRANSACTION_unmountObb = IBinder.FIRST_CALL_TRANSACTION + 22;\n\n static final int TRANSACTION_isObbMounted = IBinder.FIRST_CALL_TRANSACTION + 23;\n\n static final int TRANSACTION_getMountedObbPath = IBinder.FIRST_CALL_TRANSACTION + 24;\n\n static final int TRANSACTION_isExternalStorageEmulated = IBinder.FIRST_CALL_TRANSACTION + 25;\n\n static final int TRANSACTION_decryptStorage = IBinder.FIRST_CALL_TRANSACTION + 26;\n\n static final int TRANSACTION_encryptStorage = IBinder.FIRST_CALL_TRANSACTION + 27;\n\n static final int TRANSACTION_changeEncryptionPassword = IBinder.FIRST_CALL_TRANSACTION + 28;\n\n static final int TRANSACTION_getVolumeList = IBinder.FIRST_CALL_TRANSACTION + 29;\n\n static final int TRANSACTION_getSecureContainerFilesystemPath = IBinder.FIRST_CALL_TRANSACTION + 30;\n\n static final int TRANSACTION_getEncryptionState = IBinder.FIRST_CALL_TRANSACTION + 31;\n\n static final int TRANSACTION_verifyEncryptionPassword = IBinder.FIRST_CALL_TRANSACTION + 32;\n\n static final int TRANSACTION_fixPermissionsSecureContainer = IBinder.FIRST_CALL_TRANSACTION + 33;\n\n static final int TRANSACTION_mkdirs = IBinder.FIRST_CALL_TRANSACTION + 34;\n\n static final int TRANSACTION_getPasswordType = IBinder.FIRST_CALL_TRANSACTION + 35;\n\n static final int TRANSACTION_getPassword = IBinder.FIRST_CALL_TRANSACTION + 36;\n\n static final int TRANSACTION_clearPassword = IBinder.FIRST_CALL_TRANSACTION + 37;\n\n static final int TRANSACTION_setField = IBinder.FIRST_CALL_TRANSACTION + 38;\n\n static final int TRANSACTION_getField = IBinder.FIRST_CALL_TRANSACTION + 39;\n\n static final int TRANSACTION_resizeSecureContainer = IBinder.FIRST_CALL_TRANSACTION + 40;\n\n static final int TRANSACTION_lastMaintenance = IBinder.FIRST_CALL_TRANSACTION + 41;\n\n static final int TRANSACTION_runMaintenance = IBinder.FIRST_CALL_TRANSACTION + 42;\n\n static final int TRANSACTION_waitForAsecScan = IBinder.FIRST_CALL_TRANSACTION + 43;\n\n static final int TRANSACTION_getDisks = IBinder.FIRST_CALL_TRANSACTION + 44;\n static final int TRANSACTION_getVolumes = IBinder.FIRST_CALL_TRANSACTION + 45;\n static final int TRANSACTION_getVolumeRecords = IBinder.FIRST_CALL_TRANSACTION + 46;\n\n static final int TRANSACTION_mount = IBinder.FIRST_CALL_TRANSACTION + 47;\n static final int TRANSACTION_unmount = IBinder.FIRST_CALL_TRANSACTION + 48;\n static final int TRANSACTION_format = IBinder.FIRST_CALL_TRANSACTION + 49;\n\n static final int TRANSACTION_partitionPublic = IBinder.FIRST_CALL_TRANSACTION + 50;\n static final int TRANSACTION_partitionPrivate = IBinder.FIRST_CALL_TRANSACTION + 51;\n static final int TRANSACTION_partitionMixed = IBinder.FIRST_CALL_TRANSACTION + 52;\n\n static final int TRANSACTION_setVolumeNickname = IBinder.FIRST_CALL_TRANSACTION + 53;\n static final int TRANSACTION_setVolumeUserFlags = IBinder.FIRST_CALL_TRANSACTION + 54;\n static final int TRANSACTION_forgetVolume = IBinder.FIRST_CALL_TRANSACTION + 55;\n static final int TRANSACTION_forgetAllVolumes = IBinder.FIRST_CALL_TRANSACTION + 56;\n\n static final int TRANSACTION_getPrimaryStorageUuid = IBinder.FIRST_CALL_TRANSACTION + 57;\n static final int TRANSACTION_setPrimaryStorageUuid = IBinder.FIRST_CALL_TRANSACTION + 58;\n\n static final int TRANSACTION_benchmark = IBinder.FIRST_CALL_TRANSACTION + 59;\n static final int TRANSACTION_setDebugFlags = IBinder.FIRST_CALL_TRANSACTION + 60;\n\n static final int TRANSACTION_createUserKey = IBinder.FIRST_CALL_TRANSACTION + 61;\n static final int TRANSACTION_destroyUserKey = IBinder.FIRST_CALL_TRANSACTION + 62;\n\n static final int TRANSACTION_unlockUserKey = IBinder.FIRST_CALL_TRANSACTION + 63;\n static final int TRANSACTION_lockUserKey = IBinder.FIRST_CALL_TRANSACTION + 64;\n static final int TRANSACTION_isUserKeyUnlocked = IBinder.FIRST_CALL_TRANSACTION + 65;\n\n static final int TRANSACTION_prepareUserStorage = IBinder.FIRST_CALL_TRANSACTION + 66;\n static final int TRANSACTION_destroyUserStorage = IBinder.FIRST_CALL_TRANSACTION + 67;\n\n static final int TRANSACTION_isConvertibleToFBE = IBinder.FIRST_CALL_TRANSACTION + 68;\n\n static final int TRANSACTION_mountAppFuse = IBinder.FIRST_CALL_TRANSACTION + 69;\n\n static final int TRANSACTION_addUserKeyAuth = IBinder.FIRST_CALL_TRANSACTION + 70;\n\n static final int TRANSACTION_fixateNewestUserKeyAuth = IBinder.FIRST_CALL_TRANSACTION + 71;\n\n /**\n * Cast an IBinder object into an IMountService interface, generating a\n * proxy if needed.\n */\n public static IMountService asInterface(IBinder obj) {\n if (obj == null) {\n return null;\n }\n IInterface iin = obj.queryLocalInterface(DESCRIPTOR);\n if (iin != null && iin instanceof IMountService) {\n return (IMountService) iin;\n }\n return new IMountService.Stub.Proxy(obj);\n }\n\n /** Construct the stub at attach it to the interface. */\n public Stub() {\n attachInterface(this, DESCRIPTOR);\n }\n\n public IBinder asBinder() {\n return this;\n }\n\n @Override\n public boolean onTransact(int code, Parcel data, Parcel reply,\n int flags) throws RemoteException {\n switch (code) {\n case INTERFACE_TRANSACTION: {\n reply.writeString(DESCRIPTOR);\n return true;\n }\n case TRANSACTION_registerListener: {\n data.enforceInterface(DESCRIPTOR);\n IMountServiceListener listener;\n listener = IMountServiceListener.Stub.asInterface(data.readStrongBinder());\n registerListener(listener);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_unregisterListener: {\n data.enforceInterface(DESCRIPTOR);\n IMountServiceListener listener;\n listener = IMountServiceListener.Stub.asInterface(data.readStrongBinder());\n unregisterListener(listener);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_isUsbMassStorageConnected: {\n data.enforceInterface(DESCRIPTOR);\n boolean result = isUsbMassStorageConnected();\n reply.writeNoException();\n reply.writeInt((result ? 1 : 0));\n return true;\n }\n case TRANSACTION_setUsbMassStorageEnabled: {\n data.enforceInterface(DESCRIPTOR);\n boolean enable;\n enable = 0 != data.readInt();\n setUsbMassStorageEnabled(enable);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_isUsbMassStorageEnabled: {\n data.enforceInterface(DESCRIPTOR);\n boolean result = isUsbMassStorageEnabled();\n reply.writeNoException();\n reply.writeInt((result ? 1 : 0));\n return true;\n }\n case TRANSACTION_mountVolume: {\n data.enforceInterface(DESCRIPTOR);\n String mountPoint;\n mountPoint = data.readString();\n int resultCode = mountVolume(mountPoint);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_unmountVolume: {\n data.enforceInterface(DESCRIPTOR);\n String mountPoint;\n mountPoint = data.readString();\n boolean force = 0 != data.readInt();\n boolean removeEncrypt = 0 != data.readInt();\n unmountVolume(mountPoint, force, removeEncrypt);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_formatVolume: {\n data.enforceInterface(DESCRIPTOR);\n String mountPoint;\n mountPoint = data.readString();\n int result = formatVolume(mountPoint);\n reply.writeNoException();\n reply.writeInt(result);\n return true;\n }\n case TRANSACTION_getStorageUsers: {\n data.enforceInterface(DESCRIPTOR);\n String path;\n path = data.readString();\n int[] pids = getStorageUsers(path);\n reply.writeNoException();\n reply.writeIntArray(pids);\n return true;\n }\n case TRANSACTION_getVolumeState: {\n data.enforceInterface(DESCRIPTOR);\n String mountPoint;\n mountPoint = data.readString();\n String state = getVolumeState(mountPoint);\n reply.writeNoException();\n reply.writeString(state);\n return true;\n }\n case TRANSACTION_createSecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n int sizeMb;\n sizeMb = data.readInt();\n String fstype;\n fstype = data.readString();\n String key;\n key = data.readString();\n int ownerUid;\n ownerUid = data.readInt();\n boolean external;\n external = 0 != data.readInt();\n int resultCode = createSecureContainer(id, sizeMb, fstype, key, ownerUid,\n external);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_finalizeSecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n int resultCode = finalizeSecureContainer(id);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_destroySecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n boolean force;\n force = 0 != data.readInt();\n int resultCode = destroySecureContainer(id, force);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_mountSecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n String key;\n key = data.readString();\n int ownerUid;\n ownerUid = data.readInt();\n boolean readOnly;\n readOnly = data.readInt() != 0;\n int resultCode = mountSecureContainer(id, key, ownerUid, readOnly);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_unmountSecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n boolean force;\n force = 0 != data.readInt();\n int resultCode = unmountSecureContainer(id, force);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_isSecureContainerMounted: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n boolean status = isSecureContainerMounted(id);\n reply.writeNoException();\n reply.writeInt((status ? 1 : 0));\n return true;\n }\n case TRANSACTION_renameSecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String oldId;\n oldId = data.readString();\n String newId;\n newId = data.readString();\n int resultCode = renameSecureContainer(oldId, newId);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_getSecureContainerPath: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n String path = getSecureContainerPath(id);\n reply.writeNoException();\n reply.writeString(path);\n return true;\n }\n case TRANSACTION_getSecureContainerList: {\n data.enforceInterface(DESCRIPTOR);\n String[] ids = getSecureContainerList();\n reply.writeNoException();\n reply.writeStringArray(ids);\n return true;\n }\n case TRANSACTION_shutdown: {\n data.enforceInterface(DESCRIPTOR);\n IMountShutdownObserver observer;\n observer = IMountShutdownObserver.Stub.asInterface(data\n .readStrongBinder());\n shutdown(observer);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_finishMediaUpdate: {\n data.enforceInterface(DESCRIPTOR);\n finishMediaUpdate();\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_mountObb: {\n data.enforceInterface(DESCRIPTOR);\n final String rawPath = data.readString();\n final String canonicalPath = data.readString();\n final String key = data.readString();\n IObbActionListener observer;\n observer = IObbActionListener.Stub.asInterface(data.readStrongBinder());\n int nonce;\n nonce = data.readInt();\n mountObb(rawPath, canonicalPath, key, observer, nonce);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_unmountObb: {\n data.enforceInterface(DESCRIPTOR);\n String filename;\n filename = data.readString();\n boolean force;\n force = 0 != data.readInt();\n IObbActionListener observer;\n observer = IObbActionListener.Stub.asInterface(data.readStrongBinder());\n int nonce;\n nonce = data.readInt();\n unmountObb(filename, force, observer, nonce);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_isObbMounted: {\n data.enforceInterface(DESCRIPTOR);\n String filename;\n filename = data.readString();\n boolean status = isObbMounted(filename);\n reply.writeNoException();\n reply.writeInt((status ? 1 : 0));\n return true;\n }\n case TRANSACTION_getMountedObbPath: {\n data.enforceInterface(DESCRIPTOR);\n String filename;\n filename = data.readString();\n String mountedPath = getMountedObbPath(filename);\n reply.writeNoException();\n reply.writeString(mountedPath);\n return true;\n }\n case TRANSACTION_isExternalStorageEmulated: {\n data.enforceInterface(DESCRIPTOR);\n boolean emulated = isExternalStorageEmulated();\n reply.writeNoException();\n reply.writeInt(emulated ? 1 : 0);\n return true;\n }\n case TRANSACTION_decryptStorage: {\n data.enforceInterface(DESCRIPTOR);\n String password = data.readString();\n int result = decryptStorage(password);\n reply.writeNoException();\n reply.writeInt(result);\n return true;\n }\n case TRANSACTION_encryptStorage: {\n data.enforceInterface(DESCRIPTOR);\n int type = data.readInt();\n String password = data.readString();\n int result = encryptStorage(type, password);\n reply.writeNoException();\n reply.writeInt(result);\n return true;\n }\n case TRANSACTION_changeEncryptionPassword: {\n data.enforceInterface(DESCRIPTOR);\n int type = data.readInt();\n String password = data.readString();\n int result = changeEncryptionPassword(type, password);\n reply.writeNoException();\n reply.writeInt(result);\n return true;\n }\n case TRANSACTION_getVolumeList: {\n data.enforceInterface(DESCRIPTOR);\n int uid = data.readInt();\n String packageName = data.readString();\n int _flags = data.readInt();\n StorageVolume[] result = getVolumeList(uid, packageName, _flags);\n reply.writeNoException();\n reply.writeTypedArray(result, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE);\n return true;\n }\n case TRANSACTION_getSecureContainerFilesystemPath: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n String path = getSecureContainerFilesystemPath(id);\n reply.writeNoException();\n reply.writeString(path);\n return true;\n }\n case TRANSACTION_getEncryptionState: {\n data.enforceInterface(DESCRIPTOR);\n int result = getEncryptionState();\n reply.writeNoException();\n reply.writeInt(result);\n return true;\n }\n case TRANSACTION_fixPermissionsSecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n int gid;\n gid = data.readInt();\n String filename;\n filename = data.readString();\n int resultCode = fixPermissionsSecureContainer(id, gid, filename);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_mkdirs: {\n data.enforceInterface(DESCRIPTOR);\n String callingPkg = data.readString();\n String path = data.readString();\n int result = mkdirs(callingPkg, path);\n reply.writeNoException();\n reply.writeInt(result);\n return true;\n }\n case TRANSACTION_getPasswordType: {\n data.enforceInterface(DESCRIPTOR);\n int result = getPasswordType();\n reply.writeNoException();\n reply.writeInt(result);\n return true;\n }\n case TRANSACTION_getPassword: {\n data.enforceInterface(DESCRIPTOR);\n String result = getPassword();\n reply.writeNoException();\n reply.writeString(result);\n return true;\n }\n case TRANSACTION_clearPassword: {\n data.enforceInterface(DESCRIPTOR);\n clearPassword();\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_setField: {\n data.enforceInterface(DESCRIPTOR);\n String field = data.readString();\n String contents = data.readString();\n setField(field, contents);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_getField: {\n data.enforceInterface(DESCRIPTOR);\n String field = data.readString();\n String contents = getField(field);\n reply.writeNoException();\n reply.writeString(contents);\n return true;\n }\n case TRANSACTION_isConvertibleToFBE: {\n data.enforceInterface(DESCRIPTOR);\n int resultCode = isConvertibleToFBE() ? 1 : 0;\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_resizeSecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n int sizeMb;\n sizeMb = data.readInt();\n String key;\n key = data.readString();\n int resultCode = resizeSecureContainer(id, sizeMb, key);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_lastMaintenance: {\n data.enforceInterface(DESCRIPTOR);\n long lastMaintenance = lastMaintenance();\n reply.writeNoException();\n reply.writeLong(lastMaintenance);\n return true;\n }\n case TRANSACTION_runMaintenance: {\n data.enforceInterface(DESCRIPTOR);\n runMaintenance();\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_waitForAsecScan: {\n data.enforceInterface(DESCRIPTOR);\n waitForAsecScan();\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_getDisks: {\n data.enforceInterface(DESCRIPTOR);\n DiskInfo[] disks = getDisks();\n reply.writeNoException();\n reply.writeTypedArray(disks, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE);\n return true;\n }\n case TRANSACTION_getVolumes: {\n data.enforceInterface(DESCRIPTOR);\n int _flags = data.readInt();\n VolumeInfo[] volumes = getVolumes(_flags);\n reply.writeNoException();\n reply.writeTypedArray(volumes, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE);\n return true;\n }\n case TRANSACTION_getVolumeRecords: {\n data.enforceInterface(DESCRIPTOR);\n int _flags = data.readInt();\n VolumeRecord[] volumes = getVolumeRecords(_flags);\n reply.writeNoException();\n reply.writeTypedArray(volumes, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE);\n return true;\n }\n case TRANSACTION_mount: {\n data.enforceInterface(DESCRIPTOR);\n String volId = data.readString();\n mount(volId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_unmount: {\n data.enforceInterface(DESCRIPTOR);\n String volId = data.readString();\n unmount(volId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_format: {\n data.enforceInterface(DESCRIPTOR);\n String volId = data.readString();\n format(volId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_benchmark: {\n data.enforceInterface(DESCRIPTOR);\n String volId = data.readString();\n long res = benchmark(volId);\n reply.writeNoException();\n reply.writeLong(res);\n return true;\n }\n case TRANSACTION_partitionPublic: {\n data.enforceInterface(DESCRIPTOR);\n String diskId = data.readString();\n partitionPublic(diskId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_partitionPrivate: {\n data.enforceInterface(DESCRIPTOR);\n String diskId = data.readString();\n partitionPrivate(diskId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_partitionMixed: {\n data.enforceInterface(DESCRIPTOR);\n String diskId = data.readString();\n int ratio = data.readInt();\n partitionMixed(diskId, ratio);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_setVolumeNickname: {\n data.enforceInterface(DESCRIPTOR);\n String volId = data.readString();\n String nickname = data.readString();\n setVolumeNickname(volId, nickname);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_setVolumeUserFlags: {\n data.enforceInterface(DESCRIPTOR);\n String volId = data.readString();\n int _flags = data.readInt();\n int _mask = data.readInt();\n setVolumeUserFlags(volId, _flags, _mask);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_forgetVolume: {\n data.enforceInterface(DESCRIPTOR);\n String fsUuid = data.readString();\n forgetVolume(fsUuid);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_forgetAllVolumes: {\n data.enforceInterface(DESCRIPTOR);\n forgetAllVolumes();\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_setDebugFlags: {\n data.enforceInterface(DESCRIPTOR);\n int _flags = data.readInt();\n int _mask = data.readInt();\n setDebugFlags(_flags, _mask);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_getPrimaryStorageUuid: {\n data.enforceInterface(DESCRIPTOR);\n String volumeUuid = getPrimaryStorageUuid();\n reply.writeNoException();\n reply.writeString(volumeUuid);\n return true;\n }\n case TRANSACTION_setPrimaryStorageUuid: {\n data.enforceInterface(DESCRIPTOR);\n String volumeUuid = data.readString();\n IPackageMoveObserver listener = IPackageMoveObserver.Stub.asInterface(\n data.readStrongBinder());\n setPrimaryStorageUuid(volumeUuid, listener);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_createUserKey: {\n data.enforceInterface(DESCRIPTOR);\n int userId = data.readInt();\n int serialNumber = data.readInt();\n boolean ephemeral = data.readInt() != 0;\n createUserKey(userId, serialNumber, ephemeral);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_destroyUserKey: {\n data.enforceInterface(DESCRIPTOR);\n int userId = data.readInt();\n destroyUserKey(userId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_addUserKeyAuth: {\n data.enforceInterface(DESCRIPTOR);\n int userId = data.readInt();\n int serialNumber = data.readInt();\n byte[] token = data.createByteArray();\n byte[] secret = data.createByteArray();\n addUserKeyAuth(userId, serialNumber, token, secret);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_fixateNewestUserKeyAuth: {\n data.enforceInterface(DESCRIPTOR);\n int userId = data.readInt();\n fixateNewestUserKeyAuth(userId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_unlockUserKey: {\n data.enforceInterface(DESCRIPTOR);\n int userId = data.readInt();\n int serialNumber = data.readInt();\n byte[] token = data.createByteArray();\n byte[] secret = data.createByteArray();\n unlockUserKey(userId, serialNumber, token, secret);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_lockUserKey: {\n data.enforceInterface(DESCRIPTOR);\n int userId = data.readInt();\n lockUserKey(userId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_isUserKeyUnlocked: {\n data.enforceInterface(DESCRIPTOR);\n int userId = data.readInt();\n boolean result = isUserKeyUnlocked(userId);\n reply.writeNoException();\n reply.writeInt(result ? 1 : 0);\n return true;\n }\n case TRANSACTION_prepareUserStorage: {\n data.enforceInterface(DESCRIPTOR);\n String volumeUuid = data.readString();\n int userId = data.readInt();\n int serialNumber = data.readInt();\n int _flags = data.readInt();\n prepareUserStorage(volumeUuid, userId, serialNumber, _flags);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_destroyUserStorage: {\n data.enforceInterface(DESCRIPTOR);\n String volumeUuid = data.readString();\n int userId = data.readInt();\n int _flags = data.readInt();\n destroyUserStorage(volumeUuid, userId, _flags);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_mountAppFuse: {\n data.enforceInterface(DESCRIPTOR);\n String name = data.readString();\n ParcelFileDescriptor fd = mountAppFuse(name);\n reply.writeNoException();\n reply.writeParcelable(fd, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);\n return true;\n }\n }\n return super.onTransact(code, data, reply, flags);\n }\n }\n\n /*\n * Creates a secure container with the specified parameters. Returns an int\n * consistent with MountServiceResultCode\n */\n public int createSecureContainer(String id, int sizeMb, String fstype, String key,\n int ownerUid, boolean external) throws RemoteException;\n\n /*\n * Destroy a secure container, and free up all resources associated with it.\n * NOTE: Ensure all references are released prior to deleting. Returns an\n * int consistent with MountServiceResultCode\n */\n public int destroySecureContainer(String id, boolean force) throws RemoteException;\n\n /*\n * Finalize a container which has just been created and populated. After\n * finalization, the container is immutable. Returns an int consistent with\n * MountServiceResultCode\n */\n public int finalizeSecureContainer(String id) throws RemoteException;\n\n /**\n * Call into MountService by PackageManager to notify that its done\n * processing the media status update request.\n */\n public void finishMediaUpdate() throws RemoteException;\n\n /**\n * Format external storage given a mount point. Returns an int consistent\n * with MountServiceResultCode\n */\n public int formatVolume(String mountPoint) throws RemoteException;\n\n /**\n * Gets the path to the mounted Opaque Binary Blob (OBB).\n */\n public String getMountedObbPath(String rawPath) throws RemoteException;\n\n /**\n * Gets an Array of currently known secure container IDs\n */\n public String[] getSecureContainerList() throws RemoteException;\n\n /*\n * Returns the filesystem path of a mounted secure container.\n */\n public String getSecureContainerPath(String id) throws RemoteException;\n\n /**\n * Returns an array of pids with open files on the specified path.\n */\n public int[] getStorageUsers(String path) throws RemoteException;\n\n /**\n * Gets the state of a volume via its mountpoint.\n */\n public String getVolumeState(String mountPoint) throws RemoteException;\n\n /**\n * Checks whether the specified Opaque Binary Blob (OBB) is mounted\n * somewhere.\n */\n public boolean isObbMounted(String rawPath) throws RemoteException;\n\n /*\n * Returns true if the specified container is mounted\n */\n public boolean isSecureContainerMounted(String id) throws RemoteException;\n\n /**\n * Returns true if a USB mass storage host is connected\n */\n public boolean isUsbMassStorageConnected() throws RemoteException;\n\n /**\n * Returns true if a USB mass storage host is enabled (media is shared)\n */\n public boolean isUsbMassStorageEnabled() throws RemoteException;\n\n /**\n * Mounts an Opaque Binary Blob (OBB) with the specified decryption key and\n * only allows the calling process's UID access to the contents.\n * MountService will call back to the supplied IObbActionListener to inform\n * it of the terminal state of the call.\n */\n public void mountObb(String rawPath, String canonicalPath, String key,\n IObbActionListener token, int nonce) throws RemoteException;\n\n /*\n * Mount a secure container with the specified key and owner UID. Returns an\n * int consistent with MountServiceResultCode\n */\n public int mountSecureContainer(String id, String key, int ownerUid, boolean readOnly)\n throws RemoteException;\n\n /**\n * Mount external storage at given mount point. Returns an int consistent\n * with MountServiceResultCode\n */\n public int mountVolume(String mountPoint) throws RemoteException;\n\n /**\n * Registers an IMountServiceListener for receiving async notifications.\n */\n public void registerListener(IMountServiceListener listener) throws RemoteException;\n\n /*\n * Rename an unmounted secure container. Returns an int consistent with\n * MountServiceResultCode\n */\n public int renameSecureContainer(String oldId, String newId) throws RemoteException;\n\n /**\n * Enables / disables USB mass storage. The caller should check actual\n * status of enabling/disabling USB mass storage via StorageEventListener.\n */\n public void setUsbMassStorageEnabled(boolean enable) throws RemoteException;\n\n /**\n * Shuts down the MountService and gracefully unmounts all external media.\n * Invokes call back once the shutdown is complete.\n */\n public void shutdown(IMountShutdownObserver observer) throws RemoteException;\n\n /**\n * Unmounts an Opaque Binary Blob (OBB). When the force flag is specified,\n * any program using it will be forcibly killed to unmount the image.\n * MountService will call back to the supplied IObbActionListener to inform\n * it of the terminal state of the call.\n */\n public void unmountObb(String rawPath, boolean force, IObbActionListener token, int nonce)\n throws RemoteException;\n\n /*\n * Unount a secure container. Returns an int consistent with\n * MountServiceResultCode\n */\n public int unmountSecureContainer(String id, boolean force) throws RemoteException;\n\n /**\n * Safely unmount external storage at given mount point. The unmount is an\n * asynchronous operation. Applications should register StorageEventListener\n * for storage related status changes.\n * @param mountPoint the mount point\n * @param force whether or not to forcefully unmount it (e.g. even if programs are using this\n * data currently)\n * @param removeEncryption whether or not encryption mapping should be removed from the volume.\n * This value implies {@code force}.\n */\n public void unmountVolume(String mountPoint, boolean force, boolean removeEncryption)\n throws RemoteException;\n\n /**\n * Unregisters an IMountServiceListener\n */\n public void unregisterListener(IMountServiceListener listener) throws RemoteException;\n\n /**\n * Returns whether or not the external storage is emulated.\n */\n public boolean isExternalStorageEmulated() throws RemoteException;\n\n /** The volume is not encrypted. */\n static final int ENCRYPTION_STATE_NONE = 1;\n /** The volume has been encrypted succesfully. */\n static final int ENCRYPTION_STATE_OK = 0;\n /** The volume is in a bad state.*/\n static final int ENCRYPTION_STATE_ERROR_UNKNOWN = -1;\n /** Encryption is incomplete */\n static final int ENCRYPTION_STATE_ERROR_INCOMPLETE = -2;\n /** Encryption is incomplete and irrecoverable */\n static final int ENCRYPTION_STATE_ERROR_INCONSISTENT = -3;\n /** Underlying data is corrupt */\n static final int ENCRYPTION_STATE_ERROR_CORRUPT = -4;\n\n /**\n * Determines the encryption state of the volume.\n * @return a numerical value. See {@code ENCRYPTION_STATE_*} for possible\n * values.\n * Note that this has been replaced in most cases by the APIs in\n * StorageManager (see isEncryptable and below)\n * This is still useful to get the error state when encryption has failed\n * and CryptKeeper needs to throw up a screen advising the user what to do\n */\n public int getEncryptionState() throws RemoteException;\n\n /**\n * Decrypts any encrypted volumes.\n */\n public int decryptStorage(String password) throws RemoteException;\n\n /**\n * Encrypts storage.\n */\n public int encryptStorage(int type, String password) throws RemoteException;\n\n /**\n * Changes the encryption password.\n */\n public int changeEncryptionPassword(int type, String password)\n throws RemoteException;\n\n /**\n * Verify the encryption password against the stored volume. This method\n * may only be called by the system process.\n */\n public int verifyEncryptionPassword(String password) throws RemoteException;\n\n /**\n * Returns list of all mountable volumes.\n */\n public StorageVolume[] getVolumeList(int uid, String packageName, int flags) throws RemoteException;\n\n /**\n * Gets the path on the filesystem for the ASEC container itself.\n *\n * @param cid ASEC container ID\n * @return path to filesystem or {@code null} if it's not found\n * @throws RemoteException\n */\n public String getSecureContainerFilesystemPath(String cid) throws RemoteException;\n\n /*\n * Fix permissions in a container which has just been created and populated.\n * Returns an int consistent with MountServiceResultCode\n */\n public int fixPermissionsSecureContainer(String id, int gid, String filename)\n throws RemoteException;\n\n /**\n * Ensure that all directories along given path exist, creating parent\n * directories as needed. Validates that given path is absolute and that it\n * contains no relative \".\" or \"..\" paths or symlinks. Also ensures that\n * path belongs to a volume managed by vold, and that path is either\n * external storage data or OBB directory belonging to calling app.\n */\n public int mkdirs(String callingPkg, String path) throws RemoteException;\n\n /**\n * Determines the type of the encryption password\n * @return PasswordType\n */\n public int getPasswordType() throws RemoteException;\n\n /**\n * Get password from vold\n * @return password or empty string\n */\n public String getPassword() throws RemoteException;\n\n /**\n * Securely clear password from vold\n */\n public void clearPassword() throws RemoteException;\n\n /**\n * Set a field in the crypto header.\n * @param field field to set\n * @param contents contents to set in field\n */\n public void setField(String field, String contents) throws RemoteException;\n\n /**\n * Gets a field from the crypto header.\n * @param field field to get\n * @return contents of field\n */\n public String getField(String field) throws RemoteException;\n\n public boolean isConvertibleToFBE() throws RemoteException;\n\n public int resizeSecureContainer(String id, int sizeMb, String key) throws RemoteException;\n\n /**\n * Report the time of the last maintenance operation such as fstrim.\n * @return Timestamp of the last maintenance operation, in the\n * System.currentTimeMillis() time base\n * @throws RemoteException\n */\n public long lastMaintenance() throws RemoteException;\n\n /**\n * Kick off an immediate maintenance operation\n * @throws RemoteException\n */\n public void runMaintenance() throws RemoteException;\n\n public void waitForAsecScan() throws RemoteException;\n\n public DiskInfo[] getDisks() throws RemoteException;\n public VolumeInfo[] getVolumes(int flags) throws RemoteException;\n public VolumeRecord[] getVolumeRecords(int flags) throws RemoteException;\n\n public void mount(String volId) throws RemoteException;\n public void unmount(String volId) throws RemoteException;\n public void format(String volId) throws RemoteException;\n public long benchmark(String volId) throws RemoteException;\n\n public void partitionPublic(String diskId) throws RemoteException;\n public void partitionPrivate(String diskId) throws RemoteException;\n public void partitionMixed(String diskId, int ratio) throws RemoteException;\n\n public void setVolumeNickname(String fsUuid, String nickname) throws RemoteException;\n public void setVolumeUserFlags(String fsUuid, int flags, int mask) throws RemoteException;\n public void forgetVolume(String fsUuid) throws RemoteException;\n public void forgetAllVolumes() throws RemoteException;\n public void setDebugFlags(int flags, int mask) throws RemoteException;\n\n public String getPrimaryStorageUuid() throws RemoteException;\n public void setPrimaryStorageUuid(String volumeUuid, IPackageMoveObserver callback)\n throws RemoteException;\n\n public void createUserKey(int userId, int serialNumber, boolean ephemeral)\n throws RemoteException;\n public void destroyUserKey(int userId) throws RemoteException;\n public void addUserKeyAuth(int userId, int serialNumber,\n byte[] token, byte[] secret) throws RemoteException;\n public void fixateNewestUserKeyAuth(int userId) throws RemoteException;\n\n public void unlockUserKey(int userId, int serialNumber,\n byte[] token, byte[] secret) throws RemoteException;\n public void lockUserKey(int userId) throws RemoteException;\n public boolean isUserKeyUnlocked(int userId) throws RemoteException;\n\n public void prepareUserStorage(String volumeUuid, int userId, int serialNumber,\n int flags) throws RemoteException;\n public void destroyUserStorage(String volumeUuid, int userId, int flags) throws RemoteException;\n\n public ParcelFileDescriptor mountAppFuse(String name) throws RemoteException;\n}", "@java.lang.Override\n public boolean hasNetwork() {\n return stepInfoCase_ == 17;\n }", "@Override\n public void onSuccess() {\n Log.i(\"bmob\",\"设备信息更新成功\");\n }", "Info mo7564ix();", "@Test\n public void mvtMBTilesTest() {\n try {\n JavaResources.copyFileFromResources(main, LIECHTENSTEIN_MBTILES, null, \"mbtiles\");\n JavaResources.copyFileFromResources(main, \"osm-liberty.json\", null, \"mbtiles\");\n JavaResources.copyFileFromResources(main, \"osm-liberty-sprite.json\", null, \"mbtiles\");\n JavaResources.copyFileFromResources(main, \"osm-liberty-sprite.png\", null, \"mbtiles\");\n } catch (IOException e) {\n fail(e.getMessage());\n }\n Preferences prefs = new Preferences(main);\n LayerUtils.removeImageryLayers(main);\n main.getMap().setPrefs(main, prefs);\n monitor = instrumentation.addMonitor(PrefEditor.class.getName(), null, false);\n assertTrue(TestUtils.clickButton(device, device.getCurrentPackageName() + \":id/menu_config\", true));\n instrumentation.waitForMonitorWithTimeout(monitor, 40000); // wait for main\n assertTrue(TestUtils.clickText(device, false, main.getString(R.string.config_customlayers_title), true, false));\n assertTrue(TestUtils.clickButton(device, device.getCurrentPackageName() + \":id/add\", true));\n assertTrue(TestUtils.clickButton(device, device.getCurrentPackageName() + \":id/file_button\", true));\n TestUtils.selectFile(device, main, \"mbtiles\", LIECHTENSTEIN_MBTILES, true);\n assertTrue(TestUtils.findText(device, false, TILEMAKER));\n assertTrue(TestUtils.findText(device, false, \"47.271280\"));\n assertTrue(TestUtils.clickText(device, false, main.getString(R.string.save_and_set), true, false));\n assertTrue(TestUtils.findText(device, false, TILEMAKER));\n assertTrue(TestUtils.clickText(device, false, main.getString(R.string.done), true, false));\n assertTrue(TestUtils.clickHome(device, true));\n // go to somewhere in Vaduz\n Map map = App.getLogic().getMap();\n UiObject2 extentButton = TestUtils.getLayerButton(device, TILEMAKER, LayerDialogTest.EXTENT_BUTTON);\n extentButton.clickAndWait(Until.newWindow(), 2000);\n TestUtils.unlock(device);\n TestUtils.zoomToLevel(device, main, 20);\n TestUtils.clickAtCoordinates(device, map, 9.5104, 47.1561619);\n assertTrue(TestUtils.clickTextContains(device, false, \"housenumber\", true));\n assertTrue(TestUtils.findText(device, false, main.getString(R.string.vt_feature_information), 1000));\n assertTrue(TestUtils.clickText(device, false, main.getString(R.string.Done), true));\n UiObject2 menuButton = TestUtils.getLayerButton(device, TILEMAKER, LayerDialogTest.MENU_BUTTON);\n menuButton.clickAndWait(Until.newWindow(), 2000);\n assertTrue(TestUtils.clickText(device, false, main.getString(R.string.layer_change_style), true));\n assertTrue(TestUtils.clickText(device, false, main.getString(R.string.okay), true));\n menuButton.clickAndWait(Until.newWindow(), 2000);\n assertTrue(TestUtils.clickText(device, false, main.getString(R.string.layer_load_style), true));\n TestUtils.selectFile(device, main, \"mbtiles\", \"osm-liberty.json\", true);\n assertTrue(TestUtils.clickText(device, false, main.getString(R.string.Done), true));\n // check that we actually loaded something\n de.blau.android.layer.mvt.MapOverlay layer = (MapOverlay) map.getLayer(LayerType.IMAGERY,\n \"TILEMAKERTOOPENMAPTILESSCHEMA\");\n assertNotNull(layer);\n Style style = layer.getStyle();\n assertNotNull(style);\n Layer taxiway = null;\n for (Layer l : style.getLayers()) {\n if (\"aeroway_taxiway\".equals(l.getId())) {\n taxiway = l;\n break;\n }\n }\n assertNotNull(taxiway);\n }" ]
[ "0.5767808", "0.56257373", "0.520497", "0.50806767", "0.49863532", "0.48867938", "0.48683387", "0.48396236", "0.47006634", "0.46947622", "0.46799806", "0.4673762", "0.46722668", "0.46689388", "0.46634102", "0.4644578", "0.46430096", "0.46266738", "0.46244073", "0.46118492", "0.46009538", "0.45822766", "0.4571321", "0.45568278", "0.45552677", "0.4550582", "0.45500922", "0.4547529", "0.453927", "0.453126", "0.4529197", "0.45290563", "0.4511093", "0.4504552", "0.4503853", "0.44915652", "0.4481988", "0.44800445", "0.4468964", "0.44687653", "0.44666448", "0.44628978", "0.4448437", "0.44461575", "0.44435754", "0.44414422", "0.44406736", "0.4435293", "0.44299772", "0.44244838", "0.44230613", "0.4420026", "0.4419048", "0.44172153", "0.44154313", "0.4408705", "0.44064242", "0.4405418", "0.43942326", "0.43925834", "0.43907225", "0.4389369", "0.43774053", "0.43763912", "0.43709224", "0.43590906", "0.4356689", "0.43543825", "0.43473247", "0.43456972", "0.43444103", "0.43421525", "0.43403235", "0.433586", "0.43338972", "0.43313485", "0.433119", "0.43305907", "0.43263677", "0.4325822", "0.43242115", "0.4321307", "0.4318382", "0.43154368", "0.43134743", "0.43094894", "0.4309299", "0.4307772", "0.43042278", "0.4300727", "0.42993614", "0.4298743", "0.42953956", "0.4294336", "0.4293456", "0.42926314", "0.42906603", "0.4285208", "0.42832324", "0.42808327" ]
0.7483641
0
/ Test of checkFillerID method, of class KnowledgeSystemBeanRemoteInterface.
@Test public void testCheckFillerID() { System.out.println("checkFillerID - Have existing record"); String id = "Filler A"; boolean result = KnowledgeSystemBeanInterface.checkFillerID(id); assertTrue(result); System.out.println("testCheckFillerID ---------------------------------------------------- Done"); // TODO review the generated test code and remove the default call to fail. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n public void testCheckFillerName() {\r\n System.out.println(\"checkFillerName - have record\");\r\n String id = \"Filler A\";\r\n boolean result = KnowledgeSystemBeanInterface.checkFillerName(id);\r\n assertTrue(result);\r\n System.out.println(\"testCheckFillerName ---------------------------------------------------- Done\");\r\n // TODO review the generated test code and remove the default call to fail.\r\n }", "@Test\r\n public void testCheckMetalName() {\r\n System.out.println(\"checkMetalName - MetalName do not Exist\");\r\n String id = \"Metal AB\";\r\n boolean result = KnowledgeSystemBeanInterface.checkMetalName(id);\r\n assertFalse(result);\r\n System.out.println(\"testCheckMetalName ---------------------------------------------------- Done\");\r\n // TODO review the generated test code and remove the default call to fail.\r\n\r\n }", "boolean hasReceiverID();", "boolean isSetID();", "public org.tempuri.HISWebServiceStub.IDCardCheckResponse iDCardCheck(\r\n org.tempuri.HISWebServiceStub.IDCardCheck iDCardCheck46)\r\n throws java.rmi.RemoteException {\r\n org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\r\n\r\n try {\r\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[23].getName());\r\n _operationClient.getOptions()\r\n .setAction(\"http://tempuri.org/IDCardCheck\");\r\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\r\n\r\n addPropertyToOperationClient(_operationClient,\r\n org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\r\n \"&\");\r\n\r\n // create SOAP envelope with that payload\r\n org.apache.axiom.soap.SOAPEnvelope env = null;\r\n\r\n env = toEnvelope(getFactory(_operationClient.getOptions()\r\n .getSoapVersionURI()),\r\n iDCardCheck46,\r\n optimizeContent(\r\n new javax.xml.namespace.QName(\"http://tempuri.org/\",\r\n \"iDCardCheck\")),\r\n new javax.xml.namespace.QName(\"http://tempuri.org/\",\r\n \"IDCardCheck\"));\r\n\r\n //adding SOAP soap_headers\r\n _serviceClient.addHeadersToEnvelope(env);\r\n // set the message context with that soap envelope\r\n _messageContext.setEnvelope(env);\r\n\r\n // add the message contxt to the operation client\r\n _operationClient.addMessageContext(_messageContext);\r\n\r\n //execute the operation client\r\n _operationClient.execute(true);\r\n\r\n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\r\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\r\n\r\n java.lang.Object object = fromOM(_returnEnv.getBody()\r\n .getFirstElement(),\r\n org.tempuri.HISWebServiceStub.IDCardCheckResponse.class);\r\n\r\n return (org.tempuri.HISWebServiceStub.IDCardCheckResponse) object;\r\n } catch (org.apache.axis2.AxisFault f) {\r\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\r\n\r\n if (faultElt != null) {\r\n if (faultExceptionNameMap.containsKey(\r\n new org.apache.axis2.client.FaultMapKey(\r\n faultElt.getQName(), \"IDCardCheck\"))) {\r\n //make the fault by reflection\r\n try {\r\n java.lang.String exceptionClassName = (java.lang.String) faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(\r\n faultElt.getQName(), \"IDCardCheck\"));\r\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\r\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(java.lang.String.class);\r\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\r\n\r\n //message class\r\n java.lang.String messageClassName = (java.lang.String) faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(\r\n faultElt.getQName(), \"IDCardCheck\"));\r\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\r\n java.lang.Object messageObject = fromOM(faultElt,\r\n messageClass);\r\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\r\n new java.lang.Class[] { messageClass });\r\n m.invoke(ex, new java.lang.Object[] { messageObject });\r\n\r\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\r\n } catch (java.lang.ClassCastException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.ClassNotFoundException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.NoSuchMethodException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.reflect.InvocationTargetException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.IllegalAccessException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.InstantiationException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n }\r\n } else {\r\n throw f;\r\n }\r\n } else {\r\n throw f;\r\n }\r\n } finally {\r\n if (_messageContext.getTransportOut() != null) {\r\n _messageContext.getTransportOut().getSender()\r\n .cleanup(_messageContext);\r\n }\r\n }\r\n }", "boolean hasReceiverid();", "@Test\n public void fsckMetricsUIDWrongLength() throws Exception {\n storage.addColumn(UID_TABLE, new byte[] { 0 }, ID_FAMILY, METRICS, Bytes.fromInt(3));\n int errors = (Integer)fsck.invoke(null, client, \n UID_TABLE, false, false);\n assertEquals(2, errors);\n }", "public interface IdValidation {\n\n /**\n * Method return validity of citizen id\n * @return true if algorithm checksum is equal to checksum of citizen id\n */\n boolean isValid();\n}", "void checkRequester(int id, boolean isChecked);", "@Test\r\n public void testFillersAssociated() {\r\n System.out.println(\"FillersAssociated - metalName = ''\");\r\n String metalName = \"\";\r\n List<String> result = KnowledgeSystemBeanInterface.FillersAssociated(metalName);\r\n ArrayList<String> results = new ArrayList<String>();\r\n assertEquals(result, results);\r\n System.out.println(\"testFillersAssociated ---------------------------------------------------- Done\");\r\n }", "boolean hasResMineID();", "boolean hasRfIdentifier();", "@Override\r\n\tpublic int idcheck(String loginId) {\n\t\treturn dao.idcheck(loginId);\r\n\t}", "public boolean isDynamic(Long id) throws RemoteException;", "@Test\n public void testCheckId() {\n System.out.println(\"checkId\");\n Long id = null;\n DaftarPengguna instance = new DaftarPengguna();\n boolean expResult = false;\n boolean result = instance.checkId(id);\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 }", "boolean hasID();", "boolean hasID();", "boolean hasID();", "boolean hasID();", "boolean hasID();", "boolean hasID();", "boolean hasID();", "boolean hasID();", "boolean hasID();", "public abstract boolean isValidID(long ID);", "@Test \nvoid testFillPrescripNoRefills() {\n\tprescrip.setRefills(0);\n\t testPharm.receivePrescription(prescrip);\n\tBoolean success = testPharm.fillPrescription(prescrip.getId()); //doesn't exist\n assertFalse(success);\n}", "@Override\n\tpublic void checkWayBillChange(String id) {\n\t\t\n\t}", "@Test(timeout = 4000)\n public void test192() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n errorPage0.del();\n Component component0 = errorPage0.id(\"O=V>!a<w512kq\");\n assertFalse(component0._isGeneratedId());\n }", "@Test\n public void getDeviceIDTest() {\n assertEquals(deviceID, device.getDeviceID());\n }", "public void validate(String id, String pw) throws RemoteException;", "boolean hasPokerId();", "protected void validate(String uuid, B bean, boolean isNew) throws InvalidDataException {\n // Empty\n }", "public int getLBR_PartnerDFe_ID();", "@Test\r\n public void testGetId_banque() {\r\n System.out.println(\"getId_banque\");\r\n chequeBeans instance = new chequeBeans();\r\n int expResult = 0;\r\n int result = instance.getId_banque();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "boolean hasResMineInstanceID();", "@Override\r\n\tprotected void checkDelete(Serializable id) throws BusinessException {\n\t\t\r\n\t}", "boolean hasMessageInfoID();", "boolean hasMachineId();", "public CWE getAdministeredBarcodeIdentifier() { \r\n\t\tCWE retVal = this.getTypedField(25, 0);\r\n\t\treturn retVal;\r\n }", "@Test\n public void fsckMetricsUIDLow() throws Exception {\n // currently a warning, not an error\n storage.addColumn(UID_TABLE, new byte[] { 0 }, ID_FAMILY, METRICS, Bytes.fromLong(1L));\n int errors = (Integer)fsck.invoke(null, client, \n UID_TABLE, false, false);\n assertEquals(1, errors);\n }", "public CWE getRxa25_AdministeredBarcodeIdentifier() { \r\n\t\tCWE retVal = this.getTypedField(25, 0);\r\n\t\treturn retVal;\r\n }", "@Test\n public void testIncorrectId(){\n UserRegisterKYC idTooLong = new UserRegisterKYC(\"hello\",\"S12345678B\",\"26/02/1995\",\"738583\");\n int requestResponse = idTooLong.sendRegisterRequest();\n assertEquals(400, requestResponse);\n\n UserRegisterKYC nonAlphanumId = new UserRegisterKYC(\"hello\",\"S12345!8B\",\"26/02/1995\",\"738583\");\n requestResponse = nonAlphanumId.sendRegisterRequest();\n assertEquals(400,requestResponse);\n\n UserRegisterKYC invalidPrefixId = new UserRegisterKYC(\"hello\",\"A\"+validId3.substring(1),\"26/02/1995\",\"738583\");\n requestResponse = invalidPrefixId.sendRegisterRequest();\n assertEquals(400,requestResponse);\n\n UserRegisterKYC alphaInMiddleId = new UserRegisterKYC(\"hello\",\"S1234A68B\",\"26/02/1995\",\"738583\");\n requestResponse = alphaInMiddleId.sendRegisterRequest();\n assertEquals(400,requestResponse);\n\n UserRegisterKYC idTooShort = new UserRegisterKYC(\"hello\",\"S123678B\",\"26/02/1995\",\"738583\");\n requestResponse = idTooShort.sendRegisterRequest();\n assertEquals(400,requestResponse);\n\n UserRegisterKYC invalidChecksum = new UserRegisterKYC(\"hello\",\"S1234578B\",\"26/02/1995\",\"738583\");\n requestResponse = invalidChecksum.sendRegisterRequest();\n assertEquals(400,requestResponse);\n\n }", "boolean hasTruckid();", "boolean hasTruckid();", "boolean hasTruckid();", "boolean hasTruckid();", "boolean hasTruckid();", "boolean hasTruckid();", "public void startiDCardCheck(\r\n org.tempuri.HISWebServiceStub.IDCardCheck iDCardCheck46,\r\n final org.tempuri.HISWebServiceCallbackHandler callback)\r\n throws java.rmi.RemoteException {\r\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[23].getName());\r\n _operationClient.getOptions().setAction(\"http://tempuri.org/IDCardCheck\");\r\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\r\n\r\n addPropertyToOperationClient(_operationClient,\r\n org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\r\n \"&\");\r\n\r\n // create SOAP envelope with that payload\r\n org.apache.axiom.soap.SOAPEnvelope env = null;\r\n final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\r\n\r\n //Style is Doc.\r\n env = toEnvelope(getFactory(_operationClient.getOptions()\r\n .getSoapVersionURI()),\r\n iDCardCheck46,\r\n optimizeContent(\r\n new javax.xml.namespace.QName(\"http://tempuri.org/\",\r\n \"iDCardCheck\")),\r\n new javax.xml.namespace.QName(\"http://tempuri.org/\",\r\n \"IDCardCheck\"));\r\n\r\n // adding SOAP soap_headers\r\n _serviceClient.addHeadersToEnvelope(env);\r\n // create message context with that soap envelope\r\n _messageContext.setEnvelope(env);\r\n\r\n // add the message context to the operation client\r\n _operationClient.addMessageContext(_messageContext);\r\n\r\n _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {\r\n public void onMessage(\r\n org.apache.axis2.context.MessageContext resultContext) {\r\n try {\r\n org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();\r\n\r\n java.lang.Object object = fromOM(resultEnv.getBody()\r\n .getFirstElement(),\r\n org.tempuri.HISWebServiceStub.IDCardCheckResponse.class);\r\n callback.receiveResultiDCardCheck((org.tempuri.HISWebServiceStub.IDCardCheckResponse) object);\r\n } catch (org.apache.axis2.AxisFault e) {\r\n callback.receiveErroriDCardCheck(e);\r\n }\r\n }\r\n\r\n public void onError(java.lang.Exception error) {\r\n if (error instanceof org.apache.axis2.AxisFault) {\r\n org.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;\r\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\r\n\r\n if (faultElt != null) {\r\n if (faultExceptionNameMap.containsKey(\r\n new org.apache.axis2.client.FaultMapKey(\r\n faultElt.getQName(), \"IDCardCheck\"))) {\r\n //make the fault by reflection\r\n try {\r\n java.lang.String exceptionClassName = (java.lang.String) faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(\r\n faultElt.getQName(),\r\n \"IDCardCheck\"));\r\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\r\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(java.lang.String.class);\r\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\r\n\r\n //message class\r\n java.lang.String messageClassName = (java.lang.String) faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(\r\n faultElt.getQName(),\r\n \"IDCardCheck\"));\r\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\r\n java.lang.Object messageObject = fromOM(faultElt,\r\n messageClass);\r\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\r\n new java.lang.Class[] { messageClass });\r\n m.invoke(ex,\r\n new java.lang.Object[] { messageObject });\r\n\r\n callback.receiveErroriDCardCheck(new java.rmi.RemoteException(\r\n ex.getMessage(), ex));\r\n } catch (java.lang.ClassCastException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n callback.receiveErroriDCardCheck(f);\r\n } catch (java.lang.ClassNotFoundException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n callback.receiveErroriDCardCheck(f);\r\n } catch (java.lang.NoSuchMethodException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n callback.receiveErroriDCardCheck(f);\r\n } catch (java.lang.reflect.InvocationTargetException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n callback.receiveErroriDCardCheck(f);\r\n } catch (java.lang.IllegalAccessException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n callback.receiveErroriDCardCheck(f);\r\n } catch (java.lang.InstantiationException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n callback.receiveErroriDCardCheck(f);\r\n } catch (org.apache.axis2.AxisFault e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n callback.receiveErroriDCardCheck(f);\r\n }\r\n } else {\r\n callback.receiveErroriDCardCheck(f);\r\n }\r\n } else {\r\n callback.receiveErroriDCardCheck(f);\r\n }\r\n } else {\r\n callback.receiveErroriDCardCheck(error);\r\n }\r\n }\r\n\r\n public void onFault(\r\n org.apache.axis2.context.MessageContext faultContext) {\r\n org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);\r\n onError(fault);\r\n }\r\n\r\n public void onComplete() {\r\n try {\r\n _messageContext.getTransportOut().getSender()\r\n .cleanup(_messageContext);\r\n } catch (org.apache.axis2.AxisFault axisFault) {\r\n callback.receiveErroriDCardCheck(axisFault);\r\n }\r\n }\r\n });\r\n\r\n org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;\r\n\r\n if ((_operations[23].getMessageReceiver() == null) &&\r\n _operationClient.getOptions().isUseSeparateListener()) {\r\n _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();\r\n _operations[23].setMessageReceiver(_callbackReceiver);\r\n }\r\n\r\n //execute the operation client\r\n _operationClient.execute(false);\r\n }", "boolean hasRpcId();", "@Test\n public void fsckFIXMetricsUIDLow() throws Exception {\n storage.addColumn(UID_TABLE, new byte[] { 0 }, ID_FAMILY, METRICS, Bytes.fromLong(0L));\n int errors = (Integer)fsck.invoke(null, client, \n UID_TABLE, true, false);\n assertEquals(1, errors);\n errors = (Integer)fsck.invoke(null, client, \n UID_TABLE, false, false);\n assertEquals(0, errors);\n }", "boolean isNilID();", "@Test\n public void fsckMetricsInconsistentFwdNoDupes() throws Exception {\n storage.addColumn(UID_TABLE, new byte[] {0, 0, 2}, NAME_FAMILY, \n METRICS, \"wtf\".getBytes(MockBase.ASCII()));\n storage.addColumn(UID_TABLE, \"wtf\".getBytes(MockBase.ASCII()), ID_FAMILY, \n METRICS, new byte[] {0, 0, 3});\n storage.addColumn(UID_TABLE, new byte[] {0, 0, 3}, NAME_FAMILY, \n METRICS, \"wtf\".getBytes(MockBase.ASCII()));\n storage.addColumn(UID_TABLE, new byte[] { 0 }, ID_FAMILY, METRICS, Bytes.fromLong(3L));\n int errors = (Integer)fsck.invoke(null, client, \n UID_TABLE, false, false);\n assertEquals(3, errors);\n }", "public boolean hasFlyerId() {\n return fieldSetFlags()[2];\n }", "boolean hasTruckId();", "@java.lang.Override\n public boolean hasRfIdentifier() {\n return ((bitField0_ & 0x00000020) != 0);\n }", "@Test\n\tpublic void test() {\n\t\tlong firstID = UIDGen.getInstance().getNextId();\n\t\tint n = 100;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tUIDGen.getInstance().getNextId();\n\t\t}\n\t\tlong currentID = UIDGen.getInstance().getNextId();\n\t\tassertEquals(currentID, firstID + n + 1);\n\n\t\t// expect a IDInvalidException exception for using and\n\t\t// external id that has already been used\n\t\tlong exteranlId = currentID;\n\t\tThrowable caught = null;\n\t\ttry {\n\t\t\tUIDGen.getInstance().considerExternalId(exteranlId);\n\t\t} catch (Throwable t) {\n\t\t\tcaught = t;\n\t\t}\n\t\tassertNotNull(caught);\n\t\tassertSame(IDInvalidException.class, caught.getClass());\n\n\t\t// push an external id that is not used and expect no exception\n\t\texteranlId = currentID + 2;\n\t\ttry {\n\t\t\tUIDGen.getInstance().considerExternalId(exteranlId);\n\t\t} catch (Throwable t) {\n\t\t\tfail();\n\t\t}\n\n\t\t// expect an exception as we put the same id again\n\t\texteranlId = currentID;\n\t\tcaught = null;\n\t\ttry {\n\t\t\tUIDGen.getInstance().considerExternalId(exteranlId);\n\t\t} catch (Throwable t) {\n\t\t\tcaught = t;\n\t\t}\n\t\tassertNotNull(caught);\n\t\tassertSame(IDInvalidException.class, caught.getClass());\n\n\t\t// must skip currentID + 2 as it was defined as an external id\n\t\tassertEquals(UIDGen.getInstance().getNextId(), currentID + 1);\n\t\tassertEquals(UIDGen.getInstance().getNextId(), currentID + 3);\n\t}", "public boolean verifyRpiRegistration(String rpiId) throws SQLException;", "boolean isSetIdVerificationResponseData();", "public void testGetUniqueID_fixture18_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture18();\n\n\t\tAbstractUniqueID result = fixture.getUniqueID();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(null, result.getId());\n\t}", "@Override\n\tpublic void valid(String id, String valid) {\n\t\t\n\t}", "@Test\n\tvoid testIdNotFound() {\n\t\tOfficer officer = new Officer(\"414\",\"Harish\",\"officer\",\"Harish Keni\",\"Karnataka\");\n\t \t\t\n\t\tassertThrows(IdNotFoundException.class,()->iOfficerService.editOfficer(officer,\"414\"));\n\t\t\n\t}", "public void testGetUniqueID_fixture24_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture24();\n\n\t\tAbstractUniqueID result = fixture.getUniqueID();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(null, result.getId());\n\t}", "void checkNotFound(Integer id);", "@java.lang.Override\n public boolean hasRfIdentifier() {\n return ((bitField0_ & 0x00000080) != 0);\n }", "void getMeMyID()throws IOException{\n out.println(\"ID_ASSIGN\");\r\n fromServer = in.readLine();\r\n String[] input = fromServer.split(\" \");\r\n ID = Integer.parseInt(input[0]);\r\n if(input[1].equals(\"true\")){\r\n setBallHolder(true);\r\n }\r\n }", "public void v_Verify_Guest4_Displayed(){\n\t}", "@Test\n public void fsckMetricsInconsistentFwdAndDupeRev() throws Exception {\n storage.addColumn(UID_TABLE, new byte[] {0, 0, 2}, NAME_FAMILY, \n METRICS, \"wtf\".getBytes(MockBase.ASCII()));\n storage.addColumn(UID_TABLE, \"wtf\".getBytes(MockBase.ASCII()), ID_FAMILY, \n METRICS, new byte[] {0, 0, 1});\n storage.addColumn(UID_TABLE, new byte[] { 0 }, ID_FAMILY, METRICS, Bytes.fromLong(3L));\n int errors = (Integer)fsck.invoke(null, client, \n UID_TABLE, false, false);\n assertEquals(5, errors);\n }", "@UpnpAction(out = {@UpnpOutputArgument(name = \"Result\", stateVariable = \"A_ARG_TYPE_Result\")})\n/* */ public int isValidated(@UpnpInputArgument(name = \"DeviceID\", stateVariable = \"A_ARG_TYPE_DeviceID\") String deviceID) {\n/* 128 */ return 1;\n/* */ }", "boolean hasFieldId();", "@Test\n public void testInsuredPayerInsuredGroupNbr() {\n new InsuredPayerFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissInsuredPayer.Builder::setInsuredGroupNbr,\n RdaFissPayer::getInsuredGroupNbr,\n RdaFissPayer.Fields.insuredGroupNbr,\n 20);\n }", "boolean hasMsgID();", "boolean hasMsgID();", "@Test\n public void fsckTagkUIDHigh() throws Exception {\n storage.addColumn(UID_TABLE, new byte[] { 0 }, ID_FAMILY, TAGK, Bytes.fromLong(42L));\n int errors = (Integer)fsck.invoke(null, client, \n UID_TABLE, false, false);\n assertEquals(0, errors);\n }", "int restockPart(int idType, int number) throws RemoteException;", "public void setM_Splitting_ID (int M_Splitting_ID)\n{\nset_ValueNoCheck (\"M_Splitting_ID\", new Integer(M_Splitting_ID));\n}", "boolean hasMessageID();", "public void v_Verify_Guest10_Displayed(){\n\t}", "@Test\n\tpublic void testGetID() {\n\t}", "@Test\n public void testListStorageBinInformation1() throws Exception {\n System.out.println(\"listStorageBinInformation\");\n Long factoryId = 2L;\n List result = FactoryInventoryManagementModule.listStorageBinInformation(factoryId);\n assertFalse(result.isEmpty());\n }", "protected void checkId(String id) throws ValidationException {\n if (!id.equals(\"\")) {\n Set idrefs = getFOEventHandler().getIDReferences();\n if (!idrefs.contains(id)) {\n idrefs.add(id);\n } else {\n throw new ValidationException(\"Property id \\\"\" + id \n + \"\\\" previously used; id values must be unique\"\n + \" in document.\", locator);\n }\n }\n }", "public java.lang.String getID() { throw new RuntimeException(\"Stub!\"); }", "public void test_getId() {\n assertEquals(\"'id' value should be properly retrieved.\", id, instance.getId());\n }", "public void v_Verify_Guest11_Displayed(){\n\t}", "boolean hasDeviceId();", "boolean hasDeviceId();", "@Test\n public void fsckMetricsUIDHigh() throws Exception {\n // currently a warning, not an error\n storage.addColumn(UID_TABLE, new byte[] { 0 }, ID_FAMILY, METRICS, Bytes.fromLong(42L));\n int errors = (Integer)fsck.invoke(null, client, \n UID_TABLE, false, false);\n assertEquals(0, errors);\n }", "public void testGetUniqueID_fixture16_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture16();\n\n\t\tAbstractUniqueID result = fixture.getUniqueID();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(null, result.getId());\n\t}", "public void v_Verify_Guest6_Displayed(){\n\t}", "@Then(\"^Validate customer id is created$\")\r\n\tpublic void validate_customer_id_is_created() throws Throwable {\n\t\tAssert.assertTrue(response.jsonPath().get(\"id\").equals(new PropertFileReader().getTempData(\"custId\")));\r\n\t\t\r\n\t}", "public void testFindAccountById(){\n\t\tint id = 10 ;\n\t\tAccount acc = this.bean.findAccountById(id ) ;\n\t\tAssert.assertEquals(id, acc.getId()) ;\n\t}", "public int getId() {\n/* 2402 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test\n void testGetAndSetId() {\n isLockedRequest2.setId(3);\n assertEquals(3, isLockedRequest2.getId());\n }", "boolean hasBbgGlobalId();", "@Test\n public void fsckTagkMissingForward() throws Exception {\n storage.flushColumn(\"host\".getBytes(MockBase.ASCII()), ID_FAMILY, TAGK);\n int errors = (Integer)fsck.invoke(null, client, \n UID_TABLE, false, false);\n assertEquals(0, errors);\n }", "boolean hasSendid();", "public boolean isRemoteInterface(Class paramClass) {\n/* 98 */ boolean bool = true;\n/* */ try {\n/* 100 */ validateRemoteInterface(paramClass);\n/* 101 */ } catch (IDLTypeException iDLTypeException) {\n/* 102 */ bool = false;\n/* */ } \n/* */ \n/* 105 */ return bool;\n/* */ }", "public void identify() {\n\n\t}", "private boolean isSameEridExist(AbstractFacade ejb, Erid erid) {\n Integer eridId = erid.getErid(); // Get Erid.erid from erid instance\n boolean isExist = ejb.isFieldExist(eridId); //Check in the DB if the same erid exist\n return isExist;\n }", "@Test\n public void testCheckIDPass() {\n System.out.println(\"checkIDPass\");\n School instance = new School();\n\n users.get(\"admin\").setIsActive(true);\n users.get(\"admin2\").setIsActive(false);\n instance.setUsers(users);\n\n assertEquals(users.get(\"admin\"), instance.checkIDPass(\"admin\",\n users.get(\"admin\").getPassword().toCharArray()));\n System.out.println(\"PASS with active user\");\n\n assertEquals(new String(), instance.checkIDPass(users.get(\"admin2\").getId(),\n users.get(\"admin2\").getPassword().toCharArray()));\n System.out.println(\"PASS with inactive user\");\n\n assertNull(instance.checkIDPass(users.get(\"admin\").getId(), \"Lamasia2**\".toCharArray()));\n System.out.println(\"PASS with wrong password\");\n\n assertNull(instance.checkIDPass(\"admin1\", users.get(\"admin\").getPassword().toCharArray()));\n System.out.println(\"PASS with wrong ID\");\n\n System.out.println(\"PASS ALL\");\n }" ]
[ "0.7388504", "0.5744379", "0.5483848", "0.5438787", "0.54081035", "0.5389595", "0.5348754", "0.53419", "0.52987176", "0.5297201", "0.52851146", "0.5265374", "0.5248679", "0.5238426", "0.5229435", "0.5228663", "0.5228663", "0.5228663", "0.5228663", "0.5228663", "0.5228663", "0.5228663", "0.5228663", "0.5228663", "0.5216676", "0.52119243", "0.519579", "0.5167244", "0.5150836", "0.5122536", "0.5111654", "0.5111517", "0.5098948", "0.50910956", "0.50639933", "0.5051505", "0.50317323", "0.5026858", "0.50255007", "0.5024931", "0.5009303", "0.5000271", "0.49983075", "0.49983075", "0.49983075", "0.49983075", "0.49983075", "0.49983075", "0.49723887", "0.496264", "0.4961699", "0.49570632", "0.49552944", "0.49402985", "0.4940094", "0.49389982", "0.49360988", "0.4928419", "0.49174094", "0.49117327", "0.49050295", "0.4902572", "0.4901783", "0.49007174", "0.48947757", "0.48742768", "0.4867864", "0.48669264", "0.48647642", "0.48620823", "0.4859407", "0.48587003", "0.48587003", "0.48568854", "0.48562384", "0.48552126", "0.48542246", "0.48529628", "0.48519894", "0.48498887", "0.48478675", "0.48475823", "0.4847051", "0.48456863", "0.48384368", "0.48384368", "0.48356578", "0.48326987", "0.48315698", "0.48311424", "0.4828603", "0.48279616", "0.48273945", "0.48241603", "0.48220772", "0.4820311", "0.481759", "0.4815425", "0.48101026", "0.4809463" ]
0.7789416
0
/ Test of checkFillerName method, of class KnowledgeSystemBeanRemoteInterface.
@Test public void testCheckFillerName() { System.out.println("checkFillerName - have record"); String id = "Filler A"; boolean result = KnowledgeSystemBeanInterface.checkFillerName(id); assertTrue(result); System.out.println("testCheckFillerName ---------------------------------------------------- Done"); // TODO review the generated test code and remove the default call to fail. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n public void testCheckMetalName() {\r\n System.out.println(\"checkMetalName - MetalName do not Exist\");\r\n String id = \"Metal AB\";\r\n boolean result = KnowledgeSystemBeanInterface.checkMetalName(id);\r\n assertFalse(result);\r\n System.out.println(\"testCheckMetalName ---------------------------------------------------- Done\");\r\n // TODO review the generated test code and remove the default call to fail.\r\n\r\n }", "@Test\r\n public void testCheckFillerID() {\r\n System.out.println(\"checkFillerID - Have existing record\");\r\n String id = \"Filler A\";\r\n boolean result = KnowledgeSystemBeanInterface.checkFillerID(id);\r\n assertTrue(result);\r\n System.out.println(\"testCheckFillerID ---------------------------------------------------- Done\");\r\n // TODO review the generated test code and remove the default call to fail.\r\n\r\n }", "@Test\r\n public void testFillersAssociated() {\r\n System.out.println(\"FillersAssociated - metalName = ''\");\r\n String metalName = \"\";\r\n List<String> result = KnowledgeSystemBeanInterface.FillersAssociated(metalName);\r\n ArrayList<String> results = new ArrayList<String>();\r\n assertEquals(result, results);\r\n System.out.println(\"testFillersAssociated ---------------------------------------------------- Done\");\r\n }", "@Test\r\n public void testMetalNames() {\r\n System.out.println(\"metalNames - Metal has records\");\r\n List<String> result = KnowledgeSystemBeanInterface.metalNames();\r\n assertEquals(result.size(), 15);\r\n System.out.println(\"testMetalNames ---------------------------------------------------- Done\");\r\n // TODO review the generated test code and remove the default call to fail.\r\n }", "public abstract boolean isNameAvailable(String readerName);", "@Test\n public void testIsInvalidChannelName() {\n System.out.println(\"isInvalidChannelName test ---\");\n String validName = \"Valid Name\";\n String invalidName1 = \"Invalid_Name\";\n String invalidName2 = \"\";\n String invalidName3 = \" \";\n String invalidName4 = \"troll<script>document.cookie='lol'</script>\";\n assertFalse(instance.isInvalidChannelName(validName));\n assertTrue(instance.isInvalidChannelName(invalidName1));\n assertTrue(instance.isInvalidChannelName(invalidName2));\n assertTrue(instance.isInvalidChannelName(invalidName3));\n assertTrue(instance.isInvalidChannelName(invalidName4));\n }", "boolean isNameRequired();", "@Override\r\n\tString check_brand() {\n\t\treturn \"Delmont\";\r\n\t}", "@Override\r\n\tString check_brand() {\n\t\treturn \"Delmont\";\r\n\t}", "public void testGetName() {\n String name = mb.getName();\n assertNotNull(name);\n assertTrue(name.length() > 0);\n }", "public void firstNameCheck() {\n\t\t\tif (getNameOfTheCard().equalsIgnoreCase(getCustomerFullName())) {\n\t\t\t\tsetColAuthorizedby(null);\n\t\t\t\tsetColpassword(null);\n\t\t\t\tsetBooAuthozed(false);\n\t\t\t} else {\n\n\n\t\t\t\tList<DebitAutendicationView> localEmpllist = iPersonalRemittanceService.getdebitAutendicationList();\n\t\t\t\tsetEmpllist(localEmpllist);\n\n\t\t\t\tsetColAuthorizedby(null);\n\t\t\t\tsetColpassword(null);\n\t\t\t\tsetBooAuthozed(true);\n\t\t\t\t// populate alert msg if customer name not match\n\t\t\t\tsetExceptionMessage(Constants.NameCheckAlertMsg);\n\t\t\t\tRequestContext.getCurrentInstance().execute(\"alertmsg.show();\");\n\t\t\t}\n\t\t}", "@Test\n public void testInsuredPayerInsuredName() {\n new InsuredPayerFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissInsuredPayer.Builder::setInsuredName,\n RdaFissPayer::getInsuredName,\n RdaFissPayer.Fields.insuredName,\n 25);\n }", "@Test\n public void testInsuredPayerPayersName() {\n new InsuredPayerFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissInsuredPayer.Builder::setPayersName,\n RdaFissPayer::getPayersName,\n RdaFissPayer.Fields.payersName,\n 32);\n }", "public boolean checkName(String name)\n {\n return true;\n }", "@Test\n public void testIsValidName() {\n FieldVerifier service = new FieldVerifier();\n String name = \"toto\";\n boolean result = service.isValidName(name);\n assertEquals(true, result);\n }", "boolean hasDataName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "@Test\n public void testInsuredPayerInsuredGroupName() {\n new InsuredPayerFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissInsuredPayer.Builder::setInsuredGroupName,\n RdaFissPayer::getInsuredGroupName,\n RdaFissPayer.Fields.insuredGroupName,\n 17);\n }", "@Test\n public void test_Name() throws Exception {\n matchInvoke(serviceURL, \"PWDDIC_testSearch_name_req.xml\",\n \"PWDDIC_testSearch_name_res.xml\");\n }", "@Test\n public void testBeneZPayerInsuredGroupName() {\n new BeneZPayerFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissBeneZPayer.Builder::setInsuredGroupName,\n RdaFissPayer::getInsuredGroupName,\n RdaFissPayer.Fields.insuredGroupName,\n 17);\n }", "@Test\n public void getName() {\n assertTrue(channel.getDisplayName().equals(\"Together4Ever\"));\n }", "protected void check(String name, Object value) {\n\t\tcheck(name,value,false);\n\t}", "@Test\n public void testBeneZPayerPayersName() {\n new BeneZPayerFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissBeneZPayer.Builder::setPayersName,\n RdaFissPayer::getPayersName,\n RdaFissPayer.Fields.payersName,\n 32);\n }", "boolean isSetName();", "@Test\n\t public void testDefaultFatherClassName(){\n\t\t String fatherClassNameReceived=check.getFatherClassName();\n\t\t // fatherClassName default value should be empty string\n\t\t assertEquals(\"\", fatherClassNameReceived);\n\t }", "@Test\r\n public void getNameTest()\r\n {\r\n Assert.assertEquals(stub.getName(), NAME);\r\n }", "private boolean checkDeviceName(String name) {\n switch (name) {\n case \"LAPTOP\" :\n case \"PRINTER\" :\n case \"ROUTER\" :\n return true;\n default:\n return false;\n }\n }", "public String checkShouKuanDan(String name) throws RemoteException {\n String url = \"rmi://localhost:1098/\";\n String out=\"\";\n try {\n Context namingContext = new InitialContext();\n PbbService serv = (PbbService) namingContext.lookup(\n url + \"HelloService1\");\n out=serv.checkShouKuanDan(name);\n }\n catch (NamingException e) {\n e.printStackTrace();\n }\n return out;\n }", "public void setName(String value)\n {\n // Since this value is marked as \"mandatory,\" the BC4J Framework will take\n // care of ensuring that it's a non-null value. However, if it is null, we\n // don't want to proceed with any validation that could result in a NPE.\n \n if ((value != null) || (!(\"\".equals(value.trim()))))\n {\n // Verify that the name is unique. To do this, we must check both the entity\n // cache and the database. We begin with the entity cache.\n\n com.sun.java.util.collections.Iterator supplierIterator = \n getEntityDef().getAllEntityInstancesIterator(getDBTransaction());\n \n Number currentId = getSupplierId();\n \n while ( supplierIterator.hasNext() )\n {\n SupplierEOImpl cachedSupplier = (SupplierEOImpl)supplierIterator.next();\n\n String cachedName = cachedSupplier.getName();\n Number cachedId = cachedSupplier.getSupplierId();\n\n // We found a match for the name we're trying to set, so throw an\n // exception. Note that we need to exclude this EO from our test.\n \n if (cachedName != null && value.equalsIgnoreCase(cachedName) && \n cachedId.compareTo(currentId) != 0 )\n {\n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"Name\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_SUP_DUP_NAME\"); // Message name \n }\n } \n\n // Now we want to check the database for any occurences of the supplier\n // name. The most efficient way to check this is with a validation view\n // object to which we add to a special \"Validation\" application module.\n // We then added a \"supplierExists\" method to this entity's expert. This\n // method leverages the VAM and the VVO.\n\n OADBTransaction transaction = getOADBTransaction();\n SupplierEntityExpert expert = getSupplierEntityExpert(transaction);\n\n if (expert.supplierExists(value))\n {\n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"Name\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_SUP_DUP_NAME\"); // Message name\n }\n }\n \n setAttributeInternal(NAME, value);\n \n }", "public boolean visible_SetupNameField() {\r\n\t\treturn IsElementVisibleStatus(DefineSetup_SetupName_txtBx);\r\n\t}", "String getName() throws RemoteException;", "public void _getPropertyByName() {\n requiredMethod(\"getProperties()\");\n boolean result;\n try {\n Property prop = oObj.getPropertyByName(IsThere.Name);\n result = (prop != null);\n } catch (com.sun.star.beans.UnknownPropertyException e) {\n log.println(\"Exception occurred while testing\" +\n \" getPropertyByName with existing property\");\n e.printStackTrace(log);\n result = false;\n }\n\n try {\n oObj.getPropertyByName(\"Jupp\");\n log.println(\"No Exception thrown while testing\"+\n \" getPropertyByName with non existing property\");\n result = false;\n }\n catch (UnknownPropertyException e) {\n result = true;\n }\n tRes.tested(\"getPropertyByName()\", result);\n return;\n }", "@NotNull\n public String getName() {\n return \"Validate Call Argument..\";//InspectionsBundle.message(\"inspection.comparing.references.use.quickfix\");\n }", "@Test\n\tpublic void testGuardRenaming() throws Exception {\n\t\ttestRenaming(IGuard.ELEMENT_TYPE);\n\t}", "@Test\r\n\t@Order(1)\r\n void testName() {\r\n robot.setName(null);\r\n assertNotEquals(null, robot.getName(),\"Name test failed\\nREASON: null name not allowed!\");\r\n }", "@Test\n public void testGetName() {\n System.out.println(\"ColorIOProviderNGTest.testGetName\");\n assertEquals(instance.getName(), ColorAttributeDescription.ATTRIBUTE_NAME);\n }", "public boolean checkName(String name)\n\t{\n\t\treturn (robotHM.containsKey(name));\n\t}", "@Test\n public void testIncorrectName(){\n UserRegisterKYC nameWithNumber = new UserRegisterKYC(\"hello123\",validId3,\"26/02/1995\",\"738583\");\n int requestResponse = nameWithNumber.sendRegisterRequest();\n assertEquals(400, requestResponse);\n\n UserRegisterKYC nameWithSymbol = new UserRegisterKYC(\"hello!\", validId3, \"26/02/1995\",\"587631\");\n requestResponse = nameWithSymbol.sendRegisterRequest();\n assertEquals(400, requestResponse);\n }", "@Test\n public void testIsEmptyValidName() {\n FieldVerifier service = new FieldVerifier();\n String name = \"\";\n boolean result = service.isValidName(name);\n assertEquals(false, result);\n }", "abstract void firstNameValidity();", "@Test\r\n public void testGetname() {\r\n System.out.println(\"getname\");\r\n connection instance = new connection();\r\n String[] expResult = null;\r\n String[] result = instance.getname();\r\n assertArrayEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "public void testGetServerMBeanName()\n {\n try\n {\n String objectName = deployer.getServerMBeanName(\"foo\", \"bar\").toString();\n assertEquals(\"foo:j2eeType=J2EEServer,name=bar\", objectName);\n }\n catch (MalformedObjectNameException e)\n {\n fail(\"No error should be thrown\");\n }\n try\n {\n deployer.getServerMBeanName(null, \"bar\").toString();\n fail(\"error should be thrown\");\n }\n catch (MalformedObjectNameException expected)\n {\n // Expected\n }\n try\n {\n deployer.getServerMBeanName(\"\", \"bar\").toString();\n fail(\"error should be thrown\");\n }\n catch (MalformedObjectNameException expected)\n {\n // Expected\n }\n }", "public String getName()\r\n/* 23: */ {\r\n/* 24:20 */ return \"Wire demo receiver\";\r\n/* 25: */ }", "private boolean isNameValid(String name) {\n\n }", "@org.junit.Test\n public void getName() {\n Weapon sword = new Sword();\n String dmg = sword.getName();\n assertEquals(\"Normal Sword.getName() failed\",\"Sword\",dmg);\n\n Weapon stick = new WoodStick();\n dmg = stick.getName();\n assertEquals(\"Normal WoodStick.getName() failed\",\"Wooden Stick\",dmg);\n }", "default String getCheckName() {\n return getClass().getSimpleName();\n }", "abstract void lastNameValidity();", "public abstract boolean isNetbeansKenaiRegistered();", "@NotNull\n public String getName() {\n return \"Validate Input..\";//InspectionsBundle.message(\"inspection.comparing.references.use.quickfix\");\n\n }", "@Test\n public void testGetName() {\n System.out.println(\"getName\");\n VM instance = null;\n String expResult = \"\";\n String result = instance.getName();\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 }", "default void checkInOk(String name) {\n }", "@Test\n public void testGetServerRemoto() throws ApplicationException {\n CommunicationFactory instance = CommunicationFactory.getFactory();\n String expResult = bundle.getString(IPropertiesConstants.COMM_REMOTE_CONNECTOR);\n String result = instance.getServer(\"cmcdell\").getClass().getName();\n assertEquals(expResult, result);\n }", "private static <T extends HmBo> boolean checkBONameExists(Class<T> boClass, String name, Object value) {\r\n List<?> boIds = QueryUtil.executeQuery(boClass, null,\r\n new FilterParams(name, value),\r\n AhRestoreNewMapTools.getonlyDomain().getId());\r\n\t return !boIds.isEmpty();\r\n\t}", "@Test\n public void someTest() {\n// String maStr = \" \";\n// System.out.println(\" \" instanceof String);\n// System.out.println(maStr.isEmpty());\n\n manager.setName(null);\n System.out.println(manager.getName());\n }", "public void checkFields(){\n }", "@Test\t \n\t public void testSetFatherClassName(){\n\t\t check.setFatherClassName(\"a\");\n\t\t assertEquals(\"a\", check.getFatherClassName());\n\t\t check.setFatherClassName(\"testclass\");\n\t\t assertEquals(\"testclass\", check.getFatherClassName());\n\t\t check.setFatherClassName(\"class1234567890123456789012345678901234567890\");\n\t\t assertEquals(\"class1234567890123456789012345678901234567890\", check.getFatherClassName());\n\t\t check.setFatherClassName(\"\");\n\t\t assertEquals(\"\", check.getFatherClassName());\n\t }", "@Test\r\n\t public void isRegisterIfdroped1() {\n\t\t \tthis.admin.createClass(\"ecs60\",2017,\"sean\",4);\r\n\t\t \tthis.student.dropClass(\"gurender\", \"ecs60\", 2017);\r\n\t assertFalse(this.student.isRegisteredFor(\"gurender\", \"ecs60\", 2017));\r\n\t \r\n\t }", "public String getDisplayName() {\n/* 762 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test\n public void testGetSetName() {\n\n String name = \"name\";\n messtyp.setName(name);\n assertEquals(name, messtyp.getName());\n\n }", "boolean checkAvailable(String userName);", "boolean hasBusinessName();", "@Override\n\tprotected void validators() {\n\t\tString nsrmc = getDj_nsrxx().getNsrmc();\n\n\t\tif (ValidateUtils.isNullOrEmpty(nsrmc)) {\n\t\t\tthis.setSystemMessage(\"纳税人名称不能为空\", true, null);\n\t\t}\n\n\t}", "private void checkBeanRegistration(String builderName, String... expTypes)\n throws Exception\n {\n FormEventManagerTestImpl evMan = prepareBeanRegistrationTest(expTypes);\n builderData.setBuilderName(builderName);\n executeScript(SCRIPT);\n builderData.invokeCallBacks();\n Object listener = context.findVariable(VAR_NAME);\n assertNotNull(\"No event listener\", listener);\n evMan.verify(listener);\n }", "boolean hasRfIdentifier();", "@Override\n public boolean hasCustomName() {\n return this.customName != null && !this.customName.isEmpty();\n }", "public void testvalidateUserName0001()\n\t{\n\t\tLoginCheck loginCheckTest = new LoginCheck();\n\t\t\n\t\tassertFalse(loginCheckTest.validateUserName(\"usrnm\"));\n\t}", "@Test\n\tpublic void IscaseNameExist(){\n\t\tString caseName = \"leather case\";\n\t\tboolean isExist;\n\t\ttry {\n\t\t\tisExist = CaseManagerValidator.isCaseNameExist(caseName);\n\t\t\tassertTrue(isExist);\n\t\t} catch (Exception e) {\n\t\t\tfail();\n\t\t}\n\t\t\n\t}", "private void testAccessibleName(Component comp, AccessibleContext comp_AC) {\n String name = comp_AC.getAccessibleName();\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testAccessibleName()> - accessibleName=\"+name);\n \n if (testSettings.AP_accessibleName && (name == null)){\n noName.add(comp);\n }\n }", "@Test\n public void testClaimOperPhysFname() {\n new ClaimFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setOperPhysFname,\n RdaFissClaim::getOperPhysFname,\n RdaFissClaim.Fields.operPhysFname,\n 18);\n }", "private ObjectName getRMIRegistryNamingName()\n throws javax.management.MalformedObjectNameException {\n return ObjectName.getInstance(\"naming:type=rmiregistry\");\n }", "private void validateBeanName(IBean bean) {\r\n \t\tString name = bean.getName();\r\n \t\tif(name!=null && !name.startsWith(\"/\")) {\r\n \t\t\t// Collect all relations between the bean and other CDI elements.\r\n \t\t\tgetValidationContext().addVariableNameForELValidation(name);\r\n \t\t\tgetValidationContext().addLinkedCoreResource(name, bean.getSourcePath(), true);\r\n \t\t\t/*\r\n \t\t\t *\t5.3.1. Ambiguous EL names\r\n \t\t\t *\t- All unresolvable ambiguous EL names are detected by the container when the application is initialized.\r\n \t\t\t * Suppose two beans are both available for injection in a certain war, and either:\r\n \t\t\t * • the two beans have the same EL name and the name is not resolvable, or\r\n \t\t\t */\r\n \t\t\tSet<IBean> beans = cdiProject.getBeans(name, true);\r\n \t\t\tif(beans.size()>1 && beans.contains(bean)) {\r\n \t\t\t\tITextSourceReference reference = bean.getNameLocation();\r\n \t\t\t\tif(reference==null) {\r\n \t\t\t\t\treference = CDIUtil.getNamedDeclaration(bean);\r\n \t\t\t\t}\r\n \t\t\t\tStringBuffer sb = new StringBuffer(bean.getSimpleJavaName());\r\n \t\t\t\tfor (IBean iBean : beans) {\r\n \t\t\t\t\tif(bean!=iBean) {\r\n \t\t\t\t\t\tsb.append(\", \").append(iBean.getSimpleJavaName());\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t\taddError(MessageFormat.format(CDIValidationMessages.DUPLCICATE_EL_NAME, sb.toString()), CDIPreferences.AMBIGUOUS_EL_NAMES, reference, bean.getResource());\r\n \t\t\t} else {\r\n \t\t\t\t/*\r\n \t\t\t\t * • the EL name of one bean is of the form x.y, where y is a valid bean EL name, and x is the EL name of the other bean,\r\n \t\t\t\t * the container automatically detects the problem and treats it as a deployment problem. \r\n \t\t\t\t */\r\n \t\t\t\tif(name.indexOf('.')>0) {\r\n \t\t\t\t\tStringTokenizer st = new StringTokenizer(name, \".\", false);\r\n \t\t\t\t\tStringBuffer xName = new StringBuffer();\r\n \t\t\t\t\twhile(st.hasMoreTokens()) {\r\n \t\t\t\t\t\tif(xName.length()>0) {\r\n \t\t\t\t\t\t\txName.append('.');\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\txName.append(st.nextToken());\r\n \t\t\t\t\t\tif(st.hasMoreTokens()) {\r\n \t\t\t\t\t\t\tString xNameAsString = xName.toString();\r\n \t\t\t\t\t\t\tSet<IBean> xBeans = cdiProject.getBeans(xNameAsString, true);\r\n \t\t\t\t\t\t\tif(!xBeans.isEmpty()) {\r\n \t\t\t\t\t\t\t\tString yName = name.substring(xNameAsString.length()+1);\r\n \t\t\t\t\t\t\t\tIStatus status = JavaConventions.validateJavaTypeName(yName, CompilerOptions.VERSION_1_6, CompilerOptions.VERSION_1_6);\r\n \t\t\t\t\t\t\t\tif (status.getSeverity() != IStatus.ERROR) {\r\n \t\t\t\t\t\t\t\t\tITextSourceReference reference = bean.getNameLocation();\r\n \t\t\t\t\t\t\t\t\tif(reference==null) {\r\n \t\t\t\t\t\t\t\t\t\treference = CDIUtil.getNamedDeclaration(bean);\r\n \t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t\taddError(MessageFormat.format(CDIValidationMessages.UNRESOLVABLE_EL_NAME, name, yName, xNameAsString, xBeans.iterator().next().getSimpleJavaName()), CDIPreferences.AMBIGUOUS_EL_NAMES, reference, bean.getResource());\r\n \t\t\t\t\t\t\t\t\tbreak;\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t}", "@Test\r\n\tpublic void getName() {\r\n\t\tassertEquals(\"Name was intialized as 'test'\", \"test\", testObj.getName());\r\n\t}", "private boolean isRenameValid()\n{\n String ntext = rename_field.getText();\n if (!isValidId(ntext)) return false;\n if (ntext.equals(start_name)) return false;\n\n return true;\n}", "public String checkDBProductName() throws Exception;", "public String getName() {\n/* 341 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test\n public void dspNamesTest() {\n // TODO: test dspNames\n }", "protected abstract Object createProcessBean(Name name);", "public boolean checkName(final String name) {\n\t\treturn channelName.equals(name);\n\t}" ]
[ "0.6627786", "0.63467705", "0.61484367", "0.57462007", "0.57394505", "0.545322", "0.541832", "0.54178363", "0.54178363", "0.54098773", "0.5393173", "0.5367908", "0.5343617", "0.5339413", "0.5298888", "0.5264551", "0.518133", "0.518133", "0.518133", "0.518133", "0.518133", "0.518133", "0.518133", "0.518133", "0.518133", "0.518133", "0.518133", "0.518133", "0.518133", "0.518133", "0.518133", "0.518133", "0.518133", "0.518133", "0.518133", "0.518133", "0.518133", "0.518133", "0.518133", "0.5178643", "0.51723367", "0.516701", "0.51669204", "0.51662916", "0.5141056", "0.51212376", "0.51207644", "0.5109836", "0.50802463", "0.50755495", "0.50553626", "0.50319654", "0.5009295", "0.5009041", "0.5005621", "0.4987411", "0.49866703", "0.49849725", "0.49841776", "0.49826682", "0.49720797", "0.49676615", "0.49644813", "0.4959192", "0.49589115", "0.4958797", "0.49503252", "0.4935135", "0.49277955", "0.4926586", "0.4925422", "0.49230918", "0.49191514", "0.4906207", "0.49058625", "0.4899627", "0.4898218", "0.48932308", "0.48908854", "0.487751", "0.48749292", "0.487473", "0.485442", "0.48518306", "0.4839534", "0.48336554", "0.48328778", "0.48327336", "0.4831682", "0.48231992", "0.482049", "0.48165536", "0.48149726", "0.48135498", "0.48112795", "0.4808231", "0.48016542", "0.47985914", "0.47899476", "0.47878024" ]
0.772777
0
/ Test of checkMetalName method, of class KnowledgeSystemBeanRemoteInterface.
@Test public void testCheckMetalName() { System.out.println("checkMetalName - MetalName do not Exist"); String id = "Metal AB"; boolean result = KnowledgeSystemBeanInterface.checkMetalName(id); assertFalse(result); System.out.println("testCheckMetalName ---------------------------------------------------- Done"); // TODO review the generated test code and remove the default call to fail. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n public void testMetalNames() {\r\n System.out.println(\"metalNames - Metal has records\");\r\n List<String> result = KnowledgeSystemBeanInterface.metalNames();\r\n assertEquals(result.size(), 15);\r\n System.out.println(\"testMetalNames ---------------------------------------------------- Done\");\r\n // TODO review the generated test code and remove the default call to fail.\r\n }", "@Test\r\n public void testFillersAssociated() {\r\n System.out.println(\"FillersAssociated - metalName = ''\");\r\n String metalName = \"\";\r\n List<String> result = KnowledgeSystemBeanInterface.FillersAssociated(metalName);\r\n ArrayList<String> results = new ArrayList<String>();\r\n assertEquals(result, results);\r\n System.out.println(\"testFillersAssociated ---------------------------------------------------- Done\");\r\n }", "public void testGetServerMBeanName()\n {\n try\n {\n String objectName = deployer.getServerMBeanName(\"foo\", \"bar\").toString();\n assertEquals(\"foo:j2eeType=J2EEServer,name=bar\", objectName);\n }\n catch (MalformedObjectNameException e)\n {\n fail(\"No error should be thrown\");\n }\n try\n {\n deployer.getServerMBeanName(null, \"bar\").toString();\n fail(\"error should be thrown\");\n }\n catch (MalformedObjectNameException expected)\n {\n // Expected\n }\n try\n {\n deployer.getServerMBeanName(\"\", \"bar\").toString();\n fail(\"error should be thrown\");\n }\n catch (MalformedObjectNameException expected)\n {\n // Expected\n }\n }", "@Override\r\n\tString check_brand() {\n\t\treturn \"Delmont\";\r\n\t}", "@Override\r\n\tString check_brand() {\n\t\treturn \"Delmont\";\r\n\t}", "public void testGetName() {\n String name = mb.getName();\n assertNotNull(name);\n assertTrue(name.length() > 0);\n }", "public void testGetSpecName() {\n assertEquals(mb.getSpecName(), System\n .getProperty(\"java.vm.specification.name\"));\n }", "@Test\r\n public void testCheckFillerName() {\r\n System.out.println(\"checkFillerName - have record\");\r\n String id = \"Filler A\";\r\n boolean result = KnowledgeSystemBeanInterface.checkFillerName(id);\r\n assertTrue(result);\r\n System.out.println(\"testCheckFillerName ---------------------------------------------------- Done\");\r\n // TODO review the generated test code and remove the default call to fail.\r\n }", "@Test\n public void testGetName() {\n System.out.println(\"getName\");\n VM instance = null;\n String expResult = \"\";\n String result = instance.getName();\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 }", "@Test\r\n public void testTransferMetalInfo() {\r\n System.out.println(\"transferMetalInfo - Table have records\");\r\n List<Vector> result = KnowledgeSystemBeanInterface.transferMetalInfo();\r\n assertEquals(result.size(), 15);\r\n System.out.println(\"testTransferMetalInfo ---------------------------------------------------- Done\");\r\n }", "@Test\n public void testGetServerRemoto() throws ApplicationException {\n CommunicationFactory instance = CommunicationFactory.getFactory();\n String expResult = bundle.getString(IPropertiesConstants.COMM_REMOTE_CONNECTOR);\n String result = instance.getServer(\"cmcdell\").getClass().getName();\n assertEquals(expResult, result);\n }", "@org.junit.Test\n public void getName() {\n Weapon sword = new Sword();\n String dmg = sword.getName();\n assertEquals(\"Normal Sword.getName() failed\",\"Sword\",dmg);\n\n Weapon stick = new WoodStick();\n dmg = stick.getName();\n assertEquals(\"Normal WoodStick.getName() failed\",\"Wooden Stick\",dmg);\n }", "private boolean checkDeviceName(String name) {\n switch (name) {\n case \"LAPTOP\" :\n case \"PRINTER\" :\n case \"ROUTER\" :\n return true;\n default:\n return false;\n }\n }", "boolean hasMobile(String name);", "public String checkDBProductName() throws Exception;", "boolean isSetName();", "@Test\n public void someTest() {\n// String maStr = \" \";\n// System.out.println(\" \" instanceof String);\n// System.out.println(maStr.isEmpty());\n\n manager.setName(null);\n System.out.println(manager.getName());\n }", "public void checkOdlOpenflowManufacturer2(String x) throws SnmpStatusException;", "boolean hasMachineType();", "@Test\n public void testGetServerLocal() throws ApplicationException {\n CommunicationFactory instance = CommunicationFactory.getFactory();\n String expResult = bundle.getString(IPropertiesConstants.COMM_LOCAL_CONNECTOR);\n String result = instance.getServer(\"localhost\").getClass().getName();\n assertEquals(expResult, result);\n }", "@Override\n public String nameAndType() {\n\t String n = \"noname\";\n\t if (name != null) {\n\t\t n=name;\n\t }\n\t return \"if \"+n+\":\";\n }", "public boolean checkName(String name)\n {\n return true;\n }", "public boolean isSetName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().find_attribute_user(NAME$2) != null;\r\n }\r\n }", "boolean hasManufacturer();", "public String checkShouKuanDan(String name) throws RemoteException {\n String url = \"rmi://localhost:1098/\";\n String out=\"\";\n try {\n Context namingContext = new InitialContext();\n PbbService serv = (PbbService) namingContext.lookup(\n url + \"HelloService1\");\n out=serv.checkShouKuanDan(name);\n }\n catch (NamingException e) {\n e.printStackTrace();\n }\n return out;\n }", "boolean isNameRequired();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "String getMetalAtomicSymbol (String metalName)\n {\n if (metalName == \"aluminium\")\n {\n return \"Al\";\n }\n else if (metalName == \"magnesium\" )\n {\n return \"Mg\";\n }\n else if (metalName == \"gallium\")\n {\n return \"Ga\";\n }\n else if (metalName == \"indium\")\n {\n return \"In\";\n }\n else if (metalName == \"thallium\")\n {\n return \"Tl\";\n }\n else if (metalName == \"germanium\")\n {\n return \"Ge\";\n }\n else if (metalName == \"tin\")\n {\n return \"Sn\";\n }\n else if (metalName == \"lead\")\n {\n return \"Pb\";\n }\n else if (metalName == \"arsenic\")\n {\n return \"As\";\n }\n else if (metalName == \"antimony\")\n {\n return \"Sb\";\n }\n else if (metalName == \"bismuth\")\n {\n return \"Bi\";\n } \n\n return null;\n }", "public String getName()\r\n/* 91: */ {\r\n/* 92:112 */ return k_() ? aL() : \"container.minecart\";\r\n/* 93: */ }", "public void productName_Comparision_MiniCart() {\n UtilityHelper.miniCart_CompareListString();\n }", "@Override\n\tprotected void checkHardware() {\n\t\tsuper.checkHardware();\n\t}", "public void testGetName() throws Exception {\n System.out.println(\"getName\");\n Properties properties = new Properties();\n properties.put(OntologyConstants.ONTOLOGY_MANAGER_CLASS,\n \"com.rift.coad.rdf.semantic.ontology.jena.JenaOntologyManager\");\n File testFile = new File(\"./base.xml\");\n FileInputStream in = new FileInputStream(testFile);\n byte[] buffer = new byte[(int)testFile.length()];\n in.read(buffer);\n in.close();\n properties.put(OntologyConstants.ONTOLOGY_CONTENTS, new String(buffer));\n JenaOntologyManager instance =\n (JenaOntologyManager)OntologyManagerFactory.init(properties);\n\n String expResult = \"JenaOntologyManager\";\n String result = instance.getName();\n assertEquals(expResult, result);\n \n JenaOntologyManager instance2 =\n (JenaOntologyManager)OntologyManagerFactory.init(properties);\n assertEquals(instance2, instance);\n }", "public void testGetVmName() {\n assertEquals(mb.getVmName(), System.getProperty(\"java.vm.name\"));\n }", "public boolean checkName(String name)\n\t{\n\t\treturn (robotHM.containsKey(name));\n\t}", "public abstract boolean isNameAvailable(String readerName);", "@Test\n public void testGetName() {\n System.out.println(\"getName\");\n Manager instance = new Manager();\n String expResult = \"\";\n String result = instance.getName();\n assertEquals(expResult, result);\n \n fail(\"The test case is a prototype.\");\n }", "@Test\n public void checkIfSupportedTest() {\n assertTrue(EngineController.checkIfSupported(\"getMaxRotateSpeed\"));\n assertTrue(EngineController.checkIfSupported(\"rotate 10 1\"));\n assertTrue(EngineController.checkIfSupported(\"orient\"));\n // check interface, that specific for engine\n assertTrue(EngineController.checkIfSupported(\"getMaxThrust\"));\n assertTrue(EngineController.checkIfSupported(\"getCurrentThrust\"));\n assertTrue(EngineController.checkIfSupported(\"setThrust 333\"));\n }", "@Override\n public final boolean checkMachine(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) {\n return checkMachine_EM(iGregTechTileEntity, itemStack);\n }", "@DISPID(1610940424) //= 0x60050008. The runtime will prefer the VTID if present\n @VTID(30)\n Factory sheetMetalFactory();", "boolean isNilPoolName();", "public abstract boolean isNetbeansKenaiRegistered();", "public void setEmulationName(String name) {\n\t\tthis.name = name;\n\t}", "static boolean checkIsDeviceAvailable(String respStr)\n {\n if (respStr.length() != CMD_LEN)\n {\n// log.warn(\"checkIsDeviceAvailable(): respStr is not valid:\" + respStr + \",return false\");\n return false;\n }\n MeshCommand cmd = new MeshCommand(respStr);\n if (!cmd.isValid())\n {\n// log.warn(\"checkIsDeviceAvailable(): cmd is not valid, cmd:\" + cmd + \",return false\");\n return false;\n }\n if (!cmd.isFree())\n {\n// log.warn(\"checkIsDeviceAvailable(): cap is not enought, return false\");\n return false;\n }\n return true;\n }", "@Test\n public void testSetName() {\n System.out.println(\"setName\");\n String name = \"\";\n VM instance = null;\n instance.setName(name);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public boolean hasPartyNamed( EAIMMCtxtIfc theCtxt, EAIMMNameIfc theMMName) throws EAIException;", "public boolean isSetName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(NAME$8) != 0;\n }\n }", "@Test\n\tpublic void test_TCM__String_getName() {\n\t\tfinal Attribute attr = new Attribute(\"test\", \"value\");\n\t\tassertTrue(\"incorrect attribute name\", attr.getName().equals(\"test\"));\n\n\t}", "private boolean isSupportedInternal() {\n boolean z = false;\n synchronized (this.mLock) {\n if (this.mServiceManager == null) {\n Log.e(TAG, \"isSupported: called but mServiceManager is null!?\");\n return false;\n }\n try {\n if (this.mServiceManager.getTransport(IWifi.kInterfaceName, HAL_INSTANCE_NAME) != (byte) 0) {\n z = true;\n }\n } catch (RemoteException e) {\n Log.wtf(TAG, \"Exception while operating on IServiceManager: \" + e);\n return false;\n }\n }\n }", "String getName() throws RemoteException;", "@Test\n public void testIsInvalidChannelName() {\n System.out.println(\"isInvalidChannelName test ---\");\n String validName = \"Valid Name\";\n String invalidName1 = \"Invalid_Name\";\n String invalidName2 = \"\";\n String invalidName3 = \" \";\n String invalidName4 = \"troll<script>document.cookie='lol'</script>\";\n assertFalse(instance.isInvalidChannelName(validName));\n assertTrue(instance.isInvalidChannelName(invalidName1));\n assertTrue(instance.isInvalidChannelName(invalidName2));\n assertTrue(instance.isInvalidChannelName(invalidName3));\n assertTrue(instance.isInvalidChannelName(invalidName4));\n }", "public void testGetDomainMBeanName()\n {\n try\n {\n String objectName = deployer.getDomainMBeanName(\"foo\").toString();\n assertEquals(\"foo:j2eeType=J2EEDomain,name=foo\", objectName);\n }\n catch (MalformedObjectNameException e)\n {\n fail(\"No error should be thrown\");\n }\n try\n {\n deployer.getDomainMBeanName(null).toString();\n fail(\"error should be thrown\");\n }\n catch (MalformedObjectNameException expected)\n {\n // Expected\n }\n try\n {\n deployer.getDomainMBeanName(\"\").toString();\n fail(\"error should be thrown\");\n }\n catch (MalformedObjectNameException expected)\n {\n // Expected\n }\n }", "private boolean isNameValid(String name) {\n\n }", "public void testGetManagementSpecVersion() {\n String specVersion = mb.getManagementSpecVersion();\n assertNotNull(specVersion);\n assertTrue(specVersion.length() > 0);\n }", "public boolean isSetName() {\n return this.name != null;\n }", "public boolean isSetName() {\n return this.name != null;\n }", "public boolean isSetName() {\n return this.name != null;\n }", "public boolean isSetName() {\n return this.name != null;\n }", "public boolean isSetName() {\r\n return this.name != null;\r\n }", "protected boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) {\n return false;\n }", "public boolean testUnittype(EIfcnamedunit type) throws SdaiException;", "public boolean isSetName() {\n return this.Name != null;\n }", "public String getManagerName() {\n return \"chembl\";\n }", "public boolean exsitName(String name) {\n\t\tKynamic kynamic = this.kynamicDao.getKynamicByName(name);\r\n\t\treturn kynamic!=null?true:false;\r\n\t}", "boolean checkAvailable(String userName);", "public static boolean isGoodTypeName(String candidate) {\n return isUsable(candidate) && candidate.matches(OSGI_SYMBOLIC_NAME_REGEX);\n }", "private boolean mAsServer(String sRemoteDeviceName) {\n if (oBTServer==null ) return false;\n String s = oBTServer.sClientName;\n return sRemoteDeviceName.equals(s);\n }", "public boolean hasShippingsNamed( EAIMMCtxtIfc theCtxt, EAIMMNameIfc theMMName) throws EAIException;", "@Test\n public void testIsValidName() {\n FieldVerifier service = new FieldVerifier();\n String name = \"toto\";\n boolean result = service.isValidName(name);\n assertEquals(true, result);\n }", "@Test\n public void testGetName() {\n System.out.println(\"ColorIOProviderNGTest.testGetName\");\n assertEquals(instance.getName(), ColorAttributeDescription.ATTRIBUTE_NAME);\n }", "public boolean isSetName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(NAME$0) != 0;\n }\n }", "public boolean isSetName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(NAME$0) != 0;\n }\n }", "boolean hasHangmogName();", "public boolean hasChameleonShield() {\n for (Mounted mEquip : getMisc()) {\n MiscType mtype = (MiscType) mEquip.getType();\n if (mtype.hasFlag(MiscType.F_CHAMELEON_SHIELD)) {\n // The Mek has Chameleon Light Polarization Field\n return true;\n }\n }\n return false;\n }", "@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean checkNetword() {\n\t\tboolean flag = oTest.checkNetword();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn flag;\r\n\t}", "private void testAccessibleName(Component comp, AccessibleContext comp_AC) {\n String name = comp_AC.getAccessibleName();\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testAccessibleName()> - accessibleName=\"+name);\n \n if (testSettings.AP_accessibleName && (name == null)){\n noName.add(comp);\n }\n }", "public boolean isSetName() {\n return this.name != null;\n }", "protected void reloadMBeanNames()\n {\n try\n {\n GraphDatabaseService genericDb = NeoServer.INSTANCE.database();\n\n if ( genericDb instanceof EmbeddedGraphDatabase )\n {\n EmbeddedGraphDatabase db = (EmbeddedGraphDatabase) genericDb;\n\n // Grab relevant jmx management beans\n ObjectName neoQuery = db.getManagementBean( Kernel.class ).getMBeanQuery();\n String instance = neoQuery.getKeyProperty( \"instance\" );\n String baseName = neoQuery.getDomain() + \":instance=\"\n + instance + \",name=\";\n\n primitivesName = new ObjectName( baseName\n + JMX_NEO4J_PRIMITIVE_COUNT );\n storeSizesName = new ObjectName( baseName\n + JMX_NEO4J_STORE_FILE_SIZES );\n transactionsName = new ObjectName( baseName\n + JMX_NEO4J_TRANSACTIONS );\n memoryMappingName = new ObjectName( baseName\n + JMX_NEO4J_MEMORY_MAPPING );\n kernelName = new ObjectName( baseName + JMX_NEO4J_KERNEL );\n lockingName = new ObjectName( baseName + JMX_NEO4J_LOCKING );\n cacheName = new ObjectName( baseName + JMX_NEO4J_CACHE );\n configurationName = new ObjectName( baseName\n + JMX_NEO4J_CONFIGURATION );\n xaResourcesName = new ObjectName( baseName\n + JMX_NEO4J_XA_RESOURCES );\n }\n\n }\n catch ( MalformedObjectNameException e )\n {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n catch ( NullPointerException e )\n {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n catch ( org.neo4j.webadmin.domain.DatabaseBlockedException e )\n {\n e.printStackTrace();\n }\n }", "public static boolean isCompatibleName(String name) {\n return hiveCompatible.matcher(name).matches();\n }" ]
[ "0.7040656", "0.56802934", "0.56583697", "0.5502812", "0.5502812", "0.5501949", "0.54977643", "0.5492715", "0.54717356", "0.54100966", "0.5388096", "0.5353292", "0.53386384", "0.5336254", "0.53041697", "0.52238256", "0.52207786", "0.52021956", "0.5172034", "0.5171079", "0.51620805", "0.5149331", "0.5118338", "0.5110685", "0.50931966", "0.5079904", "0.50646", "0.50646", "0.50646", "0.50646", "0.50646", "0.50646", "0.50646", "0.50646", "0.50646", "0.50646", "0.50646", "0.50646", "0.50646", "0.50646", "0.50646", "0.50646", "0.50646", "0.50646", "0.50646", "0.50646", "0.50646", "0.50646", "0.50646", "0.50608337", "0.5048835", "0.50418496", "0.5033762", "0.50307626", "0.50238544", "0.5022516", "0.50223494", "0.49953833", "0.49808872", "0.49805948", "0.4951708", "0.4951076", "0.4946229", "0.49452683", "0.49316958", "0.4916342", "0.49101737", "0.4908522", "0.49042147", "0.4883146", "0.48822907", "0.48743862", "0.48674726", "0.4859494", "0.485914", "0.4856729", "0.4856729", "0.4856729", "0.4856729", "0.48563528", "0.48537078", "0.4851801", "0.4843474", "0.4842802", "0.48339397", "0.4826621", "0.48209488", "0.4808499", "0.48055258", "0.479266", "0.478914", "0.47879216", "0.47879216", "0.47773165", "0.4776691", "0.477604", "0.47685426", "0.47665766", "0.4764956", "0.47612444" ]
0.8110963
0
TODO Autogenerated method stub
@Override public VisitCategory viewByCode(String code) { return visitCategoryDAO.viewByCode(code); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
TODO Autogenerated method stub
public void SelectVisibleTextByName(String Id, String Value) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public void SelectValueByName(String Id, String Value) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public void SelectIndexById(String Name, int Value) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public void SelectIndexByName(String Name, int Value) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
TODO Autogenerated method stub
public void getTextById(String Id) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public void verifyByClassName(String locatorValue, String data) { }
{ "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
Creates a new vivarium panel.
public VivariumPanel() { // Call super constructor super(); // Initialize properties this.turtles = new HashSet<>(); this.isDebug = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public VirtualPanel() {}", "@SuppressWarnings({})\n\tpublic JPanel createVMPanel(String name) {\n\t\tfinal vdicalc mainframe = null;\n\n\t\tfinal JPanel j = new JPanel();\n\t\tj.setName(name);\n\n\t\tfinal MigLayout layout2 = new MigLayout(\"ins 3, gap 10px -4px\", \"\", \"\");\n\t\tj.setLayout(layout2);\n\t\tj.setBorder(Raisedbevel);\n\t\tj.setBackground(Color.LIGHT_GRAY);\n\n\t\tfinal JPanel panel_userprofile = new JPanel(); // Add JPanel for User Profile\n\t\tfinal JLabel vmvcpucombolabel = new JLabel(vdicalc.MESSAGES.getString(\"vmvcpu.view\"), SwingConstants.LEFT);\n\t\tfinal String[] vmvcpucombovalues = { \"1\", \"2\", \"4\", \"8\" };\n\t\tfinal JComboBox<String> vmvcpucombo = new JComboBox<>(vmvcpucombovalues);\n\t\tfinal JLabel vmvcpumhzlabel = new JLabel(vdicalc.MESSAGES.getString(\"vmvcpumhz.view\"), SwingConstants.LEFT);\n\t\tfinal JTextField vmvcpumhztxt = new JTextField(vdicalc.DEFAULTS.getString(\"vmvcpumhztxt.default\"), 2);\n\t\tfinal JLabel vmvcpumhztotalsize = new JLabel(\"0000\", SwingConstants.LEFT); // Label for total vCPU MHZ in use\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// per VM\n\t\tfinal JLabel vmvcpumhzoverheadlabel = new JLabel(vdicalc.MESSAGES.getString(\"vmvcpumhzoverhead.view\"),\n\t\t\t\tSwingConstants.LEFT);\n\t\tfinal String[] vmvcpumhzoverheadcombovalues = { \"0\", \"10\", \"15\", \"20\", \"25\", \"30\" };\n\t\tfinal JComboBox<String> vmvcpumhzoverheadcombo = new JComboBox<>(vmvcpumhzoverheadcombovalues);\n\t\tfinal JLabel vmmemorysizelabel = new JLabel(vdicalc.MESSAGES.getString(\"vmmemorysize.view\"),\n\t\t\t\tSwingConstants.RIGHT);\n\t\tfinal JTextField vmmemorysizetxt = new JTextField(vdicalc.DEFAULTS.getString(\"vmmemorysizetxt.default\"), 3);\n\t\tfinal JLabel vmmemoryreservationlabel = new JLabel(vdicalc.MESSAGES.getString(\"vmmemoryreservation.view\"),\n\t\t\t\tSwingConstants.RIGHT);\n\t\tfinal String[] vmmemoryreservationvalues = { \"0\", \"10\", \"15\", \"20\", \"30\", \"40\", \"50\", \"60\", \"70\", \"80\", \"90\",\n\t\t\t\t\"100\" };\n\t\tfinal JComboBox<String> vmmemoryreservationcombo = new JComboBox<>(vmmemoryreservationvalues);\n\t\tfinal JLabel vmvramlabel = new JLabel(vdicalc.MESSAGES.getString(\"vmdisplay3d.view\"));\n\t\tfinal String[] vmvramcombovalues = { State.OFF.toString(), \"64\", \"128\", \"256\", \"512\" };\n\t\tfinal JComboBox<String> vmvramcombo = new JComboBox<>(vmvramcombovalues);\n\t\tfinal JLabel vmdisplaynumbercombolabel = new JLabel(vdicalc.MESSAGES.getString(\"vmdisplaynumber.view\"));\n\t\tfinal String[] vmdisplaynumbercombovalues = { \"1\", \"2\", \"3\", \"4\" };\n\t\tfinal JComboBox<String> vmdisplaynumbercombo = new JComboBox<>(vmdisplaynumbercombovalues);\n\t\tfinal JLabel vmdisplayresolutioncombolabel = new JLabel(vdicalc.MESSAGES.getString(\"vmdisplayresolution.view\"));\n\t\tfinal String[] vmdisplayresolutioncombovalues = { \"1280x800\", \"1920x1200\", \"2560x1600\" };\n\t\tfinal JComboBox<String> vmdisplayresolutioncombo = new JComboBox<>(vmdisplayresolutioncombovalues);\n\t\tfinal JLabel desktoppooltypecombolabel = new JLabel(vdicalc.MESSAGES.getString(\"desktoppooltype.view\"));\n\t\tfinal String[] desktoppooltypecombovalues = { \"Linked\", \"Full\" };\n\t\tfinal JComboBox<String> desktoppooltypecombo = new JComboBox<>(desktoppooltypecombovalues);\n\t\tfinal JLabel vmdisposabledisksizetxtlabel = new JLabel(\n\t\t\t\tvdicalc.MESSAGES.getString(\"vmdisposabledisksizetxt.view\"), SwingConstants.LEFT);\n\t\tfinal JTextField vmdisposabledisksizetxt = new JTextField(\n\t\t\t\tvdicalc.DEFAULTS.getString(\"vmdisposabledisksizetxt.default\"), 4);\n\t\tfinal JLabel vmpowerstatecombolabel = new JLabel(vdicalc.MESSAGES.getString(\"vmpowerstate.view\"),\n\t\t\t\tSwingConstants.LEFT);\n\t\tfinal String[] vmpowerstatecombovalues = { State.ON.toString(), State.OFF.toString(),\n\t\t\t\tState.SUSPEND.toString() };\n\t\tfinal JComboBox<String> vmpowerstatecombo = new JComboBox<>(vmpowerstatecombovalues);\n\t\tfinal JLabel vmrefreshratecombolabel = new JLabel(vdicalc.MESSAGES.getString(\"vmrefreshrate.view\"),\n\t\t\t\tSwingConstants.LEFT);\n\t\tfinal String[] vmrefreshratecombovalues = { \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"20\", \"25\", \"30\",\n\t\t\t\t\"40\", \"50\", \"60\", \"70\", \"80\", \"90\", \"100\" };\n\t\tfinal JComboBox<String> vmrefreshratecombo = new JComboBox<>(vmrefreshratecombovalues);\n\t\tfinal JLabel vmrefreshratesize = new JLabel(\"0000\", SwingConstants.LEFT); // Label for total delta disk size per\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// VM\n\t\tfinal JLabel poolsnapshotcountcombolabel = new JLabel(vdicalc.MESSAGES.getString(\"poolsnapshotcount.view\"),\n\t\t\t\tSwingConstants.LEFT);\n\t\tfinal String[] poolsnapshotcountcombovalues = { \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\" };\n\t\tfinal JComboBox<String> poolsnapshotcountcombo = new JComboBox<>(poolsnapshotcountcombovalues);\n\t\tfinal JLabel vmparentcounttxtlabel = new JLabel(vdicalc.MESSAGES.getString(\"vmparentcount.view\"),\n\t\t\t\tSwingConstants.LEFT);\n\t\tfinal JTextField vmparentcounttxt = new JTextField(vdicalc.DEFAULTS.getString(\"vmparentcounttxt.default\"), 3);\n\t\tfinal JLabel vmthinsizeparentvmtxtlabel = new JLabel(vdicalc.MESSAGES.getString(\"vmthinsizeparentvm.view\"),\n\t\t\t\tSwingConstants.LEFT);\n\t\tfinal JTextField vmthinsizeparentvmtxt = new JTextField(\n\t\t\t\tvdicalc.DEFAULTS.getString(\"vmthinsizeparentvmtxt.default\"), 4);\n\t\tfinal JLabel vmpersistentdisksizetxtlabel = new JLabel(vdicalc.MESSAGES.getString(\"vmpersistentdisksize.view\"),\n\t\t\t\tSwingConstants.LEFT);\n\t\tfinal JTextField vmpersistentdisksizetxt = new JTextField(\n\t\t\t\tvdicalc.DEFAULTS.getString(\"vmpersistentdisksizetxt.default\"), 4);\n\t\tfinal JLabel vmfullsizeparentvmtxtlabel = new JLabel(vdicalc.MESSAGES.getString(\"vmfullsizeparentvm.view\"),\n\t\t\t\tSwingConstants.LEFT);\n\t\tfinal JTextField vmfullsizeparentvmtxt = new JTextField(\n\t\t\t\tvdicalc.DEFAULTS.getString(\"vmfullsizeparentvmtxt.default\"), 4);\n\t\tvmfullsizeparentvmtxt.setName(\"vmfullsizeparentvmtxt\");\n\t\tfinal JLabel vmcounttxtlabel = new JLabel(vdicalc.MESSAGES.getString(\"vmcount.view\"), SwingConstants.RIGHT);\n\t\tfinal JTextField vmcounttxt = new JTextField(vdicalc.DEFAULTS.getString(\"vmcounttxt.default\"), 4);\n\t\tfinal JLabel vmconcurrenttxtlabel = new JLabel(vdicalc.MESSAGES.getString(\"vmconcurrent.view\"),\n\t\t\t\tSwingConstants.RIGHT);\n\t\tfinal JTextField vmconcurrenttxt = new JTextField(vdicalc.DEFAULTS.getString(\"vmconcurrenttxt.default\"), 4);\n\t\tfinal JLabel desktoppoolcounttxtlabel = new JLabel(vdicalc.MESSAGES.getString(\"desktoppoolcount.view\"),\n\t\t\t\tSwingConstants.RIGHT);\n\t\tfinal JTextField desktoppoolcounttxt = new JTextField(vdicalc.DEFAULTS.getString(\"desktoppoolcounttxt.default\"),\n\t\t\t\t3);\n\t\tfinal JLabel vmreplicasteadystateiotxtlabel = new JLabel(\n\t\t\t\tvdicalc.MESSAGES.getString(\"vmreplicasteadystateio.view\"), SwingConstants.LEFT);\n\t\tfinal JTextField vmreplicasteadystateiotxt = new JTextField(\n\t\t\t\tvdicalc.DEFAULTS.getString(\"vmreplicasteadystateiotxt.default\"), 3);\n\t\tfinal JLabel vmbootIOtxtlabel = new JLabel(vdicalc.MESSAGES.getString(\"vmbootIO.view\"), SwingConstants.LEFT);\n\t\tfinal JTextField vmbootIOtxt = new JTextField(vdicalc.DEFAULTS.getString(\"vmbootIOtxt.default\"), 3);\n\t\tfinal JLabel vmcorelabel = new JLabel(vdicalc.MESSAGES.getString(\"vmperphysicalcore\"), SwingConstants.RIGHT); // Label\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// for\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// VMs\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// per\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// physical\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// core\n\t\tString[] vmcorecombovalues = { \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\", \"13\", \"14\", \"15\",\n\t\t\t\t\"16\", \"17\", \"18\", \"19\", \"20\" };\n\t\tfinal JComboBox<String> vmcorecombo = new JComboBox<>(vmcorecombovalues);\n\t\tfinal JLabel vmdeltaIOtxtlabel = new JLabel(vdicalc.MESSAGES.getString(\"vmdeltaIOlinked.view\"),\n\t\t\t\tSwingConstants.LEFT);\n\t\tfinal JTextField vmdeltaIOtxt = new JTextField(vdicalc.DEFAULTS.getString(\"vmdeltaIOtxt.default\"), 3);\n\t\tfinal JLabel vmdeltareadIOtxtlabel = new JLabel(vdicalc.MESSAGES.getString(\"vmdeltareadIO.view\"),\n\t\t\t\tSwingConstants.LEFT);\n\t\tfinal JTextField vmdeltareadIOtxt = new JTextField(vdicalc.DEFAULTS.getString(\"vmdeltareadIOtxt.default\"), 3);\n\t\tfinal JLabel vmdeltawriteIOtxtlabellabel = new JLabel(vdicalc.MESSAGES.getString(\"vmdeltawriteIO.view\"),\n\t\t\t\tSwingConstants.LEFT);\n\t\tfinal JLabel vmdeltawriteIOtxtlabel = new JLabel(vdicalc.DEFAULTS.getString(\"vmdeltawriteIOtxtlabel.default\"),\n\t\t\t\tSwingConstants.LEFT);\n\t\tfinal JLabel vmpersistentIOtxtlabel = new JLabel(vdicalc.MESSAGES.getString(\"vmpersistentIO.view\"),\n\t\t\t\tSwingConstants.LEFT);\n\t\tfinal JTextField vmpersistentIOtxt = new JTextField(vdicalc.DEFAULTS.getString(\"vmpersistentIOtxt.default\"), 3);\n\t\tfinal JLabel vmpersistentreadIOtxtlabel = new JLabel(vdicalc.MESSAGES.getString(\"vmpersistentreadIO.view\"),\n\t\t\t\tSwingConstants.LEFT);\n\t\tfinal JTextField vmpersistentreadIOtxt = new JTextField(\n\t\t\t\tvdicalc.DEFAULTS.getString(\"vmpersistentreadIOtxt.default\"), 3);\n\t\tfinal JLabel vmpersistentwriteIOlabellabel = new JLabel(vdicalc.MESSAGES.getString(\"vmpersistentwriteIO.view\"),\n\t\t\t\tSwingConstants.LEFT);\n\t\tfinal JLabel vmpersistentwriteIOlabel = new JLabel(\n\t\t\t\tvdicalc.DEFAULTS.getString(\"vmpersistentwriteIOlabel.default\"), SwingConstants.LEFT);\n\n\t\t/*\n\t\t * Create UserProfile Radio Buttons\n\t\t */\n\t\tfinal MigLayout layoutuserprofile = new MigLayout(\"ins 4, gap 20px, wmin 864, align center\");\n\t\tpanel_userprofile.setLayout(layoutuserprofile);\n\t\tpanel_userprofile.setBackground(Color.LIGHT_GRAY);\n\n\t\tJRadioButton taskworkerButton = new JRadioButton(\"Task\");\n\t\ttaskworkerButton.setSelected(true);\n\t\tJRadioButton officeworkerButton = new JRadioButton(\"Office\");\n\t\tJRadioButton knowledgeworkerButton = new JRadioButton(\"Knowledge\");\n\t\tJRadioButton powerworkerButton = new JRadioButton(\"Power\");\n\n\t\tButtonGroup group = new ButtonGroup();\n\t\tgroup.add(taskworkerButton);\n\t\tgroup.add(officeworkerButton);\n\t\tgroup.add(knowledgeworkerButton);\n\t\tgroup.add(powerworkerButton);\n\n\t\ttaskworkerButton.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tvmvcpucombo.setSelectedIndex(Integer.parseInt(vdicalc.DEFAULTS.getString(\"taskworker.vmvcpucombo\")));\n\t\t\t\tvmvcpumhztxt.setText(vdicalc.DEFAULTS.getString(\"taskworker.vmvcpumhztxt\"));\n\t\t\t\tvmvcpumhzoverheadcombo.setSelectedIndex(\n\t\t\t\t\t\tInteger.parseInt(vdicalc.DEFAULTS.getString(\"taskworker.vmvcpumhzoverheadcombo\")));\n\t\t\t\tvmmemorysizetxt.setText(vdicalc.DEFAULTS.getString(\"taskworker.vmmemorysizetxt\"));\n\t\t\t\tdesktoppooltypecombo.setSelectedIndex(\n\t\t\t\t\t\tInteger.parseInt(vdicalc.DEFAULTS.getString(\"taskworker.desktoppooltypecombo\")));\n\t\t\t\tvmdeltaIOtxt.setText(vdicalc.DEFAULTS.getString(\"taskworker.vmdeltaIOtxt\"));\n\t\t\t\tvmdisplaynumbercombo.setSelectedIndex(\n\t\t\t\t\t\tInteger.parseInt(vdicalc.DEFAULTS.getString(\"taskworker.vmdisplaynumbercombo\")));\n\t\t\t\tvmdisplayresolutioncombo.setSelectedIndex(\n\t\t\t\t\t\tInteger.parseInt(vdicalc.DEFAULTS.getString(\"taskworker.vmdisplayresolutioncombo\")));\n\t\t\t\tvmvramcombo.setSelectedIndex(Integer.parseInt(vdicalc.DEFAULTS.getString(\"taskworker.vmvramcombo\")));\n\t\t\t\tvmcorecombo.setSelectedIndex(Integer.parseInt(vdicalc.DEFAULTS.getString(\"taskworker.vmcorecombo\")));\n\t\t\t}\n\n\t\t});\n\n\t\tofficeworkerButton.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tvmvcpucombo.setSelectedIndex(Integer.parseInt(vdicalc.DEFAULTS.getString(\"officeworker.vmvcpucombo\")));\n\t\t\t\tvmvcpumhztxt.setText(vdicalc.DEFAULTS.getString(\"officeworker.vmvcpumhztxt\"));\n\t\t\t\tvmvcpumhzoverheadcombo.setSelectedIndex(\n\t\t\t\t\t\tInteger.parseInt(vdicalc.DEFAULTS.getString(\"officeworker.vmvcpumhzoverheadcombo\")));\n\t\t\t\tvmmemorysizetxt.setText(vdicalc.DEFAULTS.getString(\"officeworker.vmmemorysizetxt\"));\n\t\t\t\tdesktoppooltypecombo.setSelectedIndex(\n\t\t\t\t\t\tInteger.parseInt(vdicalc.DEFAULTS.getString(\"officeworker.desktoppooltypecombo\")));\n\t\t\t\tvmdeltaIOtxt.setText(vdicalc.DEFAULTS.getString(\"officeworker.vmdeltaIOtxt\"));\n\t\t\t\tvmdisplaynumbercombo.setSelectedIndex(\n\t\t\t\t\t\tInteger.parseInt(vdicalc.DEFAULTS.getString(\"officeworker.vmdisplaynumbercombo\")));\n\t\t\t\tvmdisplayresolutioncombo.setSelectedIndex(\n\t\t\t\t\t\tInteger.parseInt(vdicalc.DEFAULTS.getString(\"officeworker.vmdisplayresolutioncombo\")));\n\t\t\t\tvmvramcombo.setSelectedIndex(Integer.parseInt(vdicalc.DEFAULTS.getString(\"officeworker.vmvramcombo\")));\n\t\t\t\tvmcorecombo.setSelectedIndex(Integer.parseInt(vdicalc.DEFAULTS.getString(\"officeworker.vmcorecombo\")));\n\t\t\t}\n\n\t\t});\n\n\t\tknowledgeworkerButton.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tvmvcpucombo\n\t\t\t\t\t\t.setSelectedIndex(Integer.parseInt(vdicalc.DEFAULTS.getString(\"knowledgeworker.vmvcpucombo\")));\n\t\t\t\tvmvcpumhztxt.setText(vdicalc.DEFAULTS.getString(\"knowledgeworker.vmvcpumhztxt\"));\n\t\t\t\tvmvcpumhzoverheadcombo.setSelectedIndex(\n\t\t\t\t\t\tInteger.parseInt(vdicalc.DEFAULTS.getString(\"knowledgeworker.vmvcpumhzoverheadcombo\")));\n\t\t\t\tvmmemorysizetxt.setText(vdicalc.DEFAULTS.getString(\"knowledgeworker.vmmemorysizetxt\"));\n\t\t\t\tdesktoppooltypecombo.setSelectedIndex(\n\t\t\t\t\t\tInteger.parseInt(vdicalc.DEFAULTS.getString(\"knowledgeworker.desktoppooltypecombo\")));\n\t\t\t\tvmdeltaIOtxt.setText(vdicalc.DEFAULTS.getString(\"knowledgeworker.vmdeltaIOtxt\"));\n\t\t\t\tvmdisplaynumbercombo.setSelectedIndex(\n\t\t\t\t\t\tInteger.parseInt(vdicalc.DEFAULTS.getString(\"knowledgeworker.vmdisplaynumbercombo\")));\n\t\t\t\tvmdisplayresolutioncombo.setSelectedIndex(\n\t\t\t\t\t\tInteger.parseInt(vdicalc.DEFAULTS.getString(\"knowledgeworker.vmdisplayresolutioncombo\")));\n\t\t\t\tvmvramcombo\n\t\t\t\t\t\t.setSelectedIndex(Integer.parseInt(vdicalc.DEFAULTS.getString(\"knowledgeworker.vmvramcombo\")));\n\t\t\t\tvmcorecombo\n\t\t\t\t\t\t.setSelectedIndex(Integer.parseInt(vdicalc.DEFAULTS.getString(\"knowledgeworker.vmcorecombo\")));\n\t\t\t}\n\n\t\t});\n\n\t\tpowerworkerButton.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tvmvcpucombo.setSelectedIndex(Integer.parseInt(vdicalc.DEFAULTS.getString(\"powerworker.vmvcpucombo\")));\n\t\t\t\tvmvcpumhztxt.setText(vdicalc.DEFAULTS.getString(\"powerworker.vmvcpumhztxt\"));\n\t\t\t\tvmvcpumhzoverheadcombo.setSelectedIndex(\n\t\t\t\t\t\tInteger.parseInt(vdicalc.DEFAULTS.getString(\"powerworker.vmvcpumhzoverheadcombo\")));\n\t\t\t\tvmmemorysizetxt.setText(vdicalc.DEFAULTS.getString(\"powerworker.vmmemorysizetxt\"));\n\t\t\t\tdesktoppooltypecombo.setSelectedIndex(\n\t\t\t\t\t\tInteger.parseInt(vdicalc.DEFAULTS.getString(\"powerworker.desktoppooltypecombo\")));\n\t\t\t\tvmdeltaIOtxt.setText(vdicalc.DEFAULTS.getString(\"powerworker.vmdeltaIOtxt\"));\n\t\t\t\tvmdisplaynumbercombo.setSelectedIndex(\n\t\t\t\t\t\tInteger.parseInt(vdicalc.DEFAULTS.getString(\"powerworker.vmdisplaynumbercombo\")));\n\t\t\t\tvmdisplayresolutioncombo.setSelectedIndex(\n\t\t\t\t\t\tInteger.parseInt(vdicalc.DEFAULTS.getString(\"powerworker.vmdisplayresolutioncombo\")));\n\t\t\t\tvmvramcombo.setSelectedIndex(Integer.parseInt(vdicalc.DEFAULTS.getString(\"powerworker.vmvramcombo\")));\n\t\t\t\tvmcorecombo.setSelectedIndex(Integer.parseInt(vdicalc.DEFAULTS.getString(\"powerworker.vmcorecombo\")));\n\t\t\t}\n\n\t\t});\n\n\t\tpanel_userprofile.add(taskworkerButton);\n\t\tpanel_userprofile.add(officeworkerButton);\n\t\tpanel_userprofile.add(knowledgeworkerButton);\n\t\tpanel_userprofile.add(powerworkerButton);\n\n\t\tj.add(panel_userprofile, \"pos 0 0\");\n\n\t\t/*\n\t\t * Assign components to Column 0\n\t\t */\n\t\tj.add(vmvcpucombolabel, \"pos 5 45\");\n\t\tj.add(vmvcpucombo, \"pos 190 40, w 70!, \" + vdicalc.comboHeight);\n\t\tvmvcpucombo.setToolTipText(vdicalc.MESSAGES.getString(\"vmvcpu.tooltip\"));\n\t\tvmvcpucombo.setName(\"vmvcpucombo\");\n\t\tvmvcpucombo.addFocusListener(this);\n\t\tvmvcpucombo.addFocusListener(new FocusListener() {\n\n\t\t\t@Override\n\t\t\tpublic void focusGained(FocusEvent e) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void focusLost(FocusEvent e) {\n\n\t\t\t}\n\n\t\t});\n\t\tvmvcpucombo.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t\t// Populate label that dislpays total amount of MHz used per VM\n\t\t\t\tvmvcpumhztotalsize.setText(getVmvcpumhztotal(vmvcpumhztxt.getText(),\n\t\t\t\t\t\tvmvcpucombo.getSelectedItem().toString(), vmvcpumhzoverheadcombo.getSelectedItem().toString()));\n\n\t\t\t}\n\n\t\t});\n\n\t\tj.add(vmvcpumhzlabel, \"pos 5 68\");\n\t\tj.add(vmvcpumhztxt, \"pos 191 66, w 70!, \" + vdicalc.TextfieldHeight);\n\t\tvmvcpumhztxt.setToolTipText(vdicalc.MESSAGES.getString(\"vmvcpumhz.tooltip\"));\n\t\tvmvcpumhztxt.setName(\"vmvcpumhztxt\");\n\t\tvmvcpumhztxt.addFocusListener(this);\n\t\tvmvcpumhztxt.addFocusListener(new FocusListener() {\n\t\t\t@Override\n\t\t\tpublic void focusGained(final FocusEvent e) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void focusLost(final FocusEvent e) {\n\t\t\t\tfinal JTextField tf = (JTextField) e.getSource();\n\t\t\t\tif (Integer.parseInt(tf.getText()) < Integer\n\t\t\t\t\t\t.parseInt(vdicalc.DEFAULTS.getString(tf.getName().toString() + \".minimum\"))) {\n\t\t\t\t\tJOptionPane.showMessageDialog(mainframe, vdicalc.MESSAGES.getString(\"outofbounds.validation\"), null,\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\ttf.setText(vdicalc.DEFAULTS.getString(tf.getName() + \".minimum\"));\n\t\t\t\t\ttf.requestFocus();\n\t\t\t\t}\n\t\t\t\tif (Integer.parseInt(tf.getText()) > Integer\n\t\t\t\t\t\t.parseInt(vdicalc.DEFAULTS.getString(tf.getName() + \".maximum\"))) {\n\t\t\t\t\tJOptionPane.showMessageDialog(mainframe, vdicalc.MESSAGES.getString(\"outofbounds.validation\"), null,\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\ttf.setText(vdicalc.DEFAULTS.getString(tf.getName() + \".maximum\"));\n\t\t\t\t\ttf.requestFocus();\n\t\t\t\t}\n\n\t\t\t\t// Populate label that dislpays total amount of MHz used per VM\n\t\t\t\tvmvcpumhztotalsize.setText(getVmvcpumhztotal(vmvcpumhztxt.getText(),\n\t\t\t\t\t\tvmvcpucombo.getSelectedItem().toString(), vmvcpumhzoverheadcombo.getSelectedItem().toString()));\n\n\t\t\t}\n\n\t\t});\n\t\tvmvcpumhztxt.getDocument().addDocumentListener(new DocumentListener() {\n\n\t\t\t@Override\n\t\t\tpublic void changedUpdate(DocumentEvent e) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void insertUpdate(DocumentEvent e) {\n\t\t\t\t// Populate label that dislpays total amount of MHz used per VM\n\t\t\t\tvmvcpumhztotalsize.setText(getVmvcpumhztotal(vmvcpumhztxt.getText(),\n\t\t\t\t\t\tvmvcpucombo.getSelectedItem().toString(), vmvcpumhzoverheadcombo.getSelectedItem().toString()));\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void removeUpdate(DocumentEvent e) {\n\n\t\t\t}\n\n\t\t});\n\t\tvmvcpumhztxt.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// Populate label that dislpays total amount of MHz used per VM\n\t\t\t\tvmvcpumhztotalsize.setText(getVmvcpumhztotal(vmvcpumhztxt.getText(),\n\t\t\t\t\t\tvmvcpucombo.getSelectedItem().toString(), vmvcpumhzoverheadcombo.getSelectedItem().toString()));\n\n\t\t\t}\n\n\t\t});\n\n\t\t/*\n\t\t * Label for total amount of MHz used per VM\n\t\t */\n\t\tj.add(vmvcpumhztotalsize, \"pos 150 72\");\n\t\tvmvcpumhztotalsize.setFont(new Font(\"Serif\", Font.PLAIN, 12));\n\t\tvmvcpumhztotalsize.setForeground(Color.DARK_GRAY);\n\n\t\tj.add(vmvcpumhzoverheadlabel, \"pos 5 93\");\n\t\tj.add(vmvcpumhzoverheadcombo, \"pos 190 89, w 70!, \" + vdicalc.comboHeight);\n\t\tvmvcpumhzoverheadcombo.setSelectedIndex(0);\n\t\tvmvcpumhzoverheadcombo.setToolTipText(vdicalc.MESSAGES.getString(\"vmvcpumhzoverhead.tooltip\"));\n\t\tvmvcpumhzoverheadcombo.setName(\"vmvcpumhzoverheadcombo\");\n\t\tvmvcpumhzoverheadcombo.addFocusListener(this);\n\t\tvmvcpumhzoverheadcombo.addFocusListener(new FocusListener() {\n\n\t\t\t@Override\n\t\t\tpublic void focusGained(FocusEvent e) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void focusLost(FocusEvent e) {\n\n\t\t\t}\n\n\t\t});\n\t\tvmvcpumhzoverheadcombo.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// Populate label that dislpays total amount of MHz used per VM\n\t\t\t\tvmvcpumhztotalsize.setText(getVmvcpumhztotal(vmvcpumhztxt.getText(),\n\t\t\t\t\t\tvmvcpucombo.getSelectedItem().toString(), vmvcpumhzoverheadcombo.getSelectedItem().toString()));\n\n\t\t\t}\n\n\t\t});\n\n\t\tj.add(desktoppooltypecombolabel, \"pos 5 263\");\n\t\tif (functions.isMac() || functions.isLinux()) {\n\t\t\tj.add(desktoppooltypecombo, \"pos 190 261, wmax 92, \" + vdicalc.comboHeight);\n\t\t} else if (functions.isWindows()) {\n\t\t\tj.add(desktoppooltypecombo, \"pos 190 261, w 70!, \" + vdicalc.comboHeight);\n\t\t}\n\t\tdesktoppooltypecombo.setToolTipText(vdicalc.MESSAGES.getString(\"desktoppooltype.tooltip\"));\n\t\tdesktoppooltypecombo.setName(\"desktoppooltypecombo\");\n\t\tdesktoppooltypecombo.addItemListener(new ItemListener() {\n\t\t\t@Override\n\t\t\tpublic void itemStateChanged(final ItemEvent event) {\n\t\t\t\tfinal int state = event.getStateChange();\n\t\t\t\tif (state == ItemEvent.SELECTED) {\n\t\t\t\t\tif (event.getItem().toString().equalsIgnoreCase(\"linked\")) {\n\t\t\t\t\t\tvmpersistentdisksizetxt.setText(vdicalc.DEFAULTS.getString(\"vmpersistentdisksizetxt.default\"));\n\t\t\t\t\t\tvmpersistentdisksizetxt.setEnabled(true);\n\t\t\t\t\t\tvmpersistentIOtxt.setText(vdicalc.DEFAULTS.getString(\"vmpersistentIOtxt.default\"));\n\t\t\t\t\t\tvmpersistentIOtxt.setEnabled(true);\n\t\t\t\t\t\tvmpersistentreadIOtxt.setText(vdicalc.DEFAULTS.getString(\"vmpersistentreadIOtxt.default\"));\n\t\t\t\t\t\tvmpersistentreadIOtxt.setEnabled(true);\n\t\t\t\t\t\tvmdeltareadIOtxt.setText(vdicalc.DEFAULTS.getString(\"vmdeltareadIOtxt.default\"));\n\t\t\t\t\t\tvmdeltareadIOtxt.setEnabled(true);\n\t\t\t\t\t\tvmdeltaIOtxtlabel.setText(vdicalc.MESSAGES.getString(\"vmdeltaIOlinked.view\"));\n\t\t\t\t\t\tvmreplicasteadystateiotxt\n\t\t\t\t\t\t\t\t.setText(vdicalc.DEFAULTS.getString(\"vmreplicasteadystateiotxt.default\"));\n\t\t\t\t\t\tvmreplicasteadystateiotxt.setEnabled(true);\n\t\t\t\t\t\tvmdisposabledisksizetxt.setText(vdicalc.DEFAULTS.getString(\"vmdisposabledisksizetxt.default\"));\n\t\t\t\t\t\tvmdisposabledisksizetxt.setEnabled(true);\n\t\t\t\t\t\tvmrefreshratecombo.setEnabled(true);\n\t\t\t\t\t\tvmthinsizeparentvmtxt.setText(vdicalc.DEFAULTS.getString(\"vmthinsizeparentvmtxt.default\"));\n\t\t\t\t\t\tvmthinsizeparentvmtxt.setEnabled(true);\n\t\t\t\t\t\tpoolsnapshotcountcombo.setSelectedIndex(1);\n\t\t\t\t\t\tpoolsnapshotcountcombo.setEnabled(true);\n\n\t\t\t\t\t} else if (event.getItem().toString().equalsIgnoreCase(\"full\")) {\n\t\t\t\t\t\tvmpersistentdisksizetxt.setText(vdicalc.DEFAULTS.getString(\"vmpersistentdisksizetxt.default\"));\n\t\t\t\t\t\tvmpersistentdisksizetxt.setEnabled(false);\n\t\t\t\t\t\tvmpersistentIOtxt.setText(vdicalc.DEFAULTS.getString(\"vmpersistentIOtxt.default\"));\n\t\t\t\t\t\tvmpersistentIOtxt.setEnabled(false);\n\t\t\t\t\t\tvmpersistentreadIOtxt.setText(vdicalc.DEFAULTS.getString(\"vmpersistentreadIOtxt.default\"));\n\t\t\t\t\t\tvmpersistentreadIOtxt.setEnabled(false);\n\t\t\t\t\t\tvmdeltareadIOtxt.setText(vdicalc.DEFAULTS.getString(\"vmdeltareadIOtxt.default\"));\n\t\t\t\t\t\tvmdeltareadIOtxt.setEnabled(false);\n\t\t\t\t\t\tvmdeltaIOtxtlabel.setText(vdicalc.MESSAGES.getString(\"vmdeltaIOfull.view\"));\n\t\t\t\t\t\tvmreplicasteadystateiotxt\n\t\t\t\t\t\t\t\t.setText(vdicalc.DEFAULTS.getString(\"vmreplicasteadystateiotxt.default\"));\n\t\t\t\t\t\tvmreplicasteadystateiotxt.setEnabled(false);\n\t\t\t\t\t\tvmdisposabledisksizetxt.setText(vdicalc.DEFAULTS.getString(\"vmdisposabledisksizetxt.default\"));\n\t\t\t\t\t\tvmdisposabledisksizetxt.setEnabled(false);\n\t\t\t\t\t\tvmrefreshratecombo.setEnabled(false);\n\t\t\t\t\t\tvmthinsizeparentvmtxt.setText(vdicalc.DEFAULTS.getString(\"vmthinsizeparentvmtxt.default\"));\n\t\t\t\t\t\tvmthinsizeparentvmtxt.setEnabled(false);\n\t\t\t\t\t\tpoolsnapshotcountcombo.setSelectedIndex(1);\n\t\t\t\t\t\tpoolsnapshotcountcombo.setEnabled(false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t});\n\n\t\tj.add(vmdisposabledisksizetxtlabel, \"pos 5 142\");\n\t\tj.add(vmdisposabledisksizetxt, \"pos 190 140, w 70!, \" + vdicalc.TextfieldHeight);\n\t\tvmdisposabledisksizetxt.setToolTipText(vdicalc.MESSAGES.getString(\"vmdisposabledisksize.tooltip\"));\n\t\tvmdisposabledisksizetxt.setName(\"vmdisposabledisksizetxt\");\n\t\tvmdisposabledisksizetxt.addFocusListener(this);\n\t\tvmdisposabledisksizetxt.addFocusListener(new FocusListener() {\n\t\t\t@Override\n\t\t\tpublic void focusGained(final FocusEvent e) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void focusLost(final FocusEvent e) {\n\t\t\t\tfinal JTextField tf = (JTextField) e.getSource();\n\n\t\t\t\tif (Integer.parseInt(tf.getText()) < Integer\n\t\t\t\t\t\t.parseInt(vdicalc.DEFAULTS.getString(tf.getName().toString() + \".minimum\"))) {\n\t\t\t\t\tJOptionPane.showMessageDialog(mainframe, vdicalc.MESSAGES.getString(\"outofbounds.validation\"), null,\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\ttf.setText(vdicalc.DEFAULTS.getString(tf.getName() + \".minimum\"));\n\t\t\t\t\ttf.requestFocus();\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\n\t\tj.add(vmcounttxtlabel, \"pos 5 166\");\n\t\tj.add(vmcounttxt, \"pos 190 164, w 70!, \" + vdicalc.TextfieldHeight);\n\t\tvmcounttxt.setName(\"vmcounttxt\");\n\t\tvmcounttxt.setToolTipText(vdicalc.MESSAGES.getString(\"vmcount.tooltip\"));\n\t\tvmcounttxt.addFocusListener(this);\n\t\tvmcounttxt.addFocusListener(new FocusListener() {\n\t\t\t@Override\n\t\t\tpublic void focusGained(final FocusEvent e) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void focusLost(final FocusEvent e) {\n\t\t\t\tfinal JTextField tf = (JTextField) e.getSource();\n\n\t\t\t\tif (Integer.parseInt(tf.getText()) < Integer\n\t\t\t\t\t\t.parseInt(vdicalc.DEFAULTS.getString(tf.getName().toString() + \".minimum\"))) {\n\t\t\t\t\tJOptionPane.showMessageDialog(mainframe,\n\t\t\t\t\t\t\tvdicalc.MESSAGES.getString(\"positivenumbersonly.validation\"), null,\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\ttf.setText(vdicalc.DEFAULTS.getString(tf.getName() + \".default\"));\n\t\t\t\t\ttf.requestFocus();\n\t\t\t\t}\n\t\t\t\tif (Integer.parseInt(tf.getText()) > Integer\n\t\t\t\t\t\t.parseInt(vdicalc.DEFAULTS.getString(tf.getName().toString() + \".maximum\"))) {\n\t\t\t\t\tJOptionPane.showMessageDialog(mainframe, vdicalc.MESSAGES.getString(\"outofbounds.validation\"), null,\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\ttf.setText(vdicalc.DEFAULTS.getString(tf.getName() + \".maximum\"));\n\t\t\t\t\ttf.requestFocus();\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\n\t\tj.add(vmconcurrenttxtlabel, \"pos 5 190\");\n\t\tj.add(vmconcurrenttxt, \"pos 190 188, w 70!, \" + vdicalc.TextfieldHeight);\n\t\tvmconcurrenttxt.setName(\"vmconcurrenttxt\");\n\t\tvmconcurrenttxt.setToolTipText(vdicalc.MESSAGES.getString(\"vmconcurrent.tooltip\"));\n\t\tvmconcurrenttxt.addFocusListener(this);\n\t\tvmconcurrenttxt.addFocusListener(new FocusListener() {\n\t\t\t@Override\n\t\t\tpublic void focusGained(final FocusEvent e) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void focusLost(final FocusEvent e) {\n\t\t\t\tfinal JTextField tf = (JTextField) e.getSource();\n\n\t\t\t\tif (Integer.parseInt(tf.getText()) > (Integer.parseInt(vmcounttxt.getText()))) {\n\t\t\t\t\tJOptionPane.showMessageDialog(mainframe, vdicalc.MESSAGES.getString(\"invalid.validation\"), null,\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\ttf.setText(vmcounttxt.getText());\n\t\t\t\t\ttf.requestFocus();\n\t\t\t\t}\n\n\t\t\t\tif (Integer.parseInt(tf.getText()) < Integer\n\t\t\t\t\t\t.parseInt(vdicalc.DEFAULTS.getString(tf.getName().toString() + \".minimum\"))) {\n\t\t\t\t\tJOptionPane.showMessageDialog(mainframe,\n\t\t\t\t\t\t\tvdicalc.MESSAGES.getString(\"positivenumbersonly.validation\"), null,\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\ttf.setText(vdicalc.DEFAULTS.getString(tf.getName() + \".default\"));\n\t\t\t\t\ttf.requestFocus();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tj.add(vmreplicasteadystateiotxtlabel, \"pos 5 215\");\n\t\tj.add(vmreplicasteadystateiotxt, \"pos 190 212, w 70!, \" + vdicalc.TextfieldHeight);\n\t\tvmreplicasteadystateiotxt.setToolTipText(vdicalc.MESSAGES.getString(\"vmreplicasteadystateio.tooltip\"));\n\t\tvmreplicasteadystateiotxt.setName(\"vmreplicasteadystateiotxt\");\n\t\tvmreplicasteadystateiotxt.addFocusListener(this);\n\t\tvmreplicasteadystateiotxt.addFocusListener(new FocusListener() {\n\t\t\t@Override\n\t\t\tpublic void focusGained(final FocusEvent e) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void focusLost(final FocusEvent e) {\n\t\t\t\tfinal JTextField tf = (JTextField) e.getSource();\n\n\t\t\t\tif (Integer.parseInt(tf.getText()) < Integer\n\t\t\t\t\t\t.parseInt(vdicalc.DEFAULTS.getString(tf.getName().toString() + \".minimum\"))) {\n\t\t\t\t\tJOptionPane.showMessageDialog(getRootPane(), vdicalc.MESSAGES.getString(\"outofbounds.validation\"),\n\t\t\t\t\t\t\tnull, JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\ttf.setText(vdicalc.DEFAULTS.getString(tf.getName() + \".minimum\"));\n\t\t\t\t\ttf.requestFocus();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tj.add(vmbootIOtxtlabel, \"pos 5 239\");\n\t\tj.add(vmbootIOtxt, \"pos 190 236, w 70!, \" + vdicalc.TextfieldHeight);\n\t\tvmbootIOtxt.setToolTipText(vdicalc.MESSAGES.getString(\"vmbootIO.tooltip\"));\n\t\tvmbootIOtxt.setName(\"vmbootIOtxt\");\n\t\tvmbootIOtxt.addFocusListener(this);\n\t\tvmbootIOtxt.addFocusListener(new FocusListener() {\n\t\t\t@Override\n\t\t\tpublic void focusGained(final FocusEvent e) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void focusLost(final FocusEvent e) {\n\t\t\t\tfinal JTextField tf = (JTextField) e.getSource();\n\n\t\t\t\tif (Integer.parseInt(tf.getText()) < Integer\n\t\t\t\t\t\t.parseInt(vdicalc.DEFAULTS.getString(tf.getName().toString() + \".minimum\"))) {\n\t\t\t\t\tJOptionPane.showMessageDialog(mainframe,\n\t\t\t\t\t\t\tvdicalc.MESSAGES.getString(\"positivenumbersonly.validation\"), null,\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\ttf.setText(vdicalc.DEFAULTS.getString(tf.getName() + \".minimum\"));\n\t\t\t\t\ttf.requestFocus();\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\n\t\t/*\n\t\t * Label and combo for number of VMs per core\n\t\t */\n\t\tj.add(vmcorelabel, \"pos 5 118\");\n\t\tj.add(vmcorecombo, \"pos 190 116, w 70!, \" + vdicalc.TextfieldHeight);\n\t\tvmcorecombo.setName(\"vmcorecombo\");\n\t\tvmcorecombo.setSelectedIndex(4);\n\t\tvmcorecombo.addActionListener(this);\n\t\tvmcorecombo.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}\n\n\t\t});\n\n\t\t/*\n\t\t * Assign components to Column 1\n\t\t */\n\t\tj.add(vmmemorysizelabel, \"pos 285 45\");\n\t\tj.add(vmmemorysizetxt, \"pos 465 42, w 70!, \" + vdicalc.TextfieldHeight);\n\t\tvmmemorysizetxt.setToolTipText(vdicalc.MESSAGES.getString(\"vmmemorysize.tooltip\"));\n\t\tvmmemorysizetxt.setName(\"vmmemorysizetxt\");\n\t\tvmmemorysizetxt.addFocusListener(new FocusListener() {\n\t\t\t@Override\n\t\t\tpublic void focusGained(final FocusEvent e) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void focusLost(final FocusEvent e) {\n\t\t\t\tfinal JTextField tf = (JTextField) e.getSource();\n\t\t\t\tif (Integer.parseInt(tf.getText()) < Integer\n\t\t\t\t\t\t.parseInt(vdicalc.DEFAULTS.getString(tf.getName().toString() + \".minimum\"))) {\n\t\t\t\t\tJOptionPane.showMessageDialog(mainframe, vdicalc.MESSAGES.getString(\"outofbounds.validation\"), null,\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\ttf.setText(vdicalc.DEFAULTS.getString(tf.getName() + \".minimum\"));\n\t\t\t\t\ttf.requestFocus();\n\t\t\t\t}\n\t\t\t\tif (Integer.parseInt(tf.getText()) > Integer\n\t\t\t\t\t\t.parseInt(vdicalc.DEFAULTS.getString(tf.getName().toString() + \".maximum\"))) {\n\t\t\t\t\tJOptionPane.showMessageDialog(mainframe, vdicalc.MESSAGES.getString(\"outofbounds.validation\"), null,\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\ttf.setText(vdicalc.DEFAULTS.getString(tf.getName() + \".maximum\"));\n\t\t\t\t\ttf.requestFocus();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tj.add(vmmemoryreservationlabel, \"pos 285 68\");\n\t\tif (functions.isMac() || functions.isLinux()) {\n\t\t\tj.add(vmmemoryreservationcombo, \"pos 465 65, w 70!, \" + vdicalc.comboHeight);\n\t\t} else if (functions.isWindows()) {\n\t\t\tj.add(vmmemoryreservationcombo, \"pos 465 65, w 70!, \" + vdicalc.comboHeight);\n\t\t}\n\t\tvmmemoryreservationcombo.setToolTipText(vdicalc.MESSAGES.getString(\"vmmemoryreservation.tooltip\"));\n\t\tvmmemoryreservationcombo.setName(\"vmmemoryreservationcombo\");\n\t\tj.add(vmpowerstatecombolabel, \"pos 285 93\");\n\t\tif (functions.isMac() || functions.isLinux()) {\n\t\t\tj.add(vmpowerstatecombo, \"pos 465 90, w 103!, \" + vdicalc.comboHeight);\n\t\t} else if (functions.isWindows()) {\n\t\t\tj.add(vmpowerstatecombo, \"pos 465 90, w 70!, \" + vdicalc.comboHeight);\n\t\t}\n\t\tvmpowerstatecombo.setToolTipText(vdicalc.MESSAGES.getString(\"vmpowerstate.tooltip\"));\n\t\tvmpowerstatecombo.setName(\"vmpowerstatecombo\");\n\t\tj.add(vmrefreshratecombolabel, \"pos 285 118\");\n\t\tj.add(vmrefreshratecombo, \"pos 465 114, w 70!, \" + vdicalc.comboHeight);\n\n\t\tvmrefreshratecombo.setSelectedIndex(9);\n\t\tvmrefreshratecombo.setToolTipText(vdicalc.MESSAGES.getString(\"vmrefreshrate.tooltip\"));\n\t\tvmrefreshratecombo.setName(\"vmrefreshratecombo\");\n\t\t// Calculate delta size for displaying in the UI\n\t\tvmrefreshratecombo.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(final ActionEvent e) {\n\n\t\t\t\tfinal Integer i = (Integer.parseInt(vmfullsizeparentvmtxt.getText())\n\t\t\t\t\t\t* Integer.parseInt(vmrefreshratecombo.getSelectedItem().toString())) / 100;\n\t\t\t\tvmrefreshratesize.setText(i.toString());\n\n\t\t\t}\n\n\t\t});\n\n\t\tj.add(vmrefreshratesize, \"pos 425 122\");\n\t\tvmrefreshratesize.setFont(new Font(\"Serif\", Font.PLAIN, 12));\n\t\tvmrefreshratesize.setForeground(Color.DARK_GRAY);\n\t\t// Simulate a action event\n\t\tvmrefreshratecombo.setSelectedIndex(9);\n\t\tfinal ActionEvent ae = new ActionEvent(vmrefreshratecombo, ActionEvent.ACTION_PERFORMED, \"\");\n\t\tvmrefreshratecombo.dispatchEvent(ae);\n\n\t\tj.add(poolsnapshotcountcombolabel, \"pos 285 142\");\n\t\tj.add(poolsnapshotcountcombo, \"pos 465 138, w 70!, \" + vdicalc.comboHeight);\n\t\tpoolsnapshotcountcombo.setSelectedIndex(1);\n\t\tpoolsnapshotcountcombo.setToolTipText(vdicalc.MESSAGES.getString(\"poolsnapshotcount.tooltip\"));\n\t\tpoolsnapshotcountcombo.setName(\"poolsnapshotcountcombo\");\n\t\tj.add(vmparentcounttxtlabel, \"pos 285 166\");\n\t\tj.add(vmparentcounttxt, \"pos 465 163, w 70!, \" + vdicalc.TextfieldHeight);\n\t\tvmparentcounttxt.addFocusListener(this);\n\t\tvmparentcounttxt.setToolTipText(vdicalc.MESSAGES.getString(\"vmparentcount.tooltip\"));\n\t\tvmparentcounttxt.setName(\"vmparentcounttxt\");\n\t\tvmparentcounttxt.addFocusListener(new FocusListener() {\n\t\t\t@Override\n\t\t\tpublic void focusGained(final FocusEvent e) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void focusLost(final FocusEvent e) {\n\t\t\t\tfinal JTextField tf = (JTextField) e.getSource();\n\n\t\t\t\tif (Integer.parseInt(tf.getText()) > Integer.parseInt(desktoppoolcounttxt.getText())) {\n\t\t\t\t\tJOptionPane.showMessageDialog(mainframe,\n\t\t\t\t\t\t\tvdicalc.MESSAGES.getString(\"mustbelowerthannumberdesktoppools.validation\"), null,\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\ttf.setText(desktoppoolcounttxt.getText());\n\t\t\t\t\ttf.requestFocus();\n\t\t\t\t}\n\n\t\t\t\tif (Integer.parseInt(tf.getText()) < Integer\n\t\t\t\t\t\t.parseInt(vdicalc.DEFAULTS.getString(tf.getName().toString() + \".minimum\"))) {\n\t\t\t\t\tJOptionPane.showMessageDialog(mainframe, vdicalc.MESSAGES.getString(\"outofbounds.validation\"), null,\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\ttf.setText(vdicalc.DEFAULTS.getString(tf.getName() + \".minimum\"));\n\t\t\t\t\ttf.requestFocus();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tj.add(desktoppoolcounttxtlabel, \"pos 285 190\");\n\t\tif (functions.isMac() || functions.isLinux()) {\n\t\t\tj.add(desktoppoolcounttxt, \"pos 465 187, w 70!, \" + vdicalc.TextfieldHeight);\n\t\t} else if (functions.isWindows()) {\n\t\t\tj.add(desktoppoolcounttxt, \"pos 465 187, w 70!, \" + vdicalc.TextfieldHeight);\n\t\t}\n\t\tdesktoppoolcounttxt.addFocusListener(this);\n\t\tdesktoppoolcounttxt.setToolTipText(vdicalc.MESSAGES.getString(\"desktoppoolcount.tooltip\"));\n\t\tdesktoppoolcounttxt.setName(\"desktoppoolcounttxt\");\n\t\tdesktoppoolcounttxt.addFocusListener(new FocusListener() {\n\t\t\t@Override\n\t\t\tpublic void focusGained(final FocusEvent e) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void focusLost(final FocusEvent e) {\n\t\t\t\tfinal JTextField tf = (JTextField) e.getSource();\n\t\t\t\tif (Integer.parseInt(tf.getText()) > Integer.parseInt(vmcounttxt.getText())) {\n\t\t\t\t\tJOptionPane.showMessageDialog(mainframe,\n\t\t\t\t\t\t\tvdicalc.MESSAGES.getString(\"mustbelowerthannumberdesktops.validation\"), null,\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\ttf.requestFocus();\n\t\t\t\t}\n\t\t\t\tif (Integer.parseInt(tf.getText()) < Integer\n\t\t\t\t\t\t.parseInt(vdicalc.DEFAULTS.getString(tf.getName().toString() + \".minimum\"))) {\n\t\t\t\t\tJOptionPane.showMessageDialog(mainframe,\n\t\t\t\t\t\t\tvdicalc.MESSAGES.getString(\"positivenumbersonly.validation\"), null,\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\ttf.setText(vdicalc.DEFAULTS.getString(tf.getName() + \".default\"));\n\t\t\t\t\ttf.requestFocus();\n\t\t\t\t}\n\t\t\t\tif ((Integer.parseInt(vmcounttxt.getText()) / Integer.parseInt(tf.getText())) > Integer\n\t\t\t\t\t\t.parseInt(vdicalc.DEFAULTS.getString(\"desktoppoollimittxt.maximum\"))) {\n\t\t\t\t\tJOptionPane.showMessageDialog(mainframe, vdicalc.MESSAGES.getString(\"outofbounds.validation\"), null,\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\tfinal Integer i = (Integer.parseInt(vmcounttxt.getText())\n\t\t\t\t\t\t\t/ Integer.parseInt(vdicalc.DEFAULTS.getString(\"desktoppoollimittxt.maximum\")) + 1);\n\t\t\t\t\ttf.setText(i.toString());\n\t\t\t\t\ttf.requestFocus();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tj.add(vmdeltaIOtxtlabel, \"pos 285 215\");\n\t\tj.add(vmdeltaIOtxt, \"pos 465 212, w 70!, \" + vdicalc.TextfieldHeight);\n\t\tvmdeltaIOtxt.addFocusListener(this);\n\t\tvmdeltaIOtxt.setToolTipText(vdicalc.MESSAGES.getString(\"vmdeltaIO.tooltip\"));\n\t\tvmdeltaIOtxt.setName(\"vmdeltaIOtxt\");\n\t\tj.add(vmdeltareadIOtxtlabel, \"pos 285 239\");\n\t\tj.add(vmdeltareadIOtxt, \"pos 465 236, w 70!, \" + vdicalc.TextfieldHeight);\n\t\tvmdeltareadIOtxt.setToolTipText(vdicalc.MESSAGES.getString(\"vmdeltareadIO.tooltip\"));\n\t\tvmdeltareadIOtxt.setName(\"vmdeltareadIOtxt\");\n\t\tvmdeltareadIOtxt.addFocusListener(new FocusListener() {\n\t\t\t@Override\n\t\t\tpublic void focusGained(final FocusEvent e) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void focusLost(final FocusEvent e) {\n\t\t\t\tfinal JTextField tf = (JTextField) e.getSource();\n\n\t\t\t\tif (Integer.parseInt(tf.getText()) < 1 || Integer.parseInt(tf.getText()) > 100) {\n\t\t\t\t\tJOptionPane.showMessageDialog(mainframe, vdicalc.MESSAGES.getString(\"outofbounds.validation\"), null,\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\ttf.setText(vdicalc.DEFAULTS.getString(tf.getName() + \".default\"));\n\t\t\t\t\ttf.requestFocus();\n\t\t\t\t} else {\n\t\t\t\t\tfinal int i = 100 - Integer.parseInt(vmdeltareadIOtxt.getText().toString());\n\t\t\t\t\tvmdeltawriteIOtxtlabel.setText(String.valueOf(i));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tj.add(vmdeltawriteIOtxtlabellabel, \"pos 285 263\");\n\t\tj.add(vmdeltawriteIOtxtlabel, \"pos 467 261\");\n\t\tvmdeltawriteIOtxtlabel.setName(\"vmdeltawriteIOtxtlabel\");\n\n\t\t/*\n\t\t * Assign components to Column 2\n\t\t */\n\t\tj.add(vmdisplaynumbercombolabel, \"pos 570 45\");\n\t\tj.add(vmdisplaynumbercombo, \"pos 750 42, w 70!, \" + vdicalc.comboHeight);\n\t\tvmdisplaynumbercombo.setToolTipText(vdicalc.MESSAGES.getString(\"vmdisplaynumber.tooltip\"));\n\t\tvmdisplaynumbercombo.setName(\"vmdisplaynumbercombo\");\n\t\tj.add(vmdisplayresolutioncombolabel, \"pos 570 68\");\n\t\tif (functions.isMac() || functions.isLinux()) {\n\t\t\tj.add(vmdisplayresolutioncombo, \"pos 750 66, wmax 122, \" + vdicalc.comboHeight);\n\t\t} else if (functions.isWindows()) {\n\t\t\tj.add(vmdisplayresolutioncombo, \"pos 750 66, wmax 90, \" + vdicalc.comboHeight);\n\t\t}\n\t\tvmdisplayresolutioncombo.setSelectedIndex(1);\n\t\tvmdisplayresolutioncombo.setToolTipText(vdicalc.MESSAGES.getString(\"vmdisplayresolution.tooltip\"));\n\t\tvmdisplayresolutioncombo.setName(\"vmdisplayresolutioncombo\");\n\t\tj.add(vmvramlabel, \"pos 570 93\");\n\t\tif (functions.isMac() || functions.isLinux()) {\n\t\t\tj.add(vmvramcombo, \"pos 750 90, w 74!, \" + vdicalc.comboHeight);\n\t\t} else if (functions.isWindows()) {\n\t\t\tj.add(vmvramcombo, \"pos 750 90, w 70!, \" + vdicalc.comboHeight);\n\t\t}\n\t\tvmvramcombo.setSelectedIndex(0);\n\t\tvmvramcombo.setToolTipText(vdicalc.MESSAGES.getString(\"vmvram.tooltip\"));\n\t\tvmvramcombo.setName(\"vmvramcombo\");\n\t\tj.add(vmthinsizeparentvmtxtlabel, \"pos 570 118\");\n\t\tj.add(vmthinsizeparentvmtxt, \"pos 750 115, w 70!, \" + vdicalc.TextfieldHeight);\n\t\tvmthinsizeparentvmtxt.setToolTipText(vdicalc.MESSAGES.getString(\"vmthinsizeparentvm.tooltip\"));\n\t\tvmthinsizeparentvmtxt.setName(\"vmthinsizeparentvmtxt\");\n\t\tvmthinsizeparentvmtxt.addFocusListener(this);\n\t\tvmthinsizeparentvmtxt.addFocusListener(new FocusListener() {\n\t\t\t@Override\n\t\t\tpublic void focusGained(final FocusEvent e) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void focusLost(final FocusEvent e) {\n\t\t\t\tfinal JTextField tf = (JTextField) e.getSource();\n\n\t\t\t\tif (Integer.parseInt(tf.getText()) > Integer.parseInt(vmfullsizeparentvmtxt.getText())) {\n\t\t\t\t\tJOptionPane.showMessageDialog(mainframe, vdicalc.MESSAGES.getString(\"outofbounds.validation\"), null,\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\ttf.setText(vmfullsizeparentvmtxt.getText());\n\t\t\t\t\ttf.requestFocus();\n\t\t\t\t}\n\t\t\t\tif (Integer.parseInt(tf.getText()) < Integer\n\t\t\t\t\t\t.parseInt(vdicalc.DEFAULTS.getString(tf.getName().toString() + \".minimum\"))) {\n\t\t\t\t\tJOptionPane.showMessageDialog(mainframe, vdicalc.MESSAGES.getString(\"outofbounds.validation\"), null,\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\ttf.setText(vdicalc.DEFAULTS.getString(tf.getName() + \".minimum\"));\n\t\t\t\t\ttf.requestFocus();\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\n\t\tj.add(vmpersistentdisksizetxtlabel, \"pos 570 142\");\n\t\tj.add(vmpersistentdisksizetxt, \"pos 750 139, w 70!, \" + vdicalc.TextfieldHeight);\n\t\tvmpersistentdisksizetxt.setToolTipText(vdicalc.MESSAGES.getString(\"vmpersistentdisksize.tooltip\"));\n\t\tvmpersistentdisksizetxt.setName(\"vmpersistentdisksizetxt\");\n\t\tvmpersistentdisksizetxt.addFocusListener(this);\n\t\tvmpersistentdisksizetxt.addFocusListener(new FocusListener() {\n\t\t\t@Override\n\t\t\tpublic void focusGained(final FocusEvent e) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void focusLost(final FocusEvent e) {\n\t\t\t\tfinal JTextField tf = (JTextField) e.getSource();\n\n\t\t\t\tif (Integer.parseInt(tf.getText()) < Integer\n\t\t\t\t\t\t.parseInt(vdicalc.DEFAULTS.getString(tf.getName() + \".minimum\"))) {\n\t\t\t\t\tJOptionPane.showMessageDialog(mainframe, vdicalc.MESSAGES.getString(\"outofbounds.validation\"), null,\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\ttf.setText(vdicalc.DEFAULTS.getString(tf.getName() + \".minimum\"));\n\t\t\t\t\ttf.requestFocus();\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\n\t\tj.add(vmfullsizeparentvmtxtlabel, \"pos 570 166\");\n\t\tj.add(vmfullsizeparentvmtxt, \"pos 750 163, w 70!, \" + vdicalc.TextfieldHeight);\n\t\tvmfullsizeparentvmtxt.addFocusListener(this);\n\t\tvmfullsizeparentvmtxt.setToolTipText(vdicalc.MESSAGES.getString(\"vmfullsizeparentvm.tooltip\"));\n\t\tvmfullsizeparentvmtxt.setName(\"vmfullsizeparentvmtxt\");\n\t\tvmfullsizeparentvmtxt.addFocusListener(new FocusListener() {\n\t\t\t@Override\n\t\t\tpublic void focusGained(final FocusEvent e) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void focusLost(final FocusEvent e) {\n\t\t\t\tfinal JTextField tf = (JTextField) e.getSource();\n\n\t\t\t\tif (Integer.parseInt(tf.getText()) < Integer\n\t\t\t\t\t\t.parseInt(vdicalc.DEFAULTS.getString(tf.getName().toString() + \".minimum\"))) {\n\t\t\t\t\tJOptionPane.showMessageDialog(mainframe, vdicalc.MESSAGES.getString(\"outofbounds.validation\"), null,\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\ttf.setText(vdicalc.DEFAULTS.getString(tf.getName() + \".minimum\"));\n\t\t\t\t\ttf.requestFocus();\n\t\t\t\t}\n\n\t\t\t\tif (Integer.parseInt(tf.getText()) > Integer\n\t\t\t\t\t\t.parseInt(vdicalc.DEFAULTS.getString(tf.getName().toString() + \".maximum\"))) {\n\t\t\t\t\tJOptionPane.showMessageDialog(mainframe, vdicalc.MESSAGES.getString(\"outofbounds.validation\"), null,\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\ttf.setText(vdicalc.DEFAULTS.getString(tf.getName() + \".maximum\"));\n\t\t\t\t\ttf.requestFocus();\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\n\t\tj.add(vmpersistentIOtxtlabel, \"pos 570 190\");\n\t\tj.add(vmpersistentIOtxt, \"pos 750 187, w 70!, \" + vdicalc.TextfieldHeight);\n\t\tvmpersistentIOtxt.setToolTipText(vdicalc.MESSAGES.getString(\"vmpersistentIO.tooltip\"));\n\t\tvmpersistentIOtxt.setName(\"vmpersistentIOtxt\");\n\t\tvmpersistentIOtxt.addFocusListener(new FocusListener() {\n\t\t\t@Override\n\t\t\tpublic void focusGained(final FocusEvent e) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void focusLost(final FocusEvent e) {\n\t\t\t\tfinal JTextField tf = (JTextField) e.getSource();\n\t\t\t\tif (Integer.parseInt(tf.getText()) < Integer\n\t\t\t\t\t\t.parseInt(vdicalc.DEFAULTS.getString(tf.getName().toString() + \".minimum\"))) {\n\t\t\t\t\tJOptionPane.showMessageDialog(mainframe, vdicalc.MESSAGES.getString(\"outofbounds.validation\"), null,\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\ttf.setText(vdicalc.DEFAULTS.getString(tf.getName() + \".minimum\"));\n\t\t\t\t\ttf.requestFocus();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tj.add(vmpersistentreadIOtxtlabel, \"pos 570 215\");\n\t\tj.add(vmpersistentreadIOtxt, \"pos 750 212, w 70!, \" + vdicalc.TextfieldHeight);\n\t\tvmpersistentreadIOtxt.setToolTipText(vdicalc.MESSAGES.getString(\"vmpersistentreadIO.tooltip\"));\n\t\tvmpersistentreadIOtxt.setName(\"vmpersistentreadIOtxt\");\n\t\tvmpersistentreadIOtxt.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(final ActionEvent e) {\n\n\t\t\t\tfinal int i = 100 - Integer.parseInt(vmpersistentreadIOtxt.getText().toString());\n\t\t\t\tvmpersistentwriteIOlabel.setText(String.valueOf(i));\n\n\t\t\t}\n\t\t});\n\t\tvmpersistentreadIOtxt.addFocusListener(new FocusListener() {\n\t\t\t@Override\n\t\t\tpublic void focusGained(final FocusEvent e) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void focusLost(final FocusEvent e) {\n\n\t\t\t\tfinal JTextField tf = (JTextField) e.getSource();\n\n\t\t\t\tif (Integer.parseInt(tf.getText()) < 1 || Integer.parseInt(tf.getText()) > 100) {\n\t\t\t\t\tJOptionPane.showMessageDialog(mainframe, vdicalc.MESSAGES.getString(\"outofbounds.validation\"), null,\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\ttf.setText(vdicalc.DEFAULTS.getString(tf.getName() + \".default\"));\n\t\t\t\t\ttf.requestFocus();\n\t\t\t\t} else {\n\t\t\t\t\tfinal int i = 100 - Integer.parseInt(vmpersistentreadIOtxt.getText().toString());\n\t\t\t\t\tvmpersistentwriteIOlabel.setText(String.valueOf(i));\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\n\t\tj.add(vmpersistentwriteIOlabellabel, \"pos 570 239\");\n\t\tj.add(vmpersistentwriteIOlabel, \"pos 750 236\");\n\t\tvmpersistentwriteIOlabel.setName(\"vmpersistentwriteIOlabel\");\n\n\t\t// Populate label that dislpays total amount of MHz used per VM\n\t\tvmvcpumhztotalsize.setText(getVmvcpumhztotal(vmvcpumhztxt.getText(), vmvcpucombo.getSelectedItem().toString(),\n\t\t\t\tvmvcpumhzoverheadcombo.getSelectedItem().toString()));\n\n\t\treturn j;\n\t}", "private Widget buildElementWithVSACValueSetWidget() {\r\n mainPanel = new VerticalPanel();\r\n mainPanel.getElement().setId(\"mainPanel_VerticalPanel\");\r\n mainPanel.setWidth(\"95%\");\r\n mainPanel.add(new SpacerWidget());\r\n mainPanel.add(new SpacerWidget());\r\n return mainPanel;\r\n }", "public static Gel_BioInf_Models.VirtualPanel.Builder newBuilder() {\n return new Gel_BioInf_Models.VirtualPanel.Builder();\n }", "public ValmarFrame(){\n\t\tsetTitle(\"Valmar\");\n\t setSize(500, 450);\n\t addWindowListener (new Closer());\n\t setVisible(true);\n\t setResizable(false);\n\t //add the game panel\n\t Dimension dim = getSize();\n\t Insets in=getInsets();\n\t setSize(dim.width+in.right+in.left, dim.height+in.top+in.bottom);\n\t Panel pan=new ValmarPanel(createImage(dim.width, dim.height),null);\n\t pan.setBounds(in.left, in.top, dim.width, dim.height);\n\t add(pan);\n\t}", "@AutoGenerated\r\n\tprivate Panel buildVideoPanel() {\n\t\tvideoPanel = new Panel();\r\n\t\tvideoPanel.setWidth(\"100.0%\");\r\n\t\tvideoPanel.setHeight(\"100.0%\");\r\n\t\tvideoPanel.setImmediate(false);\r\n\t\t\r\n\t\t// verticalLayout_3\r\n\t\tverticalLayout_3 = buildVerticalLayout_3();\r\n\t\tvideoPanel.setContent(verticalLayout_3);\r\n\t\t\r\n\t\treturn videoPanel;\r\n\t}", "public VixHedgePanel() {\n initComponents();\n \n JPanel p1 = new VerticalPanel();\n p1.add(\"Strike Pirce\", m_strikePrice);\n \n this.add(p1, BorderLayout.NORTH);\n \n }", "public PanelVentas() {\n initComponents();\n \n this.scpContenedor.getVerticalScrollBar().setUnitIncrement(Recursos.scpDesplazamiento);\n this.scpContenedor.getHorizontalScrollBar().setUnitIncrement(Recursos.scpDesplazamiento);\n \n }", "private void createNewVisualPane(int solverId) {\n }", "private JPanel getJPGraficoViolacao()\n\t{\n\t\tif ( jPGraficoViolacao == null )\n\t\t{\n\t\t\tjPGraficoViolacao = new JPanel();\n\t\t\tjPGraficoViolacao.setLayout(null);\n\t\t\tjPGraficoViolacao.setBounds(new Rectangle(530, 210, 465, 400));\n\t\t}\n\t\treturn jPGraficoViolacao;\n\t}", "public static Gel_BioInf_Models.VirtualPanel.Builder newBuilder(Gel_BioInf_Models.VirtualPanel other) {\n return new Gel_BioInf_Models.VirtualPanel.Builder(other);\n }", "protected void createMainPanel() {\n\t\tthis.mainPanel = new VerticalPanel(); \n\t\tthis.mainPanel.setSpacing(5);\n\t\tthis.mainPanel.setScrollMode(getScrollMode());\n\t}", "public vistaPanelPelicula() {\r\n initComponents();\r\n }", "public VPacientes() {\n initComponents();\n inicializar();\n }", "public Parent creatPanel() {\r\n\t\t\r\n\t\thlavniPanel = new BorderPane();\r\n\t\thlavniPanel.setCenter(creatGameDesk());\r\n\t\thlavniPanel.setTop(createMenuBar());\r\n\t\t\r\n\t\thlavniPanel.setBackground(new Background(new BackgroundFill(Color.BURLYWOOD, CornerRadii.EMPTY, Insets.EMPTY)));\r\n\t\thlavniPanel.setPadding(new Insets(8));\r\n\t\treturn hlavniPanel;\r\n\t}", "public PanelRpEd(VEditarPr v) {\n vpregunta = v;\n initComponents();\n }", "@DISPID(1611005968) //= 0x60060010. The runtime will prefer the VTID if present\n @VTID(43)\n boolean newWithPanel();", "private JPanel getJPTiposVms()\n\t{\n\t\tif ( jPTiposVms == null )\n\t\t{\n\t\t\tjPTiposVms = new JPanel();\n\t\t\tjPTiposVms.setLayout(null);\n\t\t\tjPTiposVms.setBounds(new Rectangle(275, 33, 260, 125));\n\t\t\tjPTiposVms.add(getJCSmall(), null);\n\t\t\tjPTiposVms.add(getJCBLarge(), null);\n\t\t\tjPTiposVms.add(getJCBExtra(), null);\n\t\t\tjPTiposVms.setBorder(BorderFactory.createLineBorder(Color.gray));\n\t\t\tjPTiposVms.setBorder(BorderFactory.createTitledBorder(\"Timpos VMs\"));\n\n\t\t}\n\t\treturn jPTiposVms;\n\t}", "private void setupVExpenseSlider() {\n\t\tif(verticalExpenseSlider != null)\n\t\t\tverticalExpensePanel.remove(verticalExpenseSlider);\n\t\tverticalExpenseSlider = new FloatingSliderPanel(0.0f, 1f, DEFAULT_VERTICAL_EXPENSE) {\n\t\t\tprotected void setDescriptionLabelText() {\n\t\t\t\tfloat currentValue = getCurrentValue();\n\t\t\t\tinfoLabel.setText(setVerticalExpenseInfoLabel(currentValue));\n\t\t\t}\n\t\t};\n\t\tGridBagConstraints gbc_verticalExpenseSlider = new GridBagConstraints();\n\t\tgbc_verticalExpenseSlider.insets = new Insets(0, 10, 0, 10);\n\t\tgbc_verticalExpenseSlider.fill = GridBagConstraints.BOTH;\n\t\tgbc_verticalExpenseSlider.gridx = 0;\n\t\tgbc_verticalExpenseSlider.gridy = 1;\n\t\tverticalExpensePanel.add(verticalExpenseSlider, gbc_verticalExpenseSlider);\n\t\t\n\t\trevalidate();\n\t}", "public Visualizador() {\n initComponents();\n inicializar();\n }", "private void generaVentana()\n {\n // Crea la ventana\n ventana = new JFrame(\"SpaceInvaders\");\n panel = (JPanel) ventana.getContentPane();\n \n // Establece el tamaño del panel\n panel.setPreferredSize(new Dimension(anchoVentana, altoVentana));\n\n // Establece el layout por defecto\n panel.setLayout(null);\n\n // Establece el fondo para el panel\n panel.setBackground(Color.black);\n\n // Establece el tamaño de Canvas y lo añade a la ventana\n setBounds(0,0,altoVentana,anchoVentana);\n panel.add(this);\n\n // Establece que el programa se cerrará cuando la ventana se cierre\n ventana.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n // Establece el tamaño de la ventana\n ventana.pack();\n\n // La ventana no se cambia de tamaño\n ventana.setResizable(false);\n\n // Centra la ventana en la pantalla\n ventana.setLocationRelativeTo(null);\n\n // Muestra la ventana\n ventana.setVisible(true);\n\n // Mantine el foco en la ventana\n requestFocusInWindow();\n }", "public PanelMenu(VentanaPrincipal miVP) {\n initComponents();\n this.miVP=miVP;\n jLabel1.setText(\"Hola \"+miVP.getMiUsuario().getnUsuario()+\"!\");\n }", "public JPanel createNewVersionPanel()\n\t{\n\t\t// Create and configure JPanels\n\t\tnewVersionPanel = new JPanel();\n\t\tnewVersionPanel.setLayout(new BoxLayout(newVersionPanel, BoxLayout.PAGE_AXIS));\n\t\tnewVersionPanel.setBorder(new CompoundBorder(new TitledBorder(\"New version\"), new EmptyBorder(8, 0, 0, 0)));\n\n\t\tnewVersionDescriptionPanel = new JPanel();\n\t\tnewVersionDescriptionPanel.setLayout(new BoxLayout(newVersionDescriptionPanel, BoxLayout.PAGE_AXIS));\n\t\t\n\t\t// Create components\n\t\tlabelVersionNumber = new JLabel(\"Version number:\");\n\t\t\n\t\tlabelDescription = new JLabel(\"Descriptions:\");\n\n\t\ttextFieldVersionNumber = new JTextField(20);\n\t\ttextFieldVersionNumber.setMaximumSize(textFieldVersionNumber.getPreferredSize());\n\t\ttextFieldVersionNumber.setAlignmentX(JLabel.LEFT_ALIGNMENT);\n\t\t\n\t\tbuttonAddTextFieldDescription = new JButton(\"+\");\n\t\tbuttonAddTextFieldDescription.addActionListener(this);\n\t\t\n\t\tbuttonAddVersion = new JButton(\"Add version\");\n\t\tbuttonAddVersion.addActionListener(this);\n\n\t\t// Attach components to JPanels\n\t\tnewVersionPanel.add(labelVersionNumber);\n\t\tnewVersionPanel.add(Box.createRigidArea(new Dimension(0, 10)));\n\t\tnewVersionPanel.add(textFieldVersionNumber);\n\t\tnewVersionPanel.add(Box.createRigidArea(new Dimension(0, 20)));\n\t\tnewVersionPanel.add(labelDescription);\n\t\tnewVersionPanel.add(Box.createRigidArea(new Dimension(0, 10)));\n\t\tnewVersionPanel.add(newVersionDescriptionPanel);\n\t\tnewVersionPanel.add(buttonAddTextFieldDescription);\n\t\tnewVersionPanel.add(Box.createRigidArea(new Dimension(0, 20)));\n\t\tnewVersionPanel.add(buttonAddVersion);\n\t\t\n\t\treturn newVersionPanel;\n\t}", "Vaisseau_Vaisseau createVaisseau_Vaisseau();", "Vaisseau_Vaisseau createVaisseau_Vaisseau();", "Vaisseau_Vaisseau createVaisseau_Vaisseau();", "Vaisseau_Vaisseau createVaisseau_Vaisseau();", "private JPanel productVendArea() {\n JPanel productsToVend = new JPanel();\n productsToVend.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));\n int size = inventoryManager.getProductNumber();\n size = size % 2 == 0 ? size / 2 : size / 2 + 1;\n productButtons = new ArrayList<>();\n productsToVend.setLayout(new GridLayout(size,size, 10, 10)); // creating a 10x10 area\n ArrayList<String> products = inventoryManager.getProductInventory();\n for (String prod : products) {\n JButton temp = new JButton(prod);\n temp.addActionListener(new productListener());\n productButtons.add(temp);\n productsToVend.add(temp);\n }\n return productsToVend;\n }", "public Vivid() {\n super(\n new Color(229, 134, 6),\n new Color(93, 105, 177),\n new Color(82, 188, 163),\n new Color(153, 201, 69),\n new Color(204, 97, 176),\n new Color(36, 121, 108),\n new Color(218, 165, 27),\n new Color(47, 138, 196),\n new Color(118, 78, 159),\n new Color(237, 100, 90),\n new Color(204, 58, 142),\n new Color(165, 170, 153)\n\n );\n\n }", "private void crearVista() {\n\t\tVista vista = Vista.getInstancia();\n\t\tvista.addObservador(this);\n\n\t}", "void addPanel() {\n \tPanel panel = new Panel();\r\n\r\n panel.setLayout(new GridLayout(4, 1));\r\n jSliderBrightness = makeTitledSilder(\"Helligkeit\", 0, 256, 128); // werte veraendert\r\n jSliderContrast = makeTitledSilder(\"Kontrast\", 0, 10, 5);\r\n jSliderSaturation = makeTitledSilder(\"Sättigung\", 0, 9, 4);\r\n jSliderHue = makeTitledSilder(\"Hue\", 0, 360, 0);\r\n //jSliderContrast = makeTitledSilder(\"Slider2-Wert\", 0, 100, 50);\r\n panel.add(jSliderBrightness);\r\n panel.add(jSliderContrast);\r\n panel.add(jSliderSaturation);\r\n panel.add(jSliderHue);\r\n \r\n add(panel);\r\n \r\n pack();\r\n }", "public void crearPanel(){\n\n panel = new JPanel();\n this.getContentPane().add(panel);\n panel.setBackground(Color.CYAN);\n panel.setLayout(null);\n }", "public View() {\n this.view = new ViewPanel();\n //this.view.setGraph(this.graph);\n initComponents();\n this.m_algoritmos.setEnabled(false);\n this.mi_maze.setEnabled(false);\n this.mi_salvarImagem.setEnabled(false);\n }", "public static JPanel createDemoPanel() {\r\n JFreeChart chart = createChart(createDataset());\r\n ChartPanel panel = new ChartPanel(chart);\r\n panel.setMouseWheelEnabled(true);\r\n return panel;\r\n }", "public Ventana_P() {\n\n try\n {\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n\n jPanelRentaAutos = new JPanelRentaAutos();\n jPanelGenerador = new JPanelGenerador();\n jPanelPrueba_Est = new JPanelPrueba_Est();\n jPanelInformacion = new JPanelInformacion();\n jPanelJuegoVolados = new JPanelJuegoVolados();\n jPanelSimulacionInventario = new JPanelSimulacionInventario();\n jPanelSevenEleven = new JPanelSevenEleven();\n jPanelRuleta = new JPanelRuleta();\n jPanelEjercicio4 = new JPanelEjercicio4();\n jPanelSimulacionesEjercicios6 = new JPanelSimulacionesEjercicios_6();\n jPanelSimulacionesEjercicio7 = new JPanelSimulacionesEjercicio7();\n jPanelEjercicio10 = new JPanelEjercicio10();\n jPanelEjercicio11 = new JPanelEjercicio11();\n jPanelEjercicio15 = new JPanelEjercicio15();\n numeros = new ArrayList<Float>();\n initComponents();\n this.setSize(800, 700);\n this.setResizable(false);\n NumerosRectangulares n = new NumerosRectangulares();\n \n ModVentana.centrar(this);\n }", "public VectorPanel(BaseDataInstanceDoubleVector vector) {\n Vector = vector;\n initComponents();\n fillTable();\n }", "public VehiclesPanel() throws IOException {\n\t\tsuper(new GridLayout(4,3));\n \n\t\t// Frame and title the panel\n\t\tthis.setBorder(BorderFactory.createTitledBorder(\"Vehicles fleet\"));\n\t\t\n\t\t// Fill the nbVehicles combo box with possible fleet sizes\n\t\tthis.nbVBox.addItem(1);\n\t\tthis.nbVBox.addItem(2);\n\t\tthis.nbVBox.addItem(5);\n\t\tthis.nbVBox.addItem(10);\n\t\tthis.nbVBox.addItem(30);\n\t\t\n\t\t// Add the check box that chooses between a limited or infinite number of vehicles\n\t\tthis.add(new JLabel(\"Number of vehicles\"));\n\t\tthis.nbVCheck = new JCheckBox(\"Unlimited\", true);\n\t\tthis.nbVCheck.addItemListener(this);\n\t\tthis.add(this.nbVCheck);\n\t\tthis.nbVCheck.setMnemonic(KeyEvent.VK_C);\n\t\tthis.add(new JPanel());\n\t\tthis.add(new JPanel());\n\t\tthis.add(this.nbVBox);\n\t\tthis.nbVBox.setVisible(false);\n\t\tthis.add(new JPanel());\n\t\t\n\t\t// Fill the capacities combo box with possible capacities\n\t\tthis.capaBox.addItem(1);\n\t\tthis.capaBox.addItem(3);\n\t\tthis.capaBox.addItem(10);\n\t\tthis.capaBox.addItem(30);\n\t\t// Add the check box that chooses between a finite or infinite capacity for each vehicle\n\t\tthis.add(new JLabel(\"Capacity of vehicles\"));\n\t\tthis.capaCheck = new JCheckBox(\"Unlimited\", true);\n\t\tthis.capaCheck.addItemListener(this);\n\t\tthis.add(this.capaCheck);\n\t\tthis.capaCheck.setMnemonic(KeyEvent.VK_G);\n\t\tthis.add(new JPanel());\n\t\tthis.add(new JPanel());\n\t\tthis.add(this.capaBox);\n\t\tthis.capaBox.setVisible(false);\n\t\tthis.add(this.capaExplain);\n\t\tthis.capaExplain.setVisible(false);\n\t}", "public Vencimientos() {\n initComponents();\n \n \n }", "public ChartPanel createChartPanel(QueryResult myResult) throws Exception {\n\n myChart = makeChart(myResult);\n\n // create the chart frame and display it \n ChartPanel myChartPanel = new ChartPanel(myChart);\n\n return myChartPanel;\n }", "public NewJPanel() {\n initComponents();\n }", "public NewJPanel() {\n initComponents();\n }", "public IfrViagem() {\n initComponents();\n v = new Viagem();\n criarViagem();\n\n Formatacao.formatarData(ftfDataSaida);\n Formatacao.formatarHora(ftfHoraSaida);\n Formatacao.formatarData(ftfDataRetorno);\n Formatacao.formatarHora(ftfHoraRetorno);\n Formatacao.formatarReal(ftfValorViagem);\n\n }", "protected Panel createButtonPanel() {\n Panel panel = new Panel();\n panel.setLayout(new PaletteLayout(2, new Point(2,2), false));\n return panel;\n }", "public ViewDetalleVentas() {\n initComponents();\n }", "@AutoGenerated\r\n\tprivate VerticalLayout buildPanelVerticalLayout()\r\n\t{\n\t\tpanelVerticalLayout = new VerticalLayout();\r\n\t\tpanelVerticalLayout.setImmediate(false);\r\n\t\tpanelVerticalLayout.setWidth(\"100.0%\");\r\n\t\tpanelVerticalLayout.setHeight(\"100.0%\");\r\n\t\tpanelVerticalLayout.setMargin(false);\r\n\t\t\r\n\t\t// tree\r\n\t\ttree = new Tree();\r\n\t\ttree.setImmediate(false);\r\n\t\ttree.setWidth(\"100.0%\");\r\n\t\ttree.setHeight(\"100.0%\");\r\n\t\tpanelVerticalLayout.addComponent(tree);\r\n\t\t\r\n\t\treturn panelVerticalLayout;\r\n\t}", "private void createTopPanel(){\n computerPaquetView = new ViewDeckVisible(true);\n this.getContentPane().add(computerPaquetView);\n }", "public Panel() {\n }", "final JPanel createMainPanel() {\r\n\r\n logger.entering(this.getClass().getName(), \"createMainPanel\");\r\n\r\n this.pnlMain = new JPanel();\r\n\r\n this.pnlMain.setLayout(new BorderLayout());\r\n\r\n this.pnlMain.add(new JLabel(\r\n \"Select the MicroSensorDataTypes that shall be filtered out\"),\r\n BorderLayout.NORTH);\r\n\r\n this.pnlMain.add(createCheckBoxPanel(), BorderLayout.CENTER);\r\n\r\n this.pnlMain.add(getButtonPanel(), BorderLayout.SOUTH);\r\n\r\n logger.exiting(this.getClass().getName(), \"createMainPanel\",\r\n this.pnlMain);\r\n\r\n return this.pnlMain;\r\n }", "private JPanel getJPanelVisualizar() {\r\n\t\tif (jPanelVisualizar == null) {\r\n\t\t\tjPanelVisualizar = new JPanel();\r\n\t\t\tjPanelVisualizar.setBorder(javax.swing.BorderFactory.createMatteBorder(2,0,0,0,java.awt.Color.gray));\r\n\t\t\tjPanelVisualizar.add(getJButtonVisualizar(), null);\r\n\t\t}\r\n\t\treturn jPanelVisualizar;\r\n\t}", "public static Gel_BioInf_Models.VirtualPanel.Builder newBuilder(Gel_BioInf_Models.VirtualPanel.Builder other) {\n return new Gel_BioInf_Models.VirtualPanel.Builder(other);\n }", "public PanelSgamacView1()\n {\n }", "private void createPanel() {\n JPanel panel = new JPanel();\n \n for(int i = 0; i < button.size(); i++){\n panel.add(button.get(i));\n }\n panel.add(label);\n \n add(panel);\n }", "private RGridBagLayoutPane getXpertIvyPane() {\n if (xpertIvyPane == null) {\n ULCTitledBorder ULCTitledBorder = BorderFactory.createTitledBorder(\"Axon.ivy\");\n ULCTitledBorder.setTitleFont(new Font(\"Tahoma\", 0, 11));\n ULCTitledBorder.setBorder(null);\n ULCTitledBorder.setTitle(\"<%=ivy.cms.co(\\\"/Dialogs/about/productTitle\\\")%>\");\n ULCTitledBorder.setTitleColor(new Color(23, 64, 140));\n RFiller filler = new RFiller();\n filler\n .setStyleProperties(\"{/usePreferredSizeAsExactSize \\\"true\\\"/preferredSizeWidth \\\"135\\\"/preferredSizeHeight \\\"0\\\"}\");\n xpertIvyPane = new RGridBagLayoutPane();\n xpertIvyPane.setName(\"xpertIvyPane\");\n xpertIvyPane.setStyleProperties(\"{/fill \\\"HORIZONTAL\\\"/weightY \\\"0\\\"/insetsLeft \\\"5\\\"}\");\n xpertIvyPane.setBorder(ULCTitledBorder);\n xpertIvyPane.setForeground(Color.darkGray);\n xpertIvyPane.setBorder(ULCTitledBorder);\n xpertIvyPane.add(getProductLabel(), new com.ulcjava.base.application.GridBagConstraints(0, 0, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n xpertIvyPane.add(getProductTextField(), new com.ulcjava.base.application.GridBagConstraints(1, 0, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n xpertIvyPane.add(getVersionLabel(), new com.ulcjava.base.application.GridBagConstraints(0, 1, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n xpertIvyPane.add(getVersionTextField(), new com.ulcjava.base.application.GridBagConstraints(1, 1, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n xpertIvyPane.add(getBuildLabel(), new com.ulcjava.base.application.GridBagConstraints(0, 2, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n xpertIvyPane.add(getBuildTextField(), new com.ulcjava.base.application.GridBagConstraints(1, 2, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n xpertIvyPane.add(getCopyrightLabel(), new com.ulcjava.base.application.GridBagConstraints(0, 3, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n xpertIvyPane.add(getCopyrightTextField(), new com.ulcjava.base.application.GridBagConstraints(1, 3, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n xpertIvyPane.add(filler, new com.ulcjava.base.application.GridBagConstraints(0, 4, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n }\n return xpertIvyPane;\n }", "PiviDiagram createPiviDiagram();", "private void createSlider(){\n\t\tslider = new GVertSlider(winApp, (int)width - 10, (int)height, 10, maxRows * (int)height);\n\t\tslider.setBorder(1);\n\t\tslider.setVisible(false);\n\t\tslider.setLimits(0, 0, maxRows - 1);\n\t\tslider.addEventHandler(this, \"processSliderMotion\", new Class[] { GVertSlider.class } );\n\t\tadd(slider);\n\t}", "public VerticalLayout(int vgap) {\r\n this(vgap, CENTER, TOP);\r\n }", "public Container getHlavniPanel() {\n JPanel hlavniPanel = new JPanel();\n\n //hlavniPanel.setLayout(new FlowLayout());\n hlavniPanel.add(vytvorList());\n\n hlavniPanel.add(vytvorTlacitkaPanel());\n\n hlavniPanel.setVisible(true);\n\n return hlavniPanel;\n }", "private void creaPannelli() {\n /* variabili e costanti locali di lavoro */\n Pannello pan;\n\n try { // prova ad eseguire il codice\n\n /* pannello date */\n pan = this.creaPanDate();\n this.addPannello(pan);\n\n /* pannello coperti */\n PanCoperti panCoperti = new PanCoperti();\n this.setPanCoperti(panCoperti);\n this.addPannello(panCoperti);\n\n\n /* pannello placeholder per il Navigatore risultati */\n /* il navigatore vi viene inserito in fase di inizializzazione */\n pan = new PannelloFlusso(Layout.ORIENTAMENTO_ORIZZONTALE);\n this.setPanNavigatore(pan);\n this.addPannello(pan);\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n\n }", "public JPanel buildPanel() {\n\t\tsetLayout(new BorderLayout());\n\t\tsetBackground(ClientConstants.LIGHT_YELLOW);\n\t\tJLabel graphPlotLabel = new JLabel(ClientConstants.GRAPH_PLOT, JLabel.CENTER);\n\t\tgraphPlotLabel.setFont(ClientConstants.TEXT_FONT);\n\t\tadd(graphPlotLabel, BorderLayout.NORTH);\n\t\tsetLayout(new BorderLayout());\n\t\taffectiveGraphPlot = new AffectivePlot();\n\t\tClientDataSingleton.getInstance().setAffectivePlot(affectiveGraphPlot);\n\t\taffectiveGraphPlot.setBackground(Color.WHITE);\n\t\tadd(affectiveGraphPlot);\n\t\treturn this;\n\t}", "@AutoGenerated\n\tprivate VerticalLayout buildVl_imagen() {\n\t\tvl_imagen = new VerticalLayout();\n\t\tvl_imagen.setStyleName(\"uploadImagen\");\n\t\tvl_imagen.setImmediate(false);\n\t\tvl_imagen.setWidth(\"-1px\");\n\t\tvl_imagen.setHeight(\"-1px\");\n\t\tvl_imagen.setMargin(true);\n\t\tvl_imagen.setSpacing(true);\n\t\t\n\t\t// embedded_1\n\t\tembedded_1 = new Embedded();\n\t\tembedded_1.setImmediate(false);\n\t\tembedded_1.setWidth(\"300px\");\n\t\tembedded_1.setHeight(\"300px\");\n\t\tembedded_1.setSource(new ThemeResource(\"img/component/embedded_icon.png\"));\n\t\tembedded_1.setType(1);\n\t\tembedded_1.setMimeType(\"image/png\");\n\t\tvl_imagen.addComponent(embedded_1);\n\t\t\n\t\t// upload_1\n\t\tupload_1 = new Upload();\n\t\tupload_1.setImmediate(false);\n\t\tupload_1.setWidth(\"-1px\");\n\t\tupload_1.setHeight(\"-1px\");\n\t\tvl_imagen.addComponent(upload_1);\n\t\tvl_imagen.setComponentAlignment(upload_1, new Alignment(48));\n\t\t\n\t\treturn vl_imagen;\n\t}", "private Widget buildElementWithVSACExpansionIdentifier() {\r\n VerticalPanel mainPanel = new VerticalPanel();\r\n mainPanel.getElement().setId(\"mainPanel_VerticalPanel\");\r\n mainPanel.setWidth(\"95%\");\r\n//\t\tmainPanel.add(buildDefaultExpIdentifierPanel());\r\n mainPanel.add(new SpacerWidget());\r\n mainPanel.add(new SpacerWidget());\r\n return mainPanel;\r\n }", "public EnhancedVisualView(IReadOnlyModel model, int speed) {\n super();\n this.mm = (AnimationModel) model;\n VisualView vView = new VisualView(mm, speed);\n this.setTitle(vView.getTitle());\n this.setSize(vView.getSize());\n this.setExtendedState(this.getExtendedState() | JFrame.MAXIMIZED_BOTH);\n this.setDefaultCloseOperation(vView.getDefaultCloseOperation());\n\n //use a borderlayout with drawing panel in center and button panel in south\n this.setLayout(vView.getLayout());\n this.vPanel = new VisualPanel(mm, speed);\n vPanel.setPreferredSize(new Dimension(500, 500));\n this.add(vPanel, BorderLayout.CENTER);\n\n //set play button\n buttonPanel = new ButtonPanel();\n this.add(buttonPanel, BorderLayout.SOUTH);\n\n //sets the menu bar\n menuBar = new MenuPanel(mm.getShapes());\n this.add(menuBar, BorderLayout.WEST);\n\n vPanel.setSlider(menuBar.getJSlider());\n this.menuBar.getJSlider().setMinimum(0);\n this.menuBar.getJSlider().setMaximum(this.vPanel.getMaxTick());\n menuBar.getJSlider().setValue(0);\n menuBar.getJSlider().addChangeListener((ChangeEvent e) -> {\n JSlider source = (JSlider) e.getSource();\n int fps = (int) source.getValue();\n if (source.getValueIsAdjusting()) {\n vPanel.stopTimer();\n vPanel.setTick(fps);\n vPanel.repaint();\n } else {\n vPanel.startTimer();\n }\n });\n\n }", "public DadosVertice() {\n initComponents();\n }", "public JavaPanel() {\n\t\tsuper();\n\t}", "private Panel designPanel() {\n Panel panel = new Panel();\n contentLayout = new FormLayout();\n wrapperLayout = new VerticalLayout();\n numberOfDatasetsBox = new ComboBox<>();\n numberOfReplicatesBox = new ComboBox<>(\"Select number of Replicates\");\n\n\n List<Integer> possibleDatasetNumber =\n IntStream.rangeClosed(1, 100).boxed().collect(Collectors.toList());\n numberOfDatasetsBox.setItems(possibleDatasetNumber);\n\n List<Integer> possibleReplicateNumber =\n IntStream.rangeClosed(1, 100).boxed().collect(Collectors.toList());\n numberOfReplicatesBox.setItems(possibleReplicateNumber);\n\n datasetAccordion = new Accordion();\n datasetAccordion.setWidth(\"100%\");\n\n panel.setContent(wrapperLayout);\n return panel;\n }", "public TabbedUI(Village village) {\n this.village = village;\n initComponents();\n this.initEvents();\n this.tick();\n this.setVisible(true);\n }", "Vaisseau createVaisseau();", "@DISPID(1611005968) //= 0x60060010. The runtime will prefer the VTID if present\n @VTID(44)\n void newWithPanel(\n boolean oNewPartPanelDisplayed);", "protected NumberAxis createVAxis() {\n NumberAxis yAxis = new NumberAxis(0, 55, 5);\n //yAxis.setLabel(\"Price\");\n yAxis.setSide(Side.RIGHT);\n yAxis.setTickMarkVisible(false);\n yAxis.setMinorTickVisible(false);\n return yAxis;\n }", "public Vampire() {\n super();\n this.name = \"Vampire\";\n }", "public VComponente() {\n initComponents();\n }", "public Vue(Model model)\n {\n initAttributs();\n creerWidget();\n\n setSize(560,500);\n setVisible(true);\n setResizable(false);\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n }", "public VersionEventos(Paneles panel) {\r\n\t\tsuper(panel);\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "public JFrame vendingFrame() {\n JFrame vendFrame = new JFrame(\"Mehdi Himmiche | Vending Maching\");\n vendFrame.setLayout(new BorderLayout());\n\n JLabel infoLabel = new JLabel(\"<html>Welcome to my vending machine! Please make a selection.<br>Mehdi Himmiche</html>\", SwingConstants.CENTER);\n infoLabel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));\n vendFrame.getContentPane().add(infoLabel, BorderLayout.NORTH);\n JPanel products = productVendArea();\n vendFrame.getContentPane().add(products, BorderLayout.CENTER);\n JPanel input = interactionArea();\n vendFrame.getContentPane().add(input, BorderLayout.EAST);\n JPanel message = messageArea();\n vendFrame.getContentPane().add(message, BorderLayout.SOUTH);\n\n vendFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n vendFrame.pack();\n vendFrame.setVisible(true);\n return vendFrame;\n }", "public Ventana2() {\n initComponents();\n }", "PanelOptionsVisual(PanelConfigureProject panel) {\n this.panel = panel;\n\n preInitComponents();\n initComponents();\n postInitComponents();\n }", "@AutoGenerated\r\n\tprivate VerticalLayout buildVerticalLayout_1() {\n\t\tverticalLayout_1 = new VerticalLayout();\r\n\t\tverticalLayout_1.setImmediate(false);\r\n\t\tverticalLayout_1.setWidth(\"-1px\");\r\n\t\tverticalLayout_1.setHeight(\"-1px\");\r\n\t\tverticalLayout_1.setMargin(false);\r\n\t\tverticalLayout_1.setSpacing(true);\r\n\t\t\r\n\t\t// pnlFondos\r\n\t\tpnlFondos = buildPnlFondos();\r\n\t\tverticalLayout_1.addComponent(pnlFondos);\r\n\t\t\r\n\t\treturn verticalLayout_1;\r\n\t}", "public VentanaAdministradorVista() {\n initComponents();\n }", "public VEmpleado() {\n initComponents();\n setLocationRelativeTo(null);\n getObjetos(false, true, false);\n }", "public Ventana() {\n initComponents();\n }", "public Ventana() {\n initComponents();\n }", "public Ventana() {\n initComponents();\n }", "public PanelControl() {\r\n initComponents();\r\n VersionEImageIcon versionEImageIcon = new VersionEImageIcon();\r\n versionEImageIcon.newColorFromPanel(panelColor);\r\n jLabel1.setText(INFO_LABEL);\r\n Usuario usuarioTipo = Login.getUsuario();\r\n this.administrador = usuarioTipo.isAdmin();\r\n if (!administrador)\r\n {\r\n rangos.setEnabled(false);\r\n controles.setEnabled(false);\r\n alta_usuarios.setEnabled(false);\r\n verificacion.setEnabled(false);\r\n }\r\n }", "public LocalPanel() {\r\n\t\tinitComponents();\r\n\t}", "private GridPane setInfoVindu(){\r\n GridPane grid = new GridPane();\r\n grid.setPadding(new Insets(13, 13, 13,13));\r\n grid.setHgap(15);\r\n grid.setVgap(5);\r\n\r\n nyeTall = new TextField();\r\n settInnTall = new Button(\"Sett inn\");\r\n leggInnTilfeldigeTall = new Button(\"Legg inn 10 tilfeldige tall\");\r\n slettTre = new Button(\"Slett tre\");\r\n nodeFarge = new ColorPicker();\r\n nodeFarge.setValue(Color.LIGHTGREEN);\r\n\r\n grid.add(nyeTall, 0,0);\r\n grid.add(settInnTall, 1, 0);\r\n grid.add(leggInnTilfeldigeTall, 2, 0);\r\n grid.add(slettTre, 3, 0);\r\n grid.add(nodeFarge, 4, 0);\r\n\r\n return grid;\r\n }", "public PanelAmigo() {\n initComponents();\n \n }", "public static JPanel newPanel() {\n\t\treturn null;\n\t}", "public ParticleDisplayer(int width, int height, VisualizerMain vm){\n\t\tthis.setPreferredSize(new Dimension(width, height));\n\t\tthis.setBackground(Color.magenta);\n\t\tthis.vm = vm;\n\t\t\n\t\tFlowLayout flowLayout = new FlowLayout();\n\t\tflowLayout.setVgap(0);\n\t\tflowLayout.setHgap(0);\n\t\tthis.setLayout(flowLayout);\n\t\t\n\t\t\n\t\tdisplayPred = new JList();\n\t\tdisplayPred.setLayout(flowLayout);\n\t\tdisplayPred.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n\t\tdisplayPred.setLayoutOrientation(JList.VERTICAL);\n\t\tdisplayPred.addListSelectionListener(this);\n\t\tdisplayPred.setName(\"pred\");\n\t\tJScrollPane listScroller = new JScrollPane(displayPred);\n\t\tlistScroller.setPreferredSize(new Dimension(width, height-100));\n\t\t\n\t\tdisplayPrey = new JList();\n\t\tdisplayPrey.setLayout(flowLayout);\n\t\tdisplayPrey.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n\t\tdisplayPrey.setLayoutOrientation(JList.VERTICAL);\n\t\tdisplayPrey.addListSelectionListener(this);\n\t\tdisplayPrey.setName(\"prey\");\n\t\tJScrollPane listScroller2 = new JScrollPane(displayPrey);\n\t\tlistScroller2.setPreferredSize(new Dimension(width, height-100));\n\n\t\t\n\t\tJTabbedPane tp = new JTabbedPane();\n\t\ttp.add(\"Predator\", listScroller);\n\t\ttp.add(\"Prey\", listScroller2);\n\t\ttp.setTabPlacement(JTabbedPane.BOTTOM);\n\t\tthis.add(tp);\n\t\t\n\t\t\n\t\tthis.add(new JLabel(\"Epoch:\"));\n\t\tSpinnerNumberModel model1 = new SpinnerNumberModel(minEpoch, minEpoch, maxEpoch, 1); \n\t\tepochSelector = new JSpinner(model1);\n\t\tepochSelector.setValue(0);\n\t\tepochSelector.setPreferredSize(new Dimension(width-50, 50));\n\t\tepochSelector.addChangeListener(this);\n\t\tthis.add(epochSelector);\n\t}", "public vueEx() {\r\n \r\n }", "public FSVariableBox(VisualNode vNode) {\r\n\t\tvisualNode = vNode;\r\n\t\tvisualStates = new HashMap<Integer, VisualState>();\r\n\t\tcreateVisualStates();\r\n\t}", "public JPanel createPanel() {\n\t\t\r\n\t\tJPanel mainPanel = new JPanel();\r\n\t\tmainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));\r\n\t\tmainPanel.setBackground(Color.WHITE);\r\n\t\tmainPanel.setBorder(new CompoundBorder(\r\n\t\t\t\tBorderFactory.createLineBorder(new Color(0x3B70A3), 4),\r\n\t\t\t\tnew EmptyBorder(10, 20, 10, 20)));\r\n\r\n\t\t/*\r\n\t\t * Instruction\r\n\t\t */\t\r\n\t\tmainPanel.add(instructionPanel());\r\n\t\t\r\n\t\t\r\n\t\t// TODO: set task order for each group - make first 3 tasks = groups tasks\r\n\t\tmainPanel.add(messagesPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(phonePanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(clockPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(cameraPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\t\r\n\r\n\t\tmainPanel.add(contactPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(galleryPanel());\r\n\t\t\r\n\t\treturn mainPanel;\r\n\t}", "public void setupUI() {\r\n\t\t\r\n\t\tvPanel = new VerticalPanel();\r\n\t\thPanel = new HorizontalPanel();\r\n\t\t\r\n\t\titemName = new Label();\r\n\t\titemName.addStyleName(Styles.page_title);\r\n\t\titemDesc = new Label();\r\n\t\titemDesc.addStyleName(Styles.quest_desc);\r\n\t\titemType = new Label();\r\n\t\titemType.addStyleName(Styles.quest_lvl);\r\n\t\t\r\n\t\tVerticalPanel img = new VerticalPanel();\r\n\t\timg.add(new Image(imgDir));\r\n\t\t\r\n\t\tvPanel.add(itemName);\r\n\t\tvPanel.add(itemDesc);\r\n\t\tvPanel.add(img);\r\n\t\tvPanel.add(hPanel);\r\n\t\t\r\n\t\tVerticalPanel mainPanel = new VerticalPanel();\r\n\t\tmainPanel.setWidth(\"100%\");\r\n\t\tvPanel.addStyleName(NAME);\r\n\t\t\r\n\t\tmainPanel.add(vPanel);\r\n \tinitWidget(mainPanel);\r\n }", "public static JPanel createDemoPanel(String total, String avild, String title) {\n double dtotal;\n double davild;\n dtotal = Double.parseDouble(total);\n davild = Double.parseDouble(avild);\n JFreeChart chart = createChart(createDataset(dtotal, davild), title);\n return new ChartPanel(chart);\n }", "public VoronoiVisualization()\n\t \t{\n\t\t super();\n\t \t}", "private void constructChartPanel() {\n chartPanel = new JPanel();\n chartPanel.setBorder(BorderFactory.createTitledBorder(\"Price Chart\"));\n chartPanel.setPreferredSize(relativeSize(0.4f, 0.35f));\n \n displayChartButton = new JButton(\"Click to Display Price Chart\");\n displayChartButton.setEnabled(false);\n displayChartButton.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n JPanel cPanel = chart.getChartPanel();\n chartPanel.removeAll();\n chartPanel.add(cPanel);\n cPanel.setPreferredSize(relativeSize(0.4f, 0.35f));\n \n pack();\n repaint();\n }\n });\n \n chartPanel.add(displayChartButton);\n }", "private JPanel createFilmPanel() {\n\t\tJPanel filmPanel = new JPanel();\n\t\tfilmPanel.setLayout(new BorderLayout());\n\t\tfilmPanel.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\t\n\t\tJPanel filmTitlePanel = new JPanel();\n\t\tfilmTitlePanel.setLayout(new BorderLayout());\n\t\tJLabel films = new JLabel(\"Films\");\n\t\tfilmTitlePanel.add(films, BorderLayout.WEST);\n\t\tfilmComboBox = new JComboBox(filmCBContent);\n\t\tfilmComboBox.setName(\"filmComboBox\");\n\t\tfilmTitlePanel.add(filmComboBox, BorderLayout.EAST);\n\t\tfilmPanel.add(filmTitlePanel, BorderLayout.NORTH);\n\n\t\tfilmContents = new JPanel();\n\t\tfilmContents.setLayout(new FlowLayout());\n\t\tfilmPanel.add(filmContents, BorderLayout.CENTER);\n\t\tfilmPanel.add(createJScrollPane(filmContents), BorderLayout.CENTER);\n\n\t\treturn filmPanel;\n\t}", "public PanelJuego() {\r\n\t\tsetLayout(new GridLayout(3, 3, 20, 20));// Se crea una matriz 3x3 con un\r\n\t\t\t\t\t\t\t\t\t\t\t\t// espaciado tanto horizontal\r\n\t\t\t\t\t\t\t\t\t\t\t\t// como vertical.\r\n\t\tposicion = new JTextField[9];\r\n\t\tllenarPanel();\r\n\t\tsetBackground(Color.BLACK);// Se pinta el fondo de negro.\r\n\t\tsetVisible(true);\r\n\t}", "public VendaView() {\n initComponents();\n }", "public guiProntuarioVirtual() {\n initComponents();\n \n }", "public static void newUAV(){\n GridPane gp = new GridPane();\n Text title = new Text(\"Create a UAV:\\nUAV Settings\");\n title.setTextAlignment(TextAlignment.CENTER);\n title.setId(\"title\"); // Set CSS style for the title\n GridPane.setColumnSpan(title,3);\n GridPane.setHalignment(title, HPos.CENTER);\n\n gp.setId(\"gridpane\"); // Set CSS style ID for the gridpane\n gp.getStyleClass().add(\"grid\");\n\n // Create the labels for the menu\n Label nameLabel = new Label(\"Name:\");\n Label weightLabel = new Label(\"Weight (g):\");\n Label turnRadiusLabel = new Label(\"Turn Radius (m):\");\n Label maxInclineLabel = new Label(\"Max incline angle (deg):\");\n Label batteryLabel = new Label(\"Battery Type:\");\n Label batteryCapacityLabel = new Label(\"Battery Capacity (mAh):\");\n\n name.setPromptText(\"Name of craft\");\n weight.setPromptText(\"Weight of craft\");\n turnRadius.setPromptText(\"Min turn radius of craft\");\n maxIncline.setPromptText(\"Max incline/decline angle\");\n battery.setPromptText(\"Battery used in craft (Lipo, NiMH, Li-ion...)\");\n batteryCapacity.setPromptText(\"Battery capacity in mAh\");\n\n // Create the buttons for the menu\n Button save = new Button(\"Save\");\n Button cancel = new Button(\"Cancel\");\n Button clear = new Button(\"Clear\");\n\n // Add all elements to the menu gridpane\n gp.add(title,0,0);\n\n // Add the components to the menu gridpane\n gp.add(nameLabel,0,1);\n gp.add(weightLabel,0,2);\n gp.add(turnRadiusLabel,0,3);\n gp.add(maxInclineLabel,0,4);\n gp.add(batteryLabel,0,5);\n gp.add(batteryCapacityLabel,0,6);\n\n gp.add(name,1,1);\n gp.add(weight,1,2);\n gp.add(turnRadius,1,3);\n gp.add(maxIncline,1,4);\n gp.add(battery,1,5);\n gp.add(batteryCapacity,1,6);\n\n // Add the buttons to the menu\n gp.add(save,0,7);\n gp.add(cancel,2,7);\n gp.add(clear,1,7);\n\n gp.setHgap(10);\n gp.setVgap(20);\n gp.setAlignment(Pos.CENTER);\n\n // If the save button is pressed\n save.setOnMouseClicked(new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent event) {\n // If a name has not been set\n if(name.getText().isEmpty()){\n System.out.println(\"Missing name for UAV\");\n }else {\n File file = new File(\"src/uavs/\"+name.getText()+\".uav\");\n if(file.exists()){\n dialogMessage.setText(\"The filename \"+ name.getText() +\n \".uav already exists in \"+path+\".\\n Would you like to overwrite?\");\n dialog.show();\n }else {\n writeUAV(); // Write the UAV settings\n createStage.close();\n }\n }\n }\n });\n\n // Close the menu\n cancel.setOnMouseClicked(new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent event) {\n createStage.close();\n }\n });\n\n // Clear all text fields\n clear.setOnMouseClicked(new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent event) {\n name.clear();\n weight.clear();\n turnRadius.clear();\n maxIncline.clear();\n battery.clear();\n batteryCapacity.clear();\n }\n });\n\n createScene = new Scene(gp,500,700);\n createScene.setUserAgentStylesheet(\"style/menus.css\"); // Set the style of the menu\n createStage.setScene(createScene);\n createStage.show();\n }" ]
[ "0.6928453", "0.63019377", "0.6291201", "0.6286805", "0.6259978", "0.62562597", "0.61665434", "0.61618745", "0.61551154", "0.60942996", "0.6090844", "0.6047102", "0.5985589", "0.5971036", "0.5965057", "0.5913951", "0.5911692", "0.5881773", "0.58440053", "0.58279073", "0.5810897", "0.581068", "0.5810617", "0.5806031", "0.5806031", "0.5806031", "0.5806031", "0.57974136", "0.57888234", "0.5788468", "0.5766511", "0.576295", "0.5742833", "0.57216597", "0.56761503", "0.567497", "0.5652703", "0.56516767", "0.56147707", "0.5576826", "0.5576826", "0.5561687", "0.5549209", "0.5549038", "0.5541846", "0.55349624", "0.55215406", "0.5518655", "0.55133325", "0.5509164", "0.5500279", "0.54932046", "0.5491909", "0.54829425", "0.54797834", "0.5471238", "0.546884", "0.54626524", "0.5457768", "0.5450125", "0.5445298", "0.5444091", "0.5443313", "0.54379517", "0.5436376", "0.5424428", "0.5411478", "0.54097164", "0.5407685", "0.5404281", "0.53905433", "0.5359891", "0.5355648", "0.53542763", "0.5353931", "0.53523564", "0.53466165", "0.53325814", "0.53164756", "0.5309722", "0.5309722", "0.5309722", "0.5303363", "0.5295525", "0.5273002", "0.52653843", "0.52651596", "0.52586", "0.52567124", "0.52563983", "0.52553", "0.5243766", "0.52368504", "0.5235152", "0.52348036", "0.52336895", "0.52266514", "0.52233726", "0.5220668", "0.5219362" ]
0.7278694
0
Adds a turtle to the vivarium.
public void addTurtle(AbstractTurtle t) { // Add the turtle to the vivarium and observe it this.turtles.add(t); t.addObserver(this); // Then, fire paint event this.repaint(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void addTurtle(Turtle turtle, boolean isActive);", "private void addTurtle(double d, double height) {\n\t\t\n\t}", "public void createTurtle (TurtleView tView) {\n myController.createTurtle(tView);\n }", "Turtle createTurtle();", "public void addTurtles(Set<AbstractTurtle> turtles)\n {\n // Start observing every turtle\n for(AbstractTurtle t : turtles)\n {\n t.addObserver(this);\n }\n\n // And remove them from the vivarium\n this.turtles.addAll(turtles);\n\n // Then, fire paint event\n this.repaint();\n }", "abstract public void setTurtle(TurtleModel t);", "public void updateTurtleOnView()\n\t{\n\t\t// update turtle info to View\n\t\tsetInfoParamsOfTurtleAndLine();\n\t\t\n\t\tif (this.isVisible() == 1)\n\t\t{\n\t\t\t// make turtle visible, then update turtle movement\n\t\t\tthis.myTurtleView.showTurtle(true);\n\t\t\tthis.myTurtleView.rotateAndMoveTurtle(this.getTurtleLocation(), this.getTurtleOrientation());\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// tell view to make turtle invisible\n\t\t\tthis.myTurtleView.showTurtle(false);\n\t\t}\n\t}", "public Turtle(String name) {\n this.name = name;\n }", "public Turtle(ScreenBox turtle_screen, Image turtle_image) {\n\t\tscreen = turtle_screen;\n\t\timage = turtle_image;\n\t\timageList.add(image);\n\t\tinitalizeTurtle();\n\t}", "@Override\n public void setTurtlePosition(double xPosition, double yPosition) {\n screenCreator.setTurtlePosition(xPosition,yPosition);\n }", "public void setTurtleActive(boolean turtleActive) {\n isTurtleActive = turtleActive;\n }", "void moveTurtle(int turtleIndex, Coordinate start, Coordinate end);", "@Override\n public void setTurtleAngle(double angle) {\n screenCreator.updateCommandQueue(\"Angles\", Collections.singletonList(angle));\n }", "@Override\n public void setActiveTurtle(int turtleID) {\n screenCreator.setActiveTurtle(turtleID);\n }", "@Override\n public void paint(Graphics g)\n {\n super.paint(g);\n\n if(g instanceof Graphics2D)\n {\n // Initialize vars\n Graphics2D graphics = (Graphics2D) g;\n Dimension panelDimension = this.getSize();\n Rectangle2D turtleBounds;\n int fontHeight = g.getFontMetrics().getHeight();\n\n // Clear drawing sheet\n graphics.setColor(Color.WHITE);\n graphics.fillRect(0, 0, (int) panelDimension.getWidth(), (int) panelDimension.getHeight());\n\n // Draw every turtle\n for(AbstractTurtle turtle : this.turtles)\n {\n // Draw the turtle's shape\n graphics.setColor(turtle.getColor());\n graphics.fill(turtle.getShape());\n\n // Debug mode\n if(this.isDebug)\n {\n // Draw the turtle's sight\n graphics.setColor(Color.BLACK);\n graphics.draw(turtle.getSight());\n\n // Draw the turtle's center\n graphics.setColor(Color.CYAN);\n graphics.drawLine(\n (int) turtle.getX() - 10,\n (int) turtle.getY(),\n (int) turtle.getX() + 10,\n (int) turtle.getY()\n );\n graphics.drawLine(\n (int) turtle.getX(),\n (int) turtle.getY() - 10,\n (int) turtle.getX(),\n (int) turtle.getY() + 10\n );\n\n // Write the turtle's speed\n turtleBounds = turtle.getShape().getBounds2D();\n\n graphics.setColor(Color.BLACK);\n graphics.drawString(\n \"Vitesse : \" + String.format(\"%.2f\", turtle.getSpeed()),\n (int) turtleBounds.getMaxX() + 5,\n (int) turtleBounds.getMinY() - 5\n );\n graphics.drawString(\n \"Direction : \" + String.format(\"%.2f\", turtle.getDirection()),\n (int) turtleBounds.getMaxX() + 5,\n (int) turtleBounds.getMinY() - 5 + fontHeight\n );\n }\n }\n }\n }", "public Environment(final Turtle turtle) {\n this(turtle, null);\n }", "@Override\n\tpublic void paintComponent(Graphics g)\n\t{\t\t\n\t\tGraphics2D g2 = (Graphics2D)g;\n\t\tturt = new Turtle();\n\t\tappleRadius = (int)Math.abs(turt.getStepLenght()*APPLE_RADIUS_FACTOR);\n\t\tg2.setStroke(fatStroke);\n\t\t\n\t\tg2.setBackground(Color.YELLOW);\n\t\tg2.translate(this.getWidth()/2, (int)(this.getHeight()*V_POSITION_FACTOR));\n\t\tg2.fillOval(SHADOW_X*SHADOW_SIZE, (int)(SHADOW_SIZE*SHADOW_Y), SHADOW_WIDTH*SHADOW_SIZE, SHADOW_SIZE);\n\t\tg2.drawString(\"Age: \"+age, AGESTRING_X, AGESTRING_Y);\n\n\t\t//** Age=1: Draw a branch with an apple **//\n\t\tturt.turn(90);\n\t\tturt.move(age);\n\t\tturt.draw(g2);\n\t\tif(age == 0)\n\t\t{\n\t\t\tg2.fillOval((int)Math.round(turt.getTarget().x-appleRadius), (int)Math.round(-turt.getTarget().y-appleRadius), appleRadius*2, appleRadius*2);\n\t\t}\n\t\tturt.turn(ANGLE);\n\t\taddBranches(g2, turt, age-1);\n\t}", "private void initializeTurtle()\n\t{\n\t\tImage image = new Image(getClass().getResourceAsStream(\"/resources/rsz_turtle.png\"));\n\t\tthis.myTurtleView.initializeTurtle(image);\n\t\tsetInfoParamsOfTurtleAndLine();\n\t}", "public void add(T toy) {\n // Complete add method with proper argument and method body\n v.add(toy);\n }", "@Override\n public void onTurtleUpdated(AbstractTurtle t)\n {\n // Fire paint event\n this.repaint();\n }", "public void add(T v) {\n add(new Node(v));\n }", "public void addRobot(Robot robot) {\r\n this.robots.add(robot);\r\n this.vue.poserRobot(robot, getCoordBase());\r\n }", "static void equilateral(int length, Turtle turtle) \r\n {\r\n turtle.turn(30);\r\n turtle.forward(length);\r\n turtle.turn(120);\r\n turtle.forward(length);\r\n turtle.turn(120);\r\n turtle.forward(length);\r\n turtle.turnRight();\r\n }", "public static void initialiseShapeTurtleLinden() {\n shape.update();\n turtle.setWord(shape.getWord());\n turtle.setLength(shape.getLength());\n turtle.setAngle(shape.getAngle());\n\n linSys.setDrawRules(shape.getDrawRules());\n linSys.setMoveRules(shape.getMoveRules());\n linSys.setRulesX(shape.getRulesX());\n linSys.setRulesY(shape.getRulesY());\n\n turtle.setCoords((double) frameWidth / 2, (double) frameHeight / 2);\n turtle.saveStartingTurtle();\n }", "public void addTrap(Trap trap)\n\t{\n\t\ttraps.add(trap);\n\t}", "static void rectangle(int width, int height, Turtle turtle)\r\n {\r\n turtle.turnRight();\r\n turtle.forward(width);\r\n turtle.turnRight();\r\n turtle.forward(height);\r\n turtle.turnRight();\r\n turtle.forward(width);\r\n turtle.turnRight();\r\n turtle.forward(height);\r\n }", "@Override\n public void doCommand(FrontEndTurtle frontEndTurtle) {\n frontEndTurtle.towards(x, y);\n }", "public abstract void setTurtleRecursive(TurtleModel value);", "public void setTurtleOrientation(double newAngle){\n\t\tSystem.out.println(\"in set turtle orientation\");\n\t\tmyTurtle.setOrientation(newAngle);\n\t\tupdateTurtleOnView();\n\t}", "public int showTurtle () {\n myTurtleShowing = true;\n return 1;\n }", "public void addVertex();", "public void setTurtleStep(int step)\n\t{\n\t\tturt.setStepLength(step);\n\t\trepaint();\n\t}", "public void addScripture(Scripture toAdd) {\n scriptures.add(toAdd);\n }", "private void createTurtleMap () {\n turtleInstructions.put(\"Forward\", new TurtleForward());\n turtleInstructions.put(\"Backward\", new TurtleBackward());\n turtleInstructions.put(\"Right\", new TurtleRight());\n turtleInstructions.put(\"Left\", new TurtleLeft());\n turtleInstructions.put(\"SetHeading\", new TurtleSetHeading());\n turtleInstructions.put(\"SetTowards\", new TurtleSetTowards());\n turtleInstructions.put(\"SetPosition\", new TurtleSetPosition());\n turtleInstructions.put(\"PenUp\", new TurtlePenUp());\n turtleInstructions.put(\"PenDown\", new TurtlePenDown());\n turtleInstructions.put(\"ShowTurtle\", new TurtleShowTurtle());\n turtleInstructions.put(\"HideTurtle\", new TurtleHideTurtle());\n turtleInstructions.put(\"Home\", new TurtleHome());\n turtleInstructions.put(\"ClearScreen\", new TurtleClearScreen());\n turtleInstructions.put(\"XCoordinate\", new TurtleXCor());\n turtleInstructions.put(\"YCoordinate\", new TurtleYCor());\n turtleInstructions.put(\"Heading\", new TurtleHeading());\n turtleInstructions.put(\"IsPenDown\", new TurtleIsPenDown());\n turtleInstructions.put(\"IsShowing\", new TurtleIsShowing()); \n displayInstructions.put(\"SetBackground\", new DisplaySetBackground());\n displayInstructions.put(\"SetPenColor\", new DisplaySetPenColor());\n displayInstructions.put(\"SetPenSize\", new DisplaySetPenSize());\n displayInstructions.put(\"SetShape\", new DisplaySetShape());\n displayInstructions.put(\"SetPalette\", new DisplaySetPalette());\n displayInstructions.put(\"GetPenColor\", new DisplayPenColor());\n displayInstructions.put(\"GetShape\", new DisplayShape());\n displayInstructions.put(\"Stamp\", new DisplayStamp());\n displayInstructions.put(\"ClearStamps\", new DisplayClearStamps());\n multiTurtleInstructions.put(\"ID\", new TurtleID());\n multiTurtleInstructions.put(\"Turtles\", new TurtleTurtles());\n multiTurtleInstructions.put(\"Tell\", new TurtleTellMulti());\n // multiTurtleInstructions.put(\"Ask\", new TurtleAsk());\n //multiTurtleInstructions.put(\"AskWith\", new TurtleAskWith());\n }", "public void ajouterHacker() {\n hacker = new Rectangle(CONSTANTE_TAILLE * posx + CONSTANTE_TAILLE - 3, CONSTANTE_TAILLE * posy + CONSTANTE_TAILLE - 3, 6, 6);\n hacker.setFill(Color.PURPLE);\n\n g.getChildren().add(hacker);\n }", "void addVertex(Vertex v);", "private void setTurtleLocToViewTurtleLoc()\n\t{\n\t\tSystem.out.println(\" in setTurtleLocToViewTurtleLoc \" + this.myTurtle.getLoc().getX() + \" \" +this.myTurtle.getLoc().getX());\n\t\tmyTurtle.setLocation(getViewTurtleLocation());\n\t}", "public interface MovementView {\n\n /**\n * Tells the view to add al line for the turtle with the given index starting and ending at the given coordinates\n *\n * @param index - integer turtle index whose movement has drawn the line\n * @param start - coordinate start value in slogo coordinate system\n * @param end - coordinate end value in slogo coordinate system\n */\n void addLine(int index, Coordinate start, Coordinate end);\n\n /**\n * Tells the view to move the turtle with the given index from the start coordinate to the end coordinate\n *\n * @param turtleIndex - integer index of turtle to move\n * @param start - coordinate from which the turtle starts in slogo coordinate system\n * @param end - coordinate from which the turtle ends\n */\n void moveTurtle(int turtleIndex, Coordinate start, Coordinate end);\n\n /**\n * Tells the view to rotate a turtle with the given index\n *\n * @param turtleIndex - integer index of turtle to be rotated\n * @param degrees - double number of degrees to rotate the turtle clockwise\n */\n void rotateTurtle(int turtleIndex, double degrees);\n\n}", "public void setTurtleVisibility(boolean visibility){\n isTurtleVisible = visibility;\n }", "public void add(SceneShape s)\n {\n shapes.add(s);\n repaint();\n }", "public void pushState( TurtleState state ) {\n\t\tstates.push( state );\n\t}", "private void addVehicle(Vehicle v){\n\t\tthis.putResource(v);\n\t}", "abstract public TurtleModel getTurtle();", "public void addObservable (TurtleScene turtleScene, SlogoScene scene) {\n CurrentTurtleState currTurtState = myGuiManager.getMyCurrTurtState();\n\n scene.addObserver(turtleScene);\n scene.addObserver(currTurtState);\n\n Prompt prompt = myGuiManager.getMyPrompt();\n scene.addObserver(prompt);\n\n }", "public void removeTurtle(AbstractTurtle t)\n {\n // Remove the turtle from the vivarium and stop observing it\n this.turtles.remove(t);\n t.removeObserver(this);\n\n // Then, fire paint event\n this.repaint();\n }", "public void changeLocationOfTurtle(Point2D newLoc){ //WORKS\n\t\tsetTurtleLocToViewTurtleLoc();\n\t\tPoint2D locOrig = myTurtle.getLoc();\n\t\tmyTurtle.setLocation(newLoc);\n\t\tPoint2D locNew = myTurtle.getLoc();\n\t\tthis.moveTurtleImageAndDraw(locOrig, locNew);\n\t\tsetTurtleLocToViewTurtleLoc();\n\t\tthis.updateTurtleOnView();\n\t}", "public void addFriends(Double x) {\n\t\tfor (int i = 0; i < x; i++) {\n\t\t\tTurtle newTurtle = new Turtle(screen, image);\n\t\t\tnewTurtle.setID(screen.getTurtleFriends().size() + 1);\n\t\t\tscreen.getTurtleFriends().add(newTurtle);\n\t\t}\n\t}", "public void addVehicle(Vehicle v) {\n\t\tvehicles.add(v); \n\t}", "Turtle(int x, int y, String image){super(x, y, \"turtle.png\");}", "public static void add() {\n\t\trender();\n\t}", "public void showTurtle(int toShow) \n\t{\n\t\tmyTurtle.setVisibility(toShow);\n\t\tupdateTurtleOnView();\n\t}", "void rotateTurtle(int turtleIndex, double degrees);", "public V addVertex(V v);", "public Turtle(String name, int x, int y) {\n\tthis.name= name;\n\tLocX1 = 0;\n\tLocY1 = 0;\n\tLocX2 = 0;\n\tLocY2 = 0;\n\tangle = 0; // rotation angle \n\twriting = true; // default pen down\n\tcolor = Color.BLACK; // default color\n\theading = 90; // default facing north, 90 degrees\n\tdelta = 0;\n\tdraw = true;\n\ttry {\n bimg = ImageIO.read(new File(\"./Images/TurtleBlue.png\"));\n } catch (Exception e) {\n e.printStackTrace();\n }\n}", "void add(Vertex vertex);", "static void window(int length, Turtle turtle)\r\n {\r\n turtle.turnRight();\r\n turtle.forward(length);\r\n turtle.turnRight();\r\n turtle.forward(length);\r\n turtle.turnRight();\r\n turtle.forward(length);\r\n turtle.turnRight();\r\n turtle.forward(length);\r\n }", "public void addShape(TShape aShape){\r\n // fShapes.remove(aShape); // just in case it was already there\r\n\r\n /*unfortunately we need to have a front to back screen order, properties at the back\r\n (drawn first), then individuals, finally relations between individuals*/\r\n\r\n /* if (aShape instanceof TLine)\r\n fShapes.add(aShape); // add at the end\r\n else if (aShape instanceof TProperty)\r\n fShapes.add(0,aShape); // add at the beginning\r\n else {\r\n int insertIndex=0;\r\n if (fShapes.size() > 0) {\r\n Iterator iter = fShapes.iterator();\r\n\r\n while (iter.hasNext()) {\r\n if (! ((TShape) iter.next()instanceof TProperty))\r\n break; //put it after rectangles\r\n else\r\n insertIndex++;\r\n }\r\n }\r\n fShapes.add(insertIndex,aShape);\r\n }*/\r\n\r\n\r\n // aShape.setSemantics(fSemantics);\r\n\r\n aShape.addChangeListener(this); // and we'll listen for any of its changes, such as being selected\r\n\r\n addShapeToList(aShape,fShapes);\r\n\r\n if (aShape instanceof TInterpretationBoard)\r\n ((TInterpretationBoard)aShape).setSemantics(fSemantics);\r\n\r\n\r\n fPalette.check(); // some of the names may need updating\r\n\r\n repaint();\r\n }", "private void addFrindge(int v, int w) {\n\t\tgetEdge(v, w).setSelected(true);\n\t\tdouble cost = newCost(v, w);\n\t\tGreedyVertex vertex = getVertex(w);\n\t\tvertex.setFringe(true);\n\t\tvertex.setParent(v);\n\t\tvertex.setCost(cost);\n\t\tp.add(vertex);\n\t}", "public ViewHandler(LineView lv, TurtleView tv, BackgroundView bk, PenHandler penHandler){\n\t\tmyLineView = lv;\n\t\tmyTurtleView = tv;\n\t\tmyPenHandler = penHandler;\n\t\tmyBackgroundView = bk;\n\t\tmyTurtle = new Turtle();\n\t\tthis.initializeTurtle();\n\t}", "private static void addShaped()\n {}", "public Environment(final Turtle turtle, final Environment parent) {\n this.turtle = turtle;\n this.parent = parent;\n }", "public static void main(String[] args) {\n\tTurtle t[]=new Turtle [5];\n\tint temp[]=new int [5];\n\tScanner in=new Scanner(System.in);\n\tint num;\n\tSystem.out.println(\"Choose the type of a turtle:\\n1. Simple\\n2. Smart\\n3. Drunk\\n4. Jumpy\");\n\tfor (int i = 0; i < t.length; i++) {\n\t\tSystem.out.println(\"Enter the \" + (i+1) + \"st Turtle\");\n\t\tnum=in.nextInt();\n\t\tif(num<0||num>4){\n\t\t\twhile(num<0||num>4){\n\t\t\t\tSystem.out.println(\"Erorr number! plase enter new number:\");\n\t\t\t\tnum=in.nextInt();\n\t\t\t}\n\t\t}\n\t\t\t\n\t\ttemp[i]=num;\n\t\tif(num==1)\n\t\t\tt[i]=new SimpleTurtle();\n\t\tif(num==2)\n\t\t\tt[i]= new SmartTurtle();\n\t\tif(num==3)\n\t\t\tt[i]=new DrunkTurtle();\n\t\tif(num==4)\n\t\t\tt[i]= new JumpyTurtle();\n\t}\n\t\n\tfor (int i =0; i < t.length; i++) {\n\t\tt[i].tailDown();\n\t}\n\tfor (int i = 0; i < t.length; i++) {\n\t\tt[i].moveForward(100);\n\t}\n\t\n\tfor (int i = 0; i < t.length; i++) {\n\t\tt[i].turnRight(90);\n\t}\n\t\n\tfor (int i = 0; i < t.length; i++) {\n\t\tt[i].moveForward(100);\n\t}\n\tfor (int i = 0; i < t.length; i++) {\n\t\tif(temp[i]==2 || temp[i]==4)\n\t\t\t((SmartTurtle) t[i]).drawPolygon(6,70);\n\t}\n\tfor (int i = 0; i < t.length; i++) {\n\t\tt[i].hide();\n\t}\n\t\t\n\t}", "public void add(RayHandler rayHandler);", "public VivariumPanel()\n {\n // Call super constructor\n super();\n\n // Initialize properties\n this.turtles = new HashSet<>();\n this.isDebug = false;\n }", "public void addVertex(T v) {\n map.put(v, new LinkedList<>());\n }", "private static void drawSignature(Turtle turtle1, Turtle turtle2)\n {\n turtle1.forward(300);\n turtle1.turnRight();\n turtle1.forward(150);\n turtle1.turnRight();\n turtle1.forward(300);\n \n turtle2.forward(150);\n turtle2.turnRight();\n turtle2.forward(150); //finishes the \"A\" letter\n \n turtle2.penUp(); // relocates turtles\n turtle1.penUp();\n turtle2.forward(150);\n turtle1.turnLeft();\n turtle1.forward(150);\n \n turtle1.penDown();// gets ready to draw\n turtle2.penDown();\n \n turtle1.forward(150); // draws 'L'\n turtle2.turnLeft();\n turtle2.forward(150);\n turtle2.turnLeft();\n turtle2.turnLeft();\n turtle2.forward(300);\n \n turtle2.turnLeft(); // relocates turtle\n turtle2.penUp();\n turtle2.forward(300);\n turtle1.penUp();\n turtle1.forward(150);\n \n turtle1.penDown(); // gets ready to draw\n turtle2.penDown(); \n \n turtle2.turnLeft(); // Draws the 'E'\n turtle2.forward(300);\n turtle2.turnRight();\n turtle2.forward(150);\n turtle1.forward(150);\n turtle1.turnLeft();\n turtle1.penUp();\n turtle1.forward(150);\n turtle1.turnLeft();\n turtle1.penDown();\n turtle1.forward(150);\n \n turtle1.penUp(); // Relocate the turtles\n turtle2.penUp();\n turtle1.turnLeft();\n turtle1.turnLeft();\n turtle1.forward(300);\n turtle1.turnRight();\n turtle1.forward(150);\n turtle2.forward(150);\n \n turtle1.penDown();\n turtle2.penDown();\n \n turtle1.turn(-153.435); // i did some trig so that the \"X\" is 300 units high and 150 wide\"\n turtle2.turn(63.435);\n \n turtle1.forward(335); // same as last comment\n turtle2.forward(335);\n \n \n \n }", "public void addPolyGon() {\n abstractEditor.drawNewShape(new ESurfaceDT());\n }", "public void addShape(Shapes obj) {\n \tthis.listShapes.add(obj);\n W.repaint();\n }", "public boolean addVertex(T vert);", "void add(int vertex);", "void addTriangle(AbstractTriangle t);", "public void addVehicle(Vehicle vehicle) {\n this.vehicles.add(vehicle);\n }", "public void addEdge(T v, T w) {\n\t\tadj[v].add(w);\r\n\t\tadj[w].add(v);\r\n\t}", "public void setInfoParamsOfTurtleAndLine()\n\t{\n\t\tthis.myTurtleView.setTurtleInfo(\"Position: \\t\\t[\" + Math.floor(getTurtleLocation().getX()) + \", \" + Math.floor(getTurtleLocation().getY()) + \"]\"\n\t\t\t\t+ \" \\n\" + \"Heading: \\t\\t\" + this.getTurtleOrientation()\n\t\t\t\t+ \" \\n\" + \"Pen Status: \\t\" + myPenHandler.getPenStatus()\n\t\t\t\t);\n\t\t\n\t\tthis.myPenHandler.setThicknessParameter();\n\t}", "public void makeTea() {\n\t\tboil();\n\t\taddSugar();\n\t\taddTea();\n\t\tserve();\n\t}", "public void addVertex (){\t\t \n\t\tthis.graph.insert( new MyList<Integer>() );\n\t}", "public int isTurtleShowing () {\n if (myTurtleShowing) return 1;\n return 0;\n }", "public void removeTurtles()\n {\n // Stop observing every turtle\n for(AbstractTurtle t : this.turtles)\n {\n t.removeObserver(this);\n }\n\n // And remove them from the vivarium\n this.turtles.clear();\n\n // Then, fire paint event\n this.repaint();\n }", "void add(Shape aShape);", "public void addVehicle(Vehicle vehicle) {\n\t\tvehicleList.add(vehicle);\n\t\tSystem.out.println(vehicle.getMake() + \" added to garage!\");\n\t}", "public void addShape(Shape shape)\n {\n shapes.add(shape);\n }", "public boolean isTurtleVisible(){\n return isTurtleVisible;\n }", "int addVertex(Vector position);", "public void rotateTurtle(double deg){\n\t\tSystem.out.println(\"in rotate\");\n\n\t\tmyTurtle.turn(deg);\n\t\tthis.updateTurtleOnView();\n\t}", "boolean addVertex(V v);", "void addEdge(int v, int w) {\n adj [v].add(w);\n }", "@Override\r\n public void add(T value) {\r\n Vertex<T> vertex = new Vertex<>(value);\r\n vertices.put(value, vertex);\r\n }", "public void add_(JType value) {\n TH.THTensor_(add)(this, this, value);\n }", "public void addTreasure(Treasure theTreasure) {\n treasure = theTreasure;\n treasures.add(theTreasure);\n }", "public void setTurtleImage(Image turtleImage) {\n this.turtleImage = turtleImage;\n }", "public PenUp(List<Turtle> turtleList, List<Double> doubleList, List<List<Command>> commandList, List<String> stringList) {\n super(NOT_DRAWING);\n t = turtleList.get(FIRST_INDEX);\n }", "public void addVertex(Vertex vertexToAdd) {\r\n\t\tlistVertex.add(vertexToAdd);\r\n\t}", "public void addTreasure(Treasure treasure) {\r\n\r\n invPower += treasure.getPower();\r\n invDefense += treasure.getDefense();\r\n invSpeed += treasure.getSpeed();\r\n invAwareness += treasure.getAwareness();\r\n invValue+=treasure.getValue();\r\n treasures.add(treasure);\r\n }", "public void moveTurtle(double distance){ // WORKS\n\t\tSystem.out.println(\"in move\");\n\n\t\tsetTurtleLocToViewTurtleLoc();\n\t\tPoint2D locOrig = myTurtle.getLoc();\n\t\tSystem.out.println(\" in move - setTurtleLocToViewTurtleLoc 1\");\n\t\tsetTurtleLocToViewTurtleLoc();\n\t\tmyTurtle.move(distance);\n\t\tPoint2D locNew = myTurtle.getLoc();\n\t\tthis.moveTurtleImageAndDraw(locOrig, locNew);\n\t\t//System.out.println(\" in move - setTurtleLocToViewTurtleLoc 2\");\n\t\tsetTurtleLocToViewTurtleLoc();\n\n\t\tthis.updateTurtleOnView();\n\t}", "public void add(HighlightToken t) {\n\t\thighlightsByToken.put(getKey(t), t);\n\t}", "public void addVehicle(Vehicle vehicle) {\n\t\tvehicles.add(vehicle);\n\t}", "void addEdge(int v, int w)\n {\n adj[v].add(w);\n }", "private void add(Tile t) {\n tileBag.add(t);\n shuffleBag();\n }", "public void drawSquare(double size) {\r\n\t\t\r\n\t\t//if the size is a negative number, throw an error\r\n\t\tif (size <= 0) {\r\n\t\t\tthrow new RuntimeException(\"Errordaniel - invalid size\");\r\n\t\t}\r\n\r\n\t\t//by the saved word 'super' we call to 'tailDown' function in 'SimpleTurtle' class from that we inherit her\r\n\t\t//take the turtle tail down so he will leave traces\r\n\t\tsuper.tailDown();\r\n\r\n\t\t//a square has 4 sides so the turtle should be rotated after 3 sides.\r\n\t\tfor (int i = 0; i < 3; i++) {\r\n\t\t\tmoveForward(size);\r\n\t\t\tsuper.turnRight(90);\r\n\t\t}\r\n\r\n\t\t//paint the last side\r\n\t\tmoveForward(size);\r\n\t}", "@Override\n public void addValue(T value) {\n Vertex<T> vertex = new Vertex<>(value);\n vertices.put(value,vertex);\n }" ]
[ "0.72938776", "0.71137863", "0.669617", "0.63506895", "0.6293954", "0.5945455", "0.58194774", "0.5618344", "0.55267715", "0.5522469", "0.5493655", "0.544885", "0.5444603", "0.5437452", "0.5382842", "0.535688", "0.5333603", "0.53260857", "0.5308796", "0.52922803", "0.528596", "0.5284133", "0.5240419", "0.5230589", "0.5212682", "0.51796865", "0.51492316", "0.5147749", "0.51222634", "0.51139754", "0.51122147", "0.51023877", "0.50947684", "0.5070233", "0.5059023", "0.5054274", "0.50342715", "0.5033076", "0.5031681", "0.5028907", "0.50202453", "0.50079775", "0.4971654", "0.49705532", "0.49678645", "0.49514258", "0.4950292", "0.49464905", "0.49355608", "0.49320534", "0.4925903", "0.49236515", "0.4903656", "0.49018452", "0.4886052", "0.48776865", "0.48584062", "0.48561987", "0.48469502", "0.48466843", "0.4842422", "0.483111", "0.48277545", "0.48208618", "0.48128155", "0.47944656", "0.47724265", "0.47507265", "0.47428447", "0.47392276", "0.47332463", "0.47306475", "0.4706966", "0.47065037", "0.47016507", "0.4699409", "0.46990395", "0.46941754", "0.46925685", "0.46919447", "0.46902862", "0.46875596", "0.46872652", "0.46867985", "0.46860623", "0.468288", "0.4680338", "0.46727738", "0.46617907", "0.46578935", "0.46503687", "0.46466696", "0.4641284", "0.46354654", "0.46328104", "0.46316355", "0.46288484", "0.46275592", "0.46272448", "0.46204436" ]
0.8045978
0
Adds a set of turtles to the vivarium.
public void addTurtles(Set<AbstractTurtle> turtles) { // Start observing every turtle for(AbstractTurtle t : turtles) { t.addObserver(this); } // And remove them from the vivarium this.turtles.addAll(turtles); // Then, fire paint event this.repaint(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addTurtle(AbstractTurtle t)\n {\n // Add the turtle to the vivarium and observe it\n this.turtles.add(t);\n t.addObserver(this);\n\n // Then, fire paint event\n this.repaint();\n }", "public abstract void addTurtle(Turtle turtle, boolean isActive);", "private void addTurtle(double d, double height) {\n\t\t\n\t}", "public void createTurtle (TurtleView tView) {\n myController.createTurtle(tView);\n }", "public void addFriends(Double x) {\n\t\tfor (int i = 0; i < x; i++) {\n\t\t\tTurtle newTurtle = new Turtle(screen, image);\n\t\t\tnewTurtle.setID(screen.getTurtleFriends().size() + 1);\n\t\t\tscreen.getTurtleFriends().add(newTurtle);\n\t\t}\n\t}", "private void addTrucks(int numTrucks, int capacity, int radius) {\r\n for (int i = 0; i < numTrucks; i++) {\r\n trucks.add(new Truck(capacity, this, radius)); //add in new truck with designated capacity and warehouse\r\n }\r\n }", "public void removeTurtles()\n {\n // Stop observing every turtle\n for(AbstractTurtle t : this.turtles)\n {\n t.removeObserver(this);\n }\n\n // And remove them from the vivarium\n this.turtles.clear();\n\n // Then, fire paint event\n this.repaint();\n }", "public abstract void hardSetActiveTurtles(Collection<Integer> turtleIDs);", "public void addToUniverse(final Universe uni) {\n\t\tfor (Triangle t : getTriangles())\n\t\t\tuni.add(t);\n\t}", "private void setTaunts(String taunt1, String taunt2, String taunt3){\n\t\ttaunts.add(taunt1); // adds taunts to the arraylist\n\t\ttaunts.add(taunt2);\n\t\ttaunts.add(taunt3);\n\t}", "public void add(LorentzVector... vects) {\n\t\tfor (LorentzVector vect : vects) {\n\t\t\tthis.vector.add(vect.vect());\n\t\t\tthis.energy = this.e() + vect.e();\n\t\t}\n\t}", "public void addTetrad(Tetrad tetrad, GameplayState gps) {\n for (int i = 0; i < 4; i++) {\n addBlock(tetrad.getCoords()[i].x, tetrad.getCoords()[i].y, tetrad.getBlocks()[i], gps);\n }\n }", "public void add(T toy) {\n // Complete add method with proper argument and method body\n v.add(toy);\n }", "public void addLineVehicles(Circle c)\r\n {\r\n this.all_line_vehicles.add(c);\r\n return;\r\n }", "private void createTurtleMap () {\n turtleInstructions.put(\"Forward\", new TurtleForward());\n turtleInstructions.put(\"Backward\", new TurtleBackward());\n turtleInstructions.put(\"Right\", new TurtleRight());\n turtleInstructions.put(\"Left\", new TurtleLeft());\n turtleInstructions.put(\"SetHeading\", new TurtleSetHeading());\n turtleInstructions.put(\"SetTowards\", new TurtleSetTowards());\n turtleInstructions.put(\"SetPosition\", new TurtleSetPosition());\n turtleInstructions.put(\"PenUp\", new TurtlePenUp());\n turtleInstructions.put(\"PenDown\", new TurtlePenDown());\n turtleInstructions.put(\"ShowTurtle\", new TurtleShowTurtle());\n turtleInstructions.put(\"HideTurtle\", new TurtleHideTurtle());\n turtleInstructions.put(\"Home\", new TurtleHome());\n turtleInstructions.put(\"ClearScreen\", new TurtleClearScreen());\n turtleInstructions.put(\"XCoordinate\", new TurtleXCor());\n turtleInstructions.put(\"YCoordinate\", new TurtleYCor());\n turtleInstructions.put(\"Heading\", new TurtleHeading());\n turtleInstructions.put(\"IsPenDown\", new TurtleIsPenDown());\n turtleInstructions.put(\"IsShowing\", new TurtleIsShowing()); \n displayInstructions.put(\"SetBackground\", new DisplaySetBackground());\n displayInstructions.put(\"SetPenColor\", new DisplaySetPenColor());\n displayInstructions.put(\"SetPenSize\", new DisplaySetPenSize());\n displayInstructions.put(\"SetShape\", new DisplaySetShape());\n displayInstructions.put(\"SetPalette\", new DisplaySetPalette());\n displayInstructions.put(\"GetPenColor\", new DisplayPenColor());\n displayInstructions.put(\"GetShape\", new DisplayShape());\n displayInstructions.put(\"Stamp\", new DisplayStamp());\n displayInstructions.put(\"ClearStamps\", new DisplayClearStamps());\n multiTurtleInstructions.put(\"ID\", new TurtleID());\n multiTurtleInstructions.put(\"Turtles\", new TurtleTurtles());\n multiTurtleInstructions.put(\"Tell\", new TurtleTellMulti());\n // multiTurtleInstructions.put(\"Ask\", new TurtleAsk());\n //multiTurtleInstructions.put(\"AskWith\", new TurtleAskWith());\n }", "public void vampireAdd(){\n //Will permit to know if every vampires are different\n Set<Being> swap = new HashSet();\n\n //Iterate till the set is equal to the number of vampire we need\n while(swap.size() != this.vampires){\n //Create a new vampire\n Vampire vamp = vampireSet();\n //Test if the vampire is unique\n if(swap.add(vamp)){\n //Add the vampire to the real list if it's unique\n this.beings.add(vamp);\n }\n }\n //Clear the set, I guess it's optional\n swap.clear();\n }", "public void addRayTrajectories()\n\t{\n\t\tclear();\n\t\t\n\t\tdouble sin = Math.sin(hyperboloidAngle);\n\n\t\t// Three vectors which form an orthogonal system.\n\t\t// a points in the direction of the axis and is of length cos(coneAngle);\n\t\t// u and v are both of length sin(coneAngle).\n\t\tVector3D\n\t\ta = axisDirection.getWithLength(Math.cos(hyperboloidAngle)),\n\t\tu = Vector3D.getANormal(axisDirection).getNormalised(),\n\t\tv = Vector3D.crossProduct(axisDirection, u).getNormalised();\n\t\t\n\t\tfor(int i=0; i<numberOfRays; i++)\n\t\t{\n\t\t\tdouble\n\t\t\t\tphi = 2*Math.PI*i/numberOfRays,\n\t\t\t\tcosPhi = Math.cos(phi),\n\t\t\t\tsinPhi = Math.sin(phi);\n\t\t\taddSceneObject(\n\t\t\t\t\tnew EditableRayTrajectory(\n\t\t\t\t\t\t\t\"trajectory of ray #\" + i,\n\t\t\t\t\t\t\tVector3D.sum(\n\t\t\t\t\t\t\t\t\tstartPoint,\n\t\t\t\t\t\t\t\t\tu.getProductWith(waistRadius*cosPhi),\n\t\t\t\t\t\t\t\t\tv.getProductWith(waistRadius*sinPhi)\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tstartTime,\n\t\t\t\t\t\t\tVector3D.sum(\n\t\t\t\t\t\t\t\t\ta,\n\t\t\t\t\t\t\t\t\tu.getProductWith(-sin*sinPhi),\n\t\t\t\t\t\t\t\t\tv.getProductWith( sin*cosPhi)\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\trayRadius,\n\t\t\t\t\t\t\tsurfaceProperty,\n\t\t\t\t\t\t\tmaxTraceLevel,\n\t\t\t\t\t\t\tfalse,\t// reportToConsole\n\t\t\t\t\t\t\tthis,\t// parent\n\t\t\t\t\t\t\tgetStudio()\n\t\t\t\t\t\t)\n\t\t\t\t);\n\t\t}\n\t}", "abstract public void setTurtle(TurtleModel t);", "void moveTurtle(int turtleIndex, Coordinate start, Coordinate end);", "@Override\n public void paint(Graphics g)\n {\n super.paint(g);\n\n if(g instanceof Graphics2D)\n {\n // Initialize vars\n Graphics2D graphics = (Graphics2D) g;\n Dimension panelDimension = this.getSize();\n Rectangle2D turtleBounds;\n int fontHeight = g.getFontMetrics().getHeight();\n\n // Clear drawing sheet\n graphics.setColor(Color.WHITE);\n graphics.fillRect(0, 0, (int) panelDimension.getWidth(), (int) panelDimension.getHeight());\n\n // Draw every turtle\n for(AbstractTurtle turtle : this.turtles)\n {\n // Draw the turtle's shape\n graphics.setColor(turtle.getColor());\n graphics.fill(turtle.getShape());\n\n // Debug mode\n if(this.isDebug)\n {\n // Draw the turtle's sight\n graphics.setColor(Color.BLACK);\n graphics.draw(turtle.getSight());\n\n // Draw the turtle's center\n graphics.setColor(Color.CYAN);\n graphics.drawLine(\n (int) turtle.getX() - 10,\n (int) turtle.getY(),\n (int) turtle.getX() + 10,\n (int) turtle.getY()\n );\n graphics.drawLine(\n (int) turtle.getX(),\n (int) turtle.getY() - 10,\n (int) turtle.getX(),\n (int) turtle.getY() + 10\n );\n\n // Write the turtle's speed\n turtleBounds = turtle.getShape().getBounds2D();\n\n graphics.setColor(Color.BLACK);\n graphics.drawString(\n \"Vitesse : \" + String.format(\"%.2f\", turtle.getSpeed()),\n (int) turtleBounds.getMaxX() + 5,\n (int) turtleBounds.getMinY() - 5\n );\n graphics.drawString(\n \"Direction : \" + String.format(\"%.2f\", turtle.getDirection()),\n (int) turtleBounds.getMaxX() + 5,\n (int) turtleBounds.getMinY() - 5 + fontHeight\n );\n }\n }\n }\n }", "public void addMultipleElements(View v) {\r\n mAddNMoreElements = 4;\r\n addElement(v);\r\n }", "public void updateTurtleOnView()\n\t{\n\t\t// update turtle info to View\n\t\tsetInfoParamsOfTurtleAndLine();\n\t\t\n\t\tif (this.isVisible() == 1)\n\t\t{\n\t\t\t// make turtle visible, then update turtle movement\n\t\t\tthis.myTurtleView.showTurtle(true);\n\t\t\tthis.myTurtleView.rotateAndMoveTurtle(this.getTurtleLocation(), this.getTurtleOrientation());\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// tell view to make turtle invisible\n\t\t\tthis.myTurtleView.showTurtle(false);\n\t\t}\n\t}", "public Collection<V> addVertices(Collection<V> vs);", "public void addScripture(Scripture toAdd) {\n scriptures.add(toAdd);\n }", "public void addAll(SelectionSet newSet)\n {\n elements.addAll(newSet.elements);\n }", "public static void main(String[] args) {\n\tTurtle t[]=new Turtle [5];\n\tint temp[]=new int [5];\n\tScanner in=new Scanner(System.in);\n\tint num;\n\tSystem.out.println(\"Choose the type of a turtle:\\n1. Simple\\n2. Smart\\n3. Drunk\\n4. Jumpy\");\n\tfor (int i = 0; i < t.length; i++) {\n\t\tSystem.out.println(\"Enter the \" + (i+1) + \"st Turtle\");\n\t\tnum=in.nextInt();\n\t\tif(num<0||num>4){\n\t\t\twhile(num<0||num>4){\n\t\t\t\tSystem.out.println(\"Erorr number! plase enter new number:\");\n\t\t\t\tnum=in.nextInt();\n\t\t\t}\n\t\t}\n\t\t\t\n\t\ttemp[i]=num;\n\t\tif(num==1)\n\t\t\tt[i]=new SimpleTurtle();\n\t\tif(num==2)\n\t\t\tt[i]= new SmartTurtle();\n\t\tif(num==3)\n\t\t\tt[i]=new DrunkTurtle();\n\t\tif(num==4)\n\t\t\tt[i]= new JumpyTurtle();\n\t}\n\t\n\tfor (int i =0; i < t.length; i++) {\n\t\tt[i].tailDown();\n\t}\n\tfor (int i = 0; i < t.length; i++) {\n\t\tt[i].moveForward(100);\n\t}\n\t\n\tfor (int i = 0; i < t.length; i++) {\n\t\tt[i].turnRight(90);\n\t}\n\t\n\tfor (int i = 0; i < t.length; i++) {\n\t\tt[i].moveForward(100);\n\t}\n\tfor (int i = 0; i < t.length; i++) {\n\t\tif(temp[i]==2 || temp[i]==4)\n\t\t\t((SmartTurtle) t[i]).drawPolygon(6,70);\n\t}\n\tfor (int i = 0; i < t.length; i++) {\n\t\tt[i].hide();\n\t}\n\t\t\n\t}", "public void add(double sthis, Vec vthat, double sthat);", "public void add(SceneShape s)\n {\n shapes.add(s);\n repaint();\n }", "myGame.addTower(Tower thisTower){ // adding a tower to the game\n towers.add(thisTower); // adding a tower to the set that contains all the towers\n }", "public void addWheelItems(List<WheelItem> wheelItems) {\n wheelView.addWheelItems(wheelItems);\n }", "public static void add(List<Double> vector, List<Double> toAdd) {\n for (int i = 0; i < vector.size(); i++) {\n double sum = vector.get(i) + toAdd.get(i);\n vector.set(i, sum);\n }\n }", "public void makeTea() {\n\t\tboil();\n\t\taddSugar();\n\t\taddTea();\n\t\tserve();\n\t}", "void addAll(Graph graph);", "public VivariumPanel()\n {\n // Call super constructor\n super();\n\n // Initialize properties\n this.turtles = new HashSet<>();\n this.isDebug = false;\n }", "public void addElts(Bars bar){\r\n BarsList.add(bar);\r\n }", "public void add(Shape shapes) {\n\t\tshapesList.add(shapes);\n\t}", "@Override\n public void addVertex(Set<V> psetVertices, TimeFrame tf) {\n for (V v : psetVertices) {\n addVertex(v,tf);\n }\n }", "public void addVehicle(Vehicle v) {\n\t\tvehicles.add(v); \n\t}", "public void addAll (SetADT<T> set);", "public abstract Collection<Turtle> getAllTurtles();", "Turtle createTurtle();", "public void addTrap(Trap trap)\n\t{\n\t\ttraps.add(trap);\n\t}", "public void addObservable (TurtleScene turtleScene, SlogoScene scene) {\n CurrentTurtleState currTurtState = myGuiManager.getMyCurrTurtState();\n\n scene.addObserver(turtleScene);\n scene.addObserver(currTurtState);\n\n Prompt prompt = myGuiManager.getMyPrompt();\n scene.addObserver(prompt);\n\n }", "public void addLights(LightSource... lights) {\n if(lights == null){\n return;\n }\n\n for (LightSource lightSource: lights\n ) {\n _lights.add(lightSource);\n }\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic boolean addVertices(V... vs);", "public void addRobot(Robot robot) {\r\n this.robots.add(robot);\r\n this.vue.poserRobot(robot, getCoordBase());\r\n }", "static void equilateral(int length, Turtle turtle) \r\n {\r\n turtle.turn(30);\r\n turtle.forward(length);\r\n turtle.turn(120);\r\n turtle.forward(length);\r\n turtle.turn(120);\r\n turtle.forward(length);\r\n turtle.turnRight();\r\n }", "public void addLight(LightSource... lights) {\r\n for (int i = 0; i < lights.length; ++i)\r\n _lights.add(lights[i]);\r\n }", "public void addVillagers(ArrayList<Sprite> removedVillagers) {\n\t\tfor (int i = 0; i < removedVillagers.size(); i++) {\n\t\t\tSprite as = removedVillagers.get(i);\n\t\t\tif (as instanceof Villager) {\n\t\t\t\tVillager v = (Villager) as;\n\t\t\t\t// v.setStartToPos(v.getPos());\n\t\t\t\t// v.reset();\n\t\t\t\tsprites.put(v.hashCode(), v);\n\t\t\t\t// executeTrigger(v);\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < player.getPartyMembers().size(); i++) {\n\t\t\tSprite as = player.getPartyMembers().get(i);\n\t\t\tsprites.put(as.hashCode(), as);\n\t\t}\n\t\tupdateSpriteList();\n\t}", "public void add(T v) {\n add(new Node(v));\n }", "public void addElements(SvgElement... elements) {\n Objects.requireNonNull(elements);\n children.addAll(Arrays.asList(elements));\n updateChildrenAttribute();\n }", "public void addAll(GuiElementBase... elements)\n\t\t{ for (GuiElementBase element : elements) add(element); }", "public void addAll(Vector<JBurgPatternMatcher> patterns)\n {\n for ( JBurgPatternMatcher child: patterns)\n addChild(child);\n }", "public void sunAndTwoPlanets()\n {\n removeAllObjects();\n addObject (new Body (50, 240.0, new Vector(270, 0.0), new Color(255, 216, 0)), 460, 310);\n addObject (new Body (20, 4.2, new Vector(90, 2.2), new Color(0, 124, 196)), 695, 300);\n addObject (new Body (24, 4.6, new Vector(270, 1.8), new Color(248, 160, 86)), 180, 290);\n }", "T addGraphs(Graph... graphs);", "public void add(Lugar g){\n lugares.add(g);\n }", "public static void addBalls() {\n\t\tfor (int i = 0; i < numberOfBalls; i++) {\n\t\t\tPanel.balls.add(new Ball());\n\t\t}\n\t}", "public abstract void setTurtleRecursive(TurtleModel value);", "public void addTarifs(List<Tarif> list) {\n\t\ttarifs.addAll(list);\n\t}", "public abstract Collection<Turtle> getActiveTurtles();", "public void add(Shape s)\n {\n shapes.add(s);\n }", "private static void addVowels(ArrayList<Character> vowels) {\n vowels.add('a');\n vowels.add('e');\n vowels.add('i');\n vowels.add('o');\n vowels.add('u');\n }", "public void pushState( TurtleState state ) {\n\t\tstates.push( state );\n\t}", "@SafeVarargs\n public final void add(ArrayList<Stage>... stages){\n rfh.addRFs(defineStageNum, stages);\n defineStageNum++;\n }", "public void addCircle(Circle circle){\n circles.add(circle);\n }", "private void initializeTurtle()\n\t{\n\t\tImage image = new Image(getClass().getResourceAsStream(\"/resources/rsz_turtle.png\"));\n\t\tthis.myTurtleView.initializeTurtle(image);\n\t\tsetInfoParamsOfTurtleAndLine();\n\t}", "public void addGas(double gallons)\n {\n this.fuelInTank = this.fuelInTank + gallons;\n }", "@When(\"^: Add them to the cart$\")\r\n\tpublic void add_them_to_the_cart() throws Throwable {\n\t\tobj.search();\r\n\t}", "void addTriangle(int vertexIndex1, int vertexIndex2, int vertexIndex3);", "public void addOverrides(List<JMethod> toAdd) {\n assert canBePolymorphic();\n overrides = Lists.addAll(overrides, toAdd);\n }", "private void addColors() {\n colors.add(Color.GRAY);\n colors.add(Color.BLUE);\n colors.add(Color.DKGRAY);\n colors.add(Color.CYAN);\n colors.add(Color.MAGENTA);\n //Zijn voorlopig maar 5 kleuren, kan altijd makkelijk meer doen, wil ook liever hex-based kleuren gaan gebruiken.\n }", "private void addVerticesToGraph()\n\t{\n\t\tString vertexName;\n\n\t\tMap<Long, IOFSwitch> switches = this.floodlightProvider.getSwitches();\n\t\tfor(IOFSwitch s :switches.values())\n\t\t{\n\t\t\tvertexName =Long.toString(s.getId());\n\t\t\tm_graph.addVertex(vertexName);\t\t\t \t\t\t \n\t\t}\n\t\tSystem.out.println(m_graph);\n\t}", "public PenUp(List<Turtle> turtleList, List<Double> doubleList, List<List<Command>> commandList, List<String> stringList) {\n super(NOT_DRAWING);\n t = turtleList.get(FIRST_INDEX);\n }", "public void addVertex();", "private void addFrindge(int v, int w) {\n\t\tgetEdge(v, w).setSelected(true);\n\t\tdouble cost = newCost(v, w);\n\t\tGreedyVertex vertex = getVertex(w);\n\t\tvertex.setFringe(true);\n\t\tvertex.setParent(v);\n\t\tvertex.setCost(cost);\n\t\tp.add(vertex);\n\t}", "public void addAll(ArrayList<Taking> items){\n if(this.mTakings == null){\n this.mTakings = new ArrayList<>();\n }\n this.mTakings.addAll(items);\n notifyDataSetChanged();\n }", "public void addVertex (){\t\t \n\t\tthis.graph.insert( new MyList<Integer>() );\n\t}", "public interface MovementView {\n\n /**\n * Tells the view to add al line for the turtle with the given index starting and ending at the given coordinates\n *\n * @param index - integer turtle index whose movement has drawn the line\n * @param start - coordinate start value in slogo coordinate system\n * @param end - coordinate end value in slogo coordinate system\n */\n void addLine(int index, Coordinate start, Coordinate end);\n\n /**\n * Tells the view to move the turtle with the given index from the start coordinate to the end coordinate\n *\n * @param turtleIndex - integer index of turtle to move\n * @param start - coordinate from which the turtle starts in slogo coordinate system\n * @param end - coordinate from which the turtle ends\n */\n void moveTurtle(int turtleIndex, Coordinate start, Coordinate end);\n\n /**\n * Tells the view to rotate a turtle with the given index\n *\n * @param turtleIndex - integer index of turtle to be rotated\n * @param degrees - double number of degrees to rotate the turtle clockwise\n */\n void rotateTurtle(int turtleIndex, double degrees);\n\n}", "public void makeTea(){\n size();\n temp();\n type();\n additives();\n }", "void addVertex(Vertex v);", "@Override\n\tpublic void add(double dx, double dy) {\n\t\t\n\t}", "public boolean addVertices(Collection<? extends V> vertices);", "public void addAll(ArrayList<Tweet> tweets) {\n\t\taTweets.addAll(tweets);\n\t}", "public void addElts(Meters meter){\r\n MetersList.add(meter);\r\n }", "void addAntecedents(LayerType... types) {\n this.antecedents.addAll(Arrays.asList(types));\n }", "org.landxml.schema.landXML11.SpeedsDocument.Speeds addNewSpeeds();", "private void add(Tile t) {\n tileBag.add(t);\n shuffleBag();\n }", "public void sunAndPlanet()\n {\n removeAllObjects();\n addObject (new Body (50, 240.0, new Vector(270, 0.03), new Color(255, 216, 0)), 460, 270);\n addObject (new Body (20, 4.2, new Vector(90, 2.2), new Color(0, 124, 196)), 695, 260);\n }", "public void addTargets (Set<GameElement> sprites) {\n myTargets.clear();\n sprites.forEach(s -> myTargets.add(s));\n }", "public Turtle(ScreenBox turtle_screen, Image turtle_image) {\n\t\tscreen = turtle_screen;\n\t\timage = turtle_image;\n\t\timageList.add(image);\n\t\tinitalizeTurtle();\n\t}", "public void setTurtleActive(boolean turtleActive) {\n isTurtleActive = turtleActive;\n }", "void add(int vertex);", "public void addShape(Shapes obj) {\n \tthis.listShapes.add(obj);\n W.repaint();\n }", "public void addVertices(int n);", "public void add (V u, V v) {\n this.add(u); this.add(v);\n dag.get(u).add(v);\n \n List<V> newVertexOrder = getNewVertexOrderIfAcyclic();\n if(newVertexOrder == null){\n \t/**\n \t * This will be null only when the graph is cyclic. Remove the current added edge to remove the cycle.\n \t */\n \tremove(u,v);\n }else{\n \tvertexOrder = newVertexOrder;\n }\n }", "void updateTrails() {\r\n\t\tint from, to;\r\n\t\t\r\n\t\t// Pheromone evaporation\r\n\t\tfor(from = 0; from < cities.length; from++) {\r\n\t\t\tfor(to = 0; to < cities.length; to++) {\r\n\t\t\t\tif(from != to) {\r\n\t\t\t\t\tpheromone[from][to] *= (1.0 - RHO);\r\n\t\t\t\t\tif(pheromone[from][to] < 0.0) pheromone[from][to] = INIT_PHEROMONE; \r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// add new pheromone to the trails\r\n\t\t// look at the tours of each ant\r\n\t\tfor(int ai = 0; ai < ants.length; ai++) {\r\n\t\t\tAnt ant = ants[ai];\r\n\t\t\t// update each leg of the tour given the tour length\r\n\t\t\tfor(int i = 0; i < cities.length; i++) {\r\n\t\t\t\tif(i < cities.length - 1) {\r\n\t\t\t\t\tfrom = ant.path[i];\r\n\t\t\t\t\tto = ant.path[i + 1];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfrom = ant.path[i];\r\n\t\t\t\t\tto = ant.path[0];\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tpheromone[from][to] += ((QVAL / ant.tourLength) * RHO);\r\n\t\t\t\tpheromone[to][from] = pheromone[from][to];\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void AddAnimal(int amount, float xPos, float yPos)\n {\n for (int i = 0; i < amount; i++)\n {\n Animal newAnimal = new Animal(xPos, yPos, birds.size());\n birds.add(newAnimal);\n }\n }", "private void addVehicle(Vehicle v){\n\t\tthis.putResource(v);\n\t}", "public void usa(){\n stroke(1);\n //back guns\n fill(0);\n rect(73,192,4,15);\n rect(224,192,4,15);\n rect(71,207,8,15);\n rect(222,207,8,15);\n rect(66,207,3,15);\n rect(232,207,3,17);\n rect(122,109,4,15);\n rect(175,110,4,15);\n rect(121,120,6,15);\n rect(174,120,6,15);\n rect(116,124,3,15);\n rect(182,124,3,15);\n\n //wings\n fill(1,0,74);//dark blue\n beginShape();\n vertex(14,286);\n vertex(61,236);\n vertex(88,308);\n vertex(51,334);\n vertex(14,313);\n endShape(CLOSE);\n beginShape();\n vertex(286,287);\n vertex(286,312);\n vertex(247,335);\n vertex(212,309);\n vertex(238,238);\n endShape(CLOSE);\n\n fill(200);//white\n beginShape();\n vertex(38,307);\n vertex(74,307);\n vertex(80,314);\n vertex(81,337);\n vertex(68,345);\n vertex(38,327);\n endShape(CLOSE);\n beginShape();\n vertex(219,316);\n vertex(226,308);\n vertex(262,308);\n vertex(262,326);\n vertex(231,345);\n vertex(219,336);\n endShape(CLOSE);\n\n fill(192,0,11);//red\n beginShape();\n vertex(96,191);\n vertex(61,230);\n vertex(60,269);\n vertex(96,312);\n vertex(101,300);\n vertex(100,247);\n vertex(112,232);\n vertex(132,232);\n vertex(131,186);\n endShape(CLOSE);\n beginShape();\n vertex(204,191);\n vertex(240,230);\n vertex(240,270);\n vertex(205,312);\n vertex(200,302);\n vertex(200,248);\n vertex(193,238);\n vertex(185,231);\n vertex(170,230);\n vertex(170,186);\n endShape(CLOSE);\n\n //white\n fill(200);\n beginShape();\n vertex(70,217);\n vertex(74,220);\n vertex(81,210);\n vertex(85,213);\n vertex(75,227);\n vertex(72,229);\n vertex(71,231);\n vertex(73,233);\n vertex(73,268);\n vertex(71,272);\n vertex(76,277);\n vertex(82,274);\n vertex(89,283);\n vertex(90,297);\n vertex(66,272);\n vertex(65,235);\n vertex(68,229);\n vertex(62,228);\n endShape(CLOSE);\n beginShape();\n vertex(228,217);\n vertex(225,218);\n vertex(218,211);\n vertex(215,213);\n vertex(223,227);\n vertex(226,226);\n vertex(230,230);\n vertex(227,233);\n vertex(228,270);\n vertex(229,272);\n vertex(223,276);\n vertex(218,276);\n vertex(210,283);\n vertex(211,296);\n vertex(235,273);\n vertex(234,233);\n vertex(232,228);\n vertex(237,227);\n endShape(CLOSE);\n\n //guns\n //white\n fill(200);\n beginShape();\n vertex(121,301);\n vertex(98,313);\n vertex(102,336);\n vertex(119,342);\n vertex(139,336);\n vertex(141,313);\n endShape(CLOSE);//l\n beginShape();\n vertex(159,312);\n vertex(162,336);\n vertex(180,342);\n vertex(200,336);\n vertex(202,313);\n vertex(180,302);\n endShape(CLOSE);\n\n //black\n fill(0);\n rect(105,315,30,30);\n rect(166,315,30,30);\n quad(105,344,109,355,131,355,135,344);\n quad(166,344,170,355,192,355,196,344);\n //green\n fill(0,0,67);\n rect(103,253,33,62);//l\n rect(164,252,33,62);//r\n //white\n fill(200);\n bezier(103,252,107,230,132,230,136,252);//l\n bezier(164,252,169,230,192,230,197,252);//r\n rect(103,280,33,25);//l\n rect(164,280,33,25);//r\n rect(104,319,33,26,3);//l\n rect(165,319,33,26,3);//r\n rect(115,310,7,28,8);//l\n rect(178,310,7,28,8);//r\n //green\n fill(0,0,67);\n rect(105,284,10,15);\n rect(124,284,10,15);\n rect(167,285,10,15);\n rect(185,284,10,15);\n\n //body-wings\n //green\n fill(0,0,67);//blue\n bezier(107,154,101,162,98,169,98,187);\n bezier(191,153,199,164,202,172,203,187);\n quad(107,154,98,186,98,223,107,224);\n quad(191,153,203,186,202,223,192,223);\n fill(192,0,11);//red\n quad(134,112,108,147,107,239,132,230);\n quad(165,112,192,147,193,239,168,230);\n //black\n fill(0);\n quad(130,122,130,142,111,164,111,147);\n quad(169,122,188,147,188,165,169,144);\n //white\n fill(200);\n beginShape();\n vertex(131,154);\n vertex(129,202);\n vertex(118,202);\n vertex(112,181);\n vertex(110,179);\n vertex(110,171);\n endShape(CLOSE);\n beginShape();\n vertex(170,154);\n vertex(190,172);\n vertex(190,182);\n vertex(188,181);\n vertex(182,201);\n vertex(172,201);\n endShape(CLOSE);\n\n //green\n fill(192,0,11);\n quad(134,193,166,193,154,342,146,342);\n fill(192,0,11);\n quad(142,180,159,180,152,352,148,352);\n //white\n fill(200);\n ellipse(150,374,6,50);\n\n //head\n fill(1,1,75);\n ellipse(149.5f,72,33,25);\n ellipse(149.5f,94,30,170);\n fill(0);\n ellipse(149.5f,94,20,160);\n fill(154,155,84);\n ellipse(149.5f,94,17,77);\n strokeWeight(2);\n line(143,74,158,74);\n line(142,104,158,104);\n strokeWeight(1);\n fill(200);\n bezier(143,15,147,2,153,2,155.5f,15);\n }", "public void addVelocity(double var1, double var3, double var5)\n {}" ]
[ "0.70920783", "0.6229216", "0.5886799", "0.55857414", "0.55808216", "0.5580147", "0.5575358", "0.5486871", "0.5375097", "0.5309416", "0.528697", "0.52381456", "0.5215957", "0.52122176", "0.52049875", "0.518145", "0.5169361", "0.51574105", "0.51323193", "0.513197", "0.5110864", "0.5081395", "0.50765353", "0.507607", "0.50713354", "0.5043365", "0.5017415", "0.5006903", "0.5004356", "0.49954852", "0.498408", "0.49681547", "0.49329588", "0.4928568", "0.49212965", "0.49079165", "0.49057472", "0.4900117", "0.48943394", "0.4892593", "0.48917842", "0.4882622", "0.48734185", "0.48678043", "0.48557737", "0.48451713", "0.4844691", "0.48246986", "0.481692", "0.48073068", "0.47989035", "0.47785205", "0.47764534", "0.47639284", "0.47570506", "0.4741932", "0.4737001", "0.4734505", "0.4732754", "0.47207376", "0.46963492", "0.4690506", "0.4686493", "0.46855867", "0.46773607", "0.46764678", "0.46755823", "0.4671267", "0.46646646", "0.46534744", "0.46529678", "0.46524185", "0.46504724", "0.46462634", "0.46458948", "0.4644397", "0.46371174", "0.46323985", "0.4628627", "0.46159053", "0.46156415", "0.46036896", "0.4601984", "0.46013388", "0.45887557", "0.4586236", "0.4583844", "0.45836318", "0.45762217", "0.45751554", "0.4572763", "0.4572618", "0.45723382", "0.45718113", "0.4569741", "0.45669422", "0.45660818", "0.4557289", "0.45570415", "0.45481902" ]
0.80097306
0