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 |
|---|---|---|---|---|---|---|
Creates new form OpenImgs | public OpenImgs(IFramesTaker collectionTaker, BufferedImage[] images) {
this.framesTaker = collectionTaker;
initComponents();
initAdvancedComponents();
framePanel.setFrame(new Frame(images[0],GameInvariants.FRAMES_VERSION));
imgs = images;
massCenterPanel.setFramePanel(framePanel);
colorPanel.setFramePanel(framePanel);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void openImageFile(ImageActions action) {\n\t\tsetImageHolder(action, RGPTUIUtil.getImageFile(this));\r\n\t}",
"private void openFileChoose() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResul... | [
"0.6140373",
"0.5965086",
"0.5953548",
"0.5852877",
"0.57802135",
"0.5745877",
"0.57257473",
"0.56963676",
"0.5692352",
"0.56855017",
"0.56795394",
"0.56627387",
"0.56608886",
"0.56398034",
"0.560671",
"0.5605453",
"0.55808824",
"0.5567779",
"0.5544373",
"0.5541775",
"0.55381... | 0.52606654 | 69 |
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. //GENBEGIN:initComponents | private void initComponents() {
okBut = new javax.swing.JButton();
jLabel5 = new javax.swing.JLabel();
scroller = new gui.Scroller();
massCenterPanel = new gui.HotSpotPanel();
stripPanel = new gui.StripPanel();
cancelBut = new javax.swing.JButton();
colorPanel = new gui.ColorPanel();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setTitle("Opening images");
setLocationByPlatform(true);
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosed(java.awt.event.WindowEvent evt) {
formWindowClosed(evt);
}
});
okBut.setText(" Ok ");
okBut.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
okButActionPerformed(evt);
}
});
jLabel5.setText("First Frame preview");
massCenterPanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
stripPanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
cancelBut.setText("Canccel");
cancelBut.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cancelButActionPerformed(evt);
}
});
colorPanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(okBut)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(cancelBut))
.addComponent(colorPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(massCenterPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(8, 8, 8))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(stripPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(21, 21, 21)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(scroller, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addContainerGap())
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addComponent(jLabel5)
.addGap(107, 107, 107))))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
.addContainerGap()
.addComponent(stripPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(massCenterPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(11, 11, 11)
.addComponent(colorPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(okBut)
.addComponent(cancelBut)))
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
.addGap(22, 22, 22)
.addComponent(jLabel5)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(scroller, javax.swing.GroupLayout.DEFAULT_SIZE, 407, Short.MAX_VALUE)))
.addContainerGap())
);
pack();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public Form() {\n initComponents();\n }",
"public TorneoForm() {\n initComponents();\n }",
"public GUIForm() { \... | [
"0.7392533",
"0.7392533",
"0.7392533",
"0.7352533",
"0.7332257",
"0.7330854",
"0.7295613",
"0.7266173",
"0.7225978",
"0.721564",
"0.7159253",
"0.71552503",
"0.71511376",
"0.71417224",
"0.7137128",
"0.71343374",
"0.7121387",
"0.7119814",
"0.7113422",
"0.7111982",
"0.70884943",... | 0.0 | -1 |
POST /suggestions : Create a new suggestion. | @PostMapping("/suggestions")
public ResponseEntity<Suggestion> createSuggestion(@Valid @RequestBody Suggestion suggestion) throws URISyntaxException {
log.debug("REST request to save Suggestion : {}", suggestion);
if (suggestion.getId() != null) {
throw new BadRequestAlertException("A new suggestion cannot already have an ID", ENTITY_NAME, "idexists");
}
Suggestion result = suggestionService.save(suggestion);
return ResponseEntity.created(new URI("/api/suggestions/" + result.getId()))
.headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))
.body(result);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\r\n\tpublic void testNewSuggestionPage() {\n\t\tdriver.get(suggestionsUrl);\r\n\t\tassertThat(driver.getPageSource()).contains(\"Home\", \"Suggestions\", \"New suggestion\", \"Logged as generic user\",\r\n\t\t\t\t\"No suggestions\");\r\n\t\tassertThat(driver.getPageSource()).doesNotContain(\"ID\");\r\n\t\t//... | [
"0.5962069",
"0.58463997",
"0.5482561",
"0.5430666",
"0.54066014",
"0.5371965",
"0.5357876",
"0.53438026",
"0.53300095",
"0.52674454",
"0.51088864",
"0.5068408",
"0.5046869",
"0.5008323",
"0.49499083",
"0.48514178",
"0.46820962",
"0.46678513",
"0.46589628",
"0.46588197",
"0.4... | 0.74331003 | 0 |
GET /suggestions : get all the suggestions. | @GetMapping("/suggestions")
public ResponseEntity<List<Suggestion>> getAllSuggestions(Pageable pageable) {
log.debug("REST request to get a page of Suggestions");
Page<Suggestion> page = suggestionService.findAll(pageable);
HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, "/api/suggestions");
return ResponseEntity.ok().headers(headers).body(page.getContent());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@GET(\"w/api.php?action=opensearch&format=json&suggest&redirects=resolve\")\n Call<JsonElement> getSuggestionsFromSearch(@Query(\"search\") String search);",
"void findSuggestions(String query) {\n \t\tif (suggestionsLoaderClient != null) {\n \t\t\tif (query.length() == 0) {\n \t\t\t\tsuggestionsLoaderClient.... | [
"0.655209",
"0.6389889",
"0.61496836",
"0.6136232",
"0.6114904",
"0.6086102",
"0.59199005",
"0.57528925",
"0.5701125",
"0.55869496",
"0.5565645",
"0.55221635",
"0.5402285",
"0.5372361",
"0.536616",
"0.5359987",
"0.5301759",
"0.5268057",
"0.5266926",
"0.52653813",
"0.52487016"... | 0.6984977 | 0 |
GET /suggestions/:id : get the "id" suggestion. | @GetMapping("/suggestions/{id}")
public ResponseEntity<Suggestion> getSuggestion(@PathVariable Long id) {
log.debug("REST request to get Suggestion : {}", id);
Optional<Suggestion> suggestion = suggestionService.findOne(id);
return ResponseUtil.wrapOrNotFound(suggestion);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@RequestMapping(value=\"suggestion\",method=RequestMethod.GET)\n @ResponseBody\n public Map<String, Object> getSuggestion(Long classId){\n try {\n return evaluateService.getAdviceAndDataForClass(classId);\n } catch (IOException e) {\n e.printStackTrace();\n retur... | [
"0.6678231",
"0.63406193",
"0.6201944",
"0.61422914",
"0.6022517",
"0.58546346",
"0.58172446",
"0.55625933",
"0.5557041",
"0.5541042",
"0.5530785",
"0.5524688",
"0.55099875",
"0.55019385",
"0.5500596",
"0.54911387",
"0.5490574",
"0.5445714",
"0.5412802",
"0.5398752",
"0.53397... | 0.8650579 | 0 |
DELETE /suggestions/:id : delete the "id" suggestion. | @DeleteMapping("/suggestions/{id}")
public ResponseEntity<Void> deleteSuggestion(@PathVariable Long id) {
log.debug("REST request to delete Suggestion : {}", id);
suggestionService.delete(id);
return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void deleteTrackerSearches(final Integer id);",
"@RequestMapping(method = RequestMethod.DELETE, value = \"/{id}\")\r\n public ResponseObject delete(@PathVariable(\"id\") Long id) {\r\n return candidateService.delete(id);\r\n }",
"@GetMapping(\"/suggestions/{id}\")\r\n public ResponseEntity<Sugg... | [
"0.6642384",
"0.6445906",
"0.64362746",
"0.6368895",
"0.6355952",
"0.63297206",
"0.63061565",
"0.6299734",
"0.6273185",
"0.6273185",
"0.6273185",
"0.6273185",
"0.6273185",
"0.6250686",
"0.6216473",
"0.62139404",
"0.6155079",
"0.6153591",
"0.61464137",
"0.61455035",
"0.6145503... | 0.875027 | 0 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_actionbar, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {... | [
"0.7246102",
"0.7201358",
"0.7194834",
"0.7176498",
"0.71066517",
"0.7039537",
"0.7037961",
"0.70112145",
"0.70094734",
"0.69807225",
"0.6944953",
"0.69389373",
"0.6933199",
"0.6916928",
"0.6916928",
"0.6891486",
"0.68831646",
"0.68754137",
"0.68745375",
"0.68621665",
"0.6862... | 0.0 | -1 |
ResponseEntity class's Member Integer code, String message, Object data. For response format. | @Override
public Response toResponse(Exception e) {
ResponseEntity<Exception> re = new ResponseEntity<>(e, HttpStatus.INTERNAL_SERVER_ERROR);
logger.error("errorResponse", e); // logging stack trace.
return this.errorResponse(HttpStatus.INTERNAL_SERVER_ERROR.value(), re, e);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ResponseEntity<Object> failBusiness(String code, String message) {\n GeneralResponse<Object> responseObject = new GeneralResponse<>();\n ResponseStatus responseStatus = new ResponseStatus();\n responseStatus.setCode(code);\n responseStatus.setMessage(message);\n responseOb... | [
"0.62888074",
"0.6192637",
"0.61780906",
"0.60734165",
"0.5998122",
"0.5952756",
"0.58868355",
"0.57773876",
"0.5736533",
"0.5693289",
"0.5673206",
"0.56680655",
"0.5623689",
"0.5609657",
"0.5577202",
"0.557518",
"0.555895",
"0.5539766",
"0.5532409",
"0.5483592",
"0.54758817"... | 0.0 | -1 |
Update information of a user. | void update(User user); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void updateUser(User user) {\n\t\t\r\n\t}",
"public void update(User user);",
"public void updateUser(Person user) {\n\t\t\n\t}",
"void updateUser(@Nonnull User user);",
"void updateUserById(String username, User userData);",
"@Override\n\tpublic void updateUser(User pUser) {\n\t\t\n\t}",
"@Over... | [
"0.8363444",
"0.8280603",
"0.81133723",
"0.81133133",
"0.7986808",
"0.79436815",
"0.79026294",
"0.7900156",
"0.7896484",
"0.78898686",
"0.78317887",
"0.7824176",
"0.7796876",
"0.77901745",
"0.77165675",
"0.768214",
"0.7668369",
"0.7656946",
"0.76510334",
"0.7646377",
"0.76103... | 0.8213185 | 2 |
Find a user by user_id. | User findUserById(int id); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic User findUser(int id) {\n\n\t\tUser user = em.find(User.class, id);\n\n\t\treturn user;\n\t}",
"@Override\r\n\tpublic User findByIdUser(Integer id) {\n\t\treturn userReposotory.findById(id).get();\r\n\t}",
"@Override\n\tpublic User findUserByUserId(long id) {\n\t\treturn userDao.getUserByUs... | [
"0.80609196",
"0.7956252",
"0.79257476",
"0.78917974",
"0.7886413",
"0.7814875",
"0.7810865",
"0.77894324",
"0.7788833",
"0.7788544",
"0.7780274",
"0.77407956",
"0.7732287",
"0.7722151",
"0.7719006",
"0.77162063",
"0.76918477",
"0.76834816",
"0.7683177",
"0.76616615",
"0.7658... | 0.75419486 | 27 |
Find a user by user_name which is unique in database table. | User findUserByName(String name); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean findUserBYName(String name);",
"public boolean findUserIsExist(String name) {\n\t\treturn false;\r\n\t}",
"public User findUser(String name) {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic Userinfo findbyname(String name) {\n\t\treturn userDAO.searchUserByName(name);\r\n\t}",
"@Override\... | [
"0.73270774",
"0.71640915",
"0.7050234",
"0.6983268",
"0.6880525",
"0.68680984",
"0.68615484",
"0.6853779",
"0.68407965",
"0.684074",
"0.6835107",
"0.6808258",
"0.6732918",
"0.6718588",
"0.6718588",
"0.6681137",
"0.66499794",
"0.66499597",
"0.66343844",
"0.6608891",
"0.660465... | 0.70677525 | 2 |
Get some users in random. | List<User> getRandomUsers(List<User> uList, int num); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public User getRandom () {\n\t\treturn User.find(\n\t\t \"user_id != ? and online = ? order by rand()\", this.user_id, true\n\t\t).first();\n\t}",
"public String getRandomUser(TreeMap<String, Double> userlist)\r\n \t{\r\n \t\t//TODO key und value tauschen und bei gleicher punktzahl vorauswahltreffen\r\n \t\tT... | [
"0.75693524",
"0.6431957",
"0.63686585",
"0.6307791",
"0.6253337",
"0.5908931",
"0.58864766",
"0.58817214",
"0.58556527",
"0.58367014",
"0.58367014",
"0.5832504",
"0.5822325",
"0.58213156",
"0.581842",
"0.5808879",
"0.57995576",
"0.57982427",
"0.5791735",
"0.5787123",
"0.5784... | 0.78144056 | 0 |
Judge whether user exists. | boolean isUserExist(String username, String password); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean isUserExists() {\n\t\treturn KliqDataStore.isUserExists(this.mobileNumber, null);\r\n\t}",
"public boolean existsUser(String username);",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasU... | [
"0.83447886",
"0.82914",
"0.8118913",
"0.8118913",
"0.8118913",
"0.8118913",
"0.8118913",
"0.8118913",
"0.8118913",
"0.80376995",
"0.7998642",
"0.79527074",
"0.786238",
"0.78411734",
"0.7783564",
"0.7716957",
"0.7695472",
"0.76904726",
"0.76904726",
"0.76904726",
"0.76904726"... | 0.76001406 | 42 |
Judge whether username exists. | boolean isUsernameExist(String username); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Boolean isUsernameExist(String username);",
"public boolean userNameExist(String username);",
"boolean hasUsername();",
"boolean hasUsername();",
"boolean hasUsername();",
"boolean hasUsername();",
"boolean hasUsername();",
"boolean hasUsername();",
"boolean exists(String username);",
"boo... | [
"0.8773806",
"0.87459457",
"0.8580703",
"0.8580703",
"0.8580703",
"0.8580703",
"0.8580703",
"0.8580703",
"0.83789915",
"0.8365309",
"0.83504885",
"0.8286903",
"0.81041396",
"0.8072686",
"0.7951141",
"0.7904971",
"0.78932875",
"0.7747772",
"0.77089924",
"0.7670245",
"0.7623531... | 0.8772719 | 1 |
Judge whether email exists. | boolean isEmailExist(String email); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasEmail();",
"boolean hasEmail();",
"boolean hasEmail();",
"boolean hasEmail();",
"boolean hasEmail();",
"Boolean checkEmailAlready(String email);",
"@Override\n public boolean isUserEmailExists(String email) {\n User user = getUserByEmail(email);\n return user != null && user... | [
"0.8265403",
"0.8265403",
"0.8265403",
"0.8265403",
"0.8265403",
"0.8239534",
"0.8057976",
"0.7999893",
"0.79895836",
"0.7947837",
"0.7934075",
"0.7934075",
"0.78521717",
"0.7839827",
"0.7823469",
"0.78186744",
"0.7789408",
"0.7743284",
"0.77052194",
"0.7680001",
"0.7644749",... | 0.87201107 | 0 |
Judge whether user has collected this video. | boolean isCollected(User user, String video_id); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasVideo();",
"public boolean hasVideo() {\n\t\treturn this.recordingProperties.hasVideo();\n\t}",
"public boolean isChiefCaptured(){\n Chief chief = establishChief();\n return chief == null;\n }",
"public boolean hasBeenAcquired(){\r\n\t\treturn !(acquiredBy == null);\r\n\t}",
"pu... | [
"0.6842876",
"0.6554807",
"0.62965727",
"0.6200545",
"0.6174175",
"0.60725623",
"0.6058568",
"0.6039393",
"0.603376",
"0.60231286",
"0.5993365",
"0.5948703",
"0.5930046",
"0.5881015",
"0.58621114",
"0.5856962",
"0.58380955",
"0.5791107",
"0.5780442",
"0.57780725",
"0.5767097"... | 0.8063417 | 0 |
Add a video to video_collection. | void addVideoCollection(User user, String video_id); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void addVideo(String videoId) {\n\t\taddVideo(videoId, -1, -1);\n\t}",
"Builder addVideo(VideoObject value);",
"public boolean addVideo(Video newVideo)throws NullPointerException;",
"@Override\n public Media addVideo(Media media) {\n try {\n return mediaDao.addVideo... | [
"0.7204205",
"0.71368176",
"0.68295246",
"0.67709064",
"0.6699789",
"0.66843176",
"0.6603902",
"0.65484405",
"0.6430092",
"0.6342106",
"0.62397707",
"0.62296665",
"0.62296665",
"0.61915123",
"0.6189416",
"0.617332",
"0.6098756",
"0.6077697",
"0.6077697",
"0.6076762",
"0.59808... | 0.7587911 | 0 |
Remove a video form user's collection. | void removeVideoFromCollection(User user, String video_id); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void dropCollection() {\n\t\tif (mongoTemplate.collectionExists(User.class)) {\n\t\t\tmongoTemplate.dropCollection(User.class);\n\t\t}\n\t}",
"@POST\n\t@Path(\"removefromcollec\")\n\tpublic Response removeFromCollection(JsonMyMovie movie) {\n\t\tUsermovie um = new Usermovie();\n\t\tUsermovieP... | [
"0.6647765",
"0.6595808",
"0.657547",
"0.6083721",
"0.5966173",
"0.594107",
"0.5871198",
"0.58388054",
"0.58185786",
"0.58080304",
"0.5796367",
"0.5707999",
"0.57071954",
"0.57009196",
"0.56723917",
"0.56723917",
"0.56713516",
"0.5626858",
"0.5626611",
"0.5618135",
"0.5616522... | 0.8589425 | 0 |
Add play record of a user. | void addPlayRecord(User user, String video_id); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addPlaylist(int id, int user_id, String name) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_ID, id);\n values.put(KEY_HOST, host);\n values.put(KEY_USER_ID, user_id);\n values.put(KEY_NAME, ... | [
"0.6373324",
"0.6232763",
"0.5922624",
"0.58439",
"0.58366275",
"0.58366275",
"0.5824821",
"0.58236337",
"0.58069956",
"0.5801636",
"0.57492095",
"0.5720555",
"0.5706237",
"0.57043254",
"0.5663328",
"0.56549066",
"0.5634149",
"0.55655944",
"0.55570006",
"0.5527463",
"0.551986... | 0.80386096 | 0 |
say if the bounded shape will be fill or not construct a new bounded Shape | public MyBoundedShape(Point point1 , Point point2 , Color myColor , boolean myFill) throws IllegalArgumentException{
super(point1, point2, myColor);
if((point1.getX() >= point2.getX()) || (point1.getY() >= point2.getY())){
throw new IllegalArgumentException();
}
isFill = myFill;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public EpsShape(Shape shape, boolean filled) {\n\t\tsuper();\n\t\tthis.shape=shape;\n\t\tthis.filled=filled;\n\t}",
"public boolean isShouldFillShape() {\n return this.shouldFillShape;\n }",
"protected abstract boolean isShapeSimple();",
"public void fillShape(Shape shape);",
"boolean hasFillBeha... | [
"0.69782376",
"0.68064684",
"0.67533237",
"0.6640691",
"0.63842344",
"0.6364451",
"0.6293179",
"0.6063399",
"0.6006978",
"0.59054583",
"0.59008706",
"0.58590364",
"0.57899624",
"0.5781911",
"0.57382363",
"0.5723572",
"0.5698368",
"0.5687997",
"0.56712186",
"0.56628335",
"0.56... | 0.61278147 | 7 |
Return boolean that say if shape is fill or not | public boolean getIsFill(){
return isFill;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isShouldFillShape() {\n return this.shouldFillShape;\n }",
"boolean hasFillBehavior();",
"protected boolean isShapeFilled(Plot plot, int series, int item, double x, double y) {\n return false;\n }",
"public boolean isFillArea() {\n\t\treturn fillArea;\n\t}",
"boolean getFil... | [
"0.8429954",
"0.7930161",
"0.7922565",
"0.76332587",
"0.72480243",
"0.72019315",
"0.71165144",
"0.70256716",
"0.6993169",
"0.68147117",
"0.67540187",
"0.67233217",
"0.67166346",
"0.6713804",
"0.665263",
"0.6647226",
"0.6584226",
"0.6550518",
"0.64794505",
"0.6465034",
"0.6424... | 0.6903424 | 9 |
set p1 use method of class point to check x and y of the point | public void setP1(Point point){
if((point.getX() >= getP2().getX()) || (point.getY() >= getP2().getY())){
throw new IllegalArgumentException();
}
super.setP1(point);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setP1( Point p1 ){\n this.p1=p1;\n }",
"public Point getPoint1() {\r\n return p1;\r\n }",
"public Point getP1(){\n return this.p1;\n }",
"public MyPoint1(double x, int y) {\n this.x = x;\n this.y = y;\n }",
"public MyPoint1 (double x, double y) {}",
"public... | [
"0.800689",
"0.7517842",
"0.7349548",
"0.72427166",
"0.69724643",
"0.6965503",
"0.6906672",
"0.68560386",
"0.6817478",
"0.6766763",
"0.67528576",
"0.67524034",
"0.6750588",
"0.6746079",
"0.6655167",
"0.6627406",
"0.6617752",
"0.6612724",
"0.66079986",
"0.66013235",
"0.6568114... | 0.7872134 | 1 |
set p2 use method of class point to check x and y of the point | public void setP2(Point point){
if((point.getX() <= getP1().getX()) || (point.getY() <= getP1().getY())){
throw new IllegalArgumentException();
}
super.setP2(point);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setP2( Point p2 ){\n this.p2=p2;\n }",
"public Point getP2(){\n return this.p2;\n }",
"public Point2D(Point2D point){\n \n //on peut faire point.x et point.y puisqu'on est dans la classe\n this.x = point.x;\n this.y = point.y;\n ... | [
"0.7827229",
"0.7392833",
"0.7242746",
"0.7140987",
"0.707805",
"0.6923418",
"0.6873705",
"0.6849709",
"0.6826338",
"0.6813389",
"0.6781208",
"0.67276996",
"0.66738886",
"0.6662422",
"0.6644368",
"0.6608876",
"0.65605944",
"0.6553061",
"0.655177",
"0.654406",
"0.65334046",
... | 0.776914 | 1 |
abstract method selfPaint(Graphics g) | public abstract void selfPaint(Graphics g); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void paint(Graphics g);",
"public abstract void paint(Graphics2D g);",
"abstract public void draw(Graphics g);",
"public abstract void draw(Graphics g);",
"public abstract void draw(Graphics g);",
"public abstract void draw(Graphics g);",
"public abstract void draw(Graphics g);",
"pub... | [
"0.8558608",
"0.8232047",
"0.8196786",
"0.8115902",
"0.8115902",
"0.8115902",
"0.8115902",
"0.80977696",
"0.80673885",
"0.8056289",
"0.8056289",
"0.79763424",
"0.7899732",
"0.7855841",
"0.78534883",
"0.78513926",
"0.7798422",
"0.77788645",
"0.77569795",
"0.77569795",
"0.77467... | 0.954482 | 0 |
A manager that collects votes and tallies them. | public interface VoteManager<USER, ITEM, VOTE, TIME, ENTRY extends VoteEntry<USER, ITEM, VOTE, TIME>, RESPONSE> extends AbstractInputManager<ENTRY, RESPONSE> {
/**
* A wrapper around {@link #putEntry(Object)} to give a more meaningful name
* in context.
*
* @param entry the vote entry to put into the manager
* @return the response created as a result of the operation
* @see #putEntry(Object)
*/
default RESPONSE castVote(final ENTRY entry) {
return this.putEntry(entry);
}
/**
* Tallies the result of the collected votes.
*
* @return the response created as a result of the tally
*/
RESPONSE tally();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void doVote() {\n }",
"public VotingSystem() {\n votingList=new ArrayList<>();\n }",
"public void addVote() {\n this.votes++;\n }",
"public VotingSystem(){\n votingList = new ArrayList<Voting>();\n }",
"void votedOnPoll(String pollId);",
"public interface VoteSer... | [
"0.6392579",
"0.6266983",
"0.62654996",
"0.6252993",
"0.5951707",
"0.59251636",
"0.59004766",
"0.5806384",
"0.5784998",
"0.5714741",
"0.5714741",
"0.5692461",
"0.56660056",
"0.5559696",
"0.55546755",
"0.55362564",
"0.5526997",
"0.5519806",
"0.5512858",
"0.54557383",
"0.545284... | 0.6459487 | 0 |
Tallies the result of the collected votes. | RESPONSE tally(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void results() {\n\t\t// when the election is not closed,\n\t\ttry{\n\t\t\tMap<String,Integer> results = election.getResultsFromPolls();\n\t\t\t// when the election is closed,\n\n\t\t\tCollection<Integer> values = results.values();\n\t\t\tint totalVotes = 0;\n\n\t\t\tfor(Integer i:values){\n\t\t\t\ttotalVo... | [
"0.66945565",
"0.66608626",
"0.66608626",
"0.60932475",
"0.6033276",
"0.6033276",
"0.5960732",
"0.5951467",
"0.59459805",
"0.5911426",
"0.5882529",
"0.58801067",
"0.5864221",
"0.5746771",
"0.57100105",
"0.56775594",
"0.5673077",
"0.5623544",
"0.561543",
"0.55793375",
"0.55620... | 0.50000346 | 53 |
Creates new form DashboardFrame | public DashboardFrame() {
WebLookAndFeel.install ();
Controller = new Controller();
initComponents();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Frame createFrame();",
"Dashboard createDashboard();",
"public NewJFrame() {\n initComponents();\n IniciarTabla();\n \n \n // ingreso al githup \n \n }",
"public void createAndShowGUI(JFrame frame) {\n providerSideBar(frame.getContentPane(), pat);\n topBar... | [
"0.65315145",
"0.65038615",
"0.6409701",
"0.6341354",
"0.6334948",
"0.63040954",
"0.6251489",
"0.6172282",
"0.6145999",
"0.6141369",
"0.610782",
"0.60471606",
"0.60469717",
"0.6045165",
"0.6043762",
"0.60391366",
"0.6028262",
"0.6012977",
"0.60079676",
"0.5992508",
"0.5991233... | 0.71266556 | 0 |
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jTabbedPane4 = new javax.swing.JTabbedPane();
jPanel2 = new javax.swing.JPanel();
jPanel6 = new javax.swing.JPanel();
btnCreateEvent = new javax.swing.JButton();
jPanel3 = new javax.swing.JPanel();
jPanel7 = new javax.swing.JPanel();
btnEditPlayer = new javax.swing.JButton();
btnDeletePlayer = new javax.swing.JButton();
btnInsertPlayer = new javax.swing.JButton();
btnRefresh = new javax.swing.JButton();
jScrollPane2 = new javax.swing.JScrollPane();
tblPlayer = new javax.swing.JTable();
jPanel4 = new javax.swing.JPanel();
jPanel8 = new javax.swing.JPanel();
jScrollPane1 = new javax.swing.JScrollPane();
tblTeam = new javax.swing.JTable();
jPanel1 = new javax.swing.JPanel();
jPanel9 = new javax.swing.JPanel();
jPanel5 = new javax.swing.JPanel();
jPanel10 = new javax.swing.JPanel();
jPanel11 = new javax.swing.JPanel();
jPanel12 = new javax.swing.JPanel();
jMenuBar2 = new javax.swing.JMenuBar();
jMenu4 = new javax.swing.JMenu();
jMenuItem1 = new javax.swing.JMenuItem();
jMenu5 = new javax.swing.JMenu();
jMenu6 = new javax.swing.JMenu();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("Application Dashboard");
setBackground(new java.awt.Color(255, 255, 255));
setName("Administrator Dashboard"); // NOI18N
setPreferredSize(new java.awt.Dimension(880, 500));
jPanel6.setBackground(new java.awt.Color(255, 255, 255));
btnCreateEvent.setText("New Event");
btnCreateEvent.setMaximumSize(new java.awt.Dimension(74, 78));
btnCreateEvent.setMinimumSize(new java.awt.Dimension(74, 78));
btnCreateEvent.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnCreateEventActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
jPanel6.setLayout(jPanel6Layout);
jPanel6Layout.setHorizontalGroup(
jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel6Layout.createSequentialGroup()
.addContainerGap()
.addComponent(btnCreateEvent, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(774, Short.MAX_VALUE))
);
jPanel6Layout.setVerticalGroup(
jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
.addContainerGap()
.addComponent(btnCreateEvent, javax.swing.GroupLayout.DEFAULT_SIZE, 78, Short.MAX_VALUE)
.addContainerGap())
);
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 419, Short.MAX_VALUE))
);
jTabbedPane4.addTab("Dashboard", jPanel2);
jPanel7.setBackground(new java.awt.Color(255, 255, 255));
btnEditPlayer.setText("Edit");
btnEditPlayer.setMaximumSize(new java.awt.Dimension(74, 78));
btnEditPlayer.setMinimumSize(new java.awt.Dimension(74, 78));
btnEditPlayer.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnEditPlayerActionPerformed(evt);
}
});
btnDeletePlayer.setText("Delete");
btnDeletePlayer.setMaximumSize(new java.awt.Dimension(74, 78));
btnDeletePlayer.setMinimumSize(new java.awt.Dimension(74, 78));
btnDeletePlayer.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnDeletePlayerActionPerformed(evt);
}
});
btnInsertPlayer.setText("Insert");
btnInsertPlayer.setActionCommand("Insert");
btnInsertPlayer.setMaximumSize(new java.awt.Dimension(74, 78));
btnInsertPlayer.setMinimumSize(new java.awt.Dimension(74, 78));
btnInsertPlayer.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnInsertPlayerActionPerformed(evt);
}
});
btnRefresh.setText("Refresh Data");
btnRefresh.setMaximumSize(new java.awt.Dimension(74, 78));
btnRefresh.setMinimumSize(new java.awt.Dimension(74, 78));
btnRefresh.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnRefreshActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
jPanel7.setLayout(jPanel7Layout);
jPanel7Layout.setHorizontalGroup(
jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel7Layout.createSequentialGroup()
.addContainerGap()
.addComponent(btnEditPlayer, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(btnDeletePlayer, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(btnInsertPlayer, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(btnRefresh, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel7Layout.setVerticalGroup(
jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(btnEditPlayer, javax.swing.GroupLayout.DEFAULT_SIZE, 78, Short.MAX_VALUE)
.addComponent(btnDeletePlayer, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(btnInsertPlayer, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(btnRefresh, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap())
);
Object headerPlayer[]={"No","Player Id","Player Name","Player Team","Player Address","Player No","Player Age"};
DefaultTableModel dataPlayer = new DefaultTableModel(null, headerPlayer);
tblPlayer.setModel(dataPlayer);
try {
ResultSet rst = new Model().getStat().executeQuery("select pl.player_id,pl.player_name,pl.player_address,pl.player_age,pl.player_no,t.team_name "
+ "from tbl_player as pl inner join tbl_team as t on t.team_id = pl.player_team_id");
i = 1;
while(rst.next()){
String kolom[] = {""+i, rst.getString("player_id"), rst.getString("player_name"), rst.getString("team_name"), rst.getString("player_address"), rst.getString("player_no"), rst.getString("player_age")};
dataPlayer.addRow(kolom);
i++;
}
}catch (Exception e){
JOptionPane.showMessageDialog(null,"error:"+e.getMessage());
}
jScrollPane2.setViewportView(tblPlayer);
if (tblPlayer.getColumnModel().getColumnCount() > 0) {
tblPlayer.getColumnModel().getColumn(0).setMaxWidth(50);
}
javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 875, Short.MAX_VALUE)
);
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
jTabbedPane4.addTab("Player", jPanel3);
jPanel8.setBackground(new java.awt.Color(255, 255, 255));
javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
jPanel8.setLayout(jPanel8Layout);
jPanel8Layout.setHorizontalGroup(
jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 875, Short.MAX_VALUE)
);
jPanel8Layout.setVerticalGroup(
jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 100, Short.MAX_VALUE)
);
Object headerTeam[]={"No","Team Name","Team Description"};
DefaultTableModel dataTeam = new DefaultTableModel(null, headerTeam);
tblTeam.setModel(dataTeam);
try {
ResultSet rst = new Model().getStat().executeQuery("select * from tbl_team");
i = 1;
while(rst.next()){
String kolom[] = {""+i, rst.getString("team_name"), rst.getString("team_description")};
dataTeam.addRow(kolom);
i++;
}
}catch (Exception e){
JOptionPane.showMessageDialog(null,"error endi:"+e.getMessage());
}
jScrollPane1.setViewportView(tblTeam);
if (tblTeam.getColumnModel().getColumnCount() > 0) {
tblTeam.getColumnModel().getColumn(0).setMaxWidth(50);
}
javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
jPanel4.setLayout(jPanel4Layout);
jPanel4Layout.setHorizontalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jScrollPane1)
);
jPanel4Layout.setVerticalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 6, Short.MAX_VALUE))
);
jTabbedPane4.addTab("Team", jPanel4);
jPanel9.setBackground(new java.awt.Color(255, 255, 255));
javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
jPanel9.setLayout(jPanel9Layout);
jPanel9Layout.setHorizontalGroup(
jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 875, Short.MAX_VALUE)
);
jPanel9Layout.setVerticalGroup(
jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 100, Short.MAX_VALUE)
);
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 419, Short.MAX_VALUE))
);
jTabbedPane4.addTab("Supervisor", jPanel1);
jPanel10.setBackground(new java.awt.Color(255, 255, 255));
javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
jPanel10.setLayout(jPanel10Layout);
jPanel10Layout.setHorizontalGroup(
jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 875, Short.MAX_VALUE)
);
jPanel10Layout.setVerticalGroup(
jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 100, Short.MAX_VALUE)
);
javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
jPanel5.setLayout(jPanel5Layout);
jPanel5Layout.setHorizontalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
jPanel5Layout.setVerticalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createSequentialGroup()
.addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 419, Short.MAX_VALUE))
);
jTabbedPane4.addTab("History", jPanel5);
jPanel12.setBackground(new java.awt.Color(255, 255, 255));
javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
jPanel12.setLayout(jPanel12Layout);
jPanel12Layout.setHorizontalGroup(
jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 875, Short.MAX_VALUE)
);
jPanel12Layout.setVerticalGroup(
jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 100, Short.MAX_VALUE)
);
javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
jPanel11.setLayout(jPanel11Layout);
jPanel11Layout.setHorizontalGroup(
jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel12, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
jPanel11Layout.setVerticalGroup(
jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel11Layout.createSequentialGroup()
.addComponent(jPanel12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 419, Short.MAX_VALUE))
);
jTabbedPane4.addTab("Event", jPanel11);
jMenuBar2.setBackground(new java.awt.Color(255, 255, 255));
jMenuBar2.setBorder(javax.swing.BorderFactory.createEtchedBorder(java.awt.Color.gray, null));
jMenuBar2.setForeground(new java.awt.Color(255, 255, 255));
jMenu4.setText("File");
jMenuItem1.setText("Exit");
jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem1ActionPerformed(evt);
}
});
jMenu4.add(jMenuItem1);
jMenuBar2.add(jMenu4);
jMenu5.setText("Edit");
jMenuBar2.add(jMenu5);
jMenu6.setText("Setting");
jMenuBar2.add(jMenu6);
setJMenuBar(jMenuBar2);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jTabbedPane4)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jTabbedPane4)
);
pack();
setLocationRelativeTo(null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Form() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public frmRectangulo() {\n initComponents();\n }",
"public form() {\n ... | [
"0.73185146",
"0.7290127",
"0.7290127",
"0.7290127",
"0.7285798",
"0.7247533",
"0.7214021",
"0.720785",
"0.71952385",
"0.71891224",
"0.7184117",
"0.7158779",
"0.7147133",
"0.70921415",
"0.70792264",
"0.7055538",
"0.6986984",
"0.6976409",
"0.6955238",
"0.69525516",
"0.69452786... | 0.0 | -1 |
create a new layout from body.xml | @Override
public void createAndAttachView(int id, FrameLayout frame) {
LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);
View view = inflater.inflate(R.layout.sms_thread_list, frame, true);
smsThreadList = (ListView) view.findViewById(R.id.sms_thread_listview);
smsThreadListHeader = (TextView) view
.findViewById(R.id.sms_thread_list_header);
smsThreadListSendButton = (Button) view
.findViewById(R.id.sms_thread_list_send_button);
smsThreadListSendMessage = (EditText) view
.findViewById(R.id.sms_thread_list_send_message);
senderRowView = null;
senderRowTitle = null;
senderRowDescrip = null;
userRowView = null;
userRowTitle = null;
userRowDescrip = null;
smsThreadListSendButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View arg0) {
String send_message = smsThreadListSendMessage.getText()
.toString();
if (send_message.toString().trim() != "") {
SmsManager sms = SmsManager.getDefault();
sms.sendTextMessage(senderNumber, null, send_message, null,
null);
ContentValues values = new ContentValues();
values.put("address", senderNumber);
values.put("body", send_message);
getContentResolver().insert(
Uri.parse("content://sms/sent"), values);
fillSMSThreadList();
smsThreadListSendMessage.setText("");
}
}
});
fillSMSThreadList();
final int id_for_close = id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void createInitialLayout(IPageLayout layout) {\n \n\t}",
"NodeLayout createNodeLayout();",
"@Override\n public void createInitialLayout(IPageLayout layout) {\n defineActions(layout);\n defineLayout(layout);\n }",
"protected void createLayout() {\n\t\tthis.layout = new GridLayout();\n\t\tthis.l... | [
"0.6387721",
"0.5922503",
"0.5889811",
"0.5689626",
"0.5637818",
"0.5620979",
"0.5609673",
"0.55220854",
"0.54191136",
"0.5398427",
"0.53596073",
"0.5356157",
"0.5335998",
"0.5330136",
"0.53250843",
"0.5320688",
"0.53105825",
"0.529618",
"0.5260312",
"0.5245262",
"0.5221523",... | 0.0 | -1 |
TODO This is just a temporary solution. | private void fillUsingSingleSMS() {
String temp[] = new String[1];
temp[0] = messageBody;
smsThreadList.setAdapter(new ArrayAdapter<String>(this,
R.layout.sms_thread_list_sender_row_new,
R.id.sms_thread_list_row_descrip, temp));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"private void poetries() {\n\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"public void method_4270() {}",
"@Override\n public void func_104112_b() {\n ... | [
"0.5462627",
"0.5415558",
"0.53960425",
"0.53011405",
"0.5284442",
"0.5257463",
"0.52316487",
"0.518019",
"0.51735383",
"0.5163741",
"0.51580393",
"0.51214457",
"0.50927454",
"0.5084079",
"0.5061506",
"0.50362456",
"0.5006907",
"0.50020236",
"0.49855462",
"0.4980118",
"0.4980... | 0.0 | -1 |
//////////////SMSThread functions END///////////////////////////// every window is initially same size | @Override
public StandOutLayoutParams getParams(int id, Window window) {
WindowManager wm = (WindowManager) this
.getSystemService(this.WINDOW_SERVICE);
Display display = wm.getDefaultDisplay();
int width = display.getWidth(); // deprecated
int height = display.getHeight(); // deprecated
// TODO uncomment this code after deubugging
int msg_box_height = (int) (height - .5 * height);
int msg_box_width = (int) (width - 30);
// TODO remove after debugging the touch button
// int msg_box_height = (int) (100);
// int msg_box_width = (int) (100);
return new StandOutLayoutParams(id, msg_box_width, msg_box_height,
StandOutLayoutParams.CENTER, StandOutLayoutParams.TOP+200,
msg_box_width, msg_box_height);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void windowResized();",
"private void setWindowDefaultSize(UserPrefs prefs) {\n primaryStage.setHeight(prefs.getGuiSettings().getWindowHeight());\n\t\tTemplateClass.instrum(\"LineNumber: \",\"165\", \"Type: \",\"org.eclipse.jdt.core.dom.ExpressionStatement\", \"Method: \",\"setWindowDefaul... | [
"0.6893816",
"0.6495823",
"0.64602375",
"0.634007",
"0.63347596",
"0.6315641",
"0.62971145",
"0.6289835",
"0.62789196",
"0.62698853",
"0.62307215",
"0.6230042",
"0.62106603",
"0.6209539",
"0.6187448",
"0.6173021",
"0.61406463",
"0.61297345",
"0.61277163",
"0.6095288",
"0.6093... | 0.0 | -1 |
we want the system window decorations, we want to drag the body, we want the ability to hide windows, and we want to tap the window to bring to front | @Override
public int getFlags(int id) {
return StandOutFlags.FLAG_WINDOW_HIDE_ENABLE
| StandOutFlags.FLAG_WINDOW_EDGE_LIMITS_ENABLE
| StandOutFlags.FLAG_WINDOW_BRING_TO_FRONT_ON_TAP;
// return StandOutFlags.FLAG_WINDOW_HIDE_ENABLE
// | StandOutFlags.FLAG_WINDOW_BRING_TO_FRONT_ON_TAP;
// return StandOutFlags.FLAG_DECORATION_SYSTEM
// | StandOutFlags.FLAG_BODY_MOVE_ENABLE
// | StandOutFlags.FLAG_WINDOW_HIDE_ENABLE
// | StandOutFlags.FLAG_WINDOW_BRING_TO_FRONT_ON_TAP
// | StandOutFlags.FLAG_WINDOW_EDGE_LIMITS_ENABLE
// | StandOutFlags.FLAG_WINDOW_PINCH_RESIZE_ENABLE;
// return StandOutFlags.FLAG_DECORATION_MAXIMIZE_DISABLE
// |StandOutFlags.FLAG_DECORATION_SYSTEM
// |StandOutFlags.FLAG_DECORATION_RESIZE_DISABLE
// | StandOutFlags.FLAG_BODY_MOVE_ENABLE
// | StandOutFlags.FLAG_WINDOW_BRING_TO_FRONT_ON_TAP;
// return super.getFlags(id) | StandOutFlags.FLAG_BODY_MOVE_ENABLE
// | StandOutFlags.FLAG_WINDOW_FOCUSABLE_DISABLE;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic boolean setWindowToFront() {\n\t\treturn true;\r\n\t}",
"public void windowIconified(WindowEvent arg0)\n {\n ti.setImageAutoSize(true);\n\n try\n {\n SystemTray.getSystemTray().add(ti);\n ... | [
"0.6553603",
"0.6460027",
"0.64498067",
"0.63615537",
"0.6327623",
"0.6322341",
"0.6261287",
"0.6234709",
"0.60787183",
"0.6047585",
"0.6010701",
"0.60097796",
"0.6001159",
"0.6001159",
"0.6001159",
"0.599604",
"0.5986556",
"0.5986285",
"0.5986285",
"0.5986285",
"0.5986285",
... | 0.0 | -1 |
return an Intent that creates a new MultiWindow | @Override
public Intent getPersistentNotificationIntent(int id) {
return StandOutWindow.getShowIntent(this, getClass(), getUniqueId());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Intent getOpenInOtherWindowIntent();",
"void startNewActivity(Intent intent);",
"private void openNewActivity() {\n Intent intent = new Intent(this, NewNoteActivity.class);\n startActivityForResult(intent, SECOND_ACTIVITY_REQUEST);\n }",
"NativeWindow createWindow(CreationParams p);",
"pub... | [
"0.6488416",
"0.5927438",
"0.5839194",
"0.5707757",
"0.5672983",
"0.56087214",
"0.55392194",
"0.55360365",
"0.55054283",
"0.55049187",
"0.5495808",
"0.54249614",
"0.53643537",
"0.5363962",
"0.5350837",
"0.53354806",
"0.53307706",
"0.5320757",
"0.5318749",
"0.5308343",
"0.5283... | 0.0 | -1 |
return an Intent that restores the MultiWindow | @Override
public Intent getHiddenNotificationIntent(int id) {
return StandOutWindow.getShowIntent(this, getClass(), id);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Intent getOpenInOtherWindowIntent();",
"private Intent setUpBackIntent() {\n Intent intent = new Intent();\n\n intent.putExtra(Nanuda.EXTRA_GROUP, group);\n intent.putParcelableArrayListExtra(Nanuda.EXTRA_EXPENSES, expenses);\n\n return intent;\n }",
"private void refreshScreen()... | [
"0.6555593",
"0.600156",
"0.58451074",
"0.56997865",
"0.56653017",
"0.56590015",
"0.5643385",
"0.56323886",
"0.5623459",
"0.5603275",
"0.55753607",
"0.5541484",
"0.5537282",
"0.54783297",
"0.54698634",
"0.5469666",
"0.5464179",
"0.54601765",
"0.54533005",
"0.54508865",
"0.543... | 0.0 | -1 |
receive data from WidgetsWindow's button press to show off the data sending framework | public void onReceiveData(int id, int requestCode, Bundle data,
Class<? extends StandOutWindow> fromCls, int fromId) {
switch (requestCode) {
case ChatHeadWindow.HIDE_INTENT:
if (this.isExistingId(id)) {
this.hide(id);
}
break;
case ChatHeadWindow.CLOSE_INTENT:
if (this.isExistingId(id)) {
this.close(id);
}
break;
case ChatHeadWindow.SHOW_INTENT:
senderId = data.getLong("sender_id");
senderDisplayName = data.getString("sender_display_name");
senderNumber = data.getString("sender_number");
messageThreadId = data.getInt("message_thread_id");
messageBody = data.getString("message_body");
parentChatHeadId = fromId;
// if (this.getWindow(id).visibility == Window.VISIBILITY_GONE) {
// TODO remove the commented exception code for showing window when
// its open (StandOutWindow.java)
this.show(id);
break;
}
/*
* switch (requestCode) { case WidgetsWindow.DATA_CHANGED_TEXT: Window
* window = getWindow(id); if (window == null) { String errorText =
* String.format(Locale.US,
* "%s received data but Window id: %d is not open.", getAppName(), id);
* Toast.makeText(this, errorText, Toast.LENGTH_SHORT).show(); return; }
* String changedText = data.getString("changedText"); TextView status =
* (TextView) window.findViewById(R.id.id); status.setTextSize(20);
* status.setText("Received data from WidgetsWindow: " + changedText);
* break; default: Log.d("MultiWindow", "Unexpected data received.");
* break; }
*/
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void getDataButtonClicked() {\n\n //we will get data heree.....>>>\n getdata();\n\n\n }",
"private void setSendDataButton() {\n\t\tsetDataInDB();\n\t\tif (!alreadyPushed)\n\t\t\tsendDataToServer();\n\t\treturnOnWorkoutList();\n\t}",
"public void handleSendBtn(ActionEvent actionEvent) th... | [
"0.644578",
"0.6335883",
"0.62733924",
"0.62634736",
"0.62408906",
"0.6158586",
"0.6135014",
"0.6095867",
"0.60693717",
"0.6062254",
"0.6043219",
"0.60250664",
"0.6020946",
"0.6008994",
"0.5936289",
"0.58735657",
"0.58717775",
"0.58640426",
"0.58639467",
"0.5860141",
"0.58270... | 0.5585646 | 54 |
Verifies that only those servlets designated will preload when the application is initialized. SimpleGetServlet and each of its subclasses adds its classname to the 'initialized' context attribute. | public void testLoadOnStartup() throws Exception {
WebXMLString wxs = new WebXMLString();
wxs.addServlet( "servlet1", "one", Servlet1.class );
wxs.setLoadOnStartup( "servlet1" );
wxs.addServlet( "servlet2", "two", Servlet2.class );
wxs.addServlet( "servlet3", "three", Servlet3.class );
ServletRunner sr = new ServletRunner( toInputStream( wxs.asText() ) );
ServletUnitClient wc = sr.newClient();
InvocationContext ic = wc.newInvocation( "http://localhost/three" );
assertEquals( "Initialized servlets", "Servlet1,Servlet3", ic.getServlet().getServletConfig().getServletContext().getAttribute( "initialized" ) );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void testLoadOrder() throws Exception {\n WebXMLString wxs = new WebXMLString();\n wxs.addServlet( \"servlet1\", \"one\", Servlet1.class );\n wxs.setLoadOnStartup( \"servlet1\", 2 );\n wxs.addServlet( \"servlet2\", \"two\", Servlet2.class );\n wxs.setLoadOnStartup( \"... | [
"0.6896426",
"0.6353606",
"0.6306136",
"0.60947394",
"0.607446",
"0.60468674",
"0.60224736",
"0.60224736",
"0.6015112",
"0.59910387",
"0.59626496",
"0.5922739",
"0.58981234",
"0.5892981",
"0.58734196",
"0.5857002",
"0.58508056",
"0.58508056",
"0.58508056",
"0.58508056",
"0.58... | 0.705042 | 0 |
Verifies that servlets preload in the order specified. SimpleGetServlet and each of its subclasses adds its classname to the 'initialized' context attribute. | public void testLoadOrder() throws Exception {
WebXMLString wxs = new WebXMLString();
wxs.addServlet( "servlet1", "one", Servlet1.class );
wxs.setLoadOnStartup( "servlet1", 2 );
wxs.addServlet( "servlet2", "two", Servlet2.class );
wxs.setLoadOnStartup( "servlet2", 3 );
wxs.addServlet( "servlet3", "three", Servlet3.class );
wxs.setLoadOnStartup( "servlet3", 1 );
ServletRunner sr = new ServletRunner( toInputStream( wxs.asText() ) );
ServletUnitClient wc = sr.newClient();
InvocationContext ic = wc.newInvocation( "http://localhost/two" );
assertEquals( "Initialized servlets", "Servlet3,Servlet1,Servlet2", ic.getServlet().getServletConfig().getServletContext().getAttribute( "initialized" ) );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void testLoadOnStartup() throws Exception {\n WebXMLString wxs = new WebXMLString();\n wxs.addServlet( \"servlet1\", \"one\", Servlet1.class );\n wxs.setLoadOnStartup( \"servlet1\" );\n wxs.addServlet( \"servlet2\", \"two\", Servlet2.class );\n wxs.addServlet( \"servl... | [
"0.6980843",
"0.5991233",
"0.5936221",
"0.5916132",
"0.5833203",
"0.57642025",
"0.5659681",
"0.56177515",
"0.55468065",
"0.55458647",
"0.5525422",
"0.55250424",
"0.55250424",
"0.55233425",
"0.5511988",
"0.54930425",
"0.54690063",
"0.54569024",
"0.54569024",
"0.54569024",
"0.5... | 0.7506945 | 0 |
TODO Autogenerated method stub | public static void main(String[] args) {
Scanner obj=new Scanner(System.in);
System.out.println("Enter a number");
int n=obj.nextInt();
double ans=0;
int flag=0;
if(n==1||n==2)
{
System.out.println("Number is not prime.");
}
else
{
for(int i=2;i<n;i++)
{
if(n%i==0)
{
System.out.println("Number is not prime.");
flag=1;
break;
}
}
if(flag==0)
{
System.out.println("Number is prime.");
}
flag=0;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
Set the obstacle at a given grid position | public void setObstacle(int i, int j, int k) {
obstacle[i][j][k] = true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setObstacleCell(int row, int col, boolean obstacle) {\n if (obstacle && (in_start(row, col) || in_goal(row, col)))\n return;\n\n grid[row][col].setIsObstacle(obstacle);\n\n if (row >= 1) {\n grid[row - 1][col].setVirtualWall(obstacle); // bottom cel... | [
"0.72625077",
"0.69769615",
"0.689634",
"0.66742647",
"0.66725004",
"0.65810066",
"0.6555636",
"0.65236354",
"0.64672554",
"0.64476657",
"0.63914955",
"0.63726586",
"0.6322201",
"0.6321513",
"0.6317028",
"0.6308328",
"0.63082016",
"0.6306073",
"0.6221155",
"0.62210244",
"0.62... | 0.66653204 | 5 |
Set the depth values for the grid | public void setDepth(double[] depthValues) {
depth = depthValues;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setDepth(double aDepth);",
"private final void setDepth(int depth){\n\t\tthis.depth = depth;\n\t}",
"public native void setDepth(int depth) throws MagickException;",
"public void setDepth(double depth) {\n\t\t this.depth = depth;\n\t }",
"public void setDepth(int depth) {\r\n this.depth ... | [
"0.73266965",
"0.7277852",
"0.7065746",
"0.7058343",
"0.70542467",
"0.70436543",
"0.69968295",
"0.6742837",
"0.66607034",
"0.6652462",
"0.66476524",
"0.65339947",
"0.6522105",
"0.64167994",
"0.631863",
"0.62967545",
"0.6266603",
"0.62413573",
"0.6190024",
"0.6122878",
"0.6094... | 0.7362889 | 0 |
Calculate the nextstep velocity using the liddriven cavity problem conditions and tidal forcing | public void calculateNextStepVelocity(double currentTime) {
// Update the velocity components for the entire grid
for (int i = 1; i < gridSizeX - 1; i++) {
for (int j = 1; j < gridSizeY - 1; j++) {
for (int k = 1; k < gridSizeZ - 1; k++) {
if (!obstacle[i][j][k]) {
calculateNextStepVelocityCell(i, j, k, currentTime);
calculateNextStepPressureCell(i, j, k);
}
}
}
}
u = uNext;
v = vNext;
w = wNext;
p = pNext;
applyPressureCorrection();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void calcVelocity()\n\t{}",
"private void calculateNextStepVelocityCell(int i, int j, int k, double currentTime) {\n\n // Retrieve the velocity components and depth of the cell\n double ui = u[i][j][k];\n double vi = v[i][j][k];\n double wi = w[i][j][k];\n double curr... | [
"0.7024806",
"0.6864117",
"0.67386276",
"0.66430134",
"0.65489936",
"0.6414999",
"0.6395206",
"0.6340914",
"0.62892973",
"0.6256341",
"0.62497985",
"0.6023446",
"0.5968138",
"0.5927452",
"0.5890818",
"0.5889776",
"0.5875464",
"0.58692604",
"0.5862172",
"0.58594894",
"0.583455... | 0.66654944 | 3 |
Calculate the nextstep velocity of a single cell | private void calculateNextStepVelocityCell(int i, int j, int k, double currentTime) {
// Retrieve the velocity components and depth of the cell
double ui = u[i][j][k];
double vi = v[i][j][k];
double wi = w[i][j][k];
double currentDepth = depth[k];
// Calculate the grid
// spacing in the depth dimension
double deltaZPlus = (depth[k + 1] - currentDepth) / 2.0;
double deltaZMinus = (currentDepth - depth[k - 1]) / 2.0;
// Compute the gradients of velocity in each direction using central difference
// scheme
double du_dx = (u[i + 1][j][k] - u[i - 1][j][k]) / 2.0;
double dv_dy = (v[i][j + 1][k] - v[i][j - 1][k]) / 2.0;
double dw_dz = (w[i][j][k + 1] - w[i][j][k - 1]) / (deltaZPlus + deltaZMinus);
// Compute the Laplacian of velocity in each direction using central difference
// scheme
double d2u_dx2 = (u[i + 1][j][k] - 2 * ui + u[i - 1][j][k]) / Math.pow((deltaX), 2);
double d2v_dy2 = (v[i][j + 1][k] - 2 * vi + v[i][j - 1][k]) / Math.pow((deltaY), 2);
double d2w_dz2 = (w[i][j][k + 1] - 2 * wi + w[i][j][k - 1])
/ (Math.pow(deltaZPlus, 2) + Math.pow(deltaZMinus, 2));
// Retrieve the tidal forcing values at the current time step
double tidalForcingX = this.tidalForcingX.get(i, j, k, currentTime);
double tidalForcingY = this.tidalForcingY.get(i, j, k, currentTime);
// Compute the next-step velocities using the Navier-Stokes equations with tidal
// forcing
double next_u = ui
- (timeStep * (ui * du_dx + vi * dv_dy + wi * dw_dz) - (timeStep / fluidDensity) * du_dx * d2u_dx2)
+ tidalForcingX;
double next_v = vi
- (timeStep * (ui * du_dx + vi * dv_dy + wi * dw_dz) - (timeStep / fluidDensity) * dv_dy * d2v_dy2)
+ tidalForcingY;
double next_w = wi
- (timeStep * (ui * du_dx + vi * dv_dy + wi * dw_dz) - (timeStep / fluidDensity) * dw_dz * d2w_dz2);
// Update the velocity components of the cell
uNext[i][j][k] = next_u;
vNext[i][j][k] = next_v;
wNext[i][j][k] = next_w;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void calculateNextStepVelocity(double currentTime) {\n // Update the velocity components for the entire grid\n for (int i = 1; i < gridSizeX - 1; i++) {\n for (int j = 1; j < gridSizeY - 1; j++) {\n for (int k = 1; k < gridSizeZ - 1; k++) {\n if (!o... | [
"0.72012377",
"0.68885916",
"0.6825901",
"0.6786822",
"0.65216",
"0.6364649",
"0.63262004",
"0.62599313",
"0.6188974",
"0.6148514",
"0.6114428",
"0.6089085",
"0.607577",
"0.6058203",
"0.59491235",
"0.59280425",
"0.59276426",
"0.5925772",
"0.59035856",
"0.5895207",
"0.5890079"... | 0.7796229 | 0 |
Calculate the nextstep pressure of a single cell | private void calculateNextStepPressureCell(int i, int j, int k) {
// Retrieve the velocity components and pressure of the neighboring cells
double uEast = u[i + 1][j][k];
double uWest = u[i - 1][j][k];
double vNorth = v[i][j + 1][k];
double vSouth = v[i][j - 1][k];
double wUp = w[i][j][k + 1];
double wDown = w[i][j][k - 1];
// double pCenter = p[i][j][k]; // not used
double pEast = p[i + 1][j][k];
double pWest = p[i - 1][j][k];
double pNorth = p[i][j + 1][k];
double pSouth = p[i][j - 1][k];
double pUp = p[i][j][k + 1];
double pDown = p[i][j][k - 1];
double currentDepth = depth[k];
double deltaZPlus = (depth[k + 1] - currentDepth) / 2.0;
double deltaZMinus = (currentDepth - depth[k - 1]) / 2.0;
double deltaZ = deltaZPlus + deltaZMinus;
// Compute the next-step pressure using the Poisson equation
double next_p = ((pEast + pWest) / Math.pow(deltaX, 2) + (pNorth + pSouth) / Math.pow(deltaY, 2)
+ (pUp + pDown) / Math.pow(deltaZ, 2)
- ((uEast - uWest) / deltaX + (vNorth - vSouth) / deltaY + (wUp - wDown) / deltaZ) / timeStep)
/ (2 / (Math.pow(deltaX, 2)) + 2 / (Math.pow(deltaY, 2)) + 2 / (Math.pow(deltaZ, 2)));
// Update the pressure of the cell
pNext[i][j][k] = next_p;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Double getStep();",
"double getPressure();",
"float getStepPhaseShiftIncrement();",
"private double readPressureSample() {\n return 6 * randomPressureSampleSimulator.nextDouble() * randomPressureSampleSimulator.nextDouble();\n }",
"float getVoltageStepIncrementOutOfPhase();",
"private void calc... | [
"0.61532545",
"0.6005014",
"0.5863117",
"0.58232397",
"0.5793868",
"0.5790691",
"0.5787503",
"0.5748069",
"0.56083715",
"0.5454367",
"0.53691876",
"0.5354965",
"0.5354965",
"0.5354965",
"0.53240377",
"0.53156024",
"0.53091156",
"0.52101845",
"0.51571333",
"0.5105435",
"0.5093... | 0.76160604 | 0 |
Calculate the pressure correction using the pressure correction method | public void applyPressureCorrection() {
// Compute the pressure correction for the entire grid
for (int i = 1; i < gridSizeX - 1; i++) {
for (int j = 1; j < gridSizeY - 1; j++) {
for (int k = 1; k < gridSizeZ - 1; k++) {
if (!obstacle[i][j][k]) {
applyPressureCorrection(i, j, k);
}
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void applyPressureCorrection(int i, int j, int k) {\n double pEast = p[i + 1][j][k];\n double pWest = p[i - 1][j][k];\n double pNorth = p[i][j + 1][k];\n double pSouth = p[i][j - 1][k];\n double pUp = p[i][j][k + 1];\n double pDown = p[i][j][k - 1];\n double... | [
"0.6852019",
"0.59573793",
"0.58488435",
"0.57221335",
"0.5502799",
"0.5423212",
"0.5421483",
"0.5368298",
"0.5364528",
"0.5317064",
"0.5302923",
"0.52697825",
"0.52583927",
"0.52432954",
"0.5241577",
"0.52110523",
"0.5201154",
"0.52007127",
"0.51822",
"0.51520014",
"0.515031... | 0.6948371 | 0 |
Retrieve the pressure of the neighboring cells | private void applyPressureCorrection(int i, int j, int k) {
double pEast = p[i + 1][j][k];
double pWest = p[i - 1][j][k];
double pNorth = p[i][j + 1][k];
double pSouth = p[i][j - 1][k];
double pUp = p[i][j][k + 1];
double pDown = p[i][j][k - 1];
double deltaZ = (depth[k + 1] - depth[k - 1]) / 2;
// Compute the pressure correction using the pressure correction equation
double pressureCorrection = (pEast - pWest) / (2 * deltaX) + (pNorth - pSouth) / (2 * deltaY)
+ (pUp - pDown) / (2 * deltaZ);
// Apply the pressure correction to the velocity field
u[i][j][k] -= (pressureCorrection * timeStep) / fluidDensity;
v[i][j][k] -= (pressureCorrection * timeStep) / fluidDensity;
w[i][j][k] -= (pressureCorrection * timeStep) / fluidDensity;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void calculateNextStepPressureCell(int i, int j, int k) {\n // Retrieve the velocity components and pressure of the neighboring cells\n double uEast = u[i + 1][j][k];\n double uWest = u[i - 1][j][k];\n double vNorth = v[i][j + 1][k];\n double vSouth = v[i][j - 1][k];\n ... | [
"0.6714329",
"0.65401137",
"0.60169154",
"0.59637314",
"0.5918938",
"0.57487506",
"0.57099104",
"0.5616567",
"0.5565777",
"0.55269367",
"0.54338926",
"0.5422532",
"0.5418471",
"0.5401668",
"0.538398",
"0.53274226",
"0.5323941",
"0.52972203",
"0.52963626",
"0.5291947",
"0.5274... | 0.49212432 | 64 |
Combine both Immegrints and residents and send a list. | public ArrayList<Piece> getAllPieceOfCell() {
ArrayList<Piece> overAllList = new ArrayList<>(mImmegrintsList);
overAllList.addAll(mResidentQ);
return overAllList;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getResidues();",
"public List<Resident> getAllResidents();",
"com.google.protobuf.ByteString\n getResiduesBytes();",
"public ArrayList<Human> getResidents(){\n return this.residents;\n }",
"public List<String> actIppm(){\n List<String> script = new ArrayList<>();\n ... | [
"0.5329788",
"0.5135052",
"0.5063059",
"0.49136555",
"0.49111724",
"0.49043322",
"0.48482448",
"0.48481888",
"0.47373495",
"0.47363743",
"0.47285274",
"0.4707602",
"0.4700282",
"0.4669564",
"0.4668711",
"0.4665398",
"0.46483505",
"0.46341327",
"0.46330082",
"0.46041396",
"0.4... | 0.0 | -1 |
diff is difference between sums first n bits and last n bits respectively | static
int
countSeq(
int
n,
int
diff)
{
// We can't cover difference of more
// than n with 2n bits
if
(Math.abs(diff) > n)
return
0
;
// n == 1, i.e., 2 bit long sequences
if
(n ==
1
&& diff ==
0
)
return
2
;
if
(n ==
1
&& Math.abs(diff) ==
1
)
return
1
;
int
res =
// First bit is 0 & last bit is 1
countSeq(n-
1
, diff+
1
) +
// First and last bits are same
2
*countSeq(n-
1
, diff) +
// First bit is 1 & last bit is 0
countSeq(n-
1
, diff-
1
);
return
res;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int diff21(int n) {\n int dif = 21 - n;\n if (n > 21){\n dif = (n -21) * 2;\n }\n\n return dif;\n}",
"public int calculateDifference(int n) {\r\n\t\tdouble sumOfSquare=0;\r\n\t\tdouble diff=0;\r\n\t\tint squareOfSum=0;\r\n\t\tfor(int i=0;i<=n;i++) {\r\n\t\t\t//sum of square of number\r\n\t\t\tsumOf... | [
"0.60162306",
"0.5918595",
"0.5754399",
"0.5642644",
"0.55779713",
"0.5397041",
"0.5375853",
"0.5370198",
"0.5362022",
"0.5281736",
"0.52731556",
"0.5260478",
"0.5252748",
"0.52356184",
"0.5218049",
"0.5216897",
"0.51961744",
"0.5193686",
"0.5182649",
"0.5155477",
"0.5147791"... | 0.6323646 | 0 |
boolean indicating wether or not button has been clicked GameButton constructor | public GameButton(Texture tex, float x, float y, OrthographicCamera cam) {
this.tex = tex;
this.x = x;
this.y = y;
this.cam = cam;
width = tex.getWidth();
height = tex.getHeight();
lastTouch = new Vector3();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void checkStartNewGameButton() {\n\t\tif(mButtons[0].isVisible() && Gdx.input.justTouched()){\n\t\t\t// Grab the touch position, saved as a Vector3\n\t\t\tmLastTouch.set(Gdx.input.getX(), Gdx.input.getY(), 0);\n\t\t\tmCamera.unproject(mLastTouch); // Translates to game world coordinates\n\t\t\t// The butto... | [
"0.72117585",
"0.70834196",
"0.67746836",
"0.6699627",
"0.66379803",
"0.6598253",
"0.652155",
"0.65053385",
"0.64915186",
"0.64373636",
"0.6433658",
"0.64065075",
"0.6330682",
"0.6298824",
"0.6289744",
"0.6264314",
"0.6260151",
"0.6260151",
"0.6260151",
"0.6260151",
"0.625019... | 0.0 | -1 |
Get button's clicked status | public boolean isClicked() { return clicked; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean getButtonRelease(Buttons but);",
"public boolean getAButton() {\n\t\treturn getRawButton(A_Button);\n\t}",
"public boolean getBButton() {\n\t\treturn getRawButton(B_Button);\n\t}",
"public boolean getButtonPressed(Button button) {\n return getButtonPressed(button.getNumber());\n }",
"publ... | [
"0.6896171",
"0.6730492",
"0.67235017",
"0.6710328",
"0.66878176",
"0.6679955",
"0.664721",
"0.66182023",
"0.65961",
"0.65909356",
"0.65337956",
"0.65212846",
"0.64860636",
"0.6460635",
"0.64309156",
"0.64279366",
"0.6380178",
"0.63439554",
"0.6329841",
"0.63246274",
"0.63229... | 0.67051923 | 4 |
Updates button according to user actions | public void update(float dt) {
lastTouch.set(Gdx.input.getX(), Gdx.input.getY(), 0);
cam.unproject(lastTouch);
if(Gdx.input.justTouched() &&
lastTouch.x > x - width / 2 && lastTouch.x < x + width / 2 &&
lastTouch.y > y - height / 2 && lastTouch.y < y + height / 2) {
clicked = true;
}
else {
clicked = false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void buttonChangeStatus(ActionEvent actionEvent) {\n }",
"private void updateButtonsState() {\r\n ISelection sel = mTableViewerPackages.getSelection();\r\n boolean hasSelection = sel != null && !sel.isEmpty();\r\n\r\n mUpdateButton.setEnabled(mTablePackages.getItemCount() > 0);\r\n... | [
"0.6927085",
"0.6895211",
"0.68828315",
"0.6837726",
"0.67989856",
"0.67686886",
"0.676536",
"0.67438453",
"0.67275304",
"0.66945237",
"0.6670906",
"0.66573966",
"0.6650527",
"0.6649568",
"0.66312927",
"0.6628895",
"0.6626747",
"0.6618086",
"0.6605405",
"0.66027784",
"0.66024... | 0.0 | -1 |
draw button in sprite batch | public void render(SpriteBatch sb) {
sb.draw(tex, x - width / 2, y - height / 2);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void draw(SpriteBatch batch) {\n// If there is no image (word button)\n if (texture == null) {\n\n// If any menu cursor...\n for (MenuCursor cursor : Main.cursors) {\n\n// Is over the button, change the colour to the \"selected\" version\n i... | [
"0.7587109",
"0.7387989",
"0.7374278",
"0.7240585",
"0.7239397",
"0.71698457",
"0.6967569",
"0.6947714",
"0.6680623",
"0.6670478",
"0.6575404",
"0.65673715",
"0.65550536",
"0.6544661",
"0.6535151",
"0.6517745",
"0.65066636",
"0.6496491",
"0.6459217",
"0.64535296",
"0.6451618"... | 0.0 | -1 |
Disposes of button image | public void dispose(){
tex.dispose();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void closeImage() {\n\n\t}",
"@Override\n\tpublic void dispose() \n\t{\n\t\tbackground.dispose();\n\t\tplayBtn.dispose();\t\n\t}",
"public void dispose() {\n this.img.dispose();\n }",
"@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tdispose();\n\t\t\t\t}",
"@Over... | [
"0.72560185",
"0.6871528",
"0.68692505",
"0.67777824",
"0.6758232",
"0.6751032",
"0.6751032",
"0.67345023",
"0.67345023",
"0.67345023",
"0.67345023",
"0.6730833",
"0.6724206",
"0.6660438",
"0.66591156",
"0.6654877",
"0.6654877",
"0.6654877",
"0.6581293",
"0.6573862",
"0.65545... | 0.0 | -1 |
Initialises the layout for the frame. | private void initFrame() {
setLayout(new BorderLayout());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setupLayout() {\n // left empty for subclass to override\n }",
"private void setupLayout()\n {\n Container contentPane;\n\n setSize(300, 300); \n\n contentPane = getContentPane();\n\n // Layout this PINPadWindow\n }",
"public void init() {\n se... | [
"0.75576144",
"0.7504312",
"0.74532986",
"0.7354736",
"0.7311218",
"0.7307859",
"0.7271616",
"0.72172904",
"0.71272725",
"0.71083796",
"0.7092987",
"0.70643723",
"0.7046891",
"0.7016041",
"0.701457",
"0.70062864",
"0.70025724",
"0.68994236",
"0.68610775",
"0.68608975",
"0.685... | 0.7487546 | 2 |
Creates and assigns the panel for the buttons, setting the relevant actions for each button | private JPanel initButtonPanel() {
JPanel buttonPanel = new JPanel();
buttonPanel.setLayout(new FlowLayout(SwingUtilities.HORIZONTAL));
completeButton = new JButton(new AbstractAction("Complete") {
@Override
public void actionPerformed(ActionEvent e) {
task.setStatus(TaskStatus.COMPLETED);
dialog.setVisible(false);
}
});
buttonPanel.add(completeButton);
closeButton = new JButton(new AbstractAction("Close") {
@Override
public void actionPerformed(ActionEvent e) {
dialog.setVisible(false);
}
});
buttonPanel.add(closeButton);
return buttonPanel;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void createButtonsPanel() {\r\n Composite buttonsPanel = new Composite(this, SWT.NONE);\r\n buttonsPanel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));\r\n buttonsPanel.setLayout(new GridLayout(4, true));\r\n\r\n getButtonFromAction(buttonsPanel, \"New\", new NewA... | [
"0.80213624",
"0.7834703",
"0.7705287",
"0.75831664",
"0.75714684",
"0.75669223",
"0.75509334",
"0.74522114",
"0.7433989",
"0.7354928",
"0.73422766",
"0.73408616",
"0.73226327",
"0.7314871",
"0.72937304",
"0.7293564",
"0.72836065",
"0.726408",
"0.7256103",
"0.7253676",
"0.717... | 0.6695164 | 63 |
Defines whether a cell with given row and column index is editable directly by the user. In TaskerCLI the whole 'comments' column should be editable, which corresponds to the column with index 1. | @Override
public boolean isCellEditable(int rowIndex, int columnIndex) {
return columnIndex == 1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean isCellEditable(int row, int column) {\n return editable;\n }",
"@Override\n public boolean isCellEditable(int row, int column) {\n return editable;\n }",
"public boolean isCellEditable(int row, int column){\n return true;\n }",
"public bo... | [
"0.83561254",
"0.83561254",
"0.8249647",
"0.8205646",
"0.8204504",
"0.8199663",
"0.8195714",
"0.81539595",
"0.8147317",
"0.81331384",
"0.81160766",
"0.8111599",
"0.810365",
"0.80980814",
"0.8097728",
"0.8089781",
"0.8080516",
"0.8071225",
"0.80565816",
"0.8046728",
"0.8022963... | 0.7909957 | 43 |
This method splits a line from a comma separated values file into an array of strings | public static String[] splitLine(String line) {
StringBuffer buffer = new StringBuffer();
ArrayList<String> stockStrs = new ArrayList<String>();
char[] chars = line.toCharArray();
boolean inQuotes = false;
for (char ch: chars) {
if (inQuotes) {
if (ch == '"') {
inQuotes = false;
} else {
buffer.append(ch);
}
} else {
if (ch == '"') {
inQuotes = true;
} else if (ch == ',') {
stockStrs.add(buffer.toString());
buffer.delete(0, buffer.length());
} else {
buffer.append(ch);
}
}
}
stockStrs.add(buffer.toString());
String[] stockStrsArray = stockStrs.toArray(new String[stockStrs.size()]);
return stockStrsArray;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String[] splitLine(String line)\n\t{\n\t\treturn line.split(CSV_SEPARATOR);\n\t}",
"@Override\n protected void processLine(String line) {\n String[] lines = line.split(\",\");\n for (String l : lines) {\n data.add(l);\n }\n }",
"private List<String> read_level_row(... | [
"0.70933497",
"0.6928092",
"0.68053263",
"0.6757063",
"0.67359436",
"0.6623387",
"0.6575938",
"0.6561029",
"0.6406892",
"0.6351458",
"0.6336013",
"0.63036305",
"0.627799",
"0.6276479",
"0.6231198",
"0.6221276",
"0.62157875",
"0.61111265",
"0.60258603",
"0.59754837",
"0.592655... | 0.6681295 | 5 |
Highlights empty EditText fields and returns true if fields were highlighted, false otherwise. | @Override
public boolean highlightEmptyFields() {
boolean returnValue = false;
if (titleField.getText().toString().trim().isEmpty()) {
titleField.setError("This field cannot be empty");
returnValue = true;
}
if (descriptionField.getText().toString().trim().isEmpty()) {
descriptionField.setError("This field cannot be empty");
returnValue = true;
}
if (questionField.getText().toString().trim().isEmpty()) {
questionField.setError("This field cannot be empty");
returnValue = true;
}
if (answer1Field.getText().toString().trim().isEmpty()) {
answer1Field.setError("This field cannot be empty");
returnValue = true;
}
if (answer2Field.getText().toString().trim().isEmpty()) {
answer2Field.setError("This field cannot be empty");
returnValue = true;
}
if (answer3Field.getText().toString().trim().isEmpty()) {
answer3Field.setError("This field cannot be empty");
returnValue = true;
}
if (answer4Field.getText().toString().trim().isEmpty()) {
answer4Field.setError("This field cannot be empty");
returnValue = true;
}
if (answer5Field.getText().toString().trim().isEmpty()) {
answer5Field.setError("This field cannot be empty");
returnValue = true;
}
return returnValue;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean checkIfAllFieldsAreFilled(EditText[] editTexts) {\n\n boolean allFilled = true;\n\n for (EditText currentField : editTexts) {\n\n if (currentField.getText().toString().length() <= 0) {\n currentField.setBackground(ContextCompat.getDrawable(Objects.requireNonN... | [
"0.7086846",
"0.700864",
"0.65773684",
"0.65716136",
"0.65477365",
"0.6481",
"0.6437921",
"0.6389267",
"0.63498175",
"0.63304055",
"0.63190526",
"0.6316032",
"0.6307565",
"0.6302029",
"0.62824637",
"0.62767273",
"0.626057",
"0.6200189",
"0.61724466",
"0.6088689",
"0.6024354",... | 0.7543114 | 0 |
set some date, so we can clean it | @Test
public void testClean() {
setReferenceDate_openPopup_check();
assertCalendarInputEqualsTo("Jan 1, 2012 12:00");
// invoke clean key
keyboard.sendKeys(CLEAN_KEY);
// apply
Graphene.guardAjax(keyboard).sendKeys(Keys.ENTER);
// the input should be empty
assertCalendarInputEqualsTo("");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setDate(Date data);",
"public void setDate(Date date) {\n setDate(date, null);\n }",
"public void SetDate(Date date);",
"@Override\n\tprotected void setDate() {\n\n\t}",
"void unsetDate();",
"@Test\r\n\tpublic void testSetDate() {\n\t\tfail(\"Not yet implemented\");\r\n\t}",
"public void... | [
"0.7402274",
"0.7168842",
"0.7147282",
"0.7136948",
"0.7110411",
"0.7059645",
"0.6954044",
"0.69472724",
"0.69409126",
"0.69204444",
"0.6915322",
"0.6902076",
"0.6884517",
"0.6878861",
"0.6859003",
"0.68497634",
"0.68325675",
"0.6818439",
"0.68047464",
"0.6779245",
"0.6770798... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void reduce() {
} | {
"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 |
private Map _objs = new LinkedHashMap(); | @Nonnull
@Override
public Map<DoodId, Obj> getObjs() {
return _objs;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private <T extends Reference> void buildMap(Map<String, T> map, List<T> objects) {\n for (T candidateObject : objects) {\n String rid = candidateObject.getId();\n log.debug(\"...... caching RID: {}\", rid);\n map.put(rid, candidateObject);\n }\n }",
"protected Ma... | [
"0.6033894",
"0.59752154",
"0.5960367",
"0.5868073",
"0.5815894",
"0.5766468",
"0.57524186",
"0.57482576",
"0.5743257",
"0.5705193",
"0.5703235",
"0.5660658",
"0.56578594",
"0.565398",
"0.564899",
"0.56207436",
"0.5587893",
"0.55848193",
"0.5577402",
"0.5576773",
"0.5570658",... | 0.60680413 | 0 |
Used to define Map structures that have complex keys. | @SuppressWarnings({ "rawtypes" })
public DataClassDefinitionImpl(Class<? extends Map> mapClass, DataClassDefinition keyClassDefinition, DataClassDefinition elementClassDefinition) {
super(mapClass, keyClassDefinition, elementClassDefinition);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface ComplexKeyMap<K, V> extends Map<K, V> {\n\n}",
"public Rule simpleMapType()\n \t{\n \t\treturn sequence(nonSimpleMapTypes(), noNl(), SP_COL, noNl(), nonSimpleMapTypes(),\n \t\t\t\toptional(\n \t\t\t\t// Not enforcing [] because of problems with maps like this Str:int[\"\":5]\n \t\t\t\tsequence(n... | [
"0.7154947",
"0.6021446",
"0.5988447",
"0.5871319",
"0.5810503",
"0.5801294",
"0.5773447",
"0.5701238",
"0.56766546",
"0.5629418",
"0.5614787",
"0.55837905",
"0.5575247",
"0.54930407",
"0.54836303",
"0.5472649",
"0.54620224",
"0.5457952",
"0.53958815",
"0.5383928",
"0.5383168... | 0.53848594 | 19 |
TODO: should there be indexed collection concept? List: index is integer, map index is object ( therefore List is just special case of map?? ) | @Override
public Class<?> getKeyClass() {
return this.isCollection() && this.getKeyDataClassDefinition() != null?this.getKeyDataClassDefinition().getDataClass():null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface List extends Collection{\r\n\t/**\r\n\t * Returns the object that is stored in backing \r\n\t * list at position index.\r\n\t * @param index position of the element\r\n\t * @return element\r\n\t */\r\n\tObject get(int index);\r\n\t/**\r\n\t * Inserts (does not overwrite) the given value \r\n\t * a... | [
"0.6338603",
"0.6104033",
"0.60573477",
"0.60406506",
"0.59323025",
"0.59002566",
"0.5894424",
"0.5818003",
"0.5799476",
"0.5757783",
"0.57254237",
"0.56742114",
"0.56742114",
"0.56742114",
"0.5656376",
"0.5642815",
"0.56023127",
"0.5586396",
"0.5567665",
"0.556575",
"0.55162... | 0.0 | -1 |
JCVideoPlayerStandard player = (JCVideoPlayerStandard) findViewById(R.id.player_video); | private void initVideo(String videoPath) {
JCVideoPlayerStandard.startFullscreen(this, JCVideoPlayerStandard.class,
videoPath,"");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void playVideo() {\n }",
"private void setupPlayer() {\n\n\n\n Video video = createVideoFromUrl(\"https://sonyhdslive-lh.akamaihd.net/i/LIVELINEARCHANNELWAHSD_2@324771/index_100_av-p.m3u8?sd=10&rebase=on&id=AgC2SfL6YBG2JpMHMVl8BkTC0SpVbBy%2frYkaeUHMRu8inYQ3DHLx4I+pRLNhOPyxeLBTSrs2hL4lZw%3d%3d&hd... | [
"0.68102694",
"0.677308",
"0.66183674",
"0.6594399",
"0.6526425",
"0.64861494",
"0.647357",
"0.64245206",
"0.64156497",
"0.6380974",
"0.6342686",
"0.63133323",
"0.62560505",
"0.62274843",
"0.62168384",
"0.6213403",
"0.61935264",
"0.6186733",
"0.6162001",
"0.6156982",
"0.61501... | 0.66116595 | 3 |
/ / C O N S T R U C T O R / | public
HfsOPLibsAction()
{
super("HfsOPLibs", new VersionID("1.0.0"), "Temerity",
"Generates an OPlibraries file which specifies the OTLs to be loaded by Houdini.");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private USI_TRLT() {}",
"private static void cajas() {\n\t\t\n\t}",
"private void strin() {\n\n\t}",
"public UCharacterThreadTest()\n {\n }",
"public void mo21879u() {\n }",
"public void xuat() {\n\n\t}",
"private char toChar(int u)\r\n { \r\n return (char)(u + 64);\r\n }",
"pu... | [
"0.5552488",
"0.50764114",
"0.5062583",
"0.50257885",
"0.49900228",
"0.49886066",
"0.49172089",
"0.49145615",
"0.48942167",
"0.48754257",
"0.47966373",
"0.4772874",
"0.47481668",
"0.47258678",
"0.47254875",
"0.4716102",
"0.47157446",
"0.47141892",
"0.47048616",
"0.46877024",
... | 0.0 | -1 |
Creates a new instance. | public static GoldenCopy create(
final String snapshotName,
final String viewName,
final Instant valuationTime,
final CalculationResults calculationResults) {
return new GoldenCopy(snapshotName, viewName, valuationTime, calculationResults);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Instance createInstance();",
"public void create(){}",
"public Instance() {\n }",
"private Instantiation(){}",
"private Object createInstance() throws InstantiationException, IllegalAccessException {\n\t\treturn classType.newInstance();\n\t}",
"void create(T instance) throws IOException;",
"public v... | [
"0.7834167",
"0.72893584",
"0.70771503",
"0.7048765",
"0.70209944",
"0.6839274",
"0.67782235",
"0.6770133",
"0.67429745",
"0.6701039",
"0.6690158",
"0.6630354",
"0.66046286",
"0.6600776",
"0.6600776",
"0.6597608",
"0.6592152",
"0.6564594",
"0.65268713",
"0.652679",
"0.6475239... | 0.0 | -1 |
Returns a builder used to create an instance of the bean. | public static GoldenCopy.Builder builder() {
return new GoldenCopy.Builder();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Builder create() {\n\t\treturn new Builder();\n\t}",
"public static Builder create() {\n\t\treturn new Builder();\n\t}",
"public static Builder builder() {\n return new Builder();\n }",
"public static Builder builder() {\n return new Builder();\n }",
"public static Builder builder() {... | [
"0.76800627",
"0.76800627",
"0.74424213",
"0.74424213",
"0.74424213",
"0.740198",
"0.740198",
"0.740198",
"0.740198",
"0.73879284",
"0.73879284",
"0.73879284",
"0.73879284",
"0.73879284",
"0.73879284",
"0.73879284",
"0.73879284",
"0.73879284",
"0.73879284",
"0.73879284",
"0.7... | 0.0 | -1 |
Returns a builder that allows this bean to be mutated. | public Builder toBuilder() {
return new Builder(this);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Builder<X> toBuilder() {\n return new Builder<X>(this);\n }",
"@Contract(\" -> new\")\n public static @NotNull Builder getBuilder()\n {\n return new Builder();\n }",
"public static Builder builder(){ return new Builder(); }",
"public static Builder builder() {\n return new Build... | [
"0.7082287",
"0.69044983",
"0.68497646",
"0.6818486",
"0.6818486",
"0.6818486",
"0.6775444",
"0.6775444",
"0.6775444",
"0.6775444",
"0.67683727",
"0.67683727",
"0.67683727",
"0.67683727",
"0.67683727",
"0.67683727",
"0.67683727",
"0.67683727",
"0.67683727",
"0.67683727",
"0.6... | 0.7292235 | 6 |
TODO Autogenerated method stub | public static void main(String[] args) {
int input1=123,input2=456,input3=345,input4=5043;
String in1 = Integer.toString(input1);
String in2 = Integer.toString(input2);
String in3 = Integer.toString(input3);
String in4 = Integer.toString(input4);
StringBuilder obj = new StringBuilder();
obj.append(in1);
obj.append(in2);
obj.append(in3);
obj.append(in4);
String str = obj.toString();
char ch[] = str.toCharArray();
int count[] = new int[10];
for(int i = 0 ;i < ch.length;i++)
{
count[ Character.getNumericValue(ch[i]) ]++;
}
int max= 0,value=0;
for(int i = 0 ; i < count.length;i++)
{
if( max <= count[i])
{max = count[i];
value = i;
}
}
System.out.println(Arrays.toString(count ));
System.out.println(max);
System.out.println(value);
} | {
"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 returns the session user only if one exists, so check if it returns null or use the isUser method before. | public static Integer getUserIdFromSessionOrNull(HttpSession session) {
return (Integer) session.getAttribute(ATTRIBUTE_USER_ID);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic UtenteBase getSessionUser() {\n\t\tUtenteBase user = (UtenteBase) getThreadLocalRequest().getSession().getAttribute(\"user\");\n\t\treturn user;\n\t}",
"public User getLoggedInUser() throws NoUserLoggedInException{\r\n\t\tif(this.user != null){\r\n\t\t\treturn this.user;\r\n\t\t}//-if\r\n\t\t... | [
"0.76370865",
"0.74488705",
"0.73420966",
"0.72969365",
"0.72548026",
"0.71754634",
"0.7171022",
"0.71390957",
"0.70526844",
"0.6955734",
"0.69285023",
"0.69048786",
"0.6827729",
"0.6827729",
"0.6825037",
"0.68133837",
"0.67567694",
"0.67305535",
"0.67178756",
"0.6707775",
"0... | 0.66557735 | 24 |
This method returns the session pizzeria only if one exists, so check if it returns null or use the isPizzeria method before. | public static Integer getPizzeriaIdFromSessionOrNull(HttpSession session) {
return (Integer) session.getAttribute(ATTRIBUTE_PIZZERIA_ID);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasSession();",
"@Override\r\n public PhoenixSession getSession()\r\n {\n return null;\r\n }",
"Session getValidSession() {\n final Session session = sessionProvider.getActiveSession();\n // Only use session if it has auth token.\n if (session != null && session.get... | [
"0.62961954",
"0.6245051",
"0.621916",
"0.61651874",
"0.61065555",
"0.6078811",
"0.60202897",
"0.5990628",
"0.59684074",
"0.5947216",
"0.5935891",
"0.58797085",
"0.58797085",
"0.5857136",
"0.5844972",
"0.5817658",
"0.58057654",
"0.5778508",
"0.5774304",
"0.57640237",
"0.57597... | 0.7008224 | 0 |
1.Take FileSystemXmlApplicationContext which is implementations ApplicationContext interface In this we have to provide the relative configuration XML file | public static void main(String[] args) {
AbstractApplicationContext appContext = new FileSystemXmlApplicationContext("src/ApplicationMetaData.xml");
Employee employee = appContext.getBean("tcsEmployee", Employee.class);
//2.Print out Employee Bean
System.out.println("**************");
System.out.println("Employee Id::"+ employee.getEmployeeId());
System.out.println("Employee Name::" + employee.getEmployeeName());
System.out.println("**************");
appContext.close();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getApplicationContextPath();",
"public static void main(String[] args){\n ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(\"applicationContext.xml\");\n /*\n Check to see if the file exists\n File file = new File(\"src/main/java/applicationContext.xml\")... | [
"0.6533563",
"0.62009335",
"0.5992381",
"0.59843564",
"0.5965596",
"0.5901017",
"0.5719829",
"0.5707727",
"0.5705204",
"0.5631894",
"0.5624678",
"0.559824",
"0.55736494",
"0.55714047",
"0.5552406",
"0.5549763",
"0.55425906",
"0.5516014",
"0.5514452",
"0.55131805",
"0.5465933"... | 0.0 | -1 |
Inflate the layout for this fragment | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_market__cap__alert, container, false);
coins_spin = (Spinner) view.findViewById(R.id.market_cap_coins_spin);
curr_price = (TextView) view.findViewById(R.id.set_volume_price_text);
coins_spin.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
final String coins = coins_spin.getSelectedItem().toString().trim();
//connection
String URL = "https://cryptopricetracker.herokuapp.com/getCoinData";
JSONObject jsonBody2 = new JSONObject();
try {
jsonBody2.put("coin",coins);
} catch (JSONException e) {
e.printStackTrace();
}
final String mRequestBody2 = jsonBody2.toString();
final StringRequest jsObjRequest2 = new StringRequest(Request.Method.POST, URL, new Response.Listener<String>() {
@Override
public void onResponse(String response)
{
try
{
Log.i("response",response);
JSONObject jsonObject=new JSONObject(response);
final int Success = jsonObject.getInt("Success");
if(Success==1)
{
JSONObject data=jsonObject.getJSONObject("data");
curr_price.setText(""+data.getDouble("market_cap_usd"));
//Toast.makeText(getContext(), "Successfully Set Alert", Toast.LENGTH_SHORT).show();
}
else
{
Toast.makeText(getContext(), "Something Wrong Happens", Toast.LENGTH_SHORT).show();
}
}
catch (Exception e)
{
e.printStackTrace();
}
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
Log.i("error",new String(error.networkResponse.data));
}
})
{
@Override
public String getBodyContentType() {
return "application/json; charset=utf-8";
}
@Override
public byte[] getBody() throws AuthFailureError {
try {
return mRequestBody2 == null ? null : mRequestBody2.getBytes("utf-8");
} catch (UnsupportedEncodingException uee) {
VolleyLog.wtf("Unsupported Encoding while trying to get the bytes of %s using %s", mRequestBody2, "utf-8");
return null;
}
}
@Override
public Map<String, String> getHeaders() throws AuthFailureError {
HashMap<String, String> params = new HashMap<String, String>();
params.put("Content-Type","application/json");
return params;
}
};
jsObjRequest2.setRetryPolicy(new DefaultRetryPolicy(30000,DefaultRetryPolicy.DEFAULT_MAX_RETRIES, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));
MySingleton.getInstance(getActivity()).addToRequestQueue(jsObjRequest2);
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
});
curr_price = (TextView) view.findViewById(R.id.set_market_cap_price_text);
dec_value =(EditText) view.findViewById(R.id.market_cap_dec);
inc_value = (EditText) view.findViewById(R.id.market_cap_inc);
btnsave =(Button) view.findViewById(R.id.market_cap_alert_save_btn);
btnsave.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
do_market_cap_save_alert();
}
});
btncancel =(Button) view.findViewById(R.id.market_cap_alert_cancel_btn);
btncancel.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
do_market_cap_cancel_alert();
}
});
return view;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup... | [
"0.6739604",
"0.67235583",
"0.6721706",
"0.6698254",
"0.6691869",
"0.6687986",
"0.66869223",
"0.6684548",
"0.66766286",
"0.6674615",
"0.66654444",
"0.66654384",
"0.6664403",
"0.66596216",
"0.6653321",
"0.6647136",
"0.66423255",
"0.66388357",
"0.6637491",
"0.6634193",
"0.66251... | 0.0 | -1 |
Initialize the gyro. Calibrate the gyro by running for a number of samples and computing the center value. Then use the center value as the Accumulator center value for subsequent measurements. It's important to make sure that the robot is not moving while the centering calculations are in progress, this is typically done when the robot is first turned on while it's sitting at rest before the competition starts. | public void initGyro() {
result = new AccumulatorResult();
if (m_analog1 == null || m_analog2 == null) {
System.out.println("Null m_analog");
}
m_voltsPerDegreePerSecond = kDefaultVoltsPerDegreePerSecond;
m_analog1.setAverageBits(kAverageBits);
m_analog1.setOversampleBits(kOversampleBits);
m_analog2.setAverageBits(kAverageBits);
m_analog2.setOversampleBits(kOversampleBits);
double sampleRate = kSamplesPerSecond
* (1 << (kAverageBits + kOversampleBits));
AnalogInput.setGlobalSampleRate(sampleRate);
Timer.delay(1.0);
m_analog1.initAccumulator();
m_analog1.resetAccumulator();
m_analog2.initAccumulator();
m_analog2.resetAccumulator();
Timer.delay(kCalibrationSampleTime);
for(int i =0 ; i < mAnalogs.length; i++)
{
mAnalogs[i].getAccumulatorOutput(result);
m_centers[i]= (int) ((double) result.value / (double) result.count + .5);
m_offsets[i] = ((double) result.value / (double) result.count)
- m_centers[i];
mAnalogs[i].setAccumulatorCenter(m_centers[i]);
mAnalogs[i].resetAccumulator();
//LiveWindow.addSensor("Gyro", m_analog.getChannel(), this);
}
if(mMode == TWO_CANCEL) setDeadband(kCancelDeadband);
else if(mMode == TWO_DEADBAND) {
setDeadband1(0.0);
mAccumulatedAngle = 0;
}
mOffset = 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void initialize() {\n \tRobot.gyroSubsystem.reset();\n \tstartAngle = Robot.gyroSubsystem.gyroPosition();\n \ttargetAngle = startAngle + goal;\n }",
"public Gyro (){\n try {\n /* Communicate w/navX MXP via the MXP SPI Bus. */\n ... | [
"0.6857298",
"0.63544977",
"0.6042953",
"0.60029036",
"0.5920041",
"0.5896221",
"0.5872025",
"0.58559036",
"0.5805565",
"0.57982165",
"0.5754474",
"0.5722179",
"0.5718608",
"0.56462026",
"0.56304276",
"0.5617256",
"0.5600288",
"0.55465186",
"0.55217654",
"0.5444789",
"0.54278... | 0.7228928 | 0 |
Gyro constructor with a precreated analog channel object. Use this constructor when the analog channel needs to be shared. | public MyGyroscope(AnalogInput channel1, AnalogInput channel2, int mode) {
this.mMode = mode;
m_analog1 = channel1;
m_analog2 = channel2;
if (m_analog1 == null || m_analog2==null) {
throw new NullPointerException("AnalogInput supplied to Gyro constructor is null");
}
mAnalogs = new AnalogInput[2];
mAnalogs[0]= m_analog1;
mAnalogs[1]=m_analog2;
m_centers = new int[2];
m_offsets = new double[2];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Gyro360 (AnalogChannel channel) {\n super(channel);\n }",
"public void initGyro() {\r\n\t\tresult = new AccumulatorResult();\r\n\t\tif (m_analog1 == null || m_analog2 == null) {\r\n\t\t\tSystem.out.println(\"Null m_analog\");\r\n\t\t}\r\n\t\tm_voltsPerDegreePerSecond = kDefaultVoltsPerDegreePerS... | [
"0.796228",
"0.7104499",
"0.6779015",
"0.639652",
"0.6316717",
"0.6303742",
"0.620439",
"0.5904325",
"0.58995837",
"0.5770345",
"0.56756926",
"0.56488484",
"0.55977476",
"0.55960214",
"0.55763215",
"0.5561058",
"0.55474985",
"0.55424577",
"0.5489092",
"0.5418006",
"0.53754497... | 0.71721184 | 1 |
Reset the gyro. Resets the gyro to a heading of zero. This can be used if there is significant drift in the gyro and it needs to be recalibrated after it has been running. | public void reset() {
for(AnalogInput m_analog : mAnalogs)
{
if (m_analog != null) {
m_analog.resetAccumulator();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void resetGyro(){\n //TODO:Reset the gyro(zero it)\n }",
"public void resetGyro () {\n gyro.reset();\n }",
"public void resetGyroAngle() {\n\t\tgyro.reset();\n\t}",
"public void zeroHeading() {\n m_gyro.reset();\n }",
"public void zeroHeading() {\n gyro.reset();\n gyr... | [
"0.87323993",
"0.8646945",
"0.85459805",
"0.7998701",
"0.78006035",
"0.7750852",
"0.7597006",
"0.7178614",
"0.66901493",
"0.6643873",
"0.6627244",
"0.65991443",
"0.6593439",
"0.65858674",
"0.656642",
"0.64594716",
"0.6459285",
"0.64406383",
"0.6364408",
"0.635251",
"0.6296165... | 0.0 | -1 |
Delete (free) the accumulator and the analog components used for the gyro. | @Override
public void free() {
for(AnalogInput m_analog : mAnalogs)
{
if (m_analog != null && m_channelAllocated) {
m_analog.free();
}
}
for(int i = 0; i < mAnalogs.length; i++)
{
mAnalogs[i] = null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void clear() {\n mLeDevices.clear();\n }",
"public void clearGyroCrits() {\n for (int i = 0; i < locations(); i++) {\n removeCriticals(i, new CriticalSlot(CriticalSlot.TYPE_SYSTEM, SYSTEM_GYRO));\n }\n }",
"public void releaseAllSensors() {\n mSensorM... | [
"0.64233077",
"0.634629",
"0.62935436",
"0.62219846",
"0.5998934",
"0.59121823",
"0.58650166",
"0.58284307",
"0.582483",
"0.58226913",
"0.5819448",
"0.58026016",
"0.5802517",
"0.58014846",
"0.57987094",
"0.57971394",
"0.5781326",
"0.5768066",
"0.57534325",
"0.57524985",
"0.57... | 0.6491069 | 0 |
Return the actual angle in degrees that the robot is currently facing. The angle is based on the current accumulator value corrected by the oversampling rate, the gyro type and the A/D calibration values. The angle is continuous, that is it will continue from 360 to 361 degrees. This allows algorithms that wouldn't want to see a discontinuity in the gyro output as it sweeps past from 360 to 0 on the second time around. | public double getRawAngle(int pSensorNumber) {
mAnalogs[pSensorNumber].getAccumulatorOutput(result);
long value = result.value - (long) (result.count * m_offsets[pSensorNumber]);
double scaledValue = value
* 1e-9
* mAnalogs[pSensorNumber].getLSBWeight()
* (1 << mAnalogs[pSensorNumber].getAverageBits())
/ (AnalogInput.getGlobalSampleRate() * m_voltsPerDegreePerSecond);
return scaledValue;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getAngle(){\n\t\tif(!resetCoordinates()&&robot.imu1.isGyroCalibrated()){\n\t\t\trobot.angles=robot.imu1.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\t\t\tdouble currentAngle=robot.angles.firstAngle;\n\t\t\tint finalAngle= robot.startingAngle+(int)Math.round(current... | [
"0.7760098",
"0.7515291",
"0.74110514",
"0.7394079",
"0.7332349",
"0.72927904",
"0.7283469",
"0.7259043",
"0.71014947",
"0.70895714",
"0.7076825",
"0.7047302",
"0.6956048",
"0.6844837",
"0.6827202",
"0.6827021",
"0.682163",
"0.68172085",
"0.68094355",
"0.67377466",
"0.6724067... | 0.0 | -1 |
Return the rate of rotation of the gyro The rate is based on the most recent reading of the gyro analog value | public double getRate() {
return (getRate(0)+getRate(1))/2.0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getGyroInRad(){\n return 0.0;//TODO:Pull and return gyro in radians\n }",
"public double getGyroAngle() {\n double[] ypr = new double[3];\n gyro.GetYawPitchRoll(ypr);\n return ypr[0];\n }",
"protected float getGyroscopeAngle() {\n if (doGyro) {\n Orie... | [
"0.78372633",
"0.7422113",
"0.7420861",
"0.7407531",
"0.7292217",
"0.71960235",
"0.7135506",
"0.71246207",
"0.70627725",
"0.6982792",
"0.69477",
"0.6893799",
"0.68917525",
"0.68434525",
"0.67495155",
"0.67213243",
"0.6668249",
"0.666681",
"0.66401994",
"0.6575606",
"0.6535801... | 0.6579345 | 19 |
Set the gyro sensitivity. This takes the number of volts/degree/second sensitivity of the gyro and uses it in subsequent calculations to allow the code to work with multiple gyros. This value is typically found in the gyro datasheet. | public void setSensitivity(double voltsPerDegreePerSecond) {
m_voltsPerDegreePerSecond = voltsPerDegreePerSecond;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void calibrateGyro() {\n gyro.SetYaw(0);\n }",
"public void updateGyro() {\n\t\tangleToForward = gyro.getAngle();\n\t\tif (angleToForward >= 360) {\n\t\t\tangleToForward -= 360;\n\t\t} else if (angleToForward < 0) {\n\t\t\tangleToForward += 360;\n\t\t}\n\n\t}",
"private void setGyroFrequency(S... | [
"0.6393291",
"0.6174771",
"0.6022716",
"0.5937788",
"0.5920097",
"0.5792357",
"0.5729885",
"0.57076603",
"0.5705655",
"0.56836396",
"0.5647",
"0.56325716",
"0.562892",
"0.5607425",
"0.5603002",
"0.55778503",
"0.5545073",
"0.55416197",
"0.5482364",
"0.54607344",
"0.5449562",
... | 0.5716342 | 7 |
Set the size of the neutral zone. Any voltage from the gyro less than this amount from the center is considered stationary. Setting a deadband will decrease the amount of drift when the gyro isn't rotating, but will make it less accurate. | void setDeadband(double volts) {
for(AnalogInput m_analog : mAnalogs)
{
int deadband = (int)(volts * 1e9 / m_analog.getLSBWeight() * (1 << m_analog.getOversampleBits()));
m_analog.setAccumulatorDeadband(deadband);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setFreeAspectRatio() {\n setAspectRatio(-1.0);\n }",
"private void changeSize(float omegaDeg) {\n\n setSize(resolutionIntoWorldUnits(currentRegion.getRegionWidth(), WORLD_SIZE, 1080),\n resolutionIntoWorldUnits(currentRegion.getRegionHeight(), WORLD_SIZE, 1080)); // Ch... | [
"0.5590268",
"0.54006",
"0.52468926",
"0.51284856",
"0.5093748",
"0.5030688",
"0.49159533",
"0.4911903",
"0.4905594",
"0.4901061",
"0.48849082",
"0.48644647",
"0.4859654",
"0.48526734",
"0.48308274",
"0.48174483",
"0.4796408",
"0.47903958",
"0.47714823",
"0.47679463",
"0.4758... | 0.0 | -1 |
Get the output of the gyro for use with PIDControllers. May be the angle or rate depending on the set PIDSourceParameter | @Override
public double pidGet() {
/*switch (m_pidSource.value) {
case 1://PIDSourceParameter.kRate_val:
return getRate();
case 2:// PIDSourceParameter.kAngle_val:
return getAngle();
default:
return 0.0;
}*/
return getAngle();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double[] getGyro();",
"public double getGyroInRad(){\n return 0.0;//TODO:Pull and return gyro in radians\n }",
"public double GyroPosition() {\n\t\tswitch (gyroToUse) {\n\t\tcase ANALOG:\n\t\t\tgyroAngle = gyro.getAngle();\n\t\t\tbreak;\n\n\t\tcase SPI:\n\t\t\tgyroAngle = spi.getAngle();\n\t\t\tbrea... | [
"0.73527247",
"0.7228768",
"0.7065763",
"0.7061671",
"0.69887257",
"0.6838705",
"0.67717904",
"0.67578983",
"0.67405945",
"0.66885185",
"0.668022",
"0.6664458",
"0.6617861",
"0.6604609",
"0.653551",
"0.64699674",
"0.63993925",
"0.63028055",
"0.6187348",
"0.6174726",
"0.608209... | 0.63062173 | 17 |
/ Live Window code, only does anything if live window is activated. | @Override
public String getSmartDashboardType() {
return "Gyro";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean isActive(W window) {\n return true;\n }",
"@Override\n\t\t\tpublic void windowActivated(WindowEvent arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void windowActivated(WindowEvent arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n public void windowActivated(WindowEve... | [
"0.74656034",
"0.6995433",
"0.6995433",
"0.6957167",
"0.6933893",
"0.6933893",
"0.6933893",
"0.6933893",
"0.6933893",
"0.6908472",
"0.6908472",
"0.6908472",
"0.6908472",
"0.6908472",
"0.6890601",
"0.6890601",
"0.6890601",
"0.6890601",
"0.6890601",
"0.6890601",
"0.6890601",
... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void setPIDSourceType(PIDSourceType pidSource) {
} | {
"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 PIDSourceType getPIDSourceType() {
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 |
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jScrollPane1 = new javax.swing.JScrollPane();
inventoryTable = new javax.swing.JTable();
jLabel1 = new javax.swing.JLabel();
storeNameTb = new javax.swing.JTextField();
jLabel2 = new javax.swing.JLabel();
backBtn = new javax.swing.JButton();
inventoryTable.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
},
new String [] {
"Drug Name", "Qty", "Stock Status"
}
));
jScrollPane1.setViewportView(inventoryTable);
jLabel1.setText("Store Name");
storeNameTb.setEnabled(false);
jLabel2.setText("Inventory: (see table)");
backBtn.setText("<< Back");
backBtn.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
backBtnActionPerformed(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(49, 49, 49)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(backBtn)
.addComponent(jLabel2)
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel1)
.addGap(61, 61, 61)
.addComponent(storeNameTb, javax.swing.GroupLayout.PREFERRED_SIZE, 195, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(512, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel1)
.addComponent(storeNameTb, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(25, 25, 25)
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(33, 33, 33)
.addComponent(backBtn)
.addContainerGap(111, Short.MAX_VALUE))
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Form() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public frmRectangulo() {\n initComponents();\n }",
"public form() {\n ... | [
"0.73191524",
"0.7290383",
"0.7290383",
"0.7290383",
"0.7286656",
"0.72480965",
"0.72141695",
"0.72080517",
"0.7195647",
"0.7190378",
"0.71841127",
"0.71591616",
"0.71478844",
"0.7093131",
"0.70816",
"0.70577854",
"0.6987355",
"0.69769996",
"0.69551086",
"0.69545007",
"0.6945... | 0.0 | -1 |
convert timestamp to UTC for consistency (i.e. ignore the timezone difference for testing) | private LocalDateTime mapTimestampToUtc(final String timestamp) {
return LocalDateTime.ofInstant(
Instant.from(LocalDateTime.parse(timestamp).atZone(ZoneOffset.UTC)),
ZoneOffset.UTC);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static ZonedDateTime toUTCDateTime(Timestamp timestamp) {\n return toInstant(timestamp).atZone(UTCZone);\n }",
"@ExecFunction(name = \"utc_timestamp\", argTypes = {}, returnType = \"INT\")\n public static Expression utcTimestamp() {\n return DateTimeLiteral.fromJavaDateType(LocalDateT... | [
"0.7585328",
"0.6403236",
"0.6241508",
"0.60657585",
"0.60514736",
"0.60265046",
"0.59788483",
"0.5885882",
"0.5815997",
"0.5703228",
"0.5687955",
"0.56521934",
"0.56423455",
"0.5634295",
"0.55770147",
"0.5573275",
"0.55493295",
"0.5477206",
"0.54752684",
"0.5473964",
"0.5470... | 0.74457765 | 1 |
TODO Autogenerated method stub | public static void main(String[] args) {
Simulador inicio = new Simulador();
inicio.simular();
} | {
"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 |
Post getById(Long id); Post save(Post post); | Post save(Post post, Long authorId, String category); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Post save(Post post) throws Exception;",
"public Post save(Post post) {\n return postsDao.save(post);\n }",
"void savePost(Post post);",
"Post findById(int id);",
"Post getPostByID(long postId);",
"public void savePost(VBeatPostModel post) {\n AppLocalDB.getInstance().db.postDao().insert... | [
"0.84400266",
"0.8439707",
"0.8065019",
"0.7915191",
"0.76019204",
"0.71322304",
"0.7120371",
"0.70328426",
"0.6988544",
"0.69805866",
"0.6945723",
"0.68817693",
"0.6850085",
"0.6772283",
"0.67441714",
"0.6716478",
"0.6653795",
"0.65514773",
"0.65450937",
"0.65076596",
"0.646... | 0.74332213 | 5 |
void deleteById(Long id); void delete(Post post); | Post incrementRatio(Long id); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void deletePostById(int id);",
"public HttpStatus deleteById(Long postId);",
"public void destroyPost(Long id);",
"@Override\n\tpublic void deletePost(Post post) {\n\n\t}",
"int deleteByPrimaryKey(String postId);",
"@NonNull\n int deleteByPostId(@NonNull @Param(\"postId\") Integer postId);",
"@Delet... | [
"0.91567963",
"0.88265896",
"0.8485841",
"0.8321501",
"0.8237591",
"0.8090891",
"0.80635035",
"0.8042989",
"0.8024539",
"0.8006365",
"0.79501396",
"0.7876329",
"0.7846353",
"0.7806658",
"0.7806658",
"0.7806658",
"0.7806658",
"0.769304",
"0.7649664",
"0.7649664",
"0.7649664",
... | 0.0 | -1 |
Post addCommentary(Commentary commentary, Long id); | Post addAddition(Long additionId, Long id); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addComment(Comment comment){\n commentRepository.createComments(comment);\n }",
"void addNewComment(BlogComment comment) throws DAOException;",
"@PostMapping(\"{id}\")\n public Book addComments (@RequestBody String text, @PathVariable Long id) {\n return bookService.addComments... | [
"0.67315197",
"0.664836",
"0.6576891",
"0.6429281",
"0.6341862",
"0.62980336",
"0.60873944",
"0.5988458",
"0.5979309",
"0.59173214",
"0.5866953",
"0.5865269",
"0.5829478",
"0.58196515",
"0.5709388",
"0.5705155",
"0.57025146",
"0.5683749",
"0.5622591",
"0.56126297",
"0.5610229... | 0.58899385 | 10 |
wait for ten seconds; | public void run() {
try {
Thread.sleep(10000);
} catch (InterruptedException e) {
e.printStackTrace();
}
mainThread.interrupt();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void wait(int seconds) {\n try {\n Thread.sleep(seconds * 1000);\n }\n catch(InterruptedException ie) {\n System.out.println(\"ERROR WAITING: Failed to generate a Thread to wait.\");\n ie.printStackTrace();\n }\n }",
"private static v... | [
"0.73187274",
"0.73187274",
"0.699956",
"0.6948485",
"0.68884104",
"0.6872331",
"0.6794714",
"0.6751294",
"0.6751294",
"0.6739194",
"0.6726448",
"0.6713247",
"0.6705386",
"0.6685082",
"0.6677448",
"0.6651129",
"0.6645743",
"0.6637012",
"0.66286874",
"0.6616476",
"0.6597172",
... | 0.0 | -1 |
Use this factory method to create a new instance of this fragment using the provided parameters. | public static SrglFragment newInstance(String param1, String param2) {
SrglFragment fragment = new SrglFragment();
Bundle args = new Bundle();
args.putString(ARG_PARAM1, param1);
args.putString(ARG_PARAM2, param2);
fragment.setArguments(args);
return fragment;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static FragmentTousWanted newInstance() {\n FragmentTousWanted fragment = new FragmentTousWanted();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }",
"protected abstract Fragment createFragment();",
"public void createFragment() {\n\n ... | [
"0.7259329",
"0.72331375",
"0.71140355",
"0.69909847",
"0.69902235",
"0.6834592",
"0.683074",
"0.68134046",
"0.6801526",
"0.6801054",
"0.67653185",
"0.6739714",
"0.6739714",
"0.6727412",
"0.6717231",
"0.6705855",
"0.6692112",
"0.6691661",
"0.66869426",
"0.66606814",
"0.664618... | 0.0 | -1 |
Inflate the layout for this fragment | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_srgl, container, false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup... | [
"0.6739604",
"0.67235583",
"0.6721706",
"0.6698254",
"0.6691869",
"0.6687986",
"0.66869223",
"0.6684548",
"0.66766286",
"0.6674615",
"0.66654444",
"0.66654384",
"0.6664403",
"0.66596216",
"0.6653321",
"0.6647136",
"0.66423255",
"0.66388357",
"0.6637491",
"0.6634193",
"0.66251... | 0.64935696 | 70 |
TODO: Rename method, update argument and hook method into UI event | public void onButtonPressed(Uri uri) {
if (mListener != null) {
mListener.onFragmentInteraction(uri);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\n\t\t\t\t}",
"@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}",
"@... | [
"0.6619185",
"0.65246344",
"0.6473144",
"0.6473144",
"0.64351684",
"0.6325494",
"0.62368196",
"0.6189416",
"0.6158721",
"0.61455715",
"0.6123594",
"0.6107332",
"0.6101038",
"0.6092755",
"0.6049496",
"0.6049496",
"0.60442764",
"0.604003",
"0.604003",
"0.6007846",
"0.59999037",... | 0.0 | -1 |
This interface must be implemented by activities that contain this fragment to allow an interaction in this fragment to be communicated to the activity and potentially other fragments contained in that activity. See the Android Training lesson Communicating with Other Fragments for more information. | public interface OnFragmentInteractionListener {
// TODO: Update argument type and name
public void onFragmentInteraction(Uri uri);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface OnFragmentInteractionListener {\n void onFragmentMessage(String TAG, Object data);\n}",
"public interface FragmentInteraction {\n void switchToBoardView();\n void switchToPinsView();\n void switchToPins(PDKBoard pdkBoard);\n void switchToDescription(PDKPin pin);\n}",
"public int... | [
"0.7325128",
"0.7207981",
"0.71355015",
"0.7124422",
"0.71224433",
"0.70151067",
"0.69761205",
"0.69761205",
"0.69761205",
"0.69745713",
"0.69676787",
"0.6965594",
"0.6960806",
"0.6953875",
"0.69436187",
"0.69350636",
"0.6929767",
"0.6928443",
"0.6922766",
"0.69102424",
"0.69... | 0.0 | -1 |
TODO: Update argument type and name | public void onFragmentInteraction(Uri uri); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n public String getFirstArg() {\n return name;\r\n }",
"@Override\n public int getNumberArguments() {\n return 1;\n }",
"java.lang.String getArg();",
"@Override\n public int getArgLength() {\n return 4;\n }",
"Argument createArgument();",
"@Override\r\n\tpublic ... | [
"0.7164074",
"0.6946075",
"0.6714363",
"0.65115863",
"0.63969076",
"0.6375468",
"0.63481104",
"0.63162106",
"0.6260299",
"0.6208487",
"0.6208487",
"0.62070644",
"0.6197276",
"0.61806154",
"0.6177103",
"0.61530507",
"0.61472267",
"0.61243707",
"0.60771817",
"0.6054482",
"0.599... | 0.0 | -1 |
TODO Autogenerated method stub | public void mouseClicked(MouseEvent e) {
if(e.getClickCount()==2) {
if(table.getSelectedColumn()!=-1){
String s=(String) model.getValueAt(table.getSelectedRow(), 0);
String c=(String) model.getValueAt(table.getSelectedRow(), 1);
if(c.equals("到达单")) {
ArrivalListBL al=new ArrivalListBL();
try {
new InvoiceUI_ArrivalListEdit(al.inquiry(s),false);
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
else if(c.equals("营业厅收入单")) {
IncomeListBL il=new IncomeListBL();
try {
new InvoiceUI_IncomeListEdit(il.inquiry(s),false);
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
else if(c.equals("营业厅装车单")) {
LoadingListBL ll=new LoadingListBL();
try {
new InvoiceUI_LoadingListEdit(ll.inquiry(s),false);
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
else if(c.equals("中转中心装车单")) {
LoadingListZZBL zc=new LoadingListZZBL();
try {
new InvoiceUI_LoadingListZZEdit(zc.inquiry(s),false);
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
else if(c.equals("中转中心接收单")) {
RecivalListBL rl=new RecivalListBL();
try {
new InvoiceUI_RecivalListEdit(rl.inquiry(s),false);
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
else if(c.equals("快递员派件单")) {
SendingListBL sl=new SendingListBL();
try {
new InvoiceUI_SendingListEdit(sl.inquiry(s),false);
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
else{
TransferListBL tl=new TransferListBL();
try {
new InvoiceUI_TransferListEdit(tl.inquiry(s),false);
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
Kill all of notebook kernels | @RequestMapping(path = "/connectors/kernels", method = RequestMethod.DELETE)
public @ResponseBody
ResponseEntity<?> killNotebookKernels() {
Page<NotebookConnector> connectors = notebookConnectorRepository.findByType("jupyter", new PageRequest(0, Integer.MAX_VALUE));
for(NotebookConnector connector : connectors) {
connector.setHttpRepository(httpRepository);
connector.killAllKernels();
}
LOGGER.info("Completed kill every alive notebook [jupyter] kernels.");
return ResponseEntity.noContent().build();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean stopKernels () throws InterruptedException {\n // Retrieve all the kernels started on the workspace\n Set keys = kernels.keySet();\n Iterator iterator = keys.iterator();\n\n // Create an executor service to launch the stop of every kernels in the same time and wait for ev... | [
"0.64241374",
"0.6316966",
"0.61808383",
"0.60514027",
"0.5936648",
"0.5935324",
"0.57801753",
"0.5751208",
"0.5726316",
"0.5692092",
"0.5687204",
"0.5685459",
"0.56812143",
"0.56812143",
"0.56723636",
"0.56627023",
"0.5658596",
"0.5631967",
"0.5624663",
"0.55846703",
"0.5584... | 0.80623204 | 0 |
TODO Autogenerated method stub | @Override
public int insert(Attachment attach) {
return aDao.insert(attach);
} | {
"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 ArrayList<Attachment> getAttachment(String docType, int seq) {
return aDao.getAttachment(docType, seq);
} | {
"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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.