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
Called when a drawer has settled in a completely open state.
public void onDrawerOpened(View drawerView) { super.onDrawerOpened(drawerView); // Do whatever you want here String name = null; if (((Application) getApplication()).getAuthUser() != null && (name = ((Application) getApplication()).getAuthUser().getName()) != null) { // textViewHeader = (TextView) binding.navigationView.getHeaderView(0).findViewById(R.id.welcome_textview); // textViewHeader = (TextView) binding.welcomeTextview; if (name.contains(" ")) { name = name.substring(0, name.indexOf(" ")); } binding.welcomeTextview.setText(getString(R.string.welcome_user, name)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\tpublic void onDrawerOpened() {\n\t\t\t\tshowDown();\n\t\t\t}", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n handleEvent_onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerStateCh...
[ "0.70568234", "0.6900242", "0.67305696", "0.67305696", "0.67305696", "0.67305696", "0.6724078", "0.6709021", "0.6709021", "0.6709021", "0.6709021", "0.6584182", "0.6453902", "0.64493465", "0.64493465", "0.64493465", "0.64493465", "0.64493465", "0.64493465", "0.64493465", "0.6...
0.0
-1
Use this to tint the screen
@Override public void onSearchEditOpened() { binding.includeDashboard.viewSearchTint.setVisibility(View.VISIBLE); binding.includeDashboard.viewSearchTint .animate() .alpha(1.0f) .setDuration(300) .setListener(new SimpleAnimationListener()) .start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static Color tint(Color c, int tint) {\n int r = c.getRed();\n int g = c.getGreen();\n int b = c.getBlue();\n\n float ftint = tint / 100.0f;\n\n int red = Math.round(ftint * r + (1 - ftint) * 255);\n int green = Math.round(ftint * g + (1 - ftint) * 255);\n i...
[ "0.6406383", "0.6318677", "0.6304598", "0.5925799", "0.58522534", "0.5837569", "0.57964355", "0.5753808", "0.57455254", "0.5712632", "0.5691065", "0.5687301", "0.56519973", "0.5577173", "0.5537383", "0.5510196", "0.5441591", "0.5434048", "0.5416712", "0.53796506", "0.5355329"...
0.0
-1
System.out.println("sdkbvhasaassdhbv " + currentSongTime);
@Override public void onSuccess(Object result, List params) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getPlayTime();", "public int getPlayStartTime() { return _playStartTime; }", "@Override\n\tpublic long getPlaytime() {\n\t\treturn this.playTime;\n\t}", "Double currentTime() {\n return execute(\"player.currentTime\");\n }", "public String toString() { \r\n\t return \"{Song =...
[ "0.7309105", "0.69430566", "0.68240047", "0.6718005", "0.66617775", "0.64811844", "0.64745647", "0.64311427", "0.63357264", "0.6326765", "0.63150334", "0.6295408", "0.6275911", "0.6256394", "0.62456036", "0.62436676", "0.6222838", "0.62178695", "0.62006974", "0.6187166", "0.6...
0.0
-1
This method determines equality for DOMItems.
@Override public boolean equals(final Object o) { if (o instanceof DomItemXml) { return this.getJsObject() == ((DomItemXml) o).getJsObject(); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean areContentsTheSame(Item one,\n Item two) {\n return one.equals(two);\n }", "@Override\n public boolean isSame(Item other) {\n return this.equals(other);\n }", "public void t...
[ "0.71522063", "0.6878771", "0.67650807", "0.65685815", "0.6479011", "0.646767", "0.6465103", "0.64091223", "0.6387412", "0.621888", "0.6153655", "0.615266", "0.61458915", "0.6142193", "0.61243445", "0.6114946", "0.6106713", "0.6073858", "0.6060568", "0.6051559", "0.60397804",...
0.73215246
0
Returns the hash code for this DOMItem.
@Override public int hashCode() { return jsObject.hashCode(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getHash() {\n return hash_;\n }", "public int getHash() {\n return hash_;\n }", "public String getHash()\n {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "public String ...
[ "0.75502336", "0.7545502", "0.71502095", "0.7126738", "0.7126738", "0.7126738", "0.71261704", "0.71074414", "0.7098543", "0.7067353", "0.7025075", "0.69583094", "0.695497", "0.69221", "0.6900251", "0.6865767", "0.6835729", "0.6813995", "0.6808732", "0.6781317", "0.67731214", ...
0.0
-1
This will open the browser
public void openBrowser() { ResourceBundle config = ResourceBundle.getBundle("config"); config.getString("browser").equalsIgnoreCase("Chrome"); System.setProperty("webdriver.chrome.driver", "src/Drivers/chromedriver_76.0.exe"); driver = new ChromeDriver(); driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); // driver.get(config.getString("URL")); driver.manage().window().maximize(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void openBrowser()\n\t{\n\t\tdriver = DriverSetup.getWebDriver(ReadPropertiesFile.getBrowser());\n\t\tdriver.get(ReadPropertiesFile.getURL());\n\t\tlog.info(\"Opening Browser\");\n\t\tlog.info(\"Practo website is launched \");\n\t}", "private static void openWebpage(String url) {\n try {\n ...
[ "0.7944181", "0.7852537", "0.7688671", "0.7678371", "0.7652908", "0.7652619", "0.76521796", "0.7374432", "0.73332006", "0.7304134", "0.72882944", "0.72413325", "0.7235239", "0.723461", "0.7225777", "0.722195", "0.71848166", "0.7100043", "0.7070772", "0.7046309", "0.7031809", ...
0.7901265
1
This will close browser
public void closeBrowser(){ driver.quit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void closeBrowser() {\n System.out.println(\"Browser closed\");}", "public void closeBrowser(){\n\t driver.close();\n\t \t }", "public static void CloseBrowser() {\n\t\tBrowser.Driver.quit();\n\t}", "public void closeBrowserSession() {\n\t\tdriver.quit();\n\t}", "public static void c...
[ "0.8499674", "0.83181995", "0.8186501", "0.8119145", "0.80446345", "0.79779965", "0.7971495", "0.7828199", "0.77556586", "0.774003", "0.77377015", "0.77109355", "0.76993597", "0.769058", "0.7668796", "0.76311475", "0.75997984", "0.75604403", "0.7544507", "0.749894", "0.740814...
0.83878714
1
== OverLoading Function ==//
private MerchantRecipe createMerchantRecipe(ItemStack item, ItemStack sellingItem, ItemStack item2) { MerchantRecipe recipe = new MerchantRecipe(sellingItem, 10000); recipe.setExperienceReward(false); recipe.addIngredient(item); recipe.addIngredient(item2); return recipe; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void SelfCallForLoading() {\n\t}", "private static void load(){\n }", "@Override\r\n\tprotected void initLoad() {\n\r\n\t}", "@Override\n\tprotected void load() {\n\t\t\n\t}", "@Override\n\tprotected void load() {\n\t\t\n\t}", "@Override\n\tprotected void load() {\n\t\t\n\t}", "@Overri...
[ "0.72066814", "0.7120243", "0.6993174", "0.6979727", "0.6979727", "0.6979727", "0.6936549", "0.68384355", "0.68384355", "0.6759246", "0.667194", "0.66435224", "0.6590988", "0.65536094", "0.6550412", "0.6540198", "0.6512877", "0.6493577", "0.64438987", "0.6419393", "0.6385422"...
0.0
-1
TODO Autogenerated method stub
@Override @Nullable public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { if (mView == null) { initView(inflater, container); } if (getArguments() != null) { uId = getArguments().getString("uId"); } initData(); return mView; }
{ "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.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0...
0.0
-1
Intent intent = new Intent(); intent.setAction("homeShoppingMallForMerchant.GoodsDetail"); String pid = dataBeanList.get(position).getPId(); intent.putExtra("pid", pid); startActivity(intent);
@Override public void onItemClick(View view, RecyclerView.ViewHolder holder, int position) { Intent intent = new Intent(); intent.setAction(Constants.RIGHTMENU_ITEM_CLICK_ACTION); intent.setComponent(new ComponentName("app.cn.extra.mall.merchant", "app.cn.extra.mall.merchant.broadcast.MovingTrajectoryReceiver")); String pid = dataBeanList.get(position).getPId(); intent.putExtra("pid", pid); P2PMessageActivity.context.sendBroadcast(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View v) {\n Intent intent = new Intent(mContext, DemandDetailActivity.class);\n //intent.putExtra(\"id\",String.valueOf(item.getPid()));\n intent.putExtra(\"pid\", String.valueOf(item.getPid()));\n ...
[ "0.8295877", "0.79887456", "0.7781448", "0.7433942", "0.7394153", "0.7393552", "0.7391307", "0.7366399", "0.7328655", "0.73229223", "0.73212695", "0.7302145", "0.72964966", "0.7260162", "0.7254199", "0.72106385", "0.7209644", "0.71600306", "0.7150523", "0.71437216", "0.711539...
0.0
-1
throw new UnsupportedOperationException("Function not yet implemented.");
public void onMarketUpdate(MarketUpdate marketUpdate) { theLastPrice = (marketUpdate.getAsk().getBestPrice() + marketUpdate.getBid().getBestPrice()) / 2.0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void habilitar() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "public int zzef() {\n throw new UnsupportedOperationException();\n }", "void unavailable();", "void unavailable();", "@Ov...
[ "0.71127796", "0.7099085", "0.7008539", "0.7008539", "0.69972396", "0.6977566", "0.6802485", "0.67712206", "0.67374307", "0.67138517", "0.66925323", "0.6675141", "0.6643197", "0.66066253", "0.6604705", "0.6604705", "0.65972286", "0.64934206", "0.6463626", "0.64606214", "0.644...
0.0
-1
throw new UnsupportedOperationException("Function not yet implemented.");
public void onTrade(Trade trade) { thePosition += trade.getVolume(); theCashBalance += -1 * trade.getPrice() * trade.getVolume(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void habilitar() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "public int zzef() {\n throw new UnsupportedOperationException();\n }", "void unavailable();", "void unavailable();", "@Ov...
[ "0.71127796", "0.7099085", "0.7008539", "0.7008539", "0.69972396", "0.6977566", "0.6802485", "0.67712206", "0.67374307", "0.67138517", "0.66925323", "0.6675141", "0.6643197", "0.66066253", "0.6604705", "0.6604705", "0.65972286", "0.64934206", "0.6463626", "0.64606214", "0.644...
0.0
-1
s = "catsanddog" wordDict = ["cat", "cats", "and", "sand", "dog"]
public static void main(String[] args) { String s = "catsanddog"; Set<String> dict = new HashSet<>(); dict.add("cat"); dict.add("cats"); dict.add("and"); dict.add("sand"); dict.add("dog"); WordBreak solution = new WordBreak(); List<String> result = solution.wordBreak(s, dict); System.out.println(result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean wordBreak(String s, List<String> wordDict) {\n boolean[] dp = new boolean[s.length()]; \n for (int i = 0; i <s.length(); i++) {\n if (wordDict.contains(s.substring(0, i+1))) {\n dp[i] = true;\n continue;\n }\n for (int k = ...
[ "0.68041116", "0.67317754", "0.6713716", "0.66724473", "0.65898573", "0.6562531", "0.64495814", "0.6412607", "0.6339565", "0.6338467", "0.6320581", "0.63178843", "0.62913704", "0.6279998", "0.62509704", "0.6236236", "0.62319696", "0.6231486", "0.61917365", "0.61797917", "0.61...
0.62832963
13
Convenience Method. Deals with exceptions. This method will close a given result set.
private void closeResultSet(ResultSet rs) { try { if (rs != null) { rs.close(); } } catch (SQLException ex) {} // nothing we can do! }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void closeResultSet() {\n\t\tif (rs != null) {\n\t\t\ttry {\n\t\t\t\trs.close();\n\t\t\t} catch (SQLException se2) {\n\t\t\t\tse2.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void closeResultSet(ResultSet rs) {\n if(rs!=null){\n try {\n rs.close();\n lo...
[ "0.73532367", "0.6873722", "0.68206406", "0.67848694", "0.6768822", "0.67105734", "0.6650776", "0.6636819", "0.65666467", "0.6534117", "0.65219283", "0.64998144", "0.64577746", "0.6415962", "0.6415962", "0.64126873", "0.6409518", "0.6392759", "0.6364826", "0.6361386", "0.6354...
0.6697834
6
This returns the Link Property specified by the passed in parameter. For instance, if there is a sortKey specifying how to sort the association, calling getLinkProperty("sortKey") would return the sortKey for the given Association.
public Object getLinkProperty(String name) { if (!hasLinkAttributes()) { return null; } return get("link." + name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getProperty(String property);", "Property getProperty();", "Property getProperty();", "public String getProperty(Object obj, String key);", "java.lang.String getProperty();", "@objid (\"780bebb2-6884-4789-bdef-ca10444ad5fb\")\n Link getLink();", "public String getProperty(String propertyName)...
[ "0.5736762", "0.5605966", "0.5605966", "0.5448658", "0.5445205", "0.5383599", "0.5370614", "0.5316547", "0.5225633", "0.5225633", "0.5225633", "0.5194947", "0.51839644", "0.51839644", "0.51839644", "0.5165003", "0.5158041", "0.5155098", "0.5149068", "0.512659", "0.5115608", ...
0.66751295
0
Para editar uma anotacao:
public void altera(Anotacao anotacao) { //Referencia um bd pra escrever: SQLiteDatabase db = getWritableDatabase(); //Cria o conteúdo com os dados setados no método que preenche: ContentValues dados = pegaDadosAnotacao(anotacao); //Pra entrar nos parametros (?) do db.update: String [] params = {anotacao.getId().toString()}; //Faz um update (Tabela, dados, where): db.update("Anotacoes", dados, "id = ?", params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void editarData(){\n\t\talunoTurmaService.inserirAlterar(alunoTurmaAltera);\n\t\t\n\t\t\n\t\tmovimentacao.setDataMovimentacao(alunoTurmaAltera.getDataMudanca());\n\t\tmovimentacaoService.inserirAlterar(movimentacao);\n\t\t\n\t\tFecharDialog.fecharDialogDATAAluno();\n\t\tExibirMensagem.exibirMensagem(Mensage...
[ "0.7691938", "0.76717025", "0.7549773", "0.75035715", "0.7376799", "0.72915936", "0.7286699", "0.71030635", "0.7075", "0.70511144", "0.69293195", "0.6906283", "0.686917", "0.68374187", "0.67611635", "0.67495865", "0.6742252", "0.6716327", "0.66978294", "0.66823345", "0.667426...
0.7425184
4
Constructor for the Bridge class.
public Bridge() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public OntoBridge()\r\n\t{ \r\n\t}", "protected GaConnector() {\n }", "public Link() {\n }", "Constructor() {\r\n\t\t \r\n\t }", "public Connection() {\n\t\t\n\t}", "private LinkLayer() {\r\n }", "public Boop() {\n\t\tsuper();\n\t}", "private AWTBridge() {\n\t}", "public LinkBuilder() {\...
[ "0.7712172", "0.6709995", "0.6562159", "0.6496901", "0.6496726", "0.6475564", "0.6462141", "0.6455936", "0.6281319", "0.62794054", "0.62783873", "0.6272875", "0.6242651", "0.6224107", "0.62222344", "0.6221221", "0.62004906", "0.62003464", "0.6190258", "0.6176103", "0.61736715...
0.8658055
0
Request permission to enter the bridge.
public void enterBridge() { lock.lock(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void askForPermissions();", "void permissionGranted(int requestCode);", "void requestNeededPermissions(int requestCode);", "private void requestPermission() {\n\n ActivityCompat.requestPermissions(CalltoVendor.this, new String[]\n {\n CALL_PHONE\n }...
[ "0.6542844", "0.63958853", "0.6298582", "0.5925389", "0.5908191", "0.59067523", "0.59067523", "0.5857515", "0.5834687", "0.57576555", "0.5742063", "0.5693524", "0.5681061", "0.56776047", "0.56435776", "0.5632556", "0.56064963", "0.5579149", "0.5573091", "0.5557299", "0.552603...
0.5255921
42
Notify the bridge troll that a Woolie is leaving the bridge.
public void leaveBridge() { lock.unlock(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onLeave()\n\t{\n\t}", "public void notifySwitchAway() { }", "@Override\r\n\tpublic void leave() {\n\t\t\r\n\t}", "@Override\n public void leave() {\n LeaveReq leaveReq = new LeaveReq(node.getCred());\n String msg = leaveReq.getMessageAsString(Constant.Action.LEAVE);\n for ...
[ "0.65533185", "0.64943963", "0.64330554", "0.62832487", "0.62400335", "0.62400335", "0.62400335", "0.6149186", "0.6122109", "0.6074501", "0.6022214", "0.6004586", "0.5986761", "0.596021", "0.58527356", "0.58426046", "0.58379483", "0.5816058", "0.58144325", "0.5791685", "0.579...
0.6870447
0
Creates a new instance of ItemmatlBean
public ItemmatlBean() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public EnterpriseBeansItem() {\n super();\n }", "protected BeanItem<M> createItem(M obj)\r\n\t{\r\n\t\tif (obj != null)\r\n\t\t{\r\n\t\t\tif (getContext() != null)\r\n\t\t\t{\r\n\t\t\t\tSession session = getContext().getSession();\r\n\t\t\t\t\r\n\t\t\t\tif (session != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tre...
[ "0.7035587", "0.6952088", "0.6351669", "0.6263647", "0.6259854", "0.61895734", "0.61503994", "0.60701746", "0.60394275", "0.60198355", "0.60198355", "0.6005144", "0.5972023", "0.5972023", "0.5918779", "0.5914484", "0.589593", "0.58827275", "0.5867468", "0.58640456", "0.585904...
0.819678
0
let user edit existing value?
@Override public void onClick(DialogInterface dialog, int which) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void edit() {\n\n\t}", "void edit(Price Price);", "@Override\n public void edit(User user) {\n }", "@Override\r\n\tpublic void edit() {\n\t\t\r\n\t}", "public void editUser(User user) {\n\t\t\n\t}", "public abstract void edit();", "User editUser(User user);", "public void editOperation(...
[ "0.72881025", "0.71269625", "0.71152854", "0.705468", "0.6917585", "0.68989646", "0.67715466", "0.67506796", "0.6703534", "0.65438235", "0.6526872", "0.6466766", "0.6461225", "0.64508474", "0.6450235", "0.6431599", "0.64285743", "0.6426826", "0.6416015", "0.6406371", "0.63490...
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_currency_converter, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {...
[ "0.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(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ...
[ "0.79041183", "0.7805934", "0.77659106", "0.7727251", "0.7631684", "0.7621701", "0.75839096", "0.75300384", "0.74873656", "0.7458051", "0.7458051", "0.7438486", "0.742157", "0.7403794", "0.7391802", "0.73870087", "0.7379108", "0.7370295", "0.7362194", "0.7355759", "0.73454577...
0.0
-1
Methods // Set // //
public void setPosition(Position position) { this.position = position; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setdat()\n {\n }", "protected abstract Set method_1559();", "private void set(){\n resetBuffer();\n }", "@Test\n\tpublic void testSet() {\n\t}", "void setParameters() {\n\t\t\n\t}", "private void setData() {\n\n }", "@Override\n\t\tpublic void set(E arg0) {\n\t\t\t\n\t\t}...
[ "0.70363975", "0.69720316", "0.6667395", "0.6604412", "0.6591151", "0.6548154", "0.65340143", "0.6530934", "0.6492413", "0.6472429", "0.6438458", "0.6429826", "0.63563234", "0.6327421", "0.6325007", "0.6255079", "0.62292314", "0.6207949", "0.62041754", "0.6191674", "0.6190759...
0.0
-1
// Get // //
@Override public Position getPosition() { return position; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String get();", "String get();", "public void get() {\n }", "T get();", "T get();", "T get();", "T get();", "public String get();", "public Result get(Get get) throws IOException;", "@Override\n public void get() {}", "public java.lang.String getGet() {\n return instance.getGet();\n ...
[ "0.757242", "0.757242", "0.7513582", "0.75101554", "0.75101554", "0.75101554", "0.75101554", "0.7451334", "0.7385493", "0.7375238", "0.73573875", "0.73068106", "0.7162052", "0.7162052", "0.7135711", "0.7003554", "0.68301576", "0.68301576", "0.6818269", "0.678418", "0.67700326...
0.0
-1
TODO Autogenerated method stub
@Override public String toString() { return "Chiclete Vendido: " + maquinaDeChiclete.quantidadeDeChicletes + " chicletes"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void walk() { System.out.println("Can Walk"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void move() { System.out.println("Can Move"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void laugh() { System.out.println("Can laugh"); }
{ "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.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0...
0.0
-1
public interface for crossover operators. Title: popt4jlib Description: A Parallel MetaHeuristic Optimization Library in Java Copyright: Copyright (c) 20112016 Company:
public interface XoverOpIntf { /** * the operation accepts 2 chromosomes (not DGAIndividual objects, not * FunctionIntf() arguments), and combines them so as to produce two new * such chromosomes that are returned in a Pair object. The operation may * throw if any of the produced children are infeasible, assuming the operator * has enough knowledge of that fact. * @param chromosome1 Object * @param chromosome2 Object * @param params HashMap * @throws OptimizerException * @return Pair */ public Pair doXover(Object chromosome1, Object chromosome2, HashMap params) throws OptimizerException; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract int[] crossOver();", "public Population doCrossover(Population p) {\n\t\t// TODO Auto-generated method stub\n\t\tSystem.out.println(\"Performing 1 point crossover for config1's selection population.\");\n\t\tSystem.out.println(\"Selecting bits to crossover.\");\n\t\tSystem.out.println(\"Completed.\");\n...
[ "0.67555183", "0.6563008", "0.6410408", "0.624873", "0.62204665", "0.6135426", "0.6112925", "0.6038207", "0.60151106", "0.58823735", "0.5794971", "0.57791877", "0.5748142", "0.5731868", "0.5695461", "0.5667138", "0.5628175", "0.55771804", "0.5546775", "0.5537857", "0.55276793...
0.6862676
0
the operation accepts 2 chromosomes (not DGAIndividual objects, not FunctionIntf() arguments), and combines them so as to produce two new such chromosomes that are returned in a Pair object. The operation may throw if any of the produced children are infeasible, assuming the operator has enough knowledge of that fact.
public Pair doXover(Object chromosome1, Object chromosome2, HashMap params) throws OptimizerException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface XoverOpIntf {\r\n /**\r\n * the operation accepts 2 chromosomes (not DGAIndividual objects, not\r\n * FunctionIntf() arguments), and combines them so as to produce two new\r\n * such chromosomes that are returned in a Pair object. The operation may\r\n * throw if any of the produced child...
[ "0.6513299", "0.63708365", "0.5828782", "0.5658923", "0.55688363", "0.5538957", "0.55200016", "0.52807903", "0.52432966", "0.52080464", "0.5179426", "0.51671493", "0.50906104", "0.50861496", "0.50775665", "0.5032327", "0.49789077", "0.4959087", "0.48902163", "0.48784506", "0....
0.6297878
2
If only one player was on each team, we could have 33 teams
public void addTeam(Team team) { int maxTotalTeamsCurrentlyAllowed = getTotalPlayersInLeague(); // If a team has been created if(getTeams().size() != 0) { float greatestPlayerCount; // if the number of players on the largest team is not equal to zero if((greatestPlayerCount = (float) getTeamWithMostPlayers().getPlayerCount()) != 0) { // Get the sum of all the players in the league float totalLeaguePlayers = (float) getTotalPlayersInLeague(); // divide the total players in league by number of players in largest team, rounded down float totalTeamsAllowedFloat = totalLeaguePlayers / greatestPlayerCount; // cast into double for Math.floor method double totalTeamsAllowedDouble = (double) totalTeamsAllowedFloat; // cast into integer for comparison maxTotalTeamsCurrentlyAllowed = (int) Math.floor(totalTeamsAllowedDouble); } } // If we're requesting to make more teams than the current max allowed, throw exception if (getTeams().size() < maxTotalTeamsCurrentlyAllowed) { teams.add(team); } else { throw new IndexOutOfBoundsException("Not enough players for a new team"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private TeamId findWinningTeam(){\n if (state.score().totalPoints(TeamId.TEAM_1)>=Jass.WINNING_POINTS) {\n return TeamId.TEAM_1;\n }\n else {\n return TeamId.TEAM_2;\n }\n }", "private void getTeam() {\n Set<Integer> set = getRandomNumberSet();\n ...
[ "0.685519", "0.66812783", "0.65362996", "0.6463817", "0.6440445", "0.6371693", "0.63210905", "0.6234183", "0.62288046", "0.62089986", "0.62046057", "0.6195069", "0.6193902", "0.6158723", "0.6149687", "0.6087806", "0.6082862", "0.6079383", "0.6051767", "0.60468113", "0.6046772...
0.6014847
23
///////////////////////////////////////////////// ListOfPlayers interface overrides /////////////////////////////////////////////////
@Override public List<Player> getPlayers() { return new ArrayList<Player>(players); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Player> listPlayers();", "List<Player> getPlayers();", "@Override\n public List<Player> getPlayers() {\n return players;\n }", "public List<Player> getPlayerList(){\n return this.players;\n }", "static List<Player> getAllPlayers() {\n\t\treturn null;\r\n\t}", "ArrayList<IPlayer> build...
[ "0.81763655", "0.80469173", "0.7890082", "0.7634759", "0.7473943", "0.74648356", "0.7377769", "0.7344725", "0.73011416", "0.72862035", "0.7285177", "0.7285177", "0.7204182", "0.7198806", "0.7171775", "0.7090992", "0.70835423", "0.70761156", "0.7058626", "0.704869", "0.7039352...
0.782665
3
Determine range of players to show
@Override public List<Player> getPlayerPage(int page) throws IndexOutOfBoundsException { page = page - 1; int bottom = page * 10; if(bottom < 0 || bottom > players.size()) { throw new IndexOutOfBoundsException(); } int top; if(players.size() - bottom < 10) { top = players.size(); } else { top = bottom + 10; } List<Player> playersList = new ArrayList<>(players); return playersList.subList(bottom, top); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getAttackRange();", "private void getNumPlayers() {\n\t\tSystem.out.println(\"How many people are playing? (must be between \"+MIN_PLAYERS+\" and \"+MAX_PLAYERS+\")\");\n\t\tnumPlayers = GetInput.getInstance().anInteger(MIN_PLAYERS, MAX_PLAYERS);\n\t}", "public void setMinimumPlayers(int nPlayers)\r\n {...
[ "0.66138095", "0.62253445", "0.61169076", "0.60208744", "0.59651345", "0.59561914", "0.5892633", "0.58302265", "0.5802618", "0.5775047", "0.5749974", "0.5714175", "0.57038385", "0.57017195", "0.56637144", "0.56634766", "0.5637406", "0.5622062", "0.55832094", "0.55800796", "0....
0.0
-1
hardcoded for now just to prove it works, which it does.
@RequestMapping(value = "createSwapItem", method = RequestMethod.POST) public @ResponseBody String createSwapItem( @RequestParam(value = "description", required = false, defaultValue = "DEFAULT DESC") String description, @RequestParam(value = "owner", required = false, defaultValue = "DEFAULT OWNER") String owner, @RequestParam(value = "summary", required = false, defaultValue = "DEFAULT SUMMARY") String summary, @RequestParam(value = "location", required = false, defaultValue = "DEFAULT LOCATION") String location) { SwapItem item = new SwapItem(); item.setDescription(description); item.setOwner(owner); item.setSummary(summary); item.setLocation(location); item.setPostedOn(new Date()); item.setExpiresAfter(new Date(System.currentTimeMillis() + 600000L)); dao.insert(item); return item.toDbObject().toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected boolean func_70814_o() { return true; }", "@Override\n public void func_104112_b() {\n \n }", "public final void mo51373a() {\n }", "private void m50366E() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "protected boolean func_70041_e_() { return false; }", ...
[ "0.61948025", "0.61231744", "0.57960784", "0.57669663", "0.5701848", "0.5690428", "0.5654557", "0.5605337", "0.5583384", "0.5567899", "0.55195296", "0.55165184", "0.55090696", "0.5507051", "0.5448025", "0.54053646", "0.5396756", "0.5386292", "0.5308173", "0.52942675", "0.5288...
0.0
-1
Reset the database delete all the crap data and start over.
@RequestMapping("reset") public @ResponseBody String resetDB() { StringBuffer buffer = new StringBuffer(); List<SwapItem> items = dao.findAll(); for (SwapItem item : items) { int result = dao.delete(item); buffer.append(result).append(" / "); } return buffer.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void resetDB()\n\t{\n\t\tshutdown();\n\t\t\n\t\tif(Files.exists(m_databaseFile))\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tFiles.deleteIfExists(m_databaseFile);\n\t\t\t} catch (IOException e)\n\t\t\t{\n\t\t\t}\n\t\t}\n\t\t\n\t\tloadDatabase();\n\t\tupdateCommitNumber();\n\t\tupdateDatabase();\n\t}", "private st...
[ "0.8098577", "0.7521195", "0.7322441", "0.7307684", "0.7208143", "0.71869767", "0.716142", "0.7105139", "0.7078717", "0.7077859", "0.7077859", "0.7028948", "0.7027048", "0.7004044", "0.69837445", "0.69749653", "0.6973339", "0.69346815", "0.6870671", "0.6851706", "0.6801599", ...
0.65814716
32
Set the progress indicator as visible
private void searchSubreddit(String searchQuery) { mLoadingIndicatorPB.setVisibility(View.VISIBLE); // Create url string Bundle loaderArgs = new Bundle(); String searchSubredditUrl = SubredditSearchUtils.buildSubredditSearchURL(searchQuery, "25", "relevancy"); loaderArgs.putString(SEARCH_URL_KEY, searchSubredditUrl); LoaderManager loaderManager = getSupportLoaderManager(); loaderManager.restartLoader(SEARCH_LOADER_ID, loaderArgs, this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showProgressIndicator() {\n setProgressBarIndeterminateVisibility(true);\n setProgressBarIndeterminate(true);\n }", "public void showProgressBar() {\n\t\tmProgressBarVisible = true;\n\t\tif (getView() != null) {\n\t\t\tLinearLayout progressLayout = (LinearLayout) getView()\n\t\t\...
[ "0.7809273", "0.75535965", "0.74240834", "0.7300872", "0.7284884", "0.7188262", "0.7173794", "0.7146865", "0.71173966", "0.70845515", "0.70046216", "0.6996763", "0.6985872", "0.6962724", "0.6955249", "0.69303054", "0.6914053", "0.69081795", "0.6878282", "0.68351656", "0.68124...
0.0
-1
strip prefix "/r" if exists
String stripPrefix(String subredditName) { if (subredditName.length() >= 2) { Log.d(TAG, subredditName.substring(0, 2)); if (subredditName.substring(0, 2).equals("r/")) { return subredditName.substring(2); } } return subredditName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String strip(String name) {\n if (name == null) {\n return null;\n }\n int n = name.length() - 1;\n while (n >= 0 && name.charAt(n) != '/' && name.charAt(n) != '\\\\') {\n n--;\n }\n if (n > 0) {\n n++; // skip the '\\\\' we ...
[ "0.5958491", "0.59008527", "0.5856691", "0.5843354", "0.57888204", "0.5762812", "0.5695896", "0.5543826", "0.55340034", "0.54706794", "0.5455505", "0.54302365", "0.5407926", "0.53199524", "0.52878237", "0.52733797", "0.52643585", "0.5259542", "0.52427244", "0.5230767", "0.517...
0.68909615
0
/ Add Subreddit Button Click Listener
@Override public void onSubredditAdd(SubredditSearchUtils.SubredditItem subredditItem, ImageButton addSubredditButton) { if (!checkSubredditSaved(subredditItem.name)) { long status = addSubredditToDB(subredditItem); if (status == -1 ) Log.d(TAG, "IT IS NOT ADDED"); addSubredditButton.setImageResource(R.drawable.ic_action_check); toast("Subreddit " + subredditItem.name + " saved!"); } else { deleteSubredditFromDB(subredditItem.name); addSubredditButton.setImageResource(R.drawable.ic_action_add); toast("Subreddit " + subredditItem.name + " removed!"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onAddByWebSitePressed( ) {\n Router.Instance().changeView(Router.Views.AddFromWebSite);\n }", "public void run() {\n subredditApiRequest = new SubredditApiRequest(SubredditListViewFragment.this);\n subredditApiRequest.execute(subreddit);\n }", "private void se...
[ "0.59105355", "0.5766586", "0.5602713", "0.5513272", "0.54776305", "0.536728", "0.53610915", "0.5357793", "0.5329149", "0.5309097", "0.52954656", "0.528884", "0.5280583", "0.52751905", "0.5236698", "0.5174683", "0.5169322", "0.5167417", "0.51632684", "0.51372737", "0.5095003"...
0.74175614
0
/ Interface from adapter to check whether name exists in database to assign add/remove button
@Override public Boolean AdapterCheckIfExistInDB(String subredditName) { return checkSubredditSaved(subredditName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isInsert(String name){\n Cursor a = db.query(TABLE_NAME,new String[]{NAME}, NAME + \" LIKE \\\"\" + name + \"\\\"\",null,null,null, null);\n\n if (a.getCount() == 0){\n return false;\n }else{\n return true;\n }\n }", "boolean hasDataName();", ...
[ "0.6431392", "0.62570477", "0.6180462", "0.61700004", "0.6121058", "0.60968614", "0.60968614", "0.60968614", "0.60968614", "0.60968614", "0.60968614", "0.60968614", "0.60968614", "0.60968614", "0.60968614", "0.60968614", "0.60968614", "0.60968614", "0.60968614", "0.60968614", ...
0.63562065
1
TODO Autogenerated method stub
@Override public void cry() { System.out.println("喵喵喵"); }
{ "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.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0...
0.0
-1
Dismissing the progress dialog
@Override public void onErrorResponse(VolleyError volleyError) { Log.e("status Response", String.valueOf(volleyError)); // mProgressDialog.dismiss(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void dismissDialog() {\n if (progressDialog != null) {\n progressDialog.dismiss();\n }\n }", "public void dismissDialog(){\n\t if(pd != null){\n\t\t pd_progress = pd.getProgress();\n\t\t pd.dismiss();\n\t }\n }", "public void dismissProgressDialog() {\r\n if (prog...
[ "0.84301925", "0.8244721", "0.81212205", "0.8110473", "0.8038313", "0.80224514", "0.7887234", "0.7876067", "0.7817506", "0.774995", "0.7742372", "0.77355254", "0.7725122", "0.7725122", "0.7725122", "0.77058333", "0.76175463", "0.7603588", "0.75875247", "0.7545539", "0.7495149...
0.0
-1
EntityManager is NOT threadsafe
public EntityManager getEntityManager() { return getFactory().createEntityManager(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract EntityManager getEntityManager();", "abstract E getEntityManager();", "@Override\n\tprotected EntityManager getEntityManager() {\n\t\treturn entityManager;\n\t}", "@Override\n protected EntityManager getEntityManager() {\n return em;\n }", "@Override\n\tprotected EntityManag...
[ "0.6979293", "0.68959546", "0.68591624", "0.6835134", "0.68288404", "0.6753234", "0.6753234", "0.67416036", "0.66860896", "0.6658358", "0.663653", "0.66270804", "0.65487474", "0.6483364", "0.6462739", "0.6372437", "0.6349639", "0.6316726", "0.61260456", "0.6011383", "0.600908...
0.58050084
38
EXAMPLE USE CASES (using variables declared above)
public void Plant(){ name = "Peter"; // ID = 7; //<-- Not working because it is "final" - meaning it cannot be reassigned //TODO: Uncomment the above line to see error ^^^^ this.size = "large"; type = "Tree"; //<-- Only working because we're in the same class as the declared variable height = 10; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int main()\n{\n int x;\n float y;\n cin>>x>>y;\n switch(x)\n {\n case 1:\n break;\n case 2:\n y= (y*0.5)+y;\n cout<<y;\n break;\n case 3:\n y= y*2;\n cout<<y;\n break;\n default: \n cout<<\"Number of items is more\";\n break;\n }\n}", "public static ...
[ "0.594266", "0.55914176", "0.5547432", "0.5535044", "0.5527353", "0.5517876", "0.55115706", "0.5490455", "0.5487901", "0.54708874", "0.546817", "0.54554", "0.54548615", "0.54251534", "0.5410188", "0.54078", "0.54023176", "0.5400412", "0.53969926", "0.5336452", "0.5319386", ...
0.0
-1
Creates instance of type
IOperationable create(String operationType);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Object createInstance() throws InstantiationException, IllegalAccessException {\n\t\treturn classType.newInstance();\n\t}", "Type createType();", "Type createType();", "Type createType();", "Instance createInstance();", "T create();", "T create();", "@Override\r\n\tpublic T createInstance() {...
[ "0.7848592", "0.7769561", "0.7769561", "0.7769561", "0.7594579", "0.7332879", "0.7332879", "0.71689636", "0.70398194", "0.7019539", "0.683245", "0.68022376", "0.6799475", "0.67868364", "0.675929", "0.67492354", "0.67320824", "0.67063427", "0.6695477", "0.66675", "0.66626", ...
0.0
-1
Created by yanisbourabaa on 17/02/2017.
public interface ImageClickedListener { void onImageClicked(int position); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpub...
[ "0.61242384", "0.597112", "0.59578675", "0.57793146", "0.57763064", "0.57763064", "0.5760089", "0.57508016", "0.57455105", "0.5741328", "0.57051426", "0.5700705", "0.56750715", "0.5651326", "0.564479", "0.5610679", "0.5601671", "0.5599212", "0.5563033", "0.555589", "0.5555785...
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_main, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {...
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.6862...
0.0
-1
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(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ...
[ "0.7904669", "0.78062934", "0.77666116", "0.7727495", "0.7631956", "0.7622029", "0.75855523", "0.7530999", "0.7488249", "0.74583405", "0.74583405", "0.74391454", "0.742199", "0.7403733", "0.73921114", "0.7387281", "0.73795027", "0.73708874", "0.7363864", "0.7356251", "0.73459...
0.0
-1
Get Product Detail Obtain detailed information on a single product offered openly to the market
@Test public void getProductDetailTest() throws ApiException { String productId = null; ResponseBankingProduct response = api.getProductDetail(productId); // TODO: test validations }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Product getProductDetails(int idproduct) throws DataBaseException;", "public DisplayProductDetails getDisplayProductDetails(final Product product) {\n final DisplayProductDetails productDetails = new DisplayProductDetails();\n if (product != null) {\n // TODO Get product rating details f...
[ "0.7211518", "0.7208076", "0.71213025", "0.69963485", "0.6936376", "0.6909039", "0.68435454", "0.68266785", "0.67547745", "0.67284554", "0.67221326", "0.6717328", "0.670006", "0.66887265", "0.66638", "0.66448414", "0.6638544", "0.6584733", "0.6573761", "0.6551152", "0.6533774...
0.754872
0
Get Products Obtain a list of products that are currently openly offered to the market
@Test public void listProductsTest() throws ApiException { String effective = null; String updatedSince = null; String brand = null; String productCategory = null; Integer page = null; Integer pageSize = null; ResponseBankingProducts response = api.listProducts(effective, updatedSince, brand, productCategory, page, pageSize); // TODO: test validations }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Product> getProducts();", "public List<Product> getProducts();", "public void showAllProducts() {\n try {\n System.out.println(Constants.DECOR+\"ALL PRODUCTS IN STORE\"+Constants.DECOR_END);\n List<Product> products = productService.getProducts();\n System.ou...
[ "0.6970214", "0.6970214", "0.6956387", "0.69081855", "0.68880403", "0.68299735", "0.6829683", "0.6711751", "0.6711751", "0.6711751", "0.6680163", "0.66220623", "0.66007346", "0.6563422", "0.6551456", "0.6528926", "0.6504187", "0.64938", "0.64930373", "0.6469466", "0.64690524"...
0.6209105
51
Instantiates a new studente.
public Studente(String nome, String cognome, String matricola, String email, Date nascita, int annoIscrizione, CorsoDiStudi corso) { this.nome = nome; this.cognome = cognome; this.matricola = matricola; this.email = email; this.nascita = nascita; this.annoIscrizione = annoIscrizione; this.corso = corso; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Student()\n {\n lname = \"Tantiviramanond\";\n fname = \"Anchalee\";\n grade = 12;\n studentNumber = 2185;\n }", "public Student() {\n \n }", "public Student(){}", "public Student() {\r\n }", "public Student() {\n }", "public Student() {\n }", "pu...
[ "0.7837541", "0.78234774", "0.7801871", "0.77716357", "0.7721981", "0.7721981", "0.7721981", "0.7641771", "0.7601391", "0.7512748", "0.7409358", "0.7367729", "0.7361514", "0.72569025", "0.7215559", "0.7212593", "0.72083247", "0.71416336", "0.7125912", "0.70466435", "0.7030108...
0.65198964
73
Gets the anno iscrizione.
public int getAnnoIscrizione() { return annoIscrizione; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getAnnoCorso() {\r\n return this.annoCorso;\r\n }", "public void setAnnoIscrizione(int annoIscrizione) {\n\t\tthis.annoIscrizione = annoIscrizione;\n\t}", "public Integer getAnnoCorso() {\r\n return this.annoCorso;\r\n }", "public String getIcao() { return Icao; }", "public Stri...
[ "0.6800627", "0.6748485", "0.67475796", "0.65620434", "0.6410081", "0.62299377", "0.6164713", "0.6158304", "0.6071351", "0.6003172", "0.59515077", "0.5942932", "0.59257144", "0.58661693", "0.58657265", "0.5864167", "0.58467084", "0.5842424", "0.5797927", "0.57843685", "0.5780...
0.7870668
0
Sets the anno iscrizione.
public void setAnnoIscrizione(int annoIscrizione) { this.annoIscrizione = annoIscrizione; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setAnnoCorso(Integer annoCorso) {\r\n this.annoCorso = annoCorso;\r\n }", "public void setAnnoCorso(int annoCorso) {\r\n int oldAnnoCorso = this.annoCorso;\r\n this.annoCorso = annoCorso;\r\n propertyChangeSupport.firePropertyChange (\"annoCorso\", new Integer (oldAnnoCors...
[ "0.6714817", "0.6642442", "0.649625", "0.6248772", "0.6192396", "0.615886", "0.6146311", "0.60488683", "0.5951408", "0.5871296", "0.58463615", "0.58187294", "0.57643837", "0.5641892", "0.5633694", "0.5632202", "0.56052035", "0.5577154", "0.5522052", "0.5517055", "0.54917514",...
0.8037769
0
Reads from the stream.
public int read() throws IOException { if ( position == this.buffer.length() ) { return -1; } return this.buffer.charAt( this.position++ ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void read(InStream inStream) {\n\t}", "@Override\n public int read() throws IOException {\n if (stream.available() > 0) {\n return stream.read();\n } else {\n layer.receiveMoreDataForHint(getHint());\n // either the stream is now filled, or we...
[ "0.7436617", "0.7174387", "0.6736149", "0.66065", "0.65840584", "0.6581325", "0.65688515", "0.6554596", "0.65143126", "0.64800125", "0.6452115", "0.64435095", "0.6443187", "0.64391965", "0.6408092", "0.6404665", "0.6398956", "0.63021964", "0.62945896", "0.6284112", "0.6272781...
0.0
-1
/ 686 1 3 1 1 2 5 1 2 2 1 5 4 4 2 1 1 3 1 4 4 1 1 3 2 1 1 2 4 3 3 2 3 1 4 4 1 1 2 1 2 1 2 1 3 2 1 3 3 2 2 2 1 1 1 4 1 1 3 1 1 1 2 5 2 1 1 3 1 1 3 1 2 1 1 1 3 3 1 2 3 2 3 1 2 1 3 1 2 1 1 4 2 3 1 1 1 6 2 1 6 3 6 3 3 1 1 1 1 1 2 2 1 3 1 2 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 2 3 1 1 1 5 1 2 2 1 1 1 2 2 1 4 2 1 1 4 1 4 1 1 2 1 2 2 2 2 2 2 3 2 1 1 1 1 5 1 3 1 1 2 4 3 1 2 1 4 1 2 2 3 4 1 3 2 1 2 3 1 2 4 2 1 1 3 1 4 4 2 4 2 7 1 2 4 3 1 3 1 5 2 1 1 1 2 3 1 1 1 4 1 1 5 1 1 2 1 1 5 3 1 3 2 2 1 1 3 1 1 1 3 2 4 1 1 3 3 3 1 1 1 4 2 2 5 1 6 1 1 1 5 1 2 1 5 5 1 1 3 4 3 1 2 3 2 3 3 5 1 1 2 1 1 1 6 1 1 4 1 1 2 1 1 1 2 1 2 2 1 1 1 1 3 2 1 2 2 1 1 2 2 1 5 3 1 1 3 4 6 1 2 4 1 3 1 2 1 1 1 5 1 1 5 1 2 2 3 1 1 1 2 1 2 1 2 1 1 2 4 2 1 1 2 2 1 4 2 1 1 1 5 3 1 4 2 2 3 2 1 1 3 2 1 2 1 1 2 1 2 3 2 3 2 2 4 4 5 1 2 1 2 1 1 1 1 4 1 1 1 6 2 1 2 3 4 1 2 1 1 3 1 4 1 3 1 1 2 1 2 1 2 2 2 4 2 4 2 1 1 1 1 1 1 2 2 1 4 1 1 4 1 3 1 4 1 2 3 1 1 3 1 1 1 2 2 1 1 1 2 1 5 5 2 2 1 3 6 3 1 4 1 1 4 1 1 2 1 2 2 3 1 7 1 3 1 1 1 1 2 1 3 1 1 2 2 1 1 4 2 3 1 2 1 1 1 3 3 2 1 1 2 1 1 1 5 2 4 5 4 2 2 1 1 2 5 1 1 2 6 1 4 2 3 1 3 2 2 4 5 1 1 2 4 1 3 4 1 1 4 1 1 1 2 5 2 4 1 2 1 2 5 2 2 4 1 1 1 1 4 1 1 1 1 1 3 1 1 4 1 4 2 4 1 1 3 1 1 3 2 1 1 1 1 1 1 2 1 4 1 1 1 1 4 1 1 7 1 3 2 1 3 1 3 5 3 3 3 2 3 2 7 3 1 4 5 1 2 1 2 2 1 1 1 3 4 4 2 2 1 1 1 5 6 2 6 1 2 4 4 3 1 2 6 5 2 4 3 1 2 3 3 1 1 1 2 1 1 3 3 1 5 1 6 2 2 2 1 2 2 1 5 1
public static void main(String[] args) { Scanner sc = new Scanner(System.in); // int m = sc.nextInt(); int n = sc.nextInt(); Tree[] tree = new Tree[n]; for (int i = 0; i < n; i++) { tree[i] = new Tree(i + 1, sc.nextInt()); } // System.out.println(Arrays.toString(tree)); // Arrays.sort(tree,(a,b)->b.num-a.num); StringBuilder sb = new StringBuilder(); int first = 0; boolean shibai = false; while (first < n) { while (first < n && tree[first].num == 0) { first++; } int idx = first + 1; out: while (idx < n) { while (idx < n && tree[idx].num == 0) { idx++; } while (idx < n && first < n && tree[idx].num > 0 && tree[first].num > 0) { sb.append(tree[first].type) .append(" ") .append(tree[idx].type) .append(" "); tree[idx].num--; tree[first].num--; if (tree[first].num == 0) { first++; break out; } } } // System.out.println(Arrays.toString(tree)); // System.out.println(idx); if (idx > n - 1) { if (tree[first].num == 0) break; if (tree[first].num == 1) { sb.append(tree[first].type); break; } else { System.out.println("-"); shibai = true; break; } } } // while (true){ // if(tree[0].num==1){ // sb.append(tree[0].type); // break; // } // if(tree[1].num==0){ // System.out.println("-"); // shibai=true; // break; // } // while (tree[1].num>0){ // sb.append(tree[0].type).append(" ").append(tree[1].type).append(" "); // tree[0].num--; // tree[1].num--; // } // //System.out.println(sb.toString()); // // System.out.println(Arrays.toString(tree)); // // Arrays.sort(tree,(a,b)->b.num-a.num); // // } if (!shibai) { System.out.println(sb.toString()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\nScanner sc=new Scanner(System.in);\r\nString input1=sc.nextLine();\r\ninput1=input1.toLowerCase();\r\nint l=input1.length();\r\nchar a[]=input1.toCharArray();\r\nint d[]=new int[1000];\r\nString str=\"\";\r\nint i=0,k1=0,k2=0,m=0,c1=0,c2=0,c3=0,l1=0,u=0,u1=0;\r\nchar b[]={...
[ "0.5734304", "0.57030535", "0.556181", "0.55374557", "0.54831845", "0.54625756", "0.5447683", "0.5428776", "0.54002357", "0.53924966", "0.538841", "0.53184354", "0.5270276", "0.52485526", "0.5226749", "0.5224761", "0.5223501", "0.52223444", "0.52103037", "0.5203462", "0.51468...
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.view_issues, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {...
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.6862...
0.0
-1
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(); //noinspection SimplifiableIfStatement switch (id) { case R.id.action_edit_comic: addComic(); return true; case R.id.add_range: new DialogCreator(ViewIssues.this).createRangeDialog(strSeries, strPublisher); return true; case R.id.action_remove_series: new DialogCreator(ViewIssues.this).createDeleteSeriesDialog(strSeries, this); return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ...
[ "0.7904536", "0.78052336", "0.7766536", "0.7727363", "0.76318616", "0.7621916", "0.7584545", "0.7530609", "0.74878335", "0.74571276", "0.74571276", "0.7438656", "0.7422694", "0.7403604", "0.73918706", "0.7387049", "0.7379379", "0.73706305", "0.7362634", "0.7356091", "0.734574...
0.0
-1
Handle navigation view item clicks here.
@SuppressWarnings("StatementWithEmptyBody") @Override public boolean onNavigationItemSelected(MenuItem item) { int id = item.getItemId(); HelperFunctions.activityMenu(this, ViewIssues.this, id); 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
Map data = jwtTokenProvider.getData(token); Integer userNo = (Integer) data.getOrDefault("userNo", 1);
@GetMapping(value = "/") public ResultDTO getOneCall(@RequestHeader(value = "X-Auth-Token", required = false) String token, @RequestParam(defaultValue = "36") Double lat, @RequestParam(defaultValue = "128") Double lon) { Map result = weatherService.getOneCall(lat, lon); return new ResultDTO(1, "", result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Long getUserIdFromToken(String token) {\n\t\t//Extract claims\n\t\tClaims claims= Jwts.parser().setSigningKey(SecurityConstants.SECRET).parseClaimsJws(token).getBody();\n\t\t//return ID\n\t\treturn Long.parseLong((String)claims.get(\"id\"));\t\t\n\t}", "@Override\r\n public UserInfo getByToken(String t...
[ "0.62455326", "0.6229724", "0.61056185", "0.6069179", "0.5937974", "0.5839659", "0.5834805", "0.57604694", "0.56617963", "0.56248045", "0.55816245", "0.555628", "0.5545003", "0.5534166", "0.55311424", "0.5528737", "0.5467064", "0.5462409", "0.5413627", "0.53639483", "0.535666...
0.0
-1
Create an operate function The operate function has two arguments FlowProcess and BufferCall
public void operate(FlowProcess flowProcess, BufferCall bufferCall) { // Init long sum = 0; // Holds a day = 60 * 24 minutes long[] sums = new long[ 60 * 24 ]; long[] nums = new long[ 60 * 24 ]; Queue<Long> window = new LinkedList<Long>(); // Get all the current argument values for this daily grouping Iterator<TupleEntry> arguments = bufferCall.getArgumentsIterator(); boolean init = true; int c = 0; while ( arguments.hasNext() ) { // Get the arguments TupleEntry TupleEntry entry = arguments.next(); // Get size for Tuple int size = entry.getInteger( 0 ); // Get time for Tuple long time = entry.getLong( 1 ); // Modulo for every min int i = ( int ) (time / (1000 * 60)) % (60 * 24); // Init, 1st min of the day might be different than zero if ( init ) { c = i; init = false; } // For every new min if ( c != i ) { sum += sums[ c ] / nums[ c ]; window.add( sums[ c ] / nums[ c ] ); c = i; if ( window.size() > period ) { sum -= window.remove(); } // create a Tuple to hold our result values Tuple result = new Tuple( time / (1000 * 60), sum / window.size() ); // return the result Tuple bufferCall.getOutputCollector().add( result ); } sums[ i ] += size; nums[ i ]++; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract int process(Buffer input, Buffer output);", "public void operate(FlowProcess flowProcess, FunctionCall functionCall) {\n TupleEntry arguments = functionCall.getArguments();\n\n // creates a Tuple to hold our result values\n Tuple result = new Tuple();\n\n ...
[ "0.62582415", "0.59376466", "0.58490473", "0.57811004", "0.5482487", "0.54189295", "0.5409006", "0.532261", "0.53034884", "0.5283378", "0.526248", "0.52345216", "0.51646227", "0.5150759", "0.5119336", "0.5113014", "0.5107658", "0.50918955", "0.5066975", "0.50502634", "0.50145...
0.5970494
1
gets the arguments TupleEntry
public void operate(FlowProcess flowProcess, FunctionCall functionCall) { TupleEntry arguments = functionCall.getArguments(); // creates a Tuple to hold our result values Tuple result = new Tuple(); Calendar calendar = Calendar.getInstance(); calendar.setTimeZone( TimeZone.getTimeZone( "UTC" ) ); calendar.setTimeInMillis( arguments.getLong( 0 ) ); int day = calendar.get( java.util.Calendar.DAY_OF_MONTH ); // adds the day value to the result Tuple result.add( day ); // returns the result Tuple functionCall.getOutputCollector().add( result ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Sequence<? extends String> getArguments() {\n return Entry.getArguments();\n }", "java.lang.String getArgs(int index);", "java.lang.String getArgs(int index);", "java.lang.String getArgs(int index);", "java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Argument> \n get...
[ "0.68981403", "0.6187381", "0.6187381", "0.6187381", "0.61850965", "0.61850965", "0.5976776", "0.59666735", "0.5894541", "0.5886578", "0.58006096", "0.58006096", "0.5792236", "0.57885605", "0.57746595", "0.5773982", "0.5772929", "0.577211", "0.5766287", "0.57528365", "0.56963...
0.0
-1
Contains all ids for features that were deleted before endVersion (a feature may be both in this set and in created if it was created and then deleted)
public Set getDeleted() { return Collections.unmodifiableSet(deleted); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Set getFeatureIDs (FeatureType ft, Filter filter,\r\n DBAccess osa) throws Exception {\r\n \r\n StringBuffer query = new StringBuffer (\r\n \"SELECT \" + ft.getMasterTable().getIdField());\r\n AbstractSQLBuilder sqlBuilder = new GMLDBSQLBuilder ...
[ "0.6085936", "0.5902112", "0.5722713", "0.54058903", "0.5323928", "0.5238871", "0.5237597", "0.5193852", "0.5193852", "0.5193852", "0.51659644", "0.51643443", "0.51643443", "0.51619184", "0.51581347", "0.51581347", "0.51581347", "0.5132235", "0.5126154", "0.51208776", "0.5099...
0.55852085
3
Contains all ids for features that were created after startVersion (a feature may be both in this set and in deleted if it was created and then deleted)
public Set getCreated() { return Collections.unmodifiableSet(created); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Set getFeatureIDs (FeatureType ft, Filter filter,\r\n DBAccess osa) throws Exception {\r\n \r\n StringBuffer query = new StringBuffer (\r\n \"SELECT \" + ft.getMasterTable().getIdField());\r\n AbstractSQLBuilder sqlBuilder = new GMLDBSQLBuilder ...
[ "0.6486388", "0.6061627", "0.574936", "0.5700868", "0.5656663", "0.55392265", "0.5459917", "0.5455843", "0.544881", "0.5448404", "0.5444082", "0.5387763", "0.537273", "0.537273", "0.53506297", "0.5348402", "0.5345338", "0.53419834", "0.53419834", "0.53335375", "0.53326195", ...
0.0
-1
Contains all ids for features that were already there at startVersion, were modified before endVersion and were not deleted.
public Set getModified() { return Collections.unmodifiableSet(modified); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Set getFeatureIDs (FeatureType ft, Filter filter,\r\n DBAccess osa) throws Exception {\r\n \r\n StringBuffer query = new StringBuffer (\r\n \"SELECT \" + ft.getMasterTable().getIdField());\r\n AbstractSQLBuilder sqlBuilder = new GMLDBSQLBuilder ...
[ "0.59659034", "0.5703934", "0.566103", "0.5547796", "0.5547796", "0.55292165", "0.55172884", "0.5500818", "0.5500818", "0.5500818", "0.5464729", "0.5464729", "0.5464729", "0.5435679", "0.5414077", "0.5414077", "0.537348", "0.537348", "0.5366061", "0.5366061", "0.5366061", "...
0.0
-1
Channel is called onCreate()
public void createNotificationChannel() { //Instantiate the NotificationManager mNotifyManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE); //Notification Channel constructed NotificationChannel notificationChannel = new NotificationChannel(PRIMARY_CHANNEL_ID, "Simple Notification", NotificationManager.IMPORTANCE_HIGH); notificationChannel.enableLights(true); notificationChannel.setLightColor(Color.RED); notificationChannel.enableVibration(true); notificationChannel.setDescription("Simple Notification"); //Create the channel with the NotificationManager mNotifyManager.createNotificationChannel(notificationChannel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void onCreate() {\r\n super.onCreate();\r\n Realm.init(getApplicationContext());\r\n\r\n// createNotificationChannel();\r\n\r\n }", "protected void onInit() {\n\t}", "@RequiresApi(api = Build.VERSION_CODES.O)\n @Override\n public void onCreate() {\n ...
[ "0.708122", "0.6929039", "0.6920764", "0.6903971", "0.6867746", "0.6866012", "0.68592435", "0.68339723", "0.6820001", "0.67909116", "0.6757294", "0.67492604", "0.67465866", "0.6732402", "0.6686346", "0.66818607", "0.6680562", "0.6670863", "0.6670863", "0.66674453", "0.6666331...
0.0
-1
Method to return a notify builder for later use when a notification needs to be created Actual notification information
private NotificationCompat.Builder getNotificationBuilder() { //Launches the application once the user clicks the notification //Pending intent that is sent when the user clicks on the notification in the notification bar Intent notificationIntent = new Intent(this, MainActivity.class); PendingIntent notificationPendingIntent = PendingIntent.getActivity(this, NOTIFICATION_ID, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT); NotificationCompat.Builder notifyBuilder = new NotificationCompat.Builder(this, PRIMARY_CHANNEL_ID) .setContentTitle("You've been notified!") .setContentText("This is your notification text.") .setContentIntent(notificationPendingIntent) .setSmallIcon(R.drawable.ic_stat_name); return notifyBuilder; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@NonNull\n\tNotificationBuilder newNotification();", "@SuppressWarnings(\"deprecation\")\n\tprivate Notification makeNotification(){\n \tNotification notice = new Notification(R.drawable.ic_action_about, \n \t\t\tgetString(R.string.notice_ticker), System.currentTimeMillis());\n \tnotice.setLatestEventIn...
[ "0.7411369", "0.6902221", "0.68910563", "0.6810907", "0.6747912", "0.6531755", "0.6486251", "0.64618593", "0.6407784", "0.63175666", "0.62937874", "0.6277912", "0.6242772", "0.62240016", "0.61996686", "0.61979973", "0.61797416", "0.6150336", "0.61290026", "0.6123875", "0.6109...
0.7667415
0
Called when the user clicks the "Create Notification Button"
public void buildNotification(View view) { Toast.makeText(this, "Building the Notification", Toast.LENGTH_SHORT).show(); //Build the notification NotificationCompat.Builder notifyBuilder = getNotificationBuilder(); //Push the notification with a unique notification ID mNotifyManager.notify(NOTIFICATION_ID, notifyBuilder.build()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createNotification(View view) {\n Intent intent = new Intent(this, Status1.class);\r\n PendingIntent pIntent = PendingIntent.getActivity(this, 0, intent, 0);\r\n\r\n // Build notification\r\n // Actions are just fake\r\n Notification noti = new Notification.Builder(th...
[ "0.721405", "0.6964809", "0.6796448", "0.6751628", "0.66904974", "0.6604897", "0.65217805", "0.64909816", "0.64634806", "0.6453081", "0.6445975", "0.64245844", "0.6399092", "0.6380011", "0.63339424", "0.63329434", "0.6297195", "0.62849313", "0.6227557", "0.6219439", "0.620678...
0.0
-1
/ Calculate max length of subarray.
public int minOperations(int[] nums, int x) { Map<Integer, Integer> prefixSumMap = new HashMap<>(); prefixSumMap.put(nums[0], 0); for(int i=1;i<nums.length; i++) { nums[i]=nums[i-1] + nums[i]; prefixSumMap.put(nums[i], i); } int targetSubArray = nums[nums.length-1] - x; if(targetSubArray == 0) { return nums.length; } int res = 0; for(int i =0; i<nums.length; i++) { if(prefixSumMap.containsKey(targetSubArray)) { res = Math.max(res, prefixSumMap.get(targetSubArray)+1); } Integer target = prefixSumMap.get(nums[i] + targetSubArray); if(target != null) { res = Math.max(res, target -i); } } if(res == 0) { return -1; } return nums.length-res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int maxSubArrayLen(int[] nums, int k) {\n if(nums == null || nums.length == 0) {\n return 0;\n }\n int maxLength = 0;\n int[] sums = new int[nums.length];\n sums[0] = nums[0];\n HashMap<Integer, Integer> map = new HashMap<>();\n map.put(sums[0], 0);\n for(int i = 1; i < nums.len...
[ "0.7235517", "0.7115544", "0.7077751", "0.7018425", "0.7001822", "0.68779653", "0.6823406", "0.6756076", "0.6741257", "0.67322975", "0.6690055", "0.66837245", "0.6677216", "0.6665956", "0.6665956", "0.6661674", "0.6656768", "0.6638707", "0.6636546", "0.66210055", "0.66148245"...
0.0
-1
there is no Queue class in Java API, only a interface use offer() instead of add(), Queue has six unique methods, add() element() offer() peek() remove()
@Test public void queue() { Queue<String> q = new LinkedList<>(); q.offer("1"); q.offer("2"); q.offer("3"); System.out.println(q.offer("4")); System.out.println(q.add("2")); System.out.println(q.toString()); System.out.println("peek " + q.peek()); // 1, peek() means get the first element in the queue System.out.println("size " + q.size()); // 4 System.out.println("poll " + q.poll()); // 1 System.out.println("size " + q.size()); // 3 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface IQueue {\n public void clear();\n public boolean isEmpty();\n public int length();\n public Object peek();\n public void offer(Object x) throws Exception;\n public Object poll();\n}", "public interface Queue {\n\tpublic Set getGatheredElements();\n\tpublic Set getProcessedEleme...
[ "0.81771576", "0.8141228", "0.8129049", "0.80454034", "0.80250627", "0.8013581", "0.7900059", "0.7670654", "0.759322", "0.75835764", "0.752686", "0.7483883", "0.7477763", "0.73722035", "0.73634124", "0.7344914", "0.72760165", "0.72301465", "0.7174833", "0.7144217", "0.7123186...
0.80671215
3
Created by BogdanovKP on 30.03.2017.
public interface MediaFactory { TCPMediaContent createTCPObject(); UDPMediaContent createUDPObject(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private static void caja...
[ "0.5802726", "0.5717285", "0.5564899", "0.54853034", "0.54820645", "0.54820645", "0.547377", "0.5421394", "0.5417838", "0.5417199", "0.5404914", "0.5387924", "0.53278375", "0.5293323", "0.5287194", "0.5283038", "0.5283038", "0.5283038", "0.5283038", "0.5283038", "0.5283038", ...
0.0
-1
TODO Autogenerated method stub
@Override public void init(ServletConfig config) throws ServletException { super.init(config); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { String uri = req.getRequestURI(); String action = uri.substring(uri.lastIndexOf('/') + 1); session = req.getSession(); path = req.getContextPath(); pw = resp.getWriter(); System.out.println(uri); switch (action) { case "check": try { this.checkAction(req,resp); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } break; case "index": this.checkSessionAction(req,resp); break; case "logout": this.logoutAction(req,resp); break; default: break; } return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
private void logoutAction(HttpServletRequest req, HttpServletResponse resp) throws IOException { this.session.removeAttribute("MANAGEINSESSION"); resp.sendRedirect(path+"/jsps/index.jsp"); }
{ "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.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0...
0.0
-1
TODO Autogenerated method stub
private void checkSessionAction(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { req.getRequestDispatcher("/jsps/manage/index.jsp").forward(req, resp); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
private void checkAction(HttpServletRequest req, HttpServletResponse resp) throws SQLException, IOException { String account = req.getParameter("account"); String password = req.getParameter("password"); Manage manage = this.service.checkLogin(account, password); // 如果User不是空,证明账号密码正确 if (manage != null) { session.setAttribute("MANAGEINSESSION", manage); // resp.sendRedirect(path + "/jsps/manage/index.jsp"); pw.print(true); } else { pw.print(false); // resp.sendRedirect(path + "/jsps/manage/login.jsp"); } return; }
{ "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
Created by artemsamsonov on 27.11.15.
public interface GenericDAO<T> { public T get(int id) throws PersistException; public void create(T e) throws PersistException; public void update(T e) throws PersistException; public void delete(T e) throws PersistException; public List<T> getAll() throws PersistException; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private voi...
[ "0.59191126", "0.58096564", "0.5759425", "0.5639962", "0.5603626", "0.5603626", "0.558838", "0.55583006", "0.55504864", "0.55460584", "0.55377245", "0.5520028", "0.551602", "0.55144966", "0.5513578", "0.5495662", "0.5492932", "0.5492932", "0.5492932", "0.5492932", "0.5492932"...
0.0
-1
For a HTTPURLConnection java uses configured proxy settings.
public void updateSystemSettings() { System.setProperty( "http.agent", Environment.getPhexVendor() ); if ( isHttpProxyUsed ) { System.setProperty( "http.proxyHost", httpProxyHost ); System.setProperty( "http.proxyPort", String.valueOf( httpProxyPort ) ); } else { System.setProperty( "http.proxyHost", "" ); System.setProperty( "http.proxyPort", "" ); } // cache DNS name lookups for only 30 minutes System.setProperty( "networkaddress.cache.ttl", "1800" ); Security.setProperty( "networkaddress.cache.ttl", "1800" ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initProxy() {\n\n System.setProperty(\"http.proxyHost\", \"199.101.97.159\"); // set proxy server\n System.setProperty(\"http.proxyPort\", \"60099\"); // set proxy port\n //System.setProperty(\"http.proxyUser\", authUser);\n //System.setProperty(\"http.proxyPassword\", authP...
[ "0.70915115", "0.68040085", "0.66469604", "0.6623361", "0.65665233", "0.655549", "0.6534013", "0.64456904", "0.6429952", "0.64169854", "0.6414812", "0.64136", "0.63339055", "0.6266003", "0.62030244", "0.6188472", "0.6185341", "0.61523694", "0.6129338", "0.6116554", "0.6106018...
0.52706814
96
first find out if this is the first time Phex is running...
private void handlePhexVersionAdjustments() { if ( ( runningPhexVersion == null || runningPhexVersion.length() == 0 ) && ( runningBuildNumber == null || runningBuildNumber.length() == 0 ) ) { // this seems to be the first time phex is running... // in this case we are not updating... we use default values... // unfortunatly there is a bug causing no set version number to be available // between 56 and 78 // since b78 updates can be performed on any version without problems we execute // them always if no version is set. updatesForBuild78(); } else { // dropped update support of Phex 0.7 (2005-03-02) // dropped update support of Phex 0.8 (2005-11-19) // dropped update support of build 36 (2005-11-19) // dropped update support of build 42 (2005-11-19) // dropped update support of build 56 (2005-11-19) // update from Phex build <= 35 if ( runningBuildNumber == null || runningBuildNumber.length() == 0 ) { runningBuildNumber = "35"; } if ( VersionUtils.compare( "78", runningBuildNumber ) > 0 ) { updatesForBuild78(); } if ( VersionUtils.compare( "81", runningBuildNumber ) > 0 ) { updatesForBuild81(); } if ( VersionUtils.compare( "87", runningBuildNumber ) > 0 ) { updatesForBuild87(); } if ( VersionUtils.compare( "88", runningBuildNumber ) > 0 ) { updatesForBuild88(); } if ( VersionUtils.compare( "92", runningBuildNumber ) > 0 ) { updatesForBuild92(); } } runningBuildNumber = Environment.getInstance().getProperty( "build.number" ); runningPhexVersion = Res.getStr( "Program.Version" ); save(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static boolean isFirstLaunch() {\n if (new File(\"couchbase-sync.state\").exists()) {\n return false;\n }\n return true;\n }", "public boolean isFirstRun() {\n int currentVersionCode = 0;\n boolean firstRun = false;\n\n try {\n currentVersionCode = context.g...
[ "0.7043031", "0.6766601", "0.6722198", "0.666972", "0.66354424", "0.6602927", "0.64574605", "0.634705", "0.63063955", "0.62626123", "0.62596387", "0.62464964", "0.6239418", "0.6193054", "0.6146887", "0.6138523", "0.60940796", "0.60609", "0.605569", "0.60197145", "0.5989658", ...
0.0
-1
Read in old ArrayLists with tokeniser
private void updatesForBuild78() { runningBuildNumber = "78"; u78("mNetNetworkHistory", " "); u78("filteredCatcherPorts", " "); u78("connectToHistory", " "); u78("searchTermHistory", ","); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<T> readList();", "List<T> read();", "public static ArrayList readData(){\n ArrayList alr = new ArrayList();\n try{\n ArrayList stringArray = (ArrayList)read(filename);\n for (int i = 0; i < stringArray.size(); i++){\n String st = (String)stringArray.get(i...
[ "0.589287", "0.5834072", "0.57767844", "0.567749", "0.5590222", "0.55866873", "0.55382586", "0.5504454", "0.5485047", "0.54469115", "0.5446811", "0.54286593", "0.54189885", "0.5418416", "0.5395732", "0.53805906", "0.53620553", "0.5361593", "0.5360282", "0.53447783", "0.533978...
0.0
-1
Create a LambdaInvokerFactory, to be used to instantiate the Lambda proxy
private void setLambdaInvokeFactory(Context context) { factory = new LambdaInvokerFactory( context, Regions.US_EAST_1, this.credentialsProvider); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static LambdaFactory get(LambdaFactoryConfiguration configuration) {\n JavaCompiler compiler = Optional.ofNullable(configuration.getJavaCompiler()).orElseThrow(JavaCompilerNotFoundException::new);\n return new LambdaFactory(\n configuration.getDefaultHelperClassSourceProvider(),...
[ "0.6257268", "0.6245539", "0.6060707", "0.52612674", "0.51334286", "0.5065841", "0.49808067", "0.4961789", "0.49084467", "0.4893803", "0.48662502", "0.48426446", "0.47972992", "0.47836283", "0.47339734", "0.47325832", "0.47209585", "0.47121912", "0.47054073", "0.4704503", "0....
0.70642126
0
/ Some times we can't fire the loaded in the onActivityCreated method for example in this project SearchResultFragment can't have the query parameter when creating the activity it will be provided in onHandleSearch ( after ) the fragment created protected boolean fireLoaderInOnActivityCreated = true;
public EndlessMultiStateAbsListFragment() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n if (mHasLoad) {\n return;\n }\n initFragment();\n }", "protected void onStartLoading() { forceLoad();}", "@Override\n protected void onStartLoa...
[ "0.7312646", "0.7183634", "0.71154475", "0.7020869", "0.6716832", "0.67057824", "0.6648585", "0.66325814", "0.661305", "0.66119856", "0.6576668", "0.6575246", "0.6536687", "0.65197694", "0.6471665", "0.6462176", "0.6427989", "0.64084613", "0.6363976", "0.6363976", "0.63135767...
0.0
-1
get the id for the network loader
protected abstract int getEndlessNetworkLoaderId();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java....
[ "0.6678073", "0.6678073", "0.6678073", "0.6678073", "0.6678073", "0.6678073", "0.6678073", "0.6678073", "0.6678073", "0.6678073", "0.6678073", "0.6678073", "0.6678073", "0.6678073", "0.6678073", "0.6678073", "0.6678073", "0.6678073", "0.6678073", "0.6495673", "0.6495673", "...
0.7824927
0
get the main adapter that contains your custom views
protected abstract MainNetworkAdapter<T> getMainAdapter(Context context);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public customAdapter() {\n super(SeekerRatingsListActivity.this, R.layout.rating_content, seekerRatingsList);\n }", "@Override\n\tprotected com.dachen.medicine.adapter.BaseCustomAdapter.BaseViewHolder getViewHolder() {\n\t\treturn new ViewHolder();\n\t}", "@Override\r\n\tpublic View getView()...
[ "0.6632201", "0.6581514", "0.645696", "0.6445076", "0.6392434", "0.6386979", "0.6283682", "0.62610155", "0.62607074", "0.62505823", "0.62440866", "0.62403107", "0.62158537", "0.6202929", "0.61794776", "0.61745393", "0.61531633", "0.6144561", "0.6140492", "0.6122045", "0.61189...
0.61893606
14
TODO possibly work on making this test run the EncryptionUtil program and pass args to it
public static void main(String[] args) throws IOException { String command, file, destination; Scanner in = new Scanner(System.in); System.out.print("Enter: command file destination\n"); command = in.next(); file = in.next(); destination = in.next(); Process process = new ProcessBuilder("EncryptionUtil", command, file, destination).start(); InputStream is = process.getInputStream(); InputStreamReader isr = new InputStreamReader(is); BufferedReader br = new BufferedReader(isr); String line; System.out.printf("Output of running %s is:", Arrays.toString(args)); while ((line = br.readLine()) != null) { System.out.println(line); } // EncryptionUtil sec = null; // sec = new EncryptionUtil(); // // // try { // // System.out.println("Testing file encrypting: "); // File input = new File("To Encrypt.txt"); // File output = new File("Encrypted Output.txt"); // // sec.encrypt(input, output); // // File deOut = new File("Decrypted Output.txt"); // // sec.decrypt(output, deOut); // // // } catch (Exception e) { // e.printStackTrace(); // } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) throws Exception {\n String dataToEncrypt, key1, key2;\n byte[] keyBytes;\n int cryptoMode, algorithm;\n try {\n cryptoMode = ENCRYPT_MODE;//Integer.valueOf(args[0]);\n algorithm = T3DES_ALGORITHM;// Integer.valueOf(args[1]);\...
[ "0.7323237", "0.6979081", "0.6953875", "0.6922766", "0.6875346", "0.6864341", "0.6766888", "0.67178327", "0.67072225", "0.6679837", "0.66544586", "0.65479386", "0.654255", "0.6517998", "0.6501308", "0.6486483", "0.6439341", "0.6402553", "0.6363424", "0.634869", "0.63332695", ...
0.70242655
1
added by xingjun 17/06/2010 catch what the user search for private String searchResultOption;
public GeneQueryResultBean() { if (debug) System.out.println("GeneQueryResultBean.constructor"); input = Visit.getRequestParam("input"); query = Visit.getRequestParam("query"); if (query.equalsIgnoreCase("")) { focusedOrgan = null; } else { focusedOrgan = Visit.getRequestParam("focusedOrgan"); } // searchResultOption = Visit.getRequestParam("searchResultOption"); if (TableUtil.isTableViewInSession()) { return; } TableUtil.saveTableView(populateGeneQueryResultTableView("geneQueryResult")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void searchOptions()\n {\n System.out.println(\"\\n\\t\\t:::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| Select Options Below : |\");\n System.out.println(\"\\t\\t:::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| [1] Search by - ...
[ "0.7019858", "0.6841753", "0.6673432", "0.65795416", "0.65673643", "0.6547756", "0.6546093", "0.6457429", "0.64480704", "0.644072", "0.6423457", "0.6423457", "0.64108026", "0.63638866", "0.63516724", "0.6347788", "0.6304816", "0.62593687", "0.6231569", "0.62184423", "0.618453...
0.0
-1
modified by xingjun 17/06/2010 added code to display what the user search for
public String getTitle() { String displayInput = input; String organTitle = (focusedOrgan==null || focusedOrgan=="")? "" : " in <em>" + DatabaseHomepageBean.getOrganName(focusedOrgan) + "</em>"; return "Result of <em>" + query + "</em> query for <em> " + displayInput + "</em>" + organTitle; // return "Gene Query"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void searchDisplay()\r\n {\r\n System.out.println();\r\n System.out.println(\"------------ Search Menu ----------------\");\r\n System.out.println(\"(1) By Registration Number\");\r\n System.out.println(\"(2) By Car Make and Car Model\");\r\n System.out.println(\"(3) B...
[ "0.7669536", "0.7207083", "0.7135691", "0.70909", "0.7014634", "0.70102197", "0.6906056", "0.6906056", "0.6873194", "0.67763907", "0.6753297", "0.67323333", "0.66856444", "0.6680289", "0.6665514", "0.664435", "0.6634543", "0.6629656", "0.66222835", "0.66038376", "0.65945256",...
0.0
-1
/ (nonJavadoc) This is where you actually create the item view of the list
@Override public View getView(int position, View convertView, ViewGroup parent){ View view; if(convertView != null) view = convertView; else view = ((LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE)) .inflate(R.layout.playlist_item, parent, false); ((TextView) view.findViewById(R.id.playlist_name)).setText(playlistArray.get(position).name); return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ListItem createListItem();", "@Override\r\n\t\r\n\t protected OverlayItem createItem(int index) {\n\t\treturn lstItems.get(index);\r\n\t\r\n\t }", "@Override\n\tpublic void viewItem() {\n\t\t\n\t}", "private void createListView()\n {\n itens = new ArrayList<ItemListViewCarrossel>();\n ItemLi...
[ "0.7318747", "0.7254826", "0.72061616", "0.6849161", "0.67747396", "0.6769255", "0.6661882", "0.66209453", "0.66209453", "0.65726477", "0.6567623", "0.6555038", "0.65252775", "0.6502983", "0.64923245", "0.64585733", "0.6437594", "0.6437461", "0.641248", "0.6400419", "0.639323...
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_fragment6, container, false); unbinder = ButterKnife.bind(this, view); 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
Null id means not persisted
public Beacon createFromObject( Beacon b ) throws IllegalAccessException, InstantiationException { return createBeacon(b.getId(),b.getUuid(),b.getMajor(),b.getMinor(),b.getType(),b.getManufactorer(),b.getData(),b.getLastKnownDistance()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic Long getId() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Integer getId() {\n\t\treturn null;\n\t}", "@NotNull\n String getId();", "long getNoId();", "...
[ "0.7366989", "0.7360192", "0.7360192", "0.7201704", "0.72000146", "0.71724427", "0.69662005", "0.6951893", "0.6951893", "0.69398695", "0.69077367", "0.6883918", "0.6877625", "0.6837937", "0.6837937", "0.6825983", "0.6825983", "0.6825983", "0.68107384", "0.68099844", "0.679788...
0.0
-1
Asking Durial what the current pot is at.
public static void currentPotAtDialogueOption(Player player) { Npc npc = NpcHandler.npcs[lotteryNpcIndex]; npc.forceChat("The pot is currently at " + getTotalPotString() + "!"); player.getDH().sendNpcChat("The current lottery pot is at " + getTotalPotString() + "!", "You have a " + getWinningPercentage(player.getPlayerName()) + "% chance to win.", FacialAnimation.HAPPY.getAnimationId()); player.nextDialogue = 596; // Bring back to lottery option menu. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static private void TalkTo() {\n if (BSChristiansen.getCurrentRoom() == currentRoom) {\n System.out.println(BSChristiansen.getDescription() + \", yet he still gives you good advice:\\n\");\n System.out.println(BSChristiansen.getDialog(0));\n System.out.println(\"\");\n ...
[ "0.653036", "0.64045787", "0.5839181", "0.57632643", "0.57352626", "0.5656178", "0.55828875", "0.5545578", "0.5492572", "0.5450192", "0.543782", "0.5429185", "0.5427065", "0.5395957", "0.5388008", "0.5358368", "0.5354051", "0.53360033", "0.53105253", "0.530223", "0.529992", ...
0.6292639
2
Asking Durial what my winning percentage is.
public static void percentageOfWinningDialogueOption(Player player) { player.getDH().sendNpcChat("You have a " + getWinningPercentage(player.getPlayerName()) + "% chance to win.", FacialAnimation.HAPPY.getAnimationId()); player.nextDialogue = 596; // Bring back to lottery option menu. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int awardTriviaCoins (double pct) {\n Random r = new Random();\n int min = 1;\n if (pct > 0.75) {\n min = 15;\n } else if (pct > 0.5) {\n min = 10;\n } else if (pct > 0.25) {\n min = 5;\n }\n int winnings = min + (int)(Math.ceil(r.n...
[ "0.67017186", "0.6252787", "0.62477803", "0.6219746", "0.6210222", "0.6199499", "0.6177952", "0.60866034", "0.60750484", "0.60653085", "0.59911424", "0.59792644", "0.5968117", "0.584682", "0.58300364", "0.5784317", "0.57811624", "0.5765457", "0.57530904", "0.5742261", "0.5707...
0.676422
0
Asking Durial that i want to buy tickets/
public static void buyLotteryTicketsDialogueOption(Player player) { InterfaceAssistant.closeDialogueOnly(player); InterfaceAssistant .showAmountInterface(player, "BUY LOTTERY TICKETS", "Enter the amount of tickets you will buy for " + Misc.formatNumber(getLotteryTicketCost()) + " each"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void askBuyDevCards();", "void askBuyResources();", "private void requestBucks() {\n\t\ttry {\n\t\t\tSystem.out.println(\"Please choose a user to request TE Bucks from:\");\n\t\t\tUser fromUser;\n\t\t\tboolean isValidUser;\n\t\t\tdo {\n\t\t\t\tfromUser = (User)console.getChoiceFromOptions(userService.getUsers(...
[ "0.67378104", "0.66560787", "0.65465736", "0.61595553", "0.6111431", "0.6090523", "0.6060518", "0.60345924", "0.60298216", "0.5906723", "0.5903104", "0.58809716", "0.5857308", "0.58547664", "0.5830501", "0.5828853", "0.58151126", "0.5808877", "0.5780274", "0.575227", "0.57482...
0.5516798
41
Receive the x amount tickets wanted to be bought by the player.
public static boolean receiveLotteryBuyAmount(Player player, String action, int xAmount) { if (!action.equals("BUY LOTTERY TICKETS")) { return false; } if (player.isAdministratorRank() && !ServerConfiguration.DEBUG_MODE) { player.getPA().sendMessage("" + ServerConstants.getServerName() + " is not on debug mode."); player.getPA().closeInterfaces(true); return true; } int currentCurrencyAmount = ItemAssistant.getItemAmount(player, ServerConstants.getMainCurrencyId()); int maxAmount = Integer.MAX_VALUE / getLotteryTicketCost(); if (xAmount > maxAmount) { xAmount = maxAmount; } if (xAmount * getLotteryTicketCost() > currentCurrencyAmount) { xAmount = currentCurrencyAmount / getLotteryTicketCost(); } if (xAmount == 0) { player.getPA().closeInterfaces(true); player.getPA() .sendMessage("You need at least " + Misc.formatNumber(getLotteryTicketCost()) + " " + ServerConstants.getMainCurrencyName() + " to buy a lottery ticket."); return true; } LotteryDatabase data = LotteryDatabase.getPlayerLotteryInstance(player.getPlayerName()); if (data == null) { LotteryDatabase.lotteryDatabase.add(new LotteryDatabase(player.getPlayerName(), xAmount)); } else { data.setTickestPurchased(data.getTicketsPurchased() + xAmount); } totalTicketsPurchased += xAmount; ItemAssistant.deleteItemFromInventory(player, ServerConstants.getMainCurrencyId(), xAmount * getLotteryTicketCost()); player.getDH().sendStatement( "You have purchased x" + Misc.formatNumber(xAmount) + " lottery ticket" + Misc.getPluralS(xAmount) + " for " + Misc.formatNumber(xAmount * getLotteryTicketCost()) + " " + ServerConstants.getMainCurrencyName() + "."); Npc npc = NpcHandler.npcs[lotteryNpcIndex]; npc.forceChat("The pot is currently at " + getTotalPotString() + "!"); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int buyTickets(UUID uuid, int number) {\r\n\t\tPennyGame plugin = PennyGame.getPlugin(PennyGame.class);\r\n\t\tint previousTicketCount = getTicketCount(uuid);\r\n\t\t//number = Math.min(number, this.maxTicketCount - previousTicketCount);\r\n\t\tRegisteredServiceProvider<Economy> rsp = plugin.getServer().get...
[ "0.6531402", "0.64278823", "0.62859696", "0.61311656", "0.59836775", "0.59481007", "0.5935428", "0.587925", "0.58773917", "0.5876984", "0.5859172", "0.5853468", "0.5831343", "0.5812724", "0.58119386", "0.57876635", "0.5783458", "0.57562995", "0.57029516", "0.56562924", "0.563...
0.6996146
0
Save the lottery files.
public static void saveLotteryFiles() { FileUtility.deleteAllLines(TOTAL_TICKETS_FILE); FileUtility.deleteAllLines(LOTTERY_ENTRIES_FILE); FileUtility.addLineOnTxt(TOTAL_TICKETS_FILE, totalTicketsPurchased + ""); ArrayList<String> line = new ArrayList<String>(); for (int index = 0; index < LotteryDatabase.lotteryDatabase.size(); index++) { LotteryDatabase data = LotteryDatabase.lotteryDatabase.get(index); line.add(data.getPlayerName() + ServerConstants.TEXT_SEPERATOR + data.getTicketsPurchased()); } FileUtility.saveArrayContentsSilent(LOTTERY_ENTRIES_FILE, line); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void saveToFile() {\n\t\ttry {\n\t\t\tFile directory = GameApplication.getInstance().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS);\n\t\t\tFile target = new File(directory, FILE_NAME);\n\t\t\tif (!target.exists()) {\n\t\t\t\ttarget.createNewFile();\n\t\t\t}\n\t\t\tJsonWriter writer = new JsonWriter(new File...
[ "0.6511872", "0.6430145", "0.64291894", "0.64284974", "0.6393656", "0.6350425", "0.63405615", "0.62652564", "0.6262918", "0.6253857", "0.6249884", "0.62058496", "0.6196884", "0.61809194", "0.6153834", "0.6126107", "0.6083064", "0.6076808", "0.6068822", "0.604469", "0.599924",...
0.8014047
0
Read the lottery file saves.
public static void readLotteryFiles() { for (int index = 0; index < NpcHandler.npcs.length; index++) { Npc npc = NpcHandler.npcs[index]; if (npc == null) { continue; } if (npc.npcType == 11057) { lotteryNpcIndex = npc.npcIndex; } } try { totalTicketsPurchased = Integer.parseInt(FileUtility.readFirstLine(TOTAL_TICKETS_FILE)); } catch (Exception e) { e.printStackTrace(); } ArrayList<String> data = FileUtility.readFile(LOTTERY_ENTRIES_FILE); for (int index = 0; index < data.size(); index++) { String parse[] = data.get(index).split(ServerConstants.TEXT_SEPERATOR); String name = parse[0]; int ticketsPurchased = Integer.parseInt(parse[1]); LotteryDatabase.lotteryDatabase.add(new LotteryDatabase(name, ticketsPurchased)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void saveLotteryFiles() {\n\t\tFileUtility.deleteAllLines(TOTAL_TICKETS_FILE);\n\t\tFileUtility.deleteAllLines(LOTTERY_ENTRIES_FILE);\n\t\tFileUtility.addLineOnTxt(TOTAL_TICKETS_FILE, totalTicketsPurchased + \"\");\n\n\t\tArrayList<String> line = new ArrayList<String>();\n\t\tfor (int index = 0; inde...
[ "0.6780615", "0.58573", "0.57290137", "0.5707495", "0.55566394", "0.5532862", "0.55197006", "0.5493065", "0.5426617", "0.5400417", "0.53857285", "0.5381136", "0.5304843", "0.5278845", "0.52431434", "0.5235639", "0.52258605", "0.52221185", "0.521905", "0.5198317", "0.5198042",...
0.7444454
0
Asking Durial how does the lottery work.
public static void howDoesTheLotteryWorkDialogueOption(Player player) { String times = ""; for (int index = 0; index < DRAW_TIME_ANNOUNCEMENT.length; index++) { String extra = " & "; if (index == DRAW_TIME_ANNOUNCEMENT.length - 1) { extra = ""; } times = times + DRAW_TIME_ANNOUNCEMENT[index][1] + extra; } player.getDH().sendNpcChat("I am here to make one lucky player a millionaire!", "Everyday at " + times + " server time,", "the lottery will be, drawn and a new millionare will", "be announced!", FacialAnimation.HAPPY.getAnimationId()); player.nextDialogue = 598; // Bring back to lottery option menu. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\tint lotteryDigit1, lotteryDigit2;\n\t\tlotteryDigit1 = (int) (Math.random() * 10);\n\n\t\tdo {\n\t\t\tlotteryDigit2 = (int) (Math.random() * 10);\n\t\t} while (lotteryDigit1 == lotteryDigit2);\n\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.println(\"Tel...
[ "0.62578243", "0.6219007", "0.61166394", "0.6066675", "0.5952849", "0.59222776", "0.58349633", "0.5812952", "0.5764266", "0.57606107", "0.5758164", "0.5737934", "0.5729894", "0.5711738", "0.57002366", "0.567864", "0.5667875", "0.56585836", "0.5642553", "0.56135464", "0.560321...
0.6402671
0
Start announcing the predraw which is 15 minutes before the winner is announced
public static void announcePreDraw(String time) { for (int index = 0; index < DRAW_TIME_ANNOUNCEMENT.length; index++) { if (time.equals(DRAW_TIME_ANNOUNCEMENT[index][0])) { preDrawAnnouncement(); return; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void preDrawAnnouncement() {\n\t\twinnerAnnounced = false;\n\t\ttimePreDrawAnnounced = System.currentTimeMillis();\n\t\tObject object = new Object();\n\t\tCycleEventHandler.getSingleton().addEvent(object, new CycleEvent() {\n\t\t\tint timer = 0;\n\n\t\t\t@Override\n\t\t\tpublic void execute(CycleEven...
[ "0.6183037", "0.57602113", "0.5728444", "0.55319613", "0.54540646", "0.54376304", "0.5364559", "0.529958", "0.5289226", "0.5261155", "0.5250412", "0.5244094", "0.5228993", "0.522845", "0.51964223", "0.5188265", "0.5183882", "0.5156056", "0.5118194", "0.51159674", "0.51021415"...
0.4803098
82
Announce the winner of the lottery.
public static void announceWinner() { ArrayList<String> data = new ArrayList<String>(); for (int index = 0; index < LotteryDatabase.lotteryDatabase.size(); index++) { LotteryDatabase lotteryData = LotteryDatabase.lotteryDatabase.get(index); for (int i = 0; i < lotteryData.getTicketsPurchased(); i++) { data.add(lotteryData.getPlayerName()); } } if (data.isEmpty()) { Announcement.announce("No one has entered the lottery.", ServerConstants.RED_COL); return; } String lotteryWinnerName = data.get(Misc.random(data.size() - 1)); Announcement.announce("<img=27><col=a36718> " + lotteryWinnerName + " has won the lottery worth " + getTotalPotString() + " with " + getWinningPercentage(lotteryWinnerName) + "% chance of winning!"); Player winner = Misc.getPlayerByName(lotteryWinnerName); if (winner != null) { winner.getPA().sendScreenshot("Lottery " + getTotalPotString(), 2); } Npc npc = NpcHandler.npcs[lotteryNpcIndex]; npc.forceChat("Congratulations " + lotteryWinnerName + " has won the lottery worth " + getTotalPotString() + "!"); ItemAssistant.addItemReward(null, lotteryWinnerName, ServerConstants.getMainCurrencyId(), getTotalPotNumber(), false, -1); int moneySink = getTotalPotNumber() / 85; moneySink *= COMMISION_PERCENTAGE; CoinEconomyTracker.addSinkList(null, "LOTTERY " + moneySink); totalTicketsPurchased = 0; LotteryDatabase.lotteryDatabase.clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void announceWinner() {\r\n Piece winer;\r\n if (_board.piecesContiguous(_board.turn().opposite())) {\r\n winer = _board.turn().opposite();\r\n } else {\r\n winer = _board.turn();\r\n }\r\n if (winer == WP) {\r\n _command.announce(\"White w...
[ "0.7075433", "0.7054362", "0.700401", "0.6823632", "0.68112963", "0.68062717", "0.68013734", "0.6615346", "0.6522477", "0.6472144", "0.6463453", "0.64417106", "0.62065893", "0.618792", "0.6184189", "0.6175051", "0.61542827", "0.6146848", "0.6146675", "0.613598", "0.6120887", ...
0.79347247
0
The predraw announcement events.
public static void preDrawAnnouncement() { winnerAnnounced = false; timePreDrawAnnounced = System.currentTimeMillis(); Object object = new Object(); CycleEventHandler.getSingleton().addEvent(object, new CycleEvent() { int timer = 0; @Override public void execute(CycleEventContainer container) { Npc npc = NpcHandler.npcs[lotteryNpcIndex]; npc.forceChat("The lottery is at " + getTotalPotString() + "! Talk to Durial321 at ::shops to win, " + getMinutesLeftTillWinner() + " min" + Misc.getPluralS( getMinutesLeftTillWinner()) + " left!"); Announcement.announce( "<img=27><col=a36718> The lottery is at " + getTotalPotString() + "! Talk to Durial321 at ::shops to win, " + getMinutesLeftTillWinner() + " min" + Misc.getPluralS(getMinutesLeftTillWinner()) + " left!"); timer++; if (timer == 15) { timer = 0; container.stop(); } } @Override public void stop() { winnerAnnounced = true; announceWinner(); } }, 100); Object object1 = new Object(); CycleEventHandler.getSingleton().addEvent(object1, new CycleEvent() { int timer = 0; @Override public void execute(CycleEventContainer container) { if (winnerAnnounced) { container.stop(); return; } Npc npc = NpcHandler.npcs[lotteryNpcIndex]; if (Misc.hasPercentageChance(25)) { npc.requestAnimation(EMOTES[Misc.random(EMOTES.length - 1)]); } npc.forceChat( "The lottery is at " + getTotalPotString() + "! Talk to me to win, " + getMinutesLeftTillWinner() + " min" + Misc.getPluralS(getMinutesLeftTillWinner()) + " left!"); timer++; if (timer == 1500) { timer = 0; container.stop(); } } @Override public void stop() { } }, 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Event[] getInitialEvents();", "public void eventsPublishedByPub() {\r\n int index = 1;\r\n System.out.println(\"Events published by this publisher: \");\r\n for (Event event : pubEvents) {\r\n System.out.println(index + \"->\" + event + \"\\n\");\r\n ind...
[ "0.6007326", "0.5686282", "0.560602", "0.55278146", "0.5526502", "0.5512634", "0.54382", "0.5427286", "0.54144365", "0.5289904", "0.5288602", "0.5262248", "0.52491343", "0.52318066", "0.51992685", "0.5183803", "0.5173797", "0.5173002", "0.5138135", "0.5132678", "0.51266986", ...
0.0
-1
ANZ Engineering: Main method is to bootstrap the application.
public static void main(String[] args) { SpringApplication.run(AnzEngineeringApplication.class, args); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void boot() throws Exception {\n main = new Main();\n // add routes\n main.addRouteBuilder(this.getRouteBuilder());\n // add event listener\n main.addMainListener(this.getMainListener(getClass()));\n // run until you terminate the JVM\n System.out.println(\"S...
[ "0.73814136", "0.69546956", "0.6910809", "0.6798737", "0.6772153", "0.6759407", "0.675175", "0.6627947", "0.6607154", "0.6598058", "0.6597474", "0.65642184", "0.6516622", "0.6496447", "0.6486724", "0.6466063", "0.64536744", "0.64455193", "0.64316636", "0.6429376", "0.641599",...
0.0
-1