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
Description:checkAvaliableElevators: 1Check the continuous Status of the 7 Elevators at any given time. 2In Case of no longer available Elevators, it starts to release the first 4 Occupied Elevators that were occupied "assuming that those elevators are already done with there requests". In order to be available again to process pending request.
public void checkAvaliableElevators() { System.out.println("--------- Checking Elevators Current Status ------"); if(availableElevadors.isEmpty()) { for(int i=0; i <numberOfElevators-3; i++) { availableElevadors.add(occupiedElevadors.remove(i)); } System.out.println("--------- Elevators are available again ------"); }else { for(int i=0;i<availableElevadors.size();i++) { System.out.println(" Elevator no " + availableElevadors.get(i).getElevatorNumber() +" ready for Requests"); } for(int i=0;i<occupiedElevadors.size();i++) { System.out.println(" Elevator no " + occupiedElevadors.get(i).getElevatorNumber() +" is Occupied"); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean approveCheckIn(SoftwareEngineer e){\n int i;\n\n for(i=0;i<this.curHeadCount;i++){\n if(employee[i].equals(e)) break;\n }\n\n return (i<this.curHeadCount && e.access);\n }", "public boolean checkState(){\r\n\t\t//Check if we have enough users\r\n\t\tfor (M...
[ "0.5633304", "0.53966963", "0.5389702", "0.52565897", "0.5230452", "0.52069956", "0.52059376", "0.51767373", "0.5159364", "0.5142088", "0.51390755", "0.51212424", "0.5111517", "0.50912124", "0.5067287", "0.5067098", "0.50500476", "0.50403047", "0.50368243", "0.5009576", "0.49...
0.83194095
0
methode die login gegevens controleerd
@RequestMapping("login") public boolean Authenticate(String userName, String password, HttpServletResponse res, @CookieValue(value = "userInfo", defaultValue = "") String userCookie){ if(userCookie != null && !userCookie.equals("")){ String user = userCookie.split("~~~")[0]; String pass = userCookie.split("~~~")[1]; String valid = userCookie.split("~~~")[2]; if(Boolean.valueOf(valid) && userService.authenticate(user, pass).isAuthenticated()) return true; } LoginViewModel viewModel = userService.authenticate(userName, password); if(viewModel.isAuthenticated()){ String[] userInfo = new String[4]; userInfo[0] = userName; userInfo[1] = password; userInfo[2] = String.valueOf(viewModel.getUserId()); String userString = Joiner.on("~~~").skipNulls().join(userInfo); Cookie cookie = new Cookie("userInfo", userString); res.addCookie(cookie); return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void login() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void login() {\n\t\t\r\n\t}", "public void doLogin() {\r\n\t\tif(this.getUserName()!=null && this.getPassword()!=null) {\r\n\t\t\tcdb=new Connectiondb();\r\n\t\t\tcon=cdb.createConnection();\r\n\t\t\ttry {\r\n\t\t\t\tps=con.prepareStatement(\"Selec...
[ "0.86177295", "0.827353", "0.8146118", "0.8045614", "0.7980478", "0.7922404", "0.78717715", "0.78710747", "0.781634", "0.7809311", "0.7772531", "0.77456677", "0.77395904", "0.76973975", "0.7660055", "0.7656373", "0.7649465", "0.7567026", "0.75453377", "0.7525291", "0.75202584...
0.0
-1
methode die een nieuw account aanmaakt
@RequestMapping("/signup") public void signUp(String firstName, String lastName, String address, String emailAddress, String userName, String password, int age, int telephoneNumber){ User.UserBuilder userBuilder = new User.UserBuilder(firstName, lastName, address, age, userName, password,emailAddress); if(telephoneNumber > 0) userBuilder.telephoneNumber(telephoneNumber); User user = userBuilder.build(); userService.addUser(user); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void NroAccount() {\n\t\t\r\n\t}", "public void createAccount(){\n System.out.println(\"vi skal starte \");\n }", "Account() { }", "java.lang.String getAccount();", "public account() {\n initComponents();\n autoID();\n branch();\n }", "public accoun...
[ "0.7426998", "0.7037424", "0.68549", "0.68441933", "0.68182176", "0.67002165", "0.6678949", "0.6645526", "0.6623648", "0.6590021", "0.6582917", "0.65593266", "0.65301937", "0.64821154", "0.6444299", "0.6439302", "0.64151675", "0.64075375", "0.64075375", "0.64075375", "0.63988...
0.0
-1
methode om alle gebruikers mee op te halen
@RequestMapping("/getusers") public UserViewModel userViewModel (){ return userService.getAllUsers(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public KlantenOverzicht(Gebruiker gebruiker) {\n this.gebruiker = gebruiker;\n \n initComponents();\n \n if (gebruiker.getAccounttype().equals(\"systeembeheerder\") || gebruiker.getAccounttype().equals(\"filiaalmanager\")) {\n btn_verwijderklant.setVisible(true);\n ...
[ "0.63353103", "0.6188612", "0.6173947", "0.6148966", "0.611368", "0.60796607", "0.60571545", "0.59564", "0.5924154", "0.5922402", "0.59123737", "0.58699715", "0.5868117", "0.58609813", "0.5852022", "0.583632", "0.5830562", "0.5819052", "0.58032143", "0.57885504", "0.5787027",...
0.0
-1
Haalt aan de hand van de cookie gebruikers informatie op
@RequestMapping("/getUserInfo") public UserInfo getUserInfo(@CookieValue(value = "userInfo", defaultValue = "") String userCookie){ User userObj = null; if(userCookie != null && !userCookie.equals("")){ String user = userCookie.split("~~~")[0]; String pass = userCookie.split("~~~")[1]; String valid = userCookie.split("~~~")[2]; if(Boolean.valueOf(valid)){ userObj = userService.getUser(user, pass); } } return userObj != null ? new UserInfo(userObj.getUserName(), userObj.getFirstName(), userObj.getLastName(), userObj.getEmailAddress(), userObj.getAddress(), userObj.getTelephoneNumber()) : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void part2(){\n Cookie c1 = new Cookie(\"uid\", \"2018\", 1800,false);\n Cookie c2 = new Cookie(\"PICK_KEY\", \"ahmd13ldsws8cw\",10800,true);\n Cookie c3 = new Cookie(\"REMEMBER_ME\",\"true\",10800,true);\n }", "@RunPrivileged\n\tprivate void addRoutedokterCookie() {\n\n\t\tStringB...
[ "0.709718", "0.67515427", "0.67502975", "0.65962976", "0.64549136", "0.63854885", "0.6308206", "0.62336195", "0.61205506", "0.6082017", "0.60558295", "0.60470897", "0.60442895", "0.59941226", "0.5979821", "0.5895847", "0.58281904", "0.58255386", "0.5810588", "0.57807225", "0....
0.0
-1
logt de gebruiker uit
@RequestMapping("logout") public void logout(HttpServletResponse res){ Cookie cookie = new Cookie("userInfo", null); res.addCookie(cookie); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void loggedInUser() {\n\t\t\n\t}", "private void logUser() {\n }", "public void logincredentials() {\n\t\tutil.entertext(prop.getValue(\"locators.text.uname\"), \"admin\");\n\t\tutil.entertext(prop.getValue(\"locators.text.password\"), \"Admin123\");\n\t\tutil.ClickElement(prop.getValue(\"locators.b...
[ "0.68832636", "0.6873998", "0.6640865", "0.6603625", "0.657888", "0.6518413", "0.6511579", "0.64607716", "0.6420121", "0.64048785", "0.63953453", "0.6314512", "0.631001", "0.62632453", "0.623922", "0.62270284", "0.62134844", "0.62071085", "0.6206361", "0.6204974", "0.619284",...
0.0
-1
1 min external unlocker command for freeing locked ressources
public String getUnlocker();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void unlock() {\n }", "@Override\n\tpublic void unlock() {\n\t\t\n\t}", "public abstract void unlock();", "void unlock(String resourceName) throws InterruptedException;", "ManagementLockObject refresh();", "void disposeLocked() {\n ArrayList<UpdateRecord> records = mRe...
[ "0.6633036", "0.66064584", "0.6565891", "0.6379682", "0.6343613", "0.6316617", "0.6285009", "0.6260649", "0.62335813", "0.6140144", "0.6129969", "0.6058838", "0.5995043", "0.5975824", "0.5933001", "0.59227955", "0.59157854", "0.5912077", "0.5880467", "0.58620864", "0.58433396...
0.0
-1
TODO Autogenerated method stub
@Override public void run() { int i = 100; try { Thread.sleep(2500); } catch (InterruptedException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } do { try { Thread.sleep(50); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } double rad1 = Math.toRadians((Math.random() * 360)); double rad2 = Math.toRadians((Math.random() * 360)); float z = (float) Math.sin(rad1); float l = (float) Math.cos(rad1); float x = (float) (l * Math.sin(rad2)); float y = (float) (l * Math.cos(rad2)); addDot3D(new Dot3D(x, y, z, new Color3f(0, 0, 1))); VecBranchGroup.addChild(new Arrow3D(new Vector3f(x, y, z), new Color3f(0, 1, 0))); } while((-- i) != 0); try { Thread.sleep(2500); } catch (InterruptedException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } // DotBranchGroup.removeAllChildren(); VecBranchGroup.removeAllChildren(); }
{ "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
This method will return the endpoint URL after fetching it from WSRR
private String getEndPointUrl() { // TODO - Get the URL from WSRR return "http://localhost:8093/mockCustomerBinding"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public URL getEndPoint();", "public String endpointUrl() {\n return this.endpointUrl;\n }", "String endpoint();", "String getServiceUrl();", "private String getURL() {\n\t\t// TODO : Generate URL\n\t\treturn null;\n\t}", "UMOEndpointURI getEndpointURI();", "public String endpointUri() {\n ...
[ "0.7309014", "0.72331244", "0.7229006", "0.7190935", "0.70162755", "0.693511", "0.6834964", "0.6832515", "0.679204", "0.6783729", "0.6744902", "0.67385453", "0.66944337", "0.66694355", "0.6666339", "0.6666339", "0.6657569", "0.6594235", "0.6581355", "0.65766966", "0.65765923"...
0.7611679
0
Returns the singleton instance of BillSearchDelegateImpl
public static CorePaymentDelegateImpl getInstance() { if(instance == null) { instance = new CorePaymentDelegateImpl(); } return instance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static synchronized ClubSearch getInstance()\r\n {\r\n if (clubSearch == null)\r\n {\r\n clubSearch = new ClubSearch();\r\n }\r\n \r\n return clubSearch;\r\n }", "public static Delegateur getInstance() {\r\n\t\tif (delegateur == null && dbFacade != null) {\r\n\t...
[ "0.5810887", "0.5757887", "0.5700189", "0.5687376", "0.56769073", "0.5658276", "0.5615815", "0.55941147", "0.5591945", "0.55691785", "0.5549648", "0.5526688", "0.55089825", "0.54954934", "0.5485321", "0.54597896", "0.5436434", "0.5316869", "0.53132606", "0.5309469", "0.522729...
0.5401038
17
Client client = Client.create();
public Notificacion getNotificacion(long id) { logger.info("Get Notificacion"); WebResource webResource = client.resource(this.config .getProperty("API_URL") + this.config.getProperty("API_RESOURCE_NOTIFICACION") + id); ClientResponse response = webResource .accept(MediaType.APPLICATION_JSON) .header("ApiKey", this.apiKey).get(ClientResponse.class); handleResponse(response); Notificacion result = response.getEntity(Notificacion.class); response.close(); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Client getClient();", "public Client() {}", "@Override\n\tpublic void createClient() {\n\t\t\n\t}", "public Client() {\n }", "public Client(Client client) {\n\n }", "Client createNewClient(Client client);", "public abstract Client getClient();", "private void createClient() {\n tc = new ...
[ "0.83559984", "0.7879675", "0.7841374", "0.78174406", "0.78080225", "0.7765603", "0.76557565", "0.7512488", "0.7482287", "0.73661226", "0.7045341", "0.7035817", "0.70002276", "0.699449", "0.6977496", "0.69531953", "0.6935118", "0.69274014", "0.68670595", "0.68118525", "0.6805...
0.0
-1
Client client = Client.create();
public void createNotificacion(Notificacion notificacion) { logger.info("Create Notificacion"); WebResource webResource = client.resource(this.config .getProperty("API_URL") + this.config.getProperty("API_RESOURCE_NOTIFICACION")); ClientResponse response = webResource.type(MediaType.APPLICATION_JSON) .header("ApiKey", this.apiKey) .post(ClientResponse.class, notificacion); handleResponse(response); response.close(); // System.out.println("Notificacion created successfully ! {" + // notificacion + "}"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Client getClient();", "public Client() {}", "@Override\n\tpublic void createClient() {\n\t\t\n\t}", "public Client() {\n }", "public Client(Client client) {\n\n }", "Client createNewClient(Client client);", "public abstract Client getClient();", "private void createClient() {\n tc = new ...
[ "0.83559984", "0.7879675", "0.7841374", "0.78174406", "0.78080225", "0.7765603", "0.76557565", "0.7512488", "0.7482287", "0.73661226", "0.7045341", "0.7035817", "0.70002276", "0.699449", "0.6977496", "0.69531953", "0.6935118", "0.69274014", "0.68670595", "0.68118525", "0.6805...
0.0
-1
prints message to the console
public void printToUser(String message){ System.out.println(message); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void print(String message)\n {\n System.out.println(message);\n }", "public void printMessage() {\n printMessage(System.out::print);\n }", "private void print(String message) {\n\n //System.out.println(LocalDateTime.now() + \" \" + message);\n System.out.println(messag...
[ "0.8088496", "0.7874422", "0.78324723", "0.781112", "0.7793241", "0.7793241", "0.7766967", "0.775717", "0.77344507", "0.76158994", "0.75643283", "0.7546776", "0.75312495", "0.752611", "0.75226086", "0.7492868", "0.74650496", "0.74628496", "0.7432104", "0.7386992", "0.7382589"...
0.71332407
39
Creates a JCRRMI client factory with the default adapter factory.
public ClientRepositoryFactory() { this(new ClientAdapterFactory()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Factory() {\n this(getInternalClient());\n }", "public ClientRepositoryFactory(LocalAdapterFactory factory) {\n this.factory = factory;\n }", "protected Registry createRegistry() {\n return new JndiRegistry();\n }", "public static @NonNull ChannelFactory<? extends...
[ "0.56571", "0.5638997", "0.5529176", "0.5525826", "0.5476947", "0.54073423", "0.5316487", "0.52905226", "0.5288608", "0.5250371", "0.5194692", "0.5177233", "0.5151868", "0.5127823", "0.5103035", "0.50922793", "0.5057684", "0.50508404", "0.50392944", "0.5038695", "0.50187963",...
0.6615326
0
Creates a JCRRMI client factory with the given adapter factory.
public ClientRepositoryFactory(LocalAdapterFactory factory) { this.factory = factory; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ClientRepositoryFactory() {\n this(new ClientAdapterFactory());\n }", "public static @NonNull ChannelFactory<? extends Channel> clientChannelFactory() {\n return CURR_NETTY_TRANSPORT.clientChannelFactory();\n }", "public ClientWorkspace(\n Session session, RemoteWorkspace remote...
[ "0.5875827", "0.5141415", "0.50861573", "0.5039126", "0.49617958", "0.4932057", "0.4892069", "0.48680255", "0.4804681", "0.47836846", "0.4770184", "0.47657558", "0.4712775", "0.47012043", "0.46928155", "0.46420804", "0.46416244", "0.4574165", "0.4570221", "0.45590004", "0.454...
0.60751605
0
JNDI factory method for creating JCRRMI clients. Creates a lazy client repository instance that uses the reference parameter "url" as the RMI URL where the remote repository is looked up when accessed.
public Object getObjectInstance( Object object, Name name, Context context, Hashtable environment) { if (object instanceof Reference) { Reference reference = (Reference) object; RefAddr url = reference.get(URL_PARAMETER); if (url != null && url.getContent() != null) { try { return getRepository(url.getContent().toString()); } catch (Exception e) { return null; } } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ClientRepositoryFactory() {\n this(new ClientAdapterFactory());\n }", "public ResourceManagerServiceClient(String url) throws ResourceManagerServiceClientCreationException {\r\n this(getURL(url));\r\n }", "@Override\r\n\tpublic void connect(URL url) throws RemoteException {\n\t\tcli...
[ "0.60059685", "0.54720145", "0.5440773", "0.5349037", "0.5345417", "0.5334946", "0.5277255", "0.5232642", "0.5206856", "0.51453936", "0.5089581", "0.5051023", "0.50397754", "0.5038987", "0.5038247", "0.50340474", "0.5025294", "0.50189894", "0.5014227", "0.5005084", "0.4988497...
0.0
-1
Verify that item keep selected even moved from source to target, or back. If selected Alaska from sources, and then added to target, it should remain selected in target list
@Test(groups = "smoke") public void testKeepSelected() { String textSource = pickList.advanced().getSourceList().getItem(0).getText(); pickList.add(0); ListItem item = pickList.advanced().getTargetList().getItem(0); assertTrue(item.getRootElement().getAttribute("class").contains("rf-pick-sel")); assertEquals(item.getText(), textSource); pickList.remove(0); item = pickList.advanced().getSourceList().getItem(ChoicePickerHelper.byIndex().last()); assertTrue(item.getRootElement().getAttribute("class").contains("rf-pick-sel")); assertEquals(item.getText(), textSource); assertEquals(Utils.getIndexOfElement(item.getRootElement()), pickList .advanced().getSourceList().size() - 1, "Index of removed item."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n @Test\r\n @ConditionalIgnore(condition = IgnoreTreeUncontained.class)\r\n public void testSelectedOnSetItemsWithoutUncontained() {\r\n TreeItem uncontained = createItem(\"uncontained\");\r\n // prepare state\r\n getSelectionModel().select(uncontained);\r\n assertE...
[ "0.66150767", "0.66124046", "0.628547", "0.6096401", "0.6042488", "0.59165114", "0.58253604", "0.57254344", "0.56743515", "0.56511664", "0.5634435", "0.56254685", "0.56085265", "0.5603975", "0.55852103", "0.5539399", "0.5497803", "0.54863566", "0.5486272", "0.54715896", "0.54...
0.6724073
0
firstly check ordering controls doesn't appear near pickList if not "orderable"
@Test @CoversAttributes("orderable") public void testOrderable() { pickListAttributes.set(PickListAttributes.orderable, Boolean.FALSE); assertNotPresent(pickList.advanced().getBottomButtonElement(), "Button should not be present"); assertNotPresent(pickList.advanced().getDownButtonElement(), "Button should not be present"); assertNotPresent(pickList.advanced().getTopButtonElement(), "Button should not be present"); assertNotPresent(pickList.advanced().getUpButtonElement(), "Button should not be present"); // then make sure that controls appear near pickList when allow ordering behavior pickListAttributes.set(PickListAttributes.orderable, Boolean.TRUE); assertVisible(pickList.advanced().getBottomButtonElement(), "Button should be visible"); assertVisible(pickList.advanced().getDownButtonElement(), "Button should be visible"); assertVisible(pickList.advanced().getTopButtonElement(), "Button should be visible"); assertVisible(pickList.advanced().getUpButtonElement(), "Button should be visible"); // then add some items to target list pickList.addMultiple(ChoicePickerHelper.byIndex().index(0).index(1).index(2)); // all items should remain selected and in this case ordering controls should be disabled assertEquals(pickList.advanced().getTargetList().getItems().size(), 3); for (ListItem item : pickList.advanced().getTargetList().getItems()) { assertTrue(item.getRootElement().getAttribute("class").contains("rf-pick-sel")); } // so check ordering controls if they are disabled assertButtonDisabled(pickList.advanced().getBottomButtonElement()); assertButtonDisabled(pickList.advanced().getDownButtonElement()); assertButtonDisabled(pickList.advanced().getTopButtonElement()); assertButtonDisabled(pickList.advanced().getUpButtonElement()); // now is time to select one item. This should cause ordering controls enable pickList.advanced().getTargetList().getItem(0).select(true); // since it was first item, "Down" and "Last" buttons should be enabled assertButtonEnabled(pickList.advanced().getBottomButtonElement()); assertButtonEnabled(pickList.advanced().getDownButtonElement()); assertButtonDisabled(pickList.advanced().getTopButtonElement()); assertButtonDisabled(pickList.advanced().getUpButtonElement()); // move first item to last OrderingList orderingTargetList = pickList.advanced().getOrderTargetList(); List<? extends ListItem> items = pickList.advanced().getTargetList().getItems(); List<String> targetStrings = Lists.newArrayList(items.get(0).getText(), items.get(1).getText(), items.get(2) .getText()); orderingTargetList.select(0).putItAfter(2); // verify that previously first item is now the last item (select 3rd item, and verify text) items = pickList.advanced().getTargetList().getItems(); List<String> targetStringsAfter = Lists.newArrayList(items.get(0).getText(), items.get(1).getText(), items.get(2).getText()); targetStrings.add(targetStrings.remove(0)); assertEquals(targetStringsAfter, targetStrings); // then move this item one step "up" orderingTargetList.select(2).putItBefore(1); // and then verify if all items are submitted in user defined order as well submitAjax(); items = pickList.advanced().getTargetList().getItems(); targetStrings = Lists.newArrayList(items.get(0).getText(), items.get(1).getText(), items.get(2).getText()); assertEquals(output.getText(), targetStrings.toString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static boolean checkOrderList() {\n if (size != MainGUI.orderList.size()) {\n size = MainGUI.orderList.size();\n return true;\n }\n\n return false;\n }", "public boolean isPickVisible() {\n\t\treturn false;\n\t}", "private static void setButtonsPlaced(){\r\...
[ "0.6618958", "0.5543544", "0.55425996", "0.54888856", "0.5487099", "0.5428645", "0.5382243", "0.5364356", "0.52790356", "0.5278267", "0.5274227", "0.5271061", "0.52630234", "0.5260457", "0.5256903", "0.5242376", "0.52036446", "0.52033526", "0.51946354", "0.51772094", "0.51615...
0.7329208
0
Verify submit by JSF submit button
@Test public void testSaveJSF() { String textSource = pickList.advanced().getSourceList().getItem(0).getText(); pickList.add(0); submitHTTP(); String textTarget = pickList.advanced().getTargetList().getItem(0).getText(); assertEquals(textTarget, textSource); assertEquals(output.getText(), "[" + textSource + "]"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void click_SubmitButton() {\n\t\tboolean bstatus;\n\n\t\tbstatus = clickElement(btn_Submit);\n\t\tReporter.log(bstatus, \"Submit Button is clicked\", \"Submit Button not clicked\");\n\n\t\t\n\t}", "public void clickOnSubmit() {\r\n\r\n\t\treportStep(\"About to click on Submit button \", \"INFO\");\...
[ "0.64138365", "0.6336519", "0.61607003", "0.61421937", "0.61068827", "0.60224164", "0.5989054", "0.59148216", "0.5910453", "0.5906476", "0.58905524", "0.58711994", "0.5870774", "0.5865332", "0.5856619", "0.58448625", "0.58282423", "0.5782745", "0.57694745", "0.57439095", "0.5...
0.0
-1
workaround for webdriver issue the initial focus of keyboard is in browser's url bar instead on the actual clicked item clicking any button on the page should workaround this problem
@Override public void perform() { pickList.advanced().getSourceList().getItem(ChoicePickerHelper.byIndex().last()).select(); pickList.advanced().getAddButtonElement().click(); pickList.advanced().getRemoveButtonElement().click(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void requestFocus() {\n // Not supported for MenuComponents\n }", "@Ignore(\"b/72154153\")\n @Test\n public void testFocusedViewInNormalCase() {\n controller.menuHelper.showMenu();\n controller.menuHelper.assertNavigateToPlayControlsRow();\n assertButtonHasFocu...
[ "0.6581527", "0.63783634", "0.6349637", "0.6237054", "0.6236354", "0.6232287", "0.62277204", "0.6107649", "0.6052411", "0.6004849", "0.59991676", "0.5978497", "0.59782076", "0.59614265", "0.5958819", "0.5951936", "0.59506357", "0.5941871", "0.5938291", "0.5934354", "0.5929839...
0.0
-1
This method is used for testing the db using the testdb url
protected FirmRepository(String url){ super(TABLE_NAME,KEY,url); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 100)\n public void testAccessToDB() {\n System.out.println(\"Starting DB access test\");\n }", "private Database openTestDb(ReplicatedEnvironment master)\n throws DatabaseException {\n\n Environment env = master;\n DatabaseConfig config = new DatabaseConfig();\n ...
[ "0.67828006", "0.66797304", "0.6653053", "0.65248805", "0.6441396", "0.64276046", "0.6410741", "0.64020646", "0.6395334", "0.63443756", "0.6311818", "0.6280315", "0.622401", "0.6211445", "0.6197578", "0.6195634", "0.6186344", "0.61857915", "0.6163003", "0.6144025", "0.6124909...
0.0
-1
Constructor for a particle object that takes a coordinate value and a life value, the latter being used to determine how long the particle stays on the level for.
public Particle(int x, int y, int life) { this.x = x; this.y = y; this.xDouble = x; this.yDouble = y; this.zDouble = 0.0; this.life = life + (random.nextInt(life) - life / 2); this.sprite = particle_normal; // Sets the distance delta for the particle to travel to a // random (bell-curved) value in the range -1 to 1 this.xDelta = random.nextGaussian() / 2; this.yDelta = random.nextGaussian() / 2; this.zDelta = random.nextFloat() + 1.5; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Particle(Point2D.Double c)\n {\n center = c;\n }", "public Particle(double x, double y, int depth)\n\t{\n\t\tposition = new Vec3f(x,y,0);\n\t\tthis.depth=depth;\n\t}", "public Particle(double xstart, double ystart, double velx, double vely, Compound c) {\r\n\t\tpos = new Vector(xstart, ysta...
[ "0.6961296", "0.6871191", "0.6687004", "0.6620784", "0.64959985", "0.64487576", "0.6374881", "0.6248691", "0.62483567", "0.6187162", "0.60257095", "0.6005095", "0.59670657", "0.59386253", "0.5821682", "0.58189154", "0.5816145", "0.576961", "0.5768896", "0.5734599", "0.5733607...
0.7907893
0
/ compiled from: BusinessContext / renamed from: com.beastbikes.framework.business.b
public interface C1372b { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void doBusiness(Context mContext) {\n\t}", "public interface BusinessService extends BaseService<Business, String>{\n\n public Pager getBusinessLIst(Integer pageNumber , Integer pageSize , String searchBy , String searchText);\n\n BusinessVO getFromBusiness(String id);\n\n List<Custo...
[ "0.6260421", "0.618527", "0.6090181", "0.6078354", "0.6048982", "0.5844536", "0.573192", "0.5690518", "0.5689353", "0.5687512", "0.5651732", "0.5628393", "0.5627187", "0.55748403", "0.5520656", "0.55032086", "0.54811144", "0.5476865", "0.54655826", "0.54570043", "0.54558194",...
0.0
-1
((a + b) + (c + d)) > false (a + b) + ((c + d)) > true will form a Stack to push and pop the element
static boolean findDuplicate (String word) { Stack<Character> st = new Stack<>(); for (int i = 0; i < word.length(); i++) { char currentChar = word.charAt(i); if (currentChar == ')') { if (st.peek() == '(') { return true; } else { while (st.peek() != '(') { st.pop(); } st.pop(); } } else { st.push(currentChar); } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean keepEvaluating(Stack<Operator> pOperatorStack, Operator pOperator) {\n if (pOperatorStack.isEmpty()) {\n return false;\n } else {\n return pOperatorStack.peek().stackPrecedence() >= pOperator.precedence();\n }\n }", "public boolean isPushed(int x, int...
[ "0.60824645", "0.5868058", "0.5832321", "0.5816312", "0.5787575", "0.5779924", "0.57780963", "0.57612467", "0.57177013", "0.5693586", "0.5678405", "0.56711984", "0.56635195", "0.5629365", "0.5618725", "0.5586702", "0.5583178", "0.55528736", "0.554318", "0.55323064", "0.553166...
0.0
-1
metodo para iniciar la sesion
public void iniciaOperacion() throws HibernateException { //Creamos conexión BBDD e inicamos una sesion sesion = HibernateUtil.getSessionFactory().openSession(); //iniciamos transaccion tx = sesion.beginTransaction(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void salir() {\n LoginManager.getInstance().logOut();\n irInicio();\n }", "void markAsUserSession();", "private void login() {\n setCredentials();\n setSysProperties();\n\n Properties sysProperties = System.getProperties();\n sysProperties.put(\"mail.store.pr...
[ "0.68254215", "0.63250846", "0.631813", "0.6190182", "0.61388546", "0.61384714", "0.61048543", "0.60761863", "0.5894619", "0.581511", "0.5800748", "0.5779324", "0.5752959", "0.5752608", "0.5711177", "0.56961906", "0.5684952", "0.5675943", "0.56530195", "0.56292087", "0.561367...
0.0
-1
si hay un error se dehace la transaccion y nos muestra el error
private void manejaExcepcion(HibernateException he) throws HibernateException { tx.rollback(); throw new HibernateException("Ocurrió un error en la capa de acceso a datos", he); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void estiloError() {\r\n /**Bea y Jose**/\r\n\t}", "private void correctError()\r\n\t{\r\n\t\t\r\n\t}", "public void checkError() throws IOException{\n if (transactionFailure == null) {\n FacesContext.getCurrentInstance().getExternalContext().\n redirect(\"conver...
[ "0.7069572", "0.67022306", "0.656462", "0.65247804", "0.6482962", "0.6448423", "0.64457685", "0.6400671", "0.63814884", "0.63321847", "0.6255886", "0.6160138", "0.6149121", "0.6144023", "0.61001325", "0.60922736", "0.607464", "0.6032399", "0.6029299", "0.60278714", "0.6010004...
0.5933248
24
CRUD USER Inserta nuevo usuario devolviendo el id de la tabla
public long create_user(User user) { long id = 0; //id de la tabla user (único) try { iniciaOperacion(); id = (Long)sesion.save(user); //metodo para guardar cliente (del objeto hibernate.sesion) tx.commit(); }catch(HibernateException he) { manejaExcepcion(he); throw he; }finally { sesion.close(); } return id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void insertUser() {}", "private void insert() {//将数据录入数据库\n\t\tUser eb = new User();\n\t\tUserDao ed = new UserDao();\n\t\teb.setUsername(username.getText().toString().trim());\n\t\tString pass = new String(this.pass.getPassword());\n\t\teb.setPassword(pass);\n\t\teb.setName(name.getText().toString().trim...
[ "0.7797639", "0.74514127", "0.73965037", "0.71543676", "0.7055477", "0.7054998", "0.70042104", "0.69430184", "0.6896611", "0.6879862", "0.6831309", "0.6823221", "0.6814477", "0.6814209", "0.68076396", "0.67785543", "0.67683613", "0.6746031", "0.67455137", "0.67365754", "0.673...
0.701859
6
retorna toda la lista de usuarios
public List<User> user_list() throws HibernateException { List <User> Lista_usuarios = null; try { iniciaOperacion(); //IMPORTANTE la query: se pide la clase realmnete Cliente! no la tabla que se ha creado Lista_usuarios= sesion.createQuery("FROM User").list(); //creamos consulta de la tabla clientes (en plural)! }finally { sesion.close(); } return Lista_usuarios; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List getUsuarios();", "public ArrayList <Usuario>listaUsuario(){\r\n\t\treturn loja.getUsuarios();\r\n\t}", "@Override\r\n\tpublic List<Usuario> listarUsuario() {\n\t\treturn iUsuario.listarUsuarios();\r\n\t}", "public List<Usuario> getUsuarios(){\n\t\tList<Usuario> lista = new LinkedList<Usuario>();\...
[ "0.8154098", "0.81018853", "0.804383", "0.8018853", "0.7980805", "0.78420967", "0.783511", "0.7821345", "0.77653146", "0.7681803", "0.7680702", "0.7653614", "0.76531434", "0.76433074", "0.7628982", "0.76120585", "0.76072323", "0.7553162", "0.75367206", "0.7527213", "0.7524432...
0.74754286
24
METODOS CRUD NODOS Inserta nuevo usuario devolviendo el id de la tabla
public long create_node(Node node) { long id = 0; //id de la tabla user (único) try { iniciaOperacion(); id = (Long)sesion.save(node); //metodo para guardar cliente (del objeto hibernate.sesion) tx.commit(); }catch(HibernateException he) { manejaExcepcion(he); throw he; }finally { sesion.close(); } return id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void insertUser() {}", "@Override\r\n\tpublic Usuario insert(Usuario t) {\n\t\treturn null;\r\n\t}", "public RespuestaDTO registrarUsuario(Connection conexion, UsuarioDTO usuario) throws SQLException {\n PreparedStatement ps = null;\n ResultSet rs = null;\n int nRows = 0;\n S...
[ "0.7322424", "0.7177728", "0.7123678", "0.7027477", "0.6935835", "0.6886017", "0.68576", "0.6833388", "0.6822854", "0.6759635", "0.67413205", "0.67231506", "0.6722394", "0.67043036", "0.6688929", "0.6683813", "0.66490406", "0.66447383", "0.6626455", "0.66122633", "0.6609629",...
0.0
-1
buscar nombre del nodo por mac y puerto
public String read_node(NodeWS node) throws HibernateException { String i=null; try { iniciaOperacion(); //unique result me devuelve el objeto encontrado con dicho correo electronico i= (String) sesion.createQuery("SELECT u.node_name FROM Node u WHERE u.MAC_address ='"+node.getMAC_address()+"' and u.port_number ='"+node.getPort_number()+"'").uniqueResult(); //una vez encontrado el id del user puedo buscarlo //id_user= Integer.parseInt(i); //user = (User) sesion.get(User.class, id_user); } finally { sesion.close(); } return i; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getMacCliente(){\n\t\tInetAddress ip;\n\t\tbyte[] mac = null;\n\t\tStringBuilder sb = new StringBuilder();\n\t\ttry {\n\t\t\tip = InetAddress.getLocalHost();\n\t\t\tNetworkInterface network = NetworkInterface.getByInetAddress(ip);\n\n\t\t\tmac = network.getHardwareAddress();\n\t\t\tfor (int i ...
[ "0.6488037", "0.6021868", "0.59251565", "0.5878774", "0.58510137", "0.5840766", "0.5661373", "0.5637246", "0.56161773", "0.56051534", "0.56051534", "0.55345255", "0.5513924", "0.5475721", "0.54689366", "0.5414646", "0.5409808", "0.5395096", "0.5395096", "0.5387244", "0.536017...
0.0
-1
buscar nombre del nodo por mac y puerto y retorna el nodo
public Node read_node2(String MAC, String port_number) throws HibernateException { Node node = null; String i=null; long id_node=0; try { iniciaOperacion(); //unique result me devuelve el objeto encontrado con dicho correo electronico i= sesion.createQuery("SELECT u.id_node FROM Node u WHERE u.MAC_address ='"+MAC+"' and u.port_number ='"+port_number+"'").uniqueResult().toString(); //una vez encontrado el id del user puedo buscarlo id_node= Integer.parseInt(i); node = (Node) sesion.get(Node.class, id_node); } finally { sesion.close(); } return node; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getMacCliente(){\n\t\tInetAddress ip;\n\t\tbyte[] mac = null;\n\t\tStringBuilder sb = new StringBuilder();\n\t\ttry {\n\t\t\tip = InetAddress.getLocalHost();\n\t\t\tNetworkInterface network = NetworkInterface.getByInetAddress(ip);\n\n\t\t\tmac = network.getHardwareAddress();\n\t\t\tfor (int i ...
[ "0.62593085", "0.59898114", "0.5691315", "0.56800836", "0.56800836", "0.5670203", "0.5630559", "0.5601913", "0.55828464", "0.55362797", "0.55139875", "0.550064", "0.5494135", "0.54888445", "0.5483481", "0.5429548", "0.53662956", "0.53662956", "0.53628796", "0.5348631", "0.533...
0.5485677
14
retorna toda la lista de usuarios NO SE SI ES NECESARI
public List<Node> node_list() throws HibernateException { List <Node> Lista_nodos = null; try { iniciaOperacion(); //IMPORTANTE la query: se pide la clase realmnete Cliente! no la tabla que se ha creado Lista_nodos= sesion.createQuery("FROM Node").list(); //creamos consulta de la tabla clientes (en plural)! }finally { sesion.close(); } return Lista_nodos; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String ListUsers(){\r\n StringBuilder listUsers = new StringBuilder();\r\n for (Utente u: utenti) { // crea la lista degli utenti registrati al servizio\r\n listUsers.append(u.getUsername()).append(\" \");\r\n \tlistUsers.append(u.getStatus()).append(\"\...
[ "0.76205796", "0.7542041", "0.75042933", "0.7500536", "0.74601895", "0.7412262", "0.7366605", "0.7300392", "0.729904", "0.7276834", "0.7226326", "0.7213971", "0.7147264", "0.7147068", "0.71303296", "0.7122305", "0.71096766", "0.709791", "0.7083644", "0.70631206", "0.7063093",...
0.0
-1
CRUD WS Add a client of a company
public long wsadd_user( UserWS user) { long id = 0; //id de la tabla user (único) User userH = new User(user.getLogin(),user.getPassword(),user.getRole(),user.getName(),user.getPhone(),user.getDepartment()); //User cliente1 = new User("luis.ortega@gmail.com", "gutie33", 1, "Luis","677899876", "Informatica"); try { iniciaOperacion(); id= (Long) sesion.createQuery("SELECT u.id_company FROM Company u WHERE u.company_name ='"+user.getName_company()+"'").uniqueResult(); Company x = (Company) sesion.load(Company.class, id); x.addUsuario(userH); userH.setCompany(x); //sesion.update(compx); //metodo para guardar cliente (del objeto hibernate.sesion) tx.commit(); }catch(HibernateException he) { manejaExcepcion(he); throw he; }finally { //Busqueda del id con qu elo ha introducido a la BBDD id= (Long) sesion.createQuery("SELECT u.id_user FROM User u WHERE u.mail ='"+user.getLogin()+"'").uniqueResult(); sesion.close(); } return id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addClient() {\n String name = getToken(\"Enter client company: \");\n String address = getToken(\"Enter address: \");\n String phone = getToken(\"Enter phone: \");\n Client result;\n result = warehouse.addClient(name, address, phone);\n if (result == null) {\n ...
[ "0.7805826", "0.67704135", "0.6686482", "0.65993804", "0.6504968", "0.648783", "0.64206094", "0.6367019", "0.63349396", "0.6318214", "0.6241987", "0.6196201", "0.6184255", "0.61722654", "0.6143577", "0.6109391", "0.60938257", "0.6056761", "0.603104", "0.60230654", "0.5990887"...
0.0
-1
busqueda de si el usuario existe para creacion de user
public Boolean user_exists (UserWS user) { Query i = null; iniciaOperacion(); i = sesion.createQuery("SELECT u.id_user FROM User u WHERE u.mail = :login"); i.setString("login", user.getLogin()); return (i.uniqueResult() != null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean IsUserExist(){\n SignupUser user =roomDB.dao().GetUserData(et_user.getText().toString());\n if(user!=null){\n if(!user.getEmail().isEmpty()){\n Toast.makeText(this, \"User is already registered!\", Toast.LENGTH_SHORT).show();\n return true;\n ...
[ "0.75688773", "0.7558418", "0.75583833", "0.7532476", "0.747419", "0.7471396", "0.73636097", "0.73442763", "0.72989684", "0.72855496", "0.7276844", "0.72581434", "0.72308123", "0.7214162", "0.718095", "0.7179188", "0.71218646", "0.712029", "0.70759773", "0.7013258", "0.700787...
0.7194826
14
borrar usuario ws No devuelve nada
public void wsdelete_user(String mail) throws HibernateException { User user_del = null; String i=null; long id_user=0; try { iniciaOperacion(); i= sesion.createQuery("SELECT u.id_user FROM User u WHERE u.mail ='"+mail+"'").uniqueResult().toString(); //una vez encontrado el id del user puedo buscarlo id_user= Integer.parseInt(i); user_del = (User) sesion.get(User.class, id_user); sesion.delete(user_del); //le pasamos todo el objeto a eliminar tx.commit(); } catch (HibernateException he) { manejaExcepcion(he); throw he; } finally { sesion.close(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void crearUsuarioWS(String name, String login, String pass){\n //JAXBElement<ArrayOfAdministrationResource> arrayAdminRole = obtenerRolesPorNombre(ConstantesWS.ROL_NAME_CLIENTE).;\n \n ObjectFactory fact = new ObjectFactory(); \n //fact.createArrayOfAdministrat...
[ "0.6001916", "0.56322896", "0.5544485", "0.5519399", "0.54185283", "0.5410103", "0.5242732", "0.52405286", "0.52107847", "0.51973534", "0.5107172", "0.5055054", "0.5052992", "0.5039647", "0.50392115", "0.500471", "0.49830416", "0.4974372", "0.49318534", "0.49012455", "0.48803...
0.45587775
70
actualizar Usuario ws no devuelve nada
public void wsupdate_user(UserWS user) throws HibernateException { User user_update = null; try { iniciaOperacion(); user_update = (User) sesion.get(User.class,user.getId_user()); //actualizo los camps de la tabla user_update.setLogin(user.getLogin()); user_update.setMail(user.getLogin()); user_update.setName(user.getName()); user_update.setPassword(user.getPassword());; user_update.setPhone(user.getPhone()); user_update.setRole(user.getRole()); user_update.setDepartment(user.getDepartment()); sesion.update(user_update); //le pasamos todo el objeto a modificar tx.commit(); } catch (HibernateException he) { manejaExcepcion(he); throw he; } finally { sesion.close(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void crearUsuarioWS(String name, String login, String pass){\n //JAXBElement<ArrayOfAdministrationResource> arrayAdminRole = obtenerRolesPorNombre(ConstantesWS.ROL_NAME_CLIENTE).;\n \n ObjectFactory fact = new ObjectFactory(); \n //fact.createArrayOfAdministrat...
[ "0.67615485", "0.6348", "0.6183261", "0.6149792", "0.61032903", "0.6046915", "0.6021127", "0.5992458", "0.5988718", "0.58947444", "0.58705795", "0.5849584", "0.5849503", "0.57958376", "0.5792423", "0.57623446", "0.5747915", "0.57264197", "0.57259464", "0.5716518", "0.5684086"...
0.5548693
39
Add a Node of a company
public long wsadd_node(NodeWS node) { long id = 0; //id de la tabla user (único) Node nodeC = new Node(node.getNode_name(),node.getMAC_address(),node.getPort_number()); //User cliente1 = new User("luis.ortega@gmail.com", "gutie33", 1, "Luis","677899876", "Informatica"); try { iniciaOperacion(); id= (Long) sesion.createQuery("SELECT u.id_company FROM Company u WHERE u.company_name ='"+node.getName_company()+"'").uniqueResult(); Company x = (Company) sesion.load(Company.class, id); x.addNodo(nodeC); nodeC.setCompany(x); //sesion.update(compx); //metodo para guardar cliente (del objeto hibernate.sesion) tx.commit(); }catch(HibernateException he) { manejaExcepcion(he); throw he; }finally { //Busqueda del id con qu elo ha introducido a la BBDD id= (Long) sesion.createQuery("SELECT u.id_node FROM Node u WHERE u.node_name ='"+node.getNode_name()+"'").uniqueResult(); sesion.close(); } return id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\npublic void add(Company c) {\n\tchildren.add(c);\r\n}", "private void addNode(String name)\n {\n try (Session session = driver.session())\n {\n // Wrapping Cypher in an explicit transaction provides atomicity\n // and makes handling errors much easier.\n ...
[ "0.67916155", "0.63426673", "0.62341", "0.62279356", "0.61692953", "0.615485", "0.61215055", "0.6051279", "0.60496294", "0.60478705", "0.6018955", "0.5969274", "0.59340084", "0.5921066", "0.5920039", "0.58699", "0.58679616", "0.5835622", "0.5755971", "0.57413197", "0.57210886...
0.6002243
11
busqueda de si el nodo existe para creacion de nodo
public Boolean node_exists (NodeWS node) { Query i = null; iniciaOperacion(); i = sesion.createQuery("SELECT u.id_node FROM Node u WHERE u.node_name = :seu"); i.setString("seu", node.getNode_name()); return (i.uniqueResult() != null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean existsRec(Node<T> nodo, T key) {\r\n\t\tif (nodo.getData().equals(key)) {// Si existe el nodo en el arbol\r\n\t\t\treturn true;\r\n\t\t} else if (nodo.getChildren() != null) {// Si tiene hijos\r\n\t\t\tList<Node<T>> lista = nodo.getChildren();// Los hijos\r\n\t\t\tboolean comprobacion = false;\r\n\...
[ "0.6806645", "0.66048753", "0.63853806", "0.63734746", "0.6346782", "0.6324984", "0.6281748", "0.6281748", "0.61961365", "0.6175683", "0.6139455", "0.6137723", "0.6126985", "0.60984355", "0.60631907", "0.6038702", "0.6035225", "0.600464", "0.59981555", "0.5979954", "0.5977317...
0.5884807
32
borrar nodo ws No devuelve nada
public void wsdelete_node(String name) throws HibernateException { Node node_del = null; String i=null; long id_node=0; try { iniciaOperacion(); i= sesion.createQuery("SELECT u.id_node FROM Node u WHERE u.node_name ='"+name+"'").uniqueResult().toString(); //una vez encontrado el id del user puedo buscarlo id_node= Integer.parseInt(i); node_del = (Node) sesion.get(Node.class, id_node); sesion.delete(node_del); //le pasamos todo el objeto a eliminar tx.commit(); } catch (HibernateException he) { manejaExcepcion(he); throw he; } finally { sesion.close(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void borrar() {\n\t\tmiPintor.borrar();\n\t\tlienzo.refrescar();\n\t\t\n\t}", "private File exportAndZip(String siteId, String webappDir) throws Exception {\r\n\tlog.info(\"user [\" + sessionManager.getCurrentSession().getUserEid()\r\n\t\t+ \"] exports site: [\" + siteId + \"]\");\r\n\r\n\t// opening a ne...
[ "0.522185", "0.51703775", "0.51050913", "0.5104005", "0.50481", "0.5036168", "0.5026002", "0.5023595", "0.5021757", "0.49945953", "0.49843517", "0.49572703", "0.49141356", "0.48783052", "0.48661128", "0.48403776", "0.4837216", "0.48164025", "0.47978225", "0.4778406", "0.47769...
0.0
-1
actualizar Usuario ws no devuelve nada
public void wsupdate_node(NodeWS node) throws HibernateException { Node node_update = null; try { iniciaOperacion(); node_update = (Node) sesion.get(Node.class,node.getId_node()); //actualizo los camps de la tabla node_update.setMAC_address(node.getMAC_address()); node_update.setNode_name(node.getNode_name()); node_update.setPort_number(node.getPort_number()); sesion.update(node_update); //le pasamos todo el objeto a modificar tx.commit(); } catch (HibernateException he) { manejaExcepcion(he); throw he; } finally { sesion.close(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void crearUsuarioWS(String name, String login, String pass){\n //JAXBElement<ArrayOfAdministrationResource> arrayAdminRole = obtenerRolesPorNombre(ConstantesWS.ROL_NAME_CLIENTE).;\n \n ObjectFactory fact = new ObjectFactory(); \n //fact.createArrayOfAdministrat...
[ "0.67615485", "0.6348", "0.6183261", "0.6149792", "0.61032903", "0.6046915", "0.6021127", "0.5992458", "0.5988718", "0.58947444", "0.58705795", "0.5849584", "0.5849503", "0.57958376", "0.5792423", "0.57623446", "0.5747915", "0.57264197", "0.57259464", "0.5716518", "0.5684086"...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { Par1 obj1 = new Par1(); Son1 obj2 = new Son1(); Par1 obj3 = new Son1(); //업캐스팅 obj3.method1(); //하위클래스에서 재정의된 Method1()사용 //추상클래스 //par2 obj4 = new par2 ();//추상 클래스로는 객체 생성이 불가능 Son2 obj5 = new Son2(); // 추상매서드를 재정의한 자식클래스는 객체생성가능 Par2 obj6 = new Son2(); //업캐스팅 obj3.method1(); }
{ "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
Sets up the view
private void setUp() { this.setLayout(new BorderLayout()); setupMessagePanel(); setupHomeButtonPanel(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void initViewSetup() {\n }", "protected void viewSetup() {\n\t\t// TODO Auto-generated method stub\n\n\t}", "@Override\r\n\tprotected void initView() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initView() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initViews() {\n\t\t\r\...
[ "0.80654305", "0.7973215", "0.7815478", "0.7815478", "0.78072405", "0.78020483", "0.78020483", "0.774571", "0.76517314", "0.76502633", "0.76502633", "0.76471424", "0.76471424", "0.7642467", "0.7638813", "0.7623444", "0.7623444", "0.762187", "0.7611371", "0.7580762", "0.755685...
0.0
-1
Set up the home button
private void setupHomeButtonPanel() { JPanel homeButtonPanel = new JPanel(); this.home = new JButton("Log Off"); this.home.setActionCommand("HOME"); homeButtonPanel.add(home); this.add(homeButtonPanel, BorderLayout.SOUTH); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void pressHomeButton() {\n System.out.println(\"TV is already on the home screen\\n\");\n }", "private void setUpHomeButton() {\n Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);\n setSupportActionBar(toolbar);\n ActionBar actionBar = this.getSupportActionBar();\n ...
[ "0.7864045", "0.76256543", "0.7599914", "0.75856465", "0.75313157", "0.7505298", "0.73491395", "0.7257957", "0.7146371", "0.70705265", "0.7023329", "0.69305766", "0.6910967", "0.6902516", "0.676539", "0.676202", "0.6759042", "0.67507863", "0.67507863", "0.67507863", "0.674834...
0.7871876
0
Set up the message panel advising the user that registration is complete
private void setupMessagePanel() { JPanel messagePanel = new JPanel(); this.message = new JTextArea(); this.message.setText("Registration Phase Completed. \n\nClick on the Log Off button below to \nreturn to the main menu"); this.message.setEditable(false); this.message.setColumns(20); this.message.setLineWrap(true); messagePanel.add(message); this.add(messagePanel, BorderLayout.CENTER); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void register() {\n if (registerView.getFirstName().length() == 0 || registerView.getLastName().length() == 0 || registerView.getUsername().length() == 0 || registerView.getPassword().length() == 0) {\n IDialog invalidRegistrationDialog\n = dialogFactory.createDialog(DialogFact...
[ "0.7088603", "0.68575096", "0.668624", "0.6679028", "0.66356695", "0.6630021", "0.6625472", "0.6437758", "0.64340264", "0.643234", "0.63677794", "0.62952346", "0.6288825", "0.6278192", "0.6266007", "0.62476504", "0.62097394", "0.6090255", "0.6064812", "0.6064788", "0.59997666...
0.69307923
1
Add action listeners to the interactive buttons
public void addActionListener(ActionListener listener) { this.home.addActionListener(listener); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void registerButtons()\n\t{\n\t\tplot.addActionListener(new ButtonListener());\n\t\tin.addActionListener(new ButtonListener(1));\n\t\tout.addActionListener(new ButtonListener(2));\n\t\t\n\t}", "public void addActionListeners() {\n\t\tbtnReadRow.addActionListener(this);\n\t\tbtnPrintRow.addActionListener(t...
[ "0.71187836", "0.7031573", "0.7024299", "0.69022334", "0.68999064", "0.68818307", "0.6853959", "0.67995405", "0.6787666", "0.67561185", "0.67210877", "0.6712986", "0.66101545", "0.6568014", "0.65195185", "0.6510307", "0.6505604", "0.64875364", "0.64709264", "0.6464887", "0.64...
0.0
-1
Construtor da classe Singleton
private MissaJpaController() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Singleton(){}", "private Singleton()\n\t\t{\n\t\t}", "private Singleton() { }", "private Singleton() {\n\t}", "private SingletonSigar(){}", "private Singleton(){\n }", "private LazySingleton(){}", "private SingletonObject() {\n\n\t}", "private SingletonSample() {}", "private SparkeySer...
[ "0.8804642", "0.8479317", "0.84696954", "0.8415762", "0.8395162", "0.83506423", "0.81605494", "0.80755603", "0.8057555", "0.7854492", "0.7755288", "0.7716508", "0.7705773", "0.75554717", "0.75321966", "0.74810666", "0.7442201", "0.73746413", "0.7348206", "0.73386407", "0.7333...
0.0
-1
Interface of main menu and all cartesian plane simulations has methods for drawing components on the screen and capture mouse and keyboard actions
public interface GraphicsInterface { /** * drawing components of menus or simulation on the screen */ void draw(); /** * this method runs when right mouse button was pressed * @param mouseX - current mouse x position (in pixels) * @param mouseY - current mouse y position (in pixels) */ void onRightClick(double mouseX, double mouseY); /** * this method runs when left mouse button was pressed * @param mouseX - current mouse x position (in pixels) * @param mouseY - current mouse y position (in pixels) * @return false if simulation doesn't have to be refreshed. * true otherwise (also in menus) */ boolean onLeftClick(double mouseX, double mouseY); /** * this method runs when left mouse button was released * @param mouseX - current mouse x position (in pixels) * @param mouseY - current mouse y position (in pixels) */ void onLeftMouseButtonReleased(double mouseX, double mouseY); /** * This method runs when LEFT mouse button is pressed and mouse is moving. * @param mouseX - current mouse x position (in pixels) * @param mouseY - current mouse y position (in pixels) * @param prevMouseX - mouse x position in previous frame (in pixels) * @param prevMouseY - mouse y position in previous frame (in pixels) * @return true/false depending which scenario happened */ boolean onMouseDragged(double mouseX, double mouseY, double prevMouseX, double prevMouseY); /** * This method runs when no mouse button is pressed and mouse is moving * @param mouseX - current mouse x position (in pixels) * @param mouseY - current mouse y position (in pixels) * @param prevMouseX - mouse x position in previous frame (in pixels) * @param prevMouseY - mouse y position in previous frame (in pixels) */ void onMouseMoved(double mouseX, double mouseY, double prevMouseX, double prevMouseY); /** * This method runs when mouse wheel is moving * @param rotation direction of scrolling. Can be either 1 [down] or -1 [up] */ void onMouseScrolled(int rotation); /** * This method runs when some button is pressed * @param event - all information of pressed button * @return true/false depending of the usage */ boolean onKeyPressed(KeyEvent event); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void MainMenuComponents(){\n\t\tInterface.menu = new JPanel(new GridBagLayout()) {\n\n\t\t\tprivate static final long serialVersionUID = 1L;\n\n\t\t\tpublic void paintComponent(Graphics g) {\n\n\t\t\t\tg.drawImage(Interface.img, 0, 0, null);\n\t\t\t}\n\t\t};\n\t\tInterface.single.setPreferredSize(Int...
[ "0.6946808", "0.68646365", "0.6770502", "0.67629194", "0.6740502", "0.6706079", "0.66826224", "0.6662741", "0.6555545", "0.649702", "0.6481557", "0.64224344", "0.64080316", "0.63995373", "0.6393826", "0.63865334", "0.6380147", "0.6377191", "0.6373137", "0.63694173", "0.635450...
0.72909
0
drawing components of menus or simulation on the screen
void draw();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void renderMenu() {\n StdDraw.setCanvasSize(START_WIDTH * TILE_SIZE, START_HEIGHT * TILE_SIZE);\n Font font = new Font(\"Monaco\", Font.BOLD, 20);\n StdDraw.setFont(font);\n StdDraw.setXscale(0, START_WIDTH );\n StdDraw.setYscale(0, START_HEIGHT );\n StdDraw.clear(...
[ "0.764645", "0.7218162", "0.7102535", "0.7095359", "0.69849664", "0.69120556", "0.68973523", "0.67730343", "0.67711174", "0.671771", "0.6661162", "0.66506696", "0.66226184", "0.6590804", "0.65893644", "0.6523769", "0.65079534", "0.64956754", "0.6478782", "0.64755297", "0.6467...
0.0
-1
this method runs when right mouse button was pressed
void onRightClick(double mouseX, double mouseY);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void rightClick(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\n\tpublic void rightClick(MouseEvent e) {\n\n\t}", "public void mousePressed(MouseEvent e) {\n if (e.getButton() == MouseEvent.BUTTON3) {\n isRightPressed = true;\n }\n ...
[ "0.82246554", "0.8138599", "0.8131905", "0.80746496", "0.80746496", "0.7846723", "0.77797234", "0.7660918", "0.7552047", "0.7528816", "0.7487702", "0.74206305", "0.7403483", "0.7391535", "0.7262471", "0.7208772", "0.71701247", "0.7134126", "0.71306205", "0.71286464", "0.71084...
0.79368484
5
this method runs when left mouse button was pressed
boolean onLeftClick(double mouseX, double mouseY);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mouseLeft() {\n\n\t}", "@Override\n\tpublic void mouseLeft() {\n\t\t\n\t}", "@Override\n\tpublic void leftClick(MouseEvent e) {\n\n\t}", "@Override\n\tpublic void LeftButtonClick() {\n\t\t\n\t}", "public void mousePressed(MouseEvent e) {\n if ((e.getModifiers() & InputEvent.BUTTON1_MASK) == ...
[ "0.85939956", "0.8405057", "0.821216", "0.7906662", "0.7810562", "0.77528834", "0.76603544", "0.764553", "0.7555517", "0.75090367", "0.74301445", "0.7343437", "0.72877026", "0.72857976", "0.7283216", "0.72614163", "0.719963", "0.71860147", "0.71860147", "0.7153308", "0.714563...
0.7767227
5
this method runs when left mouse button was released
void onLeftMouseButtonReleased(double mouseX, double mouseY);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mouseLeft() {\n\n\t}", "@Override\n\tpublic void mouseLeft() {\n\t\t\n\t}", "public void mousePressed(MouseEvent e) {\n if (e.getButton() == MouseEvent.BUTTON3) {\n isRightPressed = true;\n }\n }", "private void leftButtonKeyReleased(jav...
[ "0.78182435", "0.7777732", "0.77416426", "0.75333756", "0.74868816", "0.74616694", "0.7460389", "0.7396824", "0.72743034", "0.72734547", "0.72262114", "0.72066003", "0.71504223", "0.71389323", "0.7109225", "0.71075815", "0.71075815", "0.7099399", "0.7099399", "0.7099399", "0....
0.81031775
0
This method runs when LEFT mouse button is pressed and mouse is moving.
boolean onMouseDragged(double mouseX, double mouseY, double prevMouseX, double prevMouseY);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mouseLeft() {\n\n\t}", "@Override\n\tpublic void mouseLeft() {\n\t\t\n\t}", "public void leftPressed() {\n\t\tkeys.get(keys.put(Keys.LEFT, true));\n\t}", "private void leftButtonKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_leftButtonKeyPressed\n this.leftButton.setEnabled(tru...
[ "0.80773836", "0.78720784", "0.78706515", "0.7828887", "0.767323", "0.765479", "0.7563547", "0.7483099", "0.7448818", "0.73291934", "0.722309", "0.7198471", "0.7193276", "0.71789134", "0.7145986", "0.7143278", "0.7130844", "0.71255434", "0.7121563", "0.71034837", "0.70668775"...
0.0
-1
This method runs when no mouse button is pressed and mouse is moving
void onMouseMoved(double mouseX, double mouseY, double prevMouseX, double prevMouseY);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mousePressed() {\n\t\tif(detectCollision(this.p.mouseX,this.p.mouseY)) {\n\t\t\tthis.isPressed = true;\n\t\t\tclick();\n\t\t}\n\t}", "private void mouseMove() {\n if (this.holding) {\n Point point = new Point(mousex, mousey);\n this.addPixel(point);\n }\n }", ...
[ "0.7443426", "0.7394581", "0.733862", "0.72732335", "0.727271", "0.7260847", "0.72453684", "0.72453684", "0.72093153", "0.72070295", "0.72028875", "0.71952045", "0.71487176", "0.71469456", "0.71332467", "0.71093065", "0.7098375", "0.70906556", "0.7089404", "0.708448", "0.7049...
0.0
-1
This method runs when mouse wheel is moving
void onMouseScrolled(int rotation);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void mouseWheelMoved(int arg0) {\n\t}", "@Override\n\tpublic void mouseWheelMoved(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n public void mouseWheelMoved(MouseWheelEvent e){\n \n }", "@Override\r\n public void mouseWheelMoved(MouseWheelEvent e) {\r\n\r\n ...
[ "0.8112878", "0.8065777", "0.79509956", "0.79507977", "0.7862254", "0.78200865", "0.78015524", "0.737544", "0.7332983", "0.73006874", "0.7254583", "0.72222936", "0.72154915", "0.7208427", "0.7142663", "0.7142663", "0.7142663", "0.70443594", "0.70363253", "0.7034307", "0.69950...
0.6523735
28
This method runs when some button is pressed
boolean onKeyPressed(KeyEvent event);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void on_button_pressed(String button_name) {\n\n\t}", "public void buttonClicked();", "public void buttonClicked() {\n mSanitizorGame.buttonClicked();\n }", "public void onButtonAPressed();", "public void settingBtnClick() {\n\t}", "void mainButtonPressed();", "public v...
[ "0.7636039", "0.76147777", "0.75225025", "0.7251148", "0.7189988", "0.71457624", "0.7142413", "0.71407974", "0.7127282", "0.7046499", "0.70372397", "0.7033729", "0.7023413", "0.7023413", "0.7023413", "0.7023413", "0.70218354", "0.6986218", "0.6964207", "0.6951137", "0.6951137...
0.0
-1
LocationManager locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);
public String getEnabledLocationProvider() { Criteria criteria = new Criteria(); String bestProvider = locationManager.getBestProvider(criteria, true); boolean enabled = locationManager.isProviderEnabled(bestProvider); if (!enabled) { Log.i("TAG", "No location provider enabled!"); return null; } return bestProvider; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void locationManager()\n\t{\n mMap.setMyLocationEnabled(true);\n\n // Getting LocationManager object from System Service LOCATION_SERVICE\n LocationManager locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);\n\n // Creating a criteria object to retrieve provi...
[ "0.772985", "0.7607805", "0.73884755", "0.73540795", "0.73416543", "0.73339194", "0.7330041", "0.7236678", "0.7234796", "0.71882147", "0.71812236", "0.7149196", "0.714831", "0.7140763", "0.71398926", "0.7138349", "0.7109812", "0.7100695", "0.7091835", "0.7069499", "0.70635325...
0.0
-1
Get connection and return the page as a string.
public String connectAndGetPage(String url) throws IOException { URL page = new URL(url); HttpURLConnection conn = (HttpURLConnection) page.openConnection(); conn.connect(); InputStreamReader in = new InputStreamReader((InputStream) conn.getContent()); BufferedReader buff = new BufferedReader(in); String line; StringBuilder sb = new StringBuilder(""); while ((line = buff.readLine()) != null) { sb.append(line).append("\n"); } return sb.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getCurrentPage() throws ConfigurationException, IOException {\r\n return GetRunTimeData(\"currentPage\");\r\n }", "private String connectionToString(URLConnection con) throws IOException {\n\t\tStringWriter writer = new StringWriter();\n\t\tIOUtils.copy(con.getInputStream(), writer...
[ "0.61179185", "0.600058", "0.59582305", "0.59582305", "0.59582305", "0.59582305", "0.5938471", "0.5890702", "0.5890702", "0.5890702", "0.5890702", "0.5813391", "0.5771885", "0.5762539", "0.573082", "0.569613", "0.569216", "0.569216", "0.569216", "0.569216", "0.56801015", "0...
0.6878513
0
Get all tags on page, excluding closing tags and comments.
public ArrayList<String> getTags(String url) { // Use hashset to remove duplicates Collection<String> tags = new HashSet<>(); try { String page = connectAndGetPage(url); Pattern p = Pattern.compile("<[^>]*>"); Matcher m = p.matcher(page); while (m.find()) { // Get match and add to hashset if not a comment or closing tag. String match = m.group(0); String characterAfterStart = String.valueOf(match.charAt(1)); if (!characterAfterStart.equals("/") && !characterAfterStart.equals("!")) { tags.add(match.trim()); } } } catch (IOException e) { System.out.println("IOException"); } return sortTags(tags); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private List<Tag> getTags() {\r\n\r\n\t\treturn getTags(null);\r\n\r\n\t}", "public List<Tag> getAllTags() {\n\t\treturn DAO.getInstance().getTags().getTagList();\n\t}", "@Override\n\tpublic List<Tag> getAllTags() throws Exception {\n\t\treturn null;\n\t}", "public List<Tag> getTags() {\n return new Array...
[ "0.67621887", "0.6610038", "0.6578442", "0.63957345", "0.6363991", "0.636059", "0.6292399", "0.6280422", "0.6259053", "0.6248542", "0.6217898", "0.619962", "0.6187244", "0.6145864", "0.6141074", "0.613878", "0.613878", "0.61381316", "0.61381316", "0.61381316", "0.61381316", ...
0.6464645
3
Method to put matches in alphabetical and length order.
public ArrayList<String> sortTags(Collection<String> tags) { // Transform set to list so can sort. ArrayList<String> list = new ArrayList<>(tags); // Sort alphabetically. Collections.sort(list); // Sort by length. Collections.sort(list, new Comparator<String>() { @Override public int compare(String x, String y) { int diff = x.length() - y.length(); if (diff < 0) { return -1; } else if (diff == 0) { return 0; } else { return 1; } } }); return list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sortMatches();", "private static void alphabetize() {\r\n Collections.sort(kwicIndex, String.CASE_INSENSITIVE_ORDER);\r\n }", "public void sortByWordLengthAsc() {\r\n\t\tcomparator = new WordLengthAsc();\r\n\t}", "public static void alphabetize() {\r\n\t\tArrayList<Patron> alphabetic = ...
[ "0.69396436", "0.65091705", "0.6005988", "0.5941149", "0.5921374", "0.57800984", "0.5709244", "0.5587424", "0.55082715", "0.55020934", "0.5436293", "0.53636056", "0.53230685", "0.5307376", "0.5281779", "0.5272742", "0.5214402", "0.5211972", "0.5205541", "0.51939833", "0.51917...
0.0
-1
Metodo per la gestione dei comandi in input
public void startSocial() { Scanner scanner = new Scanner(System.in); System.out.println(Constants.Message.WELCOME_MESSAGE); System.out.println(Constants.Message.DO_ACTION_MESSAGE); while(scanner.hasNext()) { String command = scanner.nextLine(); CommandStrategy commandStrategy = chooseStrategy(command); if(commandStrategy != null) { commandStrategy.execute(command); } System.out.println(Constants.Message.DO_ACTION_MESSAGE); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void soustraire() throws IOException {\n\t\tScanner clavier = new Scanner(System.in);\n\t\tint nb1, nb2, resultat;\n\t\tnb1 = lireNombreEntier();\n\t\tnb2 = lireNombreEntier();\n\t\tresultat = nb1 - nb2;\n\t\tSystem.out.println(\"\\n\\t\" + nb1 + \" - \" + nb2 + \" = \" + resultat);\n\t}", "public void in...
[ "0.62312925", "0.61390334", "0.6118257", "0.61093646", "0.59476304", "0.5911161", "0.5863412", "0.5838957", "0.5836871", "0.58126986", "0.57929754", "0.5792445", "0.57421523", "0.57197106", "0.5711319", "0.57105356", "0.5700021", "0.5696954", "0.56797785", "0.5678834", "0.567...
0.0
-1
open a new activity, showing detailed view of the donation details to the delivery agent
@Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { DonationData donationData = list.get(position); Intent intent = new Intent(getContext(), DonationDetailsActivity.class); intent.putExtra("donationData",donationData); startActivity(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tIntent intent = new Intent(context, CustomerDueDetails.class);\n\t\t\t\t\tintent.putExtra(\"shopper_id\", \"\"+list.get(position).get_shopper_id());\n\t\t\t\t\tintent.putExtra(\"name\", \"\"+list.get(position).get_shopper_name());\n\t\t\t\t\tintent.putExt...
[ "0.62729853", "0.62641054", "0.6261335", "0.6215469", "0.6211717", "0.62113917", "0.6184838", "0.6119944", "0.61123484", "0.59868366", "0.5971958", "0.59059304", "0.5885276", "0.5871364", "0.5864765", "0.58637637", "0.58502245", "0.5846597", "0.58425295", "0.5841446", "0.5839...
0.6252566
3
create nbyn grid, with all sites blocked
public Percolation(int n) { if (n <= 0) throw new IllegalArgumentException(); // sitsUF's n*n site is up virtual site // n*n+1 site is down virtual site sitesUF = new WeightedQuickUnionUF(n*n + 2); sidesFullUF = new WeightedQuickUnionUF(n*n + 1); sitesIsOpen = new boolean[n*n]; for (int i = 0; i < n*n; i++) sitesIsOpen[i] = false; side = n; upSiteIndex = side*side; downSiteIndex = side*side+1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void makeNborLists(){\n\t\t\tfor (int i = 0; i < N; i++){\n\t\t\t\tint ct = 0;\n\t\t\t\tint boundsCt = 0;\n\t\t\t\tfor (int j = 0; j < maxNbors; j++){\n\t\t\t\t\tint nborSite = nborList[i][j];\n\t\t\t\t\tif(nborSite>=1){\n\t\t\t\t\t\tif (aliveLattice[nborSite]){\n\t\t\t\t\t\t\tct += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}e...
[ "0.67820454", "0.63881916", "0.61907583", "0.59362376", "0.58761793", "0.5866729", "0.5835914", "0.5788106", "0.5721525", "0.57022464", "0.5698478", "0.5675769", "0.5646004", "0.56400853", "0.563392", "0.5616473", "0.5604368", "0.5604338", "0.55704737", "0.5545025", "0.553526...
0.0
-1
convert the row and col to index
private int rowColToIndex(int row, int col) { row = row - 1; col = col - 1; int index = row * side + col; if (index >= side*side || index < 0 || row < 0 || row >= side || col < 0 || col >= side) throw new IndexOutOfBoundsException(); return index; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int site2index(int row, int col) {\n validate(row, col);\n return (row - 1) * this.n + col;\n }", "private int getIndex(int row, int column) {\n \n int pos;\n \n pos = (row*getVariables().size()*4)+(column*4);\n return pos;\n}", "private int ufindex(int row, int col) {\n re...
[ "0.7305625", "0.72541916", "0.7210941", "0.7206359", "0.71438026", "0.706166", "0.68981016", "0.6856349", "0.6764539", "0.66929877", "0.66452676", "0.66452676", "0.66452676", "0.6518778", "0.6517097", "0.64823675", "0.6410292", "0.64002293", "0.63899606", "0.6377876", "0.6363...
0.71778315
4
add element to array
private int[] appendArray(int[] array, int x) { int[] result = new int[array.length + 1]; for (int i = 0; i < array.length; i++) result[i] = array[i]; result[result.length - 1] = x; return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private SignatureDTO[] add(SignatureDTO[] array, SignatureDTO element) {\n Class type = (array != null ? array.getClass() : (element != null ? element.getClass() : SignatureDTO.class));\n SignatureDTO[] newArray = (SignatureDTO[]) copyArrayGrow1(array, type);\n newArray[newArray.length - 1] = ...
[ "0.74739534", "0.7434372", "0.71588373", "0.71312296", "0.71178716", "0.7020198", "0.6999689", "0.695386", "0.68842304", "0.6829671", "0.68282497", "0.6800927", "0.67883694", "0.6780772", "0.67014563", "0.66912204", "0.6681314", "0.6653385", "0.6653385", "0.6653385", "0.66533...
0.643971
42
return the legal index aournd the given index
private int[] indexsAround(int row, int col) { int[][] directions = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}}; int [] aroundIndexs = {}; for (int[] dir : directions) { try { int index = rowColToIndex(row+dir[0], col+dir[1]); aroundIndexs = appendArray(aroundIndexs, index); } catch (IndexOutOfBoundsException e) { continue; } } return aroundIndexs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getIndex() {\n\t\treturn index & 0xffff;\n\t}", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "i...
[ "0.72764325", "0.70704806", "0.70704806", "0.70704806", "0.70704806", "0.70704806", "0.70704806", "0.70704806", "0.70704806", "0.70704806", "0.70704806", "0.70704806", "0.70704806", "0.70704806", "0.6986502", "0.6986502", "0.6986502", "0.69099945", "0.69044495", "0.68980986", ...
0.0
-1
open site (row, col) if it is not open already
public void open(int row, int col) { if (isOpen(row, col)) return; int index = rowColToIndex(row, col); sitesIsOpen[index] = true; if (row == 1) { sitesUF.union(index, upSiteIndex); sidesFullUF.union(index, upSiteIndex); } //!this.percolates() this situation is prevent after percolates, every //sites open down will be full, but not fix 在下面按了几个后, 另一块区域联通是的,原来的区域 full 了 if (row == side && !this.percolates()) sitesUF.union(index, downSiteIndex); for (int aroundIndex : indexsAround(row, col)) { if (sitesIsOpen[aroundIndex]) { sitesUF.union(aroundIndex, index); sidesFullUF.union(aroundIndex, index); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void open(int row, int col) {\n if (grid[row][col] == 0) {\n grid[row][col] = 1;\n openSites++;\n if (row == 0) {\n grid[row][col] = 2;\n fill(row,col);\n }\n if (row > 0 && grid[row - 1][col] > 0) {\n ...
[ "0.724845", "0.7164379", "0.7153806", "0.7093451", "0.7076901", "0.69827163", "0.6964098", "0.68536663", "0.68431437", "0.68394166", "0.67778605", "0.668379", "0.66775787", "0.6602961", "0.65685546", "0.6499543", "0.6433161", "0.64098674", "0.63893867", "0.6329172", "0.626247...
0.6892256
7
is site (row, col) open?
public boolean isOpen(int row, int col) { int index = rowColToIndex(row, col); return sitesIsOpen[index]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isOpen(int row, int col){\n\t\tint index= transformInput(row,col);\n\t\treturn openSites[index];\n\t}", "public boolean isOpen(int row, int col) {\n check(row, col);\n return sites[row - 1][col - 1];\n }", "public boolean isOpen(int row, int col) {\n validate(row, col);\n...
[ "0.7754441", "0.75874186", "0.75783134", "0.74479926", "0.73653704", "0.7302927", "0.72520834", "0.7126934", "0.71214455", "0.7098978", "0.6931014", "0.6876267", "0.6858768", "0.6840648", "0.68206966", "0.6800806", "0.6792481", "0.676979", "0.675235", "0.6752138", "0.6743873"...
0.75612235
3
is site (row, col) full?
public boolean isFull(int row, int col) { int index = rowColToIndex(row, col); return sidesFullUF.connected(index, upSiteIndex); // return sitesUF.connected(index, upSiteIndex); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isFull(int row, int col)\n {\n int oneDimensional = xyTo1D(row, col);\n return uf.connected(oneDimensional, topVirtualSite);\n }", "public boolean isFull(int row, int col) {\n if(!inRange(row, col)) {\n throw new IllegalArgumentException();\n }\n // A site i full ...
[ "0.7681716", "0.7631272", "0.76122874", "0.7590442", "0.75096893", "0.75025594", "0.7496383", "0.7440837", "0.73897153", "0.72560376", "0.71796435", "0.7133236", "0.7058569", "0.7004438", "0.6931366", "0.68704224", "0.6866891", "0.68165463", "0.6816041", "0.68031615", "0.6744...
0.7452044
7
does the system percolate?
public boolean percolates() { return sitesUF.connected(upSiteIndex, downSiteIndex); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void COPower(){\r\n COP = true;\r\n }", "@Override\n\tpublic void cook() {\n\t\tSystem.out.println(\"Cooking....\\n\");\n\t}", "public void notificate() {\nSystem.out.println(\"Comman for all\");\r\n\t}", "public void plum() {\n plum = true;\n }", "public void act() \n {\n ...
[ "0.6089602", "0.58731", "0.5702252", "0.5611575", "0.5604928", "0.555299", "0.5538914", "0.55343384", "0.5493932", "0.549217", "0.5488522", "0.5429184", "0.5415585", "0.5403273", "0.5398697", "0.5385401", "0.5375971", "0.5369693", "0.5367037", "0.53657126", "0.5354686", "0....
0.0
-1
Create a few example points
@Override public void run(String arg) { float[][] points = new float[10][3]; for(int i = 0; i < points.length; i++) points[i][0] = points[i][1] = points[i][2] = i; // Create a CustomMesh from them List<Point3f> mesh = new ArrayList<Point3f>(); for(int i = 0; i < points.length; i++) { mesh.add(new Point3f( points[i][0], points[i][1], points[i][2])); } CustomPointMesh cm = new CustomPointMesh(mesh); // Create a universe and show it Image3DUniverse univ = new Image3DUniverse(); univ.showAttribute( Image3DUniverse.ATTRIBUTE_COORD_SYSTEM, false); univ.show(); // Add the mesh String name = "points"; univ.addCustomMesh(cm, name); cm.setPointSize(10); // Have a look at the source code of CustomPointMesh // for changing point size and anti-aliasing }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static List<Point> generateTestPoints()\n {\n List<Point> points = new ArrayList<>();\n double r = 1.0;\n int k = 0; // for naming the points.\n for (int i = 0; i <= 360; i += 10) {\n double t = (i)* Math.PI / 180.0;\n double x = r * Math.cos(t);\n ...
[ "0.66194123", "0.65618366", "0.64557236", "0.6414588", "0.63332707", "0.62311286", "0.6180857", "0.61662304", "0.61322665", "0.6038533", "0.60269946", "0.59885025", "0.59736705", "0.595588", "0.59378636", "0.59351933", "0.590461", "0.58239", "0.5816877", "0.5804049", "0.57953...
0.0
-1
TODO Autogenerated method stub
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.login); initView(); login = (Button)findViewById(R.id.btn_login); login.setOnClickListener(ocl); }
{ "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.btn_login_regist: Intent intent = new Intent(LoginActivity.this,RegisterActivity.class); startActivity(intent); 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 public boolean onOptionsItemSelected(MenuItem item) { switch(item.getItemId()){ case MENU_PWD_BACK: break; case MENU_HELP: break; case MENU_EXIT: finish(); break; } return super.onOptionsItemSelected(item); }
{ "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
Initialize the contents of the frame.
private void initialize() { frame = new JFrame(); frame.getContentPane().setBackground(Color.BLACK); frame.getContentPane().setLayout(null); frame.setExtendedState(JFrame.MAXIMIZED_BOTH); JLabel lblDesignCopyrights = new JLabel("design copyrights \u00A9 chinmaya"); lblDesignCopyrights.setFont(new Font("Times New Roman", Font.PLAIN, 14)); lblDesignCopyrights.setForeground(new Color(255, 255, 224)); lblDesignCopyrights.setBounds(1711, 1018, 183, 23); frame.getContentPane().add(lblDesignCopyrights); JPanel background = new JPanel(); background.setLayout(null); background.setBackground(Color.DARK_GRAY); background.setBounds(14, 200, 1880, 809); frame.getContentPane().add(background); JLabel lblTypesOfMachine = new JLabel("MACHINE NAME"); lblTypesOfMachine.setHorizontalAlignment(SwingConstants.LEFT); lblTypesOfMachine.setVerticalAlignment(SwingConstants.TOP); lblTypesOfMachine.setForeground(Color.WHITE); lblTypesOfMachine.setFont(new Font("Times New Roman", Font.PLAIN, 19)); lblTypesOfMachine.setBounds(69, 378, 178, 30); background.add(lblTypesOfMachine); JLabel lblAppointment = new JLabel("LIST TO DO"); lblAppointment.setForeground(Color.WHITE); lblAppointment.setFont(new Font("Times New Roman", Font.PLAIN, 30)); lblAppointment.setBounds(69, 117, 319, 48); background.add(lblAppointment); JLabel lblQuantity = new JLabel("QUANTITY"); lblQuantity.setHorizontalAlignment(SwingConstants.LEFT); lblQuantity.setVerticalAlignment(SwingConstants.TOP); lblQuantity.setForeground(Color.WHITE); lblQuantity.setFont(new Font("Times New Roman", Font.PLAIN, 19)); lblQuantity.setBounds(69, 428, 178, 30); background.add(lblQuantity); Panel panel = new Panel(); panel.setLayout(null); panel.setBackground(Color.BLACK); panel.setBounds(0, 30, 1880, 67); background.add(panel); JButton cusbtn = new JButton("CUSTOMER"); cusbtn.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { customer cr = new customer(); cr.csStart(); frame.dispose(); } }); cusbtn.setForeground(Color.WHITE); cusbtn.setFont(new Font("Times New Roman", Font.PLAIN, 15)); cusbtn.setBackground(Color.BLACK); cusbtn.setBounds(1257, 11, 613, 44); panel.add(cusbtn); JButton bilbtn = new JButton("INVOICE"); bilbtn.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { adminInvoice inv= new adminInvoice(); inv. adminInvoiceStart(); frame.dispose(); } }); bilbtn.setForeground(Color.WHITE); bilbtn.setFont(new Font("Times New Roman", Font.PLAIN, 15)); bilbtn.setBackground(Color.BLACK); bilbtn.setBounds(633, 11, 613, 44); panel.add(bilbtn); JButton prdbtn = new JButton("PRODUCTS"); prdbtn.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { adminproducts prd = new adminproducts(); prd.adminPrd(); frame.dispose(); } }); prdbtn.setForeground(Color.WHITE); prdbtn.setFont(new Font("Times New Roman", Font.PLAIN, 15)); prdbtn.setBackground(Color.BLACK); prdbtn.setBounds(10, 11, 613, 44); panel.add(prdbtn); JLabel lblCustomerName = new JLabel("CUSTOMER NAME"); lblCustomerName.setVerticalAlignment(SwingConstants.TOP); lblCustomerName.setHorizontalAlignment(SwingConstants.LEFT); lblCustomerName.setForeground(Color.WHITE); lblCustomerName.setFont(new Font("Times New Roman", Font.PLAIN, 19)); lblCustomerName.setBounds(69, 278, 178, 30); background.add(lblCustomerName); JLabel lblMachineType = new JLabel("MACHINE TYPE"); lblMachineType.setVerticalAlignment(SwingConstants.TOP); lblMachineType.setHorizontalAlignment(SwingConstants.LEFT); lblMachineType.setForeground(Color.WHITE); lblMachineType.setFont(new Font("Times New Roman", Font.PLAIN, 19)); lblMachineType.setBounds(69, 328, 178, 30); background.add(lblMachineType); JButton btnStore = new JButton("STORE"); btnStore.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String dateEntry=date.getText(); String cusname= customerName.getText(); String machType=machineType.getText(); String machName=machineName.getText(); String quan=quantity.getText(); String dl= deadline.getText(); Connection con; PreparedStatement insert; if(dateEntry.isEmpty()||cusname.isEmpty()||machName.isEmpty()||machType.isEmpty()||quan.isEmpty()||dl.isEmpty()) { JOptionPane.showMessageDialog(null,"no field must be left empty","registration error", JOptionPane.ERROR_MESSAGE); return; } else { JOptionPane.showMessageDialog(null, " Appointment added!!"); } try { Class.forName("com.mysql.jdbc.Driver"); con = DriverManager.getConnection("jdbc:mysql://localhost:3306/machine_works", "root", ""); insert = con.prepareStatement("insert into appointment (date,cusname,machType,machName,quan,deadline) values (?,?,?,?,?,?)"); insert.setString(1, dateEntry); insert.setString(2, cusname); insert.setString(3, machType); insert.setString(4, machName); insert.setString(5, quan); insert.setString(6, dl); insert.executeUpdate(); } catch(Exception E) { E.printStackTrace(); } } }); btnStore.setForeground(Color.WHITE); btnStore.setFont(new Font("Times New Roman", Font.PLAIN, 15)); btnStore.setBackground(Color.BLACK); btnStore.setBounds(580, 578, 116, 44); background.add(btnStore); JScrollPane scrollPane = new JScrollPane(); scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS); scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane.setBounds(1000, 230, 613, 267); background.add(scrollPane); invoice = new JTable(); scrollPane.setViewportView(invoice); JLabel lblInvoice = new JLabel("VIEW TO-DO LIST"); lblInvoice.setForeground(Color.WHITE); lblInvoice.setFont(new Font("Times New Roman", Font.PLAIN, 30)); lblInvoice.setBounds(1010, 117, 387, 48); background.add(lblInvoice); quantity = new JTextField(); quantity.setFont(new Font("Times New Roman", Font.PLAIN, 15)); quantity.setColumns(10); quantity.setBounds(279, 428, 289, 30); background.add(quantity); machineName = new JTextField(); machineName.setFont(new Font("Times New Roman", Font.PLAIN, 15)); machineName.setColumns(10); machineName.setBounds(279, 328, 289, 30); background.add(machineName); machineType = new JTextField(); machineType.setFont(new Font("Times New Roman", Font.PLAIN, 15)); machineType.setColumns(10); machineType.setBounds(279, 378, 289, 30); background.add(machineType); customerName = new JTextField(); customerName.setFont(new Font("Times New Roman", Font.PLAIN, 15)); customerName.setColumns(10); customerName.setBounds(279, 278, 289, 30); background.add(customerName); JLabel deadlineLbl = new JLabel("DEADLINE"); deadlineLbl.setVerticalAlignment(SwingConstants.TOP); deadlineLbl.setHorizontalAlignment(SwingConstants.LEFT); deadlineLbl.setForeground(Color.WHITE); deadlineLbl.setFont(new Font("Times New Roman", Font.PLAIN, 19)); deadlineLbl.setBounds(69, 481, 178, 30); background.add(deadlineLbl); JLabel lblDate = new JLabel("DATE"); lblDate.setVerticalAlignment(SwingConstants.TOP); lblDate.setHorizontalAlignment(SwingConstants.LEFT); lblDate.setForeground(Color.WHITE); lblDate.setFont(new Font("Times New Roman", Font.PLAIN, 19)); lblDate.setBounds(69, 228, 178, 30); background.add(lblDate); date = new JTextField(); date.setFont(new Font("Times New Roman", Font.PLAIN, 15)); date.setColumns(10); date.setBounds(279, 228, 289, 30); background.add(date); JButton btnView = new JButton("VIEW"); btnView.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { Connection con = null; Class.forName("com.mysql.jdbc.Driver"); con = DriverManager.getConnection("jdbc:mysql://localhost:3306/machine_works", "root", ""); String query="select * from appointment "; PreparedStatement pst = con.prepareStatement(query); ResultSet rs = pst.executeQuery(); invoice.setModel(DbUtils.resultSetToTableModel(rs)); } catch(Exception E) { E.printStackTrace(); } } }); btnView.setForeground(Color.WHITE); btnView.setFont(new Font("Times New Roman", Font.PLAIN, 15)); btnView.setBackground(Color.BLACK); btnView.setBounds(1584, 578, 116, 44); background.add(btnView); deadline = new JTextField(); deadline.setFont(new Font("Times New Roman", Font.PLAIN, 15)); deadline.setColumns(10); deadline.setBounds(279, 481, 289, 30); background.add(deadline); JPanel header = new JPanel(); header.setLayout(null); header.setBackground(Color.DARK_GRAY); header.setBounds(14, 23, 1880, 163); frame.getContentPane().add(header); JPanel mwtitle = new JPanel(); mwtitle.setLayout(null); mwtitle.setForeground(Color.WHITE); mwtitle.setBackground(Color.BLACK); mwtitle.setBounds(209, 7, 649, 151); header.add(mwtitle); JLabel label = new JLabel("MACHINE WORKS"); label.setForeground(Color.WHITE); label.setFont(new Font("Times New Roman", Font.PLAIN, 69)); label.setBounds(20, 11, 605, 72); mwtitle.add(label); JLabel lblWhereAllThe = new JLabel("Where all the WORK is done by MACHINE"); lblWhereAllThe.setForeground(Color.ORANGE); lblWhereAllThe.setFont(new Font("Times New Roman", Font.PLAIN, 30)); lblWhereAllThe.setBounds(38, 94, 581, 48); mwtitle.add(lblWhereAllThe); JLabel logolbl = new JLabel(""); logolbl.setIcon(new ImageIcon("C:\\Users\\CHINMAYA SH\\Pictures\\download.png")); logolbl.setBounds(58, 7, 151, 151); header.add(logolbl); JButton lgbtn = new JButton("LOGOUT"); lgbtn.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { JOptionPane.showMessageDialog(null, "Logged out Successfull !!"); index ind = new index(); ind.indexStart(); frame.dispose(); } }); lgbtn.setForeground(Color.WHITE); lgbtn.setFont(new Font("Times New Roman", Font.PLAIN, 15)); lgbtn.setBackground(Color.BLACK); lgbtn.setBounds(1674, 60, 116, 44); header.add(lgbtn); JButton button_1 = new JButton("SIGN UP"); button_1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { signup sg = new signup(); sg.signupStart(); frame.dispose(); } }); button_1.setForeground(Color.WHITE); button_1.setFont(new Font("Times New Roman", Font.PLAIN, 15)); button_1.setBackground(Color.BLACK); button_1.setBounds(1488, 60, 116, 44); header.add(button_1); JButton btnAppointment = new JButton("TO-DO"); btnAppointment.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { appointments ap = new appointments(); ap.appointmentList(); frame.dispose(); } }); btnAppointment.setForeground(Color.WHITE); btnAppointment.setFont(new Font("Times New Roman", Font.PLAIN, 15)); btnAppointment.setBackground(Color.BLACK); btnAppointment.setBounds(1309, 60, 125, 44); header.add(btnAppointment); frame.setBackground(Color.BLACK); frame.setBounds(100, 100, 1920 , 1080); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BreukFrame() {\n super();\n initialize();\n }", "public MainFrame() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "private void initialize() {\n\t\tthis.setSize(211, 449);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setTitle(\"JFrame\");\n\t}", "public SiscobanFrame() {\r\n\t\tsuper();\r...
[ "0.77704835", "0.75652915", "0.7442664", "0.7369101", "0.7366378", "0.7358479", "0.73146075", "0.73096764", "0.72987294", "0.72978777", "0.7278321", "0.72729623", "0.7269468", "0.7269468", "0.7215727", "0.7180792", "0.71682984", "0.7140954", "0.7140953", "0.7126852", "0.71079...
0.0
-1
A Period is an appointment in the calendar, which basicaly consists of two time specifications.
public interface Period { Date getStart(); Date getEnd(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TimePeriod getPeriod();", "public void period() {\n\t\tPeriod annually = Period.ofYears(1);\n\t\tPeriod quarterly = Period.ofMonths(3);\n\t\tPeriod everyThreeWeeks = Period.ofWeeks(3);\n\t\tPeriod everyOtherDay = Period.ofDays(2);\n\t\tPeriod everyYearAndAWeek = Period.of(1, 0, 7);\n\t\tLocalDate date = L...
[ "0.73581743", "0.6912446", "0.6899726", "0.6810833", "0.6701742", "0.66473633", "0.66329116", "0.66329116", "0.66220295", "0.659189", "0.6589875", "0.6572628", "0.65576136", "0.6517805", "0.64777046", "0.64668036", "0.64255506", "0.6390202", "0.6384071", "0.63433427", "0.6267...
0.71946615
1
Called when the activity is first created.
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); //加载布局文件 myView= (ViewGroup)getLayoutInflater().inflate(R.layout.popview, null); //后两个参数表示popupWindow的宽,高 popupWindow = new PopupWindow(myView,200,200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tinit();\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t}", "@Override\n\tpublic void onActivit...
[ "0.791686", "0.77270156", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7637394", "0.7637394", "0.7629958", "0.76189965", "0.76189965", "0.7543775", "0.7540053", "0.7540053", "0.7539505", "0.75269467", "0.75147736", "0.7509639", "0.7500879",...
0.0
-1
Constructs the command to add a category.
public AddCategoryCommand(String moduleCode, String categoryName, int categoryPriority) { this.moduleCode = moduleCode; this.categoryName = categoryName; this.categoryPriority = categoryPriority; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addCategory(Category category);", "@Override\r\n\tpublic void addCategory() {\n\t\tCategory cat=new Category();\r\n\t\tcat.setNameCategory(\"Computing Tools\");\r\n\t\tem.persist(cat);\r\n\t\t\r\n\t}", "Category addNewCategory(Category category);", "public void addNewCategory(Category category) throws C...
[ "0.65111893", "0.6501502", "0.6395409", "0.63588417", "0.6351136", "0.6234049", "0.60419977", "0.58959144", "0.5832491", "0.5775165", "0.56724286", "0.5672097", "0.56281143", "0.5618844", "0.5583873", "0.5558", "0.55265254", "0.55257374", "0.5466244", "0.5441327", "0.5393939"...
0.6029073
7
Constructs the command to add a category without a priority.
public AddCategoryCommand(String moduleCode, String categoryName) { this(moduleCode, categoryName, 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public AddCategoryCommand(String moduleCode, String categoryName, int categoryPriority) {\n this.moduleCode = moduleCode;\n this.categoryName = categoryName;\n this.categoryPriority = categoryPriority;\n }", "@Override\r\n\tpublic void addCategory() {\n\t\tCategory cat=new Category();\r\n...
[ "0.60259396", "0.5897441", "0.58901274", "0.5831833", "0.57282495", "0.57066643", "0.5572332", "0.55660146", "0.55193883", "0.5497953", "0.5466227", "0.54599875", "0.5438968", "0.54026526", "0.5365556", "0.52999717", "0.52826726", "0.52065676", "0.5171109", "0.50930476", "0.5...
0.5754034
4
Executes the Add Category Command to add a Category into the Category List.
@Override public CommandResult execute() { if (exceedLengthLimit()) { return new CommandResult(MESSAGE_CATEGORY_EXCEED_LIMIT); } try { Module parentModule = DirectoryTraverser.getModuleDirectory(moduleCode); Category toAdd = new Category(parentModule, categoryName, categoryPriority); parentModule.getCategories().add(toAdd); StorageManager.setIsSave(); return new CommandResult(messageAddCategorySuccess(categoryName)); } catch (ModuleManager.ModuleNotFoundException e) { return new CommandResult(MESSAGE_MODULE_NOT_FOUND); } catch (CategoryManager.DuplicateCategoryException e) { return new CommandResult(MESSAGE_DUPLICATE_CATEGORY); } catch (IncorrectDirectoryLevelException e) { return new CommandResult(MESSAGE_INCORRECT_DIRECTORY_LEVEL); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addNewCategory(Category category) throws CostManagerException;", "void addCategory(Category category);", "@Override\r\n\tpublic void addCategory() {\n\t\tCategory cat=new Category();\r\n\t\tcat.setNameCategory(\"Computing Tools\");\r\n\t\tem.persist(cat);\r\n\t\t\r\n\t}", "Category addNewCategory...
[ "0.7322147", "0.721239", "0.71627754", "0.6966476", "0.675716", "0.660845", "0.64886093", "0.64738333", "0.6283368", "0.62260425", "0.62218636", "0.6201347", "0.6179128", "0.6161126", "0.61470264", "0.6145567", "0.61363554", "0.6126458", "0.6123005", "0.61078984", "0.61035335...
0.73412037
0
Assumes that each of the n input elements is an integer in the range 0 to k for some integer k
public static void countingSort(int[] array, int k) { int[] workStorage = new int[k + 1]; int[] result = new int[array.length]; for (int i = 0; i < array.length; i++) { workStorage[array[i]] = workStorage[array[i]] + 1; } for (int i = 0; i < k; i++) { workStorage[i + 1] = workStorage[i + 1] + workStorage[i]; } for (int i = array.length - 1; i >= 0; i--) { result[workStorage[array[i]] - 1] = array[i]; workStorage[array[i]] = workStorage[array[i]] - 1; } for (int i = 0; i < array.length; i++) { array[i] = result[i]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static ArrayList<ArrayList<Integer>> combine1(int n, int k) {\r\n\tArrayList<ArrayList<Integer>> result = new ArrayList<ArrayList<Integer>>();\r\n\tif (n < 1 || k < 1) {\r\n\t return result;\r\n\t}\r\n\tif (n < k) {\r\n\t return result;\r\n\t}\r\n\tif (k == 1) {\r\n\t for (int i = 1; i <= n; i++) {...
[ "0.7319114", "0.72423595", "0.7160667", "0.7083634", "0.70693564", "0.7063191", "0.70236063", "0.69188255", "0.68660134", "0.68209726", "0.68173313", "0.6691898", "0.6633013", "0.6619681", "0.656778", "0.65668106", "0.655025", "0.6518116", "0.65143067", "0.65028304", "0.64942...
0.0
-1
Check if a currency could be available for the given locale.
public static boolean localeSupportsCurrencyRetrieval (@Nullable final Locale aLocale) { return aLocale != null && aLocale.getCountry () != null && aLocale.getCountry ().length () == 2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasCurrency();", "boolean hasCurrencyCode();", "boolean hasCurrencyConstant();", "boolean hasLocale();", "public boolean isSetCurrency()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(CURRENCY$10) != 0;\n }\n ...
[ "0.72586244", "0.6808766", "0.6592708", "0.64132535", "0.64117557", "0.6277317", "0.6155287", "0.6151433", "0.6120811", "0.6033543", "0.60235935", "0.5671762", "0.5646923", "0.55921435", "0.55905044", "0.5588712", "0.5579091", "0.55767024", "0.5535671", "0.5415472", "0.539500...
0.7240117
1
Adopt the passed text value according to the requested decimal separator.
@Nullable private static String _getTextValueForDecimalSeparator (@Nullable final String sTextValue, @Nonnull final EDecimalSeparator eDecimalSep, @Nonnull final EGroupingSeparator eGroupingSep) { ValueEnforcer.notNull (eDecimalSep, "DecimalSeparator"); ValueEnforcer.notNull (eGroupingSep, "GroupingSeparator"); final String ret = StringHelper.trim (sTextValue); // Replace only, if the desired decimal separator is not present if (ret != null && ret.indexOf (eDecimalSep.getChar ()) < 0) switch (eDecimalSep) { case COMMA: { // Decimal separator is a "," if (ret.indexOf ('.') > -1 && eGroupingSep.getChar () != '.') { // Currency expects "," but user passed "." return StringHelper.replaceAll (ret, '.', eDecimalSep.getChar ()); } break; } case POINT: { // Decimal separator is a "." if (ret.indexOf (',') > -1 && eGroupingSep.getChar () != ',') { // Pattern contains no "," but value contains "," return StringHelper.replaceAll (ret, ',', eDecimalSep.getChar ()); } break; } default: throw new IllegalStateException ("Unexpected decimal separator [" + eDecimalSep + "]"); } return ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setDecimalSeparator(String decimalSeparator) {\n\t\tthis.decimalSeparator = decimalSeparator;\n\t\trequestRepaint();\n\t}", "public void setDecimalSeparator(char decSep)\r\n {\r\n m_decimalSeparator = decSep;\r\n }", "public static TextFormatter soloDecimales() {\r\n DecimalFormatSy...
[ "0.65182686", "0.65147406", "0.6141453", "0.6066366", "0.593134", "0.5922321", "0.5801452", "0.5789569", "0.57544065", "0.5647937", "0.56298876", "0.5553773", "0.5523267", "0.5521636", "0.5469127", "0.5450157", "0.5449471", "0.54254395", "0.54092354", "0.533518", "0.52944165"...
0.6717054
0
Constructor for the bin claw
public BinClaw( PlasmaDoubleSolenoid solen, DigitalInput topSwitch, DigitalInput botSwitch ) { solenoid = solen; motor1 = new Talon( Constants.BIN_MOTOR_PORT ); topLimitSwitch = topSwitch; botLimitSwitch = botSwitch; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Binary() { \n\t_decNum = 0;\n\t_binNum = \"0\";\n }", "public SmartBin() {\n items = new ItemType[7];\n curWeight = 0;\n curArrayIndex = 0;\n binNumber = \"SM\" + generateBinNumber();\n }", "public Binary( int n ) {\n\t_decNum = n;\n\t_binNum = decToBin(n);\n }", "...
[ "0.74702716", "0.6796388", "0.66518843", "0.66424245", "0.66361886", "0.6364595", "0.6292284", "0.6281987", "0.62780964", "0.6210843", "0.6140244", "0.6139339", "0.61266345", "0.61151266", "0.6112886", "0.61106986", "0.6103802", "0.60913116", "0.6070378", "0.6014087", "0.6009...
0.0
-1
Raise the claw. The claw will keep going until told otherwise
public void up() { motor1.set( Constants.CLAW_MOTOR_SPEED ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void chew() {\n MessageUtility.logSound(name,\"Bleats and Stomps its legs, then chews\");\n }", "public void raiseFoodFlag(){\n\t\tif(foodFlag != true && amountWorms > 0){\n\t\t\tfoodFlag = true;\n\t\t\tsw.getInstance(this);\n\t\t\tamountWorms--;\n\t\t\tAquaFrame.initWormStatus(am...
[ "0.67241305", "0.63670385", "0.6189121", "0.6181196", "0.6171663", "0.6165449", "0.6157402", "0.6146658", "0.6137977", "0.6131366", "0.60959", "0.60522974", "0.6032906", "0.6008876", "0.5951194", "0.59223706", "0.5889118", "0.58760834", "0.58754444", "0.5860245", "0.58550024"...
0.0
-1
Lowers the claw. The claw will keep going until told otherwise
public void down() { motor1.set( -Constants.CLAW_MOTOR_SPEED ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void chew() {\n MessageUtility.logSound(name,\"Bleats and Stomps its legs, then chews\");\n }", "public void sleep() {\n hunger += 1;\n fatigue = 0;\n\n if (isHungry()) {\n mood -= 1;\n } else {\n mood += 1;\n }\n\n i...
[ "0.73152936", "0.6528626", "0.6422481", "0.63983244", "0.63968104", "0.6360375", "0.6307921", "0.6218004", "0.62108105", "0.6197091", "0.61928856", "0.61830986", "0.6175561", "0.6162193", "0.6158049", "0.6114942", "0.61102515", "0.61056775", "0.6101818", "0.609825", "0.608974...
0.0
-1
Stop the claw from moving any more
public void stop() { motor1.set( Constants.CLAW_MOTOR_STOPPED ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void stopMoving()\n {\n mouthPosition = 0;\n }", "public void stopMovement() {\r\n this.canMove = false;\r\n }", "public void stopMovement() {\n this.movementComposer.stopMovement();\n }", "public void forceStop() {\r\n\t\tchaseObj = false;\r\n\t}", "public static vo...
[ "0.7944375", "0.7518561", "0.740571", "0.70077837", "0.6986479", "0.69814247", "0.69432855", "0.67426103", "0.66788787", "0.667237", "0.66265976", "0.66236985", "0.6620983", "0.6590545", "0.6583095", "0.6553033", "0.65449864", "0.65363675", "0.6527928", "0.65273106", "0.65038...
0.6119203
55
Move the claw all the way to the top until it triggers its top limit switch
public boolean goAllUp() { if ( topLimitSwitch.get() ) { stop(); } else { up(); } return topLimitSwitch.get(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void climbWall() {\n\t\t// TODO Auto-generated method stub\n\t\tthis.goUpWall();\n\t\tthis.goAcrossWall();\n\t\tthis.goDownWall();\n\t}", "private void moveToWall() {\n\t\t// TODO Auto-generated method stub\n\t\t// if front is clear then keep moving\n\t\twhile (this.frontIsClear()) {\n\t\t\tthis.move();\...
[ "0.6526372", "0.6298553", "0.62494177", "0.61146617", "0.6013537", "0.5973304", "0.58496207", "0.5783184", "0.5770197", "0.57549894", "0.5745936", "0.57399523", "0.5734878", "0.57287014", "0.5716069", "0.56953925", "0.5679775", "0.5669275", "0.56646234", "0.5644416", "0.56427...
0.0
-1
Move the claw down until it triggers its bottom limit switch
public boolean goAllDown() { if ( botLimitSwitch.get() ) { stop(); } else{ down(); } return botLimitSwitch.get(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void climbWall() {\n\t\t// TODO Auto-generated method stub\n\t\tthis.goUpWall();\n\t\tthis.goAcrossWall();\n\t\tthis.goDownWall();\n\t}", "private void moveUpDown(int Height) {\n d = Math.random();\n if (d < 0.1 && getY() + wolfHeight <= Height - Height / 40) setY(getY() + Height / 40);\n ...
[ "0.6921082", "0.6572769", "0.65190613", "0.648986", "0.6390527", "0.634318", "0.6326985", "0.6326331", "0.6279128", "0.6260914", "0.6248881", "0.62260145", "0.61811787", "0.6146626", "0.6133949", "0.61225444", "0.6121157", "0.6115693", "0.6108014", "0.60915744", "0.6075992", ...
0.0
-1
Returns FirefoxWebDriverFactory by default
public static WebDriverFactory getFactory(){ return new FirefoxWebDriverFactory(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public WebDriver getWebDriver() {\n return new FirefoxDriver();\n }", "private static WebDriver getFirefoxriver() {\n\t\treturn null;\n\t}", "SeleniumFactory getSeleniumFactory();", "public static WebDriver firefox()\r\n\t{\r\n\t\tSystem.setProperty(\"webdriver.gecko.driver\",System....
[ "0.8032703", "0.80317926", "0.77226764", "0.7544254", "0.7526562", "0.7510234", "0.73706627", "0.7251637", "0.6976836", "0.67561764", "0.6756054", "0.6641602", "0.6609919", "0.65906715", "0.64828223", "0.6439888", "0.63394636", "0.63102186", "0.63005704", "0.6266071", "0.6179...
0.9112095
0
Constants Attributes Static Constructors
public NullLoggerPlugin () { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Constants() {\n }", "private Constants() {\n }", "public Constants() {\n }", "private Constants() {\n\n }", "private Constants(){\n }", "private Const() {\n }", "private LabelUtilsConstants() {}", "private RBACConstants() {\r\n }", "protected NConstants() {\n }", "...
[ "0.81348723", "0.81348723", "0.809952", "0.80390376", "0.80181783", "0.77579564", "0.7642892", "0.7535713", "0.7525212", "0.75085336", "0.7472472", "0.7463645", "0.7445151", "0.7417962", "0.7408616", "0.73714465", "0.7371125", "0.7357548", "0.73446333", "0.73012537", "0.72667...
0.0
-1
Title: Shop Dao Description: Copyright: Copyright (c)2011 Company: com.yl.pay
public interface ShopService { //根据ID查询 public Shop findById(Long id); //根据网点编号查询 public Shop findByShopNo(String shopNo); //创建 public Shop create(Shop shop); //更新 public Shop update(Shop shop); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface ImplementShoppingDao {\n\n\n public Shopping selectShoppingById(int id);\n\n /**\n * 通过板块plate查询Article\n *\n * @return Article对象集合\n */\npublic List<Shopping> selectShoppingAllshop();\n\n /**\n * 添加商品\n * @param shopping\n * @return\n */\n public boolea...
[ "0.5930139", "0.59078234", "0.5894404", "0.5788471", "0.5753051", "0.57235646", "0.57003576", "0.5653907", "0.5645448", "0.5624108", "0.5594809", "0.55904686", "0.5577918", "0.5549347", "0.55397886", "0.5524881", "0.55133224", "0.5512706", "0.55012894", "0.5481588", "0.548158...
0.0
-1
Checks if the app has permission to write to device storage If the app does not has permission then the user will be prompted to grant permissions
public static void verifyStoragePermissions(Activity activity) { // Check if we have write permission int permission = ActivityCompat.checkSelfPermission(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE); if (permission != PackageManager.PERMISSION_GRANTED) { // We don't have permission so prompt the user ActivityCompat.requestPermissions( activity, PERMISSIONS_STORAGE, REQUEST_EXTERNAL_STORAGE ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isWriteStorageAllowed() {\n int result = ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE);\n\n //If permission is granted returning true\n if (result == PackageManager.PERMISSION_GRANTED)\n return true;\n\n //If permission is...
[ "0.80978596", "0.7868145", "0.7785685", "0.77488697", "0.7585788", "0.75046337", "0.7502121", "0.74765444", "0.7466121", "0.74404854", "0.74297476", "0.7409631", "0.7323182", "0.7323018", "0.73108876", "0.7241619", "0.72250366", "0.7206764", "0.71786505", "0.7166873", "0.7163...
0.6787792
61
Parse an NdefMessage include all record (textRecord, UriRecord)
public static List<ParsedNdefRecord> parse(NdefMessage message) { return getRecords(message.getRecords()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testParsing() throws Exception {\n Message message = new Message(\"8=FIX.4.2\\0019=40\\00135=A\\001\"\n + \"98=0\\001384=2\\001372=D\\001385=R\\001372=8\\001385=S\\00110=96\\001\",\n DataDictionaryTest.getDictionary());\n \n assertHeaderField(message, \"F...
[ "0.6296985", "0.5828975", "0.58258253", "0.581327", "0.5572361", "0.55409455", "0.54454833", "0.53741354", "0.53180325", "0.52916396", "0.5277943", "0.523872", "0.5226581", "0.52078754", "0.5187093", "0.5139745", "0.51371354", "0.51360804", "0.51315206", "0.51311255", "0.5116...
0.7416919
0
Produce events that can be sent into the eventBus.
public interface EventBusProducer { void post(final Answer answer); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void transmitEvents(){\n Log.info(\"Transmitting Events\", EventShare.class);\n for(Entry<Class, List<EventTrigger>> eventGroup: HandlerRegistry.getHandlers().entrySet()){\n String annotation = eventGroup.getKey().getName();\n for(EventTrigger trigger : eventGroup.getValu...
[ "0.63816494", "0.6193212", "0.6067004", "0.5970595", "0.59702307", "0.5939835", "0.58748573", "0.58462924", "0.5833316", "0.57680327", "0.5767944", "0.57488847", "0.56799036", "0.566277", "0.5658286", "0.5642642", "0.56086504", "0.5580137", "0.5538653", "0.5522616", "0.551588...
0.52388436
47
get comment to see
public static List<Comment> getCommentByMB(int idtargetmicroblog) throws SQLException { List<Comment> comments = new ArrayList<Comment>(); Connection c = DriverManager.getConnection(connectionString,dbUsername, dbPassword); PreparedStatement ps = null; ResultSet rs = null; try { /*List focusingIdusers = getAllFocusingIdusers(iduser); for(int focusingIduser:focusingIdusers){ focusingIduser }*/ ps = c.prepareStatement(GetCommentByMB);//prepare the statement according to the SQL statement. ps.setInt(1, idtargetmicroblog); rs = ps.executeQuery();//Execute the Query //get data line by line. //stops if rs.next() is false, which means no more lines available while (rs.next()) { int idcomment = rs.getInt("idcomment"); String txt = rs.getString("txt"); int idpublisher = rs.getInt("idpublisher"); //int idtargetmicroblog = rs.getInt("idtargetmicroblog"); Timestamp time = rs.getTimestamp("time"); String publishernickname = rs.getString("publishernickname"); //add this User to the list comments.add(new Comment(idcomment, txt,idpublisher, idtargetmicroblog, time,publishernickname)); } } catch (SQLException e) { e.printStackTrace(); } finally { //Notice!Always close the connection after using. if (rs != null) { rs.close(); } if (ps != null) { ps.close(); } if (c != null) { c.close(); } } return comments; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getComment();", "String getComment();", "public String getComment();", "public String getComment();", "public String getComment();", "public String getComment();", "public String getComment();", "public String getComment();", "java.lang.String getComments();", "public final String getComme...
[ "0.8589733", "0.8589733", "0.824988", "0.824988", "0.824988", "0.824988", "0.824988", "0.824988", "0.8016154", "0.78757244", "0.78679794", "0.7858242", "0.78535295", "0.77946013", "0.77946013", "0.77946013", "0.77946013", "0.77946013", "0.77946013", "0.77946013", "0.7739255",...
0.0
-1
Encode common menu item configuration.
static void encodeItemConfig(Formatter fmt, FacesContext context, UIComponent item, String text) { String icon = getItemIcon(context, item); String styleClass = (String)item.getAttributes().get("styleClass"); String disabledClass = (String)item.getAttributes().get("disabledClass"); String activeClass = (String)item.getAttributes().get("activeClass"); fmt.format("text:%s", HtmlEncoder.enquote(text, '\'')); fmt.format(",plugins:new Ext.ux.plugins.MenuItemPlugin()"); if (icon != null) fmt.format(",icon:%s", HtmlEncoder.enquote(icon, '\'')); if (HtmlRenderer.isDisabled(item)) fmt.format(",disabled:true"); if (styleClass != null) fmt.format(",itemCls:'%s'", styleClass); if (disabledClass != null) fmt.format(",disabledClass:'%s'", disabledClass); if (activeClass != null) fmt.format(",activeClass:'%s'", activeClass); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setSharedMenuItemStrings()\r\n {\r\n debug(\"setSharedMenuItemStrings() - assigning string values\");\r\n // Build a Menu and Menuitems for Inserting and Deleting Watch Lists\r\n addNewWatchListCmd =\r\n (addNewWatchListCmd == null) ? getString(\"WatchListTableModule.edit_menu.insert_wa...
[ "0.5257674", "0.50026006", "0.49863255", "0.497345", "0.49024972", "0.48737353", "0.48552683", "0.47931182", "0.47875917", "0.47786695", "0.47682256", "0.47676736", "0.47496846", "0.47440782", "0.47427365", "0.47277683", "0.47267693", "0.47124735", "0.47094074", "0.47093382", ...
0.6787664
0
encode body of component to get inner text
static String getInnerItemText(FacesContext context, UIComponent item) { ResponseWriter curWriter = context.getResponseWriter(); StringWriter strWriter = new StringWriter(); ResponseWriter bufWriter = curWriter.cloneWithWriter(strWriter); try { context.setResponseWriter(bufWriter); for (UIComponent kid : item.getChildren()) { kid.encodeAll(context); } context.setResponseWriter(curWriter); } catch (IOException ex) { throw new FacesException(ex); } return strWriter.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@DISPID(-2147417083)\n @PropGet\n java.lang.String outerText();", "@DISPID(-2147417085)\n @PropGet\n java.lang.String innerText();", "public static String encodeComponent(UIComponent component, FacesContext context) {\n FastStringWriter output = new FastStringWriter();\n ResponseWriter origin...
[ "0.6253634", "0.616753", "0.6093692", "0.6088882", "0.6088882", "0.6088882", "0.6088882", "0.6088882", "0.6088882", "0.6081948", "0.6081948", "0.6081948", "0.6081948", "0.6081948", "0.6081948", "0.6081948", "0.6081948", "0.60238045", "0.59959334", "0.5992281", "0.59187555", ...
0.59264904
20
Created by vitaliy on 22.04.17.
public interface MessageConstants { public static String WRONG_DATA="Wrong data!!!Try again:"; public static String INPUT_ADDRESS="Input address: "; public static String INPUT_PHONE="Input phone nummber:"; public static String INPUT_NICKNAMME="Input nickname:"; public static String Input_EMAIL="Input email:"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpubli...
[ "0.57551473", "0.5675498", "0.5636096", "0.5537745", "0.5526978", "0.5492709", "0.5492709", "0.5482239", "0.5448311", "0.54456145", "0.54404116", "0.5427322", "0.5412908", "0.5400134", "0.5397338", "0.5394746", "0.5381879", "0.5365525", "0.5360716", "0.5360235", "0.53562015",...
0.0
-1
TODO Autogenerated method stub
public ActionForward deleteRepeatFpkj(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { String sql="delete from skq_fpkj where fphm in (select fphm from skq_fpkj group by fphm having count(fphm) > 1) and sid not in (select min(sid) from skq_fpkj group by fphm having count(fphm )>1)"; System.out.println(sql); Query.updateField(sql); try { response.getWriter().print("删除成功!"); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public ActionForward deleteRepeatFpkjmx(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { String nsrwjbm=request.getParameter("nsrwjbm"); String startdate=request.getParameter("startdate"); String enddate=request.getParameter("enddate"); String sql="delete from skq_fpkj where nsrwjbm='"+nsrwjbm+"' and kprq>'"+startdate+" 00:00:00' and kprq<'"+enddate+" 23:59:59'"; System.out.println(sql); int count= Query.updateField(sql); try { response.getWriter().print("共删除"+count+"条数据!"); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1