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
The motif pruning strategy applied.
public MotifPruner getMotifPruner() { return motifPruner; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void prune() {\n\n }", "@Override\n\tpublic void runPrune(PruneSetting pSetting) throws Exception {\n\n\t}", "@Test(timeout = 4000)\n public void test00() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.se...
[ "0.6869899", "0.59413606", "0.55753887", "0.5512774", "0.5496382", "0.5408638", "0.536954", "0.5359434", "0.5324772", "0.52956486", "0.5287292", "0.5278272", "0.5270038", "0.5240987", "0.519617", "0.51649344", "0.51206475", "0.51169497", "0.5102904", "0.50979924", "0.5095148"...
0.6062665
1
fields here. private int count;
public FindMinimumInRotatedSortedArray() { // Initialization here. // this.count = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void count() {\n\t\t\n\t}", "public long count() {\n/* 154 */ return this.count;\n/* */ }", "public int count() {\n return this.count;\n }", "@Override\r\n\t\tpublic int count() {\n\t\t\treturn 0;\r\n\t\t}", "public synchronized int getCount()\n\t{\n\t\treturn count;\n...
[ "0.7894261", "0.7699838", "0.7552244", "0.7545388", "0.7514239", "0.7458779", "0.74391687", "0.7428631", "0.7420237", "0.7407515", "0.7395986", "0.739406", "0.739406", "0.739406", "0.739406", "0.739199", "0.73872274", "0.73630995", "0.73516124", "0.73498595", "0.7346029", "...
0.0
-1
Binary Search. When I cut the array in half, if I can detect which subarray the target lies in, I can use Binary Search. In this problem, the target is the valley. The valley lies in the left subarray when nums[mid] is less than nums[0]. Find the valley using two adjacent elements, and the smaller is the minimum. The v...
public int findMin(int[] nums) { // corner if (nums.length == 1) { return nums[0]; } // Not rotated. if (nums[0] < nums[nums.length - 1]) { return nums[0]; } // Binary Search. int left = 0; int right = nums.length - 1; // int right = nums.length; // NG! (R = M version) while (left <= right)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int binarySearchLeft(int[] nums, int target) {\n \tint low=0;\n int high=nums.length-1;\n\n while(low<=high){\n int mid=low+(high-low)/2;\n if (nums[mid]==target){\n if(mid==0||nums[mid-1]<nums[mid]){\n return mid;\n }\...
[ "0.7705542", "0.76915205", "0.7571395", "0.7557479", "0.75391966", "0.7501055", "0.7381341", "0.73810154", "0.7364626", "0.7332463", "0.73146373", "0.73065645", "0.727435", "0.7272741", "0.7233954", "0.7218116", "0.71926045", "0.7143793", "0.7114417", "0.7094822", "0.70936555...
0.7293289
12
Binary Search. The bottom one is the best. Author: SnowZheng + kei Date : September 24, 2020
public int findMin2(int[] arr) { int left = 0; // We use arr[right] as binary search condition later. right = arr.length would // be out of bound. int right = arr.length - 1; int mid = 0; // while (left < right) causes a problem that the last element cannot be // reached when R=len-1 used. while (left ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testBinarySearch() {\n\t\tint[] arr0 = {0, 1, 2, 3, 4, 5};\n\t\tassertEquals(0, _01_BinarySearch.binarySearch(arr0, 0, arr0.length - 1, 0));\n\t\tassertEquals(1, _01_BinarySearch.binarySearch(arr0, 0, arr0.length - 1, 1));\n\t\tassertEquals(2, _01_BinarySearch.binarySearch(arr0, 0, arr0.length...
[ "0.77108264", "0.7588049", "0.7465974", "0.74396825", "0.7398156", "0.7394533", "0.7311154", "0.7306878", "0.72949886", "0.72733676", "0.7244144", "0.7229248", "0.7152077", "0.71504825", "0.7125717", "0.7117731", "0.7103296", "0.70929545", "0.7075864", "0.70637095", "0.705559...
0.0
-1
Binary Search. Author: petrichory + kei Date : September 24, 2020
public int findMin3(int[] nums) { int lo = 0, hi = nums.length - 1; if (nums[hi] > nums[lo]) { return nums[lo]; } while (hi - lo > 1) { int mid = lo + (hi - lo) / 2; if (nums[mid] < nums[lo]) { hi = mid; } else { lo = mid; } } return Math.min(nums[lo], nums[hi]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testBinarySearch() {\n\t\tint[] arr0 = {0, 1, 2, 3, 4, 5};\n\t\tassertEquals(0, _01_BinarySearch.binarySearch(arr0, 0, arr0.length - 1, 0));\n\t\tassertEquals(1, _01_BinarySearch.binarySearch(arr0, 0, arr0.length - 1, 1));\n\t\tassertEquals(2, _01_BinarySearch.binarySearch(arr0, 0, arr0.length...
[ "0.77759665", "0.7644754", "0.75296074", "0.7335581", "0.73179084", "0.72217363", "0.7172971", "0.71062285", "0.7098309", "0.70637417", "0.70568836", "0.70483917", "0.70383847", "0.70250845", "0.70237374", "0.7021635", "0.7011161", "0.7000248", "0.69797295", "0.69699794", "0....
0.0
-1
Review, this is the best.
public int findMinR2(int[] nums) { if (nums.length == 1) { return nums[0]; } if (nums[0] < nums[nums.length - 1]) { return nums[0]; } // Binary Search. R=M-1 ver. int left = 0; int right = nums.length - 1; while (left <= right) { int mid = left + (right - left) / 2; // Check if the nums[m...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "public void smell() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "public void method_4270() {}", "private stendhal() {\n\t}"...
[ "0.6751156", "0.6724452", "0.6676678", "0.6465268", "0.6423609", "0.63078564", "0.63014656", "0.62876195", "0.6267803", "0.6267803", "0.6225906", "0.6192129", "0.61537987", "0.6136526", "0.612664", "0.6100976", "0.60959023", "0.6090814", "0.60868543", "0.6062777", "0.606201",...
0.0
-1
Stores result when all orderings are possible.
public static void main(String[] args) { long[] fact = new long[MAXDOMINOES+1]; fact[0] = 1; for (int i=1; i<=MAXDOMINOES; i++) fact[i] = (fact[i-1]*i)%MOD; Scanner stdin = new Scanner(System.in); int numCases = stdin.nextInt(); // Process each case. for (...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String processOrder() {\n notifyAllObservers();\n\n return getOrderReport();\n }", "public void makeComplete(Order order) {}", "public void saveOrder() {\n setVisibility();\n Order order = checkInputFromUser();\n if (order == null){return;}\n if(orderToLoad !...
[ "0.5897403", "0.5751736", "0.56410867", "0.5538355", "0.55276465", "0.5516176", "0.5516176", "0.5516176", "0.5481661", "0.547631", "0.54754114", "0.5468732", "0.5426445", "0.5417231", "0.5415052", "0.5412216", "0.54036194", "0.53926736", "0.53875047", "0.53676254", "0.5328716...
0.0
-1
Returns true iff each dominoe in list is the same.
public static boolean same(int[][] list) { for (int i=1; i<list.length; i++) if (!same(list[0], list[i])) return false; return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean allDuplicatesEqual() {\n int[] input = {1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5};\n int dupA = findDuplicatesA(input);\n int dupB = findDuplicatesB(input);\n int dupC = findDuplicatesC(input);\n int dupD = findDuplicatesD(input);\n int dupE = findDuplica...
[ "0.71830744", "0.7058859", "0.7019039", "0.6973274", "0.6582109", "0.6501392", "0.64531314", "0.6441906", "0.64192384", "0.63849086", "0.63272125", "0.62338406", "0.6233756", "0.61787444", "0.606574", "0.60290766", "0.6012705", "0.5998341", "0.5985778", "0.5961322", "0.594913...
0.72863543
0
Precondition: a and b are length 2. Postcondition: Returns true iff a and b store the same pair (order doesn't matter).
public static boolean same(int[] a, int[] b) { return (a[0] == b[0] && a[1] == b[1]) || (a[0] == b[1] && a[1] == b[0]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isTwoPair();", "boolean isOnePair();", "private static boolean areEqual (byte[] a, byte[] b) {\r\n int aLength = a.length;\r\n if (aLength != b.length)\r\n return false;\r\n for (int i = 0; i < aLength; i++)\r\n if (a[i] != b[i])\r\n return fals...
[ "0.75111294", "0.6855549", "0.68396425", "0.67834973", "0.6730056", "0.6685752", "0.66554165", "0.6589773", "0.65781456", "0.65423876", "0.653856", "0.6530745", "0.6502255", "0.650178", "0.6486586", "0.6439017", "0.6424096", "0.6377158", "0.6352817", "0.62959546", "0.6266301"...
0.72148275
1
TODO: Warning this method won't work in the case the id fields are not set
@Override public boolean equals(Object object) { if (!(object instanceof Hospedaje_Salon)) { return false; } Hospedaje_Salon other = (Hospedaje_Salon) object; if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.getId().equals(other.g...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "private Integer getId() { return this.id; }", "public void setId(int id){ this.id = id; }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setID(String idIn) {this.id = idIn;}", "public void se...
[ "0.6896886", "0.6838461", "0.67056817", "0.66419715", "0.66419715", "0.6592331", "0.6579151", "0.6579151", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.65624106", "0.65624106", "0.65441847", "0.65243006", "0.65154546", "0.6487427", "0.64778...
0.0
-1
Parses out first and last names and original filename
private String grabNameFile(String absPath) { // parse filename from absolute path String[] delimSlashes = absPath.split("/"); String fn = delimSlashes[delimSlashes.length - 1]; if (fn.substring(0, 5).equals("files")) { fn = fn.substring(5); // removes "files" from the beginning...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String fixAuthor_lastnameFirst(String in){\n \n // Check if we have cached this particular name string before:\n Object old = Globals.nameCache_lastFirst.get(in);\n if (old != null)\n return (String)old;\n \n //Util.pr(\"lastnamefirst: in\");\n StringBuffer sb=ne...
[ "0.6482541", "0.63891965", "0.6212019", "0.6212019", "0.6095925", "0.5971432", "0.5968083", "0.5961284", "0.5961284", "0.5940213", "0.5940213", "0.5922544", "0.5901065", "0.5872462", "0.5872007", "0.57907885", "0.5788724", "0.57855517", "0.5771928", "0.5714694", "0.56881887",...
0.6910334
0
/ Construtors Creates a new parser for the SPARQL Query Results XML Format.
public SPARQLBooleanXMLParser() { super(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static QueryInterface createQuery() {\n return new XmlQuery();\n }", "public static Result fromXMLElement(String query, XMLElement resultElement){\n\t\tResult result = new Result();\n\t\t\n\t\t/* Set query. */\n\t\tresult.query = query;\n\t\t\n\t\t/* Set suggestion. */\n\t\tif(resultElement.hasC...
[ "0.6510691", "0.61387485", "0.57937264", "0.5720295", "0.56742156", "0.5610605", "0.556115", "0.55526364", "0.55370295", "0.5484091", "0.544585", "0.5435908", "0.5407082", "0.53972375", "0.53972375", "0.53972375", "0.53972375", "0.53972375", "0.53972375", "0.53972375", "0.539...
0.57439125
3
Set up mockBean responses
@Test public void productMapperLowestAvailabilityTest() { Mockito.when( flightSegmentsMapper.mapFlightSegments(Mockito.any(Option.class), Mockito.eq(segmentsMap))) .thenReturn(new ArrayList<FlightSegment>()); Mockito .when(passengerFlightMapper.mapPassengerFlight(Mockito.eq(pricePoint...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void useFakeResponse() {\n EmployeeApp.useFakeResponse = true;\n ResponseObject responseObject = new ResponseObject();\n responseObject.setReturnCode(200);\n responseObject.setType(ResponseObject.ResponseType.JSON);\n responseObject.setResponseBodyString(new CompanyEmploy...
[ "0.6742217", "0.65042096", "0.642185", "0.6006969", "0.59948856", "0.5975626", "0.5953582", "0.5903493", "0.58599657", "0.5828512", "0.5768728", "0.56531745", "0.56189245", "0.55648553", "0.5540453", "0.55339664", "0.5527434", "0.55107933", "0.549772", "0.54943717", "0.549064...
0.0
-1
Title: EventActionInfo Description: Description of the constructor
public EventActionInfo(org.dom4j.Element el) throws Exception { this(); readXML(el); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ActionEvent(Object source, int id, int clicks, String command, Object param) {\n super(source, id, command);\n this.clicks = clicks; \n this.param = param; \n }", "public Event() {\r\n\r\n\t}", "protected ICEvent() {}", "public Event() {\n }", "public Eve...
[ "0.6984802", "0.69004315", "0.6830575", "0.6793733", "0.6793733", "0.6768989", "0.6739078", "0.6702686", "0.6700572", "0.6611491", "0.65922576", "0.65319145", "0.65303993", "0.65123254", "0.64596176", "0.6407589", "0.6384298", "0.63566", "0.6355616", "0.63542384", "0.63047314...
0.63453937
20
Title: validate Description: Description of the method
public boolean validate() throws Exception { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void validate() {}", "void validate();", "void validate();", "protected void validate() {\n // no op\n }", "public abstract boolean validate();", "@Override\n\tpublic void validate()\n\t{\n\n\t}", "@Override\r\n\tpublic void validate() {\n\t\t\r\n\t}", "ValidationResponse validate();...
[ "0.8720467", "0.8495479", "0.8495479", "0.7929322", "0.79288965", "0.79250175", "0.78354645", "0.77511495", "0.77239466", "0.7713707", "0.77110773", "0.76732004", "0.7655603", "0.7642864", "0.7637283", "0.7630704", "0.7611805", "0.74356633", "0.7348816", "0.7274531", "0.72593...
0.0
-1
Title: readXML Description: Parses XML into Object instance
public void readXML(org.dom4j.Element el) throws Exception { String name,value; org.dom4j.Element node=el; if (el.attribute("type") != null) setType(el.attribute("type").getText()); if (el.attribute("action") != null) setAction(ActionList.valueOf(el.attri...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void parseXML(String XML);", "public static Object objectFromXml(String xml) throws XmlParseException\n {\n return objectFromXmlElement(Xmlwise.createXml(xml));\n }", "public static Obj fromString(String xml) \n { \n try\n {\n ByteArrayInputStream...
[ "0.68273723", "0.670118", "0.6559582", "0.64295214", "0.63820726", "0.6348522", "0.6344613", "0.6323239", "0.6308286", "0.6168632", "0.6150282", "0.6042915", "0.60363364", "0.6021233", "0.5985197", "0.5978715", "0.5974074", "0.59519297", "0.59381205", "0.59323287", "0.5908453...
0.57603276
30
Title: writeXML Description: Creates XML from Object instance
public org.dom4j.Element writeXML() throws Exception { return writeXML(sObjName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String toXML();", "public abstract String toXML();", "public abstract String toXML();", "private void jaxbObjectToXML(Object object, Writer outputWriter) throws JAXBException {\r\n \r\n JAXBContext context = JAXBContext.newInstance(object.getClass());\r\n Marshaller marsh...
[ "0.6904498", "0.6904498", "0.6904498", "0.6811819", "0.67173654", "0.66696966", "0.6579164", "0.6572036", "0.65064514", "0.64062136", "0.63893497", "0.63393104", "0.6327431", "0.6308585", "0.63021785", "0.63006294", "0.6248789", "0.6224102", "0.61897224", "0.61164314", "0.611...
0.6630437
7
Title: writeXML Description: Creates XML from Object instance
public org.dom4j.Element writeXML(String name) throws Exception { org.dom4j.Element el = org.dom4j.DocumentHelper.createElement(name); if(getType() != null) el.addAttribute("type", getType()); if(getAction() != null) el.addAttribute("action", getAction().toString()); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String toXML();", "public abstract String toXML();", "public abstract String toXML();", "private void jaxbObjectToXML(Object object, Writer outputWriter) throws JAXBException {\r\n \r\n JAXBContext context = JAXBContext.newInstance(object.getClass());\r\n Marshaller marsh...
[ "0.6904498", "0.6904498", "0.6904498", "0.6811819", "0.67173654", "0.66696966", "0.6630437", "0.6630437", "0.6579164", "0.6572036", "0.65064514", "0.64062136", "0.63893497", "0.63393104", "0.6327431", "0.6308585", "0.63021785", "0.63006294", "0.6248789", "0.6224102", "0.61897...
0.5555457
90
Create an image file name
private File createImageFile() throws IOException { String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date()); String imageFileName = "JPEG_" + timeStamp + "_"; File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES); File image = File.createTempFile( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private File createImageFileName() throws IOException {\n String timestamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n //there are two types of SimpleDateFormat and Date()\n String prepend = \"JPEG_\" + timestamp + \"_\";\n File imageFile = File.createTempFile(prep...
[ "0.7782615", "0.7292824", "0.6992056", "0.6992056", "0.6943564", "0.6911284", "0.68938434", "0.686538", "0.68592805", "0.68590325", "0.68580544", "0.68443614", "0.67711073", "0.67546785", "0.6751638", "0.6737171", "0.6726197", "0.67170936", "0.67068315", "0.6706409", "0.66945...
0.0
-1
Bundle extras = data.getExtras(); Bitmap bitmap = (Bitmap) extras.get("data"); imgDisplay.setImageBitmap(bitmap);
@Override protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { if (requestCode == CAPTURE_IMAGE_REQUEST && resultCode == RESULT_OK) { Bitmap myBitmap = BitmapFactory.decodeFile(photoFile.getAbsolutePath()); imgDisplay.setImageBitmap(myBitmap); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\r\n Bitmap b=(Bitmap)data.getExtras().get(\"data\");\r\n i1.setImageBitmap(b);\r\n\r\n }", "@Override\r\nprotected void onActivityResul...
[ "0.7988478", "0.7850651", "0.7450289", "0.7301483", "0.728674", "0.7263929", "0.72353697", "0.7212281", "0.7128506", "0.71188265", "0.710277", "0.7083879", "0.7067691", "0.70519567", "0.70432043", "0.6903063", "0.6888615", "0.68865937", "0.68682015", "0.685968", "0.6804317", ...
0.6503229
29
Assert the the job started and notices the change of content.
@Test public void testStartJob() { // Set a specific date for the last change DateTime originalDate = new DateTime(2014, 12, 23, 0, 0, 0); List<MonitorJob> listMonitorJobs = new ArrayList<>(); String url = "http://www.google.com"; MonitorJob monitorJob = new MonitorJob(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testLaunchJob() throws Exception {\n\t\tJobExecution jobExecution = jobLauncherTestUtils.launchJob();\n\t\tassertEquals(BatchStatus.COMPLETED, jobExecution.getStatus());\n\n\t}", "@InSequence(1)\n @Test\n public void worksAfterDeployment() throws InterruptedException {\n int sum...
[ "0.6213956", "0.6040014", "0.59241295", "0.59132797", "0.58985513", "0.5856837", "0.5824152", "0.57940847", "0.5769601", "0.5755505", "0.569672", "0.56881154", "0.5682507", "0.5678452", "0.5641158", "0.56077504", "0.5583276", "0.55774015", "0.5530866", "0.5478374", "0.5473291...
0.686309
0
Creates new form formAnalisis
public formAnalisis() { initComponents(); // List<Double> testData = IntStream.range(1, 100) // .mapToDouble(d -> d) // .collect(ArrayList::new, ArrayList::add, ArrayList::addAll); // deskriptif stat = new deskriptif(); // stat.setNameDesc("foo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Command\n\tpublic void nuevoAnalista(){\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\n\n\t\t//parametros.put(\"recordMode\", \"NEW\");\n\t\tllamarFormulario(\"formularioAnalistas.zul\", null);\n\t}", "public static void create(Formulario form){\n daoFormulario.create(form);\n }...
[ "0.68342185", "0.63620484", "0.631992", "0.62986314", "0.6168679", "0.5969771", "0.5953243", "0.5836324", "0.5809637", "0.5799005", "0.5766754", "0.57650626", "0.575674", "0.5698205", "0.56220263", "0.5576227", "0.557526", "0.5568608", "0.55589235", "0.5551799", "0.55468893",...
0.0
-1
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() { bindingGroup = new org.jdesktop.beansbinding.BindingGroup(); list1 = org.jdesktop.observablecollections.ObservableCollections.observableList(n...
{ "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.73191476", "0.72906625", "0.72906625", "0.72906625", "0.72860986", "0.7248112", "0.7213479", "0.72078276", "0.7195841", "0.71899796", "0.71840525", "0.7158498", "0.71477973", "0.7092748", "0.70800966", "0.70558053", "0.69871384", "0.69773406", "0.69548076", "0.69533914", "...
0.0
-1
End of variables declaration//GENEND:variables
public void Reset() { this.list1.clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void lavar() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "private void assignment() {\n\n\t\t\t}", "private void kk12() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n pu...
[ "0.6359434", "0.6280371", "0.61868024", "0.6094568", "0.60925734", "0.6071678", "0.6052686", "0.60522056", "0.6003249", "0.59887564", "0.59705925", "0.59680873", "0.5967989", "0.5965816", "0.5962006", "0.5942372", "0.5909877", "0.5896588", "0.5891321", "0.5882983", "0.5881482...
0.0
-1
it works on a principle of rotation , the outer loop will run the gcd of array length and number of rotation inner loop will run until every element in the set which is decided by gcd is placed in right location
private static void rotateArray(int[] arr, int gcd, int k) { // gcd is the set length for which the rotation will happen int len = arr.length; for (int i = 0; i < gcd; i++) { int temp = arr[i]; int j = i; int l = -1; while (true) { l = ((j + k) % len); if (l == i) { break; } arr[j...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void solution() {\n for (int i = 0; i < n; i++) {\n Coord here = coords[i]; // start, end, dir, gen\n for (int j = 0; j < here.gen; j++) {\n // Rotate degree of 90.\n List<Pair> changed = rotate(here.coord, here.endPoint);\n b...
[ "0.61965626", "0.60911155", "0.60740817", "0.58289987", "0.58200496", "0.58195263", "0.57485646", "0.5732344", "0.5723807", "0.56875616", "0.5672855", "0.56712914", "0.56043565", "0.55951554", "0.559127", "0.5571939", "0.5529849", "0.552482", "0.550317", "0.5500876", "0.54881...
0.67966014
0
This method finds the dcs of two elements
private static int findGcd(int a, int b) { int low = a < b ? a : b; int high = a < b ? b : a; if (high % low == 0) { return low; } else { return findGcd(high, high % low); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int distanceBetweenNodes(Node node, int d1, int d2){\r\n ArrayList<Integer> path1 = nodeToRootPath(node, d1);\r\n ArrayList<Integer> path2 = nodeToRootPath(node, d2);\r\n \r\n //Traverse from behind to avoid time complexity\r\n int i = path1.size() - 1;\r\n i...
[ "0.63233787", "0.6164322", "0.5749052", "0.56546223", "0.5651658", "0.55740374", "0.5513102", "0.5477532", "0.5370039", "0.5358599", "0.5349207", "0.53327084", "0.532837", "0.5261797", "0.5254487", "0.52483934", "0.5231811", "0.5219272", "0.52178323", "0.52103627", "0.5206902...
0.5279665
13
Checks to see if a side if allowed. Note that this may return true even though a later handler might disallow a side, so you should only use this to skip checking a side (for example a diamond pipe might not check the filters for a specific side if its already been disallowed)
public boolean isAllowed(EnumFacing side) { return allowed.contains(side); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean hasSide() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "public boolean hasSide() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "boolean isValidSide(IBlockAccess access, BlockPos pos, EnumFacing facing);", "boolean hasSide();", "boolean isPossi...
[ "0.68003964", "0.67432237", "0.66945904", "0.65964", "0.63554776", "0.63552064", "0.63038117", "0.59227955", "0.58643216", "0.58377796", "0.5808804", "0.5798254", "0.577047", "0.57398015", "0.56687963", "0.5652073", "0.5649716", "0.5578839", "0.5536717", "0.551411", "0.549666...
0.73480296
0
Disallows the specific side(s) from being a destination for the item. If no sides are allowed, then the fluid will stay in the current pipe section.
public void disallow(EnumFacing... sides) { for (EnumFacing side : sides) { allowed.remove(side); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void preventMovementInOppositeDirection() {\n\t\tif(currentDirection == Direction.RIGHT && \n\t\t\t\tsnakeDirection == Direction.LEFT) {\n\t\t\t\n\t\t\tcurrentDirection = Direction.LEFT;\n\t\t} else if(currentDirection == Direction.LEFT && \n\t\t\t\tsnakeDirection == Direction.RIGHT) {\n\t\t\t\n\t\t\tcurre...
[ "0.6335399", "0.62316996", "0.58810115", "0.5833913", "0.5737216", "0.5625863", "0.5552845", "0.552169", "0.548517", "0.5443688", "0.5255187", "0.52357495", "0.5218719", "0.521314", "0.5208553", "0.51922226", "0.51831686", "0.5179123", "0.51084566", "0.50861466", "0.5082819",...
0.6073642
2
Let's use a single instance for all tests, to increase chance of seeing failures
protected void setUp() { typeResolver = new TypeResolver(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void instanceTest() {\n // TODO: test instance\n }", "@Test\n public void testGetInstance() {\n System.out.println(\"getInstance\");\n Fabrica expResult = Fabrica.getInstance();\n Fabrica result = Fabrica.getInstance();\n assertEquals(expResult, result);...
[ "0.70052075", "0.65446866", "0.65339977", "0.6490601", "0.6452612", "0.6420246", "0.6410375", "0.63956517", "0.63944995", "0.6342584", "0.6319801", "0.6314513", "0.63093275", "0.6293455", "0.6271117", "0.62561", "0.62531227", "0.62460876", "0.6233082", "0.6192173", "0.6186583...
0.0
-1
/ / Unit tests
public void testSelfReferencesSimple() { TypeResolver typeResolver = new TypeResolver(); MemberResolver memberResolver = new MemberResolver(typeResolver); ResolvedType type = typeResolver.resolve(MyComparable.class); ResolvedMethod[] resolvedMethods = memberResolver.resolve(type, nul...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Test\r\n\tpublic void testSanity() {\n\t}", "private void test() {\n\n\t}", "public void testGetBasedata() {\n }", "@Test\n public void testWalkForPduTarget() throws Exception {\n//TODO: Test goes here... \n }", "@Test\n public void testAdd...
[ "0.7355159", "0.7325804", "0.716326", "0.69676787", "0.6856734", "0.68330264", "0.67875546", "0.67856336", "0.6780918", "0.67565066", "0.67538905", "0.6710163", "0.66945297", "0.6680416", "0.66691494", "0.66664547", "0.66647923", "0.66565835", "0.6650082", "0.66489613", "0.66...
0.0
-1
do nothing here since we had to write the status before the stream was written
@Override public void onNext(Void aVoid) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void sendStatus() throws IOException {\n\t\tWriteStatus status = new WriteStatus.Builder().build();\n\t\tstatus.writeTo(out);\n\t\tout.flush();\n\t}", "@Override\n protected void writeStreamHeader() throws IOException {\n reset();\n }", "@Override\n public void flush() throws IOException ...
[ "0.7138123", "0.6347387", "0.6347217", "0.62185246", "0.60643315", "0.6011556", "0.600249", "0.5998157", "0.59826225", "0.5918651", "0.59173", "0.5907595", "0.5906705", "0.58704525", "0.58496433", "0.5841215", "0.58184075", "0.58145374", "0.5805453", "0.5802931", "0.5797117",...
0.0
-1
Suma un plus al salario del empleado si el empleado tiene una comision menor que 50
public boolean plus (double sueldoPlus) { boolean aumento = false; if (comision<50) { salario= salario + sueldoPlus; aumento = true; } return aumento; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public double calculaSalario() \n {\n double resultado = valor_base - ((acumulado * 0.05) * valor_base);\n resultado += auxilioProcriacao();\n //vale-coxinha\n resultado += 42;\n return resultado;\n }", "public void sumaPuntos() {\r\n int rojo = 0;\r...
[ "0.6093075", "0.6041032", "0.5872609", "0.5868868", "0.58517313", "0.5823453", "0.58232933", "0.5820955", "0.57712823", "0.5759694", "0.5754604", "0.5752233", "0.5737", "0.5730412", "0.5701209", "0.569391", "0.5690032", "0.564614", "0.5595776", "0.5594667", "0.5594667", "0....
0.5300952
59
Constructor con 5 para metros
public Comercial(String nombre, String apellido, int edad, double salario, double comision) { super(nombre, apellido, edad, salario); this.comision=comision; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "private void __sep__Constructors__() {}", "public tn(String paramString, ho paramho)\r\n/* 12: */ {\r\n/* 13:11 */ super(paramString, paramho);\r\n/* 14: */ }", "public Card() { this(12, 3); }", "public Constructor(){\n\t\t\n\t}", "public Test05() {\n th...
[ "0.66565186", "0.66148555", "0.65107006", "0.63943577", "0.63170594", "0.63088757", "0.6194715", "0.61200637", "0.6108032", "0.61020386", "0.609386", "0.6091358", "0.605528", "0.60522777", "0.60475904", "0.6013921", "0.5994313", "0.5983478", "0.5971637", "0.5965408", "0.59545...
0.0
-1
Recalibrates the time based on the GPS timestamps.
public void calibrateTime(TimeCalibrator calibrator) { timestamp = calibrator.getCalibratedTime(timestamp); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void refreshTime(@Nullable Location location) {\n String provider = location == null ? \"\" : location.getProvider();\n String lat = location == null ? \"\" : formatCoordinate(location.getLatitude());\n String lon = location == null ? \"\" : formatCoordinate(location.getLongitude() * -...
[ "0.54394275", "0.529834", "0.52802837", "0.5279336", "0.5237708", "0.51971745", "0.5106491", "0.5067023", "0.5041878", "0.50321215", "0.50101745", "0.4984988", "0.4976201", "0.49618334", "0.49429533", "0.4941119", "0.49383688", "0.4912497", "0.48919067", "0.4886182", "0.48852...
0.73244864
0
Returns the local time stamp. This is the value of the local system clock and obtained using System.currentTimeMillis().
public long getTimestamp() { return timestamp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final long getLocalTimeStamp()\n {\n return getTimeStamp( TimeZone.getDefault());\n }", "public static LocalTime localTimeNow() {\n return TimeService.localTimeNow();\n }", "public static LocalTime UTCTimeNow() {\n return TimeService.UTCTimeNow();\n }", "public stati...
[ "0.8431468", "0.7840413", "0.7391434", "0.7288264", "0.7227305", "0.7178433", "0.7111921", "0.7049369", "0.7047194", "0.69986063", "0.6982459", "0.696252", "0.6948956", "0.69301146", "0.69062823", "0.6891254", "0.6883662", "0.68814236", "0.6845389", "0.6807724", "0.6799665", ...
0.0
-1
DADO QUE POSSUO UMA ARQUIVO DE 10KB E REALIZE A LEITURA PARA UMA LISTA DAS PALAVRAS
private void testePerformaceUtilizandoPesquisaLinear(String arquivo) { leituraDo(arquivo); // QUANDO EU EXECUTAR A PESQUISA LINEAR long tempoInicial = System.currentTimeMillis(); @SuppressWarnings("static-access") int posicaoPalavraPesquisada = algoritimoDePesquisa.pesquisaLinear(leitor.getConjuntoPa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n public void teamListTooLargeTest(){\r\n int tooBigListSize = 15;\r\n\r\n int expectedResult = extractor.extractXDriversOrTeams(tooBigListSize, \"table.msr_season_team_results\", \"td.msr_team\").size();\r\n\r\n assertEquals(\"expected results = \" + expectedResult, expectedResult,...
[ "0.56544316", "0.56170547", "0.55992246", "0.5585545", "0.5523149", "0.55047125", "0.5486055", "0.54721063", "0.53641033", "0.5311314", "0.5289478", "0.528322", "0.52671075", "0.5265256", "0.52297014", "0.5227562", "0.52185315", "0.5198531", "0.5197839", "0.5197563", "0.51731...
0.0
-1
DADO QUE POSSUO UMA ARQUIVO de X Bytes E REALIZE A LEITURA PARA UMA LISTA DAS PALAVRAS
private void testePerformaceUtilizandoPesquisaBinaria(String arquivo) { leituraDo(arquivo); leitor.ordenarComSort(); // QUANDO EU EXECUTAR A PESQUISA LINEAR long tempoInicial = System.currentTimeMillis(); @SuppressWarnings("static-access") int posicaoPalavraPesquisada = algoritimoDePesquisa.pesqui...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test07() throws Throwable {\n LinkedList<byte[][]> linkedList0 = new LinkedList<byte[][]>();\n byte[][] byteArray0 = new byte[7][8];\n byte[] byteArray1 = new byte[8];\n byteArray1[0] = (byte) (-13);\n byteArray1[1] = (byte)77;\n byteArray1[2] = ...
[ "0.5548139", "0.54742545", "0.52966183", "0.5285389", "0.5256688", "0.5211503", "0.5202351", "0.5171077", "0.51558125", "0.510746", "0.508908", "0.50793225", "0.5076285", "0.5064593", "0.5057725", "0.5052603", "0.50426775", "0.50314224", "0.5027897", "0.5026966", "0.5026498",...
0.52369547
5
The drone does not send the preferred target if it has not been set since last boot
@Override protected void onConnecting() { mPreferredTarget = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public int targetDevice() {\n return 0;\n }", "public void setChargerTarget() {\n if (getEnemies().size() > 0) {\n ArrayList<RobotReference> enemies = getEnemies();\n RobotReference closestEnemy = enemies.get(0);\n if (chargerTarget == null && team...
[ "0.64216167", "0.60817415", "0.59165686", "0.59057796", "0.58678865", "0.58304745", "0.58222", "0.5799163", "0.5778183", "0.57399714", "0.57225585", "0.57215613", "0.5709646", "0.5617461", "0.5583321", "0.55695", "0.5546031", "0.5541782", "0.552193", "0.55169946", "0.55160797...
0.6381652
1
clear all non saved settings
@Override protected final void onDisconnected() { mPilotingItf.cancelSettingsRollbacks() .resetLocation() .updateCurrentTarget(ReturnHomePilotingItf.Target.TAKE_OFF_POSITION) .updateGpsFixedOnTakeOff(false); if (!isPersisted()) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clearAllPreference() {\n editor.clear();\n editor.apply();\n }", "public static void clear(){\n preferences.edit().clear().apply();\n }", "public void clearAllPreferenceData() {\n sharedPreferences.edit().clear().apply();\n }", "public void clearPrefs() {\n ...
[ "0.79590803", "0.78890544", "0.76916397", "0.7515536", "0.74430597", "0.7371896", "0.7333781", "0.73171586", "0.7271661", "0.7106934", "0.71051604", "0.7040877", "0.7038106", "0.6960179", "0.69399947", "0.6930359", "0.69221324", "0.689571", "0.689571", "0.6872853", "0.6872853...
0.0
-1
Loads presets and settings from persistent storage and updates the component accordingly.
private void loadPersistedData() { IntegerRange storedAutoStartOnDisconnectDelayRange = AUTOSTART_ON_DISCONNECT_DELAY_RANGE_SETTING.load(mDeviceDict); if (storedAutoStartOnDisconnectDelayRange != null) { mPilotingItf.getAutoStartOnDisconnectDelay().updateBounds(storedAutoStar...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void loadPersistence() {\n\t\tFile file = new File(\"data.txt\");\n\t\tif (file.length() == 0) { // no persistent data to use\n\t\t\treturn;\n\t\t}\n\t\tdeserializeFile(file);\n\t\tloadPersistentSettings();\n\t}", "public void loadPersistencePreferences() {\n SharedPreferences sharedPreferences = P...
[ "0.6377637", "0.63066643", "0.6215089", "0.6182025", "0.60741085", "0.607336", "0.59204644", "0.5900078", "0.58560014", "0.5831507", "0.5777495", "0.57614976", "0.57288915", "0.5723361", "0.56949896", "0.5684401", "0.56780994", "0.5671554", "0.5648699", "0.5630907", "0.561134...
0.6498227
0
Applies component's persisted presets.
private void applyPresets() { applyAutoTrigger(AUTO_TRIGGER_PRESET.load(mPresetDict)); applyPreferredTarget(PREFERRED_TARGET_PRESET.load(mPresetDict)); applyEndingBehavior(ENDING_BEHAVIOR_PRESET.load(mPresetDict)); applyAutoStartOnDisconnectDelay(AUTOSTART_ON_DISCONNECT_DELAY_PRESET.load...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void preProcessDataModel() {\r\n collectAllAttribtueDefinitions();\r\n\r\n for (AttributeDefinition attribute : dataModel.getAttributeDefinitions()) {\r\n attribute.setAttributeType(UINameToValueMap.get(attribute.getAttributeType()));\r\n }\r\n\r\n if (null != dataMod...
[ "0.5469412", "0.5397771", "0.5073257", "0.50224006", "0.5003922", "0.5003922", "0.5003922", "0.5003922", "0.4992737", "0.49895376", "0.49531716", "0.4945241", "0.49361315", "0.4930255", "0.49054125", "0.48589033", "0.4834132", "0.4807334", "0.48049238", "0.4789418", "0.477292...
0.7224475
0
Updates return home autotrigger delay.
private void updateAutoTriggerDelay(long delay) { if (mAutoTriggerDelay != delay) { mAutoTriggerDelay = delay; updateReachabilityStatus(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setDelay(double clock);", "long getInitialDelayInSeconds();", "@Override\n public native void setAutoDelay(int ms);", "public void setAutoResetDelay(int delay) {\n this.mAutoResetDelay = delay;\n }", "public long getDelay();", "@Override\n public native int getAutoDelay();", ...
[ "0.5946312", "0.5816591", "0.5786145", "0.5746851", "0.5698563", "0.5669655", "0.56628203", "0.5654424", "0.563098", "0.5619098", "0.5579293", "0.55683035", "0.55638766", "0.55572176", "0.5511011", "0.55009407", "0.5480732", "0.54748523", "0.543951", "0.5421105", "0.54123247"...
0.6541407
0
Update the new target location.
private void onLocation(double latitude, double longitude, double altitude) { onLocation(latitude, longitude, altitude, null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setTargetLocation(Location targetLocation) \n {\n this.targetLocation = targetLocation;\n }", "public void updateLocation();", "private void updateCurrentTarget(){\n switch (state){\n case States.DEAD:\n currentTarget = currentLocation;\n ...
[ "0.7320374", "0.6982854", "0.67651147", "0.66195416", "0.6561366", "0.6426398", "0.64169157", "0.63151383", "0.6293236", "0.6153", "0.6152121", "0.61073804", "0.6036623", "0.60312915", "0.6015337", "0.601275", "0.5960591", "0.593693", "0.5931203", "0.58983696", "0.5866947", ...
0.0
-1
Update the new target location and whether the gps was fixed on take off.
private void onLocation(double latitude, double longitude, double altitude, @Nullable Boolean gpsFixedOnTakeOff) { if (Double.compare(latitude, UNKNOWN_COORDINATE) != 0 && Double.compare(longitude, UNKNOWN_COORDINATE) != 0) { mPilotingItf.u...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void locationUpdate(Location newLocation, boolean isManual) {\n if (isManual) {\n /// (manual) location update by click on map\n if (mCurrentLocationManual.distanceTo(newLocation) <\n Constants.Locations.UPDATE_INTERVAL_DISTANCE) {\n /// show up explanation\n ...
[ "0.6672397", "0.6450602", "0.6324338", "0.626844", "0.61451966", "0.6069639", "0.6034468", "0.6018003", "0.5955222", "0.59470004", "0.5934213", "0.59314334", "0.5929384", "0.5927415", "0.5922519", "0.59198", "0.59065485", "0.5906533", "0.5901732", "0.5886363", "0.58821946", ...
0.6975609
0
Re authenticate to the backend server
public void reauthenticateBackendServer() { String token = userLogin(); // Update the retrieved token in the database. User user = userRepository.findByEmailIgnoreCase(SecurityUtils.getCurrentUser().getEmail()); user.setBackendToken(token); userRepository.save(user); // Update the user token on the Securi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void clientAuthenticate()\n throws HubIntegrationException {\n try {\n final ArrayList<String> segments = new ArrayList<>();\n segments.add(\"j_spring_security_check\");\n final HttpUrl httpUrl = createHttpUrl(segments, null);\n\n ...
[ "0.64765507", "0.63921", "0.6277572", "0.6246606", "0.62250566", "0.60446197", "0.6032125", "0.596606", "0.596168", "0.5945022", "0.5943184", "0.59417063", "0.59307414", "0.591021", "0.5909208", "0.5886393", "0.588637", "0.58704495", "0.58381087", "0.58365154", "0.57992643", ...
0.7752846
0
Executes the request. This method is called from the WebView thread. To do a nontrivial amount of work, use: cordova.getThreadPool().execute(runnable); To run on the UI thread, use: cordova.getActivity().runOnUiThread(runnable);
@Override public boolean execute(String action, JSONArray args, CallbackContext callbackContext) { this.callbackContext = callbackContext; if (action.equals("scan")) { scan(); } else { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void run() {\n //Request the HTML\n try {\n HttpClient Client = new DefaultHttpClient();\n //String URL = \"http://10.0.2.2:8888/url\";\n String URL = \"http://\" + ipAddress + \":8888/intent?sentence=\" + URLEncoder.enco...
[ "0.6207678", "0.60077846", "0.59308904", "0.58774406", "0.5766813", "0.57402056", "0.5672674", "0.56531715", "0.5601248", "0.55675656", "0.5557401", "0.5545228", "0.55291843", "0.55174094", "0.5515025", "0.55144507", "0.55143154", "0.5507303", "0.5495489", "0.5490408", "0.547...
0.0
-1
Starts an intent to scan and decode a barcode.
public void scan() { Intent intentScan = new Intent(SCAN_INTENT); intentScan.addCategory(Intent.CATEGORY_DEFAULT); // avoid calling other phonegap apps intentScan.setPackage(this.cordova.getActivity().getApplicationContext().getPackageName()); this.cordova.startActivityForResult...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void openScanner(){\n Intent intent = new Intent(ReturningTaskActivity.this, BarcodeScannerActivity.class);\n startActivityForResult(intent, 0);\n }", "private void initiateBarcodeScan(Activity activity) {\n IntentIntegrator zxingIntegrator = new IntentIntegrator(activity);\n ...
[ "0.7596086", "0.7158326", "0.715277", "0.6826418", "0.6730981", "0.66824853", "0.6668395", "0.65992624", "0.644984", "0.63863647", "0.637703", "0.63677186", "0.6337479", "0.6263392", "0.6260185", "0.6156796", "0.61527056", "0.6149059", "0.61259836", "0.6108261", "0.60988015",...
0.62104225
15
/ Access modifiers changed, original: protected
public TextView a(Context context) { TextView textView = new TextView(context); textView.setGravity(17); textView.setTextSize(2, 12.0f); textView.setTypeface(Typeface.DEFAULT_BOLD); textView.setLayoutParams(new LayoutParams(-2, -2)); TypedValue typedValue = new TypedValue...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic ...
[ "0.73623323", "0.69830847", "0.68941706", "0.6798817", "0.67315143", "0.67264825", "0.67049384", "0.6551554", "0.65256643", "0.65247214", "0.64783233", "0.6459452", "0.644003", "0.6434508", "0.641292", "0.64095944", "0.64055127", "0.64055127", "0.6402614", "0.64020926", "0.63...
0.0
-1
/ Access modifiers changed, original: protected
public void onAttachedToWindow() { super.onAttachedToWindow(); if (this.e != null) { a(this.e.getCurrentItem(), 0); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic ...
[ "0.7364149", "0.6983697", "0.6894897", "0.68000275", "0.67330915", "0.67271525", "0.6705304", "0.6552741", "0.6526719", "0.6525501", "0.64800584", "0.6459902", "0.6441492", "0.6434852", "0.64129364", "0.64103013", "0.6406338", "0.6406338", "0.64056695", "0.6403243", "0.639446...
0.0
-1
TODO Autogenerated method stub
@Override public boolean addNewUser(User user) { return false; }
{ "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
Compose a new tweet.
public void postTweet(int userId, int tweetId) { if (!tweets.containsKey(userId)) { //build one's tweet list tweets.put(userId, new LinkedList<>()); //follow himself follow(userId, userId); } //add new tweet on the first place tweets.get(userId).add(0, new Tweet(tweetId, timeStamp++)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void composeTweet(Tweet tweet, AsyncHttpResponseHandler handler) {\n String apiUrl = getApiUrl(\"statuses/update.json\");\n RequestParams params = new RequestParams();\n\n params.put(\"status\", tweet.getBody());\n params.put(\"in_reply_to_status_id\", tweet.getInReplyToStatusId(...
[ "0.6821896", "0.6741255", "0.6711563", "0.63070965", "0.6214738", "0.6040289", "0.595183", "0.59110373", "0.5869741", "0.5858485", "0.5850284", "0.5845", "0.5831705", "0.5775812", "0.57639563", "0.5762864", "0.5735329", "0.5720031", "0.5665786", "0.56073296", "0.55487406", ...
0.4827014
80
Retrieve the 10 most recent tweet ids in the user's news feed. Each item in the news feed must be posted by users who the user followed or by the user himself. Tweets must be ordered from most recent to least recent.
public List<Integer> getNewsFeed(int userId) { //minHeap the top is the old tweet, which maybe remove from the list PriorityQueue<Tweet> minHeap = new PriorityQueue<>(new Comparator<Tweet>(){ @Override public int compare(Tweet t1, Tweet t2) { return t1.timePosted - t2.timePosted; } }); // get my fo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Integer> getNewsFeed(int userId) {\n if (!userId2TopTenTweets.containsKey(userId)) {\n return new ArrayList<>(0);\n }\n\n\n userId2TopTenTweets.get(userId).sort((i1, i2)->i2.getTimestamp() - i1.getTimestamp() > 0 ? 1:i2.getTimestamp() - i1.getTimestamp() == 0 ? 0 : -1);...
[ "0.74031943", "0.72697574", "0.7105399", "0.70931816", "0.70775187", "0.70763576", "0.7032798", "0.6988661", "0.6974764", "0.6936991", "0.6934822", "0.6849612", "0.6745586", "0.65934104", "0.6431383", "0.626682", "0.6154491", "0.60707486", "0.60458946", "0.5976068", "0.594137...
0.7061101
6
follower follows a followee
public void follow(int followerId, int followeeId) { // if (!followees.containsKey(followerId)) { followees.put(followerId, new HashSet<>()); } followees.get(followerId).add(followeeId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void follow(int followerId, int followeeId) {\n\n }", "public void follow(int followerId, int followeeId) {\n if (followerId == followeeId) return;\n User follower = getOrCreateUser(followerId);\n User followee = getOrCreateUser(followeeId);\n\n if (!follower.following.contain...
[ "0.8634217", "0.77610016", "0.77226377", "0.7679853", "0.7661275", "0.7650216", "0.76189363", "0.7618426", "0.7583517", "0.7574959", "0.75664026", "0.7527517", "0.7499501", "0.7496841", "0.74608916", "0.7434044", "0.7421119", "0.73507047", "0.7293242", "0.7276397", "0.7265082...
0.7496681
14
follower unfollows a followee but one can't unfollow himself
public void unfollow(int followerId, int followeeId) { if (!followees.containsKey(followerId) || followerId == followeeId) return; followees.get(followerId).remove(followeeId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void unfollow(int followerId, int followeeId) {\n\n }", "void unFollow(User user);", "@Override\n\t\tpublic void onUnfollow(User arg0, User arg1) {\n\t\t\t\n\t\t}", "public void unfollow(int followerId, int followeeId) {\n if(users.containsKey(followerId) && followerId != followeeId){\n ...
[ "0.8573132", "0.8061164", "0.7997007", "0.7900755", "0.78706336", "0.78439814", "0.76091725", "0.7575813", "0.75749546", "0.75367707", "0.7531035", "0.74689186", "0.745566", "0.7393234", "0.73841876", "0.7348093", "0.7318927", "0.73069686", "0.7262704", "0.7152059", "0.697950...
0.73256606
16
Method: isInputDataValid(String input) has to return true
@Test public void isInputDataValidTest() { boolean invoke = Deencapsulation.invoke(modificationFibonacci, "isInputDataValid", "1"); assertTrue(invoke); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void isValid(String input) throws DataInputException\n\t{\n\t}", "private boolean isValidInput() {\n\t\treturn true;\n\t}", "private boolean isInputValid() {\n return true;\n }", "protected abstract boolean isInputValid();", "protected abstract boolean isInputValid(@NotNull...
[ "0.87173057", "0.8256622", "0.80132455", "0.80083805", "0.7655423", "0.7491948", "0.7445991", "0.7435885", "0.74241877", "0.7353339", "0.7318285", "0.73103964", "0.7286584", "0.72425276", "0.7204857", "0.71385336", "0.7122796", "0.7061847", "0.6997576", "0.69702536", "0.69675...
0.0
-1
Method: isInputDataValid(String input) has to return false
@Test public void isInputDataValidTestWithBadInput() { boolean invoke = Deencapsulation.invoke(modificationFibonacci, "isInputDataValid", "a"); assertFalse(invoke); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void isValid(String input) throws DataInputException\n\t{\n\t}", "private boolean isValidInput() {\n\t\treturn true;\n\t}", "private boolean isInputValid() {\n return true;\n }", "protected abstract boolean isInputValid();", "protected abstract boolean isInputValid(@NotNull...
[ "0.85649997", "0.8096069", "0.7852256", "0.78284705", "0.7385448", "0.73349047", "0.7262217", "0.7252187", "0.7204674", "0.7184475", "0.7106134", "0.7089437", "0.7071313", "0.70243365", "0.7020989", "0.69791234", "0.6889323", "0.6887267", "0.6868709", "0.68330115", "0.6820228...
0.6595669
35
DB = new DBHelper(this);
public void init(){ elements = new ArrayList<>(); elements.add(new ListElement("Aeshnidae",this)); ListElement element1 = createItem("Baetidae"); elements.add(element1); //elements.add(new ListElement("Aeshnidae", 6, R.drawable.aeshnidaem)); //elements.add(new List...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initDB() {\n dataBaseHelper = new DataBaseHelper(this);\n }", "private void openDatabase() {\r\n SearchHelper = new DBHelper(this);\r\n }", "public DBManager(Context context){ \n\t\thelper = new DBHelper(context); \n\t\tdb = helper.getWritableDatabase(); \n\t}", "private D...
[ "0.7937752", "0.7670031", "0.7630217", "0.7626183", "0.7534554", "0.74374294", "0.73110753", "0.7289072", "0.7243384", "0.72310966", "0.7227017", "0.7216727", "0.71825206", "0.7179911", "0.7120061", "0.70851135", "0.7058478", "0.7014365", "0.6995249", "0.69895715", "0.697759"...
0.0
-1
sort list by x value
private void sort() { Collections.sort(mEntries, new Comparator<BarEntry>() { @Override public int compare(BarEntry o1, BarEntry o2) { return o1.getX() > o2.getX() ? 1 : o1.getX() < o2.getX() ? -1 : 0; } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void sortByX() {\n\t\tCollections.sort(pointList, getXComparator());\n\t}", "public static List<Integer> sort(List<Integer> input) {\n\t\tif (input.size() < 2)\n\t\t\treturn input;\n\n\t\tint pivot = input.get((input.size() - 1) / 2);\n\t\tList<Integer> less = input.stream().filter(x -> x < pivot).collec...
[ "0.7241861", "0.64345014", "0.6421235", "0.6404217", "0.6379716", "0.6374726", "0.635708", "0.6326651", "0.63229215", "0.63138604", "0.62996024", "0.62951636", "0.6281118", "0.62643707", "0.62643707", "0.622044", "0.6215308", "0.62111247", "0.61990803", "0.6188171", "0.618391...
0.60661066
33
calculate min / max x value
private void calcXSize(ArrayList<BarEntry> xValues) { for (int i = 0; i < xValues.size(); i++) { int xValue = xValues.get(i).getX(); mMaxX = Math.max(mMaxX, xValue); mMinX = Math.min(mMinX, xValue); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "float xMin();", "float xMax();", "public double getXRangeMax() {\n return xRangeMax;\n }", "public double getXRangeMin() {\n return xRangeMin;\n }", "private void findMinandMaxValues(SparklineValues values) {\n minY = values.getValues().stream().filter(value -> value.getValue() != null).mapT...
[ "0.7327778", "0.7321723", "0.7117175", "0.70774186", "0.6957908", "0.69078857", "0.690423", "0.686218", "0.68097454", "0.6795887", "0.67931986", "0.6705169", "0.665531", "0.6632447", "0.6632447", "0.6588476", "0.65813", "0.6578077", "0.6531309", "0.64911574", "0.6481686", "...
0.60158575
71
calculate min / max y value
private void calcYSize(ArrayList<BarEntry> yValues) { for (int i = 0; i < yValues.size(); i++) { float yValue = yValues.get(i).getY(); mMaxY = Math.max(mMaxY, yValue); mMinY = Math.min(mMinY, yValue); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "float yMin();", "float yMax();", "public double getYRangeMin() {\n return yRangeMin;\n }", "private void findMinandMaxValues(SparklineValues values) {\n minY = values.getValues().stream().filter(value -> value.getValue() != null).mapToDouble(SparklineValues.SparklineValue::getValue).min().orElse(0...
[ "0.78431803", "0.7607971", "0.745832", "0.7311128", "0.72310895", "0.7150767", "0.71384656", "0.7127707", "0.70788616", "0.7032275", "0.7002703", "0.6999642", "0.69626176", "0.6951471", "0.6927011", "0.6909292", "0.6907493", "0.689009", "0.68036395", "0.6759062", "0.6739006",...
0.64812857
32
O(m + n) time, m and n are matrix dimension
public int countNegatives(int[][] grid) { int result = 0; int m = grid.length, n= grid[0].length; int[] pos = new int[] {0, n - 1}; while(pos[0] < m && pos[1] > -1) { if (grid[pos[0]][pos[1]] < 0) { result += (m - pos[0]); pos[1]--; } else { pos[0]++; } } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int[][] generateMatrix(int n) {\n\t \n\t int matrix[][] = new int[n][n];\n\t int count = n * n +1;\n int topRow = 0;\n int bottomRow = n-1;\n int leftmostColumn = 0;\n int rightmostColumn = n -1;\n int added = 0;\n\t \n\t \n\t while(leftmostColumn <= rightmostColumn && topRow<...
[ "0.62753993", "0.6219348", "0.59808755", "0.5953927", "0.5893057", "0.58861697", "0.5865711", "0.58448124", "0.5812872", "0.5755281", "0.5748296", "0.57471454", "0.5737836", "0.571425", "0.56996983", "0.56978494", "0.56634456", "0.5639239", "0.56390876", "0.56388015", "0.5636...
0.0
-1
Test of cardSelectionIsValid method, of class utils.
@Test(expected = Exception.class) public void testCardSelectionIsValid_FALSE() throws Exception { System.out.println("cardSelectionIsValid not valid"); UnoCard cardSelection = new UnoCard(UnoCardColour.RED, UnoCardValue.TWO); UnoCard drawCard = new UnoCard(UnoCardColour.BLUE, UnoCardValue.ON...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testCardSelectionIsValid_TRUE() throws Exception {\n System.out.println(\"cardSelectionIsValid not valid\");\n UnoCard cardSelection = new UnoCard(UnoCardColour.BLUE, UnoCardValue.TWO);\n UnoCard drawCard = new UnoCard(UnoCardColour.BLUE, UnoCardValue.ONE);\n UnoC...
[ "0.8362122", "0.65338314", "0.63042736", "0.6287026", "0.62068903", "0.61873925", "0.6051241", "0.60474575", "0.6042071", "0.60165334", "0.59848005", "0.59839773", "0.5959615", "0.59477454", "0.5945105", "0.5931404", "0.5922863", "0.5861054", "0.5860923", "0.5840054", "0.5834...
0.8222797
1
Test of cardSelectionIsValid method, of class utils.
@Test public void testCardSelectionIsValid_TRUE() throws Exception { System.out.println("cardSelectionIsValid not valid"); UnoCard cardSelection = new UnoCard(UnoCardColour.BLUE, UnoCardValue.TWO); UnoCard drawCard = new UnoCard(UnoCardColour.BLUE, UnoCardValue.ONE); UnoCardColour wi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(expected = Exception.class)\n public void testCardSelectionIsValid_FALSE() throws Exception {\n System.out.println(\"cardSelectionIsValid not valid\");\n UnoCard cardSelection = new UnoCard(UnoCardColour.RED, UnoCardValue.TWO);\n UnoCard drawCard = new UnoCard(UnoCardColour.BLUE, UnoC...
[ "0.8222797", "0.65338314", "0.63042736", "0.6287026", "0.62068903", "0.61873925", "0.6051241", "0.60474575", "0.6042071", "0.60165334", "0.59848005", "0.59839773", "0.5959615", "0.59477454", "0.5945105", "0.5931404", "0.5922863", "0.5861054", "0.5860923", "0.5840054", "0.5834...
0.8362122
0
Test of cardCanPlay method, of class utils.
@Test public void testCardCanPlay_TRUE() { System.out.println("cardCanPlay TRUE COLOUR"); UnoCard cardSelection = new UnoCard(UnoCardColour.BLUE, UnoCardValue.TWO); UnoCard drawCard = new UnoCard(UnoCardColour.BLUE, UnoCardValue.ONE); UnoCardColour wildColour = UnoCardColour.BLUE; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testCanPlayOn() {\n \n DrawCard redDraw2 = new DrawCard(Card.COLOUR_RED, 2);\n \n // create another 4 normal cards\n \n Card card1 = new Card(Card.COLOUR_BLUE, 5);\n Card card2 = new Card(Card.COLOUR_BLUE,2);\n \n //card 1 and card 2 should...
[ "0.7659382", "0.7539191", "0.7412345", "0.7284266", "0.7250692", "0.6787191", "0.6725207", "0.6694125", "0.6676907", "0.6633777", "0.6591471", "0.65719104", "0.65429306", "0.6541443", "0.65411043", "0.65345496", "0.6495341", "0.64626014", "0.64570975", "0.6431492", "0.6426719...
0.75819266
1
Test of cardCanPlay method, of class utils.
@Test public void testCardCanPlay_FALSE() { System.out.println("cardCanPlay FALSE COLOUR"); UnoCard cardSelection = new UnoCard(UnoCardColour.RED, UnoCardValue.TWO); UnoCard drawCard = new UnoCard(UnoCardColour.BLUE, UnoCardValue.ONE); UnoCardColour wildColour = UnoCardColour.BLUE; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testCanPlayOn() {\n \n DrawCard redDraw2 = new DrawCard(Card.COLOUR_RED, 2);\n \n // create another 4 normal cards\n \n Card card1 = new Card(Card.COLOUR_BLUE, 5);\n Card card2 = new Card(Card.COLOUR_BLUE,2);\n \n //card 1 and card 2 should...
[ "0.766006", "0.7582534", "0.75396067", "0.72848463", "0.7251435", "0.6786447", "0.6728943", "0.6695245", "0.66777945", "0.663576", "0.6592336", "0.6573874", "0.6544196", "0.6543028", "0.6540786", "0.65356755", "0.64972013", "0.6465106", "0.64584273", "0.64336264", "0.64276546...
0.7413086
3
Test of cardCanPlay method, of class utils.
@Test public void testCardCanPlay_TRUE_VALUE() { System.out.println("cardCanPlay TRUE VALUE"); UnoCard cardSelection = new UnoCard(UnoCardColour.RED, UnoCardValue.TWO); UnoCard drawCard = new UnoCard(UnoCardColour.BLUE, UnoCardValue.TWO); UnoCardColour wildColour = UnoCardColour.BLUE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testCanPlayOn() {\n \n DrawCard redDraw2 = new DrawCard(Card.COLOUR_RED, 2);\n \n // create another 4 normal cards\n \n Card card1 = new Card(Card.COLOUR_BLUE, 5);\n Card card2 = new Card(Card.COLOUR_BLUE,2);\n \n //card 1 and card 2 should...
[ "0.7659382", "0.75819266", "0.7412345", "0.7284266", "0.7250692", "0.6787191", "0.6725207", "0.6694125", "0.6676907", "0.6633777", "0.6591471", "0.65719104", "0.65429306", "0.6541443", "0.65411043", "0.65345496", "0.6495341", "0.64626014", "0.64570975", "0.6431492", "0.642671...
0.7539191
2
Test of cardCanPlay method, of class utils.
@Test public void testCardCanPlay_FALSE_VALUE() { System.out.println("cardCanPlay FALSE VALUE"); UnoCard cardSelection = new UnoCard(UnoCardColour.RED, UnoCardValue.TWO); UnoCard drawCard = new UnoCard(UnoCardColour.BLUE, UnoCardValue.THREE); UnoCardColour wildColour = UnoCardColour....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testCanPlayOn() {\n \n DrawCard redDraw2 = new DrawCard(Card.COLOUR_RED, 2);\n \n // create another 4 normal cards\n \n Card card1 = new Card(Card.COLOUR_BLUE, 5);\n Card card2 = new Card(Card.COLOUR_BLUE,2);\n \n //card 1 and card 2 should...
[ "0.7659382", "0.75819266", "0.7539191", "0.7412345", "0.7250692", "0.6787191", "0.6725207", "0.6694125", "0.6676907", "0.6633777", "0.6591471", "0.65719104", "0.65429306", "0.6541443", "0.65411043", "0.65345496", "0.6495341", "0.64626014", "0.64570975", "0.6431492", "0.642671...
0.7284266
4
Test of cardCanPlay method, of class utils.
@Test public void testCardCanPlay_WILD() { System.out.println("cardCanPlay WILD"); UnoCard cardSelection = new UnoCard(UnoCardColour.WILD, UnoCardValue.ONE); UnoCard drawCard = new UnoCard(UnoCardColour.BLUE, UnoCardValue.THREE); UnoCardColour wildColour = UnoCardColour.BLUE; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testCanPlayOn() {\n \n DrawCard redDraw2 = new DrawCard(Card.COLOUR_RED, 2);\n \n // create another 4 normal cards\n \n Card card1 = new Card(Card.COLOUR_BLUE, 5);\n Card card2 = new Card(Card.COLOUR_BLUE,2);\n \n //card 1 and card 2 should...
[ "0.7659382", "0.75819266", "0.7539191", "0.7412345", "0.7284266", "0.6787191", "0.6725207", "0.6694125", "0.6676907", "0.6633777", "0.6591471", "0.65719104", "0.65429306", "0.6541443", "0.65411043", "0.65345496", "0.6495341", "0.64626014", "0.64570975", "0.6431492", "0.642671...
0.7250692
5
Created by wgoris31 on 1/24/2018.
public interface WifiCredentialsStoreInterface { String getSSID(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\t...
[ "0.59523463", "0.5812119", "0.56720155", "0.55393875", "0.55220175", "0.5520773", "0.5520773", "0.5495857", "0.5467442", "0.5460743", "0.5452715", "0.54375046", "0.5429094", "0.5429094", "0.5429094", "0.5429094", "0.5429094", "0.5429094", "0.53997153", "0.53607535", "0.535984...
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(View v) { new Thread(new Runnable(){ public void run(){ for(int i = 0; i<10; i++){ try{ Thread.sleep(100);//0.1초 대기 //핸들러 호출 h.sendEmptyMessage(5); }catch(Exception e){ } } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void 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
Return the number of matching entities in the database.
@Transactional(readOnly = true) public long countByCriteria(AccbillnoCriteria criteria) { log.debug("count by criteria : {}", criteria); final Specification<Accbillno> specification = createSpecification(criteria); return accbillnoRepository.count(specification); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int findAllCount() ;", "public int count() {\n\t Query count = getEntityManager().createQuery(\"select count(u) from \" + getEntityClass().getSimpleName() + \" u\");\n\t return Integer.parseInt(count.getSingleResult().toString());\n\t }", "public int count() {\n return Query.count(itera...
[ "0.72055745", "0.7112963", "0.7040392", "0.6930659", "0.6835712", "0.6823517", "0.6775256", "0.67737544", "0.6716066", "0.6703935", "0.66931164", "0.66503805", "0.66427094", "0.6639231", "0.6639231", "0.6639231", "0.6639231", "0.6639231", "0.6639231", "0.6639231", "0.6639231"...
0.0
-1
~ constructors Constructs a new instance of the program
public AR_v4() { super(); loadConfig(); setSockets(); setName("GUI"); initGUI(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Main() {\n\t\tsuper();\n\t}", "public Main() {\r\n\t}", "Program createProgram();", "Program createProgram();", "Program createProgram();", "private Main() {\n\n super();\n }", "public Main() {}", "public Main() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\r\n\t}", "public Main() {\r...
[ "0.73197126", "0.7205143", "0.71512514", "0.71512514", "0.71512514", "0.7134954", "0.7095566", "0.70924395", "0.7033384", "0.7033384", "0.69661415", "0.6944747", "0.6944747", "0.6936601", "0.69190717", "0.6913991", "0.68647724", "0.6828724", "0.67431957", "0.67151153", "0.670...
0.0
-1
~ methods Main method for running the program
public static void main(final String[] args) { final AR_v4 inst = new AR_v4(); inst.setVisible(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main()\n\t{\n\t}", "public static void main() {\n \n }", "public static void main(){\n\t}", "public void runProgram()\n\t{\n\t\tintro();\n\t\tfindLength();\n\t\tguessLetter();\n\t\tguessName();\n\t}", "public static void main() {\n }", "public static void main(String[] arg...
[ "0.80214846", "0.79791105", "0.78950727", "0.77257246", "0.7657479", "0.7609547", "0.7553716", "0.75410146", "0.7501752", "0.7500031", "0.74919444", "0.7487801", "0.7472238", "0.7459233", "0.74519867", "0.744447", "0.744447", "0.74396247", "0.7433389", "0.7433389", "0.7432641...
0.0
-1
Upon minimization, the frame is hidden and an icon is added to the system tray
public void windowIconified(WindowEvent arg0) { ti.setImageAutoSize(true); try { SystemTray.getSystemTray().add(ti); cms.setVisible(false); ti.addMouseListener(new MouseLi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void minimize()\n {\n this.setExtendedState(JFrame.ICONIFIED);\n }", "public void setTrayIcon()\n\t{\n\t\tImage image = new Image(display, PropertyManager.getInstance().getProperty(\"ICON_FOLDER\"));\n\t\tfinal Tray tray = display.getSystemTray();\n\n\t\tif (tray == null)\n\t\t{\n\t\t\tSystem...
[ "0.7059582", "0.684424", "0.6839764", "0.66774565", "0.66717494", "0.66469055", "0.6638335", "0.659402", "0.6584175", "0.6559478", "0.6513597", "0.64635444", "0.64329535", "0.6431871", "0.6431871", "0.643182", "0.6429016", "0.64060575", "0.64060575", "0.6405762", "0.6405762",...
0.7433465
0
Overrides the default JPanel paint method to paint the background image
public void paintComponent(Graphics g) { g.drawImage(back, 0, 0, null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void paintComponent(Graphics g) {\r\n\r\n //Paint background\r\n g.drawImage (background, 0, 0, null);\r\n }", "@Override\r\n\tpublic void paintComponent (Graphics g) {\r\n\t\tsuper.paintComponent(g);\r\n\t\tg.drawImage(background, 0, 0, 800, 660, null);\r\...
[ "0.8319506", "0.7943576", "0.7739777", "0.76958925", "0.7502797", "0.7492258", "0.70634353", "0.70232505", "0.6897336", "0.6888526", "0.68806535", "0.6878743", "0.6816207", "0.68051976", "0.67983747", "0.6785183", "0.6769256", "0.6763155", "0.67466843", "0.6743983", "0.671658...
0.0
-1
Allows the user to select if he wishes to be notified of program events
public void actionPerformed(ActionEvent arg0) { userAlert = chkAlert.getState(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ProgramEventEvent createProgramEventEvent();", "public void askForType() {\n System.out.println(\"What type of event will this be?\");\n System.out.println(\"1) Normal 2) Multi-Speaker 3) VIP\");\n }", "public abstract boolean listenerUserInput();", "public void askForEventID() {\n Sy...
[ "0.6177857", "0.60922253", "0.6048394", "0.60190535", "0.5914247", "0.5877903", "0.58492124", "0.5764276", "0.5757778", "0.5730352", "0.57244277", "0.56794", "0.5627752", "0.5623946", "0.5571634", "0.55616564", "0.5560269", "0.55495495", "0.553183", "0.55263263", "0.55009186"...
0.0
-1
Loads the configuration file which contains: 1) Number of lines to read from the server's response 2) What to look for in the server's response 3) Available socket selection If the configuration file does not exist the program terminates
private void loadConfig() { File config = new File("config.ini"); if (config.exists()) { try { BufferedReader in = new BufferedReader(new FileReader(config)); configLine = Integer.parseInt(in.readLine()); configStrin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static int getConfigFromFile(){\n\t\tint ret = -1;\n\t\ttry(BufferedReader r = new BufferedReader(new FileReader(\"./configFile\"))){\n\t\t\tTCPIP = new String(r.readLine().split(\":\")[1]);\n\t\t\tTCPSERVERPORT = Integer.parseInt((r.readLine().split(\":\")[1]));\n\t\t\tMCPORT = Integer.parseInt((r.readLin...
[ "0.6797185", "0.6549543", "0.63759804", "0.62364817", "0.60215443", "0.58813643", "0.58374226", "0.5834773", "0.57615906", "0.5760422", "0.5749631", "0.5741468", "0.57278425", "0.57212687", "0.57165915", "0.5692627", "0.56628305", "0.56626946", "0.56467974", "0.5642955", "0.5...
0.7742123
0
Paints the foreground and background of all objects that are allowed to be changed/controlled by the user
private void paintAllObjects() { for (int i = 0; i < allObjects.size(); i++) { JComponent c = (JComponent) allObjects.get(i); c.setBackground(backgroundColor); c.setForeground(foregroundColor); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void paintComponent(final Graphics g) {\n if (!isOpaque()) {\n super.paintComponent(g);\n return;\n }\n \n // use value of JTextField for consistency\n g.setColor(UIManager.getColor(\"TextField.inactiveBackground\"));\n g.fillRec...
[ "0.6564224", "0.61892176", "0.61164623", "0.60337925", "0.6026489", "0.6005236", "0.59997135", "0.59763825", "0.59369695", "0.5935913", "0.59238046", "0.5874557", "0.58682585", "0.5833417", "0.58230764", "0.582113", "0.5801276", "0.57990533", "0.5793327", "0.5789479", "0.5789...
0.68369
0
Prompts the user to select a file to use to read passwords from this is primarily intended for very large lists of passwords or when memory is an issue
private void selectPassFile() { final JFileChooser fc = new JFileChooser(); if (fc.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) { final File file = fc.getSelectedFile(); passFile = file; mnuPassFileName.setText("Selected: " + passFile.getName());...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void usernameChoose(){\n\t\tString[] testList = Fixer.fixingList(userList);\r\n\t\tuserList = testList;\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\t\r\n\t\t//boolean to keep the while loop open when attempting to create a username\r\n\t\tboolean validName = false;\r\n\t\twhile (!validName) {\r\n\t...
[ "0.6092776", "0.5946444", "0.5773229", "0.5747737", "0.56000876", "0.55437547", "0.54633224", "0.5447441", "0.53721386", "0.5290058", "0.52765036", "0.5251198", "0.52473116", "0.5217164", "0.51996446", "0.5186014", "0.51814276", "0.51807976", "0.5161696", "0.515943", "0.51592...
0.7479584
0
Updates the statistics display of the current run of the program
public void updateStats(Account recent, boolean success) { lblRecentAttempt.setText(recent.getUsername() + ":" + recent.getPassword()); recoveryAttempts++; lblStats.setText("Attempts: " + recoveryAttempts + " - Successful: " + recover...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateStats()\n\t{\n\n\t\tint[] temp = simulation.getStatValue();\n\t\tfor(int i = 0; i < temp.length; i++)\n\t\t{\n\t\t\tthis.statsValues[i].setText(Integer.toString(temp[i]));\n\t\t}\n\t\t\n\t\tint[] temp2 = simulation.getNumberInEachLine();\n\t\tfor(int i = 0; i < temp2.length; i++)\n\t\t{\n\t\t\tt...
[ "0.7266018", "0.7017373", "0.69424486", "0.68115866", "0.6751857", "0.67290634", "0.6691568", "0.66289747", "0.6506249", "0.6454742", "0.64488643", "0.6424985", "0.63911885", "0.6376959", "0.6374922", "0.6343546", "0.63408357", "0.6330056", "0.63290703", "0.6319056", "0.63132...
0.0
-1
Updates the total time ran
public void updateTime() { lblStatus.setText("Up: " + time); if (time.getTimeRan() >= 60) { lblRPM.setText("Avg RPM: " + (int) (recoveryAttempts / (time.getTimeRan() / 60))); ti.setToolTip("AR v4 - " ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void setTotalRunTime();", "public static void calTime() {\n time = new Date().getTime() - start;\n }", "public int getTotalTime();", "public int getTotalRunTime() {\n return totalRunTime;\n }", "private void updateTime() {\n timer.update();\n frametime = ti...
[ "0.702087", "0.6857506", "0.68484807", "0.68458813", "0.68296504", "0.67659706", "0.676122", "0.6741017", "0.6715746", "0.6701567", "0.6662424", "0.66257423", "0.66207916", "0.6540603", "0.6539265", "0.6480255", "0.64622736", "0.6420591", "0.64110327", "0.64063704", "0.638510...
0.67800975
5
~ get methods Returns the background color
public Color getBackgroundColor() { return backgroundColor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Color getBackground();", "Color getBackgroundColor();", "public Color getBackground()\r\n\t{\r\n\t\treturn _g2.getBackground();\r\n\t}", "public int backgroundColor() {\n // create/return the background color\n return Color.rgb(180, 200, 255);\n }", "public static Color getColor() {...
[ "0.8813109", "0.8548009", "0.8352388", "0.83111393", "0.8085195", "0.79924965", "0.7982518", "0.7893872", "0.78571314", "0.78291357", "0.772351", "0.7714421", "0.77081835", "0.76854265", "0.76576596", "0.7652646", "0.76291573", "0.76150244", "0.75908625", "0.7541971", "0.7539...
0.8131323
4
Returns the foreground color
public Color getForegroundColor() { return foregroundColor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Color getForeground();", "public Colour getForegroundColor() {\n return colour == null ? null : colour.getForeground();\n }", "public Color getForegroundColor() {\n return foreColor;\n }", "public Color getSelectionForeground() {\n checkWidget();\n Color result = selectionForegro...
[ "0.8484121", "0.825746", "0.77173597", "0.71383005", "0.6732278", "0.66089064", "0.6588259", "0.65288454", "0.648398", "0.64551854", "0.64551854", "0.64551854", "0.64551854", "0.64551854", "0.6436363", "0.64289165", "0.64227146", "0.6421669", "0.63971275", "0.63890296", "0.63...
0.8602539
0
~ set methods Sets the background color
public void setBackgroundColor(Color background) { backgroundColor = background; paintAllObjects(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setBg(){\n this.setBackground(color);\n }", "public void setBackground(Color color)\r\n\t{\r\n\t\t// System.out.println(\"setBackground\");\r\n\t}", "@Override\n public void setBackgroundColor(int backgroundColor) {\n }", "public abstract void setCurBackground(Color colr);", "public...
[ "0.8484201", "0.77301276", "0.7698641", "0.764683", "0.7375417", "0.7332466", "0.72991306", "0.72676736", "0.7230257", "0.7200403", "0.7200207", "0.7164144", "0.71127677", "0.7094474", "0.70934933", "0.70452595", "0.7045146", "0.7024209", "0.7023659", "0.7020134", "0.69920987...
0.7976321
1
Sets the foreground color
public void setForegroundColor(Color foreground) { foregroundColor = foreground; paintAllObjects(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void applyForegroundColor() {\r\n\t\tthis.control.setForeground(PromptSupport.getForeground(this.control));\r\n\t}", "public void setForegroundColor(int color) {\n this.foregroundColor = color;\n }", "public abstract void setCurForeground(Color colr);", "public Color getForegroundColor()\n ...
[ "0.7579141", "0.7566504", "0.75619096", "0.73707426", "0.71591485", "0.7156423", "0.7138751", "0.708319", "0.6899786", "0.6819362", "0.6733117", "0.6714136", "0.6663587", "0.6658203", "0.6598971", "0.65636444", "0.63704735", "0.6369887", "0.6361033", "0.6349782", "0.6321522",...
0.84291035
0
Prompts the user to select the number of sockets to use
private void setSockets() { String s = (String) JOptionPane.showInputDialog(null, "Select Number of Sockets:", "Sockets", JOptionPane.PLAIN_MESSAGE, null, socketSelect, "1"); if ((s != null) && (s.length() > 0)) { totalNumThreads = I...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void askForNumberOfRequests() {\n\t\tconnectToServer();\n\t\tout.println(\"How many requests have you handled ?\");\n\t\tout.flush();\n\t\tint count = 0;\n\t\ttry {\n\t\t\tcount = Integer.parseInt(in.readLine());\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tSystem.out.println(\"CLIENT: Cannot receive num requ...
[ "0.6749282", "0.5927874", "0.5925187", "0.58915704", "0.5709342", "0.5503989", "0.5496707", "0.5482036", "0.5449276", "0.5427776", "0.54276603", "0.54186565", "0.5418383", "0.5408543", "0.5396975", "0.5394204", "0.53226715", "0.5291132", "0.52742815", "0.52697146", "0.5240139...
0.74989116
0
TODO Autogenerated method stub
@Override public CoinSet makeChange(CoinSet coins, int amount) throws ChangeImpossibleException { CoinSet change = new CoinSet(); for (Map.Entry<Integer, Integer> e : coins.reversedCoinList()) { if (e.getKey() <= amount) { int take = Math.min(e.getValue(), amount / e.getKey()); change.addCoins(e.getKey(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Set of Location which are harder to navigate
public SquareGrid(int width, int height) { this.width = width; this.height = height; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Set<Taglet.Location> getAllowedLocations() {\n final EnumSet<Location> locations = EnumSet.allOf(Taglet.Location.class);\n locations.remove(Taglet.Location.OVERVIEW);\n return locations;\n }", "public abstract java.util.Set getLocations();", "@Override\n public I...
[ "0.63852274", "0.623569", "0.6104757", "0.6044475", "0.596092", "0.58711123", "0.58448076", "0.582725", "0.58204913", "0.5813029", "0.5722497", "0.5718929", "0.56915194", "0.5638729", "0.5634353", "0.5621587", "0.5600962", "0.55861145", "0.55813813", "0.5580848", "0.5576756",...
0.0
-1
Returns an ArrayList containing all valid neighbors (passable and in bounds) for a given Location id.
@Override public ArrayList<Location> neighbors(final Location id) { ArrayList<Location> neighbours = new ArrayList<>(); for (Location direction : directions){ Location position = new Location(direction.x + id.x, direction.y + id.y); if (inBounds(position) && isPassable(position)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Location> neighbors (Location pos);", "public ArrayList<Collidable> getNeighbors();", "protected ArrayList emptyNeighbors()\n {\n // Get all the neighbors of this fish, empty or not.\n ArrayList nbrs = environment().neighborsOf(location());\n\n // Figure out which neighbors ...
[ "0.6451077", "0.62488246", "0.60850114", "0.60393876", "0.58867973", "0.5877714", "0.58702165", "0.58581465", "0.58378625", "0.58273077", "0.58111167", "0.5801763", "0.58016235", "0.5790403", "0.5758653", "0.5753798", "0.57359505", "0.5706054", "0.57008624", "0.5690337", "0.5...
0.83942276
0
Called just before this Command runs the first time
protected void initialize() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void preRun() {\n super.preRun();\n }", "protected void preRun() {\r\n\t\tthis.preparePairs();\r\n\t}", "@Override\n public void beforeFirstLogic() {\n }", "public void prePerform() {\n // nothing to do by default\n }", "protected void onFirstUse() {}", "@O...
[ "0.7113986", "0.6542487", "0.64347786", "0.6433418", "0.64082474", "0.6353506", "0.6309701", "0.62537354", "0.62473047", "0.62407833", "0.6167777", "0.6163407", "0.6129232", "0.6129232", "0.6129232", "0.6129232", "0.6129232", "0.61080366", "0.608483", "0.608483", "0.60805327"...
0.0
-1
Called repeatedly when this Command is scheduled to run
protected void execute() { oi.updateToggleLift(); if(oi.toggleOnLift){ // The commands here will occur if the TorqueLift toggle switch // is activated. All code here will only run after the button // has been toggled. if (limitswitch.getReadyState()) { torq...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tvoid runCommand() {\n\t\t\ttrigger.execute();\n\t\t}", "@Override\n public void run() {\n schedule();\n }", "@Override\n public void autonomousPeriodic() {\n \n Scheduler.getInstance().run();\n \n }", "public void run() {\n\t\texecuteCommand( client, false );\n\t}", "...
[ "0.6689458", "0.6631115", "0.6566414", "0.65512514", "0.6530515", "0.6488629", "0.64019585", "0.6380878", "0.637645", "0.6363615", "0.63557744", "0.6330997", "0.6295938", "0.6275704", "0.6268897", "0.62656784", "0.62656784", "0.62656784", "0.62656784", "0.62656784", "0.626567...
0.0
-1
Make this return true when this Command no longer needs to run execute()
protected boolean isFinished() { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean execute() {\n return false;\n }", "@Override\n public boolean execute() {\n return false;\n }", "public boolean execute(){\n return false;\n }", "@Override\n\tpublic boolean Unexecute() \n\t{\n\t\treturn false;\n\t}", "p...
[ "0.77345294", "0.77345294", "0.7678753", "0.76457655", "0.75966", "0.7554271", "0.6877811", "0.6748956", "0.6728847", "0.66855806", "0.65891784", "0.65624696", "0.64980483", "0.63857424", "0.63736373", "0.6356819", "0.6356819", "0.63498974", "0.63401324", "0.63290936", "0.632...
0.6184869
85
Called once after isFinished returns true
protected void end() { lift.stop(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected boolean isFinished() {\n return true;\n }", "@Override\n protected boolean isFinished() {\n return true;\n }", "@Override\n public boolean isFinished() {\n return true;\n }", "@Override\r\n\tprotected boolean isFinished() {\n\t\treturn true;\r\n\t}", "@Override\...
[ "0.8585863", "0.853999", "0.83345187", "0.8332006", "0.8332006", "0.8306991", "0.83052015", "0.8299314", "0.82778525", "0.82778525", "0.82778525", "0.82778525", "0.82778525", "0.82778525", "0.82778525", "0.82778525", "0.82778525", "0.82778525", "0.82778525", "0.82778525", "0....
0.0
-1
Called when another command which requires one or more of the same subsystems is scheduled to run
protected void interrupted() { end(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public AutonomousCommand(LiftSubsystem m_lift, ArmSubsystem m_arm, Shooter m_shooter, DriveSubsystem m_drive,\n HopperSubsystem m_hopper, Intake m_intake) {\n // Add your commands in the super() call, e.g.\n // super(new FooCommand(), new BarCommand());\n // alongwith- birlikte çalıştırmak için // wi...
[ "0.5763735", "0.5597857", "0.5525979", "0.5434967", "0.53826046", "0.53644043", "0.5349786", "0.5344097", "0.5329482", "0.53283983", "0.5299414", "0.5261541", "0.5256005", "0.52316135", "0.52242804", "0.52031666", "0.5192441", "0.5177707", "0.5162963", "0.51539654", "0.514155...
0.0
-1
Triggered only when new data needs to be appended to the list Add whatever code is needed to append new items to the bottom of the list
@Override public void onLoadMore(int page, int totalItemsCount, RecyclerView view) { loadMoreRecyclerViewData(hal[0]); hal[0]++; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addNewData(List<PublicPollResponseModel.Data> data) {\n //remove footer view\n this.removeFooterView(footer);\n //Add all data into the adapter\n adapter.addAll(data);\n //Notifies the attached observers that the underlying\n // data has been changed and any Vi...
[ "0.68500185", "0.6738051", "0.65767974", "0.6431209", "0.64050496", "0.63984257", "0.6385571", "0.63449794", "0.633911", "0.6316308", "0.6285105", "0.6284151", "0.62324756", "0.62319833", "0.6194529", "0.6179398", "0.6171665", "0.6133215", "0.6077376", "0.60724545", "0.607206...
0.0
-1
XCoordinate = Parameters: none. Returns the turtle's X coordinate from the center of the screen.
@Override public double execute() throws IllegalStateException { checkError(); return getValue(X); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getxCoordinate() {\n\t\treturn xCoordinate;\n\t}", "public double getxCoordinate() {\n return xCoordinate;\n }", "public void setXPosition( int xCoordinate ) {\n xPosition = xCoordinate;\n }", "public double getXCoordinate() {\n return xCoordinate;\n }", "public voi...
[ "0.71075004", "0.7044496", "0.7041231", "0.70188993", "0.69354725", "0.6876299", "0.6876299", "0.6839738", "0.67733145", "0.6763172", "0.67355096", "0.67139775", "0.67097485", "0.6682599", "0.6656242", "0.6643665", "0.6618716", "0.6618716", "0.66078675", "0.66069525", "0.6601...
0.0
-1
returns the grid position of the entrance 2 in the data
public Grid getEntrance(){ return getpos((byte)2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Point getGridCoordinates(){\n try {\n return (new Point(x / MapManager.getMapTileWidth(), y / MapManager.getMapTileHeight()));\n } catch (Exception e){\n System.out.print(\"Error while getting grid coordinates.\");\n throw e;\n }\n }", "public Grid ...
[ "0.69032586", "0.67324233", "0.67312473", "0.6676428", "0.6624019", "0.6482292", "0.6453441", "0.6344518", "0.633647", "0.63168913", "0.61934686", "0.6188164", "0.61233", "0.6105612", "0.6030974", "0.60079783", "0.5994916", "0.59934413", "0.59372383", "0.592895", "0.59284633"...
0.75697446
0
returns the grid position of the entrance 3 in the data
public Grid getExit(){ return getpos((byte)3); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Grid getEntrance(){\n\t\treturn getpos((byte)2);\n\t}", "public Point getGridCoordinates(){\n try {\n return (new Point(x / MapManager.getMapTileWidth(), y / MapManager.getMapTileHeight()));\n } catch (Exception e){\n System.out.print(\"Error while getting grid coordina...
[ "0.7256107", "0.67429715", "0.66572416", "0.6277414", "0.6254814", "0.6218396", "0.6166457", "0.6094216", "0.60800546", "0.6070423", "0.5989396", "0.5962549", "0.5935494", "0.58815414", "0.5879656", "0.5864073", "0.5861125", "0.5820732", "0.581964", "0.5819083", "0.58138156",...
0.6769677
1
returns a list of possible grid positions given a grid position in the maze
public List<Grid> getPossibleMoves(Grid g){ int i=g.row, j=g.col; if(i>=0 && i<data.length && j>=0 && j<data[i].length){ List<Grid> list=new ArrayList<>(); if(isFree(i, j-1)) list.add(new Grid(i,j-1)); if(isFree(i-1, j-1)) list.add(new Grid(i-1,j-1)); if(isFree(i-1, j)) list.add(new Grid(i-1,j)); if(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract int[][] getPossiblePositions();", "List<GridCoordinate> getCoordinates(int cellWidth, int cellHeight);", "public int[] getPositionInGrid( int tile )\n\t{\n\t\tint[] position = new int[2];\n\t\t\n\t\tfor ( int y = 0; y < height; y++ )\n\t\t{\n\t\t\tfor ( int x = 0; x < width; x++ )\n\t\t\t{\n...
[ "0.7048925", "0.686553", "0.6428512", "0.6414223", "0.6394672", "0.6277251", "0.6210902", "0.61440766", "0.6110254", "0.61070096", "0.61046433", "0.6093643", "0.6091685", "0.6041608", "0.6038258", "0.60379416", "0.60113454", "0.59955907", "0.5992899", "0.5988562", "0.5936388"...
0.6736101
2
/ ambiente.shadowLight.set(worldGame.dayLightCol, worldGame.dayLightDir); ambiente.directionalLight.set(worldGame.dayLightCol, worldGame.dayLightDir); shadowLight.begin(Vector3.Zero, cam.direction); shadowBatch.begin(shadowLight.getCamera()); for (GameInstance mi : gameInstances) if (mi.visible) if (isVisible(cam, mi))...
private void updateLight() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void renderShadowMap() {\n GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, fboId[0]);\n GLES20.glViewport(0, 0, mShadowMapWidth,\n mShadowMapHeight);\n // Clear color and buffers\n GLES20.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);\n GLES20.glClear(GLES20.GL_DEPT...
[ "0.7406273", "0.66819495", "0.6642092", "0.6594267", "0.6526231", "0.6499438", "0.6467036", "0.6445077", "0.6418075", "0.6404295", "0.6269405", "0.62219757", "0.6189424", "0.6174601", "0.6169153", "0.6144349", "0.61308753", "0.61070627", "0.6062252", "0.6059594", "0.60401887"...
0.6637899
3