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
Sort the coupons by start date. We use this repo in the main page of the website.
List<Coupon> findByOrderByStartDateDesc();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void sortByDateOpen() {\n //selection sort\n for (int i = 0; i < size - 1; i++) {\n int earliestDateIndex = i;\n for (int j = i + 1; j < size; j++)\n if (accounts[j].getDateOpen().compareTo(accounts[earliestDateIndex].getDateOpen()) < 0) {\n ...
[ "0.60745364", "0.5994526", "0.5935631", "0.5873463", "0.5624386", "0.5535461", "0.5414848", "0.54054177", "0.54009134", "0.53427", "0.5326349", "0.5300954", "0.5289064", "0.5273316", "0.5264747", "0.5248581", "0.5220104", "0.5198169", "0.51755816", "0.5144539", "0.5118448", ...
0.5930805
3
Sort the coupons by the most purchased coupons. We use this repo in the main page of the website.
@Query(value = "SELECT coupons_id FROM customers_coupons ORDER BY coupons_id ASC", nativeQuery = true) List<Integer> findByPopularity();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sortLibrary() {\n libraries.sort(Comparator.comparingLong(Library::getSignupCost));\n\n //J-\n// libraries.sort((o1, o2) -> Long.compare(\n// o2.getCurrentScore() - (2 * o2.getDailyShipCapacity() * o2.getSignupCost()),\n// o1.getCurrentScore() - (2 * o...
[ "0.5942591", "0.591153", "0.5836145", "0.5628223", "0.5614709", "0.5493174", "0.54781383", "0.53261334", "0.52084655", "0.5170107", "0.51580524", "0.51552194", "0.5119171", "0.50832295", "0.5079607", "0.5079314", "0.5041417", "0.503712", "0.5030341", "0.5013556", "0.50135374"...
0.57938004
3
Get all coupons that contains the search word.
List<Coupon> findByTitleContaining(String searchWord);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ArrayList<String> findChampions() {\n\t\tString searchContents = search.getText();\n\t\tArrayList<String> result = new ArrayList<String>();\n\t\tfor (String c : CHAMPIONLIST) {\n\t\t\tif (c.toLowerCase().contains(searchContents.toLowerCase())) {\n\t\t\t\tresult.add(c);\n\t\t\t}\n\t\t}\n\t\treturn result;\n...
[ "0.7001385", "0.61704576", "0.5960254", "0.5847983", "0.578801", "0.5746785", "0.5705791", "0.56996185", "0.5663986", "0.5648297", "0.56473154", "0.55665296", "0.547414", "0.545042", "0.54458606", "0.5411166", "0.54075235", "0.5399662", "0.5394018", "0.537726", "0.5289137", ...
0.6843232
1
Count all the coupons in the data base.
@Query(value = "SELECT COUNT(*) FROM coupons", nativeQuery = true) int countAllCoupons();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getCouponListCount();", "@Query(value = \"SELECT COUNT(*) FROM customers_coupons\", nativeQuery = true)\n int countAllCouponsPurchased();", "public int getCouponListCount() {\n return couponList_.size();\n }", "public int getCouponListCount() {\n if (couponListBuilder_ == null) {\n ...
[ "0.7418666", "0.7208847", "0.71198696", "0.6739912", "0.6644935", "0.6591941", "0.6570099", "0.6570099", "0.6570099", "0.6496432", "0.646816", "0.64444983", "0.6430569", "0.6428544", "0.6428544", "0.6428544", "0.6428544", "0.6428544", "0.6428544", "0.6428544", "0.6428544", ...
0.75060177
0
Count all the purchased coupons.
@Query(value = "SELECT COUNT(*) FROM customers_coupons", nativeQuery = true) int countAllCouponsPurchased();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getCouponListCount();", "public int getCouponListCount() {\n return couponList_.size();\n }", "@Query(value = \"SELECT COUNT(*) FROM coupons\", nativeQuery = true)\n int countAllCoupons();", "@Query(value = \"SELECT COUNT(*) FROM customers_coupons AS cvc INNER JOIN coupons AS c On cvc.coupons_...
[ "0.7208497", "0.6883", "0.6834106", "0.6597679", "0.65643275", "0.6511057", "0.6434128", "0.63509274", "0.6143228", "0.61198026", "0.6081262", "0.60797125", "0.60311913", "0.60079926", "0.60079926", "0.60079926", "0.5987306", "0.59388673", "0.59094507", "0.5873482", "0.584354...
0.72745335
0
Count all the coupons of specific company.
int countByCompanyId(int companyId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Query(value = \"SELECT COUNT(*) FROM customers_coupons AS cvc INNER JOIN coupons AS c On cvc.coupons_id = c.id WHERE company_id = ?1\" , nativeQuery = true)\n int countAllCouponsPurchasedByCompany(int companyId);", "@Override\n\tpublic int countCompany() {\n\t\treturn comShortMapper.selectCountShort()+elegan...
[ "0.756825", "0.73603505", "0.7171021", "0.70534104", "0.70367676", "0.6909915", "0.67322314", "0.66569763", "0.66373336", "0.6622985", "0.65912586", "0.6540851", "0.6540851", "0.6540851", "0.6479915", "0.63875365", "0.6368365", "0.62789875", "0.62716115", "0.6267189", "0.6167...
0.69838953
5
Count all the coupons that purchased of specific company.
@Query(value = "SELECT COUNT(*) FROM customers_coupons AS cvc INNER JOIN coupons AS c On cvc.coupons_id = c.id WHERE company_id = ?1" , nativeQuery = true) int countAllCouponsPurchasedByCompany(int companyId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getCountForConditionCompany(Long companyId);", "@Override\n\tpublic int countCompany() {\n\t\treturn comShortMapper.selectCountShort()+elegantMapper.selectCountEle()+honorMapper.selectCountHonor();\n\t}", "public int countByCompanyId(long companyId);", "int countByCompanyId(int companyId);", "int getCo...
[ "0.70353264", "0.7009697", "0.67642605", "0.67106634", "0.66602206", "0.6620596", "0.66183144", "0.65296525", "0.65296525", "0.65296525", "0.63908595", "0.63449365", "0.6264513", "0.62393504", "0.62000537", "0.61164004", "0.61038667", "0.6073266", "0.5994447", "0.59551597", "...
0.7540153
0
Responsavel por carregar o Objeto JSON
public static String getJSONFromAPI(String url){ String retorno = ""; try { URL apiEnd = new URL(url); int codigoResposta; HttpURLConnection conexao; InputStream is; conexao = (HttpURLConnection) apiEnd.openConnection(); conexao.setRequestMethod(Common.METHOD_GET); conexao.setReadTimeout(15000); conexao.setConnectTimeout(15000); conexao.connect(); codigoResposta = conexao.getResponseCode(); if(codigoResposta < HttpURLConnection.HTTP_BAD_REQUEST){ is = conexao.getInputStream(); }else{ is = conexao.getErrorStream(); } retorno = converterInputStreamToString(is); is.close(); conexao.disconnect(); } catch (MalformedURLException e) { e.printStackTrace(); }catch (IOException e){ e.printStackTrace(); } return retorno; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GET\n //@Path(\"/{usuario}-{clave}\")\n @Produces(MediaType.APPLICATION_JSON)\n @Consumes(MediaType.APPLICATION_JSON)\n public Response ConsultaItemsWS(@QueryParam(\"tipo\") String tipo, \n @QueryParam(\"cod_int\") String codigoIterno,\n ...
[ "0.66065675", "0.6506867", "0.6475575", "0.64741164", "0.64423895", "0.640094", "0.6370733", "0.63390714", "0.6310827", "0.62871027", "0.6283211", "0.6267363", "0.62626916", "0.6225683", "0.6225683", "0.6225683", "0.62215394", "0.6209491", "0.62035745", "0.6145796", "0.613965...
0.0
-1
// Print user with his color
public String toString() { return this.getName(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void printColor(String color){\n System.out.println(color);\n }", "void print(String message, Color color) throws IOException;", "private static void printColor() {\n\t\tfor (int i = 0; i < colors.length; i++) {\n\t\t\tSystem.out.print(String.format(\"%d for %s\", i + 1, colors[i]));\n\...
[ "0.72011065", "0.69084674", "0.66671944", "0.66452634", "0.6376924", "0.6326419", "0.62504286", "0.61789113", "0.61352086", "0.6116256", "0.61052495", "0.6105169", "0.6096502", "0.60722476", "0.6063117", "0.60564864", "0.60370713", "0.60138386", "0.5952047", "0.5899186", "0.5...
0.0
-1
1. OnlineVisaManagement Application Function Name:createDepartment Input Parameters:department object Return Type:department object Author:suriyaS Description:adding the department details to database by calling department repository
public Department createDepartment(Department department) { return departmentRepository.save(department); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ResponseEntity<ApiMessageResponse> createDepartment(DepartmentRequest departmentRequest) {\n //Creating a new object of department model to save on database\n DepartmentModel departmentModel = new DepartmentModel(0L, departmentRequest.getName(), departmentRequest.getActive());\n\n depar...
[ "0.7775858", "0.7304928", "0.7047602", "0.68089056", "0.6572822", "0.65683126", "0.65388787", "0.6534011", "0.6378762", "0.6378559", "0.63359445", "0.62870705", "0.6284885", "0.62194526", "0.6175454", "0.61736375", "0.61723685", "0.616892", "0.6152875", "0.61524695", "0.61363...
0.66583866
4
1. OnlineVisaManagement Application Function Name:getDepartmentId Input Parameters:department id Return Type:optional department object Author:suriyaS Description:get department from database by calling findById() in department repository
public Optional<Department> getDepartmentId(long departmentId) { return departmentRepository.findById(departmentId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Department getDepartmentById(Integer id);", "Department findById(long id);", "public Department FindById(Department d) {\n\t\treturn ddi.FindById(d);\n\t}", "public Department findOne(long departmentId){\n\t\treturn departmentRepository.findOne(departmentId);\n\t}", "public Departmentdetails getDepa...
[ "0.82897556", "0.77946246", "0.7533263", "0.7527321", "0.7467079", "0.73659456", "0.73501986", "0.73488873", "0.73368734", "0.72655636", "0.72473055", "0.7205326", "0.7205326", "0.7205326", "0.7162683", "0.7162683", "0.71522355", "0.71364224", "0.71364224", "0.71364224", "0.7...
0.7157328
16
1. OnlineVisaManagement Application Function Name:getAllEmployee Input Parameters:empty Return Type:List of employee object Author:suriyaS Description:get all employee details from database by calling findAll() in employee repository
public List<Department> getAllDepartments() { return departmentRepository.findAll(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Employee> listAll(){\n return employeeRepository.findAll();\n }", "public List<Employee> getAllEmployees() {\n return employeeRepository.findAll();\n }", "@GetMapping(\"/employee\")\r\n\tpublic List<Employee> getAllEmployees()\r\n\t{\r\n\t\treturn empdao.findAll();\r\n\t}", "@...
[ "0.8359082", "0.8189814", "0.8094255", "0.80643874", "0.800002", "0.79985315", "0.7991181", "0.799037", "0.79460955", "0.79309225", "0.7928973", "0.7922847", "0.79184407", "0.7881187", "0.787923", "0.78507316", "0.7849925", "0.7845951", "0.78415704", "0.7835584", "0.78118503"...
0.0
-1
1. OnlineVisaManagement Application Function Name:updateDepartment Input Parameters:department object Return Type:department object Author:suriyaS Description:update the department details in database and save it by calling findById() in department repository
public Department updateDepartment(Department department) { return departmentRepository.save(department); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Employee updateEmployeeDepartment(int employeeId, int departmentId) {\n return null;\n }", "@Override\npublic int update(Department department) {\n\treturn departmentMapper.updateByPrimaryKey(department);\n}", "@Override\n\tpublic boolean departmentUpdate(DepartmentForm departme...
[ "0.75382495", "0.7375082", "0.72064495", "0.71920097", "0.71294725", "0.71159595", "0.69792736", "0.69478035", "0.69407654", "0.68396175", "0.6821238", "0.68042374", "0.6749021", "0.67449164", "0.6718238", "0.6702602", "0.66933346", "0.66606057", "0.6655564", "0.66370445", "0...
0.68595785
9
1. OnlineVisaManagement Application Function Name:deleteDepartment Input Parameters:department object Return Type:department object Author:suriyaS Description:delete the department from database by calling delete() in department repository
public void deleteDepartment(Department deparmentInDB) { departmentRepository.delete(deparmentInDB); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void deleteDepartmentByDeptNo(int dept_no);", "public void deleteDepartmentByDeptName(String dept_name);", "@Override\npublic int delete(Department department) {\n\treturn 0;\n}", "void deleteDepartmentById(Long id);", "public boolean deleteDepartmentById(Integer id);", "public String deleteDepart...
[ "0.82681084", "0.78771895", "0.78744113", "0.7864886", "0.77397573", "0.7567345", "0.7556405", "0.73008627", "0.7270994", "0.7229424", "0.72228146", "0.71939945", "0.7037717", "0.69265425", "0.6860278", "0.6858865", "0.68158275", "0.68065196", "0.6788521", "0.67883587", "0.67...
0.73087925
7
TODO Autogenerated method stub
public static void main(String[] args) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
adding an image of our choice
public void done(View view){ RequestQueue req = Volley.newRequestQueue(this); String url = imageSrc.getText().toString(); ImageRequest imageReq = new ImageRequest(url, new Response.Listener<Bitmap>() { @Override public void onResponse(Bitmap response) { imageView.setImageBitmap(response); } }, 0, 0, null, Bitmap.Config.RGB_565, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { Toast.makeText(MainActivity2.this, "Invalid image URL, try another one!", Toast.LENGTH_LONG).show(); } }); req.add(imageReq); //inserting data in our Realtime Database reference = FirebaseDatabase.getInstance().getReference(id.getText().toString()); reference.child("imagesrc").setValue(imageSrc.getText().toString()); reference.child("latitude").setValue(lat.getText().toString()); reference.child("longitude").setValue(lon.getText().toString()); reference.child("description").setValue(description.getText().toString()); Intent intent = getIntent(); finish(); startActivity(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addNewPicture() {\n ImageView imgView = (ImageView)findViewById(R.id.poll_object_btn_image);\n Resources res = getContext().getResources();\n if(this.type == \"generic\") {\n //add the new pciture for the generic type\n Bitmap bitmap = BitmapFactory.decodeReso...
[ "0.7361306", "0.7216157", "0.71798766", "0.70269704", "0.6973207", "0.6801188", "0.6799555", "0.67336375", "0.67324996", "0.6679115", "0.664307", "0.6622035", "0.6602736", "0.6589449", "0.64988124", "0.6493767", "0.6488505", "0.64446855", "0.6425669", "0.64099", "0.6403192", ...
0.0
-1
Interface definition of the storage backend used.
public interface FileStoreInterface { boolean isAuthenticated(); @Nullable List<String> get(String path); void archive(String path, List<String> lines); void startLogin(Activity caller, int i); void deauthenticate(); void browseForNewFile(Activity act, String path, FileSelectedListener listener, boolean txtOnly); void modify(String mTodoName, List<String> original, List<String> updated, List<String> added, List<String> removed); int getType(); void setEol(String eol); boolean isSyncing(); public boolean initialSyncDone(); void invalidateCache(); void sync(); String readFile(String file); boolean supportsSync(); public interface FileSelectedListener { void fileSelected(String file); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface IStorageManager {\n\n\tpublic String getStorageType();\n\n\tpublic String getStorageId();\n\n\tpublic void initialize(String configFile) throws Exception;\n}", "public interface StorageModel {\n}", "interface Storage {\n String getStorageSize() ;\n}", "public interface Storage {\n\n Stri...
[ "0.7593782", "0.7546623", "0.721929", "0.6959119", "0.693427", "0.6906994", "0.6891492", "0.67729455", "0.67664033", "0.6762321", "0.6728626", "0.66663355", "0.6511549", "0.6404725", "0.6370931", "0.6361312", "0.6329479", "0.631542", "0.6283259", "0.62804544", "0.62798244", ...
0.6077634
35
Zakladny konstruktor dolezity pri volani newInstance pri vytvarani kopii objektu.
public ItemMenu() { super(null, null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ProductoCreable newInstance(int codigo, String nombre){\r\n \r\n }", "Reproducible newInstance();", "public Kullanici() {}", "private void __sep__Constructors__() {}", "public SlanjePoruke() {\n }", "Klassenstufe createKlassenstufe();", "public Propuestas() {}", "public TebakNusan...
[ "0.60966635", "0.6060381", "0.6043978", "0.58636695", "0.5716092", "0.5682127", "0.5601993", "0.5576848", "0.5562273", "0.55511373", "0.55462056", "0.55419326", "0.55238163", "0.552126", "0.5507629", "0.54591274", "0.54589635", "0.5449684", "0.5441711", "0.544137", "0.5428232...
0.0
-1
Konstruktor ktory vytvori instanciu/objekt/menu typu ItemMenu. Menu nastavujeme z ktoreho menu bolo vytvorene a nasledne pre aky predmet sme ho vytvorili. Parametre x,y sluzia ako pozicie kde vykreslujeme menu.
public ItemMenu(AbstractInMenu source, Item item, int x, int y) { super(source.getEntity(), source.getInput()); this.sourceMenu = source; this.item = item; this.activated = false; this.xPos = x - width; this.yPos = y; setItemMenu(); setGraphics(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ItemMenu() {\n super(null, null);\n }", "public ItemMenu(JDealsController sysCtrl) {\n super(\"Item Menu\", sysCtrl);\n\n this.addItem(\"Add general good\", new Callable() {\n @Override\n public Object call() throws Exception {\...
[ "0.7403254", "0.714617", "0.71303064", "0.69891447", "0.68302375", "0.68204343", "0.68062824", "0.67960864", "0.6720121", "0.6706336", "0.6704265", "0.66949743", "0.6662704", "0.6658924", "0.65930367", "0.6572683", "0.655443", "0.65412384", "0.6527589", "0.6505582", "0.645352...
0.6539659
18
Metoda ktora initializuje toto menu s novymi udajmi. Novymi udajmi je entita zadana parametrom pre ktoru vytvarame menu. Parameter origMenu sluzi ako vzor pre toto menu z ktoreho ziskavame pozadie tohoto menu.
@Override public ItemMenu initialize(AbstractInMenu origMenu, Entity e1, Entity e2) { this.toDraw = origMenu.getDrawImage(); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void test_setMenuLorg_eclipse_swt_widgets_Menu () {\n\tcontrol.setMenu(null);\n\n\tMenu m = new Menu(control);\n\tcontrol.setMenu(m);\n\tassertEquals(m, control.getMenu());\n}", "private void initializeMenu() {\n menu = new Menu(parent.getShell());\n MenuItem item1 = new MenuItem(menu, SWT.N...
[ "0.6195864", "0.6174241", "0.60893816", "0.59936297", "0.5957127", "0.5830151", "0.58034", "0.58032256", "0.57731104", "0.5729415", "0.5708967", "0.57087517", "0.56733793", "0.55821246", "0.5553011", "0.55480534", "0.55476725", "0.5533438", "0.55304694", "0.5520181", "0.55082...
0.669715
0
Metoda vrati sirku menu pre item menu
@Override public int getWidth() { return width; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setMenu() {\n\n if (tree.isEmpty() || !treeGrid.anySelected()) {\n mainMenu.setItems(newMenuItem, new MenuItemSeparator(), settingMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecord() == null) {\n mainMenu.set...
[ "0.70244735", "0.7012807", "0.6879152", "0.680205", "0.6787193", "0.673988", "0.66919076", "0.6636564", "0.6615155", "0.66005826", "0.6571401", "0.65443116", "0.65323126", "0.64908224", "0.6446709", "0.6429159", "0.6423597", "0.63971174", "0.6389306", "0.63803077", "0.6375399...
0.0
-1
Metoda vrati vysku menu pre item menu
@Override public int getHeight() { return height; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setMenu() {\n\n if (tree.isEmpty() || !treeGrid.anySelected()) {\n mainMenu.setItems(newMenuItem, new MenuItemSeparator(), settingMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecord() == null) {\n mainMenu.set...
[ "0.72725445", "0.70843196", "0.6981097", "0.6889308", "0.6828579", "0.66574895", "0.6618098", "0.66131186", "0.6585343", "0.6581525", "0.65533894", "0.65488964", "0.6538483", "0.65161806", "0.6498744", "0.64959395", "0.6492725", "0.6485479", "0.64818245", "0.64806265", "0.647...
0.0
-1
Metoda by mala vratit meno tohoto menu, ale kedze itemMenu moze byt len subMenu tak mu nepriradujem ziadne meno aby som donutil ukazanie tohoto menu len s doprovodom hlavneho menu.
@Override public String getName() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getNumOfMenuItems(){\n return numOfMenuItems;\n }", "public int size() {\n return menuItems.size();\n }", "@Override\n public int getItemCount() {\n if (menu != null)\n return menu.size();\n else return 0;\n }", "@Override\n\tpublic int getCount() {...
[ "0.6662838", "0.6445243", "0.6445148", "0.6440628", "0.63963246", "0.6341367", "0.63279116", "0.63269645", "0.6268309", "0.62579757", "0.62475145", "0.6119511", "0.605217", "0.6031963", "0.60212326", "0.6016425", "0.6016152", "0.6001083", "0.59637624", "0.5955377", "0.5939676...
0.0
-1
Metoda ktora nastavi do listu choices vsetky moznosti co sa da s danym predmetom robit. (ked je mozne predmet pouzit tak bude USABLE, atd...)
private void setItemMenu() { choices = new ArrayList<>(); choices.add(Command.INFO); if (item.isUsable()) { choices.add(Command.USE); } if (item.isEquipped()) { choices.add(Command.UNEQUIP); } else { if (item.isEquipable()) { choices.add(Command.EQUIP); } } if (item.isActive()) { choices.add(Command.UNACTIVE); } else { if (item.isActivable()) { choices.add(Command.ACTIVE); } } if (item.isDropable()) { choices.add(Command.DROP); } if (item.isPlaceable()) { choices.add(Command.PLACE); } choices.add(Command.DESTROY); choices.add(Command.CLOSE); this.height = choices.size() * hItemBox + hGap * 2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic ArrayList<String> getChoices() {\n\t\t// TODO Auto-generated method stub\n\t\treturn this.choices;\n\t}", "public void setChoices(ArrayList<String> choice){\n\t\tthis.choices = choice;\n\t}", "public String[] getChoices()\n\t{\n\t\treturn choices;\n\t}", "public String getChoices() {\r\n\...
[ "0.6703643", "0.6591998", "0.65895456", "0.6228014", "0.6191665", "0.61741066", "0.61054575", "0.60915864", "0.60722226", "0.6012334", "0.592489", "0.58429193", "0.582186", "0.5783634", "0.5780823", "0.575728", "0.5755173", "0.5751684", "0.5743126", "0.57330954", "0.5718289",...
0.0
-1
Metoda ktora nastavuje obrazok toDraw, ktore byva spolocne pre vsetky menu. Preto zaciname volanim super.setGraphics. Po navrate vykreslime nazvy prikazov co mozme s predmetom robit.
@Override protected final void setGraphics() { super.setGraphics(); Graphics g = toDraw.getGraphics(); g.setColor(Color.BLACK); for (int i = 0; i < choices.size(); i++) { g.drawString(choices.get(i).getValue(), wGap, (i + 1) * hItemBox); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void paintMenu(Graphics g) {\n if (visible) {\n g.drawImage(toDraw, xPos, yPos, null); \n \n if (selection >= 0) {\n g.setColor(Colors.getColor(Colors.selectedColor));\n g.fillRoundRect(xPos + wGap, selection * hItem...
[ "0.67486465", "0.6723262", "0.66893584", "0.6687181", "0.64284754", "0.6409165", "0.6357419", "0.635121", "0.63384914", "0.63376784", "0.63296723", "0.62888765", "0.62636954", "0.6257181", "0.62412137", "0.6231947", "0.6184065", "0.6184065", "0.617778", "0.6168129", "0.616812...
0.62921524
11
Metoda ktora vykresli menu ulozene v obrazku toDraw ked je menu viditelne. Ked mame oznaceny nejaky predmet z tohoto menu tak ho prekreslime oznacenou farbou.
@Override public void paintMenu(Graphics g) { if (visible) { g.drawImage(toDraw, xPos, yPos, null); if (selection >= 0) { g.setColor(Colors.getColor(Colors.selectedColor)); g.fillRoundRect(xPos + wGap, selection * hItemBox + yPos + hGap, getWidth() - wGap, hItemBox, wGap, hGap); } if (!activated) { g.setColor(Colors.getColor(Colors.selectedColor)); g.fillRoundRect(xPos, yPos, getWidth(), getHeight(), wGap, hGap); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void volvreAlMenu() {\r\n\t\t// Muestra el menu y no permiye que se cambie el tamaņo\r\n\t\tMenu.frame.setVisible(true);\r\n\t\tMenu.frame.setResizable(false);\r\n\t\t// Oculta la ventana del flappyBird\r\n\t\tjframe.setVisible(false);\r\n\t}", "private void createMenu(){\n\n JMenuBar mbar = n...
[ "0.74188733", "0.736342", "0.7216459", "0.71699417", "0.71693087", "0.71262985", "0.7119228", "0.7088195", "0.7015571", "0.7010318", "0.7008928", "0.6961467", "0.6959364", "0.6954918", "0.6920281", "0.6851287", "0.6840214", "0.6832239", "0.6827401", "0.68252194", "0.67877203"...
0.0
-1
Metoda ktora aktualizuje toto item menu. Aktualizujeme iba vtedy ked sa zmenil stav. Pri zmene menime pozicie selectedPosY a selectedPosX.
@Override public void update() { if (changedState) { selectedPosY = selection * hItemBox + yPos + hItemBox; selectedPosX = xPos; changedState = false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void update(){\n\t\tif(JudokaComponent.input.up) selectedItem --;\n\t\tif(JudokaComponent.input.down) selectedItem ++;\n\t\tif(selectedItem > items.length - 1) selectedItem = items.length - 1;\n\t\tif(selectedItem < 0) selectedItem = 0;\n\t\tif(JudokaComponent.input.enter){\n\t\t\tif(selectedItem == 0) Judo...
[ "0.713786", "0.6451069", "0.6424524", "0.636926", "0.63220596", "0.62033904", "0.6184366", "0.6184366", "0.61733043", "0.6156531", "0.61468726", "0.6122283", "0.6078675", "0.599153", "0.5939827", "0.59176654", "0.5917549", "0.5891778", "0.58620995", "0.58579266", "0.5827924",...
0.7335491
0
Metoda ktora spravne ukonci menu volanim super metody.
@Override public void exit() { super.exit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void visKontingenthaandteringMenu ()\r\n {\r\n System.out.println(\"Du har valgt kontingent.\");\r\n System.out.println(\"Hvad oensker du at foretage dig?\");\r\n System.out.println(\"1: Se priser\");\r\n System.out.println(\"2: Se medle...
[ "0.7485148", "0.7308122", "0.7247681", "0.7171922", "0.713978", "0.713594", "0.70854723", "0.7061016", "0.70576817", "0.7050538", "0.70466727", "0.7043886", "0.70422983", "0.7023834", "0.6970935", "0.69415015", "0.69211614", "0.6920125", "0.68954587", "0.6895371", "0.68703645...
0.0
-1
Metoda ktora zavola akciu na predmet pre ktory sme vytvorili menu. Akcia je dana podla toho co bolo oznacene v tomto menu. Prikazy su vykonavane prechadzanim case vetiev.
private void use() { switch (choices.get(selection)) { case INFO : { AbstractInMenu newMenu = new ItemInfo(sourceMenu, item); this.sourceMenu.setMenu(newMenu); newMenu.setVisible(true); } break; case USE : { entity.use(item); sourceMenu.activate(); sourceMenu.setState(true); } break; case EQUIP : { entity.equip(item); sourceMenu.activate(); sourceMenu.setState(true); } break; case ACTIVE : { entity.setActiveItem(item); sourceMenu.activate(); sourceMenu.setState(true); } break; case UNEQUIP : { entity.equip(item); sourceMenu.activate(); sourceMenu.setState(true); } break; case UNACTIVE : { entity.setActiveItem(null); sourceMenu.activate(); sourceMenu.setState(true); } break; case DROP : { entity.drop(item); sourceMenu.activate(); sourceMenu.setState(true); } break; case PLACE : { entity.placeItem(item); entity.removeItem(item); sourceMenu.activate(); sourceMenu.setState(true); } break; case CLOSE : { sourceMenu.activate(); } break; case DESTROY : { entity.removeItem(item); sourceMenu.activate(); sourceMenu.setState(true); } break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createMenu(){\n\n JMenuBar mbar = new JMenuBar();\n setJMenuBar(mbar);\n JMenu Opcje = new JMenu(\"Opcje\");\n mbar.add(Opcje);\n JMenuItem Ustawienia = new JMenuItem(\"Ustawienia\");\n /** Obsluga zdarzen wcisniecia przycisku...
[ "0.7456632", "0.72127324", "0.71869016", "0.7138873", "0.7102813", "0.7082007", "0.70347106", "0.69902736", "0.69772583", "0.69390154", "0.6932006", "0.69174784", "0.6903934", "0.68738204", "0.6871913", "0.6852465", "0.6822881", "0.67966455", "0.67903215", "0.6785341", "0.678...
0.0
-1
Metoda ktora rekalkuluje poziciu pozicie pre toto menu.
@Override public void recalculatePositions() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initMenu(){\n\t}", "private void setMenu() {\n\n if (tree.isEmpty() || !treeGrid.anySelected()) {\n mainMenu.setItems(newMenuItem, new MenuItemSeparator(), settingMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecord() ==...
[ "0.75936353", "0.7559283", "0.7526947", "0.7480014", "0.7447159", "0.73745537", "0.7372323", "0.7300552", "0.72424895", "0.7190559", "0.71621346", "0.7160184", "0.71489114", "0.71360236", "0.7124428", "0.7101894", "0.7054499", "0.7054406", "0.704105", "0.69693553", "0.6960867...
0.0
-1
Metoda ktora spracovava vstup. Pri stlaceni ESC ukoncujeme menu. Pri stlaceni UP alebo DOWN menime oznacenie, ENTER potvrdzuje a vykona akciu nad predmetom.
@Override public void inputHandling() { if (input.clickedKeys.contains(InputHandle.DefinedKey.ESCAPE.getKeyCode()) || input.clickedKeys.contains(InputHandle.DefinedKey.RIGHT.getKeyCode())) { if (sourceMenu != null) { exit(); sourceMenu.activate(); return; } } if (input.clickedKeys.contains(InputHandle.DefinedKey.UP.getKeyCode())) { if (selection > 0) { selection--; } } if (input.clickedKeys.contains(InputHandle.DefinedKey.DOWN.getKeyCode())) { if (selection < choices.size() - 1) { selection++; } } if (input.clickedKeys.contains(InputHandle.DefinedKey.ENTER.getKeyCode())) { if (choices.size() > 0) { use(); } exit(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void keyDown() {\n\n driver.switchTo().activeElement().sendKeys(Keys.ARROW_DOWN);\n driver.switchTo().activeElement().sendKeys( Keys.ENTER);\n\n\n }", "public void keyPressed(KeyEvent e) {\n if (e.getKeyCode() == 27) { \n subTotalFrame.setVisible(false); \n ...
[ "0.65300333", "0.6495028", "0.64314586", "0.63323337", "0.6301498", "0.62813467", "0.6274804", "0.6259323", "0.62544346", "0.6242944", "0.6195642", "0.61893916", "0.61759484", "0.6171856", "0.61581784", "0.61569387", "0.61394817", "0.61202514", "0.6107361", "0.609788", "0.605...
0.6150417
16
String bin = Integer.toBinaryString(0x10000 | nval).substring(1);
public void genAdrCode(int nval) { addressSpace.write(lc.getAndIncrement(),nval);//const }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String intToBinaryNumber(int n){\n return Integer.toBinaryString(n);\n }", "public static String intToBinaryString(int value) {\r\n String bin = \"00000000000000000000000000000000\" + Integer.toBinaryString(value);\r\n\r\n return bin.substring(bin.length() - 32, bin.length() - 24)\r\n + \"...
[ "0.75196755", "0.73145837", "0.69966775", "0.691914", "0.68144095", "0.6719433", "0.669432", "0.6645562", "0.66158134", "0.65980154", "0.6576011", "0.6570339", "0.6560305", "0.6552722", "0.65292513", "0.6483496", "0.64752454", "0.6440156", "0.6353853", "0.6339781", "0.63097",...
0.0
-1
/ renamed from: a
public C13816g[] mo35218a() { return this.f30692a; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed fr...
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064...
0.0
-1
/ renamed from: b
public C13816g[] mo35220b() { return this.f30693b; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo2508a(bxb bxb);", "@Override\n public void func_104112_b() {\n \n }", "@Override\n public void b() {\n }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "@Override\n\tpublic void b2() {\n\t\t\n\t}", "v...
[ "0.64558864", "0.6283203", "0.6252635", "0.6250949", "0.6244743", "0.6216273", "0.6194491", "0.6193556", "0.61641675", "0.6140157", "0.60993093", "0.60974354", "0.6077849", "0.6001867", "0.5997364", "0.59737104", "0.59737104", "0.5905105", "0.5904295", "0.58908087", "0.588663...
0.0
-1
/ renamed from: c
public C13816g mo35221c() { return this.f30694c; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo5289a(C5102c c5102c);", "public static void c0() {\n\t}", "void mo57278c();", "private static void cajas() {\n\t\t\n\t}", "void mo5290b(C5102c c5102c);", "void mo80457c();", "void mo12638c();", "void mo28717a(zzc zzc);", "void mo21072c();", "@Override\n\tpublic void ccc() {\n\t\t\n\t}", ...
[ "0.64592767", "0.644052", "0.6431582", "0.6418656", "0.64118475", "0.6397491", "0.6250796", "0.62470585", "0.6244832", "0.6232792", "0.618864", "0.61662376", "0.6152657", "0.61496663", "0.6138441", "0.6137171", "0.6131197", "0.6103783", "0.60983956", "0.6077118", "0.6061723",...
0.0
-1
/ renamed from: a
public void mo35217a(C13816g[] gVarArr) { this.f30692a = gVarArr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed fr...
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064...
0.0
-1
/ renamed from: b
public void mo35219b(C13816g[] gVarArr) { this.f30693b = gVarArr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo2508a(bxb bxb);", "@Override\n public void func_104112_b() {\n \n }", "@Override\n public void b() {\n }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "@Override\n\tpublic void b2() {\n\t\t\n\t}", "v...
[ "0.64558864", "0.6283203", "0.6252635", "0.6250949", "0.6244743", "0.6216273", "0.6194491", "0.6193556", "0.61641675", "0.6140157", "0.60993093", "0.60974354", "0.6077849", "0.6001867", "0.5997364", "0.59737104", "0.59737104", "0.5905105", "0.5904295", "0.58908087", "0.588663...
0.0
-1
/ renamed from: a
public void mo35216a(C13816g gVar) { this.f30694c = gVar; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed fr...
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064...
0.0
-1
"pg_restore i h localhost p 5432 U postgres d mibase v " "/home/damian/backups/mibase.backup";
public static boolean restaurar_archivo_backup_pg_win(String archivo,String usuario,String clave,String db,String host) { String objeto = "-i -h "+host+" -p "+Global.puerto_pg+" -U "+usuario+" -d "+db+" -v "+archivo; boolean eje = false; int res=0; try { Terminal.restaurar_backup_pg_win(host, "5432",usuario,clave, db, archivo); } catch (Exception ex) { System.out.println("Error " + ex.getMessage()); } return eje; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Process backupIt(String fileAndPath) {\n try {\n //F olarak t verildi yani tar dosya biçimi\n final ProcessBuilder pb =\n new ProcessBuilder(commandPath + \"pg_dump.exe\", \"-f\", fileAndPath, \"-F\", \"t\", \"-v\", \"-h\", IP, \"-U\", user, dbase);\n ...
[ "0.5751458", "0.5583478", "0.5440568", "0.537166", "0.520644", "0.516542", "0.51586103", "0.50812584", "0.5044873", "0.49997005", "0.4996659", "0.49557966", "0.49046475", "0.48571238", "0.48430145", "0.48199007", "0.48091954", "0.4775357", "0.4659713", "0.4659696", "0.4655410...
0.56527156
1
Return the properties which are prefixed using the given key.
public <T> Map<String, T> getProperties(String prefix) { Map<String, T> properties = new HashMap<>(); for (String key : getPropertyKeys()) { if (key.startsWith(prefix)) { properties.put(key, getProperty(key)); } } return properties; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract String getPropertyPrefix();", "public String getPropertyPrefix();", "java.lang.String getPropertiesOrThrow(\n java.lang.String key);", "public Note[] getProperties(Object key);", "public static Iterator getKeysMatching(String inKeyPrefix) {\r\n HashSet matchingKeys = new Hash...
[ "0.6499809", "0.6404432", "0.62548566", "0.62385976", "0.6192219", "0.6070299", "0.6040657", "0.60290676", "0.59963536", "0.5975671", "0.597148", "0.5922117", "0.5897673", "0.5886328", "0.5886328", "0.5886328", "0.57895136", "0.5785989", "0.57062876", "0.56987816", "0.56813",...
0.6117009
5
Add a single link inbound link to the given vertex. Note that this method will remove all other links to other vertices for the given labels and only create a single edge between both vertices per label.
public void setSingleLinkInTo(VertexFrame vertex, String... labels) { // Unlink all edges with the given label unlinkIn(null, labels); // Create a new edge with the given label linkIn(vertex, labels); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setUniqueLinkInTo(VertexFrame vertex, String... labels) {\n\t\t// Unlink all edges between both objects with the given label\n\t\tunlinkIn(vertex, labels);\n\t\t// Create a new edge with the given label\n\t\tlinkIn(vertex, labels);\n\t}", "public void setSingleLinkOutTo(VertexFrame vertex, String... ...
[ "0.6397375", "0.6179619", "0.60158205", "0.5975274", "0.5919637", "0.58393675", "0.56436235", "0.56210357", "0.55895907", "0.5538394", "0.5516341", "0.53506184", "0.5338249", "0.5320516", "0.5319764", "0.5318573", "0.53011554", "0.52953315", "0.52536386", "0.5247244", "0.5174...
0.6996243
0
Add a unique inbound link to the given vertex for the given set of labels. Note that this method will effectively ensure that only one inbound link exists between the two vertices for each label.
public void setUniqueLinkInTo(VertexFrame vertex, String... labels) { // Unlink all edges between both objects with the given label unlinkIn(vertex, labels); // Create a new edge with the given label linkIn(vertex, labels); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSingleLinkInTo(VertexFrame vertex, String... labels) {\n\t\t// Unlink all edges with the given label\n\t\tunlinkIn(null, labels);\n\t\t// Create a new edge with the given label\n\t\tlinkIn(vertex, labels);\n\t}", "@Override\n\tpublic void setUniqueLinkOutTo(VertexFrame vertex, String... labels) {\...
[ "0.652298", "0.60695803", "0.60062486", "0.5991635", "0.58648324", "0.57938075", "0.5715859", "0.5591534", "0.5533606", "0.5510502", "0.5471347", "0.54553324", "0.53995216", "0.5396118", "0.5395554", "0.5390632", "0.5294852", "0.5288213", "0.5286151", "0.5267079", "0.525164",...
0.6708361
0
Remove all outbound edges with the given label from the current vertex and create a new new outbound edge between the current and given vertex using the specified label. Note that only a single outbound edge per label will be preserved.
public void setSingleLinkOutTo(VertexFrame vertex, String... labels) { // Unlink all edges with the given label unlinkOut(null, labels); // Create a new edge with the given label linkOut(vertex, labels); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeVertex(String vertLabel) {\n\n // Implement me!\n if (indexOf(vertLabel, vertices) <0) {\n return;\n }\n vertices.remove(vertLabel);\n Iterator<String> iterator = edges.keySet().iterator();\n while (iterator.hasNext()) {\n String k =...
[ "0.5936442", "0.58182675", "0.5560557", "0.55405164", "0.5435884", "0.5402416", "0.5399396", "0.5258433", "0.524533", "0.5176534", "0.51458186", "0.5085549", "0.5070562", "0.5018464", "0.4983948", "0.4983948", "0.49812064", "0.49663496", "0.49148202", "0.4903298", "0.4896116"...
0.56810457
2
Unlink all edges between both objects with the given label
@Override public void setUniqueLinkOutTo(VertexFrame vertex, String... labels) { unlinkOut(vertex, labels); // Create a new edge with the given label linkOut(vertex, labels); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void drawUndirectedEdge(String label1, String label2) {\n }", "void removeLabel(Object oldLabel);", "void removeLabel(Object oldLabel);", "public void setUniqueLinkInTo(VertexFrame vertex, String... labels) {\n\t\t// Unlink all edges between both objects with the given label\n\t\tunlinkIn(vertex, lab...
[ "0.68854445", "0.63555723", "0.63555723", "0.633745", "0.6322778", "0.6207593", "0.6117543", "0.60465825", "0.6022015", "0.6008137", "0.60019183", "0.5968632", "0.5954932", "0.58568305", "0.58296925", "0.5829602", "0.579808", "0.57924044", "0.5776712", "0.574593", "0.57144463...
0.59907097
11
Return the locally stored uuid if possible. Otherwise load it from the graph.
public String getUuid() { if (uuid == null) { this.uuid = getProperty("uuid"); } return uuid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getUUID();", "UUID getUUID();", "String getUuid();", "public java.lang.String getUuid() {\n java.lang.Object ref = uuid_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.prot...
[ "0.6474726", "0.6455711", "0.63765955", "0.6289469", "0.6289469", "0.6203792", "0.6196748", "0.61810493", "0.61810493", "0.6165563", "0.6100952", "0.60975456", "0.6089303", "0.6067552", "0.60237163", "0.591044", "0.5814143", "0.57995343", "0.57964885", "0.5796414", "0.5786154...
0.5925405
15
TODO FIXME We should store the element reference in a thread local map that is bound to the transaction. The references should be removed once the transaction finishes
@Override public Vertex getElement() { FramedGraph fg = Tx.getActive().getGraph(); if (fg == null) { throw new RuntimeException( "Could not find thread local graph. The code is most likely not being executed in the scope of a transaction."); } Vertex vertexForId = fg.getVertex(id); if (vertexForId == null) { throw new RuntimeException("No vertex for Id {" + id + "} could be found within the graph"); } Element vertex = ((WrappedVertex) vertexForId).getBaseElement(); // Unwrap wrapped vertex if (vertex instanceof WrappedElement) { vertex = (Vertex) ((WrappedElement) vertex).getBaseElement(); } return (Vertex) vertex; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TransactionalElement<E> commit();", "@Test\n public void existingTransaction() {\n Transaction t1 = startTransaction();\n IntRef intValue = new IntRef(10);\n t1.commit();\n\n Transaction t2 = startTransaction();\n assertEquals(10, intValue.get());\n\n intValue....
[ "0.5716376", "0.5441842", "0.52630013", "0.52300423", "0.5205879", "0.5203556", "0.51436335", "0.51241577", "0.51045847", "0.5072751", "0.50525737", "0.5024752", "0.5013491", "0.49850282", "0.49848044", "0.49530792", "0.4921375", "0.49157253", "0.49127662", "0.489144", "0.488...
0.45521563
94
Instantiates a new To dos.
public ToDos(String description) { super(description); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DoCommand(String toDo) {\n this.toDo = toDo;\n this.tracker = new MarkTaskUtil();\n }", "public ToDos(String description) {\n super(description);\n this.type = 'T';\n }", "public Telefone() {\n\t}", "public Telefone() {\n\t\t\n\t}", "public VehicleTypeTO()\r\n {\...
[ "0.629842", "0.62033653", "0.608916", "0.6076091", "0.596202", "0.59418803", "0.5878408", "0.5863834", "0.580167", "0.57931906", "0.5770638", "0.57657176", "0.5751001", "0.57494545", "0.5742009", "0.5726825", "0.5709375", "0.56532437", "0.5647856", "0.5638771", "0.56351346", ...
0.6138176
2
for business request call. in this example dataName might be "productData" and this call will return product data rows in a string format
@RequestMapping(value = "getData/{dataName}", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) public String getHierarchy(@PathVariable final String dataName){ logger.info("Entered NeoJSON_getHier Request Mapping"); StatementResult result = NeoBolt.getResults_multiple(dataName); List<JSONObject> ljo = new ArrayList<JSONObject>(); while(result.hasNext()){ Record record = result.next(); JSONObject jsonObject = new JSONObject(); jsonObject.put(record.get(0).toString(),record.asMap().toString()); ljo.add(jsonObject); } return ljo.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void getData(String dataName){\r\n this.mData.get(dataName);\r\n }", "@POST\n public String SendQueryResult(String data) throws JsonProcessingException {\n ObjectMapper objectMapper = new ObjectMapper();\n InputQueryData inputQueryData = new ObjectMapper().readValue(data...
[ "0.62082565", "0.60768896", "0.56965226", "0.554922", "0.55124176", "0.5460164", "0.5445877", "0.5356071", "0.53202266", "0.5313396", "0.5313396", "0.53043056", "0.5288521", "0.5283253", "0.52580905", "0.5239827", "0.5206565", "0.51768786", "0.5175366", "0.51725745", "0.51703...
0.55516124
3
TODO Autogenerated method stub
public void fieldChanged(Field field, int context) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public void modelPropertyChange(PropertyChangeEvent evt) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
private static double getLongt() { return longt; }
{ "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
gpsThread = new GPSThread(); // gpsThread.start(); invokeLater(gpsThread);
public void handleGPS() { Runnable r2 = new Runnable() { public void run() { try { BlackBerryCriteria criteria = new BlackBerryCriteria(GPSInfo.GPS_MODE_AUTONOMOUS); try { BlackBerryLocationProvider myProvider = (BlackBerryLocationProvider) LocationProvider.getInstance(criteria); try { BlackBerryLocation myLocation = (BlackBerryLocation)myProvider.getLocation(300); int satCount = myLocation.getSatelliteCount(); setLat(myLocation.getQualifiedCoordinates().getLatitude()); setLongt(myLocation.getQualifiedCoordinates().getLongitude()); //data.setVisibleNone(); MapLocation test = new MapLocation(myLocation.getQualifiedCoordinates().getLatitude(), myLocation.getQualifiedCoordinates().getLongitude(), "test", null); int testId = data.add((Mappable) test, "test"); data.tag(testId, "test"); data.setVisibleNone(); data.setVisible( "test"); // MapAction action = map.getAction(); // action.setCentreAndZoom(new MapPoint(43.47462, -80.53820), 2); map.getMapField().update(true); int signalQuality = myLocation.getAverageSatelliteSignalQuality(); int dataSource = myLocation.getDataSource(); int gpsMode = myLocation.getGPSMode(); SatelliteInfo si; StringBuffer sb = new StringBuffer("[Id:SQ:E:A]\n"); String separator = ":"; for (Enumeration e = myLocation.getSatelliteInfo(); e!=null && e.hasMoreElements(); ) { si = (SatelliteInfo)e.nextElement(); sb.append(si.getId() + separator); sb.append(si.getSignalQuality() + separator); sb.append(si.getElevation() + separator); sb.append(si.getAzimuth()); sb.append('\n'); System.out.println(sb); } } catch ( InterruptedException iex ) { Logger.log(iex.toString()); } catch ( LocationException lex ) { Logger.log(lex.toString()); } } catch ( LocationException lex ) { Logger.log(lex.toString()); } } catch ( UnsupportedOperationException uoex ) { Logger.log(uoex.toString()); } // return; } }; controller.invokeLater(r2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void ativaThread() {\n\t\t\n\t\tmDialog = ProgressDialog.show(this, \"Buslocation\",\n\t\t\t\t\"Buscando coordenadas...\", false, false);\n\t\tmHandler = new Handler();\n\t\tmThread = new MinhaThread(1);\n\t\tmThread.start();\n\t}", "@Override ...
[ "0.6694469", "0.6146464", "0.60668546", "0.59703976", "0.5909719", "0.5801677", "0.579127", "0.57542706", "0.574519", "0.573983", "0.57352304", "0.5709748", "0.57091933", "0.5707807", "0.57033706", "0.56902224", "0.56851345", "0.56759435", "0.5671546", "0.5613137", "0.5610131...
0.695034
0
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); switch (id){ case android.R.id.home: this.finish(); return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ...
[ "0.79041183", "0.7805934", "0.77659106", "0.7727251", "0.7631684", "0.7621701", "0.75839096", "0.75300384", "0.74873656", "0.7458051", "0.7458051", "0.7438486", "0.742157", "0.7403794", "0.7391802", "0.73870087", "0.7379108", "0.7370295", "0.7362194", "0.7355759", "0.73454577...
0.72045326
46
Called by the UI. Blocks until a decision is ready, then returns.
public void waitForDecision(){ if(gameOver) { return; } if(!decisionActive) { try { uiWaiting = true; synchronized(uiWait) { uiWait.wait(); } } catch (Exception e) { logger.log(""+e); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateUI() {\n if(mChoice == Keys.CHOICE_WAITING) {\n mInstructionView.setText(\"Choose your weapon...\");\n mChoiceView.setImageResource(R.drawable.unknown);\n mRockButton.setEnabled(true);\n mPaperButton.setEnabled(true);\n mScissorsButto...
[ "0.63471556", "0.62539744", "0.6192393", "0.6147836", "0.60418284", "0.6035404", "0.60138226", "0.59833705", "0.5968115", "0.59244955", "0.58559453", "0.5819507", "0.5764262", "0.56830215", "0.5681843", "0.56767035", "0.56570894", "0.5656231", "0.5653772", "0.5638019", "0.561...
0.75432885
0
Get List of dependencies from package.json file
public List<String> getDependencies() throws IOException { PackageJSON packageJSON = new ObjectMapper() .readValue(this.getClass().getClassLoader().getResourceAsStream("package.json"), PackageJSON.class); return packageJSON.getDependencies(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Set<String> getDependencies();", "public String[] getResolvedDependencies();", "String getApplicationDependencies();", "public List getDependencies() {\n return Collections.unmodifiableList(dependencies);\n }", "public List<String> getDependencies() {\n return new ArrayList<>(mDependencies...
[ "0.679978", "0.6666655", "0.6615784", "0.65161794", "0.63980734", "0.6377451", "0.634265", "0.631317", "0.6298529", "0.6286119", "0.6283997", "0.6164717", "0.5813515", "0.5748534", "0.5604072", "0.5563777", "0.5528235", "0.5486065", "0.54850745", "0.5471276", "0.5465283", "...
0.8195699
0
Get process response, by parsing input streams
private String getResponse(InputStream input) throws IOException { try (BufferedReader buffer = new BufferedReader(new InputStreamReader(input))) { return buffer.lines().collect(Collectors.joining("\n")); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void processStreamInput() {\n }", "default Output processResponse(Input input, Output response) {\n process(input, response);\n return response;\n }", "JsonNode readNextResponse() {\n try {\n String responseLine = this.stdout.readLine();\n if (responseLin...
[ "0.6499499", "0.63371223", "0.632738", "0.6046973", "0.5966191", "0.5951957", "0.5850333", "0.58165526", "0.57652354", "0.57404196", "0.5695427", "0.56848234", "0.5622982", "0.5617081", "0.55952597", "0.5563664", "0.556185", "0.55603576", "0.55585796", "0.5530946", "0.5510251...
0.5947374
6
World sets this RenderManager's worldObj to the world provided
public void setWorld(@Nullable World worldIn) { this.world = worldIn; if (worldIn == null) { this.field_78734_h = null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setWorld(World world) {\n this.world = world;\n }", "public void setWorld(GameData world) {\r\n this.world = world;\r\n }", "@Model\n\tprotected void setWorld(World world) {\n\t\tthis.world = world;\n\t}", "protected void updateWorld(World world) {\r\n\t\tthis.world = world;\r\n\t\t...
[ "0.8048662", "0.7999648", "0.7813439", "0.71692747", "0.695829", "0.6913212", "0.6824784", "0.67853856", "0.6413289", "0.6360135", "0.63073885", "0.625723", "0.6252197", "0.6252197", "0.6244998", "0.6187882", "0.618587", "0.6155885", "0.6142566", "0.6119506", "0.6114606", "...
0.67233884
8
Returns the font renderer
public FontRenderer getFontRenderer() { return this.textRenderer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public FontRenderer getFontRenderer()\r\n\t{\n\t\treturn this.fontRenderer;\r\n\t}", "public FontRenderer getFontRenderer() {\n\t\treturn fontRenderer;\n\t}", "public MinecraftFontRenderer getFont() {\n return fontRenderer;\n }", "java.lang.String getRenderer();", "@Override\n public String ge...
[ "0.83336383", "0.82188576", "0.8109636", "0.7644329", "0.75765395", "0.7483639", "0.7462137", "0.7421812", "0.7421812", "0.7421812", "0.7346058", "0.73012674", "0.723417", "0.71914494", "0.7186465", "0.717671", "0.7116908", "0.7086287", "0.70722395", "0.7070558", "0.7070558",...
0.8316474
1
Interact with camera module and manager sub detection features.
public interface IDetectionManager { /** * Interface used for get and change a capture request. */ public interface IDetectionListener { /** * Get the current repeating request type {@link RequestType}. * * @return The current type of capture request. */ public RequestType getRepeatingRequestType(); /** * Request change capture request. * * @param sync * Whether should respond this request immediately, true request * immediately,false wait all requests been submitted and remove the same request * current design is only for * {@link ISettingChangedListener#onSettingChanged(java.util.Map)}. * @param requestType * The required request, which is one of the {@link RequestType}. * @param captureType * The required capture, which is one of the {@link CaptureType}. */ public void requestChangeCaptureRequest(boolean sync, RequestType requestType, CaptureType captureType); } /** * The life cycle corresponding to camera activity onCreate. * * @param activity * Camera activity. * @param parentView * The root view of camera activity. * @param isCaptureIntent * {@link com.android.camera.v2.CameraActivityBridge #isCaptureIntent()}. */ void open(Activity activity, ViewGroup parentView, boolean isCaptureIntent); /** * The life cycle corresponding to camera activity onResume. */ void resume(); /** * The life cycle corresponding to camera activity onPause. */ void pause(); /** * The life cycle corresponding to camera activity onDestory. */ void close(); /** * {@link com.android.camera.v2.app.GestureManager.GestureNotifier * #onSingleTapUp(float, float)}. * * @param x * The x-coordinate. * @param y * The y-coordinate. */ void onSingleTapUp(float x, float y); /** * {@link com.android.camera.v2.app.GestureManager.GestureNotifier #onLongPress(float, float)}. * * @param x * The x-coordinate. * @param y * The y-coordinate. */ void onLongPressed(float x, float y); /** * {@link PreviewStatusListener * #onPreviewLayoutChanged(android.view.View, int, int, int, int, int, int, int, int)}. * * @param previewArea * The preview area. */ void onPreviewAreaChanged(RectF previewArea); /** * {@link com.android.camera.v2.CameraActivityBridge #onOrientationChanged(int)}. * * @param orientation * The current G-sensor orientation. */ void onOrientationChanged(int orientation); /** * Configuring capture requests. * * @param requestBuilders The builders of capture requests. * @param captureType {@link CaptureType}. */ void configuringSessionRequests(Map<RequestType, CaptureRequest.Builder> requestBuilders, CaptureType captureType); /** * This method is called when the camera device has started capturing the output image for the * request, at the beginning of image exposure. * * @param request * The request for the capture that just begun. * @param timestamp * The time stamp at start of capture, in nanoseconds. * @param frameNumber * The frame number for this capture. */ void onCaptureStarted(CaptureRequest request, long timestamp, long frameNumber); /** * This method is called when an image capture has fully completed and all the result metadata * is available. * * @param request * The request that was given to the CameraDevice * * @param result * The total output metadata from the capture, including the final capture parameters * and the state of the camera system during capture. */ void onCaptureCompleted(CaptureRequest request, TotalCaptureResult result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void openCamera() {\n \n\n }", "public void camera(){\n System.out.println(\"I am taking pictures...\");\r\n }", "void cameraSetup();", "public void onCamera();", "void cameraInOperation(boolean in_operation, boolean is_video);", "public ToggleCameraMode() {\n requires(R...
[ "0.696778", "0.657628", "0.6564822", "0.6481218", "0.6463913", "0.6444631", "0.64373744", "0.6410469", "0.635578", "0.6340328", "0.63274723", "0.6320379", "0.6296723", "0.6289235", "0.62575686", "0.62525237", "0.62240773", "0.615196", "0.6148908", "0.61233556", "0.60959786", ...
0.60337937
24
Interface used for get and change a capture request.
public interface IDetectionListener { /** * Get the current repeating request type {@link RequestType}. * * @return The current type of capture request. */ public RequestType getRepeatingRequestType(); /** * Request change capture request. * * @param sync * Whether should respond this request immediately, true request * immediately,false wait all requests been submitted and remove the same request * current design is only for * {@link ISettingChangedListener#onSettingChanged(java.util.Map)}. * @param requestType * The required request, which is one of the {@link RequestType}. * @param captureType * The required capture, which is one of the {@link CaptureType}. */ public void requestChangeCaptureRequest(boolean sync, RequestType requestType, CaptureType captureType); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface ICapture {\n public Handler getHandler();\n\n Rect getCropRect();\n\n void handleDecode(Result rawResult, Bundle bundle);\n\n CameraManager getCameraManager();\n}", "void onCaptureCompleted(CaptureRequest request, TotalCaptureResult result);", "public interface IDetectionManager {\...
[ "0.6377007", "0.6327781", "0.6287438", "0.6120796", "0.6005976", "0.59987944", "0.5956642", "0.5741332", "0.56903774", "0.56801564", "0.56472385", "0.55746835", "0.55667067", "0.5482714", "0.5474533", "0.546055", "0.5456741", "0.54369324", "0.5428885", "0.5424866", "0.5372723...
0.52760303
25
The life cycle corresponding to camera activity onResume.
void resume();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onResume() {\n if (mCamera == null) {\n obtainCameraOrFinish();\n }\n }", "@Override\n protected void onResume() {\n super.onResume();\n cameraLiveView.onResume();\n }", "public final void \n onResume() {\n \t\n \tthis.isPaused = false;\n ...
[ "0.77368164", "0.7729995", "0.7379479", "0.735283", "0.72692806", "0.7248482", "0.7157578", "0.7124034", "0.71159214", "0.7113974", "0.7070074", "0.7058357", "0.7058357", "0.7058357", "0.7058357", "0.7053546", "0.7033476", "0.6989022", "0.69791704", "0.69791704", "0.6978023",...
0.0
-1
The life cycle corresponding to camera activity onPause.
void pause();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onPause() {\n releaseCamera();\n }", "@Override\n protected void onPause() {\n ReleaseCamera();\n super.onPause();\n }", "@Override\n protected void onPause() {\n super.onPause();\n releaseCamera();\n }", "@Override\n\tprotected void onPause() {\n...
[ "0.7639693", "0.74497133", "0.73781115", "0.7352864", "0.69692826", "0.69625515", "0.6950067", "0.6935038", "0.6922456", "0.6896787", "0.68862104", "0.68577456", "0.6796747", "0.67404747", "0.6711859", "0.6682447", "0.6643112", "0.66245836", "0.65933996", "0.6584775", "0.6580...
0.0
-1
The life cycle corresponding to camera activity onDestory.
void close();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void onDestory() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tLog.e(TAG, \"ondestory\");\r\n\t}", "@Override\r\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tLog.e(TAG, \"ondestory\");\r\n\t}", "public void destroy() {\n L...
[ "0.7388904", "0.7200849", "0.7200849", "0.7166901", "0.70678836", "0.7045106", "0.70358557", "0.7001712", "0.6983879", "0.69509655", "0.6937614", "0.69284755", "0.69284755", "0.6918614", "0.6900608", "0.6900074", "0.6877549", "0.68457884", "0.6837609", "0.6820352", "0.6788677...
0.0
-1
This method is called when the camera device has started capturing the output image for the request, at the beginning of image exposure.
void onCaptureStarted(CaptureRequest request, long timestamp, long frameNumber);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onCaptureStart();", "private void captureImage() {\n camera.takePicture(null, null, jpegCallback);\r\n }", "private void startCamera() {\n PreviewConfig previewConfig = new PreviewConfig.Builder().setTargetResolution(new Size(640, 480)).build();\n Preview preview = new Preview(prev...
[ "0.6867482", "0.6549926", "0.6458974", "0.6384348", "0.6364292", "0.6359439", "0.6327145", "0.6302173", "0.62926227", "0.6273739", "0.6221646", "0.6213252", "0.6206892", "0.6194842", "0.6191682", "0.61857516", "0.6161172", "0.6112026", "0.6105692", "0.6105692", "0.6103835", ...
0.6399144
3
This method is called when an image capture has fully completed and all the result metadata is available.
void onCaptureCompleted(CaptureRequest request, TotalCaptureResult result);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void takePhotoCompleted() {\n if (MyDebug.LOG)\n Log.d(TAG, \"takePhotoCompleted\");\n // need to set jpeg_todo to false before calling onCompleted, as that may reenter CameraController to take another photo (if in auto-repeat burst mode) - see testTakePhotoRepeat()\n ...
[ "0.70293206", "0.653749", "0.650897", "0.64627665", "0.64579856", "0.64489174", "0.6424929", "0.64122796", "0.64018744", "0.63232636", "0.6260611", "0.6194358", "0.6052894", "0.60363436", "0.6032896", "0.5992709", "0.5932313", "0.58749664", "0.58693635", "0.58192325", "0.5809...
0.7264452
0
Returns true if the player is loaded on the server
public boolean isLoaded(P player){ return playerMap.containsKey(player); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean isLoaded() {\n\t\ttry {\n\t\t\tPlayer.getRSPlayer();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "boolean isLoaded();", "public boolean isOnline()\n\t{\n\t\treturn PlayerManager.getPlayer(name)!=null;\n\t}", "public boolean isLoaded();", "pub...
[ "0.8157205", "0.6954982", "0.6940023", "0.6860445", "0.6819087", "0.68075764", "0.6761657", "0.66990936", "0.6625268", "0.66103584", "0.6608068", "0.6591832", "0.65870285", "0.65665215", "0.6551166", "0.65466744", "0.6545276", "0.6537527", "0.65323037", "0.653172", "0.6520983...
0.7687602
1
Returns true upon the player data of a specific data is loaded, otherwise returns false
public boolean loadPlayer(P player){ //Is the player already loaded? if(playerMap.containsKey(player)){ System.out.println("Tried to load player " + player.getName() + "'s data, even though it's already loaded!"); return false; } else { if(data.getConfig().contains(player.getUniqueId().toString())){ //Load player PlayerProfile playerProfile = new PlayerProfile(false, data, player); playerMap.put(player, playerProfile); return true; } else { //Create player profile PlayerProfile playerProfile = new PlayerProfile(true, data, player); playerMap.put(player, playerProfile); return true; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isLoaded(P player){\n return playerMap.containsKey(player);\n }", "boolean canLoadData();", "public static boolean isLoaded() {\n\t\ttry {\n\t\t\tPlayer.getRSPlayer();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "boolean hasData();", "bool...
[ "0.7334941", "0.7107245", "0.68265027", "0.66384614", "0.66384614", "0.66384614", "0.66384614", "0.66384614", "0.66384614", "0.66384614", "0.6578529", "0.64882463", "0.64882463", "0.64744836", "0.63509625", "0.63361585", "0.63361585", "0.63268304", "0.6315728", "0.62908536", ...
0.70791626
2
Returns a specific player's data
public PlayerProfile getPlayer(P player){ if(playerMap.containsKey(player)){ //Player is safe to send return playerMap.get(player); } else { //Player isn't safe to send System.out.println("Tried to grab player " + player.getName() + "'s data, but it's not available"); return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PlayerData getPlayerData() {\n return player;\n }", "public PlayerFunctionality getPlayerData()\r\n\t{ return data; }", "public Node getPlayerData(){\n if(blender_Player == null){\n /** Get player data **/\n blender_Player = (Node) assetManager.loadModel(\"Models/B...
[ "0.7689696", "0.7364779", "0.717891", "0.6980499", "0.6910961", "0.69087756", "0.6705104", "0.6689655", "0.6689655", "0.66390294", "0.6634278", "0.6630735", "0.6609475", "0.66027695", "0.6541365", "0.6516325", "0.6510536", "0.6493997", "0.64631706", "0.6447286", "0.64227986",...
0.7250355
2
Returns a specific player's attribute
public Long getPlayerAttribute(P player, String attribute){ attribute = "." + attribute; if(playerMap.containsKey(player) && getPlayer(player).getPlayerProfile().containsKey(attribute)){ //PlayerAttribute is safe to send return playerMap.get(player).getPlayerProfile().get(attribute); } else { //Player isn't safe to send System.out.println("Tried to grab player " + player.getName() + "'s attribute, but it's not available"); return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getAttribNum(){\r\n\t\treturn playerNum;\r\n\t}", "public int getAttribNum(){\r\n\t\treturn playerNum;\r\n\t}", "Object getAttribute(int attribute);", "Attribute getAttribute();", "String getAttribute();", "java.lang.String getAttribute();", "public int getPlayer()\n {\n return this.play...
[ "0.7124137", "0.7124137", "0.66200376", "0.66093236", "0.6545951", "0.6495355", "0.64912325", "0.64884555", "0.62995917", "0.62879163", "0.62743235", "0.62743235", "0.62631553", "0.6223225", "0.6221269", "0.6221269", "0.6221269", "0.6208794", "0.62041456", "0.61973536", "0.61...
0.80281913
0
Saves a specific player, then writes new data to disk Returns true if successful
public boolean savePlayer(P player){ String uuid = player.getUniqueId().toString(); if(playerMap.containsKey(player)){ //Player is safe to save List<String> playerAttributes = new ArrayList<String>(getPlayer(player).getPlayerAttributes()); System.out.println(player.getName() + " has " + playerAttributes.size() + " attributes to save."); for(int i = 0; playerAttributes.size() > i; i++){ data.getConfig().set(uuid + "." + playerAttributes.get(i), playerMap.get(player).getPlayerAttribute(playerAttributes.get(i))); } data.saveData(); for(int i = 0; playerAttributes.size() > i; i++){ System.out.println("Saved " + uuid + "." + playerAttributes.get(i) + " as " + playerMap.get(player).getPlayerAttribute(playerAttributes.get(i))); } return true; } else { //Player isn't safe to save System.out.println("Tried to save player " + player.getName() + "'s data, but it's not available"); return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void savePlayer(Player player){\n if (player != null){\n try {\n mapper.writeValue(new File(\"Data\\\\PlayerData\\\\\" + getFileName(player) + \".json\"), player);\n } catch ( Exception e ) {\n e.printStackTrace();\n }\n }\n...
[ "0.760548", "0.71982545", "0.7092924", "0.7076662", "0.70730734", "0.70587945", "0.7017409", "0.69808364", "0.6962902", "0.6936556", "0.69284034", "0.6912552", "0.69086325", "0.6703208", "0.66779596", "0.6584774", "0.6488851", "0.6480791", "0.6471393", "0.6471273", "0.646609"...
0.74133617
1
Returns true if a specific player is successfully unloaded from the server
public boolean unloadPlayer(P player){ if(playerMap.containsKey(player)){ //Player is safe to unload playerMap.remove(player); return true; } else { //Player isn't safe to save System.out.println("Tried to unload player " + player.getName() + "'s data, but it's not available"); return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean removePlayer(String player);", "@Override\n public boolean logout(String username) throws RemoteException {\n Player p = getPlayer(username);\n if (p != null) {\n p.setOnline(false);\n p.setReady(false);\n }\n return p != null;\n }", "public boolean vanished(Player player) {\n ...
[ "0.6740087", "0.62350315", "0.61749774", "0.61491287", "0.61206704", "0.6047892", "0.60146517", "0.5908345", "0.5888307", "0.58592886", "0.5848374", "0.583597", "0.5824092", "0.5818401", "0.57797617", "0.57720554", "0.5728725", "0.57285506", "0.57122064", "0.5693472", "0.5648...
0.79737675
0
Returns how many players are currently loaded
public int loadedPlayers(){ return playerMap.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int playersCount(){\r\n\t\treturn players.size();\r\n\t}", "public static int getNumPlayers(){\n\t\treturn numPlayers;\n\t}", "public int countPlayers(){\n return players.size();\n }", "public int getNumPlayers(){\n\t\treturn this.players.size();\n\t}", "public int playerCount()\r\n\t{\r\n...
[ "0.825248", "0.8152763", "0.81312966", "0.8063653", "0.79801464", "0.7974848", "0.787548", "0.7850627", "0.78282267", "0.78277445", "0.78068095", "0.778485", "0.7775487", "0.7713559", "0.767092", "0.7666394", "0.7661111", "0.7645021", "0.76312536", "0.7621268", "0.75645834", ...
0.84428316
0
Sets a players attribute, returns false if it's a new attribute
public boolean setPlayerAttribute(P player, String attribute, Long number){ attribute = "." + attribute; if(playerMap.containsKey(player)){ if(playerMap.get(player).hasAttribute(attribute)){ playerMap.get(player).getPlayerProfile().put(attribute, number); return true; } else { playerMap.get(player).getPlayerProfile().put(attribute, number); System.out.println("Just set an attribute that isn't loaded on the player"); return false; } } else { System.out.println("Failed to setPlayerAttribute as player isn't loaded"); return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean setPlayer(Player aNewPlayer)\r\n {\r\n boolean wasSet = false;\r\n player = aNewPlayer;\r\n wasSet = true;\r\n return wasSet;\r\n }", "boolean setPlayer(String player);", "public boolean increasePlayerAttribute(P player, String attribute, Long number){\n attribute = \".\" + ...
[ "0.69385374", "0.6860206", "0.68399954", "0.65514326", "0.65233296", "0.62323225", "0.61166066", "0.6113851", "0.604991", "0.6046869", "0.60205305", "0.59964895", "0.5957724", "0.59571487", "0.59472996", "0.5923762", "0.59076166", "0.5885687", "0.5877557", "0.5871916", "0.587...
0.79299855
0
Adds to a players attribute, returns false if it creates a new attribute
public boolean increasePlayerAttribute(P player, String attribute, Long number){ attribute = "." + attribute; if(playerMap.get(player).hasAttribute(attribute)){ playerMap.get(player).getPlayerProfile().put(attribute, playerMap.get(player).getPlayerAttribute(attribute) + number); return true; } else { playerMap.get(player).getPlayerProfile().put(attribute, number); return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean setPlayerAttribute(P player, String attribute, Long number){\n attribute = \".\" + attribute;\n if(playerMap.containsKey(player)){\n if(playerMap.get(player).hasAttribute(attribute)){\n playerMap.get(player).getPlayerProfile().put(attribute, number);\n ...
[ "0.7126181", "0.618613", "0.5946676", "0.5882908", "0.5862277", "0.5862277", "0.58205354", "0.578886", "0.5716386", "0.56396645", "0.561927", "0.55784225", "0.5575982", "0.55667996", "0.5524235", "0.55154645", "0.5469824", "0.54609436", "0.5407541", "0.5399785", "0.53991055",...
0.71195924
1
Decreases a players attribute, returns false if it creates a new attribute
public boolean decreasePlayerAttribute(P player, String attribute, Long number){ attribute = "." + attribute; if(playerMap.get(player).hasAttribute(attribute)){ playerMap.get(player).getPlayerProfile().put(attribute, playerMap.get(player).getPlayerAttribute(attribute) - number); return true; } else { playerMap.get(player).getPlayerProfile().put(attribute, number); return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean increasePlayerAttribute(P player, String attribute, Long number){\n attribute = \".\" + attribute;\n if(playerMap.get(player).hasAttribute(attribute)){\n playerMap.get(player).getPlayerProfile().put(attribute, playerMap.get(player).getPlayerAttribute(attribute) + number);\n ...
[ "0.629688", "0.59942055", "0.5837393", "0.5824582", "0.5810841", "0.57814145", "0.56963074", "0.5666114", "0.56304765", "0.56115663", "0.55902827", "0.55902827", "0.5589865", "0.5555358", "0.55477136", "0.5528611", "0.5524838", "0.5509718", "0.5495766", "0.54792154", "0.54504...
0.7879494
0
Dice cual de los dos barcos ha quedado mejor en la clasificacion PreCnd: Los barcos han de ser del mismo tipo
@Override public int compare(Posicion pos1, Posicion pos2) { /*Si ambos tiempos no acarrean la maxima puntuacion */ if ((!pos1.getPenal().isMaxPointsPenal()) && (!pos2.getPenal().isMaxPointsPenal())) { /** * Si NO compiten en tiempo compensado */ if (pos1.getBarco().getTipo().getCompiteTmpReal()) { //TODO Probar bien esto! return (int) ponderarPenalizacion(pos1.getSegTiempo(), pos1.getPenal(), pos1.getSegPenalizacion()) .compareTo(ponderarPenalizacion(pos2.getSegTiempo(), pos2.getPenal(), pos2.getSegPenalizacion())); } else { return ponderarPenalizacion( calcTiempoCompensado(pos1.getSegTiempo(), pos1.getBarco(), pos1.getManga()), pos1.getPenal(), pos1.getSegPenalizacion()) .compareTo(ponderarPenalizacion(calcTiempoCompensado( pos2.getSegTiempo(), pos2.getBarco(), pos2.getManga()), pos2.getPenal(), pos2.getSegPenalizacion())); } } else { /** * Situacion en la que uno de ellos esta penalizado o ambos lo * están */ if (pos1.getPenal() == Posicion.Penalizacion.NAN) { return -1; } else if (pos2.getPenal() == Posicion.Penalizacion.NAN) { return 1; } else { return 0; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void Diceroll()\n\t{\n\t\tdice1 = rand.nextInt(6)+1;\n\t\tdice2 = rand.nextInt(6)+1;\n\t\ttotal = dice1+dice2;\n\t}", "public void colocarCompu(){\n int aux1;\n int aux2;\n \n for(int sub=0;sub<5;sub++){\n do{\n aux1=(int)(Math.random()*10);\n aux2...
[ "0.63808495", "0.61085945", "0.6053281", "0.59909165", "0.59594446", "0.59379923", "0.59294546", "0.59264463", "0.5913681", "0.58624285", "0.58594596", "0.5819852", "0.5811414", "0.5766782", "0.5754939", "0.5752118", "0.5750497", "0.5747107", "0.57379055", "0.5736005", "0.569...
0.0
-1
Devuelve el tiempo computado en segundos
private Long calcTiempoCompensado(Long tiempoReal, Barco barco, Manga manga) { //Tiempo compensado = Tiempo Real + GPH * Nº de millas manga. Float res = tiempoReal + barco.getGph() * manga.getMillas(); return (long) Math.round(res); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String dimeTuTiempo()\n {\n String cadResultado=\"\";\n if (horas<10)\n {\n cadResultado=cadResultado+\"0\";\n }\n cadResultado=cadResultado+horas;\n cadResultado=cadResultado+\":\";\n if(minutos<10)\n {\n cadResultado=cadResul...
[ "0.68556404", "0.6585681", "0.6575457", "0.6558005", "0.6500158", "0.6438496", "0.62161505", "0.6143818", "0.6134352", "0.6105389", "0.60501075", "0.5999134", "0.59916484", "0.5962564", "0.5870423", "0.58556575", "0.58549774", "0.580652", "0.5786569", "0.5783086", "0.5783032"...
0.59301966
14
Establecemos las penalizaciones que son leves y las que no, con esto impedimos que las graves puedan ser eliminadas con la regla de las 4 mangas
public Boolean isLowPenal() { switch (this) { case DNE: //NO EXCLUIBLE return false; case DGM: //NO EXCLUIBLE return false; default: // TODAS LAS DEMAS PENALIZACIONES SON EXCLUIBLES return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void disperse() {\t\t\n\t\tfor (int r = 0; r < rows; r++){\n\t\t\tfor (int c = 1; c < cols; c++){\n\t\t\t\tint sum = values[r+1][c-1] + values[r+1][c] + values[r+1][c+1];\n\t\t\t\tif(r < rows - fireLevel + 14){\n\t\t\t\t\tvalues[r][c] = (sum / 3) - 1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tvalues[r][c] = (in...
[ "0.62180907", "0.61654717", "0.61524", "0.61198723", "0.60555387", "0.603732", "0.59978753", "0.5964482", "0.5957268", "0.5935358", "0.5904857", "0.58952963", "0.58834785", "0.5880955", "0.58690834", "0.57882744", "0.5786413", "0.5782942", "0.5782263", "0.5780053", "0.5760317...
0.0
-1
Main Converts user input to useable state.
int getNumericalUserInput() { String input = userInput.next(); int i = -1; //holds converted input boolean success = false; while (!success) { if (input.toLowerCase().equals("c")) { i = -1; success = true; } else { try { i = Integer.parseInt(input); success = true; } catch (NumberFormatException e) { System.out.println("Invalid entry."); break; } } } return i; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void takeInUserInput(){\n\t\t// only take in input when it is in the ANSWERING phase\n\t\tif(spellList.status == QuizState.Answering){\n\t\t\tspellList.setAnswer(getAndClrInput());\n\t\t\tspellList.status = QuizState.Answered;\n\t\t\tansChecker=spellList.getAnswerChecker();\n\t\t\tansChecker.execute();\n\t...
[ "0.65303206", "0.6244055", "0.6206723", "0.61807245", "0.6149257", "0.60358906", "0.6022566", "0.6009899", "0.59964114", "0.5958939", "0.59489566", "0.59168184", "0.58955103", "0.5893383", "0.5865095", "0.5828112", "0.5817328", "0.5811734", "0.58036697", "0.5802168", "0.58015...
0.0
-1
The media locator tells where the audio/video track is located. &lt;complexType name=&quot;MediaLocatorType&quot;&gt; &lt;sequence&gt; &lt;choice minOccurs=&quot;0&quot;&gt; &lt;element name=&quot;MediaUri&quot; type=&quot;anyURI&quot;/&gt; &lt;element name=&quot;InlineMedia&quot; type=&quot;mpeg7:InlineMediaType&quot;/&gt; &lt;/choice&gt; &lt;element name=&quot;StreamID&quot; type=&quot;nonNegativeInteger&quot; minOccurs=&quot;0&quot;/&gt; &lt;/sequence&gt; &lt;/complexType&gt;
public interface MediaLocator extends XmlElement { /** * Returns the media uri of the track. * * @return the media uri */ URI getMediaURI(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static MobileLocator parseMobileLocator(String locator) {\n Pattern p = Pattern.compile(\"^([A-Za-z ]+)=([\\\\S\\\\s]+)\");\n Matcher m = p.matcher(locator);\n MobileLocator lc = new MobileLocator();\n if (m.find()) {\n lc.setType(MobileLocatorType.fromStrategy(m.grou...
[ "0.5578847", "0.52295625", "0.5092815", "0.50837", "0.49760875", "0.49334294", "0.49154285", "0.49154285", "0.48830724", "0.48687103", "0.4846508", "0.48446923", "0.47787154", "0.47505257", "0.47202912", "0.47022337", "0.46731544", "0.46606916", "0.46180198", "0.46121785", "0...
0.6485912
0
Returns the media uri of the track.
URI getMediaURI();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getBaseMediaUrl() {\n return (String) get(\"base_media_url\");\n }", "public URI getMediaLink() {\n return this.mediaLink;\n }", "public URI getMediaLink() {\n return this.mediaLink;\n }", "public URI getMediaLinkUri() {\n return this.mediaLi...
[ "0.68860614", "0.68851435", "0.68851435", "0.6878603", "0.681498", "0.66432077", "0.6562896", "0.64827484", "0.6385151", "0.6383497", "0.6324061", "0.6315233", "0.62822205", "0.62763166", "0.62763166", "0.6269372", "0.62665313", "0.62224686", "0.6218058", "0.62050354", "0.618...
0.79337996
0
Creates a image scaling operation, defined by the bounding box of a certain width and height.
public ScaleImageOperation(int width, int height, boolean upscaling, ImageUtils.ScalingStrategy strategy) { this(width, height, upscaling, strategy, 1f); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract BufferedImage scale(Dimension destinationSize);", "private BufferedImage scale(final BufferedImage input,\n \t\tfinal int newWidth, final int newHeight)\n \t{\n \t\tfinal int oldWidth = input.getWidth(), oldHeight = input.getHeight();\n \t\tif (oldWidth == newWidth && oldHeight == newHeight) retu...
[ "0.6184193", "0.60309994", "0.5941005", "0.58738583", "0.583216", "0.57451165", "0.5654572", "0.5571762", "0.5494232", "0.54936564", "0.5487749", "0.54665726", "0.541773", "0.5366812", "0.5344029", "0.53270495", "0.53257895", "0.53188", "0.53117436", "0.53105575", "0.53030604...
0.61146575
1
Creates a image scaling operation, defined by the bounding box of a certain width and height.
public ScaleImageOperation(int width, int height, boolean upscaling, ImageUtils.ScalingStrategy strategy, float compressionQuality) { this.width = width; this.height = height; this.upscaling = upscaling; this.strategy = strategy; this.compressionQuality = compressionQuality; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract BufferedImage scale(Dimension destinationSize);", "public ScaleImageOperation(int width, int height, boolean upscaling, ImageUtils.ScalingStrategy strategy) {\n this(width, height, upscaling, strategy, 1f);\n }", "private BufferedImage scale(final BufferedImage input,\n \t\tfinal int ...
[ "0.61864007", "0.6116039", "0.60320705", "0.58751917", "0.58340466", "0.5747162", "0.56564486", "0.55732375", "0.54954743", "0.54947925", "0.5489027", "0.546816", "0.5418372", "0.5366685", "0.53464353", "0.5328153", "0.5326304", "0.5322206", "0.5313385", "0.5311945", "0.53035...
0.59429675
3
Save the image data in a temporary file so we can reuse the original data asis without putting it all into memory
private void processSvg(final InputStream data) throws IOException { final File tmpFile = writeToTmpFile(data); log.debug("Stored uploaded image in temporary file {}", tmpFile); // by default, store SVG data as-is for all variants: the browser will do the real scaling scaledData = new AutoDeletingTmpFileInputStream(tmpFile); // by default, use the bounding box as scaled width and height scaledWidth = width; scaledHeight = height; if (!isOriginalVariant()) { try { scaleSvg(tmpFile); } catch (ParserConfigurationException | SAXException e) { log.info("Could not read dimensions of SVG image, using the bounding box dimensions instead", e); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void saveTempFile(DigitalObject object) {\n String tempFileName = tempDir.getAbsolutePath() + \"/\" + System.nanoTime();\n OutputStream fileStream;\n try {\n fileStream = new BufferedOutputStream(new FileOutputStream(tempFileName));\n if (object != null) {\n ...
[ "0.65610355", "0.6231521", "0.6198432", "0.61595863", "0.6117641", "0.60541224", "0.6040836", "0.60274297", "0.60135144", "0.59913063", "0.59913063", "0.5980249", "0.59721917", "0.5971365", "0.59696656", "0.5940289", "0.5919363", "0.59172857", "0.59169763", "0.5915948", "0.59...
0.0
-1
Creates a scaled version of an image. The given scaling parameters define a bounding box with a certain width and height. Images that do not fit in this box (i.e. are too large) are always scaled down such that they do fit. If the aspect ratio of the original image differs from that of the bounding box, either the width or the height of scaled image will be less than that of the box. Smaller images are scaled up in the same way as large images are scaled down, but only if upscaling is true. When upscaling is false and the image is smaller than the bounding box, the scaled image will be equal to the original. If the width or height of the scaling parameters is 0 or less, that side of the bounding box does not exist (i.e. is unbounded). If both sides of the bounding box are unbounded, the scaled image will be equal to the original.
public void execute(InputStream data, ImageReader reader, ImageWriter writer) throws IOException { // save the image data in a temporary file so we can reuse the original data as-is if needed without // putting all the data into memory final File tmpFile = writeToTmpFile(data); boolean deleteTmpFile = true; log.debug("Stored uploaded image in temporary file {}", tmpFile); InputStream dataInputStream = null; ImageInputStream imageInputStream = null; try { dataInputStream = new FileInputStream(tmpFile); imageInputStream = new MemoryCacheImageInputStream(dataInputStream); reader.setInput(imageInputStream); final int originalWidth = reader.getWidth(0); final int originalHeight = reader.getHeight(0); if (isOriginalVariant()) { scaledWidth = originalWidth; scaledHeight = originalHeight; scaledData = new AutoDeletingTmpFileInputStream(tmpFile); deleteTmpFile = false; } else { BufferedImage scaledImage = getScaledImage(reader, originalWidth, originalHeight); ByteArrayOutputStream scaledOutputStream = ImageUtils.writeImage(writer, scaledImage, compressionQuality); scaledWidth = scaledImage.getWidth(); scaledHeight = scaledImage.getHeight(); scaledData = new ByteArrayInputStream(scaledOutputStream.toByteArray()); } } finally { if (imageInputStream != null) { imageInputStream.close(); } IOUtils.closeQuietly(dataInputStream); if (deleteTmpFile) { log.debug("Deleting temporary file {}", tmpFile); tmpFile.delete(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private BufferedImage scale(final BufferedImage input,\n \t\tfinal int newWidth, final int newHeight)\n \t{\n \t\tfinal int oldWidth = input.getWidth(), oldHeight = input.getHeight();\n \t\tif (oldWidth == newWidth && oldHeight == newHeight) return input;\n \n \t\tfinal BufferedImage output =\n \t\t\tnew BufferedI...
[ "0.660032", "0.64333963", "0.63689095", "0.6328201", "0.6230724", "0.6230108", "0.6205487", "0.6181715", "0.6132876", "0.6120951", "0.6076393", "0.5987282", "0.5985211", "0.59651124", "0.59590185", "0.59195316", "0.5802628", "0.5757312", "0.5754702", "0.57303995", "0.5700276"...
0.0
-1
This happens when the 'done' button is pressed on a GuiConfig screen
@SubscribeEvent(priority=EventPriority.NORMAL, receiveCanceled=true) public void onConfigChange(OnConfigChangedEvent event) { if(event.getModID().equals(Reference.MOD_ID)) { Config.config.save(); Config.configSync(); //Only run the following code if a world is running and if running on a client; this should make it so the sync only runs when accessing the "mod options..." button from the pause menu if(event.isWorldRunning() && LizzyAnvil.proxy.isClient()) { Config.sendConfigSyncRequest(); //send an empty packet to the server that initiates the config sync (only initiates if it is a dedicated server) } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void done() {\n Toolkit.getDefaultToolkit().beep();\n //close_plan_btn.setEnabled(true);\n setCursor(null); //turn off the wait cursor\n JOptionPane.showMessageDialog(null, \"Plan released !\\n\");\n\n }", "@Override\n\t\tpublic void do...
[ "0.6676375", "0.66543686", "0.6614858", "0.65229744", "0.644175", "0.6435673", "0.63028514", "0.62150407", "0.62103325", "0.6190413", "0.6147778", "0.6120455", "0.6109483", "0.60875416", "0.6074183", "0.60672015", "0.6066161", "0.6045936", "0.603133", "0.6027839", "0.6015295"...
0.0
-1
put you absolute path to the images here
public static void main(String[] args){ String alexisPath = "/Users/alexis/ImageORC/ImageORC/images"; String raphaelPath = "/Users/raphael/Documents/DUT-Info/S4/S4_Image/projet/ImageORC/images"; String pathDefault = alexisPath; if (args.length > 0 && args[0].equals("1")){ pathDefault = raphaelPath; } OCREngine ocrEngine = new OCREngine(pathDefault); try { ocrEngine.makeDecisionOnImageList(); ocrEngine.logOCR("out/test.txt"); } catch (IOException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void loadImages(){\n try{\n System.out.println(System.getProperty(\"user.dir\"));\n\n t1img = read(new File(\"resources/tank1.png\"));\n t2img = read(new File(\"resources/tank1.png\"));\n backgroundImg = read(new File(\"resources/background.jpg\"));\n ...
[ "0.71248585", "0.7065809", "0.70423114", "0.7022848", "0.69598156", "0.694049", "0.68446267", "0.68446267", "0.6817561", "0.6811488", "0.677919", "0.67529994", "0.6726051", "0.67025876", "0.6682762", "0.6665233", "0.66187495", "0.66056144", "0.66048914", "0.6536876", "0.65237...
0.0
-1
System.out.println(new BrokenCalculator().brokenCalc(2, 3)); System.out.println(new BrokenCalculator().brokenCalc(5, 8));
public static void main(String[] args) { System.out.println(new BrokenCalculator().brokenCalc(3, 10)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main( String[] args )\n {\n Calculator calculator = new Calculator(2.2f);\n// Calculator calculator2 = new Calculator(3f);\n// calculator.name = \"calc\";\n// //System.out.println(Calculator.name);\n// calculator.add(5f);\n// System.out.println(calcul...
[ "0.63736045", "0.6338807", "0.63325053", "0.61870384", "0.6176631", "0.6168635", "0.6137161", "0.61254895", "0.60312974", "0.59837663", "0.59646606", "0.59487605", "0.59364295", "0.59344447", "0.5930448", "0.59200543", "0.5919766", "0.5910121", "0.59065783", "0.5881346", "0.5...
0.73061854
0
Use Smali to grab header information from the oat file because vdexExtractor does not give us much information
@Override protected boolean parseOatFile(String location, Path oatFilePath, Path workingDir, Path archiveDir, String arch, Path bootDirForArch) { List<String> deps = Collections.emptyList(); int oatLevel = -1; int apiLevel = -1; String firstEntry = null; try { MultiDexContainer<? extends DexBackedDexFile> container = DexFileFactory.loadDexContainer(oatFilePath.toFile(), Opcodes.forApi(defaultApi)); if(container instanceof OatFile) { List<String> temp = ((OatFile)container).getBootClassPath(); oatLevel = ((OatFile)container).getOatVersion(); if(!temp.isEmpty()) { deps = new ArrayList<>(); for(String s : temp) { String ext = com.google.common.io.Files.getFileExtension(s); String name = com.google.common.io.Files.getNameWithoutExtension(s); if(ext.equals("art")){ deps.add(name + ".oat"); } else { deps.add(name + "." + ext); } } } } firstEntry = container.getDexEntryNames().get(0); apiLevel = VersionMap.mapArtVersionToApi(oatLevel); } catch(Throwable t) { logger.fatal("{}: Failed to parse the oat/odex file header for '{}'.",t,cname,oatFilePath); return false; } //Setup commands to extract dex from vdex Path vdexFilePath = FileHelpers.getPath(oatFilePath.getParent(), com.google.common.io.Files.getNameWithoutExtension(oatFilePath.getFileName().toString()) + ".vdex"); List<String> commands = new ArrayList<>(); if(osid == 1) { //windows // Test to make sure we can execute wsl try { ProcessBuilder pb = new ProcessBuilder("wsl", "true"); Process p = pb.start(); int r = p.waitFor(); if(r != 0) { logger.fatal("{}: Did not successfully execute the command 'wsl true'. Does wsl not exist?",cname); return false; } } catch(Throwable t) { logger.fatal("{}: Failed to execute the command 'wsl true'.",t,cname); return false; } // wsl run.sh -i "path.vdex" -o "path" commands.add("wsl"); commands.add(getWSLPath(pathToScript)); commands.add("-i"); commands.add("\"" + getWSLPath(vdexFilePath) + "\""); commands.add("-o"); commands.add("\"" + getWSLPath(pathToWorkingExeDir) + "\""); } else { // run.sh -i "path.vdex" -o "path" commands.add(pathToScript.toString()); commands.add("-i"); commands.add(vdexFilePath.toString()); commands.add("-o"); commands.add(pathToWorkingExeDir.toString()); } //Extract dex from vdex try { ProcessBuilder pb = new ProcessBuilder(commands.toArray(new String[0])); pb.directory(pathToWorkingExeDir.toFile()); Process p = pb.start(); BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream())); String line; while((line = br.readLine()) != null) { line = line.trim(); } int r = p.waitFor(); if(r != 0) { logger.fatal("{}: VdexExtractor did not terminate normally when extracting the dex files from vdex file '{}' of " + "location '{}'.",cname,vdexFilePath,location); return false; } } catch(Throwable t) { logger.fatal("{}: Unexpected error. Failed to parse the vdex file '{}' of location '{}'." ,t,cname,vdexFilePath,location); return false; } //Locate the extracted files Set<Path> extractedDexFiles = null; Path vdexExtractorOutputDir = FileHelpers.getPath(pathToWorkingExeDir, "vdexExtractor_deodexed"); try { extractedDexFiles = FileHelpers.find(vdexExtractorOutputDir, "*.dex", null, "f", null, null); } catch(Throwable t) { logger.fatal("{}: Unexpected error. Failed to locate the extracted dex files of '{}' at '{}'." ,t,cname,vdexFilePath,vdexExtractorOutputDir); return false; } try { String[] parts = parseOatEntryString(firstEntry,oatLevel); String archiveName = parts[0]; String archiveExtension = parts[1]; String key = makeArchiveEntriesKey(location,archiveName,archiveExtension); VdexExtractorArchiveEntry archiveEntry = archiveEntries.get(key); if(archiveEntry == null) { archiveEntry = new VdexExtractorArchiveEntry(archiveName,archiveExtension,location, FileHelpers.getPath(workingDir, archiveName),archiveDir); archiveEntries.put(key, archiveEntry); try { FileHelpers.processDirectory(archiveEntry.getWorkingDir(), true, false); } catch(Throwable t) { logger.fatal("{}: Failed to create the working directory '{}' for the archive entry of oat file " + "'{}' of location '{}'.",t,cname,archiveEntry.getWorkingDir(),oatFilePath,location); } } for(Path dexFilePath : extractedDexFiles) { String fileName = com.google.common.io.Files.getNameWithoutExtension(dexFilePath.getFileName().toString()); Matcher m = vdexExtractorOutputPattern.matcher(fileName); if(!m.matches()) { logger.fatal("{}: Unhandled extracted dex file path format for '{}' of '{}' at '{}'.",cname,fileName,vdexFilePath,location); return false; } String dexName = m.group(1).trim(); if(dexName.isEmpty()) dexName = null; else dexName = "classes" + dexName + ".dex"; String entry = makeOatEntryString(firstEntry, dexName, oatLevel); VdexExtractorDexEntry curEntry = archiveEntry.addDexFileData(bootClassPath, bootDirForArch, entry, dexName, apiLevel, oatLevel, oatFilePath, deps); try { Files.copy(dexFilePath, curEntry.getPathToDexFile()); } catch(Throwable t) { logger.fatal("{}: Failed to copy the extracted dex file at '{}' to the path '{}' for oat file '{}' of " + "location '{}'.",t,cname,dexFilePath,curEntry.getPathToDexFile(),oatFilePath,location); curEntry.setState(State.SETUPERR); return false; } curEntry.setState(State.SETUPSUCC); } if(FileHelpers.checkRWDirectoryExists(vdexExtractorOutputDir)){ try{ FileHelpers.removeDirectory(vdexExtractorOutputDir); }catch(Throwable t){ logger.fatal("{}: Failed to completly remove directory containing the extracted dex files at '{}'.", t,cname,vdexExtractorOutputDir); return false; } } } catch(Throwable t) { logger.fatal("{}: Unexpected error. Failed to process the dex files extracted from '{}' of location '{}'." ,t,cname,vdexFilePath,location); return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void writeHeader() throws IOException, FileNotFoundException {\n\n EndianCorrectOutputStream ecs;\n ByteArrayOutputStream baos;\n FileOutputStream fos;\n short s, ss[];\n byte b, bb[], ext_blob[];\n int hsize;\n int i, n;\n int extlist[][];\n\n\n ...
[ "0.6040915", "0.5999796", "0.5946014", "0.5831083", "0.58258635", "0.57806265", "0.56771815", "0.56708467", "0.5643628", "0.56400865", "0.56354517", "0.559236", "0.55386496", "0.5482117", "0.54736674", "0.54627967", "0.5448769", "0.54218113", "0.54174036", "0.54072", "0.53785...
0.5172883
40
making actions before any action called in any controllers
@Before public static void beforeCRUDActions() throws Throwable { SmartController.beforeActions(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void doActionBefore(DefaultInstanceActionCmd actionModel) {\n }", "@Override\n\tpublic void beforeAction(String method, HttpServletRequest request, HttpServletResponse response) {\n\t\t// Default behavior : nothing to do \n\t}", "protected void doPreEntryActions(RequestControlContext context) throws...
[ "0.67471445", "0.67312634", "0.6649401", "0.6595362", "0.6563684", "0.6554207", "0.6545339", "0.65308744", "0.6400683", "0.6354094", "0.6267673", "0.62483346", "0.62483346", "0.61943734", "0.6189852", "0.6172478", "0.6141384", "0.6121393", "0.61010826", "0.60923713", "0.60854...
0.68801236
0
Simply selects the home view to render by returning its name.
@Secured("ROLE_USER") @RequestMapping(value = "/", method = RequestMethod.GET) public String home(Locale locale, Model model, @RequestParam(value = "user", defaultValue = "", required = true) String user) { HomeService homeService = new HomeService(); logger.info("Welcome home! The client locale is {}.", locale); UserVO userVO = new UserVO(); userVO.setUser_name(user); System.out.println("어드민은 노작동??"); homeService.getUser(userVO); System.out.println(userVO); Date date = new Date(); DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale); String formattedDate = dateFormat.format(date); model.addAttribute("serverTime", formattedDate); return "home"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GetMapping(Mappings.HOME)\n\tpublic String showHome() {\n\n\t\treturn ViewNames.HOME;\n\t}", "public String home() {\n if (getUsuario() == null) {\n return \"login.xhtml\";\n }\n // Si el usuario es un ADMINISTRADOR, le lleva a la pagina a la lista de Alumnos\n if (getUsua...
[ "0.6819594", "0.6264309", "0.62159723", "0.6201521", "0.6198399", "0.6187909", "0.6151758", "0.61228037", "0.6120205", "0.610317", "0.60107136", "0.6008739", "0.59784985", "0.5976386", "0.5941382", "0.59348583", "0.59226644", "0.5905844", "0.5904103", "0.5879214", "0.5858803"...
0.0
-1
TODO Autogenerated method stub
@Override protected int getLayoutId() { return R.layout.activity_music; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override protected void initView() { iv_content = (ImageView) findViewById(R.id.music_content); iv_music = (ImageView) findViewById(R.id.music_me_iv); iv_queen = (ImageView) findViewById(R.id.music_queen_iv); tv_music = (TextView) findViewById(R.id.music_me_tv); tv_queen = (TextView) findViewById(R.id.music_queen_tv); iv_music.setOnClickListener(this); iv_queen.setOnClickListener(this); bitmap=DisplayUtil.readBitMap(getApplicationContext(), R.drawable.music_part1); iv_content.setImageBitmap(bitmap); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override protected void initParams() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override protected void showFisrtDialog() { boolean isFirst=LocalApplication.getInstance().sharereferences.getBoolean("music", false); if(isFirst){ showAlertDialog(showString(R.string.app_Music), showString(R.string.music_dialog), new String[] {showString(R.string.no_dialog), showString(R.string.yes_dialog)}, true, true, null);} LocalApplication.getInstance().sharereferences.edit().putBoolean("music", false).commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(View v) { switch (v.getId()) { case R.id.music_me_iv: iv_content.setImageBitmap(bitmap); iv_music.setImageResource(R.drawable.music_pressed); iv_queen.setImageResource(R.drawable.queen); tv_music.setTextColor(getResources().getColor( R.color.selected_music_text)); tv_queen.setTextColor(getResources().getColor( R.color.unselected_calendar_text)); break; case R.id.music_queen_iv: iv_content.setImageBitmap(DisplayUtil.readBitMap(getApplicationContext(), R.drawable.music_part2)); iv_music.setImageResource(R.drawable.music_unpressed); iv_queen.setImageResource(R.drawable.queen_unpressed); tv_music.setTextColor(getResources().getColor( R.color.unselected_calendar_text)); tv_queen.setTextColor(getResources().getColor( R.color.selected_music_text)); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override protected void addToControl(Composite control) { }
{ "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
Create a new empty list
public InsertNode() { head = new DoublyLinkedList(Integer.MIN_VALUE, null, null); tail = new DoublyLinkedList(Integer.MIN_VALUE, null, null); head.setNext(tail); length = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static <T> List<T> createList() {\n\t\treturn Collections.emptyList();\n\t}", "@SuppressWarnings(\"unchecked\")\r\n public void createList() {\r\n items = new int[MAX_LIST];\r\n NumItems = 0;\r\n }", "abstract protected Object newList( int capacity );", "public void makeEmpty() {\r...
[ "0.781724", "0.7377329", "0.7079245", "0.7001087", "0.6987521", "0.69816965", "0.6968267", "0.69659066", "0.6955798", "0.69459873", "0.69338584", "0.68774647", "0.6852056", "0.68337125", "0.6826514", "0.68082464", "0.67918867", "0.6771026", "0.6721837", "0.6717258", "0.671113...
0.0
-1
Get value at current position
public int get(int position) { return Integer.MIN_VALUE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int get(int pos) {\n if (pos != 0) {\n return this.nextNode.get(pos - 1);\n } else {\n return this.value;\n }\n }", "public T get(int pos);", "public Object getValue(int index);", "abstract public Object getValue(int index);", "p...
[ "0.7508066", "0.7188398", "0.71091115", "0.71004635", "0.71002316", "0.70071095", "0.6988833", "0.6986016", "0.69640785", "0.69639283", "0.6953581", "0.6953581", "0.69042003", "0.69042003", "0.69042003", "0.69042003", "0.69042003", "0.6902151", "0.6862313", "0.68163997", "0.6...
0.6917049
12
Find the position of the node value that is equal to the specified value.
public int getPosition(int data) { DoublyLinkedList temp = head; int pos = 0; while (temp != null) { if (temp.getData() != data) { pos += 1; temp = temp.getNext(); } else { // as the specific node is found, return it. return pos; } } return Integer.MIN_VALUE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic int find(int pValueToFind) {\n\t\tfor (int n = 0; n < pointer; ++n) {\n\t\t\tif (values[n] == pValueToFind) {\n\t\t\t\t// this returns the index position\n\t\t\t\treturn n;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public int searchByValue(T value) {\n Node<T> currNode = head;\n i...
[ "0.73732275", "0.7033524", "0.7015125", "0.6737099", "0.663256", "0.65719527", "0.65700436", "0.65689844", "0.6510296", "0.6479885", "0.64393014", "0.6427701", "0.637646", "0.6337829", "0.6332241", "0.63290906", "0.6319604", "0.6265717", "0.6249059", "0.62086517", "0.6185783"...
0.5674486
53