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
However, the type of reference of b is Baap so b.h will always refer to Baap's h
public static void main(String[] args) { Baap b = new Beta(); //Here, b refers to an object of class Beta //so b.getH() will always call the overridden (subclass's method) System.out.println("Baap b = new Beta(): " + b.h/*2*/ + " " + b.getH())/*1*/; // also 1) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void b(ahd paramahd) {}", "public void b() {\n ((a) this.a).b();\n }", "public t b() {\n return a(this.a);\n }", "public abstract BoundType b();", "MagReference getHvRef();", "public void b(World paramaqu, BlockPosition paramdt, Block parambec)\r\n/* 27: */ {\r\n/* 28: 4...
[ "0.5760162", "0.56714755", "0.54906285", "0.5480289", "0.5438917", "0.5430128", "0.5428197", "0.54005575", "0.54005575", "0.5400227", "0.53536654", "0.52887976", "0.5283663", "0.5281222", "0.5277332", "0.5268807", "0.5264003", "0.52555037", "0.52462023", "0.52306324", "0.5228...
0.5199437
23
lnd must be ready
@Override public void work() { if (!lnd_.isRpcReady()) return; if (!started_) { // NOTE: start protocol to recover in-flight payments' state: // - get all payments w/ 'sending' state from db // - get all payments from lnd // - find 'sendin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void ready();", "@Override\n public boolean isReady() {\n return true;\n }", "@Override\n public boolean isReady() {\n return true;\n }", "void isReady();", "void isReady();", "@Override\r\n\t\t\tpublic boolean isReady() {\n\t\t\t\treturn false;\r\n\t\t\t}", "@Over...
[ "0.59829897", "0.5862426", "0.5836489", "0.58303344", "0.58303344", "0.57747763", "0.5713609", "0.5713609", "0.56896836", "0.56695676", "0.56695676", "0.5667692", "0.56576747", "0.5655243", "0.5630367", "0.55788666", "0.5569819", "0.5565842", "0.555607", "0.55503523", "0.5550...
0.0
-1
Compare values with largest number
public static void main(String[] args) { Scanner val = new Scanner(System.in); int num1 = val.nextInt(); int num2 = val.nextInt(); int num3 = val.nextInt(); val.close(); num1 = (num2 > num1)? num2:num1; num3 = (num3 > num1)? num3:num1; System.out.println(num3); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double largestNumber(double[] a) {\n\t\tdouble max = a[0];\n\t\tdouble no = 0;\n\t\tfor (int index = 1; index < a.length; index++) {\n\t\t\tif (max > a[index] && max > a[index + 1]) {\n\t\t\t\tno = max;\n\t\t\t\tbreak;\n\t\t\t} else if (a[index] > max && a[index] > a[index + 1]) {\n\t\t\t\tno = a[index];\n\t\t\t\t...
[ "0.6982909", "0.6863735", "0.67158955", "0.6662198", "0.66158956", "0.6591017", "0.6567861", "0.6518906", "0.6509642", "0.65014374", "0.64639837", "0.64552444", "0.6446018", "0.64428425", "0.6419264", "0.6408566", "0.6404517", "0.63789874", "0.6353375", "0.63469666", "0.63390...
0.0
-1
List list = new Vector(); List list = Collections.synchronizedList(new ArrayList());
public static void main(String[] args) { CopyOnWriteArrayList<String> list = new CopyOnWriteArrayList<>(); CopyOnWriteArraySet<String> set = new CopyOnWriteArraySet<>(); for (int i = 0; i < 30; i++) { new Thread(()->{ set.add(UUID.randomUUID().toString()); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unchecked\")\n \tpublic static <T> List<T> createConcurrentList() {\n \t\treturn (List<T>) Collections.synchronizedList(createArrayList());\n \t}", "public static void main(String[] args) {\n\t\tList<Integer> list=Collections.synchronizedList(new ArrayList<>());\n\t\t\n\t\t\n\t}", "private ...
[ "0.7255283", "0.71889967", "0.7147631", "0.6872272", "0.653382", "0.6502858", "0.6354238", "0.6206271", "0.6106977", "0.6044963", "0.6011033", "0.595015", "0.5949338", "0.5938644", "0.5907712", "0.58640844", "0.5856065", "0.58477587", "0.5832252", "0.5735379", "0.57306033", ...
0.5937854
14
boolean returnValue = true;
private synchronized void print4() { try { int jNum = 0; byte[] printText22 = new byte[10240]; byte[] oldText = setAlignCenter('0'); System.arraycopy(oldText, 0, printText22, jNum, oldText.length); jNum += oldText.length; oldText = setIn...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean getReturn();", "public boolean get_return(){\n return local_return;\n }", "boolean doSomething() {\n\t\treturn true;\n\t}", "boolean getVarReturn();", "boolean test();", "boolean test();", "boolean test();", "boolean test() {\n ...
[ "0.7621053", "0.76199734", "0.73888505", "0.7333712", "0.7181328", "0.7181328", "0.7181328", "0.71305335", "0.708852", "0.69825774", "0.6982471", "0.6982471", "0.6982471", "0.6982471", "0.69568735", "0.6927141", "0.6872325", "0.68402606", "0.6830471", "0.68129027", "0.6812902...
0.0
-1
A constructor that adds a reference to the parent JDA instance
LavoisierListener(JDA jda) { instance = jda; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Parent() {\n super();\n }", "Parent() {\n\t System.out.println(\"i am from Parent Class\");\n\t }", "public ReferenceDatabaseSettingsGUI(AdminJavaGUI parent) {\n initComponents();\n windowMenu(); \n parentFrame = parent;\n getParentReferenceDatabase...
[ "0.6358775", "0.6299422", "0.59706277", "0.59537953", "0.5919605", "0.581985", "0.57945395", "0.57553303", "0.57457966", "0.5745647", "0.5720582", "0.5698625", "0.56379545", "0.5595008", "0.55935496", "0.5574735", "0.55375904", "0.5523305", "0.55084", "0.5507268", "0.5505589"...
0.5978528
2
Load answer data into program
private void loadData() { try { URL source = new URL(CSV_URL); URLConnection connect = source.openConnection(); BufferedReader f = new BufferedReader(new InputStreamReader(connect.getInputStream())); header = f.readLine().split(","); // Replace third ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void readData() throws IOException {\n // as long as there are stuff left, keep reading by sets, which are\n // pairs of description + answer\n while (hasNext()) {\n counter++;\n readSet();\n }\n }", "public void readQuestion()\n\t{\n\t\tnumLines = (int)numScan.nextDouble();\n\t\tqu...
[ "0.61766297", "0.6150806", "0.5977766", "0.5976423", "0.59274155", "0.58778036", "0.58778036", "0.5844642", "0.58321124", "0.5796271", "0.5782386", "0.57492834", "0.5722469", "0.5642073", "0.5641588", "0.5635279", "0.55793136", "0.5528215", "0.55194646", "0.5514423", "0.54881...
0.5360267
31
A method to print out the help message
private void printHelpMessage(Message msg, String[] parameters) { // No parameters if(parameters.length == 1) { MessageEmbed embed = new MessageEmbed(null, "*Current Commands*", "**$help:** Display the help page for all commands." + "\n\n**$que...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void printHelp();", "private void printHelp() \n {\n Logger.Log(\"You have somehow ended up in this strange, magical land. But really you just want to go home.\");\n Logger.Log(\"\");\n Logger.Log(\"Your command words are:\");\n parser.showCommands();\n Logger.Log(\"You may view...
[ "0.8836242", "0.85331684", "0.8478557", "0.83347934", "0.8316819", "0.8307558", "0.8243017", "0.8239322", "0.8224657", "0.8204919", "0.8184006", "0.81792295", "0.8172836", "0.81561935", "0.8114366", "0.81087106", "0.81049263", "0.8079019", "0.80702466", "0.8050532", "0.804858...
0.0
-1
A method to get a random value within a range
private int getValue(int lowerBound, int upperBound) { int problemRange = upperBound - lowerBound + 1; return lowerBound + rng.nextInt(problemRange); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int customRandom(int range)\n {\n \tint random = (int)(Math.random()*10)%range;\n\t\n\treturn random;\n }", "private int _getRandomFromRange(int min, int max) {\n\t \n return min + random_.nextInt(max - min + 1);\n }", "public int getRandomNumberInInterval() {\n\t\treturn getRandomN...
[ "0.75973296", "0.73689204", "0.7355706", "0.73053247", "0.7255473", "0.71772355", "0.71658367", "0.70838153", "0.70410717", "0.70400995", "0.70379484", "0.70335454", "0.6987245", "0.6965747", "0.6964726", "0.69549984", "0.694985", "0.6938311", "0.69274753", "0.6925244", "0.69...
0.65674686
58
A method to query a USNCO problem
private void queryImage(Message msg, int actualYear, int actualProblem, int section) { // Query from GitHub String sectionVal; String sectionDescription; switch(section) { case 0: sectionVal = "locals"; sectionDescription = "Locals"; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Query query();", "public String susi(String query) throws Exception {\n\n \t\tthis.query = query;\n \t\tif (this.query != \"\") {\n \t\t\tString url = this.susiUrl + \"?q=\" +this.query;\n\n \t\t\tURL urlObj = new URL(url);\n HttpURLConnection con = (HttpURLConnection) urlObj.openConnection();\n\n ...
[ "0.55613244", "0.5428159", "0.541852", "0.5391133", "0.53482777", "0.5298249", "0.5256226", "0.5215686", "0.52028286", "0.5165698", "0.5151723", "0.51313573", "0.5103518", "0.50899047", "0.5059625", "0.5040657", "0.50326234", "0.50304765", "0.50262433", "0.50065285", "0.49816...
0.48901302
31
A method to reset year, problem, and restriction parameters to their original value
private void resetParams() { lowerYear = 1999; upperYear = 2020; yearRestriction = false; lowerProblem = 1; upperProblem = 60; problemRestriction = false; partTwo = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setYear(int _year) { year = _year; }", "public void inputTempForYear() {\n\t\t\n\t\tfor (int i=0; i<12; i++)\n\t\t\tinputTempForMonth(i);\n\t}", "public void setYear(int year){\r\n\t\ttry{\r\n\t\t\tif(year>=1900)\r\n\t\t\tthis.year = year;\r\n\t\t\telse\r\n\t\t\t\tthrow new cardYearException();\r\n...
[ "0.65275615", "0.6162822", "0.6144697", "0.61259294", "0.6055855", "0.6013104", "0.6007035", "0.59928924", "0.59585834", "0.59047645", "0.58721936", "0.58694136", "0.5855274", "0.5848585", "0.58383906", "0.58254445", "0.57638866", "0.5758579", "0.5756033", "0.57522064", "0.57...
0.82811934
0
A method to restrict the year range problems are queried from
private int restrictYear(Message msg, String parameter, int section) { int[] years = setYearRestriction(msg, parameter, section); if (years[0] == ERROR_CODE[0]) { return -1; } yearRestriction = true; lowerYear = years[0]; upperYear = years[1]; return...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String dateRangeRestriction(String startDate, String endDate){\r\n String restriction = \"\";\r\n String[] startDateParts = startDate.split(\"/\");\r\n String[] endDateParts = endDate.split(\"/\");\r\n int prevYear = Integer.parseInt(endDateParts[0]) - 1; //year previus t...
[ "0.6461501", "0.64567184", "0.6359415", "0.6349753", "0.63127935", "0.61866397", "0.6178176", "0.60279995", "0.6016391", "0.5997309", "0.5984758", "0.5984758", "0.5975242", "0.5975242", "0.5975242", "0.5932926", "0.58727413", "0.5850893", "0.5844806", "0.5839853", "0.5825709"...
0.74214554
0
A method to restrict the problem range problems are queried from
private int restrictProblem(Message msg, String parameter) { int[] problems = setProblemRestriction(msg, parameter); if (problems[0] == ERROR_CODE[0]) { return -1; } problemRestriction = true; lowerProblem = problems[0]; upperProblem = problems[1]; r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Range controlLimits();", "@Override\n public boolean isRange() {\n return false;\n }", "private void setDefaultValidRange ()\r\n\t{\r\n\t\tm_lowerBounds = Integer.MIN_VALUE;\r\n\t\tm_upperBounds = Integer.MAX_VALUE;\r\n\t}", "void calculateRange() {\n //TODO: See Rules\n }", "Limits limits()...
[ "0.6051895", "0.59386593", "0.574081", "0.5694922", "0.5655285", "0.56469244", "0.5617134", "0.5489708", "0.5472333", "0.5461008", "0.5432687", "0.54020053", "0.5387173", "0.5363844", "0.53595334", "0.5352464", "0.53450567", "0.5326257", "0.5324107", "0.5307986", "0.528972", ...
0.6296766
0
A method to restrict the test (local, part I, part II) our problems are queried from
private int restrictSection(Message msg, String parameter) { int sec = Integer.parseInt(parameter); if(sec > 2) { MessageChannel ch = msg.getChannel(); ch.sendMessage("`Error: Invalid query [section not 0-2]. Query terminated.`").queue(); return -1; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean needsProblem();", "@Test\n public void testAircraftPartNoNotApplicable777() throws Exception {\n\n String lTaskApplSqlLdesc = \"rootpart.part_no_oem <> 777\";\n\n // verify on wing engine 777 is not applicable\n int lResult = execute( ON_WING_ENGINE_777, lTaskApplSqlLdesc );\n ...
[ "0.5759807", "0.5632411", "0.5592196", "0.55807394", "0.55704653", "0.5568658", "0.54862475", "0.54737324", "0.54440826", "0.5433054", "0.5429019", "0.54279935", "0.54256517", "0.53538674", "0.5329615", "0.532692", "0.53252614", "0.53053427", "0.5287198", "0.52184004", "0.520...
0.5123393
25
A method to query a problem based on user input
private void queryProblems(Message msg, String[] parameters) { if(data.isEmpty()) loadData(); // Bounds on the problem number and year number resetParams(); int section = -1; int currentOption = -1; int success = 0; for(int i = 1; i < parameters.len...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String userInput(String question);", "private static String getQuery(String query) {\n\t\tScanner reader = new Scanner(System.in);\n\t\tString state = \"\";\n\t\twhile (true) {\n\t\t\tSystem.out.println(\"Please Type in a \" + query + \":\");\n\t\t\ttry {\n\t\t\t\tstate = reader.nextLine();\n\t\t\t\treturn state...
[ "0.61423576", "0.5864194", "0.5753262", "0.5723401", "0.56442285", "0.56279784", "0.56262416", "0.55856955", "0.55575085", "0.55325246", "0.55118245", "0.55029655", "0.5493009", "0.5487937", "0.5478411", "0.54781795", "0.54720646", "0.54460365", "0.5435567", "0.54047483", "0....
0.6413918
0
A method to handle commands overall
private void handleCommand(Message msg, String commands) { String[] tokens = commands.split(" "); String command = tokens[0]; switch(command) { case "query": queryProblems(msg, tokens); break; case "help": printHelpMessage(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void handleCommands() {\n for (Command c : commands) {\n try {\n if (!game.isPaused()) {\n switch (c) {\n case INTERACT:\n game.interact();\n break;\n case...
[ "0.7654008", "0.7396491", "0.73099214", "0.71171105", "0.70430857", "0.7041614", "0.70197445", "0.70138", "0.69875056", "0.69785947", "0.69703794", "0.6970316", "0.69506824", "0.690399", "0.6879779", "0.68422073", "0.6832724", "0.67766094", "0.677409", "0.6726003", "0.6723890...
0.68986565
14
Handle message sending and receiving
@Override public void onMessageReceived(MessageReceivedEvent event) { if(event.getAuthor().isBot()) return; Message msg = event.getMessage(); String content = msg.getContentRaw(); if(content.charAt(0) == PREFIX) { handleCommand(msg, content.substring(1)); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void messageHandler(String read){\n\n try {\n buffer.append(read);\n }catch (MalformedMessageException e){\n System.out.println(\"[CLIENT] The message received is not in XML format.\");\n }\n\n while(!buffer.isEmpty()) {\n if (buffer.getPong()) p...
[ "0.74563", "0.7406282", "0.73414356", "0.7280701", "0.7273313", "0.7231558", "0.7195365", "0.7180781", "0.69980264", "0.69897616", "0.6987571", "0.69682205", "0.69441956", "0.69424266", "0.69161946", "0.69100785", "0.6900865", "0.6873043", "0.68487865", "0.6822763", "0.681170...
0.0
-1
Add "." to start and end of pattern to fully match any string containing the pattern
@Override public Stream<String> filter(Stream<String> stringStream, String pattern) { String regex = ".*" + pattern + ".*"; return stringStream.filter(str -> { return !Pattern.compile(regex).matcher(str).matches(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String regex() {\n final List<String> keys = new LinkedList<>();\n for (final String key : this.template.split(\"\\\\.\")) {\n if (key.equals(\"*\")) {\n keys.add(\"\\\\w+\");\n } else {\n keys.add(key);\n ...
[ "0.5914358", "0.52938", "0.5281211", "0.52144426", "0.5166466", "0.51592064", "0.51315033", "0.5123095", "0.5097771", "0.5090073", "0.5039961", "0.49998975", "0.49818164", "0.49716192", "0.49581355", "0.4957681", "0.49394077", "0.49049667", "0.48970428", "0.4896198", "0.48935...
0.0
-1
/ checked out cust flush single rooms flush dob flush prm flush sut del cust
public static void main(String[] args) throws Exception, IOException { DateTimeFormatter f = DateTimeFormatter.ofPattern("dd/MM/yyyy"); BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); Map<String, Custo> c = null; Map<String, Custo> sin = null; Map<String, Custo> dobl = null; Map<St...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void flush(){\r\n\t\tSystem.out.println(\"\\nCreating a customer by flush:\");\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\tEntityTransaction tx = em.getTransaction();\r\n\t\tCustomer2 c1 = new Customer2(\"Selim\", \"Aslan\");\r\n\t\ttx.begin();\r\n\t\tem.persist(c1);\r\n\t\tlong id = c1.getC...
[ "0.63320124", "0.557104", "0.55518925", "0.5459013", "0.5418892", "0.5370092", "0.5326914", "0.5319819", "0.5300342", "0.52911866", "0.52776676", "0.5275197", "0.5236168", "0.5233664", "0.52224684", "0.5213094", "0.52072126", "0.5191101", "0.5190921", "0.5186526", "0.5179781"...
0.0
-1
Instantiate this function with an infinite width.
public AllDifferent() { this(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Plain(int width) {\n this.width = width;\n }", "public FixedWidthFunction(GroupingExpression exp, Number width) {\n this(null, null, exp,\n width instanceof Double ? new DoubleValue(width.doubleValue()) : new LongValue(width.longValue()));\n }", "double getNewWidth();", ...
[ "0.64823556", "0.5968908", "0.5893348", "0.58884764", "0.5641955", "0.5613188", "0.5593008", "0.5591713", "0.55780673", "0.5537561", "0.5511492", "0.54675525", "0.54661113", "0.54651093", "0.54115677", "0.5406519", "0.5383397", "0.5383397", "0.5379138", "0.5377192", "0.537679...
0.0
-1
if a duplicate entry has been found and the width is infinite.
@Override public Boolean getValue(Object x) { if (m_falseCount > 0 && m_width <= 0) return false; allDifferent = true; // if duplicate entries were found in previous calls if (m_falseCount > 0) { m_falseCount--; allDifferent = false; } // compare this entry to every ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\t\t\t\tprotected boolean removeEldestEntry(Map.Entry e)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\treturn size()>5;\r\n\t\t\t\t\t}", "boolean hasWidth();", "boolean hasWidth();", "boolean hasWidth();", "public boolean removeEldestEntry(Map.Entry entry){\n return size() > capacity;\n ...
[ "0.5627829", "0.5563654", "0.5563654", "0.5563654", "0.5423416", "0.54012316", "0.53828716", "0.53736985", "0.5370324", "0.5356995", "0.5322876", "0.53048307", "0.52965814", "0.5267565", "0.5233001", "0.52117383", "0.51820254", "0.5158915", "0.5151776", "0.5139773", "0.513675...
0.0
-1
this li1ne number is 0 base.
private int getLineNumber(@NonNull String contents, int offset) { String preContents = contents.substring(0, offset); String remContents = preContents.replaceAll("\n", ""); return preContents.length() - remContents.length(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int getNumberBase(String n1){\n return Integer.parseUnsignedInt(n1, base);\n }", "public void changeToBaseOne() {\r\n\t\tthis.numberBase = 1;\r\n\t}", "public String negBase2(int n) throws Exception {\r\n\t\t String binaryStr=\"\";\r\n\r\n\t\t int minValue = -256;//allowed min decimal\r\n\...
[ "0.6643646", "0.6513608", "0.6176411", "0.61259305", "0.5929572", "0.58271587", "0.5821877", "0.580789", "0.57892466", "0.5766924", "0.57455724", "0.57062405", "0.56925964", "0.5682736", "0.5681638", "0.56375444", "0.5636765", "0.5636586", "0.5630927", "0.5622785", "0.5604633...
0.0
-1
this column number is 0 base.
private int getColumnNumber(@NonNull String contents, int offset) { String preContents = contents.substring(0, offset); String[] preLines = preContents.split("\n"); int lastIndex = preLines.length -1; return preContents.endsWith("\n") ? 0 : preLines[lastIndex].length(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getIntialSortedColumn()\n { \n return 0; \n }", "@Override\n\tpublic int getNumColumns() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int getNumericCode() {\n\t\treturn 0;\n\t}", "public Column(int num)\n {\n colNum = num;\n }", "private int getColumn() {\n re...
[ "0.6459548", "0.6433609", "0.63993835", "0.6370728", "0.6113064", "0.61004806", "0.60702616", "0.60422206", "0.6034876", "0.6025026", "0.5995975", "0.5980472", "0.5980472", "0.5978248", "0.5962278", "0.5929069", "0.5922747", "0.5909779", "0.59080815", "0.5898374", "0.58811396...
0.0
-1
Source of biological unit. Mostly: SYNTHETIC
public StrColumn getSrcMethod() { return delegate.getColumn("src_method", DelegatingStrColumn::new); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getSource();", "public abstract String getSource();", "public String getSource ();", "public String getSource();", "public String getSource() {\n/* 312 */ return getValue(\"source\");\n/* */ }", "public String get_source() {\n\t\treturn source;\n\t}", "java.lang.String getSource();", ...
[ "0.6335917", "0.6234252", "0.62193584", "0.6158671", "0.6150574", "0.6111239", "0.6029425", "0.6029425", "0.5974726", "0.5967423", "0.59562695", "0.59553146", "0.5931785", "0.59167606", "0.5890848", "0.58608466", "0.58188987", "0.5798793", "0.5783144", "0.57827646", "0.575245...
0.0
-1
Spring Data ElasticSearch repository for the Pricing entity.
public interface PricingSearchRepository extends ElasticsearchRepository<Pricing, Long> { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface ServicePriceSearchRepository extends ElasticsearchRepository<ServicePrice, Long> {\n}", "public interface ProductPricingRepository extends JpaRepository<ProductPricing, Long> {\n}", "public interface GroupRateSearchRepository extends ElasticsearchRepository<GroupRate, Long> {\n}", "@Suppress...
[ "0.7286061", "0.702248", "0.678128", "0.6780915", "0.6644016", "0.6632004", "0.6592339", "0.65712065", "0.6555739", "0.6553429", "0.65470034", "0.6468063", "0.6438855", "0.643353", "0.6415669", "0.6399343", "0.6388844", "0.6373593", "0.63693845", "0.6359977", "0.6359254", "...
0.780306
0
/ This endpoint creates a repository with an starter tag and an optional develop branch.
@RequestMapping(method = RequestMethod.POST, value = "/startRepo") public String initializeRepo(@RequestBody CreateRepoRequestTemplate createRepoRequestTemplate) throws ResourceNotFoundException, BadRequestException { return gitLabService.initializeRepo(createRepoRequestTemplate); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "WithCreate withRepoUrl(String repoUrl);", "@Override\n public CreateRepositoryResult createRepository(CreateRepositoryRequest request) {\n request = beforeClientExecution(request);\n return executeCreateRepository(request);\n }", "TRepo createRepo();", "public CompletableFuture<CreateRepo...
[ "0.64799607", "0.61946714", "0.5942678", "0.5871605", "0.58289343", "0.58199525", "0.5801379", "0.5650184", "0.5566602", "0.54939413", "0.54794806", "0.54685163", "0.5384734", "0.5363201", "0.53159964", "0.5276887", "0.5116236", "0.51124275", "0.502043", "0.48835814", "0.4875...
0.5987682
2
TODO Autogenerated method stub
@Override public void editPost(Integer postID, String message, String posterName, String[] imageName, String[] imageID) { }
{ "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 editThread(Integer threadID, String topic, String message, String posterName, String[] imageName, String[] imageID) { }
{ "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 createPost(Integer postID, Integer parentPostID, String posterName, String message, String[] imageName, String[] imageID) { }
{ "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
Process the attack in the animal through the strategy and recalculates the available life power.
public final void receiveAttack(Weapon weapon) { this.availableLifePower = damageStrategy.processAttack(this, weapon); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void resolve(){\n logger.log(Level.FINE,attacker.getName()+\" withering attacked \"+defender.getName());\n AttackState state=new AttackState();\n state.weaponDamage=weapon.getDamage();\n state.initialAttackpool=baseAttackdice+baseAccuracy-woundpenalty;\n attacker.declareWi...
[ "0.67076623", "0.66352063", "0.6561955", "0.63321954", "0.63310575", "0.63203114", "0.62993586", "0.6287019", "0.62765193", "0.614935", "0.61477584", "0.6080914", "0.6074547", "0.6058662", "0.60457003", "0.6042471", "0.60414237", "0.6028139", "0.60210776", "0.60148257", "0.60...
0.5603315
88
Creates an authorized Credential object.
public static Credential authorize() throws IOException { // Load client secrets. InputStream in = YouTubeDownloader.class.getResourceAsStream("/youtube/downloader/resources/clients_secrets.json"); GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStrea...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "AbstractCredentialModel createBasicCredential(String username, String password);", "protected static Credentials getServiceCredentials() throws AnaplanAPIException {\n if (authType == AUTH_TYPE.CERT) {\n try {\n return new Credentials(getCertificate(), getPrivateKey());\n } catch (Exception e...
[ "0.66188663", "0.6506624", "0.638938", "0.62834114", "0.6251041", "0.62424284", "0.61427015", "0.6054992", "0.6031464", "0.6030351", "0.60015774", "0.59658563", "0.5901143", "0.5878223", "0.586457", "0.5840592", "0.5813233", "0.5796609", "0.5740635", "0.57173693", "0.5711749"...
0.58576566
15
Build and return an authorized API client service, such as a YouTube Data API client service.
public static YouTube getYouTubeService() throws IOException { Credential credential = authorize(); return new YouTube.Builder( HTTP_TRANSPORT, JSON_FACTORY, credential) .setApplicationName(APPLICATION_NAME) .build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private YouTube getService() throws GeneralSecurityException, IOException {\n final NetHttpTransport httpTransport = GoogleNetHttpTransport.newTrustedTransport();\n return new YouTube.Builder(httpTransport, JSON_FACTORY, null)\n .setApplicationName(APPLICATION_NAME)\n .build();\n }", "public...
[ "0.63384336", "0.6336757", "0.6198538", "0.6143181", "0.6020759", "0.5928088", "0.58776295", "0.58676696", "0.5846059", "0.5843613", "0.58411926", "0.58395433", "0.5824829", "0.580408", "0.5759715", "0.5748068", "0.57446945", "0.5728541", "0.57241565", "0.5689256", "0.5688689...
0.5493431
35
Use Comparator.comparing and thenComparing to sort the list by balance and then by ownerName Collect your stream into a list and print the sorted result to the console
public static void main(String[] args) { List<Account> accounts = new ArrayList<Account>() { { add(new Account("Bob", 5000, 1001)); add(new Account("Jim", 10000, 1002)); add(new Account("Bruce", 5300, 1003)); add(new Account("Li", 12000, 1004)); add(new Account("Sam", 9000, 1005)); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n ArrayList<BankAccount> accounts = makeBankingSystem();\n \n Collections.sort(accounts, BankAccount.createComparatorByBalance(false));\n for (BankAccount c: accounts){\n System.out.println(c.getName(c)+\", \"+c.getBalance(c));\n ...
[ "0.7342798", "0.62204266", "0.61799073", "0.61594415", "0.5991168", "0.5972254", "0.59635943", "0.5947595", "0.5941119", "0.5855189", "0.5837831", "0.5768275", "0.57673025", "0.5755676", "0.57053995", "0.569247", "0.56918305", "0.5656489", "0.5646564", "0.56400543", "0.559406...
0.68962926
1
Runs when the job is started
@Override public boolean onStartJob(JobParameters job) { Log.d(LOG_TAG, "Sync job started..."); new Thread(new SyncRunnable(job)).start(); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void beforeJobExecution() {\n\t}", "private void scheduleJob() {\n\n }", "@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tSystem.out.println(\"onStart\");\n\t\t\t\tif(listener!=null) listener.onMessage(\"onStart\");\n\t\t\t\tisRun = true;\n\t\t\t}", "private void startJobs() {\n List<Jo...
[ "0.7282081", "0.708519", "0.7032158", "0.6967531", "0.6950059", "0.6950059", "0.69261444", "0.6897287", "0.688294", "0.68201", "0.6818587", "0.67837304", "0.67837304", "0.6782441", "0.6774908", "0.6769945", "0.67609227", "0.67575425", "0.6755716", "0.67514807", "0.6741714", ...
0.6722545
30
Runs when the job is stopped
@Override public boolean onStopJob(JobParameters job) { Log.d(LOG_TAG, "Sync job stopped"); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void stop() {\n \t\t\tif (isJobRunning) cancel();\n \t\t}", "@Override\n public boolean onStopJob(JobParameters job) {\n return true;\n }", "@Override\n protected void onStop() {\n stopService(new Intent(this, MyJobScheduler.class));\n super.onStop();\n }", "@Override\...
[ "0.7679481", "0.7384585", "0.7330686", "0.73277533", "0.73160166", "0.7285944", "0.727875", "0.72000724", "0.72000724", "0.7185586", "0.71746755", "0.7173771", "0.7158877", "0.71486473", "0.7144053", "0.71437716", "0.71392363", "0.70970917", "0.70948863", "0.70948863", "0.706...
0.70090365
46
When the sync has completed in a background thread, calls jobFinished()
private void onSyncFinished(JobParameters job) { jobFinished(job, false); // Is a reschedule needed? Log.d(LOG_TAG, "Sync job finished"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void jobFinished(Progress job) {\n }", "protected void finished(){\n if (doFilterUpdate) {\n //runFilterUpdates();\n }\n \n double groupTotalTimeSecs = (System.currentTimeMillis() - (double) groupStartTime) / 1000;\n log.info(\"Job \"+id+\" finished \" /...
[ "0.7151507", "0.7034199", "0.69863266", "0.6974351", "0.68917555", "0.6668809", "0.65870774", "0.6490893", "0.6362296", "0.6340109", "0.6321839", "0.6309747", "0.6287309", "0.6278736", "0.6278736", "0.62505555", "0.6249185", "0.620791", "0.6179291", "0.6169736", "0.6156029", ...
0.79219
0
Dispatches a sync for as soon as the network is available
public static void dispatchSyncNow(Context context) { FirebaseJobDispatcher dispatcher = new FirebaseJobDispatcher(new GooglePlayDriver(context)); Job syncJob = dispatcher.newJobBuilder() .setTag(SYNC_TAG) .setService(FirebaseSyncJobService.class) .setTrigger(Trigger....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void callSync() {\n\n }", "public void requestExtraSync()\n {\n executor.requestExtraSync();\n }", "private void invokeSync()\n \t{\n if (iDeviceList.size() == 0)\n {\n System.out.println(\"No devices found, so nothing to test\");\n ...
[ "0.66346747", "0.643447", "0.61977726", "0.61440086", "0.61266696", "0.5971272", "0.5899578", "0.5873551", "0.57837105", "0.5738586", "0.5730113", "0.5719214", "0.57124233", "0.5709851", "0.5683954", "0.5662162", "0.56315243", "0.5574711", "0.5574383", "0.55683446", "0.554105...
0.5435903
33
Dispatches a sync for midnight on the day it was triggered; The sync will run as soon as the network is available after midnight
public static void dispatchScheduledSync(Context context) { FirebaseJobDispatcher dispatcher = new FirebaseJobDispatcher(new GooglePlayDriver(context)); Job syncJob = dispatcher.newJobBuilder() .setTag(SYNC_TAG_SCHEDULED) .setService(FirebaseSyncJobService.class) .set...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void dispatchSyncNow(Context context) {\n FirebaseJobDispatcher dispatcher = new FirebaseJobDispatcher(new GooglePlayDriver(context));\n Job syncJob = dispatcher.newJobBuilder()\n .setTag(SYNC_TAG)\n .setService(FirebaseSyncJobService.class)\n .setTrigge...
[ "0.63342047", "0.5996821", "0.5919967", "0.589004", "0.5886641", "0.58731973", "0.58548844", "0.58517325", "0.58481634", "0.5836042", "0.5832729", "0.5803721", "0.5782976", "0.5780491", "0.5766398", "0.5766398", "0.5766398", "0.5766398", "0.5766398", "0.5766398", "0.5760471",...
0.6004485
1
TODO Autogenerated method stub
@Override protected JsonUtil getJsonUtil() { return super.getJsonUtil(); }
{ "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
= new XStream(/new DomDriver()/);
public UE2_0_3Serializer(){ xstream = new XStream(/*new DomDriver()*/); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static XStream createXStream(){\r\n\t\tXStream xstream = new XStream();\r\n\t\txstream.alias(\"configuration\", FilterConfig.class);\r\n\t\txstream.alias(\"filter\", FilterEnumeration.class);\r\n\t\txstream.alias(\"displayable\", DisplayableValue.class);\r\n\t\treturn xstream;\r\n\t}", "private XStream b...
[ "0.6437617", "0.61609674", "0.6097178", "0.6033878", "0.5750813", "0.56777906", "0.56417257", "0.56292987", "0.5612706", "0.5545476", "0.5510748", "0.54784656", "0.54489815", "0.5396621", "0.53856915", "0.53856915", "0.53856915", "0.5377515", "0.5365683", "0.5359267", "0.5346...
0.7016496
0
overridden in subclasses which handle StsObjects (DBStsClassType) and StsObject arrays (DBArrayType)
public void addToModel(Object object, StsModel model) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test public void getBaseTypeShouldReturnCorrectType() throws SQLException {\n\t\tList<Object> list = new ArrayList<>();\n\t\tArray array;\n\t\tfor (int type : Array.TYPES_SUPPORTED) {\n\t\t\tarray = new ListArray(list, type);\n\t\t\tassertEquals(type, array.getBaseType());\n\t\t}\n\t}", "public Object[] getOrac...
[ "0.62701625", "0.6001787", "0.59190506", "0.5896174", "0.56076545", "0.55986786", "0.5593873", "0.5554742", "0.5491266", "0.5434515", "0.5389556", "0.5347643", "0.5283941", "0.52790344", "0.5270215", "0.526104", "0.52586496", "0.5224994", "0.52160054", "0.5215911", "0.5214756...
0.0
-1
initilize the MDP space
public MarkovDecisionProcess(int totalWorkloadLevel, int totalGreenEnergyLevel, int totalBatteryLevel, double prob[][][][], int maxTimeInterval) { this.totalWorkloadLevel = totalWorkloadLevel; this.totalGreenEnergyLevel = totalGreenEnergyLevel; this.totalBatteryLevel = totalBatteryLevel; this.prob = prob; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initialize()\n\t{\n\t\tfor(int i = 0 ; i < SOM.length; i++)\n\t\t{\n\t\t\tfor(int j=0; j < SOM[0].length; j++)\n\t\t\t{ \n\t\t\t\tSOM[i][j] = new Node(INPUT_DIMENSION,i,j);\n\t\t\t}\n\t\t}\n\t\t\n\t\tSOM_HORIZONTAL_LENGTH = SOM[0].length;\n\t\tSOM_VERTICAL_LENGTH = SOM.length;\n\t}", "protected void...
[ "0.6601136", "0.6157716", "0.61171573", "0.6083329", "0.60725474", "0.60689014", "0.6026129", "0.59705883", "0.59691113", "0.5969023", "0.5964641", "0.5938181", "0.5920524", "0.5860429", "0.586032", "0.5830627", "0.58145696", "0.5762541", "0.57598805", "0.57218087", "0.570203...
0.0
-1
Identify the possible actions at a time interval
public void compileActions(int totalWorkloadLevel, int totalBatteryLevel) { //possible actions possibleActions = new Vector(totalWorkloadLevel * totalBatteryLevel); for(int i = 0; i < totalWorkloadLevel; i++ ) { for(int j = 0; j < totalBatteryLevel; j++) { possibleActions.add(new Action(i ,j)); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected IntervalAction action() {\n CCSize s = Director.sharedDirector().winSize();\n return MoveBy.action(duration, s.width-ADJUST_FACTOR,0);\n }", "public java.lang.String getTimeLimitAction();", "private void getAllTotesCenterTimer()\r\n\t{\r\n\t\tswitch(autoStep)\r\n\t\t{\r\n\t\t\tcase 0...
[ "0.62615496", "0.6211173", "0.6034601", "0.5910164", "0.58662784", "0.5834497", "0.5767944", "0.57226425", "0.5710012", "0.5602206", "0.55739397", "0.5552535", "0.5488966", "0.54438037", "0.5385042", "0.5383318", "0.53721845", "0.53507763", "0.5339337", "0.5339281", "0.533384...
0.0
-1
Find the reachable states. The states with 0 probability are not considered. The following 4 methods are related to states
public void compileStates(int timeinterval) { if(timeinterval == -1) { //Add initial State reachableStates.add(initialState); this.numReachableState = 1; }else{ State s; int index = 0; reachableStates.clear(); for(int i = 0; i < totalWorkloadLevel; i++) { for(int j = 0; j < to...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Set<Integer> getStatesFromWichReachableAccepting(LabelledTransitionSystem ret) {\n\t\tMap<Integer, Set<Integer>> reversedReachable = this.computeInverseTransitionRelation(ret);\n\n\t\tSet<Integer> reachable = new HashSet<>();\n\n\t\tlogger.debug(\"Accepting states: \" + ret.getAccepting());\n\t\tSet<Integ...
[ "0.6960649", "0.6578546", "0.6324636", "0.63120854", "0.62913", "0.6270745", "0.6253968", "0.62040216", "0.6181632", "0.6178198", "0.61097604", "0.59901774", "0.5923785", "0.59135926", "0.5866732", "0.5804204", "0.5799127", "0.5793137", "0.5774621", "0.5748617", "0.5748397", ...
0.614467
10
The following methods are related to actions.
public void setAction(State s, Action a) { if(s.isTerminated()) return ; s.action = a; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "@Override\n\tpublic void action() {\n\n\t}", "public void a...
[ "0.7511674", "0.7511674", "0.7511674", "0.7497134", "0.7301133", "0.7022942", "0.701082", "0.701082", "0.6969324", "0.6966433", "0.6960882", "0.6960882", "0.6960882", "0.6960882", "0.6960882", "0.6960882", "0.6960882", "0.6960882", "0.69602305", "0.6944075", "0.6889046", "0...
0.0
-1
To validate the transit is possible, e.g. using some actions can reach out of boundary. The next state should belong to [0, maxLevel)
public boolean isPossibleTransit(State s, Action a) { // int newWorkloadLevel = s.getWorkload() + a.getChangedWorkload(); int maxBatteryLevel = getNextBatteryLevel(s, a); int maxActionLevel = s.getWorkload(); if((a.getChangedWorkload() <= maxActionLevel) && (a.getBatteryUsed() <= maxBatteryLevel)) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isFeasibleState(int[] state){\n if((state[0] <= totalMissionaries && state[0] >= 0)&&(state[1] <= totalCannibals && state[1] >= 0)) {\n return true;\n }\n return false;\n }", "private boolean isLegalState(int[] state){\n int[] stat...
[ "0.6315222", "0.6267551", "0.582121", "0.57448274", "0.56248367", "0.55508405", "0.54710585", "0.5460037", "0.5436863", "0.543296", "0.5431234", "0.5420635", "0.54013866", "0.53622645", "0.535507", "0.53387207", "0.53198844", "0.5304792", "0.5287709", "0.5286305", "0.5277106"...
0.60037935
2
Handle when the module create
private void onModuleCreate(HTMLCanvasElement element, Display.Preference preference) { Window.current().getDocument().addEventListener("visibilitychange", evt -> { if (isHidden()) { mLifecycle.onPause(); } else { mLifecycle.onResume(); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Module createModule();", "private void onModuleCreate(Display.Preference preference) {\n //!\n //! Create display module.\n //!\n final GLFWFramebufferSizeCallback resize = GLFWFramebufferSizeCallback.create((window, width, height) ->\n {\n mLifecycle.onResize(width,...
[ "0.68034625", "0.6711702", "0.6527934", "0.6393818", "0.63243264", "0.6164201", "0.6121402", "0.6116891", "0.6078842", "0.6066631", "0.6059779", "0.6052971", "0.6052953", "0.6026041", "0.6000761", "0.5979037", "0.5970702", "0.5948964", "0.59469575", "0.5939309", "0.5925476", ...
0.62566835
5
Handle when the module destroy
private void onModuleDestroy() { //! //! Handle the destroy notification. //! mLifecycle.onPause(); mLifecycle.onDispose(); //! //! Unload resource module. //! mResources.onModuleDestroy(); mResources.unloadAll(); //! //!...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void onModuleDestroy() {\n //!\n //! Handle the destroy notification.\n //!\n mLifecycle.onPause();\n mLifecycle.onDispose();\n\n //!\n //! Unload resource module.\n //!\n mResources.onModuleDestroy();\n mResources.unloadAll();\n\n ...
[ "0.8181511", "0.75969905", "0.7558324", "0.7558324", "0.7441234", "0.7431554", "0.74286646", "0.74250126", "0.7419767", "0.74126613", "0.73860735", "0.7385367", "0.73809224", "0.7374312", "0.7363231", "0.7361256", "0.73571324", "0.73571324", "0.73571324", "0.73571324", "0.735...
0.81478137
1
Handle when the module update
private void onModuleUpdate() { if (mTime == -1L) { mTime = System.currentTimeMillis(); } //! //! Render until the display is not active. //! onModuleRender(System.currentTimeMillis()); //! //! Request to render again. //! onA...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\t\t\tpublic void onUpdateFound(boolean newVersion, String whatsNew) {\n\t\t\t\t\t}", "public void receivedUpdateFromServer();", "protected void onUpdate() {\r\n\r\n\t}", "private void checkForUpdates() {\n UpdateManager.register(this);\n }", "private void checkForUpdates() {\n ...
[ "0.6469783", "0.64249146", "0.6423273", "0.62885034", "0.62885034", "0.62644833", "0.6256242", "0.62548566", "0.62518567", "0.62348956", "0.6197051", "0.6189723", "0.61573714", "0.6141606", "0.61268306", "0.61223435", "0.61118865", "0.6096208", "0.6074734", "0.6072602", "0.60...
0.6269706
5
Handle when the module render
private void onModuleRender(long time) { //! //! Handle the render notification. //! mLifecycle.onRender((time - mTime) / 1000.0f); //! //! Update the new delta time. //! mTime = time; //! //! Update the render. //! //! NO...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onModuleLoad() {\n }", "protected void render(){}", "private void onModuleUpdate() {\n if (mTime == -1L) {\n mTime = System.currentTimeMillis();\n }\n\n //!\n //! Render until the display is not active.\n //!\n onModuleRender(Sy...
[ "0.66186696", "0.6570539", "0.65294087", "0.6513774", "0.6488292", "0.6309487", "0.6306284", "0.62951434", "0.6203096", "0.6157021", "0.612381", "0.61110157", "0.6097233", "0.60969275", "0.60931396", "0.6078594", "0.6070372", "0.6069029", "0.6024401", "0.601679", "0.59685624"...
0.64993
4
Construct the conditional element from an XML node
public SCondition(Node node) { super(node); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ConditionalExpression createConditionalExpression();", "public Instruction startConditionalNode(final PsiElement element, final PsiElement condition, final boolean result) {\n final ConditionalInstruction instruction = new ConditionalInstructionImpl(this, element, condition, result);\n addNode(instruction)...
[ "0.6060902", "0.59389997", "0.5817393", "0.5599313", "0.5585734", "0.543987", "0.53712994", "0.5344337", "0.5213824", "0.5054645", "0.5044381", "0.49947184", "0.4972317", "0.4969138", "0.4935641", "0.493025", "0.48860538", "0.4874012", "0.48736987", "0.48621866", "0.4859078",...
0.5184418
9
/ access modifiers changed from: protected
public void updateBackground(int i, int i2, int i3, int i4) { if (this.mLauncher.getDeviceProfile().isVerticalBarLayout()) { View revealView = getRevealView(); int i5 = i; int i6 = i2; int i7 = i3; int i8 = i4; InsetDrawable insetDrawable =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override...
[ "0.7375736", "0.7042321", "0.6922649", "0.6909494", "0.68470824", "0.6830288", "0.68062353", "0.6583185", "0.6539446", "0.65011257", "0.64917654", "0.64917654", "0.64733833", "0.6438831", "0.64330196", "0.64330196", "0.64295477", "0.6426414", "0.6420484", "0.64083177", "0.640...
0.0
-1
/ access modifiers changed from: protected
public void onFinishInflate() { super.onFinishInflate(); getContentView().setOnFocusChangeListener(new OnFocusChangeListener() { public void onFocusChange(View view, boolean z) { if (z) { AllAppsContainerView.this.mAppsRecyclerView.requestFocus(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override...
[ "0.7375736", "0.7042321", "0.6922649", "0.6909494", "0.68470824", "0.6830288", "0.68062353", "0.6583185", "0.6539446", "0.65011257", "0.64917654", "0.64917654", "0.64733833", "0.6438831", "0.64330196", "0.64330196", "0.64295477", "0.6426414", "0.6420484", "0.64083177", "0.640...
0.0
-1
/ access modifiers changed from: protected
public void onMeasure(int i, int i2) { DeviceProfile deviceProfile = this.mLauncher.getDeviceProfile(); deviceProfile.updateAppsViewNumCols(); if (!(this.mNumAppsPerRow == deviceProfile.inv.numColumns && this.mNumPredictedAppsPerRow == deviceProfile.inv.numColumns)) { this.mNumAppsPe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override...
[ "0.7375736", "0.7042321", "0.6922649", "0.6909494", "0.68470824", "0.6830288", "0.68062353", "0.6583185", "0.6539446", "0.65011257", "0.64917654", "0.64917654", "0.64733833", "0.6438831", "0.64330196", "0.64330196", "0.64295477", "0.6426414", "0.6420484", "0.64083177", "0.640...
0.0
-1
Creates new form UdpExample
public UdpExample() { initComponents(); myInitComponents(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createClient() {\n client = new UdpClient(Util.semIp, Util.semPort, this);\n\n // Le paso true porque quiero que lo haga en un hilo nuevo\n client.connect(true);\n }", "private void createThreadUdp(){\n System.out.println(\"dirport: \"+serverDirPort);\n System.ou...
[ "0.58957815", "0.57204866", "0.55944467", "0.5585818", "0.5500188", "0.54953784", "0.5358484", "0.5327305", "0.523669", "0.5218695", "0.518186", "0.51683307", "0.5143919", "0.5135067", "0.5125136", "0.51148444", "0.51035833", "0.5090125", "0.50848883", "0.50686747", "0.503856...
0.6603273
0
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. //GENBEGIN:initComponents
private void initComponents() { udpServer = new UdpServer(); jLabel1 = new javax.swing.JLabel(); portField = new javax.swing.JFormattedTextField(0); jLabel2 = new javax.swing.JLabel(); groupField = new javax.swing.JTextField(); jPanel1 = new javax.swing.JPanel(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public Form() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public GUIForm() { \...
[ "0.7392436", "0.7392436", "0.7392436", "0.73524207", "0.7332867", "0.73308986", "0.729576", "0.7267236", "0.72270304", "0.721562", "0.7159843", "0.71548635", "0.715188", "0.71416056", "0.7137083", "0.7133313", "0.71205837", "0.7119088", "0.71151245", "0.7110943", "0.7088094",...
0.0
-1
Devuelve el siguiente elemento de la iteracion.
public T getNext() { T elem = handler.getTop(); handler.pop(); return elem; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object nextElement() {\n/* 75 */ return this.iterator.next();\n/* */ }", "@Override public T next() {\n T elem = null;\n if (hasNext()) {\n Nodo<T> nodo = pila.pop();\n elem = nodo.elemento;\n nodo = nodo.derecho;\n while(nod...
[ "0.7192707", "0.6767897", "0.67309755", "0.6702413", "0.6571108", "0.6538033", "0.6536762", "0.6527444", "0.64980906", "0.64886534", "0.647263", "0.64412105", "0.6434362", "0.6362155", "0.63204587", "0.6312327", "0.63089746", "0.6299254", "0.62807673", "0.6239724", "0.6233277...
0.0
-1
Devuelve cierto si aun quedan elementos sin visitar en la iteracion.
public boolean hasNext() { return !handler.isEmpty(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean hasNext() {\n return numeroDiNodiAncoraVisitabili>0;\n }", "@Override\n public boolean hasNext() {\n return nextElementSet || setNextElement();\n }", "public boolean hasNext() {\n return neste.neste != null;\n }", ...
[ "0.7592424", "0.6926388", "0.6878384", "0.6870281", "0.68617177", "0.68286926", "0.67438436", "0.6730197", "0.67210704", "0.6719351", "0.6699117", "0.6674327", "0.66348255", "0.6598542", "0.6592435", "0.6578686", "0.6569268", "0.65667766", "0.65659076", "0.65659076", "0.65510...
0.0
-1
Restablece el iterador al comienzo.
public void reset() { handler = new StackDynamic<T>(restart); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Iterator<Piedra> iterator() {\n return piedras.iterator();\n \n //crear un iterator propio\n// return new Iterator<Piedra>(){\n// int index=0;\n// @Override\n// public boolean hasNext() {\n// return piedras.size()>index;\n//...
[ "0.692098", "0.6857741", "0.64886135", "0.6363798", "0.63234025", "0.63232815", "0.6194288", "0.6186084", "0.6163172", "0.61521715", "0.61305285", "0.61029303", "0.60938513", "0.6057746", "0.6014972", "0.59946156", "0.59726554", "0.5968486", "0.58997965", "0.58735925", "0.587...
0.0
-1
========================================================================== Misc. Method(s) ========================================================================== JBuilder init method. Constructs the Add Vehicle Dialog. Using XYLayout to allow rapid building, final version will use swing layout manager(s).
void jbInit() throws Exception { //setup file dialog filer1.setFrame(f); filer1.setMode(FileDialog.LOAD); filer1.setTitle("Select Vehicle Image"); panel1.setLayout(xYLayout1); jLabel1.setFont(new java.awt.Font("Dialog", 1, 12)); jLabel1.setText("VIN"); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CarRentalGUI() {\n initComponents();\n this.setLocationRelativeTo(null);\n\n //set outer border\n Border globalBorder = BorderFactory.createMatteBorder(1, 1, 1, 1, Color.BLUE);\n jPanel6.setBorder(globalBorder);\n\n Border labelBorder = BorderFactory.createMatteBord...
[ "0.6469756", "0.6445048", "0.6428486", "0.6292821", "0.6272948", "0.6254247", "0.6250972", "0.62066776", "0.6204562", "0.6202428", "0.61703134", "0.61426735", "0.61191094", "0.6111631", "0.6110794", "0.6087033", "0.60704136", "0.60688585", "0.6065546", "0.60648066", "0.606238...
0.61838967
10
Add ActionListener(s) to this object's components.
public void addActionlistener(ActionListener l) { cancelButton.addActionListener(l); addButton.addActionListener(l); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addActionListeners() {\n\t\tif(this.actionListener == null)\n\t\t\t\treturn; \n\t\t\n\t\t\n\t\t/**\n\t\t\tADD ACTION LISTENERS FOR BUTTONS HERE \n\t\t*/\n\t\tclearButton.addActionListener(this.actionListener);\n\t\tsinButton.addActionListener(this.actionListener);\n\t\tcosButton.addActionListener(thi...
[ "0.7544628", "0.70504725", "0.70274967", "0.7007636", "0.69900686", "0.6946617", "0.69072986", "0.6870675", "0.6811738", "0.6727979", "0.67126465", "0.6658835", "0.66560894", "0.6621376", "0.6617824", "0.65839547", "0.65759295", "0.6573816", "0.653521", "0.65268123", "0.65120...
0.60643977
55
========================================================================== Accessor Method(s) ========================================================================== get VIN field
public String getVinField() { return vinField.getText(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getVin() {\r\n return vin;\r\n }", "public String getVin() {\r\n return vin;\r\n }", "public String getVin() {\n\t\treturn vin;\n\t}", "@java.lang.SuppressWarnings(\"all\")\n\t@javax.annotation.Generated(\"lombok\")\n\tpublic Integer getVout() {\n\t\treturn this.vout;\n\t}",...
[ "0.8019909", "0.8019909", "0.7904182", "0.6519607", "0.6426085", "0.6360435", "0.6318972", "0.63120234", "0.6292406", "0.62828076", "0.6263334", "0.6227649", "0.6151719", "0.6117357", "0.61125505", "0.60916674", "0.60594875", "0.59920293", "0.5984074", "0.5974455", "0.5945448...
0.793292
2
Add a barge to the schedule. The schedule should be sorted on the latest starting time in order to construct waiting profiles. Because LinkedHashMap (in which schedule is stored) does not provide this functionality out of the box, we implemented that in this method as well.
public void addAppointment(Barge barge, int LAT, int LST, int PT) { // determine position where the appointment should be inserted. // the schedule should be sorted on the LST in order to create // a right waiting profile // to keep track of the position we use integer i. int i = 0; for (Barge b : thi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void bargeArrives(Barge barge, int time) {\r\n\t\tthis.actualArrival.put(barge, time);\r\n\t\tthis.queue.add(barge);\r\n\t\t//System.out.println(barge+\" arrived to \"+this.name+\"// arraival list= \"+this.actualArrival);\r\n\r\n\t\tif (Port.terminalLogic.equals(\"Unreserved\")\r\n\t\t\t\t&& this.state == T...
[ "0.5888798", "0.5256955", "0.52559215", "0.5074789", "0.49696532", "0.4933672", "0.47966903", "0.4784746", "0.47363544", "0.4670205", "0.46597457", "0.45890528", "0.45849794", "0.45724517", "0.45602462", "0.45258614", "0.4513077", "0.45021588", "0.44744876", "0.44405648", "0....
0.64348143
0
Construct and send the waiting profile
public WaitingProfile constructWaitingProfile(Barge barge, int currentTime) { /*if(Port.eventsToExcel.equals("Yes")){ Port.stats.addEvent(currentTime, barge.bargeNumber, (barge.toString()+ " asked Terminal " + this.toString()+ " for appoints "+ " ||appointements= " +this.appointmentsToString()));...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public WaitMessage() {\n super(\"Wait for other player...\\n\");\n }", "public WaitingScreen() {\r\n super(\"Please wait...\", new Item[0]);\r\n mWaitString = new StringItem(\"Network\", \"\\nServer contacting...\");\r\n append(mWaitString);\r\n }", "public void takeABus() {\n...
[ "0.5978791", "0.593957", "0.57592046", "0.57502234", "0.5711542", "0.56396985", "0.54175526", "0.54088545", "0.53503424", "0.5343656", "0.5277495", "0.5212677", "0.51851505", "0.51746285", "0.51730317", "0.51724344", "0.5170638", "0.5169571", "0.5169422", "0.51569474", "0.514...
0.6625135
0
[ISchedulableAction] Starts the handling of a barge
public void bargeArrives(Barge barge, int time) { this.actualArrival.put(barge, time); this.queue.add(barge); //System.out.println(barge+" arrived to "+this.name+"// arraival list= "+this.actualArrival); if (Port.terminalLogic.equals("Unreserved") && this.state == Terminal.IDLE) { // ////////////...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void startAction() {\n\t if (!balls.isEmpty() && firingBall == null) {\n\t gb.addToActiveList(this);\n\t //fire next ball\n\t firingBall = (Ball)balls.remove(0);\n\t firingBall.setAbsorbed(false);\n\t firingBall.setVy(-50*25);\n\t //align balls that ...
[ "0.60295343", "0.5606827", "0.5590184", "0.55576533", "0.5528375", "0.5524553", "0.5486794", "0.5465112", "0.54485816", "0.5447672", "0.54170245", "0.54109377", "0.54080003", "0.53897685", "0.53719693", "0.5360487", "0.5346576", "0.53193474", "0.5295799", "0.526556", "0.52616...
0.5785605
1
/ returns a boolean array the cell 0 is if barge handled and cell 1 if rejected
private boolean[] checkIfHandleBarge(Barge barge, int time) { boolean [] result={false, false}; // if there is no other barge in the appointment list start handling // directly if (this.appointments.size() == 1) { Port.schedule.schedule(ScheduleParameters.createOneTime(time, ScheduleParameters.L...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean arrCompleted(Boolean[] boolarray) {\n for (int i=0; i < boolarray.length; i++) {\n if (boolarray[i] == false) {\n return false;\n }\n }\n return true;\n }", "public abstract boolean[] calculate();", "public boolean[] binaryRep() {\r\n\t\tint ...
[ "0.6177478", "0.58768654", "0.5826917", "0.57497036", "0.57344043", "0.5653771", "0.55440766", "0.55113983", "0.5510413", "0.5458107", "0.5432543", "0.5430274", "0.54228544", "0.5409766", "0.5367916", "0.5297036", "0.52512187", "0.5243054", "0.5242889", "0.5239475", "0.523783...
0.55202043
7
[ISchedulableAction] Finish handling of a barge
public void finishHandling(Barge barge, int time) { // remove the barge from appointments of terminal this.appointments.remove(barge); this.numHandling--; //this.state = Terminal.IDLE; // let the barge decide what to do after it finished handling barge.afterFinish(time, this); if (Port.ev...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void finish() {\n if ( actor.hasActions() )\r\n actor.getActions().first().act(100000);\r\n // remove any remaining actions\r\n actor.clearActions();\r\n }", "public void bargeArrives(Barge barge, int time) {\r\n\t\tthis.actualArrival.put(barge, time);\r\n\t\tthis.queue....
[ "0.6180914", "0.6005668", "0.59980047", "0.5964356", "0.59331924", "0.58989424", "0.58989424", "0.583515", "0.58235973", "0.5820916", "0.58036083", "0.58036083", "0.58036083", "0.5775158", "0.57534784", "0.5750173", "0.5719388", "0.5704176", "0.5671254", "0.56403315", "0.5607...
0.6209253
0
used to display the queue size in the chart in the GUI
public int getQueueSize() { return this.queue.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void refreshQueueCount(){\n queueCountLabel.setText(\"Count: \" + String.valueOf(builder.size()));\n }", "public static void setSizeOfQueue(Label sizeOfQueueValue) {\n \tsizeOfQueueValue.setText(String.valueOf(Capture.getInspectionQueue().size()));\n }", "private void updateQueueSize() {...
[ "0.7117305", "0.7057366", "0.63759696", "0.6305131", "0.6222833", "0.6218054", "0.61677057", "0.61127317", "0.6040652", "0.59914076", "0.59774333", "0.5955932", "0.59541416", "0.59411484", "0.59391844", "0.5908418", "0.58950377", "0.5893207", "0.5882426", "0.58606815", "0.583...
0.5706392
35
used to display the number of busy terminals in the GUI
public int getNumhandling() { return this.numHandling; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getNumIdle();", "protected void printNumberSelectedPicturesOnStatusLine( ) {\n\t\tSwingUtilities.invokeLater(new Runnable() {\n\t\t\t \n\t\t\tpublic void run() {\n\t\t\t\tString text;\n\t\t\t\tint count = indexData.pictureSelected.cardinality();\n\t\t\t\tif (count == 1) {\n\t\t\t\t\ttext = \"1 picture...
[ "0.61746365", "0.594273", "0.5871741", "0.58549523", "0.58340186", "0.5815044", "0.58114344", "0.5793308", "0.5776639", "0.5737697", "0.57220066", "0.57064086", "0.5644291", "0.56392187", "0.56334", "0.56326735", "0.5588907", "0.55809414", "0.55712754", "0.5569568", "0.552272...
0.0
-1
Initializes the controller class.
@Override public void initialize(URL url, ResourceBundle rb) { model=DomainController.getInstance(); addDataToChoiceBox(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initialize() {\n\t\tcontroller = Controller.getInstance();\n\t}", "public MainController() {\n\t\tcontroller = new Controller(this);\n\t}", "public abstract void initController();", "public Controller() {\n super();\n }", "public Controller() {\n super();\n }", "public Co...
[ "0.8125658", "0.78537387", "0.78320265", "0.776199", "0.776199", "0.76010174", "0.74497247", "0.7437837", "0.7430714", "0.742303", "0.74057597", "0.7341963", "0.7327749", "0.72634363", "0.72230434", "0.7102504", "0.70575505", "0.69873077", "0.69721675", "0.6944077", "0.691256...
0.0
-1
nastavenie komponentov ktore sa zobrazia v scene
public void setUpEditStage(){ solvableCircle = solvableCircleComponents(); Circle wCircle = whiteButtonComponents(); whiteCellButton = new Button("", wCircle); whiteCellButton.getStyleClass().add("edit-buttons"); whiteCellButton.setOnAction(e-> whiteCellButtonAction()); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void openGamePane() {\n\t\tParent root;\n\t\ttry {\n\t\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(GAMEPANELOCATION));\n\t\t\tloader.setController(this);\n\t\t\troot = loader.load();\n\t\t\tScene scene = new Scene(root);\n\t\t\tStage stage = new Stage();\n\t\t\tstage.setScene(scene);\n\t\t\...
[ "0.6433536", "0.6386917", "0.63868225", "0.6306565", "0.62969285", "0.6271738", "0.62116677", "0.61733717", "0.6113407", "0.6103242", "0.60831636", "0.6067678", "0.60670996", "0.6039509", "0.60127896", "0.60028297", "0.6002209", "0.5993976", "0.5989704", "0.5987455", "0.59620...
0.0
-1
metoda nastavi tlacitko na clicked
public void setClickedStyle(Button button){ whiteCellButton.getStyleClass().clear(); blackCellButton.getStyleClass().clear(); removeCellButton.getStyleClass().clear(); if (button == whiteCellButton) { whiteCellButton.getStyleClass().add("edit-buttons-selected"); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tSystem.out.println(\"vai ficar clikando ai a toa? PATETA\");\n\t\t\t\t\n\t\t\t}", "@Override\n public void mouseClicked(MouseEvent e) {\n System.out.println(\"MouseClicked\");\n //kwadrat.clicked();\n trojkat.clicked();\n ...
[ "0.7876019", "0.778278", "0.7736392", "0.7692161", "0.76845366", "0.76845366", "0.76845366", "0.76845366", "0.76845366", "0.76845366", "0.76845366", "0.76845366", "0.76845366", "0.76845366", "0.76845366", "0.7661894", "0.76599073", "0.7659045", "0.7659045", "0.76515555", "0.7...
0.0
-1
zmenenie stredneho kruhu cervena = naeditovany level sa neda ulozit (neriesitelne/neskotrolovane) zelena = naeditovany level sa moze ulozit
public void setCenterCircleFill(){ if(solvable){ solvableCircle.setFill(Color.GREEN); } else{ solvableCircle.setFill(Color.RED); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String vylozZvieraZVozidla() {\r\n if (zoo.getPracovneVozidlo() == null) {\r\n return \"Pracovne vozidlo nie je pristavene\";\r\n }\r\n\r\n Integer pozicia = MojeMetody.vlozInt(\"Vloz index zvierata\");\r\n if (pozicia == null) return \"\";\r\n\r\n try {\r\n ...
[ "0.6767371", "0.6633183", "0.64145553", "0.62401587", "0.6121189", "0.61192626", "0.6100647", "0.60957485", "0.6095744", "0.60916644", "0.60828686", "0.60758895", "0.6063912", "0.60594857", "0.6058851", "0.6058851", "0.60219103", "0.6021792", "0.6021792", "0.60154843", "0.600...
0.0
-1
associate deeplinks with activity
public Intent parseAndGetIntent(Uri uri) { Log.d(TAG, uri.toString()); List<String> pathSegments = uri.getPathSegments(); Intent intent = null; String tagKey = pathSegments.get(0).toLowerCase(); Log.d(TAG, "tagKey:" + tagKey); if (AppIndexApplication.getInstance().ca...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void deepLinkingFlow() {\n\n if (getActivity().getIntent().hasExtra(\"deeplink\")) {\n destination = getActivity().getIntent().getParcelableExtra(\"deeplink\");\n hotelSearchPresenter.checkDeepLinking(destination, getActivity().getSupportFragmentManager().beginTransaction());\n...
[ "0.72185796", "0.7126579", "0.6626288", "0.65022343", "0.6062156", "0.59453773", "0.5880377", "0.57237476", "0.57166815", "0.5701771", "0.55898273", "0.55171055", "0.5362321", "0.5286225", "0.52378446", "0.52260053", "0.51831055", "0.5182679", "0.51498914", "0.5131103", "0.51...
0.0
-1
end main Takes the input count and generates that number of random double precision floating point numbers. Counts how many times the first decimal place occurs in the sequence. Prints out each digit and the number of times it occurred in ascending order of the number of times it occurred.
public static void printEachInstance(int count) { List<RandGeneratedValue> list = new ArrayList<RandGeneratedValue>(); for(int i = 0; i < count; i++) { Double rand = Math.random(); RandGeneratedValue rdv = new RandGeneratedValue(); //Store the randomly generated value rdv.setRandValue(rand); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String args[])\n {\n Scanner sc=new Scanner(System.in);\n String s=sc.next();\n double n=0;\n int dcount=0;\n int pointer=0;\n for(int i=0;i<s.length();i++)\n {\n if(s.charAt(i)!='.')\n {\n n=n*10+(s.charAt(i)-'0');\n if(pointer==1)\n d...
[ "0.6357716", "0.6274294", "0.6172699", "0.6132539", "0.6061748", "0.602409", "0.60066456", "0.5984489", "0.5982982", "0.5876075", "0.58709735", "0.5817232", "0.5802197", "0.57959926", "0.5793088", "0.5787493", "0.5783517", "0.5776166", "0.5747733", "0.57294", "0.5724716", "...
0.6398065
0
Creates a new instance of AcuityTest
public AcuityTest() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ClimbingClubTest()\n {\n \n }", "public AuthorityFactoriesTest() {\n }", "public AllLaboTest() {\n }", "public PerezosoTest()\n {\n }", "public ActivitiTestCase() {\n }", "private AccuracyTestHelper() {\n // empty\n }", "public UnitTests()\n {\n }", "...
[ "0.671001", "0.66987014", "0.65943927", "0.65567654", "0.6551962", "0.6513047", "0.64711994", "0.6424128", "0.6409134", "0.6346423", "0.6339013", "0.6308003", "0.6306722", "0.6261673", "0.6260099", "0.6229242", "0.61984223", "0.6176624", "0.6161638", "0.6157369", "0.6154755",...
0.849121
0
add the patient answer to the answer list
public void saveAnswer(long answerTime, Element element, boolean patientAnswer, String patientAnswerStr){ getTestAnswers().add( new TestAnswer(answerTime, patientAnswer, element, patientAnswerStr) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addQuestionAnswer(Answer answer);", "void addAnswer(Answer answer);", "@Override\r\n public void addAnswer(String answer) {\r\n this.answers.add(answer);\r\n }", "public void addAnswer(Answer ans) {\n // TODO implement here\n }", "public void addAnswer(Answer answer) {\n \t\tans...
[ "0.7742983", "0.7580539", "0.74334913", "0.74326485", "0.71915084", "0.6991407", "0.69699365", "0.6904292", "0.68483573", "0.6835915", "0.67260784", "0.6725295", "0.66842264", "0.65206254", "0.63380796", "0.6259477", "0.6219937", "0.6208152", "0.61172754", "0.6098837", "0.607...
0.62877834
15
add the patient answer to the answer list
public void saveAnswer(Element element, boolean patientAnswer, String patientAnswerStr){ getTestAnswers().add( new TestAnswer(patientAnswer, element, patientAnswerStr) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addQuestionAnswer(Answer answer);", "void addAnswer(Answer answer);", "@Override\r\n public void addAnswer(String answer) {\r\n this.answers.add(answer);\r\n }", "public void addAnswer(Answer ans) {\n // TODO implement here\n }", "public void addAnswer(Answer answer) {\n \t\tans...
[ "0.7742983", "0.7580539", "0.74334913", "0.74326485", "0.71915084", "0.6991407", "0.69699365", "0.6904292", "0.68483573", "0.6835915", "0.67260784", "0.6725295", "0.66842264", "0.63380796", "0.62877834", "0.6259477", "0.6219937", "0.6208152", "0.61172754", "0.6098837", "0.607...
0.65206254
13
You can call method from the class name with className.method if that method is defined with static
public static String placePostData() { String res="/maps/api/place/add/json"; return res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "MethodName getMethod();", "public static void staticMethod() {\n Log.e(\"LOG_TAG\", \"Company: STATIC Instance method\");\n }", "static void method1() {\r\n\t\r\n}", "static void staticShow() {\n System.out.println(\"In a static class static method\");\n }", "static void method2(){\n...
[ "0.6563972", "0.6557888", "0.6542901", "0.64990366", "0.6412168", "0.63668305", "0.6343916", "0.6343916", "0.6322235", "0.6314092", "0.631077", "0.6288914", "0.6238323", "0.6209906", "0.6209906", "0.6204279", "0.6168336", "0.6167555", "0.61606055", "0.6139141", "0.6139141", ...
0.0
-1
get loan amount from the textView and convert it to double
@Override public void onClick(View view) { double loan = Double.parseDouble(binding.loanAmount.getText().toString()); // get tenure amount from the textView and convert it to double double tenure = Double.parseDouble(binding.loanTenure.getText().toString()); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void getMonthlyPayment(View view) {\n //Get all the EditText ids\n EditText principal = findViewById(R.id.principal);\n EditText interestRate = findViewById(R.id.interestRate);\n EditText loanTerm = findViewById(R.id.loanTerm);\n\n //Get the values for principal, MIR and t...
[ "0.68901944", "0.6743956", "0.6568079", "0.65575397", "0.6494578", "0.6481042", "0.6464636", "0.63911104", "0.6341193", "0.63255805", "0.631663", "0.62941325", "0.6275098", "0.6236251", "0.6236251", "0.6207866", "0.61204135", "0.611987", "0.6101559", "0.6098905", "0.6091936",...
0.68577594
1
choose the video encoder by name.
@TargetApi(Build.VERSION_CODES.JELLY_BEAN) private static MediaCodecInfo chooseVideoEncoder(String name) { int nbCodecs = MediaCodecList.getCodecCount(); for (int i = 0; i < nbCodecs; i++) { MediaCodecInfo mci = MediaCodecList.getCodecInfoAt(i); if (!mci.isEncoder()) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getVideoPreset();", "private void configureEncoder() throws IOException\n {\n encoder = MediaCodec.createByCodecName(encoderName);\n MediaFormat mediaFormat = MediaFormat.createVideoFormat(MIME_TYPE, width, height);\n mediaFormat.setInteger(MediaFormat.KEY_BIT_RATE, BITRATE)...
[ "0.60611564", "0.60441685", "0.5655714", "0.56289583", "0.5604947", "0.55679303", "0.5521886", "0.5517504", "0.5512166", "0.5490423", "0.5457824", "0.5401785", "0.53775036", "0.5355942", "0.5340001", "0.52557766", "0.52379006", "0.5225033", "0.51944387", "0.519398", "0.513101...
0.82752746
0
INDEXING MANAGEMENT [MODIFIED] Inserts new information provided by new occurence of token in docID at offset.
public void insert( String token, int docID, int offset ) { // Add to map of postingslist //if (docID % 100 == 0) //System.err.println("Trying to insert ''" + token + "'' found in doc "+docID); if (this.index.containsKey(token)){ //System.err.println(token+" already in me...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void insert( String token, int docID, int offset ) {\r\n PostingsList posting = this.getPostings(token);\r\n if(posting != null){\r\n posting.insertElement(docID, (double)0, offset);\r\n index.put(token, posting);\r\n }\r\n else{\r\n PostingsList ...
[ "0.6344753", "0.63235545", "0.60032284", "0.59595346", "0.59330505", "0.578764", "0.5781231", "0.5760061", "0.5738502", "0.5733359", "0.57019573", "0.569972", "0.5683141", "0.5683141", "0.5674248", "0.562783", "0.5595195", "0.55493456", "0.5527176", "0.55203867", "0.5482442",...
0.6843133
0
DISK/MEMORY MANAGEMENT [NEW] Recovers the essential files required to retrieve information in memory. This includes hashmap mapping tokens with respective terms and list of names of the retrieved documents.
public void load(){ // Recover docIDs try(Reader reader = new FileReader("postings/docIDs.json")){ this.docIDs = (new Gson()).fromJson(reader, new TypeToken<Map<String, String>>(){}.getType()); } catch (IOException e) { e.printStackTrace(); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void scanDocuments()\n{\n document_counts = new HashMap<>();\n kgram_counts = new HashMap<>();\n for (File f : root_files) {\n addDocuments(f);\n }\n}", "public static void main(String[] args) throws IOException{\n\t\tint termIndex = 1;\n\t\t\n\t\t// startOffset holds the start offset for e...
[ "0.5995485", "0.5839277", "0.57960045", "0.55711436", "0.5396472", "0.5236064", "0.52118707", "0.51939565", "0.5157785", "0.5112572", "0.51100713", "0.5089438", "0.5079131", "0.50780505", "0.50760406", "0.5066933", "0.5057492", "0.50543725", "0.50523096", "0.5043695", "0.5038...
0.0
-1
[NEW] Saves the tokentermIDs map and list with document names
public void saveAll(){ // Store postings for (Map.Entry<String, PostingsList> entry : this.index.entrySet()) { saveJSON("postings/t"+hash(entry.getKey())+".json", entry.getValue()); System.err.println("postings/t"+hash(entry.getKey())+".json"); count++; if...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void saveToken() throws IOException {\n\t\t\n\t\tFileWriter termIdx = new FileWriter(StoragePath+Path.termIdxDir);\n\t\t\n\t\tfor(Entry<String, Integer> term: termDic.entrySet()){\n\t\t\ttermIdx.append(term.getKey() + \"\\n\" + term.getValue() + \"\\n\");\n\t\t}\n\t\t\n\t\ttermIdx.close();\n\t\t\n\t}", "...
[ "0.61611456", "0.588707", "0.5825966", "0.5631039", "0.56064516", "0.5588778", "0.5588274", "0.5588257", "0.5482481", "0.54597014", "0.53377825", "0.53221774", "0.5288427", "0.5280946", "0.5271845", "0.526328", "0.52533746", "0.5247164", "0.5237755", "0.52139837", "0.5147063"...
0.55061305
8
[NEW] Saves object "o" as a JSON file called fileName
public void saveJSON(String fileName, Object o){ // System.err.println("accessing disk"); Gson gson = new Gson(); try(FileWriter writer = new FileWriter(fileName)){ gson.toJson(o, writer); //System.err.println("\n Token stored"); }catch (IOException e) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void writeJsonObjectFile(JsonEntity objectToWrite, String filePath) \n\t{\n\t\tGson gsonParser = new Gson();\n\t\t\n\t\ttry \n\t\t{\n\t\t\tFiles.write(gsonParser.toJson(objectToWrite).getBytes(), new File(filePath));\n\t\t}\n\t\tcatch (IOException e) \n\t\t{\n\t\t\tSystem.err.println(\"Can't write to...
[ "0.7685922", "0.7182024", "0.7159729", "0.7137173", "0.7057812", "0.70540637", "0.7053874", "0.7003681", "0.6954736", "0.6898823", "0.6881606", "0.6876142", "0.6826735", "0.6755188", "0.67119867", "0.6710243", "0.66534215", "0.66483724", "0.6613342", "0.6548435", "0.65134025"...
0.86886233
0
No need for cleanup in a HashedIndex.
public void cleanup() { this.index = new TreeMap<String, PostingsList>(); this.count = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@AfterClass\n\tpublic static void cleanIndex() {\n\t\tEntityTest et = new EntityTest(id, \"EntityTest\");\n\t\tRedisQuery.remove(et, id);\n\t}", "void indexReset();", "public void clear() {\n index.clear();\n }", "private Reindex() {}", "private Reindex() {}", "void clearAllIndexes();", "publ...
[ "0.6721599", "0.6681743", "0.66589624", "0.65445966", "0.65445966", "0.6508383", "0.63637435", "0.6360245", "0.63154876", "0.62771064", "0.62437534", "0.6216059", "0.6196626", "0.61939406", "0.61733735", "0.61713153", "0.6138556", "0.61282516", "0.61186033", "0.6097255", "0.6...
0.6162504
16
SEARCH MANAGEMENT (USER) [MODIFIED] Returns the postings for a specific term, or null if the term is not in the index.
public PostingsList getPostings( String token ) { PostingsList post = new PostingsList(); if(this.index.containsKey(token)) post = (this.index.get(token)).clone(); /*System.err.println("start search..."); // Read JSON file associated to token and return it as a postingslist ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic List<Post> searchInfResult(String word) {\n\t\tpostDao=new PostDaoImpl(TransactionManager.connection);\r\n\t\treturn postDao.selectPosts(word);\r\n\t}", "private void termQuerySearch(String[] terms) {\n for (String term : terms) {\n LinkedList<TermPositions> postingLists =...
[ "0.5979783", "0.59439623", "0.5828963", "0.5720514", "0.5714142", "0.56416255", "0.563343", "0.5438755", "0.5398442", "0.53896147", "0.5354768", "0.5341725", "0.531625", "0.5312132", "0.53009015", "0.5274076", "0.5270938", "0.52231854", "0.5207723", "0.5195788", "0.51900214",...
0.5259476
17
QUERIES MANAGEMENT Searches the index for postings matching the query.
public PostingsList search( Query query, int queryType, int rankingType, int structureType ) { double idf_threshold = new Double(0); double index_elimination = new Double(0.008); // System.err.println(pageRank[docNumber.get("121")]); if (query.size()>0){ switch (quer...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void queryPosts() {\n ParseQuery<OutfitPost> query = ParseQuery.getQuery(OutfitPost.class);\n // only include data referred by user key\n query.include(OutfitPost.KEY_USER);\n query.whereEqualTo(OutfitPost.KEY_USER, ParseUser.getCurrentUser());\n // limit query to latest ...
[ "0.5320133", "0.52384716", "0.51909447", "0.51793134", "0.51689667", "0.5166202", "0.51531994", "0.511496", "0.51019454", "0.50839907", "0.5083817", "0.5078615", "0.5059571", "0.5005355", "0.5002798", "0.49850202", "0.49844736", "0.49838942", "0.49333358", "0.4925261", "0.489...
0.4517407
70
query: Query inserted by the user w: Weight the tfidf score, usually very small to account for scale difference with pagerank idf_threshold: Threshold to perform index elimination / 1) Obtain union of results containing the considered query terms
public PostingsList ranked_query(Query query, double w, double idf_threshold){ long startTime = System.nanoTime(); PostingsList result = new PostingsList(); // Obtain union of terms above idf threshold if indexElimination is true // (Set idf_threshold to zero to disable this feature) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Set<String> queryTermsConsidered(Query query, double idf_threshold){\n double idf, nDocs = this.docIDs.size();\n String term;\n\n Set<String> termsToConsider = new HashSet<String>();\n\n Iterator<String> it = query.terms.iterator();\n while(it.hasNext()){\n term...
[ "0.713265", "0.67490345", "0.6708787", "0.6570831", "0.65290445", "0.65091664", "0.6301124", "0.62564147", "0.62462723", "0.62303966", "0.6121615", "0.6092577", "0.60881495", "0.6067615", "0.6061933", "0.60572237", "0.6025526", "0.59403056", "0.5899081", "0.58948946", "0.5887...
0.7497625
0
Which terms should be considered? Based on Index elimination theory, idfthresholding!
public Set<String> queryTermsConsidered(Query query, double idf_threshold){ double idf, nDocs = this.docIDs.size(); String term; Set<String> termsToConsider = new HashSet<String>(); Iterator<String> it = query.terms.iterator(); while(it.hasNext()){ term = it.next();...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract int numberOfTerms();", "int DF(String term) {\n for (int i = 0; i < count1; i++) {\n if (economydocument[i].contains(term)) {\n df++;\n }\n }\n for (int i = 0; i < count2; i++) {\n if (educationdocument[i].contains(term)) {\n ...
[ "0.60107577", "0.5797017", "0.5660234", "0.5633843", "0.5564556", "0.5551654", "0.554559", "0.5543597", "0.5539202", "0.55127895", "0.54864407", "0.54860085", "0.54856205", "0.54337925", "0.5350816", "0.5343665", "0.5324684", "0.53126794", "0.5291859", "0.5283408", "0.5283391...
0.6349889
0
[NEW] Finds documents containing the query as a phrase TODO: Skip pointer
public PostingsList phrase_query(Query query){ LinkedList<PostingsList> listQueriedPostings = new LinkedList<PostingsList>(); // List with postings corresponding to the queries for (int i = 0; i<query.size(); i++){ // If any query has zero matches, return 0 results //if(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testPhrase() {\n assertQ(req(\"q\",\"text:now-cow\", \"indent\",\"true\")\n ,\"//*[@numFound='1']\"\n );\n // should generate a query of (now OR cow) and match both docs\n assertQ(req(\"q\",\"text_np:now-cow\", \"indent\",\"true\")\n ,\"//*[@numFound='2']\"\n );\n ...
[ "0.7247035", "0.6326672", "0.61507344", "0.614432", "0.6127424", "0.61083686", "0.60629725", "0.60173154", "0.5970413", "0.59642434", "0.595486", "0.59493905", "0.5948072", "0.5947946", "0.5944434", "0.5918083", "0.59072393", "0.5887826", "0.58828676", "0.58804107", "0.587460...
0.60083085
8
[NEW] Finds documents containing a twowords phrase
public PostingsList phrase_query(PostingsList l1, PostingsList l2){ PostingsList phrase = new PostingsList(); // Counters to iterate docIDs int count1 = 0; int count2 = 0; // Counters to iterate positional indices int subcount1 = 0; int subcount2 = 0; /...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testPhrase() {\n assertQ(req(\"q\",\"text:now-cow\", \"indent\",\"true\")\n ,\"//*[@numFound='1']\"\n );\n // should generate a query of (now OR cow) and match both docs\n assertQ(req(\"q\",\"text_np:now-cow\", \"indent\",\"true\")\n ,\"//*[@numFound='2']\"\n );\n ...
[ "0.68965036", "0.60956764", "0.59332526", "0.5928022", "0.58062935", "0.57813257", "0.57707757", "0.5745215", "0.5720394", "0.5696968", "0.5672093", "0.5598769", "0.55674994", "0.5545627", "0.551981", "0.5488837", "0.5467346", "0.5463441", "0.5459747", "0.54115915", "0.540834...
0.56311864
11
[NEW] Intersects a set of queries TODO: Skip pointer
public PostingsList intersect(Query query){ LinkedList<PostingsList> listQueriedPostings = new LinkedList<PostingsList>(); // List with postings corresponding to the queries for (int i = 0; i<query.size(); i++){ // If any query has zero matches, return 0 results //if(!(n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n\t\tpublic void testIntersection() {\n\t\t\ttestingSet = new IntegerSet(list1);\r\n\t\t\ttestingSet2= new IntegerSet(list2);\r\n\t\t\t// create 3rdset = to the intersection list \r\n\t\t\ttestingSet3= new IntegerSet(intersection);\r\n\t\t\t// create 4th set =to the intersection of set1 and set2\r\n\t\t\tt...
[ "0.601857", "0.5893896", "0.575646", "0.56862754", "0.5679482", "0.5663984", "0.56257683", "0.5607326", "0.5603596", "0.5601509", "0.5576574", "0.55470616", "0.55435514", "0.5515671", "0.55070364", "0.5502553", "0.5489338", "0.54770523", "0.5475129", "0.5470427", "0.5450035",...
0.6197183
0
[NEW] Intersects two queries (represented by the postingslist)
public PostingsList intersect(PostingsList l1, PostingsList l2){ PostingsList intersection = new PostingsList(); // Counters to iterate docIDs int count1 = 0; int count2 = 0; // First posting PostingsEntry p1 = l1.get(0); PostingsEntry p2 = l2.get(0); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PostingsList intersect(Query query){\n\n LinkedList<PostingsList> listQueriedPostings = new LinkedList<PostingsList>();\n // List with postings corresponding to the queries\n for (int i = 0; i<query.size(); i++){\n // If any query has zero matches, return 0 results\n ...
[ "0.69769245", "0.6333911", "0.5428158", "0.5357878", "0.530351", "0.5271801", "0.51897854", "0.51882815", "0.51229084", "0.50980556", "0.5068206", "0.50642776", "0.506333", "0.5041754", "0.502724", "0.5019483", "0.5001322", "0.49797273", "0.49742696", "0.4948692", "0.49297482...
0.6708024
1
[NEW] Sorts a set of postings list according to the document frequency
public LinkedList<PostingsList> sortByIncreasingFrequency(LinkedList<PostingsList> l){ Collections.sort(l, new Comparator<PostingsList>(){ @Override public int compare(PostingsList p1, PostingsList p2){ if(p1.size() < p2.size()){ return -1; } if...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sort() {\n documents.sort();\n }", "public void sortDocumentsByDocnos() {\n order = new int[mDocSet.length];\n mDocSet_tmp = new double[mDocSet.length];\n accumulated_scores_tmp = new float[mDocSet.length];\n\n for (int i = 0; i < order.length; i++) {\n order[i] = i;\n mDocS...
[ "0.67374855", "0.63989174", "0.6172652", "0.5989494", "0.59094334", "0.5851778", "0.57968163", "0.57893056", "0.5646224", "0.5625188", "0.5610343", "0.56095076", "0.559386", "0.55909723", "0.5517896", "0.5515005", "0.5512062", "0.5501602", "0.54893845", "0.54655427", "0.54344...
0.6929145
0
OTHERS [MODIFIED] Returns all the words in the index.
public Set<String> keySet() { return this.index.keySet(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Set<String> getWords() {\n\t\treturn Collections.unmodifiableSet(this.invertedIndex.keySet());\n\t}", "public Iterator words() {\n return index.keySet().iterator();\n }", "public void showAllWords() {//out\n System.out.println(\"No\\t|English\\t|Vietnamese\");\n ArrayList<Word> f...
[ "0.6683834", "0.63288605", "0.60075307", "0.5970147", "0.5862826", "0.5859984", "0.58519155", "0.5818616", "0.57877696", "0.57772887", "0.57062596", "0.5672519", "0.5668082", "0.56145406", "0.5612684", "0.5563824", "0.55119944", "0.550613", "0.54892987", "0.5488961", "0.54867...
0.0
-1
[NEW] Hashes the string to unique int representation
public static String hash(String token){ return Integer.toString( token.hashCode() ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int toHashKey(String s)\n\t{\n\t\tint A = 1952786893;\n\t\tint B = 367257;\n\t\tint v = B;\n\t\tfor (int j = 0; j < s.length(); j++)\n\t\t{\n\t\t\tchar c = s.charAt(j);\n\t\t\tv = A * (v + (int) c + j) + B;\n\t\t}\n\n\t\tif (v < 0) v = -v;\n\t\treturn v;\n\t}", "private int hash(String string) {\n\t\tint hash = ...
[ "0.7137949", "0.6897674", "0.6708983", "0.6634139", "0.6602896", "0.6580906", "0.6529667", "0.6447881", "0.64134866", "0.64026445", "0.6386157", "0.6376087", "0.6344094", "0.6320488", "0.6314912", "0.6302626", "0.62619746", "0.62537754", "0.62481886", "0.62098116", "0.6183987...
0.5671831
78
[NEW] Strings the map containing all postingslist and tokens
public String toString(){ String s = " "; for (Map.Entry<String, PostingsList> entry : this.index.entrySet()) { s += entry.getKey()+" - " + entry.getValue().toString() + "\n"; } return s;//this.indexInMemory.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Map<String, String> getTokens();", "@Override\r\n public String toString() {\r\n String s = new String();\r\n for (String t : tokenList)\r\n s = s + \"~\" + t;\r\n return s;\r\n }", "@Override\n public String toString() {\n StringJoiner sj = new StringJoiner(\", \", \"{\", \"}\\n\");\...
[ "0.6758433", "0.58897084", "0.5630534", "0.5508794", "0.5503969", "0.54728544", "0.5447173", "0.53018135", "0.5263845", "0.5251088", "0.5191312", "0.51761514", "0.51590157", "0.51570046", "0.5153402", "0.5152076", "0.51318806", "0.5107668", "0.51008123", "0.51008123", "0.5100...
0.5571595
3
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); txtNombre = new ja...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.73206544", "0.7291311", "0.7291311", "0.7291311", "0.7286492", "0.7249181", "0.7213362", "0.72085494", "0.71965617", "0.7190475", "0.7184897", "0.7159234", "0.71483016", "0.7094075", "0.7081491", "0.70579433", "0.6987627", "0.69776064", "0.69552463", "0.69549114", "0.69453...
0.0
-1
TODO Autogenerated method stub
public void addUser(User user) { userMapper.insert(user); }
{ "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