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
Adds to the List by treating List as a Set. Thus adds only if not already exists in the List and avoids duplication. See appendToFollowedUsers to append to List.
public void addToFollowedUsers(List<String> followedUsers);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addToFollowedUsers(String followedUsers);", "public void appendToFollowedUsers(List<String> followedUsers);", "private void addUsers(List<String> userList, SubscriptionList subscriptionList, SubscriptionEventType eventType) {\n\t\tSubscription subscription = null;\n\t\t\n\t\tfor (Subscription s : s...
[ "0.6288698", "0.6103035", "0.59049034", "0.58590764", "0.58510005", "0.58459604", "0.5731297", "0.57069993", "0.56788397", "0.56443924", "0.56068265", "0.5560373", "0.55530953", "0.5527138", "0.550113", "0.5498334", "0.54456526", "0.54409313", "0.54259574", "0.54085934", "0.5...
0.7035341
0
Removes all occurences of value from the List
public void removeFromFollowedUsers(String followedUsers);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeAllWithValue(v val) {\n\t\tfor (int i = 0; i < buckets.length; i++) {\n\t\t\tNode<k,v> curr = buckets[i];\n\t\t\tNode<k,v> previous = null;\n\t\t\t\n\t\t\twhile (curr != null) {\n\t\t\t\tif (curr.getValue().equals(val)) {\n\t\t\t\t\t\n\t\t\t\t\tif (previous == null) {\n\t\t\t\t\t\tbuckets[i] = cu...
[ "0.6947017", "0.6750947", "0.66021454", "0.6526514", "0.64638007", "0.64427745", "0.6360537", "0.61673343", "0.61351264", "0.6115447", "0.6097846", "0.606517", "0.60465765", "0.60458964", "0.6008555", "0.5999753", "0.59915566", "0.5950291", "0.5942454", "0.59411395", "0.59388...
0.0
-1
Removes all occurences of all values from the List
public void removeFromFollowedUsers(List<String> followedUsers);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void removeAllValues() {\n Map<String, ?> map = preferences.getAll();\n Iterator<String> iterator = map.keySet().iterator();\n while (iterator.hasNext()) {\n removeValue(iterator.next());\n }\n }", "protected void resetValues() {\n synchroni...
[ "0.6639631", "0.6507789", "0.63582087", "0.6356254", "0.63504463", "0.6336836", "0.6314781", "0.6314781", "0.6314781", "0.6314781", "0.6314781", "0.6314781", "0.6314781", "0.6314781", "0.6314781", "0.6314781", "0.6314781", "0.6314781", "0.6300363", "0.62967914", "0.6266169", ...
0.0
-1
Finds the winning player's score.
public int winningPlayerScore(LinkedList<Integer> player1Cards, LinkedList<Integer> player2Cards){ while (!player1Cards.isEmpty() && !player2Cards.isEmpty()){ int player1Move = player1Cards.poll(); int player2Move = player2Cards.poll(); if (player1Move > player2Move){ player1Cards.add(player1Move); player1Cards.add(player2Move); } else { player2Cards.add(player2Move); player2Cards.add(player1Move); } } if (player1Cards.isEmpty()) return countWinnerScore(player2Cards); else return countWinnerScore(player1Cards); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int whoWin(){\r\n int winner = -1;\r\n \r\n int highest = 0;\r\n \r\n for(Player player : discWorld.getPlayer_HASH().values()){\r\n if(getPlayerPoints(player) > highest){\r\n highest = getPlayerPoints(player);\r\n winner = player.ge...
[ "0.7590163", "0.74833477", "0.73805994", "0.72841465", "0.71532655", "0.71014184", "0.7094649", "0.7010742", "0.6957401", "0.6955533", "0.69344205", "0.6917168", "0.686574", "0.6833793", "0.68293333", "0.6827398", "0.6819881", "0.67935544", "0.67649555", "0.6761504", "0.67434...
0.0
-1
Counts the winner's score.
private int countWinnerScore(LinkedList<Integer> cards){ int size = cards.size(); return IntStream.range(0, size) .map(i -> cards.get(i) * (size - i)) .sum(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void updateScore(int winner)\n {\n if (winner == 0)\n {\n playerOneScore++;\n }\n else\n {\n playerTwoScore++;\n }\n }", "int getScoresCount();", "static int calculateScore(Card[] winnings) {\n int score = 0;\n ...
[ "0.76205844", "0.7286716", "0.7267946", "0.71182096", "0.70023614", "0.6947394", "0.6808398", "0.68029803", "0.67905205", "0.67491496", "0.672956", "0.6716588", "0.67119265", "0.6695638", "0.66560704", "0.6649394", "0.66332376", "0.6598745", "0.65980625", "0.65963686", "0.656...
0.6651363
16
If the request is a Set it is forwarded to all the servers and finally the response sent back to the client
private void sendSetRequest() { numOfSets++; type = "0"; numOfRecipients = servers.size(); for(ServerHandler s : servers) { s.send(this, input); } sendTime = System.nanoTime(); workerTime = sendTime - pollTime; for(ServerHandler s : servers) { String ricevuto = s.receive(); replies.add(ricevuto); } receiveTime = System.nanoTime(); processingTime = receiveTime - sendTime; for(String reply : replies) { if(!("STORED".equals(reply))) { unproperRequests.add(reply); sendBack(currentJob.getClient(), reply); replies.clear(); return; } } sendBack(currentJob.getClient(), "STORED"); replies.clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void processRequest(HttpServletRequest request, HttpServletResponse response) {\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n \n }", "protected void processRequest(HttpServletRe...
[ "0.58440787", "0.5732952", "0.5673409", "0.5663667", "0.56360644", "0.56325", "0.56188935", "0.5615135", "0.55872834", "0.5568843", "0.5567273", "0.5567273", "0.5564698", "0.55475676", "0.551116", "0.55021966", "0.55021966", "0.54968405", "0.5485822", "0.5485822", "0.547184",...
0.6588897
0
In case of a get request or multiget with no sharding, the message is sent only to one server while in case of multiget with sharding the request is split into multiple parts and forwarded to the servers. Lastly, the response is sent back to the client.
public void sendGetRequest() { String[] requests = this.input.substring(4, this.input.length()).split(" "); if(requests.length <= 1 || !(MyMiddleware.readSharded)){ numOfRecipients = 1; recipient = servers.get(loadBalance()); recipient.send(this, input); sendTime = System.nanoTime(); workerTime = sendTime - pollTime; if(requests.length <= 1) { numOfGets++; type= "10"; } else { numOfMultiGets++; type = requests.length+""; } String reply = recipient.receive(); receiveTime = System.nanoTime(); processingTime = receiveTime - sendTime; int hit = 0; hit += reply.split("VALUE").length - 1; miss += requests.length-hit; if(!(reply.endsWith("END"))) { unproperRequests.add(reply); sendBack(currentJob.getClient(), reply); return; } sendBack(currentJob.getClient(), reply); } else { numOfMultiGets++; type = requests.length+""; numOfRecipients = servers.size(); requestsPerServer = requests.length / servers.size(); remainingRequests = requests.length % servers.size() ; //The worker thread sends a number of requests to each server equal to requestsPerServer //and at most requestsPerServer + remainingRequests for(int i = 0; i < servers.size(); i++) { message = requestType; for(int j = 0; j < requestsPerServer; j++){ message += " "; message += requests[requestsPerServer*i+j]; if(i < remainingRequests) { message += " "; message += requests[requests.length - remainingRequests + i]; } } servers.get(i).send(this, message); } sendTime = System.nanoTime(); workerTime = sendTime - pollTime; int hit = 0; for(ServerHandler s : servers) { String ricevuto = s.receive(); hit += ricevuto.split("VALUE").length - 1; replies.add(ricevuto); } receiveTime = System.nanoTime(); processingTime = receiveTime - sendTime; miss += requests.length-hit; finalReply = ""; for(String reply : replies) { if(!(reply.endsWith("END"))) { unproperRequests.add(reply); sendBack(currentJob.getClient(), reply); replies.clear(); return; } else { reply = reply.substring(0, reply.length() - 3); finalReply += reply; } } finalReply += "END"; sendBack(currentJob.getClient(), finalReply); replies.clear(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public synchronized MRPublisherResponse sendBatchWithResponse() {\n if (fPending.isEmpty()) {\n pubResponse.setResponseCode(String.valueOf(HttpStatus.SC_BAD_REQUEST));\n pubResponse.setResponseMessage(\"No Messages to send\");\n return pubResponse;\n }\n\n fina...
[ "0.5735244", "0.56612563", "0.5537455", "0.5431977", "0.54246646", "0.54198784", "0.5354361", "0.5335621", "0.5296982", "0.5266819", "0.5237736", "0.5228639", "0.5203264", "0.5192412", "0.51825917", "0.5163583", "0.5150771", "0.5143727", "0.5129788", "0.51255345", "0.5103304"...
0.65785855
0
This is where the message is sent back to the client that made that request
public void sendBack(SelectionKey key, String message) { socketChannel = (SocketChannel) key.channel(); message += "\r\n"; buffer = CharBuffer.wrap(message); while (buffer.hasRemaining()) { try { socketChannel.write(Charset.defaultCharset().encode(buffer)); } catch (IOException e) { e.printStackTrace(); } } Long x = System.nanoTime(); serviceTime = x - pollTime; responseTime = x - currentJob.queueEntranceTime; timeInSystem = x - currentJob.timeOfArrival; times.add(myNumber + "\t" + type + "\t" + queueTime + "\t" + workerTime +"\t" + processingTime +"\t" + serviceTime +"\t" + responseTime +"\t" + timeInSystem ); numOfRequests.incrementAndGet(); myNumOfRequests++; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void sendResponse() {\n\t\t\n\t}", "@Override\r\n\tprotected void processRespond() {\n\r\n\t}", "@Override\r\n\tprotected void processRespond() {\n\r\n\t}", "@Override\n\tpublic void sendResponse() {\n\n\t}", "private String requesttosend() throws IOException {\n\t\tsender.sendMsg(Const...
[ "0.66657746", "0.66162366", "0.66162366", "0.6600482", "0.655086", "0.65315664", "0.64456594", "0.64065605", "0.6400679", "0.6288801", "0.6276382", "0.6217163", "0.6108669", "0.6108333", "0.61052185", "0.6103342", "0.6102629", "0.60957295", "0.60902923", "0.608472", "0.605852...
0.0
-1
This is the function that is used to balance the load to the servers in case of a get or multiget without sharding
public int loadBalance() { serverCount++; serverCount = (serverCount) % (servers.size()); return serverCount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int round_robin()\n {\n current_server++;\n current_server%=tabServerssout.size();\n return current_server;\n }", "private boolean isLoadAcceptable(ServerName name) throws Exception {\n final int compactionQueueSize =\n queryJMXIntValue(name.getHostname() + \":\" + \"1...
[ "0.59445035", "0.573165", "0.5716255", "0.5554652", "0.5543585", "0.5492609", "0.53254694", "0.5272842", "0.52553064", "0.51974434", "0.51847637", "0.5129835", "0.51176304", "0.5093279", "0.50866985", "0.50773764", "0.50724775", "0.5068846", "0.50575584", "0.5035459", "0.5019...
0.6658676
0
TODO Autogenerated method stub
@Override public int insertAppInfo(AppInfo info) { return devAppInfoMapper.insertAppInfo(info); }
{ "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 int getId() { return id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void 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
/ Constructor Creates a new method signature matcher with a given name regex and a list of expected parameters as strings.
private MethodSignatureMatcher(@Nonnull String nameRegex, @Nullable @NonNullableElements String... parameters) { this.namePattern = Pattern.compile(nameRegex); if (parameters == null) { this.parameters = new String[0]; } else { this.parameters = parameters; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static @Nonnull MethodSignatureMatcher of(@Nonnull String nameRegex, @Nullable @NonNullableElements String... parameters) {\n return new MethodSignatureMatcher(nameRegex, parameters);\n }", "public static @Nonnull MethodSignatureMatcher of(@Nonnull String nameRegex, @Nullable @NonNullableElement...
[ "0.7936627", "0.7400418", "0.7317346", "0.570174", "0.5684067", "0.55630356", "0.53550595", "0.5292943", "0.52762264", "0.52221096", "0.52064717", "0.5185781", "0.5183425", "0.51470566", "0.51173645", "0.5091745", "0.5051839", "0.5040215", "0.5031635", "0.50270313", "0.502197...
0.7961313
0
Returns a method signature matcher with a given name regex and a list of expected parameters as classes.
public static @Nonnull MethodSignatureMatcher of(@Nonnull String nameRegex, @Nullable @NonNullableElements Class<?>... parameters) { final @Nonnull String[] typeNames; if (parameters == null) { typeNames = new String[0]; } else { typeNames = new String[parameters.length]; int i = 0; for (@Nonnull Class<?> parameter : parameters) { typeNames[i] = parameter.getCanonicalName(); i++; } } return new MethodSignatureMatcher(nameRegex, typeNames); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static @Nonnull MethodSignatureMatcher of(@Nonnull String nameRegex, @Nullable @NonNullableElements String... parameters) {\n return new MethodSignatureMatcher(nameRegex, parameters);\n }", "private MethodSignatureMatcher(@Nonnull String nameRegex, @Nullable @NonNullableElements String... parame...
[ "0.77055365", "0.71967053", "0.6976271", "0.5843866", "0.57793707", "0.5355819", "0.5290093", "0.5287338", "0.52480143", "0.5190466", "0.51872265", "0.5179396", "0.50872177", "0.5081536", "0.49613592", "0.4956851", "0.49404594", "0.49371397", "0.49339703", "0.49137136", "0.48...
0.7997634
0
Returns a method signature matcher for a given regular expression that matches the method name and a list of parameters as strings.
public static @Nonnull MethodSignatureMatcher of(@Nonnull String nameRegex, @Nullable @NonNullableElements String... parameters) { return new MethodSignatureMatcher(nameRegex, parameters); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static @Nonnull MethodSignatureMatcher of(@Nonnull String nameRegex, @Nullable @NonNullableElements Class<?>... parameters) {\n final @Nonnull String[] typeNames;\n if (parameters == null) {\n typeNames = new String[0];\n } else {\n typeNames = new String[parameter...
[ "0.7172949", "0.66571033", "0.66110325", "0.58118093", "0.57369757", "0.54848814", "0.5194658", "0.5179817", "0.5142829", "0.50478077", "0.5003304", "0.4980128", "0.4971662", "0.49621373", "0.49564922", "0.49185175", "0.47594088", "0.4756686", "0.47455233", "0.47433", "0.4739...
0.7449855
0
Returns a method signature matcher for a given regular expression that matches the method name.
public static @Nonnull MethodSignatureMatcher of(@Nonnull String nameRegex) { return new MethodSignatureMatcher(nameRegex, null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static @Nonnull MethodSignatureMatcher of(@Nonnull String nameRegex, @Nullable @NonNullableElements String... parameters) {\n return new MethodSignatureMatcher(nameRegex, parameters);\n }", "public static @Nonnull MethodSignatureMatcher of(@Nonnull String nameRegex, @Nullable @NonNullableElement...
[ "0.73999584", "0.6774991", "0.628718", "0.61412996", "0.51802677", "0.5152522", "0.5095589", "0.5023587", "0.5023587", "0.5017631", "0.49929002", "0.4963608", "0.4903004", "0.48907307", "0.48885226", "0.4884459", "0.4869874", "0.4860421", "0.48517135", "0.4847612", "0.4842651...
0.7540638
0
/ Matcher Checks whether the given object matches this method signature.
@Override public boolean evaluate(@Nonnull MethodInformation methodInformation) { boolean matches = namePattern.matcher(methodInformation.getName()).matches(); final @Nonnull @NonNullableElements List<? extends VariableElement> methodParameters = methodInformation.getElement().getParameters(); if (parameters.length == methodParameters.size()) { for (int i = 0; i < methodParameters.size(); i++) { final @Nonnull String nameOfDeclaredType = ProcessingUtility.getQualifiedName(methodParameters.get(i).asType()); ProcessingLog.debugging("name of type: $", nameOfDeclaredType); final @Nonnull String parameter = parameters[i]; if (!parameter.equals("?")) { matches = matches && nameOfDeclaredType.equals(parameter); } } } else { matches = false; } return matches; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Object isMatch(Object arg, String wantedType);", "private void assertIsMethod(SymObject object) {\n assertIsOfKind(object, SymObject.KIND_METHOD,\n object.name + \" can't be resolved to a method\");\n }", "public boolean accept(T object, String pattern);", "boolean isMethodMatch(@Non...
[ "0.6828164", "0.6288999", "0.6262719", "0.5915592", "0.58299315", "0.58299315", "0.58271277", "0.5789783", "0.5789281", "0.5631596", "0.56311154", "0.56184036", "0.55673707", "0.555237", "0.54732645", "0.54399633", "0.5430368", "0.53602624", "0.5308428", "0.5295531", "0.52923...
0.5063232
46
Setup the mapper for all of our beans. Only fields having non identical names need mapping if we also use byDefault() following.
protected final void configure(final MapperFactory factory) { factory.classMap(Case.class, CaseDTO.class).byDefault().register(); factory.classMap(Case.class, CaseDetailsDTO.class).byDefault().register(); factory .classMap(CaseGroup.class, CaseGroupDTO.class) .field("status", "caseGroupStatus") .byDefault() .register(); factory.classMap(CaseEvent.class, CaseEventDTO.class).byDefault().register(); factory .classMap(Category.class, CategoryDTO.class) .field("categoryName", "name") .byDefault() .register(); factory.classMap(Response.class, ResponseDTO.class).byDefault().register(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ResultSetMapper() {\n registerAttributeConverters();\n this.fieldNamingStrategy = new IdentityFieldNamingStrategy();\n logger.info(\"No specific field naming strategy has been set. It will default to the {} field naming strategy.\", this.fieldNamingStrategy);\n }", "public ObjectMa...
[ "0.6463802", "0.62447935", "0.58162427", "0.574806", "0.5740074", "0.5710037", "0.56981647", "0.5697858", "0.56382334", "0.5635797", "0.56280565", "0.56207985", "0.56186223", "0.56127876", "0.5610656", "0.5546792", "0.55455154", "0.5514388", "0.55096316", "0.549059", "0.54537...
0.5730455
5
There is confusion about whether ORPHANET IDs should be coded as ORPHA:1234 or ORPHANET:1234.
private String normalizeDiseaseId(String diseaseId) { String[] tokens = diseaseId.split(":"); if ("ORPHANET".equals(tokens[0])) { diseaseId = "ORPHA:" + tokens[1]; } return diseaseId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String mo10312id();", "java.lang.String getAoisId();", "private String setPartyId(String partyName){\n\n if (partyName.contains(\"REP\")) {\n return \"6\";\n }\n else if (partyName.contains(\"DEM\")) {\n return \"7\";\n }\n else {\n return \"1...
[ "0.5787606", "0.5710863", "0.55282795", "0.5403654", "0.53474814", "0.53442466", "0.5331341", "0.5207953", "0.51941454", "0.51939267", "0.5167249", "0.51551104", "0.5153578", "0.5134273", "0.50936085", "0.5086571", "0.5067396", "0.50414747", "0.5020425", "0.50138944", "0.5011...
0.55266684
3
TODO Autogenerated method stub
private void ViewMatching() { tx1 = (TextView) findViewById(R.id.k1); a1 = (TextView) findViewById(R.id.t1); a2 = (TextView) findViewById(R.id.t2); a3 = (TextView) findViewById(R.id.t3); a4 = (TextView) findViewById(R.id.t4); a5 = (TextView) findViewById(R.id.t5); a6 = (TextView) findViewById(R.id.t6); a7 = (TextView) findViewById(R.id.t7); c1 = (TextView) findViewById(R.id.n1); c2 = (TextView) findViewById(R.id.n2); c3 = (TextView) findViewById(R.id.n3); c4 = (TextView) findViewById(R.id.n4); c5 = (TextView) findViewById(R.id.n5); c6 = (TextView) findViewById(R.id.n6); c7 = (TextView) findViewById(R.id.n7); b1 = (Button) findViewById(R.id.ed); b2 = (Button) findViewById(R.id.ima); b1.setOnClickListener(this); b2.setOnClickListener(this); c1.setText("NAME : "); c2.setText("NICKNAME : "); c3.setText("CODE : "); c4.setText("SUB : "); c5.setText("TEL : "); c6.setText("E-MAIL : "); c7.setText("BUU : "); String p1 = getIntent().getStringExtra("dd1"); String p2 = getIntent().getStringExtra("dd2"); String p3 = getIntent().getStringExtra("dd3"); String p4 = getIntent().getStringExtra("dd4"); String p5 = getIntent().getStringExtra("dd5"); String p6 = getIntent().getStringExtra("dd6"); String p7 = getIntent().getStringExtra("dd7"); if(tx1!=null){ tx1.setText("SUWAPHIT KETKUN"); a1.setText(" Suwaphit Ketkun"); a2.setText(" Kai"); a3.setText(" 55410595"); a4.setText(" Information Technology"); a5.setText(" 088-5283660"); a6.setText(" pdan-gai@hotmail.com"); a7.setText(" Burapha University "); } if(p1!=null){ a1.setText(p1); a2.setText(p2); a3.setText(p3); a4.setText(p4); a5.setText(p5); a6.setText(p6); a7.setText(p7); } }
{ "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
The add service is called in order to Add the new user
@Path("/add") @POST @Produces("application/json") public String addUser( User user ) throws UnsupportedEncodingException { //Encrypting the given given password and storing it in the Db using Base64 //String encryptedpassword = Base64.getEncoder().encodeToString(user.getPwd().getBytes("utf-8")); //user.setPwd(encryptedpassword); return userService.addUser(user); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addUser(User user) {\n\t\t\r\n\t}", "public void addUser(User user);", "@Override\r\n\tpublic void add(User user) {\n\r\n\t}", "void addUser(User user);", "void addUser(User user);", "public void addUser(UserModel user);", "@Override\n\tpublic void add() {\n\n\t\tSystem.out.println(\"UserSe...
[ "0.818184", "0.8163103", "0.8081002", "0.80387706", "0.80387706", "0.7930233", "0.7901816", "0.78890866", "0.7674051", "0.76389205", "0.7547759", "0.75424445", "0.7487945", "0.7483409", "0.74649155", "0.7403103", "0.73843336", "0.7354895", "0.73515654", "0.73261464", "0.73230...
0.0
-1
Processes requests for both HTTP GET and POST methods.
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {\n final String method = req.getParameter(METHOD);\n if (GET.equals(method)) {\n doGet(req, resp);\n } else {\n resp.setStatus(HttpServletResponse.SC_METHOD_NOT_...
[ "0.7004024", "0.66585696", "0.66031146", "0.6510023", "0.6447109", "0.64421695", "0.64405906", "0.64321136", "0.6428049", "0.6424289", "0.6424289", "0.6419742", "0.6419742", "0.6419742", "0.6418235", "0.64143145", "0.64143145", "0.6400266", "0.63939095", "0.63939095", "0.6392...
0.0
-1
Handles the HTTP GET method.
@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void doGet( )\n {\n \n }", "@Override\n\tprotected void executeGet(GetRequest request, OperationResponse response) {\n\t}", "@Override\n\tprotected Method getMethod() {\n\t\treturn Method.GET;\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) thro...
[ "0.7589609", "0.71665615", "0.71148175", "0.705623", "0.7030174", "0.70291144", "0.6995984", "0.697576", "0.68883485", "0.6873811", "0.6853569", "0.6843572", "0.6843572", "0.6835363", "0.6835363", "0.6835363", "0.68195957", "0.6817864", "0.6797789", "0.67810035", "0.6761234",...
0.0
-1
Handles the HTTP POST method.
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String userName = request.getParameter("userName"); String password = request.getParameter("pass"); ControladorEmpleados co = new ControladorEmpleados(); if (co.verificarUserName(userName)) { Usuario usuario = co.obtenerUsuario(userName, password); HttpSession nuevoSession = request.getSession(true); nuevoSession.setAttribute("Usuario", usuario); if (usuario != null) { request.setAttribute("Usuario", usuario); switch (usuario.getArea().getCodigo()) { case Area.CONDIGO_CONTRATADOR: getServletContext().getRequestDispatcher("/Contratador/Home.jsp").forward(request, response); break; case Area.CONDIGO_FARMACEUTICO: getServletContext().getRequestDispatcher("/Farmacia/HomeFarmacia.jsp").forward(request, response); break; case Area.CONDIGO_CONSULTOR: getServletContext().getRequestDispatcher("/Recepcion/HomeRecepcion.jsp").forward(request, response); break; default: throw new AssertionError(); } } else { request.setAttribute("errorPassword", userName); RequestDispatcher dispatcher = request.getRequestDispatcher("/Inicio/Login.jsp"); dispatcher.forward(request, response); } } else { request.setAttribute("errorUserName", userName); RequestDispatcher dispatcher = request.getRequestDispatcher("/Inicio/Login.jsp"); dispatcher.forward(request, response); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void doPost(Request request, Response response) {\n\n\t}", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) {\n }", "public void doPost( )\n {\n \n }", "@Override\n public String getMethod() {\n return \"POST\";\n ...
[ "0.73289514", "0.71383566", "0.7116213", "0.7105215", "0.7100045", "0.70236707", "0.7016248", "0.6964149", "0.6889435", "0.6784954", "0.67733276", "0.67482096", "0.66677034", "0.6558593", "0.65582114", "0.6525548", "0.652552", "0.652552", "0.652552", "0.65229493", "0.6520197"...
0.0
-1
Returns a short description of the servlet.
@Override public String getServletInfo() { return "Short description"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getServletInfo()\n {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short d...
[ "0.87634975", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8699131", "0.8699131", "0.8699131", "0.8699131", "0.8699131", "0.8699131", "0.8531295", "0.8531295", "0.85282224", "0.85282224", ...
0.0
-1
Created by innobotlinux2 on 9/2/18.
public interface SpeedListener { void speedSelected(String speed); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "publi...
[ "0.5934391", "0.58535385", "0.5829747", "0.57764846", "0.5704619", "0.56892836", "0.5686215", "0.56797445", "0.56457436", "0.562489", "0.56150866", "0.56150866", "0.5606947", "0.5606947", "0.5606947", "0.5606947", "0.5606947", "0.5595542", "0.5585703", "0.55853623", "0.558319...
0.0
-1
Updates the Firebase Database with new information for the usernames TODO: check that update works on Firebase
private void update() { for (ArrayList<String> pair: list) { String username = pair.get(0); String val = pair.get(1); ref.child(username).setValue(val); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateUserInfo(String txtName) {\n\n FirebaseDatabase.getInstance().getReference().child(\"Users\").\n child(FirebaseAuth.getInstance().getCurrentUser().getUid())\n .addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n ...
[ "0.77359", "0.7319283", "0.7124128", "0.71096796", "0.7047744", "0.70388687", "0.7030874", "0.67454714", "0.6734476", "0.66731566", "0.65902233", "0.6590175", "0.6572434", "0.65494734", "0.6545922", "0.65298253", "0.65106994", "0.647168", "0.64594895", "0.64121836", "0.640142...
0.6888568
7
Export des factures clients
@Retryable( maxAttempts = Application.retry_max_attempt, backoff = @Backoff(delay = 5000)) @ResponseBody @ApiOperation(value = "Export des factures clients (quelque soit le lient si admin connecté, ses propres factures si client connecté)") @ApiResponses(value = { @ApiResponse(code = 401, message = "Vous devez être identifié pour effectuer cette opération"), @ApiResponse(code = 403, message = "Vous n'êtes pas autorisé à effectuer cette action (reservés aux admins ou opérateurs ayant droits, ou aux clients pour leurs propres factures)"), @ApiResponse(code = 200, message = "CSV des factures clients") }) @RequestMapping( produces = "application/json", value = "/factures/client/export", method = RequestMethod.GET) @CrossOrigin public ResponseEntity<byte[]> export( @ApiParam(value = "Date de début", required = true) @RequestParam("date_debut") String date_debut, @ApiParam(value = "Date de fin", required = true) @RequestParam("date_fin") String date_fin, @ApiParam(value = "Jeton JWT pour autentification", required = true) @RequestParam("Token") String token) throws Exception { // vérifie que le jeton est valide et que les droits lui permettent de consulter les admin katmars if (!jwtProvider.isValidJWT(token)) { throw new ResponseStatusException(HttpStatus.UNAUTHORIZED, "Jeton invalide, veuillez vous reconnecter."); } if (!SecurityUtils.admin(jwtProvider, token) && !SecurityUtils.client(jwtProvider, token) && !SecurityUtils.client_personnelWithDroit(jwtProvider, token, ClientPersonnelListeDeDroits.VOIR_FACTURES)) { throw new ResponseStatusException(HttpStatus.FORBIDDEN, "Vous n'avez pas le droit d'effectuer cette opération."); } Date dateDebut = new SimpleDateFormat("yyyy-MM-dd").parse(date_debut); Date dateFin = new SimpleDateFormat("yyyy-MM-dd").parse(date_fin); Calendar dateMin = new GregorianCalendar(); dateMin.setTime(dateDebut); dateMin.set(Calendar.HOUR_OF_DAY, 0); dateMin.set(Calendar.MINUTE, 0); dateMin.set(Calendar.SECOND, 0); Calendar dateMax = new GregorianCalendar(); dateMax.setTime(dateFin); dateMax.set(Calendar.HOUR_OF_DAY, 23); dateMax.set(Calendar.MINUTE, 59); dateMax.set(Calendar.SECOND, 59); String order_column_bdd = "createdOn"; String sort_bdd = "asc"; Integer numero_page = 0; Integer length = 999999; // filtrage par date Specification spec = new Specification<ActionAudit>() { public Predicate toPredicate(Root<ActionAudit> root, CriteriaQuery<?> query, CriteriaBuilder builder) { List<Predicate> predicates = new ArrayList<Predicate>(); predicates.add(builder.greaterThanOrEqualTo(root.get(order_column_bdd), dateMin.getTime())); predicates.add(builder.lessThanOrEqualTo(root.get(order_column_bdd), dateMax.getTime())); return builder.and(predicates.toArray(new Predicate[predicates.size()])); } }; // filtre par client si c'est demandé par un client if (SecurityUtils.client(jwtProvider, token)) { Client client = clientService.getByUUID(jwtProvider.getClaimsValue("uuid_client", token), jwtProvider.getCodePays(token)); if (client != null) { Specification spec2 = new Specification<ActionAudit>() { public Predicate toPredicate(Root<ActionAudit> root, CriteriaQuery<?> query, CriteriaBuilder builder) { List<Predicate> predicates = new ArrayList<Predicate>(); predicates.add(builder.equal(root.get("client"), client)); return builder.and(predicates.toArray(new Predicate[predicates.size()])); } }; spec = spec.and(spec2); } } // préparation les deux requêtes (résultat et comptage) Page<FactureClient> leads = factureClientService.getAllPagined(order_column_bdd, sort_bdd, numero_page, length, spec); // convertion liste en excel byte[] bytesArray = null; // convertion en facture minimal (pour éviter d'avoir tous les attributs) si client if (SecurityUtils.client(jwtProvider, token)) { List<FactureClientMinimal> factures_clents_minimal = new ArrayList<FactureClientMinimal>(); for (FactureClient facture_client : leads.getContent()) { factures_clents_minimal.add(new FactureClientMinimal(facture_client)); } Map<String, String> entetes_a_remplacer = new HashMap<String, String>(); entetes_a_remplacer.put("/dateFacture", "Date de Facturation"); entetes_a_remplacer.put("/numeroFacture", "Numéro de Facture"); entetes_a_remplacer.put("/listeOperations", "Liste des opérations"); entetes_a_remplacer.put("/montantHT", "Montant HT"); entetes_a_remplacer.put("/remisePourcentage", "Remise (%)"); entetes_a_remplacer.put("/montantTVA", "Montant TVA"); entetes_a_remplacer.put("/montantTTC", "Montant TTC"); entetes_a_remplacer.put("/netAPayer", "Net à payer"); bytesArray = exportExcelService.export(new PageImpl<>(factures_clents_minimal), entetes_a_remplacer); } else { bytesArray = exportExcelService.export(leads, null); } // audit actionAuditService.exportFacturesClient(token); return ResponseEntity.ok() //.headers(headers) // add headers if any .contentLength(bytesArray.length) .contentType(MediaType.parseMediaType("application/vnd.ms-excel")) .body(bytesArray); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface CatalogueClient {\n\n\tList<Exoplanet> getCatalogue();\n\n}", "public interface InterfaceServeurClient extends Remote {\n\n\tpublic void setServeur(InterfaceServeurClient serveur) throws RemoteException;\n\tpublic void setListeClient(ArrayList<InterfaceServeurClient> client) throws RemoteExcepti...
[ "0.6245055", "0.59037566", "0.5770427", "0.5740088", "0.57279456", "0.55995804", "0.5593891", "0.5593236", "0.5586776", "0.55713964", "0.55461013", "0.5542856", "0.5539031", "0.5513214", "0.55081856", "0.5501535", "0.5482997", "0.54575336", "0.5455763", "0.54509604", "0.54336...
0.58972704
2
Liste des factures clients
@Retryable( maxAttempts = Application.retry_max_attempt, backoff = @Backoff(delay = 5000)) @ApiOperation(value = "Liste des factures clients") @ApiResponses(value = { @ApiResponse(code = 401, message = "Vous devez être identifié pour effectuer cette opération"), @ApiResponse(code = 403, message = "Vous n'êtes pas autorisé à effectuer cette action (uniquement les admin ou opérateurs ayant droits)"), @ApiResponse(code = 200, message = "Liste des actions retournées (au format datatable - contenu dans data, nombre total dans recordsTotal)", response = MapDatatable.class) }) @ResponseBody @RequestMapping( produces = "application/json", value = "/factures/client", method = RequestMethod.POST) @CrossOrigin public ResponseEntity<Object> get_factures_clients( @ApiParam(value = "Critères de recherche (tri, filtre, etc) au format Datatable", required = true) @RequestBody MultiValueMap postBody, @ApiParam(value = "Jeton JWT pour autentification", required = true) @RequestHeader("Token") String token) throws JsonProcessingException { // vérifie que le jeton est valide et que les droits lui permettent de consulter les admin katmars if (!jwtProvider.isValidJWT(token)) { throw new ResponseStatusException(HttpStatus.UNAUTHORIZED, "Jeton invalide, veuillez vous reconnecter."); } if (!SecurityUtils.adminOrOperateurWithDroit(jwtProvider, token, OperateurListeDeDroits.CONSULTER_FACTURES_CLIENT) && !SecurityUtils.client(jwtProvider, token) && !SecurityUtils.client_personnelWithDroit(jwtProvider, token, ClientPersonnelListeDeDroits.VOIR_FACTURES)) { throw new ResponseStatusException(HttpStatus.FORBIDDEN, "Vous n'avez pas le droit d'effectuer cette opération."); } // paramètres du datatable String draw = postBody.getFirst("draw").toString(); Integer length = Integer.valueOf(postBody.getFirst("length").toString()); // tri, sens et numéro de page String colonneTriDefaut = "numeroFacture"; List<String> colonnesTriAutorise = Arrays.asList("createdOn", "montantHT", "numeroFacture", "montantTTC", "dateFacture"); String order_column_bdd = DatatableUtils.getOrderColonne(colonneTriDefaut, colonnesTriAutorise, postBody); String sort_bdd = DatatableUtils.getSort(postBody); Integer numero_page = DatatableUtils.getNumeroPage(postBody, length); // filtrage List<String> colonnesFiltrageActive = Arrays.asList("listeOperations", "createdOn", "numeroFacture"); ParentSpecificationsBuilder builder = new OperationSpecificationsBuilder(); Specification spec_general = DatatableUtils.buildFiltres(colonnesFiltrageActive, postBody, builder, null); if (spec_general == null) { spec_general = Specification.where(DatatableUtils.buildFiltres(colonnesFiltrageActive, postBody, builder, null)); } // filtrage par date de création spec_general = DatatableUtils.fitrageDate(spec_general, postBody, "createdOn", "createdOn"); spec_general = DatatableUtils.fitrageDate(spec_general, postBody, "dateFacture", "dateFacture"); spec_general = DatatableUtils.fitrageEntier(spec_general, postBody, "montantHT", "montantHT"); spec_general = DatatableUtils.fitrageEntier(spec_general, postBody, "montantTTC", "montantTTC"); // filtre par expéditeur dans datatable (si admin ou opérateur) Map<Integer, String> indexColumn_nomColonne = DatatableUtils.getMapPositionNomColonnes(postBody); Integer position_colonne = DatatableUtils.getKeyByValue(indexColumn_nomColonne, "client"); if (position_colonne != null) { String filtre_par_expediteur = postBody.getFirst("columns[" + position_colonne + "][search][value]").toString(); if (filtre_par_expediteur != null && !"".equals(filtre_par_expediteur.trim())) { Specification spec2 = new Specification<Operation>() { public Predicate toPredicate(Root<Operation> root, CriteriaQuery<?> query, CriteriaBuilder builder) { List<Predicate> predicates = new ArrayList<Predicate>(); Client expediteur = clientService.getByUUID(filtre_par_expediteur, jwtProvider.getCodePays(token)); if (expediteur != null) { predicates.add(builder.equal(root.get("client"), expediteur)); } return builder.and(predicates.toArray(new Predicate[predicates.size()])); } }; spec_general = spec_general.and(spec2); } } // surcharge du tri if (postBody.containsKey("sorting") && "desc".equals(postBody.getFirst("sorting").toString())) { sort_bdd = "desc"; } else if (postBody.containsKey("sorting") && "asc".equals(postBody.getFirst("sorting").toString())) { sort_bdd = "asc"; } // filtrage par es factures si c'ets un client if (SecurityUtils.client(jwtProvider, token)) { List<Predicate> predicates = new ArrayList<Predicate>(); Specification spec2 = new Specification<Operation>() { public Predicate toPredicate(Root<Operation> root, CriteriaQuery<?> query, CriteriaBuilder builder) { Client client = clientService.getByUUID(jwtProvider.getClaimsValue("uuid_client", token), jwtProvider.getCodePays(token)); predicates.add(builder.equal(root.get("client"), client)); return builder.and(predicates.toArray(new Predicate[predicates.size()])); } }; spec_general = spec_general.and(spec2); } // filtrage par pays kamtar Specification spec_pays = new Specification<ActionAudit>() { public Predicate toPredicate(Root<ActionAudit> root, CriteriaQuery<?> query, CriteriaBuilder builder) { List<Predicate> predicates = new ArrayList<Predicate>(); predicates.add(builder.equal(root.get("codePays"), jwtProvider.getCodePays(token))); return builder.and(predicates.toArray(new Predicate[predicates.size()])); } }; spec_general = spec_general.and(spec_pays); // préparation les deux requêtes (résultat et comptage) Page<FactureClient> leads = factureClientService.getAllPagined(order_column_bdd, sort_bdd, numero_page, length, spec_general); Long total = factureClientService.countAll(spec_general); actionAuditService.getFacturesClient(token); // prépare les résultast JSONArray jsonArrayOffres = new JSONArray(); if (leads != null) { jsonArrayOffres.addAll(leads.getContent()); } Map<String, Object> jsonDataResults = new LinkedHashMap<String, Object>(); jsonDataResults.put("draw", draw); jsonDataResults.put("recordsTotal", total); jsonDataResults.put("recordsFiltered", total); jsonDataResults.put("data", jsonArrayOffres); return new ResponseEntity<Object>(mapperJSONService.get(token).writeValueAsString(jsonDataResults), HttpStatus.OK); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tpublic List<Client> listeClient() {\n\t\t\treturn null;\n\t\t}", "public List BestClient();", "private void listaClient() {\n\t\t\r\n\t\tthis.listaClient.add(cliente);\r\n\t}", "public List<Clients> getallClients();", "public void printClientList(){\n for(String client : clientList){\...
[ "0.7558732", "0.75542516", "0.7386437", "0.73738164", "0.73117393", "0.72515625", "0.7198686", "0.7176428", "0.71606714", "0.7120051", "0.71196026", "0.7098093", "0.7092957", "0.70228404", "0.69810677", "0.69576395", "0.6932318", "0.68726504", "0.6853204", "0.68416375", "0.68...
0.0
-1
Liste des factures clients
@Retryable( maxAttempts = Application.retry_max_attempt, backoff = @Backoff(delay = 5000)) @ApiOperation(value = "Liste des factures clients") @ApiResponses(value = { @ApiResponse(code = 401, message = "Vous devez être identifié pour effectuer cette opération"), @ApiResponse(code = 403, message = "Vous n'êtes pas autorisé à effectuer cette action (uniquement les admin ou opérateurs ayant droits)"), @ApiResponse(code = 200, message = "Liste des actions retournées (au format datatable - contenu dans data, nombre total dans recordsTotal)", response = MapDatatable.class) }) @ResponseBody @RequestMapping( produces = "application/json", value = "/factures/client/liste", method = RequestMethod.POST) @CrossOrigin public ResponseEntity<Object> get_liste_facures( @ApiParam(value = "Est ce qu'il faut charger les operations ?", required = false) @RequestParam(value = "operations", required=false) String load_operations, @ApiParam(value = "Jeton JWT pour autentification", required = true) @RequestHeader("Token") String token) throws JsonProcessingException { // vérifie que le jeton est valide et que les droits lui permettent de consulter les admin katmars if (!jwtProvider.isValidJWT(token)) { throw new ResponseStatusException(HttpStatus.UNAUTHORIZED, "Jeton invalide, veuillez vous reconnecter."); } if (!SecurityUtils.adminOrOperateurWithDroit(jwtProvider, token, OperateurListeDeDroits.CONSULTER_FACTURES_CLIENT) && !SecurityUtils.client(jwtProvider, token) && !SecurityUtils.client_personnelWithDroit(jwtProvider, token, ClientPersonnelListeDeDroits.VOIR_FACTURES)) { throw new ResponseStatusException(HttpStatus.FORBIDDEN, "Vous n'avez pas le droit d'effectuer cette opération."); } String code_pays = jwtProvider.getCodePays(token); // tri, sens et numéro de page String order_column_bdd = "numeroFacture"; String sort_bdd = "asc"; // filtrage ParentSpecificationsBuilder builder = new OperationSpecificationsBuilder(); Specification spec_general = DatatableUtils.buildFiltres(null, null, builder, null); if (spec_general == null) { spec_general = Specification.where(DatatableUtils.buildFiltres(null, null, builder, null)); } // filtrage par pays kamtar Specification spec_pays = new Specification<ActionAudit>() { public Predicate toPredicate(Root<ActionAudit> root, CriteriaQuery<?> query, CriteriaBuilder builder) { List<Predicate> predicates = new ArrayList<Predicate>(); predicates.add(builder.equal(root.get("codePays"), code_pays)); return builder.and(predicates.toArray(new Predicate[predicates.size()])); } }; spec_general = spec_general.and(spec_pays); // préparation les deux requêtes (résultat et comptage) List<FactureClient> leads = factureClientService.getAllPagined(order_column_bdd, sort_bdd, 0, 999999, spec_general).getContent(); if (load_operations != null && "1".equals(load_operations)) { // chargement des opérations List<FactureClient> leads_operations = new ArrayList<FactureClient>(); for (FactureClient facture : leads) { String[] code_operations = facture.getListeOperations().split("@"); Long[] code_long_operations = new Long[code_operations.length]; int i = 0; for (String code_operation: code_operations) { try { code_long_operations[i] = Long.valueOf(code_operation); i++; } catch (NumberFormatException e ) { // erreur silencieuse } } List<Operation> operations = operationService.getByCodes(code_long_operations, code_pays); facture.setOperations(operations); leads_operations.add(facture); } leads = leads_operations; } actionAuditService.getFacturesClient(token); return new ResponseEntity<Object>(mapperJSONService.get(token).writeValueAsString(leads), HttpStatus.OK); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tpublic List<Client> listeClient() {\n\t\t\treturn null;\n\t\t}", "public List BestClient();", "private void listaClient() {\n\t\t\r\n\t\tthis.listaClient.add(cliente);\r\n\t}", "public List<Clients> getallClients();", "public void printClientList(){\n for(String client : clientList){\...
[ "0.7558732", "0.75542516", "0.7386437", "0.73738164", "0.73117393", "0.72515625", "0.7198686", "0.7176428", "0.71606714", "0.7120051", "0.71196026", "0.7098093", "0.7092957", "0.70228404", "0.69810677", "0.69576395", "0.6932318", "0.68726504", "0.6853204", "0.68416375", "0.68...
0.0
-1
Suppression d'une facture client
@Retryable( maxAttempts = Application.retry_max_attempt, backoff = @Backoff(delay = 5000)) @ResponseBody @ApiOperation(value = "Suppression d'une facture client") @ApiResponses(value = { @ApiResponse(code = 401, message = "Vous devez être identifié pour effectuer cette opération"), @ApiResponse(code = 403, message = "Vous n'êtes pas autorisé à effectuer cette action (admin, ou opérateur ayant le droit)"), @ApiResponse(code = 404, message = "Impossible de trouver la facture"), @ApiResponse(code = 200, message = "Operation supprimée", response = Boolean.class) }) @RequestMapping( produces = "application/json", consumes = "application/json", value = "/facture/client", method = RequestMethod.DELETE) @CrossOrigin(origins="*") public ResponseEntity supprimer( @ApiParam(value = "Paramètres d'entrée", required = true) @Valid @RequestBody DeleteFactureClientParams postBody, @ApiParam(value = "Jeton JWT pour autentification", required = true) @RequestHeader("Token") String token) { // vérifie que le jeton est valide et que les droits lui permettent de modifier un opérateur kmatar if (!jwtProvider.isValidJWT(token)) { throw new ResponseStatusException(HttpStatus.UNAUTHORIZED, "Jeton invalide, veuillez vous reconnecter."); } // vérifie que les droits lui permettent de gérer une operation if (!SecurityUtils.adminOrOperateurWithDroit(jwtProvider, token, OperateurListeDeDroits.DECLENCHER_FACTURATION_CLIENT) || !SecurityUtils.adminOrOperateurWithDroit(jwtProvider, token, OperateurListeDeDroits.SUPPRESSION_FACTURATION_CLIENT)) { throw new ResponseStatusException(HttpStatus.FORBIDDEN, "Vous n'avez pas le droit d'effectuer cette opération."); } // chargement FactureClient facture_client = factureClientService.getByUUID(postBody.getId(), jwtProvider.getCodePays(token)); if (facture_client == null) { throw new ResponseStatusException(HttpStatus.NOT_FOUND, "Impossible de trouver la facture."); } String numeroFacture = facture_client.getNumeroFacture(); // supression dela facture factureClientService.delete(facture_client); // suppression de la référence à la facture dans les opérations operationService.setNullOperationsNumeroFactureClient(numeroFacture, jwtProvider.getCodePays(token)); actionAuditService.supprimerFacture(numeroFacture, token); return new ResponseEntity<>(true, HttpStatus.OK); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void makeClientMissed() {\n\t\tArrayList<String> key = new ArrayList<String>();\r\n\r\n\t\tkey.add(\"id\");\r\n\r\n\t\tArrayList<String> value = new ArrayList<String>();\r\n\r\n\t\tvalue.add(GlobalVariable.TrainerSessionId);\r\n\r\n\t\tSystem.out.println(\"se\" + GlobalVariable.TrainerSessionId);\r\n\r\n...
[ "0.6090947", "0.5846398", "0.58412826", "0.58338815", "0.581639", "0.5814716", "0.5810274", "0.5782852", "0.577077", "0.57581764", "0.57178575", "0.57178575", "0.57016885", "0.57016885", "0.57016885", "0.56886494", "0.56585586", "0.5627218", "0.5595479", "0.5593249", "0.55783...
0.59155947
1
method to intialize instance data
void setData(int x,int y) { a=x; b=y; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initData() {\n }", "private void initData() {\n\n }", "private void initData() {\n\t}", "public void initData() {\n }", "public void initData() {\n }", "private void initData(){\n\n }", "protected @Override\r\n abstract void initData();", "@Override\r\n\tprotected void ...
[ "0.79230267", "0.7871803", "0.78248686", "0.78073364", "0.78073364", "0.77282274", "0.76850325", "0.7681026", "0.7681026", "0.7681026", "0.7681026", "0.7681026", "0.7681026", "0.7671599", "0.7671599", "0.76305115", "0.7596214", "0.7596214", "0.75909626", "0.75909626", "0.7590...
0.0
-1
write a method to add above two numbers
void SumOfTwoNumbers() { System.out.println("sum is"+(a+b)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addTwoNumbers() {\n\t\t\n\t}", "public int addTwoNumbers(int a, int b) {\n return a + b;\n }", "public static int plus(int value1, int value2){\r\n return value1 + value2;\r\n }", "@Override\r\n\tpublic int add(int a,int b) {\n\t\treturn a+b;\r\n\t}", "static void AddThemUP...
[ "0.69828534", "0.6780842", "0.66545874", "0.6645358", "0.6584147", "0.6566832", "0.65273505", "0.65237725", "0.6522501", "0.6496109", "0.6475875", "0.6464335", "0.64620155", "0.64494556", "0.63765544", "0.63750905", "0.637372", "0.6316072", "0.6291898", "0.6276023", "0.62404"...
0.0
-1
Insert: If less, go left. If greater, go right. If null, insert the keyvalue pair Cost: Number of compares is equal to 1+depth of Node
public void put(Key key, Value val) //put key-value pair in the table { /* * Tree shape: Many BSTs can correspond to the same set of keys. * <li>Number of compares for search/insert is equal to 1+depth of node. * <li>Worst case when keys entered in order */ root=put(root,key,val); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected Node<K, V> insert(K k, V v) {\n // if the given key is smaller than this key\n if (this.c.compare(k, this.key) < 0) {\n return new Node<K, V>(this.key, \n this.value, \n this.c, \n ...
[ "0.70752734", "0.7062105", "0.6850483", "0.6832592", "0.67324615", "0.6725074", "0.6723013", "0.67208385", "0.671731", "0.67131865", "0.67010546", "0.6698782", "0.66632366", "0.6612705", "0.6611628", "0.65820086", "0.65757835", "0.65657485", "0.65593684", "0.6559212", "0.6558...
0.0
-1
Search: If less, go left. If greater, go right. If equal,search hit Cost: Number of compares if 1+depth of Node
public Value get(Key key) //Value passed with Key(Null if key is absent) { Node x=root; while(x!=null) { int cmp=key.compareTo(x.key); if(cmp<0) x=x.left; else if(cmp>0) x=x.right; else if(cmp==0) return x.val; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void test(){\n BinarySearchTree tree = new BinarySearchTree(new Node(35));\n\n tree.addNode(4);\n tree.addNode(15);\n tree.addNode(3);\n tree.addNode(1);\n tree.addNode(20);\n tree.addNode(8);\n tree.addNode(50);\n tree.addNode(40);\n...
[ "0.62762135", "0.6229403", "0.5989156", "0.5981272", "0.59802973", "0.5970413", "0.59657764", "0.59626704", "0.5937357", "0.5906323", "0.590263", "0.5872881", "0.58455396", "0.58396286", "0.5821841", "0.58162767", "0.5800993", "0.5786465", "0.57549113", "0.574099", "0.5740244...
0.0
-1
Floor: largest keyCase 1: k is equal to the key at root > The floor of k is k Case 2: k is less than the key at root > The floor of k is in the left subtree. Case 3: k is greater than the key at root > The floor of k lies in the right subtree if there is any key<=k in right subtree. Otherwise it is the key at root.
public Key floor(Key key) //largest key less than or equal to the given key { Node x=floor(root,key); if(x!=null) return x.key; else return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public K floor(K key) {\n if (root == null)\n return null;\n else {\n Node tmp = null;\n Node curr = root;\n while (true) {\n if (curr == null) {\n if (tmp != null)\n ...
[ "0.780632", "0.7153924", "0.6971838", "0.6945831", "0.6806052", "0.6702776", "0.6667219", "0.66529036", "0.6550837", "0.6536465", "0.6371847", "0.6368024", "0.6368024", "0.6344382", "0.62925714", "0.6282507", "0.62435555", "0.62116945", "0.6143063", "0.60721874", "0.60343444"...
0.77415466
1
Ceiling: smallest key>=given key Case 1: k is equal to the key at root > The floor of k is k Case 2: k is less than the key at root > The floor of k is in the right subtree. Case 3: k is greater than the key at root > The floor of k lies in the left subtree if there is any key<=k in right subtree. Otherwise it is the key at root.
public Key ceiling(Key key) //smallest key greater than or equal to the given key { Node x=ceiling(root,key); if(x!=null) return x.key; else return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Key getCeiling(Key key) {\n\n Node current = root;\n while (current != null) {\n if (current.key == key) {\n return key;\n }\n if (current.key.compareTo(key) > 0) {\n if (current.left != null && current.left.key.compareTo(key) < 0)...
[ "0.8171861", "0.77418995", "0.7658847", "0.71880144", "0.7069398", "0.6743506", "0.6526992", "0.6521157", "0.65130717", "0.6449486", "0.64151037", "0.63814914", "0.6357563", "0.6241253", "0.62219447", "0.62115407", "0.6136102", "0.61253864", "0.6117771", "0.6081025", "0.60780...
0.8165591
1
Rank: How many keys <= k
public int rank(Key key) { return rank(root,key); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int rank(K key);", "private static int getSmallerThanOrEqualToKCount(int[] a, int k){\n int left=0, right=a.length-1;\n while(left<right){\n int mid=left+(right+1-left)/2;\n if(a[mid]>k){\n right=mid-1;\n } else{\n left=mid;\n ...
[ "0.7519329", "0.72230875", "0.67280835", "0.67050266", "0.66749024", "0.6589681", "0.6540926", "0.65206087", "0.6477601", "0.6450178", "0.6434037", "0.6410609", "0.64021146", "0.63966423", "0.6373813", "0.6368472", "0.6358402", "0.63558155", "0.6346023", "0.63097876", "0.6300...
0.59190243
57
Inorder Traversal: Traverse left subtree > Enqueue key > Traverse right subtree Yields keys in ascending order
public Iterable<Key> Keys() { Queue<Key> q=new Queue<>(); Inorder(root,q); return q; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void inOrderTraverseRecursive();", "public void inorder()\n {\n inorderRec(root);\n }", "public void inorder()\r\n {\r\n inorder(root);\r\n }", "public void inorder()\n {\n inorder(root);\n }", "public void inorder()\n {\n inorder(root);\n }", ...
[ "0.6844714", "0.67230743", "0.6715096", "0.66215503", "0.66215503", "0.6605926", "0.6595872", "0.65454197", "0.65370774", "0.65318793", "0.6485", "0.6390815", "0.6352058", "0.6341062", "0.6282945", "0.6244275", "0.6238227", "0.62249935", "0.62141216", "0.61867565", "0.6161020...
0.60049754
34
Delete the Minimum: Go left until finding a node with null left link Replace that node by its right link Update subtree counts. Can also use the tombstone method for deleting but leads to memory overload
public void deleteMin() //delete smallest key { root=deleteMin(root); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Node deleteMin(Node n)\n {\n if (n.left == null) \n return n.right;\n n.left = deleteMin(n.left); \n n.count= 1 + size(n.left)+ size(n.right); \n return n;\n }", "public void deleteMin() {\...
[ "0.79771656", "0.7816343", "0.7816343", "0.7623825", "0.75432974", "0.74203056", "0.7373595", "0.7332162", "0.72906345", "0.7276822", "0.72424245", "0.7018748", "0.6951822", "0.6883201", "0.6865951", "0.6815342", "0.6812903", "0.67436916", "0.673449", "0.6723405", "0.66986203...
0.7145173
11
Delete the Maximum: Go right until finding a node with null right link Replace that node by its left link Update subtree counts. Can also use the tombstone method for deleting but leads to memory overload
public void deleteMax() //delete largest key { root=deleteMax(root); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void deleteMax() {\n root = deleteMax(root);\n }", "public void deleteMax() {\n root = deleteMax(root);\n }", "private Node removeMax(Node node){\n if(node == null)\n return null;\n else if(node.right == null){ //use its left child to replace this node(max va...
[ "0.72595483", "0.72595483", "0.72487676", "0.71404696", "0.70800745", "0.69743", "0.69306046", "0.67563736", "0.6736496", "0.67073554", "0.670721", "0.6683074", "0.65995765", "0.6577194", "0.6470782", "0.64627653", "0.6459971", "0.64292884", "0.64249176", "0.6395016", "0.6393...
0.62211543
27
Hibbard Deletion: To delete a node with key k, search for node t containing key k. Case 0: 0 children > Delete t by setting the parent link to null. Case 1: 1 children > Delete t by replacing the parent link like in deleteMin & deleteMax Case 2L 2 children > Find successor x of t. (x has no left child) Delete the minimum in t's right subtree. (But dont garbage collect x) Put x in t's spot (Still a BST)
public void delete(Key key) { root=delete(root,key); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Node deleteNode(Node root, int key) \n {\n if (root == null) \n return root; \n \n // If the key to be deleted is smaller than \n // the root's key, then it lies in left subtree \n if (key < root.key) \n root.left = deleteNode(root.left, key); \n \n ...
[ "0.7675434", "0.75811046", "0.7570921", "0.75618756", "0.7546824", "0.7541166", "0.7463868", "0.7448523", "0.7337411", "0.7274061", "0.72609407", "0.7227596", "0.7159877", "0.7148806", "0.71485376", "0.71426237", "0.714034", "0.7094529", "0.7063404", "0.7030857", "0.7023375",...
0.63974595
77
Scanner in = new Scanner(System.in); int noOfInputs = Integer.parseInt(in.nextLine()); int[] numbers = new int[100]; numbers[0] = 8; // 3, 10, 1, 6, 14 }; //, 4, 7, 13, 20, 30, 25, 100, 90, 5, 35}; Heap heap = new Heap(numbers, 7); heap.buildHead(); heap.printHeap(); heap.replace(5); heap.printHeap();
public static void main(String[] args) { // heap.replace(5); // heap.printHeap(); int[] numbers = {5, 3, 50, 2, 16, 1}; BinaryTreeNode binaryTreeHead = BuildBinarySearchTree.buildBinarySearchTree(numbers); BinaryTreeTraversals.printLevelOrder(binaryTreeHead); System.out.println("\n\n"); BinaryTreeTraversals.printInorderNonRecursive(binaryTreeHead); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Heap(int mx) // constructor\n{\nmaxSize = mx;\ncurrentSize = 0;\nheapArray = new Node[maxSize]; // create array\n}", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tPriorityQueue<Integer>heap=new PriorityQueue<Integer>(new comparison());\n\t\tPriorityQueue<Integer>he...
[ "0.7178301", "0.7124219", "0.7039443", "0.70290124", "0.69516176", "0.68326837", "0.67590964", "0.6758423", "0.672931", "0.6713687", "0.66370034", "0.660146", "0.6577156", "0.6570645", "0.65557545", "0.65058875", "0.6473639", "0.6410793", "0.638982", "0.63807887", "0.63756895...
0.668726
10
TODO Autogenerated method stub
public static void main(String[] args) throws IOException { InputStream in = new FileInputStream("bitmap.inp"); //Scanner sc = new Scanner(in); FileWriter fw = new FileWriter("bitmap.out"); PrintWriter pw = new PrintWriter(fw); char type; int numRows, numCols; type=(char) in.read(); System.out.println(type); in.read(); numRows=in.read()-48; System.out.println(numRows); in.read(); numCols=in.read()-48; System.out.println(numCols); }
{ "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
Created on 20190124 22:18
public interface TaskCallback extends RunningTaskCallback { /** * Calling when the task is preparing to start . */ void onTaskStart(); @Override void onTaskRunning(PreTaskResult preTaskResult, int numerator, int denominator); /** * Calling while the task is completed. * * @param taskResult TaskResult bean */ void onTaskCompleted(TaskResult taskResult); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "public Pitonyak_09_02() {\r\n }", "public void mo38117a() {\n }", "public void mo6081a() {\n }", "protected MetadataUGWD() {/* intentionally empty ...
[ "0.5496459", "0.54423517", "0.5395961", "0.53918755", "0.5387137", "0.5383337", "0.53610194", "0.532526", "0.5300649", "0.5231452", "0.52298677", "0.52298677", "0.52298677", "0.52298677", "0.52298677", "0.52298677", "0.52298677", "0.5205497", "0.51660615", "0.5164232", "0.516...
0.0
-1
Calling when the task is preparing to start .
void onTaskStart();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void taskStarting() {\n\n }", "void onTaskPrepare();", "public void startTask() {\n\t}", "@Override\r\n\tpublic void PreExecute(TaskConfig config){\n\t}", "@Override\n public void onInitializeTasks() {\n }", "@Override\n\tpublic void onTaskPreExecute() {\n\t\tLog.i(TAG, \"p...
[ "0.82624954", "0.8081739", "0.7894834", "0.7493277", "0.72733533", "0.7246118", "0.7240474", "0.7225652", "0.71614784", "0.69067705", "0.68900543", "0.6887408", "0.6885717", "0.68676317", "0.6833563", "0.6833119", "0.6811021", "0.6804932", "0.67953706", "0.67940676", "0.67742...
0.73849195
4
Calling while the task is completed.
void onTaskCompleted(TaskResult taskResult);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void finishTask() {\n\t\t\n\t}", "public void completeTask() {\n completed = true;\n }", "public void finish() {\n\t\ttask.run();\n\t\ttask.cancel();\n\t}", "void TaskFinished(Task task) {\n\n repository.finishTask(task);\n }", "public void done() {\n try {\n ...
[ "0.7885877", "0.78304267", "0.7634333", "0.753126", "0.74086493", "0.73232275", "0.72683716", "0.72677726", "0.7263888", "0.7192047", "0.7170748", "0.71110106", "0.70781535", "0.70283586", "0.7011773", "0.69686824", "0.69675064", "0.6951501", "0.6941595", "0.6940131", "0.6927...
0.0
-1
Storage implementation based on files
public AppendOnlyStoreFile(String path) throws AppendOnlyStoreException { File dir = new File(path); if (!dir.isDirectory()) { throw new AppendOnlyStoreException("The directory is required."); } this.data = new DataFile(Paths.get(path, DATA_FILE)); this.index = new IndexFile(Paths.get(path, INDEX_FILE)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "OStorage getStorage();", "public interface Files \n{\n\t/**\n\t * Enum describing the three file types, internal, external\n\t * and absolut. Internal files are located in the asset directory\n\t * on Android and are relative to the applications root directory\n\t * on the desktop. External files are relative to...
[ "0.6940494", "0.6899238", "0.6896201", "0.68414205", "0.68365324", "0.67878866", "0.67878866", "0.67486954", "0.67064315", "0.67049855", "0.6656071", "0.66354764", "0.6626644", "0.6529552", "0.6520491", "0.65067625", "0.64389706", "0.6350237", "0.634683", "0.63438576", "0.633...
0.0
-1
Public interface to our dependency graph
@ApplicationScope @Component(modules = {ContextModule.class,ServiceModule.class}) // tell which modules to use in order to generate this instance public interface ApplicationComponent { SharedPreferencesClass getSharedPrefs(); RequestManager getGlide(); void injectRepo(ProjectRepository repository); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract DependencyGraph getDependencyGraph();", "public interface Dependable {\n\n /**\n * This method is called by the Dependency Manager when the\n * Dependable object should be updated.\n * This method is called when the actual definition or dependencies of \n * an object change. Ex...
[ "0.7977204", "0.72907156", "0.7174931", "0.67521685", "0.67521685", "0.65001494", "0.63345015", "0.62985665", "0.6296025", "0.62124217", "0.6197201", "0.6188889", "0.61887115", "0.6183371", "0.6140312", "0.6032173", "0.60004896", "0.5993886", "0.5983258", "0.5978974", "0.5964...
0.0
-1
Method creates a new user.
public boolean create(String name, String age) { boolean isCreate = false; if (this.isNameUnique(name)) { User user = this.userFactory.getNewUser(name, age); if (!user.isNull()) { this.users.add(user); isCreate = true; } } return isCreate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createUser(User user) {\n\n\t}", "public void createUser(User user);", "public String create() {\r\n\t\tuserService.create(userAdd);\r\n\t\tusers.setWrappedData(userService.list());\r\n\t\treturn \"create\";\r\n\t}", "UserCreateResponse createUser(UserCreateRequest request);", "CreateUserResult...
[ "0.80366886", "0.7944562", "0.79227144", "0.7894155", "0.77858996", "0.7638762", "0.7512252", "0.7480347", "0.74410194", "0.74210197", "0.74156964", "0.7381302", "0.73740286", "0.7350022", "0.7273704", "0.7273113", "0.72660595", "0.7263702", "0.7238507", "0.7237643", "0.72307...
0.0
-1
Method finds a user by "id" and sets new values of fields "name", "age".
public boolean edit(String id, String name, String age) { boolean isEdit = false; User user = this.findById(id); if (!user.isNull()) { if (user.getName() != null && !user.getName().isEmpty() && (user.getName().equals(name) || this.isNameUnique(name))) { user.edit(name, age); isEdit = true; } } return isEdit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setUser(User user, int id) {\n this.user = user;\n this.id = id;\n }", "public Person selectUpdateUser(String id) {\n\t\tSystem.out.println(\"selectUpdateUser\");\n\t\treturn personDAO.selectUpdateUser(id);\n\t}", "UpdateUserDto getUserWithId(int id);", "@Override\n\tpublic ApplicationR...
[ "0.6981618", "0.68862003", "0.6838162", "0.68148345", "0.6671431", "0.6656233", "0.6552229", "0.64890265", "0.646718", "0.64627314", "0.64536226", "0.64176804", "0.6406718", "0.6388091", "0.637629", "0.63729286", "0.6349628", "0.63457674", "0.634083", "0.6340322", "0.6339184"...
0.657559
6
Method removes user from repository.
public boolean remove(String id) { User user = this.findById(id); if(!user.isNull()){ this.userFactory.removeUser(user); } return this.users.remove(user); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void delete(User user){\n userRepository.delete(user);\n }", "@Override\r\n\tpublic void deleteByUser(User user) {\n\t\tuserReposotory.delete(user);\r\n\t}", "@Override\n\tpublic void remove(User user) throws UserNotFoundException {\n\t\tuserRepo.delete(user);\n\t}", "public void removeUser(...
[ "0.7453132", "0.74295026", "0.7418169", "0.7364434", "0.7312969", "0.73031366", "0.72826153", "0.7228972", "0.71249425", "0.70796317", "0.7050405", "0.7019634", "0.69941676", "0.69579893", "0.69560534", "0.69142824", "0.6910119", "0.6897394", "0.6885726", "0.6852698", "0.6846...
0.0
-1
Getter for field "gamers"
public List<User> getUsers() { return Collections.unmodifiableList(this.users); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getGamenumber() {\n\t\treturn this.gamenumber;\n\t}", "public int getGears();", "public Gamygdala getGamygdala() {\n return this.gamygdala;\n }", "public String getGrams() {\n return grams;\n }", "protected float[] getGenes() {\n\t\t\treturn genes;\n\t\t}", "public HashMap<...
[ "0.7117053", "0.6658805", "0.6653545", "0.6496903", "0.6451107", "0.62261695", "0.62261695", "0.6223226", "0.6213296", "0.6174957", "0.6145147", "0.611461", "0.6095773", "0.6087747", "0.6087747", "0.6087747", "0.6087747", "0.6086786", "0.607833", "0.60531414", "0.6046338", ...
0.0
-1
Method finds a user by value of identifier.
private User findById(String id) { User result = new NullUserOfDB(); for (User user : this.users) { if (user.getId().equals(id)) { result = user; break; } } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String searchForUser() {\n String userId = \"\";\n String response = given().\n get(\"/users\").then().extract().asString();\n List usernameId = from(response).getList(\"findAll { it.username.equals(\\\"Samantha\\\") }.id\");\n if (!usernameId.isEmpty()) {\n ...
[ "0.72420645", "0.7216658", "0.70403624", "0.69992274", "0.6899173", "0.6859954", "0.6827358", "0.6825434", "0.67249733", "0.6717869", "0.6700821", "0.6678385", "0.6676899", "0.6630751", "0.65892094", "0.6554639", "0.6552344", "0.65055174", "0.6503208", "0.6492552", "0.6490680...
0.6598631
14
Method checks unique value of name for user.
private boolean isNameUnique(String name) { boolean isUnique = true; for (User user : this.users) { if (user.getName().equals(name)) { isUnique = false; break; } } return isUnique; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean checkUserNameIsOccupied(String name) {\n \t\tif (users.size() != 0) {\n \t\t\tfor (int i = 0; i < users.size(); i++) {\n \t\t\t\tif (name.equals(users.get(i).getName())) {\n \t\t\t\t\treturn true;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\treturn false;\n \t}", "public boolean findUserIsExist(String name...
[ "0.7350093", "0.7330989", "0.7158013", "0.71154654", "0.71152073", "0.7107634", "0.70728517", "0.69809955", "0.6936047", "0.6934865", "0.69341844", "0.6913167", "0.6872492", "0.6872256", "0.6872256", "0.6872256", "0.6872256", "0.6872256", "0.6872256", "0.6861732", "0.6860442"...
0.7264424
2
input parameter is not used in this case
public String createFirstAccessionNumber(String nullPrefix) { StringBuilder builder = new StringBuilder(DateUtil.getTwoDigitYear()); builder.append(getSite()); builder.append(INCREMENT_STARTING_VALUE); return builder.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void input() {\n\t\t\n\t}", "@Override\n\tprotected void processInput() {\n\t}", "public abstract void input();", "private void validateInputParameters(){\n\n }", "@Override\n\tvoid input() {\n\t}", "protected abstract void getInput();", "public abstract Object getInput ();", "c...
[ "0.69762313", "0.68223697", "0.6736774", "0.6620128", "0.65601623", "0.6413289", "0.6372067", "0.6366532", "0.63060886", "0.614815", "0.6121829", "0.6103925", "0.61011046", "0.6091351", "0.6053356", "0.6008121", "0.6006882", "0.5948455", "0.594779", "0.5932132", "0.5910312", ...
0.0
-1
input parameter is not used in this case
public String getNextAvailableAccessionNumber(String nullPrefix) { String nextAccessionNumber = null; SampleDAO sampleDAO = new SampleDAOImpl(); String curLargestAccessionNumber = sampleDAO .getLargestAccessionNumberWithPrefix(createFirstAccessionNumber( null).substring(YEAR_START, SITE_END)); try { if (curLargestAccessionNumber == null) { if (REQUESTED_NUMBERS.isEmpty()) { nextAccessionNumber = createFirstAccessionNumber(null); } else { nextAccessionNumber = REQUESTED_NUMBERS.iterator().next(); } } else { nextAccessionNumber = incrementAccessionNumber(curLargestAccessionNumber); } while (REQUESTED_NUMBERS.contains(nextAccessionNumber)) { nextAccessionNumber = incrementAccessionNumber(nextAccessionNumber); } } catch (IllegalArgumentException e) { e.printStackTrace(); LogEvent.logError("YearSiteNumAccessionValidator", "getNextAvailableAccessionNumber()", StringUtil.getMessageForKey("error.accession.no.next")); nextAccessionNumber = null; } REQUESTED_NUMBERS.add(nextAccessionNumber); return nextAccessionNumber; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void input() {\n\t\t\n\t}", "@Override\n\tprotected void processInput() {\n\t}", "public abstract void input();", "private void validateInputParameters(){\n\n }", "@Override\n\tvoid input() {\n\t}", "protected abstract void getInput();", "public abstract Object getInput ();", "c...
[ "0.69762313", "0.68223697", "0.6736774", "0.6620128", "0.65601623", "0.6413289", "0.6372067", "0.6366532", "0.63060886", "0.614815", "0.6121829", "0.6103925", "0.61011046", "0.6091351", "0.6053356", "0.6008121", "0.6006882", "0.5948455", "0.594779", "0.5932132", "0.5910312", ...
0.0
-1
if the year differs then start the sequence again. If not then increment but check for overflow into year
public String incrementAccessionNumber(String currentHighAccessionNumber) throws IllegalArgumentException { int year = new GregorianCalendar().get(Calendar.YEAR) - 2000; try { if (year != Integer.parseInt(currentHighAccessionNumber.substring( YEAR_START, YEAR_END))) { return createFirstAccessionNumber(null); } } catch (NumberFormatException nfe) { return createFirstAccessionNumber(null); } int increment = Integer.parseInt(currentHighAccessionNumber .substring(INCREMENT_START)); String incrementAsString = INCREMENT_STARTING_VALUE; if (increment < UPPER_INC_RANGE) { increment++; incrementAsString = String.format("%06d", increment); } else { throw new IllegalArgumentException( "AccessionNumber has no next value"); } StringBuilder builder = new StringBuilder( currentHighAccessionNumber.substring(YEAR_START, SITE_END)); builder.append(incrementAsString); return builder.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setNextYear()\n\t{\n\t\tm_calendar.set(Calendar.YEAR,getYear()+1);\n\t\tsetDay(getYear(),getMonthInteger(),1);\n\n\t}", "public String startYear(int year) throws IOException {\r\n File file = new File(\"evidence.ods\");\r\n SpreadSheet spreadSheet = SpreadSheet.createFromFile(file);\r\n...
[ "0.68044734", "0.64849454", "0.64313865", "0.63582224", "0.63029015", "0.6255139", "0.6157794", "0.6149514", "0.6097141", "0.595083", "0.59367806", "0.587788", "0.5850977", "0.58278584", "0.58267474", "0.5795586", "0.5772456", "0.5764016", "0.5754571", "0.5735687", "0.5729934...
0.0
-1
recordType parameter is not used in this case
public boolean accessionNumberIsUsed(String accessionNumber, String recordType) { SampleDAO SampleDAO = new SampleDAOImpl(); if (!FormFields.getInstance().useField( Field.LAB_NUMBER_USED_ONLY_IF_SPECIMENS)) { return SampleDAO.getSampleByAccessionNumber(accessionNumber) != null; } else { SampleItemDAO sampleItemDAO = new SampleItemDAOImpl(); Sample sample = null; Set<Integer> includedSampleStatusList; includedSampleStatusList = new HashSet<Integer>(); includedSampleStatusList.add(Integer.parseInt(StatusService .getInstance().getStatusID(SampleStatus.Entered))); // Dung add for sample if remove all sample item(edit sample) includedSampleStatusList.add(Integer.parseInt(StatusService .getInstance().getStatusID(SampleStatus.Canceled))); sample = SampleDAO.getSampleByAccessionNumber(accessionNumber); if (sample == null || GenericValidator.isBlankOrNull(sample.getId())) { return false; } else { List<SampleItem> sampleItemList = sampleItemDAO .getSampleItemsBySampleIdAndStatus(sample.getId(), includedSampleStatusList); return !sampleItemList.isEmpty(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected Class<RecordType> getBoundType() {\n return RecordType.class;\n }", "public void setRecordType(String RecordType) {\n this.RecordType = RecordType;\n }", "@Override\n public Class<Record> getRecordType() {\n return Record.class;\n }", "@Override\n ...
[ "0.70980424", "0.7002447", "0.69214314", "0.69214314", "0.69214314", "0.69214314", "0.6824319", "0.67480767", "0.67141587", "0.6682869", "0.66804796", "0.6676266", "0.66571933", "0.6582582", "0.6535174", "0.6521814", "0.64335215", "0.6416895", "0.6416895", "0.6416895", "0.641...
0.0
-1
TODO Autogenerated method stub
@Override public int compare(Object arg0, Object arg1) { return arg0.toString().compareTo(arg1.toString()); }
{ "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
/ renamed from: a
public static C26323n m86584a() { return f69309a; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed fr...
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064...
0.0
-1
/ renamed from: b
private static C33023i m86585b() { return m86586c(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo2508a(bxb bxb);", "@Override\n public void func_104112_b() {\n \n }", "@Override\n public void b() {\n }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "@Override\n\tpublic void b2() {\n\t\t\n\t}", "v...
[ "0.64558864", "0.6283203", "0.6252635", "0.6250949", "0.6244743", "0.6216273", "0.6194491", "0.6193556", "0.61641675", "0.6140157", "0.60993093", "0.60974354", "0.6077849", "0.6001867", "0.5997364", "0.59737104", "0.59737104", "0.5905105", "0.5904295", "0.58908087", "0.588663...
0.0
-1
/ renamed from: c
private static C33023i m86586c() { return m86587d(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo5289a(C5102c c5102c);", "public static void c0() {\n\t}", "void mo57278c();", "private static void cajas() {\n\t\t\n\t}", "void mo5290b(C5102c c5102c);", "void mo80457c();", "void mo12638c();", "void mo28717a(zzc zzc);", "void mo21072c();", "@Override\n\tpublic void ccc() {\n\t\t\n\t}", ...
[ "0.64592767", "0.644052", "0.6431582", "0.6418656", "0.64118475", "0.6397491", "0.6250796", "0.62470585", "0.6244832", "0.6232792", "0.618864", "0.61662376", "0.6152657", "0.61496663", "0.6138441", "0.6137171", "0.6131197", "0.6103783", "0.60983956", "0.6077118", "0.6061723",...
0.0
-1
/ renamed from: d
private static C33023i m86587d() { return (C33023i) C47375f.m147940a(C26295c.m86478o(), "Cannot return null from a non-@Nullable @Provides method"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void d() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public int d()\r\n/* 79: */ {\r\n/* 80:82 */ return this.d;\r\n/* 81: */ }", "public String d_()\r\n/* 445: */ {\r\n/* 446:459 */ return \"container.inventor...
[ "0.63810617", "0.616207", "0.6071929", "0.59959275", "0.5877492", "0.58719957", "0.5825175", "0.57585526", "0.5701679", "0.5661244", "0.5651699", "0.56362265", "0.562437", "0.5615328", "0.56114155", "0.56114155", "0.5605659", "0.56001145", "0.5589302", "0.5571578", "0.5559222...
0.0
-1
This method should do it best to preparse and validate the query. It should not store the query or execute anything towards EHR data.
public abstract String debugQuery(Form staticQueryParametersAsForm) throws Exception;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void validateQuery(Query query) throws InvalidQueryException;", "public CQLQueryResults processQuery(CQLQuery cqlQuery) throws MalformedQueryException, \n\t QueryProcessingException {\n\t\tthrow new RuntimeException(\"not impl yet. port from nc...
[ "0.7001092", "0.6589921", "0.6547079", "0.64985126", "0.64566106", "0.6395626", "0.6310218", "0.6283796", "0.62672377", "0.611813", "0.611301", "0.6094339", "0.60847026", "0.60194755", "0.5987905", "0.59510356", "0.58646876", "0.582425", "0.5812317", "0.5804494", "0.57745826"...
0.0
-1
This method should do it best to preparse and validate the query It should store the query or execute anything towards EHR data.
public abstract QueryContainer translateQuery(QueryContainer query) throws Exception;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void validateQuery(Query query) throws InvalidQueryException;", "public CQLQueryResults processQuery(CQLQuery cqlQuery) throws MalformedQueryException, \n\t QueryProcessingException {\n\t\tthrow new RuntimeException(\"not impl yet. port from nc...
[ "0.67943555", "0.6540625", "0.6501913", "0.64061636", "0.63247436", "0.63235813", "0.6275777", "0.62709445", "0.6100189", "0.6097699", "0.6093731", "0.6049474", "0.600212", "0.59889", "0.597342", "0.592243", "0.5918234", "0.5871553", "0.58272046", "0.5825826", "0.5814089", ...
0.0
-1
TODO Autogenerated method stub
@Override public void run() { synchronized(Main.lck) { System.out.println(this.t.getName()); try { Main.lck.wait(); System.out.println("Terminating thread "+this.t.getName()); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }
{ "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
Set exception in case of failure.
TransactionContext setException(Exception exception);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setException(Exception e)\n {\n this.exception = e;\n }", "public void setException(LoadException exception) {\n\t\tloadProgress.setException(exception);\n\t}", "void setFailed(Throwable lastFailure);", "@Override\r\n\tpublic void setException(Throwable throwable) {\r\n super.setExcep...
[ "0.7686328", "0.6725359", "0.67083675", "0.6643836", "0.6643529", "0.65465474", "0.64858514", "0.6472077", "0.63406265", "0.6335677", "0.62740374", "0.6163988", "0.6161383", "0.6142059", "0.61303246", "0.6114288", "0.60855865", "0.60683143", "0.60574085", "0.6029263", "0.6023...
0.6959448
1
Returns the committed log entry
LogEntryProto getLogEntry();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "BufferedLogChannel getCurrentLogIfPresent(long entryLogId);", "public static void log() {\n String branch = commitPointers.readHeadCommit()[0];\n String currName = commitPointers.readHeadCommit()[1];\n File cFile = Utils.join(Commit.COMMIT_FOLDER, currName + \".txt\");\n Commit curr =...
[ "0.68728137", "0.67011106", "0.64493394", "0.6410849", "0.61674905", "0.6130221", "0.59594417", "0.59485936", "0.5930254", "0.5912151", "0.59074444", "0.59029824", "0.5829642", "0.5809389", "0.5786383", "0.5756924", "0.57300663", "0.57162386", "0.5710766", "0.5659177", "0.565...
0.6275469
4
It indicates if the transaction should be committed to the RAFT log
boolean shouldCommit();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void logTransactionEnd();", "Boolean isTransacted();", "Boolean isTransacted();", "public boolean isCommited() {\n return votedCommit;\n }", "public boolean isCommitted() {\n\t\treturn false;\n\t}", "private void reportTransactionStatus(boolean success){\n if(success){\n ...
[ "0.6468415", "0.637833", "0.637833", "0.6341572", "0.62918067", "0.62707585", "0.62632006", "0.6184741", "0.6180041", "0.61071503", "0.6106119", "0.607762", "0.60068125", "0.5958903", "0.59337986", "0.5931971", "0.5862417", "0.5841543", "0.58257097", "0.5806779", "0.57762384"...
0.70401
0
proxy StateMachine methods. We do not want to expose the SM to the RaftLog This is called before the transaction passed from the StateMachine is appended to the raft log. This method will be called from log append and having the same strict serial order that the Transactions will have in the RAFT log. Since this is called serially in the critical path of log append, it is important to do only required operations here.
TransactionContext preAppendTransaction() throws IOException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void log() {\n\t\t\n//\t\tif (trx_loggin_on){\n\t\t\n\t\tif ( transLogModelThreadLocal.get().isTransLoggingOn() ) {\n\t\t\t\n\t\t\tTransLogModel translog = transLogModelThreadLocal.get();\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesConText().entrySet()) {\n\t\t\t\tMDC.put(entry.getKey().t...
[ "0.54942065", "0.53308773", "0.5320914", "0.5280818", "0.52719533", "0.5265651", "0.52027804", "0.51894724", "0.5184152", "0.5180227", "0.51797384", "0.51460516", "0.5131922", "0.5104884", "0.5098523", "0.5085945", "0.5079711", "0.5076994", "0.5075932", "0.50515175", "0.50329...
0.46195376
88
Called to notify the state machine that the Transaction passed cannot be appended (or synced). The exception field will indicate whether there was an exception or not.
TransactionContext cancelTransaction() throws IOException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected boolean shouldSendThrowException() {\n return false;\n }", "void onSynchronizationFailed(SyncException e);", "@Override\n\t\t\t\t\tpublic void onAddFail() {\n\t\t\t\t\t\tMZLog.e(\"J\", \"同步到购物车失败\");\n\t\t\t\t\t}", "public void checkForTransaction() throws SystemException;"...
[ "0.5662649", "0.56463975", "0.5595031", "0.5546416", "0.5475952", "0.54308575", "0.53073055", "0.52944803", "0.5255848", "0.5234222", "0.5224827", "0.5207989", "0.5173593", "0.51548046", "0.51434135", "0.51374394", "0.5104995", "0.5097255", "0.5040374", "0.50379324", "0.50302...
0.0
-1
TODO Autogenerated method stub
@Override public Permission getPermission(int id) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void 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 List<Permission> getAllPermissions() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void 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 int addPermission(Permission perms) { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void 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 int updPermission(Permission perms) { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void 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 int delPermission(int id) { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void 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
The string may contain nonbracket characters as well. These strings have balanced brackets: "[LaunchCode]", "Launch[Code]", "[]LaunchCode", "", "[]" While these do not: "[LaunchCode", "Launch]Code[", "[", "]["
@Test public void nonBracket(){ assertTrue(BalancedBrackets.hasBalancedBrackets("")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static boolean validBrackets(String s){\n ArrayList<Character> arr = new ArrayList<Character>();\n for(int i = 0; i < s.length(); i++){\n if(s.charAt(i) == '{' || s.charAt(i) == '[' || s.charAt(i) == '('){\n arr.add(s.charAt(i));\n }else if(s.charAt(i) == '}'){\n if(...
[ "0.6177617", "0.5783923", "0.5620764", "0.55940294", "0.55179054", "0.5508954", "0.5502974", "0.54638284", "0.5406803", "0.53620166", "0.53553206", "0.5274771", "0.52738285", "0.52710766", "0.5267215", "0.5243784", "0.52311397", "0.5226691", "0.5214151", "0.5202506", "0.51979...
0.5374773
9
Creates an IntentService. Invoked by your subclass's constructor.
public ActivityRecognitionListener(String name) { super(name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MyIntentService() {\n super(\"MyIntentServiceName\");\n }", "public MyIntentService() {\n super(\"MyIntentService\");\n }", "public MyIntentService() {\n super(\"\");\n }", "public MyIntentService() {\n super(MyIntentService.class.getName());\n }", "public MyI...
[ "0.8280781", "0.8213187", "0.80132484", "0.7954963", "0.78675824", "0.7616548", "0.7522625", "0.715798", "0.7155414", "0.6938953", "0.6776343", "0.6630227", "0.66172403", "0.66161776", "0.6569701", "0.65577745", "0.64851856", "0.6444905", "0.64208555", "0.6402491", "0.6334728...
0.0
-1
TODO add support for rendering nested indexed field references
@Test // DATAMONGO-774 @Disabled void shouldRenderNestedIndexedFieldReference() { assertThat(transformValue("foo[3].bar")).isEqualTo("$foo[3].bar"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasFieldNested();", "public int getFieldIndex() { return _fldIndex; }", "@Test\n public void fieldIndexFormatting() throws Exception {\n Document doc = new Document();\n DocumentBuilder builder = new DocumentBuilder(doc);\n\n // Create an INDEX field which will display an entry ...
[ "0.5628414", "0.55917364", "0.5518219", "0.5491727", "0.545219", "0.54093134", "0.5351107", "0.5333832", "0.5307111", "0.5247536", "0.5238063", "0.51884574", "0.5144208", "0.51414216", "0.51209956", "0.5119006", "0.5106234", "0.51010835", "0.50773424", "0.50733435", "0.507283...
0.73541427
0
/ Reference IdentityCoreInitializedEvent service to guarantee that this component will wait until identity core is started
@Reference( name = "identity.core.init.event.service", service = IdentityCoreInitializedEvent.class, cardinality = ReferenceCardinality.MANDATORY, policy = ReferencePolicy.DYNAMIC, unbind = "unsetIdentityCoreInitializedEventService" ) protected void setIdentityCoreInitializedEventService(IdentityCoreInitializedEvent identityCoreInitializedEvent) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void unsetIdentityCoreInitializedEventService(IdentityCoreInitializedEvent identityCoreInitializedEvent) {\n }", "@Override\n public void onCoreInitFinished() {\n }", "@Override\n public void onCoreInitFinished() {\n }", "@Override\n public void onC...
[ "0.744809", "0.6511219", "0.64295626", "0.64295626", "0.64093506", "0.64093506", "0.63085467", "0.63085467", "0.63076186", "0.6297885", "0.6288461", "0.61545396", "0.59996873", "0.59627783", "0.59474564", "0.5823413", "0.5816442", "0.5788156", "0.57064193", "0.5695863", "0.56...
0.7715537
0
/ Reference IdentityCoreInitializedEvent service to guarantee that this component will wait until identity core is started
protected void unsetIdentityCoreInitializedEventService(IdentityCoreInitializedEvent identityCoreInitializedEvent) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Reference(\n name = \"identity.core.init.event.service\",\n service = IdentityCoreInitializedEvent.class,\n cardinality = ReferenceCardinality.MANDATORY,\n policy = ReferencePolicy.DYNAMIC,\n unbind = \"unsetIdentityCoreInitializedEventService\"\n )\n p...
[ "0.7714706", "0.651232", "0.6430521", "0.6430521", "0.6410693", "0.6410693", "0.631036", "0.631036", "0.6308898", "0.6299452", "0.6290263", "0.6156435", "0.60018593", "0.5965738", "0.59499526", "0.5825283", "0.5815506", "0.57893056", "0.57074755", "0.56965417", "0.56900424", ...
0.74473464
1
TODO this method and createGetDeleteCommand method may be merged to single method createGetXXXCommand(String commandName, String httpMethod)
@Override public void createGetPostCommand(String commandName) { try { writer.write("@Override\n"); writer.write("public String getPostCommand() {\n"); writer.write("\treturn \"" + commandName + "\";\n"); writer.write("}\n"); } catch (IOException e) { throw new GeneratorException(e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract Command getCreateCommand(CreateRequest request);", "Command createCommand();", "@Override\n\tprotected void executeGet(GetRequest request, OperationResponse response) {\n\t}", "public AbstractCommand getCommand(HttpServletRequest request) {\n LOGGER.info(\"request key is \" + reques...
[ "0.6788158", "0.6325702", "0.6230606", "0.62296635", "0.621277", "0.618512", "0.6165898", "0.6133152", "0.60898954", "0.60777795", "0.6075278", "0.60366786", "0.58721465", "0.5843988", "0.5804194", "0.57654256", "0.57645375", "0.57645375", "0.576222", "0.56943357", "0.5694145...
0.6138662
7
LISTA TODOS AS PARCELAS CADASTRADOS NO BANCO
public List<Parcela> readParcela() throws ClassNotFoundException { java.sql.Connection con = ConnectionFactory.getConnection(); PreparedStatement stmt = null; ResultSet rs = null; List<Parcela> Parcela = new ArrayList<>(); try { stmt = con.prepareStatement("SELECT codParcela, DATEDIFF(NOW(), dataVencParcela) as diasVencPar FROM tbparcela WHERE statusParcela = 1"); rs = stmt.executeQuery(); while (rs.next()) { Parcela par = new Parcela(); par.setCodParcela(rs.getInt("codParcela")); par.setDiasAtrasoPar(rs.getInt("diasVencPar")); Parcela.add(par); } } catch (SQLException ex) { Logger.getLogger(ParcelaDao.class.getName()).log(Level.SEVERE, null, ex); } finally { ConnectionFactory.closeConnection(con, stmt, rs); } return Parcela; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<ActDetalleActivo> listarDetalleActivoLaboratorio(long codigoSalaLaboratorio,long codigoTipo,String amie, int estado,int anio);", "public void listar(){\n if (!esVacia()) {\n // Crea una copia de la lista.\n NodoEmpleado aux = inicio;\n // Posicion de los elemen...
[ "0.63436645", "0.6311989", "0.62841517", "0.62362385", "0.6224268", "0.61944395", "0.6193275", "0.6156865", "0.61194855", "0.60432035", "0.6042854", "0.60378325", "0.60289484", "0.60281754", "0.6024244", "0.600513", "0.6001965", "0.5999441", "0.59849435", "0.59707296", "0.595...
0.0
-1
TODO: Warning this method won't work in the case the id fields are not set
@Override public boolean equals(Object object) { if (!(object instanceof ResolucaoPK)) { return false; } ResolucaoPK other = (ResolucaoPK) object; if (this.avaliacaoId != other.avaliacaoId) { return false; } if (this.usuarioId != other.usuarioId) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "private Integer getId() { return this.id; }", "public void setId(int id){ this.id = id; }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setID(String idIn) {this.id = idIn;}", "public void se...
[ "0.68954784", "0.68378097", "0.6704338", "0.66405046", "0.66405046", "0.6591173", "0.6577649", "0.6577649", "0.657354", "0.657354", "0.657354", "0.657354", "0.657354", "0.657354", "0.65609664", "0.65609664", "0.6543523", "0.65234846", "0.6514877", "0.6486739", "0.64767367", ...
0.0
-1
TODO Autogenerated method stub
public int updateSetting(UserInfo userInfo, Object obj) { if (SystemIdEnums.AUTHOR_SYS.getCode().equals(userInfo.getSystemId())) { AuthorInfo authorInfo = (AuthorInfo)obj; authorInfoManager.saveAuthorInfo(authorInfo); } else if (SystemIdEnums.EXPERT_SYS.getCode().equals(userInfo.getSystemId())) { ExpertInfo expertInfo = (ExpertInfo)obj; expertInfoManager.saveExpertInfo(expertInfo); } else if (SystemIdEnums.READER_SYS.getCode().equals(userInfo.getSystemId())) { ReaderInfo readerInfo = (ReaderInfo)obj; readerInfoManager.saveReaderInfo(readerInfo); } else if (SystemIdEnums.EDIT_SYS.getCode().equals(userInfo.getSystemId())) { // AuthorInfo authorInfo = (AuthorInfo)obj; // authorInfoManager.saveAuthorInfo(authorInfo); } else { logger.info("系统不存在,你修改啥"); } return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void 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 int updatePw(UserInfo userInfo,String password) { userInfo.setId(userInfo.getId()); userInfo.setLogonPwd(password); try{ userInfoManager.saveUserInfo(userInfo); return 1; }catch(Exception e){ e.printStackTrace(); return 0; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void 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 Object queryObject(String userId) { UserInfoQuery userInfoQuery = new UserInfoQuery(); userInfoQuery.setUserId(userId); List<UserInfo> userInfos = userInfoManager.queryList(userInfoQuery); UserInfo userInfo = userInfos.get(0); if(RoleIdEnums.AUTHOR.getCode().equals(userInfo.getRoleId())){ AuthorInfoQuery authorInfoQuery= new AuthorInfoQuery(); authorInfoQuery.setAuthorId(userInfo.getRefId()); List<AuthorInfo> authorInfos= authorInfoManager.queryList(authorInfoQuery); AuthorInfo authorInfo = authorInfos.get(0); return authorInfo; }else if(RoleIdEnums.READER_P.getCode().equals(userInfo.getRoleId()) || RoleIdEnums.READER_E.getCode().equals(userInfo.getRoleId())){ //TODO: ReaderInfoQuery readerInfoQuery= new ReaderInfoQuery(); readerInfoQuery.setReaderId(userInfo.getRefId()); List<ReaderInfo> readerInfos= readerInfoManager.queryList(readerInfoQuery); ReaderInfo readerInfo = readerInfos.get(0); return readerInfo; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void 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 UserInfo queryUserInfo(String userId) { UserInfoQuery userInfoQuery = new UserInfoQuery(); userInfoQuery.setUserId(userId); List<UserInfo> userInfos = userInfoManager.queryList(userInfoQuery); UserInfo userInfo = userInfos.get(0); return userInfo; }
{ "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
////////////////double sort testing\\\\\\\\\\\\\\\\\\\\\\ check findMax
public static void main(String[] args) { double[] a = {7, 6, 8, 4, 3, 2, 1}; System.out.println(a[findMax(a,a.length-1)]); //check swap print(a); swap(a, 0, 6); System.out.println(""); print(a); //check sort System.out.println(""); System.out.println("Sort"); print(a); sort(a); System.out.println(""); print(a); //////////////////////////////string sort test String[] array = {"apple", "bottle", "cat", "deer", "firetruck", "hi", "jar", "kite"}; //String[] array = {"a","b","c","d","e","f","g"}; print(array); System.out.println("SWAP:"); swap(array, 0, array.length-1); swap(array, 3, 6); swap(array, 2, 4); print(array); System.out.println("FINDMAX:"); System.out.println(findMax(array, 5) + ", " + array[findMax(array,5)]); System.out.println("SORT:"); print(array); sort(array); print(array); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\n int[] nums= {200,4,3,5,70,6,8,90};\n System.out.println( isMax( nums ));\n System.out.println(isMaxNoSort(nums));\n }", "int max() {\n\t\t// added my sort method in the beginning to sort out array\n\t\tint n = array.length;\n\t\tint temp = 0;\...
[ "0.63866985", "0.6370868", "0.6274738", "0.6271542", "0.6179417", "0.61197895", "0.60479957", "0.6026035", "0.6020131", "0.59810317", "0.59660923", "0.5966042", "0.5939262", "0.5930288", "0.5925552", "0.58721185", "0.5871738", "0.5855608", "0.5847613", "0.5844424", "0.5842051...
0.63178176
2
endregion region Push authentication notification
private void showNotification(String message) { // Prepare intent which is triggered if the // notification is selected Intent intent = new Intent(this, LoginActivity.class); int mNotificationId = (int) System.currentTimeMillis(); PendingIntent pIntent = PendingIntent.getActivity(this, mNotificationId, intent, PendingIntent.FLAG_UPDATE_CURRENT); NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this) .setSmallIcon(R.drawable.ic_logo) .setContentTitle(getString(R.string.app_name)) .setContentText(message) .setContentIntent(pIntent) .setAutoCancel(true); NotificationManager mNotifyMgr = (NotificationManager) getSystemService(NOTIFICATION_SERVICE); mNotifyMgr.notify(mNotificationId, mBuilder.build()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onAuthenticationSucceeded(String token);", "public interface PushFireBaseTokenRequestListener {\n\n public void tokenPushed();\n}", "public String getPushToken() {\n }", "interface Auth extends RconConnectionEvent, Cancellable {}", "@Override\n protected void onPushOpen(Context context, Intent ...
[ "0.617343", "0.61186266", "0.6077593", "0.59633803", "0.595161", "0.5911781", "0.58386433", "0.57520896", "0.575144", "0.57501686", "0.5702608", "0.56802446", "0.5673951", "0.5669544", "0.56594867", "0.5653286", "0.5650211", "0.5637321", "0.56362516", "0.56059766", "0.5595125...
0.0
-1
Success already handled the widget is removed client side immediately Only on failure do we need to handle anything
@Override public void onSuccess(Void result) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void cleanup(){\r\n\t\tif(errorMsgPanel!=null){\r\n\t\t\trsDialog.getDispatchDateLabel().setForeground(Color.BLACK);\r\n\t\t\trsDialog.getDispatchMethLabel().setForeground(Color.BLACK);\r\n\t\t\trsDialog.getAmountPaidLabel().setForeground(Color.BLACK);\r\n\t\t\trsDialog.getPaymentMethLabel().setForeground(...
[ "0.6388507", "0.6241718", "0.6123716", "0.6094962", "0.6030771", "0.60200715", "0.5981181", "0.59410733", "0.5929023", "0.5929023", "0.58840984", "0.58480066", "0.5841734", "0.5821797", "0.58168966", "0.58168966", "0.58168966", "0.5803985", "0.5801436", "0.5790827", "0.577917...
0.0
-1
TODO Autogenerated method stub
@Override public void onFailure(Throwable caught) { }
{ "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 void onSuccess(Void result) { }
{ "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) { File files=new File("C:\\Users\\k74"); String filenames[]=files.list(); for(String filename :filenames) System.out.println(filename); }
{ "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
Sign an APK with testkey.
public void signWithTestKey(@NonNull String inputPath, @NonNull String outputPath, @Nullable LogCallback callback) { try (LogWriter logger = new LogWriter(callback)) { long savedTimeMillis = System.currentTimeMillis(); PrintStream oldOut = System.out; List<String> args = Arrays.asList( "sign", "--in", inputPath, "--out", outputPath, "--key", new File(context.getFilesDir(), TESTKEY_DIR_IN_FILES + "testkey.pk8").getAbsolutePath(), "--cert", new File(context.getFilesDir(), TESTKEY_DIR_IN_FILES + "testkey.x509.pem").getAbsolutePath() ); logger.write("Signing an APK file with these arguments: " + args); /* If the signing has a callback, we need to change System.out to our logger */ if (callback != null) { try (PrintStream stream = new PrintStream(logger)) { System.setOut(stream); } } try { ApkSignerTool.main(args.toArray(new String[0])); } catch (Exception e) { callback.errorCount.incrementAndGet(); logger.write("An error occurred while trying to sign the APK file " + inputPath + " and outputting it to " + outputPath + ": " + e.getMessage() + "\n" + "Stack trace: " + Log.getStackTraceString(e)); } logger.write("Signing an APK file took " + (System.currentTimeMillis() - savedTimeMillis) + " ms"); if (callback != null) { System.setOut(oldOut); } } catch (IOException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n public void testSign() throws SodiumException, CryptoException {\r\n\r\n byte[] data = \"Hola caracola\".getBytes();\r\n\r\n CryptoService instance = new CryptoService();\r\n Keys keys = instance.createKeys(null);\r\n byte[] result = instance.sign(data, keys);\r\n as...
[ "0.611392", "0.5966324", "0.5629688", "0.5567269", "0.545231", "0.5434539", "0.5414986", "0.52910054", "0.5176844", "0.5168163", "0.51590633", "0.5134598", "0.5121925", "0.5060901", "0.5057051", "0.5045046", "0.50309855", "0.5030504", "0.49653932", "0.49608994", "0.49368516",...
0.69117826
0
Used by server to append a message to a chat client.
void appendMessage(String message) throws RemoteException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void internalAddToChatWindow(String message) {\n jChatConvo.append(message + \"\\n\");\n }", "public void clientToServerChatMessage(String message){\n String chatMessage = message;\n System.out.println(\"chatmessage\" + chatID + \" \" + chatMessage);\n toServer.println(\"ch...
[ "0.72294194", "0.721611", "0.70931756", "0.6970372", "0.6701666", "0.669321", "0.66673934", "0.66618866", "0.66391265", "0.6625869", "0.662208", "0.6608538", "0.66023326", "0.65966684", "0.6560429", "0.6544175", "0.65143985", "0.6485376", "0.6472667", "0.64673257", "0.6459025...
0.66914386
6
TODO Autogenerated method stub
public void start() { System.out.println("开启系统1"); }
{ "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 void stop() { System.out.println("结束系统1"); }
{ "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
lockScreenImageView.setAlpha(1.0f); /lockScreenImageView.animate() .alpha(1.0f) .translationX(0) .setDuration(getResources().getInteger(android.R.integer.config_mediumAnimTime)); shouldHide = true; shouldClick = true; hideIcon(); /if (params.x + iconWidth/2 <= screenWidth / 2) leftToRightAnimator.start(); else rightToLeftAnimator.start(); alphaAnimator.start();
public void showIcon(){ lockScreenImageView.animate() .alpha(1.0f) .setDuration(iconHidingAnimationTime); shiftIconToScreenSide(2, -delta/2, screenWidth - iconWidth - delta/2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View view) {\n if(view.getId() == R.id.icon1){\n if(iconId == 1){\n iconId = 0;\n findViewById(R.id.icon1).setAlpha(1);\n } else {\n iconId = 1;\n view.setAlpha(0.5f);\n }\n ...
[ "0.65333456", "0.6519225", "0.649921", "0.6463469", "0.64318717", "0.63530797", "0.628581", "0.62765765", "0.6239319", "0.6231104", "0.6223954", "0.6191322", "0.6176798", "0.6147191", "0.6124933", "0.61165166", "0.60839444", "0.599561", "0.5983472", "0.59533364", "0.5939821",...
0.7594674
0
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {...
[ "0.72473437", "0.7202402", "0.71960324", "0.7177793", "0.7108265", "0.7040525", "0.70388484", "0.70126176", "0.70101976", "0.6981143", "0.69461405", "0.694", "0.69346833", "0.69183874", "0.69183874", "0.6891571", "0.6884306", "0.68758994", "0.687534", "0.68627334", "0.6862733...
0.0
-1