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
/ All O(n log n) 1. sorting in pairs with lambda expression 2. priority queue 3. Tree map For the test cases used, TreeMap has the fastest performance.
public static String[] findRelativeRanks(int[] nums) { int[][] ranks = new int[nums.length][2]; for ( int i = 0; i < ranks.length; ++i ) { ranks[i][0] = nums[i]; ranks[i][1] = i; } Arrays.sort(ranks, (a, b) -> b[0]-a[0]); String[] relativeRanks = new String[ranks.length]; for ( int i = 0; i < ranks.length; ++i ) { if ( i < 3 ) { if ( i == 0 ) relativeRanks[ranks[i][1]] = "Gold Medal"; else if ( i == 1 ) relativeRanks[ranks[i][1]] = "Silver Medal"; else relativeRanks[ranks[i][1]] = "Bronze Medal"; } else relativeRanks[ranks[i][1]] = "" + (i+1); } return relativeRanks; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private TreeMap<FlworKey, List<FlworTuple>> mapExpressionsToOrderedPairs() {\n // tree map keeps the natural item order deduced from an implementation of Comparator\n // OrderByClauseSortClosure implements a comparator and provides the exact desired behavior for local execution as well\n TreeM...
[ "0.6062584", "0.6035553", "0.59095794", "0.55522585", "0.5531273", "0.5526113", "0.5524097", "0.547979", "0.54688376", "0.5453809", "0.5442543", "0.5440329", "0.5433285", "0.5413442", "0.5409496", "0.5405241", "0.5388483", "0.53845674", "0.5352691", "0.53371614", "0.5319003",...
0.0
-1
Returns a RequestURI (or alternatively path) as defined in request line.
URI uri();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static public String getURI(HttpServletRequest request){\r\n\t\treturn request.getRequestURI();\r\n\t}", "public URI getRequestURI();", "protected String getRequestURI(HttpServletRequest request) {\r\n\t\t\r\n\t\tString uri = request.getRequestURI();\r\n\t\tString ctxPath = request.getContextPath();\r\n\r\n\t\...
[ "0.7169155", "0.70392925", "0.6835975", "0.6784409", "0.6766499", "0.66397876", "0.66302794", "0.6603694", "0.6603204", "0.6591717", "0.63645685", "0.6237801", "0.61004364", "0.6078603", "0.6036286", "0.60150146", "0.5996542", "0.5980014", "0.5969732", "0.5963645", "0.595042"...
0.59368414
24
Returns an encoded query string without leading '?' character.
String query();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String createQueryString() {\r\n\t\tStringBuffer sb = new StringBuffer();\r\n\r\n\t\tSet<Map.Entry<String, Object>> set = queryParams.entrySet();\r\n\t\tEnumeration<Map.Entry<String, Object>> en = Collections.enumeration(set);\r\n\t\ttry\r\n\t\t{\r\n\t\t\twhile (en.hasMoreElements())\r\n\t\t\t{\r\n\t\t\t\tM...
[ "0.7295553", "0.69160616", "0.69160616", "0.6883151", "0.6792204", "0.6792204", "0.67701465", "0.67202777", "0.6666656", "0.65846425", "0.65835655", "0.6553236", "0.64781106", "0.6296797", "0.62826097", "0.6276568", "0.62738794", "0.62731844", "0.61919606", "0.6081509", "0.60...
0.58860475
28
Returns a decoded request URI fragment without leading hash '' character.
String fragment();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String decodeAndCleanUriString(HttpServletRequest request, String uri) {\n uri = decodeRequestString(request, uri);\n int semicolonIndex = uri.indexOf(';');\n return (semicolonIndex != -1 ? uri.substring(0, semicolonIndex) : uri);\n }", "private String removeFragment(String...
[ "0.668993", "0.64952976", "0.6233643", "0.5897377", "0.5665542", "0.56254387", "0.54913867", "0.5482382", "0.5464804", "0.53751814", "0.5344447", "0.5338193", "0.53060436", "0.52870566", "0.52863806", "0.52827203", "0.5250796", "0.52222216", "0.5212575", "0.5208784", "0.51651...
0.61902326
3
Registry that can be used to propagate information from server (e.g. security context, tracing spans etc.).
Context context();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Registry getRequestRegistry();", "Registry getRegistry();", "Registry getRegistry();", "Registry getRegistry( );", "com.bingo.server.msg.REQ.RegistryRequest getRegistry();", "public UserRegistry getUserRegistry();", "public void registerWithServer();", "public interface Registries {\n\n /***/\n Ele...
[ "0.65737325", "0.61446214", "0.61446214", "0.60059905", "0.591068", "0.5870972", "0.58661294", "0.57338595", "0.5718787", "0.55851144", "0.5566578", "0.5539012", "0.5523871", "0.55147517", "0.55107874", "0.54885674", "0.54885614", "0.54495883", "0.54461896", "0.5443321", "0.5...
0.0
-1
Request id which will be used in logging messages.
long requestId();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getRequestID();", "public String getIdrequest() {\r\n\t\treturn idrequest;\r\n\t}", "public String getCurrentRequestId()\n\t{\n\t\tString reqID = (String) MDC.get(REQUEST_ID);\n\t\tif (reqID == null || \"\".equals(reqID))\n\t\t{\n\t\t\treqID = \"RID_\" + UUID.randomUUID().toString();\n\t\t\tMD...
[ "0.8336448", "0.7743239", "0.7649992", "0.7099087", "0.6985757", "0.69536054", "0.68383217", "0.6810507", "0.6810429", "0.68041253", "0.6715351", "0.6708375", "0.6691704", "0.65727913", "0.6461427", "0.6454039", "0.6453636", "0.63652027", "0.63128185", "0.6293499", "0.6293499...
0.6521518
15
Set new request id. This id is used in logging messages.
void requestId(long requestId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setIdrequest(String idrequest) {\r\n\t\tthis.idrequest = idrequest;\r\n\t}", "private static long newId() {\n return REQUEST_ID.getAndIncrement();\n }", "void setRequestID(java.lang.String requestID);", "java.lang.String getRequestID();", "public String getIdrequest() {\r\n\t\treturn ...
[ "0.8128187", "0.74662733", "0.7085757", "0.67625767", "0.6755973", "0.67446774", "0.6676617", "0.6449378", "0.6421974", "0.64068276", "0.63994616", "0.6349951", "0.6323036", "0.6323036", "0.6323036", "0.6323036", "0.6323036", "0.6323036", "0.6323036", "0.6312131", "0.6312131"...
0.5960008
69
Completes when the request part of this request is done (e.g. we have sent all headers and bytes).
Single<WebClientServiceRequest> whenSent();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void finishedAllRequests() {\n hasMoreRequests = false;\n }", "public void finish() {\n if (!isFinishing) {\n performFnishWithRequest(true);\n }\n }", "protected void finish() {\n writerServerTimingHeader();\n\n try {\n\n // maybe nobody ever call getOutp...
[ "0.72368836", "0.7139531", "0.7033216", "0.7021851", "0.6851685", "0.6755673", "0.67468363", "0.6671717", "0.6665253", "0.6627857", "0.66180456", "0.6608273", "0.6566125", "0.65348285", "0.64628184", "0.64376915", "0.6379864", "0.63754094", "0.63654333", "0.6354742", "0.63537...
0.0
-1
Completes when the response headers has been received, but entity has not been processed yet.
Single<WebClientServiceResponse> whenResponseReceived();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void finish() {\n writerServerTimingHeader();\n\n try {\n\n // maybe nobody ever call getOutputStream() or getWriter()\n if (bufferedOutputStream != null) {\n\n // make sure the writer flushes everything to the underlying output stream\n if (bufferedWriter != null) {\n ...
[ "0.67402214", "0.6533697", "0.6408774", "0.63905716", "0.6360831", "0.6359951", "0.6348729", "0.634224", "0.634224", "0.634224", "0.634224", "0.634224", "0.634224", "0.634224", "0.63296133", "0.63296133", "0.631075", "0.63080376", "0.63080376", "0.62412536", "0.62247956", "...
0.0
-1
Completes when the full processing of this request is done (e.g. we have received a full response).
Single<WebClientServiceResponse> whenComplete();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void finishedAllRequests() {\n hasMoreRequests = false;\n }", "public void finish() {\n if (!isFinishing) {\n performFnishWithRequest(true);\n }\n }", "void requestFinish();", "protected void onEndRequest()\n\t{\n\t}", "public void finishRequest ()\r\n\t{\r\n\t\...
[ "0.7357676", "0.7157664", "0.68012077", "0.68002784", "0.67826724", "0.66973364", "0.6694479", "0.6639155", "0.6637189", "0.65926176", "0.64763963", "0.6454979", "0.6425537", "0.64150083", "0.6373712", "0.6361984", "0.6353495", "0.6309288", "0.6306597", "0.62992585", "0.62889...
0.0
-1
Properties configured by user when creating this client request.
Map<String, String> properties();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Request() {\n initFields();\n }", "public CreateOrderRequest() {\n\t\t_pcs = new PropertyChangeSupport(this);\n\t}", "public RequestValues() {\n //mUserId = userId;\n }", "public CalccustoRequest(UserContext userContext)\r\n\t{\r\n\t\tsuper(userContext);\r\n\t}", "public I...
[ "0.58986396", "0.5882801", "0.58795613", "0.57664734", "0.5643299", "0.56178916", "0.5617268", "0.5500451", "0.5471732", "0.5430437", "0.54194325", "0.5418629", "0.5415682", "0.53867275", "0.53502893", "0.53482825", "0.53451383", "0.53427196", "0.534099", "0.5332376", "0.5314...
0.0
-1
Set new schema of the request.
void schema(String schema);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setSchema(S schema);", "public void setSchema(Schema schema)\n {\n this.schema = schema;\n }", "public void setRequestSchemaType(SchemaType requestSchemaType)\n {\n this.requestSchemaType = requestSchemaType;\n }", "public void setSchema(String schema) {\n this.schema = ...
[ "0.75126505", "0.7316035", "0.70579404", "0.68641114", "0.6861558", "0.6745806", "0.66094697", "0.657548", "0.64189595", "0.6297056", "0.62771565", "0.62151235", "0.6147454", "0.6131078", "0.6018557", "0.59223664", "0.5747854", "0.5676228", "0.5622084", "0.5612803", "0.559971...
0.6339454
10
Set new host of the request.
void host(String host);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setHost(String host);", "final public void setHost(String host) {\n this.host = host;\n }", "public Builder host(String newHost) {\n host = newHost;\n return this;\n }", "public void setHost(String host) {\n this.host = host;\n }", "public void setHost(String host) {\n ...
[ "0.78649306", "0.76493007", "0.7396392", "0.73575515", "0.7340852", "0.7340852", "0.7340852", "0.7340852", "0.7340852", "0.7299427", "0.7225888", "0.70995575", "0.7081256", "0.70574385", "0.7053394", "0.70312554", "0.6913655", "0.69064784", "0.68539864", "0.67916214", "0.6721...
0.63847446
28
Set new port of the request.
void port(int port);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setPort(int port);", "public void setPort(int port);", "final public void setPort(int port) {\n this.port = port;\n }", "public void setPort(int value) {\n this.port = value;\n }", "public void setPort(int port) {\n m_Port = port;\n }", "public void setPort(int port) {\r\n ...
[ "0.8021055", "0.8021055", "0.7732878", "0.77094054", "0.7689936", "0.76737136", "0.7662009", "0.76414853", "0.76403975", "0.7635244", "0.7618022", "0.7618022", "0.76174873", "0.7608087", "0.7608087", "0.7608087", "0.7608087", "0.7608087", "0.7608087", "0.7589105", "0.75888544...
0.6477395
78
Set the new path of the request.
void path(String path);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void changePath(String newPath){\n this.path=newPath;\n }", "public HttpBuilder<E,T> setPath (String path)\n\t{\n\t\tthis.path = String.format(path);\n\t\treturn this;\n\t}", "public void setPath(String path) {\n if (!path.startsWith(\"/\")) {\n this.path = \"/\" + path;\n ...
[ "0.7211134", "0.69837326", "0.6863602", "0.6819616", "0.6763726", "0.67332095", "0.6705603", "0.659638", "0.65575284", "0.64940566", "0.6412127", "0.63821614", "0.6371303", "0.63494027", "0.6348863", "0.63100576", "0.6257932", "0.62533283", "0.62432086", "0.6237555", "0.61776...
0.0
-1
Set the new fragment of the request.
void fragment(String fragment);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public URIBuilder setFragment(final String fragment) {\n this.fragment = fragment;\n this.encodedFragment = null;\n return this;\n }", "public Builder setFragment(String fragment) {\n\t\t\turl.fragment = fragment == null || fragment.isEmpty() ? null : fragment;\n\t\t\treturn this;\n\t\t}"...
[ "0.62724143", "0.5810049", "0.58025753", "0.5668223", "0.5585682", "0.55192924", "0.5518473", "0.5456437", "0.5445632", "0.542564", "0.5398735", "0.53948677", "0.53920656", "0.5368976", "0.53512883", "0.5342142", "0.5319264", "0.5296919", "0.529226", "0.5224177", "0.52090186"...
0.56491184
5
TODO Autogenerated method stub
@Override public List queryForList(String sql) { return this.baseDaoSupport.queryForList(sql); }
{ "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
@Override public Map queryForMap(String sql) { return this.baseDaoSupport.queryForMap(sql); }
{ "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
public static void main(String[] args) { My2048 my2048 = new My2048(); }
{ "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
Computes par rate excluding accrued interest.
public Double parRate(SwapFixedIborDefinition swapDefinition, DayCount fixedLegDayCount, DayCount iborLegDayCount, HolidayCalendar calendar, ZonedDateTime valuationDate, ZonedDateTimeDoubleTimeSeries indexTimeSeries, MulticurveProviderDiscount multicurves) { ArgChecker.notNull(swapDefinition, "swapDefinition"); ArgChecker.notNull(fixedLegDayCount, "fixedLegDayCount"); ArgChecker.notNull(iborLegDayCount, "iborLegDayCount"); ArgChecker.notNull(calendar, "calendar"); ArgChecker.notNull(valuationDate, "valuationDate"); ArgChecker.notNull(indexTimeSeries, "indexTimeSeries"); ArgChecker.notNull(multicurves, "multicurves"); checkNotionalAndFixedRate(swapDefinition); Annuity<? extends Coupon> iborLeg = swapDefinition.getIborLeg().toDerivative(valuationDate, indexTimeSeries); double dirtyIborLegPV = iborLeg.accept(PVDC, multicurves).getAmount(iborLeg.getCurrency()).getAmount(); double iborLegAccruedInterest = getAccrued(iborLegDayCount, calendar, valuationDate, swapDefinition.getIborLeg(), indexTimeSeries); double cleanFloatingPV = (dirtyIborLegPV - iborLegAccruedInterest) * Math.signum(iborLeg.getNthPayment(0).getNotional()); AnnuityCouponFixed fixedLeg = swapDefinition.getFixedLeg().toDerivative(valuationDate); double accruedAmount = getAccrued(fixedLegDayCount, calendar, valuationDate, swapDefinition.getFixedLeg(), indexTimeSeries) * Math.signum(fixedLeg.getNthPayment(0).getNotional()); double dirtyAnnuity = METHOD_SWAP.presentValueBasisPoint(new SwapFixedCoupon<>(fixedLeg, iborLeg), multicurves); double cleanAnnuity = dirtyAnnuity - accruedAmount; return cleanFloatingPV / cleanAnnuity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double compute() {\r\ndouble b, e;\r\nb = (1 + rateOfRet/compPerYear);\r\ne = compPerYear * numYears;\r\nreturn principal * Math.pow(b, e);\r\n}", "public double impurity();", "float getVacationAccrualRate();", "public BigDecimal getPercentageProfitPLimit();", "public BigDecimal getEXCLUDE_PROFIT_AMOUNT() ...
[ "0.5605034", "0.5587564", "0.54769623", "0.5459127", "0.5455989", "0.53776324", "0.5373875", "0.5346987", "0.5345812", "0.5263614", "0.5243299", "0.5226844", "0.52204835", "0.5213055", "0.5210598", "0.5198298", "0.51950204", "0.51856124", "0.5162427", "0.51491535", "0.5148415...
0.0
-1
Finding the sum of digits
static int digitSum(String n, int k) { int sum = findSum(convertToList(n)); // Finding the initial super digit where k=1 sum = findSuperDigit(convertToList(sum)); // Calculating k times the super digit to find actual result return findSuperDigit(convertToList(sum*k)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static int sumDigits(int sum) {\n int result;\n do {\n result = 0;\n while (sum != 0) {\n result += sum % 10;\n sum /= 10;\n }\n sum = result;\n }\n while (result > 9);\n return result;\n }", "...
[ "0.76178163", "0.7316668", "0.7281244", "0.7232797", "0.7131182", "0.71184474", "0.7102172", "0.70912814", "0.69881237", "0.69611144", "0.6939632", "0.69239837", "0.68965995", "0.68241906", "0.68087167", "0.6798979", "0.6671671", "0.66353446", "0.6595803", "0.6590604", "0.658...
0.72394216
3
finds the initial sum
static int findSuperDigit(List<Integer> numList){ int superDig = findSum(numList); // when the super digit is single stop recursion and return digit. if(superDig/10 >0) superDig = findSuperDigit(convertToList(superDig)); return superDig; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static int findMissingUsingSummation(int[] arr) {\n\t\tint expectedSum = (arr.length + 1) * (arr.length + 1 + 1) / 2;\n\t\tint actualSum = 0;\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tactualSum = actualSum + arr[i];\n\t\t}\n\n\t\treturn expectedSum - actualSum;\n\t}", "double getSum();", "double getSu...
[ "0.6196158", "0.6123289", "0.6123289", "0.6085082", "0.6079555", "0.6027094", "0.6013764", "0.59957147", "0.59882647", "0.59663606", "0.59191614", "0.58594364", "0.58451384", "0.58155805", "0.58149433", "0.5810209", "0.5805294", "0.578814", "0.5783493", "0.57822937", "0.57700...
0.0
-1
TODO Autogenerated method stub Download and Install ChromeDriver
public static void main(String[] args) { WebDriverManager.chromedriver().setup(); // Launch the chrome browser ChromeDriver driver = new ChromeDriver(); // Load the URL driver.get("http://leaftaps.com/opentaps/control/main"); // Get the title using getTitle() method String title = driver.getTitle(); // Print the title System.out.println(title); // Maximize the window driver.manage().window().maximize(); // driver.close(); // wait for 10 secs if the element is not in DOM (or) if internet connection is slow driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); // locate the username field and enter the username as "demosalesmanager" driver.findElement(By.id("username")).sendKeys("demosalesmanager"); // locate the password field and enter the password as "crmsfa" driver.findElement(By.id("password")).sendKeys("crmsfa"); // locate the login button and click on it driver.findElement(By.className("decorativeSubmit")).click(); // locate the CRM/SFA link and click on it driver.findElement(By.linkText("CRM/SFA")).click(); driver.findElement(By.linkText("Leads")).click(); driver.findElement(By.linkText("Create Lead")).click(); driver.findElement(By.id("createLeadForm_companyName")).sendKeys("TestLeaf"); driver.findElement(By.id("createLeadForm_firstName")).sendKeys("Vasuki"); driver.findElement(By.id("createLeadForm_lastName")).sendKeys("S"); WebElement drop = driver.findElement(By.id("createLeadForm_dataSourceId")); Select drpDwn = new Select(drop); drpDwn.selectByIndex(3); WebElement drop1 = driver.findElement(By.id("createLeadForm_marketingCampaignId")); Select drpDwn1 = new Select(drop1); drpDwn1.selectByIndex(1); driver.findElement(By.id("createLeadForm_firstNameLocal")).sendKeys("vasu"); driver.findElement(By.id("createLeadForm_lastNameLocal")).sendKeys("gikki"); driver.findElement(By.id("createLeadForm_personalTitle")).sendKeys("Lead"); driver.findElement(By.id("createLeadForm_generalProfTitle")).sendKeys("Tech Lead"); driver.findElement(By.id("createLeadForm_birthDate")).sendKeys("09/25/94"); driver.findElement(By.id("createLeadForm_departmentName")).sendKeys("IT"); driver.findElement(By.id("createLeadForm_annualRevenue")).sendKeys("40k"); WebElement drop2 = driver.findElement(By.id("createLeadForm_industryEnumId")); Select drpDwn2 = new Select(drop2); drpDwn2.selectByValue("IND_SOFTWARE"); WebElement drop3 = driver.findElement(By.id("createLeadForm_ownershipEnumId")); Select drpDwn3 = new Select(drop3); drpDwn3.selectByVisibleText("Partnership"); WebElement drop4 = driver.findElement(By.id("createLeadForm_currencyUomId")); Select drpDwn4 = new Select(drop4); drpDwn4.selectByValue("INR"); driver.findElement(By.id("createLeadForm_numberEmployees")).sendKeys("40"); driver.findElement(By.id("createLeadForm_sicCode")).sendKeys("624601"); driver.findElement(By.id("createLeadForm_description")).sendKeys("Tech Lead with 17 years of technical experience"); driver.findElement(By.id("createLeadForm_importantNote")).sendKeys("Important Note about Tech Lead"); driver.findElement(By.id("createLeadForm_tickerSymbol")).sendKeys("Y"); // Contact Information WebElement findElement = driver.findElement(By.id("createLeadForm_primaryPhoneCountryCode")); findElement.clear(); findElement.sendKeys("5"); driver.findElement(By.id("createLeadForm_primaryPhoneAreaCode")).sendKeys("600013"); driver.findElement(By.id("createLeadForm_primaryPhoneNumber")).sendKeys("250591"); driver.findElement(By.id("createLeadForm_primaryPhoneExtension")).sendKeys("044"); driver.findElement(By.id("createLeadForm_primaryPhoneAskForName")).sendKeys("Vasuki"); driver.findElement(By.id("createLeadForm_primaryEmail")).sendKeys("vasu@gmail.com"); driver.findElement(By.id("createLeadForm_primaryWebUrl")).sendKeys("https://vasu.com/profile"); // Primary Address driver.findElement(By.id("createLeadForm_generalToName")).sendKeys("Vasuki"); driver.findElement(By.id("createLeadForm_generalAttnName")).sendKeys("vasu"); driver.findElement(By.id("createLeadForm_generalAddress1")).sendKeys("No:3, Gandhi Nagar"); driver.findElement(By.id("createLeadForm_generalAddress2")).sendKeys("Near priya hospital"); driver.findElement(By.id("createLeadForm_generalCity")).sendKeys("chennai"); driver.findElement(By.id("createLeadForm_generalPostalCode")).sendKeys("600013"); driver.findElement(By.id("createLeadForm_generalPostalCodeExt")).sendKeys("044"); WebElement drop5 = driver.findElement(By.id("createLeadForm_generalCountryGeoId")); Select drpDwn5 = new Select(drop5); drpDwn5.selectByValue("IND"); WebElement drop6 = driver.findElement(By.id("createLeadForm_generalStateProvinceGeoId")); Select drpDwn6 = new Select(drop6); drpDwn6.selectByVisibleText("TAMILNADU"); driver.findElement(By.name("submitButton")).click(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setChromeDriver(){\n System.setProperty(\"webdriver.chrome.driver\", browserDriverPath);\n seleniumDriver = new ChromeDriver();\n }", "private void setChromeDriver() throws Exception {\n\t\t// boolean headless = false;\n\t\tHashMap<String, Object> chromePrefs = new HashMap<String, Ob...
[ "0.7354893", "0.73339796", "0.732253", "0.7312571", "0.7306902", "0.7242", "0.71944785", "0.71507853", "0.71209484", "0.706049", "0.69203645", "0.68613935", "0.68549865", "0.6850735", "0.6777378", "0.6772506", "0.67721665", "0.6758226", "0.67159414", "0.6674488", "0.6638172",...
0.0
-1
nilai yang berada pada tiap fragment
@Override public CharSequence getPageTitle(int position) { switch(position) { case 0: return "Taman Nasional"; case 1: return "Gunung Krakatau"; case 2: return "Makanan Khas"; case 3: return "Kain Tapis"; default: return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initInfoFragment () {\n // Thay doi tieu de\n tabTourInfoBinding.actionBar.actionBarTitle.setText(R.string.tour_info);\n // Sap xep danh sach thanh vien va chang\n TourInfoManager.sortTour(tourOrder);\n Tour tour = OnlineManager.getInstance().mTourList.get(tourOrder);...
[ "0.7237522", "0.6812477", "0.67471135", "0.67256385", "0.6692849", "0.668837", "0.6683945", "0.6655367", "0.6644621", "0.66445", "0.6638039", "0.66236687", "0.6600325", "0.65805435", "0.6564934", "0.65596724", "0.65568626", "0.6553842", "0.6548462", "0.6545562", "0.6520686", ...
0.0
-1
creates a new SimilarityBaedRecommender instance by initializing the word index hashmap.
public SimilarityBasedRecommender() { aWordIndex = generateWordIndex(); // when a new SimilarityBasedRecommender is created, we refresh the wordIndex. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public EfficientWordMarkov()\n\t{\n\t\tsuper();\n\t\tmyMap = new HashMap<WordGram , ArrayList<String>>();\n\t}", "public LittleSearchEngine() {\n keywordsIndex = new HashMap<String, ArrayList<Occurrence>>(1000, 2.0f);\n noiseWords = new HashMap<String, String>(100, 2.0f);\n }", "public WordDic...
[ "0.6374527", "0.6103875", "0.608833", "0.608833", "0.608833", "0.60593694", "0.60284334", "0.5975027", "0.59547335", "0.59272856", "0.59272856", "0.59272856", "0.5868116", "0.5868116", "0.5857134", "0.58533466", "0.58407396", "0.58242714", "0.580016", "0.573286", "0.5690059",...
0.7705577
0
Returns a list of RatedSpeeches, which are sorted by the similarity of the MP who gave them to the MPs in our SelectedMPs list. Speeches given by those SelectedMPs will not be included in the returned list.
private static ArrayList<RatedSpeech> rankedSpeechesbySimilarMPs(ArrayList<MP> pSelectedMPs, ArrayList<String> pKeyWords) { ArrayList<MP> tempSingleMPList = new ArrayList<MP>(); ArrayList<RatedSpeech> result = new ArrayList<RatedSpeech>(); for (MP mp : rankSimilarMPs(pSelectedMPs)) { tempSingleMPList.add(mp); for (RatedSpeech sp : ratedSpeechesForMPsSubsection(tempSingleMPList, pKeyWords, true)) { result.add(sp); } tempSingleMPList.remove(mp); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static ArrayList<MP> rankSimilarMPs(ArrayList<MP> pSelectedMPs)\n\n\t{\n\t\t// HashMap is used to provide an easy way to keep only the highest score for each MP.\n\t\tHashMap<String, Double> ratedMPsMap = new HashMap<String, Double>();\n\t\tHashMap<String, Double> tempRatedMPs;\n\t\tArrayList<RatedMP> sort...
[ "0.6909087", "0.6212574", "0.5683986", "0.49403697", "0.4938459", "0.489811", "0.4757792", "0.47335452", "0.4674831", "0.46646592", "0.4606192", "0.45851353", "0.45844623", "0.45542142", "0.4550489", "0.453494", "0.45190933", "0.45091864", "0.45063242", "0.45027435", "0.44966...
0.7291508
0
returns an MP list containing all the notselected MPs, sorted by how similar they are to MPs in the selectedMPs list. The list will not contained MPs in the original pSelectedMPs list.
private static ArrayList<MP> rankSimilarMPs(ArrayList<MP> pSelectedMPs) { // HashMap is used to provide an easy way to keep only the highest score for each MP. HashMap<String, Double> ratedMPsMap = new HashMap<String, Double>(); HashMap<String, Double> tempRatedMPs; ArrayList<RatedMP> sortedMPsArray = new ArrayList<RatedMP>(); // will be used to sort the MPs by their rating. for (MP mp : pSelectedMPs) { tempRatedMPs = getSimilarMPs(mp); for (String key : tempRatedMPs.keySet()) { // if this is the first MP we look at, put all the MPs into the hashmap if (!ratedMPsMap.containsKey(key)) { ratedMPsMap.put(key, tempRatedMPs.get(key)); } else { // otherwise, keep only the lowest (best) similarity score for any MP. if (ratedMPsMap.get(key) > tempRatedMPs.get(key)) { ratedMPsMap.put(key, tempRatedMPs.get(key)); } } } } for (String key : ratedMPsMap.keySet()) { // Convert the hashmap into an ArrayList. sortedMPsArray.add(new RatedMP(Capone.getInstance().getParliament().getMP(key), ratedMPsMap.get(key))); } Collections.sort(sortedMPsArray); // sort the MPs by their ratings. // return the MPs in sorted order - without the MPs in the original parameter list. return removeOverlap(convertToRatedMPList(sortedMPsArray), pSelectedMPs); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static ArrayList<RatedSpeech> rankedSpeechesbySimilarMPs(ArrayList<MP> pSelectedMPs,\n\t\t\tArrayList<String> pKeyWords)\n\t{\n\t\tArrayList<MP> tempSingleMPList = new ArrayList<MP>();\n\t\tArrayList<RatedSpeech> result = new ArrayList<RatedSpeech>();\n\t\tfor (MP mp : rankSimilarMPs(pSelectedMPs))\n\t\t{\...
[ "0.5801103", "0.56880796", "0.53064775", "0.52398884", "0.5089623", "0.5023434", "0.4992133", "0.49664092", "0.4955553", "0.48875228", "0.48862708", "0.48442695", "0.48378605", "0.48304552", "0.4815902", "0.4774384", "0.47512513", "0.47400445", "0.47311094", "0.47252518", "0....
0.62884736
0
returns a map relating each MP to his similarity score compared to the parameter MP.
private static HashMap<String, Double> getSimilarMPs(MP pMP) { HashMap<String, Double> ratedMPs = new HashMap<String, Double>(); MPVertex currMPVertex = new MPVertex(pMP.getEmail(), getWordIndex()); for (MP mp : Capone.getInstance().getParliament().getMPList()) { if (!mp.getEmail().equals(pMP.getEmail())) { ratedMPs.put(mp.getEmail(), mpSimilarityScore(currMPVertex, pMP, mp)); } } return ratedMPs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static ArrayList<MP> rankSimilarMPs(ArrayList<MP> pSelectedMPs)\n\n\t{\n\t\t// HashMap is used to provide an easy way to keep only the highest score for each MP.\n\t\tHashMap<String, Double> ratedMPsMap = new HashMap<String, Double>();\n\t\tHashMap<String, Double> tempRatedMPs;\n\t\tArrayList<RatedMP> sort...
[ "0.61394817", "0.60275143", "0.5843589", "0.58125305", "0.55764216", "0.55346024", "0.5532557", "0.5506669", "0.5351182", "0.53029895", "0.52465993", "0.52448696", "0.51846373", "0.5151979", "0.5098864", "0.5092696", "0.5087543", "0.50862175", "0.4980528", "0.49678886", "0.49...
0.7910519
0
returns a score that signifies how similar two MPs are. The small the score, the more similar they are. If two MPs are the same, the score will be 0.0.
private static double mpSimilarityScore(MPVertex pCurrMPVertex, MP pCurrMP, MP pComparedMP) { double tempSimilarityScore = mpSpeechHeaderSimilarityScore(pCurrMPVertex, pComparedMP); if (pCurrMP.getCurrentMembership().getParty().equals(pComparedMP.getCurrentMembership().getParty())) { tempSimilarityScore = tempSimilarityScore * SAME_PARTY_MULTIPLIER; } if (pCurrMP.getCurrentMembership().getRiding().getProvince() .equals(pComparedMP.getCurrentMembership().getRiding().getProvince())) { tempSimilarityScore = tempSimilarityScore * SAME_PROVINCE_MULTIPLIER; } return tempSimilarityScore; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getBestScore();", "public void calcMatch() {\n if (leftResult == null || rightResult == null) {\n match_score = 0.0f;\n } else {\n match_score = FaceLockHelper.Similarity(leftResult.getFeature(), rightResult.getFeature(), rightResult.getFeature().length);\n ...
[ "0.6499337", "0.6496471", "0.6447811", "0.6420232", "0.64090914", "0.63506275", "0.63367546", "0.6273687", "0.6261935", "0.6261935", "0.62046605", "0.61949694", "0.61812234", "0.6114423", "0.6108728", "0.6106097", "0.6104032", "0.6086403", "0.60739344", "0.6055263", "0.605397...
0.69136816
0
returns the Similarity score of pMP2 compared to the pCurrMPVertex's MP, which determines how similar the MPs are based on how similar their speeches are.
private static double mpSpeechHeaderSimilarityScore(MPVertex pCurrMPVertex, MP pMP2) { MPVertex tempMPVertex = new MPVertex(pMP2.getEmail(), getWordIndex()); double similarityScore = pCurrMPVertex.subtract(tempMPVertex).vLength(); return similarityScore; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static double mpSimilarityScore(MPVertex pCurrMPVertex, MP pCurrMP, MP pComparedMP)\n\t{\n\t\tdouble tempSimilarityScore = mpSpeechHeaderSimilarityScore(pCurrMPVertex, pComparedMP);\n\t\tif (pCurrMP.getCurrentMembership().getParty().equals(pComparedMP.getCurrentMembership().getParty()))\n\t\t{\n\t\t\ttempS...
[ "0.7900155", "0.66776407", "0.5982773", "0.5982773", "0.5982773", "0.59820104", "0.59820104", "0.59820104", "0.5971797", "0.5971797", "0.59716773", "0.59716773", "0.59713155", "0.59713155", "0.5927718", "0.5916153", "0.571618", "0.566903", "0.56606615", "0.5644491", "0.545597...
0.7387386
1
Generates a map containing (String word,int index) pairs for all the words in all the headers of all the speeches.
private static HashMap<String, Integer> generateWordIndex() { HashMap<String, Integer> wordIndex = new HashMap<String, Integer>(); int currIndex = 0; StringBuffer combinedHeaders; for (MP mp : Capone.getInstance().getParliament().getMPList()) { for (Speech sp : mp.returnSpeeches()) { combinedHeaders = new StringBuffer(); combinedHeaders.append(sp.getHeader1()); combinedHeaders.append(sp.getHeader2()); for (String str : combinedHeaders.toString().split(" ")) { if (!wordIndex.containsKey(str)) { wordIndex.put(str, currIndex); currIndex++; } } } } return wordIndex; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static Map<String, Integer> getWords(){\n\t\tMap<String, Integer> map = new HashMap<String, Integer>();\n\t\t\n\t\tfor(Status status : statusList){\n\t\t\tStringTokenizer tokens = new StringTokenizer(status.getText());\n\t\t\twhile(tokens.hasMoreTokens()){\n\t\t\t\tString token = tokens.nextToken();\n\t\t\...
[ "0.61603", "0.5922062", "0.5804625", "0.57977605", "0.5748169", "0.5743662", "0.5732378", "0.5728857", "0.5692793", "0.5660753", "0.56200564", "0.5598911", "0.5588522", "0.5561671", "0.55523443", "0.5547787", "0.5542999", "0.55056304", "0.54753375", "0.54685473", "0.5464901",...
0.8147595
0
a getter which returns the WordIndex map generated by generateWordIndex.
private static HashMap<String, Integer> getWordIndex() { return aWordIndex; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static HashMap<String, Integer> generateWordIndex()\n\t{\n\t\tHashMap<String, Integer> wordIndex = new HashMap<String, Integer>();\n\t\tint currIndex = 0;\n\t\tStringBuffer combinedHeaders;\n\t\tfor (MP mp : Capone.getInstance().getParliament().getMPList())\n\t\t{\n\t\t\tfor (Speech sp : mp.returnSpeeches(...
[ "0.71183944", "0.6903364", "0.6783891", "0.66794974", "0.66618663", "0.66324073", "0.642261", "0.6413081", "0.62625825", "0.6129192", "0.60815436", "0.60423523", "0.60239017", "0.5936521", "0.589214", "0.58776355", "0.58554024", "0.5813263", "0.58075243", "0.5797936", "0.5782...
0.8079699
0
removes all elements of pOverLap from pOriginal
private static ArrayList<MP> removeOverlap(ArrayList<MP> pOriginal, ArrayList<MP> pOverlap) { for (MP mp : pOverlap) { pOriginal.remove(mp); } return pOriginal; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeAllElements() {\n for (int i = 0; i < OLast; i++) O[i] = null;\n ON = OLast = 0;\n Gap = -1;\n }", "public void removeDuplicates()\n\t{\n\t\tComparator<Point> comp = new Comparator<Point>() \n\t\t{\n @Override\n public int compare(Point p, Point q...
[ "0.58100384", "0.56385314", "0.5599888", "0.5572872", "0.55463463", "0.5507554", "0.5499216", "0.54650396", "0.5450239", "0.54445827", "0.54342973", "0.54016316", "0.5389514", "0.532576", "0.52860785", "0.5284151", "0.52630883", "0.519926", "0.5198035", "0.5181825", "0.518104...
0.71125084
0
converts a RatedMP list to MP list, keeping relative order.
private static ArrayList<MP> convertToRatedMPList(ArrayList<RatedMP> pRatedMPs) { ArrayList<MP> result = new ArrayList<MP>(); // will be used to sort the MPs by their rating. for (RatedMP mp : pRatedMPs) { result.add(mp.getMP()); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static ArrayList<MP> rankSimilarMPs(ArrayList<MP> pSelectedMPs)\n\n\t{\n\t\t// HashMap is used to provide an easy way to keep only the highest score for each MP.\n\t\tHashMap<String, Double> ratedMPsMap = new HashMap<String, Double>();\n\t\tHashMap<String, Double> tempRatedMPs;\n\t\tArrayList<RatedMP> sort...
[ "0.6143607", "0.53345764", "0.509973", "0.5056624", "0.5012448", "0.49996364", "0.49311373", "0.48642182", "0.4864084", "0.47917736", "0.47769454", "0.4774313", "0.47730416", "0.4659723", "0.46455967", "0.46257192", "0.46122253", "0.46076566", "0.4600653", "0.4596773", "0.459...
0.81414944
0
TODO Autogenerated method stub
@Override public void cleanup() { }
{ "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
Print the value of the largest element in the array, and then the index of that element in the array
public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int[] array = new int[5]; int max = 0; int index = 0; for (int i = 0; i < array.length; i++) { System.out.println("Enter array numbers"); array[i] = scanner.nextInt(); } for (int i = 1; i < array.length; i += 2) { if (array[i - 1] > array[i] && array[i - 1] > max) { max = array[i - 1]; index = i - 1; } else if (array[i - 1] < array[i] && array[i - 1] < max) { max = array[i]; index = i; } } System.out.println("Largest number is : " + max); System.out.println("index is : " + index); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int getIndexOfMax(double[] array){\n\n int largest = 0;\n for ( int i = 1; i < array.length; i++ )\n {\n if ( array[i] > array[largest] ) largest = i;\n }\n return largest;\n\n }", "int max() {\n\t\t// added my sort method in the beginning to sort ou...
[ "0.7934812", "0.7529166", "0.7503308", "0.740431", "0.7304481", "0.7266605", "0.72277385", "0.72257143", "0.7138133", "0.70992386", "0.70787305", "0.7040681", "0.6965294", "0.6963741", "0.69631374", "0.69262314", "0.6909364", "0.6902023", "0.69012743", "0.68999887", "0.688876...
0.72775626
5
Created by CMDDJ on 4/16/2018.
public interface StorePresenter { void valInformasiUmum(String strIdUser, String strNamaOutlet, String strAlamat, String strPhone, String strLat, String strLong, String strDistance); void addInformasiUmum(String strIdUser, String strNamaOutlet, String strAlamat, String strPhone, String strLat, String strLong, String strDistance); void showListOutletByIdUser(String strIdUser, double strLat, double strLong); void showInfoOutlet(String strIdOutlet, double lat, double lng); void getLatestStoreCreatedByUser(String strIdUser); void searchListUserOutletByKeyword(String strIdUser, String strKeyword, double lat, double lng); void getCountBook(String strIdUser); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpubl...
[ "0.6082051", "0.5994835", "0.57535326", "0.5752039", "0.57464933", "0.5743854", "0.5679621", "0.5679621", "0.5605332", "0.556573", "0.556291", "0.556291", "0.556291", "0.556291", "0.556291", "0.556291", "0.5546506", "0.5546506", "0.5541882", "0.5533766", "0.5520656", "0.551...
0.0
-1
Method require to send HTTP request.
public Response send() { setupAndConnect(); setRequestMethod(); setRequestBody(); setRequestHeaders(); writeRequestBody(); getResponse(); connection.disconnect(); return response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean sendRequest(com.webobjects.appserver.WORequest request){\n return false; //TODO codavaj!!\n }", "abstract void request() throws IOException;", "public void sendRequest() {\n\t\tURL obj;\n\t\ttry {\n\t\t\t// Instantiating HttpURLConnection object for making GET request.\n\t\t\tobj = new...
[ "0.6665958", "0.6561092", "0.6547659", "0.65402305", "0.6494952", "0.6320095", "0.63152677", "0.62433004", "0.62254757", "0.61860603", "0.6178203", "0.6127087", "0.6103225", "0.6100693", "0.6092035", "0.60528874", "0.6040401", "0.6014108", "0.6011841", "0.60049176", "0.600487...
0.6032595
17
Connect to Url using HttpURLConnection class.
private void setupAndConnect() { URL url = getUrl(this.endpointUrl); connection = null; try { connection = (HttpURLConnection) url.openConnection(); HttpURLConnection.setFollowRedirects(true); } catch (IOException e) { LOG.severe("Error connecting to Url : " + url); LOG.severe(e.toString()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void connectURL(String url) throws Exception {\n\t\tURL newurl = new URL(url);\n\t\tHttpURLConnection connection = (HttpURLConnection) newurl.openConnection();\n\t\tconnection.getContent();\n\t\t\n\t}", "protected HTTPConnection getConnectionToURL(URL url) throws ProtocolNotSuppException\r\n {\r\n...
[ "0.7161226", "0.6816162", "0.6798588", "0.6679754", "0.6642154", "0.6613115", "0.6539313", "0.65254843", "0.65242046", "0.65227854", "0.652065", "0.65164495", "0.6505761", "0.6491113", "0.6483743", "0.6406435", "0.6311232", "0.6311232", "0.6301593", "0.6284629", "0.6271471", ...
0.68238306
1
Convert String to Url object.
private URL getUrl(String url) { URL requestUrl = null; try { requestUrl = new URL(url); } catch (MalformedURLException e) { LOG.severe("Error forming Url for GET request"); LOG.severe(e.toString()); } return requestUrl; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static URL stringToUrl(String stringUrl) throws MalformedURLException{\r\n\t\treturn new URL(stringUrl);\r\n\t}", "public static URL str2url( String strUrl )\r\n {\r\n try\r\n {\r\n URL url = new URL( strUrl );\r\n return url;\r\n }\r\n catch( Malforme...
[ "0.74651396", "0.7376477", "0.72437763", "0.7197897", "0.69091606", "0.6810743", "0.6810743", "0.6808747", "0.6805057", "0.67675143", "0.6760411", "0.66833127", "0.6642492", "0.6584828", "0.6402197", "0.61428744", "0.60818225", "0.60640705", "0.6050497", "0.60148096", "0.5967...
0.514574
93
Set HTTP request method e.g. GET, POST etc.
private void setRequestMethod() { switch (type) { case GET: try { connection.setRequestMethod(GET); } catch (ProtocolException e) { LOG.severe("Could not set request as GET successfully"); LOG.severe(e.toString()); } break; case POST: try { connection.setDoOutput(true); connection.setRequestMethod(POST); } catch (ProtocolException e) { LOG.severe("Could not set request as POST successfully"); LOG.severe(e.toString()); } break; case PUT: try { connection.setDoOutput(true); connection.setRequestMethod(PUT); } catch (ProtocolException e) { LOG.severe("Could not set request as PUT successfully"); LOG.severe(e.toString()); } break; case DELETE: try { connection.setDoOutput(true); connection.setRequestMethod(DELETE); } catch (ProtocolException e) { LOG.severe("Could not set request as DELETE successfully"); LOG.severe(e.toString()); } break; case PATCH: try { connection.setDoOutput(true); connection.setRequestMethod(PATCH); } catch (ProtocolException e) { LOG.severe("Could not set request as PATCH successfully"); LOG.severe(e.toString()); } break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setMethod(HTTPMethod method);", "public void setHttpMethod(int httpMethod) {\n method = httpMethod;\n }", "public void setRequestMethod(int requestMethod) {\n this.requestMethod = requestMethod;\n }", "public void setRequestMethod(String requestMethod){\n this.requestMe...
[ "0.83405024", "0.79298544", "0.79206675", "0.7872441", "0.7631368", "0.76137286", "0.73252654", "0.7292158", "0.7257346", "0.71300757", "0.70994776", "0.70994776", "0.7098298", "0.708224", "0.7068298", "0.6925508", "0.6921267", "0.6894095", "0.6889081", "0.6878521", "0.682109...
0.8015393
1
Define the headers for the request. This method will be overridden in SignedRequest to include auth headers.
public void setRequestHeaders() { connection.setRequestProperty(ACCEPTS_TAG, ACCEPTS); connection.setRequestProperty(USER_AGENT_TAG, USER_AGENT); connection.setRequestProperty(CONTENT_TYPE_TAG, CONTENT_TYPE); LOG.info("*************************************"); LOG.info("--- REQUEST ---"); LOG.info("Type: " + connection.getRequestMethod()); LOG.info("Url: " + connection.getURL()); LOG.info("Body: " + requestBody); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"authorization\", apikey);\n\n\n return params;\n }", "@Override\n public Map<String, String> get...
[ "0.69253725", "0.6906608", "0.68993723", "0.6864924", "0.6804392", "0.6753966", "0.67254233", "0.6718463", "0.67026126", "0.66991687", "0.6640469", "0.663865", "0.66373664", "0.66373664", "0.66285527", "0.66239", "0.66202164", "0.6606144", "0.6582511", "0.65569955", "0.655699...
0.6903756
2
Actually write the request body using the OutputStreamWriter.
private void writeRequestBody() { if (requestBody != null && !requestBody.equals("")) { OutputStreamWriter out = null; try { out = new OutputStreamWriter(connection.getOutputStream()); } catch (IOException e) { LOG.severe("Could not open output stream to write request body"); LOG.severe(e.toString()); } try { out.write(requestBody); } catch (IOException e) { LOG.severe("Could not write request body"); LOG.severe(e.toString()); } try { out.flush(); } catch (IOException e) { LOG.severe("Could not flush output stream for writing request body"); LOG.severe(e.toString()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void writeBody(ObjectOutputStream stream) throws IOException {\n stream.writeObject(body);\n }", "void writeTo(InternalResponse<?> response, InternalRequest<?> request);", "private void writeObject(final java.io.ObjectOutputStream out) throws IOException {\n /** Response string */\n out.write...
[ "0.6061273", "0.6017809", "0.59802383", "0.5967325", "0.58988065", "0.5885197", "0.5718279", "0.5697594", "0.5629804", "0.5504359", "0.5504299", "0.54998475", "0.54795414", "0.5404277", "0.5268599", "0.525437", "0.52249163", "0.5206305", "0.5206305", "0.51747173", "0.5146026"...
0.7682466
0
Acquire the HTTP response code, message and body.
private void getResponse() { response = new Response(); getResponseCode(); getResponseMessage(); getResponseBody(); LOG.info("--- RESPONSE ---"); LOG.info("Code: " + response.getResponseCode()); LOG.info("Message: " + response.getResponseMessage()); LOG.info("Body: " + response.getResponseBody()); LOG.info("*************************************"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public synchronized int getResponseCode() throws IOException {\n //avoid dup validateConnection\n if ((replyHeaders.responseCode == -1)\n || (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE)) {\n validateConnection();\n }\n\n return replyHeaders.r...
[ "0.6254669", "0.622012", "0.61627537", "0.6115319", "0.6102895", "0.6090854", "0.6074403", "0.6066049", "0.6066049", "0.6066049", "0.60287666", "0.60161775", "0.5954543", "0.5954543", "0.59226334", "0.59183156", "0.5866893", "0.5850174", "0.58443177", "0.582876", "0.581676", ...
0.617452
2
Create an entity for this test. This is a static method, as tests for other entities might also need it, if they test an entity which requires the current entity.
public static Territorio createEntity(EntityManager em) { Territorio territorio = new Territorio().nome(DEFAULT_NOME); return territorio; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Entity createEntity();", "T createEntity();", "protected abstract ENTITY createEntity();", "void create(E entity);", "void create(T entity);", "E create(E entity);", "E create(E entity);", "protected abstract EntityBase createEntity() throws Exception;", "TestEntity buildEntity () {\n TestEn...
[ "0.7722865", "0.75046515", "0.74877393", "0.7361822", "0.7314417", "0.715623", "0.715623", "0.7150437", "0.7148942", "0.70781815", "0.7016245", "0.6803062", "0.6752023", "0.67399955", "0.67399955", "0.6712131", "0.6681996", "0.666649", "0.66406924", "0.66251004", "0.6624745",...
0.60025996
82
Create an updated entity for this test. This is a static method, as tests for other entities might also need it, if they test an entity which requires the current entity.
public static Territorio createUpdatedEntity(EntityManager em) { Territorio territorio = new Territorio().nome(UPDATED_NOME); return territorio; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Student createUpdatedEntity(EntityManager em) {\n Student student = new Student()\n .firstName(UPDATED_FIRST_NAME)\n .middleName(UPDATED_MIDDLE_NAME)\n .lastName(UPDATED_LAST_NAME)\n .studentRegNumber(UPDATED_STUDENT_REG_NUMBER)\n .dateOfB...
[ "0.6943836", "0.6788255", "0.6786641", "0.67172986", "0.6693327", "0.66913915", "0.6663769", "0.6636127", "0.6620307", "0.65142477", "0.6509136", "0.64467573", "0.6422512", "0.6420476", "0.6419049", "0.6413755", "0.64120173", "0.6408185", "0.6403095", "0.63928974", "0.6389640...
0.615613
46
Create the Territorio with an existing ID
@Test @Transactional void createTerritorioWithExistingId() throws Exception { territorio.setId(1L); int databaseSizeBeforeCreate = territorioRepository.findAll().size(); // An entity with an existing ID cannot be created, so this API call must fail restTerritorioMockMvc .perform(post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(territorio))) .andExpect(status().isBadRequest()); // Validate the Territorio in the database List<Territorio> territorioList = territorioRepository.findAll(); assertThat(territorioList).hasSize(databaseSizeBeforeCreate); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public org.oep.cmon.dao.dvc.model.ThuTuc2GiayTo create(long id);", "public void crear(Tarea t) {\n t.saveIt();\n }", "public Todo create(long todoId);", "public org.oep.cmon.dao.tlct.model.DanhMucGiayTo create(long id);", "@PostMapping(\"/terrenos\")\n @Timed\n public ResponseEntity<Terreno...
[ "0.68016195", "0.6235011", "0.6227957", "0.61943007", "0.6040182", "0.6036126", "0.60194045", "0.6016194", "0.59885025", "0.59786415", "0.5961225", "0.58275926", "0.58164346", "0.581018", "0.5806712", "0.58049977", "0.5802851", "0.57988507", "0.5762023", "0.5752525", "0.57428...
0.69127846
0
Executes the search, and checks that the default entity is returned.
private void defaultTerritorioShouldBeFound(String filter) throws Exception { restTerritorioMockMvc .perform(get(ENTITY_API_URL + "?sort=id,desc&" + filter)) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE)) .andExpect(jsonPath("$.[*].id").value(hasItem(territorio.getId().intValue()))) .andExpect(jsonPath("$.[*].nome").value(hasItem(DEFAULT_NOME))); // Check, that the count call also returns 1 restTerritorioMockMvc .perform(get(ENTITY_API_URL + "/count?sort=id,desc&" + filter)) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE)) .andExpect(content().string("1")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public boolean performSearch();", "private void executeSearch() {\n if (!view.getSearchContent().getText().isEmpty()) {\n SearchModuleDataHolder filter = SearchModuleDataHolder.getSearchModuleDataHolder();\n //set search content text for full text search\n filter....
[ "0.60012984", "0.59983414", "0.5819585", "0.57395095", "0.5733452", "0.5717701", "0.569093", "0.5642038", "0.5621955", "0.55530894", "0.5491306", "0.5451507", "0.54438716", "0.54404444", "0.5435233", "0.5428808", "0.5398984", "0.5389038", "0.5379057", "0.5376717", "0.5367455"...
0.0
-1
Executes the search, and checks that the default entity is not returned.
private void defaultTerritorioShouldNotBeFound(String filter) throws Exception { restTerritorioMockMvc .perform(get(ENTITY_API_URL + "?sort=id,desc&" + filter)) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE)) .andExpect(jsonPath("$").isArray()) .andExpect(jsonPath("$").isEmpty()); // Check, that the count call also returns 0 restTerritorioMockMvc .perform(get(ENTITY_API_URL + "/count?sort=id,desc&" + filter)) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE)) .andExpect(content().string("0")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public boolean performSearch();", "private void executeSearch() {\n if (!view.getSearchContent().getText().isEmpty()) {\n SearchModuleDataHolder filter = SearchModuleDataHolder.getSearchModuleDataHolder();\n //set search content text for full text search\n filter....
[ "0.60175896", "0.60031384", "0.59955853", "0.58722836", "0.5799484", "0.5782544", "0.5771052", "0.56395113", "0.5576167", "0.5575548", "0.5556377", "0.5549448", "0.5541323", "0.5511754", "0.5507031", "0.54624534", "0.54238546", "0.54020417", "0.53481257", "0.5345327", "0.5341...
0.0
-1
/ This code takes care of creating a FileTab instance, adding it to the tab pane and linking it to this.
private void initFileTab() { MainApp.getMainController().requestAddTab(fileTab); fileTab.getCodeArea().textProperty().addListener((obs, oldv, newv) -> dirty.set(true)); dirty.addListener((obs, oldv, newv) -> { String tabTitle = fileTab.getText(); if (newv && !tabTitle.endsWith("*")) fileTab.setText(tabTitle + "*"); else if (!newv && tabTitle.endsWith("*")) fileTab.setText(tabTitle.substring(0, tabTitle.length()-1)); }); fileTab.setOnCloseRequest(e -> { boolean success = FileManager.closeFile(this); if (!success) e.consume(); }); MainApp.getMainController().selectTab(fileTab); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createTabs() {\r\n\t\ttabbedPane = new JTabbedPane();\r\n\t\t\r\n\t\t//changes title and status bar \r\n\t\ttabbedPane.addChangeListener((l) -> { \r\n\t\t\tint index = tabbedPane.getSelectedIndex();\r\n\t\t\tif (index < 0) {\r\n\t\t\t\tcurrentFile = \"-\";\r\n\t\t\t} else {\r\n\t\t\t\tcurrentFile = ta...
[ "0.70039177", "0.68488085", "0.6683268", "0.66710126", "0.66480595", "0.64092207", "0.63980645", "0.63875836", "0.6289506", "0.62551945", "0.62139314", "0.6191977", "0.6155326", "0.6042127", "0.60394776", "0.59724885", "0.5955905", "0.59321487", "0.59255946", "0.5912929", "0....
0.78419214
0
/ If dirty, a confirmation dialog is shown before closing. If the user chooses not to close, returns false.
protected boolean requestClose() { if (!dirty.get()) { return true; } String filename = getFile() == null ? "Untitled" : getFile().getName(); String filepath = getFile() == null ? "" : getFile().getAbsolutePath(); AlertWrapper alert = new AlertWrapper(AlertType.CONFIRMATION) .setTitle(filename + " has changes") .setHeaderText("There are unsaved changes. Do you want to save them?") .setContentText(filepath + "\nAll unsaved changes will be lost."); alert.getButtonTypes().setAll(ButtonType.YES, ButtonType.NO, ButtonType.CANCEL); alert.showAndWait(); if (alert.getResult() == ButtonType.YES) { boolean success = save(); if (!success) { AlertWrapper errorAlert = new AlertWrapper(AlertType.ERROR) .setTitle("Couldn't save file!") .setHeaderText("There was an error while saving!") .setContentText("The file was not closed."); errorAlert.showAndWait(); return false; } } if (alert.getResult() == ButtonType.CANCEL) return false; // A false return value is used to consume the closing event. return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean canClose() {\n if (obj != null && obj.isModified()) {\n NotifyDescriptor.Confirmation mesg = new NotifyDescriptor.Confirmation(\"Scene has not been saved,\\ndo you want to save it?\",\n \"Not Saved\",\n NotifyDescriptor.YES_NO_CA...
[ "0.6927747", "0.6851158", "0.6755199", "0.67157304", "0.6650941", "0.66463685", "0.6622847", "0.6597241", "0.65607154", "0.6441379", "0.6392619", "0.6390205", "0.6311485", "0.63025606", "0.62767243", "0.62637454", "0.62631", "0.62469405", "0.6208017", "0.6204118", "0.620144",...
0.784016
0
the reason for two is because two is 0 and two only increments in play again this means if play again happens the right hero class details is chosen.
public void addPlayer(HeroClass newJob){job.add(newJob);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void scoregain() {\n \tif (playerturn%2==0) {\n \tscoreplayer1 = scoreplayer1+2;}\n if(playerturn%2==1) {\n \tscoreplayer2 = scoreplayer2+2;\n }\n }", "public void setNextTurn() {\n\t\t// COMPLETE THIS METHOD\n\t\tif (turn == 1) {\n\t\t\t\n\t\t\tturn = 2;\n\t...
[ "0.6411125", "0.6313969", "0.63068664", "0.6303138", "0.62806326", "0.62313944", "0.62272036", "0.6214018", "0.62127376", "0.60612124", "0.60472476", "0.602475", "0.5974855", "0.59536624", "0.5948403", "0.5936905", "0.5933686", "0.58789027", "0.5861308", "0.58572906", "0.5848...
0.0
-1
this method should be used for looping ability until laterjourney is used but right now has no use as first journey links straight to laterjourney
public void middleJourney(String path){ System.out.print("You walk towards your direction"); while(test) { if (three!=0){ System.out.println("Now lets try this again"); System.out.println("F/L/B/R?"); three=0; } path = sc.nextLine(); if(path.toLowerCase().equals("f")){ System.out.println("Straight it is"); laterJourney(path); break; } else if (path.toLowerCase().equals("l")){ System.out.println("Left, let's go"); laterJourney(path); break; } else if (path.toLowerCase().equals("b")){ System.out.println("Backwards the way"); three++; } else if (path.toLowerCase().equals("r")){ System.out.println("Right Right Right. Alrighty then"); laterJourney(path); break; } else{ System.out.println("Come on now, choose from the list"); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Journey getExpectedJoruney();", "public void readyNextAttackers() {\n if(battleAlly == null && battleEnemy == null){\n //if(battleAlly == null && battleEnemy == null && !isBattleOver()){\n battleAlly = battleAllies.get(0);\n battleEnemy = battleEnemies.get(0);\n }\n ...
[ "0.58951265", "0.57788914", "0.5740432", "0.57122153", "0.5684935", "0.55209893", "0.5518802", "0.55163217", "0.55023694", "0.54675657", "0.5400806", "0.53627825", "0.5352911", "0.5350645", "0.5320551", "0.5308577", "0.5296749", "0.5295445", "0.52937526", "0.5291347", "0.5289...
0.5364326
11
/ arr[] > Array que sera ordenado, low > indice inicial, high > indice final
static void sort(int vec[], int low, int high) { if (low < high) { /* pi esta particionando indices, arr[pi] is now at right place */ int pi = particion(vec, low, high); // Recursivamente ordena elementos antes de // la partición y despues de la partición sort(vec, low, pi - 1); sort(vec, pi + 1, high); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int partition(int[] arr, int start, int end) {\n\t\tint bounary = arr[start];\r\n\t\twhile(start<end) {\r\n\t\t\twhile(start<end&&arr[end]>=bounary) {\r\n\t\t\t\tend--;\r\n\t\t\t}\r\n\t\t\tarr[start] = arr[end];\r\n\t\t\twhile(start<end&&arr[start]<=bounary) {\r\n\t\t\t\tstart++;\r\n\t\t\t}\r\n\t\t\tarr[en...
[ "0.6441526", "0.6436785", "0.6433433", "0.63375413", "0.6273548", "0.624133", "0.62105376", "0.6206638", "0.62018293", "0.61986184", "0.6161738", "0.6160091", "0.6133554", "0.6132158", "0.6126144", "0.6120057", "0.606237", "0.60366917", "0.6022571", "0.60092574", "0.5987659",...
0.5746789
63
True if Welcome Intent is found
public boolean isWelcomeIntent(GoogleCloudDialogflowV2WebhookRequest webHookRequest) { boolean ret = false; String action = getAction(webHookRequest); if (action != null && action.equals("input.welcome")) { ret = true; } return ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isWelcomeInd() {\n return welcomeInd;\n }", "private void displayWelcomeScreen(){\n\t\t\n\t\tIntent intent = new Intent();\n\t\tintent.setClassName(getApplicationContext(), Welcome.class.getName());\n\t\t\n\t\t//Start the welcome screen\n\t\tstartActivity(intent);\n\t\t\n\t\tthis.finish(...
[ "0.67475975", "0.6629211", "0.66229755", "0.65846264", "0.63640606", "0.616898", "0.61685675", "0.6042328", "0.60094005", "0.5975385", "0.5885775", "0.585148", "0.58152896", "0.5803729", "0.5801569", "0.5792517", "0.5765456", "0.5731285", "0.5693338", "0.5653225", "0.5640967"...
0.7527439
0
Get input typed by the user
public String getUserText(GoogleCloudDialogflowV2WebhookRequest webHookRequest) { return webHookRequest.getQueryResult().getQueryText(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getUserInput();", "String getInput();", "public static String getInput() {\n\t\tScanner inputReader = new Scanner(System.in);\n\t\tString userInput;\n\t\tuserInput = inputReader.nextLine();\n\t\treturn userInput;\n\t}", "public String readCommand() {\n sc = new Scanner(System.in);\n user...
[ "0.82465357", "0.7945297", "0.7444784", "0.7391839", "0.7390058", "0.73845977", "0.73821133", "0.7289837", "0.72780937", "0.72464615", "0.72351265", "0.71883965", "0.713881", "0.70868313", "0.7076322", "0.7066254", "0.703921", "0.70163393", "0.69502956", "0.6930261", "0.68703...
0.0
-1
Get context given itsname
public GoogleCloudDialogflowV2Context getContext(GoogleCloudDialogflowV2WebhookRequest webHookRequest, String name) { GoogleCloudDialogflowV2Context outputContext = null; if (webHookRequest.getQueryResult().getOutputContexts() != null) { for (GoogleCloudDialogflowV2Context c : webHookRequest.getQueryResult().getOutputContexts()) { if (c.getName().equalsIgnoreCase(name)) { outputContext = c; } } } return outputContext; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Context getContext(String name)\n throws NamingException\n {\n if(alias.containsKey(name))\n {\n name = alias.get(name);\n }\n Context ctx = context.get(name);\n if(ctx == null)\n {\n Hashtable<String, Object> props = initial.get(name...
[ "0.7286394", "0.7102784", "0.707141", "0.68941015", "0.6842519", "0.6823829", "0.67786723", "0.67527527", "0.67527527", "0.67021257", "0.66832393", "0.6674123", "0.66694117", "0.6650126", "0.65886396", "0.65886396", "0.65886396", "0.65024", "0.6499835", "0.6488345", "0.646197...
0.6343616
23
Retrieves the action name from the matched intent.
public String getAction(GoogleCloudDialogflowV2WebhookRequest webHookRequest) { String action = ""; GoogleCloudDialogflowV2QueryResult queryResult = webHookRequest.getQueryResult(); if (queryResult != null) { action = queryResult.getAction(); } return action; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String getIntentActionString();", "public String getIntentDisplayName(GoogleCloudDialogflowV2WebhookRequest webHookRequest) {\n String action = \"\";\n\n GoogleCloudDialogflowV2QueryResult queryResult = webHookRequest.getQueryResult();\n\n if (queryResult != null) {\n ...
[ "0.6825907", "0.671961", "0.6716425", "0.65614253", "0.6514298", "0.651414", "0.63997364", "0.63508904", "0.6323487", "0.6323487", "0.6323487", "0.6323487", "0.627722", "0.62613726", "0.62613726", "0.62613726", "0.6247474", "0.62459886", "0.62438864", "0.6165741", "0.6121724"...
0.6120342
21
Get Display Name of the Intent
public String getIntentDisplayName(GoogleCloudDialogflowV2WebhookRequest webHookRequest) { String action = ""; GoogleCloudDialogflowV2QueryResult queryResult = webHookRequest.getQueryResult(); if (queryResult != null) { action = queryResult.getIntent().getDisplayName(); } return action; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getDisplay_name();", "java.lang.String getDisplayName();", "java.lang.String getDisplayName();", "java.lang.String getDisplayName();", "java.lang.String getDisplayName();", "java.lang.String getDisplayName();", "java.lang.String getDisplayName();", "String getDisplayName();", "String getDisp...
[ "0.7263804", "0.69669753", "0.69669753", "0.69669753", "0.69669753", "0.69669753", "0.69669753", "0.6801998", "0.6801998", "0.6801998", "0.6801998", "0.6801998", "0.6801998", "0.6770991", "0.6669947", "0.66050917", "0.6601475", "0.6601475", "0.6582504", "0.6582504", "0.658250...
0.6691026
14
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jtxtMasse = new javax.swing.JTextField(); jtxtTaille = new javax.swing.JTextField(); jLabel5 = new javax.swing.JLabel(); jtxtNom = new javax.swing.JTextField(); jtxtSexe = new javax.swing.JTextField(); jLabel6 = new javax.swing.JLabel(); jtxtAge = new javax.swing.JTextField(); jbtnCalculer = new javax.swing.JButton(); jbtnFermer = new javax.swing.JButton(); jbtnEffacer = new javax.swing.JButton(); jPanel2 = new javax.swing.JPanel(); jLabel7 = new javax.swing.JLabel(); jtxtIndice = new javax.swing.JTextField(); jLabel8 = new javax.swing.JLabel(); jtxtInterperatation = new javax.swing.JTextField(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("Calculateur de l'indice de masse grasse"); jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jLabel1.setText("Masse(en Kg):"); jLabel2.setText("Taille(en m):"); jLabel3.setText("Age:"); jLabel4.setText("Sexe:"); jtxtMasse.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jtxtMasseActionPerformed(evt); } }); jLabel5.setText("Nom:"); jLabel6.setText("0:Femme 1:Homme"); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(35, 35, 35) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel5) .addComponent(jLabel2) .addComponent(jLabel1) .addComponent(jLabel3)) .addGap(47, 47, 47) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jtxtAge, javax.swing.GroupLayout.PREFERRED_SIZE, 156, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(54, 54, 54) .addComponent(jLabel4) .addGap(18, 18, 18) .addComponent(jtxtSexe, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(26, 26, 26) .addComponent(jLabel6)) .addComponent(jtxtTaille, javax.swing.GroupLayout.PREFERRED_SIZE, 156, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jtxtNom, javax.swing.GroupLayout.PREFERRED_SIZE, 156, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jtxtMasse, javax.swing.GroupLayout.PREFERRED_SIZE, 156, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(58, Short.MAX_VALUE)) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel5, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jtxtNom, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jtxtTaille, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jtxtMasse, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel1)) .addGap(18, 18, 18) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jtxtAge, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3)) .addGap(6, 6, 6)) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel4) .addComponent(jtxtSexe, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel6))) .addGap(29, 29, 29)) ); jbtnCalculer.setText("Calculer"); jbtnCalculer.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jbtnCalculerActionPerformed(evt); } }); jbtnFermer.setText("Quitter"); jbtnFermer.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jbtnFermerActionPerformed(evt); } }); jbtnEffacer.setText("Effacer"); jbtnEffacer.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jbtnEffacerActionPerformed(evt); } }); jPanel2.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jLabel7.setText("Indice de Masse Grasse:"); jtxtIndice.setEditable(false); jLabel8.setText("Interpertation:"); jtxtInterperatation.setEditable(false); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(43, 43, 43) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel7) .addComponent(jLabel8)) .addGap(18, 18, 18) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jtxtIndice) .addComponent(jtxtInterperatation, javax.swing.GroupLayout.DEFAULT_SIZE, 135, Short.MAX_VALUE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel7) .addComponent(jtxtIndice, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel8) .addComponent(jtxtInterperatation, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(43, Short.MAX_VALUE)) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(61, 61, 61) .addComponent(jbtnFermer) .addGap(140, 140, 140) .addComponent(jbtnEffacer) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jbtnCalculer) .addGap(0, 0, Short.MAX_VALUE)) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jbtnCalculer) .addComponent(jbtnFermer) .addComponent(jbtnEffacer)) .addGap(34, 34, 34)) ); pack(); setLocationRelativeTo(null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.7321245", "0.7292375", "0.7292375", "0.7292375", "0.7286756", "0.7250393", "0.7215278", "0.7208825", "0.7197639", "0.71918", "0.7185626", "0.716065", "0.71489197", "0.7094757", "0.7081307", "0.7057363", "0.69892997", "0.6978972", "0.6956389", "0.69543713", "0.69465107", ...
0.0
-1
Inicializamos los canales de comunicaciones y arrancamos la tarea
public Conexion( Socket sockCliente,ServidorChat servidor ) { cliente = sockCliente; ultimoEnvio = (new Date()).getTime(); usuarios = servidor.usuarios; log = servidor.log; log.info( "Conexión aceptada. Lanzando tareas..." ); try { entrada = new ObjectInputStream( cliente.getInputStream() ); log.info( "Creado el canal de entrada para el nuevo socket" ); salida = new ObjectOutputStream( cliente.getOutputStream() ); log.info( "Creado el canal de salida para el nuevo socket" ); } catch( IOException e ) { try { cliente.close(); log.info( "Socket cliente cerrado.." ); eliminaCliente(); } catch( IOException e2 ) { e.printStackTrace(); } log.warning( "Error abriedo canales: "+e ); return; } ipCliente = cliente.getInetAddress(); puertoCliente = cliente.getPort(); nombreCliente = ipCliente + ":" + puertoCliente; log.info( "Recogiendo conexión de: "+nombreCliente ); this.start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void inicializa_controles() {\n bloquea_campos();\n bloquea_botones();\n carga_fecha();\n ocultar_labeles();\n }", "private void inicializarTablero() {\n for (int i = 0; i < casillas.length; i++) {\n for (int j = 0; j < casillas[i].length; j++) {\n ...
[ "0.7488442", "0.6905254", "0.6861802", "0.6824698", "0.680959", "0.6772204", "0.6706401", "0.6687039", "0.6670233", "0.66602814", "0.6646241", "0.664585", "0.6591861", "0.6584151", "0.6565252", "0.6563802", "0.65436816", "0.6536918", "0.6536813", "0.65366477", "0.65274614", ...
0.0
-1
Devuelve al servidor el nombre del cliente
public String getNombreCliente() {; return( nombreCliente ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void requestClientNameFromServer() {\n writeToServer(ServerAction.GET_NAME + \"\");\n }", "public static server getNameServer(){\n return nameServer;\n }", "public static String getPcNombreCliente(){\n\t\tString host=\"\";\n\t\ttry{\n\t\t\tString ips[] = getIPCliente().split(\"\\\\....
[ "0.79601806", "0.7189541", "0.71391433", "0.68183446", "0.6591855", "0.64795256", "0.64481515", "0.6426195", "0.64229685", "0.63883626", "0.632163", "0.6302099", "0.628656", "0.62749875", "0.62748593", "0.6271894", "0.6243426", "0.61927116", "0.6174105", "0.609433", "0.609433...
0.56847566
72
Contamos el numero de Tabulaciones que tiene la linea
private void get_Tree(int prevTab, TreeItem<String> root){ while (it < line.size()){ int tabs = count_tabs(line.get(it)); if (tabs > prevTab){ // Si es hijo String [] token = line.get(it).split(" "); root.getChildren().add(new TreeItem<>(token[token.length-1])); // El ultimo del split será el token it++; get_Tree(tabs, root.getChildren().get(root.getChildren().size()-1)); // El ultimo agregado }else{ break; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void tablero(){\r\n System.out.println(\" X \");\r\n System.out.println(\" 1 2 3\");\r\n System.out.println(\" | |\");\r\n //imprimir primera fila\r\n System.out.println(\" 1 \"+gato[0][0]+\" | \"+gato[0][1]+\" | \"+gato[0][2]+\"...
[ "0.6630261", "0.6485138", "0.63809663", "0.61742616", "0.6141796", "0.60873955", "0.6086975", "0.60606295", "0.60359204", "0.5989231", "0.5969973", "0.5923755", "0.5896048", "0.5892162", "0.588922", "0.58793724", "0.5875898", "0.5870149", "0.58662635", "0.5861742", "0.5835966...
0.0
-1
DEPRECATED METHODS ON INTERFACE Unsupported operation. Throws UnsupportedOperationException if invoked. Druid filters are being split from the ApiRequest model and should be handled separately.
@Deprecated @Override public Filter getQueryFilter() { throw new UnsupportedOperationException("Druid filters are being split from the ApiRequest model and " + "should be handled separately."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Deprecated\n @Override\n public DruidFilterBuilder getFilterBuilder() {\n throw new UnsupportedOperationException(\"Druid filters are being split from the ApiRequest model and \" +\n \"should be handled separately.\");\n }", "@Deprecated\n @Override\n public Map<Dimension, S...
[ "0.7496935", "0.7206506", "0.6162145", "0.5891649", "0.58526635", "0.5823407", "0.57949835", "0.56574184", "0.56360096", "0.5633191", "0.56299055", "0.56294954", "0.5622906", "0.5615663", "0.56031924", "0.55777395", "0.55710775", "0.55671674", "0.55653477", "0.5559024", "0.55...
0.76727283
0
Unsupported operation. Throws UnsupportedOperationException if invoked. Druid havings are being split from the ApiRequest model and should be handled separately.
@Deprecated @Override public Having getQueryHaving() { throw new UnsupportedOperationException("Druid havings are being split from the ApiRequest model and should " + "be handled separately."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Deprecated\n @Override\n public DruidFilterBuilder getFilterBuilder() {\n throw new UnsupportedOperationException(\"Druid filters are being split from the ApiRequest model and \" +\n \"should be handled separately.\");\n }", "@Override\r\n\tprotected ResponseEntity<Object> handleH...
[ "0.5457273", "0.54407877", "0.53677416", "0.52366465", "0.520172", "0.5185629", "0.5098644", "0.5047373", "0.5005303", "0.49937728", "0.4931994", "0.49069083", "0.48780966", "0.48499396", "0.48372522", "0.48370007", "0.47897643", "0.47832733", "0.47648168", "0.47617182", "0.4...
0.6187412
0
Unsupported operation. Throws UnsupportedOperationException if invoked. Druid filters are being split from the ApiRequest model and should be handled separately.
@Deprecated @Override public DruidFilterBuilder getFilterBuilder() { throw new UnsupportedOperationException("Druid filters are being split from the ApiRequest model and " + "should be handled separately."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Deprecated\n @Override\n public Filter getQueryFilter() {\n throw new UnsupportedOperationException(\"Druid filters are being split from the ApiRequest model and \" +\n \"should be handled separately.\");\n }", "@Deprecated\n @Override\n public Map<Dimension, Set<ApiFilter>>...
[ "0.69818705", "0.6827899", "0.589998", "0.58698934", "0.5775574", "0.576919", "0.5709506", "0.56832343", "0.56770813", "0.56024176", "0.5596863", "0.5544142", "0.55351627", "0.5494247", "0.5481263", "0.54748034", "0.5472324", "0.54580873", "0.5455277", "0.54493856", "0.544491...
0.6824228
2
Unsupported operation. Throws UnsupportedOperationException if invoked. Druid filters are being split from the ApiRequest model and should be handled separately.
@Deprecated @Override public Map<Dimension, Set<ApiFilter>> generateFilters( final String filterQuery, final LogicalTable table, final DimensionDictionary dimensionDictionary ) { throw new UnsupportedOperationException("Druid filters are being split from the ApiRequest model and " + "should be handled separately."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Deprecated\n @Override\n public Filter getQueryFilter() {\n throw new UnsupportedOperationException(\"Druid filters are being split from the ApiRequest model and \" +\n \"should be handled separately.\");\n }", "@Deprecated\n @Override\n public DruidFilterBuilder getFilterBu...
[ "0.6981515", "0.6823489", "0.59002984", "0.58709204", "0.5775266", "0.5769547", "0.5708581", "0.5683545", "0.56759715", "0.5602139", "0.55959666", "0.5542479", "0.55347466", "0.5493099", "0.5480242", "0.5474942", "0.5472274", "0.5456923", "0.5454807", "0.5449442", "0.54453313...
0.68275195
1
Created by Simon on 16/8/16.
public interface PlanMapper { int insertPlan(Plan plan); List<Plan> selectAllPlan(); List<Plan> selectCompletePlan(); Plan selectPlanById(Integer id); int updatePlan(Plan plan); int insertPlanDetail(PlanDetail planDetail); List<PlanDetail> selectPlanDetailByPlanId(Integer planId); PlanDetail selectPlanDetailById(Integer id); int updatePlanDetailStateById(Map map); List<PlanDetail> selectPlanDetailByUserId(Integer userId); List<PlanDetail> selectPlanDetailByStateNoPass(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tprotec...
[ "0.5993954", "0.59431803", "0.5839934", "0.5821008", "0.58080506", "0.57815427", "0.5774838", "0.57467556", "0.57467556", "0.5713656", "0.5703892", "0.56735814", "0.5653641", "0.56352264", "0.56277406", "0.56051", "0.560208", "0.55962247", "0.55962247", "0.55962247", "0.55962...
0.0
-1
jhipsterneedleentityaddfield JHipster will add fields here, do not remove
public Long getId() { return id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addField(\n JavaSymbolName propertyName,\n JavaType propertyType,\n String columnName,\n String columnType,\n JavaType className,\n boolean id,\n boolean oneToOne, boolean oneToMany, boolean manyToOne, boolean manyToMany, String mapp...
[ "0.62918013", "0.5986834", "0.5934082", "0.5807041", "0.5700581", "0.5625638", "0.5624324", "0.56036466", "0.55882484", "0.55270493", "0.55253243", "0.5501887", "0.5449814", "0.5448885", "0.5447967", "0.5438393", "0.5420039", "0.5395539", "0.5392664", "0.5384511", "0.53790164...
0.0
-1
jhipsterneedleentityaddgetterssetters JHipster will add getters and setters here, do not remove
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof Paramentro)) { return false; } return id != null && id.equals(((Paramentro) o).id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface CommonEntityMethod extends ToJson,GetFieldValue,SetFieldValue{\n}", "static void setPropertiesFromGetters(TableEntity entity, ClientLogger logger) {\n Class<?> myClass = entity.getClass();\n\n // Do nothing if the entity is actually a `TableEntity` rather than a subclass\n i...
[ "0.6329206", "0.6107338", "0.5660746", "0.5651389", "0.5532405", "0.5464017", "0.5462906", "0.5449554", "0.54341376", "0.5414626", "0.5387969", "0.53788716", "0.53505605", "0.5342189", "0.5335476", "0.53292733", "0.5324932", "0.5322199", "0.53164726", "0.5303747", "0.5293135"...
0.0
-1
Method that extracts the course number and their descriptions from the 2021FA_Schedule.txt file, placing this new information into a 2021_Classes.txt file.
public static void partA() throws IOException { String filePath = "C:\\eclipse-workspace\\Regular Expressions\\2021FA_Schedule.txt"; //Converting the text file into a single string. String contents = Files.readString(Path.of(filePath)); //Pattern for picking out classes and their information. String RegEx0 = "[A-Z]{2,4}-\\d{3}[A-Z]?-[\\d|A-Z]{2}.*\r\n.*((AM|PM)(.*(\\.))?)"; //Creating pattern object r for RegEx0 Pattern r = Pattern.compile(RegEx0); //Creating matcher object that finds r patterns in the contents string Matcher m = r.matcher(contents); //Creating file with only the classes and their info. PrintWriter out = new PrintWriter("2021_Classes.txt"); //while the matcher continues to find matches, these matches are printed in the "2021_Classes.txt" file. while (m.find()) { out.println(m.group() + "\n"); } out.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void partC() throws IOException {\n\t\tString filePath = \"C:\\\\eclipse-workspace\\\\Regular Expressions\\\\2021_ClassAvailability.txt\";\n\t\t\n\t\t//Converting the text file into a single string.\n\t\tString contents = Files.readString(Path.of(filePath));\n\t\t\n\t\tString RegEx1 = \"[A-Z]{2,4}-\\...
[ "0.6107821", "0.60955834", "0.59637195", "0.58627236", "0.560686", "0.5554557", "0.5493529", "0.54794925", "0.5436675", "0.5413559", "0.5355986", "0.52093804", "0.520123", "0.51790756", "0.5172495", "0.51448274", "0.51323736", "0.5097832", "0.50660187", "0.5058535", "0.503454...
0.6776664
0
Method that extracts the section number and whether or not the class is open or closed along with the seating numbers from the 2021_Classes.txt file, writing this information into the new 2021_ClassAvailability.txt file.
public static void partB() throws IOException { String filePath = "C:\\eclipse-workspace\\Regular Expressions\\2021_Classes.txt"; //Converting the text file into a single string. String contents = Files.readString(Path.of(filePath)); String RegEx1 = "[A-Z]{2,4}-\\d{3}[A-Z]?-[\\d|A-Z]{2}"; //Pattern for finding class ID String RegEx2 = "(Open|CLOSED) \\d{1,2} \\d{1,2}"; //Pattern for finding open vs closed class and number of seats //Creating pattern objects Pattern r = Pattern.compile(RegEx1); Pattern o = Pattern.compile(RegEx2); //Creating matcher objects Matcher m = r.matcher(contents); Matcher n = o.matcher(contents); //Creating file with only the classes and their info. PrintWriter out = new PrintWriter("2021_ClassAvailability.txt"); //while the matcher continues to find matches, these matches are printed and a counter is tallied up. while (m.find()&&n.find()) { out.println(m.group() + " " + n.group() + "\n"); } out.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void partC() throws IOException {\n\t\tString filePath = \"C:\\\\eclipse-workspace\\\\Regular Expressions\\\\2021_ClassAvailability.txt\";\n\t\t\n\t\t//Converting the text file into a single string.\n\t\tString contents = Files.readString(Path.of(filePath));\n\t\t\n\t\tString RegEx1 = \"[A-Z]{2,4}-\\...
[ "0.62438345", "0.5810459", "0.48593464", "0.48044932", "0.4804087", "0.47713277", "0.47526416", "0.47473115", "0.47321212", "0.472863", "0.4686786", "0.46867248", "0.4684736", "0.46699175", "0.46337667", "0.4618139", "0.45905727", "0.45854527", "0.45774502", "0.45617378", "0....
0.7067288
0
Method for counting the number of unique classes in the 2021_ClassAvailability.txt file.
public static void partC() throws IOException { String filePath = "C:\\eclipse-workspace\\Regular Expressions\\2021_ClassAvailability.txt"; //Converting the text file into a single string. String contents = Files.readString(Path.of(filePath)); String RegEx1 = "[A-Z]{2,4}-\\d{3}[A-Z]?-[\\d|A-Z]1"; //Pattern for finding class ID //Creating pattern object r Pattern r = Pattern.compile(RegEx1); //Creating matcher object m Matcher m = r.matcher(contents); //Creating an array list used to store the various pattern matches found by the RegEx ArrayList<String> uniqueClasses = new ArrayList<String>(); //while the matcher continues to find matches, these matches are printed and a counter is tallied up. while (m.find()) { uniqueClasses.add(m.group()); } // System.out.println(uniqueClasses); //Used to print out the list of all unique classes //Converting the array list uniqueClasses into a string so that RegEx can be used on it String listString = String.join(",", uniqueClasses); String RegEx3 = "[A-Z]{2,4}"; //RegEx for finding the class type //Creating pattern object o Pattern o = Pattern.compile(RegEx3); //Creating matcher object p Matcher p = o.matcher(listString); //Creating hashmap for storing the unique classes HashMap<String, Integer> uniqueClassCounter = new HashMap<String, Integer>(); //While the matcher continues to find matching patterns in the listString string... while (p.find()) { // System.out.println(p.group()); //Prints out the type of each unique class found in the array list above //checking the hashmap to determine if the key (class department code) being checked already exists if (uniqueClassCounter.containsKey(p.group())) { int uniqueClassCount = (int)uniqueClassCounter.get(p.group()); uniqueClassCount++;//increases the value stored with the department code key to keep track of the number of times that department key is found uniqueClassCounter.put(p.group(), uniqueClassCount ); } else { uniqueClassCounter.put(p.group(), 1);//Stores new department code keys }//end if else }//end while //for loop used to print out the hashmap. for (HashMap.Entry<String, Integer> entry :uniqueClassCounter.entrySet()) { String uniqueClassString = entry.getKey(); int uniqueClassInt = entry.getValue(); System.out.println(uniqueClassString + " : " + uniqueClassInt); }//end for loop System.out.println(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getNumOfClasses();", "private int[] countClasses(List<Instance> instances){\r\n\t\tint[] counters = new int[classes.size()];\r\n\t\tfor(Instance ins : instances){\r\n\r\n\t\t\tfor(String str : classes){\r\n\t\t\t\tif(ins.getClassAttribute().equals(str)){\r\n\t\t\t\t\tcounters[classes.indexOf(str)]++;\...
[ "0.6262615", "0.60456693", "0.5877042", "0.5612619", "0.5612226", "0.5587347", "0.55646116", "0.55446947", "0.5511519", "0.5510057", "0.5510057", "0.5508761", "0.5502123", "0.54894954", "0.5474288", "0.546182", "0.54595244", "0.5450315", "0.54488194", "0.54239005", "0.5405562...
0.69218373
0
math class is part of java language, no import needed
public static void main(String[] args) { int x = 10; System.out.println(Math.pow(x, 3)); //1000 System.out.println(Math.sqrt(x)); //square root 10 double y = 8.9876; System.out.println(Math.round(y)); //rounds to nearest (9) System.out.println(Math.max(x, y)); //10 also min int roll = (int)(Math.random() * 6 + 1); //from 1 to 6 //Math.random() * range + start number //ex --> 30 and 50 (int)(Math.random() * 21 + 30); System.out.println(roll); // System.out.println((int)(Math.random() * 10 + 20)); System.out.println("\n\nSHORTCUTS\n============"); int a = 10; a += 10; //a - 20 System.out.println("a is " + a); int b = a; b++; //21 System.out.println("b is " + b); a *= 2; //a = a * 2 System.out.println("a is " + a); //40 int c = b++; //c = 21, b = 22 System.out.format("c = %d and b = %d", c, b); int d = ++b; //d = 23, b = 23 System.out.format("d = %d and b = %d\n", d, b); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void doMath();", "@Override\n public double callJavaMath(String methodName, Object[] args) {\n\treturn 0;\n }", "private MyMath() {\n }", "private XMath()\n {\n \n }", "public MathContext getMathContext();", "public MathEval() {\r\n super();\r\n\r\n constants=new TreeMa...
[ "0.7197563", "0.6930832", "0.6735855", "0.6654365", "0.6520583", "0.6517304", "0.6459865", "0.6422162", "0.6366569", "0.6360793", "0.62286127", "0.61301273", "0.60765743", "0.60497934", "0.6017623", "0.6002536", "0.5983439", "0.59646136", "0.59263134", "0.5913815", "0.5910730...
0.0
-1
Specifies what the display system should do. Note that the implementation has a lot of freedom to choose its display.
public interface SecuritySystemDisplay { /** * Displays the time remaining to go out of the house that is kept track of * by a TimeTracker instance. * * @param time remaining time, state state it is going into after time runs out */ public void showTimeLeft(int time, String state); /** * Indicates that the system is in Away State */ public void showAway(); /** * Indicates that the system is in Stay State */ public void showStay(); /** * Indicate that the system is ready to arm */ public void showReady(); /** * Indicate that the system is unready to arm */ public void showUnready(); /** * Indicate that the system is arming */ public void showArming(); /** * Indicate that the system is disarmed */ public void showDisarmed(); /** * Indicate that the system is breach */ public void showBreach(); /** * Indicate that the system is triggered */ public void showTriggered(); /** * prompts user for password when cancel pressed */ public void showPasswordPrompt(); /** * shows numbers pressed */ public void showNumeric(String stringPassword); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setDisplay() {\n\t\tDisplayOpt.add(\"-sd\");\n\t\tDisplayOpt.add(\"/sd\");\n\t\tDisplayOpt.add(\"showdetails\");\n\n\t}", "public void setDisplay(String display);", "public void setDisplay(Display display) {\n\t\tthis.display = display;\n\t}", "public final void setDisplay(Display display) {\r\n...
[ "0.80495197", "0.7527314", "0.72432894", "0.72212416", "0.7100915", "0.6945763", "0.6887139", "0.68281764", "0.6799917", "0.67890656", "0.6756591", "0.6678934", "0.6662522", "0.6650586", "0.66296643", "0.66147155", "0.6469529", "0.6435532", "0.6434784", "0.63003975", "0.62623...
0.0
-1
Displays the time remaining to go out of the house that is kept track of by a TimeTracker instance.
public void showTimeLeft(int time, String state);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printTimeRemaining() {\n long timeInSeconds = getTimeRemaining();\n long seconds = timeInSeconds % 60;\n long minutes = timeInSeconds / 60;\n System.out.println(\"Time until the oxygen supply runs out: \" + minutes \n + \" minutes and \" + seconds + \" seconds.\");\n }...
[ "0.71898675", "0.63797116", "0.61816776", "0.61438245", "0.6062784", "0.6023882", "0.59732217", "0.5966833", "0.5861571", "0.5854015", "0.5746562", "0.57259405", "0.56791383", "0.5627198", "0.5617544", "0.55522186", "0.5547522", "0.554431", "0.55360776", "0.55228204", "0.5518...
0.6284488
2
Indicates that the system is in Away State
public void showAway();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isOn(){\n return state;\n }", "public String getAtmState();", "public boolean isOnWay(){\n\t\treturn onWay;\n\t}", "AdministrativeState adminsatratveState();", "AdministrativeState adminsatratveState();", "public boolean isHvacStateOn() {\r\n return hvacStateOn;\r\n }",...
[ "0.6679687", "0.6636879", "0.6407117", "0.638305", "0.638305", "0.6371223", "0.63531005", "0.6332375", "0.6230085", "0.62273014", "0.62041354", "0.6193686", "0.6035324", "0.6035324", "0.6035324", "0.6035324", "0.6035324", "0.6035324", "0.6035324", "0.6035324", "0.6002378", ...
0.0
-1
Indicates that the system is in Stay State
public void showStay();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BSState() {\r\n mIsEnteringState = false;\r\n mIsExitingState = false;\r\n }", "public String getSteetState() {\r\n\t\treturn steetState;\r\n\t}", "public Stay() {}", "public boolean isSetState()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned()...
[ "0.64655113", "0.63877267", "0.6279863", "0.62093717", "0.61574316", "0.60951704", "0.6078379", "0.60770327", "0.6071013", "0.60498565", "0.6046187", "0.6008881", "0.5951216", "0.59499156", "0.59214824", "0.59155244", "0.59155244", "0.59155244", "0.59155244", "0.59155244", "0...
0.57956845
30
Indicate that the system is ready to arm
public void showReady();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isReady();", "public boolean isReady();", "public boolean ready();", "public abstract void ready();", "boolean isReady();", "boolean isReady();", "boolean isReady();", "public void setReady() {\n this.isReady = true;\n }", "void isReady();", "void isReady();", "public v...
[ "0.7221093", "0.7221093", "0.72210693", "0.71684986", "0.70799655", "0.70799655", "0.70799655", "0.7009668", "0.69383866", "0.69383866", "0.68487114", "0.67734426", "0.67686486", "0.6765149", "0.6750652", "0.6746218", "0.67364323", "0.67260164", "0.67260164", "0.6723496", "0....
0.62746155
48
Indicate that the system is unready to arm
public void showUnready();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testReadyNoDevices() {\n\t\tModel contact = addContactSensor(true, false);\n\t\tstageDisarmed(addressesOf(contact));\n\t\tremoveModel(contact);\n\t\t\n\t\talarm.bind(context);\n\t\tassertInactive();\n\t}", "public void arm_kill() {\n arm_analog(0);\n }", "public void off() {\n\t\...
[ "0.6782904", "0.65449476", "0.65293145", "0.6387494", "0.62084186", "0.61326075", "0.60995674", "0.60258436", "0.60193825", "0.59904176", "0.5987846", "0.59821004", "0.5920634", "0.59126806", "0.591056", "0.590687", "0.5906324", "0.5886618", "0.5886618", "0.58707404", "0.5859...
0.60895354
7
Indicate that the system is arming
public void showArming();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testArming() {\n\t\tModel contact = addContactSensor(true, false);\n\t\tstageArming(SecuritySubsystemCapability.ALARMMODE_ON, addressesOf(contact));\n\n\t\talarm.bind(context);\n\t\tassertArming(addressesOf(contact));\n\t}", "public boolean isShivering();", "@Test\n\tpublic void testArming...
[ "0.6648601", "0.6215199", "0.6197531", "0.6136524", "0.60414445", "0.6031099", "0.59770113", "0.59373367", "0.5891363", "0.58691883", "0.586361", "0.58582366", "0.58564526", "0.57893425", "0.5777483", "0.57327604", "0.56970626", "0.5695899", "0.56943274", "0.5664684", "0.5620...
0.62061685
2
Indicate that the system is disarmed
public void showDisarmed();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void indicateNot() {\r\n notIndicated = true;\r\n }", "public void emergencyStopIssued()\n {\n // Default implementation does nothing\n }", "@Override\n\tpublic void canTakeOff() {\n\t\tSystem.out.println(\"I CANNOT TAKE OFF UNLESS YA JUMP ME OVER SOMMAT\");\n\t}", "public voi...
[ "0.6569749", "0.6225283", "0.6191862", "0.6062794", "0.6042137", "0.58960754", "0.5878808", "0.587196", "0.5826104", "0.58259344", "0.5801839", "0.5773157", "0.57682896", "0.5755914", "0.57305694", "0.5728241", "0.570212", "0.56794405", "0.56792545", "0.56737095", "0.5670267"...
0.749385
0
Indicate that the system is breach
public void showBreach();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void breach();", "SecurityBreach isSecurityBreach(SecurityEvent event);", "boolean getHealthy();", "boolean isBadCommunication();", "int getBattlesWon();", "int getHappiness();", "public void doLimitBreach(Gamepad gamepad) {\n\t\tenablePID(false);\n\t\n\t\tif (gamepad.getTrigger(Constants.BUTTON_LT)) {...
[ "0.7042424", "0.633167", "0.61969244", "0.6044353", "0.5929144", "0.592902", "0.5903434", "0.5814818", "0.57966125", "0.5766667", "0.57151836", "0.57095593", "0.56523323", "0.5633013", "0.56295586", "0.56292343", "0.55990463", "0.5595263", "0.55922246", "0.5574308", "0.556308...
0.65704215
1
Indicate that the system is triggered
public void showTriggered();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean triggered() {\n\t\treturn true;\n\t}", "void trigger();", "public abstract void onTrigger();", "public void triggerEvent() {\n\t\ts.changeOpenState();\n\t\ts.setChangedAndNotify();\n\t\t\n\t}", "boolean isAlreadyTriggered();", "@Override\n\tprotected boolean on_trigger_activated(String tr...
[ "0.72421414", "0.71166605", "0.6971969", "0.65704", "0.6532152", "0.6414022", "0.6364853", "0.63335466", "0.63333195", "0.6250827", "0.6234696", "0.6234348", "0.62136716", "0.6212196", "0.6152001", "0.61301786", "0.612843", "0.61066985", "0.61041224", "0.60996294", "0.6093752...
0.67403436
3
prompts user for password when cancel pressed
public void showPasswordPrompt();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean promptPassword(String message) \r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}", "@Override\r\n\t\tpublic boolean promptPassword(String message) {\n\t\t\treturn false;\r\n\t\t}", "private void cancel(){\n\t\trefreshInformationsFromTableView(null);\n\t\thidePassword();\n\t\tclearFields();\n\t\tchangeCa...
[ "0.70127636", "0.6886497", "0.66356", "0.6559558", "0.6500592", "0.6383825", "0.63509953", "0.6229988", "0.62218887", "0.6176229", "0.61296844", "0.61239886", "0.610967", "0.60953844", "0.60535985", "0.60135573", "0.5986581", "0.59635854", "0.59598535", "0.592181", "0.5918261...
0.73150307
0
// / Player Choices Control //
public void setLastActionOfPlayer(String lastActionOfPlayer) { this.lastActionOfPlayer = lastActionOfPlayer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PlayerChoicePick getNextPlayerChoicePick();", "Player getSelectedPlayer();", "private void setupPlayers() {\n\t\tuserData=(UserData) Main.currentStage.getUserData();\n\t\tnumberPlayers=userData.getNumberPlayers();\n\t\tplayerNames=userData.getPlayerNames();\n\t\tcurrentPlayer=userData.getFirstPlayer();\...
[ "0.66814595", "0.65040654", "0.6459093", "0.64105916", "0.6383685", "0.63787115", "0.6367368", "0.631619", "0.63002163", "0.62797856", "0.6216433", "0.6171257", "0.6129248", "0.6100858", "0.6062852", "0.60507226", "0.6020108", "0.60191745", "0.5996738", "0.59784746", "0.59680...
0.0
-1
retrieve player object from UI, and put it as current player turn for all functions.
public void setSelectedTerritoryForTurn(Territory selectedTerritory) { selectedTerritoryByPlayer = selectedTerritory; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Player getPlayerInTurn();", "private void switchPlayer() {\n Player player;\n playerManager.switchPlayer();\n\n if(playerManager.getCurrentPlayer() == 1)\n player = playerManager.getPlayer(1);\n else if(playerManager.getCurrentPlayer() == 2)\n player = pla...
[ "0.7178392", "0.703663", "0.6891904", "0.6891904", "0.68358904", "0.6774129", "0.6764137", "0.6755734", "0.67281365", "0.6723722", "0.66932565", "0.66805655", "0.66516775", "0.66235673", "0.65744317", "0.6567608", "0.6567608", "0.65658635", "0.6454032", "0.6445885", "0.644356...
0.0
-1
retrieve amount of required units, create them in selectedArmyForce,and decrement the price from player
public void buyUnits(Unit unit, int amount) { int unitPrice; if(selectedArmyForce == null) { selectedArmyForce = new Army(); } for(int i=0;i<amount;i++) { Unit unitToAdd = new Unit(unit.getType() , unit.getRank() , unit.getPurchase() , unit.getMaxFirePower() , unit.getCompetenceReduction()); selectedArmyForce.addUnit(unitToAdd); } unitPrice= unit.getPurchase()*amount; currentPlayerTurn.decrementFunds(unitPrice); eventListener.addEventObject(new PlayerEvent(currentPlayerTurn.getPlayerName(),EventNamesConstants.UnitsBuying)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void buyFuel() {\n this.fuelMod++;\n fuelMax += +750 * fuelMod;\n }", "public void consumeFuel(double amount);", "public void buyFuelGainMultiply() {\n this.fuelGainMultiply++;\n }", "public void buyFuelUpgrades()\n {\n if(play_state.getMoney() >= fuel_upgrade_cost...
[ "0.62853223", "0.62399596", "0.6019401", "0.60150266", "0.5964053", "0.59383", "0.5896515", "0.58269805", "0.5782465", "0.5775762", "0.57715285", "0.57712996", "0.5733388", "0.5715543", "0.571376", "0.57131183", "0.5707877", "0.570079", "0.56696385", "0.5662202", "0.56365347"...
0.54131633
57
retrieve selectedArmyForce to the selectedTerritory
public void transformSelectedArmyForceToSelectedTerritory() { selectedTerritoryByPlayer.getConquerArmyForce().uniteArmies(selectedArmyForce); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isSelectedArmyForceBigEnough() {\n return selectedArmyForce.getTotalPower() >= selectedTerritoryByPlayer.getArmyThreshold();\n }", "public Controllable getSelected()\r\n\t{\r\n\t\t//update army\r\n\t\tif(this.rallyPoint.getSelectedLeaf() != this.selectedRally)\r\n\t\t{\r\n\t\t\tthis.se...
[ "0.59333646", "0.5876536", "0.5799618", "0.5485555", "0.4989468", "0.4961682", "0.468254", "0.46706796", "0.46559858", "0.464153", "0.4596595", "0.45928717", "0.45673594", "0.45090294", "0.45004886", "0.4498623", "0.44682178", "0.44601133", "0.4420846", "0.44169396", "0.44126...
0.7135095
0
Rehabilitation of selected territory army
public void rehabilitateSelectedTerritoryArmy(){ int rehabilitationPrice =getRehabilitationArmyPriceInTerritory(selectedTerritoryByPlayer); currentPlayerTurn.decrementFunds(rehabilitationPrice); selectedTerritoryByPlayer.rehabilitateConquerArmy(); eventListener.addEventObject(new PlayerEvent(currentPlayerTurn.getPlayerName(),EventNamesConstants.ArmyRehabilitation)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getRehabilitationArmyPriceInTerritory(Territory territory){\n return territory.getRehabilitationArmyPriceInTerritory();\n }", "@Override\r\n public void placeArmy(Integer reinforcementArmy) {\r\n\r\n Integer currentPlayerID = playerID;\r\n HashSet<String> conqueredCountryByT...
[ "0.58239293", "0.57566714", "0.5535377", "0.54474294", "0.5405059", "0.53958416", "0.53243494", "0.52579975", "0.5230279", "0.522845", "0.5150503", "0.5130574", "0.51044786", "0.5082419", "0.5076014", "0.5057463", "0.50340164", "0.49589413", "0.49340874", "0.49262714", "0.492...
0.70444876
0
// / Rounds Management //
public void startGame() { loadPlayersIntoQueueOfTurns(); nextPlayerInTurn(); eventListener.addEventObject(new RoundEvent(EventNamesConstants.GameStarted)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int numRounds() {\n\t\treturn numRounds;\n\t}", "public int getRoundNum(){\n return gameRounds;\n }", "public interface Sounds {\n// void add();\n void setBackgroundSound(String filepath, LoadMode loadMode);\n void setSound(String key, String filepath, LoadMode loadMode);\n ...
[ "0.6418547", "0.62243897", "0.61925423", "0.6133815", "0.60294724", "0.5909742", "0.5828517", "0.58200186", "0.58038855", "0.5791486", "0.5782112", "0.5676415", "0.56677675", "0.5654957", "0.5585613", "0.55790263", "0.5566661", "0.54806787", "0.5448733", "0.5421033", "0.53974...
0.0
-1
Load players list into empty queue of turns
private void updateTurnsObjectQueue() { while(!playersTurns.isEmpty()) playersTurns.poll(); loadPlayersIntoQueueOfTurns(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void loadPlayersIntoQueueOfTurns() {\n if(roundNumber == 1) eventListener.addEventObject(new RoundEvent(EventNamesConstants.GameStarted));\n if(gameDescriptor.getPlayersList() != null) {\n playersTurns.addAll(gameDescriptor.getPlayersList());\n }\n else\n S...
[ "0.83493274", "0.7327358", "0.6513828", "0.6258388", "0.6226713", "0.61212695", "0.61007553", "0.60993433", "0.60743517", "0.6033314", "0.5997995", "0.59915316", "0.59703594", "0.5958623", "0.5897988", "0.5858509", "0.58163416", "0.5811735", "0.5808449", "0.5793495", "0.57865...
0.7598392
1
load information of previous turn, after undo use
private void updateGameDescriptorAfterUndo() { roundNumber = roundsHistory.peek().getRoundNumber(); gameDescriptor.setTerritoryMap(roundsHistory.peek().getCopyOfMap()); //This Set the gameDescriptor Territories as copy gameDescriptor.setPlayersList(roundsHistory.peek().getCopyOfPlayersList()); //This Set the gameDescriptor players as copy updateTurnsObjectQueue(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void currentStateRestoreFromSharedPref() {\n sharedPreferences = getPreferences(MODE_PRIVATE);\n int key1DeffaultValue = -1;\n key1OfActiveChallenge = sharedPreferences.getInt(\"key1OfActiveChallenge\", key1DeffaultValue);\n nameOfCurrentChallenge = sharedPreferences.getString(\...
[ "0.6443133", "0.6403659", "0.6344529", "0.63325983", "0.6297429", "0.6268328", "0.62661386", "0.62080294", "0.615813", "0.61395556", "0.61395556", "0.61395556", "0.61335766", "0.613109", "0.6125629", "0.608812", "0.608812", "0.60293996", "0.6017789", "0.6003907", "0.5961881",...
0.65463084
0
retrieve all maps from rounds history by there right order from begging
public Stack<Map<Integer, Territory>> getMapsHistoryByOrder() { Stack<Map<Integer,Territory>> mapsHistoryByOrder = new Stack<>(); roundsHistory.forEach(roundHistory -> mapsHistoryByOrder.push(roundHistory.getMapHistory())); return mapsHistoryByOrder; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Iterable<Entry<K, V>> snapShot(int startIndex, K stop) {\n\t\tDoublyLinkedList<Entry<K, V>> buffer = new DoublyLinkedList<>();\n\t\tint j = startIndex;\n\t\twhile ( j < map.size() && (stop == null || stop.compareTo(map.get(j).getKey()) > 0 )) {\n\t\t\tbuffer.addLast(map.get(j++));\n\t\t}\n\t\treturn buffer...
[ "0.5366347", "0.5348954", "0.5275248", "0.5205708", "0.51960653", "0.5191788", "0.51795703", "0.517925", "0.517847", "0.51412416", "0.51330245", "0.5125365", "0.5109319", "0.50796974", "0.50375724", "0.50360495", "0.5027603", "0.50244665", "0.5012753", "0.501212", "0.50114244...
0.7311932
0
retrieve players list into queue of turns
private void loadPlayersIntoQueueOfTurns() { if(roundNumber == 1) eventListener.addEventObject(new RoundEvent(EventNamesConstants.GameStarted)); if(gameDescriptor.getPlayersList() != null) { playersTurns.addAll(gameDescriptor.getPlayersList()); } else System.out.println("NULL"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateTurnsObjectQueue() {\n while(!playersTurns.isEmpty())\n playersTurns.poll();\n loadPlayersIntoQueueOfTurns();\n }", "public void fillPlayerQueue() {\r\n for (Player p : this.players) {\r\n if (p.getLife() > 0) {\r\n this.ordering.add(p);\r\n ...
[ "0.7415195", "0.67317843", "0.66923463", "0.6532764", "0.6509393", "0.6489511", "0.6461827", "0.6308516", "0.6263183", "0.6208915", "0.6190007", "0.6146332", "0.6128143", "0.6098543", "0.60302126", "0.59911704", "0.5987717", "0.5946095", "0.59263873", "0.59254766", "0.5923898...
0.788073
0
poll player from the queue and save him as current player for one turn
public void nextPlayerInTurn() { currentPlayerTurn= playersTurns.poll(); if (currentPlayerTurn != null) { eventListener.addEventObject(new PlayerEvent(currentPlayerTurn.getPlayerName(),EventNamesConstants.PlayerTurnArrived)); currentPlayerName = currentPlayerTurn.getPlayerName(); } else { currentPlayerName = "None"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void nextPlayer() {\n\t\tif (currentPlayer.equals(vServerThread.get(0))){\n\t\t\tcurrentPlayer=vServerThread.get(1);\n\t\t} else if (currentPlayer.equals(vServerThread.get(1))){\n\t\t\tcurrentPlayer=vServerThread.get(0);\n\t\t}\n\t}", "public void flushQueue() {\n // Ignore if queue is empty\n ...
[ "0.6807085", "0.6704196", "0.6648894", "0.63610643", "0.6215596", "0.6178466", "0.6141758", "0.6098479", "0.60413903", "0.6013115", "0.5962538", "0.5916398", "0.5916398", "0.5902153", "0.5870482", "0.58560526", "0.578912", "0.5765706", "0.5755779", "0.5738049", "0.5703395", ...
0.6852539
0
returns potential production of the current player turn gives current player his funds, for his territories profits
private void harvestProduction(Player player) { player.incrementFunds(calculatePotentialProduction(player)); eventListener.addEventObject(new PlayerEvent(player.getPlayerName(),EventNamesConstants.FundsIncrement)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getCurrentPlayerFunds(){return currentPlayerTurn.getFunds();}", "@Override\n public double grantOrRefund(Player player) {\n Map<Commodity, Double> result = wants.stream()\n .collect(Collectors.toMap(Function.identity(), want -> want.grantOrRefund(player)));\n\n Map.Entr...
[ "0.64496005", "0.6262989", "0.6181538", "0.6080348", "0.6069368", "0.60175925", "0.6014238", "0.60018945", "0.59925854", "0.5976198", "0.59668314", "0.5946426", "0.5910482", "0.5903818", "0.58641094", "0.58247626", "0.58118355", "0.57648855", "0.57511157", "0.574831", "0.5725...
0.56464136
26
reduce competence of current player units and clean off the dead units
private void updateTerritoriesHold(Player player) { getTerritories(player) .forEach(Territory::reduceCompetence); getTerritories(player).stream() .filter(Territory::isArmyTotalPowerUnderThreshold) .forEach(this::releaseTerritory); //Territory::eliminateThisWeakArmy); //activateEventsHandler(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void update()\r\n\t{\r\n\t\tList<Unit> deadButNotFinished = new ArrayList<Unit>();\r\n\t\t//first check for dead units\r\n\t\tfor(int i = 0; i < units.size();)\r\n\t\t\tif(units.get(i).getState() == MapItemState.Dead && units.get(i).finished()) {\r\n\t\t\t\towner.notifySweepAndPruneUnitRemoved(units.remove(...
[ "0.6883998", "0.6199375", "0.6190699", "0.61527866", "0.6052015", "0.60271347", "0.59860885", "0.5936296", "0.59093815", "0.5905012", "0.5887165", "0.58522946", "0.582852", "0.580703", "0.57973063", "0.5784125", "0.57804173", "0.5765994", "0.5763763", "0.57621884", "0.5760259...
0.59651566
7
pop the last round history from the history stack, and call updates function
public void roundUndo() { roundsHistory.pop(); updateGameDescriptorAfterUndo(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void back () {\r\n if (backHistory.size() > 1) {\r\n forwardHistory.addFirst(current);\r\n current = backHistory.getLast();\r\n backHistory.removeLast();\r\n }\r\n }", "public void popState();", "private void printHistoryReverse()\r\n\t{\r\n\t\tStack tem...
[ "0.65609944", "0.632044", "0.6286241", "0.6234459", "0.61732596", "0.61682963", "0.6112463", "0.6110716", "0.60338485", "0.59433633", "0.5905632", "0.5897718", "0.58843136", "0.5880528", "0.5853356", "0.5812137", "0.58056885", "0.58044326", "0.58001655", "0.5799947", "0.57811...
0.58104956
16
load history of round into the stack,update the queue of players turns
public void endOfRoundUpdates() { roundsHistory.push(new RoundHistory(gameDescriptor,++roundNumber)); loadPlayersIntoQueueOfTurns(); //activateEventsHandler(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void loadPlayersIntoQueueOfTurns() {\n if(roundNumber == 1) eventListener.addEventObject(new RoundEvent(EventNamesConstants.GameStarted));\n if(gameDescriptor.getPlayersList() != null) {\n playersTurns.addAll(gameDescriptor.getPlayersList());\n }\n else\n S...
[ "0.69964474", "0.66274303", "0.62732923", "0.6099492", "0.60094076", "0.59175384", "0.58497334", "0.5750541", "0.5691576", "0.56135255", "0.56028914", "0.55980694", "0.5593125", "0.556629", "0.5561553", "0.5558048", "0.5536628", "0.552027", "0.55140334", "0.54949117", "0.5486...
0.7081583
0