query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Returns whether the scanner has reached the end of the reader it reads from.
public final boolean yyatEOF() { return zzAtEOF; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean hasNext() {\n\t\t\t\t\treturn lastReadChar != ']' && lastReadChar != -1;\n\t\t\t\t}", "public boolean isEOF() {\n return this.index >= this.input.length();\n }", "private boolean isAtEnd() {\n return peek().type == EOF;\n }", "public boolean isEOF()\r\n {\r\n Patt...
[ "0.7284849", "0.72366214", "0.7129928", "0.71125025", "0.7018786", "0.6986441", "0.69289184", "0.6926585", "0.68859434", "0.68858117", "0.68761504", "0.6796107", "0.6773564", "0.67561543", "0.67384887", "0.6699902", "0.66987425", "0.6675794", "0.6657057", "0.66497624", "0.662...
0.0
-1
Returns the current lexical state.
public final int yystate() { return zzLexicalState; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public LexerState getState() {\n\t\treturn state;\n\t}", "public String getCurrentState() {\n\t\treturn currentState;\n\t}", "public TSLexerState getState() {\r\n \t\treturn state;\r\n \t}", "final public int yystate() {\n return yy_lexical_state;\n }", "final public int yystate() {\n return yy_lexi...
[ "0.777735", "0.7045248", "0.69731486", "0.69486177", "0.69486177", "0.6926388", "0.68727165", "0.6855888", "0.6828191", "0.6828191", "0.6828191", "0.6828191", "0.6828191", "0.68169594", "0.6794179", "0.6780457", "0.67754173", "0.6752172", "0.6720868", "0.66741174", "0.6592735...
0.68280005
42
Enters a new lexical state.
public final void yybegin(int newState) { zzLexicalState = newState; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void yybegin(int newState) {\r\n zzLexicalState = newState;\r\n }", "public final void yybegin(int newState) {\r\n zzLexicalState = newState;\r\n }", "public final void yybegin(int newState) {\r\n zzLexicalState = newState;\r\n }", "public final void yybegin(int newState) {\r\n zz...
[ "0.70751697", "0.70751697", "0.70751697", "0.70751697", "0.70751697", "0.69987404", "0.69751924", "0.69751924", "0.6853493", "0.64326435", "0.6415268", "0.6319668", "0.6001424", "0.5976024", "0.59745276", "0.5970104", "0.5913851", "0.5912885", "0.5793028", "0.5651853", "0.564...
0.7046727
36
Returns the text matched by the current regular expression.
public final String yytext() { return new String(zzBuffer, zzStartRead, zzMarkedPos - zzStartRead); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getRegularExpression() {\n\t\treturn enteredText;\n\t}", "java.lang.String getRegex();", "java.lang.String getRegex();", "@Override\r\n\tpublic String getMatch() {\n\t\treturn match;\r\n\t}", "public String getRegex();", "public String getRegEx();", "public String getMatched() {\r\n\t\tre...
[ "0.70918065", "0.6484353", "0.6484353", "0.6231338", "0.6081341", "0.6011239", "0.59774715", "0.5966505", "0.5966505", "0.5966505", "0.5966505", "0.5966505", "0.5966505", "0.5966505", "0.5966505", "0.5966505", "0.5966505", "0.5966505", "0.5966505", "0.5966505", "0.594106", ...
0.5550914
59
How many characters were matched.
public final int yylength() { return zzMarkedPos - zzStartRead; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getNumberOfCharacters() {\n return numberOfCharacters;\n }", "public int numMatches();", "@Override\n protected Integer count() {\n Matcher matcher = UPPER.matcher(this.password);\n Integer score = 0;\n\n while (matcher.find()) {\n score++;\n }\n\n return score;\n }",...
[ "0.710035", "0.70561445", "0.7010285", "0.6998304", "0.68953246", "0.6818687", "0.68058366", "0.67404586", "0.67342734", "0.67306405", "0.6725842", "0.6725842", "0.6674424", "0.66586375", "0.66430557", "0.6630872", "0.6623718", "0.66053796", "0.65967864", "0.6571471", "0.6533...
0.0
-1
Get List of image IDs, such as `imggvbnzy6f`. For the format of arraytype parameters, see [API Introduction]( You can obtain the image IDs in two ways: Call [DescribeImages]( and look for `ImageId` in the response. View the image IDs in the [Image Console](
public String [] getImageIds() { return this.ImageIds; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String[] getImageIDs(String shop)\t{\n\n\t\tString[] empty = new String[0];\n\n\t\timageCounter = 0;\n\n\t\tString allImageIDsString = \"\";\n\n\t\tallImageIDsString = getSharedPrefs(shop.trim(),\"imageIDs\",\"empty\");\n\n\t\tif(!allImageIDsString.equals(\"empty\"))\t{\n\n\t\t\tif(!allImageIDsString.endsW...
[ "0.6760789", "0.6551657", "0.6463962", "0.6379882", "0.6272944", "0.6235046", "0.6181233", "0.6132097", "0.6030193", "0.60038537", "0.59811246", "0.5955252", "0.5942187", "0.59348875", "0.5914015", "0.5758664", "0.569458", "0.5689727", "0.56798714", "0.5676989", "0.56733775",...
0.7315134
0
Set List of image IDs, such as `imggvbnzy6f`. For the format of arraytype parameters, see [API Introduction]( You can obtain the image IDs in two ways: Call [DescribeImages]( and look for `ImageId` in the response. View the image IDs in the [Image Console](
public void setImageIds(String [] ImageIds) { this.ImageIds = ImageIds; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String [] getImageIds() {\n return this.ImageIds;\n }", "public Builder setImageId(int value) {\n \n imageId_ = value;\n onChanged();\n return this;\n }", "public void setImage(int imageId) {\n this.imageId=imageId;\n\t}", "public BatchGet setPhotoIds(java.util.Lis...
[ "0.6312151", "0.6147008", "0.6051096", "0.60472643", "0.5994104", "0.59886926", "0.5752737", "0.57475555", "0.57097685", "0.567367", "0.56557125", "0.5640037", "0.5623069", "0.5606414", "0.55486625", "0.5534277", "0.5501148", "0.5499068", "0.5487614", "0.5482097", "0.5481123"...
0.76749873
0
Get Filters. Each request can have up to 10 `Filters` and 5 `Filters.Values`. You cannot specify `ImageIds` and `Filters` at the same time. Specific filters: `imageid` String Optional Filter results by image ID `imagetype` String Optional Filter results by image type. Valid values: PRIVATE_IMAGE: private image created by the current account PUBLIC_IMAGE: public image created by Tencent Cloud SHARED_IMAGE: image shared with the current account by another account.
public Filter [] getFilters() { return this.Filters; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Filter> getFilters() {\n List<Filter> filters = new ArrayList<>();\n JsonArray filterInfos = definition.getArray(FILTERS);\n if (filterInfos == null) {\n return filters;\n }\n\n for (Object filterInfo : filterInfos) {\n try {\n filters.add(Serializer.<Filter>deserialize(...
[ "0.6310344", "0.6110164", "0.5879267", "0.57857835", "0.56482023", "0.5607715", "0.5349454", "0.5309244", "0.53051335", "0.5302569", "0.5296764", "0.52878845", "0.52834034", "0.5254207", "0.5247356", "0.5223746", "0.5156989", "0.51569515", "0.5070148", "0.5051818", "0.5049274...
0.5128724
19
Set Filters. Each request can have up to 10 `Filters` and 5 `Filters.Values`. You cannot specify `ImageIds` and `Filters` at the same time. Specific filters: `imageid` String Optional Filter results by image ID `imagetype` String Optional Filter results by image type. Valid values: PRIVATE_IMAGE: private image created by the current account PUBLIC_IMAGE: public image created by Tencent Cloud SHARED_IMAGE: image shared with the current account by another account.
public void setFilters(Filter [] Filters) { this.Filters = Filters; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setFilters(List<COSName> filters)\n {\n stream.setItem(COSName.FILTER, new COSArray(filters));\n }", "public void setFileFilters(List<String> filters)\n {\n COSBase obj = COSArray.ofCOSNames(filters);\n stream.setItem(COSName.F_FILTER, obj);\n }", "public void setFi...
[ "0.6335915", "0.63348573", "0.62881964", "0.61858946", "0.6149137", "0.6125161", "0.578611", "0.5765093", "0.56827134", "0.5670309", "0.5602903", "0.5574466", "0.55216295", "0.5520611", "0.5511564", "0.5504412", "0.5484661", "0.5482661", "0.54255575", "0.5400203", "0.5387532"...
0.64512575
1
Get Offset; default value: 0. For more information on `Offset`, see [API Introduction](/document/api/213/568.E8.BE.93.E5.85.A5.E5.8F.82.E6.95.B0.E4.B8.8E.E8.BF.94.E5.9B.9E.E5.8F.82.E6.95.B0.E9.87.8A.E4.B9.89).
public Long getOffset() { return this.Offset; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.lang.Long getOffset() {\n return offset;\n }", "public java.lang.Long getOffset() {\n return offset;\n }", "public java.lang.Integer getOffset() {\n return offset;\n }", "public java.lang.Integer getOffset() {\n return offset;\n }", "public int getOffset() {\n ret...
[ "0.75062853", "0.7503614", "0.7446564", "0.743991", "0.73175657", "0.73017675", "0.7277527", "0.7254509", "0.7254509", "0.72536945", "0.7241325", "0.7220771", "0.7217985", "0.7208419", "0.72070426", "0.7197962", "0.7197547", "0.7158245", "0.7138531", "0.7132252", "0.71309155"...
0.714726
19
Set Offset; default value: 0. For more information on `Offset`, see [API Introduction](/document/api/213/568.E8.BE.93.E5.85.A5.E5.8F.82.E6.95.B0.E4.B8.8E.E8.BF.94.E5.9B.9E.E5.8F.82.E6.95.B0.E9.87.8A.E4.B9.89).
public void setOffset(Long Offset) { this.Offset = Offset; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setOffset(int offset) {\r\n this.offset = offset;\r\n }", "public void setOffset(int offset) {\n this.offset = offset;\n }", "public void setOffset(int offset) {\r\n\t\tthis.offSet = offset;\r\n\t}", "public void setOffset(Integer offset) {\n set(\"offset\",offset);\n }", ...
[ "0.7968739", "0.7946649", "0.7945492", "0.7742646", "0.7685925", "0.76599026", "0.76393074", "0.76393074", "0.76393074", "0.7559628", "0.74638665", "0.7449486", "0.7441117", "0.7400726", "0.73330295", "0.73316044", "0.73291206", "0.7301408", "0.72576714", "0.72198373", "0.719...
0.82012856
1
Get Number of results returned; default value: 20; maximum: 100. For more information on `Limit`, see [API Introduction](/document/api/213/568.E8.BE.93.E5.85.A5.E5.8F.82.E6.95.B0.E4.B8.8E.E8.BF.94.E5.9B.9E.E5.8F.82.E6.95.B0.E9.87.8A.E4.B9.89).
public Long getLimit() { return this.Limit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setMaxResults(int limit);", "Integer getMaxPageResults();", "int getLimit();", "int getLimit();", "public Integer getResultLimit()\n {\n if (resultLimit == null)\n {\n return HPCCWsWorkUnitsClient.defaultResultLimit;\n }\n return resultLimit;\n }", "publi...
[ "0.7191007", "0.71260446", "0.70179254", "0.70179254", "0.69595695", "0.68416244", "0.6783718", "0.6781865", "0.6781865", "0.6781865", "0.6772885", "0.6703921", "0.6703921", "0.66959363", "0.6655109", "0.66482335", "0.6636361", "0.66320455", "0.66202605", "0.6521269", "0.6502...
0.6780661
11
Set Number of results returned; default value: 20; maximum: 100. For more information on `Limit`, see [API Introduction](/document/api/213/568.E8.BE.93.E5.85.A5.E5.8F.82.E6.95.B0.E4.B8.8E.E8.BF.94.E5.9B.9E.E5.8F.82.E6.95.B0.E9.87.8A.E4.B9.89).
public void setLimit(Long Limit) { this.Limit = Limit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setMaxResults(int limit);", "public void setLimit(int limit) {\n this.limit=limit;\n }", "public void setLimit(int limit) {\n this.limit = limit;\n }", "public ListInfrastructure limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "public void setLimit(...
[ "0.81343555", "0.7001683", "0.69891745", "0.6985361", "0.6978971", "0.6900539", "0.68993723", "0.68896383", "0.6841596", "0.68283355", "0.68242043", "0.67725825", "0.67072684", "0.66850126", "0.66755116", "0.664409", "0.664409", "0.664409", "0.664409", "0.6633288", "0.6630603...
0.6635425
20
Get Instance type, e.g. `S1.SMALL1`
public String getInstanceType() { return this.InstanceType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@DISPID(81)\r\n\t// = 0x51. The runtime will prefer the VTID if present\r\n\t@VTID(79)\r\n\tasci.activebatch.enumInstanceType instanceType();", "public String getInstanceType() {\n return this.instanceType;\n }", "String getSType();", "MachineType getType();", "String type();", "String type();"...
[ "0.7241183", "0.718974", "0.7122155", "0.70778865", "0.69098735", "0.69098735", "0.69098735", "0.69098735", "0.69098735", "0.69098735", "0.69098735", "0.69098735", "0.69098735", "0.69098735", "0.69098735", "0.69098735", "0.69098735", "0.69098735", "0.69098735", "0.69098735", ...
0.73199016
0
Set Instance type, e.g. `S1.SMALL1`
public void setInstanceType(String InstanceType) { this.InstanceType = InstanceType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setInstanceType(String instanceType) {\n this.instanceType = instanceType;\n }", "void setClassType(String classType);", "public void setStaticType(Class type);", "public void setInstType(Integer instType) {\n this.instType = instType;\n }", "public void setType(String type)...
[ "0.70244855", "0.68191856", "0.6625107", "0.6499643", "0.6370491", "0.6370491", "0.6370491", "0.6365503", "0.63080496", "0.62711805", "0.6249089", "0.62098205", "0.61940646", "0.6161872", "0.61518866", "0.61518866", "0.61518866", "0.61518866", "0.61518866", "0.61518866", "0.6...
0.7093169
0
Internal implementation, normal users should not use it.
public void toMap(HashMap<String, String> map, String prefix) { this.setParamArraySimple(map, prefix + "ImageIds.", this.ImageIds); this.setParamArrayObj(map, prefix + "Filters.", this.Filters); this.setParamSimple(map, prefix + "Offset", this.Offset); this.setParamSimple(map, prefix + "Limit", this.Limit); this.setParamSimple(map, prefix + "InstanceType", this.InstanceType); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "public final void mo51373a() {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n public ...
[ "0.62574834", "0.6217662", "0.6024768", "0.5982239", "0.5965723", "0.59330684", "0.5920059", "0.58351564", "0.5781645", "0.57749504", "0.57749504", "0.57749504", "0.57749504", "0.57749504", "0.57749504", "0.57737285", "0.57054734", "0.5701363", "0.56510806", "0.56491816", "0....
0.0
-1
Creates an instance of primes collection.
public PrimesCollection(int numberOfConsecutivePrimes) { if (numberOfConsecutivePrimes < 1) { throw new IllegalArgumentException("Total number of consecutive primes must be greater or equal to 1."); } this.totalNumberOfPrimes = numberOfConsecutivePrimes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PrimeCounter() {\n\t\t}", "public Prime(Integer threadId, Integer limit, List<Integer> primeNumbers) {\n this.limit = limit;\n this.threadId = threadId;\n this.primeNumbers = primeNumbers;\n }", "public Primes(int n) {\n this.n = n;\n }", "public PrimeNumberCalculator...
[ "0.6923029", "0.6517389", "0.6418722", "0.6398044", "0.63306457", "0.6327953", "0.6265318", "0.6258459", "0.622743", "0.60565764", "0.60408896", "0.58742994", "0.58543247", "0.5777498", "0.5771279", "0.5749579", "0.57475454", "0.5744959", "0.5721729", "0.5715914", "0.57150054...
0.6779285
1
Returns an iterator over collection.
@Override public Iterator<Integer> iterator() { return new IteratorImplementation(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Iterator iterator() {\n maintain();\n return new MyIterator(collection.iterator());\n }", "Iterator<T> iterator();", "public Iterator<T> iterator();", "public Iterator<T> iterator();", "public Iterator<T> iterator();", "public Iterator<T> iterator();", "public Iterator<E> iterator();...
[ "0.81754684", "0.7168435", "0.7099896", "0.7099896", "0.7099896", "0.7099896", "0.709476", "0.709476", "0.709476", "0.70937806", "0.70937806", "0.70842755", "0.70632255", "0.70411366", "0.70093715", "0.69976896", "0.69742674", "0.6956472", "0.691391", "0.68974924", "0.6870227...
0.0
-1
Checks if the given number is prime.
private boolean isPrime(int number) { if (number < 2) return false; if (number == 2) return true; if (number % 2 == 0) return false; for (int i = 3; i * i <= number; i += 2) if (number % i == 0) return false; return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean isPrime(int number) {\n for (int j = 2 ; j < number ; j++) {\n if (number % j == 0) {\n return false; // number is divisible so its not prime\n }\n }\n return true; // number is prime now\n }", "public static boolean isPrime(int n...
[ "0.78235483", "0.78072226", "0.7777351", "0.77707374", "0.77519345", "0.7735365", "0.7729056", "0.7707584", "0.7704102", "0.76962656", "0.76920336", "0.7661412", "0.7626807", "0.7586178", "0.74944025", "0.74224263", "0.74222153", "0.7405698", "0.73398167", "0.73116505", "0.73...
0.7731109
6
Returns the next prime number that comes after the given number.
private int getNextPrime(int n) { for (int i = n + 1; i <= 2 * n; i++) { if (isPrime(i)) { return i; } } return -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static int findNextPrimeAfter(int n) {\n n += (n % 2 == 0) ? 1 : 2; // next odd\n foundFactor: for (;; n += 2) { //TODO labels??!!\n int sri = (int) (Math.sqrt(n));\n for (int primeIndex = 0; primeIndex < N_PRIMES; primeIndex++) {\n int p = primes[primeIndex];\n if (p > sri) {...
[ "0.6882036", "0.6513682", "0.6478548", "0.6362195", "0.6161092", "0.61524165", "0.61247903", "0.6119087", "0.6081561", "0.60131633", "0.5976277", "0.59535635", "0.58645886", "0.586122", "0.5806376", "0.5788377", "0.57715863", "0.5603776", "0.54590935", "0.54180014", "0.534617...
0.65475523
1
Returns true if the iteration has more elements.
@Override public boolean hasNext() { return counter < totalNumberOfPrimes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean hasMoreElements() {\n/* 64 */ return this.iterator.hasNext();\n/* */ }", "@Override\r\n\tpublic boolean hasMoreElements() {\n\t\treturn it.hasNext();\r\n\t}", "public boolean hasMoreElements() {\r\n \t\tif(numItems == 0 || currentObject == numItems) {\r\n \t\t\treturn false;\r\n \t\t}\r...
[ "0.9023375", "0.8951968", "0.8638786", "0.8566143", "0.83861804", "0.8343811", "0.81753933", "0.8072934", "0.8072934", "0.80390936", "0.7999576", "0.79312617", "0.7930181", "0.79280025", "0.78559506", "0.7812429", "0.7809045", "0.7808914", "0.7794039", "0.77663183", "0.775554...
0.0
-1
Returns the next prime number.
@Override public Integer next() { if (!hasNext()) { throw new NoSuchElementException("The iteration has no more elements."); } currentPrime = getNextPrime(currentPrime); counter++; return currentPrime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int next()\n\t{\n\t\tdo\n\t\t{\n\t\t\tnumber ++;\n\t\t\tsetIsPrime();\n\t\t\tif (isPrime())\n\t\t\t{\n\t\t\t\tprime = number;\n\t\t\t}\n\t\t}while (! isPrime());\n\t\treturn prime;\n\t}", "@Override\r\n\tpublic int next() \r\n\t{\r\n\t\tif (currentNumber == OVERFLOW_PRIME)\r\n\t\t{\r\n\t\t\treturn current...
[ "0.7619989", "0.7194577", "0.71455145", "0.70739293", "0.7058669", "0.70276314", "0.7007611", "0.6995746", "0.6945991", "0.6937987", "0.6925093", "0.69104975", "0.6802257", "0.6796223", "0.6735358", "0.6728288", "0.6699169", "0.6543593", "0.64892554", "0.6400671", "0.6344611"...
0.6216283
22
The doc store specific context/transaction used to collect updates to send to the document store. Doc store specific implementations gather changes and bulk update the document store.
public interface DocStoreUpdateContext extends DocUpdateContext { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateTransaction(Transaction trans);", "public int update(StoreFeedBack storeFeedBack);", "@Override\n\tpublic void updateTransaction(Transaction transaction) {\n\t\t\n\t}", "@Override\n public void beginDatabaseBatchWrite() throws BlockStoreException {\n if (!autoCommit) {\n ...
[ "0.5705285", "0.55972964", "0.5573542", "0.55343544", "0.552691", "0.53567046", "0.5316999", "0.5303086", "0.52796304", "0.5276237", "0.5248891", "0.51553565", "0.5154619", "0.5137956", "0.5118345", "0.50858706", "0.50726926", "0.5071089", "0.5070218", "0.5062384", "0.5036812...
0.6248836
0
Private constructor so that the class cannot be instantiated.
private PartitionFunctionFactory() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Instantiation(){}", "private Rekenhulp()\n\t{\n\t}", "private Topography()\n\t{\n\t\tthrow new IllegalStateException(\"This is an utility class, it can not be instantiated\");\n\t}", "private ATCres() {\r\n // prevent to instantiate this class\r\n }", "@SuppressWarnings(\"unused\")\n ...
[ "0.78601575", "0.77122605", "0.76910615", "0.7636179", "0.7555778", "0.75400394", "0.7485323", "0.7469224", "0.7435249", "0.7433278", "0.7430809", "0.7430562", "0.73924226", "0.7302121", "0.7300223", "0.7299544", "0.7265106", "0.7261558", "0.72611105", "0.7250855", "0.7247678...
0.0
-1
This method generates and returns a partition function based on the provided string.
public static PartitionFunction getPartitionFunction(String functionName, int numPartitions, Map<String, String> functionConfig) { PartitionFunctionType function = PartitionFunctionType.fromString(functionName); switch (function) { case Modulo: return new ModuloPartitionFunction(numPartitions); case Murmur: return new MurmurPartitionFunction(numPartitions); case ByteArray: return new ByteArrayPartitionFunction(numPartitions); case HashCode: return new HashCodePartitionFunction(numPartitions); case BoundedColumnValue: return new BoundedColumnValuePartitionFunction(numPartitions, functionConfig); default: throw new IllegalArgumentException("Illegal partition function name: " + functionName); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final AstValidator.partition_clause_return partition_clause() throws RecognitionException {\n AstValidator.partition_clause_return retval = new AstValidator.partition_clause_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n ...
[ "0.6130014", "0.57978505", "0.5490181", "0.54262304", "0.5201236", "0.5184886", "0.51704484", "0.51704484", "0.5163297", "0.5123717", "0.51112777", "0.5097454", "0.5044289", "0.5029283", "0.5012338", "0.49911675", "0.49842405", "0.4973143", "0.4969104", "0.49567693", "0.49208...
0.6032106
1
A facet of the total application state Each AppStateFacet instance reports the state it thinks it is in. The facets register with an AppStateManager, which in turn combines all the registered AppStateFacets' states to the total application state. There, each individual facet of an application (E.g.: Trout part, webserver, resource managers, ...) can individually report their own state without having to be careful not to overwrite states of other parts. And still HAfencers and monitoring get a wholisting view of the application with available details.
public interface AppStateFacet { /** * Gets the AppState this facet is in * * <p>This method will be called at least every few seconds, maybe from ever * different threads. Make sure it returns quickly and is thread-safe. * * @return The AppState this facet in */ public AppState getAppState(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public AppState getAppState();", "public List<AppState> getApps()\n {\n return apps;\n }", "StateManager getStateManager();", "@Override\r\n\tpublic List<ApplicationStatus> getApplicationStatuses() {\n\t\treturn entityManager.createQuery(\"from ApplicationStatus\", ApplicationStatus.class).getRe...
[ "0.5811554", "0.55054265", "0.5194246", "0.5173626", "0.5000078", "0.49364096", "0.48897862", "0.48897862", "0.48897862", "0.48897862", "0.48857537", "0.4845046", "0.48122963", "0.48001164", "0.47987685", "0.47987685", "0.47987685", "0.47987685", "0.47987685", "0.47987685", "...
0.70629364
0
Gets the AppState this facet is in This method will be called at least every few seconds, maybe from ever different threads. Make sure it returns quickly and is threadsafe.
public AppState getAppState();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface AppStateFacet {\n /**\n * Gets the AppState this facet is in\n *\n * <p>This method will be called at least every few seconds, maybe from ever\n * different threads. Make sure it returns quickly and is thread-safe.\n * \n * @return The AppState this facet in\n */\n public AppState ...
[ "0.75092155", "0.6354516", "0.61132145", "0.5822507", "0.57303846", "0.5629432", "0.55939", "0.558699", "0.5541108", "0.5535476", "0.5528801", "0.5478188", "0.5463679", "0.54379565", "0.54120207", "0.53584355", "0.5346008", "0.53449035", "0.53262705", "0.52996683", "0.5295431...
0.76511496
0
Sets the name of this object.
public void setName(String rawLineName) { this.lineName = rawLineName; //System.out.println(this.lineName + " " + lineName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void setName(String name) {\n this.name = name;\n }", "@Override\n public void setName(String name) {\n this.name = name;\n }", "public void setName(String name) {\r\n this._name = name;\r\n }", "public void setName(String name) {\r\n\t\t_name = ...
[ "0.83787", "0.83787", "0.8360184", "0.8359147", "0.8355752", "0.8355752", "0.8355752", "0.8346764", "0.8344852", "0.8328547", "0.83224154", "0.83224154", "0.8315796", "0.8311683", "0.8307039", "0.8307039", "0.8307039", "0.8307031", "0.83059686", "0.83059686", "0.83059686", ...
0.0
-1
This method sets the line of stops in the line class.
public void setLine(String line) { this.line = line; //System.out.println(this.line + " " + line); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setLine (int Line);", "public void setLine(int line);", "public void setLinePos(int linePos) {\n this.linePos = linePos;\n }", "public void setLineToStart(final int lineToStart) {\r\n\t\tthis.lineToStart = lineToStart;\r\n\t}", "public void setLine ( String value )\n {\n line...
[ "0.7199073", "0.70028144", "0.6796692", "0.6706127", "0.6647875", "0.6633088", "0.64515996", "0.632435", "0.6264156", "0.6263041", "0.62558776", "0.62182176", "0.6188897", "0.61876094", "0.6184284", "0.61636794", "0.6147814", "0.6131217", "0.61296886", "0.61029476", "0.605786...
0.6271062
8
A testing method that is also a getter for the private String that is this line's name
public String getName() { return this.lineName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getLineName() {\n return lineName;\n }", "public abstract String getLine(int lineNumber);", "public String getLine ()\n {\n return line;\n }", "@Test\n\tpublic void fortheLine() {\n\t\tString stringOfTestingWord = (\"aword\");\n\t\tStringBuilder MethodResult = object1.theLine(str...
[ "0.6921239", "0.6458047", "0.63431597", "0.63152397", "0.62552875", "0.62039685", "0.61977786", "0.61962235", "0.6192076", "0.6144627", "0.6123478", "0.6093944", "0.6059987", "0.60459185", "0.60438704", "0.60407394", "0.60119426", "0.5997375", "0.5965171", "0.59633374", "0.59...
0.6927373
0
A testing method that is also a getter for the private String that is this line's stops
public String getLine() { return this.line; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void secodFortheLine() {\n\t\tString stringOfTestingWord = (\"newword\");\n\t\tStringBuilder MethodResult = object1.theLine(stringOfTestingWord);\n\t\tStringBuilder ExpectedResult = new StringBuilder();\n\t\tfor (int i = 0; i < stringOfTestingWord.length(); i++) {\n\t\t\tExpectedResult.append(\"-\"...
[ "0.6454636", "0.64300954", "0.63610274", "0.617856", "0.5806161", "0.5795921", "0.57671356", "0.5764586", "0.57608813", "0.56854975", "0.56582946", "0.563927", "0.5636613", "0.5613413", "0.56080925", "0.5603506", "0.5603169", "0.55925035", "0.55867195", "0.55342287", "0.55230...
0.53838736
41
Method that when called upon finds and prints the transfer station between the two lines.
public String findTransfer(Line otherLine) { String output = ""; for (String similarStop : otherLine.getLine().split(" ")) { if (this.line.contains(similarStop)) { output = similarStop; } } return output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printInfoVehicleClick(Circle c, Text lines_info)\r\n {\r\n if (this.getLineVehicles().contains(c)) {\r\n if (c.getFill() == this.getTransportLineColor()) {\r\n c.setFill(this.getTransportLineSelectedColor());\r\n } else {\r\n c.setFill(this....
[ "0.5651779", "0.5516954", "0.5389437", "0.536248", "0.53540117", "0.5318482", "0.5312045", "0.52374053", "0.52220047", "0.5221589", "0.521655", "0.5176442", "0.5173779", "0.5165289", "0.51589674", "0.514643", "0.5115828", "0.5115369", "0.5113607", "0.5112804", "0.5088498", ...
0.6946538
0
Adds a station to this line. I used this for debugging.
public void addStation(String station) { this.station = station; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void buildStation(Station station) {\n stations.add(station);\n }", "public void addSpaceStation()\n\t{\n\t\t//if a space station is already spawned, one will not be added\n\n\t\tgameObj.add(new SpaceStation(getHeight(), getWidth()));\n\t\tSystem.out.println(\"Space station added\");\n\t\tnotify...
[ "0.71270853", "0.68270487", "0.6756616", "0.67368287", "0.65407676", "0.6537787", "0.65371764", "0.64588845", "0.62750727", "0.61666274", "0.6053793", "0.6002251", "0.5964688", "0.5788902", "0.5709422", "0.5680427", "0.5633511", "0.5614603", "0.5588334", "0.55681187", "0.5543...
0.8346097
0
This checks if the input is the same as what is already inside the object I used this too for debugging.
public boolean hasStation(String station) { if(this.station.equals(station)) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean equals(Object inputObj) {\n\t\t\tboolean eredmeny = false;\n\t\t\tif (this.hashCode() == inputObj.hashCode()) {\n\t\t\t\teredmeny = true;\n\t\t\t}\n\t\t\treturn eredmeny;\n\t\t}", "public void testObjEqual()\n {\n assertEquals( true, Util.objEqual(null,null) );\n assertEquals( ...
[ "0.6557634", "0.6297145", "0.61622846", "0.61381173", "0.6060128", "0.6041716", "0.58840036", "0.58804375", "0.5856082", "0.58019835", "0.5798552", "0.5746771", "0.5742089", "0.573388", "0.5733402", "0.5724518", "0.5666102", "0.565759", "0.5653354", "0.5630854", "0.56193596",...
0.0
-1
/ It updates model object.
@RequestMapping(value = "/editsave", method = RequestMethod.POST) public String editsave(@ModelAttribute("company") CompanyDto company) { companyService.update(company); return "redirect:/companies/getAll"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void Update(Model model) {\n\n }", "public boolean update(ModelObject obj);", "@Override\n\tpublic int update(Object model) {\n\t\treturn 0;\n\t}", "@Override\n public void update(EntityModel model) {\n super.update(model);\n\n }", "@Override\n\tpublic void update() {\...
[ "0.8072333", "0.8016915", "0.7689956", "0.754015", "0.75399387", "0.74720585", "0.7449378", "0.741529", "0.735184", "0.7342407", "0.7342407", "0.7325211", "0.7177806", "0.71369094", "0.71087676", "0.71087676", "0.71087676", "0.7094246", "0.7094246", "0.6993202", "0.69793165",...
0.0
-1
converting to an object to return to the client; remove the password field. also if the user is external the password is set
private UserConfig convertToCustomUserRoleModel(UserModel userModel) { boolean external = userModel.isExternal(); boolean passwordSet = StringUtils.isNotBlank(userModel.getPassword()) || external; Optional<AuthenticationTypeDetails> authenticationType = authenticationTypeAccessor.getAuthenticationTypeDetails(userModel.getAuthenticationType()); String authTypeName = authenticationType.map(AuthenticationTypeDetails::getName).orElse("UNKNOWN"); return new UserConfig( userModel.getId().toString(), userModel.getName(), null, userModel.getEmailAddress(), userModel.getRoleNames(), userModel.isExpired(), userModel.isLocked(), userModel.isPasswordExpired(), userModel.isEnabled(), passwordSet, authTypeName, external); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void clearPassword() {\n \n password_ = getDefaultInstance().getPassword();\n }", "private void clearPassword() {\n \n password_ = getDefaultInstance().getPassword();\n }", "@Override\n public String getPassword() {\n return null;\n }", "@Override\np...
[ "0.6458901", "0.6458901", "0.6348504", "0.6327337", "0.6146458", "0.6129479", "0.6114805", "0.6109926", "0.6109557", "0.60926574", "0.6076794", "0.6058675", "0.60189104", "0.6012315", "0.5991504", "0.5985727", "0.5985727", "0.5985727", "0.5985727", "0.5985727", "0.59796166", ...
0.0
-1
only include scripts once.
protected void doScript(Set<String> scripts, JspWriter out, HttpServletRequest request, HttpServletResponse response, String location) throws IOException { if( scripts.contains(location)){ return; } scripts.add(location); if( location.startsWith("/")){ // script file out.print("<script type=\"text/javascript\" charset=\"utf8\" src=\""); if( location.startsWith("//")){ // remote script file out.print(location); }else { // local script file // no sessionid needed out.print(request.getContextPath()+location); } out.println("\"></script>"); }else{ // in-line script out.print("<script type=\"text/javascript\" charset=\"utf8\" >"); out.print(location); out.println("</script>"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void reloadClientScripts() {\n clientizenScripts.clear();\n for (File file : CoreUtilities.listDScriptFiles(clientizenFolder)) {\n String name = CoreUtilities.toLowerCase(file.getName());\n if (clientizenScripts.containsKey(name)) {\n Debug.echoError...
[ "0.5827969", "0.5581976", "0.55378664", "0.5477352", "0.5246932", "0.52005744", "0.5169304", "0.5158361", "0.51502687", "0.5107149", "0.50848496", "0.49746048", "0.49383044", "0.4928037", "0.49217847", "0.49216312", "0.4894052", "0.48822364", "0.48144123", "0.48110345", "0.47...
0.46374533
41
Add a script to be included by the head tag. must be called before the head tag. parameters are expanded. If the value starts with a / it is a url. If it starts with // it is a remote url. This method is to include scripts from a java fragment. Note that you usually want to include scripts from a local url so the application set a restrictive contentsecuritypolicy
public static void addScript(AppContext conn,HttpServletRequest request, String script){ if( script == null || script.trim().isEmpty()) { return; } Set<String> scripts = (Set<String>) request.getAttribute(REQUEST_SCRIPT_ATTR); if( scripts == null ){ scripts=new LinkedHashSet<>(); request.setAttribute(REQUEST_SCRIPT_ATTR, scripts); } scripts.add(conn.expandText(script)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addJS(String jsLocation) {\n Script ajaxScript = new Script(\"\");\n ajaxScript.attribute(\"src\", jsLocation);\n ajaxScript.attribute(\"type\", \"text/javascript\");\n page.addHeader(ajaxScript);\n }", "private void renderScript(Tag headTag, String context, String dojoPath) {\n Tag ...
[ "0.65521365", "0.6181224", "0.60797083", "0.56399727", "0.5303338", "0.52442634", "0.51011294", "0.5067187", "0.50095135", "0.5008431", "0.48282015", "0.48083344", "0.46444225", "0.4640558", "0.46140882", "0.46121937", "0.4578329", "0.45555434", "0.45522952", "0.45391673", "0...
0.6193984
1
mark a page as continaing a form. This must be done before the header is generated
public static void markAsFormPage(HttpServletRequest request){ request.setAttribute(FORM_PAGE_ATTR, Boolean.TRUE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void inicialize() {\n\t\t\n\t\t/**\n\t\t * Labels e textField of the page:\n\t\t * Nome\n\t\t * Descrição\n\t\t */\n\n\t\tJLabel lblNome = new JLabel(\"Nome\");\n\t\tlblNome.setBounds(5, 48, 86, 28);\n\t\tlblNome.setFont(new Font(\"Dubai Light\", Font.PLAIN, 13));\n\t\tcontentPanel.add(lblNome);\n\t\t\n...
[ "0.6054808", "0.5868323", "0.55705184", "0.5546744", "0.54300964", "0.53821486", "0.5377056", "0.5334613", "0.5334376", "0.52794576", "0.5264594", "0.5231572", "0.522398", "0.5192723", "0.51784295", "0.51578414", "0.5134809", "0.5130585", "0.51116467", "0.5081366", "0.5038231...
0.6509653
0
TODO Autogenerated method stub
public static void main(String[] args) { System.out.println("How much is 2+2?"); System.out.println(2+2); System.out.println("How much is 10-5?"); System.out.println(10-5); }
{ "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 getExr...
[ "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.608016...
0.0
-1
Locate chrome browser in currnet system
public static void main(String[] args) { String path="browser_drivers\\chromedriver.exe"; System.setProperty("webdriver.chrome.driver", path); WebDriver driver=new ChromeDriver(); //Launch browser driver.get("http://seleniumhq.org"); //Load webpage driver.manage().window().maximize(); //maximize browser window String Exp_url="https://www.seleniumhq.org/"; //Capture runtime url String Runtime_url=driver.getCurrentUrl(); if(Runtime_url.equals(Exp_url)) { System.out.println("Expected url presented for selenium homepage"); WebElement Download_tab=driver.findElement(By.xpath("//a[@title='Get Selenium']")); Download_tab.click(); if(driver.getCurrentUrl().contains("download/")) System.out.println("expected url presented, Downlaod page verified"); else System.out.println("expected url not presented, download page not verified"); } else { System.out.println("Wrong url presnted for selenium hompage"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Given(\"^Open URL in chrome browser$\")\r\n\tpublic void open_URL_in_chrome_browser() {\n\t nop.Launch(\"chrome\", \"http://automationpractice.com/index.php\");\r\n\t}", "private static WebDriver launchChrome()\n\t{\n\t\tif (REMOTE_URL != null && !REMOTE_URL.equals(\"\")) {\n\t\t\tDesiredCapabilities capabili...
[ "0.71917355", "0.7168325", "0.6929639", "0.6881218", "0.6683566", "0.6672872", "0.665437", "0.6613592", "0.65451765", "0.64940464", "0.647815", "0.643603", "0.64220136", "0.6373084", "0.6357504", "0.6348834", "0.633218", "0.6293709", "0.6281199", "0.6244373", "0.624022", "0...
0.5585556
81
This method is used to check the given date is not a past date.
public static void isValidDate(LocalDate date) throws ValidationException { LocalDate today = LocalDate.now(); if (date.isBefore(today)) { throw new ValidationException("Date cannot be past date"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean checkPastDate(boolean said)\n {\n try\n {\n if( date==null ){\n if(this.getDateString()!=null) date = DateHelper.stringToDate(this.getDateString());\n if(super.isMandatory() && date==null)\n {\n message = FacesHelper.getBundleMessag...
[ "0.77299285", "0.76785725", "0.73135054", "0.7194597", "0.71719545", "0.70930105", "0.6898105", "0.68045175", "0.678197", "0.669664", "0.6684069", "0.66221076", "0.66183394", "0.6550079", "0.6528544", "0.65219724", "0.6508835", "0.6455556", "0.6449389", "0.64191204", "0.63793...
0.6889277
7
This method is used to validate the joined date of the employee. Checks for a particular condition and throws exception based on result
public static void isValidJoinedDate(LocalDate joinedDate) throws ValidationException { LocalDate today = LocalDate.now(); LocalDate minDate = today.minusDays(30); if (joinedDate.isAfter(today) || joinedDate.isBefore(minDate)) { throw new ValidationException("Joined Date should be within 30 days from today"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void validateDate() {\n if (dtpSightingDate.isEmpty()) {\n dtpSightingDate.setErrorMessage(\"This field cannot be left empty.\");\n dtpSightingDate.setInvalid(true);\n removeValidity();\n }\n // Check that the selected date is after research began (rang...
[ "0.6175598", "0.5624297", "0.5588752", "0.55882996", "0.55385405", "0.5461267", "0.5433187", "0.5392392", "0.53675056", "0.5363721", "0.5339436", "0.5329632", "0.5304191", "0.52624977", "0.5261916", "0.5187434", "0.5183338", "0.51788414", "0.51727116", "0.51379454", "0.513291...
0.66724026
0
public final static String CLIENTPROPERTIESURL="../bankonetlib/client.properties";
public Client() { // TODO Auto-generated constructor stub }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private final static void getProp() {\n try(InputStream fis = ConnectionBDD.class.getClassLoader().getResourceAsStream(\"conf.properties\")){\n \n props.load(fis);\n \n Class.forName(props.getProperty(\"jdbc.driver.class\"));\n \n url = props...
[ "0.58518577", "0.582667", "0.57919884", "0.5768037", "0.55871546", "0.5583228", "0.5581278", "0.55221283", "0.54904246", "0.5468653", "0.5462977", "0.5452162", "0.54488873", "0.54080594", "0.5402451", "0.5390565", "0.5380958", "0.53707194", "0.53677636", "0.5356246", "0.53533...
0.0
-1
/ GET SET ///
public String getIdentifiant() { return identifiant; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract Set method_1559();", "void set(T t);", "String setValue();", "boolean getSet();", "@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 T set(T obj);", "public int getSet() {\n return set;\n }", "public void set(int i...
[ "0.7246382", "0.67264336", "0.66858655", "0.6467054", "0.644583", "0.643644", "0.6348679", "0.62473214", "0.62346804", "0.62237227", "0.6181324", "0.61323285", "0.61257553", "0.61135566", "0.6111469", "0.60588187", "0.60367143", "0.6032311", "0.6009278", "0.5998292", "0.59808...
0.0
-1
TODO Autogenerated method stub
public void consulterSoldes() { int i=0; for (Compte compte : listeComptes) { i++; System.out.println(i+". Compte n°"+compte.getNumero()+" : solde="+compte.getSolde()); } }
{ "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 getExr...
[ "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.608016...
0.0
-1
Where the application is started
@Override public void start(Stage primaryStage) { BorderPane root = new BorderPane(); generateRandomHeights(); root.setBottom(createSortingDisplay()); root.setTop(createMenu(root)); primaryStage.setTitle("Concurrent Merge Sort Visualizer"); primaryStage.setScene(new Scene(root)); primaryStage.setFullScreen(true); primaryStage.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void startApp()\r\n\t{\n\t}", "@Override\n public void firstApplicationStartup()\n {\n System.out.println(\"firstApplicationStartup\");\n \n }", "@Override\n protected void appStart() {\n }", "private void showExecutionStart() {\n log.info(\"######################...
[ "0.742038", "0.7134545", "0.70396906", "0.68651634", "0.6852256", "0.68317175", "0.671824", "0.66809547", "0.6679548", "0.6624837", "0.659025", "0.659025", "0.6505543", "0.649542", "0.649542", "0.6483775", "0.64751303", "0.64370453", "0.64265597", "0.64233804", "0.63951457", ...
0.0
-1
Generates the user options
private HBox createMenu(BorderPane root) { HBox menu = new HBox(); menu.setPadding(new Insets(30, 30, 30, 30)); menu.setSpacing(30); menu.setBackground(new Background(new BackgroundFill(MENU_COLOR, CornerRadii.EMPTY, Insets.EMPTY))); menu.getChildren().addAll(createNewArrayButton(root), createArrSizeSliderWrapper(root), createNumOfThreadsSpinnerWrapper(), createExecuteMergeSortButton(root)); return menu; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printOptions() {\n String indent = \" \";\n System.out.println();\n System.out.println(\"+--------------------------- COMMANDS AND OPTIONS LIST ---------------------------+\");\n\n System.out.println();\n System.out.println(\"******* COMMANDS (scraper.[COMMAND]) ***...
[ "0.6595805", "0.6552395", "0.6506409", "0.6223676", "0.6090863", "0.60621905", "0.6060349", "0.6060349", "0.6056641", "0.60412115", "0.59563214", "0.5952631", "0.5929806", "0.590204", "0.58660316", "0.5840261", "0.5809854", "0.5809157", "0.5804901", "0.58006465", "0.5787969",...
0.0
-1
Generates a button that allows the user to generate a random array of size arrSize
private Button createNewArrayButton(BorderPane root) { Button newArr = new Button("Generate New Array"); newArr.setOnMouseClicked(event -> { ((HBox) root.getTop()).getChildren().get(2).setDisable(false); ((HBox) root.getTop()).getChildren().get(3).setDisable(false); generateRandomHeights(); root.setBottom(createSortingDisplay()); }); return newArr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private HBox getGenerateButtons()\n {\n HBox arrayOptions = new HBox(20);\n arrayOptions.setAlignment(Pos.CENTER);\n\n Button generateButton1 = new Button(\"Generate Array [1000]\");\n generateButton1.setPrefWidth(175);\n generateButton1.setOnMouseClicked(\n (MouseE...
[ "0.6617932", "0.6536716", "0.6534577", "0.6398558", "0.63157386", "0.6085553", "0.6047204", "0.6024702", "0.60115796", "0.58391505", "0.5770444", "0.5701049", "0.5629406", "0.56292003", "0.56091064", "0.5607282", "0.55542713", "0.5547215", "0.5547157", "0.5522705", "0.5486957...
0.6815542
0
Instantiates heights to an array of random doubles ranging from MIN_HEIGHT to MAX_HEIGHT
private void generateRandomHeights() { heights = new double[arrSize]; for(int i = 0; i < arrSize; i++) { double height = Math.random() * MAX_HEIGHT; if(height < MIN_HEIGHT) height += MIN_HEIGHT; heights[i] = height; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ArrayList<ArrayList<Double>> initrandomTerrainHeights() {\n ArrayList<ArrayList<Double>> result = new ArrayList<ArrayList<Double>>();\n for (int i = 0; i < ForbiddenIslandWorld.ISLAND_SIZE + 1; i = i + 1) {\n ArrayList<Double> result2 = new ArrayList<Double>();\n for (int j = 0; j < ForbiddenIsland...
[ "0.687298", "0.64595133", "0.6096478", "0.6032283", "0.60038537", "0.59192216", "0.5904798", "0.58926034", "0.5880707", "0.5688172", "0.5608596", "0.56057787", "0.5600411", "0.55984074", "0.5591595", "0.5567819", "0.5567819", "0.55528086", "0.55072254", "0.5482239", "0.546617...
0.8301805
0
Generates the section in the menu where the user can adjust the number of rectangles to be sorted
private HBox createArrSizeSliderWrapper(BorderPane root) { HBox arrSizeSliderWrapper = new HBox(); arrSizeSliderWrapper.setSpacing(10); Label arrSizeSliderText = new Label("Change Array Size:"); arrSizeSliderText.setTextFill(Color.WHITE); arrSizeSliderWrapper.getChildren().addAll(arrSizeSliderText, createArrSizeSlider(root)); return arrSizeSliderWrapper; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mouseClicked(MouseEvent e) {\n\t\t\tint x = e.getX();\n\t\t\tint y = e.getY();\n\n\t\t\t// selected area is highlighted by drawing a rectangle around it\n\t\t\t// areaLabel flashes the name of the area selected\n\t\t\tif ((x >= 230 && x <= 329) && (y >= 155 && y <= 295)) {\n\n\t\t\t\tsection = new Rect...
[ "0.63277864", "0.620074", "0.60828066", "0.59029794", "0.5893177", "0.58761954", "0.58557695", "0.5827908", "0.58148503", "0.580507", "0.5783695", "0.57626486", "0.5733759", "0.56923485", "0.565925", "0.56072843", "0.5601126", "0.5598736", "0.5590261", "0.5577536", "0.5544638...
0.0
-1
Generates a slider that allows the user to change the size of the array to be sorted
private Slider createArrSizeSlider(BorderPane root) { Slider arrSizeSlider = new Slider(MIN_ARR_SIZE, MAX_ARR_SIZE, arrSize); arrSizeSlider.valueProperty().addListener((observable, oldValue, newValue) -> { ((HBox) root.getTop()).getChildren().get(2).setDisable(false); ((HBox) root.getTop()).getChildren().get(3).setDisable(false); arrSize = newValue.intValue(); width = (SORTING_DISPLAY_WIDTH - 2 * (arrSize - 1)) / arrSize; generateRandomHeights(); root.setBottom(createSortingDisplay()); }); return arrSizeSlider; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private HBox createArrSizeSliderWrapper(BorderPane root) {\n HBox arrSizeSliderWrapper = new HBox();\n\n arrSizeSliderWrapper.setSpacing(10);\n Label arrSizeSliderText = new Label(\"Change Array Size:\");\n arrSizeSliderText.setTextFill(Color.WHITE);\n arrSizeSliderWrapper.getChi...
[ "0.6043782", "0.6011592", "0.5996553", "0.58520895", "0.5771087", "0.5758959", "0.57283354", "0.5683566", "0.56810135", "0.56757665", "0.5675349", "0.5648686", "0.563395", "0.5625998", "0.560136", "0.5597149", "0.5584501", "0.5578537", "0.55365425", "0.5453538", "0.54532367",...
0.7103368
0
Generates the section in the menu where the user can adjust the number of threads used to execute the merge sort
private HBox createNumOfThreadsSpinnerWrapper() { HBox numOfThreadsSpinnerWrapper = new HBox(); numOfThreadsSpinnerWrapper.setSpacing(10); Label numOfThreadsSpinnerText = new Label("Change Number of Threads:"); numOfThreadsSpinnerText.setTextFill(Color.WHITE); numOfThreadsSpinnerWrapper.getChildren().addAll(numOfThreadsSpinnerText, createNumOfThreadsSpinner()); return numOfThreadsSpinnerWrapper; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@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\...
[ "0.58960056", "0.5767487", "0.5687816", "0.56807363", "0.54515284", "0.54258233", "0.5416182", "0.54160285", "0.54048514", "0.53720677", "0.5364395", "0.5344014", "0.52989", "0.52850276", "0.52774864", "0.5264513", "0.5253488", "0.52463955", "0.52403146", "0.5230924", "0.5221...
0.0
-1
Generates a spinner that allows the user to change the number of threads used to sort the rectangles
private Spinner<Integer> createNumOfThreadsSpinner() { Spinner<Integer> numOfThreadsSpinner = new Spinner<Integer> ( new SpinnerValueFactory.IntegerSpinnerValueFactory(1, 128) { @Override public void decrement(int i) { if(getValue() != null) { setValue(getValue() / 2); numOfThreads = getValue(); } } @Override public void increment(int i) { if(getValue() != null) { setValue(getValue() * 2); numOfThreads = getValue(); } } }); return numOfThreadsSpinner; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private HBox createNumOfThreadsSpinnerWrapper() {\n HBox numOfThreadsSpinnerWrapper = new HBox();\n\n numOfThreadsSpinnerWrapper.setSpacing(10);\n Label numOfThreadsSpinnerText = new Label(\"Change Number of Threads:\");\n numOfThreadsSpinnerText.setTextFill(Color.WHITE);\n numOf...
[ "0.6505617", "0.59438515", "0.5910912", "0.55534524", "0.54893583", "0.5464992", "0.5440207", "0.54186726", "0.54122925", "0.53953063", "0.5381379", "0.5341888", "0.5252968", "0.525236", "0.524818", "0.5230379", "0.5208549", "0.52084905", "0.52082914", "0.51845104", "0.516754...
0.648493
1
Generates a button that runs merge sort on the rectangles in the sorting sections
private Button createExecuteMergeSortButton(BorderPane root) { Button executeMergeSortButton = new Button("Execute Merge Sort"); executeMergeSortButton.setOnMouseClicked(event -> { // The list of rectangles being displayed to be sorted ObservableList<Node> recs = ((HBox) root.getBottom()).getChildren(); // A separate thread is required to show the progress of the sort because the JavaFX thread can't run // animations and update the screen at the same time Service<Void> sortingThread = new Service<Void>() { @Override protected Task<Void> createTask() { return new Task<Void>() { @Override protected Void call() { // The user is not allowed to change the number of threads or click the "Execute Merge Sort" // button while sorting is in progress ((HBox) root.getTop()).getChildren().get(2).setDisable(true); ((HBox) root.getTop()).getChildren().get(3).setDisable(true); // The array of rectangle heights is sorted and a list of animations for the rectangles // on the screen is created as the sorting executes List<List<List<double[]>>> animations = new ArrayList<List<List<double[]>>>(); runMergeSort(heights, numOfThreads, animations); runAnimations(recs, animations); return null; } }; } }; sortingThread.setOnSucceeded(workerStateEvent -> { ((HBox) root.getTop()).getChildren().get(2).setDisable(false); ((HBox) root.getTop()).getChildren().get(3).setDisable(false); }); sortingThread.restart(); }); return executeMergeSortButton; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@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\...
[ "0.70929396", "0.67494655", "0.6591904", "0.6377806", "0.62286633", "0.6098608", "0.5876073", "0.5860582", "0.58082175", "0.5806369", "0.5801403", "0.5769776", "0.57576543", "0.57179165", "0.5711169", "0.5693994", "0.5662364", "0.5598315", "0.5597735", "0.5595014", "0.5589687...
0.7652479
0
The user is not allowed to change the number of threads or click the "Execute Merge Sort" button while sorting is in progress
@Override protected Void call() { ((HBox) root.getTop()).getChildren().get(2).setDisable(true); ((HBox) root.getTop()).getChildren().get(3).setDisable(true); // The array of rectangle heights is sorted and a list of animations for the rectangles // on the screen is created as the sorting executes List<List<List<double[]>>> animations = new ArrayList<List<List<double[]>>>(); runMergeSort(heights, numOfThreads, animations); runAnimations(recs, animations); return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 // generat...
[ "0.68924415", "0.6877164", "0.6678611", "0.64230996", "0.62284076", "0.62140805", "0.6197687", "0.619387", "0.616057", "0.61492634", "0.60909855", "0.60790443", "0.6055483", "0.60454345", "0.6009931", "0.60060143", "0.59966266", "0.59834", "0.5923741", "0.5913114", "0.5880351...
0.0
-1
Executes merge sort on the inputted array and keeps track of the steps so as to create the visual effects on the rectangles on the screen as they are sorted
private void runMergeSort(double[] heights, int numberOfThreads, List<List<List<double[]>>> animations) { // Merge sort splits the input into separate sections to sorted separately and then merged, so this list keeps // track of the starting index of each section of the input List<List<Integer>> starts = new ArrayList<List<Integer>>(); starts.add(new ArrayList<Integer>()); // The number of rectangles separating the start of each section created by the first stage of merge sort int interval; if(numberOfThreads > arrSize) { interval = 1; } else { interval = (int) Math.ceil((double) arrSize / (double) numberOfThreads); } /* The first stage of concurrent merge sort is to sort each separate section of the input with an individual thread. Then each subsequent stage consists of merging the separate sections such that the number of separately sorted sections is halved until the input is fully sorted. For the purposes of visualization, each stage in the process is represented as a time level in the animations list in the form of a list. Each separate section of the input at a given time level is represented as a list which is nested inside of the list corresponding to the time level at which the section (location) exists. Each list of locations holds arrays of doubles with each array representing some step in the process of merge sort (such as the comparison of two values, or the changing of some value in the input). */ List<List<double[]>> firstTimeLevel = new ArrayList<List<double[]>>(); animations.add(firstTimeLevel); // main.Sorting the separate sections of the input as defined by the number of threads being used for(int i = 0; i < arrSize - interval; i += interval) { List<double[]> location = new ArrayList<double[]>(); firstTimeLevel.add(location); int start = i; int end = (i + interval - 1) > (arrSize - 1) ? arrSize - 1: i + interval - 1; starts.get(0).add(start); MergeSort.mergeSort(heights, start, end, location); } List<double[]> location = new ArrayList<double[]>(); firstTimeLevel.add(location); int start = (arrSize - interval) >= 0 ? arrSize - interval : 0; int end = arrSize - 1; starts.get(0).add(start); MergeSort.mergeSort(heights, start, end, location); runMerge(heights, numberOfThreads / 2, starts, animations); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void mergesort(int[] array) {\n\t\t\n\t}", "public void mergesort_iterative(){\n\t\tint step = 1;\n\t\tint length = arr.length;\n\t\twhile(step < length){\n\t\t\tint i = 0;\n\t\t\twhile(i<length){\n\t\t\t\tmerge_iterative(i, step);\n\t\t\t\ti += step*2;\n\t\t\t}\n\t\t\tstep <<= 1;\n\t\t}\n\t}", "@Overr...
[ "0.71344024", "0.70201224", "0.69471073", "0.69125104", "0.6888155", "0.68529457", "0.68117934", "0.6770134", "0.6706281", "0.6684471", "0.666373", "0.66527957", "0.66406345", "0.6607614", "0.65763617", "0.65705085", "0.6540931", "0.6522754", "0.6513033", "0.65094084", "0.650...
0.67694485
8
Merges the separately sorted sections of the inputted array
private void runMerge(double[] heights, int numberOfThreads, List<List<Integer>> starts, List<List<List<double[]>>> animations) { // A counter to keep track of the time level int inc = 0; while(numberOfThreads >= 1) { // Each round of merging occurs at separate separate time levels List<List<double[]>> timeLevel = new ArrayList<List<double[]>>(); animations.add(timeLevel); // Each time level has a different set of sorted sections List<Integer> startLevel = new ArrayList<Integer>(); startLevel.add(0); starts.add(startLevel); List<Integer> currentStartLevel = starts.get(inc); // Executing merge for the current time level and generating the corresponding animations for(int iteration = 0; iteration < currentStartLevel.size() - 1; iteration += 2) { List<double[]> location = new ArrayList<double[]>(); timeLevel.add(location); int startIndex = currentStartLevel.get(iteration); int middleIndex = currentStartLevel.get(iteration + 1) - 1; int endIndex; if(iteration == currentStartLevel.size() - 2) { endIndex = arrSize - 1; } else { endIndex = currentStartLevel.get(iteration + 2) - 1; startLevel.add(endIndex + 1); } MergeSort.merge(heights, startIndex, middleIndex, endIndex, location); } inc++; // The number of separately sorted sections is halved after ever stage of sorting numberOfThreads /= 2; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void mergesort(int[] array) {\n\t\t\n\t}", "static void mergeSort(int array[], int start, int end) {\n if (start < end) {\n // Find the middle point\n int middle = start + (end - start)/2;\n\n // Sort first and second parts\n mergeSort(array, start, midd...
[ "0.71467954", "0.7125429", "0.7097599", "0.6914901", "0.68627644", "0.680697", "0.6795481", "0.6779449", "0.6728987", "0.672288", "0.67064387", "0.6705537", "0.66866845", "0.6650131", "0.6615924", "0.66110885", "0.6584472", "0.6580836", "0.65732074", "0.65666336", "0.6563748"...
0.0
-1
Executes the animations generated while actually running merge sort to provide the steps visually
private void runAnimations(ObservableList<Node> recs, List<List<List<double[]>>> animations) { // The amount of time to pause between each step of animations long delay = 1000 / arrSize; // Time levels must occur in order for(int timeLevelIndex = 0; timeLevelIndex < animations.size(); timeLevelIndex++) { List<List<double[]>> timeLevel = animations.get(timeLevelIndex); int maxEvents = findMaxEvents(timeLevel); // Displaying each step of merge sort at the corresponding location of the input for(int eventIndex = 0; eventIndex < maxEvents; eventIndex++) { for(int locationIndex = 0; locationIndex < timeLevel.size(); locationIndex++) { List<double[]> location = timeLevel.get(locationIndex); if(eventIndex < location.size()) { double[] event = location.get(eventIndex); switch ((int) event[0]) { case 1: ((Rectangle) recs.get((int) event[1])).setFill(DEFAULT_COLOR); ((Rectangle) recs.get((int) event[2])).setFill(DEFAULT_COLOR); break; case 2: ((Rectangle) recs.get((int) event[1])).setFill(COMPARISON_COLOR); ((Rectangle) recs.get((int) event[2])).setFill(COMPARISON_COLOR); break; case 3: ((Rectangle) recs.get((int) event[1])).setFill(CHANGE_COLOR); ((Rectangle) recs.get((int) event[2])).setFill(CHANGE_COLOR); break; case 4: ((Rectangle) recs.get((int) event[1])).setHeight(event[2]); break; } } } try { Thread.sleep(delay); } catch (InterruptedException e) { e.printStackTrace(); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected Void call() {\n ((HBox) root.getTop()).getChildren().get(2).setDisable(true);\n ((HBox) root.getTop()).getChildren().get(3).setDisable(true);\n\n // The array of rectangle heights is sorted...
[ "0.69788975", "0.67521936", "0.65322757", "0.65073425", "0.6055248", "0.5930312", "0.5917042", "0.58944803", "0.58535874", "0.580463", "0.5766336", "0.5756973", "0.57260484", "0.56693554", "0.5661997", "0.565358", "0.5650235", "0.5639631", "0.56232935", "0.560828", "0.5600212...
0.7164209
0
Finds the largest number of events that occur at any location of a given time level
private int findMaxEvents(List<List<double[]>> timeLevel) { int max = 0; for(List<double[]> locations : timeLevel) { if (locations.size() > max) { max = locations.size(); } } return max; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int maxEvents(int[][] events) {\n Arrays.sort(events, (i1, i2) -> Integer.compare(i1[1], i2[1]));\n Set<Integer> occupied = new HashSet<>();\n for (int[] e : events) {\n for (int i = e[0]; i <= e[1]; i++) {\n if (!occupied.contains(i)) {\n oc...
[ "0.59441155", "0.5676505", "0.5572953", "0.54777986", "0.5419122", "0.53417206", "0.5324073", "0.52457064", "0.51999", "0.51826787", "0.5111576", "0.50853044", "0.50816476", "0.50703955", "0.5063359", "0.5059896", "0.5057424", "0.5039923", "0.50373584", "0.5010143", "0.500492...
0.7669771
0
Generates the display of the rectangles that are to be sorted
private HBox createSortingDisplay() { HBox sortingDisplay = new HBox(); sortingDisplay.setPadding(new Insets(0, 0, 50, 0)); sortingDisplay.setSpacing(2); sortingDisplay.setMaxHeight(MAX_HEIGHT); sortingDisplay.setAlignment(Pos.BASELINE_CENTER); for(int i = 0; i < arrSize; i++) { Rectangle rec = new Rectangle(width, heights[i], DEFAULT_COLOR); sortingDisplay.getChildren().add(rec); } return sortingDisplay; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void displayRectangles() {\n\n\n int arr[] = IntStream.of(findDuplicates(TricolourController.BloodCells)).distinct().toArray(); //takes only the unique values from the array\n int arrWhite[] = IntStream.of(findDuplicates(TricolourController.WhiteCells)).distinct().toArray();\n int rInde...
[ "0.7149644", "0.6558874", "0.65390885", "0.63566947", "0.63106143", "0.6307198", "0.62361056", "0.6211003", "0.61258763", "0.61201483", "0.6118313", "0.6100681", "0.60451305", "0.5983196", "0.58765703", "0.5865015", "0.5861452", "0.5848155", "0.5838087", "0.5757377", "0.57421...
0.7289561
0
Where the application is run
public static void main(String[] args) { launch(args); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getRunLocation();", "private void showExecutionStart() {\n log.info(\"##############################################################\");\n log.info(\"Creating a new web application with the following parameters: \");\n log.info(\"################################################...
[ "0.6954968", "0.6296446", "0.6177361", "0.61725813", "0.61484665", "0.61443734", "0.5946814", "0.5946203", "0.5937302", "0.58595365", "0.58372355", "0.57747316", "0.57256556", "0.572185", "0.5693942", "0.5687618", "0.56361437", "0.55987376", "0.55943364", "0.55943364", "0.559...
0.0
-1
/ Create a map of countries with its capital. Print all keys and values from a country map using for each loop and iterator. Print all values from a country map using for each loop and iterator.
public static void main(String[] args) { Map <String, String> map=new LinkedHashMap<>(); map.put("El Salvador", "San Salvador"); map.put("Honduras", "Tegusigalpa"); map.put("USA", "Washington"); map.put("Spain", "Barcelona"); map.put("Argentina", "Buenos Aires"); Set <String> country=map.keySet(); for (String s:country) { System.out.println("Country "+s+" and capital city is "+map.get(s)); } System.out.println("-----------------------"); Iterator<String> itCountry=country.iterator(); while (itCountry.hasNext()) { String c=itCountry.next(); System.out.println("Country "+c+" has capital city "+map.get(c)); } System.out.println("--------All values---------------"); Collection<String> val=map.values(); for(String values:val) { System.out.println(values); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\tHashMap<String,String> capitalMap=new HashMap<String,String>();//creating hashmap\n\t\tcapitalMap.put(\"India\", \"New Delhi\");\n\t\tcapitalMap.put(\"USA\", \"WashingtonDC\");//adding values into it\n\t\tcapitalMap.put(\"UK\", \"London\");\n\t\tcapitalMap.put(\"Austra...
[ "0.6576406", "0.6443637", "0.64040446", "0.6398588", "0.63767385", "0.6122709", "0.59153384", "0.57821417", "0.5743206", "0.56833124", "0.56389105", "0.56282854", "0.5572418", "0.55098933", "0.5508519", "0.5495308", "0.546847", "0.54556966", "0.5414264", "0.53696615", "0.5369...
0.65241724
1
Contructor de la clase
public DownLoadTrabajo(Context context){ this.ConnectServerContext = context; this.FcnCfg = ClassConfiguracion.getInstance(this.ConnectServerContext); this.FcnInformacion = new ClassFlujoInformacion(this.ConnectServerContext); this.FcnArch = new Archivos(this.ConnectServerContext, FormInicioSession.path_files_app, 10); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "public Constructor(){\n\t\t\n\t}", "public Clade() {}", "public Pasien() {\r\n }", "public Carrera(){\n }", "public CyanSus() {\n\n }", "public AntrianPasien() {\r\n\r\n }", "public Chauffeur() {\r\n\t}", "public Classe() {\r\n }", "public Alojamiento...
[ "0.83802307", "0.8056082", "0.7788479", "0.7712666", "0.7619189", "0.7596564", "0.7584487", "0.7578544", "0.7533453", "0.75209516", "0.7512554", "0.74880713", "0.7483526", "0.7483096", "0.7435412", "0.7424211", "0.73704696", "0.73603886", "0.73475754", "0.7336631", "0.7329389...
0.0
-1
Operaciones antes de realizar la conexion con el servidor
protected void onPreExecute(){ this.URL = this.FcnCfg.getIp_server()+":"+this.FcnCfg.getPort()+"/"+this.FcnCfg.getModule_web_service()+"/"+this.FcnCfg.getWeb_service(); this.NAMESPACE = this.FcnCfg.getIp_server()+":"+this.FcnCfg.getPort()+"/"+this.FcnCfg.getModule_web_service(); Toast.makeText(this.ConnectServerContext,"Iniciando conexion con el servidor, por favor espere...", Toast.LENGTH_SHORT).show(); _pDialog = new ProgressDialog(this.ConnectServerContext); _pDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); _pDialog.setMessage("Ejecutando operaciones..."); _pDialog.setCancelable(false); _pDialog.setProgress(0); _pDialog.setMax(100); _pDialog.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void conectar() {\n\t\tif (isOnline()) {\n\t\t\tregister_user();\n\n\t\t} else {\n\t\t\tToast notification = Toast.makeText(this,\n\t\t\t\t\t\"Activa tu conexión a internet\", Toast.LENGTH_SHORT);\n\t\t\tnotification.setGravity(Gravity.CENTER, 0, 0);\n\t\t\tnotification.show();\n\t\t\t//progreso.setVisibili...
[ "0.7022021", "0.648437", "0.6411924", "0.63942194", "0.6340552", "0.6313755", "0.6291284", "0.6280363", "0.62801534", "0.6260247", "0.6257882", "0.6197954", "0.61725646", "0.6127202", "0.6102654", "0.6075762", "0.60603595", "0.60513395", "0.60424286", "0.6033596", "0.6002092"...
0.0
-1
Conexion con el servidor en busca de actualizaciones de trabajo programado
@Override protected Integer doInBackground(String... params) { int _retorno = 0; try{ this.so=new SoapObject(NAMESPACE, METHOD_NAME); this.so.addProperty("id_interno", params[0]); this.so.addProperty("rutas_cargadas", params[1]); this.so.addProperty("fecha_movil", params[2]); this.so.addProperty("hora_movil", params[3]); this.sse=new SoapSerializationEnvelope(SoapEnvelope.VER11); this.sse.dotNet=true; this.sse.setOutputSoapObject(this.so); this.htse=new HttpTransportSE(URL); this.htse.call(SOAP_ACTION, this.sse); this.response=(SoapPrimitive) this.sse.getResponse(); /**Inicio de tratamiento de la informacion recibida**/ if(response.toString()==null) { _retorno = -1; }else if(response.toString().isEmpty()){ _retorno = -2; }else{ String informacion[] = response.toString().split("\\n"); if(informacion[0].equals("1")){ if(informacion.length>1){ for(int i=1;i<informacion.length;i++){ this.FcnInformacion.CargarTrabajo(informacion[i],"\\|", i); this.onProgressUpdate(i*100/informacion.length); _retorno = 1; } }else{ _retorno = 2; } }else if(informacion[0].equals("-1")){ _retorno = -3; }else if(informacion[0].equals("-2")){ _retorno = -4; } } }catch (IOException e) { e.printStackTrace(); _retorno = -5; }catch (Exception e) { e.toString(); _retorno = -6; }finally{ if(this.htse != null){ this.htse.reset(); try { this.htse.getServiceConnection().disconnect(); } catch (IOException e) { e.printStackTrace(); _retorno = -7; } } } return _retorno; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void Conectar(){\n Executors.newSingleThreadExecutor().execute(() -> {\n try {\n ws.connect();\n // se indica que el proposito del mensaje es identificar este nodo.\n // para lo cual se manda en el cuerpo que se trata de una tablet origin\n ...
[ "0.68693554", "0.6822204", "0.68185884", "0.67518604", "0.66250545", "0.6583806", "0.65387905", "0.6525637", "0.64840215", "0.6454964", "0.6454235", "0.6429528", "0.64069575", "0.6397989", "0.63979185", "0.63777936", "0.6354941", "0.63025475", "0.6277116", "0.62261856", "0.62...
0.0
-1
Operaciones despues de finalizar la conexion con el servidor
@Override protected void onPostExecute(Integer rta) { switch (rta){ case -1: new showDialogBox().showLoginDialog(this.ConnectServerContext,DIALOG_ERROR,"RECEPCION TRABAJO","No se ha recibido respuesta del servidor."); break; case -2: new showDialogBox().showLoginDialog(this.ConnectServerContext,DIALOG_ERROR,"RECEPCION TRABAJO","El servidor ha enviado informacion no valida."); break; case -3: new showDialogBox().showLoginDialog(this.ConnectServerContext,DIALOG_ERROR,"RECEPCION TRABAJO","No hay sincronia de fecha, favor verificar la fecha y el formato (dd/mm/yyyy)."); break; case -4: new showDialogBox().showLoginDialog(this.ConnectServerContext,DIALOG_ERROR,"RECEPCION TRABAJO","No hay sincronia de hora, favor verificar la hora."); break; case -5: new showDialogBox().showLoginDialog(this.ConnectServerContext,DIALOG_ERROR,"RECEPCION TRABAJO","Hubo un error en el envio de la informacion al servidor."); break; case -6: new showDialogBox().showLoginDialog(this.ConnectServerContext,DIALOG_ERROR,"RECEPCION TRABAJO","Hubo un error en el envio de la informacion al servidor."); break; case -7: new showDialogBox().showLoginDialog(this.ConnectServerContext,DIALOG_ERROR,"RECEPCION TRABAJO","Hubo un error al momento de cerrar la conexion con el servidor."); break; case 1: new showDialogBox().showLoginDialog(this.ConnectServerContext,DIALOG_INFORMATIVE,"RECEPCION TRABAJO","Recepcion de trabajo realizada correctamente."); break; case 2: new showDialogBox().showLoginDialog(this.ConnectServerContext,DIALOG_INFORMATIVE,"RECEPCION TRABAJO","No hay rutas pendientes por cargar."); break; default: new showDialogBox().showLoginDialog(this.ConnectServerContext,DIALOG_ERROR,"RECEPCION TRABAJO","Error desconocido."); break; } _pDialog.dismiss(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void closeConnection(){\r\n\t\t_instance.getServerConnection().logout();\r\n\t}", "public void desconectar() {\r\n conn = null;\r\n if (conn == null) {\r\n System.out.println(\"Conexion Terminada\");\r\n }\r\n }", "public static void close() {\n\t\ttry {\n\t\t\tSystem....
[ "0.7053963", "0.69108665", "0.6886165", "0.686074", "0.6841969", "0.6766234", "0.67438614", "0.6740997", "0.6689771", "0.6680052", "0.66227555", "0.6598342", "0.65700805", "0.655764", "0.65475684", "0.65231466", "0.65193206", "0.6456959", "0.6403781", "0.6398137", "0.6390002"...
0.0
-1
Launch the application. Create the frame.
public AdminForma2() { setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); setBounds(100, 100, 1013, 397); contentPane = new JPanel(); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); setContentPane(contentPane); contentPane.setLayout(null); JButton btnObrisiRezervaciju = new JButton("Obrisi rezervaciju"); btnObrisiRezervaciju.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { Kontroler.getInstanca().obrisiRezervaciju(ID_Rezervacije); podesiIDPredstave(nazivPredstave); podesiRaspUlaznice(nazivPredstave); noviBrRasUl+=brojRezervisanihUlaznica; Kontroler.getInstanca().azurirajBrojUlaznica(ID_Pred, noviBrRasUl); osveziTabeluRezervacija(); JOptionPane.showMessageDialog(null, "Uspesno ste Izbrisali rezervaciju"); } }); btnObrisiRezervaciju.setBounds(21, 297, 140, 23); contentPane.add(btnObrisiRezervaciju); cbPozoriste = new JComboBox(); cbPozoriste.addItem("Rezervacije"); cbPozoriste.addItem("-- -- -- --"); cbPozoriste.addItem("Sortiraj - Broj Rez"); cbPozoriste.addItem("-- -- -- --"); cbPozoriste.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { nazivPozoriste = (String) cbPozoriste.getSelectedItem(); for(Rezervacije rz:Kontroler.getInstanca().vratiRezervacije()) { if(nazivPozoriste.equals("Rezervacije")) { osveziTabeluRezervacija(); }else if(nazivPozoriste.equals("Sortiraj - Broj Rez")) { Collections.sort(alSort, Predstave.StuNameComparator2); ucitajSortiranoPoBrojRez(); }else if(nazivPozoriste.equals(rz.getImePozorista())) { osveziTabeluRezervacija(nazivPozoriste); } } } }); cbPozoriste.setBounds(21, 11, 153, 20); contentPane.add(cbPozoriste); table_Rezervacije = new JTable(dtm); JScrollPane scrollPane = new JScrollPane(table_Rezervacije); scrollPane.setBounds(21, 42, 966, 244); contentPane.add(scrollPane); table_Rezervacije.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { // TODO Auto-generated method stub int red=table_Rezervacije.getSelectedRow(); String id_Rez, imePoz, id, naziv, scena, vreme, brojRezUl, datum, cena=null; id_Rez=(table_Rezervacije.getModel().getValueAt(red, 0).toString()); ID_Rezervacije=Integer.parseInt(id_Rez); imePoz=(table_Rezervacije.getModel().getValueAt(red, 2).toString()); ImePozorista=imePoz; naziv=(table_Rezervacije.getModel().getValueAt(red, 3).toString()); nazivPredstave=naziv; scena=(table_Rezervacije.getModel().getValueAt(red, 6).toString()); scenaIzvodjenja=scena; brojRezUl=(table_Rezervacije.getModel().getValueAt(red, 7).toString()); brojRezervisanihUlaznica=Integer.valueOf(brojRezUl); cena=(table_Rezervacije.getModel().getValueAt(red, 8).toString()); cenaUlaznica=Integer.valueOf(cena); } }); scrollPane.setViewportView(table_Rezervacije); btnOsveziTabelu = new JButton("Osvezi tabelu Rezervacija"); btnOsveziTabelu.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { osveziTabeluRezervacija(); } }); btnOsveziTabelu.setBounds(349, 324, 198, 23); contentPane.add(btnOsveziTabelu); JLabel lblRezervacije = new JLabel("Rezervacije svih korisnika"); lblRezervacije.setFont(new Font("Tahoma", Font.BOLD, 14)); lblRezervacije.setBounds(371, 11, 231, 17); contentPane.add(lblRezervacije); btnPretragaGledalac = new JButton("Pretraga gledalac"); btnPretragaGledalac.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { pretragaGledalac(); obrisiPoljePretraga(); } }); btnPretragaGledalac.setBounds(834, 297, 153, 23); contentPane.add(btnPretragaGledalac); tfPretraga = new JTextField(); tfPretraga.setBounds(654, 298, 170, 20); contentPane.add(tfPretraga); tfPretraga.setColumns(10); Object[]kolone=new Object[9]; kolone[0]="ID Rez"; kolone[1]="Korisnik"; kolone[2]="Pozoriste"; kolone[3]="Predstava"; kolone[4]="Datum"; kolone[5]="Vreme"; kolone[6]="Scena"; kolone[7]="Broj rez ulaznica"; kolone[8]="Cena po kom"; dtm.addColumn(kolone[0]); dtm.addColumn(kolone[1]); dtm.addColumn(kolone[2]); dtm.addColumn(kolone[3]); dtm.addColumn(kolone[4]); dtm.addColumn(kolone[5]); dtm.addColumn(kolone[6]); dtm.addColumn(kolone[7]); dtm.addColumn(kolone[8]); osveziTabeluRezervacija(); napuniCbPozoriste(); alSort=Kontroler.getInstanca().vratiRezervacije(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void launch() {\n m_frame.pack();\n m_frame.setVisible(true);\n }", "public launchFrame() {\n \n initComponents();\n \n }", "public void launchFrame() {\n\t\tf.getContentPane().add(sbrText);\n\t\tf.getContentPane().add(btnQuit);\n\n\t\t// Close when the close button ...
[ "0.7721962", "0.7671579", "0.7566445", "0.7010299", "0.67865115", "0.6757913", "0.673126", "0.67256194", "0.667399", "0.66529185", "0.6631305", "0.6585976", "0.6559681", "0.64935666", "0.6491999", "0.6486304", "0.64726967", "0.64501196", "0.6412144", "0.6390983", "0.6369808",...
0.0
-1
TODO Autogenerated method stub
@Override public void mouseClicked(MouseEvent e) { int red=table_Rezervacije.getSelectedRow(); String id_Rez, imePoz, id, naziv, scena, vreme, brojRezUl, datum, cena=null; id_Rez=(table_Rezervacije.getModel().getValueAt(red, 0).toString()); ID_Rezervacije=Integer.parseInt(id_Rez); imePoz=(table_Rezervacije.getModel().getValueAt(red, 2).toString()); ImePozorista=imePoz; naziv=(table_Rezervacije.getModel().getValueAt(red, 3).toString()); nazivPredstave=naziv; scena=(table_Rezervacije.getModel().getValueAt(red, 6).toString()); scenaIzvodjenja=scena; brojRezUl=(table_Rezervacije.getModel().getValueAt(red, 7).toString()); brojRezervisanihUlaznica=Integer.valueOf(brojRezUl); cena=(table_Rezervacije.getModel().getValueAt(red, 8).toString()); cenaUlaznica=Integer.valueOf(cena); }
{ "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 getExr...
[ "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.608016...
0.0
-1
TODO Autogenerated method stub
protected void ucitajSortiranoPoBrojRez() { Object[]redovi=new Object[9]; dtm.setRowCount(0); for(Rezervacije r:alSort) { redovi[0]=r.getID_Rez(); redovi[1]=r.getImePrezime(); redovi[2]=r.getImePozorista(); redovi[3]=r.getNazivPredstave(); redovi[4]=r.getDatumIzvodjenja(); redovi[5]=r.getVremeIzvodjenja(); redovi[6]=r.getScenaIzvodjenja(); redovi[7]=r.getBrRezUl(); redovi[8]=r.getCenaUlaznica(); dtm.addRow(redovi); } }
{ "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 getExr...
[ "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.608016...
0.0
-1
TODO Autogenerated method stub
protected void obrisiPoljePretraga() { tfPretraga.setText(""); }
{ "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 getExr...
[ "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.608016...
0.0
-1
TODO Autogenerated method stub
protected void pretragaGledalac() { String Gledalac=tfPretraga.getText(); Object[]redovi=new Object[9]; dtm.setRowCount(0); for(Rezervacije r:Kontroler.getInstanca().vratiRezervacije()) { if(r.getImePrezime().toLowerCase().contains(Gledalac.toLowerCase())) { redovi[0]=r.getID_Rez(); redovi[1]=r.getImePrezime(); redovi[2]=r.getImePozorista(); redovi[3]=r.getNazivPredstave(); redovi[4]=r.getDatumIzvodjenja(); redovi[5]=r.getVremeIzvodjenja(); redovi[6]=r.getScenaIzvodjenja(); redovi[7]=r.getBrRezUl(); redovi[8]=r.getCenaUlaznica(); dtm.addRow(redovi); } } }
{ "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 getExr...
[ "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.608016...
0.0
-1
TODO Autogenerated method stub
protected void osveziTabeluRezervacija(String nazivPozoriste) { Object[]redovi=new Object[9]; dtm.setRowCount(0); for(Rezervacije r:Kontroler.getInstanca().vratiRezervacije(nazivPozoriste)) { redovi[0]=r.getID_Rez(); redovi[1]=r.getImePrezime(); redovi[2]=r.getImePozorista(); redovi[3]=r.getNazivPredstave(); redovi[4]=r.getDatumIzvodjenja(); redovi[5]=r.getVremeIzvodjenja(); redovi[6]=r.getScenaIzvodjenja(); redovi[7]=r.getBrRezUl(); redovi[8]=r.getCenaUlaznica(); dtm.addRow(redovi); } }
{ "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 getExr...
[ "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.608016...
0.0
-1
TODO Autogenerated method stub
protected void podesiRaspUlaznice(String nazivPredstave) { for (Predstave p:Kontroler.getInstanca().vratiRepertoar()) if(p.getNazivPredstave().equals(nazivPredstave)) noviBrRasUl=p.getBrojRaspolozivihUlaznica(); }
{ "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 getExr...
[ "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.608016...
0.0
-1
TODO Autogenerated method stub
protected void podesiIDPredstave(String nazivPredstave) { for (Predstave p:Kontroler.getInstanca().vratiRepertoar()) if(p.getNazivPredstave().equals(nazivPredstave)) ID_Pred=p.getId(); }
{ "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 getExr...
[ "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.608016...
0.0
-1
TODO Autogenerated method stub
private void napuniCbPozoriste() { for (Pozoriste p:Kontroler.getInstanca().vratiPozorista()) cbPozoriste.addItem(p.getImePozorista()); }
{ "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 getExr...
[ "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.608016...
0.0
-1
/ Question2: Largest square of 1's in a binary matrix What is the edge length of the largest square of 1's in a given binary matrix. Example: 1 1 1 1 0 1 1 1 1 0 return 4 in this case 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 DP solution: M[i][j] represents the max side length of allone subsquare with (i,j) as the LOWER RIGHT CORNER eg: M[3][3] = 4; M[3][2] = 3; M[4][1] = 1 base case: M[0][j] = a[0][j]; M[i][0] = a[i][0] induction rule: for any M[i][j] = 1 (i,j >= 1), M[i][j] = min(M[i1][j1], M[i][j1], M[i1][j]) + 1
public int largestSquare(int[][] matrix) { if (matrix == null || matrix.length == 0) return 0; int row = matrix.length; int col = matrix[0].length; int[][] M = new int[row][col]; int globalMax = 0; //base case for (int index = 0; index < row; index++) { M[index][0] = matrix[index][0]; // M[i][0] = i } for (int index = 0; index < col; index++) { M[0][index] = matrix[0][index]; } //induction rule for (int i = 1; i < row; i++) { for (int j = 1; j < col; j++) { M[i][j] = Math.min(M[i-1][j-1], Math.min(M[i-1][j], M[i][j-1])) + 1; globalMax = Math.max(globalMax, M[i][j]); } } return globalMax; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int maximalSquare(char[][] matrix) {\n if(matrix == null || matrix.length < 1) return 0;\n int[][] dp = new int[matrix.length][matrix[0].length];\n int max = 0;\n for(int i = 0; i < matrix.length; i++) {\n for(int j = 0; j < matrix[0].length; j++) {\n if...
[ "0.6936622", "0.6905058", "0.6557957", "0.6542274", "0.6465213", "0.63627994", "0.6208167", "0.6159037", "0.6077402", "0.6075038", "0.60663056", "0.6028082", "0.6020038", "0.60154223", "0.5923137", "0.5894996", "0.58650875", "0.58586687", "0.5837962", "0.58301574", "0.5822351...
0.628042
6
If message translation is desired, then translate before passing in the message. Always use Show() instead of ShowDialog() and make sure to programmatically call Close(), because the user will not be able to close (no buttons are visible).
public FormAlertSimple(String strMsgText) throws Exception { initializeComponent(); Lan.F(this); labelMsg.Text = strMsgText; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showMessage(){\r\n if(message == null) return;\r\n JOptionPane.showMessageDialog(new JFrame(), message);\r\n }", "private void showMessage(String message) {\n JOptionPane jOptionPane = new JOptionPane(message, JOptionPane.PLAIN_MESSAGE);\n JDialog dialog = jOptionPane.create...
[ "0.67965585", "0.6674052", "0.6642435", "0.66311634", "0.65815306", "0.65557534", "0.65529394", "0.65466803", "0.65329695", "0.6509964", "0.647898", "0.64779645", "0.6464135", "0.64507455", "0.643944", "0.63946867", "0.638327", "0.6358905", "0.6358905", "0.6346491", "0.634397...
0.0
-1
Clean up any resources being used.
protected void dispose(boolean disposing) throws Exception { if (disposing && (components != null)) { components.Dispose(); } super.Dispose(disposing); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void cleanup() {\r\n }", "public void cleanup() {\n }", "protected void cleanup() {\n try {\n if (_in != null) {\n _in.close();\n _in = null;\n }\n if (_out != null) {\n _out.close();\n _out = null;\n...
[ "0.80806696", "0.79963845", "0.79783565", "0.7973806", "0.7940444", "0.78848165", "0.78825426", "0.7797934", "0.77853066", "0.7656074", "0.76253617", "0.76119703", "0.75940305", "0.75940305", "0.7586353", "0.7560819", "0.7552213", "0.7548894", "0.74913234", "0.748651", "0.748...
0.0
-1
Required method for Designer support do not modify the contents of this method with the code editor.
private void initializeComponent() throws Exception { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(FormAlertSimple.class); this.labelMsg = new System.Windows.Forms.Label(); this.SuspendLayout(); // // labelMsg // this.labelMsg.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.labelMsg.Location = new System.Drawing.Point(12, 9); this.labelMsg.Name = "labelMsg"; this.labelMsg.Size = new System.Drawing.Size(276, 82); this.labelMsg.TabIndex = 0; this.labelMsg.Text = "Message"; this.labelMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // FormAlertSimple // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.ClientSize = new System.Drawing.Size(300, 100); this.Controls.Add(this.labelMsg); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Name = "FormAlertSimple"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.ResumeLayout(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}", "@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}", "@Override\n\tprotected void setValueOnUi() {\n\n\t}", "public void designerInputModified(DesignerEvent e);", "public void designerAdded(DesignerEvent e);", "@Override\r\n\tpublic void comer() \r\...
[ "0.65624535", "0.65624535", "0.641574", "0.6373414", "0.6286174", "0.6227767", "0.62232614", "0.62207097", "0.6163217", "0.6137469", "0.6117841", "0.6100467", "0.6072377", "0.5961003", "0.59379786", "0.59293896", "0.59202445", "0.5906788", "0.5872937", "0.5864166", "0.5861344...
0.0
-1
A collection page for String.
public GovernanceRoleAssignmentExportCollectionPage(@Nonnull final GovernanceRoleAssignmentExportCollectionResponse response, @Nonnull final GovernanceRoleAssignmentExportCollectionRequestBuilder builder) { super(response, builder); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getCollection();", "String getCollection();", "public PagedIterator getList(String s,\r\n boolean flag,\r\n Collection collection,\r\n int i) throws ListGeneratorException {\n return null;\r\...
[ "0.5892494", "0.58145124", "0.5617973", "0.5592151", "0.5546291", "0.5479941", "0.5448276", "0.542558", "0.53998095", "0.5384577", "0.5335007", "0.5318797", "0.5275894", "0.5257713", "0.52166843", "0.52112526", "0.52038217", "0.5165579", "0.5132354", "0.5120237", "0.5118012",...
0.0
-1
Creates the collection page for GovernanceRoleAssignmentExport
public GovernanceRoleAssignmentExportCollectionPage(@Nonnull final java.util.List<String> pageContents, @Nullable final GovernanceRoleAssignmentExportCollectionRequestBuilder nextRequestBuilder) { super(pageContents, nextRequestBuilder); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public GovernanceRoleAssignmentExportCollectionPage(@Nonnull final GovernanceRoleAssignmentExportCollectionResponse response, @Nonnull final GovernanceRoleAssignmentExportCollectionRequestBuilder builder) {\n super(response, builder);\n }", "private ExportRoles() {}", "@RequestMapping\n public Stri...
[ "0.7172987", "0.584065", "0.5440773", "0.5118854", "0.5001745", "0.4990197", "0.49418002", "0.4875491", "0.4844957", "0.482402", "0.47572565", "0.473905", "0.47283426", "0.46651676", "0.45925868", "0.45845413", "0.4565702", "0.45510697", "0.45498917", "0.45027238", "0.4479337...
0.71300405
1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { machineRahatFragmentView = inflater.inflate(R.layout.fragment_mission_rahat, container, false); return machineRahatFragmentView; }
{ "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...
[ "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.66251...
0.0
-1
your background thread is still running. By the time that thread reaches the getActivity().runOnUiThread() code,the activity no longer exists. So check if the activity still exists.
@Override public void hideProgressBar() { if (getActivity() != null) { getActivity().runOnUiThread(() -> { if (progressBarLayout != null && progressBar != null) { progressBar.setVisibility(View.GONE); progressBarLayout.setVisibility(View.GONE); } }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void tryToFinishActivity() {\n Log.i(TAG, \"[tryToFinishActivity]\");\n finish();\n }", "private static boolean m33661d(Activity activity) {\n return !activity.isFinishing();\n }", "public boolean isDestroyingActivity() {\n return isFinishing() || Build.VERSION.SDK_...
[ "0.6181177", "0.6089043", "0.6053767", "0.6008516", "0.59122366", "0.58549654", "0.5791469", "0.5764107", "0.5764107", "0.5764107", "0.57428324", "0.574255", "0.5690569", "0.56799674", "0.56746197", "0.5662419", "0.5634277", "0.56197536", "0.56070393", "0.55938035", "0.559005...
0.0
-1
As the mod uses "clientSideOnly = true", it will always run on the client side
public static void preInitialize(FMLPreInitializationEvent event) { InitKeyBinding.registerKeyBindings(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n @SideOnly(Side.CLIENT)\n public void onClientPostInit()\n {\n\n }", "@SideOnly(Side.CLIENT)\n/* */ public void func_75137_b(int par1, int par2) {}", "@SideOnly(Side.CLIENT)\n private void channelTickClient()\n {\n }", "public void clientModSetup(){\n\t\tRenderingRegistr...
[ "0.7265657", "0.63332146", "0.6330018", "0.61727905", "0.60019124", "0.5961995", "0.58855975", "0.58271116", "0.5809486", "0.5803221", "0.56852096", "0.56716293", "0.5668682", "0.56589764", "0.5652889", "0.56464523", "0.56342036", "0.56237835", "0.55918205", "0.55902463", "0....
0.0
-1
Returns the next element in the iteration without advancing the iterator.
public Integer peek() { List<Integer> temp = new ArrayList<>(); while(iterator.hasNext()){ temp.add(iterator.next()); } Integer result = null; if(temp.size() > 0){ result = temp.get(0); } iterator = temp.iterator(); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Integer next() {\n if (!isPeeked && hasNext())\n return iterator.next();\n int toReturn = peekedElement;\n peekedElement = -1;\n isPeeked = false;\n return toReturn;\n }", "Object getNextElement() throws NoSuchElementException;", "@Override\n public Integer next(...
[ "0.7958216", "0.794867", "0.78590846", "0.78295815", "0.77967113", "0.77268815", "0.77264446", "0.7711753", "0.7703207", "0.7672829", "0.7652239", "0.76162845", "0.7611684", "0.7596586", "0.75893503", "0.7583718", "0.7583034", "0.75609744", "0.7560039", "0.75470746", "0.75417...
0.0
-1
hasNext() and next() should behave the same as in the Iterator interface. Override them if needed.
@Override public Integer next() { return iterator.next(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract boolean hasNext();", "public abstract boolean hasNext();", "private boolean hasNext() {\n\t\treturn iterator != null;\n\t}", "@Override\n public boolean hasNext() {\n return currentIterator != null;\n }", "@Override\n public boolean hasNext() {\n return ne...
[ "0.8264395", "0.8264395", "0.8031006", "0.8022469", "0.7966067", "0.793097", "0.79156", "0.79156", "0.79156", "0.79156", "0.79156", "0.79156", "0.79156", "0.79156", "0.7901867", "0.7865155", "0.7861281", "0.78465605", "0.7810729", "0.7801219", "0.77893114", "0.77833724", ...
0.731613
80
Creates a new object.
public ImmutableIterator(final Iterator<T> iterator) { _decorated = iterator; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "OBJECT createOBJECT();", "public void create(){}", "public void create() {\n\t\t\n\t}", "public CMObject newInstance();", "public abstract T create(T obj);", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "T create();", "T create();", "Instance createInstance();", "@Override\n\tpublic void...
[ "0.7589968", "0.75216585", "0.7103618", "0.699454", "0.69563144", "0.6915568", "0.69059134", "0.69059134", "0.68283063", "0.6798895", "0.6788816", "0.6735617", "0.67114466", "0.67114466", "0.67114466", "0.6708547", "0.66975486", "0.6685093", "0.6684182", "0.6638452", "0.66174...
0.0
-1
este metodo invoca la url de /proyectos y devuelve la listaProyectos
public Collection<Proyecto> leerProyectosCollection() { RestTemplate plantilla = new RestTemplate(); Proyecto[] proyecto = plantilla.getForObject("http://localhost:5000/proyectos", Proyecto[].class); List<Proyecto> listaProyectos = Arrays.asList(proyecto); return listaProyectos; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List<Proyecto> listarProyectos() {\n\t\treturn proyectoRepo.findAll();\n\t}", "@GET(\"montaje/proyectos/ver/\")\n Call<List<clsProyecto>> getProyectos();", "public void enviarProyectos(Proyecto proyecto){\n\t\t\tRestTemplate plantilla = new RestTemplate();\n\t\t\tplantilla.postForObject(...
[ "0.69514495", "0.6515402", "0.6478772", "0.64513606", "0.6205474", "0.59618217", "0.5931843", "0.5924835", "0.5915924", "0.5899213", "0.58490866", "0.58194524", "0.5806988", "0.5781727", "0.57692844", "0.573291", "0.57283187", "0.567299", "0.563493", "0.56293213", "0.55947864...
0.6586932
1
este metodo coge un proyecto (el que se pasa por parametro) y lo envia a esta url
public void enviarProyectos(Proyecto proyecto){ RestTemplate plantilla = new RestTemplate(); plantilla.postForObject("http://localhost:5000/proyectos", proyecto, Proyecto.class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "URL getRepositoryWebUrl(ProgrammingExerciseParticipation participation);", "@Override\n public String getProjectURL(ProjectPojo pojo) {\n String bomUrl = serverBean.getServerName()\n + \"/protex/ProtexIPIdentifyFolderBillOfMaterialsContainer?isAtTop=true&ProtexIPProjectId=\"\n ...
[ "0.6094626", "0.6023523", "0.59799516", "0.5938915", "0.593781", "0.5866362", "0.58581233", "0.5826203", "0.5715916", "0.5690147", "0.5676494", "0.5673477", "0.55933756", "0.55902743", "0.5574308", "0.5555636", "0.55551857", "0.5541733", "0.5529631", "0.5516462", "0.5437651",...
0.6381382
0
este metodo recoge el proyecto que se quiere editar
public Proyecto proyectoPorId(int id) { RestTemplate plantilla = new RestTemplate(); Proyecto proyecto =plantilla.getForObject("http://localhost:5000/proyectos/" + id, Proyecto.class); return proyecto; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void edit() {\n\n\t}", "@Override\n\tpublic void editar(Contato contato) {\n\t\tthis.dao.editar(contato);\n\t\t\n\t}", "public void editar(AplicacionOferta aplicacionOferta){\n try{\n aplicacionOfertaDao.edit(aplicacionOferta);\n }catch(Exception e){\n Logger.getLogg...
[ "0.6992135", "0.6854259", "0.67786485", "0.67597437", "0.6753681", "0.67161685", "0.66554004", "0.66335136", "0.66261256", "0.66152877", "0.6613907", "0.6595665", "0.65851015", "0.65346366", "0.65148985", "0.65074545", "0.64832884", "0.6446242", "0.6435914", "0.6410718", "0.6...
0.0
-1
este metodo recoge el proyecto que se quiere eliminar
public void eliminarProyecto(int id) { RestTemplate plantilla = new RestTemplate(); plantilla.delete("http://localhost:5000/proyectos/" + id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void eliminar() {\n try {\n Dr_siseg_usuarioBean usuario = new Dr_siseg_usuarioBean();\n FacesContext facesContext = FacesContext.getCurrentInstance();\n usuario = (Dr_siseg_usuarioBean) facesContext.getExternalContext().getSessionMap().get(\"usuario\");\n\n ...
[ "0.73280334", "0.7205168", "0.71683395", "0.7140549", "0.712377", "0.7066781", "0.7056318", "0.70554703", "0.70303434", "0.7029737", "0.7009347", "0.6989416", "0.6982351", "0.69582325", "0.69579375", "0.69420457", "0.69282484", "0.69282055", "0.6922674", "0.69026077", "0.6864...
0.6924876
18
TODO Autogenerated method stub
public static void main(String[] args) { }
{ "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 getExr...
[ "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.608016...
0.0
-1
Busca un Ingrediente por el nombre y regresa el objeto dentro del ArrayList
public Ingrediente buscarIngrediente(String nombre) { Ingrediente ingrediente = null; for(int i = 0; i < this.ingredientes.size(); i++) { if(nombre.equals(this.ingredientes.get(i))) { ingrediente = this.ingredientes.get(i); } } return ingrediente; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void cargarNombre() {\n\n System.out.println(\"Indique nombre del alumno\");\n nombre = leer.next();\n nombres.add(nombre);\n\n }", "public ArrayList<String> listarCursosInst(String nombreInstituto) throws InstitutoExcepcion;", "public Etiqueta buscador(String nombreEtiqueta){\n ...
[ "0.6350114", "0.6028945", "0.60047466", "0.59974986", "0.59847784", "0.5969526", "0.59303516", "0.59122986", "0.5907102", "0.5905124", "0.5890256", "0.5888235", "0.5887441", "0.5848186", "0.57787186", "0.5756763", "0.5750011", "0.5746013", "0.5667066", "0.5658629", "0.5654251...
0.67156845
0
/Regresa un array simple con los nombres String de todas las frutas
public String [ ] getNombresFrutas() { int cantidad = 0; for(int i = 0; i < this.ingredientes.size(); i++) { if(this.ingredientes.get(i) instanceof Fruta) { cantidad++; } } String arreglo[] = new String[cantidad]; for(int i = 0; i < cantidad; i ++) { arreglo[i] = this.ingredientes.get(i).toString(); } return arreglo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String[] DevuelvecabeceraRen(){\r\n\t\tString vec[]={\" \",\"id\",\"int\",\"-\",\"*\",\"/\",\"(\",\")\",\"$\",\"E\",\"T\",\"F\"};\r\n\t\treturn vec;\r\n\t\t\r\n\t}", "public String[] nombres(){\n return partida.nombres();\n }", "public String[] getStringArray() {\r\n\t\tString[] a = value.getS...
[ "0.65601784", "0.62573254", "0.5934107", "0.59086293", "0.5870634", "0.5697346", "0.56866926", "0.56845206", "0.567845", "0.56677663", "0.5648818", "0.56335634", "0.56105685", "0.56069696", "0.55730546", "0.5563992", "0.55635667", "0.55392325", "0.55349964", "0.5527465", "0.5...
0.6199497
2
/Regresa un array simple con los nombres String de todas las proteinas
public String [ ] getNombresProteinas() { int cantidad = 0; for(int i = 0; i < this.ingredientes.size(); i++) { if(this.ingredientes.get(i) instanceof Proteina) { cantidad++; } } String arreglo[] = new String[cantidad]; for(int i = 0; i < cantidad; i ++) { arreglo[i] = this.ingredientes.get(i).toString(); } return arreglo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String[] nombres(){\n return partida.nombres();\n }", "public String[] DevuelvecabeceraRen(){\r\n\t\tString vec[]={\" \",\"id\",\"int\",\"-\",\"*\",\"/\",\"(\",\")\",\"$\",\"E\",\"T\",\"F\"};\r\n\t\treturn vec;\r\n\t\t\r\n\t}", "public String[] obtener_nombres_de_torres(String line) {\n\t\tStr...
[ "0.6729011", "0.62434316", "0.6122625", "0.6079694", "0.60675585", "0.6009135", "0.59999514", "0.5881081", "0.5872015", "0.57878244", "0.57697994", "0.57678425", "0.57395613", "0.5676026", "0.56751436", "0.5674897", "0.56585467", "0.5656959", "0.5655453", "0.56225705", "0.559...
0.62928134
1
/Regresa un array simple con los nombres String de todos los granos
public String [ ] getNombresGranos() { int cantidad = 0; for(int i = 0; i < this.ingredientes.size(); i++) { if(this.ingredientes.get(i) instanceof Grano) { cantidad++; } } String arreglo[] = new String[cantidad]; for(int i = 0; i < cantidad; i ++) { arreglo[i] = this.ingredientes.get(i).toString(); } return arreglo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String[] nombres(){\n return partida.nombres();\n }", "private String[] getnames(String name) {\n\t\tString tt[]={name};\n\t\t//tt[0]=name;\n\t\tList<Integer> imp=new ArrayList<Integer>();\n int temp=0;\n\t\ttemp=name.length();\n char ch[]=name.toCharArray();\n for(int i=0;i...
[ "0.6662286", "0.6356991", "0.63147837", "0.62999004", "0.61655706", "0.61527896", "0.6048625", "0.60426426", "0.6018147", "0.6000162", "0.5951797", "0.5940942", "0.5933605", "0.5906212", "0.5883797", "0.5862953", "0.584355", "0.5843338", "0.58369607", "0.5809544", "0.5802687"...
0.56051195
39
/Regresa un array simple con los nombres String de todos las almidones
public String [ ] getNombresAlmidones() { int cantidad = 0; for(int i = 0; i < this.ingredientes.size(); i++) { if(this.ingredientes.get(i) instanceof Almidon) { cantidad++; } } String arreglo[] = new String[cantidad]; for(int i = 0; i < cantidad; i ++) { arreglo[i] = this.ingredientes.get(i).toString(); } return arreglo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String[] nombres(){\n return partida.nombres();\n }", "public static String[] recorrerElementos(String[] arr){\n\n int maxLenght = maxLength(arr);\n for (int i = maxLenght-1; i >= 0 ; i--){\n HashMap listas = getListas(10);\n for(String arrayElement: arr){\n ...
[ "0.65184605", "0.6373261", "0.62780744", "0.62417287", "0.61757284", "0.61408657", "0.61375815", "0.61140037", "0.6109644", "0.6090973", "0.60851395", "0.6024904", "0.6005979", "0.5964891", "0.59536934", "0.5950207", "0.59294546", "0.5911572", "0.5898296", "0.5888161", "0.586...
0.5686395
26
/Regresa un array simple con los nombres String de todos los ingredientes, no importa el tipo
public String [ ] getNombresIngredientes() { String arreglo[] = new String[this.ingredientes.size()]; for(int i = 0; i < this.ingredientes.size(); i++) { arreglo[i] = this.ingredientes.get(i).toString(); } return arreglo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static ArrayList<String> ingredientParse (JSONArray array) {\n\n ArrayList<String> list = new ArrayList<>();\n\n for (int index = 0; index < array.length(); index++) {\n try {\n JSONObject ingredientObject = array.getJSONObject(index);\n double quantit...
[ "0.67568266", "0.6648173", "0.660348", "0.6403845", "0.63350886", "0.6319483", "0.6315119", "0.6308485", "0.62704724", "0.6240252", "0.6203158", "0.6136559", "0.6136525", "0.6066557", "0.60594153", "0.6017166", "0.59112644", "0.5904544", "0.5896568", "0.58548886", "0.57326734...
0.68152916
0
/Registra la compra de un Ingrediente
public void registrarCompraIngrediente(String nombre, int cantidad, int precioCompra, int tipo) { //Complete }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void registrarLlegada() {\n\t\t\n\t}", "@Override\n\tpublic void registrarLlegada() {\n\t}", "private void addInstituicao() {\n\n if (txtNome.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Campo Nome Invalido\");\n txtNome.grabFocus();\n ...
[ "0.6701546", "0.6599141", "0.6544821", "0.6505754", "0.6447146", "0.64447474", "0.64165676", "0.63997847", "0.6380007", "0.6372716", "0.63377917", "0.6314305", "0.62981033", "0.62939245", "0.6280806", "0.6275283", "0.62751245", "0.62751245", "0.6268142", "0.62621266", "0.6259...
0.72684366
0