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
Clears the configuration. Intended for testing to ensure a fresh state.
public static void clear() { for (ConfigurationOption<?> opt : OPTIONS.values()) { opt.clear(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Builder clearConfig() {\n bitField0_ = (bitField0_ & ~0x00000001);\n config_ = null;\n if (configBuilder_ != null) {\n configBuilder_.dispose();\n configBuilder_ = null;\n }\n onChanged();\n return this;\n }", "public Builder clearConfig() {\n if (config...
[ "0.7699896", "0.75911194", "0.7452864", "0.7313362", "0.7218067", "0.71779877", "0.6928336", "0.68723965", "0.6844488", "0.671729", "0.66458726", "0.6640095", "0.65316725", "0.6418354", "0.64005685", "0.638802", "0.63522756", "0.6328575", "0.63269913", "0.63199174", "0.628896...
0.65451664
12
Returns the configured pipeline interconnection ports.
public static String getPipelinePorts() { LOGGER.info("The configured pipeline ports: " + pipelinePorts.getValue()); return pipelinePorts.getValue(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int[] commonPortsList(){\n int [] portsArray = {20,21,22,23,25,53,80,139,443,445,1433,1434,3306,3389,8080};\n return portsArray;\n }", "int getIntegPort();", "public int getPort();", "public int getPort();", "public int getPort();", "public int getPort()\n {\n return t...
[ "0.6424626", "0.63890964", "0.63294995", "0.63294995", "0.63294995", "0.6325751", "0.63144547", "0.62999177", "0.62379104", "0.62379104", "0.62379104", "0.62379104", "0.62379104", "0.62379104", "0.62379104", "0.62379104", "0.62379104", "0.62379104", "0.62379104", "0.62379104", ...
0.7964575
0
Returns the initialization mode for the configuration model.
public static InitializationMode getInitializationMode() { return initMode.getValue(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getMode()\n {\n return mode.toString();\n }", "java.lang.String getMode();", "public String getMode() {\n return mode;\n }", "public String getMode() {\n return mode;\n }", "public int getMode() {\n return mode;\n }", "public String getMode() {\n\n ...
[ "0.6170968", "0.6150092", "0.6141661", "0.6141661", "0.6104162", "0.6100252", "0.60818136", "0.60523826", "0.60315704", "0.5993605", "0.59848624", "0.5984337", "0.5975348", "0.59516543", "0.5931477", "0.59248054", "0.58723956", "0.58251804", "0.58164", "0.58024347", "0.574600...
0.7970554
0
Returns whether (data item transfer) volume shall be monitored on workers. Intended to enable experiments.
public static boolean enableVolumeMonitoring() { return enableVolumeMonitoring.getValue(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasVolume();", "public boolean isWatching() {\n return isPubKeyOnly();\n }", "boolean isMonitoringEnabled();", "public boolean isMonitored() {\n return monitored;\n }", "boolean isMonitoring();", "boolean isMonitoring();", "public boolean hasVolume() {\n return ((bitFie...
[ "0.6440321", "0.6126798", "0.60093004", "0.59908515", "0.5875654", "0.5875654", "0.582335", "0.57980597", "0.57554466", "0.57535076", "0.5718763", "0.5661578", "0.5660244", "0.56353825", "0.5603572", "0.5581025", "0.55497247", "0.55432284", "0.5541491", "0.55405194", "0.55348...
0.67538404
0
Returns the watcher waiting time.
public static int getWatcherWaitingTime() { return watcherWaitingTime.getValue(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getWaitedTime() {\n\t\treturn this.waitedTime;\n\t}", "public int getwaitTime(){\r\n\t\t String temp=rb.getProperty(\"waitTime\");\r\n\t\t return Integer.parseInt(temp);\r\n\t}", "private long getWaitTime() {\n long retVal = 1;\n long difference = System.currentTimeMillis() - myLastRefreshTime...
[ "0.7857743", "0.74142486", "0.7160757", "0.7000359", "0.69584143", "0.6930737", "0.68865144", "0.68420124", "0.678778", "0.6772642", "0.66713643", "0.66713244", "0.6634665", "0.65189064", "0.6414521", "0.64012516", "0.63634014", "0.6363212", "0.6318802", "0.62816614", "0.6262...
0.892983
0
Returns the plugins location.
public static String getPluginsLocation() { return pluginsLocation.getValue(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Path getPluginsDirectory()\n {\n return pluginDirectory;\n }", "public static Path getPluginsDir() {\n\t\treturn Paths.get(prefs.get(Constants.PREF_USERSAVE_DIR, null)).resolve(PLUGINS_DIR);\n\t}", "public PluginLocation[] getBuiltinPluginLocations()\r\n {\r\n java.lang.String con...
[ "0.750297", "0.71778876", "0.71111655", "0.6681768", "0.6639837", "0.66181093", "0.6534412", "0.6435131", "0.62818", "0.61639845", "0.61483014", "0.6126819", "0.6107238", "0.5988203", "0.598468", "0.59789705", "0.5907199", "0.57599413", "0.5736431", "0.57210034", "0.5694432",...
0.8955476
0
This method reads the output of the CES task from the RabbitMQ Result queue.
public static TDataList getOutputOfProcess(){ try { //Initializing Camel Context, RabbitMQ Factory and others for Content-based message Routing CamelContext camelCon = new DefaultCamelContext(); ConnectionFactory conFac = new ConnectionFactory(); conFac.setHost(CESTaskDelegationConfig.RABBIT_SERVER); Connection connection = conFac.newConnection(); Channel channel = connection.createChannel(); camelCon.addRoutes(new RouteBuilder() { public void configure() { //Process Dispatcher Invocation from(CESTaskDelegationConfig.RABBIT_RESULT_QUEUE) //Set Respective Routing Key .process(new Processor() { public void process(Exchange exchange) throws Exception { CESTaskDelegation.output = CESTaskDelegation.getOutput(exchange); }}) .to(CESTaskDelegationConfig.RABBIT_CONSOLE_OUT); } }); //Start Camel Context camelCon.start(); //Stop Camel Context and close connection/channel objects camelCon.stop(); channel.close(); connection.close(); } catch (IOException e) { log.error("CESTD33: IOException has Occurred."); } catch (TimeoutException e) { log.error("CESTD32: TimeoutException has Occurred."); } catch (NullPointerException e) { log.error("CESTD31: NullPointerException has Occurred."); } catch (Exception e) { log.error("CESTD30: Unknown Exception has Occurred - " + e); } return CESTaskDelegation.output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String readResult() throws IOException {\n return reader.readLine();\n }", "@Override\n public void completed(Integer result, String attachment)\n {\n log.info(\"Successful read!\");\n }", "public ...
[ "0.60768527", "0.5739728", "0.55632466", "0.54943913", "0.5472292", "0.5458667", "0.5345305", "0.5343262", "0.533425", "0.531409", "0.5312382", "0.52905303", "0.5283447", "0.526758", "0.5234041", "0.5197235", "0.5144518", "0.51177573", "0.5109633", "0.5109633", "0.5109039", ...
0.6382605
0
This method reads the output of the CES Service received after polling.
public static TDataList getOutput(Exchange exchange){ try { //JAXB implementation for de-serializing the output generated by Executor of CES InputStream byteInputStream = new ByteArrayInputStream((byte[]) exchange.getIn().getBody()); JAXBContext jaxbContext = JAXBContext.newInstance(ObjectFactory.class); Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); JAXBElement<?> rootElement = (JAXBElement<?>) unmarshaller.unmarshal(byteInputStream); TTaskCESDefinition definition = (TTaskCESDefinition) rootElement.getValue(); CESTaskDelegation.output = definition.getOutputVariable(); } catch (JAXBException e) { log.error("CESTD42: JAXBException has Occurred."); } catch (NullPointerException e) { log.error("CESTD41: NullPointerException has Occurred."); } catch (Exception e) { log.error("CESTD40: Unknown Exception has Occurred - " + e); } return CESTaskDelegation.output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String recvSensorData(){\n\t\tSystem.out.println(\"Waiting for sensor data!\");\n\t\ttry{\n\t\t\t// timer.scheduleAtFixedRate(new TimerTask() {\n\t\t\t// \t@Override\n\t\t\t// \tpublic void run() {\n\t\t\t// \t\tSystem.out.println(\"No response for sensor data\");\n\t\t\t// \t\tsendMsg(\"S\",\"PC2AR\");\n\t...
[ "0.61679614", "0.59302485", "0.58198357", "0.58086413", "0.57456285", "0.55977464", "0.55889213", "0.5535535", "0.55347186", "0.5527865", "0.5518644", "0.5516883", "0.54927963", "0.54398125", "0.5439263", "0.543229", "0.54267114", "0.54224676", "0.54201376", "0.5407874", "0.5...
0.0
-1
This is a setter method to set the value of Hidden field.
public void setHiddenField(Expression hiddenField) { this.hiddenField = hiddenField; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setHidden(boolean value) {\r\n this.hidden = value;\r\n }", "public void setHidden(Integer hidden) {\n this.hidden = hidden;\n }", "public void setHidden(Integer hidden) {\n this.hidden = hidden;\n }", "public void setHidden(Boolean hidden){\n m_hidden = hidde...
[ "0.6936794", "0.66581094", "0.66581094", "0.64952636", "0.6487503", "0.6224347", "0.62023705", "0.6174123", "0.6131757", "0.606482", "0.5917499", "0.58541185", "0.5757123", "0.56939435", "0.56231433", "0.56026983", "0.56026983", "0.553545", "0.542715", "0.5424146", "0.542143"...
0.73060054
0
This is a getter method to get the Hideen field value.
public Expression getHiddenField() { return hiddenField; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.lang.String getFieldShowValue() {\n return fieldShowValue;\n }", "public Integer getHidden() {\n return hidden;\n }", "public Integer getHidden() {\n return hidden;\n }", "public String getDisplayValue()\n {\n return null;\n }", "public String getShowF...
[ "0.6781964", "0.6252224", "0.6252224", "0.5928257", "0.58863103", "0.5841285", "0.5835627", "0.5832708", "0.576811", "0.5723712", "0.57147807", "0.56894636", "0.5687377", "0.568045", "0.5677543", "0.56406945", "0.5636652", "0.56342274", "0.5627631", "0.5625671", "0.5624101", ...
0.56514907
15
Adds the Pressed KeyCode to the key array
public void setKeyPressed(int keyCode){ this.keys[keyCode] = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void keyPressed() {\r\n \t\tkeys[keyCode] = true;\r\n \t}", "@Override\n public void keyPressed(KeyEvent e) {\n keys[e.getKeyCode()]=true;\n for(int i=0;i<keyBind.length;i++){\n keyBind[i]=keys[keyn[i]];\n }\n }", "@Override\n\tpublic void keyPressed(KeyEvent e)\n\t...
[ "0.69690216", "0.69546765", "0.6897004", "0.6873587", "0.6837959", "0.66440547", "0.6640534", "0.66383624", "0.66282415", "0.65928704", "0.65670997", "0.6553987", "0.6481701", "0.6433412", "0.6373747", "0.6343917", "0.6312118", "0.62961346", "0.6274574", "0.62511766", "0.6231...
0.70985574
0
Removes the Released KeyCode to the key array
public void setKeyReleased(int keyCode){ this.keys[keyCode] = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void keyReleased() {\t\t\r\n \t\t\r\n \t\tkeys[keyCode] = false;\r\n \t}", "@Override\n public void keyReleased(KeyEvent e) {\n\n keyPressed[e.getKeyCode()] = false;\n\n updateFlags();\n\n }", "public void keyReleased (KeyEvent e)\r\n {\r\n \tkeyPressed = false;\r\n \tkeyRel...
[ "0.71563965", "0.69689184", "0.6884116", "0.6878572", "0.6859271", "0.6848643", "0.67853993", "0.6751934", "0.66635185", "0.66539186", "0.66159534", "0.65775687", "0.6528148", "0.6362691", "0.6322192", "0.6244292", "0.6226399", "0.62046033", "0.61873925", "0.61742115", "0.616...
0.7151961
1
Checks if the the Key is pressed
public boolean isKeyDown(int keyCode){ return keys[keyCode]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean keyPressed(KeyEvent e);", "boolean onKeyPressed(KeyEvent event);", "private boolean isPressed(KeyCode key) {\n \t\n return keys.getOrDefault(key, false);\n }", "@OnlyIn(Dist.CLIENT)\n\tprivate boolean isPressing(int key){\n\t\tlong window = Minecraft.getInstance().getMainWindow()....
[ "0.81432456", "0.81150836", "0.8023583", "0.79968333", "0.787357", "0.7757425", "0.76251084", "0.75073606", "0.73802793", "0.73735934", "0.7362607", "0.73072565", "0.72340316", "0.7217717", "0.71850413", "0.71738166", "0.7172518", "0.71615666", "0.715244", "0.7148039", "0.714...
0.76720065
6
TODO: Warning this method won't work in the case the id fields are not set
@Override public boolean equals(Object object) { if (!(object instanceof Configuracion)) { return false; } Configuracion other = (Configuracion) object; if ((this.idConfiguracion == null && other.idConfiguracion != null) || (this.idConfiguracion != null && !this.idConfiguracion.equals(other.idConfiguracion))) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "private Integer getId() { return this.id; }", "public void setId(int id){ this.id = id; }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setID(String idIn) {this.id = idIn;}", "public void se...
[ "0.6896886", "0.6838461", "0.67056817", "0.66419715", "0.66419715", "0.6592331", "0.6579151", "0.6579151", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.65624106", "0.65624106", "0.65441847", "0.65243006", "0.65154546", "0.6487427", "0.64778...
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater menuInflater = getMenuInflater(); menuInflater.inflate(R.menu.main, menu); Log.d(TAG, "onCreateOptionsMenu"); 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.7249559", "0.7204226", "0.71981144", "0.7180145", "0.7110589", "0.70431244", "0.7041351", "0.70150685", "0.70118093", "0.69832", "0.6947845", "0.69419056", "0.6937257", "0.6920975", "0.6920975", "0.68938893", "0.68867826", "0.6878929", "0.6877472", "0.68656766", "0.6865676...
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); if (id == R.id.action_settings) { Intent intent = new Intent(getApplicationContext(), SettingsActivity.class); startActivity(intent); return true; } else if (id == R.id.action_dark_theme) { SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this); if(item.isChecked()){ // If item already checked then unchecked it item.setChecked(false); }else{ // If item is unchecked then checked it item.setChecked(true); } mDarkThemeDrawerSwitch.setChecked(item.isChecked()); sharedPref.edit().putBoolean(SettingsActivity.KEY_PREF_DARK_THEME_SWITCH, item.isChecked()).commit(); Toast.makeText(this, "item.isChecked: "+ item.isChecked(), Toast.LENGTH_SHORT).show(); } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ...
[ "0.79046357", "0.78057253", "0.7766443", "0.7727836", "0.76324654", "0.76225346", "0.7584511", "0.7531118", "0.74883616", "0.7457812", "0.7457812", "0.74387413", "0.74217904", "0.74036336", "0.7392069", "0.7387262", "0.7379348", "0.7370635", "0.73624563", "0.73561275", "0.734...
0.0
-1
Handle navigation view item clicks here.
@SuppressWarnings("StatementWithEmptyBody") @Override public boolean onNavigationItemSelected(MenuItem item) { int id = item.getItemId(); if (id == R.id.nav_camera) { // Handle the camera action } else if (id == R.id.nav_gallery) { } else if (id == R.id.nav_slideshow) { } else if (id == R.id.nav_manage) { } else if (id == R.id.nav_share) { } else if (id == R.id.nav_send) { } else if (id == R.id.nav_dark_theme) { Log.d(TAG, "nav dark theme"); // todo: selectTheme() } else if (id == R.id.nav_settings) { Intent intent = new Intent(this, SettingsActivity.class); startActivity(intent); } // config DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); drawer.closeDrawer(GravityCompat.START); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onNavigationItemClicked(Element element);", "@Override\n public void onClick(View view) { listener.onItemClick(view, getPosition()); }", "void onDialogNavigationItemClicked(Element element);", "@Override\n public void onClick(View view) {\n itemInterface.OnItemClickedListener(tr...
[ "0.7882029", "0.7235578", "0.6987005", "0.69458413", "0.6917864", "0.6917864", "0.6883472", "0.6875181", "0.68681556", "0.6766498", "0.67418456", "0.67207", "0.6716157", "0.6713947", "0.6698189", "0.66980195", "0.66793925", "0.66624063", "0.66595167", "0.6646381", "0.6641224"...
0.0
-1
User making this request
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception{ User user = UserUtils.getUser(request); if (user == null) { ActionErrors errors = new ActionErrors(); errors.add("username", new ActionMessage("error.login.notloggedin")); saveErrors( request, errors ); return mapping.findForward("authenticate"); } // Restrict access to administrators Groups groupMan = Groups.getInstance(); if (!groupMan.isMember(user.getResearcher().getID(), "administrators")) { ActionErrors errors = new ActionErrors(); errors.add("access", new ActionMessage("error.access.invalidgroup")); saveErrors( request, errors ); return mapping.findForward("Failure"); } ProjectsSearcher ps = new ProjectsSearcher(); ps.addStatusType(CollaborationStatus.ACCEPTED); ps.addStatusType(CollaborationStatus.COMPLETE); ps.addStatusType(CollaborationStatus.EXPIRED); List <Project> projects = ps.search(); Collections.sort(projects, new Comparator<Project>() { public int compare(Project o1, Project o2) { return Integer.valueOf(o2.getID()).compareTo(o1.getID()); }}); List<ProjectUsageSummary> usageList = new ArrayList<ProjectUsageSummary>(projects.size()); List<ProjectInstrumentUsage> projInstrUsage = ProjectInstrumentUsageDAO.getInstance().getAllProjectInstrumentUsage(null, null); // sort by projectID Collections.sort(projInstrUsage, new Comparator<ProjectInstrumentUsage>() { public int compare(ProjectInstrumentUsage o1, ProjectInstrumentUsage o2) { return Integer.valueOf(o1.getProjectID()).compareTo(o2.getProjectID()); }}); for(Project project: projects) { ProjectUsageSummary summary = new ProjectUsageSummary(); summary.setProject(project); ProjectRawFileUsage rawFileUsage = ProjectRawFileUsageUtils.instance().loadUsage(project.getID()); if(rawFileUsage == null) rawFileUsage = new ProjectRawFileUsage(); summary.setRawFileUsage(rawFileUsage); List<ProjectInstrumentUsage> projUsage = getProjectInstrumentUsage(project.getID(), projInstrUsage); // sort by instrument ID Collections.sort(projUsage, new Comparator<ProjectInstrumentUsage>() { public int compare(ProjectInstrumentUsage o1, ProjectInstrumentUsage o2) { return Integer.valueOf(o1.getInstrumentID()).compareTo(o2.getInstrumentID()); }}); summary.setInstrumentUsage(projUsage); usageList.add(summary); } request.setAttribute("projectUsageList", usageList); List<MsInstrument> instruments = MsInstrumentUtils.instance().getMsInstruments(); Collections.sort(instruments, new Comparator<MsInstrument>() { public int compare(MsInstrument o1, MsInstrument o2) { return Integer.valueOf(o1.getID()).compareTo(o2.getID()); }}); List<String> instrumentNames = new ArrayList<String>(instruments.size()); for(MsInstrument instrument: instruments) { if(instrument.getNameOnly().equals("LTQ")) instrumentNames.add("LTQ"); else if (instrument.getNameOnly().equals("LTQ-ETD")) instrumentNames.add("ETD"); else if (instrument.getNameOnly().equals("LTQ-Orbitrap-1")) instrumentNames.add("Orbi1"); else if (instrument.getNameOnly().equals("LTQ-Orbitrap-2")) instrumentNames.add("Orbi2"); else if (instrument.getNameOnly().equals("LTQ-FT")) instrumentNames.add("FT"); else if (instrument.getNameOnly().equals("TSQ-Access")) instrumentNames.add("TSQ-A"); else if (instrument.getNameOnly().equals("TSQ-Vantage")) instrumentNames.add("TSQ-V"); else if (instrument.getNameOnly().equals("nanoMate")) instrumentNames.add("nMate"); else if (instrument.getNameOnly().equals("Agilent HPLC")) instrumentNames.add("HPLC"); else if (instrument.getNameOnly().equals("Q")) instrumentNames.add("Q"); } request.setAttribute("instruments", instruments); request.setAttribute("instrumentNames", instrumentNames); if(ProjectRawFileUsageUtils.getLastDateParsed() != null) { request.setAttribute("dateUpdated", ProjectRawFileUsageUtils.getLastDateParsed()); } return mapping.findForward("Success"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getRequestedBy() {\n return this.requestedBy;\n }", "private void getUserInfo() {\n\t}", "public User getRequester() {\n return requester;\n }", "public User getRequested() {\n return requested;\n }", "public void requestUserData() {\r\n\t \tmText.setText(\"Fetching user ...
[ "0.64804566", "0.64239866", "0.6389979", "0.63554376", "0.631174", "0.6269129", "0.6209113", "0.61944205", "0.60534996", "0.60534996", "0.6033523", "0.6033523", "0.6033523", "0.60274893", "0.5965384", "0.5961289", "0.5956938", "0.59345096", "0.5885353", "0.58688504", "0.58611...
0.0
-1
/EntityManager manager = UtilJPA.getEntityManager(); EntityTransaction transacao = manager.getTransaction(); transacao.begin(); manager.merge(pAluno); /Session sessaoHibernate = BibliotecaFuncoes.createSessionHibernate().openSession(); org.hibernate.Transaction transacaoHibernate = sessaoHibernate.beginTransaction(); sessaoHibernate.merge(pAluno); Cache cacheHibernate = sessaoHibernate.getSessionFactory().getCache(); cacheHibernate.evictQueryRegion(Aluno.ALUNO_REGIAO_CACHE_CONSULTA_PSC); transacaoHibernate.commit(); sessaoHibernate.close(); /transacao.commit(); manager.close();
@Override public void atualizar(Aluno pAluno) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void actualizar(Dia dia) {\n Session session = sessionFactory.openSession();\n //la transaccion a relizar\n Transaction tx = null;\n try {\n tx = session.beginTransaction();\n //actualizar el Dia\n session.update(dia);\n \n tx...
[ "0.6848435", "0.63598496", "0.6215269", "0.6195808", "0.6180282", "0.61194664", "0.6058769", "0.6052759", "0.6040598", "0.5975484", "0.59664494", "0.5932659", "0.5919998", "0.5909133", "0.59005034", "0.58955204", "0.58950967", "0.5875241", "0.58397144", "0.57949704", "0.57588...
0.0
-1
Deze methode wordt opgeroepen wanneer een socket geopend wordt
@OnOpen public void onOpen(Session session) { System.out.println("Socket A: "+session.getId() + " has opened a connection"); sendMessageToAll("User " + session.getId() + " has connected"); try { //stuur naar de client van de sessie 'Connection Established' over TCP. session.getBasicRemote().sendText("Connection Established"); } catch (IOException ex) { ex.printStackTrace(); } sessions.add(session); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public synchronized void open(){\n if(connected){ //Already connected but needs to get streams\n try{\n streamIn = new DataInputStream(socket.getInputStream());\n streamOut = new DataOutputStream(socket.getOutputStream());\n System.out.println(clientID...
[ "0.74041045", "0.7078683", "0.705678", "0.6950563", "0.6858764", "0.6811653", "0.67752546", "0.6745438", "0.6659477", "0.6648031", "0.6645514", "0.6640448", "0.66336876", "0.65867", "0.6569606", "0.65653455", "0.655748", "0.6547912", "0.653849", "0.6515882", "0.6444909", "0...
0.0
-1
Deze methode wordt opgeroepen wanneer een bericht over een socket gestuurd wordt.
@OnMessage public void onMessage(String message, Session session){ System.out.println("Socket A: Message from " + session.getId() + ": " + message); sendMessageToAll(message); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void socket() {\n }", "private static Socket getSocket() \n{\n return socket; \n }", "public abstract void handle(Socket socket);", "public void setSocket(SocketWrapper socket);", "@Override\r\n\tpublic void start(Socket socket){}", "protected abstract void processConnectio...
[ "0.8156953", "0.70110613", "0.69992167", "0.6857247", "0.6799829", "0.67764056", "0.6717426", "0.6702323", "0.6629782", "0.66210157", "0.6588764", "0.65696645", "0.652435", "0.65198755", "0.6518391", "0.65074575", "0.6499679", "0.6467588", "0.6444022", "0.6412852", "0.6382127...
0.0
-1
Deze methode wordt opgeroepen wanneer een websocket gesloten wordt.
@OnClose public void onClose(Session session){ System.out.println("Socket A: Chat " +session.getId()+" has ended"); sessions.remove(session); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onMessage(WebSocket webSocket, ByteString bytes) {\n }", "public void onOpen(WebSocket conn);", "public void onConnect(WebSocket ws) {\n\t\ttry {\n\t\t\tif (ws == null || ws.getRemoteSocketAddress() == null) {\n\t\t\t\terror(\"ws or getRemoteSocketAddress() == null\");\n\t...
[ "0.6643291", "0.6623343", "0.62567246", "0.62543726", "0.62324226", "0.6213568", "0.61980355", "0.61482286", "0.6145522", "0.61064744", "0.610412", "0.60862863", "0.6023311", "0.6019002", "0.60157037", "0.60097224", "0.5997086", "0.5941735", "0.59110826", "0.5883439", "0.5858...
0.0
-1
Deze methode stuurt een bericht naar alle geconnecteerde gebruikers over TCP.
private void sendMessageToAll(String message){ for(Session s : sessions){ try { s.getBasicRemote().sendText(message); } catch (IOException ex) { ex.printStackTrace(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void open(String nameNport) {\n\tString[] token=nameNport.split(\":\");\n\tString host=token[0];\n\tint port=Integer.parseInt(token[1]);\n\tint proceedFlag=1;\n\tIterator<Socket> iterator=Connection.connections.iterator();\n\tif(host.equalsIgnoreCase(\"localhost\") || host.equals(\"127.0.0.1\"))\n\t\thost=simpella...
[ "0.6864302", "0.676157", "0.6718189", "0.66988605", "0.6685401", "0.66853756", "0.6670593", "0.65701234", "0.656891", "0.6515451", "0.6476843", "0.6473176", "0.6458876", "0.6448115", "0.6438903", "0.6416031", "0.6416031", "0.6416031", "0.6395781", "0.6375253", "0.6351876", ...
0.0
-1
Dummies() Call the other methods
public void insertDummies() { insertPersoner(); insertAnsatte(); insertEmner(); insertForfattere(); insertBoger(); insertBogEksemplare(); insertReservation(); insertLecture(); insertPlannedLectures(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void demo() {\n\t\tlab_2_2_5();\n\n\t}", "static void SampleItinerary()\n {\n System.out.println(\"\\n ***Everyone piles on the boat and goes to Molokai***\");\n\n bg.AdultRowToMolokai();\n bg.ChildRideToMolokai();\n bg.AdultRideToMolokai();\n bg.ChildRideToMol...
[ "0.63335925", "0.6143012", "0.6137225", "0.6131612", "0.6131612", "0.61158085", "0.61127114", "0.6082568", "0.60433376", "0.60359627", "0.6001247", "0.5971997", "0.59441864", "0.59436035", "0.5914775", "0.58979005", "0.5894288", "0.5886673", "0.5869266", "0.5868959", "0.58425...
0.683861
0
insertForfatter() Insert four dummy books
private void insertBoger() { Emne emne; Bog bog; Forfatter forfatter; emne = _database.getEmne().get(0); bog = new BogEksemplar("Titel-1", emne, 2001,1); forfatter = _database.getForfatter().get(0); bog.addForfatter(forfatter); _database.addBog(bog); emne = _database.getEmne().get(0); bog = new BogEksemplar("Titel-1", emne, 2001,2); forfatter = _database.getForfatter().get(0); bog.addForfatter(forfatter); _database.addBog(bog); emne = _database.getEmne().get(0); bog = new BogEksemplar("Titel-2", emne, 2002,1); forfatter = _database.getForfatter().get(1); bog.addForfatter(forfatter); _database.addBog(bog); emne = _database.getEmne().get(1); bog = new BogEksemplar("Titel-3", emne, 2003,1); forfatter = _database.getForfatter().get(1); bog.addForfatter(forfatter); _database.addBog(bog); emne = _database.getEmne().get(0); bog = new BogEksemplar("Titel-4", emne, 2001,1); forfatter = _database.getForfatter().get(2); bog.addForfatter(forfatter); _database.addBog(bog); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void insertDummyBook() {\n ContentValues values = new ContentValues();\n values.put(BookEntry.COLUMN_NAME, getString(R.string.dummy_book_name));\n values.put(BookEntry.COLUMN_GENRE, BookEntry.GENRE_SELF_HELP);\n values.put(BookEntry.COLUMN_PRICE, getResources().getInteger(R.inte...
[ "0.7529759", "0.7145833", "0.70802724", "0.6802227", "0.6786902", "0.66785604", "0.66631913", "0.66591066", "0.66591066", "0.66193295", "0.6615604", "0.6608043", "0.66075", "0.6539643", "0.64695317", "0.6456758", "0.6456758", "0.6408669", "0.63643575", "0.6326568", "0.6284272...
0.62842375
21
on definit une fonction pour le dechiffrement
public static String decrypt(String privateKeyString, String cipherText, boolean usingOAEP) throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchPaddingException, InvalidKeyException, BadPaddingException, IllegalBlockSizeException, InvalidAlgorithmParameterException { PKCS8EncodedKeySpec privateKeySpec = new PKCS8EncodedKeySpec( Base64.getDecoder().decode(privateKeyString)); PrivateKey priKey = KeyFactory.getInstance("RSA").generatePrivate(privateKeySpec); Cipher cipher = Cipher.getInstance("RSA/ECB/OAEPWITHSHA-256ANDMGF1PADDING"); if (usingOAEP) { OAEPParameterSpec oaepParameterSpec = new OAEPParameterSpec("SHA-256", "MGF1", MGF1ParameterSpec.SHA256, PSource.PSpecified.DEFAULT); cipher.init(Cipher.DECRYPT_MODE, priKey, oaepParameterSpec); } else { cipher.init(Cipher.DECRYPT_MODE, priKey); } byte[] decrypted = cipher.doFinal(Base64.getDecoder().decode(cipherText.getBytes())); return new String(decrypted); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void berechneFlaeche() {\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public void trenneVerbindung();", "@Override\r\n\tpublic void...
[ "0.7096779", "0.6935772", "0.69332963", "0.6901699", "0.6840707", "0.6824134", "0.6780834", "0.6780834", "0.67392445", "0.6678631", "0.66772586", "0.6657708", "0.65840214", "0.6571801", "0.6564062", "0.65590376", "0.6554358", "0.65102744", "0.64995545", "0.64989644", "0.64878...
0.0
-1
/ Function which to initialize all tab values at once.
@Override public void initialize(URL location, ResourceBundle resources) { System.out.println("hello Mission"); if(MainScreenController.droneparameters == null) super.initialize(location, resources); CommunicationParams = MainScreenController.droneparameters.getCommunicationParams(); if(CommunicationParams == null) System.out.println("why null"); Iterator<TextField> cl = commList.iterator(); Iterator<Integer> cp = CommunicationParams.iterator(); while (cl.hasNext() && cp.hasNext()) { TextField t = cl.next(); Integer value = cp.next(); t.setText(value.toString()); } ScenarioParams = MainScreenController.droneparameters.getScenarioParams(); Iterator<TextField> sl = scenarioList.iterator(); Iterator<Double> sp = ScenarioParams.iterator(); while (sl.hasNext() && sp.hasNext()) { TextField t = sl.next(); Double value = sp.next(); t.setText(value.toString()); } AlgorithmParams = MainScreenController.droneparameters.getAlgorithmParams(); Iterator<TextField> al = algoList.iterator(); Iterator<Double> ap = AlgorithmParams.iterator(); while (al.hasNext() && ap.hasNext()) { TextField t = al.next(); Double value = ap.next(); t.setText(value.toString()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initValues() {\n \n }", "private void initTab()\n {\n \n }", "private void initTabs()\n {\n updateDayTab();\n\n // Set initial time on time tab\n updateTimeTab();\n }", "private void init() {\n setMinutes(new int[] {});\n setHours(new int...
[ "0.7378136", "0.7107879", "0.71045345", "0.6554045", "0.6503403", "0.64666605", "0.6453552", "0.6397471", "0.63151425", "0.6313505", "0.625909", "0.62181985", "0.6201507", "0.6179764", "0.61635983", "0.6141831", "0.6122941", "0.6122773", "0.6122149", "0.60988724", "0.6085491"...
0.0
-1
/ Function which is used to Navigate back to Main Screen
@FXML private void loadMainScreen(ActionEvent event) { System.out.println("loading MainScreen " + getClass().getResource(RESOURCE_PATH + "MainScreen.fxml")); try { Parent root = FXMLLoader.load(getClass().getResource(RESOURCE_PATH + "MainScreen.fxml")); Scene scene = new Scene(root); scene.getStylesheets().add(getClass().getResource(RESOURCE_PATH + "application.css").toExternalForm()); Stage window = (Stage)((Node)event.getSource()).getScene().getWindow(); window.setScene(scene); window.show(); } catch(Exception e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void backToMain() {\n // https://stackoverflow.com/questions/5446565\n // Checks to see if they are still on this activity\n if (getWindow().getDecorView().getRootView().isShown()) {\n onBackPressed();\n }\n }", "private void backToMenu() {\n game.setScree...
[ "0.8002883", "0.7954606", "0.7707787", "0.76252204", "0.75583357", "0.75412667", "0.75403494", "0.7500802", "0.74326986", "0.73587483", "0.73477024", "0.7302714", "0.7298599", "0.72759885", "0.7262931", "0.7256214", "0.7200828", "0.71984345", "0.7178085", "0.71420836", "0.711...
0.0
-1
Properties constructor for EmployeeDirectory
public EmployeeDirectory(Properties properties) { this(); this.properties = properties; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public\n YutilProperties()\n {\n super(new Properties());\n }", "public Employee(){\n this.employeeName = new String();\n this.employeeSalary = null;\n this.employeeProjectList = new ArrayList<String>();\n this.employeeDepartmentLead = new String();\n }", "public ...
[ "0.61388665", "0.6049333", "0.60203934", "0.6015962", "0.5981886", "0.59209186", "0.5891076", "0.5886058", "0.5886058", "0.5875916", "0.58675903", "0.585061", "0.584894", "0.58468556", "0.58292705", "0.581646", "0.58137923", "0.5805377", "0.57774514", "0.57631224", "0.5732302...
0.86158824
0
Main method for the EmployeeDirectory class. Takes in a search term, type , and calls the main query method to get results.
public Object searchEmployeeDatabase(String searchTerm, String searchType) { Object completedSearch = null; completedSearch = queryDatabase(searchType, searchTerm); return completedSearch; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Object queryDatabase(String searchType, String searchTerm) {\n Connection connection = null;\n PreparedStatement statement = null;\n Search search = new Search();\n ResultSet resultSet = null;\n String queryString = null;\n\n try {\n connection = getConn...
[ "0.654633", "0.6068998", "0.5976594", "0.5934418", "0.5856534", "0.56976664", "0.5648552", "0.5648434", "0.5619979", "0.559709", "0.5564229", "0.5562186", "0.55593723", "0.5554327", "0.5546883", "0.5527332", "0.5523756", "0.5510498", "0.5506027", "0.5504269", "0.5423498", "...
0.63962936
1
Method takes in form data from servlet and creates query to add new employee record.
public String addEmployeeRecord(String firstName, String lastName, String socialSecurityNumber, String department, String roomNumber, String phoneNumber) { Connection connection = null; PreparedStatement statement = null; ResultSet resultSet = null; int result = 0; try { connection = getConnection(connection); String queryString = "INSERT INTO employees " + "(first_name, last_name, ssn, dept, room, phone)" + "values ( ?, ?, ?, ?, ?, ? )"; statement = connection.prepareStatement(queryString); statement.setString(1, firstName); statement.setString(2, lastName); statement.setString(3, socialSecurityNumber); statement.setString(4, department); statement.setString(5, roomNumber); statement.setString(6, phoneNumber); result = statement.executeUpdate(); } catch (SQLException sqlException) { sqlException.printStackTrace(); } catch (Exception exception) { System.err.println("General Error"); exception.printStackTrace(); } finally { try { if (resultSet != null) { resultSet.close(); } if (statement != null) { statement.close(); } if (connection != null) { connection.close(); } } catch (SQLException sqlException) { sqlException.printStackTrace(); } catch (Exception exception) { exception.printStackTrace(); } } if (result > 0) { return "New employee added successfully."; } else { return "Error adding new employee."; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addEmployee(HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\tString firstName = request.getParameter(\"firstName\");\r\n\t\tString lastName = request.getParameter(\"lastName\");\r\n\t\tString gender = request.getParameter(\"gender\");\r\n\t\tint age = Integer.parseInt(...
[ "0.7062505", "0.64722615", "0.643423", "0.642383", "0.6353797", "0.62946594", "0.625145", "0.6237649", "0.61718047", "0.60362995", "0.6033694", "0.60213375", "0.60108507", "0.5992741", "0.59794384", "0.5963402", "0.59450316", "0.5933117", "0.59063864", "0.5871487", "0.5860445...
0.6255791
6
Opens the databse connection to be used for querying.
private Connection getConnection(Connection connection) { try { Class.forName(properties.getProperty("db.driver")); connection = DriverManager.getConnection( properties.getProperty("db.url"), properties.getProperty("db.username"), properties.getProperty("db.password")); } catch (ClassNotFoundException classNotFound) { classNotFound.printStackTrace(); } catch (SQLException sqlException) { sqlException.printStackTrace(); } catch (Exception exception) { System.err.println("General Error"); exception.printStackTrace(); } return connection; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void openDatabase() {\r\n if ( connect != null )\r\n return;\r\n\r\n try {\r\n // Setup the connection with the DB\r\n String host = System.getenv(\"DTF_TEST_DB_HOST\");\r\n String user = System.getenv(\"DTF_TEST_DB_USER\");\r\n String pa...
[ "0.78255767", "0.76114136", "0.7491245", "0.74428076", "0.74326694", "0.7400678", "0.7380364", "0.736911", "0.73287696", "0.72921646", "0.72505873", "0.72432", "0.72362167", "0.7188609", "0.7181671", "0.71778256", "0.71736205", "0.71364766", "0.7116425", "0.7097413", "0.70887...
0.0
-1
Main query method. Calls methods for opening database connection and preparing query for use. Sets search object data and calls the method to build the employee array list.
private Object queryDatabase(String searchType, String searchTerm) { Connection connection = null; PreparedStatement statement = null; Search search = new Search(); ResultSet resultSet = null; String queryString = null; try { connection = getConnection(connection); queryString = getQueryString(searchType); statement = connection.prepareStatement(queryString); if (searchType.equals("employeeId")) { statement.setString(1, searchTerm); } else { statement.setString(1, searchTerm + "%"); } resultSet = statement.executeQuery(); buildEmployeeList(resultSet, search); } catch (SQLException sqlException) { sqlException.printStackTrace(); } catch (Exception exception) { System.err.println("General Error"); exception.printStackTrace(); } finally { try { if (resultSet != null) { resultSet.close(); } if (statement != null) { statement.close(); } if (connection != null) { connection.close(); } } catch (SQLException sqlException) { sqlException.printStackTrace(); } catch (Exception exception) { exception.printStackTrace(); } } return search; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static List<Employee> getAllEmployees(){\n\t\t// Get the Datastore Service\n\t\tlog.severe(\"datastoremanager-\" + 366);\n\t\tDatastoreService datastore = DatastoreServiceFactory.getDatastoreService();\n\t\tlog.severe(\"datastoremanager-\" + 368);\n\t\tQuery q = buildAQuery(null);\n\t\tlog.severe(\"datastor...
[ "0.6667655", "0.6599867", "0.65646863", "0.6537678", "0.60226965", "0.5993738", "0.59429616", "0.593473", "0.59133154", "0.5890466", "0.58637196", "0.57836115", "0.5776332", "0.5739151", "0.57055414", "0.56984496", "0.5685315", "0.5666787", "0.56521165", "0.5648485", "0.56465...
0.59279245
8
Uses the search type to select the proper query string for execution.
private String getQueryString(String searchType) { String queryString; if (searchType.equals("employeeId")) { queryString = "SELECT * FROM employees WHERE emp_id = ?"; } else if (searchType.equals("firstName")) { queryString = "SELECT * FROM employees WHERE first_name LIKE ?"; } else { queryString = "SELECT * FROM employees WHERE last_name LIKE ?"; } return queryString; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private AniteQueryType(final int searchType)\r\n\t{\r\n\t\tthis.searchType = searchType;\r\n\t}", "public void setSearchType(final int searchType)\r\n\t{\r\n\t\tthis.searchType = searchType;\r\n\t}", "public String getSearchType() {\r\n\t\treturn searchType;\r\n\t}", "public String getSearchType() {\r\n\t\tr...
[ "0.6887494", "0.6719066", "0.6589408", "0.6589408", "0.64641416", "0.64148015", "0.6398585", "0.6389164", "0.6363814", "0.6335858", "0.63074076", "0.6268044", "0.62362975", "0.6214435", "0.62074435", "0.6186353", "0.6186353", "0.61565864", "0.6146622", "0.61348706", "0.611151...
0.71646893
0
Uses the search type to select the proper query string for execution.
private Search buildEmployeeList(ResultSet resultSet, Search search) { try { while (resultSet.next()) { search.setFoundEmployees(true); Employee employee = new Employee(); String employee_id = resultSet.getString("emp_id"); System.out.println(employee_id); employee.setEmployeeId(employee_id); employee.setFirstName(resultSet.getString("first_name")); employee.setLastName(resultSet.getString("last_name")); employee.setSocialSecurityNumber(resultSet.getString("ssn")); employee.setDepartment(resultSet.getString("dept")); employee.setRoomNumber(resultSet.getString("room")); employee.setPhoneNumber(resultSet.getString("phone")); search.addEmployee(employee); } } catch (SQLException sqlException) { sqlException.printStackTrace(); } catch (Exception exception) { exception.printStackTrace(); } return search; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getQueryString(String searchType) {\n String queryString;\n\n if (searchType.equals(\"employeeId\")) {\n queryString = \"SELECT * FROM employees WHERE emp_id = ?\";\n } else if (searchType.equals(\"firstName\")) {\n queryString = \"SELECT * FROM employees W...
[ "0.7165629", "0.6889", "0.6720463", "0.6591494", "0.6591494", "0.64653826", "0.64168906", "0.6400837", "0.6389158", "0.63643205", "0.6336842", "0.630944", "0.62671787", "0.6238449", "0.6215762", "0.6207642", "0.61875093", "0.61875093", "0.6157062", "0.6147239", "0.61377794", ...
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { final View view = inflater.inflate(R.layout.fragment_plan, container, false); Log.i("SJA", "okk fuckinng inn PlanFragment"); customActionBar(); sharedPreferences = getActivity().getSharedPreferences("recap", Context.MODE_PRIVATE); editor = sharedPreferences.edit(); Fname = sharedPreferences.getString("fname", ""); Lname = sharedPreferences.getString("lname", ""); tarikh = sharedPreferences.getString("date", ""); first = Fname.charAt(0); type = sharedPreferences.getString("type", ""); goals = sharedPreferences.getString("goals", ""); textPreviewDate = (TextView) view.findViewById(R.id.tvForDate); tvPreviewGoals = (TextView) view.findViewById(R.id.textPreviewForGoals); tvPreviewGoalsLayout = (LinearLayout) view.findViewById(R.id.textPreviewForGoalsLayout); // tvDate = (TextView) view.findViewById(R.id.tvDate); planScrollView = view.findViewById(R.id.plan_scrollview); sessionTypeSpinner = (Spinner) view.findViewById(R.id.spinnerSessionType); goalSpinner = (Spinner) view.findViewById(R.id.spinnerGoals); userGoalSPinner = (Spinner) view.findViewById(R.id.spinnerUserGoal); adapter = new ArrayAdapter<String>(getActivity(), android.R.layout.simple_spinner_item, list); adapter2 = new ArrayAdapter<String>(getActivity(), android.R.layout.simple_spinner_item, list2); textPreviewForUserGoal = (TextView) view.findViewById(R.id.tvUserGoal); textPreviewForUserGoalLayout = (LinearLayout) view.findViewById(R.id.tvUserGoalLayout); showDatePicker(); //populating second spinner list.add("Goal"); String[] GoalsArray = goals.split(","); items = new CharSequence[GoalsArray.length]; for (int j = 0; j < GoalsArray.length; j++) { items[j] =GoalsArray[j]; list.add(GoalsArray[j]); } //populating 3rd spinner list2.add("Goals"); String[] GoalsArray2 = goals.split(","); items = new CharSequence[GoalsArray2.length]; for (int j = 0; j < GoalsArray2.length; j++) { items[j] =GoalsArray2[j]; list2.add(GoalsArray2[j]); } 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
set day of month , month and year value in the edit text
@Override public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) { strDate = (monthOfYear + 1) + "/" + dayOfMonth + "/" + year; editor.putInt("Month", monthOfYear + 1).commit(); editor.putInt("Day", mDay).commit(); editor.putInt("Year", year).commit(); editor.putString("Date", strDate).commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n txtDate.setText(dayOfMonth + \"-\" + (monthOfYear + 1) + \"-\" + year);}", "@Override\n\t\t\t\tpublic void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n\t\t\t\t\tEditText et = (Edi...
[ "0.7824289", "0.77301806", "0.7647644", "0.7637762", "0.75589955", "0.75245535", "0.751746", "0.746788", "0.746788", "0.7452598", "0.7452316", "0.74369216", "0.7415577", "0.7406775", "0.7394061", "0.73940384", "0.7377177", "0.7374161", "0.73436993", "0.730471", "0.73002887", ...
0.70990574
40
Create an empty results List.
public RatingPeriodResults() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<T> getResults();", "public DefaultResults() {\n this.results = new ArrayList<R>();\n this.totalCc = new ArrayList<Long>();\n this.maximalCc = new ArrayList<Long>();\n this.totalBytes = new ArrayList<Long>();\n this.maximalBytes = new ArrayList<Long>();\...
[ "0.7069294", "0.70231074", "0.680187", "0.6798109", "0.6788899", "0.65787137", "0.65427464", "0.6472977", "0.641188", "0.63166946", "0.62815464", "0.62545794", "0.6254203", "0.6226901", "0.62080586", "0.61133826", "0.6087777", "0.60345006", "0.59639436", "0.5961448", "0.59560...
0.0
-1
Constructor that allows you to initialize the list of participants.
public RatingPeriodResults(Set<Player> participants) { this.participants = participants; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Builder clearParticipants() {\n participants_ = com.google.protobuf.LazyStringArrayList.EMPTY;\n bitField0_ = (bitField0_ & ~0x00000002);\n onChanged();\n return this;\n }", "public Builder clearParticipants() {\n participants_ = java.util.Collections.emptyList();\n...
[ "0.697661", "0.68570995", "0.66730803", "0.6345749", "0.6308443", "0.63015306", "0.6296871", "0.6234476", "0.61319077", "0.6107508", "0.60940194", "0.60513926", "0.6050531", "0.6022388", "0.5986301", "0.59828514", "0.59459543", "0.59437346", "0.5935726", "0.59127545", "0.5898...
0.63185424
4
Add a result to the set.
public void addResult(Player winner, Player loser) { Result result = new Result(winner, loser); results.add(result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void add(R result) {\n results.add(result);\n }", "public void addResult(String key, String value) {\n Preconditions.checkArgument(!results.containsKey(key), \"the result already contains that key\");\n results.put(key, value);\n }", "void add(CheckResult result) {\r\n ...
[ "0.78484017", "0.7046281", "0.6894097", "0.6747943", "0.65542316", "0.64015293", "0.6289573", "0.61756176", "0.6156775", "0.6135829", "0.6126367", "0.60914785", "0.60841715", "0.60694486", "0.605938", "0.5989805", "0.59860295", "0.5976935", "0.5959398", "0.594646", "0.5943835...
0.6245174
7
Record a draw between two players and add to the set.
public void addDraw(Player player1, Player player2) { Result result = new Result(player1, player2, true); results.add(result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void draw()\r\n\t{\r\n\t\tfor(int i=1;i<accountValue.length;i++)\r\n\t\t{\r\n\t\t\taccountValue[i]+=playerBet[i];\r\n\t\t}\r\n\t\tendRund();\r\n\t}", "public Record(int wins, int losses, int draws) {\n this.wins = wins;\n this.losses = losses;\n this.draws = draws;\n }", "private void addDraw(...
[ "0.60692793", "0.59132636", "0.5865012", "0.55537206", "0.54642457", "0.54428035", "0.54354095", "0.54344755", "0.5409228", "0.5397929", "0.53875315", "0.53851825", "0.5366184", "0.53650826", "0.53508997", "0.53486186", "0.5348126", "0.5337442", "0.52990836", "0.5298275", "0....
0.72341186
0
Get a list of the results for a given player.
public List<Result> getPlayerResults(Player player) { return results.stream() .filter(result -> result.participated(player)) .collect(Collectors.toList()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Player> getPlayers();", "public List<PlayerItem> getAllPlayerItemById(Player player);", "List<GameResult> getAllResults();", "List<Player> listPlayers();", "List<Player> findAllPlayers();", "public ListResponse<PlayerResponse> getPlayers() {\n\t\tcheckProvided();\n\t\treturn players;\n\t}", "List<...
[ "0.7055198", "0.70141834", "0.69542664", "0.6810832", "0.67196333", "0.6708968", "0.66545963", "0.66214246", "0.65685695", "0.6509973", "0.6474034", "0.6434694", "0.641391", "0.6413427", "0.63168126", "0.616004", "0.6148122", "0.6133051", "0.6124749", "0.6114354", "0.6108158"...
0.84910256
0
Add a participant to the rating period, e.g. so that their rating will still be calculated even if they don't actually compete.
public void addParticipants(Player rating) { participants.add(rating); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addParticipant(Participant participant);", "public void addParticipant(Participant p) {\r\n\t\tpstate.addParticipant(p);\r\n\t}", "@Override\n public void addParticipant(Participant participant) throws AlfredException {\n this.participantList.add(participant);\n }", "public void addParticip...
[ "0.6813712", "0.64673835", "0.64112914", "0.6141623", "0.6091279", "0.59931487", "0.58227736", "0.5804706", "0.57762265", "0.5761053", "0.57384837", "0.5733833", "0.5597426", "0.55925244", "0.55860054", "0.5530793", "0.55092394", "0.54591495", "0.5458266", "0.54525363", "0.54...
0.75117296
0
Clear the results Set.
public void clear() { results.clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clear() {\n results.clear();\n }", "public void clearResultEntries() {\n sp_searchEntries.removeAll();\n }", "public void clear()\n {\n if (resultSet != null)\n {\n try\n {\n resultSet.close();\n } catch (SQLExcept...
[ "0.89200455", "0.79991615", "0.7719628", "0.762692", "0.762692", "0.762692", "0.762692", "0.762692", "0.762692", "0.762692", "0.762692", "0.762692", "0.762692", "0.762692", "0.7615968", "0.7615968", "0.7615968", "0.7615968", "0.76060575", "0.76060575", "0.76060575", "0.7606...
0.886149
1
Get all the participants whose results are being tracked.
public Set<Player> getParticipants() { //TODO: not sure the validation needs to happend here // Run through the results and make sure all players have been pushed into the participants set. for ( Result result : results ) { participants.add(result.getWinner()); participants.add(result.getLoser()); } return participants; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Result> getPlayerResults(Player player) {\t\n\t\treturn results.stream()\n\t\t\t\t.filter(result -> result.participated(player))\n\t\t\t\t.collect(Collectors.toList());\n\t}", "public java.util.List<java.lang.Long>\n getParticipantsList() {\n return participants_;\n }", "public java....
[ "0.6747765", "0.6503424", "0.6469618", "0.6454108", "0.64061713", "0.63890046", "0.63200504", "0.6233189", "0.612128", "0.608513", "0.6078622", "0.59236705", "0.58975995", "0.58643425", "0.58514047", "0.58514047", "0.5842506", "0.5833106", "0.58115363", "0.58115363", "0.57722...
0.7436926
0
/ access modifiers changed from: protected
public RenderData onMerge(RenderData renderData) { if (!isSkyTransfer() && (renderData instanceof FilterRenderData)) { FilterRenderData filterRenderData = (FilterRenderData) renderData; if (!filterRenderData.isSkyTransfer()) { ArrayList arrayList = new ArrayList(this.mEffects); arrayList.addAll(filterRenderData.mEffects); return new FilterRenderData((List<RenderMetaData>) arrayList); } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override...
[ "0.7375736", "0.7042321", "0.6922649", "0.6909494", "0.68470824", "0.6830288", "0.68062353", "0.6583185", "0.6539446", "0.65011257", "0.64917654", "0.64917654", "0.64733833", "0.6438831", "0.64330196", "0.64330196", "0.64295477", "0.6426414", "0.6420484", "0.64083177", "0.640...
0.0
-1
Interface for controllers which are responsible for creating and editing DTOs with values for a single period.
public interface IPeriodController extends IDisplayablePlugin { /** * This method is called by the platform whenever it needs DTOs for a * specific period. * * <p> * The <code>dto</code> parameter contains a reference to the DTO for this * period. It's up to the controller to remove any existing child DTOs. * * <p> * The <code>panel</code> parameter contains a reference to a {@link JPanel} * where the view can put its components. * * Modifications to the DTO can (and most probably will) occur even after * the function has returned. * * @param period * The DTO of the period. * @return Component where the view has put its components, or null if not * necessary */ Component editDTO(DTOPeriod period); /** * Defines the priority. This is used to sort the controllers before * displaying them at the GUI. The controller with the highest priority will * be displayed first. * * @return The priority of the controller. */ int getGuiPriority(); /** * Returns a list with the keys of all values which can be determined * stochastically. * * @return a list with the keys of all values which can be determined * stochastically. */ List<DTOKeyPair> getStochasticKeys(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@PostMapping\n public Season_Period addPeriod(@RequestBody Season_Period season_period){\n return periodService.addPeriod(season_period);\n }", "public interface FinancialYearSettingsService {\n\n /**\n * Save a financialYearSettings.\n *\n * @param financialYearSettingsDTO the entity...
[ "0.59561175", "0.57994765", "0.5686713", "0.5652608", "0.56330854", "0.56143916", "0.5582343", "0.5581197", "0.55800813", "0.5557357", "0.5499578", "0.5491455", "0.5449751", "0.5446401", "0.5436467", "0.5424294", "0.5399794", "0.5384583", "0.5384583", "0.5364255", "0.5323503"...
0.59168595
1
Defines the priority. This is used to sort the controllers before displaying them at the GUI. The controller with the highest priority will be displayed first.
int getGuiPriority();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n \tpublic int priority() {\n \t\treturn 10;\n \t}", "public void setPriority(int value) {\n this.priority = value;\n }", "public int priority(){\n return 0; //TODO codavaj!!\n }", "public void setPriority(int priority){\n this.priority = priority;\n }", "public void...
[ "0.6394293", "0.634888", "0.6253475", "0.6186118", "0.6045742", "0.6012887", "0.6012887", "0.5978624", "0.5924606", "0.58991116", "0.58942866", "0.5889926", "0.58790994", "0.5875086", "0.5869338", "0.5869338", "0.58430207", "0.5836694", "0.5815799", "0.5803621", "0.57920825",...
0.6363604
1
Returns a list with the keys of all values which can be determined stochastically.
List<DTOKeyPair> getStochasticKeys();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Set<Pairof<K, V>> keyVals();", "public Set<Pairof<K, V>> keyVals() {\n return this.bst.toSortedList().toset().map(i -> new Pairof<>(i.left, i.right));\n }", "Iterable<K> findKeysForValue(V val);", "@Override\n public Set keySet() {\n OmaLista palautettava = new OmaLista();\n\n for ...
[ "0.62620693", "0.6249102", "0.607946", "0.60378885", "0.60078555", "0.59880906", "0.59878284", "0.5942339", "0.59411514", "0.5931028", "0.59171677", "0.58479583", "0.58479583", "0.58471936", "0.5825137", "0.5817039", "0.57798225", "0.57713985", "0.57696134", "0.57645386", "0....
0.63534194
0
Failure message, if any.
public Optional<String> getMessage() { return _message; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getFailureMessage();", "@Override\n\tpublic String getFailureMessage() {\n\t return null;\n\t}", "public String getFailureMessage() {\n return this.failureMessage;\n }", "@Override\r\n\tpublic String getMessage() {\n\t\treturn \"Failed\";\r\n\t}", "String failureReason();", "public St...
[ "0.8558678", "0.8272081", "0.8096935", "0.76780653", "0.75031286", "0.74286866", "0.74286866", "0.73999655", "0.7349009", "0.72760737", "0.7190978", "0.71395695", "0.70999527", "0.70934767", "0.68842304", "0.68809", "0.68809", "0.68809", "0.68809", "0.68809", "0.68809", "0....
0.0
-1
Name of this service.
public String getName() { return _name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getServiceName();", "String getServiceName();", "public String getName() {\n return (NAME_PREFIX + _applicationId + DELIM + _endpointId);\n }", "java.lang.String getServiceName();", "java.lang.String getServiceName();", "public String getDescriptiveServiceName() {\n if (serviceAbb...
[ "0.7470939", "0.7470939", "0.74171454", "0.7416419", "0.7416419", "0.7381305", "0.73759377", "0.733615", "0.733615", "0.7325598", "0.7325598", "0.73149484", "0.7284573", "0.72794455", "0.72773325", "0.72626305", "0.72626305", "0.72619665", "0.7261623", "0.7253686", "0.7234652...
0.0
-1
Convert the given object to string with each line indented by 4 spaces (except the first line).
private String toIndentedString(final Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String toIndentedString(Object object) {\n if (object == null) {\n return EndpointCentralConstants.NULL_STRING;\n }\n return object.toString().replace(EndpointCentralConstants.LINE_BREAK,\n EndpointCentralConstants.LINE_BREAK + EndpointCentralConstants.TAB_SPA...
[ "0.78847593", "0.75493765", "0.74971926", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0...
0.0
-1
for default and disposed projects the ContentManager is not available.
public void run() { if (myProject.isDisposed() || myProject.isDefault()) return; getOrCreateConsoleContent(getContentManager()); myEditorAdapter.appendString(message, attributes); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ContentManager getManager() {\r\n\t\treturn manager;\r\n\t}", "@Override\n\tprotected void UnloadContent()\n\t{\n\t\t// TODO: Unload any non ContentManager content here\n\t}", "protected IContentProvider createContentProvider() {\r\n\t\treturn new ProjectAndSourceFolderContentProvider(this);\r\n\t}", ...
[ "0.63046134", "0.58389866", "0.58251554", "0.56839776", "0.5647918", "0.55507326", "0.545547", "0.5412084", "0.53693897", "0.53573024", "0.5343322", "0.53300333", "0.5260091", "0.52309227", "0.52194434", "0.52194434", "0.52194434", "0.5202363", "0.517445", "0.51585054", "0.51...
0.0
-1
in fact, the condition is "should not be called under ApplicationManager.invokeLater() and similiar"
public void stopBackgroundVcsOperation() { assert ! ApplicationManager.getApplication().isDispatchThread(); LOG.assertTrue(myBackgroundOperationCounter > 0, "myBackgroundOperationCounter > 0"); myBackgroundOperationCounter--; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void enablePlatformRunLater() {\n Platform.setImplicitExit(false);\n }", "public static void m153578b() {\n if (!f114002e && !f113998a && !m153581d()) {\n throw new AssertionError(\"Must be called on the UI thread.\");\n }\n }", "private void init () {\n\t\tSwingUt...
[ "0.6464392", "0.64459276", "0.6274132", "0.62543774", "0.62501675", "0.61988634", "0.6145495", "0.60620135", "0.60254836", "0.5993157", "0.59663475", "0.58696693", "0.5825029", "0.5825019", "0.5769291", "0.5737082", "0.57015526", "0.5699805", "0.5648502", "0.56381905", "0.562...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { int[] arr = { 2, 3, 5, 1, 4 }; int[][] dp = new int[arr.length][arr.length]; System.out.println(MaxProfit(arr, 0, arr.length - 1, 1, dp)); System.out.println(MaxProfitBU(arr)); }
{ "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
An interface representing a user Cache.
public interface TaskCache { /** * Gets an {@link Object} which will emit a {@link TaskEntity}. * * @param userId The id used to get data. */ List<TaskEntity> get(int userId); /** * Puts and element into the cache. * * @param userEntity The task data to save. */ void put(TaskEntity userEntity); /** * Checks if an element (User) exists in the cache. * * @param userId The id used to get data. * @return true if the element is cached, otherwise false. */ boolean isCached(int userId); /** * Checks if the cache is expired. * @param userId The id used to get data. * @return true, the cache is expired, otherwise false. */ boolean isExpired(int userId); /** * Evict all elements of the cache. * * @param userId The id used to get data. */ void evictAll(int userId); /** * Change task status * * @param idTask task to update. */ void refresh(int idTask); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Cache<K,V> {\n\t/**\n\t * Returns the object for the given id from cache, null if no object is in cache.\n\t *\n\t * @param id the id to retrieve\n\t * @return a V object.\n\t */\n\tV get(K id);\n\t\n\t/**\n\t * Puts the cacheable object in cache.\n\t *\n\t * @param id the object id\n\t * @param c...
[ "0.73580444", "0.7296143", "0.7291079", "0.7060177", "0.6941981", "0.68605334", "0.6791772", "0.6775462", "0.66996986", "0.6671189", "0.6590788", "0.65390986", "0.65227777", "0.6505878", "0.6439808", "0.6404182", "0.63757676", "0.6347858", "0.6307674", "0.6306519", "0.6292043...
0.6707353
8
Puts and element into the cache.
void put(TaskEntity userEntity);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void put(final Serializable key, final Serializable value) {\n Mutex lock = checkLockExistsForKey(key);\n try {\n if (value != null) {\n final Element element = new Element(key, value);\n cache.put(element);\n } else {\n cache....
[ "0.7653796", "0.72302717", "0.7083168", "0.7062855", "0.6983739", "0.6933858", "0.69219023", "0.6862336", "0.6829544", "0.6776889", "0.67563397", "0.6720682", "0.66942567", "0.66439795", "0.6582164", "0.6579687", "0.6529939", "0.6470776", "0.6462363", "0.6430256", "0.6421266"...
0.0
-1
Checks if an element (User) exists in the cache.
boolean isCached(int userId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean userExists(String user) {\r\n return userInfo.containsKey(user);\r\n }", "private boolean isUserExists() {\n\t\treturn KliqDataStore.isUserExists(this.mobileNumber, null);\r\n\t}", "@Override\n\tpublic boolean userExists(String email) {\n\t\treturn (searchIndex(email) >= 0);\n\t}", "...
[ "0.6654322", "0.6653995", "0.65873235", "0.6587306", "0.654794", "0.65382105", "0.6523166", "0.6503571", "0.6465815", "0.63761395", "0.63328856", "0.63328856", "0.63328856", "0.63328856", "0.63328856", "0.63328856", "0.63328856", "0.63328856", "0.63328856", "0.63328856", "0.6...
0.691207
0
Checks if the cache is expired.
boolean isExpired(int userId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean hasExpired() {\n return (System.currentTimeMillis() - lastUpdate) > IMAGE_CACHE_EXPIRE;\n }", "public boolean isExpired() {\n return System.currentTimeMillis() > this.expiry;\n }", "public boolean hasExpired(){\n Date now = new Date();\n return now.after...
[ "0.80837274", "0.78828377", "0.7809246", "0.77836925", "0.7699866", "0.7685402", "0.76223356", "0.7521917", "0.7476019", "0.7471873", "0.7468249", "0.7468249", "0.7457327", "0.74151915", "0.74151504", "0.73648566", "0.7348848", "0.7328678", "0.7324265", "0.7257001", "0.724356...
0.606127
72
Evict all elements of the cache.
void evictAll(int userId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void removeEvicted() {\n Map<K,CacheableObject> removeMap = new HashMap<K,CacheableObject>(valueMap.size()/2);\n List<CacheListener<K>> tempListeners = new ArrayList<CacheListener<K>>();\n\n // Retrieve a list of everything that's to be removed\n synchronized(theLock) {\n ...
[ "0.80760145", "0.76745385", "0.7581669", "0.7575394", "0.7469762", "0.73613966", "0.73460406", "0.72362363", "0.71774477", "0.7099991", "0.7097319", "0.7030754", "0.69967955", "0.69585216", "0.6941226", "0.6927109", "0.6863268", "0.6843729", "0.68249696", "0.6802656", "0.6790...
0.6303374
72
Mothod used to create a new product.
void create(Product product) throws IllegalArgumentException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void saveNewProduct(Product product) throws BackendException;", "public void createProduct(ProductData newProduct) {\n throw new UnsupportedOperationException();\n }", "Product addOneProduct(String name, String imgNameBarcode, String imgName, String barcode) throws Exception;", "public Produ...
[ "0.76512975", "0.74637043", "0.7443942", "0.7443212", "0.7443145", "0.7436417", "0.73881716", "0.73750657", "0.7324384", "0.7282595", "0.72538227", "0.72387034", "0.7237379", "0.71588653", "0.71480685", "0.7133604", "0.71008646", "0.70844066", "0.70563114", "0.7053412", "0.70...
0.78004164
0
Method used to update the product.
void update(Product product) throws IllegalArgumentException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void update(Product product) {\n\n\t}", "public boolean update(Product product);", "Product updateProductInStore(Product product);", "@Override\r\n\tpublic int updateProduct(Product product) {\n\t\treturn 0;\r\n\t}", "void updateOfProductById(long id);", "Product updateProductById(Long id);", "p...
[ "0.8198844", "0.79692954", "0.78549117", "0.7740081", "0.76888514", "0.7618242", "0.75802994", "0.7561147", "0.7559061", "0.7517594", "0.75158703", "0.7510702", "0.75035435", "0.7494653", "0.74368435", "0.74019474", "0.74008834", "0.73446596", "0.728335", "0.72731775", "0.724...
0.7635322
5
Method used to delete the product.
void delete(Product product) throws IllegalArgumentException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void deleteProduct(Product product) throws BackendException;", "void deleteProduct(Integer productId);", "@Override\n\tpublic void deleteProduct(int product_id) {\n\n\t}", "void deleteProduct(int productId) throws ProductException;", "void deleteProduct(Product product) throws ServiceException;", ...
[ "0.8191971", "0.8140294", "0.81369895", "0.81003284", "0.80696964", "0.79726607", "0.79201496", "0.7897909", "0.789757", "0.7788467", "0.77274776", "0.748565", "0.74816495", "0.7438698", "0.7435615", "0.73727936", "0.7345819", "0.73368967", "0.7299174", "0.729667", "0.7266633...
0.76820487
11
Finds the product according to it's id.
Product findById(long id);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Product findProduct(int id)\n {\n for(Product product : stock)\n {\n if(id == product.getID())\n {\n return product;\n }\n }\n System.out.println(\"Error: Could not find ID: \" + id);\n return null;\n }", "public Prod...
[ "0.8391596", "0.791822", "0.78996193", "0.78845805", "0.785153", "0.7818718", "0.780649", "0.7798501", "0.7748876", "0.7684443", "0.7600378", "0.7590828", "0.75556815", "0.7490829", "0.7486979", "0.7432694", "0.74326205", "0.74254704", "0.7414218", "0.7414218", "0.7406317", ...
0.7816392
6
Finds products according to a price.
List<Product> findByPrice(BigDecimal price);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List<Product> searchProducts(int price, int price1) {\n\t\treturn productDAO.findByPriceBetween(price,price1);\n\t\t//return null;\n\t}", "public void findByPrice() {\n boolean validate = true;\n price = 0;\n System.out.print(\"Enter price you want to find: \");\n while (validate)...
[ "0.7462017", "0.7298876", "0.72980976", "0.6785849", "0.66630787", "0.6613135", "0.653866", "0.6499608", "0.62099063", "0.6169446", "0.6130713", "0.610058", "0.60939527", "0.6093766", "0.60881424", "0.60809404", "0.60774016", "0.60229343", "0.60158795", "0.60030323", "0.59846...
0.757114
0
Finds products according to a description.
public List<Product> findByDescription(String description);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Product> getProductsContainingProductNameOrShortDescription(String productSearchString);", "private void search(String product) {\n // ..\n }", "public List<Product> search(String searchString);", "public List<Product> searchProducts(ProductDTO product) {\n String SQL_SEARCH_QUERY=pr...
[ "0.7183143", "0.6925498", "0.669921", "0.6586606", "0.6532829", "0.652123", "0.6513692", "0.6472876", "0.64509416", "0.6445931", "0.6445919", "0.6349693", "0.63432175", "0.6339696", "0.62958", "0.6126289", "0.61083907", "0.6080832", "0.6080802", "0.60618377", "0.60376894", ...
0.79176265
0
Finds products according to a assigned vehicle type.
public List<Product> findByVehicleType(String typeOfVehicle);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetProductsByType() throws Exception {\n System.out.println(\"getProductsByType\");\n \n prs = dao.getProductsByType(p1.getType());\n assertTrue(prs.size() == 2);\n assertTrue(prs.contains(p1));\n assertTrue(prs.contains(p2));\n prs = dao....
[ "0.6413416", "0.63313264", "0.5952301", "0.59366995", "0.578438", "0.57401735", "0.5717435", "0.57097197", "0.5704825", "0.5683829", "0.56696904", "0.5628122", "0.55765903", "0.55627936", "0.55586666", "0.5553257", "0.5538707", "0.54938537", "0.54869884", "0.54789853", "0.547...
0.77293247
0
Finds all products stored in the DB.
List<Product> findAll();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Product> getAllProducts() throws PersistenceException;", "@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)\n public List<Product> getProductFindAll() {\n return em.createNamedQuery(\"Product.findAll\", Product.class).getResultList();\n }", "@NonNull\n public List<Product> findAl...
[ "0.77460814", "0.77391225", "0.7672528", "0.7634567", "0.7583293", "0.7542426", "0.7527541", "0.7477931", "0.7427618", "0.7405849", "0.7378278", "0.7373697", "0.7373697", "0.7353911", "0.73176503", "0.7245891", "0.72372556", "0.7231743", "0.72001827", "0.7197209", "0.7197209"...
0.7557033
6
TODO Autogenerated method stub
@Override public void draw(Graphics g) { g.setColor(Color.PINK); g.fillRect(getX(), getY(), getWidth(), getHeight()); }
{ "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
All of the original tests assertSuccessorOrExact on focusScope which is not true in the lldb case
@Override @Test public void testDefaultFocusIsAsExpected() throws Throwable { List<String> expectedDefaultFocus = getExpectedDefaultActivePath(); assumeNotNull(expectedDefaultFocus); m.build(); Set<TargetObject> activatable = getActivatableThings(); Map<List<String>, TargetInterpreter> found = m.findAll(TargetInterpreter.class, getExpectedSessionPath(), true); // The default must be one of the activatable objects Object[] keys = found.keySet().toArray(); TargetObject obj = found.get(keys[keys.length - 1]); assertTrue(activatable.contains(obj)); if (m.hasInterpreter()) { TargetInterpreter interpreter = findInterpreter(obj); assertActiveViaInterpreter(obj, interpreter); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isAccessibilityFocused() {\n/* 853 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public boolean isFocused() {\n/* 807 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public boolean isFocusable() {\n/* 784 */ throw new RuntimeException(\"Stub!\");\n/* ...
[ "0.6611344", "0.65621156", "0.6503532", "0.64463466", "0.6272388", "0.61736643", "0.6111093", "0.6002875", "0.579811", "0.5791897", "0.57708776", "0.5636672", "0.5618609", "0.56177026", "0.56068885", "0.5606841", "0.5571532", "0.5562918", "0.555055", "0.55388445", "0.55370146...
0.6066743
7
TODO should only increment if the cube needs it TODO this might be SiGN specific
public void changeButtonLevel(boolean advance) { for (Button btn : mButtons) { String name = btn.getText().toString(); if (advance) { if (Character.isLowerCase(name.charAt(0))) { btn.setText("3" + name); } else { btn.setText("2" + name); } } else { btn.setText(name.substring(1)); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\tpublic int cube() {\n\t\t\treturn width*width*width;\r\n\t\t}", "private void coins_a1G(){\n\t\tthis.cube[31] = this.cube[17]; \n\t\tthis.cube[17] = this.cube[8];\n\t\tthis.cube[8] = this.cube[44];\n\t\tthis.cube[44] = this.cube[53];\n\t\tthis.cube[53] = this.cube[31];\n\t}", "private void are...
[ "0.7055817", "0.6764624", "0.6702675", "0.6664905", "0.66365796", "0.65784997", "0.65211976", "0.65144986", "0.6485705", "0.6481916", "0.6458638", "0.6452563", "0.6428672", "0.64233774", "0.6403447", "0.6402992", "0.6382706", "0.6375434", "0.6341242", "0.6300418", "0.62909293...
0.0
-1
Disables all nonrotation buttons for the inspection period
private void disableButtons(boolean disable, boolean normalMoves, boolean rotations) { ArrayList<PuzzleTurn> turns = mPuzzleMoveListener.getmPuzzleTurns(); // iterate through puzzleTurns for (int i = 0; i < turns.size(); i++) { PuzzleTurn current = turns.get(i); if( !current.isRotation() && !normalMoves){ continue; } if (current.isRotation() && !rotations) { continue; } // iterate through buttons for (Button btn : mButtons) { if (btn.getText().toString().equals(current.getmName())) { btn.setEnabled(!disable); break; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void disableButtons() {\n\t\t\r\n\t\tcapture.setEnabled(false);\r\n\t\tstop.setEnabled(false);\r\n\t\tfilter.setEnabled(false);\r\n\t\tsave.setEnabled(false);\r\n\t\t//load.setEnabled(false);\r\n\t}", "private void disableButtons()\r\n {\r\n }", "private void deActivateButtons(){\n limiteBoto...
[ "0.7612126", "0.75784045", "0.7462614", "0.7417879", "0.7231728", "0.71957207", "0.71557134", "0.71464247", "0.71039313", "0.70487237", "0.70301557", "0.70231503", "0.6952975", "0.68926454", "0.6848491", "0.6756603", "0.6750774", "0.6655231", "0.6629108", "0.6626107", "0.6618...
0.677458
15
0000 0000 0000 000[1bit player] [8bit y] [8bit x]
public int move(int player, int pos) throws Exception{ if(player != next || player != pos>>16) throw new Exception("Wrong stone."); int x = pos & 255; int y = pos>>8 & 255; if(board[x][y] == 0){ board[x][y] = player; next = next==1?2:1; stonesNum++; setWinFlag(x, y); }else{ throw new Exception("Invalid move."); } return winFlag; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public UserPaddle(int player)\r\n\t{\r\n\t\tupAcceleration = false;\r\n\t\tdownAcceleration = false;\r\n\t\ty = 210;\r\n\t\tyVelocity = 0;\r\n\t\tif(player == 1)\r\n\t\t{\r\n\t\t\tx = 20; //On the left side of the frame\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tx = 660; //On the right side of the frame\r\n\t\t}\r\n\t...
[ "0.6416702", "0.63249844", "0.6303388", "0.6261406", "0.6244799", "0.62032604", "0.61246276", "0.6070508", "0.5992507", "0.59178895", "0.5890972", "0.58909696", "0.5853379", "0.58198005", "0.5808721", "0.5803656", "0.5775181", "0.57655096", "0.57568955", "0.5746396", "0.57341...
0.0
-1
0000 0000 0000 000[1bit player] [8bit y] [8bit x]
public int move(int player, int p, int x, int y) throws Exception{ if(player != next || player != p) throw new Exception("Invalid position."); //int x = pos & 255; //int y = pos>>8 & 255; if(board[x][y] == 0){ board[x][y] = player; next = next==1?2:1; stonesNum++; setWinFlag(x, y); }else{ throw new Exception("Invalid move."); } return winFlag; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public UserPaddle(int player)\r\n\t{\r\n\t\tupAcceleration = false;\r\n\t\tdownAcceleration = false;\r\n\t\ty = 210;\r\n\t\tyVelocity = 0;\r\n\t\tif(player == 1)\r\n\t\t{\r\n\t\t\tx = 20; //On the left side of the frame\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tx = 660; //On the right side of the frame\r\n\t\t}\r\n\t...
[ "0.6417054", "0.6325146", "0.63032436", "0.6261155", "0.6245365", "0.6123684", "0.60695046", "0.5992612", "0.59180534", "0.5891346", "0.58910125", "0.58548915", "0.5818418", "0.5807424", "0.5803335", "0.57751316", "0.5765773", "0.5756317", "0.57467806", "0.5734311", "0.567341...
0.6202979
5
Test of getHand method, of class Player.
@Test public void testGetHand() { Player player = new Player(); ArrayList<Tile> expResult = new ArrayList<>(); ArrayList<Tile> result = player.getHand(); assertEquals(expResult, result); Stack stack=new Stack(false); Tile tile=new Tile(0,0); player.setHand(stack.drawTiles(1)); ArrayList<Tile> exphand=new ArrayList<>(); exphand.add(tile); boolean expResult2=true; boolean result2; result2=(player.getHand().get(0).getHead()==exphand.get(0).getHead() && player.getHand().get(0).getTail()==exphand.get(0).getTail()); assertEquals(expResult2, result2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testGetHand() throws Exception {\r\n// System.out.println(getClass().getSimpleName() + \": getHand\");\r\n//\r\n// HandRank hr = hand.getHandRank();\r\n// Card[] result = hr.getHand();\r\n// System.out.println(hr.getHandType());\r\n// System.out.println(\"hand:\" + Ar...
[ "0.8038781", "0.744537", "0.71713394", "0.71713394", "0.70780456", "0.6882545", "0.6825196", "0.6793787", "0.6769141", "0.67136914", "0.6653429", "0.65737796", "0.65389425", "0.6531609", "0.65217", "0.6512799", "0.6508285", "0.65079826", "0.6477842", "0.64700294", "0.64586926...
0.7068327
5
Test of sumHand method, of class Player.
@Test public void testSumHand() { Player player = new Player(); int expResult = 0; int result = player.sumHand(); assertEquals(expResult, result); Tile tile=new Tile(2,3); Tile tile2=new Tile(4,5); ArrayList<Tile> temp=new ArrayList<>(); temp.add(tile); temp.add(tile2); player.setHand(temp); int expResult2 = 14; int result2 = player.sumHand(); assertEquals(expResult2, result2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testGetHand() throws Exception {\r\n// System.out.println(getClass().getSimpleName() + \": getHand\");\r\n//\r\n// HandRank hr = hand.getHandRank();\r\n// Card[] result = hr.getHand();\r\n// System.out.println(hr.getHandType());\r\n// System.out.println(\"hand:\" + Ar...
[ "0.69763124", "0.6764135", "0.6552757", "0.6508459", "0.6448559", "0.63804615", "0.6239996", "0.6191567", "0.6190427", "0.6174835", "0.61719304", "0.61620104", "0.6146423", "0.61405724", "0.6120371", "0.6095487", "0.60882705", "0.6079783", "0.60707253", "0.60618573", "0.60445...
0.8084666
0
Test of setHand method, of class Player.
@Test public void testSetHand() { ArrayList<Tile> x = new ArrayList<>(); Player player = new Player(); player.setHand(x); ArrayList<Tile> expResult= new ArrayList<>(); ArrayList<Tile> result=player.getHand(); assertEquals(expResult,result); Tile tile=new Tile(3,5); ArrayList<Tile> temp=new ArrayList<>(); temp.add(tile); player.setHand(temp); boolean expResult2=true; boolean result2=(player.getHand().get(0).getHead()==3 && player.getHand().get(0).getTail()==5); assertEquals(expResult2,result2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setHand(Hand hand) {\n\t\t_hand = hand;\n\t}", "public abstract void setHand(Card[] hand);", "@Test\n public void testGiveHand() throws Exception {\n\n Deck giveHand = new Deck();\n giveHand.add(cardB);\n giveHand.add(cardB);\n giveHand.add(cardP);\n playerHuman.addCa...
[ "0.7288875", "0.7014232", "0.68453455", "0.67811555", "0.66540843", "0.6560785", "0.6534073", "0.63999087", "0.6344635", "0.6344635", "0.63065034", "0.62916774", "0.62347525", "0.6223208", "0.6188377", "0.6156809", "0.61510444", "0.61405563", "0.6132616", "0.6117329", "0.6112...
0.648002
7
Test of addPoints and getPoints methods, of class Player.
@Test public void testAddAndGetPoints() { Player player = new Player(); int expResult = 0; int result = player.getPoints(); assertEquals(expResult, result); player.addPoints(10); int expResult2 = 10; int result2 = player.getPoints(); assertEquals(expResult2, result2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testAddPoints() {\n System.out.println(\"addPoints\");\n int points = ScoreBoard.HARD_DROP_POINTS_PER_ROW * 4 + ScoreBoard.POINTS_PER_LINE;\n instance.addPoints(points);\n int result = instance.getPoints();\n int expResult = 108;\n assertEquals(resul...
[ "0.7657815", "0.72882277", "0.7069678", "0.69395006", "0.6864094", "0.6843245", "0.67045224", "0.66976863", "0.66963655", "0.66219175", "0.6585494", "0.65309066", "0.6491131", "0.64861214", "0.64578056", "0.64119405", "0.64004415", "0.6388899", "0.6382124", "0.6342791", "0.63...
0.8211018
0
Test of removeFromHand method, of class Player.
@Test public void testRemoveFromHand() { Player player = new Player(); boolean expResult = false; boolean result = player.removeFromHand(0); assertEquals(expResult, result); Stack stack=new Stack(false); player.setHand(stack.drawTiles(2)); player.removeFromHand(0); ArrayList <Tile> temp=player.getHand(); Tile tile=new Tile(0,1); boolean expResult2=true; boolean result2=(player.getHand().get(0).getHead()==0 && player.getHand().get(0).getTail()==1); assertEquals(expResult2, result2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n public void testRemove() {\n Game g = new Game();\r\n g.customDeal(0, 3, 6, 9);\r\n g.remove(2);\r\n assertEquals(0, g.columns.get(2).cards.size());\r\n }", "@Test\n public void testRemove() {\n System.out.println(\"remove\");\n\n Piece piece = new Pie...
[ "0.72105366", "0.7083483", "0.6999137", "0.69934213", "0.68614966", "0.6822771", "0.6674578", "0.66452664", "0.66429067", "0.6435286", "0.64121985", "0.63547134", "0.63517576", "0.6340872", "0.6317273", "0.6271324", "0.62700474", "0.62630117", "0.62489307", "0.61869806", "0.6...
0.81098837
0
Test of maxDouble method, of class Player.
@Test public void testMaxDouble() { Player player = new Player(); int expResult = -1; int result = player.maxDouble(); assertEquals(expResult, result); Stack stack=new Stack(false); player.setHand(stack.drawTiles(28)); int expResult2=6; int result2=player.maxDouble(); assertEquals(expResult2, result2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getMaxDoubleValue();", "Double getMaximumValue();", "double getMax();", "double getMax();", "public double getMaximumDouble() {\n/* 255 */ return this.max;\n/* */ }", "protected double getMaxDouble() {\r\n boolean handleOutOfMemoryError = false;\r\n double max = Doub...
[ "0.7179606", "0.7067989", "0.6888324", "0.6888324", "0.67170894", "0.66532713", "0.6514941", "0.64833796", "0.64806026", "0.6477445", "0.64329255", "0.643112", "0.63918066", "0.63647383", "0.635634", "0.63552195", "0.63352466", "0.63078624", "0.6293591", "0.6278798", "0.62737...
0.82106817
0
Test of maxSum method, of class Player.
@Test public void testMaxSum() { Player player = new Player(); int expResult = -1; int result = player.maxSum(); assertEquals(expResult, result); Stack stack=new Stack(false); player.setHand(stack.drawTiles(28)); int expResult2=12; int result2=player.maxSum(); assertEquals(expResult2, result2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n public void testMaxDouble() {\r\n Player player = new Player();\r\n int expResult = -1;\r\n int result = player.maxDouble();\r\n assertEquals(expResult, result);\r\n \r\n Stack stack=new Stack(false);\r\n player.setHand(stack.drawTiles(28));\r\n ...
[ "0.65448415", "0.61438656", "0.6140819", "0.60894984", "0.60545707", "0.6013592", "0.5985179", "0.59838396", "0.5980445", "0.5953087", "0.5938126", "0.5905338", "0.5902988", "0.5901231", "0.58909285", "0.5884397", "0.58775574", "0.5855936", "0.58546656", "0.58517116", "0.5817...
0.8245129
0
list json to list object
public static <T> List<T> convertToList(final String jsonString, final Class<T> clazz) { if (Strings.isNullOrEmpty(jsonString)) { return new ArrayList<>(); } try { return OBJ_MAPPER.readValue(jsonString, OBJ_MAPPER.getTypeFactory().constructType(List.class, clazz)); } catch (IOException e) { throw new RuntimeException("parse to object error", e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getJSONfromList(List<?> list) {\n\t\tString json = null;\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\n\t\ttry {\n\t\t\tjson = mapper.writeValueAsString(list);\n\t\t} catch (JsonProcessingException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tre...
[ "0.66261566", "0.65842944", "0.65134144", "0.64959407", "0.6322794", "0.6270369", "0.6265247", "0.6257804", "0.6247996", "0.6203722", "0.6169676", "0.6159966", "0.6127068", "0.6115511", "0.6108305", "0.60493094", "0.6034387", "0.60330856", "0.6019874", "0.59955275", "0.598241...
0.56833166
44
list json to list object
public static <T> List<T> convertToListByTypeReference(final String jsonString, final TypeReference<List<T>> typeReference) { if (Strings.isNullOrEmpty(jsonString)) { return new ArrayList<>(); } try { return OBJ_MAPPER.readValue(jsonString, typeReference); } catch (IOException e) { throw new RuntimeException("parse to object error", e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getJSONfromList(List<?> list) {\n\t\tString json = null;\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\n\t\ttry {\n\t\t\tjson = mapper.writeValueAsString(list);\n\t\t} catch (JsonProcessingException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tre...
[ "0.66261566", "0.65842944", "0.65134144", "0.64959407", "0.6322794", "0.6270369", "0.6265247", "0.6257804", "0.6247996", "0.6203722", "0.6169676", "0.6159966", "0.6127068", "0.6115511", "0.6108305", "0.60493094", "0.6034387", "0.60330856", "0.6019874", "0.59955275", "0.598241...
0.0
-1
we need to find expression from num[s..E] such that factor first number and following expression gives target Basic idea: if expression has operator, we iterate over possible positions and type; if not, we check numerical value with target directly. Use tricky subproblem definition to address issue of and .
private void helper(String num, StringBuilder resBld, int s, long target, long factor, List<String> res) { int len = num.length(), preLen = resBld.length(); // iterate over all possible ends of first number for(int i = s; i <= len - 2; i ++) { // Note: type: avoid leading zero in the expression if(i > s && num.charAt(s) == '0') break; long val = Long.parseLong(num.substring(s, i + 1)); resBld.append(num.charAt(i)); resBld.append('*'); helper(num, resBld, i + 1, target, factor * val, res); resBld.deleteCharAt(resBld.length() - 1); // Note: '-' only takes effect on the first number, so we treat it as a -1 factor // to the first number resBld.append('-'); helper(num, resBld, i + 1, target - factor * val, -1, res); resBld.deleteCharAt(resBld.length() - 1); resBld.append('+'); helper(num, resBld, i + 1, target - factor * val, 1, res); resBld.deleteCharAt(resBld.length() - 1); } // NOTE: type: conservative ending // avoid s exceeds length of num in the following iterations resBld.append(num.charAt(len - 1)); // avoid leading zero if((num.charAt(s) != '0' || s == len - 1) && factor * Long.parseLong(num.substring(s, len)) == target) res.add(resBld.toString()); resBld.setLength(preLen); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Object findOperatorNeedCheck();", "public static int evaluateExpression(String expression) {\r\n // Create operandStack of ints to store operands\r\n Stack<Integer> operandStack = new Stack<>();\r\n \r\n // Create operatorStack of characters to store operators\r\n Stack<Character> operat...
[ "0.6294496", "0.5700941", "0.56936675", "0.56380725", "0.5561557", "0.554962", "0.551299", "0.5503099", "0.54480517", "0.543097", "0.5428833", "0.5389109", "0.5386875", "0.53386676", "0.5324382", "0.5309919", "0.52879584", "0.5276894", "0.5260377", "0.52583855", "0.5258242", ...
0.50465006
41
Comentario entre " "
public void fila10(){ for(int i = 0; i<5; i++) matTrans[10][i] = new Celda(10); matTrans[10][5] = new Celda(11); for(int i = 6; i<21; i++) matTrans[10][i] = new Celda(10); matTrans[10][13] = new Celda(20); matTrans[10][21] = new CeldaAS(-2,tablaSimb,new Error(error10,compilacion)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di cuocere il pollo\";\r\n }", "private static String adqlCharLiteral( String txt ) {\n return \"'\" + txt.replaceAll( \"'\", \"''\" ) + \"...
[ "0.6534681", "0.642729", "0.636667", "0.63534623", "0.6231649", "0.6070474", "0.6038518", "0.6024713", "0.5946886", "0.5940774", "0.5927369", "0.5909229", "0.58993006", "0.58761454", "0.58726865", "0.58277285", "0.5818819", "0.58166796", "0.5804372", "0.57965195", "0.578838",...
0.0
-1
/ Initializing All Firebase Instances
private void initFirebase() { database = FirebaseDatabase.getInstance(); user = FirebaseAuth.getInstance().getCurrentUser(); dRef = database.getReference("Trails"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initFirebase() {\n FirebaseApp.initializeApp(this);\n firebaseDatabase = FirebaseDatabase.getInstance();\n databaseReference = firebaseDatabase.getReference();\n storageReference = FirebaseStorage.getInstance().getReference();\n }", "private void init() {\n\t\t/* Add t...
[ "0.7387758", "0.6858667", "0.6773813", "0.6499656", "0.6495263", "0.6266253", "0.6202778", "0.61988914", "0.61898565", "0.6172121", "0.6145474", "0.6120651", "0.60863847", "0.60573184", "0.6032901", "0.59572923", "0.59417605", "0.59311926", "0.5876137", "0.5795741", "0.578248...
0.66043234
3
/ Initializing All Views In TrailActivity
private void initReferences() { trails = new ArrayList<>(); keys = new ArrayList<>(); trailAdapter = new TrailAdapter(this, R.layout.trail_row_layout, trails); floatingActionButton = (FloatingActionButton) findViewById(R.id.fab); trailListView = (ListView) findViewById(R.id.trail_list); trailEmptyText = (TextView) findViewById(R.id.empty_value); trailListView.setEmptyView(trailEmptyText); trailListView.setAdapter(trailAdapter); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initView() {\n\t\tsna_viewpager = (ViewPager) findViewById(R.id.sna_viewpager);\r\n\t\thost_bt = (Button) findViewById(R.id.host_bt);\r\n\t\tcomment_bt = (Button) findViewById(R.id.comment_bt);\r\n\t\tback_iv = (ImageView) findViewById(R.id.back_iv);\r\n\t\trelativeLayout_project = (RelativeLayout) fi...
[ "0.73118365", "0.7221952", "0.71656543", "0.71558976", "0.71450704", "0.70305794", "0.7018733", "0.7013219", "0.69912213", "0.69912213", "0.69719785", "0.6943515", "0.6935611", "0.6932619", "0.6928403", "0.6920826", "0.69110334", "0.6904359", "0.6877179", "0.687687", "0.68556...
0.6696911
30
/ Initializing All Views In Trail Details Dialog Box
public void initDialogBoxViews(View mView) { trailName = (EditText) mView.findViewById(R.id.TrailNametxt); trailCode = (EditText) mView.findViewById(R.id.TrailCodetxt); module = (EditText) mView.findViewById(R.id.Moduletxt); trailDate = (EditText) mView.findViewById(R.id.datetxt); addtrailBtn = (Button) mView.findViewById(R.id.CreateBtn); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setUpViews() {\n\n updateFooterCarInfo();\n updateFooterUsrInfo();\n\n\n setResultActionListener(new ResultActionListener() {\n @Override\n public void onResultAction(AppService.ActionType actionType) {\n if (ModelManager.getInstance().getGloba...
[ "0.6583777", "0.6289435", "0.6256853", "0.6121765", "0.61130774", "0.61084116", "0.6084244", "0.6070081", "0.6048868", "0.60349214", "0.603094", "0.6019008", "0.6016602", "0.5990916", "0.5987194", "0.5948997", "0.5930105", "0.59226835", "0.5914231", "0.5898054", "0.5855208", ...
0.62728846
2
/ Returns The TrailId In Order To Compare Ids Of Edited & Current Trail
public String geTrailId(String currentTrailCode, Date currentTrailDate) { DateFormat format = new SimpleDateFormat("yyyyMMdd", Locale.ENGLISH); return format.format(currentTrailDate) + "-" + currentTrailCode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getId(){\r\n return localId;\r\n }", "public Integer getIdTravel() {\r\n return idTravel;\r\n }", "public int getId_traveller() {\r\n return id_traveller;\r\n }", "public int getTrajectoryID() {\n return trajectory...
[ "0.5609683", "0.552304", "0.5412471", "0.5391743", "0.52998084", "0.5288796", "0.52841896", "0.5284106", "0.52392614", "0.5238769", "0.52134216", "0.52115124", "0.51925576", "0.5175123", "0.5169003", "0.5162295", "0.5154301", "0.51375175", "0.51322025", "0.51239264", "0.50938...
0.52461666
8
/ Removes A Trail From The TrailList
public void removeTrail(Trail removedTrail) { for(int i = 0; i < trails.size(); i++) { if(trails.get(i).getTrailCode() == removedTrail.getTrailCode()) { trails.remove(i); break; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void remove() {\n int size = itinerary.size();\n if (size != 1) {\n \n // Removes last Flight in this Itinerary.\n Flight removedFlight = this.itinerary.remove(size - 1);\n \n // Gets the new last Flight in this Itinerary.\n Fli...
[ "0.6354857", "0.5998716", "0.5972983", "0.59533465", "0.5923214", "0.5879479", "0.58428925", "0.58251715", "0.58198917", "0.58094436", "0.57966286", "0.5787978", "0.57866555", "0.5778371", "0.57740223", "0.5768819", "0.57559896", "0.57422435", "0.5736091", "0.5734402", "0.573...
0.7246612
0
/ Checks If The Added/Deleted/Changed Trail Belongs To The Current User
private boolean checkTrailUser(String trailUserId, String currentUserId) { if(trailUserId.equals(currentUserId)) return true; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isCheckedOutByUser() {\r\n \r\n if (vocabularyFolder == null) {\r\n return false;\r\n } else {\r\n return StringUtils.isNotBlank(vocabularyFolder.getWorkingUser()) && !vocabularyFolder.isWorkingCopy()\r\n && StringUtils.equals(getUserName()...
[ "0.5811109", "0.5771783", "0.5770806", "0.5770784", "0.57565045", "0.573012", "0.5696189", "0.56699204", "0.5655218", "0.5651173", "0.55811954", "0.55736536", "0.55620366", "0.5558997", "0.5540739", "0.5534643", "0.55304605", "0.54971874", "0.54945886", "0.5490944", "0.548277...
0.6642277
0
/ Attaching A Database Listener To Listen For Changes If: 1. New Trail Is Added 2. Some Changes In The Existing Trail 3. A Trail Is Removed
public void attachDatabaseListener() { dRef.addChildEventListener(new ChildEventListener() { @Override public void onChildAdded(DataSnapshot dataSnapshot, String s) { Trail addedTrail = dataSnapshot.getValue(Trail.class); if(checkTrailUser(addedTrail.getuserId(), user.getUid())) { trails.add(addedTrail); keys.add(dataSnapshot.getKey()); trailAdapter.notifyDataSetChanged(); App.trainer.addTrail(addedTrail); } } @Override public void onChildChanged(DataSnapshot dataSnapshot, String s) { Trail changedTrail = dataSnapshot.getValue(Trail.class); if(checkTrailUser(changedTrail.getuserId(), user.getUid())) { String key = dataSnapshot.getKey(); trails.set(keys.indexOf(key), changedTrail); App.trainer.setTrail(keys.indexOf(key), changedTrail); trailAdapter.notifyDataSetChanged(); } } @Override public void onChildRemoved(DataSnapshot dataSnapshot) { Trail removedTrail = dataSnapshot.getValue(Trail.class); if(checkTrailUser(removedTrail.getuserId(), user.getUid())) { keys.remove(dataSnapshot.getKey()); removeTrail(removedTrail); App.trainer.removeTrail(removedTrail.getTrailID()); trailAdapter.notifyDataSetChanged(); } } public void onChildMoved(DataSnapshot dataSnapshot, String s) {} public void onCancelled(DatabaseError databaseError) {} }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface DatabaseListener {\n\n void databaseChanged(DatabaseEvent databaseEvent);\n\n}", "private void dbListeners() {\n // Set if image+text is being worked on currently\n //================================================\n mBeingWorkedOnListener = new ValueEventListener() {\n...
[ "0.60136074", "0.5807911", "0.579691", "0.5746928", "0.57318085", "0.55744433", "0.5556889", "0.55304486", "0.55204636", "0.5519595", "0.55065084", "0.55065084", "0.55044496", "0.54810613", "0.5466567", "0.5438963", "0.54194295", "0.5417674", "0.5405161", "0.53310674", "0.532...
0.6979348
0
/ This Listener Handles The Date Picker When Date Edit Text Is Clicked
private void setTrailDateClickListener() { trailDate.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { DatePickerDialog dpd = new DatePickerDialog(TrailActivity.this, date, calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH)); dpd.show(); dpd.getDatePicker().setMinDate(System.currentTimeMillis() - 1000); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@OnClick(R.id.textView_edit_data)\n public void textView_edit_data_onClick(){\n CalendarDatePickerDialogFragment cdp = new CalendarDatePickerDialogFragment()\n .setOnDateSetListener(this);\n cdp.show(getSupportFragmentManager(), \"选择日期\");\n }", "public void onDateSet(DatePicke...
[ "0.7351046", "0.73041993", "0.7272965", "0.7271268", "0.7246469", "0.7198354", "0.7164589", "0.7163215", "0.71574634", "0.7157381", "0.71568656", "0.71038616", "0.70992607", "0.707231", "0.70626736", "0.70553654", "0.7053584", "0.7051521", "0.7044371", "0.7020241", "0.7011167...
0.69387025
40
/ This Method Adds & Updates Trails In The Database
private void addUpdateTrailToDB(String trail_id, Trail trail) { Timestamp currentTimestamp = new Timestamp(new Date().getTime()); currentTrialRef = dRef.child(trail_id); currentTrialRef.setValue(trail); currentTrialRef.child("Trail Date").setValue(new SimpleDateFormat("dd-MM-yyyy", Locale.ENGLISH).format(startDate)); currentTrialRef.child("TimeStamp").setValue(new SimpleDateFormat("dd-MM-yyyy HH:mm:ss", Locale.ENGLISH).format(currentTimestamp)); dialog.dismiss(); Toast.makeText(TrailActivity.this, getString(R.string.saved_successfully), Toast.LENGTH_SHORT).show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void updateRecords() {\n for (Team t: Main.getTeams()){\n //If the team already exists\n if (SqlUtil.doesTeamRecordExist(c,TABLE_NAME,t.getIntValue(Team.NUMBER_KEY))){\n //Update team record\n updateTeamRecord(t);\n } else {\n ...
[ "0.6644653", "0.6304672", "0.619876", "0.6186005", "0.6172146", "0.61132437", "0.5965502", "0.589049", "0.5885789", "0.5853663", "0.57754654", "0.57625675", "0.5746049", "0.5738731", "0.57197636", "0.57014674", "0.56955075", "0.56935966", "0.56833464", "0.5673656", "0.5611448...
0.6882221
0
/ Checks For Correctness Of The Details Enters And Then Pushes To DB
private void validateAndPushToDB(String name, String code, String traildate, String moduleText) { if (isValid(name, code, traildate)) { Trail newTrail = new Trail(name, code, moduleText, startDate, user.getUid()); String trailId = newTrail.getTrailID(); addUpdateTrailToDB(trailId, newTrail); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void validation() {\n Pattern pattern = validationfilterStringData();\n if (pattern.matcher(txtDrug.getText().trim()).matches() && pattern.matcher(txtGenericName.getText().trim()).matches()) {\n try {\n TblTreatmentadvise treatmentadvise = new TblTreatmentadvise();\n...
[ "0.61931133", "0.6080126", "0.59567654", "0.59014857", "0.58742726", "0.58697236", "0.5838181", "0.581801", "0.5761633", "0.5745833", "0.569834", "0.56845796", "0.5664407", "0.5631428", "0.56299835", "0.5624913", "0.5611696", "0.5590521", "0.5573426", "0.5571705", "0.5570964"...
0.52931625
63
/ This Method Sets The Listener For Save Button Of The Trail Details Dialog Box Following Are The Functionalities: 1. Check If Trail Code Or Date Has Been Edited Yes : Then Delete The Old Trail & Insert A New One (Because Trail Id Is Dependant On Trail Code & Date) No : Update The Existing Node 2. Add The New Trail If It Is Complelely A New One
private void setAddtrailBtnClickListener() { addtrailBtn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Trail currentTrail; String name = trailName.getText().toString().trim(); String code = trailCode.getText().toString().trim(); String moduleText = module.getText().toString().trim(); String traildate = trailDate.getText().toString().trim(); if(editedView != null) { String currentTrailId = geTrailId(code, startDate); if(currentTrailId.toString().trim().equals(editedTrailId.toString().trim())) { if((name != editedTrailName.getText().toString().trim()) || moduleText != editedTrailModule.getText().toString().trim()) { Trail trail = App.trainer.editTrail(name, code, moduleText, startDate, currentTrailId, user.getUid()); String trail_id = trail.getTrailID(); addUpdateTrailToDB(trail_id, trail); } } else { dRef.child(editedTrailId).removeValue(); validateAndPushToDB(name, code, traildate, moduleText); } } else { validateAndPushToDB(name, code, traildate, moduleText); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void saveAction(){\r\n\t\ttestReqmtService.saveAction(uiTestReqEditModel);\r\n\t\tgeteditDetails(uiTestReqEditModel.getObjId());\r\n\t\taddInfoMessage(SAVETR, \"save.TRsuccess\"); \r\n\t\tfor (UITestReqModel reqmnt : uiTestReqModel.getResultList()) {\r\n\t\t\tif(reqmnt.isTrLink()){\r\n\t\t\t\treqmnt.s...
[ "0.62243223", "0.60964173", "0.58163553", "0.5812023", "0.57591957", "0.5753274", "0.5729356", "0.57245857", "0.57157934", "0.57078266", "0.57063925", "0.5699958", "0.56441426", "0.56420755", "0.56193924", "0.56037575", "0.5597436", "0.55900687", "0.55895746", "0.55605024", "...
0.6508684
0
/ This Method Pops Up The Dialog Box To Enter Details For The Trail. 1. Checks If The The Trail Is Being Edited Or Newly Created If Edited : Update The Same Node If Newly Created : After Triggering Save Button Create A New Node In The Database
public void popUpDialogBox(View passedView, int code) { mBuilder = new AlertDialog.Builder(TrailActivity.this); if(code == 0) { Date editedTrailDt = null; editedView = passedView; editedTrailName = (EditText) editedView.findViewById(R.id.TrailNametxt); editedTrailModule = (EditText) editedView.findViewById(R.id.Moduletxt); editedTrailCode = (EditText) editedView.findViewById(R.id.TrailCodetxt); editedTrailDate = (EditText) editedView.findViewById(R.id.datetxt); try { editedTrailDt = new SimpleDateFormat("dd-MM-yyyy", Locale.ENGLISH).parse(editedTrailDate.getText().toString().trim()); } catch (ParseException e) { e.printStackTrace(); } editedTrailId = geTrailId(editedTrailCode.getText().toString(), editedTrailDt); } else editedView = null; initDialogBoxViews(passedView); setDateClickListener(); setTrailDateClickListener(); setAddtrailBtnClickListener(); mBuilder.setView(passedView); dialog = mBuilder.create(); dialog.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void actionPerformed(ActionEvent e) {\n sender.setNode(SelectNode());\n try {\n // Sender sender = new Sender(ValidAction.START_TRANSACTION);\n // sender.startTransaction(SelectNode());\n log.getDo...
[ "0.5725008", "0.5705856", "0.5656077", "0.5628819", "0.562795", "0.5624355", "0.5620191", "0.5558827", "0.549516", "0.54852355", "0.5477172", "0.54676485", "0.5465282", "0.5461954", "0.5427649", "0.542091", "0.5418501", "0.539366", "0.53801745", "0.537984", "0.53664505", "0...
0.0
-1
/ This Method Sets The Listener For The Floating Button Which Helps In Adding Trails
private void setFloatingActionButtonListener() { floatingActionButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { View mView = getLayoutInflater().inflate(R.layout.add_trail_dialogbox, null); popUpDialogBox(mView, 1); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setFloatingButtonListener() {\n floatingActionButton.setOnClickListener(v -> {\n if (actualFragment instanceof MyPetsFragment) {\n hideShareAppButton();\n addPet();\n } else if (actualFragment instanceof CommunityFragment){\n cr...
[ "0.7236844", "0.6529087", "0.6431116", "0.6329147", "0.6284143", "0.6271781", "0.6251861", "0.62165153", "0.6205923", "0.61418104", "0.60561013", "0.5999275", "0.5987045", "0.597939", "0.5959015", "0.59562904", "0.5927563", "0.5916448", "0.5890876", "0.58819133", "0.5869841",...
0.7734454
0
/ Validates If All Trail Details Have Been Entered Correctly
private boolean isValid(String trailname, String trailcode, String traildate) { boolean isValid = true; if (TextUtils.isEmpty(trailname)) { trailName.setError(getString(R.string.trail_name_validation_ms)); isValid = false; } if (TextUtils.isEmpty(trailcode)) { module.setError(getString(R.string.module_validation_ms)); isValid = false; } if (TextUtils.isEmpty(trailcode)) { trailCode.setError(getString(R.string.code_validation_ms)); isValid = false; } if (TextUtils.isEmpty(traildate)) { trailDate.setError(getString(R.string.date_validation_ms)); isValid = false; } return isValid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean verifyObligedFields() {\n if(label.getText().toString().isEmpty() || label.getText().toString().equals(\"\"))\n {\n Toast.makeText(ExpenseCardViewDetails.this, R.string.label_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n if(categ...
[ "0.6295119", "0.62916464", "0.59820443", "0.59487087", "0.59317154", "0.59248614", "0.59121037", "0.58862305", "0.5841635", "0.5841366", "0.58214235", "0.58015656", "0.57826656", "0.57516986", "0.5746303", "0.5725687", "0.5689808", "0.5647766", "0.5647005", "0.56449693", "0.5...
0.5982947
2
Constructor for objects of class Jugador
public Jugador(String nombreJugador) { this.nombreJugador = nombreJugador; cartasQueTieneEnLaMano = new Carta[5]; numeroCartasEnLaMano = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Clasificacion (ArrayList<Jugador> jugadores)\n\t{\n\t\tthis.jugadores = jugadores;\n\t\tthis.numJug = jugadores.size();\n\t\tthis.podio = new ArrayList<Jugador>();\n\t\tthis.ganadores = new ArrayList<Jugador>();\n\t\tthis.baraja = new Baraja();\n\t\tbaraja.barajar(); baraja.barajar();\n\t\tbarajaDeCartas = ...
[ "0.73174596", "0.72974384", "0.7085698", "0.7084891", "0.69907904", "0.69615376", "0.6865664", "0.6847109", "0.6824265", "0.67827225", "0.675621", "0.6749874", "0.6748682", "0.6724667", "0.67099655", "0.67007947", "0.6697388", "0.669444", "0.66431093", "0.66301095", "0.662117...
0.6926507
6